ysy vor 2 Jahren
Ursprung
Commit
da86d5e8c9
2 geänderte Dateien mit 16 neuen und 5 gelöschten Zeilen
  1. 14 5
      pages/pda/turnover/components/turnoverBom.vue
  2. 2 0
      pages/pda/turnover/index/index.vue

+ 14 - 5
pages/pda/turnover/components/turnoverBom.vue

@@ -52,12 +52,11 @@
 							{{it.categoryCode}}
 						</view>
 						<view class="item ww15  ">
-							<input class="uni-input" v-if='it.isFull == 0' @input="quantInt(index, idx, it)"
-								v-model="it.quantity" type="digit" :disabled="true"></input>
-							<text v-else>{{it.quantity}}</text>
+							<text :class="{ 'isend': it.isend }">{{it.newQuantity}}</text>
 						</view>
 
-						<view class="item ww15 rx-cc " @click="handleCheck(index, idx, it)">
+						<view class="item ww15 rx-cc " v-if='!it.isend ' @click="handleCheck(index, idx, it)">
+							
 							<image class="check" v-if='it.check' src='@/static/check.png'></image>
 							<image class="check" v-else src='@/static/check_no.png'></image>
 						</view>
@@ -234,7 +233,7 @@
 
 
 				let arr = this.newList[index].extInfo.positionList.filter(e => {
-					return e.check
+					return e.check && !e.isend
 				})
 				let flag = arr.every((i) => {
 					return i.workOrderCode == it.workOrderCode && i.categoryCode == it.categoryCode
@@ -242,6 +241,9 @@
 
 				if (flag) {
 					this.$set(this.newList[index].extInfo.positionList[idx], 'check', !it.check)
+					if(it.check) {
+						this.$set(this.newList[index].extInfo.positionList[idx], 'quantity', 0)
+					}
 				} else {
 					uni.showToast({
 						icon: 'none',
@@ -267,6 +269,10 @@
 					return false
 				}
 				
+				arr.forEach(f => {
+					f.isend = true
+				})
+				
 				this.wordInfo.workOrderCode = arr[0].workOrderCode
 				this.wordInfo.categoryCode = arr[0].categoryCode
 				
@@ -527,4 +533,7 @@
 		width: 40rpx;
 		height: 40rpx;
 	}
+	.isend{
+		text-decoration:line-through;
+	}
 </style>

+ 2 - 0
pages/pda/turnover/index/index.vue

@@ -97,6 +97,8 @@
 						res.turnover.forEach(e => {
 							e.extInfo.positionList.length && e.extInfo.positionList.forEach(o => {
 								o['check'] = false
+								o['isend'] = false
+								o['newQuantity'] = o.quantity
 							})
 						})
 					}