diff --git a/pages/management/alloc-maintenance_new.vue b/pages/management/alloc-maintenance_new.vue index d008f38..5b0e6d4 100644 --- a/pages/management/alloc-maintenance_new.vue +++ b/pages/management/alloc-maintenance_new.vue @@ -188,6 +188,10 @@ }, onLoad () { this.toSearch() + setTimeout(() => { + this._getWarehouseInfo() + this._getOrganizationInfo() + }, 3000) }, methods: { // 仓库下拉框 @@ -222,7 +226,7 @@ this._allocationPage() }, // 一级表格接口 - async _allocationPage () { + async _allocationPage (e) { let res = await allocationPage(this.val1, this.value1, this.value2, this.queryParams1.pageNum + '', this.queryParams1.pageSize + '') if (res.code === 1) { res.result.map(el => { @@ -235,14 +239,15 @@ this.totalCount1 = Number(res.totalElements) this.queryParams1.pageSize = Number(res.pageSize) this.queryParams1.pageNum = Number(res.pageNum) + if (e) { + this._allocationBillDetail(e) + } } else { uni.showToast({ title: res.desc, icon: 'none' }) } - this._getWarehouseInfo() - this._getOrganizationInfo() }, // 一级表格切换分页 handlePageChange1(page) { @@ -309,7 +314,7 @@ let arr = e.subData.filter(ele => ele.checked === true) let res = await allocationBillConfirm(arr) if (res.code === 1) { - this._allocationBillDetail(e) + this._allocationPage(e) } this.disabled1 = false uni.showToast({ @@ -333,22 +338,9 @@ try { let res = await allocationBillDetailUpdate(el) if (res.code === 1) { - this.dataList.map(ele => { - if (e.id === ele.id) { - e.subData.map(elem => { - if (elem.id === el.id) { - if (type === 'dcck') { - elem.dcckbm = el.dcckbm - elem.dcckmc = el.dcckmc - } - if (type === 'drck') { - elem.drckbm = el.drckbm - elem.drckmc = el.drckmc - } - } - }) - } - }) + setTimeout(() => { + this._allocationPage(e) + }, 1500) } else { this.dataList.map(ele => { if (e.id === ele.id) {