Procházet zdrojové kódy

物料加炉次号

ysy před 2 roky
rodič
revize
a30ece9410

+ 60 - 21
pages/pda/feeding/components/instanceBom.vue

@@ -1,7 +1,7 @@
 <template>
 	<view>
 		<view class="title_box rx-bc">
-			<view class="name">物料清单  ({{list.length || 0}})个 </view>
+			<view class="name">物料清单 ({{list.length || 0}})个 </view>
 			<view class="btn_box rx-cc" v-if="deviceList.length > 1" @click="bindDevice">绑定设备</view>
 		</view>
 
@@ -12,8 +12,8 @@
 					<uni-icons custom-prefix="iconfont" type="icon-shanchu" size="20" color="#fa3534"></uni-icons>
 				</view>
 				<view class="content_table">
-                   
-              
+
+
 					<view class="item rx-sc" v-if='mate.rootCategoryLevelId == 1 && mate.isConsumable == 1'>
 						<view class="rx ww50">
 							<view class="lable rx-cc">编码</view>
@@ -46,15 +46,19 @@
 						<view class="content">{{ mate.packingCountBase }}/ {{ mate.minUnit}}</view>
 					</view>
 
-                   
+
 					<view class="item rx-sc" v-if='mate.isConsumable == 0'>
 						<view class="rx ww50">
 							<view class="lable  rx-cc">{{ currentTaskDiagram.isFirstTask == 1 ? '物料重量': '上道重量' }}</view>
-							<view class="content" v-if="currentTaskDiagram.isFirstTask == 1" >{{mate.extInfo.weight || 0}} {{ mate.extInfo.weightUnit}} </view>
-							<view class="content" v-if="currentTaskDiagram.isFirstTask == 0" >{{mate.extInfo.newWeight || 0}} {{ mate.extInfo.weightUnit}} </view>
+							<view class="content" v-if="currentTaskDiagram.isFirstTask == 1">
+								{{mate.extInfo.weight || 0}} {{ mate.extInfo.weightUnit}}
+							</view>
+							<view class="content" v-if="currentTaskDiagram.isFirstTask == 0">
+								{{mate.extInfo.newWeight || 0}} {{ mate.extInfo.weightUnit}}
+							</view>
 						</view>
 
- 
+
 						<view class="rx ww50">
 							<view class="lable ww80 rx-cc">刻码</view>
 							<view class="content">{{mate.extInfo.engrave}}</view>
@@ -78,12 +82,21 @@
 					</view>
 
 
-					<view class="item" v-if='mate.isConsumable == 0 && deviceList.length > 1'>
-						<view class="lable rx-cc">设备</view>
-						<view class="content content_num">
-							<zxz-uni-data-select :localdata="deviceList" v-model="mate.deviceId" dataValue='id'
-								format='{name}-{codeNumber}' @change=" e => mate.deviceName = e.name + e.codeNumber" dataKey="id"
-								filterable :clear='false'></zxz-uni-data-select>
+					<view class="item" v-if='mate.isConsumable == 0 && deviceList.length > 0'>
+						<view class="rx ww70">
+							<view class="lable rx-cc">设备</view>
+							<view class="content content_num">
+								<zxz-uni-data-select :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>
+						</view>
+						<view class="rx ww30">
+							<view class="lable rx-cc ww80">炉次号</view>
+							<view class="content content_num ">
+								<input class="uni-input" style="width: 120rpx;"
+									v-model="mate.extInfo.heatNumber"></input>
+							</view>
 						</view>
 					</view>
 
@@ -138,8 +151,8 @@
 						<u-form-item label="绑定设备:" class="required-form" borderBottom prop="assetType">
 
 							<zxz-uni-data-select :localdata="deviceList" v-model="formData.deviceId" dataValue='id'
-								format='{name}-{codeNumber}' @change="e => formData.deviceName = e.name + e.codeNumber" dataKey="id"
-								filterable :clear='false'></zxz-uni-data-select>
+								format='{name}-{codeNumber}' @change="e => formData.deviceName = e.name + e.codeNumber"
+								dataKey="id" filterable :clear='false'></zxz-uni-data-select>
 
 						</u-form-item>
 
@@ -190,7 +203,7 @@
 				type: Array,
 				default: () => []
 			},
-			
+
 			currentTaskDiagram: {
 				type: Object,
 				default: () => {}
@@ -203,8 +216,9 @@
 				deep: true,
 				handler(newVal) {
 					this.deviceList = newVal
-					
-				
+					this.changeHeatNumber()
+
+
 				}
 			},
 		},
@@ -233,11 +247,26 @@
 			},
 
 			scrolltolower() {},
-			
-		
+
+
 
 			handleCheck(idx, it) {
-				this.$set(this.list[idx], 'check', !it.check)
+				this.$set(this.list[idx], 'checvalk', !it.check)
+			},
+
+			selectVal(e, item, idx) {
+				this.$set(this.list[idx], 'deviceName', e.name + '-' + e.codeNumber)
+				this.$set(this.list[idx]['extInfo'], 'heatNumber', e.extInfo.heatNumber)
+			},
+			
+			changeHeatNumber() {
+				this.deviceList.forEach(f => {
+					this.list.forEach(o => {
+						if(o.deviceId && f.id == o.deviceId) {
+							o.extInfo.heatNumber = f.extInfo.heatNumber
+						}
+					})
+				})
 			},
 
 			bindDevice() {
@@ -450,6 +479,16 @@
 
 			}
 
+			.ww30 {
+				width: 30%;
+			}
+
+
+			.ww70 {
+				width: 70%;
+			}
+
+
 			.ww80 {
 				width: 80%;
 			}

+ 51 - 11
pages/pda/feeding/components/semiProductBom.vue

@@ -37,9 +37,12 @@
 					</view>
 
 
-					<view class="item" >
+					<view class="item">
 						<view class="lable rx-cc">名称</view>
-						<view class="content">{{mate.name}}  <text v-if="[2, 23].includes(Number(mate.rootCategoryLevelId))">  ({{mate.rootCategoryLevelId == 2 ? '在制品' :  mate.rootCategoryLevelId == 23 ? '半成品' : '' }}) </text></view>
+						<view class="content">{{mate.name}} <text
+								v-if="[2, 23].includes(Number(mate.rootCategoryLevelId))">
+								({{mate.rootCategoryLevelId == 2 ? '在制品' :  mate.rootCategoryLevelId == 23 ? '半成品' : '' }})
+							</text></view>
 					</view>
 
 
@@ -61,9 +64,11 @@
 						<view class="rx ww50">
 							<view class="lable  rx-cc">{{ currentTaskDiagram.isFirstTask == 1 ? '物料重量': '上道重量' }}</view>
 							<view class="content" v-if="currentTaskDiagram.isFirstTask == 1">
-								{{mate.extInfo.weight || 0}} {{ mate.extInfo.weightUnit}} </view>
+								{{mate.extInfo.weight || 0}} {{ mate.extInfo.weightUnit}}
+							</view>
 							<view class="content" v-if="currentTaskDiagram.isFirstTask == 0">
-								{{mate.extInfo.newWeight || 0}} {{ mate.extInfo.weightUnit}} </view>
+								{{mate.extInfo.newWeight || 0}} {{ mate.extInfo.weightUnit}}
+							</view>
 						</view>
 
 
@@ -89,13 +94,21 @@
 						<view class="content">{{mate.extInfo.clientCode}}</view>
 					</view>
 
-
-					<view class="item" v-if='mate.isConsumable == 0 && deviceList.length > 1'>
-						<view class="lable rx-cc">设备</view>
-						<view class="content content_num">
-							<zxz-uni-data-select :localdata="deviceList" v-model="mate.deviceId" dataValue='id'
-								format='{name}-{codeNumber}' @change=" e => mate.deviceName = e.name + e.codeNumber"
-								dataKey="id" filterable :clear='false'></zxz-uni-data-select>
+					<view class="item" v-if='mate.isConsumable == 0 && deviceList.length > 0'>
+						<view class="rx ww70">
+							<view class="lable rx-cc">设备</view>
+							<view class="content content_num">
+								<zxz-uni-data-select :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>
+						</view>
+						<view class="rx ww30">
+							<view class="lable rx-cc ww80">炉次号</view>
+							<view class="content content_num ">
+								<input class="uni-input" style="width: 120rpx;"
+									v-model="mate.extInfo.heatNumber"></input>
+							</view>
 						</view>
 					</view>
 
@@ -215,6 +228,7 @@
 				deep: true,
 				handler(newVal) {
 					this.deviceList = newVal
+					this.changeHeatNumber()
 
 
 				}
@@ -252,6 +266,22 @@
 				this.$set(this.list[idx], 'check', !it.check)
 			},
 
+			selectVal(e, item, idx) {
+				this.$set(this.list[idx], 'deviceName', e.name + '-' + e.codeNumber)
+				this.$set(this.list[idx]['extInfo'], 'heatNumber', e.extInfo.heatNumber)
+			},
+
+			changeHeatNumber() {
+				this.deviceList.forEach(f => {
+					this.list.forEach(o => {
+						if (o.deviceId && f.id == o.deviceId) {
+							o.extInfo.heatNumber = f.extInfo.heatNumber
+						}
+					})
+				})
+			},
+
+
 			bindDevice() {
 				this.deviveShow = true
 			},
@@ -461,6 +491,16 @@
 
 			}
 
+			.ww30 {
+				width: 30%;
+			}
+
+
+			.ww70 {
+				width: 70%;
+			}
+
+
 			.ww80 {
 				width: 80%;
 			}

+ 3 - 3
pages/pda/sample/inspection/index.vue

@@ -308,14 +308,14 @@
 				_arr.forEach(e => {
 					e.turnover.forEach((o) => {
 						o.extInfo.positionList.forEach(f => {
-							 f.quantity =f.quantity - Number(f.sampleNum) 
+							f.quantity = f.quantity - Number(f.sampleNum)
 							f.sampleNum = 0
-							
+
 						})
 					})
 
 				})
-			
+
 
 				batchSave(_arr).then(res => {
 					uni.navigateBack()