ysy 1 anno fa
parent
commit
37b34dacfb

+ 3 - 5
pages/pda/feeding/details.vue

@@ -61,7 +61,7 @@
 
 
 						<u-button size="small" class="u-reset-button" type="success"
-							@click="scanIt(item.workOrderId)">扫一扫</u-button>
+							@click="scanIt(item.workOrderId)">扫一扫1</u-button>
 
 					</view>
 				</view>
@@ -351,8 +351,6 @@
 			handleScan(id, type) {
 
 
-
-
 				uni.scanCode({
 					success: (res) => {
 						this.scanData(res.result, type, id)
@@ -391,7 +389,7 @@
 
 			},
 			scanIt(id) {
-			
+
 				uni.scanCode({
 					success: (res) => {
 						this.scanItData(res.result, id)
@@ -403,7 +401,7 @@
 			scanItData(result, id) {
 
 				scanLedger(result).then(res => {
-                   
+                   console.log(888,res)
  
 					let _arr = []
 					if (res.length == 1 && res[0].rootCategoryLevelId == 4) { // 设备

+ 45 - 11
pages/pda/jobBooking/components/semiProductJobBom.vue

@@ -22,8 +22,8 @@
 								v-if="Object.prototype.hasOwnProperty.call(it, 'extInfo')  && Object.prototype.hasOwnProperty.call(it.extInfo, 'productionTimes') &&  Object.prototype.hasOwnProperty.call(it.extInfo.productionTimes,item.currentTaskDiagram.taskId) ">
 								{{ it.extInfo.productionTimes[item.currentTaskDiagram.taskId]}}
 							</view>
-							
-							
+
+
 						</view>
 					</view>
 				</view>
@@ -79,7 +79,6 @@
 						<view class="content content_num ">
 							<view v-if='isDetails'>{{it.extInfo.engrave }}</view>
 							<input class="uni-input" v-else v-model="it.extInfo.engrave"></input>
-
 						</view>
 					</view>
 
@@ -105,9 +104,12 @@
 
 					<view class="rx ww50">
 						<view class="lable lable150  rx-cc ">炉次号</view>
-						<view class="content ">
-							<view>{{it.extInfo.heatNumber }}</view>
+
+						<view class="content content_num ">
+							<view v-if='isDetails'>{{it.extInfo.heatNumber }}</view>
+							<input class="uni-input" v-else v-model="it.extInfo.heatNumber"></input>
 						</view>
+
 					</view>
 
 				</view>
@@ -120,7 +122,8 @@
 
 			<view class="content_table2">
 				<view class="head row rx-sc">
-					<view class="item ww25" style="font-size: 20rpx;">{{it.extInfo.newWeight ? '上道工序重量' : '物料重量'  }} {{it.extInfo.weightUnit}}
+					<view class="item ww25" style="font-size: 20rpx;">{{it.extInfo.newWeight ? '上道工序重量' : '物料重量'  }}
+						{{it.extInfo.weightUnit}}
 					</view>
 					<view class="item ww25">报工重量{{it.extInfo.weightUnit}}</view>
 					<view class="item ww25" v-if="isFirstTask == 1">质检结果
@@ -297,7 +300,12 @@
 				type: Boolean,
 				default: false
 
-			}
+			},
+
+			equipmentList: {
+				type: Array,
+				default: () => []
+			},
 
 
 
@@ -305,7 +313,16 @@
 		},
 
 		watch: {
+			equipmentList: {
+				immediate: true,
+				deep: true,
+				handler(newVal) {
+					this.deviceList = newVal
+					this.changeHeatNumber()
 
+
+				}
+			},
 		},
 
 
@@ -334,6 +351,8 @@
 				resultObj: {},
 				resultIdx: 0,
 
+				deviceList: []
+
 
 
 
@@ -512,13 +531,14 @@
 						this.setDataSave()
 						return false
 					}
-					console.log(88,this.reportWeight)
 
-				
+
+
 					for (let i = 1; i < this.paramList.length; i++) {
 						console.log(i)
-						console.log(11,Number(this.paramList[i-1].CVIWeight), Number(this.reportWeight))
-						if (Number(this.paramList[i-1].CVIWeight) < Number(this.reportWeight) &&  Number(this.reportWeight)  < Number(this.paramList[i].CVIWeight)) {
+						console.log(11, Number(this.paramList[i - 1].CVIWeight), Number(this.reportWeight))
+						if (Number(this.paramList[i - 1].CVIWeight) < Number(this.reportWeight) && Number(this
+								.reportWeight) < Number(this.paramList[i].CVIWeight)) {
 							this.resultObj = this.paramList[i]
 							break;
 						}
@@ -544,6 +564,20 @@
 			},
 
 
+			changeHeatNumber() {
+				this.deviceList.forEach(f => {
+					this.list.forEach(o => {
+						if (o.deviceId && f.id == o.deviceId && this.deviceList.length > 1) {
+							o.extInfo.heatNumber = f.extInfo.heatNumber
+						} else if (this.deviceList.length == 1) {
+							o.extInfo.heatNumber = this.deviceList[0].extInfo.heatNumber
+							this.$forceUpdate()
+						}
+					})
+				})
+			},
+
+
 
 		}
 	}

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

@@ -38,7 +38,7 @@
 
 					<semiProductJobBom
 						v-if='objData.semiProductList && objData.semiProductList.length != 0 && taskType != 4 && taskType != 6'
-						:item='objData' :list='objData.semiProductList'></semiProductJobBom>
+						:item='objData' :list='objData.semiProductList' :equipmentList="objData.equipmentList"></semiProductJobBom>
 
 
 					<oneJobQualityBom
@@ -397,6 +397,7 @@
 
 					this.objData = res
 			
+			
 
 					if (!this.objData.hasOwnProperty('turnover')) {
 						this.objData['turnover'] = []