ysy 2 år sedan
förälder
incheckning
640de33416
2 ändrade filer med 96 tillägg och 49 borttagningar
  1. 33 6
      pages/pda/jobBooking/components/aridRegion.vue
  2. 63 43
      pages/pda/jobBooking/index/index.vue

+ 33 - 6
pages/pda/jobBooking/components/aridRegion.vue

@@ -36,7 +36,7 @@
 
 					<view class="item">
 						<view class="lable rx-cc">位置</view>
-						<view class="content">{{ item.region }}</view>
+						<view class="content">{{ item.region }} {{}} </view>
 					</view>
 
 
@@ -49,7 +49,25 @@
 
 
 
+		</view>
+
+		<view class="title_box rx-bc">
+			<view class="name">干燥时间</view>
+		</view>
+		<view class="material ">
+
+
+			<view class="content_table">
+				<view class="item">
+					<view class="lable rx-cc">周期</view>
+					<view class="content content_num rx-bc">
+						<input class="uni-input" v-model="occupationTime" @input="timeInp" type="digit"></input>
+						<text>小时</text>
+					</view>
+				</view>
+
 
+			</view>
 		</view>
 	</view>
 </template>
@@ -64,7 +82,8 @@
 			wordItem: {
 				type: Object,
 				default: () => {}
-			}
+			},
+
 		},
 
 
@@ -82,8 +101,9 @@
 
 		data() {
 			return {
-				recycleQuantity: '',
-				newList: []
+				occupationTime: null,
+				newList: [],
+
 			}
 		},
 
@@ -97,9 +117,15 @@
 
 			getDelete(index) {
 				this.$emit('handleDel', index, 'aridRegion')
+			},
 
+			timeInp() {
+					this.newList.forEach(e => {
+						e.occupationTime = this.occupationTime
+					})
+			
 
-			},
+			}
 		}
 	}
 </script>
@@ -214,7 +240,8 @@
 						font-size: 24rpx;
 						color: #404446;
 					}
-					.stateColor{
+
+					.stateColor {
 						color: $theme-color;
 					}
 

+ 63 - 43
pages/pda/jobBooking/index/index.vue

@@ -23,10 +23,11 @@
 					<turnoverBom v-if='objData.turnover.length != 0' :list='objData.turnover' :wordItem='objData'
 						@handleScan='handleScan' @handleDel='handleDel'>
 					</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' @handleDel='handleDel'></aridRegion>
 
 
 					<view class="operate_box rx-sc">
@@ -89,6 +90,8 @@
 					productRecycleList: [],
 					aridRegionList: []
 				},
+				
+
 
 
 
@@ -108,29 +111,29 @@
 			uni.$off("setSelectList");
 
 			uni.$on("setSelectList", (selectList, id) => {
-			
-			    let turnover = []
+
+				let turnover = []
 				let aridRegionList = []
-				
+
 
 				selectList.forEach(f => {
 					if (f.rootCategoryLevelId == 7) { // 周转车
-				  	turnover = turnover.concat(f)
+						turnover = turnover.concat(f)
 					}
 				})
-				
+
 				selectList.forEach(f => {
 					if (f.rootCategoryLevelId == 11) { // 干燥区
-				  	aridRegionList = aridRegionList.concat(f)
+						aridRegionList = aridRegionList.concat(f)
 					}
 				})
-				
-				
+
+
 				this.$set(this.objData, 'turnover', turnover)
 				this.$set(this.objData, 'aridRegionList', aridRegionList)
 				this.$forceUpdate()
-				
-				
+
+
 
 			});
 
@@ -159,34 +162,42 @@
 			scanItAllData(result) {
 				scanLedger(result).then(res => {
 					if (res.length == 1 && res[0].rootCategoryLevelId == 4) { // 设备
-					     if(this.objData.equipmentList.length == 0) {
-							 this.objData.equipmentList = res
-							 	this.$forceUpdate()
-						 } else {
-							 if(this.objData.equipmentList[0].instanceId != res[0].instanceId) {
-								 uni.showToast({
-								 	title: '设备不匹配',
-								 	icon: 'none'
-								 })
-							 }
-						 }
-					} 
-					
+						if (this.objData.equipmentList.length == 0) {
+							this.objData.equipmentList = res
+							this.$forceUpdate()
+						} else {
+							if (this.objData.equipmentList[0].instanceId != res[0].instanceId) {
+								uni.showToast({
+									title: '设备不匹配',
+									icon: 'none'
+								})
+							} else {
+								uni.showToast({
+									title: '设备匹配成功',
+									icon: 'none'
+								})
+							}
+						}
+					}
+
 					if (res.length >= 1 && res[0].rootCategoryLevelId == 5) { // 磨具
-					     if(this.objData.modelList.length == 0) {
-							 this.objData.modelList = res
-							 	this.$forceUpdate()
-						 } else {
-							 if(this.objData.modelList[0].instanceId != res[0].instanceId) {
-								 uni.showToast({
-								 	title: '模具不匹配',
-								 	icon: 'none'
-								 })
-							 }
-						 }
-					} 
-					
-					else if (res.length == 1 && res[0].rootCategoryLevelId == 7) { // 周转车
+						if (this.objData.modelList.length == 0) {
+							this.objData.modelList = res
+							this.$forceUpdate()
+						} else {
+							if (this.objData.modelList[0].instanceId != res[0].instanceId) {
+								uni.showToast({
+									title: '模具不匹配',
+									icon: 'none'
+								})
+							} else {
+								uni.showToast({
+									title: '设备匹配成功',
+									icon: 'none'
+								})
+							}
+						}
+					} else if (res.length == 1 && res[0].rootCategoryLevelId == 7) { // 周转车
 
 						let isFals = this.objData.turnover.some(m => m.code == result)
 						if (isFals) {
@@ -209,7 +220,7 @@
 					this.objData.turnover.splice(idx, 1)
 					this.$forceUpdate()
 				}
-				
+
 				if (type == 'aridRegion') {
 					this.objData.aridRegionList.splice(idx, 1)
 					this.$forceUpdate()
@@ -287,7 +298,16 @@
 
 
 			save() {
-				console.log(this.objData)
+				if(this.objData.aridRegionList.length > 0) {
+					if(!this.objData.aridRegionList[0].occupationTime) {
+						uni.showToast({
+							title: '请输入干燥时间',
+							icon: 'none'
+						})
+						return false
+					}
+				}
+				
 			}
 		}
 	}