Explorar o código

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

wangchao %!s(int64=3) %!d(string=hai) anos
pai
achega
1f3391b142

+ 2 - 2
config/index.js

@@ -1,7 +1,7 @@
 const dev = {
 	baseUrl: 'https://www.zthymaoyi.com',
-	// baseUrlNew: 'http://192.168.1.120:8090/',
-	baseUrlNew: 'http://api1.eliangeyun.com/',
+	baseUrlNew: 'http://192.168.1.120:8090/',
+	// baseUrlNew: 'http://api1.eliangeyun.com/',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false
 }

+ 9 - 0
pages.json

@@ -883,6 +883,15 @@
 		        "enablePullDownRefresh": false
 		    }
 		    
+		},
+		{
+		    "path" : "pages/erp/exWarehousing/selectCarNo",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "选择车牌号",
+		        "enablePullDownRefresh": false
+		    }
+		    
 		}
         ,{
             "path" : "pages/erp/improvedWrehousing/improvedWrehousing",

+ 4 - 4
pages/attestation/indexTwo.vue

@@ -190,6 +190,7 @@
 				}
 			},
 			open(item) {
+				console.log(item.id)
 				this.id = item.id
 				this.pricestatus = !this.pricestatus
 			},
@@ -242,7 +243,7 @@
 					});
 			},
 			amendprice(item) {
-				this.identityAuthenticationInfo.id = item.id
+				this.identityAuthenticationInfo.id = this.id
 				this.identityAuthenticationInfo.customerPhone = this.price
 				var that = this
 				this.$api.doRequest('get', '/commonUser/loginVerifyCode', {
@@ -269,9 +270,8 @@
 																icon: 'none',
 																duration: 2000
 															})
-															uni.navigateTo({
-																url: `/pages/attestation/indexTwo`,
-															})
+															that.pricestatusTwo = false
+															that.getList()
 														}).catch(res => {
 														uni.showToast({
 															title: res.data.message,

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

@@ -224,7 +224,7 @@
 			this.cangId = options.cangId
 		},
 		onShow() {
-			let _data = uni.getStorageSync('erpContractNoCK')==''?{}:uni.getStorageSync('erpContractNoCK')
+			let _data = uni.getStorageSync('erpContractNoCK') == '' ? {} : uni.getStorageSync('erpContractNoCK')
 			this.binNumber = helper.erpWarehouse.binNumber
 			this.warehouseName = helper.erpWarehouse.warehouseName
 			this.detailData.goodsName = _data.goodsName;
@@ -232,18 +232,23 @@
 				this.detailData.contractNo = _data.contractNo;
 			}
 			this.detailData.goodsNameKey = _data.goodsNameKey;
-			this.detailData.carNo = uni.getStorageSync('erpcarNoCK')
 			if (!_data.tranCarInfoList) {
 				this.isPC = false
 				_data.tranCarInfoList = []
 			} else {
 				this.isPC = true
-				if (uni.getStorageSync('ContractNoCar')) {
-					this.detailData.carNo = uni.getStorageSync('ContractNoCar')
+				if (uni.getStorageSync('ContractNoCarCK')) {
+					this.detailData.carNo = uni.getStorageSync('ContractNoCarCK')
 				} else {
 					this.detailData.carNo = _data.tranCarInfoList[0].carNo
 				}
 			}
+			if (this.detailData.carNo) {
+				for (let i = 0; i < uni.getStorageSync('erpContractNoCK').tranCarInfoList.length; i++) {
+					if (uni.getStorageSync('erpContractNoCK').tranCarInfoList[i].carNo == this.detailData.carNo)
+						this.detailData.tranCarNo = uni.getStorageSync('erpContractNoCK').tranCarInfoList[i].tranCarNo
+				}
+			}
 			if (!this.detailData.contractNo) {
 				this.detailData.contractNo = '请选择合同编号'
 			} else {
@@ -259,7 +264,7 @@
 			this.detailData.inOutDate = _day.getFullYear() + "-" + (_day.getMonth() + 1) + "-" + _day.getDate();
 			//出库类型
 			this.outWarehouse()
-			if(helper.erpWarehouse.personCharge){
+			if (helper.erpWarehouse.personCharge) {
 				this.detailData.agent = helper.erpWarehouse.personCharge
 			}
 			//经办人
@@ -298,7 +303,7 @@
 				this.detailData.type = this.typeList[e].type
 			},
 			pjPicker(e) {
-				this.detailData.gradeKey = e[0]
+				this.detailData.gradeKey = e[0] + 1
 				this.detailData.grade = this.pjList[e].type
 			},
 			handlerPicker(e) {
@@ -310,6 +315,17 @@
 			},
 			warehousingTypePicker(e) {
 				this.detailData.inOutType = this.warehousingTypeList[e].constValue
+				if (this.detailData.inOutType == '销售出库') {
+					this.detailData.inOutTypeKey = 1
+				} else if (this.detailData.inOutType == '移库出库') {
+					this.detailData.inOutTypeKey = 3
+				} else if (this.detailData.inOutType == '暂存出库') {
+					this.detailData.inOutTypeKey = 4
+				} else if (this.detailData.inOutType == '贸易服务出库') {
+					this.detailData.inOutTypeKey = 5
+				} else if (this.detailData.inOutType == '采购出库') {
+					this.detailData.inOutTypeKey = 6
+				}
 			},
 			filterFileType(index, lists) {
 				if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
@@ -362,7 +378,7 @@
 						String(this.detailData.grossWeight).length -
 						(String(this.detailData.grossWeight).indexOf('.') + 1) >
 						3) ||
-					this.detailData.grossWeight < 1 ||
+					this.detailData.grossWeight < 0 ||
 					this.detailData.grossWeight > 10000
 				) {
 					this.$api.msg('毛重输入错误!')
@@ -377,13 +393,14 @@
 						String(this.detailData.tare).length -
 						(String(this.detailData.tare).indexOf('.') + 1) >
 						3) ||
-					this.detailData.tare < 1 ||
+					this.detailData.tare < 0 ||
 					this.detailData.tare > 10000
 				) {
 					this.$api.msg('皮重输入错误!')
 					return
 				}
-				if (Number(this.detailData.tare ) > Number(this.detailData.grossWeight)) {
+				if (Number(this.detailData.tare) > Number(this.detailData.grossWeight)) {
+
 					this.$api.msg('皮重不能大于毛重')
 					return
 				}
@@ -432,7 +449,7 @@
 							(String(this.detailData.tidalGrainWater).indexOf('.') + 1) >
 							1) ||
 						this.detailData.tidalGrainWater < 1 ||
-						this.detailData.tidalGrainWater > 40	
+						this.detailData.tidalGrainWater > 40
 					) {
 						this.$api.msg('潮粮水分输入错误!')
 						return
@@ -490,15 +507,16 @@
 					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('热损伤占比输入错误')
+							this.$api.msg('水分占比输入错误')
 							return
 						}
+
+					}
+					if (String(this.detailData.warehouseInOutDetail.waterContent).indexOf('.') != -1 && String(this
+							.detailData.warehouseInOutDetail.waterContent).length - (String(
+							this.detailData.warehouseInOutDetail.waterContent).indexOf('.') + 1) > 1) {
+						this.$api.msg('水分占比输入错误')
+						return
 					}
 				}
 				if (this.detailData.warehouseInOutDetail.bulkDensity) {
@@ -586,6 +604,8 @@
 					title = "暂存成功"
 				} else if (num == 2) {
 					this.detailData.statusFlag = 3
+					this.detailData.backOffice = this.userInfo.userName
+					this.detailData.backOfficeId = this.userInfo.id
 					title = "提交成功"
 				}
 				let that = this
@@ -595,12 +615,13 @@
 						if (res.confirm) {
 							that.$api.doRequest('post', '/warehouseInOutInfo/InOutWarehouse',
 								that.detailData).then(res => {
+									console.log(res,"报异常")
 								if (res.data.code == 200) {
 									that.$api.msg(title)
 									setTimeout(() => {
 										uni.navigateBack()
 									}, 1000)
-								}else{
+								} else {
 									that.$api.msg(res.data.message)
 								}
 							})
@@ -710,10 +731,12 @@
 	}
 
 	.bottom-btn {
+		padding: 30rpx;
+		background: #FFFFFF;
 		width: 92%;
 		position: fixed;
-		bottom: 40rpx;
+		bottom: 0rpx;
 		display: flex;
-		z-index: 2;
+		z-index: 9999;
 	}
 </style>

+ 13 - 22
pages/erp/exWarehousing/selectCarNo.vue

@@ -4,16 +4,16 @@
 			<u-search placeholder="输入车牌号" :show-action="false" v-model="inputKeyword"></u-search>
 		</view>
 		<view class="content2" v-if="!inputKeyword">
-			<view class="title">编号123456789可选车牌号如下:</view>
+			<view class="title">编号{{contractNo}}可选车牌号如下:</view>
 			<view class="item-contnet">
 				<view class="item-list" v-for="(item,index) in newList" :key="index" @click="confirm(item)">
-					{{item.contractNo}}
+					{{item.carNo}}({{item.tranCarNo}})
 				</view>
 			</view>
 		</view>
 		<view class="content3" v-if="inputKeyword">
 			<view class="search-item-list" v-for="(item,index) in filterNewList" :key="index" @click="confirm(item)">
-				{{item.contractNo}}
+				{{item.carNo}}
 			</view>
 		</view>
 	</view>
@@ -27,19 +27,21 @@
 				inputKeyword: '',
 				newList: [],
 				filterNewList: [],
-				compId: ''
+				compId: '',
+				contractNo:''
 			}
 		},
-		onShow() {},
+		onShow() {
+			this.newList = uni.getStorageSync('erpContractNoCK').tranCarInfoList
+			this.contractNo = uni.getStorageSync('erpContractNoCK').contractNo
+		},
 		onLoad(options) {
-			this.compId = options.compId
-			console.log(helper.selectContractNo); 
-			this.getContractNoList()
+			
 		},
 		watch: {
 			inputKeyword(val) {
 				this.filterNewList = this.newList.filter(function(item) {
-					if (item.contractNo.indexOf(val) > -1) {
+					if (item.carNo.indexOf(val) > -1) {
 						return item
 					}
 				})
@@ -47,21 +49,10 @@
 		},
 		methods: {
 			confirm(item){
-				uni.setStorageSync('ContractNo', item);
-				uni.setStorageSync('ContractNoCar',item.carNo);
+				uni.setStorageSync('erpcarNoListCK', item);
+				uni.setStorageSync('ContractNoCarCK',item.carNo);
 				uni.navigateBack({})
 			},
-			getContractNoList() {
-				this.$api.doRequest('get', '/warehouseBaseInfo/selectContractNoList', {
-					compId: this.compId,
-					flag: 5,
-				}).then(res => {
-					if (res.data.code == 200) {
-						console.log(res)
-						this.newList = res.data.data
-					}
-				})
-			},
 		}
 	}
 </script>

+ 60 - 25
pages/erp/improvedExWaehousing/improvedExWaehousingDetail.vue

@@ -80,8 +80,11 @@
 				</u-picker>
 			</view>
 			<view class="row row-bottom">
+			<!-- 	<view class="left">车牌号</view>
+				<input v-model='detailData.carNo' class="right-bottom" placeholder="请输入车牌号"></input> -->
 				<view class="left">车牌号</view>
-				<input v-model='detailData.carNo' class="right-bottom" placeholder="请输入车牌号"></input>
+				<input v-if="!isPC" v-model='detailData.carNo' class="right-bottom" placeholder="请输入车牌号"></input>
+				<view @click='slectCarNo' v-if="isPC">{{detailData.carNo}}</view>
 			</view>
 		</view>
 		<view class="content2">
@@ -158,9 +161,7 @@
 				show5: false,
 				show6: false,
 				show7: false,
-				contractNoList: [{
-					contractNo: ""
-				}],
+				isPC:true,
 				typeList: [{
 						type: "干粮"
 					},
@@ -219,16 +220,18 @@
 		onLoad(options) {
 			this.detailData = JSON.parse(options.data)
 			this.netWeight = this.detailData.netWeight
-			this.imgUrl.push({
+			if(this.detailData.addressUrl){
+				this.imgUrl.push({
 				url: this.detailData.addressUrl.split(",")[0]
 			})
+			}
 			this.cangId = options.cangId
 		},
 		onShow() {
 			this.binNumber = helper.erpWarehouse.binNumber
 			this.warehouseName = helper.erpWarehouse.warehouseName
-			this.detailData.goodsName = uni.getStorageSync('erpContractNo').goodsName;
-			this.detailData.contractNo = uni.getStorageSync('erpContractNo').contractNo;
+			// this.detailData.goodsName = uni.getStorageSync('erpContractNo').goodsName;
+			// this.detailData.contractNo = uni.getStorageSync('erpContractNo').contractNo;
 			this.detailData.goodsNameKey = uni.getStorageSync('erpContractNo').goodsNameKey;
 			if (!this.detailData.contractNo) {
 				this.detailData.contractNo = '请选择合同编号'
@@ -236,6 +239,24 @@
 			if (!this.detailData.goodsName) {
 				this.detailData.goodsName = '货名'
 			}
+			let _data = uni.getStorageSync('erpContractNoCK') == '' ? {} : uni.getStorageSync('erpContractNoCK')
+			if (!_data.tranCarInfoList) {
+				this.isPC = false
+				_data.tranCarInfoList = []
+			} else {
+				this.isPC = true
+				if (uni.getStorageSync('ContractNoCarCK')) {
+					this.detailData.carNo = uni.getStorageSync('ContractNoCarCK')
+				} else {
+					this.detailData.carNo = _data.tranCarInfoList[0].carNo
+				}
+			}
+			if(this.detailData.carNo){
+				for(let i = 0 ; i < uni.getStorageSync('erpContractNoCK').tranCarInfoList.length ;i++){
+					if(uni.getStorageSync('erpContractNoCK').tranCarInfoList[i].carNo == this.detailData.carNo)
+					this.detailData.tranCarNo = uni.getStorageSync('erpContractNoCK').tranCarInfoList[i].tranCarNo
+				}
+			}
 			//出库类型
 			this.outWarehouse()
 			//经办人
@@ -286,6 +307,18 @@
 			},
 			warehousingTypePicker(e) {
 				this.detailData.inOutType = this.warehousingTypeList[e].constValue
+				if (this.detailData.inOutType == '销售出库') {
+					this.detailData.inOutTypeKey = 1
+				} else if (this.detailData.inOutType == '移库出库') {
+					this.detailData.inOutTypeKey = 3
+				} else if (this.detailData.inOutType == '暂存出库') {
+					this.detailData.inOutTypeKey = 4
+				} else if (this.detailData.inOutType == '贸易服务出库') {
+					this.detailData.inOutTypeKey = 5
+				} else if (this.detailData.inOutType == '采购出库') {
+					this.detailData.inOutTypeKey = 6
+				}
+				
 			},
 			filterFileType(index, lists) {
 				if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
@@ -328,8 +361,6 @@
 					this.$api.msg('货名不能为空')
 					return
 				}
-
-
 				if (!this.detailData.grossWeight) {
 					this.$api.msg('毛重不能为空')
 					return
@@ -338,9 +369,9 @@
 					(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
+						3) ||
+					this.detailData.grossWeight < 0 ||
+					this.detailData.grossWeight > 10000
 				) {
 					this.$api.msg('毛重输入错误!')
 					return
@@ -353,9 +384,9 @@
 					(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
+						3) ||
+					this.detailData.tare < 0 ||
+					this.detailData.tare > 10000
 				) {
 					this.$api.msg('皮重输入错误!')
 					return
@@ -414,7 +445,7 @@
 						this.$api.msg('潮粮水分输入错误!')
 						return
 					}
-					if (this.detailData.tidalGrainWater < this.detailData.solidGrainWater) {
+					if (this.detailData.tidalGrainWater <= this.detailData.solidGrainWater) {
 						this.$api.msg('潮粮水分输入错误!')
 						return
 					}
@@ -467,16 +498,16 @@
 					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('热损伤占比输入错误')
+							this.$api.msg('水分占比输入错误')
 							return
 						}
 					}
+					if (String(this.detailData.warehouseInOutDetail.waterContent).indexOf('.') != -1 && String(this
+							.detailData.warehouseInOutDetail.waterContent).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
@@ -563,6 +594,8 @@
 					title = "暂存成功"
 				} else if (num == 2) {
 					this.detailData.statusFlag = 3
+					this.detailData.backOffice = this.userInfo.userName
+					this.detailData.backOfficeId = this.userInfo.id
 					title = "提交成功"
 				}
 				let that = this
@@ -687,10 +720,12 @@
 	}
 
 	.bottom-btn {
+	    padding: 30rpx;
+		background: #FFFFFF;
 		width: 92%;
 		position: fixed;
-		bottom: 40rpx;
+		bottom: 0rpx;
 		display: flex;
-		z-index: 2;
+		z-index: 9999;
 	}
 </style>

+ 31 - 12
pages/erp/improvedWrehousing/improvedWrehousingDetail.vue

@@ -242,6 +242,7 @@
 		},
 		onLoad(options) {
 			this.detailData = JSON.parse(options.data)
+			this.netWeight = this.detailData.netWeight
 			this.binNumber = this.detailData.binNumber
 			this.warehouseName = this.detailData.warehouseName
 			this.compId = helper.erpWarehouse.compId
@@ -291,15 +292,16 @@
 					this.detailData.carNo = _data.tranCarInfoList[0].carNo
 				}
 			}
-			
-			
-			
-			
+			if(this.detailData.carNo){
+				for(let i = 0 ; i < uni.getStorageSync('erpContractNo').tranCarInfoList.length ;i++){
+					if(uni.getStorageSync('erpContractNo').tranCarInfoList[i].carNo == this.detailData.carNo)
+					this.detailData.tranCarNo = uni.getStorageSync('erpContractNo').tranCarInfoList[i].tranCarNo
+				}
+			}
 			// 获取入库类型
 			this.getrkType()
 			//获取经办人
 			this.getPerson()
-			console.log(this.detailData)
 		},
 		watch: {
 			netWeight: function(v) {
@@ -349,6 +351,21 @@
 			},
 			warehousingTypePicker(e) {
 				this.detailData.inOutType = this.warehousingTypeList[e].constValue
+				if (this.detailData.inOutType == '采购入库') {
+					this.detailData.inOutTypeKey = 1
+				} else if (this.detailData.inOutType == '移库入库') {
+					this.detailData.inOutTypeKey = 3
+				} else if (this.detailData.inOutType == '暂存入库') {
+					this.detailData.inOutTypeKey = 4
+				} else if (this.detailData.inOutType == '贸易服务入库') {
+					this.detailData.inOutTypeKey = 5
+				} else if (this.detailData.inOutType == '退库') {
+					this.detailData.inOutTypeKey = 6
+				}
+				let _data = uni.getStorageSync('erpContractNo')==''?{}:uni.getStorageSync('erpContractNo')
+				if (this.detailData.inOutType == '采购入库') {
+					this.detailData.freight = 0
+				}else{this.detailData.freight = uni.getStorageSync('CarFreight')}
 			},
 			filterFileType(index, lists) {
 				if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
@@ -614,16 +631,16 @@
 					if (this.detailData.warehouseInOutDetail.waterContent < 0 || this.detailData
 						.warehouseInOutDetail
 						.waterContent > 40) {
-						this.$api.msg('热损伤占比输入错误')
+						this.$api.msg('水分占比输入错误')
 						return
 					}
-					if (String(this.detailData.warehouseInOutDetail.waterContent).indexOf('.') != -1 && String(this
-							.detailData.warehouseInOutDetail.jiaorenli).length - (String(
+				}
+				if (String(this.detailData.warehouseInOutDetail.waterContent).indexOf('.') != -1 && String(this
+							.detailData.warehouseInOutDetail.waterContent).length - (String(
 							this.detailData.warehouseInOutDetail.waterContent).indexOf('.') + 1) > 1) {
-						this.$api.msg('热损伤占比输入错误')
+						this.$api.msg('水分占比输入错误')
 						return
 					}
-				}
 			}
 			if (this.detailData.warehouseInOutDetail.bulkDensity) {
 				if (this.detailData.warehouseInOutDetail.bulkDensity < 500 || this.detailData.warehouseInOutDetail
@@ -838,10 +855,12 @@
 	}
 
 	.bottom-btn {
+		padding: 30rpx;
+		background: #FFFFFF;
 		width: 92%;
 		position: fixed;
-		bottom: 40rpx;
+		bottom: 0rpx;
 		display: flex;
-		z-index: 2;
+		z-index: 9999;
 	}
 </style>

+ 0 - 2
pages/erp/index.vue

@@ -272,7 +272,6 @@
 							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
@@ -285,7 +284,6 @@
 							this.baseId = res.data.data[0].positionInfos[0].baseId
 							this.positionId = res.data.data[0].positionInfos[0].id
 							this.personCharge = res.data.data[0].personCharge
-							console.log('this.warehouseCWList', this.warehouseCWList)
 						}
 
 					} else {

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

@@ -33,7 +33,6 @@
 		},
 		onShow() {
 			this.newList = uni.getStorageSync('erpContractNo').tranCarInfoList
-			console.log(this.newList,"List")
 			this.contractNo = uni.getStorageSync('erpContractNo').contractNo
 		},
 		onLoad(options) {

+ 0 - 8
pages/erp/warehousing/selectContractNo.vue

@@ -41,22 +41,16 @@
 				flag:""
 			}
 		},
-
-		// onShow() {},
-		// onLoad(options) {
-
 		onShow() {
 			this.newSelectList =  uni.getStorageSync('erpContractNoList');
 		},
 		onLoad(options) {
 			this.flag = options.flag
 			this.compId = helper.erpWarehouse.compId 
-			console.log(helper.selectContractNo); 
 			this.getContractNoList()
 		},
 		watch: {
 			inputKeyword(val) {
-				console.log(this.newList)
 				this.filterNewList = this.newList.filter(function(item) {
 					if (item.contractNo.indexOf(val) > -1) {
 						return item
@@ -113,9 +107,7 @@
 						}
 					})
 				}
-				
 			},
-		
 		}
 	}
 </script>

+ 42 - 19
pages/erp/warehousing/warehousing.vue

@@ -264,8 +264,8 @@
 			this.detailData.inOutDate = _day.getFullYear() + "-" + (_day.getMonth() + 1) + "-" + _day.getDate();
 			if (_data.inOutType == '采购入库') {
 				this.detailData.freight = 0
-			}
-				this.detailData.freight = uni.getStorageSync('CarFreight')
+			}else{this.detailData.freight = uni.getStorageSync('CarFreight')}
+				
 			if (!_data.tranCarInfoList){
 				this.isPC = false
 				this.detailData.carNo = ""
@@ -287,6 +287,12 @@
 					this.detailData.carNo = _data.tranCarInfoList[0].carNo
 				}
 			}
+			if(this.detailData.carNo){
+				for(let i = 0 ; i < uni.getStorageSync('erpContractNo').tranCarInfoList.length ;i++){
+					if(uni.getStorageSync('erpContractNo').tranCarInfoList[i].carNo == this.detailData.carNo)
+					this.detailData.tranCarNo = uni.getStorageSync('erpContractNo').tranCarInfoList[i].tranCarNo
+				}
+			}
 			if (!this.detailData.contractNo) {
 				this.detailData.contractNo = '请选择合同编号'
 			}
@@ -338,12 +344,9 @@
 			typePicker(e) {
 				console.log(e)
 				this.detailData.type = this.typeList[e].type
-
-
 			},
 			pjPicker(e) {
-				console.log(e)
-				this.detailData.gradeKey = e[0]
+				this.detailData.gradeKey = e[0]+1
 				this.detailData.grade = this.pjList[e].grade
 			},
 			handlerPicker(e) {
@@ -357,6 +360,22 @@
 			},
 			warehousingTypePicker(e) {
 				this.detailData.inOutType = this.warehousingTypeList[e].constValue
+				if (this.detailData.inOutType == '采购入库') {
+					this.detailData.inOutTypeKey = 1
+				} else if (this.detailData.inOutType == '移库入库') {
+					this.detailData.inOutTypeKey = 3
+				} else if (this.detailData.inOutType == '暂存入库') {
+					this.detailData.inOutTypeKey = 4
+				} else if (this.detailData.inOutType == '贸易服务入库') {
+					this.detailData.inOutTypeKey = 5
+				} else if (this.detailData.inOutType == '退库') {
+					this.detailData.inOutTypeKey = 6
+				}
+				let _data = uni.getStorageSync('erpContractNo')==''?{}:uni.getStorageSync('erpContractNo')
+				if (this.detailData.inOutType == '采购入库') {
+					this.detailData.freight = 0
+				}else{this.detailData.freight = uni.getStorageSync('CarFreight')}
+				
 			},
 			filterFileType(index, lists) {
 				if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
@@ -442,9 +461,9 @@
 					(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
+						3) ||
+					this.detailData.grossWeight < 0 ||
+					this.detailData.grossWeight > 10000
 				) {
 					this.$api.msg('毛重输入错误!')
 					return
@@ -459,7 +478,7 @@
 						(String(this.detailData.tare).indexOf('.') + 1) >
 						3) ||
 					this.detailData.tare < 0 ||
-					this.detailData.tare > 10
+					this.detailData.tare > 100000
 				) {
 					this.$api.msg('皮重输入错误!')
 					return
@@ -475,7 +494,7 @@
 						(String(this.detailData.deductionWeight).indexOf('.') + 1) >
 						1) ||
 					this.detailData.deductionWeight < 1 ||
-					this.detailData.deductionWeight > 100000
+					this.detailData.deductionWeight > 10
 				) {
 					this.$api.msg('扣重输入错误!')
 					return
@@ -499,7 +518,7 @@
 							(String(this.detailData.buckleWeightRatio).indexOf('.') + 1) >
 							2) ||
 						this.detailData.buckleWeightRatio < 0 ||
-						this.detailData.buckleWeightRatio > 2
+						this.detailData.buckleWeightRatio > 3
 					) {
 						this.$api.msg('扣重比输入错误!')
 						return
@@ -549,7 +568,7 @@
 						this.$api.msg('潮粮水分输入错误!')
 						return
 					}
-					if (this.detailData.tidalGrainWater < this.detailData.solidGrainWater) {
+					if (this.detailData.tidalGrainWater <= this.detailData.solidGrainWater) {
 						this.$api.msg('潮粮水分输入错误!')
 						return
 					}
@@ -622,16 +641,17 @@
 						if (this.detailData.warehouseInOutDetail.waterContent < 0 || this.detailData
 							.warehouseInOutDetail
 							.waterContent > 40) {
-							this.$api.msg('热损伤占比输入错误')
+							this.$api.msg('水分占比输入错误')
 							return
 						}
+					}
 						if (String(this.detailData.warehouseInOutDetail.waterContent).indexOf('.') != -1 && String(this
-								.detailData.warehouseInOutDetail.jiaorenli).length - (String(
+								.detailData.warehouseInOutDetail.waterContent).length - (String(
 								this.detailData.warehouseInOutDetail.waterContent).indexOf('.') + 1) > 1) {
-							this.$api.msg('热损伤占比输入错误')
+							this.$api.msg('水分占比输入错误')
 							return
 						}
-					}
+					
 				}
 				if (this.detailData.warehouseInOutDetail.bulkDensity) {
 					if (this.detailData.warehouseInOutDetail.bulkDensity < 500 || this.detailData.warehouseInOutDetail
@@ -722,6 +742,7 @@
 					this.detailData.statusFlag = 3
 					title = "提交成功"
 				}
+				return
 				let that = this
 				uni.showModal({
 					content: "确定提交入库信息?",
@@ -848,10 +869,12 @@
 	}
 
 	.bottom-btn {
+		padding: 30rpx;
+		background: #FFFFFF;
 		width: 92%;
 		position: fixed;
-		bottom: 40rpx;
+		bottom: 0rpx;
 		display: flex;
-		z-index: 2;
+		z-index: 9999;
 	}
 </style>