longfenglin 1 год назад
Родитель
Сommit
42d4653412

+ 2 - 3
pages/pda/components/outsourceList.vue

@@ -387,8 +387,6 @@
 				this.outObj = obj
 				this.outObj = obj
 				this.actTab = '物品清单',
 				this.actTab = '物品清单',
 				
 				
-				console.log(this.outObj)
-				
 				this.outsourceMaterialFn()
 				this.outsourceMaterialFn()
 				this.getWarehouseFn()
 				this.getWarehouseFn()
 				this.show = true
 				this.show = true
@@ -398,7 +396,8 @@
 				let param = {
 				let param = {
 					taskId: this.outObj.taskId,
 					taskId: this.outObj.taskId,
 					taskIds: this.outObj.taskIds,
 					taskIds: this.outObj.taskIds,
-					workOrderId: this.outObj.workOrderId
+					workOrderId: this.outObj.workOrderId,
+					quantity: this.outObj.formedNumLast
 
 
 				}
 				}
 				checkOutsourceMaterial(param).then(res => {
 				checkOutsourceMaterial(param).then(res => {

+ 34 - 3
pages/pda/jobBooking/components/oneJobQualityBom.vue

@@ -136,7 +136,7 @@
 						<view class="content content_num">
 						<view class="content content_num">
 							<zxz-uni-data-select :localdata="isQualifiedList" v-model="it.extInfo.isQualified"
 							<zxz-uni-data-select :localdata="isQualifiedList" v-model="it.extInfo.isQualified"
 								dataValue='code' format='{name}' dataKey="code" filterable :disabled="isDetails"
 								dataValue='code' format='{name}' dataKey="code" filterable :disabled="isDetails"
-								:clear='false'></zxz-uni-data-select>
+								:clear='false' @change="handleInput"></zxz-uni-data-select>
 						</view>
 						</view>
 					</view>
 					</view>
 				
 				
@@ -187,7 +187,7 @@
 						</view>
 						</view>
 						<view class="item ww25 content_num">
 						<view class="item ww25 content_num">
 							<view v-if='isDetails'>{{it.extInfo.reportWeight }}</view>
 							<view v-if='isDetails'>{{it.extInfo.reportWeight }}</view>
-							<input class="uni-input" v-else v-model="it.extInfo.reportWeight"></input>
+							<input class="uni-input" v-else v-model="it.extInfo.reportWeight" type='digit' @input="handleInput"></input>
 						</view>
 						</view>
 						<view class="item ww25" @click="openNumerate(it, idx)" v-if="isFirstTask == 1">
 						<view class="item ww25" @click="openNumerate(it, idx)" v-if="isFirstTask == 1">
 							<view class="numerate">点击计算</view>
 							<view class="numerate">点击计算</view>
@@ -444,6 +444,13 @@
 			this.getSteps()
 			this.getSteps()
 			this.getCompute()
 			this.getCompute()
 
 
+			setTimeout(()=>{
+				this.handleInput()
+			},800)
+			
+		},
+		mounted() {
+			
 		},
 		},
 		methods: {
 		methods: {
 			
 			
@@ -639,7 +646,31 @@
 
 
 				this.cancel()
 				this.cancel()
 			},
 			},
-
+			handleInput() {
+				let arr = JSON.parse(JSON.stringify(this.list));
+				this.sumweight(arr);
+				// this.sunTj();
+				// console.log('arr11111112222',arr)
+				// console.log('this.list33333',this.list)
+			},
+			sumweight(arr) {
+			      let formedWeight = 0;
+			      let notFormedWeight = 0;
+			      arr.map((s,i) => {
+			        if (s.extInfo.reportWeight) {
+			          if (s.extInfo.isQualified == 1) {
+			            formedWeight += s.extInfo.reportWeight * 1;
+			          } else {
+			            notFormedWeight += s.extInfo.reportWeight * 1;
+			          }
+			        } else {
+			          s.extInfo.reportWeight = null;
+			        }
+			      })
+			      console.log('chulaiuwanlo',formedWeight,notFormedWeight)
+				  this.$emit('weightEmit',formedWeight,notFormedWeight)
+				  
+			},
 
 
 
 
 		}
 		}

+ 5 - 4
pages/pda/jobBooking/components/semiProductJobBom.vue

@@ -139,7 +139,7 @@
 						<view class="content content_num">
 						<view class="content content_num">
 							<zxz-uni-data-select :localdata="isQualifiedList" v-model="it.extInfo.isQualified"
 							<zxz-uni-data-select :localdata="isQualifiedList" v-model="it.extInfo.isQualified"
 								dataValue='code' format='{name}' dataKey="code" filterable :disabled="isDetails"
 								dataValue='code' format='{name}' dataKey="code" filterable :disabled="isDetails"
-								:clear='false'></zxz-uni-data-select>
+								:clear='false' @change="handleInput"></zxz-uni-data-select>
 						</view>
 						</view>
 					</view>
 					</view>
 
 
@@ -381,7 +381,6 @@
 				handler(newVal) {
 				handler(newVal) {
 					this.deviceList = newVal
 					this.deviceList = newVal
 					this.changeHeatNumber()
 					this.changeHeatNumber()
-
 				}
 				}
 			},
 			},
 		},
 		},
@@ -457,7 +456,9 @@
 			this.isFirstTask = this.item.currentTaskDiagram.isFirstTask
 			this.isFirstTask = this.item.currentTaskDiagram.isFirstTask
 			this.getSteps()
 			this.getSteps()
 			this.getCompute()
 			this.getCompute()
-
+			setTimeout(()=>{
+				this.handleInput()
+			},800)
 		},
 		},
 		methods: {
 		methods: {
 
 
@@ -600,7 +601,7 @@
 				let arr = JSON.parse(JSON.stringify(this.list));
 				let arr = JSON.parse(JSON.stringify(this.list));
 				this.sumweight(arr);
 				this.sumweight(arr);
 				// this.sunTj();
 				// this.sunTj();
-				// console.log('arr11111112222',arr)
+				console.log('arr11111112222',arr)
 				// console.log('this.list33333',this.list)
 				// console.log('this.list33333',this.list)
 			},
 			},
 			sumweight(arr) {
 			sumweight(arr) {

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

@@ -60,7 +60,6 @@
 						</semiProductJobBom>
 						</semiProductJobBom>
 					</view>
 					</view>
 
 
-
 					<semiProductJobBomPL
 					<semiProductJobBomPL
 						v-if='objData.semiProductList && objData.semiProductList.length != 0 && taskType != 4 && taskType != 6 && objData.singleReport == 0'
 						v-if='objData.semiProductList && objData.semiProductList.length != 0 && taskType != 4 && taskType != 6 && objData.singleReport == 0'
 						:item='objData' :list='objData.semiProductList' :equipmentList="objData.equipmentList">
 						:item='objData' :list='objData.semiProductList' :equipmentList="objData.equipmentList">
@@ -68,7 +67,7 @@
 
 
 					<oneJobQualityBom
 					<oneJobQualityBom
 						v-if='objData.semiProductList && objData.semiProductList.length != 0 && taskType == 6 && clientEnvironmentId == 3 && objData.singleReport == 1'
 						v-if='objData.semiProductList && objData.semiProductList.length != 0 && taskType == 6 && clientEnvironmentId == 3 && objData.singleReport == 1'
-						:item='objData' :list='objData.semiProductList'></oneJobQualityBom>
+						:item='objData' :list='objData.semiProductList' @weightEmit='weightEmit'></oneJobQualityBom>
 
 
 					<oneJobQualityBomPL
 					<oneJobQualityBomPL
 						v-if='objData.semiProductList && objData.semiProductList.length != 0 && taskType == 6 && clientEnvironmentId == 3 && objData.singleReport == 0'
 						v-if='objData.semiProductList && objData.semiProductList.length != 0 && taskType == 6 && clientEnvironmentId == 3 && objData.singleReport == 0'