|
|
@@ -48,11 +48,11 @@
|
|
|
:key='idx'>
|
|
|
<view class="item ww10">{{it.code}}</view>
|
|
|
<view class="item ww30"
|
|
|
- :class="{'color157': it.workOrderCode === wordItem.code}">
|
|
|
+ :class="{'color157': it.workOrderCode === wordItem.code && it.numAdd}">
|
|
|
{{ it.workOrderCode }}
|
|
|
</view>
|
|
|
<view class="item ww35"
|
|
|
- :class="{'color157': it.categoryCode === wordItem.productCode}">
|
|
|
+ :class="{'color157': it.categoryCode === wordItem.productCode && it.numAdd}">
|
|
|
{{it.categoryCode}}
|
|
|
</view>
|
|
|
<view class="item ww25 content_num">
|
|
|
@@ -75,6 +75,8 @@
|
|
|
|
|
|
|
|
|
</view>
|
|
|
+
|
|
|
+ <view class="hwDes">货位 {{ unmatched }} 已占用, 没有替换</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
@@ -108,11 +110,13 @@
|
|
|
show: false,
|
|
|
wordInfo: {},
|
|
|
wordItem: {},
|
|
|
+
|
|
|
newTurnover: [],
|
|
|
idx: null,
|
|
|
|
|
|
sum: 0,
|
|
|
count: 0,
|
|
|
+ unmatched: []
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -123,17 +127,18 @@
|
|
|
this.idx = index
|
|
|
|
|
|
|
|
|
+
|
|
|
this.count = 0
|
|
|
this.sum = 0;
|
|
|
newList[0].extInfo.positionList.forEach(e => {
|
|
|
if (e.check) {
|
|
|
- this.sum += Number(e.newQuantity);
|
|
|
+ this.sum += Number(e.quantity);
|
|
|
}
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
- let isFals = newList.some(m => m.code == result && m.isOld == 1)
|
|
|
+ let isFals = newList.some(m => m.code == result)
|
|
|
if (isFals) {
|
|
|
uni.showToast({
|
|
|
title: '周转车已存在',
|
|
|
@@ -145,12 +150,30 @@
|
|
|
scanLedger(result).then(res => {
|
|
|
this.newTurnover = res
|
|
|
this.show = true
|
|
|
+
|
|
|
+ this.allReplace(this.newTurnover[0].extInfo.positionList, newList[0].extInfo.positionList)
|
|
|
})
|
|
|
|
|
|
|
|
|
+ },
|
|
|
|
|
|
+ allReplace(newTurnover, newList) {
|
|
|
+ this.unmatched = []
|
|
|
+ newTurnover.forEach(item1 => {
|
|
|
+ newList.forEach(item2 => {
|
|
|
+ if (item2.code == item1.code && (item1.quantity == 0 && item2.quantity > 0)) {
|
|
|
+ item1.workOrderCode = item2.workOrderCode
|
|
|
+ item1.categoryCode = item2.categoryCode
|
|
|
+ item1.quantity = item2.quantity
|
|
|
+ item1.numAdd = true
|
|
|
+ } else if(item2.code == item1.code && (item1.quantity > 0 && item2.quantity > 0)) {
|
|
|
+ this.unmatched.push(item2.code)
|
|
|
+ }
|
|
|
|
|
|
+ })
|
|
|
+ })
|
|
|
|
|
|
+ this.countFn()
|
|
|
},
|
|
|
|
|
|
quantInt(index, idx, it) {
|
|
|
@@ -422,6 +445,12 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ .hwDes{
|
|
|
+ margin-top: 18rpx;
|
|
|
+ color: #db1919;
|
|
|
+ font-size: 24rpx;
|
|
|
+ }
|
|
|
|
|
|
|
|
|
.content_num {
|