Commit 73b1e52c by wusiyi

fix: bug

parent 8c720a42
......@@ -2,7 +2,7 @@
"name": "JomallProductionAssistant",
"productName": "JomallProductionAssistant",
"description": "",
"version": "1.0.33",
"version": "1.0.34",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
......
......@@ -107,8 +107,7 @@ export default {
],
faceType: "A",
dialogVisible: false,
showforcedProduc: false,
completingOrderId: null
showforcedProduc: false
};
},
computed: {
......@@ -191,20 +190,12 @@ export default {
}
//更新数据到本地数据
updateOrderInfoItem(this.detail.newId, this.detail, this.faceType);
this.checkAndCompleteProduction(this.detail);
}
console.log("updateOrderInfoItemitem", item);
console.log("本地数据updateOrderInfoItem:", getOrderInfoMap());
}
}
// deep: true,
},
"detail.saveImgList": {
handler(list) {
if (this.desktopDevice !== 3 || !this.detail || !list?.length) return;
this.checkAndCompleteProduction(this.detail);
},
deep: true
}
},
methods: {
......@@ -265,9 +256,6 @@ export default {
return;
}
if (this.completingOrderId === data.id) return;
this.completingOrderId = data.id;
let params = {
id: data.id,
orderType: this.orderType
......@@ -280,9 +268,9 @@ export default {
params.data = { ...data };
}
//如果为惠立彩则判断当前saveImgList字段中的power是否全是true 是则生产完成
const canCallApi =
this.desktopDevice != 3 ||
(data.saveImgList?.every(el => el.power) ?? false);
// const canCallApi =
// this.desktopDevice != 3 ||
// (data.saveImgList?.every(el => el.power) ?? false);
try {
console.log("生产完成");
......@@ -345,8 +333,8 @@ export default {
}
this.$message.success("操作成功");
} finally {
this.completingOrderId = null;
} catch (error) {
console.error("setData 执行失败", error);
}
},
async sureData() {
......@@ -667,7 +655,8 @@ export default {
if (
this.detail &&
Object.keys(this.detail).length > 0 &&
this.isAutoFinish
this.isAutoFinish &&
this.user.factory.countryCode === "US"
) {
try {
await this.setData(this.detail);
......@@ -676,26 +665,30 @@ export default {
}
}
if (this.detail && !this.isAutoFinish && this.desktopDevice == 3) {
//惠立彩判断是否全部图片都已经打印完成
const canCallApi =
this.detail.saveImgList?.every(el => el.power) ?? false;
if (canCallApi) {
bus.$emit("busEmit", {
value: this.detail.newId,
type: "completeFail"
});
}
}
// if (this.detail && !this.isAutoFinish && this.desktopDevice == 3) {
// //惠立彩判断是否全部图片都已经打印完成
// const canCallApi =
// this.detail.saveImgList?.every(el => el.power) ?? false;
// if (canCallApi) {
// bus.$emit("busEmit", {
// value: this.detail.newId,
// type: "completeFail"
// });
// }
// }
//判断生产单号是否为空
if (this.productionNo === "")
return this.$message.warning("请录入生产单号/操作单号");
// const today = moment(new Date()).format("YYYY-MM-DD");
const today = moment(new Date()).format("YYYY-MM-DD");
//判断上一单未勾选添加当天日期是否跳过
if (!this.isAutoFinish && today != getNowDate()) {
//判断上一单未勾选添加当天日期是否跳过(us)
if (
this.user.factory.countryCode === "US" &&
!this.isAutoFinish &&
today != getNowDate()
) {
this.$confirm("请注意自动完成上一单未勾选", "提示", {
confirmButtonText: "跳过提示",
type: "warning"
......@@ -756,6 +749,10 @@ export default {
}
this.detail = findByPodProductionNo.data;
if (this.orderType == "OP") {
this.checkAndCompleteProduction(this.detail);
}
//赋值当前扫码为生产单号的标识
if (!this.detail["newId"]) {
this.detail["newId"] = this.productionNo;
......@@ -817,11 +814,7 @@ export default {
isForcedProduction
);
this.$store.commit("setProductDetail", this.detail);
if (this.desktopDevice !== 3) {
await this.setData(this.detail);
} else {
this.checkAndCompleteProduction(this.detail);
}
ipcRenderer.send("win-subScreen", findByPodProductionNo.data);
this.$dataStore.set("production_no", this.productionNo);
this.productionNo = "";
......@@ -1252,7 +1245,11 @@ export default {
</el-button>
</div>
<div style="margin-left: 10px;">
<!-- <el-checkbox v-model="isAutoFinish">自动完成上一单</el-checkbox> -->
<el-checkbox
v-if="user.factory.countryCode === 'US'"
v-model="isAutoFinish"
>自动完成上一单</el-checkbox
>
</div>
<div style="margin-left: 10px;" v-if="desktopDevice == 3">
<el-checkbox v-model="isForcedProduction" style="color: red;"
......
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