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

View File

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