diff --git a/pages/hdyy/zpgl/mater-zudai.vue b/pages/hdyy/zpgl/mater-zudai.vue
index d9f7140..e0bb03f 100644
--- a/pages/hdyy/zpgl/mater-zudai.vue
+++ b/pages/hdyy/zpgl/mater-zudai.vue
@@ -104,7 +104,49 @@
-
+
+
+
+
+
+ 是否确认补打印标签
+
+
+
+
+
+ 物料卡标签填满更换
+
+
+
+
+
+ 标签破损更换
+
+
+
+
+
+
+ 其他,说明
+
+
+
+
+
+
+
+
+
+
+
@@ -136,7 +178,14 @@
disabled: false,
disabled1: false,
pcsn: '',
- flag: false
+ flag: false,
+ dialogVisible: false, // 控制弹窗显示/隐藏
+ reasons: {
+ full: false, // 物料卡标签填满更换
+ broken: false, // 标签破损更换
+ other: false // 其他
+ },
+ otherRemark: '' // 其他说明文字
};
},
computed: {
@@ -159,6 +208,44 @@
}
},
methods: {
+ // 显示弹窗(重置表单)
+ showDialog() {
+ this.resetForm();
+ this.dialogVisible = true;
+ },
+ // 关闭弹窗并重置表单
+ closeDialog() {
+ this.dialogVisible = false;
+ this.resetForm();
+ },
+ // 重置所有选项和输入内容
+ resetForm() {
+ this.reasons = {
+ full: false,
+ broken: false,
+ other: false
+ };
+ this.otherRemark = '';
+ },
+ // 切换复选框状态(手动控制,避免使用 v-model 复杂对象)
+ toggleFull() {
+ this.reasons.full = !this.reasons.full;
+ },
+ toggleBroken() {
+ this.reasons.broken = !this.reasons.broken;
+ },
+ toggleOther() {
+ this.reasons.other = !this.reasons.other;
+ // 如果取消“其他”,清空说明内容(可选,提升体验)
+ if (!this.reasons.other) {
+ this.otherRemark = '';
+ }
+ },
+ submitReasons () {
+ this.labelPrint()
+ console.log(1)
+ this.closeDialog();
+ },
bindDateChange: function(e) {
this.date = e.detail.value
},
@@ -171,6 +258,7 @@
}
},
async _queryBagInfo (e) {
+ // this.dialogVisible = true
try {
let res = await queryBagInfo(e)
if (res) {
@@ -259,8 +347,17 @@
// // console.log('error')
// }
// },
+ tolPrint() {
+ if (this.flag) {
+ this.dialogVisible = true
+ return
+ } else {
+ this.labelPrint()
+ }
+ },
async labelPrint () {
this.disabled1 = true
+ this.dialogVisible = false
this.flag = false
if (!this.val1 || JSON.stringify(this.materialData) === '{}') {
this.disabled1 = false
@@ -462,112 +559,245 @@
}
diff --git a/pages/hdyy/zpgl/mater-zutong.vue b/pages/hdyy/zpgl/mater-zutong.vue
index df48d47..72036bc 100644
--- a/pages/hdyy/zpgl/mater-zutong.vue
+++ b/pages/hdyy/zpgl/mater-zutong.vue
@@ -76,7 +76,49 @@
-
+
+
+
+
+
+ 是否确认补打印标签
+
+
+
+
+
+ 物料卡标签填满更换
+
+
+
+
+
+ 标签破损更换
+
+
+
+
+
+
+ 其他,说明
+
+
+
+
+
+
+
+
+
+
+
@@ -106,7 +148,14 @@
disabled: false,
disabled1: false,
pcsn: '',
- flag: false
+ flag: false,
+ dialogVisible: false, // 控制弹窗显示/隐藏
+ reasons: {
+ full: false, // 物料卡标签填满更换
+ broken: false, // 标签破损更换
+ other: false // 其他
+ },
+ otherRemark: '' // 其他说明文字
};
},
onLoad (options) {
@@ -120,12 +169,51 @@
}
},
methods: {
+ // 显示弹窗(重置表单)
+ showDialog() {
+ this.resetForm();
+ this.dialogVisible = true;
+ },
+ // 关闭弹窗并重置表单
+ closeDialog() {
+ this.dialogVisible = false;
+ this.resetForm();
+ },
+ // 重置所有选项和输入内容
+ resetForm() {
+ this.reasons = {
+ full: false,
+ broken: false,
+ other: false
+ };
+ this.otherRemark = '';
+ },
+ // 切换复选框状态(手动控制,避免使用 v-model 复杂对象)
+ toggleFull() {
+ this.reasons.full = !this.reasons.full;
+ },
+ toggleBroken() {
+ this.reasons.broken = !this.reasons.broken;
+ },
+ toggleOther() {
+ this.reasons.other = !this.reasons.other;
+ // 如果取消“其他”,清空说明内容(可选,提升体验)
+ if (!this.reasons.other) {
+ this.otherRemark = '';
+ }
+ },
+ submitReasons () {
+ this.labelPrint()
+ console.log(1)
+ this.closeDialog();
+ },
handleChange (e) {
if (e) {
this._queryBuckInfo(e)
}
},
async _queryBuckInfo (e) {
+ // this.dialogVisible = true
try {
let res = await queryBuckInfo(e)
if (res) {
@@ -204,8 +292,17 @@
// // console.log('error')
// }
// },
+ tolPrint() {
+ if (this.flag) {
+ this.dialogVisible = true
+ return
+ } else {
+ this.labelPrint()
+ }
+ },
async labelPrint () {
this.disabled1 = true
+ this.dialogVisible = false
this.flag = false
if (!this.val1 || JSON.stringify(this.materialData) === '{}' || JSON.stringify(this.suppData) === '{}') {
this.disabled1 = false
@@ -313,112 +410,135 @@
}