diff --git a/pages/hdyy/zpgl/mater-zudai.vue b/pages/hdyy/zpgl/mater-zudai.vue
index e0bb03f..fc36f17 100644
--- a/pages/hdyy/zpgl/mater-zudai.vue
+++ b/pages/hdyy/zpgl/mater-zudai.vue
@@ -103,7 +103,7 @@
-
+
@@ -148,6 +148,8 @@
+
+
@@ -208,6 +210,21 @@
}
},
methods: {
+ async handleSubmit() {
+ if (this.flag || !this.val1 || !this.num || !this.pcsn || JSON.stringify(this.materialData) === '{}') {
+ this.disabled = false
+ return
+ }
+ try {
+ // 显示弹窗,等待用户输入
+ const { username, password } = await this.$refs.credentialPopup.show();
+ // 调用原接口,传入账号密码
+ this._confirmBagAssembly(username, password);
+ } catch (error) {
+ // 用户取消,不做处理
+ console.log('用户取消输入');
+ }
+ },
// 显示弹窗(重置表单)
showDialog() {
this.resetForm();
@@ -317,14 +334,10 @@
this._confirmBagAssembly()
this.labelPrint()
},
- async _confirmBagAssembly () {
+ async _confirmBagAssembly (username, password) {
this.disabled = true
- if (this.flag || !this.val1 || !this.num || !this.pcsn || JSON.stringify(this.materialData) === '{}') {
- this.disabled = false
- return
- }
try {
- let res = await confirmBagAssembly(this.val1, this.materialData.material_id, this.materialData.supp_code, this.num, this.pcsn, this.date)
+ let res = await confirmBagAssembly(username, password, this.val1, this.materialData.material_id, this.materialData.supp_code, this.num, this.pcsn, this.date)
if (res) {
uni.showToast({
title: res.message,
@@ -559,116 +572,6 @@
}