ysy há 1 ano atrás
pai
commit
1ceb48d2e6

+ 15 - 2
pages/pda/jobBooking/components/jobBom.vue

@@ -167,8 +167,21 @@
 
 			setFormedNum(num) {
 				this.item.workReportInfo.formedNum = num
-				// this.blurNum()
-				this.$forceUpdate()
+			
+			
+			let weight = Number(this.item.workReportInfo.formedNum) * Number(this.item.singleWeight) * Number(this
+				.item.weightMultiple)
+			
+			if (['G', 'g', '克'].includes(this.item.singleWeightUnit)) {
+				weight = parseFloat((weight / 1000).toFixed(2))
+			} else {
+				weight = parseFloat(weight.toFixed(2))
+			}
+			
+			this.$set(this.item.workReportInfo, 'formedWeight', weight)
+			
+			
+			this.$forceUpdate()
 			},
 
 

+ 14 - 5
pages/pda/jobBooking/components/packingBom.vue

@@ -123,7 +123,7 @@
 							总共{{temporaryCount}} {{objData.unit}} / {{this.temporaryNum}} {{unit}}
 							--打包成 1
 							<zxz-uni-data-select :localdata="unitList" v-model="packUnit" dataValue='Key'
-								format='{Value}' dataKey="Key"  :clear='false'></zxz-uni-data-select>
+								format='{Value}' dataKey="Key" :clear='false'></zxz-uni-data-select>
 
 							<view class="penalize" @click="handlePack">打包</view>
 
@@ -289,10 +289,10 @@
 
 		created() {
 			this.formedNumLast = this.objData.formedNumLast
-		
+
 			this.byCode(),
 
-			this.getPackingDetails()
+				this.getPackingDetails()
 			this.getPackingDetailsTwo()
 		},
 
@@ -348,7 +348,7 @@
 					return false
 				}
 
-        
+
 
 				if (!this.formedNumLast) {
 					uni.showToast({
@@ -514,7 +514,7 @@
 			calculationSave() {
 				let count = this.splitList.filter(item => item.isChecked != 1).length;
 
-				if (this.formData.wPackNum <= count) {
+				if (this.formData.wPackNum <= count && count != 0) {
 					for (let i = 0; i < this.formData.wPackNum; i++) {
 						this.splitList[i].check = 1
 					}
@@ -522,10 +522,19 @@
 					this.calculationClose()
 
 				} else {
+					if (count != 0) {
+						for (let i = 0; i < count; i++) {
+							this.splitList[i].check = 1
+						}
+						this.handleCheck(0, 0)
+						this.calculationClose()
+					}
 					uni.showToast({
 						icon: 'none',
 						title: '外包装数超出内包装条数'
 					})
+
+
 				}
 
 			},

+ 1 - 0
pages/pda/jobBooking/components/turnoverBom.vue

@@ -57,6 +57,7 @@
 							<view class="item ww20  " :class="{'content_num' : pattern == 'job' }" v-if='!isDetails'>
 								<input class="uni-input" v-if='it.isFull == 0' @input="quantInt(index, idx, it)"
 									v-model="it.quantity" type="digit"
+									
 									:disabled="(!Object.prototype.hasOwnProperty.call(it, 'isOccupy') && it.isOccupy) || pattern != 'job'"></input>
 								<text v-else>{{it.quantity}}</text>
 							</view>