Commit 3f049cf5 by wusiyi

Merge branch 'dev_finish_last' into 'master'

Dev finish last

See merge request !3
parents 33c2d442 57a81692
......@@ -2,7 +2,7 @@
"name": "JomallProductionAssistant",
"productName": "JomallProductionAssistant",
"description": "",
"version": "1.0.45",
"version": "1.0.46",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
......
......@@ -190,8 +190,11 @@ export default {
//更新数据到本地数据
updateOrderInfoItem(this.detail.newId, this.detail, this.faceType);
}
if (this.orderType == "OP") {
this.checkAndCompleteProduction(this.detail);
if (
this.orderType == "OP" &&
this.canCompleteProduction(this.detail)
) {
this.setData(this.detail);
}
console.log("updateOrderInfoItemitem", item);
console.log("本地数据updateOrderInfoItem:", getOrderInfoMap());
......@@ -238,12 +241,6 @@ export default {
return data.saveImgList?.every(el => el.power) ?? false;
},
// 校验并执行数据赋值
async checkAndCompleteProduction(data) {
if (this.canCompleteProduction(data)) {
await this.setData(data);
}
},
async setData(data, type) {
if (!data) return this.$message.warning("请扫描生产单号/操作单号");
......@@ -640,12 +637,13 @@ export default {
if (
this.detail &&
Object.keys(this.detail).length > 0 &&
this.isAutoFinish &&
this.factoryType === "US" &&
this.orderType !== "OP"
this.isAutoFinish
) {
try {
await this.setData(this.detail);
await this.setData(
this.detail,
this.orderType === "OP" ? "btn" : undefined
);
} catch (err) {
console.error("setData 执行失败", err);
}
......@@ -1238,9 +1236,7 @@ export default {
</el-button>
</div>
<div style="margin-left: 10px;">
<el-checkbox v-if="factoryType === 'US'" v-model="isAutoFinish"
>自动完成上一单</el-checkbox
>
<el-checkbox 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