Browse Source

前端小程序 验证sdy

zhongtianhaoyuan 3 năm trước cách đây
mục cha
commit
2f2d5eb101

+ 218 - 43
pages/erp/exWarehousing/exWarehousing.vue

@@ -206,7 +206,7 @@
 				binNumber: '',
 				detailData: {
 					contractNo: "请选择合同编号或移库任务编号",
-					type: "请选择类型",
+					type: "干粮",
 					grade: "请输入品级",
 					agent: "请选择经办人",
 					inOutDate: "请选择出库日期",
@@ -218,11 +218,11 @@
 					year: true,
 					month: true,
 					day: true,
-					hour: true,
-					minute: true,
-					second: true
+					// hour: true,
+					// minute: true,
+					// second: true
 				},
-				// inOutDate1: "",
+				// inOutDate: "请选择出库日期",
 				netWeight: ""
 			}
 		},
@@ -242,19 +242,20 @@
 			this.binNumber = helper.erpWarehouse.binNumber
 			this.warehouseName = helper.erpWarehouse.warehouseName
 			this.detailData.goodsName = uni.getStorageSync('erpContractNo').goodsName;
-			if(uni.getStorageSync('erpContractNo').contractNo){
+			if (uni.getStorageSync('erpContractNo').contractNo) {
 				this.detailData.contractNo = uni.getStorageSync('erpContractNo').contractNo;
 			}
 			this.detailData.goodsNameKey = uni.getStorageSync('erpContractNo').goodsNameKey;
 			if (!uni.getStorageSync('erpContractNo').tranCarInfoList)
-			 uni.getStorageSync('erpContractNo').tranCarInfoList = []
+				uni.getStorageSync('erpContractNo').tranCarInfoList = []
 			if (!this.detailData.contractNo) {
 				this.detailData.contractNo = '请选择合同编号'
 			} else {
-				if(uni.getStorageSync('erpContractNo').tranCarInfoList){
-				if (uni.getStorageSync('erpContractNo').tranCarInfoList.length == 0) {
-					this.isPC = false
-				}}
+				if (uni.getStorageSync('erpContractNo').tranCarInfoList) {
+					if (uni.getStorageSync('erpContractNo').tranCarInfoList.length == 0) {
+						this.isPC = false
+					}
+				}
 			}
 			if (!this.detailData.goodsName) {
 				this.detailData.goodsName = '货名'
@@ -305,8 +306,7 @@
 				this.detailData.agent = this.handlerList[e].staffName
 			},
 			dateChange(e) {
-				this.detailData.inOutDate = e.year + "-" + e.month + "-" + e.day + " " + e.hour + ":" + e.minute +":" + e.second
-				// this.inOutDate1 = e.year + "-" + e.month + "-" + e.day + " " + e.hour + ":" + e.minute
+				this.detailData.inOutDate = e.year + "-" + e.month + "-" + e.day
 			},
 			warehousingTypePicker(e) {
 				this.detailData.inOutType = this.warehousingTypeList[e].constValue
@@ -330,48 +330,29 @@
 			},
 			getImgUrl(res) {
 				this.detailData.addressUrl = res
-				console.log(res)
-				console.log('------------res-----------')
 			},
 			onError(error) {
-				alert(error)
 				console.log('------------error-----------')
 				console.log(error)
 			},
 			binNumberpicker(e) {
 				this.detailData.binNumber = this.positionList[e[0]].binNumber
 			},
-			// getWeighingManagement() {
-			// 	this.$api.doRequest('get', '/weighingManagement/getWeighingManagement', {
-			// 		id: this.id
-			// 	}).then(res => {
-			// 		if (res.data.code == 200) {
-			// 			this.detailData = res.data.data
-			// 		}
-			// 	})
-			// 	this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
-			// 		id: this.cangId
-			// 	}).then(res => {
-			// 		if (res.data.code == 200) {
-			// 			this.positionList = res.data.data.warehousePositionInfoList
-			// 		}
-			// 	})
-			// 	this.$api.doRequest('get', '/warehouseBaseInfo/selectContractNoList', {
-			// 		compId: '',
-			// 		flag: 5
-			// 	}).then(res => {
-			// 		if (res.data.code == 200) {
-			// 			this.contractNoList = res.data.data
-			// 		}
-			// 	})
-			// },
 			onProgress(e) {},
-			onRemove(index) {},
+			onRemove() {
+				this.detailData.addressUrl = ""
+			},
 			submit(num) {
-				if (!this.detailData.grossWeight) {
-					this.$api.msg('毛重不能为空')
+				if (!this.detailData.contractNo) {
+					this.$api.msg('合同编号不能为空')
+					return
+				}
+				if (!this.detailData.goodsName) {
+					this.$api.msg('货名不能为空')
 					return
 				}
+
+
 				if (!this.detailData.grossWeight) {
 					this.$api.msg('毛重不能为空')
 					return
@@ -387,6 +368,200 @@
 					this.$api.msg('毛重输入错误!')
 					return
 				}
+				if (!this.detailData.tare) {
+					this.$api.msg('皮重不能为空')
+					return
+				}
+				if (isNaN(this.detailData.tare) ||
+					(String(this.detailData.tare).indexOf('.') != -1 &&
+						String(this.detailData.tare).length -
+						(String(this.detailData.tare).indexOf('.') + 1) >
+						1) ||
+					this.detailData.tare < 1 ||
+					this.detailData.tare > 100000
+				) {
+					this.$api.msg('皮重输入错误!')
+					return
+				}
+				if (this.detailData.tare > this.detailData.grossWeight) {
+					this.$api.msg('皮重不能大于毛重')
+					return
+				}
+				if (this.netWeight < 0) {
+					this.$api.msg('净重不能小于0')
+					return
+				}
+				if (this.detailData.type == "潮粮") {
+					if (!this.detailData.buckleWeightRatio) {
+						this.$api.msg('扣重比不能为空')
+						return
+					}
+					if (isNaN(this.detailData.buckleWeightRatio) ||
+						(String(this.detailData.buckleWeightRatio).indexOf('.') != -1 &&
+							String(this.detailData.buckleWeightRatio).length -
+							(String(this.detailData.buckleWeightRatio).indexOf('.') + 1) >
+							2) ||
+						this.detailData.buckleWeightRatio < 0 ||
+						this.detailData.buckleWeightRatio > 2
+					) {
+						this.$api.msg('扣重比输入错误!')
+						return
+					}
+					if (!this.detailData.solidGrainWater) {
+						this.$api.msg('干粮水分不能为空')
+						return
+					}
+					if (isNaN(this.detailData.solidGrainWater) ||
+						(String(this.detailData.solidGrainWater).indexOf('.') != -1 &&
+							String(this.detailData.solidGrainWater).length -
+							(String(this.detailData.solidGrainWater).indexOf('.') + 1) >
+							1) ||
+						this.detailData.solidGrainWater < 1 ||
+						this.detailData.solidGrainWater > 40
+					) {
+						this.$api.msg('干粮水分输入错误!')
+						return
+					}
+					if (!this.detailData.tidalGrainWater) {
+						this.$api.msg('潮粮水分不能为空')
+						return
+					}
+					if (isNaN(this.detailData.tidalGrainWater) ||
+						(String(this.detailData.tidalGrainWater).indexOf('.') != -1 &&
+							String(this.detailData.tidalGrainWater).length -
+							(String(this.detailData.tidalGrainWater).indexOf('.') + 1) >
+							1) ||
+						this.detailData.tidalGrainWater < 1 ||
+						this.detailData.tidalGrainWater > 40
+					) {
+						this.$api.msg('潮粮水分输入错误!')
+						return
+					}
+					if (this.detailData.tidalGrainWater < this.detailData.solidGrainWater) {
+						this.$api.msg('潮粮水分输入错误!')
+						return
+					}
+					if (!this.detailData.pureWeight) {
+						this.$api.msg('纯重不能为空')
+						return
+					}
+				}
+				if (this.detailData.grade == "请输入品级") {
+					this.$api.msg('品级不能为空')
+					return
+				}
+				if (this.detailData.agent == "请选择经办人") {
+					this.$api.msg('经办人不能为空')
+					return
+				}
+				if (this.detailData.inOutDate == "请选择出库日期") {
+					this.$api.msg('出库日期不能为空')
+					return
+				}
+				if (this.detailData.inOutType == "请选择出库类型") {
+					this.$api.msg('出库类型不能为空')
+					return
+				}
+				if (!this.detailData.carNo) {
+					this.$api.msg('车牌号不能为空')
+					return
+				}
+				if (!this.detailData.addressUrl) {
+					this.$api.msg('请上传磅单')
+					return
+				}
+				if (this.detailData.warehouseInOutDetail.qualityInspector) {
+					if (this.detailData.warehouseInOutDetail.qualityInspector < 2 || this.detailData.warehouseInOutDetail
+						.qualityInspector > 10) {
+						this.$api.msg('质检员姓名需要2-10个字')
+						return
+					}
+				}
+				if (this.detailData.warehouseInOutDetail.waterContent) {
+					if (this.detailData.type == "潮粮" && this.detailData.warehouseInOutDetail.waterContent != this
+						.detailData.tidalGrainWater) {
+						this.$api.msg('水分占比与潮粮水分不一致')
+						return
+					}
+					if (this.detailData.type == "干粮") {
+						if (this.detailData.warehouseInOutDetail.waterContent < 0 || this.detailData.warehouseInOutDetail
+							.waterContent > 40) {
+							this.$api.msg('热损伤占比输入错误')
+							return
+						}
+						if (String(this.detailData.warehouseInOutDetail.waterContent).indexOf('.') != -1 && String(this
+								.detailData.warehouseInOutDetail.jiaorenli).length - (String(
+								this.detailData.warehouseInOutDetail.waterContent).indexOf('.') + 1) > 1) {
+							this.$api.msg('热损伤占比输入错误')
+							return
+						}
+					}
+				}
+				if (this.detailData.warehouseInOutDetail.bulkDensity) {
+					if (this.detailData.warehouseInOutDetail.bulkDensity < 500 || this.detailData.warehouseInOutDetail
+						.bulkDensity > 1000) {
+						this.$api.msg('容重输入错误')
+						return
+					}
+					if (String(this.detailData.warehouseInOutDetail.bulkDensity).indexOf('.') != -1 && String(this
+							.detailData.warehouseInOutDetail.bulkDensity).length - (
+							String(this.detailData.warehouseInOutDetail.bulkDensity).indexOf('.') + 1) > 0) {
+						this.$api.msg('容重输入错误')
+						return
+					}
+				}
+				if (this.detailData.warehouseInOutDetail.jiaorenli) {
+					if (this.detailData.warehouseInOutDetail.jiaorenli < 0 || this.detailData.warehouseInOutDetail
+						.jiaorenli > 40) {
+						this.$api.msg('热损伤占比输入错误')
+						return
+					}
+					if (String(this.detailData.warehouseInOutDetail.jiaorenli).indexOf('.') != -1 && String(this.detailData
+							.warehouseInOutDetail.jiaorenli).length - (String(
+							this.detailData.warehouseInOutDetail.jiaorenli).indexOf('.') + 1) > 1) {
+						this.$api.msg('热损伤占比输入错误')
+						return
+					}
+				}
+				if (this.detailData.warehouseInOutDetail.impurity) {
+					if (this.detailData.warehouseInOutDetail.impurity < 0 || this.detailData.warehouseInOutDetail
+						.impurity > 40) {
+						this.$api.msg('杂质占比输入错误')
+						return
+					}
+					if (String(this.detailData.warehouseInOutDetail.impurity).indexOf('.') != -1 && String(this.detailData
+							.warehouseInOutDetail.impurity).length - (String(
+							this.detailData.warehouseInOutDetail.impurity).indexOf('.') + 1) > 1) {
+						this.$api.msg('杂质占比输入错误')
+						return
+					}
+				}
+				if (this.detailData.warehouseInOutDetail.mildewGrain) {
+					if (this.detailData.warehouseInOutDetail.mildewGrain < 0 || this.detailData.warehouseInOutDetail
+						.mildewGrain > 40) {
+						this.$api.msg('霉变粒占比输入错误')
+						return
+					}
+					if (String(this.detailData.warehouseInOutDetail.mildewGrain).indexOf('.') != -1 && String(this.detailData
+							.warehouseInOutDetail.mildewGrain).length - (String(
+							this.detailData.warehouseInOutDetail.mildewGrain).indexOf('.') + 1) > 1) {
+						this.$api.msg('霉变粒占比输入错误')
+						return
+					}
+				}
+				if (this.detailData.warehouseInOutDetail.imperfectGrain) {
+					if (this.detailData.warehouseInOutDetail.imperfectGrain < 0 || this.detailData.warehouseInOutDetail
+						.imperfectGrain > 40) {
+						this.$api.msg('不完整粒占比输入错误')
+						return
+					}
+					if (String(this.detailData.warehouseInOutDetail.imperfectGrain).indexOf('.') != -1 && String(this.detailData
+							.warehouseInOutDetail.imperfectGrain).length - (String(
+							this.detailData.warehouseInOutDetail.imperfectGrain).indexOf('.') + 1) > 1) {
+						this.$api.msg('不完整粒占比输入错误')
+						return
+					}
+				}
 				this.detailData.baseId = helper.erpWarehouse.warehouseId
 				this.detailData.warehouseName = helper.erpWarehouse.warehouseName
 				this.detailData.positionId = helper.erpWarehouse.positionId

+ 16 - 13
pages/erp/improvedExWaehousing/improvedExWaehousing.vue

@@ -4,16 +4,12 @@
 			<view class="left" @click='show1=true'>
 				<view>{{warehouseName}}</view>
 				<u-icon name="arrow-right"></u-icon>
-				<!-- <u-picker v-model="show1" :default-value='[0]' mode="selector" :list="warehouseList" @confirm="confirmWarehouse">
-				</u-picker> -->
 				<u-picker @confirm="warehousechange" range-key='warehouseName' mode="selector" v-model="show1"
 					:range="warehouseList"></u-picker>
 			</view>
 			<view class="right" @click='show2=true'>
 				<view>{{binNumber}}仓位</view>
 				<u-icon name="arrow-right"></u-icon>
-				<!-- <u-picker v-model="show2" :default-value='[0]' mode="selector" :list="positionList" @confirm="confirmPositon">
-				</u-picker> -->
 				<u-picker @confirm="warehouseCWchange" range-key='binNumber' mode="selector" v-model="show2"
 					:range="warehouseCWList"></u-picker>
 			</view>
@@ -22,7 +18,7 @@
 			<view class="content2-item" v-for="(item,index) in dataList" @click="goDetail(item)">
 				<view class="item-style">{{item.contractNo}}</view>
 				<view class="item-style">{{item.carNo}}</view>
-				<view class="item-style">{{item.inOutDate}}</view>
+				<view class="item-style">{{item.updateDate}}</view>
 				<view class="item-style">{{item.backOffice}}</view>
 			</view>
 		</view>
@@ -40,27 +36,24 @@
 				pageSize: 10,
 				positionId: "",
 				binNumber: "",
-				// warehouseName: '鲅鱼圈一号库',
-				// positionName: '102仓位',
 				binNumber: "",
 				warehouseName: '',
 				warehouseList: [],
 				warehouseCWList:[],
-				
-				// positionList: [{
-				// 	"label": '102仓位',
-				// 	"value": '1'
-				// }],
 				dataList: []
 			}
 		},
 		onLoad() {
 			this.positionId = helper.erpWarehouse.positionId
+			this.warehouseId = helper.erpWarehouse.warehouseId
 			this.getList()
 		},
 		onShow() {
+			this.positionId = helper.erpWarehouse.positionId
+			this.warehouseId = helper.erpWarehouse.warehouseId
 			let _data = helper.erpWarehouse
 			this.positionId = _data.positionId
+			this.warehouseId = _data.warehouseId
 			this.warehouseList = _data.allWarehouse
 			this.warehouseCWList = _data.warehouseCWList
 			this.warehouseName = _data.warehouseName
@@ -70,7 +63,7 @@
 			getList() {
 				this.$api.doRequest('get', '/warehouseInOutInfo/selectWarehouseInOutInfo', {
 					positionId:this.positionId,
-					baseId: helper.erpWarehouse.warehouseId,
+					baseId: this.warehouseId,
 					currentPage: this.currentPage,
 					pageSize: this.pageSize,
 					inOutFlag:1
@@ -82,9 +75,19 @@
 			},
 			warehousechange(e) {
 				 this.warehouseName = this.warehouseList[e[0]].warehouseName
+				 this.warehouseId =this.warehouseList[e[0]].id
+				 this.warehouseCWList = this.warehouseList[e[0]].positionInfos
+				 this.warehouseCWchange([0])
 			},
 			warehouseCWchange(e) {
 				 this.binNumber = this.warehouseCWList[e[0]].binNumber
+				 this.warehouseId = this.warehouseCWList[e[0]].baseId
+				 this.positionId = this.warehouseCWList[e[0]].id
+				 helper.erpWarehouse.binNumber = this.binNumber
+				  helper.erpWarehouse.warehouseName = this.warehouseName
+				 helper.erpWarehouse.positionId =  this.positionId
+				 helper.erpWarehouse.warehouseId = this.warehouseId 
+				 this.getList()
 			},
 			goDetail(val) {
 				uni.navigateTo({

+ 204 - 39
pages/erp/improvedExWaehousing/improvedExWaehousingDetail.vue

@@ -216,11 +216,7 @@
 					year: true,
 					month: true,
 					day: true,
-					hour: true,
-					minute: true,
-					second: true
 				},
-				inOutDate1: "",
 				netWeight: "",
 				imgUrl: [], //图片展示
 			}
@@ -236,16 +232,9 @@
 		onLoad(options) {
 			this.detailData = JSON.parse(options.data)
 			this.netWeight = this.detailData.netWeight
-			console.log(this.detailData, "dmksj")
-
-			// this.imgUrl = this.detailData.addressUrl.split(",")
-
-			// for (let i = 0; i < this.detailData.addressUrl.split(",").length; i++) {
 				this.imgUrl.push({
 						url:this.detailData.addressUrl.split(",")[0]
 					})
-			// }
-			// console.log(this.imgUrl)
 			this.cangId = options.cangId
 		},
 		onShow() {
@@ -307,7 +296,6 @@
 			},
 			dateChange(e) {
 				this.detailData.inOutDate = e.year + "-" + e.month + "-" + e.day
-				this.inOutDate1 = e.year + "-" + e.month + "-" + e.day + " " + e.hour + ":" + e.minute
 			},
 			warehousingTypePicker(e) {
 				this.detailData.inOutType = this.warehousingTypeList[e].constValue
@@ -342,33 +330,19 @@
 			binNumberpicker(e) {
 				this.detailData.binNumber = this.positionList[e[0]].binNumber
 			},
-			// getWeighingManagement() {
-			// 	this.$api.doRequest('get', '/weighingManagement/getWeighingManagement', {
-			// 		id: this.id
-			// 	}).then(res => {
-			// 		if (res.data.code == 200) {
-			// 			this.detailData = res.data.data
-			// 		}
-			// 	})
-			// 	this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
-			// 		id: this.cangId
-			// 	}).then(res => {
-			// 		if (res.data.code == 200) {
-			// 			this.positionList = res.data.data.warehousePositionInfoList
-			// 		}
-			// 	})
-			// 	this.$api.doRequest('get', '/warehouseBaseInfo/selectContractNoList', {
-			// 		compId: '',
-			// 		flag: 5
-			// 	}).then(res => {
-			// 		if (res.data.code == 200) {
-			// 			this.contractNoList = res.data.data
-			// 		}
-			// 	})
-			// },
 			onProgress(e) {},
 			onRemove(index) {},
 			submit(num) {
+				if (!this.detailData.contractNo) {
+					this.$api.msg('合同编号不能为空')
+					return
+				}
+				if (!this.detailData.goodsName) {
+					this.$api.msg('货名不能为空')
+					return
+				}
+				
+				
 				if (!this.detailData.grossWeight) {
 					this.$api.msg('毛重不能为空')
 					return
@@ -384,6 +358,200 @@
 					this.$api.msg('毛重输入错误!')
 					return
 				}
+				if (!this.detailData.tare) {
+					this.$api.msg('皮重不能为空')
+					return
+				}
+				if (isNaN(this.detailData.tare) ||
+					(String(this.detailData.tare).indexOf('.') != -1 &&
+						String(this.detailData.tare).length -
+						(String(this.detailData.tare).indexOf('.') + 1) >
+						1) ||
+					this.detailData.tare < 1 ||
+					this.detailData.tare > 100000
+				) {
+					this.$api.msg('皮重输入错误!')
+					return
+				}
+				if (this.detailData.tare > this.detailData.grossWeight) {
+					this.$api.msg('皮重不能大于毛重')
+					return
+				}
+				if (this.netWeight < 0) {
+					this.$api.msg('净重不能小于0')
+					return
+				}
+				if (this.detailData.type == "潮粮") {
+					if (!this.detailData.buckleWeightRatio) {
+						this.$api.msg('扣重比不能为空')
+						return
+					}
+					if (isNaN(this.detailData.buckleWeightRatio) ||
+						(String(this.detailData.buckleWeightRatio).indexOf('.') != -1 &&
+							String(this.detailData.buckleWeightRatio).length -
+							(String(this.detailData.buckleWeightRatio).indexOf('.') + 1) >
+							2) ||
+						this.detailData.buckleWeightRatio < 0 ||
+						this.detailData.buckleWeightRatio > 2
+					) {
+						this.$api.msg('扣重比输入错误!')
+						return
+					}
+					if (!this.detailData.solidGrainWater) {
+						this.$api.msg('干粮水分不能为空')
+						return
+					}
+					if (isNaN(this.detailData.solidGrainWater) ||
+						(String(this.detailData.solidGrainWater).indexOf('.') != -1 &&
+							String(this.detailData.solidGrainWater).length -
+							(String(this.detailData.solidGrainWater).indexOf('.') + 1) >
+							1) ||
+						this.detailData.solidGrainWater < 1 ||
+						this.detailData.solidGrainWater > 40
+					) {
+						this.$api.msg('干粮水分输入错误!')
+						return
+					}
+					if (!this.detailData.tidalGrainWater) {
+						this.$api.msg('潮粮水分不能为空')
+						return
+					}
+					if (isNaN(this.detailData.tidalGrainWater) ||
+						(String(this.detailData.tidalGrainWater).indexOf('.') != -1 &&
+							String(this.detailData.tidalGrainWater).length -
+							(String(this.detailData.tidalGrainWater).indexOf('.') + 1) >
+							1) ||
+						this.detailData.tidalGrainWater < 1 ||
+						this.detailData.tidalGrainWater > 40
+					) {
+						this.$api.msg('潮粮水分输入错误!')
+						return
+					}
+					if (this.detailData.tidalGrainWater < this.detailData.solidGrainWater) {
+						this.$api.msg('潮粮水分输入错误!')
+						return
+					}
+					if (!this.detailData.pureWeight) {
+						this.$api.msg('纯重不能为空')
+						return
+					}
+				}
+				if (this.detailData.grade == "请输入品级") {
+					this.$api.msg('品级不能为空')
+					return
+				}
+				if (this.detailData.agent == "请选择经办人") {
+					this.$api.msg('经办人不能为空')
+					return
+				}
+				if (this.detailData.inOutDate == "请选择出库日期") {
+					this.$api.msg('出库日期不能为空')
+					return
+				}
+				if (this.detailData.inOutType == "请选择出库类型") {
+					this.$api.msg('出库类型不能为空')
+					return
+				}
+				if (!this.detailData.carNo) {
+					this.$api.msg('车牌号不能为空')
+					return
+				}
+				if (!this.detailData.addressUrl) {
+					this.$api.msg('请上传磅单')
+					return
+				}
+				if (this.detailData.warehouseInOutDetail.qualityInspector) {
+					if (this.detailData.warehouseInOutDetail.qualityInspector < 2 || this.detailData.warehouseInOutDetail
+						.qualityInspector > 10) {
+						this.$api.msg('质检员姓名需要2-10个字')
+						return
+					}
+				}
+				if (this.detailData.warehouseInOutDetail.waterContent) {
+					if (this.detailData.type == "潮粮" && this.detailData.warehouseInOutDetail.waterContent != this
+						.detailData.tidalGrainWater) {
+						this.$api.msg('水分占比与潮粮水分不一致')
+						return
+					}
+					if (this.detailData.type == "干粮") {
+						if (this.detailData.warehouseInOutDetail.waterContent < 0 || this.detailData.warehouseInOutDetail
+							.waterContent > 40) {
+							this.$api.msg('热损伤占比输入错误')
+							return
+						}
+						if (String(this.detailData.warehouseInOutDetail.waterContent).indexOf('.') != -1 && String(this
+								.detailData.warehouseInOutDetail.jiaorenli).length - (String(
+								this.detailData.warehouseInOutDetail.waterContent).indexOf('.') + 1) > 1) {
+							this.$api.msg('热损伤占比输入错误')
+							return
+						}
+					}
+				}
+				if (this.detailData.warehouseInOutDetail.bulkDensity) {
+					if (this.detailData.warehouseInOutDetail.bulkDensity < 500 || this.detailData.warehouseInOutDetail
+						.bulkDensity > 1000) {
+						this.$api.msg('容重输入错误')
+						return
+					}
+					if (String(this.detailData.warehouseInOutDetail.bulkDensity).indexOf('.') != -1 && String(this
+							.detailData.warehouseInOutDetail.bulkDensity).length - (
+							String(this.detailData.warehouseInOutDetail.bulkDensity).indexOf('.') + 1) > 0) {
+						this.$api.msg('容重输入错误')
+						return
+					}
+				}
+				if (this.detailData.warehouseInOutDetail.jiaorenli) {
+					if (this.detailData.warehouseInOutDetail.jiaorenli < 0 || this.detailData.warehouseInOutDetail
+						.jiaorenli > 40) {
+						this.$api.msg('热损伤占比输入错误')
+						return
+					}
+					if (String(this.detailData.warehouseInOutDetail.jiaorenli).indexOf('.') != -1 && String(this.detailData
+							.warehouseInOutDetail.jiaorenli).length - (String(
+							this.detailData.warehouseInOutDetail.jiaorenli).indexOf('.') + 1) > 1) {
+						this.$api.msg('热损伤占比输入错误')
+						return
+					}
+				}
+				if (this.detailData.warehouseInOutDetail.impurity) {
+					if (this.detailData.warehouseInOutDetail.impurity < 0 || this.detailData.warehouseInOutDetail
+						.impurity > 40) {
+						this.$api.msg('杂质占比输入错误')
+						return
+					}
+					if (String(this.detailData.warehouseInOutDetail.impurity).indexOf('.') != -1 && String(this.detailData
+							.warehouseInOutDetail.impurity).length - (String(
+							this.detailData.warehouseInOutDetail.impurity).indexOf('.') + 1) > 1) {
+						this.$api.msg('杂质占比输入错误')
+						return
+					}
+				}
+				if (this.detailData.warehouseInOutDetail.mildewGrain) {
+					if (this.detailData.warehouseInOutDetail.mildewGrain < 0 || this.detailData.warehouseInOutDetail
+						.mildewGrain > 40) {
+						this.$api.msg('霉变粒占比输入错误')
+						return
+					}
+					if (String(this.detailData.warehouseInOutDetail.mildewGrain).indexOf('.') != -1 && String(this.detailData
+							.warehouseInOutDetail.mildewGrain).length - (String(
+							this.detailData.warehouseInOutDetail.mildewGrain).indexOf('.') + 1) > 1) {
+						this.$api.msg('霉变粒占比输入错误')
+						return
+					}
+				}
+				if (this.detailData.warehouseInOutDetail.imperfectGrain) {
+					if (this.detailData.warehouseInOutDetail.imperfectGrain < 0 || this.detailData.warehouseInOutDetail
+						.imperfectGrain > 40) {
+						this.$api.msg('不完整粒占比输入错误')
+						return
+					}
+					if (String(this.detailData.warehouseInOutDetail.imperfectGrain).indexOf('.') != -1 && String(this.detailData
+							.warehouseInOutDetail.imperfectGrain).length - (String(
+							this.detailData.warehouseInOutDetail.imperfectGrain).indexOf('.') + 1) > 1) {
+						this.$api.msg('不完整粒占比输入错误')
+						return
+					}
+				}
 				this.detailData.baseId = helper.erpWarehouse.warehouseId
 				this.detailData.positionId = helper.erpWarehouse.positionId
 				this.detailData.warehouseName = helper.erpWarehouse.warehouseName
@@ -397,7 +565,6 @@
 				let title = ""
 				if (num == 1) {
 					this.detailData.statusFlag = 1
-					this.detailData.inOutDate = this.inOutDate1
 					this.detailData.backOffice = this.userInfo.userName
 					this.detailData.backOfficeId = this.userInfo.id
 					title = "暂存成功"
@@ -405,7 +572,6 @@
 					this.detailData.statusFlag = 3
 					title = "提交成功"
 				}
-				console.log(this.detailData,"提交数据")
 				let that = this
 				uni.showModal({
 					content: "确定提交出库信息?",
@@ -413,7 +579,6 @@
 						if (res.confirm) {
 							that.$api.doRequest('post', '/warehouseInOutInfo/InOutWarehouse',
 								that.detailData).then(res => {
-									that.$api.msg(title)
 								if (res.data.code == 200) {
 									that.$api.msg(title)
 									uni.navigateBack()