This commit is contained in:
helloDy
2024-03-20 08:48:02 +08:00
parent db2cbb64c9
commit 630e7a95b3
19 changed files with 327 additions and 132 deletions

View File

@@ -431,28 +431,33 @@ export default {
opration = '终止'
}
console.log('22',val)
this.$confirm(`确定${opration}${'"工单' + val.data.name + '"'}?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
statusChange(param).then(({ data }) => {
this.$message({
message: '操作成功!工单状态稍后将会更新!',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList();
// 分配产量
if (param.status === 4) {
this.allocationOrder(param);
}
},
if (param.status !== 4) {
this.$confirm(`确定${opration}${'"工单' + val.data.name + '"'}?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
statusChange(param).then(({ data }) => {
this.$message({
message: '操作成功!工单状态稍后将会更新!',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList();
// 分配产量
// if (param.status === 4) {
// this.allocationOrder(param);
// }
},
});
});
});
})
.catch(() => { });
})
.catch(() => { });
} else {
// 完成弹出分配框
this.allocationOrder(param);
}
}
},
allocationOrder(val) {
@@ -460,20 +465,25 @@ export default {
getConOrderList({
workOrderId: val.id,
}).then((response) => {
if (response.data.length > 0) {
this.$confirm('工单结束,可分配产量', "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.allocationVisible = true;
this.$nextTick(() => {
this.$refs.allocation.init(val.id, true);
});
})
.catch(() => { });
}
this.$confirm('工单结束,可分配产量', "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.allocationVisible = true;
this.$nextTick(() => {
if (response.data.length > 0) {
// 有绑定订单带id
this.$refs.allocation.init(val.id);
} else {
this.$refs.allocation.init();
}
});
})
.catch(() => { });
// this.listQuery.total = response.data.total;
});
},