PDA触摸屏外箱标签内标签报工逻辑优化,title,content,label功能调整

This commit is contained in:
赵正易 2025-04-16 13:52:39 +08:00
parent 6487447c1d
commit 35274dad59
2 changed files with 21 additions and 16 deletions

View File

@ -149,7 +149,7 @@ export default {
let res = await CheckBoxInspectionLabel(parmas);
if (res.code === 200 && res.data === '合格') {
this.packageLabel.label = _value;
this.packageLabel.title = _value;
this.packageLabel.content = _value;
} else {
this.dialog.content = '外箱标签校验异常:' + res.data;
this.dialog.type = 'warn';
@ -179,7 +179,7 @@ export default {
let res = await CheckFirstInspectionLabel(parmas);
if (res.code === 200 && res.data === '合格') {
this.firstPartsLabel.label = _value;
this.firstPartsLabel.title = _value;
this.firstPartsLabel.content = _value;
} else {
this.dialog.content = '首标签校验异常:' + res.data;
this.dialog.type = 'warn';
@ -209,7 +209,7 @@ export default {
let res = await CheckEndInspectionLabel(parmas);
if (res.code === 200 && res.data === '合格') {
this.endPartsLabel.label = _value;
this.endPartsLabel.title = _value;
this.endPartsLabel.content = _value;
} else {
this.dialog.content = '末标签校验异常:' + res.data;
this.dialog.type = 'warn';
@ -225,7 +225,7 @@ export default {
GetFirstInspectionLabel({ workorder }).then((res) => {
if (res.code === 200 && res.data) {
this.firstPartsLabel.label = res.data;
this.firstPartsLabel.title = res.data;
this.firstPartsLabel.content = res.data;
}
});
},
@ -233,7 +233,7 @@ export default {
GetEndInspectionLabel({ workorder }).then((res) => {
if (res.code === 200 && res.data) {
this.endPartsLabel.label = res.data;
this.endPartsLabel.title = res.data;
this.endPartsLabel.content = res.data;
}
});
},
@ -244,17 +244,17 @@ export default {
confirmDelete() {
if (this.deleteIndex === 0) {
this.packageLabel.label = '';
this.packageLabel.title = '';
this.packageLabel.content = '';
this.deleteIndex = -1;
}
if (this.deleteIndex === 1) {
this.firstPartsLabel.label = '';
this.firstPartsLabel.title = '';
this.firstPartsLabel.content = '';
this.deleteIndex = -1;
}
if (this.deleteIndex === 2) {
this.endPartsLabel.label = '';
this.endPartsLabel.title = '';
this.endPartsLabel.content = '';
this.deleteIndex = -1;
}
this.$refs.deleteDialogRef.close();

View File

@ -87,7 +87,7 @@
<script>
// Api
import { CheckBoxInspectionLabel2,GetFirstInspectionLabel2, GetEndInspectionLabel2, CheckFirstInspectionLabel2, CheckEndInspectionLabel2 } from '@/api/workorder/index.js';
import { CheckBoxInspectionLabel2, GetFirstInspectionLabel2, GetEndInspectionLabel2, CheckFirstInspectionLabel2, CheckEndInspectionLabel2 } from '@/api/workorder/index.js';
export default {
props: {
formData: {
@ -144,10 +144,10 @@ export default {
}
let parmas = {
workorder: this.formData.fkWorkorder,
first_label: _value
box_label: _value
};
let res = await CheckBoxInspectionLabel2(parmas);
if (res.code === 200 && res.data) {
if (res.code === 200 && res.data === '合格') {
this.packageLabel.label = _value;
this.packageLabel.content = _value;
} else {
@ -224,14 +224,16 @@ export default {
getFirstLabel(workorder) {
GetFirstInspectionLabel2({ workorder }).then((res) => {
if (res.code === 200 && res.data) {
this.firstPartsLabel = res.data;
this.firstPartsLabel.label = res.data;
this.firstPartsLabel.content = res.data;
}
});
},
getEndLabel(workorder) {
GetEndInspectionLabel2({ workorder }).then((res) => {
if (res.code === 200 && res.data) {
this.endPartsLabel = res.data;
this.endPartsLabel.label = res.data;
this.endPartsLabel.content = res.data;
}
});
},
@ -241,15 +243,18 @@ export default {
},
confirmDelete() {
if (this.deleteIndex === 0) {
this.firstPartsLabel = {};
this.packageLabel.label = '';
this.packageLabel.content = '';
this.deleteIndex = 0;
}
if (this.deleteIndex === 1) {
this.firstPartsLabel = {};
this.firstPartsLabel.label = '';
this.firstPartsLabel.content = '';
this.deleteIndex = 0;
}
if (this.deleteIndex === 2) {
this.endPartsLabel = {};
this.endPartsLabel.label = '';
this.endPartsLabel.content = '';
this.deleteIndex = 0;
}
this.$refs.deleteDialogRef.close();