ysy 2 роки тому
батько
коміт
0fa494057e
2 змінених файлів з 32 додано та 11 видалено
  1. 22 2
      pages/pda/feeding/details.vue
  2. 10 9
      pages/pda/workOrder/search/index.vue

+ 22 - 2
pages/pda/feeding/details.vue

@@ -89,11 +89,31 @@
 				console.log(selectList)
 				this.List.forEach(m => {
 					if (m.workOrderId == id) {
-						this.$set(m, 'instanceList', selectList)
+						let modelList = [] // 模具
+						let instanceList = [] // 投料
+
+						selectList.forEach(f => {
+							if (f.rootCategoryLevelId == 5) {
+								modelList = modelList.concat(f)
+
+							} else if (f.rootCategoryLevelId == 1) {
+								instanceList = instanceList.concat(...f.mattList)
+							}
+
+						})
+
+
+						this.$set(m, 'modelList', modelList)
+						this.$set(m, 'instanceList', instanceList)
+
+
+
 					}
 				})
 
 
+console.log(this.List)
+
 
 
 			});
@@ -214,7 +234,7 @@
 						_arr = this.List
 						_arr.forEach((e, index) => {
 							if (e.workOrderId == id) {
-								 console.log(res.fixCode)
+								console.log(res.fixCode)
 								_arr[index].equipmentList = res
 							}
 						})

+ 10 - 9
pages/pda/workOrder/search/index.vue

@@ -271,7 +271,7 @@
 									warehouseId,
 									...i,
 									instanceId: i.id,
-								
+
 
 								}
 							})
@@ -286,16 +286,16 @@
 			selectVal(e, val, index) {
 				if (this.isType == 'feed' && val.rootCategoryLevelId == 1) {
 					this.$set(this.list[index], 'checked', false)
-					if( val.mattList.length > 0) {
+					if (val.mattList.length > 0) {
 						this.mattList = val.mattList
 					} else {
 						this.memoList.forEach(m => {
-							if(m.rootCategoryLevelId == 1) {
-								 this.mattList = this.mattList.concat(m.mattList)
+							if (m.rootCategoryLevelId == 1) {
+								this.mattList = this.mattList.concat(m.mattList)
 							}
 						})
 					}
-					
+
 					this.categoryId = val.categoryId
 					this.matterId = val.id
 					this.matterShow = true
@@ -355,13 +355,14 @@
 
 			//跳转回添加页面
 			jumpAdd() {
-				if(this.isType == 'pick') {
+				if (this.isType == 'pick') {
+					uni.$emit('setSelectList', this.memoList, this.pid)
+					uni.navigateBack()
+				} else if (this.isType == 'feed') {
 					uni.$emit('setSelectList', this.memoList, this.pid)
 					uni.navigateBack()
-				} else if(this.isType == 'feed') {
-					 console.log(this.memoList)
 				}
-			
+
 			},
 		}
 	}