客户明细数据

master
wangweijia 6 years ago
parent c597f006a1
commit 54c88f3b95

@ -33,14 +33,14 @@
</i-col> </i-col>
<i-col span="12" style="height: 100%"> <i-col span="12" style="height: 100%">
<row><span style="width: 60px;display:inline-block;text-align: right">关联会员</span></row> <row><span style="width: 60px;display:inline-block;text-align: right">关联会员</span></row>
<row><span style="width: 60px;display:inline-block;text-align: right">会员名称</span>&nbsp;<span>客户Id</span></row> <row><span style="width: 60px;display:inline-block;text-align: right">会员名称</span>&nbsp;<span>{{customerData.vipName}}</span></row>
<row><span style="width: 60px;display:inline-block;text-align: right">手机号</span></row> <row><span style="width: 60px;display:inline-block;text-align: right">手机号</span>&nbsp;<span>{{customerData.vipPhone}}</span></row>
<row><span style="width: 60px;display:inline-block;text-align: right">会员生日</span>&nbsp;<span>客户Id</span></row> <row><span style="width: 60px;display:inline-block;text-align: right">会员生日</span>&nbsp;<span>{{customerData.birthday}}</span></row>
<row><span style="width: 60px;display:inline-block;text-align: right">消费次数</span></row> <row><span style="width: 60px;display:inline-block;text-align: right">消费次数</span></row>
<row><span style="width: 60px;display:inline-block;text-align: right">消费金额</span>&nbsp;<span>客户Id</span></row> <row><span style="width: 60px;display:inline-block;text-align: right">消费金额</span>&nbsp;<span>客户Id</span></row>
<row><span style="width: 60px;display:inline-block;text-align: right">最近消费</span></row> <row><span style="width: 60px;display:inline-block;text-align: right">最近消费</span></row>
<row><span style="width: 60px;display:inline-block;text-align: right">专属导购</span>&nbsp;<span>客户Id</span></row> <row><span style="width: 60px;display:inline-block;text-align: right">专属导购</span>&nbsp;<span>{{customerData.sellerName}}</span></row>
<row><span style="width: 60px;display:inline-block;text-align: right">所属门店</span></row> <row><span style="width: 60px;display:inline-block;text-align: right">所属门店</span>&nbsp;<span>{{customerData.shopName}}</span></row>
</i-col> </i-col>
</row> </row>
@ -62,7 +62,7 @@
</div> </div>
</template> </template>
<script> <script>
import customerDetail from "../services/datacenter/DataCenter";
export default { export default {
data() { data() {
@ -77,7 +77,7 @@
shopList: [{"id":1,"name":"一区"},{"id":2,"name":"二大区"}], shopList: [{"id":1,"name":"一区"},{"id":2,"name":"二大区"}],
sellerId: null, sellerId: null,
sellerList: [{"id":1,"name":"一区"},{"id":2,"name":"二大区"}], sellerList: [{"id":1,"name":"一区"},{"id":2,"name":"二大区"}],
customerId:255, customerData: {},
columns1: [ columns1: [
{ {
title: '序号', title: '序号',
@ -85,15 +85,15 @@
}, },
{ {
title: '客户名称', title: '客户名称',
key: 'customerName' key: 'name'
}, },
{ {
title: '客户手机', title: '客户手机',
key: 'customerPhone' key: 'phone'
}, },
{ {
title: '所属导购', title: '所属导购',
key: 'seller' key: 'sellerName'
}, },
{ {
title: '关联会员', title: '关联会员',
@ -113,13 +113,14 @@
}, },
{ {
title: '会员生日', title: '会员生日',
key: 'vipBirth' key: 'birthday'
}, },
{ {
title: '操作', title: '操作',
key: 'operation', key: 'operation',
render: (h, params) => { render: (h, params) => {
let that = this; let that = this;
that.customerData = that.data1[params.index];
return h('Button', { return h('Button', {
on: { on: {
'click': (value) => { 'click': (value) => {
@ -154,13 +155,81 @@
} }
}, },
mounted: function () { mounted: function () {
this.getCustomerData();
this.downData();
}, },
methods: { methods: {
searchCustomerDataBtnClick: function () { searchCustomerDataBtnClick: function () {
this.getCustomerData();
},
getCustomerData: function () {
let that = this;
that.data1 = [];
debugger;
let request =
{userId: 13, startDate: that.startDate, endDate: that.endDate, regionId: that.regionId, shopId: that.shopId, sellerId: that.sellerId};
customerDetail.dataDetail(request, function (data) {
data = data.data.results;
if(data){
for(let i=0;i<data.length;i++){
let entity = data[i];
if(entity){
let birthday = entity.birthday;
if(birthday){
entity.birthday = that.$moment(birthday).format("MM-DD")
}
that.data1.push(entity);
}
}
}
})
}, },
downData: function () {
let that = this;
that.regionList = [];
that.shopList = [];
that.sellerList = [];
debugger;
let request =
{userId: 13};
customerDetail.downData(request, function (data) {
debugger;
data = data.data.results;
if(data){
let seller = data.seller;
let region = data.region;
let shop = data.shop;
if(seller){
for(let i=0;i<seller.length;i++){
let entity = seller[i];
if(entity){
that.sellerList.push(entity);
}
}
}
if(region){
for(let i=0;i<region.length;i++){
let entity = region[i];
if(entity){
that.regionList.push(entity);
}
}
}
if(shop){
for(let i=0;i<shop.length;i++){
let entity = shop[i];
if(entity){
that.shopList.push(entity);
}
}
}
}
})
}
// /**mainList*/ // /**mainList*/
// getMainList: function(){ // getMainList: function(){
// //

@ -0,0 +1,24 @@
/**
* 客户数据明细
*/
import http from '../CommonHttp'
/**
* 查询客户数据明细
*/
export function dataDetail(params, call) {
return http.post('/customer/info',params).then(call)
}
/**
* 下拉框数据
*/
export function downData(params, call) {
return http.post('/region/user/region',params).then(call)
}
export default {
dataDetail: dataDetail,
downData: downData
}

@ -28,7 +28,7 @@ module.exports = {
hotOnly: false, hotOnly: false,
disableHostCheck: true, disableHostCheck: true,
/* 使用代理 后台接口路径 */ /* 使用代理 后台接口路径 */
proxy: 'http://localhost:8312/' proxy: 'http://localhost:8080/'
// proxy: 'http://jdxdev.vipgz4.idcfengye.com/' // proxy: 'http://jdxdev.vipgz4.idcfengye.com/'
}, },
} }

Loading…
Cancel
Save