Commit e3be4b57 by cwq0219

客户列表

1 parent 4ad92127
......@@ -8,6 +8,12 @@ export function getList(data) {
return request(data)
}
// 订单统计
export function orderCount(data) {
data.method = `${path}order.count`
return request(data)
}
// 导出
export function exportFile(data) {
data.method = `${path}order.exportExcel`
......
......@@ -54,7 +54,7 @@
</div>
<div class="d2-container-content">
<d2-table-header>
<span slot="left">客户列表记录{{total}}条,其中已升级客户记录xx条。</span>
<span slot="left">客户列表记录{{count.orderCount}}条,其中已升级客户记录{{count.upgradeCount}}条。</span>
<auth-button category="Button"></auth-button>
</d2-table-header>
<el-table :data="tableData">
......@@ -188,7 +188,7 @@
</template>
<script>
import { getList, exportFile } from '@api/customerList'
import { getList, exportFile, orderCount } from '@api/customerList'
import { getServiceStore, getParkStore, getGoods } from '@api/editCustomer'
export default {
name: 'index',
......@@ -197,6 +197,10 @@ export default {
userInfo: this.$store.state.d2admin.user.info,
hasTitle: false,
hideVisible: false,
count: {
orderCount: 0,
upgradeCount: 0
},
showFormData: [{
label: '客户状态',
name: 'customerStatus',
......@@ -339,6 +343,7 @@ export default {
this.getServiceStore(this.userInfo.detail.merchantId)
}
this.getList()
this.getOrderCount()
},
methods: {
......@@ -349,7 +354,7 @@ export default {
keyword: this.searchForm.keyword,
upgradeFinishFlag: this.searchForm.upgradeFinishFlag
}
console.log(this.searchForm)
// console.log(this.searchForm)
this.searchForm.baseGoodsId && (params.baseGoodsCodeList = [this.searchForm.baseGoodsId])
this.searchForm.customerStatus && (params.statusList = this.customerStatusObj[this.searchForm.customerStatus])
this.searchForm.source && (params.sourceList = this.sourceStatusObj[this.searchForm.source])
......@@ -363,15 +368,21 @@ export default {
}
return params
},
getOrderCount() {
orderCount({}).then(res => {
// console.log(res)
this.count = res
})
},
getList() {
var params = this.getParams()
params = {
...this.page,
...params
}
console.log(params)
// console.log(params)
getList(params).then(res => {
console.log(res)
// console.log(res)
this.tableData = res.list
this.page.pageNum = res.pageNum
this.page.pageSize = res.pageSize
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!