5.6重庆结束任务判断修改
This commit is contained in:
parent
c76df2aded
commit
b9f7bd4c2e
|
|
@ -11,7 +11,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<span>待退料数量</span>
|
<span>待退料数量</span>
|
||||||
<h4>{{ fetch.num }}</h4>
|
<h4>{{ fetch.manageType == 2 ? fetch.partNum : fetch.num }}</h4>
|
||||||
</view>
|
</view>
|
||||||
<text
|
<text
|
||||||
v-show="fetch.manageType == 2"
|
v-show="fetch.manageType == 2"
|
||||||
|
|
@ -181,13 +181,29 @@ export default {
|
||||||
this.transMaCode = list.code
|
this.transMaCode = list.code
|
||||||
this.sendTypeId = list.typeId
|
this.sendTypeId = list.typeId
|
||||||
this.parentId = list.id
|
this.parentId = list.id
|
||||||
|
if (list.manageType == 2) {
|
||||||
|
if (Number(list.partNum) == 0) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '待退料数据为0,请勿再点击'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return
|
||||||
|
} else {
|
||||||
if (Number(list.num) == 0) {
|
if (Number(list.num) == 0) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
title: '待退料数据为0,请勿再点击'
|
title: '待退料数据为0,请勿再点击'
|
||||||
})
|
})
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (Number(list.num) == 0) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '待退料数据为0,请勿再点击'
|
||||||
|
})
|
||||||
|
}
|
||||||
if (this.infoList.manageType == '0') {
|
if (this.infoList.manageType == '0') {
|
||||||
this.$refs.popup1.open()
|
this.$refs.popup1.open()
|
||||||
} else if (this.infoList.manageType == '2') {
|
} else if (this.infoList.manageType == '2') {
|
||||||
|
|
@ -400,9 +416,24 @@ export default {
|
||||||
},
|
},
|
||||||
reduceNumTotal() {
|
reduceNumTotal() {
|
||||||
const that = this
|
const that = this
|
||||||
let sum = that.fetchList.reduce((accumulator, currentValue) => {
|
let sum = 0
|
||||||
|
console.log(that.fetchList);
|
||||||
|
that.fetchList.forEach(item => {
|
||||||
|
if (item.manageType == 2) {
|
||||||
|
sum += item.partNum
|
||||||
|
} else {
|
||||||
|
sum += Number(item.num.split('.')[0])
|
||||||
|
}
|
||||||
|
})
|
||||||
|
/* if (that.fetchList.manageType == 2) {
|
||||||
|
sum = that.fetchList.reduce((accumulator, currentValue) => {
|
||||||
|
return accumulator + Number(currentValue.partNum);
|
||||||
|
}, 0);
|
||||||
|
} else {
|
||||||
|
sum = that.fetchList.reduce((accumulator, currentValue) => {
|
||||||
return accumulator + Number(currentValue.num);
|
return accumulator + Number(currentValue.num);
|
||||||
}, 0);
|
}, 0);
|
||||||
|
} */
|
||||||
console.log("numaccumulator", sum)
|
console.log("numaccumulator", sum)
|
||||||
return sum
|
return sum
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue