接口对接
This commit is contained in:
@@ -192,25 +192,39 @@
|
||||
},
|
||||
async _easOutInBillPage () {
|
||||
let res = await easOutInBillPage(this.val1, this.id, this.queryParams1.pageNum + '', this.queryParams1.pageSize + '')
|
||||
this.checkArr1 = []
|
||||
res.result.map(el => {
|
||||
this.$set(el, 'checked', false)
|
||||
})
|
||||
this.dataList1 = [...res.result]
|
||||
this.totalCount1 = Number(res.totalElements)
|
||||
this.queryParams1.pageSize = Number(res.pageSize)
|
||||
this.queryParams1.pageNum = Number(res.pageNum)
|
||||
if (res.code === 1) {
|
||||
this.checkArr1 = []
|
||||
res.result.map(el => {
|
||||
this.$set(el, 'checked', false)
|
||||
})
|
||||
this.dataList1 = [...res.result]
|
||||
this.totalCount1 = Number(res.totalElements)
|
||||
this.queryParams1.pageSize = Number(res.pageSize)
|
||||
this.queryParams1.pageNum = Number(res.pageNum)
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
async _easOutInBillDetailPage () {
|
||||
let res = await easOutInBillDetailPage(this.code, this.queryParams2.pageNum + '', this.queryParams2.pageSize + '')
|
||||
this.checkArr2 = []
|
||||
res.result.map(el => {
|
||||
this.$set(el, 'checked', false)
|
||||
})
|
||||
this.dataList2 = [...res.result]
|
||||
this.totalCount2 = Number(res.totalElements)
|
||||
this.queryParams2.pageSize = Number(res.pageSize)
|
||||
this.queryParams2.pageNum = Number(res.pageNum)
|
||||
if (res.code === 1) {
|
||||
this.checkArr2 = []
|
||||
res.result.map(el => {
|
||||
this.$set(el, 'checked', false)
|
||||
})
|
||||
this.dataList2 = [...res.result]
|
||||
this.totalCount2 = Number(res.totalElements)
|
||||
this.queryParams2.pageSize = Number(res.pageSize)
|
||||
this.queryParams2.pageNum = Number(res.pageNum)
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
handlePageChange1(page) {
|
||||
this.queryParams1.pageNum = page
|
||||
@@ -247,14 +261,22 @@
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await easOutInBillUpdate(this.checkArr1)
|
||||
this.disabled1 = false
|
||||
this.checkArr1 = []
|
||||
this.toSearch()
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
let res = await easOutInBillUpdate(this.checkArr1)
|
||||
if (res.code === 1) {
|
||||
this.disabled1 = false
|
||||
this.checkArr1 = []
|
||||
this.toSearch()
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
} else {
|
||||
this.disabled1 = false
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
this.disabled1 = false
|
||||
}
|
||||
@@ -270,34 +292,48 @@
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await easOutInBillDetailUpdate(this.checkArr2)
|
||||
this.disabled2 = false
|
||||
this.checkArr2 = []
|
||||
this.queryParams2 = {
|
||||
pageSize: 10,
|
||||
pageNum: 1
|
||||
let res = await easOutInBillDetailUpdate(this.checkArr2)
|
||||
if (res.code === 1) {
|
||||
this.disabled2 = false
|
||||
this.checkArr2 = []
|
||||
this.queryParams2 = {
|
||||
pageSize: 10,
|
||||
pageNum: 1
|
||||
}
|
||||
this.currentPage2 = 1
|
||||
this._easOutInBillDetailPage()
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
} else {
|
||||
this.disabled2 = false
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
this.currentPage2 = 1
|
||||
this._easOutInBillDetailPage()
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled2 = false
|
||||
}
|
||||
},
|
||||
async _queryInventoryInfo () {
|
||||
let res = await queryInventoryInfo(this.checkArr2)
|
||||
res.result.map(el => {
|
||||
this.$set(el, 'checked', false)
|
||||
this.$set(el, 'yqty', el.qty)
|
||||
})
|
||||
this.dataList3 = [...res.result]
|
||||
this.show = true
|
||||
if (res.code ===1) {
|
||||
res.result.map(el => {
|
||||
this.$set(el, 'checked', false)
|
||||
this.$set(el, 'yqty', el.qty)
|
||||
})
|
||||
this.dataList3 = [...res.result]
|
||||
this.show = true
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
handleBlur (ele) {
|
||||
console.log(this.dataList3)
|
||||
ele.checked = true
|
||||
let index = ''
|
||||
let obj = {}
|
||||
@@ -317,19 +353,27 @@
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await easOutInBillDetailUpdate(this.dataList3)
|
||||
this.disabled3 = false
|
||||
this.show = false
|
||||
this.queryParams2 = {
|
||||
pageSize: 10,
|
||||
pageNum: 1
|
||||
let res = await easOutInBillDetailUpdate(this.dataList3)
|
||||
if (res.code === 1) {
|
||||
this.disabled3 = false
|
||||
this.show = false
|
||||
this.queryParams2 = {
|
||||
pageSize: 10,
|
||||
pageNum: 1
|
||||
}
|
||||
this.currentPage2 = 1
|
||||
this._easOutInBillDetailPage()
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
} else {
|
||||
this.disabled3 = false
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
this.currentPage2 = 1
|
||||
this._easOutInBillDetailPage()
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled3 = false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user