|
|
@ -577,10 +577,10 @@ export default { |
|
|
}, |
|
|
}, |
|
|
// 执行工单数据汇总 |
|
|
// 执行工单数据汇总 |
|
|
executeAlloc() { |
|
|
executeAlloc() { |
|
|
// 获取选中的工单号列表 |
|
|
|
|
|
let orderNoList = this.selectedOrders.map(item => item.orderNo); |
|
|
|
|
|
|
|
|
// 获取选中的工单列表(包含orderNo和site) |
|
|
|
|
|
let orderList = this.selectedOrders.map(item => ({ orderNo: item.orderNo, site: item.site })); |
|
|
|
|
|
|
|
|
if (orderNoList.length === 0) { |
|
|
|
|
|
|
|
|
if (orderList.length === 0) { |
|
|
// 没有选择工单,提示是否汇总所有 |
|
|
// 没有选择工单,提示是否汇总所有 |
|
|
this.$confirm('您没有选择工单,是否汇总当前查询条件下的所有工单?', '提示', { |
|
|
this.$confirm('您没有选择工单,是否汇总当前查询条件下的所有工单?', '提示', { |
|
|
confirmButtonText: '确定汇总所有', |
|
|
confirmButtonText: '确定汇总所有', |
|
|
@ -593,19 +593,19 @@ export default { |
|
|
}); |
|
|
}); |
|
|
} else { |
|
|
} else { |
|
|
// 已选择工单,只汇总选中的 |
|
|
// 已选择工单,只汇总选中的 |
|
|
this.$confirm(`确定要汇总选中的 ${orderNoList.length} 个工单吗?`, '提示', { |
|
|
|
|
|
|
|
|
this.$confirm(`确定要汇总选中的 ${orderList.length} 个工单吗?`, '提示', { |
|
|
confirmButtonText: '确定', |
|
|
confirmButtonText: '确定', |
|
|
cancelButtonText: '取消', |
|
|
cancelButtonText: '取消', |
|
|
type: 'info' |
|
|
type: 'info' |
|
|
}).then(() => { |
|
|
}).then(() => { |
|
|
this.doExecuteAlloc(false, orderNoList); |
|
|
|
|
|
|
|
|
this.doExecuteAlloc(false, orderList); |
|
|
}).catch(() => { |
|
|
}).catch(() => { |
|
|
// 取消操作 |
|
|
// 取消操作 |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
// 实际执行工单数据汇总 |
|
|
// 实际执行工单数据汇总 |
|
|
doExecuteAlloc(allocAll, orderNoList) { |
|
|
|
|
|
|
|
|
doExecuteAlloc(allocAll, orderList) { |
|
|
this.allocLoading = true; |
|
|
this.allocLoading = true; |
|
|
|
|
|
|
|
|
let requestData = { |
|
|
let requestData = { |
|
|
@ -613,7 +613,7 @@ export default { |
|
|
...this.searchData, |
|
|
...this.searchData, |
|
|
user: this.$store.state.user.name |
|
|
user: this.$store.state.user.name |
|
|
}, |
|
|
}, |
|
|
orderNoList: orderNoList, |
|
|
|
|
|
|
|
|
orderList: orderList, // 传递包含orderNo和site的列表 |
|
|
allocAll: allocAll |
|
|
allocAll: allocAll |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
@ -640,12 +640,12 @@ export default { |
|
|
}).then(() => { |
|
|
}).then(() => { |
|
|
this.syncLoading = true; |
|
|
this.syncLoading = true; |
|
|
|
|
|
|
|
|
// 获取选中的工单号列表 |
|
|
|
|
|
let orderNoList = this.selectedOrders.map(item => item.orderNo); |
|
|
|
|
|
|
|
|
// 获取选中的工单列表(包含orderNo和site) |
|
|
|
|
|
let orderList = this.selectedOrders.map(item => ({ orderNo: item.orderNo, site: item.site })); |
|
|
|
|
|
|
|
|
let requestData = { |
|
|
let requestData = { |
|
|
site: this.searchData.site || '', |
|
|
site: this.searchData.site || '', |
|
|
orderNoList: orderNoList.length > 0 ? orderNoList : null |
|
|
|
|
|
|
|
|
orderList: orderList.length > 0 ? orderList : null // 传递包含orderNo和site的列表 |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
executeWorkOrderSync(requestData).then(({ data }) => { |
|
|
executeWorkOrderSync(requestData).then(({ data }) => { |
|
|
|