ysy 2 лет назад
Родитель
Сommit
99794830a7

+ 13 - 3
pages/pda/feeding/components/instanceBom.vue

@@ -95,8 +95,7 @@
 						<view class="rx ww30">
 						<view class="rx ww30">
 							<view class="lable rx-cc ww80">炉次号</view>
 							<view class="lable rx-cc ww80">炉次号</view>
 							<view class="content content_num ">
 							<view class="content content_num ">
-								<input class="uni-input" style="width: 120rpx;"
-									v-model="mate.extInfo.heatNumber" />
+								<input class="uni-input" style="width: 120rpx;" v-model="mate.extInfo.heatNumber" />
 							</view>
 							</view>
 						</view>
 						</view>
 					</view>
 					</view>
@@ -265,11 +264,22 @@
 				this.$set(this.list[idx]['extInfo'], 'heatNumber', e.extInfo.heatNumber)
 				this.$set(this.list[idx]['extInfo'], 'heatNumber', e.extInfo.heatNumber)
 			},
 			},
 
 
+
 			changeHeatNumber() {
 			changeHeatNumber() {
+				console.log(this.deviceList)
+
 				this.deviceList.forEach(f => {
 				this.deviceList.forEach(f => {
 					this.list.forEach(o => {
 					this.list.forEach(o => {
-						if (o.deviceId && f.id == o.deviceId) {
+						if (o.deviceId && f.id == o.deviceId && this.deviceList.length > 1) {
 							o.extInfo.heatNumber = f.extInfo.heatNumber
 							o.extInfo.heatNumber = f.extInfo.heatNumber
+								o['workstationName'] = f.workstationName
+						} else if (this.deviceList.length == 1) {
+							o['deviceName'] = this.deviceList[0].name
+							o['deviceId'] = this.deviceList[0].id
+							o['workstationName'] =  this.deviceList[0].workstationName
+							o.extInfo.heatNumber = this.deviceList[0].extInfo.heatNumber
+							
+						     this.$forceUpdate()
 						}
 						}
 					})
 					})
 				})
 				})

+ 15 - 7
pages/pda/feeding/components/semiProductBom.vue

@@ -97,11 +97,11 @@
 					<view class="item" v-if='mate.isConsumable == 0 && deviceList.length > 0'>
 					<view class="item" v-if='mate.isConsumable == 0 && deviceList.length > 0'>
 						<view class="rx ww70">
 						<view class="rx ww70">
 							<view class="lable rx-cc">设备</view>
 							<view class="lable rx-cc">设备</view>
-							<view class="content content_num" >
-								
-								<zxz-uni-data-select v-if="!isDetails" :localdata="deviceList" v-model="mate.deviceId" dataValue='id'
-									format='{name}-{codeNumber}' @change="e => selectVal(e, mate, idx)" dataKey="id"
-									filterable :clear='false'></zxz-uni-data-select>
+							<view class="content content_num">
+
+								<zxz-uni-data-select v-if="!isDetails" :localdata="deviceList" v-model="mate.deviceId"
+									dataValue='id' format='{name}-{codeNumber}' @change="e => selectVal(e, mate, idx)"
+									dataKey="id" filterable :clear='false'></zxz-uni-data-select>
 								<span v-if="isDetails">{{mate.deviceName}}</span>
 								<span v-if="isDetails">{{mate.deviceName}}</span>
 							</view>
 							</view>
 						</view>
 						</view>
@@ -128,7 +128,8 @@
 						<view class="rx ww50">
 						<view class="rx ww50">
 							<view class="lable rx-cc ww80">数量</view>
 							<view class="lable rx-cc ww80">数量</view>
 							<view class="content content_num   ">
 							<view class="content content_num   ">
-								<input class="uni-input" style="width: 160rpx;" v-model="mate.feedQuantity" type="digit"></input>
+								<input class="uni-input" style="width: 160rpx;" v-model="mate.feedQuantity"
+									type="digit"></input>
 								<view class="unit ">/{{mate.unit}}</view>
 								<view class="unit ">/{{mate.unit}}</view>
 							</view>
 							</view>
 						</view>
 						</view>
@@ -280,8 +281,15 @@
 			changeHeatNumber() {
 			changeHeatNumber() {
 				this.deviceList.forEach(f => {
 				this.deviceList.forEach(f => {
 					this.list.forEach(o => {
 					this.list.forEach(o => {
-						if (o.deviceId && f.id == o.deviceId) {
+						if (o.deviceId && f.id == o.deviceId && this.deviceList.length > 1) {
 							o.extInfo.heatNumber = f.extInfo.heatNumber
 							o.extInfo.heatNumber = f.extInfo.heatNumber
+							o['workstationName'] = f.workstationName
+						} else if (this.deviceList.length == 1) {
+							o['deviceName'] = this.deviceList[0].name
+							o['deviceId'] = this.deviceList[0].id
+							o['workstationName'] = this.deviceList[0].workstationName
+							o.extInfo.heatNumber = this.deviceList[0].extInfo.heatNumber
+							this.$forceUpdate()
 						}
 						}
 					})
 					})
 				})
 				})

+ 1 - 28
pages/pda/feeding/details.vue

@@ -224,32 +224,7 @@
 			save() {
 			save() {
 
 
 
 
-				if (this.clientEnvironmentId == 3) {
-					this.List.forEach(e => {
-						if (e.equipmentList.length == 1 && e.instanceList.length > 0) {
-							e.instanceList.forEach(o => {
-								if (o.rootCategoryLevelId == 1 && o.isConsumable == 0) {
-									o['deviceName'] = e.equipmentList[0].name
-									o['deviceId'] = e.equipmentList[0].id
-									o['workstationName'] = e.equipmentList[0].workstationName
-									
-								}
-							})
-						}
-						
-						if (e.equipmentList.length == 1 && e.semiProductList.length > 0) {
-							e.semiProductList.forEach(o => {
-								if (o.rootCategoryLevelId == 23 && o.isConsumable == 0) {
-									o['deviceName'] = e.equipmentList[0].name
-									o['deviceId'] = e.equipmentList[0].id
-									o['workstationName'] = e.equipmentList[0].workstationName
-								}
-							})
-						}
-						
-					})
-
-				}
+	
 
 
 				this.List.forEach(f => {
 				this.List.forEach(f => {
 					f.instanceList.forEach(e => {
 					f.instanceList.forEach(e => {
@@ -489,8 +464,6 @@
 
 
 			// 全部扫一扫
 			// 全部扫一扫
 			handlScanCode() {
 			handlScanCode() {
-
-
 			
 			
 				uni.scanCode({
 				uni.scanCode({
 					 success: (res) => {
 					 success: (res) => {