feat(crm): 新增订单操作记录、异议和收款组件
refactor(crm): 重构订单操作使用actions统一处理 style(crm): 清理无用代码和注释 fix(crm): 修复订单记录排序问题
This commit is contained in:
@@ -25,7 +25,6 @@
|
||||
|
||||
<el-table v-loading="loading" :data="orderList" height="400px" highlight-current-row @row-click="handleRowClick">
|
||||
<el-table-column label="订单编号" align="center" prop="orderCode" />
|
||||
<!-- <el-table-column label="客户" align="center" prop="customerId" /> -->
|
||||
<el-table-column label="总金额" align="center" prop="orderAmount" />
|
||||
<el-table-column label="销售员" align="center" prop="salesman" />
|
||||
<el-table-column label="交货日期" align="center" prop="deliveryDate" width="180">
|
||||
@@ -202,6 +201,7 @@ export default {
|
||||
if (newVal !== oldVal) {
|
||||
this.queryParams.customerId = newVal;
|
||||
this.getList();
|
||||
this.getSummary();
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
@@ -209,6 +209,38 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
/** 查询正式订单主列表 */
|
||||
getSummary() {
|
||||
Promise.all(
|
||||
[
|
||||
listOrder({
|
||||
pageNum: 1,
|
||||
pageSize: 1,
|
||||
customerId: this.customerId,
|
||||
preOrderStatus: 0, // 待审核
|
||||
}),
|
||||
listOrder({
|
||||
pageNum: 1,
|
||||
pageSize: 1,
|
||||
customerId: this.customerId,
|
||||
preOrderStatus: 1, // 已审核
|
||||
}),
|
||||
listOrder({
|
||||
pageNum: 1,
|
||||
pageSize: 1,
|
||||
customerId: this.customerId,
|
||||
preOrderStatus: 2, // 已取消
|
||||
}),
|
||||
]
|
||||
).then(([preOrderList, auditOrderList, canOrderList]) => {
|
||||
console.log(preOrderList, auditOrderList, canOrderList)
|
||||
this.currentCustomer = {
|
||||
waitCount: preOrderList.total,
|
||||
dealCount: auditOrderList.total,
|
||||
cancelCount: canOrderList.total,
|
||||
total: preOrderList.total + auditOrderList.total + canOrderList.total,
|
||||
}
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
if (!this.customerId) {
|
||||
this.total = 0;
|
||||
|
||||
Reference in New Issue
Block a user