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