Browse Source

2026-02-05

优化
master
fengyuan_yang 8 months ago
parent
commit
fdec629ab0
  1. 20
      src/views/modules/shopOrder/workOrderAlloc/searchWorkOrderAlloc.vue

20
src/views/modules/shopOrder/workOrderAlloc/searchWorkOrderAlloc.vue

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

Loading…
Cancel
Save