瀏覽代碼

前端 小程序 缺陷更新sdy

zhongtianhaoyuan 3 年之前
父節點
當前提交
303cc3c19e

+ 9 - 0
pages.json

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

+ 20 - 17
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,14 +232,14 @@
 				this.detailData.contractNo = _data.contractNo;
 			}
 			this.detailData.goodsNameKey = _data.goodsNameKey;
-			this.detailData.carNo = uni.getStorageSync('erpcarNoCK')
+			// 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
 				}
@@ -259,7 +259,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
 			}
 			//经办人
@@ -382,8 +382,8 @@
 				) {
 					this.$api.msg('皮重输入错误!')
 					return
-				}debugger
-				if (Number(this.detailData.tare ) > Number(this.detailData.grossWeight)) {
+				}
+				if (Number(this.detailData.tare) > Number(this.detailData.grossWeight)) {
 					this.$api.msg('皮重不能大于毛重')
 					return
 				}
@@ -490,15 +490,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) {
@@ -600,7 +601,7 @@
 									setTimeout(() => {
 										uni.navigateBack()
 									}, 1000)
-								}else{
+								} else {
 									that.$api.msg(res.data.message)
 								}
 							})
@@ -710,10 +711,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>

+ 34 - 19
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,18 @@
 			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
+				}
+			}
 			//出库类型
 			this.outWarehouse()
 			//经办人
@@ -328,8 +343,6 @@
 					this.$api.msg('货名不能为空')
 					return
 				}
-
-
 				if (!this.detailData.grossWeight) {
 					this.$api.msg('毛重不能为空')
 					return
@@ -379,7 +392,7 @@
 							(String(this.detailData.buckleWeightRatio).indexOf('.') + 1) >
 							2) ||
 						this.detailData.buckleWeightRatio < 0 ||
-						this.detailData.buckleWeightRatio > 2
+						this.detailData.buckleWeightRatio > 10
 					) {
 						this.$api.msg('扣重比输入错误!')
 						return
@@ -467,16 +480,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
@@ -687,10 +700,12 @@
 	}
 
 	.bottom-btn {
+	    padding: 30rpx;
+		background: #FFFFFF;
 		width: 92%;
 		position: fixed;
-		bottom: 40rpx;
+		bottom: 0rpx;
 		display: flex;
-		z-index: 2;
+		z-index: 9999;
 	}
 </style>

+ 14 - 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,10 @@
 					this.detailData.carNo = _data.tranCarInfoList[0].carNo
 				}
 			}
-			
-			
-			
-			
 			// 获取入库类型
 			this.getrkType()
 			//获取经办人
 			this.getPerson()
-			console.log(this.detailData)
 		},
 		watch: {
 			netWeight: function(v) {
@@ -349,6 +345,10 @@
 			},
 			warehousingTypePicker(e) {
 				this.detailData.inOutType = this.warehousingTypeList[e].constValue
+				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 +614,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 +838,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>

+ 19 - 12
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 = ""
@@ -338,8 +338,6 @@
 			typePicker(e) {
 				console.log(e)
 				this.detailData.type = this.typeList[e].type
-
-
 			},
 			pjPicker(e) {
 				console.log(e)
@@ -357,6 +355,11 @@
 			},
 			warehousingTypePicker(e) {
 				this.detailData.inOutType = this.warehousingTypeList[e].constValue
+				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') {
@@ -459,7 +462,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 +478,7 @@
 						(String(this.detailData.deductionWeight).indexOf('.') + 1) >
 						1) ||
 					this.detailData.deductionWeight < 1 ||
-					this.detailData.deductionWeight > 100000
+					this.detailData.deductionWeight > 10
 				) {
 					this.$api.msg('扣重输入错误!')
 					return
@@ -622,16 +625,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 +726,7 @@
 					this.detailData.statusFlag = 3
 					title = "提交成功"
 				}
+				return
 				let that = this
 				uni.showModal({
 					content: "确定提交入库信息?",
@@ -848,10 +853,12 @@
 	}
 
 	.bottom-btn {
+		padding: 30rpx;
+		background: #FFFFFF;
 		width: 92%;
 		position: fixed;
-		bottom: 40rpx;
+		bottom: 0rpx;
 		display: flex;
-		z-index: 2;
+		z-index: 9999;
 	}
 </style>