Commit 97f00b64 by linjinhong

fix:修改问题

parent 8f51f72e
......@@ -230,8 +230,21 @@ export default {
break;
}
},
async setData(data) {
async setData(data, type) {
if (!data) return this.$message.warning("请扫描生产单号/操作单号");
const canCallApi =
this.desktopDevice != 3 ||
(data.saveImgList?.every(el => el.power) ?? false);
if (this.desktopDevice == 3 && !canCallApi) {
if (type == "btn") {
const item = data.saveImgList?.find(el => !el.power);
this.$message.warning(
`该订单${item?.title || ""}面未打印,无法生产完成`
);
}
return;
}
let params = {
id: data.id,
orderType: this.orderType
......@@ -244,9 +257,6 @@ export default {
params.data = { ...data };
}
//如果为惠立彩则判断当前saveImgList字段中的power是否全是true 是则生产完成
const canCallApi =
this.desktopDevice != 3 ||
(data.saveImgList?.every(el => el.power) ?? false);
if (canCallApi) {
console.log("生产完成");
......@@ -273,7 +283,7 @@ export default {
cancelButtonText: "取消",
type: "warning"
}).then(async () => {
await this.setData(this.detail);
await this.setData(this.detail, "btn");
});
},
clearCache() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment