From b2d84bca8a35d7d9d49dfa1dd1c24e788d1068b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=94=A1=E7=8E=B2?= <8702040+cai-ling@user.noreply.gitee.com> Date: Mon, 18 Nov 2024 17:45:44 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=98=E7=82=B9=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/management/alloc-maintenance_new.vue | 2 +- pages/management/check.vue | 51 +++++++++++++++------- pages/management/move-inventory.vue | 2 +- 3 files changed, 38 insertions(+), 17 deletions(-) diff --git a/pages/management/alloc-maintenance_new.vue b/pages/management/alloc-maintenance_new.vue index 5b0e6d4..3dab570 100644 --- a/pages/management/alloc-maintenance_new.vue +++ b/pages/management/alloc-maintenance_new.vue @@ -339,7 +339,7 @@ let res = await allocationBillDetailUpdate(el) if (res.code === 1) { setTimeout(() => { - this._allocationPage(e) + this._allocationBillDetail(e) }, 1500) } else { this.dataList.map(ele => { diff --git a/pages/management/check.vue b/pages/management/check.vue index d036bc7..3c42256 100644 --- a/pages/management/check.vue +++ b/pages/management/check.vue @@ -46,9 +46,9 @@ - - - + + + @@ -85,8 +85,8 @@ {{el.struct_name}} {{el.material_code}} {{el.material_name}} - - {{el.fac_qty}} + {{el.qty}} + {{el.unit}} {{el.check_result}} {{el.status}} @@ -141,6 +141,9 @@ }, onLoad () { this.toSearch() + setTimeout(() => { + this._getWarehouseInfo() + }, 3000) }, methods: { // 仓库下拉框 @@ -164,7 +167,7 @@ this._stIvtCheckdtlCheckPage() }, // 一级表格接口 - async _stIvtCheckdtlCheckPage () { + async _stIvtCheckdtlCheckPage (e) { let res = await stIvtCheckdtlCheckPage(this.val1, this.value1, this.queryParams1.pageNum + '', this.queryParams1.pageSize + '') if (res.code === 200) { res.content.map(el => { @@ -172,18 +175,22 @@ this.$set(el, 'subData', []) this.$set(el, 'subAllChecked', false) this.$set(el, 'subOneChecked', false) + this.$set(el, 'subStatus1', false) + this.$set(el, 'subStatus2', false) }) this.dataList = [...res.content] this.totalCount1 = Number(res.totalElements) this.queryParams1.pageSize = Number(this.queryParams1.pageSize + '') this.queryParams1.pageNum = Number(this.queryParams1.pageNum + '') + if (e) { + this._checkDtlByCheckCode(e) + } } else { uni.showToast({ title: res.desc, icon: 'none' }) } - this._getWarehouseInfo() }, // 一级表格切换分页 handlePageChange1(page) { @@ -200,6 +207,8 @@ } e.subAllChecked = false e.subOneChecked = false + e.subStatus1 = false + e.subStatus2 = false }, // 二级表格接口 async _checkDtlByCheckCode (e) { @@ -220,6 +229,10 @@ e.subData.map(el => { el.checked = e.subAllChecked }) + let arr = e.subData.filter(el => el.check_result === '正常') + let arr1 = e.subData.filter(el => el.check_result !== '正常') + e.subStatus1 = e.subAllChecked && e.subData.length > 0 && e.subData.length === arr.length + e.subStatus2 = e.subAllChecked && e.subData.length > 0 && e.subData.length === arr1.length }, // 二级表格多选 toSubCheckbox (e,el) { @@ -231,6 +244,10 @@ let arr = e.subData.filter(ele => ele.checked === true) e.subAllChecked = arr.length === e.subData.length e.subOneChecked = arr.length > 0 + let arr1 = arr.filter(el => el.check_result === '正常') + let arr2 = arr.filter(el => el.check_result !== '正常') + e.subStatus1 = arr.length > 0 && arr.length === arr1.length + e.subStatus2 = arr.length > 0 && arr.length === arr2.length }, // 副表格单行数量获取焦点 focusInput (e, el) { @@ -244,13 +261,17 @@ async _stIvtCheckdtlUpdateDtl (e, el, type) { try { let res = await stIvtCheckdtlUpdateDtl(el) - if (res.code !== 1) { + if (res.code === 1) { + setTimeout(() => { + this._checkDtlByCheckCode(e) + }, 1500) + } else { this.dataList.map(ele => { if (e.id === ele.id) { e.subData.map(elem => { if (elem.id === el.id) { if (type === 'sl') { - elem.qty = this.raw + elem.fac_qty = this.raw } } }) @@ -268,7 +289,7 @@ // 盘点完成按钮 async _stIvtCheckdtlCheckFinish (e) { this.disabled1 = true - if (!e.subOneChecked) { + if (!e.subOneChecked || !e.subStatus1) { this.disabled1 = false return } @@ -276,7 +297,7 @@ try { let res = await stIvtCheckdtlCheckFinish(arr) if (res.code === 1) { - this._checkDtlByCheckCode(e) + this._stIvtCheckdtlCheckPage(e) } this.disabled1 = false uni.showToast({ @@ -290,7 +311,7 @@ // 实物为准按钮 async _stIvtCheckdtlReally (e) { this.disabled1 = true - if (!e.subOneChecked) { + if (!e.subOneChecked || !e.subStatus2) { this.disabled1 = false return } @@ -298,7 +319,7 @@ try { let res = await stIvtCheckdtlReally(arr) if (res.code === 1) { - this._checkDtlByCheckCode(e) + this._stIvtCheckdtlCheckPage(e) } this.disabled1 = false uni.showToast({ @@ -312,7 +333,7 @@ // 财务为准 async _stIvtCheckdtlBasedOnFinance (e) { this.disabled1 = true - if (!e.subOneChecked) { + if (!e.subOneChecked || !e.subStatus2) { this.disabled1 = false return } @@ -320,7 +341,7 @@ try { let res = await stIvtCheckdtlBasedOnFinance(arr) if (res.code === 1) { - this._checkDtlByCheckCode(e) + this._stIvtCheckdtlCheckPage(e) } this.disabled1 = false uni.showToast({ diff --git a/pages/management/move-inventory.vue b/pages/management/move-inventory.vue index be7ea1f..70b839c 100644 --- a/pages/management/move-inventory.vue +++ b/pages/management/move-inventory.vue @@ -258,7 +258,7 @@ let res = await stIvtMoveinvUpdateDtl(el) if (res.code === 1) { setTimeout(() => { - this._stIvtMoveinvMovePage(e) + this._moveDtlByMoveId(e) }, 1500) } else { this.dataList.map(ele => {