ysy 2 anni fa
parent
commit
7b2c6b23c5

+ 17 - 1
pages/pda/feeding/components/feedBom.js

@@ -3,13 +3,29 @@ export const tableHeader = selectEquiType => {
 	// 1:物料;4:生产设备; 5:模具;6:备品备件; 7:周转车;8:舟皿;9:产品;10:消耗材料,11:干燥区,12.质检,13.包装材料,14.工装夹具 ,15.刀具 ,99.其他
 	switch (+selectEquiType) {
 		case 1:
-			return [{
+			return [
+				
+				{
+					label: '编码',
+					prop: 'code'
+				},
+				
+				{
+					label: '名称',
+					prop: 'name'
+				},
+				
+				{
 					label: '型号',
 					prop: 'modelType'
 				},
 				{
 					label: '规格',
 					prop: 'specification'
+				},
+				{
+					label: '牌号',
+					prop: 'brandNum'
 				}
 			]
 		case 5:

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

@@ -9,20 +9,9 @@
 				<uni-icons custom-prefix="iconfont" type="icon-shanchu" size="20" color="#fa3534"></uni-icons>
 			</view>
 			<view class="content_table">
-				<view class="item">
-					<view class="lable rx-cc">编码</view>
-					<view class="content">
-						{{mate.code}}
-					</view>
-				</view>
-
-				<view class="item">
-					<view class="lable rx-cc">名称</view>
-					<view class="content">{{mate.name}}</view>
-				</view>
-
+	
 
-				<view class="item" v-for="(itm, index) in tableH(4)" :key="index">
+				<view class="item" v-for="(itm, index) in tableH(mate.rootCategoryLevelId)" :key="index">
 					<view class="lable rx-cc">{{ itm.label }}</view>
 					<view class="content">{{ mate[itm.prop] }}</view>
 

+ 21 - 6
pages/pda/feeding/details.vue

@@ -185,9 +185,10 @@
 		         console.log(id)
                  
 				 // CX-EQ-YLSJL-008	  设备
-				 // M001 模具 
-				// this.scanItData('M001', id)
-				// return false
+				 // M001 M002 模具 
+				 //  W31000055273 物料
+				this.scanItData('W31000055273', id)
+				return false
 
 				let _this = this
 				uni.scanCode({
@@ -200,7 +201,7 @@
 
 			scanItData(result, id) {
 				scanLedger(result).then(res => {
-				
+			
 					let _arr = []
 					if (res.length == 1 && res[0].rootCategoryLevelId == 4) { // 设备
 						_arr = this.List
@@ -212,7 +213,7 @@
 						this.List = _arr
 						this.$forceUpdate()
 
-					} else if (res.length >= 1 && res[0].rootCategoryLevelId == 5) {
+					} else if (res.length >= 1 && res[0].rootCategoryLevelId == 5) { // 模具
 				
 						_arr = this.List
 						_arr.forEach((e, index) => {
@@ -221,10 +222,24 @@
 							}
 						})
 						this.List = _arr
-						console.log(this.List)
 						this.$forceUpdate()
 					
+					} 
+					
+					else if(res.length >= 1 && ['1'].includes(res[0].rootCategoryLevelId)) {
+			
+						_arr = this.List
+						_arr.forEach((e, index) => {
+							if (e.workOrderId == id) {
+								_arr[index].instanceList = _arr[index].instanceList.concat(res)
+							}
+						})
+						this.List = _arr
+			
+						this.$forceUpdate()
+						
 					}
+					
 				})
 				
 			},