ysy 1 vuosi sitten
vanhempi
commit
abaf39e914

+ 35 - 1
pages/pda/common.js

@@ -182,7 +182,23 @@ export const tableHeader = selectEquiType => {
 		case 23:
 			return [
 
+				{
+					label: '型号',
+					prop: 'modelType'
+				},
+				{
+					label: '规格',
+					prop: 'specification'
+				},
+				{
+					label: '牌号',
+					prop: 'brandNum'
+				},
+
+			]
 
+		case 9:
+			return [
 
 				{
 					label: '型号',
@@ -196,7 +212,25 @@ export const tableHeader = selectEquiType => {
 					label: '牌号',
 					prop: 'brandNum'
 				},
-	
+
+			]
+
+		case 28:
+			return [
+
+				{
+					label: '型号',
+					prop: 'modelType'
+				},
+				{
+					label: '规格',
+					prop: 'specification'
+				},
+				{
+					label: '牌号',
+					prop: 'brandNum'
+				},
+
 			]
 
 	}

+ 12 - 2
pages/pda/feeding/bill/index.vue

@@ -29,6 +29,8 @@
 						<semiProductBom v-if='it.semiProductList.length != 0'  :isDetails='true' :list='it.semiProductList' :currentTaskDiagram='currentTaskDiagram' :equipmentList="it.equipmentList"></semiProductBom>
 						
 
+                        <turnoverBom v-if='it.turnover.length != 0' :list='it.turnover':isDetails='true' :wordItem='it' pattern='feed'></turnoverBom>
+
 						<packingBom v-if='it.packingList.length != 0' :list='it.packingList'></packingBom>
 						
 						<palletBom v-if="Object.prototype.hasOwnProperty.call(it, 'palletList')" :palletList='it.palletList'></palletBom>
@@ -58,6 +60,7 @@
 	import palletBom from '../components/palletBom'
 	import revolvingDiskBom from '../components/revolvingDiskBom'
 	import productsBom from'../components/productsBom.vue'
+	import turnoverBom from '../components/turnoverBom.vue'
 	import {
 		feedByOrderIds
 	} from '@/api/pda/feeding.js'
@@ -71,11 +74,13 @@
 			palletBom,
 			revolvingDiskBom,
 			semiProductBom,
-			productsBom
+			productsBom,
+			turnoverBom
 		},
 		data() {
 			return {
 				ids: [],
+				taskId: null,
 				dataList: [],
 				
 				currentTaskDiagram: {
@@ -86,6 +91,7 @@
 
 		onLoad(option) {
 			this.ids = [option.id]
+			this.taskId = option.taskId
 			this.getList()
 		},
 
@@ -93,7 +99,11 @@
 
 
 			async getList() {
-				const res = await feedByOrderIds(this.ids)
+				let param = {
+					 ids: this.ids,
+					 taskId: this.taskId
+				}
+				const res = await feedByOrderIds(param)
 				this.dataList = res
 
 			},

+ 6 - 4
pages/pda/feeding/components/semiProductBom.vue

@@ -15,7 +15,7 @@
 
 
 					<view class="item rx-sc"
-						v-if='(mate.rootCategoryLevelId == 23 ||  mate.rootCategoryLevelId == 2) && mate.isConsumable == 1'>
+						v-if='([23,2,9,28].includes(Number(mate.rootCategoryLevelId))) && mate.isConsumable == 1'>
 						<view class="rx ">
 							<view class="lable rx-cc">编码</view>
 							<view class="content">{{ mate.code }}</view>
@@ -23,7 +23,7 @@
 					</view>
 
 					<view class="item rx-bc"
-						v-if='(mate.rootCategoryLevelId == 23 ||  mate.rootCategoryLevelId == 2)   && mate.isConsumable == 0'
+						v-if='([23,2,9,28].includes(Number(mate.rootCategoryLevelId)))  && mate.isConsumable == 0'
 						@click="handleCheck(idx, mate)">
 						<view class="rx ">
 							<view class="lable rx-cc">编码</view>
@@ -40,8 +40,8 @@
 					<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 ? '半成品' : '' }})
+								v-if="[2, 23,9,28].includes(Number(mate.rootCategoryLevelId))">
+								({{mate.rootCategoryLevelId == 2 ? '在制品' :  mate.rootCategoryLevelId == 23 ? '半成品' :  mate.rootCategoryLevelId == 9 ? '产品' :   mate.rootCategoryLevelId == 28 ? '废品' : ''  }})
 							</text></view>
 					</view>
 
@@ -49,6 +49,8 @@
 
 
 
+
+
 					<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>

+ 2 - 2
pages/pda/feeding/components/turnoverBom.vue

@@ -52,7 +52,7 @@
 								{{it.categoryCode}}
 							</view>
 
-							<view class="item ww20  " :class="{'content_num' : pattern == 'job' }" v-if='!isDetails'>
+							<view class="item ww20 ">
 								<text>{{it.quantity}} </text>
 							</view>
 
@@ -107,7 +107,7 @@
 						if (f.extInfo && f.extInfo.positionList && f.extInfo.positionList.length) {
 							f.extInfo.positionList.forEach(oo => {
 								if (this.wordItem.code == oo.workOrderCode && this.wordItem.productCode ==
-									oo.categoryCode && Number(oo.quantity) > 1) {
+									oo.categoryCode && Number(oo.quantity) > 1 && this.isDetails != true) {
 									this.$set(oo, 'feedNum', oo.quantity)
 								}
 							})

+ 3 - 8
pages/pda/feeding/details.vue

@@ -187,7 +187,7 @@
 								palletList = palletList.concat(f)
 							} else if (f.rootCategoryLevelId == 26) {
 								revolvingDiskList = revolvingDiskList.concat(f)
-							} else if (f.rootCategoryLevelId == 23 || f.rootCategoryLevelId == 2) {
+							}  else if ([23, 2, 9,28].includes(Number(f.rootCategoryLevelId))) {
 								semiProductList = semiProductList.concat(f)
 							}
 
@@ -206,9 +206,6 @@
 						this.$set(m, 'revolvingDiskList', revolvingDiskList)
 						this.$set(m, 'semiProductList', semiProductList)
 
-
-
-
 					}
 				})
 
@@ -226,7 +223,6 @@
 			scrolltolower() {},
 
 			save() {
-
 			
 				this.List.forEach(f => {
 					f.instanceList.forEach(e => {
@@ -269,6 +265,7 @@
 
 						if (m.pickOutInList.length > 0) {
 							m.pickOutInList.forEach(f => {
+											
 								if (f.rootCategoryLevelId == 1) {
 									m.instanceList.push(f)
 								} else if (f.rootCategoryLevelId == 4) {
@@ -283,8 +280,7 @@
 									m.palletList.push(f)
 								} else if (f.rootCategoryLevelId == 26) {
 									m.revolvingDiskList.push(f)
-								} else if (f.rootCategoryLevelId == 23 || f.rootCategoryLevelId ==
-									2) {
+								} else if ([23, 2, 9,28].includes(Number(f.rootCategoryLevelId))) {
 									m.semiProductList.push(f)
 								}
 
@@ -306,7 +302,6 @@
 
 
 
-
 						delete m.id
 						if (this.taskId) {
 							m.taskId = this.taskId

+ 3 - 2
pages/pda/jobBooking/components/semiProductJobBom.vue

@@ -33,8 +33,9 @@
 						<view class="lable lable150 rx-cc ">名称</view>
 						<view class="content rx-sc">
 
-							<view>{{it.name}} <text v-if="[2, 23].includes(Number(it.rootCategoryLevelId))">
-									({{it.rootCategoryLevelId == 2 ? '在制品' :  it.rootCategoryLevelId == 23 ? '半成品' : '' }})
+							<view>{{it.name}} <text v-if="[2, 23,9,28].includes(Number(it.rootCategoryLevelId))">
+
+									({{it.rootCategoryLevelId == 2 ? '在制品' :  it.rootCategoryLevelId == 23 ? '半成品' :  it.rootCategoryLevelId == 9 ? '产品' :   it.rootCategoryLevelId == 28 ? '废品' : '' }})
 								</text> </view>
 						</view>
 					</view>

+ 18 - 7
pages/pda/picking/details.vue

@@ -87,7 +87,7 @@
 						
 						
 						
-						<semiProductBom :list="item.semiProductList2"></semiProductBom>
+						<semiProductBom :list="[...item.semiProductList2, ...item.productList2, ...item.junkProductList2]"></semiProductBom>
 					    
 						
 						<view style="height: 80rpx;"></view>
@@ -176,13 +176,14 @@
 						let palletList2 = []
 						let packingList2 = [] // 包装
 						let semiProductList2 = [] //半成品
+						let productList2 = [] // 产品
+						let junkProductList2 = [] //废品
 
                     
 
 
 						selectList.forEach(f => {
-							if (f.rootCategoryLevelId != 5 && f.rootCategoryLevelId != 8 && f
-								.rootCategoryLevelId != 13 && f.rootCategoryLevelId != 23) {
+							if (![5,8,13,23,9 ,28].includes(f.rootCategoryLevelId)) {
 								f.automatic = 1
 								instanceList2 = instanceList2.concat(f)
 							} else if (f.rootCategoryLevelId == 5) { // 模具
@@ -197,7 +198,14 @@
 							} else if(f.rootCategoryLevelId == 23) {
 								f.automatic = 1
 								semiProductList2 = semiProductList2.concat(f)
+							}  else if(f.rootCategoryLevelId == 9) {
+								f.automatic = 1
+								productList2 = productList2.concat(f)
+							}  else if(f.rootCategoryLevelId == 28) {
+								f.automatic = 1
+								junkProductList2 = junkProductList2.concat(f)
 							}
+							
 						})
 
 						this.$set(m, 'instanceList2', instanceList2)
@@ -205,6 +213,8 @@
 						this.$set(m, 'palletList2', palletList2)
 						this.$set(m, 'packingList2', packingList2)
 						this.$set(m, 'semiProductList2', semiProductList2)
+						this.$set(m, 'productList2', productList2)
+						this.$set(m, 'junkProductList2', junkProductList2)
 						
 						
 					}
@@ -230,7 +240,7 @@
 						let bomList = m.bomList.filter(f => f.checked)
 						m['bomDetailDTOSList'] = [...bomList, ...m.modelList, ...m.palletList]
 					}
-					m.instanceList = [...m.instanceList2, ...m.modelList2, ...m.palletList2, ...m.packingList2,  ...m.semiProductList2]
+					m.instanceList = [...m.instanceList2, ...m.modelList2, ...m.palletList2, ...m.packingList2,  ...m.semiProductList2, ...m.productList2, ...m.junkProductList2]
 
 					return {
 						...m
@@ -252,7 +262,7 @@
 					ids: this.idsList,
 					taskId: this.taskId
 				}).then(res => {
-					console.log(2,res)
+
 
 					this.List = res.map(m => {
 						m.workOrderId = m.id
@@ -290,6 +300,8 @@
 						m['palletList2'] = []
 						m['packingList2'] = []
 						m['semiProductList2'] = []
+						m['productList2'] = []
+						m['junkProductList2'] = []
 
 						delete m.id
 						return {
@@ -345,8 +357,7 @@
 
 			addPicking(id, item) {
 				const storageKey = Date.now() + "";
-				console.log(item)
-				let arr = [...item.instanceList2, ...item.modelList2, ...item.palletList2, ...item.packingList2]
+				let arr = [...item.instanceList2, ...item.modelList2, ...item.palletList2, ...item.packingList2, ...item.semiProductList2, ...item.productList2, ...item.junkProductList2]
 				uni.setStorageSync(storageKey, arr);
 				uni.navigateTo({
 					url: `/pages/pda/workOrder/search/index?id=${id}&storageKey=${storageKey}&isType=pick&taskId=${this.taskId}`

+ 7 - 4
pages/pda/sample/components/inspectionBom.vue

@@ -128,12 +128,14 @@
 			onKeyInput() {
 				this.count = 0
 				this.inspectionList.map(L => {
-					if ( Number(L.quantity) >= 0 && Number(L.quantity) != NaN && L.id != -1) {
-						this.count = Number(this.count) + Number(L.quantity)
+				
+					if (Number(L.quantity) != NaN && Number(L.quantity || 0) >= 0  && L.id != -1) {
+						this.count = Number(this.count) + Number(L.quantity || 0)
+					
 						this.inspectionList[this.inspectionList.length - 1]['quantity'] = this.count
-
 						this.normalQuality['quantity'] = this.count
 					
+					
 					}
 
 
@@ -142,8 +144,9 @@
 
 
 			getWarehouse() {
+			
 				getWarehouseList().then(res => {
-					this.warehouseList = res
+					this.warehouseList = res.filter(f => f.inventoryType == 11)
 
 				})
 

+ 9 - 6
pages/pda/sample/inspection/index.vue

@@ -153,15 +153,15 @@
 						m.turnover = [] // 周转车
 
 
+						if (m.normalQuality == null) {
+							this.isLastJob = false
+						}
 
-
-						if (m.normalQuality != null || m.workOrderType == 2) {
+						if (m.normalQuality == null || m.workOrderType == 2) {
 							this.$set(m, 'normalQuality', {})
 							m.normalQuality.quantity = 0
 							m.normalQuality.inspectionId = this.inspectionId
 							m.normalQuality.inspectionName = this.inspectionName
-						} else {
-							this.isLastJob = false
 						}
 
 
@@ -172,6 +172,9 @@
 						}
 						m.feedType = 3
 
+
+						console.log(333, m)
+
 						delete m.id
 
 						if (this.taskId) {
@@ -228,9 +231,9 @@
 
 			scanIt(id) {
 
-				
+
 				uni.scanCode({
-		          success: (res) => {
+					success: (res) => {
 						this.scanItData(res.result, id)
 					}
 				})

+ 16 - 0
pages/pda/workOrder/extrusionMolding/index.vue

@@ -142,6 +142,11 @@
 				<view style="margin-top: 15px;">
 					<button class="search_btn" @click="handleDetails">报工详情</button>
 				</view>
+				
+				<view style="margin-top: 15px;">
+					<button class="search_btn" @click="handleFeedDetails">投料详情</button>
+				</view>
+				
 			</u-list>
 
 		</view>
@@ -458,6 +463,17 @@
 				})
 
 			},
+			
+			handleFeedDetails() {
+				let taskId = this.currentTaskId || this.taskId
+				let url = '/pages/pda/feeding/bill/index'
+				url += `?id=${this.info.id}&taskId=${taskId}`
+				uni.navigateTo({
+					url
+				})
+				
+		
+			},
 		}
 	}
 </script>

+ 2 - 2
pages/pda/workOrder/search/index.vue

@@ -412,9 +412,9 @@
 			getTreeList() {
 				let params = {}
 				if (this.isType == 'feed') {
-					params.ids = [1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 26]
+					params.ids = [1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 26, 9, 28]
 				} else if (this.isType == 'pick') {
-					params.ids = [1, 5, 7, 8, 10, 13, 14, 23, 26]
+					params.ids = [1, 5, 7, 8, 10, 13, 14, 23, 26, 9, 28]
 				} else if (this.isType == 'job') {
 					params['ids'] = [4, 7]
 				} else if (this.isType == 'zdy') {