Commit 97f00b64 by linjinhong

fix:修改问题

parent 8f51f72e
...@@ -230,8 +230,21 @@ export default { ...@@ -230,8 +230,21 @@ export default {
break; break;
} }
}, },
async setData(data) { async setData(data, type) {
if (!data) return this.$message.warning("请扫描生产单号/操作单号"); 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 = { let params = {
id: data.id, id: data.id,
orderType: this.orderType orderType: this.orderType
...@@ -244,9 +257,6 @@ export default { ...@@ -244,9 +257,6 @@ export default {
params.data = { ...data }; params.data = { ...data };
} }
//如果为惠立彩则判断当前saveImgList字段中的power是否全是true 是则生产完成 //如果为惠立彩则判断当前saveImgList字段中的power是否全是true 是则生产完成
const canCallApi =
this.desktopDevice != 3 ||
(data.saveImgList?.every(el => el.power) ?? false);
if (canCallApi) { if (canCallApi) {
console.log("生产完成"); console.log("生产完成");
...@@ -273,7 +283,7 @@ export default { ...@@ -273,7 +283,7 @@ export default {
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}).then(async () => { }).then(async () => {
await this.setData(this.detail); await this.setData(this.detail, "btn");
}); });
}, },
clearCache() { 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