收货确认优化

This commit is contained in:
蔡玲
2024-11-18 16:43:01 +08:00
parent 58c351c307
commit abf72c8f5f

View File

@@ -186,6 +186,10 @@
}, },
onLoad () { onLoad () {
this.toSearch() this.toSearch()
setTimeout(() => {
this._getWarehouseInfo()
this._getOrganizationInfo()
}, 3000)
}, },
methods: { methods: {
// 组织信息下拉框 // 组织信息下拉框
@@ -221,7 +225,7 @@
this._receiptPage() this._receiptPage()
}, },
// 一级表格接口 // 一级表格接口
async _receiptPage () { async _receiptPage (e) {
let res = await receiptPage(this.val1, this.value1, this.queryParams1.pageNum + '', this.queryParams1.pageSize + '') let res = await receiptPage(this.val1, this.value1, this.queryParams1.pageNum + '', this.queryParams1.pageSize + '')
if (res.code === 1) { if (res.code === 1) {
res.result.map(el => { res.result.map(el => {
@@ -234,14 +238,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._receiptBillDetailPage(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) {
@@ -340,7 +345,7 @@
try { try {
let res = await receiptBillDetailSetStor(this.value2, this.popData) let res = await receiptBillDetailSetStor(this.value2, this.popData)
if (res.code === 1) { if (res.code === 1) {
this._receiptBillDetailPage(this.popObj) this._receiptPage(this.popObj)
} }
uni.showToast({ uni.showToast({
title: res.desc, title: res.desc,
@@ -376,18 +381,9 @@
try { try {
let res = await receiptBillDetailUpdate(el) let res = await receiptBillDetailUpdate(el)
if (res.code === 1) { if (res.code === 1) {
this.dataList.map(ele => { setTimeout(() => {
if (e.id === ele.id) { this._receiptPage(e)
e.subData.map(elem => { }, 1500)
if (elem.id === el.id) {
if (type === 'ck') {
elem.ckbm = el.ckbm
elem.ckmc = el.ckmc
}
}
})
}
})
} else { } else {
this.dataList.map(ele => { this.dataList.map(ele => {
if (e.id === ele.id) { if (e.id === ele.id) {
@@ -420,7 +416,7 @@
let arr = e.subData.filter(ele => ele.checked === true) let arr = e.subData.filter(ele => ele.checked === true)
let res = await receiptBillConfirm(arr) let res = await receiptBillConfirm(arr)
if (res.code === 1) { if (res.code === 1) {
this._receiptBillDetailPage(e) this._receiptPage(e)
} }
this.disabled1 = false this.disabled1 = false
uni.showToast({ uni.showToast({