Selaa lähdekoodia

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

ccjgmwz 3 vuotta sitten
vanhempi
commit
8dbfcddf63

+ 3 - 1
.gitignore

@@ -1,10 +1,12 @@
 HELP.md
-config/
+
 target/
 !.mvn/wrapper/maven-wrapper.jar
 !**/src/main/**
 !**/src/test/**
 
+config/
+
 ### STS ###
 .apt_generated
 .classpath

+ 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://api.eliangeyun.com/',
+	baseUrlNew: 'http://192.168.1.120:8090/',
+	// baseUrlNew: 'http://api.eliangeyun.com/',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false
 }

+ 26 - 17
pageA/freightTransport/addpaygoods.vue

@@ -1,12 +1,14 @@
 <template>
 	<view class="container">
 		<view class="information">
-			<u-form :model="userInfo" ref="uForm" class="uForm">
+			<u-form :model="user" ref="uForm" class="uForm">
 				<u-form-item label="收货人姓名" prop="receiveName" label-width="160" required>
-					<u-input v-model="userInfo.receiveName" :disabled="recipientsNumber?true:false" input-align="right" placeholder="请输入收货人姓名" />
+					<u-input v-model="user.receiveName" :disabled="recipientsNumber?true:false" input-align="right"
+						placeholder="请输入收货人姓名" />
 				</u-form-item>
 				<u-form-item label="收货人手机号" prop="receivePhone" label-width="180" required>
-					<u-input v-model="userInfo.receivePhone" :disabled="recipientsNumber?true:false" input-align="right" placeholder="请输入收货人注册易粮易运的手机号" />
+					<u-input v-model="user.receivePhone" :disabled="recipientsNumber?true:false" input-align="right"
+						placeholder="请输入收货人注册易粮易运的手机号" />
 				</u-form-item>
 
 			</u-form>
@@ -14,13 +16,13 @@
 		<button class="submit-btn" @click="submit" v-if="!recipientsNumber">提交</button>
 		<button class="submit-btn btn-bgccolor" v-if="recipientsNumber">人数已达上限</button>
 		<view class="c-row">
-			<view class="">全部收货人({{dataList.receivingUsers.length}})</view>
+			<view class="">全部收货人({{dataList.receivingUsers.length+1}})</view>
 		</view>
 		<view class="c-row">
-			<view class="title">我的用户昵称</view>
-				<view class="phone">
-					{{dataList.accountNumber}}
-				</view>
+			<view class="title">{{dataList.consignee}}</view>
+			<view class="phone">
+				{{dataList.accountNumber}}
+			</view>
 		</view>
 		<view class="information" v-for="(item,index) in dataList.receivingUsers">
 			<view class="c-row">
@@ -45,7 +47,8 @@
 		name: "trust",
 		data() {
 			return {
-				userInfo: {
+				id:"",
+				user: {
 					compId: "",
 					infoId: "",
 					receiveName: "",
@@ -88,7 +91,7 @@
 
 					]
 				},
-				recipientsNumber:false
+				recipientsNumber: false
 			}
 		},
 		computed: {
@@ -99,8 +102,9 @@
 			this.$refs.uForm.setRules(this.rules);
 		},
 		onLoad(option) {
-			this.userInfo.infoId = option.id;
+			this.user.infoId = option.id;
 			this.getDetail(option.id);
+			this.id = option.id
 
 		},
 		methods: {
@@ -120,7 +124,11 @@
 
 					if (res.data.code == 200) {
 						this.dataList = res.data.data
-						if(this.dataList.length>=20) this.recipientsNumber = true
+						this.dataList.receivingUsers = this.dataList.receivingUsers ? this.dataList
+							.receivingUsers : []
+						if (this.dataList.receivingUsers.length > 20) this.recipientsNumber = true
+
+
 						console.log("this.dataList----------------------")
 						console.log(this.dataList)
 					} else {
@@ -141,14 +149,14 @@
 				this.$refs.uForm.validate(valid => {
 					if (valid) {
 						that.$api.doRequest('post', '/freightReceivingDispatching/api/insertReceivingUser', this
-							.userInfo).then(res => {
+							.user).then(res => {
 							if (res.data.code == 200) {
 								uni.showToast({
 									title: '提交成功',
 									icon: 'none',
 									duration: 2000,
 									success: function() {
-										
+										this.getDetail(that.id);
 									}
 								})
 
@@ -184,7 +192,7 @@
 					confirmText: "删除",
 					success: function(res) {
 						if (res.confirm) {
-							that.$api.doRequest('post','/receivingUser/deleteInfo', {
+							that.$api.doRequest('post', '/receivingUser/deleteInfo', {
 								"id": val.id
 							}).then(res => {
 								if (res.data.code == 200) {
@@ -193,7 +201,7 @@
 										icon: 'none',
 										duration: 2000,
 										success: function() {
-											that.getDetail(that.userInfo.infoId)
+											that.getDetail(that.user.infoId)
 										}
 									})
 
@@ -300,7 +308,8 @@
 		font-weight: 500;
 		color: #FFFFFF;
 	}
-	.btn-bgccolor{
+
+	.btn-bgccolor {
 		background: #D8DAE0;
 	}
 </style>

+ 15 - 12
pageA/freightTransport/confirmpaygoods.vue

@@ -86,6 +86,14 @@
 							message: '数值类型,1-100之间',
 							trigger: ['change', 'blur'],
 						},
+						// {
+						// 	validator: (rule, value, callback) => {
+						// 		if(parseInt(value)>this.goods.reciveNetWeight) return false
+						// 		return true
+						// 	},
+						// 	message: '收货毛重不能大于发货净重',
+						// 	trigger: ['change', 'blur'],
+						// },
 
 					],
 					reciveTare: [{
@@ -133,14 +141,7 @@
 				show: false,
 				goodsName: '',
 				verifyCode: '',
-				sendText0: '获取验证码',
-				sendText1: '获取验证码',
-				sendText2: '获取验证码',
-				sendText3: '获取验证码',
-				sendDisabled0: false,
-				sendDisabled1: false,
-				sendDisabled2: false,
-				sendDisabled3: false,
+			
 				buyer: '',
 				buyerPhone: '',
 				level: '',
@@ -192,7 +193,7 @@
 		onReady() {
 			this.$refs.uForm.setRules(this.rules);
 		},
-		onLoad(options) {debugger
+		onLoad(options) {
 			this.goods = JSON.parse(options.toINfo)
 			this.id = options.id;
 			this.goods.reciveCollectionScreenshot = this.goods.reciveCollectionScreenshot == null ? '':this.goods.reciveCollectionScreenshot
@@ -260,6 +261,9 @@
 					content: '确定提交收货信息?',
 					success: function(res) {
 						if (res.confirm) {
+							that.goods.reciveGrossWeight = parseInt(that.goods.reciveGrossWeight)
+							that.goods.reciveTare = parseInt(that.goods.reciveTare)
+							
 							that.$api.doRequest('post',
 									'/freightReceivingDispatching/api/confirmFreightReceivingDispatchingCar',
 									that.goods).then(
@@ -271,10 +275,9 @@
 												success: function(res) {
 													if (res.confirm) {
 														that.$store.commit(
-															'configfreightTransport', true)
+															'configfreightTransport', false)
 														uni.navigateTo({
-															url: `/pageA/freightTransport/record/payrecord?id=` +
-																this.id
+															url: `/pageA/freightTransport/record/payrecord?id=` +that.id
 														})
 														// var result = that.goods.tranCarNo.substr(
 														// 	that.goods.tranCarNo.indexOf("C") +

+ 4 - 9
pageA/freightTransport/contract_detail.vue

@@ -251,14 +251,7 @@
 																tranCarNo: ''
 															}
 														} else if (res.cancel) {
-
-															// uni.navigateBack({
-															// 	delta: 1,
-															// 	success: function() {
-															// 		beforePage.$vm.init(); 
-															// 	}
-															// });
-														}
+													}
 													}
 												});
 											} else if (res.data.code == 11015) {
@@ -291,7 +284,9 @@
 							});
 
 						} else if (res.cancel) {
-
+						uni.navigateTo({
+							url: '/pageA/freightTransport/record/sendrecord?id=' + that.goods.batch
+						})
 						}
 					}
 				});

+ 41 - 27
pageA/freightTransport/index.vue

@@ -14,11 +14,11 @@
 			</view>
 			<view class="" v-if="!isShowNoData">
 				<view v-for="(item,index) in listData" :key="index">
-					<view @click='sendreceiverecord(item)' class="guess-section">
+					<view @click.stop='sendreceiverecord(item)' class="guess-section">
 						<view class="list-item">
 							<view class="list-item-left">
-								<view class='type send' v-if="item.status=='发货'">发</view>
-								<view class='type put' v-if="item.status=='收货'">收</view>
+								<view class='type send' v-if="item.shipperPhone==userInfo.phone">发</view>
+								<view class='type put' v-if="item.shipperPhone!=userInfo.phone">收</view>
 								<view class="number">
 									<view class='businessnumber'>{{item.businessNumber}}</view>
 									<view class='consigner'>{{item.consignee}}</view>
@@ -35,7 +35,7 @@
 							<text>待结算:{{item.toSettled}}</text>
 						</view>
 						<view style='width:100%;' class='flex justify-end'>
-							<view class='del' @click="delRow(item)">删除</view>
+							<view class='del' @click.stop="delRow(item)">删除</view>
 						</view>
 					</view>
 				</view>
@@ -95,7 +95,7 @@
 			this.currentPage = 1
 			this.isLoadMore = false
 			this.loadStatus = 'loading'
-			this.listData=[]
+			this.listData = []
 			this.getListData(this.status)
 			setTimeout(function() {
 				uni.stopPullDownRefresh();
@@ -112,7 +112,7 @@
 			},
 			sendreceiverecord(item) {
 
-				if (item.status == '发货') {
+				if (item.shipperPhone == this.userInfo.phone) {
 					uni.navigateTo({
 						url: '/pageA/freightTransport/record/sendrecord?id=' + item.id
 					})
@@ -164,7 +164,7 @@
 							// }else{
 							// 	that.isShowNoData = false
 							// }
-							that.isLoadMore=true
+							that.isLoadMore = true
 							that.loadStatus = 'nomore'
 						} else {
 							if (that.currentPage > 1) {
@@ -178,7 +178,7 @@
 
 					}).catch(res => {
 						that.$api.msg(res.data.data.errmsg)
-						that.isLoadMore=false
+						that.isLoadMore = false
 						that.loadStatus = 'nomore'
 						if (that.currentPage > 1) {
 							that.currentPage = 1
@@ -194,7 +194,7 @@
 			tabcarchange(val) {
 				this.currentPage = 1
 				this.searchKeyWord = ""
-				this.listData=[]
+				this.listData = []
 				console.log(val)
 				this.status = val
 				this.getListData(val)
@@ -207,26 +207,40 @@
 			},
 			//删除
 			delRow(val) {
-				this.$api.doRequest('post', 'freightReceivingDispatching/api/deleteFreightReceivingDispatching', {
-					"id": val.id
-				}).then(res => {
-					if (res.data.code == 200) {
-						// this.listData = res.data.data.records;
-						uni.showToast({
-							title: "删除成功!",
-							icon: 'none',
-							duration: 2000
-						})
-						this.getListData(0)
+				uni.showModal({
+					content: '货运信息(业务编号'+val.businessNumber+')删除后不可恢复,是否确定删除?',
+					cancelText: "返回",
+					confirmText: "删除",
+					confirmColor:"#22C572",
+					success: function(res) {
+						if (res.confirm) {
+							this.$api.doRequest('post',
+								'freightReceivingDispatching/api/deleteFreightReceivingDispatching', {
+									"id": val.id
+								}).then(res => {
+								if (res.data.code == 200) {
+									// this.listData = res.data.data.records;
+									uni.showToast({
+										title: "删除成功!",
+										icon: 'none',
+										duration: 2000
+									})
+									this.getListData(0)
+								}
+
+							}).catch(res => {
+								// uni.showToast({
+								// 	title: res.data.message,
+								// 	icon: 'none',
+								// 	duration: 2000
+								// })
+							})
+						} else if (res.cancel) {
+
+						}
 					}
+				});
 
-				}).catch(res => {
-					// uni.showToast({
-					// 	title: res.data.message,
-					// 	icon: 'none',
-					// 	duration: 2000
-					// })
-				})
 			}
 
 		}

+ 35 - 21
pageA/freightTransport/record/payrecord.vue

@@ -206,10 +206,10 @@
 						</view>
 					</u-modal>
 				</view>
-				<view style='flex:1;' class='deductfreight' @click="deductPayment()" v-if="!payfreightCli">扣货款</view>
+				<view style='flex:1;' class='deductfreight' @click="deductPayment()" v-if="item.status=='待结算'">扣货款</view>
 				<view class="freightAlert-model">
 					<u-modal v-model="deductPaymentAlert" cancel-color="#AFB3BF" confirm-color="#22C572"
-						:show-title="false" show-cancel-button=true @confirm="confirmeductPayment(item)">
+						:show-title="false" show-cancel-button=true @confirm="confirmeductPayment(item,0)">
 						<view class="freightAlert-warp payAlert">
 							<view class="freightAlert-row">
 								<view class="title">扣货款</view>
@@ -231,10 +231,10 @@
 						</view>
 					</u-modal>
 				</view>
-				<view style='flex:1;' class='payfreight' @click="Payment()" v-if="!payfreightCli">付货款</view>
+				<view style='flex:1;' class='payfreight' @click="Payment()"  v-if="item.status=='待结算'">付货款</view>
 				<view class="freightAlert-model">
 					<u-modal v-model="paymentAlert" cancel-color="#AFB3BF" confirm-color="#22C572" :show-title="false"
-						show-cancel-button=true @confirm="confirmPayPayment(item)">
+						show-cancel-button=true @confirm="confirmeductPayment(item,1)">
 						<view class="freightAlert-warp payAlert">
 							<view class="freightAlert-row">
 								<view class="title">付货款</view>
@@ -286,7 +286,7 @@
 					</u-modal>
 				</view>
 
-				<view @click='confirmpaygoods(item)' style='flex:2;' class='payfreight' v-if="payfreightCli">确认收货</view>
+				<view @click='confirmpaygoods(item)' style='flex:2;' class='payfreight' v-if="item.status!='待结算'">确认收货</view>
 			</view>
 
 		</view>
@@ -349,13 +349,12 @@
 		onReachBottom() { //上拉触底函数
 		},
 		methods: {
-			confirmpaygoods(item) {debugger
+			confirmpaygoods(item) {
 				uni.navigateTo({
-					url: '/pageA/freightTransport/confirmpaygoods?toINfo=' + JSON.stringify(item)
+					url: '/pageA/freightTransport/confirmpaygoods?toINfo=' + JSON.stringify(item)+'&id='+this.id
 				})
 			},
 			commit() {
-				console.log(1111)
 				uni.navigateTo({
 					url: '/pageA/freightTransport/addpaygoods?id=' + this.id
 				})
@@ -441,10 +440,6 @@
 				console.log("付货款")
 				this.paymentAlert = true
 			},
-			confirmPayPayment() {
-				console.log("付货款提交")
-			},
-
 			//判断输入值
 			checkVal(e, state, item) {
 				console.log(e)
@@ -478,28 +473,47 @@
 			closeModel() {
 				this.freightAlert = false;
 				this.payAlert = false;
-				this.ductPaymentAlert = false;
+				this.deductPaymentAlert = false;
 				this.paymentAlert = false;
 			},
-			confirmeductPayment(val) {
+			confirmPayPayment() {
+				console.log("付货款提交")
+			},
+			confirmeductPayment(val,type) {
 				console.log(val)
-				val.goodsDeductionAmount = parseInt(this.ductPayment);
-				this.$api.doRequest('post', 'freightReceivingDispatching/api/PaymentDeduction', val).then(
+				let _title = ''
+				let _title1 = ''
+				if(type==0){
+					_title = "扣款成功!"
+					_title1 = "扣款失败!"
+				}else{
+					_title = "付款成功!"
+					_title1 = "扣款失败!"
+				}
+				
+				let that = this;
+				val.goodsDeductionAmount = parseInt(that.ductPayment);
+				val.money = 0
+				val.goodsEdPayable = parseInt(that.paymenMoney);
+				that.$api.doRequest('post', 'freightReceivingDispatching/api/PaymentDeduction', val).then(
 					res => {
 						if (res.data.code == 200) {
 							uni.showToast({
-								title: "扣款成功!",
+								title:_title,
 								icon: 'none',
-								duration: 2000
+								duration: 2000,
+								success() {
+									getDetail(that.id, that)
+								}
 							})
-							location.reload()
 						} else {
 							uni.showToast({
-								title: "扣款失败!",
+								title:_title1,
 								icon: 'none',
 								duration: 2000
 							})
-							this.ductPayment = 0
+							that.ductPayment = 0
+							that.goodsEdPayable = 0
 						}
 
 					}).catch(res => {

+ 2 - 2
pageA/freightTransport/record/sendrecord.vue

@@ -197,7 +197,7 @@
 								付款金额
 							</view>
 							<view class="freightAlert-row4">
-								<u-input v-model="item.money" :type="type" :border="border" placeholder="请输入扣款金额"
+								<u-input v-model="item.money" :type="type" :border="border" placeholder="请输入本次支付运费金额"
 									class="uview-border" @input="payInputWatch($event,item)" />
 								<view class="text">
@@ -388,7 +388,7 @@
 		position: relative;
 
 		.title {
-			color: #9698A2;
+			/* color: #9698A2; */
 		}
 
 		.title-black {

+ 7 - 7
pageD/myRelease/buyEdit.vue

@@ -525,7 +525,7 @@
 					return
 				}
 				if(this.checked == false){
-				if (this.deptList.waterContent&&this.deptList.waterContent<1||
+				if (this.deptList.waterContent&&this.deptList.waterContent<0||
 				this.deptList.waterContent&&this.deptList.waterContent>40) {
 					this.$api.msg('水分输入错误')
 					return
@@ -536,12 +536,12 @@
 						return
 					}
 				}
-				if (this.deptList.bulkDensity&&this.deptList.bulkDensity<500||
+				if (this.deptList.bulkDensity&&this.deptList.bulkDensity<0||
 				this.deptList.bulkDensity&&this.deptList.bulkDensity>1000) {
 					this.$api.msg('容重输入错误')
 					return
 				}
-				if (this.deptList.jiaorenli&&this.deptList.jiaorenli<1||
+				if (this.deptList.jiaorenli&&this.deptList.jiaorenli<0||
 				this.deptList.jiaorenli&&this.deptList.jiaorenli>40) {
 					this.$api.msg('热损伤输入错误')
 					return
@@ -552,7 +552,7 @@
 						return
 					}
 				}
-				if (this.deptList.impurity&&this.deptList.impurity<1||
+				if (this.deptList.impurity&&this.deptList.impurity<0||
 				this.deptList.impurity&&this.deptList.impurity>40) {
 					this.$api.msg('杂质输入错误')
 					return
@@ -563,7 +563,7 @@
 						return
 					}
 				}
-				if (this.deptList.mildewGrain&&this.deptList.mildewGrain<1||
+				if (this.deptList.mildewGrain&&this.deptList.mildewGrain<0||
 				this.deptList.mildewGrain&&this.deptList.mildewGrain>40) {
 					this.$api.msg('霉变粒输入错误')
 					return
@@ -574,7 +574,7 @@
 						return
 					}
 				}
-				if (this.deptList.imperfectGrain&&this.deptList.imperfectGrain<1||
+				if (this.deptList.imperfectGrain&&this.deptList.imperfectGrain<0||
 				this.deptList.imperfectGrain&&this.deptList.imperfectGrain>40) {
 					this.$api.msg('不完整粒输入错误')
 					return
@@ -585,7 +585,7 @@
 						return
 					}
 				}
-				if (this.deptList.protein && this.deptList.protein < 1 ||
+				if (this.deptList.protein && this.deptList.protein < 0 ||
 				this.deptList.protein && this.deptList.protein > 80) {
 					this.$api.msg('蛋白输入错误')
 					return

+ 7 - 7
pageD/myRelease/buyGrain.vue

@@ -497,7 +497,7 @@
 					return
 				}
 				if (this.checked == false) {
-					if (this.deptList.waterContent && this.deptList.waterContent < 1 ||
+					if (this.deptList.waterContent && this.deptList.waterContent < 0 ||
 						this.deptList.waterContent && this.deptList.waterContent > 40) {
 						this.$api.msg('水分输入错误')
 						return
@@ -508,12 +508,12 @@
 							return
 						}
 					}
-					if (this.deptList.bulkDensity && this.deptList.bulkDensity < 500 ||
+					if (this.deptList.bulkDensity && this.deptList.bulkDensity < 0 ||
 						this.deptList.bulkDensity && this.deptList.bulkDensity > 1000) {
 						this.$api.msg('容重输入错误')
 						return
 					}
-					if (this.deptList.jiaorenli && this.deptList.jiaorenli < 1 ||
+					if (this.deptList.jiaorenli && this.deptList.jiaorenli < 0 ||
 						this.deptList.jiaorenli && this.deptList.jiaorenli > 40) {
 						this.$api.msg('热损伤输入错误')
 						return
@@ -524,7 +524,7 @@
 							return
 						}
 					}
-					if (this.deptList.impurity && this.deptList.impurity < 1 ||
+					if (this.deptList.impurity && this.deptList.impurity < 0 ||
 						this.deptList.impurity && this.deptList.impurity > 40) {
 						this.$api.msg('杂质输入错误')
 						return
@@ -535,7 +535,7 @@
 							return
 						}
 					}
-					if (this.deptList.mildewGrain && this.deptList.mildewGrain < 1 ||
+					if (this.deptList.mildewGrain && this.deptList.mildewGrain < 0 ||
 						this.deptList.mildewGrain && this.deptList.mildewGrain > 40) {
 						this.$api.msg('霉变粒输入错误')
 						return
@@ -546,7 +546,7 @@
 							return
 						}
 					}
-					if (this.deptList.imperfectGrain && this.deptList.imperfectGrain < 1 ||
+					if (this.deptList.imperfectGrain && this.deptList.imperfectGrain < 0 ||
 						this.deptList.imperfectGrain && this.deptList.imperfectGrain > 40) {
 						this.$api.msg('不完整粒输入错误')
 						return
@@ -557,7 +557,7 @@
 							return
 						}
 					}
-					if (this.deptList.protein && this.deptList.protein < 1 ||
+					if (this.deptList.protein && this.deptList.protein < 0 ||
 						this.deptList.protein && this.deptList.protein > 80) {
 						this.$api.msg('蛋白输入错误')
 						return

+ 7 - 7
pageD/myRelease/sellEdit.vue

@@ -523,7 +523,7 @@
 				}
 
 				if (this.checked == false) {
-					if (this.deptList.waterContent && this.deptList.waterContent < 1 ||
+					if (this.deptList.waterContent && this.deptList.waterContent < 0 ||
 						this.deptList.waterContent && this.deptList.waterContent > 40) {
 						this.$api.msg('水分输入错误')
 						return
@@ -534,12 +534,12 @@
 							return
 						}
 					}
-					if (this.deptList.bulkDensity && this.deptList.bulkDensity < 500 ||
+					if (this.deptList.bulkDensity && this.deptList.bulkDensity < 0 ||
 						this.deptList.bulkDensity && this.deptList.bulkDensity > 1000) {
 						this.$api.msg('容重输入错误')
 						return
 					}
-					if (this.deptList.jiaorenli && this.deptList.jiaorenli < 1 ||
+					if (this.deptList.jiaorenli && this.deptList.jiaorenli < 0 ||
 						this.deptList.jiaorenli && this.deptList.jiaorenli > 40) {
 						this.$api.msg('热损伤输入错误')
 						return
@@ -550,7 +550,7 @@
 							return
 						}
 					}
-					if (this.deptList.impurity && this.deptList.impurity < 1 ||
+					if (this.deptList.impurity && this.deptList.impurity < 0 ||
 						this.deptList.impurity && this.deptList.impurity > 40) {
 						this.$api.msg('杂质输入错误')
 						return
@@ -561,7 +561,7 @@
 							return
 						}
 					}
-					if (this.deptList.mildewGrain && this.deptList.mildewGrain < 1 ||
+					if (this.deptList.mildewGrain && this.deptList.mildewGrain < 0 ||
 						this.deptList.mildewGrain && this.deptList.mildewGrain > 40) {
 						this.$api.msg('霉变粒输入错误')
 						return
@@ -572,7 +572,7 @@
 							return
 						}
 					}
-					if (this.deptList.imperfectGrain && this.deptList.imperfectGrain < 1 ||
+					if (this.deptList.imperfectGrain && this.deptList.imperfectGrain < 0 ||
 						this.deptList.imperfectGrain && this.deptList.imperfectGrain > 40) {
 						this.$api.msg('不完整粒输入错误')
 						return
@@ -583,7 +583,7 @@
 							return
 						}
 					}
-					if (this.deptList.protein && this.deptList.protein < 1 ||
+					if (this.deptList.protein && this.deptList.protein < 0 ||
 						this.deptList.protein && this.deptList.protein > 80) {
 						this.$api.msg('蛋白输入错误')
 						return

+ 7 - 7
pageD/myRelease/sellGrain.vue

@@ -534,7 +534,7 @@
 					return
 				}
 				if (this.checked == false) {
-					if (this.deptList.waterContent && this.deptList.waterContent < 1 ||
+					if (this.deptList.waterContent && this.deptList.waterContent < 0 ||
 						this.deptList.waterContent && this.deptList.waterContent > 40) {
 						this.$api.msg('水分输入错误')
 						return
@@ -545,12 +545,12 @@
 							return
 						}
 					}
-					if (this.deptList.bulkDensity && this.deptList.bulkDensity < 500 ||
+					if (this.deptList.bulkDensity && this.deptList.bulkDensity < 0 ||
 						this.deptList.bulkDensity && this.deptList.bulkDensity > 1000) {
 						this.$api.msg('容重输入错误')
 						return
 					}
-					if (this.deptList.jiaorenli && this.deptList.jiaorenli < 1 ||
+					if (this.deptList.jiaorenli && this.deptList.jiaorenli < 0 ||
 						this.deptList.jiaorenli && this.deptList.jiaorenli > 40) {
 						this.$api.msg('热损伤输入错误')
 						return
@@ -561,7 +561,7 @@
 							return
 						}
 					}
-					if (this.deptList.impurity && this.deptList.impurity < 1 ||
+					if (this.deptList.impurity && this.deptList.impurity < 0 ||
 						this.deptList.impurity && this.deptList.impurity > 40) {
 						this.$api.msg('杂质输入错误')
 						return
@@ -572,7 +572,7 @@
 							return
 						}
 					}
-					if (this.deptList.mildewGrain && this.deptList.mildewGrain < 1 ||
+					if (this.deptList.mildewGrain && this.deptList.mildewGrain < 0 ||
 						this.deptList.mildewGrain && this.deptList.mildewGrain > 40) {
 						this.$api.msg('霉变粒输入错误')
 						return
@@ -583,7 +583,7 @@
 							return
 						}
 					}
-					if (this.deptList.imperfectGrain && this.deptList.imperfectGrain < 1 ||
+					if (this.deptList.imperfectGrain && this.deptList.imperfectGrain < 0 ||
 						this.deptList.imperfectGrain && this.deptList.imperfectGrain > 40) {
 						this.$api.msg('不完整粒输入错误')
 						return
@@ -594,7 +594,7 @@
 							return
 						}
 					}
-					if (this.deptList.protein && this.deptList.protein < 1 ||
+					if (this.deptList.protein && this.deptList.protein < 0 ||
 						this.deptList.protein && this.deptList.protein > 80) {
 						this.$api.msg('蛋白输入错误')
 						return

+ 7 - 7
pageD/warehousings/ex_warehouse.vue

@@ -490,7 +490,7 @@
 					this.$api.msg('质检员姓名输入错误')
 					return
 				}
-				if (this.list.protein && this.list.protein < 1 || this.list.protein && this.list.protein > 80) {
+				if (this.list.protein && this.list.protein < 0 || this.list.protein && this.list.protein > 80) {
 					this.$api.msg('蛋白占比输入错误')
 					return
 				}
@@ -500,7 +500,7 @@
 						return
 					}
 				}
-				if (this.list.waterContent && this.list.waterContent < 1 || this.list.waterContent && this.list
+				if (this.list.waterContent && this.list.waterContent < 0 || this.list.waterContent && this.list
 					.waterContent > 40) {
 					this.$api.msg('水分输入错误')
 					return
@@ -511,7 +511,7 @@
 						return
 					}
 				}
-				if (this.list.bulkDensity && this.list.bulkDensity < 500 || this.list.bulkDensity && this.list
+				if (this.list.bulkDensity && this.list.bulkDensity < 0 || this.list.bulkDensity && this.list
 					.bulkDensity > 1000) {
 					this.$api.msg('容重输入错误')
 					return
@@ -522,7 +522,7 @@
 						return
 					}
 				}
-				if (this.list.jiaorenli && this.list.jiaorenli < 1 || this.list.jiaorenli && this.list.jiaorenli > 40) {
+				if (this.list.jiaorenli && this.list.jiaorenli < 0 || this.list.jiaorenli && this.list.jiaorenli > 40) {
 					this.$api.msg('热损伤输入错误')
 					return
 				}
@@ -532,7 +532,7 @@
 						return
 					}
 				}
-				if (this.list.impurity && this.list.impurity < 1 || this.list.impurity && this.list.impurity > 40) {
+				if (this.list.impurity && this.list.impurity < 0 || this.list.impurity && this.list.impurity > 40) {
 					this.$api.msg('杂质输入错误')
 					return
 				}
@@ -542,7 +542,7 @@
 						return
 					}
 				}
-				if (this.list.mildewGrain && this.list.mildewGrain < 1 || this.list.mildewGrain && this.list.mildewGrain >
+				if (this.list.mildewGrain && this.list.mildewGrain < 0 || this.list.mildewGrain && this.list.mildewGrain >
 					40) {
 					this.$api.msg('霉变粒输入错误')
 					return
@@ -553,7 +553,7 @@
 						return
 					}
 				}
-				if (this.list.imperfectGrain && this.list.imperfectGrain < 1 || this.list.imperfectGrain && this.list
+				if (this.list.imperfectGrain && this.list.imperfectGrain < 0 || this.list.imperfectGrain && this.list
 					.imperfectGrain > 40) {
 					this.$api.msg('不完整粒输入错误')
 					return

+ 7 - 7
pageD/warehousings/warehousings.vue

@@ -604,7 +604,7 @@ import upload from '@/components/upload.vue';
 					this.$api.msg('质检员姓名输入错误')
 					return
 				}
-				if(this.list.protein&&this.list.protein<1||this.list.protein&&this.list.protein>80){
+				if(this.list.protein&&this.list.protein<0||this.list.protein&&this.list.protein>80){
 					this.$api.msg('蛋白占比输入错误')
 					return
 				}
@@ -614,7 +614,7 @@ import upload from '@/components/upload.vue';
 						return
 					}
 				}
-				if(this.list.waterContent&&this.list.waterContent<1||this.list.waterContent&&this.list.waterContent>40){
+				if(this.list.waterContent&&this.list.waterContent<0||this.list.waterContent&&this.list.waterContent>40){
 					this.$api.msg('水分输入错误')
 					return
 				}
@@ -624,7 +624,7 @@ import upload from '@/components/upload.vue';
 						return
 					}
 				}
-				if(this.list.bulkDensity&&this.list.bulkDensity<500||this.list.bulkDensity&&this.list.bulkDensity>1000){
+				if(this.list.bulkDensity&&this.list.bulkDensity<0||this.list.bulkDensity&&this.list.bulkDensity>1000){
 					this.$api.msg('容重输入错误')
 					return
 				}
@@ -634,7 +634,7 @@ import upload from '@/components/upload.vue';
 						return
 					}
 				}
-				if(this.list.jiaorenli&&this.list.jiaorenli<1||this.list.jiaorenli&&this.list.jiaorenli>40){
+				if(this.list.jiaorenli&&this.list.jiaorenli<0||this.list.jiaorenli&&this.list.jiaorenli>40){
 					this.$api.msg('热损伤输入错误')
 					return
 				}
@@ -644,7 +644,7 @@ import upload from '@/components/upload.vue';
 						return
 					}
 				}
-				if(this.list.impurity&&this.list.impurity<1||this.list.impurity&&this.list.impurity>40){
+				if(this.list.impurity&&this.list.impurity<0||this.list.impurity&&this.list.impurity>40){
 					this.$api.msg('杂质输入错误')
 					return
 				}
@@ -654,7 +654,7 @@ import upload from '@/components/upload.vue';
 						return
 					}
 				}
-				if(this.list.mildewGrain&&this.list.mildewGrain<1||this.list.mildewGrain&&this.list.mildewGrain>40){
+				if(this.list.mildewGrain&&this.list.mildewGrain<0||this.list.mildewGrain&&this.list.mildewGrain>40){
 					this.$api.msg('霉变粒输入错误')
 					return
 				}
@@ -664,7 +664,7 @@ import upload from '@/components/upload.vue';
 						return
 					}
 				}
-				if(this.list.imperfectGrain&&this.list.imperfectGrain<1||this.list.imperfectGrain&&this.list.imperfectGrain>40){
+				if(this.list.imperfectGrain&&this.list.imperfectGrain<0||this.list.imperfectGrain&&this.list.imperfectGrain>40){
 					this.$api.msg('不完整粒输入错误')
 					return
 				}

+ 1 - 1
pages/public/login_account_number.vue

@@ -7,7 +7,7 @@
 			<h2>欢迎使用易粮易运</h2>
 			<view style='position:relative;width:100%;margin-top:50px;border-bottom:1px solid #E8E9ED;padding:10px;' class="flex">
 				<view style='width:15%;border-right:1px solid #E8E9ED;'>+86</view>
-				<view style='width:85%;'><input style='padding-left:10px;' maxlength='11' v-model='phone' placeholder="请输入手机号码" type="text"></view>
+				<view style='width:85%;'><input style='padding-left:10px;' maxlength='11' v-model='phone' placeholder="请输入手机号码" type="number"></view>
 			<image v-if='phone!=""' @click='phone=""' class='close' src='../../static/img/login/guanbi@2x.png'></image>
 			</view>
 			<view style='margin-top:20px;border-bottom:1px solid #E8E9ED;position:relative;'>

+ 17 - 3
pages/task/my_task.vue

@@ -30,7 +30,7 @@
 				<u-tag :text="item.taskType" type="success" v-if="item.taskType == '出库任务'"/>
 				<u-tag :text="item.taskType" type="primary" v-if="item.taskType == '入库任务'"/>
 			</view>
-			<view v-show="isLoadMore">
+			<view v-show="isSole">
 				<uni-load-more :status="loadStatus"></uni-load-more>
 			</view>
 		</view>
@@ -52,8 +52,10 @@
 				limit: 10, //每次取条目数
 				loadStatus: 'loading', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
 				isLoadMore: false, //是否加载中
+				isSole:false,
 				showTran: true,
 				scrollTop: 0,
+				isContent:true,
 				statusFlag: 1,
 				current: 1,
 				warehouseInOutInfo: {
@@ -71,6 +73,12 @@
 			// this.userInfo =  uni.getStorageSync("userInfo")
 			this.warehouseInOutInfo.phone = this.userInfo.phone
 		},
+		onReachBottom() { //上拉触底函数
+			if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
+				this.warehouseInOutInfo.currentPage += 1
+				this.getIndexBuyData()
+			}
+		},
 		// onLoad(options) {
 		// 	this.getIndexBuyData()
 		// },
@@ -161,14 +169,20 @@
 						//采购信息
 						if (data.length > 0) {
 							that.taskInfo = that.taskInfo.concat(data)
-							that.isLoadMore = false
+							
 						} else {
 							if (that.pages > 1) {
 								that.pages -= 1
 							}
-							that.isLoadMore = true
+							
+							that.isLoadMore = false
 							that.loadStatus = 'nomore'
 						}
+						if(res.data.data.records.length==0){
+							that.isSole=true
+						}else{
+							that.isSole=false
+						}
 						uni.hideLoading()
 						this.taskInfo = res.data.data.records
 					} else {

+ 100 - 20
pages/user/setUp.vue

@@ -1,23 +1,39 @@
 <template>
 	<view class="container">
-		<view class=" flex headPortrait justify-between" @click="switchPicture">
-			<view class="title">头像</view>
-			<view class="nextStep flex">
-				<view class="pictures">
-					<image :src="headUrl" class="picture"></image>
+		<view class="cu-list menu text-left solid-top indexlow">
+			<view class='cu-item' style='margin-bottom:10px;' @click="switchPicture">
+				<view>
+					<text>头像</text>
+				</view>
+				<view style='align-items: center;' class="flex">
+					<view class="pictures">
+						<image :src="headUrl" class="picture"></image>
+					</view>
+					<image src="../../static/img/myimg/gengduo1@3x.png" class="arrow" ></image>
 				</view>
-				<image src="../../static/img/myimg/gengduo1@3x.png" class="arrow" ></image>
 			</view>
-		</view>
-		<view class="flex headPortrait justify-between" @click="nickname(username)">
-			<view class="title">昵称</view>
-			<view class="nextStep flex">
-				<view class="username">
-					{{username}}
+			<view class='cu-item' style='margin-bottom:10px;'  @click="nickname(username)">
+				<view>
+					<text>昵称</text>
+				</view>
+				<view style='align-items: center;' class="flex">
+					<view class="username">
+						{{username}}
 					</view>
+					<image src="../../static/img/myimg/gengduo1@3x.png" class="arrow" ></image>
+				</view>
+			</view>
+			<view class='cu-item' @click='fankui'>
+				<view>
+					<text>意见反馈</text>
+				</view>
 				<image src="../../static/img/myimg/gengduo1@3x.png" class="arrow" ></image>
 			</view>
 		</view>
+		<view class='exitloginwrap'>
+			<button @click='logout()' class='exitlogin'>退出登录</button>
+		</view>
+		
 	</view>
 </template>
 
@@ -30,6 +46,17 @@
 			return {
 				headUrl:"../../static/img/myimg/YongHu@3x.png",
 				username:"",
+				gridList: [
+					{
+						num:0,
+						name: '退出登录',
+						// icon:'cuIcon-exit',
+						src:'../../static/img/sign/return@3x.png',
+						tips: 0,
+						url:'',
+						show:true
+					},
+				],
 			}
 		},
 		computed: {
@@ -58,16 +85,48 @@
 				uni.navigateTo({
 					url: `/pages/user/set_nickname?nickname=${username}`
 				})
-			}
+			},
+			exitlogin(){
+				
+			},
+			fankui(){
+				uni.navigateTo({
+					url: `/pages/user/fankui`
+				})
+			},
+			logout() {
+				const that = this
+				uni.showModal({
+					title: '询问',
+					content: '您确定要退出吗?',
+					cancelText: '取消',
+					confirmText: '确定',
+					success: (e) => {
+						if (e.confirm) {
+							uni.hideTabBarRedDot({
+								index:3
+							})
+							uni.clearStorageSync();
+							that.$store.commit('logout')
+							that.$api.logout()
+							uni.navigateTo({
+								url: `/pages/public/login`
+							})
+						}
+					}
+				})
+			},
 		}
 	}
 </script>
 
 <style lang="scss" scoped>
-	.container {
-		padding: 10px 10px 0px;
+	page{
 		background-color: #F5F6FA;
 	}
+	.container {
+		padding: 10px 0 0px;
+	}
 
 	.headPortrait {
 		width: 100%;
@@ -91,7 +150,6 @@
 		height: 35px;
 		background-color: #E0FAF6;
 		border-radius: 18px;
-		margin-top: 6px;
 	}
 
 	.picture {
@@ -102,15 +160,37 @@
 		margin-left: 15px;
 		width: 8px;
 		height: 12px;
-		top: 18px;
 		// justify-content: flex-end
 
 	}
-	.nextStep{
-		margin-right: 20px;
-	}
 	.username{
 		line-height: 50px;
 		color: #6D6D72;
 	}
+	.sign{
+		width: 18px;
+		height: 18px;
+		top: 4px;
+		margin-right: 6px;
+	}
+	.cu-list>.cu-item:after{
+		border:none;
+	}
+	.exitloginwrap{
+		position:fixed;
+		bottom:0;
+		left:0;
+		width:100%;
+		padding-bottom:20px;
+	}
+	.exitlogin{
+		width:90%;
+		background:#fff;
+		border-radius:30px;
+		color:#FB1E1E;
+		font-size:17px;
+	}
+	.exitlogin:after{
+		border:none;
+	}
 </style>

+ 56 - 35
pages/user/user.vue

@@ -15,12 +15,15 @@
 				</view>
 			</view>
 		</view> -->
-		<view class="indexUp flex">
-			<image v-bind:src="headUrl" class="headPortrait"></image>
-			<view class="personal">
-				<view @click="toLogin" class="information">{{hasLogin? username : '立即登录' }}</view>
-				<view class="information">{{starUserphone}}</view>
+		<view class="indexUp flex justify-between">
+			<view class='flex'>
+				<image v-bind:src="headUrl" class="headPortrait"></image>
+				<view class="personal">
+					<view @click="toLogin" class="information">{{hasLogin? username : '立即登录' }}</view>
+					<view class="information">{{starUserphone}}</view>
+				</view>
 			</view>
+			<view><image @click='setting' style='width:21px;height:21px;' src="../../static/img/sign/shezhi@3x.png" ></image></view>
 
 		</view>
 		<view class="cover-container">
@@ -32,7 +35,7 @@
 					<view>
 					<!-- 	<text :class="item.icon" class="grid_icon icon text-grey"></text> -->
 						<image :src="item.src" class="sign"></image>
-						<text class="text-grey">{{item.name}}</text>
+						<text >{{item.name}}</text>
 					</view>
 					<view>
 						<text v-if='item.num==2&&taskTip' class='badge_user'>{{taskTip}}</text>
@@ -41,13 +44,6 @@
 					</view>
 					<!-- <image src="../../static/img/sign/authentication@3x.png" mode=""></image> -->
 				</view>
-				<view class='cu-item' @click='fankui'>
-					<view>
-						<image src="../../static/img/sign/authentication@2x.png" class="sign"></image>
-						<text class="text-grey">意见反馈</text>
-					</view>
-					<view class = 'tip_text cuIcon-right' ></view>
-				</view>
 				<!-- <view class='cu-item' @click='scanCode'>
 							<view>
 								<text class="cuIcon-scan icon text-grey"></text>
@@ -142,24 +138,15 @@
 						url: `/pageA/freightTransport/index`,
 						show: true
 					},
-					{
-						num: 5,
-						name: '设置',
-						// icon: 'cuIcon-edit',
-						src:'../../static/img/sign/shezhi@2x.png',
-						tips: 0,
-						url: `/pages/user/setUp`,
-						show: true
-					},	
-					{
-						num:6,
-						name: '退出登录',
-						// icon:'cuIcon-exit',
-						src:'../../static/img/sign/return@3x.png',
-						tips: 0,
-						url:'',
-						show:true
-					},
+					// {
+					// 	num: 5,
+					// 	name: '设置',
+					// 	// icon: 'cuIcon-edit',
+					// 	src:'../../static/img/sign/shezhi@2x.png',
+					// 	tips: 0,
+					// 	url: `/pages/user/setUp`,
+					// 	show: true
+					// }
 				],
 				showTran: true,
 				companyId: 1,
@@ -364,6 +351,29 @@
 					}
 				}
 			},
+			setting(){
+				if (!this.hasLogin) {
+					uni.showModal({
+						title: '登录提示',
+						content: '您尚未登录,是否立即登录?',
+						showCancel: true,
+						confirmText: '登录',
+						success: (e) => {
+							if (e.confirm) {
+								uni.navigateTo({
+									url: '/pages/public/login'
+								})
+							}
+						},
+						fail: () => {},
+						complete: () => {}
+					})
+				}else {
+						uni.navigateTo({
+							url:'/pages/user/setUp'
+						})
+				}
+			},
 			toLogin() {
 				console.log("userInfo",this.userInfo)
 				if (!this.hasLogin || !this.userInfo || this.username == "立即登录") {
@@ -469,14 +479,18 @@
 	}
 </script>
 <style lang='scss' scoped>
+	page{
+		background:#F5F6FA;
+	}
 	.container {
+		padding-top: 85px;
 		padding-top: 35px;
 		background-color: #F5F6FA;
 		position: relative;
 		width: 100vw;
 		height: 100vh;
 		overflow: hidden;
-		background: url('~@/static/img/login/bg.png');
+		background: url('~@/static/img/login/bg_slices/bg@3x.png');
 		background-size: 100% 100%;
 		margin: 0 auto;
 	}
@@ -508,10 +522,11 @@
 	.cu-list {
 		/* height: 483rpx;
 		overflow-y: scroll; */
+		margin-top: 16rpx;
+		background:#fff;
 		margin-top: 22rpx;
 		margin-bottom: 80rpx;
 	}
-
 	.badge_user {
 		color: #fff;
 		background-color: #dc3545;
@@ -835,7 +850,6 @@
 		width: 75px;
 		height: 75px;
 		border-radius: 40px;
-		margin-left: 20px;
 		border: 2px solid #ffffff;
 	}
 
@@ -851,7 +865,10 @@
 	}
 	.indexlow{
 		/* margin-top: 30px; */
-		border-radius: 20px;
+		border-radius: 10px;
+	}
+	.cu-list>.cu-item:after{
+		border:none;
 	}
 	.sign{
 		width: 18px;
@@ -859,4 +876,8 @@
 		top: 4px;
 		margin-right: 6px;
 	}
+	.indexUp{
+		padding:0 20px;
+		align-items: center;
+	}
 </style>

BIN
static/img/login/bg_slices/bg.png


BIN
static/img/login/bg_slices/bg@2x.png


BIN
static/img/login/bg_slices/bg@3x.png


BIN
static/img/sign/shezhi.png


BIN
static/img/sign/shezhi@2x.png


BIN
static/img/sign/shezhi@3x.png