接口调试完毕,二维码扫码成功

This commit is contained in:
13218645326 2023-12-24 18:12:11 +08:00
parent 4782a85261
commit 2080b3cc44
3 changed files with 19 additions and 8 deletions

View File

@ -117,6 +117,13 @@
openPopup(list) { openPopup(list) {
console.log(list); console.log(list);
this.infoList = list this.infoList = list
if(Number(list.num)==0){
uni.showToast({
icon: 'none',
title: '待退料数据为0请勿再点击'
})
return
}
if (this.infoList.manageType == '0') { if (this.infoList.manageType == '0') {
this.$refs.popup1.open() this.$refs.popup1.open()
} else if (this.infoList.manageType == '1') { } else if (this.infoList.manageType == '1') {
@ -157,7 +164,8 @@
this.$refs.popup2.close() this.$refs.popup2.close()
}, },
scanCode() { scanCode() {
this.closePopup1() const that = this
that.closePopup1()
uni.scanCode({ uni.scanCode({
success: (res) => { success: (res) => {
console.log("beforeScan", res); console.log("beforeScan", res);
@ -177,10 +185,10 @@
} */ } */
const userInfo = uni.getStorageSync('userInfo'); const userInfo = uni.getStorageSync('userInfo');
console.log("userInfo", userInfo) console.log("beforeScan11111", userInfo,that.taskId)
const userId = userInfo.userid const userId = userInfo.userid
uni.navigateTo({ uni.navigateTo({
url: `/pages/scanReceive/scanReceive?code=${res.result}&typeId=${this.infoList.typeId}&num=${this.infoList.num}&parentId=${this.infoList.id}&manageType=${this.infoList.manageType}taskId=${this.infoList.taskId}&createBy=${userId}&scanType="back"` url: `/pages/scanReceive/scanReceive?code=${res.result}&typeId=${that.infoList.typeId}&num=${that.infoList.num}&parentId=${that.infoList.id}&manageType=${that.infoList.manageType}&taskId=${that.taskId}&createBy=${userId}&scanType="back"`
}) })
} }
}) })
@ -265,6 +273,7 @@
backReceiveEndBackFn() { backReceiveEndBackFn() {
const that = this const that = this
let total = that.reduceNumTotal() let total = that.reduceNumTotal()
console.log("total==",total)
if (total > 0) { if (total > 0) {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
@ -293,9 +302,10 @@
reduceNumTotal() { reduceNumTotal() {
const that = this const that = this
let sum = that.fetchList.reduce((accumulator, currentValue) => { let sum = that.fetchList.reduce((accumulator, currentValue) => {
return accumulator + parseInt(currentValue.num); return accumulator + Number(currentValue.num);
}, 0); }, 0);
console.log("numaccumulator", sum) console.log("numaccumulator", sum)
return sum
} }
}, },
onLoad(params) { onLoad(params) {

View File

@ -177,6 +177,7 @@
// } // }
// params = testParams // params = testParams
this.initData = params this.initData = params
console.log("paramsinitFetchInfoByCode",params)
this.initFetchInfoByCode(params) this.initFetchInfoByCode(params)
this.iniBackMaterialReceive(params) this.iniBackMaterialReceive(params)
} }

File diff suppressed because one or more lines are too long