ysy пре 2 година
родитељ
комит
ec2fe1b36f

+ 24 - 7
pages/pda/feeding/components/aridRegion.vue

@@ -5,7 +5,7 @@
 		</view>
 
 		<view v-for="(item, index) in list" :key='index'>
-			<view class="title_box rx-bc">
+			<view class="title_box rx-bc" v-if='!isType'>
 				<view class="left rx-ss" @click="getDelete(index)">
 					<uni-icons custom-prefix="iconfont" type="icon-shanchu" size="20" color="#fa3534"></uni-icons>
 				</view>
@@ -22,9 +22,18 @@
 					<view class="item">
 						<view class="lable rx-cc">编号</view>
 						<view class="content rx-bc">
-							<view>{{item.code}}</view>
-							<view :style="{ color:  item.status == 0 ? '#157A2C' :'#FFA929' }">
+							<view>{{ !isType ? item.code : item.aridRegionList[0].code}}</view>
+							<view v-if='!isType' :style="{ color:  item.status == 0 ? '#157A2C' :'#FFA929' }">
 								{{ item.status == 0 ? '空闲' : item.status == 1 ? '占用' : ''}}</view>
+						
+								<view v-if='isType && item.aridRegionList[0].remainingTime ==0 ' style=" color:  #157A2C">
+							    {{  item.aridRegionList[0].remainingTime }}
+								</view>
+								
+								<view v-if='isType && item.aridRegionList[0].remainingTime != 0 ' style="color:  #FFA929">
+								<u-count-down v-if='item.aridRegionList[0].remainingTime > 0' :time="Number(item.aridRegionList[0].remainingTime)" format="HH:mm:ss"></u-count-down>
+								</view>
+								
 						</view>
 					</view>
 
@@ -37,7 +46,7 @@
 
 					<view class="item">
 						<view class="lable rx-cc">位置</view>
-						<view class="content">{{ item.region }} </view>
+						<view class="content">{{  !isType ? item.region : item.extInfo.region  }} </view>
 					</view>
 
 
@@ -52,13 +61,13 @@
 
 		</view>
 
-		<view class="title_box rx-bc">
+		<view class="title_box rx-bc" v-if='!isType'>
 			<view class="name">干燥时间</view>
 		</view>
-		<view class="material ">
+		<view class="material " v-if='!isType'>
 
 
-			<view class="content_table">
+			<view class="content_table" >
 				<view class="item">
 					<view class="lable rx-cc">周期</view>
 					<view class="content content_num rx-bc">
@@ -84,6 +93,10 @@
 				type: Object,
 				default: () => {}
 			},
+			isType: {
+				type: Boolean,
+				default: false,
+			}
 
 		},
 
@@ -262,4 +275,8 @@
 
 		}
 	}
+	
+	/deep/ .u-count-down__text{
+		color: #FFA929;
+	}
 </style>

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

@@ -18,6 +18,8 @@
 					<instanceBom v-if='item.instanceList.length != 0' :workOrderId='item.workOrderId'
 						:list='item.instanceList'></instanceBom>
 
+					<turnoverBom v-if='item.turnover.length != 0' :list='item.turnover' :wordItem='item'
+						@handleScan='handleScan' @handleDel='handleDel'></turnoverBom>
 
 					<aridRegion v-if='item.aridRegionList.length != 0' :list='item.aridRegionList'
 						@handleScan='handleScan'></aridRegion>
@@ -51,10 +53,12 @@
 	import modelBom from './components/modelBom.vue'
 	import instanceBom from './components/instanceBom.vue'
 	import aridRegion from './components/aridRegion'
+	import turnoverBom from '../jobBooking/components/turnoverBom.vue'
 	import {
 		workorderList,
 		getByCode,
-		scanLedger
+		scanLedger,
+
 	} from '@/api/pda/workOrder.js'
 
 	import {
@@ -69,7 +73,8 @@
 			deviceBom,
 			modelBom,
 			instanceBom,
-			aridRegion
+			aridRegion,
+			turnoverBom
 		},
 		data() {
 			return {
@@ -160,7 +165,10 @@
 
 
 
-			
+
+
+
+
 				batchSave(this.List).then(res => {
 
 					uni.navigateTo({
@@ -177,7 +185,9 @@
 						m.equipmentList = [] // 设备
 						m.modelList = [] // 模具
 						m.instanceList = [] // 投料
+						m.turnover = [] // 周转车
 						m.aridRegionList = [] // 干燥区
+
 						delete m.id
 						if (this.taskId) {
 							m.taskId = this.taskId
@@ -246,7 +256,8 @@
 				// M001 M002 模具 
 				//  S310000552731 物料
 				//               干燥区 
-				this.scanItData('GZQ026173007-D', id)
+				// w0300000003140004 周转车
+				this.scanItData('w0300000003140004', id)
 				return false
 
 				let _this = this
@@ -266,7 +277,6 @@
 						_arr = this.List
 						_arr.forEach((e, index) => {
 							if (e.workOrderId == id) {
-
 								_arr[index].equipmentList = res
 							}
 						})
@@ -326,9 +336,30 @@
 						})
 						this.List = _arr
 
+						this.$forceUpdate()
+					} else if (res.length >= 1 && res[0].rootCategoryLevelId == 7) { // 周转车
+						_arr = this.List
+						_arr.forEach((e, index) => {
+							if (e.workOrderId == id) {
+								console.log(res)
+								let isFals = _arr[index].turnover.some(m => m.code == res[0].code)
+								if (isFals) {
+									uni.showToast({
+										title: '周转车已存在',
+										icon: 'none'
+									})
+									return false
+								}
+								_arr[index].turnover = _arr[index].turnover.concat(res)
+
+							}
+						})
+						this.List = _arr
+
 						this.$forceUpdate()
 					}
 
+
 				})
 
 			},
@@ -340,8 +371,10 @@
 				// CX-EQ-YLSJL-008	  设备
 				// M001 M002 模具 
 				//  S310000552731 物料
-				// this.scanItAllData('M001')
+	            // w0300000003140004 周转车
+				// this.scanItAllData('w0300000003140004')
 				// return false
+	
 
 				let _this = this
 				uni.scanCode({
@@ -385,6 +418,14 @@
 
 						this.$forceUpdate()
 
+					} else if (res.length >= 1 && res[0].rootCategoryLevelId == 7) { // 周转车
+						_arr = this.List
+						_arr.forEach((e, index) => {
+							e.turnover = e.turnover.concat(res)
+						})
+						this.List = _arr
+						this.$forceUpdate()
+
 					}
 
 				})

+ 54 - 31
pages/pda/jobBooking/components/jobBom.vue

@@ -37,7 +37,7 @@
 					<view class="rx ww55 ">
 						<view class="lable lable150 rx-cc ">合格品数量</view>
 						<view class="content content_num">
-							<input class="uni-input" v-model="item.demandQuantity" type="digit"></input>
+							<input class="uni-input" v-model="item.workReportInfo.formedNum" type="digit"></input>
 							<view class="unit">{{item.unit}}</view>
 						</view>
 					</view>
@@ -45,7 +45,7 @@
 					<view class="rx ww45">
 						<view class="lable rx-cc ww80">重量</view>
 						<view class="content content_num">
-							<input class="uni-input" v-model="item.demandQuantity" type="digit"></input>
+							<input class="uni-input" v-model="item.workReportInfo.formedWeight" type="digit"></input>
 							<view class="unit">{{item.weightUnit}}</view>
 						</view>
 					</view>
@@ -59,7 +59,7 @@
 					<view class="rx ww55 ">
 						<view class="lable lable150 rx-cc ">不合格数量</view>
 						<view class="content content_num">
-							<input class="uni-input" v-model="item.demandQuantity" type="digit"></input>
+							<input class="uni-input" v-model="item.workReportInfo.notFormedNum" type="digit"></input>
 							<view class="unit">{{item.unit}}</view>
 						</view>
 					</view>
@@ -67,7 +67,7 @@
 					<view class="rx ww45">
 						<view class="lable rx-cc ww80">重量</view>
 						<view class="content content_num">
-							<input class="uni-input" v-model="item.demandQuantity" type="digit"></input>
+							<input class="uni-input" v-model="item.workReportInfo.notFormedWeight" type="digit"></input>
 							<view class="unit">{{item.weightUnit}}</view>
 							<view class="penalize">处置</view>
 						</view>
@@ -75,10 +75,22 @@
 
 				</view>
 
+
+
+
+
+
+
+
+
+
+			</view>
+
+			<view class='content_table' v-for="(item,index) in palletList" :key='index'>
 				<view class="item" @click="handleType">
 					<view class="lable rx-cc">舟皿类型</view>
 					<view class="content content_num">
-						<input class="uni-input" v-model="obj.typeName"></input>
+						<input class="uni-input" v-model="item.categoryLevelName"></input>
 					</view>
 				</view>
 
@@ -87,31 +99,27 @@
 				<view class="item">
 					<view class="lable rx-cc">舟皿名称</view>
 					<view class="content ">
-						<zxz-uni-data-select :localdata="boatList" v-model="obj.name" dataValue='id' format='{name}-{code}'
-							:clear='false' @change='inputChange'></zxz-uni-data-select>
+						<zxz-uni-data-select :localdata="boatList" v-model="item.categoryId" dataValue='id'
+							format='{name}-{code}' :clear='false' @change='inputChange'></zxz-uni-data-select>
 					</view>
 				</view>
 
 				<view class="item">
 					<view class="lable rx-cc">舟皿型号</view>
 					<view class="content">
-						{{obj.modelType}}
+						{{item.modelType}}
 					</view>
 				</view>
-				
+
 				<view class="item">
 					<view class="lable rx-cc">舟皿数量</view>
-				<view class="content content_num">
-					<input class="uni-input" v-model="obj.num" type='digit'></input>
-				</view>
+					<view class="content content_num">
+						<input class="uni-input" v-model="item.quantity" type='digit'></input>
+					</view>
 				</view>
 
-
-
-
-
-
 			</view>
+
 		</view>
 
 		<ba-tree-picker ref="treePicker" key="verify" :multiple="false" @select-change="confirm" title="选择分类"
@@ -136,6 +144,11 @@
 			isDetails: {
 				type: Boolean,
 				default: false
+			},
+
+			palletList: {
+				type: Array,
+				default: () => []
 			}
 
 		},
@@ -143,13 +156,12 @@
 			return {
 				classificationList: [],
 				boatList: [],
-				obj: {
-					typeName: '',
-				    modelType: ''
-				}
+
 			}
 		},
 		created() {
+
+
 			this.getTreeList()
 		},
 		methods: {
@@ -160,14 +172,17 @@
 				}
 				treeByPid(params).then(res => {
 					this.classificationList = res
-					this.confirm([res[0].id], res[0].name, res[0].rootCategoryLevelId)
+
 				})
 			},
 
 			confirm(id, name, rootCategoryLevelId) {
-				this.obj.typeName = name
-				// this.obj.modelType = ''
-		
+				this.$set(this.palletList[0], 'categoryLevelId', id[0])
+				this.$set(this.palletList[0], 'categoryLevelName', name)
+				this.$set(this.palletList[0], 'rootCategoryLevelId', rootCategoryLevelId)
+
+
+
 
 				let param = {
 					categoryLevelId: id,
@@ -178,13 +193,21 @@
 					this.boatList = res.list
 				})
 			},
-			
+
 			inputChange(e) {
-					this.obj.modelType = 55
-		
-		
-			
-	
+				this.$set(this.palletList[0], 'categoryId', e.id)
+				this.$set(this.palletList[0], 'code', e.code)
+				this.$set(this.palletList[0], 'name', e.name)
+				this.$set(this.palletList[0], 'specification', e.specification)
+				this.$set(this.palletList[0], 'categoryId', e.id)
+				this.$set(this.palletList[0], 'brandNum', e.brandNum)
+				this.$set(this.palletList[0], 'modelType', e.modelType)
+				this.$set(this.palletList[0], 'quantity', e.quantity)
+				this.$set(this.palletList[0], 'unit', e.unit)
+				this.$forceUpdate()
+
+
+
 			},
 
 			handleType() {

+ 1 - 1
pages/pda/jobBooking/components/turnoverBom.vue

@@ -127,7 +127,7 @@
 			},
 
 			getDelete(index) {
-				this.$emit('handleDel', index, 'turnover')
+				this.list.splice(index,1)
 
 
 			},

+ 44 - 20
pages/pda/jobBooking/index/index.vue

@@ -15,19 +15,21 @@
 					<modelBom v-if='objData.modelList.length != 0' :list='objData.modelList'>
 					</modelBom>
 
-					<jobBom :item='objData'></jobBom>
+
+
+					<jobBom :item='objData' :palletList='objData.palletList'></jobBom>
 
 					<byProductBom v-if='objData.productRecycleList.length != 0 ' :list='objData.productRecycleList'>
 					</byProductBom>
 
 					<turnoverBom v-if='objData.turnover.length != 0' :list='objData.turnover' :wordItem='objData'
-						@handleScan='handleScan' @handleDel='handleDel'>
+						@handleScan='handleScan'>
 					</turnoverBom>
 
 
-                     
-					<aridRegion v-if='objData.aridRegionList.length != 0' :list='objData.aridRegionList' 
-						@handleScan='handleScan' @handleDel='handleDel'></aridRegion>
+
+					<aridRegion v-if='objData.aridRegionList.length != 0' :list='objData.aridRegionList'
+						@handleScan='handleScan' :isType='true'></aridRegion>
 
 
 					<view class="operate_box rx-sc">
@@ -88,9 +90,13 @@
 					modelList: [],
 					turnover: [],
 					productRecycleList: [],
-					aridRegionList: []
+					aridRegionList: [],
+					palletList: [],
+					workReportInfo: {
+
+					}
 				},
-				
+
 
 
 
@@ -113,7 +119,7 @@
 			uni.$on("setSelectList", (selectList, id) => {
 
 				let turnover = []
-			
+
 
 
 				selectList.forEach(f => {
@@ -122,7 +128,7 @@
 					}
 				})
 
-			
+
 
 
 				this.$set(this.objData, 'turnover', turnover)
@@ -210,14 +216,6 @@
 				})
 			},
 
-			handleDel(idx, type) {
-				if (type == 'turnover') {
-					this.objData.turnover.splice(idx, 1)
-					this.$forceUpdate()
-				}
-
-			
-			},
 
 			handleScan(id, type) {
 
@@ -274,7 +272,33 @@
 					if (!this.objData.hasOwnProperty('aridRegionList')) {
 						this.objData['aridRegionList'] = []
 					}
-					console.log(this.objData)
+					this.objData.palletList = [{
+						categoryLevelId: '',
+						categoryLevelName: '',
+						categoryId: '',
+						rootCategoryLevelId: '',
+						code: '',
+						name: '',
+						specification: '',
+						brandNum: '',
+						modelType: '',
+						quantity: '',
+						unit: ''
+					}]
+					this.objData.workReportInfo = {
+						formingNum: null,
+						formingWeight: null,
+						formedNum: null,
+						formedWeight: null,
+						notFormedNum: null,
+						notFormedWeight: null,
+					}
+
+					this.objData.workReportInfo.formingNum = res.formingNum
+					this.objData.workReportInfo.formingWeight = res.formingWeight
+					this.objData.workReportInfo.unit = res.unit
+					this.objData.workReportInfo.weightUnit = res.weightUnit
+
 				})
 			},
 
@@ -290,8 +314,8 @@
 
 
 			save() {
-		
-				
+             console.log(this.objData)
+
 			}
 		}
 	}