diff --git a/pages/hdyy/ccgl/sy-manage.vue b/pages/hdyy/ccgl/sy-manage.vue index c88219b..34cbd6b 100644 --- a/pages/hdyy/ccgl/sy-manage.vue +++ b/pages/hdyy/ccgl/sy-manage.vue @@ -51,8 +51,10 @@ - + + + @@ -78,6 +80,21 @@ this.title = options.title }, methods: { + async handleSubmit() { + if (!this.dataList.length) { + this.disabled = false + return + } + try { + // 显示弹窗,等待用户输入 + const { username, password } = await this.$refs.credentialPopup.show(); + // 调用原接口,传入账号密码 + this._confirmMore(username, password); + } catch (error) { + // 用户取消,不做处理 + console.log('用户取消输入'); + } + }, handleBlur (e) { if (e.change_qty) { if (e.change_qty < 0) { @@ -115,14 +132,10 @@ this.dataList = [] } }, - async _confirmMore () { + async _confirmMore (username, password) { this.disabled = true - if (!this.dataList.length) { - this.disabled = false - return - } try { - let res = await confirmMore(this.dataList) + let res = await confirmMore(username, password, this.dataList) if (res) { uni.showToast({ title: res.message, diff --git a/pages/hdyy/zpgl/mater-zupan.vue b/pages/hdyy/zpgl/mater-zupan.vue index bc1525a..af22cb8 100644 --- a/pages/hdyy/zpgl/mater-zupan.vue +++ b/pages/hdyy/zpgl/mater-zupan.vue @@ -64,8 +64,10 @@ - + + + @@ -94,6 +96,21 @@ this.title = options.title }, methods: { + async handleSubmit() { + if (!this.val1 || !this.dataList.length) { + this.disabled = false + return + } + try { + // 显示弹窗,等待用户输入 + const { username, password } = await this.$refs.credentialPopup.show(); + // 调用原接口,传入账号密码 + this._confirmPalletAssembly(username, password); + } catch (error) { + // 用户取消,不做处理 + console.log('用户取消输入'); + } + }, toScanAdd () { if (this.bagCode) { this._getBagAssembly2(this.bagCode) @@ -157,14 +174,10 @@ } catch (e) { } }, - async _confirmPalletAssembly () { + async _confirmPalletAssembly (username, password) { this.disabled = true - if (!this.val1 || !this.dataList.length) { - this.disabled = false - return - } try { - let res = await confirmPalletAssembly(this.val1, this.dataList) + let res = await confirmPalletAssembly(username, password, this.val1, this.dataList) if (res) { uni.showToast({ title: res.message, diff --git a/utils/getData3.js b/utils/getData3.js index 818309f..740eced 100644 --- a/utils/getData3.js +++ b/utils/getData3.js @@ -172,9 +172,9 @@ export const getBagAssembly = (bno) => request({ data: {bag_no: bno} }) // 组盘 -export const confirmPalletAssembly = (vcode, arr) => request({ +export const confirmPalletAssembly = (username, password, vcode, arr) => request({ url:'api/pdaCommon/confirmPalletAssembly', - data: {vehicle_code: vcode, group_plates: arr} + data: {username: username, password: RSAencrypt(password), vehicle_code: vcode, group_plates: arr} }) // 物料组桶(组盘管理)共 (1) 个 @@ -268,9 +268,9 @@ export const queryMoreIvt = (vcode) => request({ data: {vehicle_code: vcode} }) // 确认损益 -export const confirmMore = (rows) => request({ +export const confirmMore = (username, password, rows) => request({ url:'api/pdaWarehouse/confirmMore', - data: {rows: rows} + data: {username: username, password: RSAencrypt(password), rows: rows} }) // 虚拟入库(仓储管理)共 (1) 个