接口对接
This commit is contained in:
@@ -41,8 +41,14 @@
|
||||
methods: {
|
||||
async _getBillsCount () {
|
||||
let res = await getBillsCount()
|
||||
this.menuList = [...res]
|
||||
|
||||
if (res.code === 1) {
|
||||
this.menuList = [...res.result]
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
toPage (e) {
|
||||
let url = ''
|
||||
|
||||
@@ -112,9 +112,9 @@
|
||||
this._tabChange(0)
|
||||
},
|
||||
async toLogin() {
|
||||
uni.redirectTo({
|
||||
url: '/pages/home/home'
|
||||
})
|
||||
// uni.redirectTo({
|
||||
// url: '/pages/home/home'
|
||||
// })
|
||||
this.disabled = true
|
||||
if (this.loginname === '') {
|
||||
uni.showToast({
|
||||
@@ -195,6 +195,7 @@
|
||||
margin-bottom 15px
|
||||
_bis(,'../../static/images/login_tabs_bg.png', 100%, 100%,bottom)
|
||||
.login_tab_item
|
||||
cursor pointer
|
||||
_font(50rpx,66rpx,#99B1DD,,center)
|
||||
font-family: YouSheBiaoTiHei;
|
||||
padding 0 50rpx 0 10rpx
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -69,17 +69,66 @@ export const easOutInBillDetailUpdate = (arr) => request({
|
||||
// return res
|
||||
// }
|
||||
// export const getBillsCount = (area) => {
|
||||
// let res = [
|
||||
// {name: '销售出库', djlx: 'XSCKD', ywlx: 'OUT', counts: '1'},
|
||||
// {name: '采购退货出库', djlx: 'CGTHD', ywlx: 'OUT', counts: '1'},
|
||||
// {name: '调拨出库', djlx: 'DBCKD', ywlx: 'OUT', counts: '1'},
|
||||
// {name: '委外出库', djlx: 'WWFLD', ywlx: 'OUT', counts: '1'},
|
||||
// {name: '生产出库', djlx: 'LLCKD', ywlx: 'OUT', counts: '1'},
|
||||
// {name: '采购入库', djlx: 'CGRKD', ywlx: 'IN', counts: '1'},
|
||||
// {name: '生产退料入库', djlx: 'LLTHD', ywlx: 'IN', counts: '1'},
|
||||
// {name: '调拨入库', djlx: 'DBRKD', ywlx: 'IN', counts: '1'},
|
||||
// {name: '委外入库', djlx: 'WWRKD', ywlx: 'IN', counts: '1'}
|
||||
// let res = {
|
||||
// "code": 1,
|
||||
// "desc": "操作成功",
|
||||
// "result": [
|
||||
// {
|
||||
// "djlx": "CGRKD",
|
||||
// "ywlx": "IN",
|
||||
// "name": "采购入库",
|
||||
// "counts": "1"
|
||||
// },
|
||||
// {
|
||||
// "djlx": "CGTHD",
|
||||
// "ywlx": "OUT",
|
||||
// "name": "采购退货出库",
|
||||
// "counts": "0"
|
||||
// },
|
||||
// {
|
||||
// "djlx": "DBCKD",
|
||||
// "ywlx": "OUT",
|
||||
// "name": "调拨出库",
|
||||
// "counts": "0"
|
||||
// },
|
||||
// {
|
||||
// "djlx": "DBRKD",
|
||||
// "ywlx": "IN",
|
||||
// "name": "调拨入库",
|
||||
// "counts": "0"
|
||||
// },
|
||||
// {
|
||||
// "djlx": "LLCKD",
|
||||
// "ywlx": "OUT",
|
||||
// "name": "生产出库",
|
||||
// "counts": "0"
|
||||
// },
|
||||
// {
|
||||
// "djlx": "LLTHD",
|
||||
// "ywlx": "IN",
|
||||
// "name": "生产退料入库",
|
||||
// "counts": "0"
|
||||
// },
|
||||
// {
|
||||
// "djlx": "WWFLD",
|
||||
// "ywlx": "OUT",
|
||||
// "name": "委外出库",
|
||||
// "counts": "0"
|
||||
// },
|
||||
// {
|
||||
// "djlx": "WWRKD",
|
||||
// "ywlx": "IN",
|
||||
// "name": "委外入库",
|
||||
// "counts": "0"
|
||||
// },
|
||||
// {
|
||||
// "djlx": "XSCKD",
|
||||
// "ywlx": "OUT",
|
||||
// "name": "销售出库",
|
||||
// "counts": "0"
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
// return res
|
||||
// }
|
||||
// export const easOutInBillPage = (size, page, fuzzy, djlx) => {
|
||||
|
||||
Reference in New Issue
Block a user