ysy %!s(int64=2) %!d(string=hai) anos
pai
achega
83099e1905

+ 28 - 7
pages/pda/sample/inspection/index.vue

@@ -12,6 +12,8 @@
 
 					<deviceBom v-if='item.equipmentList.length != 0' :workOrderId='item.workOrderId'
 						:list='item.equipmentList' @scanIt='scanIt'></deviceBom>
+						
+						{{ item.turnover}}
 					<view class="operate_box rx-sc">
 						<u-button size="small" class="u-reset-button" type="success"
 							@click="handAdd(item.workOrderId)">手动添加</u-button>
@@ -106,14 +108,20 @@
 				this.List.forEach(m => {
 					if (m.workOrderId == id) {
 						let equipmentList = [] // 生产设备
+						let turnover = []
 
 						selectList.forEach(f => {
 							if (f.rootCategoryLevelId == 4) {
 								equipmentList = equipmentList.concat(f)
 							}
+							
+							if (f.rootCategoryLevelId == 7) {
+								turnover = turnover.concat(f)
+							}
 						})
 
 						this.$set(m, 'equipmentList', equipmentList)
+							this.$set(m, 'turnover', turnover)
 
 					}
 
@@ -133,10 +141,10 @@
 
 					this.List = res.map(m => {
 						m.workOrderId = m.id
-						m.instanceList = [] // 物料
+			
 						m.equipmentList = [] // 设备
-						m.modelList = [] // 模具
-						m.aridRegionList = [] // 干燥区
+				        m.turnover = [] // 周转车
+	
 						
 			
 
@@ -194,7 +202,6 @@
 					taskId: this.taskId,
 				}
 				qualityReview(param).then(res => {
-
 					if (res && res.extInfo && res.extInfo.inspectionList) {
 						this.inspectionList = res.extInfo.inspectionList
 					}
@@ -213,7 +220,6 @@
 			},
 
 			scanIt(id) {
-				console.log(id)
 
 
 				let _this = this
@@ -226,7 +232,7 @@
 
 			scanItData(result, id) {
 				scanLedger(result).then(res => {
-					console.log(res)
+					
 					let _arr = []
 					if (res.length == 1 && res[0].rootCategoryLevelId == 4) { // 设备
 						_arr = this.List
@@ -239,6 +245,20 @@
 						this.$forceUpdate()
 
 					}
+					
+					
+					if (res.length == 1 && res[0].rootCategoryLevelId == 7) { // 周转车
+						_arr = this.List
+						_arr.forEach((e, index) => {
+							if (e.workOrderId == id) {
+								_arr[index].turnover = res
+							}
+						})
+						this.List = _arr
+						this.$forceUpdate()
+					
+					}
+					
 
 				})
 
@@ -284,10 +304,11 @@
 
 			handAdd(id) {
 				console.log(id)
+		
 				const storageKey = Date.now() + "";
 				uni.setStorageSync(storageKey, this.List || []);
 				uni.navigateTo({
-					url: `/pages/pda/workOrder/search/index?id=${id}&storageKey=${storageKey}&isType=feed&taskId=${this.taskId}`
+					url: `/pages/pda/workOrder/search/index?id=${id}&storageKey=${storageKey}&isType=zdy&taskId=${this.taskId}&classIds=[4,7]`
 				})
 			},
 

+ 2 - 2
pages/pda/turnover/index/quality.vue

@@ -137,8 +137,8 @@
 			scanIt(id) {
 				console.log(id)
 				let _this = this
-					_this.scanItData('w0300000002579001', id)
-				return false
+				// 	_this.scanItData('w0300000002579001', id)
+				// return false
 				uni.scanCode({
 					success: function(res) {
 						_this.scanItData(res.result, id)

+ 49 - 27
pages/pda/workOrder/search/index.vue

@@ -39,7 +39,8 @@
 						<view class="listBox-con">
 							<view class="listBox-top rx-bc">
 								<view> {{ item.name }}</view>
-								<view class="code">{{  item.rootCategoryLevelId == 4 ?  item.codeNumber :  item.code}} </view>
+								<view class="code">{{ item.rootCategoryLevelId == 4 ?  item.codeNumber :  item.code}}
+								</view>
 							</view>
 
 							<view class="listBox-bottom rx">
@@ -55,14 +56,13 @@
 									v-if='item.rootCategoryLevelId != 11 && item.rootCategoryLevelId != 4 '>
 									<text>可用库存</text>{{ item.availableCountBase }} {{item.unit}}
 								</view>
-								
-								<view class="items"
-									v-if=' item.rootCategoryLevelId == 4 '>
-									<text>状态</text>{{ stateList[Number(item.runStatus)] }} 
+
+								<view class="items" v-if=' item.rootCategoryLevelId == 4 '>
+									<text>状态</text>{{ stateList[Number(item.runStatus)] }}
 								</view>
-								
-								
-						<!-- 		<view class="items"
+
+
+								<!-- 		<view class="items"
 									v-if='item.rootCategoryLevelId == 1 '>
 									<text>包装库存</text>{{ item.packingCountBase }} {{item.minUnit}}
 								</view> -->
@@ -209,8 +209,9 @@
 				warehouseList: [],
 
 				searchShow: false,
-				
-				stateList: ['启动', '空闲',  '运行' ,'故障', '检修', '停机', '待料', '占用'],
+
+				stateList: ['启动', '空闲', '运行', '故障', '检修', '停机', '待料', '占用'],
+				classIds: []
 
 
 
@@ -233,6 +234,9 @@
 			} else {
 				this.taskId = option.taskId || null
 			}
+			if (Object.prototype.hasOwnProperty.call(option, 'classIds')) {
+				this.classIds = option.classIds
+			}
 
 			if (option.storageKey) {
 				this.storageKey = option.storageKey
@@ -242,7 +246,8 @@
 				if (this.isType == 'feed') {
 					let _arr = (this.storageKey && uni.getStorageSync(this.storageKey)) || []
 					this.memoList = [..._arr[0].modelList, ..._arr[0].equipmentList, ..._arr[0].instanceList, ..._arr[0]
-						.aridRegionList, ..._arr[0].turnover, ..._arr[0].palletList, ..._arr[0].revolvingDiskList, ..._arr[0].semiProductList
+						.aridRegionList, ..._arr[0].turnover, ..._arr[0].palletList, ..._arr[0].revolvingDiskList, ...
+						_arr[0].semiProductList
 					]
 
 
@@ -251,10 +256,25 @@
 					this.memoList = (this.storageKey && uni.getStorageSync(this.storageKey)) || []
 				} else if (this.isType == 'job') {
 					let _obj = (this.storageKey && uni.getStorageSync(this.storageKey)) || {}
-		
-					this.memoList = [..._obj.turnover]
 
-				} 
+					if (Object.prototype.hasOwnProperty.call(_obj, 'turnover')) {
+						this.memoList = this.memoList.concat(_obj.turnover)
+					} else if (Object.prototype.hasOwnProperty.call(_obj, 'equipmentList')) {
+						this.memoList = this.memoList.concat(_obj.equipmentList)
+					}
+
+				}
+				
+				else if (this.isType == 'zdy') {
+					let _arr = (this.storageKey && uni.getStorageSync(this.storageKey)) || []
+				
+					if (Object.prototype.hasOwnProperty.call(_arr[0], 'turnover')) {
+						this.memoList = this.memoList.concat(_arr[0].turnover)
+					} else if (Object.prototype.hasOwnProperty.call(_arr[0], 'equipmentList')) {
+						this.memoList = this.memoList.concat(_arr[0].equipmentList)
+					}
+				
+				}
 
 
 
@@ -315,12 +335,14 @@
 			getTreeList() {
 				let params = {}
 				if (this.isType == 'feed') {
-					params.ids = [1, 4, 5, 8, 10, 11,13, 14, 23, 26]
+					params.ids = [1, 4, 5, 8, 10, 11, 13, 14, 23, 26]
 				} else if (this.isType == 'pick') {
 					params.ids = [1, 5, 7, 8, 10, 13, 14, 23, 26]
 				} else if (this.isType == 'job') {
 					params['ids'] = [4, 7]
-				}
+				}  else if (this.isType == 'zdy') {
+					params['ids'] =  JSON.parse(this.classIds);
+				} 
 
 				treeByPid(params).then(res => {
 					this.classificationList = res
@@ -370,7 +392,7 @@
 					URL = pageeLedgerMain
 				} else if (this.isType == 'feed') { // 投料
 					URL = assetPage
-				} else if (this.isType == 'job') { // 报工
+				} else if (this.isType == 'job' || this.isType == 'zdy') { // 报工
 					URL = assetPage
 				}
 
@@ -420,7 +442,7 @@
 
 
 					isEnd = this.list.length >= res.count
-			
+
 
 				})
 
@@ -465,7 +487,7 @@
 			//跳转回添加页面
 			jumpAdd() {
 
-				if (this.isType == 'pick' || this.isType == 'feed' || this.isType == 'job') {
+				if (this.isType == 'pick' || this.isType == 'feed' || this.isType == 'job' || this.isType == 'zdy') {
 					uni.$emit('setSelectList', this.memoList, this.pid)
 					uni.navigateBack()
 				}
@@ -564,25 +586,27 @@
 			flex-wrap: wrap;
 
 			.items {
-				
+
 				width: calc(50% - 1px);
 				border-left: 1rpx solid #E3E5E5;
 				border-right: 1rpx solid #E3E5E5;
 				border-bottom: 1rpx solid #E3E5E5;
 				box-sizing: border-box;
-				
-				text{
+
+				text {
 					display: inline-block;
 					background: #F7F9FA;
 					padding: 8rpx 10rpx;
 					color: #157A2C;
-					
+
 				}
-				&:nth-child(1), &:nth-child(2) {
+
+				&:nth-child(1),
+				&:nth-child(2) {
 					border-top: 1rpx solid #E3E5E5;
 					margin-top: 8rpx;
 				}
-			
+
 			}
 
 		}
@@ -595,6 +619,4 @@
 			padding: 0 20rpx;
 		}
 	}
-	
-
 </style>