ysy 1 gadu atpakaļ
vecāks
revīzija
7304702c9e

+ 25 - 14
pages/pda/jobBooking/components/jobBom.vue

@@ -11,7 +11,7 @@
 			<view class="content_table">
 
 
-				<view class="item rx-sc"  v-if="Object.prototype.hasOwnProperty.call(item, 'product')">
+				<view class="item rx-sc" v-if="Object.prototype.hasOwnProperty.call(item, 'product')">
 					<view class="rx ">
 						<view class="lable lable220 rx-cc ">投料数量</view>
 						<view class="content">
@@ -67,14 +67,14 @@
 
 
 
-				<view class="item rx-sc" v-for="(not,notIndex) in notFormedList"  :key='notIndex'>
+				<view class="item rx-sc" v-for="(not,notIndex) in notFormedList" :key='notIndex'>
 
 					<view class="rx ww55 ">
 
 						<view class="lable lable150 rx-cc ">不合格数量</view>
 						<view class="content content_num">
-							<input class="uni-input" v-model="not.notFormedNum" type="digit" 
-								:disabled="isDetails" @input="changeNum"></input>
+							<input class="uni-input" v-model="not.notFormedNum" type="digit" :disabled="isDetails"
+								@input="changeNum"></input>
 							<view class="unit">{{item.unit}}</view>
 						</view>
 					</view>
@@ -110,7 +110,7 @@
 <script>
 	export default {
 		props: {
-			item: {
+			objItem: {
 				type: Object,
 				default: () => {}
 			},
@@ -128,14 +128,22 @@
 		},
 
 		watch: {
-
+			objItem: {
+				immediate: true,
+				deep: true,
+				handler(newVal) {
+					this.item = newVal
+					 if(this.item.workReportInfo.formedNum) {
+						 this.blurNum()
+					 }
+					this.$forceUpdate()
+				}
+			},
 			notFormed: {
 				immediate: true,
 				deep: true,
 				handler(newVal) {
-
 					this.notFormedList = newVal
-
 				}
 			}
 		},
@@ -144,7 +152,7 @@
 		data() {
 			return {
 
-
+				item: {},
 				notFormedList: []
 
 			}
@@ -189,7 +197,8 @@
 				this.$emit('modeNum', total)
 
 
-				if (this.item.product[0] && this.item.product[0].feedQuantity > 0 && Number(this.item.workReportInfo.formedNum)) {
+				if (this.item.product[0] && this.item.product[0].feedQuantity > 0 && Number(this.item.workReportInfo
+						.formedNum)) {
 
 					this.$set(this.notFormedList[0], 'notFormedNum', this.item.product[0].feedQuantity - Number(this.item
 						.workReportInfo.formedNum))
@@ -201,7 +210,7 @@
 				let weight = Number(this.item.workReportInfo.formedNum) * Number(this.item.singleWeight) * Number(this
 					.item.weightMultiple)
 
-				if (['G', 'g',  '克' ].includes(this.item.singleWeightUnit)) {
+				if (['G', 'g', '克'].includes(this.item.singleWeightUnit)) {
 					weight = parseFloat((weight / 1000).toFixed(2))
 				} else {
 					weight = parseFloat(weight.toFixed(2))
@@ -218,7 +227,8 @@
 
 				let weight = Number(this.notFormedList[0].notFormedNum) * Number(this.item.singleWeight) * Number(this
 					.item.weightMultiple)
-				if (this.item.singleWeightUnit == 'G' || this.item.singleWeightUnit == 'g' || this.item.singleWeightUnit == '克') {
+				if (this.item.singleWeightUnit == 'G' || this.item.singleWeightUnit == 'g' || this.item.singleWeightUnit ==
+					'克') {
 					weight = parseFloat((weight / 1000).toFixed(2))
 				} else {
 					weight = parseFloat(weight.toFixed(2))
@@ -227,7 +237,8 @@
 
 
 				if (this.item.product[0].feedQuantity > 0 && Number(this.notFormedList[0].notFormedNum)) {
-					this.$set(this.item.workReportInfo, 'formedNum', this.item.product[0].feedQuantity - Number(this.notFormedList[0]
+					this.$set(this.item.workReportInfo, 'formedNum', this.item.product[0].feedQuantity - Number(this
+						.notFormedList[0]
 						.notFormedNum))
 
 
@@ -248,7 +259,7 @@
 				this.$forceUpdate()
 
 			},
-			
+
 			changeNum() {
 				this.notForme()
 				// this.blurNum()

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

@@ -153,6 +153,11 @@
 					icon: 'none',
 					title: `已经放${this.totalCount}`
 				})
+				
+				this.$emit('formedNumFn', this.totalCount)
+				
+
+			  
 
 
 

+ 7 - 2
pages/pda/jobBooking/index/index.vue

@@ -22,7 +22,7 @@
 					</modelBom>
 
 
-					<jobBom v-if='isLoad' :item='objData' :notFormed='objData.notFormedList' @penalize='penalize'
+					<jobBom v-if='isLoad' :objItem='objData' :notFormed='objData.notFormedList' @penalize='penalize'
 						@modeNum='modeNum'></jobBom>
 
 					<palletBom v-if="objData.palletList.length != 0" :palletList='objData.palletList'></palletBom>
@@ -50,7 +50,7 @@
 					</byProductBom>
 
 					<turnoverBom v-if='objData.turnover.length != 0' :list='objData.turnover' :wordItem='objData'
-						pattern='job' @handleScan='handleScan'>
+						pattern='job' @handleScan='handleScan' @formedNumFn='formedNumFn'>
 					</turnoverBom>
 
 
@@ -384,6 +384,11 @@
 			},
 
 
+				formedNumFn(num) {
+					this.objData.workReportInfo.formedNum = num
+					this.$forceUpdate()
+				},
+
 
 			getList() {
 				this.isLoad = false

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

@@ -212,6 +212,8 @@ export default {
 		save() {
 
 
+
+			
 			if (!this.isLastJob) {
 				uni.showToast({
 					icon: 'none',