浏览代码

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-app

# Conflicts:
#	config/index.js
ccjgmwz 3 年之前
父节点
当前提交
02fa5d9448

+ 2 - 2
config/index.js

@@ -1,8 +1,8 @@
 const dev = {
 	baseUrl: 'https://www.zthymaoyi.com',
-	baseUrlNew: 'http://192.168.1.122:8090/',
 	// baseUrlNew: 'http://192.168.1.103:9100/',
-	// baseUrlNew: 'https://apitest.eliangeyun.com/',
+	baseUrlNew: 'https://apitest.eliangeyun.com/',
+	// baseUrlNew: 'http://api1.eliangeyun.com/',
 	// baseUrlNew: 'http://api1.eliangeyun.com/',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false

+ 237 - 47
pages/erp/exWarehousing/exWarehousing.vue

@@ -206,24 +206,30 @@
 				binNumber: '',
 				detailData: {
 					contractNo: "请选择合同编号或移库任务编号",
-					type: "请选择类型",
+					type: "干粮",
 					grade: "请输入品级",
 					agent: "请选择经办人",
 					inOutDate: "请选择出库日期",
 					inOutType: "请选择出库类型",
 					warehouseInOutDetail: {},
 					gradeKey: "",
+					grossWeight: 0,
+					tare: 0,
+					// buckleWeightRatio: 0,
+					// solidGrainWater: 0,
+					// tidalGrainWater: 0,
+					// pureWeight: 0,
 				},
 				params: {
 					year: true,
 					month: true,
 					day: true,
-					hour: true,
-					minute: true,
-					second: true
+					// hour: true,
+					// minute: true,
+					// second: true
 				},
-				// inOutDate1: "",
-				netWeight: ""
+				// inOutDate: "请选择出库日期",
+				netWeight: 0,
 			}
 		},
 		computed: {
@@ -239,30 +245,34 @@
 			this.cangId = options.cangId
 		},
 		onShow() {
+			let _data = uni.getStorageSync('erpContractNo')
 			this.binNumber = helper.erpWarehouse.binNumber
 			this.warehouseName = helper.erpWarehouse.warehouseName
-			this.detailData.goodsName = uni.getStorageSync('erpContractNo').goodsName;
-			if(uni.getStorageSync('erpContractNo').contractNo){
-				this.detailData.contractNo = uni.getStorageSync('erpContractNo').contractNo;
+			this.detailData.goodsName = _data.goodsName;
+			if (_data.contractNo) {
+				this.detailData.contractNo = _data.contractNo;
 			}
-			this.detailData.goodsNameKey = uni.getStorageSync('erpContractNo').goodsNameKey;
-			if (!uni.getStorageSync('erpContractNo').tranCarInfoList)
-			 uni.getStorageSync('erpContractNo').tranCarInfoList = []
+			this.detailData.goodsNameKey = _data.goodsNameKey;
+			if (!_data.tranCarInfoList) _data.tranCarInfoList = []
 			if (!this.detailData.contractNo) {
 				this.detailData.contractNo = '请选择合同编号'
 			} else {
-				if(uni.getStorageSync('erpContractNo').tranCarInfoList){
-				if (uni.getStorageSync('erpContractNo').tranCarInfoList.length == 0) {
+				if (_data.tranCarInfoList.length == 0) {
 					this.isPC = false
-				}}
+				}
 			}
 			if (!this.detailData.goodsName) {
 				this.detailData.goodsName = '货名'
 			}
+			let _day = new Date();
+			_day.setTime(_day.getTime());
+			this.detailData.inOutDate = _day.getFullYear() + "-" + (_day.getMonth() + 1) + "-" + _day.getDate();
 			//出库类型
 			this.outWarehouse()
+			this.detailData.agent = helper.erpWarehouse.personCharge
 			//经办人
 			this.handler()
+
 		},
 		methods: {
 			//计算纯重
@@ -305,8 +315,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 +339,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 +377,206 @@
 					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.carNo.length != 7) {
+					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

+ 1 - 0
pages/erp/exWarehousing/selectCarNo.vue

@@ -48,6 +48,7 @@
 		methods: {
 			confirm(item){
 				uni.setStorageSync('ContractNo', item);
+				uni.setStorageSync('ContractNoCar',item.carNo);
 				uni.navigateBack({})
 			},
 			getContractNoList() {

+ 96 - 19
pages/erp/improvedExWaehousing/improvedExWaehousing.vue

@@ -1,30 +1,46 @@
 <template>
-	<view class="wrap">
+	<view class="warp">
 		<view class="dropdown content1">
 			<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>
 		</view>
-		<view class="content2">
+		<!-- <view class="content2">
 			<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> -->
+		<view class="content2">
+			<view class="content2-item" v-for="(item,index) in dataList" @click="goDetail(item)">
+				<view class="row">
+					<view class="left">合同编号</view>
+					<view>{{item.contractNo}}</view>
+				</view>
+				<view class="row">
+					<view class="left">车牌号</view>
+					<view>{{item.carNo}}</view>
+				</view>
+				<view class="row">
+					<view class="left">暂存时间</view>
+					<view>{{item.updateDate}}</view>
+				</view>
+				<view class="row no-boder">
+					<view class="left">提交人</view>
+					<view>{{item.backOffice}}</view>
+				</view>
+			</view>
 		</view>
 	</view>
 </template>
@@ -40,27 +56,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 +83,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 +95,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({
@@ -97,6 +120,24 @@
 </script>
 
 <style scoped lang="scss">
+	uni-page-body {
+		overflow: hidden;
+	}
+	// .warp {
+	// 	margin: 10rpx;
+	// 	padding: 20rpx 20rpx 140rpx 20rpx;
+	
+	// 	.top {
+	// 		display: flex;
+	// 		margin-bottom: 20rpx;
+	// 		border-radius: 20rpx;
+	// 		background: white;
+	// 		padding: 20rpx;
+	// 		.top-left {
+	// 			margin-right: 20rpx;
+	// 		}
+	// 	}
+	// }
 	.dropdown {
 		display: flex;
 		margin: 20rpx 0;
@@ -116,17 +157,14 @@
 	}
 
 	.content2 {
-		// padding: 20rpx;
 		margin: 20rpx;
-		// border-bottom: 1px solid #ccc;
 		background: #FFFFFF;
 		border-radius: 10rpx;
 
 		.content2-item {
 			padding: 20rpx;
 			margin-bottom: 10rpx;
-			border-bottom: 1px solid #ccc;
-			// padding-bottom: 10px;
+			// border-bottom: 1px solid #ccc;
 		}
 
 		.item-style {
@@ -134,4 +172,43 @@
 			width: 50%;
 		}
 	}
+	.content,
+	.content1,
+	.content2 {
+		border-radius: 20rpx;
+		background: white;
+		padding: 20rpx;
+	
+		.title {
+			font-size: 28rpx;
+			font-weight: 600;
+			color: #333333;
+		}
+	
+		.row {
+			display: flex;
+			justify-content: space-between;
+			border-bottom: 1px solid #EEEEEE;
+			padding: 21rpx 0;
+	
+			.right,
+			input {
+				font-size: 28rpx;
+				color: #333333;
+			}
+		}
+		.row-bottom {
+			.right-bottom {
+				width: 300rpx;
+				text-align: right;
+			}
+		}
+	}
+	.bottom-btn {
+		width: 92%;
+		position: fixed;
+		bottom: 40rpx;
+		display: flex;
+		z-index: 2;
+	}
 </style>

+ 208 - 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,204 @@
 					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.carNo.length != 7) {
+					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 +569,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 +576,6 @@
 					this.detailData.statusFlag = 3
 					title = "提交成功"
 				}
-				console.log(this.detailData,"提交数据")
 				let that = this
 				uni.showModal({
 					content: "确定提交出库信息?",
@@ -413,7 +583,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()

+ 33 - 13
pages/erp/improvedWrehousing/improvedWrehousing.vue

@@ -26,7 +26,7 @@
 				</view>
 				<view class="row">
 					<view class="left">暂存时间</view>
-					<view>{{item.inOutDate}}</view>
+					<view>{{item.updateDate}}</view>
 				</view>
 				<view class="row no-boder">
 					<view class="left">提交人</view>
@@ -53,7 +53,8 @@
 				warehouseList: [],
 				warehouseCWList: [],
 				dataList: [],
-				allWarehouse: []
+				allWarehouse: [],
+				showTime:''
 			}
 		},
 		onLoad() {
@@ -67,13 +68,14 @@
 			this.warehouseCWList = _data.warehouseCWList
 			this.binNumber = _data.binNumber
 			this.positionId = _data.positionId
+			this.warehouseId = _data.warehouseId
 			this.getList()
 		},
 		methods: {
 			getList() {
 				this.$api.doRequest('get', '/warehouseInOutInfo/selectWarehouseInOutInfo', {
-					positionId: helper.erpWarehouse.positionId,
-					baseId: helper.erpWarehouse.warehouseId,
+					positionId: this.positionId,
+					baseId: this.warehouseId,
 					currentPage: this.currentPage,
 					pageSize: this.pageSize,
 					inOutFlag: 2
@@ -84,10 +86,25 @@
 				})
 			},
 			warehousechange(e) {
-				 this.warehouseName = this.warehouseList[e[0]].warehouseName
+				this.warehouseName = this.warehouseList[e[0]].warehouseName
+				this.warehouseId = this.warehouseList[e[0]].id
+				this.warehouseCWList = this.warehouseList[e[0]].positionInfos
+				this.warehouseCWchange([0])
+				this.currentPage = 1
+				this.pageSize = 9999
+
 			},
 			warehouseCWchange(e) {
-				 this.binNumber = this.warehouseCWList[e[0]].binNumber
+				this.binNumber = this.warehouseCWList[e[0]].binNumber
+				this.warehouseId = this.warehouseCWList[e[0]].baseId
+				this.positionId = this.warehouseCWList[e[0]].id
+				this.binNumber = this.warehouseCWList[e[0]].binNumber
+				helper.erpWarehouse.positionId =  this.positionId
+				helper.erpWarehouse.warehouseId = this.warehouseId 
+				helper.erpWarehouse.binNumber = this.binNumber 
+				this.currentPage = 1
+				this.pageSize = 9999
+				this.getList()
 			},
 			goDetail(val) {
 				uni.navigateTo({
@@ -108,6 +125,7 @@
 		.left,
 		.right {
 			display: flex;
+			align-items: center;
 		}
 	}
 
@@ -117,21 +135,21 @@
 		border-radius: 10rpx;
 		background: #FFFFFF;
 	}
-	
+
 	.content2 {
 		.row {
 			display: flex;
 			justify-content: space-between;
 			border-bottom: 1px solid #EEEEEE;
 			padding: 21rpx 0;
-	
+
 			.right,
 			input {
 				font-size: 28rpx;
 				color: #333333;
 			}
 		}
-	
+
 		.row-bottom {
 			.right-bottom {
 				width: 300rpx;
@@ -139,13 +157,15 @@
 			}
 		}
 	}
-	.content2-item{
+
+	.content2-item {
 		background: white;
-		margin:0 20rpx 20rpx 20rpx;
+		margin: 0 20rpx 20rpx 20rpx;
 		padding: 10rpx;
 		border-radius: 15rpx;
 	}
-	.no-boder{
-		    border-bottom: none!important;
+
+	.no-boder {
+		border-bottom: none !important;
 	}
 </style>

+ 282 - 17
pages/erp/improvedWrehousing/improvedWrehousingDetail.vue

@@ -81,9 +81,7 @@
 				<view class="left">入库日期</view>
 				<view @click='show4=true'>{{detailData.inOutDate}}</view>
 				<u-picker v-model="show4" mode="time" @confirm='dateChange($event)' :params="params">
-					<!-- <view >{{detailData.inOutDate ? detailData.inOutDate:"请选择日期" }}</view> -->
 				</u-picker>
-				<!-- <u-calendar v-model="show4" mode="date" @change='dateChange'></u-calendar> -->
 			</view>
 			<view class="row">
 				<view class="left">入库类型</view>
@@ -102,12 +100,11 @@
 				<view class="left">成本(元/吨)</view>
 				<input v-if="detailData.inOutType=='采购入库'" v-model='detailData.cost' class="right-bottom"
 					placeholder="自动获取" :disabled="isEditCB"></input>
-				<input v-if="detailData.inOutType!='采购入库'" v-model='detailData.cost' class="right-bottom"
-					placeholder="自动获取" :disabled="isEditCB"></input>
 				<u-button class="edit-btn" hover-class="none" @click="editCB">编辑</u-button>
 			</view>
 			<view class="row row-bottom has-btn">
 				<view class="left">运费(元/吨)</view>
+				{{detailData.freight}}
 				<input @input='' v-model='detailData.freight' :disabled="isEditYF" class="right-bottom"
 					placeholder="自动获取"></input>
 				<u-button class="edit-btn" hover-class="none" @click="editYF">编辑</u-button>
@@ -263,8 +260,8 @@
 		},
 		onLoad(options) {
 			this.detailData = JSON.parse(options.data)
-			this.binNumber = helper.erpWarehouse.binNumber
-			this.warehouseName = helper.erpWarehouse.warehouseName
+			this.binNumber = this.detailData.binNumber
+			this.warehouseName = this.detailData.warehouseName
 			this.compId = helper.erpWarehouse.compId
 			if(this.detailData.addressUrl){
 				this.imgUrl.push({
@@ -278,7 +275,9 @@
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		onShow() {
-			if (this.detailData.inOutType == '采购入库') {
+			
+			console.log('详情数据',this.detailData)
+			if (this.detailData.inOutType == '采购入库'&&this.detailData.status!='已暂存') {
 				this.detailData.freight = 0
 			}
 			if (!this.detailData.tranCarInfoList) this.detailData.tranCarInfoList = []
@@ -342,8 +341,7 @@
 			},
 			dateChange(e) {
 				console.log(e)
-				this.detailData.inOutDate = e.year + "-" + e.month + "-" + e.day
-				this.inOutDate1 = e.year + "-" + e.month + "-" + e.day + " " + e.hour + ":" + e.minute 
+				this.detailData.inOutDate = e.year + "-" + e.month + "-" + e.day + " " + e.hour + ":" + e.minute + ":" + e.second 
 			},
 			warehousingTypePicker(e) {
 				this.detailData.inOutType = this.warehousingTypeList[e].constValue
@@ -416,17 +414,282 @@
 				this.isEditYF = false
 			},
 			submit(num) {
-				if (isNaN(this.detailData.grossWeight) ||
-					(String(this.detailData.grossWeight).indexOf('.') != -1 &&
-						String(this.detailData.grossWeight).length -
-						(String(this.detailData.grossWeight).indexOf('.') + 1) >
+			if (!this.detailData.contractNo) {
+				this.$api.msg('合同编号不能为空')
+				return
+			}
+			if (!this.detailData.goodsName) {
+				this.$api.msg('货名不能为空')
+				return
+			}
+			if (!this.detailData.grossWeight) {
+				this.$api.msg('毛重不能为空')
+				return
+			}
+			if (isNaN(this.detailData.grossWeight) ||
+				(String(this.detailData.grossWeight).indexOf('.') != -1 &&
+					String(this.detailData.grossWeight).length -
+					(String(this.detailData.grossWeight).indexOf('.') + 1) >
+					1) ||
+				this.detailData.grossWeight < 1 ||
+				this.detailData.grossWeight > 100000
+			) {
+				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) >
+					3) ||
+				this.detailData.tare < 0 ||
+				this.detailData.tare > 10
+			) {
+				this.$api.msg('皮重输入错误!')
+				return
+			}
+			
+			if (!this.detailData.deductionWeight) {
+				this.$api.msg('扣重不能为空')
+				return
+			}
+			if (isNaN(this.detailData.deductionWeight) ||
+				(String(this.detailData.deductionWeight).indexOf('.') != -1 &&
+					String(this.detailData.deductionWeight).length -
+					(String(this.detailData.deductionWeight).indexOf('.') + 1) >
+					1) ||
+				this.detailData.deductionWeight < 1 ||
+				this.detailData.deductionWeight > 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.grossWeight < 1 ||
-					this.detailData.grossWeight > 100000
+					this.detailData.solidGrainWater < 1 ||
+					this.detailData.solidGrainWater > 40
 				) {
-					this.$api.msg('毛重输入错误!')
+					this.$api.msg('干粮水分输入错误!')
+					return
+				}
+				if (!this.detailData.tidalGrainWater) {
+					this.$api.msg('潮粮水分不能为空')
+					return
+				}
+				if (isNaN(this.detailData.deductionAmount) ||
+					(String(this.detailData.deductionAmount).indexOf('.') != -1 &&
+						String(this.detailData.deductionAmount).length -
+						(String(this.detailData.deductionAmount).indexOf('.') + 1) >
+						2) ||
+					this.detailData.deductionAmount < 1 ||
+					this.detailData.deductionAmount > 10000
+				) {
+					this.$api.msg('扣款输入错误!')
+					return
+				}
+				if (!this.detailData.deductionAmount) {
+					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.carNo.length != 7) {
+				this.$api.msg('车牌号输入有误!')
+				return
+			}
+			if (!this.detailData.addressUrl) {
+				this.$api.msg('请上传磅单')
+				return
+			}
+				if (!this.detailData.cost) {
+					this.$api.msg('未获取到成本,请编辑后提交')
+					return
+				}
+				if (String(this.detailData.cost).indexOf('.') != -1 && String(this.detailData
+						.cost).length - (String(
+						this.detailData.cost).indexOf('.') + 1) > 2) {
+					this.$api.msg('成本输入错误')
+					return
+				}
+				if (this.detailData.cost < 0 || this.detailData.cost > 20000) {
+					this.$api.msg('成本输入错误')
+					return
+				}
+			if (!this.detailData.freight) {
+				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
@@ -490,7 +753,9 @@
 		.top {
 			display: flex;
 			margin-bottom: 20rpx;
-
+			border-radius: 20rpx;
+			background: white;
+			padding: 20rpx;
 			.top-left {
 				margin-right: 20rpx;
 			}

+ 72 - 51
pages/erp/index.vue

@@ -4,8 +4,8 @@
 			<view class="comp" @click='show0=true'>
 				<view>{{compName}}</view>
 				<u-icon name="arrow-right" color="" v-if="compList.length>1"></u-icon>
-				<u-picker @confirm="compChange" range-key='compName' mode="selector" v-model="show0"
-					:range="compList" v-if="compList.length>1"></u-picker>
+				<u-picker @confirm="compChange" range-key='compName' mode="selector" v-model="show0" :range="compList"
+					v-if="compList.length>1"></u-picker>
 			</view>
 			<view class='title'>仓库管理</view>
 			<view class="dropdown">
@@ -22,31 +22,29 @@
 						:range="warehouseCWList"></u-picker>
 				</view>
 			</view>
-			
+
 			<view class="cu-list grid" :class="['col-' + gridCol,gridBorder?'':'no-border']">
 				<view class="cu-item" v-for="(item,index) in gridList" :key="index" @click="gridClick(item, index)"
 					v-if="index<gridCol*2">
 					<view :class="['cuIcon-' + item.cuIcon,'text-' + item.color]">
 						<image :src="item.src" class="sign"></image>
 					</view>
-			
+
 					<text>{{item.name}}</text>
 				</view>
 			</view>
 		</view>
-		
-		<u-modal v-model="isShowAlert"
-		 :title-style="{fontSize: '18px',fontWeight:'500'}" 
-		 :content-style="{fontSize: '14px',fontWeight:'400'}" 
-		 confirm-color='#22C572' confirm-text='立即开通' title='您尚未开通ERP业务'
-		 :content="content" @confirm="goOpenService"></u-modal>
+
+		<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
+			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='立即开通'
+			title='您尚未开通ERP业务' :content="content" @confirm="goOpenService"></u-modal>
 	</view>
 </template>
 <script>
 	import {
 		mapState
 	} from 'vuex';
-import helper from '@/common/helper.js'; 
+	import helper from '@/common/helper.js';
 	export default {
 		components: {
 
@@ -57,19 +55,20 @@ import helper from '@/common/helper.js';
 				show1: false,
 				show2: false,
 				isShowAlert: false,
-				compName:'',
-				compList:[],
+				compName: '',
+				compList: [],
 				content: '易粮易运ERP系统包含合同管理、仓库管理、运输管理、结算管理等多个模块,可为粮企提供粮食贸易的全流程服务,平台诚邀您的加入。',
 				warehouseName: '暂无仓库',
 				binNumber: '暂无',
-				compId:'',
-				warehouseId:"",
-				positionId:"",
+				compId: '',
+				warehouseId: "",
+				positionId: "",
 				warehouseList: [],
-				warehouseCWList:[],
-				allWarehouse:[],
+				warehouseCWList: [],
+				allWarehouse: [],
 				gridCol: 4,
 				gridBorder: false,
+				personCharge:'',
 				gridList: [{
 						num: 0,
 						name: '入库',
@@ -128,8 +127,7 @@ import helper from '@/common/helper.js';
 			}
 		},
 
-		onLoad() {
-		},
+		onLoad() {},
 		// #ifndef MP
 		onNavigationBarButtonTap(e) {
 			const index = e.index;
@@ -174,13 +172,13 @@ import helper from '@/common/helper.js';
 					})
 				}
 			})
-			this.$api.doRequest('get', '/openServiceInfo/selectCommonCompany',{
-				phone:this.userInfo.phone
+			this.$api.doRequest('get', '/openServiceInfo/selectCommonCompany', {
+				phone: this.userInfo.phone
 			}).then(res => {
 				if (res.data.code == 200) {
-					if(res.data.data.length==0){
+					if (res.data.data.length == 0) {
 						this.isShowAlert = true
-					}else{
+					} else {
 						this.isShowAlert = false
 					}
 					this.compList = res.data.data
@@ -190,8 +188,8 @@ import helper from '@/common/helper.js';
 			})
 		},
 		methods: {
-			getCompWarehouse(){},
-			goOpenService(){
+			getCompWarehouse() {},
+			goOpenService() {
 				if (!this.hasLogin) {
 					url = '/pages/public/login';
 				}
@@ -232,14 +230,15 @@ import helper from '@/common/helper.js';
 				} else {
 					if (item.url) {
 						helper.erpWarehouse = {
-							warehouseName:this.warehouseName,
-							binNumber:this.binNumber,
-							compId:this.compId,
-							warehouseId:this.warehouseId,
-							baseId:this.baseId,
-							allWarehouse:this.allWarehouse,
-							warehouseCWList:this.warehouseCWList,
-							positionId: this.positionId
+							warehouseName: this.warehouseName,
+							binNumber: this.binNumber,
+							compId: this.compId,
+							warehouseId: this.warehouseId,
+							baseId: this.baseId,
+							allWarehouse: this.allWarehouse,
+							warehouseCWList: this.warehouseCWList,
+							positionId: this.positionId,
+							personCharge:this.personCharge
 						}
 						uni.navigateTo({
 							url: item.url
@@ -249,18 +248,33 @@ import helper from '@/common/helper.js';
 			},
 			confirmWarehouse() {},
 			confirmPositon() {},
-			compChange(e){
+			compChange(e) {
 				this.compName = this.compList[e[0]].compName
 				this.init(this.compList[e[0]].compId)
 			},
 			init(compId) {
-				debugger
 				console.log(this.userInfo)
 				this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouseSelf', {
 					compId: compId,
 				}).then(res => {
-					if (res.data.data.length!=0) {
-						console.log('res',res.data.data)
+					if (res.data.data.length != 0) {
+						console.log('res', res.data.data)
+						let _showData = uni.getStorageSync("erpSelectWarehous")
+						let _showCWData = uni.getStorageSync("erpSelectWarehousCW")
+						this.allWarehouse = res.data.data
+						this.warehouseList = res.data.data;
+						if (_showData) {
+							this.warehouseName = _showData.warehouseName
+							this.compId = _showData.compId
+							this.agent = _showData.agent
+							this.binNumber = _showCWData.binNumber
+							this.warehouseCWList = _showData.positionInfos
+							this.warehouseId = _showData.id
+							this.baseId = _showCWData.baseId
+							this.positionId = _showCWData.id
+							this.personCharge = _showData.personCharge
+							console.log('this.warehouseCWList', this.warehouseCWList)
+						} else {
 							this.allWarehouse = res.data.data
 							this.warehouseName = res.data.data[0].warehouseName
 							this.warehouseList = res.data.data;
@@ -271,31 +285,35 @@ import helper from '@/common/helper.js';
 							this.warehouseId = res.data.data[0].id
 							this.baseId = res.data.data[0].positionInfos[0].baseId
 							this.positionId = res.data.data[0].positionInfos[0].id
-							console.log('this.warehouseCWList',this.warehouseCWList)
-					}	
-					else{
-						this.warehouseList=[]
+							this.personCharge = res.data.data[0].personCharge
+							console.log('this.warehouseCWList', this.warehouseCWList)
+						}
+
+					} else {
+						this.warehouseList = []
 						this.warehouseCWList = []
-						this.warehouseName='暂无仓库'
-						this.binNumber='暂无'
+						this.warehouseName = '暂无仓库'
+						this.binNumber = '暂无'
 					}
 				})
 			},
-			makeBinNumber(){
-			
+			makeBinNumber() {
+
 			},
-			warehousechange(e) {debugger
+			warehousechange(e) {
 				this.warehouseName = this.warehouseList[e[0]].warehouseName
 				this.compId = this.warehouseList[e[0]].compId
 				this.agent = this.warehouseList[e[0]].agent
-				this.warehouseId =this.warehouseList[e[0]].id
+				this.warehouseId = this.warehouseList[e[0]].id
 				this.warehouseCWList = this.warehouseList[e[0]].positionInfos
+				uni.setStorageSync('erpSelectWarehous', this.warehouseList[e[0]])
 				this.warehouseCWchange([0])
 			},
-			warehouseCWchange(e){
+			warehouseCWchange(e) {
 				this.binNumber = this.warehouseCWList[e[0]].binNumber
 				this.baseId = this.warehouseCWList[e[0]].baseId
 				this.positionId = this.warehouseCWList[e[0]].id
+				uni.setStorageSync('erpSelectWarehousCW', this.warehouseCWList[e[0]])
 			}
 
 		}
@@ -400,13 +418,15 @@ import helper from '@/common/helper.js';
 		justify-content: space-between;
 		border-bottom: 1px solid #EEEEEE;
 		padding-bottom: 20rpx;
+
 		.left,
 		.right {
 			display: flex;
 			align-items: center;
 		}
 	}
-	.comp{
+
+	.comp {
 		display: flex;
 		font-size: 36rpx;
 		font-weight: 500;
@@ -416,7 +436,8 @@ import helper from '@/common/helper.js';
 		font-weight: 700;
 		border-bottom: 1px solid #EEEEEE;
 	}
-	 .-model__title{
+
+	.-model__title {
 		background: red;
 		color: red;
 	}

+ 1 - 0
pages/erp/warehousing/selectCarNo.vue

@@ -50,6 +50,7 @@
 		methods: {
 			confirm(item){
 				uni.setStorageSync('erpcarNo', item);
+				uni.setStorageSync('ContractNoCar',item.carNo);
 				uni.navigateBack({})
 			},
 		}

+ 304 - 20
pages/erp/warehousing/warehousing.vue

@@ -66,8 +66,7 @@
 			<view class="row">
 				<view class="left">品级</view>
 				<view @click='show3=true'>{{detailData.grade}}</view>
-				<u-picker :range="pjList" range-key="grade" @confirm='pjPicker($event)' v-model="show3"
-					mode="selector">
+				<u-picker :range="pjList" range-key="grade" @confirm='pjPicker($event)' v-model="show3" mode="selector">
 				</u-picker>
 			</view>
 			<view class="row">
@@ -100,10 +99,10 @@
 			</view>
 			<view class="row row-bottom has-btn">
 				<view class="left">成本(元/吨)</view>
-				<input v-if="detailData.inOutType=='采购入库'" v-model='detailData.cost' class="right-bottom"
-					placeholder="自动获取" :disabled="isEditCB"></input>
-				<input v-if="detailData.inOutType!='采购入库'" v-model='detailData.cost' class="right-bottom"
+				<input v-model='detailData.cost' class="right-bottom"
 					placeholder="自动获取" :disabled="isEditCB"></input>
+				<!-- <input v-if="detailData.inOutType!='采购入库'" v-model='detailData.cost' class="right-bottom"
+					placeholder="自动获取" :disabled="isEditCB"></input> -->
 				<u-button class="edit-btn" hover-class="none" @click="editCB">编辑</u-button>
 			</view>
 			<view class="row row-bottom has-btn">
@@ -191,9 +190,9 @@
 					year: true,
 					month: true,
 					day: true,
-					hour: true,
-					minute: true,
-					second: true
+					// hour: true,
+					// minute: true,
+					// second: true
 				},
 				isEditCB: 'false',
 				isEditYF: 'false',
@@ -244,10 +243,10 @@
 				inOutDate1: "",
 				detailData: {
 					contractNo: "请选择合同编号",
-					carNo: '辽H12345',
+					carNo: '请输入车牌号',
 					type: "干粮",
 					goodsName: "123",
-					inOutDate: '请输入入库日期',
+					inOutDate: '请选择入库日期',
 					grade: "一等品",
 					agent: '请选择经办人',
 					inOutType: '请选择入库类型',
@@ -256,6 +255,7 @@
 					tare: 0,
 					deductionAmount: 0,
 					netWeight: 0,
+					cost:0,
 					warehouseInOutDetail: {}
 				}
 			}
@@ -271,22 +271,38 @@
 		},
 		onShow() {
 			let _data = uni.getStorageSync('erpContractNo')
+			this.detailData.agent = helper.erpWarehouse.personCharge
 			this.detailData.goodsName = _data.goodsName;
 			this.detailData.contractNo = _data.contractNo;
 			this.detailData.goodsNameKey = _data.goodsNameKey;
-			this.detailData.cost = _data.unitContractPrice
+			if(_data.unitContractPrice) {
+				this.detailData.cost = _data.unitContractPrice
+			}
+			let _day = new Date();
+			_day.setTime(_day.getTime());
+			this.detailData.inOutDate = _day.getFullYear() + "-" + (_day.getMonth() + 1) + "-" + _day.getDate();
 			if (_data.inOutType == '采购入库') {
 				this.detailData.freight = 0
 			}
 			this.detailData.carNo = uni.getStorageSync('erpcarNo')
-			if (!_data.tranCarInfoList) _data.tranCarInfoList = []
+			if (!_data.tranCarInfoList){
+				_data.tranCarInfoList = []
+			} else{
+				this.isPC = true
+				if(uni.getStorageSync('ContractNoCar')){
+					this.detailData.carNo = uni.getStorageSync('ContractNoCar')
+				}else{
+					this.detailData.carNo = _data.tranCarInfoList[0].carNo
+				}
+			}
 			if (!this.detailData.contractNo) {
 				this.detailData.contractNo = '请选择合同编号'
-			} else {
-				if (_data.tranCarInfoList.length == 0) {
-					this.isPC = false
-				}
 			}
+			//  else {
+			// 	if (_data.tranCarInfoList.length == 0) {
+			// 		this.isPC = false
+			// 	}
+			// }
 			if (!this.detailData.goodsName) {
 				this.detailData.goodsName = '货名'
 			}
@@ -337,7 +353,7 @@
 			pjPicker(e) {
 				console.log(e)
 				this.detailData.gradeKey = e[0]
-				    this.detailData.grade = this.pjList[e].grade
+				this.detailData.grade = this.pjList[e].grade
 			},
 			handlerPicker(e) {
 				console.log(e)
@@ -345,8 +361,8 @@
 			},
 			dateChange(e) {
 				console.log(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
+				this.inOutDate1 = e.year + "-" + e.month + "-" + e.day + "-" + e.hour + "-" + e.minute + "-" + e.second
 			},
 			warehousingTypePicker(e) {
 				this.detailData.inOutType = this.warehousingTypeList[e].constValue
@@ -419,6 +435,18 @@
 				this.isEditYF = false
 			},
 			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
+				}
 				if (isNaN(this.detailData.grossWeight) ||
 					(String(this.detailData.grossWeight).indexOf('.') != -1 &&
 						String(this.detailData.grossWeight).length -
@@ -430,6 +458,259 @@
 					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) >
+						3) ||
+					this.detailData.tare < 0 ||
+					this.detailData.tare > 10
+				) {
+					this.$api.msg('皮重输入错误!')
+					return
+				}
+
+				if (!this.detailData.deductionWeight) {
+					this.$api.msg('扣重不能为空')
+					return
+				}
+				if (isNaN(this.detailData.deductionWeight) ||
+					(String(this.detailData.deductionWeight).indexOf('.') != -1 &&
+						String(this.detailData.deductionWeight).length -
+						(String(this.detailData.deductionWeight).indexOf('.') + 1) >
+						1) ||
+					this.detailData.deductionWeight < 1 ||
+					this.detailData.deductionWeight > 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.deductionAmount) ||
+						(String(this.detailData.deductionAmount).indexOf('.') != -1 &&
+							String(this.detailData.deductionAmount).length -
+							(String(this.detailData.deductionAmount).indexOf('.') + 1) >
+							2) ||
+						this.detailData.deductionAmount < 1 ||
+						this.detailData.deductionAmount > 10000
+					) {
+						this.$api.msg('扣款输入错误!')
+						return
+					}
+					if (!this.detailData.deductionAmount) {
+						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.carNo.length != 7) {
+					this.$api.msg('车牌号输入有误!')
+					return
+				}
+				if (!this.detailData.addressUrl) {
+					this.$api.msg('请上传磅单')
+					return
+				}
+					if (!this.detailData.cost) {
+						this.$api.msg('未获取到成本,请编辑后提交')
+						return
+					}
+					if (String(this.detailData.cost).indexOf('.') != -1 && String(this.detailData
+							.cost).length - (String(
+							this.detailData.cost).indexOf('.') + 1) > 2) {
+						this.$api.msg('成本输入错误')
+						return
+					}
+					if (this.detailData.cost < 0 || this.detailData.cost > 20000) {
+						this.$api.msg('成本输入错误')
+						return
+					}
+				if (!this.detailData.freight) {
+					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
@@ -445,7 +726,7 @@
 				let title = ""
 				if (num == 1) {
 					this.detailData.statusFlag = 1
-					// this.detailData.inOutDate = this.inOutDate1
+					this.detailData.inOutDate = this.inOutDate1
 					title = "暂存成功"
 				} else if (num == 2) {
 					this.detailData.statusFlag = 3
@@ -491,6 +772,9 @@
 		padding: 20rpx 20rpx 140rpx 20rpx;
 
 		.top {
+			border-radius: 20rpx;
+			background: white;
+			padding: 20rpx;
 			display: flex;
 			margin-bottom: 20rpx;
 			align-items: center;

+ 5 - 5
pages/erpbusiness/acquisitionInspection/acquisitionInspection.vue

@@ -29,12 +29,12 @@
 							<view class="bottom">{{item.updateDate}}</view>
 						</view>
 					</view>
-					<view class="right">{{item.customer}}</view>
+					<view class="right">{{item.secretaryWeigher}}</view>
 				</view>
-				<view class="row2" v-if="item.paymentManagement">
-					<view>{{item.paymentManagement.customerName}}</view>
-					<view>{{item.paymentManagement.carNo}}</view>
-					<view>{{item.paymentManagement.goodsName}}({{item.qualityInspectionManagement.waterContent}}水)</view>
+				<view class="row2" v-if="item.qualityInspectionManagement">
+					<view>{{item.qualityInspectionManagement.customerName}}</view>
+					<view>{{item.qualityInspectionManagement.carNo}}</view>
+					<view>{{item.qualityInspectionManagement.goodsName}}({{item.qualityInspectionManagement.waterContent}}水)</view>
 				</view>
 				<view class="row3">
 					<view class="row3-item">

+ 0 - 3
pages/erpbusiness/acquisitionInspection/tareDetail.vue

@@ -67,9 +67,6 @@
 		onShow() {},
 		onLoad(options) {
 			this.detailData = JSON.parse(options.detailData)
-			if(!this.detailData.tare){
-				this.detailData.tare = 0
-			}
 			if(!this.detailData.buckleMiscellaneous){
 				this.detailData.buckleMiscellaneous = 0
 			}

+ 1 - 1
pages/erpbusiness/add_quality_testing.vue

@@ -57,7 +57,7 @@
 			<view class="c-row ">
 				<view class="title">囤位号</view>
 				<view class="con-list">
-					<input v-model='gridList.storageTagNo' placeholder="请输入囤位号"
+					<input type='number' v-model='gridList.storageTagNo' placeholder="请输入囤位号"
 						 name="input"></input>
 				</view>
 			</view>

+ 13 - 4
pages/erpbusiness/customer.vue

@@ -14,10 +14,16 @@
 		</view>
 		<view class="content">
 			<view style='padding-left:20px;color:#AFB3BF;font-size:14px;' v-if='show==false'>近期客户</view>
-			<view v-if='searchKeyWord.length>0&&show==true' class='searchwrap' v-for='item in gridList' @click='checkcustomer(item)'>
-			{{item.customerName}}({{item.customerPhone}})
+			
+			<view v-for='item in gridList'>
+				<view v-if='searchKeyWord.length>0&&show==true' class='searchwrap' @click='checkcustomer(item)'>
+				{{item.customerName}}({{item.customerPhone}})
+				</view>
 			</view>
-			<view @click='recentcustomer(item)' class='wrap' v-else>{{item.searchContent}}</view>
+			<view   v-for='item in gridList' style='display:inline-block;'>
+				<view @click='recentcustomer(item)' class='wrap' v-if='show==false'>{{item.searchContent}}</view>
+			</view>
+			
 		</view>
 		
 		<view v-show="isContent">
@@ -125,6 +131,7 @@
 			}).then(res => {
 				if(res.data.data){
 					this.gridList=res.data.data.records
+					console.log(this.gridList)
 				}
 			})
 			this.$api.doRequest('get', '/identityAuthenticationInfo/identityAuthenticationInfoCustomer',{
@@ -181,6 +188,7 @@
 							}
 						})
 						uni.setStorageSync('checkcustomer',item)
+						that.show=false
 						uni.navigateBack()
 					})
 					.catch(res => {
@@ -237,6 +245,7 @@
 									})
 								}
 							})
+							that.show=false
 							uni.navigateBack()							
 							uni.hideLoading()
 						})
@@ -791,7 +800,7 @@
 		    background: #F5F6F9;
 		    margin: 5px 10px;
 		    border-radius: 20px;
-		    width: 42%;
+		    width: 92%;
 		    display: inline-block;
 		    padding: 10px;
 	}

+ 1 - 2
pages/erpbusiness/quality_testing.vue

@@ -41,8 +41,7 @@
 						</view>
 					</view>
 					<view class="right">{{item.customer}}</view>
-					<view v-if='item.status=="已质检"' class='right'>{{item.qualityInspector}}</view>
-					<view v-else></view>
+					<view class='right'>{{item.qualityInspector}}</view>
 				</view>
 				<view class="row2" >
 					<view v-if='managementType==1'>{{item.customerName}}</view>