Commit e3be4b57 by cwq0219

客户列表

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