Commit e06737f6 by huaying

fix: 客户列表页面修改

parent 073cec9b
......@@ -55,9 +55,17 @@ let fomatFloat = val => {
}
}
let fomatFloatN = val => {
if (val || val == 0) {
return parseFloat(val).toFixed(2)
} else {
return '';
}
}
let defaultImg = val => {
if(!val) {
return './static/img/default.png'
}
}
export { formatTime,fomatNumber,fomatText,formatYMD,fomatFloat,defaultImg,formatHMS }
export { formatTime,fomatNumber,fomatText,formatYMD,fomatFloat,fomatFloatN,defaultImg,formatHMS }
......@@ -154,7 +154,7 @@
:label="memberFieldsName[colum]"
:prop="colum"
show-overflow-tooltip
:min-width="colum==='name' ? 200 : colum == 'status' ? 170 : colum == 'lastCostTime' ? 210 : 150"
:min-width="colum==='name' ? 200 : colum == 'status' ? 170 : (colum == 'lastCostTime' || colum == 'allChannelLastCostTime' || colum == 'allChannelCostTimes' || colum == 'allChannelCostAllPaid' || colum == 'costFeePaid' || colum == 'lastCost') ? 180 : 150"
:fixed="colum==='name'"
:sortable="['name','grade','status','channel','createCardStoreName','cardNo','forzenStatus','mainStoreName'].includes(colum)?false:isExist[colum]?'custom':false"
>
......@@ -248,6 +248,11 @@
<div>{{ row.createTime.split(' ')[0] }}</div>
<div>{{ row.createTime.split(' ')[1] }}</div>
</div>
<!-- 最近消费时间(全渠道) -->
<!-- <div v-else-if="colum == 'allChannelLastCostTime'">
<div>{{ row.allChannelLastCostTime.split(' ')[0] }}</div>
<div>{{ row.allChannelLastCostTime.split(' ')[1] }}</div>
</div> -->
<!-- 关注时间 -->
<div v-else-if="colum == 'attentionDate'">
<div>{{ row.attentionTime.split(' ')[0] }}</div>
......
......@@ -348,10 +348,14 @@ export default {
tableData = resultData.map(ele => ({
...ele,
avgNumber: ele.avgNumber.toFixed(2),
allChannelLastCostTime:
ele.allChannelLastCostTime != -1
? formatLongTime(ele.allChannelLastCostTime, 2)
: "--", // 最近消费时间(全渠道)
lastCostTime:
ele.lastCostTime != -1
? formatLongTime(ele.lastCostTime, 2)
: "--", // 最近消费时间
: "--", // 最近消费时间(线下)
createTime:
ele.createTime != -1
? formatLongTime(ele.createTime, 1)
......
......@@ -32,16 +32,16 @@
<div style="display:flex;padding-top:3px">
<!-- 中 -->
<div class="order-report-middle">
<div class="order-report-value" style="width:118px">{{ storeOrderReport[0].value | fomatFloat }}</div>
<div class="order-report-value" style="width:96px">{{ storeOrderReport[1].value || 0 }}</div>
<div class="order-report-value" style="width:124px">{{ storeOrderReport[2].value | formatYMD }}</div>
<div class="order-report-value" style="width:82px">{{ storeOrderReport[3].value | fomatFloat }}</div>
<div class="order-report-value" style="width:82px">{{ storeOrderReport[4].value | fomatFloat }}</div>
<div class="order-report-value" style="width:131px">{{ storeOrderReport[5].value | fomatFloat }}</div>
<div class="order-report-value" style="width:87px">{{ storeOrderReport[6].value | fomatFloat }}</div>
<div class="order-report-value" style="width:130px"></div>
<div class="order-report-value" style="width:70px"></div>
<div class="order-report-value" style="width:91px"></div>
<div class="order-report-value" style="width:118px">{{ allOrderReport[0].value | fomatFloat }}</div>
<div class="order-report-value" style="width:96px">{{ allOrderReport[1].value || 0 }}</div>
<div class="order-report-value" style="width:124px">{{ allOrderReport[2].value | formatYMD }}</div>
<div class="order-report-value" style="width:82px">{{ allOrderReport[3].value | fomatFloat }}</div>
<div class="order-report-value" style="width:82px">{{ allOrderReport[4].value | fomatFloat }}</div>
<div class="order-report-value" style="width:131px">{{ allOrderReport[5].value | fomatFloat }}</div>
<div class="order-report-value" style="width:87px">{{ allOrderReport[6].value | fomatFloat }}</div>
<div class="order-report-value" style="width:130px">{{ allOrderReport[7].value | fomatFloatN }}</div>
<div class="order-report-value" style="width:70px">{{ allOrderReport[8].value | fomatFloatN }}</div>
<div class="order-report-value" style="width:91px">{{ allOrderReport[9].value | fomatFloatN }}</div>
</div>
</div>
<div style="display:flex">
......@@ -132,6 +132,18 @@ export default {
{ label: '消费总额(应收)', key: 'costFee', type: 'amount', value: 0 },
{ label: '件单价', key: 'avgGoodsCost', type: 'amount', value: 0 },
{ label: '最高单笔(应收)', key: 'highCost', type: 'amount', value: 0 },
],
allOrderReport: [
{ label: '消费总额(实付)', key: 'costFeePaid', type: 'amount', value: 0 },
{ label: '消费次数', key: 'costTimes', type: 'int', value: 0 },
{ label: '最近消费时间', key: 'lastCostTime', type: 'date', value: '' },
{ label: '客单价', key: 'avgCost', type: 'amount', value: 0 },
{ label: '连带率', key: 'relatedPercent', type: 'float', value: 0 },
{ label: '最高单笔(实付)', key: 'highCostPaid', type: 'amount', value: 0 },
{ label: '平均折扣', key: 'avgDiscount', type: 'float', value: 0 },
{ label: '消费总额(应收)', key: 'costFee', type: 'amount', value: 0 },
{ label: '件单价', key: 'avgGoodsCost', type: 'amount', value: 0 },
{ label: '最高单笔(应收)', key: 'highCost', type: 'amount', value: 0 },
]
}
},
......@@ -140,6 +152,7 @@ export default {
this.memberId = this.$route.query.memberId;
this.getMemberInfo();
this.getStoreReportData();
this.getAllReportData();
},
methods: {
getMemberInfo() {
......@@ -150,6 +163,17 @@ export default {
this.orderCount = { numOfCustomer, numOfSale, wechatMallNum, weimobMallNum, numOfTmall, numOfDouYin, otherMallNum };
})
},
// 全渠道
getAllReportData() {
doFetch(url.ajaxMembersInfo, { memberId: this.memberId, orderType: 0 }).then(res => {
const { result } = res.data || {};
const memberInfo = result.memberInfo || {};
this.allOrderReport.forEach(el => {
el.value = memberInfo[el.key];
});
});
},
// 门店
getStoreReportData() {
doFetch(url.ajaxMembersInfo, { memberId: this.memberId }).then(res => {
const { result } = res.data || {};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment