调拨优化

This commit is contained in:
蔡玲
2024-11-18 16:32:50 +08:00
parent 521d51ea5c
commit 58c351c307

View File

@@ -188,6 +188,10 @@
}, },
onLoad () { onLoad () {
this.toSearch() this.toSearch()
setTimeout(() => {
this._getWarehouseInfo()
this._getOrganizationInfo()
}, 3000)
}, },
methods: { methods: {
// 仓库下拉框 // 仓库下拉框
@@ -222,7 +226,7 @@
this._allocationPage() this._allocationPage()
}, },
// 一级表格接口 // 一级表格接口
async _allocationPage () { async _allocationPage (e) {
let res = await allocationPage(this.val1, this.value1, this.value2, this.queryParams1.pageNum + '', this.queryParams1.pageSize + '') let res = await allocationPage(this.val1, this.value1, this.value2, this.queryParams1.pageNum + '', this.queryParams1.pageSize + '')
if (res.code === 1) { if (res.code === 1) {
res.result.map(el => { res.result.map(el => {
@@ -235,14 +239,15 @@
this.totalCount1 = Number(res.totalElements) this.totalCount1 = Number(res.totalElements)
this.queryParams1.pageSize = Number(res.pageSize) this.queryParams1.pageSize = Number(res.pageSize)
this.queryParams1.pageNum = Number(res.pageNum) this.queryParams1.pageNum = Number(res.pageNum)
if (e) {
this._allocationBillDetail(e)
}
} else { } else {
uni.showToast({ uni.showToast({
title: res.desc, title: res.desc,
icon: 'none' icon: 'none'
}) })
} }
this._getWarehouseInfo()
this._getOrganizationInfo()
}, },
// 一级表格切换分页 // 一级表格切换分页
handlePageChange1(page) { handlePageChange1(page) {
@@ -309,7 +314,7 @@
let arr = e.subData.filter(ele => ele.checked === true) let arr = e.subData.filter(ele => ele.checked === true)
let res = await allocationBillConfirm(arr) let res = await allocationBillConfirm(arr)
if (res.code === 1) { if (res.code === 1) {
this._allocationBillDetail(e) this._allocationPage(e)
} }
this.disabled1 = false this.disabled1 = false
uni.showToast({ uni.showToast({
@@ -333,22 +338,9 @@
try { try {
let res = await allocationBillDetailUpdate(el) let res = await allocationBillDetailUpdate(el)
if (res.code === 1) { if (res.code === 1) {
this.dataList.map(ele => { setTimeout(() => {
if (e.id === ele.id) { this._allocationPage(e)
e.subData.map(elem => { }, 1500)
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
}
}
})
}
})
} else { } else {
this.dataList.map(ele => { this.dataList.map(ele => {
if (e.id === ele.id) { if (e.id === ele.id) {