Преглед на файлове

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

ccjgmwz преди 3 години
родител
ревизия
7f684c4bb2

+ 2 - 2
config/index.js

@@ -1,8 +1,8 @@
 const dev = {
 	// baseUrlNew: 'http://192.168.1.122:9100/',
 	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
 }

+ 255 - 372
pageA/freightTransport/addpaygoods.vue

@@ -1,30 +1,39 @@
 <template>
 	<view class="container">
 		<view class="information">
-			<view class="c-row b-b">
-				<view class="title">收货人姓名</view>
-				<view class="con-list">
-				<input maxlength='7' placeholder="请输入收货人姓名" name="input" v-model="goods.carNo"></input>
+			<u-form :model="userInfo" 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-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-form-item>
+
+			</u-form>
+		</view>
+		<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>
+		<view class="c-row">
+			<view class="title">我的用户昵称</view>
+				<view class="phone">
+					{{dataList.accountNumber}}
 				</view>
-			</view>
-			<view class="c-row b-b">
-				<view class="title">收货人手机号</view>
+		</view>
+		<view class="information" v-for="(item,index) in dataList.receivingUsers">
+			<view class="c-row">
+				<view class="title">{{item.receiveName}}</view>
 				<view class="con-list">
-				<input  maxlength='11' placeholder="请输入收货人注册易粮易运的手机号" name="input" v-model="goods.driverPhone"></input>
-			  </view>
-			</view>
-			</view>
-			<view class="c-row b-b">
-				<view class="title">全部收货人(3)</view>
-			</view>
-			<view class="information">
-				<view class="c-row b-b">
-					<view class="title">我的用户昵称</view>
-					<view class="con-list">
-						182 1242 1234
+					<view class="phone">
+
+						{{item.receivePhone}}
 					</view>
+					<image src="../../static/img/jiaoyi/shanchu.png" class="del" @click="del(item)"></image>
 				</view>
 			</view>
+		</view>
 	</view>
 </template>
 <script>
@@ -33,360 +42,208 @@
 		mapState
 	} from 'vuex';
 	export default {
-			name: "trust",
-			data() {
-				return {
-					goods: {
-						tranCarNo:'',
-						carNo:'',
-						grossWeight:'',
-						tare:'',
-						loadNetWeight:'',
-						loadPoundImg:'',
-						 contractNo:'',
-						 goodsName:'',
-						 sendDateStart:''
-						
-					},
-					params:{
-						year: true,
-						month: true,
-						day: true,
-					},
-					carNo:'',
-					PageCur: "trust",
-					TabCur: 0,
-					priceTypeIndex:-1,
-					priceType: ['库内价', '到库价', '到港价'],
-					unitPrice:0,
-					price:'',
-					seller:'',
-					sellerPhone:'',
-					minSale:'',
-					exsitCount:0,
-					origin:'',
-					stock:'',
-					show:false,
-					goodsName:'',
-					verifyCode:'',
-					sendText0:'获取验证码',
-					sendText1:'获取验证码',
-					sendText2:'获取验证码',
-					sendText3:'获取验证码',
-					sendDisabled0: false,
-					sendDisabled1: false,
-					sendDisabled2: false,
-					sendDisabled3: false,
-					buyer:'',
-					buyerPhone:'',
-					level:'',
-					sender:'',
-					senderPhone:'',
-					receiver:'',
-					receiverPhone:'',
-					total:0,
-					startPlace:'',
-					endPlace:'',
-					driver:'',
-					driverPhone:'',
-					carNo:'',
-					personNoImg:'',
-					personNoImg1:'',
-					driverNoImg:'',
-					driverNoImg1:'',
-					carNoImg:'',
-					carNoImg1:'',
-					goodsName:'',
-					showTran:true
-				};
-			},
-			computed: {
-				...mapState(['hasLogin','userInfo']),
-					time() {
-						var date=new Date()
-						var year=date.getFullYear()
-						var month=date.getMonth()
-						var date1=date.getDate()
-						if(month+1<10){
-							month="0"+(month+1)
-						}
-						if(date1+1<10){
-							date1="0"+date1
-						}
-						return year+'-'+month+"-"+date1
-					},
-					startDate() {
-					//限制开始时间;
-					//也可以直接限定为当天日期 var date= new Date(); return date
-						return new Date(new Date(new Date().toLocaleDateString()).getTime()-(1*60*60*1000))
-					},
-					endDate() {
-						return new Date()
-					}
-				},	
-			onShow() {
-			},
-			onLoad(option) {
-				this.goods.planId=option.planId
-				this.goodsName=option.goodsName
-				this.contractNo = option.contractNo
-				this.goods.goodsName=option.goodsName
-				this.goods.contractNo = option.contractNo
-				this.goods.tranCarNo=option.tranCarNo
-				console.log(this.goods.tranCarNo)
-				
-			},
-			methods: {
-				 DateChange(e) {
-					 this.goods.sendDateStart=e.year+'-'+e.month+'-'+e.day
-				 	// this.goods.sendDateStart = e.detail.value
-				 },
-				commit1(item){
-					uni.navigateTo({				
-						url: `/pageB/contract/look?id=${item.id}&netWeight=${item.netWeight}&carNo=${item.carNo}&sendDateStart=${item.sendDateStart}`
-					})
-				},
-				grossWeightchange(e) {
-				      if (this.goods.grossWeight && this.goods.tare) {
-				        this.goods.loadNetWeight = Number(
-				          this.goods.grossWeight - this.goods.tare
-				        )
-				      }
-				    },
-				tarechange(e) {
-				      if (this.goods.grossWeight && this.goods.tare) {
-				        this.goods.loadNetWeight = Number(
-				          this.goods.grossWeight - this.goods.tare
-				        )
-				      }
-				    },
-				getList(){
-					// tranCarNo:'',
-					// carNo:'',
-					// grossWeight:'',
-					// tare:'',
-					// loadNetWeight:'',
-					// loadPoundImg:'',
-					//  contractNo:'',
-					//  goodsName:'',
-					if(this.goods.carNo.length==0){
-						this.$api.msg('车牌号不能为空')
-						return
-					}
-					if(this.goods.carNo.length!=7){
-						this.$api.msg('车牌号输入错误')
-						return
-					}
-					if(this.goods.driverPhone.length==0){
-						this.$api.msg('手机号不能为空')
-						return
-					}
-					if(this.goods.driverPhone.length!=11){
-						this.$api.msg('司机手机号输入错误')
-						return
-					}
-					if(this.goods.grossWeight==''){
-						this.$api.msg('毛重不能为空')
-						return
-					}
-					if(this.goods.tare==''){
-						this.$api.msg('皮重不能为空')
-						return
-					}
-					if(this.goods.grossWeight>100){
-						this.$api.msg('毛重输入错误')
-						return
-					}
-					if(this.goods.tare>50){
-						this.$api.msg('皮重输入错误')
-						return
-					}
-					var that=this
-					uni.showModal({
-						content: '确定提交发车信息?',
-						success: function (res) {
-							if (res.confirm) {
-								that.$api.doRequest('post','/tranCarInfo/api/addTranTask',that.goods).then(res => {
-								    if(res.data.code==200){
-										console.log(that.goods)
-										uni.showModal({
-											content: '提交成功!',
-											success: function (res) {
-												if (res.confirm) {
-													var result = that.goods.tranCarNo.substr(that.goods.tranCarNo.indexOf("C") + 1,that.goods.tranCarNo.length);
-												    var num=Number(result)+1
-													if(num<=9){
-														num='C00'+num
-													}else if(num<100&&num>9){
-														num='C0'+num
-													}else  if(num<1000&&num>99){
-														num='C'+num
-													}
-													that.goods={
-														tranCarNo:num,
-														carNo:'',
-														grossWeight:'',
-														tare:'',
-														loadNetWeight:'',
-														loadPoundImg:'',
-														 contractNo:that.contractNo,
-														 goodsName:that.goodsName,
-														 sendDateStart:''	
-													}
-												}else if (res.cancel) {
-													uni.navigateBack();
-												}
-											}
-										});
-									}else if(res.data.code==11015){
-										uni.showToast({
-										 title: '该司机未认证身份,请司机认证后再操作',
-										 icon:'none',
-										 duration: 2000
-										})
-									}
-								    })
-								    .catch(res => {
-								     uni.showToast({
-								      title: res.errmsg,
-								      icon:'none',
-								      duration: 2000
-								     })
-								    });
-							} else if (res.cancel) {
-							
-							}
-						}
-					});
+		name: "trust",
+		data() {
+			return {
+				userInfo: {
+					compId: "",
+					infoId: "",
+					receiveName: "",
+					receivePhone: "",
 				},
-				ChooseImagePerson() {
-					uni.chooseImage({
-						count: 1, //默认9
-						sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
-						sourceType: ['album','camera'], //从相册选择
-						success: (res) => {
-							//上传图片
-							//图片路径可自行修改
-							
-							uploadImage(res.tempFilePaths[0], 'loadPoundImg/',
-								result => {
-	
-								 	this.goods.loadPoundImg = result
-								 uni.hideLoading();
-								}
-							)
-						}
-					});
+				dataList: {
+					receivingUsers: []
 				},
-				ChooseImageDriver() {
-					uni.chooseImage({
-						count: 1, //默认9
-						sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
-						sourceType: ['album','camera'], //从相册选择
-						success: (res) => {
-							//上传图片
-							//图片路径可自行修改
-							uploadImage(res.tempFilePaths[0], 'driverNoImg/',
-								result => {
-									if (this.driverNoImg.length != 0) {
-										this.driverNoImg1 = result
-									} else {
-										this.driverNoImg = result
-									}
-									uni.hideLoading();
-								}
-							)
+				rules: {
+					receiveName: [{
+							validator: (rule, value, callback) => {
+								return this.$u.test.chinese(value)
+							},
+							message: '收货人姓名为汉字',
+							trigger: ['change', 'blur']
+						},
+						{
+							validator: (rule, value, callback) => {
+								if (value.length > 10 || value.length < 2) return false
+								return true
+							},
+							message: '请输入2-10个汉字',
+							trigger: ['change', 'blur'],
+						},
+					],
+					receivePhone: [{
+							validator: (rule, value, callback) => {
+								return this.$u.test.mobile(value)
+							},
+							message: '手机号格式不正确',
+							trigger: ['change', 'blur']
+						},
+						{
+							validator: (rule, value, callback) => {
+								return !this.checkMobile(value)
+							},
+							message: '手机号不能与其他收货人重复',
+							trigger: ['blur']
 						}
-					});
+
+					]
 				},
-				ChooseImageCar() {
-					uni.chooseImage({
-						count: 1, //默认9
-						sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
-						sourceType: ['album','camera'], //从相册选择
-						success: (res) => {
-							//上传图片
-							//图片路径可自行修改
-							uploadImage(res.tempFilePaths[0], 'carNoImg/',
-								result => {
-									if (this.carNoImg.length != 0) {
-										this.carNoImg1 = result
-									} else {
-										this.carNoImg = result
+				recipientsNumber:false
+			}
+		},
+		computed: {
+
+		},
+		onShow() {},
+		onReady() {
+			this.$refs.uForm.setRules(this.rules);
+		},
+		onLoad(option) {
+			debugger
+			this.userInfo.infoId = option.id;
+			this.getDetail(option.id);
+
+		},
+		methods: {
+			// 手机号重复校验
+			checkMobile(val) {
+				debugger
+				let _data = this.dataList.receivingUsers;
+				if (_data == null || _data.length == 0) return false
+				for (let i = 0; i < _data.length; i++) {
+					if (val == _data[i].receivePhone) return true
+				}
+				return false
+			},
+			getDetail(id) {
+				this.$api.doRequest('get', 'freightReceivingDispatching/getFreightReceivingDispatching', {
+					"id": id
+				}).then(res => {
+
+					if (res.data.code == 200) {
+						this.dataList = res.data.data
+						if(this.dataList.length>=20) this.recipientsNumber = true
+						console.log("this.dataList----------------------")
+						console.log(this.dataList)
+					} else {
+
+					}
+
+
+				}).catch(res => {
+					// uni.showToast({
+					// 	title: res.data.message,
+					// 	icon: 'none',
+					// 	duration: 2000
+					// })
+				})
+			},
+			submit() {
+				debugger
+				let that = this
+				this.$refs.uForm.validate(valid => {
+					if (valid) {
+						that.$api.doRequest('post', '/freightReceivingDispatching/api/insertReceivingUser', this
+							.userInfo).then(res => {
+							debugger
+							if (res.data.code == 200) {
+								uni.showToast({
+									title: '提交成功',
+									icon: 'none',
+									duration: 2000,
+									success: function() {
+										debugger
+
 									}
-									uni.hideLoading();
-								}
-							)
-						}
-					});
-				},
-				ViewImage(e) {
-					var img = [];
-					img = e.currentTarget.dataset.url.split(' ')
-					uni.previewImage({
-						current:0,
-						urls: img
-					});
-				},
-				DelImg(e) {
-					uni.showModal({
-						title: '提示',
-						content: '确定要删除该照片吗?',
-						cancelText: '取消',
-						confirmText: '确定',
-						success: res => {
-							if (res.confirm) {
-								if(e.currentTarget.dataset.index == 0){
-									this.personNoImg = "";
-								}
-								else if(e.currentTarget.dataset.index == 1){
-									this.personNoImg1 = "";
-								}
-								else if(e.currentTarget.dataset.index == 2){
-									this.driverNoImg = "";
-								}
-								else if(e.currentTarget.dataset.index == 3){
-									this.driverNoImg1 = "";
-								}
-								else if(e.currentTarget.dataset.index == 4){
-									this.carNoImg = "";
-								}
-								else if(e.currentTarget.dataset.index == 5){
-									this.carNoImg1 = "";
-								}
-								
+								})
+
+							} else {
+								uni.showToast({
+									title: '提交失败',
+									icon: 'none',
+									duration: 2000,
+									success: function() {}
+								})
 							}
-						}
-					})
-				},
+
+						}).catch(res => {
+							// uni.showToast({
+							// 	title: res.data.message,
+							// 	icon: 'none',
+							// 	duration: 2000
+							// })
+						})
+						console.log('验证通过');
+					} else {
+						console.log('验证失败');
+						return
+					}
+				});
+
 			},
-		}
+			del(val) {
+				debugger
+				let that = this
+				uni.showModal({
+					content: '确定删除该收货人?',
+					cancelText: "取消",
+					confirmText: "删除",
+					success: function(res) {
+						if (res.confirm) {
+							that.$api.doRequest('post','/receivingUser/deleteInfo', {
+								"id": val.id
+							}).then(res => {
+								if (res.data.code == 200) {
+									uni.showToast({
+										title: '删除成功',
+										icon: 'none',
+										duration: 2000,
+										success: function() {debugger
+											that.getDetail(that.userInfo.infoId)
+										}
+									})
+
+								} else {
+									uni.showToast({
+										title: '删除失败',
+										icon: 'none',
+										duration: 2000,
+										success: function() {}
+									})
+								}
+
+
+							}).catch(res => {
+								// uni.showToast({
+								// 	title: res.data.message,
+								// 	icon: 'none',
+								// 	duration: 2000
+								// })
+							})
+						} else if (res.cancel) {}
+					}
+				});
+
+			}
+		},
+	}
 </script>
 
-<style scoped>
-	.container{
+<style scoped lang="scss">
+	.container {
 		padding: 10px 10px;
 		background-color: #F5F6FA;
 	}
-	.title1{
-		font-size: 18px;
-		font-weight: 600;
-		}
-	.cu-form-group input {
-		text-align: right;
-	}
-	.text-white text{
-		background: linear-gradient(45deg, #3DC146, #B2D612);
-		padding:5px 10px;
-		border-radius: 38rpx;
-	}
+
 	.cu-form-group textarea {
 		text-align: right;
 	}
-	.commit{
+
+	.commit {
 		background: linear-gradient(45deg, #DF331C, #DA611A);
-		color:#fff;
+		color: #fff;
 	}
+
 	.c-row {
 		display: -webkit-box;
 		display: -webkit-flex;
@@ -396,34 +253,60 @@
 		align-items: center;
 		padding: 20rpx 30rpx;
 		position: relative;
+
+		.title {
+			width: 30%;
+			// background: green;
+		}
 	}
+
 	.con-list {
-		-webkit-box-flex: 1;
-		-webkit-flex: 1;
-		flex: 1;
-		display: -webkit-box;
-		display: -webkit-flex;
 		display: flex;
-		-webkit-box-orient: vertical;
-		-webkit-box-direction: normal;
-		-webkit-flex-direction: column;
-		flex-direction: column;
-		color: #303133;
-		line-height: 40rpx;
-		text-align: right;
-		padding-right: 20rpx;
-		font-size: 14px;
+		// background: red;
+		width: 100%;
+		justify-content: space-between;
+		align-items: center;
+
+		.del {
+			display: block;
+			width: 29rpx;
+			height: 31rpx;
+		}
 	}
-	.information{
+
+	.information {
 		background-color: #FFFFFF;
 		border-radius: 20px;
 		margin-top: 10px;
 	}
-	.btn{
+
+	.btn {
 		margin-top: 10px;
 		border-radius: 25px;
 		background-color: #22C572;
 		border: none;
 		color: #FFFFFF;
 	}
+
+	.uForm {
+		padding: 0 40rpx;
+	}
+
+	.custom-style {
+		color: #606266;
+		width: 400rpx;
+	}
+
+	.submit-btn {
+		margin-top: 20rpx;
+		width: 100%;
+		background: #22C572;
+		border-radius: 92rpx;
+		font-size: 34rpx;
+		font-weight: 500;
+		color: #FFFFFF;
+	}
+	.btn-bgccolor{
+		background: #D8DAE0;
+	}
 </style>

+ 264 - 118
pageA/freightTransport/addsendgoods.vue

@@ -1,70 +1,118 @@
 <template>
 	<view class="center">
 		<view class="transaction">
-			<view class="c-row b-b margin-top">
+			<u-form :model="purchaseOrder" ref="uForm" class="uForm">
+				<u-form-item label="业务编号" prop="businessNumber" label-width="140" required>
+					<u-input v-model="purchaseOrder.businessNumber" input-align="right" placeholder="请输入业务编号"/>
+				</u-form-item>
+				<u-form-item label="收货方" prop="consignee" label-width="140" required>
+					<u-input v-model="purchaseOrder.consignee" input-align="right" placeholder="请输入收货方名称"/>
+				</u-form-item>
+				<u-form-item label="发货方" prop="shipper" label-width="140" required>
+					<u-input v-model="purchaseOrder.shipper" input-align="right" placeholder="请输入发货方名称"/>
+				</u-form-item>
+				<u-form-item label="货名" prop="goodsName" label-width="140" required>
+					<u-input v-model="purchaseOrder.goodsName" input-align="right" placeholder="请输入货名,如玉米"/>
+				</u-form-item>
+				<u-form-item label="货物单价(元/吨)" prop="goodsPrice" label-width="250" required>
+					<u-input v-model="purchaseOrder.goodsPrice" input-align="right" placeholder="请输入货物单价"/>
+				</u-form-item>
+				<u-form-item label="运费单价(元/吨)" prop="freightUnitPrice" label-width="250" required>
+					<u-input v-model="purchaseOrder.freightUnitPrice" input-align="right" placeholder="请输入运费单价"/>
+				</u-form-item>
+				<u-form-item label="运费承担方" prop="freightUnitPrice" label-width="250" required>
+						<!-- <u-select v-model="isFreightUnitPrice" :list="packingType" :default-value="defaultValue" mode="single-column" @confirm="packingChange"></u-select> -->
+						<view class="con-list">
+							<picker @change="packingChange" :value="packingIndex" :range="packingType">
+								<view class="picker">
+									{{packingIndex>-1?packingType[packingIndex]:'请选择'}}
+								</view>
+							</picker>
+						</view>
+				</u-form-item>
+			<u-form-item label="收货地址" prop="receivingAddress" label-width="140" required>
+				<u-input v-model="purchaseOrder.receivingAddress" input-align="right" placeholder="请输入收货地址"/>
+			</u-form-item>
+			<u-form-item label="收货人账号" prop="accountNumber" label-width="160" required>
+				<u-input v-model="purchaseOrder.accountNumber" input-align="right" placeholder="请输入收货人账号"/>
+			</u-form-item>
+			</u-form>
+			
+			<!-- <view class="c-row b-b margin-top">
 				<view class="title">业务编号</view>
 				<view class="con-list">
-				<input v-model='purchaseOrder.transactionsNumber' placeholder="请输入业务编号" placeholder-style="font-size: 12px;" name="input"></input>
+					<input v-model='purchaseOrder.businessNumber' placeholder="请输入业务编号"
+						placeholder-style="font-size: 12px;" name="input"></input>
 				</view>
-			</view>
-			<view  class="c-row b-b">
+			</view> -->
+<!-- 			<view class="c-row b-b">
 				<view class="title">收货方</view>
 				<view class="con-list">
-				<input v-model='purchaseOrder.transactionsNumber' placeholder="请输入收货方名称" placeholder-style="font-size: 12px;" name="input"></input>
+					<input v-model='purchaseOrder.consignee' placeholder="请输入收货方名称" placeholder-style="font-size: 12px;"
+						name="input"></input>
 				</view>
-			</view>
-			<view  class="c-row b-b">
+			</view> -->
+	<!-- 		<view class="c-row b-b">
 				<view class="title">发货方</view>
 				<view class="con-list">
-				<input v-model='purchaseOrder.transactionsNumber' placeholder="请输入发货方名称" placeholder-style="font-size: 12px;" name="input"></input>
+					<input v-model='purchaseOrder.shipper' placeholder="请输入发货方名称" placeholder-style="font-size: 12px;"
+						name="input"></input>
 				</view>
-			</view>
-			<view  class="c-row b-b">
+			</view> -->
+			<!-- <view class="c-row b-b">
 				<view class="title">货名</view>
 				<view class="con-list">
-				<input v-model='purchaseOrder.transactionsNumber' placeholder="请输入货名,如玉米" placeholder-style="font-size: 12px;" name="input"></input>
+					<input v-model='purchaseOrder.goodsName' placeholder="请输入货名,如玉米"
+						placeholder-style="font-size: 12px;" name="input"></input>
 				</view>
-			</view>
-			<view  class="c-row b-b">
+			</view> -->
+			<!-- <view class="c-row b-b">
 				<view class="title">货物单价(元/吨)</view>
 				<view class="con-list">
-				<input v-model='purchaseOrder.transactionsNumber' placeholder="请输入货物单价" placeholder-style="font-size: 12px;" name="input"></input>
+					<input v-model='purchaseOrder.goodsPrice' placeholder="请输入货物单价" placeholder-style="font-size: 12px;"
+						name="input"></input>
 				</view>
-			</view>
-			<view  class="c-row b-b">
+			</view> -->
+			<!-- <view class="c-row b-b">
 				<view class="title">运费单价(元/吨)</view>
 				<view class="con-list">
-				<input v-model='purchaseOrder.transactionsNumber' placeholder="请输入运费单价" placeholder-style="font-size: 12px;" name="input"></input>
+					<input v-model='purchaseOrder.freightUnitPrice' placeholder="请输入运费单价"
+						placeholder-style="font-size: 12px;" name="input"></input>
 				</view>
-			</view>
-			<view  class="c-row b-b">
+			</view> -->
+			<!-- <view class="c-row b-b">
 				<view class="title">运费承担方</view>
 				<view class="con-list">
-				<picker @change="packingChange" :value="packingIndex" :range="packingType">
-					<view class="picker">
-						{{packingIndex>-1?packingType[packingIndex]:'请选择'}}
-					</view>
-				</picker>
+					<picker @change="packingChange" :value="packingIndex" :range="packingType">
+						<view class="picker">
+							{{packingIndex>-1?packingType[packingIndex]:'请选择'}}
+						</view>
+					</picker>
 				</view>
-			</view>
-			<view  class="c-row b-b">
+			</view> -->
+	<!-- 		<view class="c-row b-b">
 				<view class="title">收货地址</view>
 				<view class="con-list">
-				<input v-model='purchaseOrder.transactionsNumber' placeholder="请输入收货地址" placeholder-style="font-size: 12px;" name="input"></input>
+					<input v-model='purchaseOrder.receivingAddress' placeholder="请输入收货地址"
+						placeholder-style="font-size: 12px;" name="input"></input>
 				</view>
 			</view>
-			<view  class="c-row">
+			<view class="c-row">
 				<view class="title">收货人账号</view>
 				<view class="con-list">
-				<input v-model='purchaseOrder.transactionsNumber' placeholder="请输入收货人账号" placeholder-style="font-size: 12px;" name="input"></input>
+					<input v-model='purchaseOrder.accountNumber' placeholder="请输入收货人账号"
+						placeholder-style="font-size: 12px;" name="input"></input>
 				</view>
-			</view>
+			</view> -->
 		</view>
-	<view class='footer'>
-		<button class="btn" @click="commit()">提交</button>
-	</view>
-			
-	
+		<view class="account-tip">
+			注:收货人账号为收货人注册易粮易运的手机号码
+		</view>
+		<view class='footer'>
+			<button class="btn" @click="commit()">提交</button>
+		</view>
+
+
 	</view>
 </template>
 
@@ -73,26 +121,98 @@
 		name: "business",
 		data() {
 			return {
-				purchaseOrder:{}
+				purchaseOrder: {
+					freightPayer: "发货方承担"
+				},
+				packingType: ["发货方承担","收货方承担"],
+				isFreightUnitPrice:true,
+				packingIndex:0,
+				phone:""
 			}
 		},
 		onShow() {
-			
+
 		},
-		onLoad(options) {
-			
+		onLoad(options) {debugger
+			this.phone = options.phone
 		},
 		onPageScroll(e) {
-			
+
 		},
 		//下拉刷新
-		onPullDownRefresh() {
-		},
+		onPullDownRefresh() {},
 		onReachBottom() { //上拉触底函数
 		},
 		methods: {
-			
-
+			packingChange(event) {
+				console.log(event)
+				this.packingIndex = event.detail.value;
+			},
+			commit() {
+				debugger
+				this.purchaseOrder.accountNumber= this.phone
+				this.$api.doRequest('post', '/freightReceivingDispatching/api/insertFreightReceivingDispatching',this.purchaseOrder).then(res => {debugger
+					// if(res.data.code=='200'){
+					// 	uni.showModal({
+					// 		title: '提示',
+					// 		content: '该手机号已认证过司机,再次认证将覆盖之前的认证信息,是否确定认证?',
+					// 		success: function (res) {
+					// 			if (res.confirm) {
+					// 				that.DriverViewInfo.cover=1
+					// 					that.$api.doRequest('post', '/driverViewInfo/api/editInfo', that.DriverViewInfo).then(res => {
+					// 					}).catch(res => {
+					// 						uni.showToast({
+					// 							title: '提交成功',
+					// 							icon: 'none',
+					// 							duration: 2000
+					// 						})
+					// 						uni.navigateTo({
+					// 							url: `/pages/attestation/indexThree` 
+					// 						})
+					// 					})
+					// 		        } else if (res.cancel) {
+					// 		          uni.showToast({
+					// 		          	title: '提交失败',
+					// 		          	icon: 'none',
+					// 		          	duration: 2000
+					// 		          })
+					// 		        }
+					// 		    }
+					// 		});
+					
+					
+					// }else if(res.data.code==200){
+					// 	uni.showToast({
+					// 		title: '提交成功',
+					// 		icon: 'none',
+					// 		duration: 2000
+					// 	})
+					// 	uni.navigateTo({
+					// 		url: `/pages/attestation/indexThree` 
+					// 	})
+					// }
+					if(res.data.code==200){
+							uni.showToast({
+								title: '提交成功',
+								icon: 'none',
+								duration: 2000,
+								success:function(){
+									uni.navigateTo({
+											url: `/pageA/freightTransport/index` 
+										})
+								}
+							})
+					
+					}
+					
+				}).catch(res => {
+						// uni.showToast({
+						// 	title: res.data.message,
+						// 	icon: 'none',
+						// 	duration: 2000
+						// })
+				})
+			}
 		}
 	}
 </script>
@@ -102,38 +222,43 @@
 	.content {
 		background: #F5F6FA;
 	}
-.c-row {
-	    display: -webkit-box;
-	    display: -webkit-flex;
-	    display: flex;
-	    -webkit-box-align: center;
-	    -webkit-align-items: center;
-	    align-items: center;
-	    padding: 20rpx 30rpx;
-	    position: relative;
+
+	.c-row {
+		display: -webkit-box;
+		display: -webkit-flex;
+		display: flex;
+		-webkit-box-align: center;
+		-webkit-align-items: center;
+		align-items: center;
+		padding: 20rpx 30rpx;
+		position: relative;
 	}
+
 	.con-list {
-	    -webkit-box-flex: 1;
-	    -webkit-flex: 1;
-	    flex: 1;
-	    display: -webkit-box;
-	    display: -webkit-flex;
-	    display: flex;
-	    -webkit-box-orient: vertical;
-	    -webkit-box-direction: normal;
-	    -webkit-flex-direction: column;
-	    flex-direction: column;
-	    color: #303133;
-	    line-height: 40rpx;
-	    text-align: right;
-	    padding-right: 20rpx;
-	}
-	.transaction{
+		-webkit-box-flex: 1;
+		-webkit-flex: 1;
+		flex: 1;
+		display: -webkit-box;
+		display: -webkit-flex;
+		display: flex;
+		-webkit-box-orient: vertical;
+		-webkit-box-direction: normal;
+		-webkit-flex-direction: column;
+		flex-direction: column;
+		color: #303133;
+		line-height: 40rpx;
+		text-align: right;
+		/* padding-right: 20rpx; */
+		/* color: red; */
+	}
+
+	.transaction {
 		background-color: #FFFFFF;
 		margin: 10px;
 		padding-bottom: 10px;
 		border-radius: 20px;
 	}
+
 	.line {
 		display: inline-block;
 		padding: 5px;
@@ -233,54 +358,64 @@
 		padding-bottom: 100upx;
 		display: flex;
 		flex-wrap: wrap;
-		padding:30upx;
+		padding: 30upx;
 		background: #fff;
-		margin:10px;
-		border-radius:6px;
-		.type{
-			border-radius:10px;
-			padding:5px;
-			wdith:22px;height:22px;
-			line-height:14px;
-			font-size:12px;
+		margin: 10px;
+		border-radius: 6px;
+
+		.type {
+			border-radius: 10px;
+			padding: 5px;
+			wdith: 22px;
+			height: 22px;
+			line-height: 14px;
+			font-size: 12px;
 		}
-		.type.send{
-			background:#22C572;
-			color:#fff;
+
+		.type.send {
+			background: #22C572;
+			color: #fff;
 		}
-		.type.put{
-			background:#FD714F;
-			color:#fff;
+
+		.type.put {
+			background: #FD714F;
+			color: #fff;
 		}
-		.businessnumber{
-			font-size:16px;
-			font-weight:600;
+
+		.businessnumber {
+			font-size: 16px;
+			font-weight: 600;
 		}
-		.consigner{
-			font-size:12px;
+
+		.consigner {
+			font-size: 12px;
 		}
-		.time{
-			color:#878C9C;
+
+		.time {
+			color: #878C9C;
 		}
-		.goods{
-			font-size:12px;
+
+		.goods {
+			font-size: 12px;
 		}
-		.goodsstatus{
-			background:#F9F9FA;
-			color:#9698A2;
-			padding:10px 0;
-			padding-left:47px;
-			margin:10px 0;
+
+		.goodsstatus {
+			background: #F9F9FA;
+			color: #9698A2;
+			padding: 10px 0;
+			padding-left: 47px;
+			margin: 10px 0;
 		}
-		.del{
-			width:60px;
+
+		.del {
+			width: 60px;
 			height: 33px;
-			line-height:33px;
-			font-size:14px;
+			line-height: 33px;
+			font-size: 14px;
 			background: #fff;
-			border:1px solid #CDCDCD;
-			border-radius:30px;
-			text-align:center;
+			border: 1px solid #CDCDCD;
+			border-radius: 30px;
+			text-align: center;
 		}
 	}
 
@@ -503,20 +638,31 @@
 			}
 		}
 	}
-	.footer{
-		position:fixed;
-		bottom:0;
+
+	.footer {
+		position: fixed;
+		bottom: 0;
 		width: 100%;
-		padding:20px 0;
+		padding: 20px 0;
 	}
-	.btn{
-		width:90%;
-		background:#22C572;
-		color:#fff;
-		border-radius:30px;
+
+	.btn {
+		width: 90%;
+		background: #22C572;
+		color: #fff;
+		border-radius: 30px;
+	}
+
+	.btn:after {
+		border: none;
+	}
+	.account-tip{
+		font-size: 24rpx;
+		font-weight: 400;
+		color: #AFB3BF;
+		padding-left: 60rpx;
 	}
-	.btn:after{
-		border:none;
+	.uForm {
+		padding: 0 40rpx;
 	}
 </style>
-

+ 321 - 365
pageA/freightTransport/confirmpaygoods.vue

@@ -1,36 +1,23 @@
 <template>
 	<view class="container">
 		<view class="information">
-			<view class="c-row b-b">
-				<view class="title">车牌号</view>
-				<view class="con-list">
-				<input maxlength='7' placeholder="请输入车牌号" name="input" v-model="goods.carNo"></input>
-				</view>
-			</view>
-
-			<view class="c-row b-b">
-				<view class="title">毛重(吨)</view>
-				<view class="con-list">
-				<input placeholder="请输入毛重" type="mobile" name="input"  @input="grossWeightchange" v-model="goods.grossWeight"></input>
-			</view>
-			</view>
-			<view class="c-row b-b">
-				<view class="title">皮重(吨)</view>
-				<view class="con-list">
-				<input placeholder="请输入皮重" type="mobile" name="input"  @input="tarechange" v-model="goods.tare"></input>
-			</view>
-			</view>
-			<view class="c-row b-b">
-				<view class="title">净重(吨)</view>
-				<view class="con-list">
-				<view class="con-list">
-				<input placeholder="自动计算" type="mobile" name="input" v-model="goods.loadNetWeight"></input>
-				</view>
-			</view>
-			</view>
-				
-			</view>
-			<view class="information">
+			<u-form :model="goods" ref="uForm" class="uForm">
+				<u-form-item label="车牌号" prop="carNo" label-width="120" required>
+					<u-input v-model="goods.carNo" input-align="right" disabled placeholder="请输入车牌号" maxlength='7' />
+				</u-form-item>
+				<u-form-item label="毛重(吨)" prop="reciveGrossWeight" label-width="120" required>
+					<u-input v-model="goods.reciveGrossWeight" input-align="right" placeholder="请输入毛重"
+						@input="grossWeightchange" />
+				</u-form-item>
+				<u-form-item label="皮重(吨)" prop="reciveTare" label-width="120" required>
+					<u-input v-model="goods.reciveTare" input-align="right" placeholder="请输入皮重" @input="tarechange" />
+				</u-form-item>
+				<u-form-item label="净重(吨)" prop="dispatchNetWeight" label-width="120" required>
+					<u-input v-model="goods.dispatchNetWeight" disabled input-align="right" placeholder="自动计算" />
+				</u-form-item>
+			</u-form>
+		</view>
+		<view class="information">
 			<view class="c-row">
 				<view class="action">
 					上传磅单照片
@@ -38,21 +25,22 @@
 			</view>
 			<view class="c-row">
 				<view class="grid col-4 grid-square flex-sub">
-					<view class="bg-img" v-if="goods.loadPoundImg != ''" @tap="ViewImage" :data-url="goods.loadPoundImg">
-					 <image :src="goods.loadPoundImg" mode="aspectFit"></image>
+					<view class="bg-img" v-if="goods.reciveCollectionScreenshot != ''" @tap="ViewImage"
+						:data-url="goods.reciveCollectionScreenshot">
+						<image :src="goods.reciveCollectionScreenshot" mode="aspectFit"></image>
 						<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="0">
 							<text class='cuIcon-close'></text>
 						</view>
 					</view>
-					<view class="solids" @tap="ChooseImagePerson" v-if="goods.loadPoundImg == ''">
+					<view class="solids" @tap="ChooseImagePerson" v-if="goods.reciveCollectionScreenshot == ''">
 						<text class='cuIcon-cameraadd'></text>
 					</view>
 				</view>
 			</view>
-			</view>
-			
-				<button class="btn btns" @click="getList">提交</button>
-			
+		</view>
+
+		<button class="btn btns" @click="getList">提交</button>
+
 		<!-- </block> -->
 	</view>
 </template>
@@ -63,360 +51,321 @@
 		mapState
 	} from 'vuex';
 	export default {
-			name: "trust",
-			data() {
-				return {
-					goods: {
-						tranCarNo:'',
-						carNo:'',
-						grossWeight:'',
-						tare:'',
-						loadNetWeight:'',
-						loadPoundImg:'',
-						 contractNo:'',
-						 goodsName:'',
-						 sendDateStart:''
-						
-					},
-					params:{
-						year: true,
-						month: true,
-						day: true,
-					},
-					carNo:'',
-					PageCur: "trust",
-					TabCur: 0,
-					priceTypeIndex:-1,
-					priceType: ['库内价', '到库价', '到港价'],
-					unitPrice:0,
-					price:'',
-					seller:'',
-					sellerPhone:'',
-					minSale:'',
-					exsitCount:0,
-					origin:'',
-					stock:'',
-					show:false,
-					goodsName:'',
-					verifyCode:'',
-					sendText0:'获取验证码',
-					sendText1:'获取验证码',
-					sendText2:'获取验证码',
-					sendText3:'获取验证码',
-					sendDisabled0: false,
-					sendDisabled1: false,
-					sendDisabled2: false,
-					sendDisabled3: false,
-					buyer:'',
-					buyerPhone:'',
-					level:'',
-					sender:'',
-					senderPhone:'',
-					receiver:'',
-					receiverPhone:'',
-					total:0,
-					startPlace:'',
-					endPlace:'',
-					driver:'',
-					driverPhone:'',
-					carNo:'',
-					personNoImg:'',
-					personNoImg1:'',
-					driverNoImg:'',
-					driverNoImg1:'',
-					carNoImg:'',
-					carNoImg1:'',
-					goodsName:'',
-					showTran:true
-				};
+		name: "trust",
+		data() {
+			return {
+				goods: {
+					reciveCollectionScreenshot: ''
+				},
+				rules: {
+					carNo: [{
+						validator: (rule, value, callback) => {
+							return !this.$u.test.carNo(value)
+						},
+						message: '车牌号格式不正确',
+						trigger: ['change', 'blur']
+					}, ],
+					reciveGrossWeight: [{
+							validator: (rule, value, callback) => {
+								return !this.$u.test.isEmpty(value)
+							},
+							message: '毛重不能为空',
+							trigger: ['change', 'blur']
+						},
+						{
+							validator: (rule, value, callback) => {
+								return this.$u.test.amount(value)
+							},
+							message: '数值类型,最多保留两位小数',
+							trigger: ['change', 'blur'],
+						},
+						{
+							validator: (rule, value, callback) => {
+								return this.$u.test.range(value, [1, 100])
+							},
+							message: '数值类型,1-100之间',
+							trigger: ['change', 'blur'],
+						},
+
+					],
+					reciveTare: [{
+							validator: (rule, value, callback) => {
+								return !this.$u.test.isEmpty(value)
+							},
+							message: '皮重不能为空',
+							trigger: ['change', 'blur']
+						},
+						{
+							validator: (rule, value, callback) => {
+								return this.$u.test.amount(value)
+							},
+							message: '数值类型,最多保留两位小数',
+							trigger: ['change', 'blur'],
+						},
+						{
+							validator: (rule, value, callback) => {
+								return this.$u.test.range(value, [1, 100])
+							},
+							message: '数值类型,1-50之间',
+							trigger: ['change', 'blur'],
+						},
+
+					],
+				},
+				id: "",
+				params: {
+					year: true,
+					month: true,
+					day: true,
+				},
+				carNo: '',
+				PageCur: "trust",
+				TabCur: 0,
+				priceTypeIndex: -1,
+				priceType: ['库内价', '到库价', '到港价'],
+				unitPrice: 0,
+				price: '',
+				seller: '',
+				sellerPhone: '',
+				minSale: '',
+				exsitCount: 0,
+				origin: '',
+				stock: '',
+				show: false,
+				goodsName: '',
+				verifyCode: '',
+				sendText0: '获取验证码',
+				sendText1: '获取验证码',
+				sendText2: '获取验证码',
+				sendText3: '获取验证码',
+				sendDisabled0: false,
+				sendDisabled1: false,
+				sendDisabled2: false,
+				sendDisabled3: false,
+				buyer: '',
+				buyerPhone: '',
+				level: '',
+				sender: '',
+				senderPhone: '',
+				receiver: '',
+				receiverPhone: '',
+				total: 0,
+				startPlace: '',
+				endPlace: '',
+				driver: '',
+				driverPhone: '',
+				carNo: '',
+				personNoImg: '',
+				personNoImg1: '',
+				driverNoImg: '',
+				driverNoImg1: '',
+				carNoImg: '',
+				carNoImg1: '',
+				goodsName: '',
+				showTran: true
+			};
+		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo']),
+			time() {
+				var date = new Date()
+				var year = date.getFullYear()
+				var month = date.getMonth()
+				var date1 = date.getDate()
+				if (month + 1 < 10) {
+					month = "0" + (month + 1)
+				}
+				if (date1 + 1 < 10) {
+					date1 = "0" + date1
+				}
+				return year + '-' + month + "-" + date1
 			},
-			computed: {
-				...mapState(['hasLogin','userInfo']),
-					time() {
-						var date=new Date()
-						var year=date.getFullYear()
-						var month=date.getMonth()
-						var date1=date.getDate()
-						if(month+1<10){
-							month="0"+(month+1)
-						}
-						if(date1+1<10){
-							date1="0"+date1
-						}
-						return year+'-'+month+"-"+date1
-					},
-					startDate() {
-					//限制开始时间;
-					//也可以直接限定为当天日期 var date= new Date(); return date
-						return new Date(new Date(new Date().toLocaleDateString()).getTime()-(1*60*60*1000))
-					},
-					endDate() {
-						return new Date()
-					}
-				},	
-			onShow() {
+			startDate() {
+				//限制开始时间;
+				//也可以直接限定为当天日期 var date= new Date(); return date
+				return new Date(new Date(new Date().toLocaleDateString()).getTime() - (1 * 60 * 60 * 1000))
 			},
-			onLoad(option) {
-				this.goods.planId=option.planId
-				this.goodsName=option.goodsName
-				this.contractNo = option.contractNo
-				this.goods.goodsName=option.goodsName
-				this.goods.contractNo = option.contractNo
-				this.goods.tranCarNo=option.tranCarNo
-				console.log(this.goods.tranCarNo)
-				
+			endDate() {
+				return new Date()
+			}
+		},
+		onShow() {},
+		onReady() {
+			this.$refs.uForm.setRules(this.rules);
+		},
+		onLoad(option) {
+			debugger
+			this.goods = JSON.parse(option.toINfo)
+			this.id = options.id
+			this.goods.reciveCollectionScreenshot = this.goods.reciveCollectionScreenshot == null ? '' : this.goods
+				.reciveCollectionScreenshot
+		},
+		methods: {
+			DateChange(e) {
+				this.goods.sendDateStart = e.year + '-' + e.month + '-' + e.day
+				// this.goods.sendDateStart = e.detail.value
 			},
-			methods: {
-				 DateChange(e) {
-					 this.goods.sendDateStart=e.year+'-'+e.month+'-'+e.day
-				 	// this.goods.sendDateStart = e.detail.value
-				 },
-				commit1(item){
-					uni.navigateTo({				
-						url: `/pageB/contract/look?id=${item.id}&netWeight=${item.netWeight}&carNo=${item.carNo}&sendDateStart=${item.sendDateStart}`
-					})
-				},
-				grossWeightchange(e) {
-				      if (this.goods.grossWeight && this.goods.tare) {
-				        this.goods.loadNetWeight = Number(
-				          this.goods.grossWeight - this.goods.tare
-				        )
-				      }
-				    },
-				tarechange(e) {
-				      if (this.goods.grossWeight && this.goods.tare) {
-				        this.goods.loadNetWeight = Number(
-				          this.goods.grossWeight - this.goods.tare
-				        )
-				      }
-				    },
-				getList(){
-					// tranCarNo:'',
-					// carNo:'',
-					// grossWeight:'',
-					// tare:'',
-					// loadNetWeight:'',
-					// loadPoundImg:'',
-					//  contractNo:'',
-					//  goodsName:'',
-					if(this.goods.carNo.length==0){
-						this.$api.msg('车牌号不能为空')
-						return
-					}
-					if(this.goods.carNo.length!=7){
-						this.$api.msg('车牌号输入错误')
-						return
-					}
-					if(this.goods.driverPhone.length==0){
-						this.$api.msg('手机号不能为空')
-						return
-					}
-					if(this.goods.driverPhone.length!=11){
-						this.$api.msg('司机手机号输入错误')
-						return
-					}
-					if(this.goods.grossWeight==''){
-						this.$api.msg('毛重不能为空')
-						return
-					}
-					if(this.goods.tare==''){
-						this.$api.msg('皮重不能为空')
-						return
-					}
-					if(this.goods.grossWeight>100){
-						this.$api.msg('毛重输入错误')
-						return
+			commit1(item) {
+				uni.navigateTo({
+					url: `/pageB/contract/look?id=${item.id}&netWeight=${item.netWeight}&carNo=${item.carNo}&sendDateStart=${item.sendDateStart}`
+				})
+			},
+			grossWeightchange(e) {
+				console.log(e);
+				if (this.goods.reciveGrossWeight && this.goods.reciveTare) {
+					this.goods.dispatchNetWeight = Number(
+						this.goods.reciveGrossWeight - this.goods.reciveTare
+					)
+				}
+			},
+			tarechange(e) {
+				if (this.goods.reciveGrossWeight && this.goods.reciveTare) {
+					this.goods.dispatchNetWeight = Number(
+						this.goods.reciveGrossWeight - this.goods.reciveTare
+					)
+				}
+			},
+			ChooseImagePerson() {
+				uni.chooseImage({
+					count: 1, //默认9
+					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+					sourceType: ['album', 'camera'], //从相册选择
+					success: (res) => {
+						//上传图片
+						//图片路径可自行修改
+
+						uploadImage(res.tempFilePaths[0], 'reciveCollectionScreenshot/',
+							result => {
+								debugger
+								this.goods.reciveCollectionScreenshot = result
+								uni.hideLoading();
+							}
+						)
 					}
-					if(this.goods.tare>50){
-						this.$api.msg('皮重输入错误')
-						return
+				});
+			},
+			DelImg(e) {
+				uni.showModal({
+					title: '提示',
+					content: '确定要删除该照片吗?',
+					cancelText: '取消',
+					confirmText: '确定',
+					success: res => {
+						debugger
+						if (res.confirm) {
+							this.goods.reciveCollectionScreenshot = ""
+						}
 					}
-					var that=this
-					uni.showModal({
-						content: '确定提交发车信息?',
-						success: function (res) {
-							if (res.confirm) {
-								that.$api.doRequest('post','/tranCarInfo/api/addTranTask',that.goods).then(res => {
-								    if(res.data.code==200){
-										console.log(that.goods)
-										uni.showModal({
-											content: '提交成功!',
-											success: function (res) {
-												if (res.confirm) {
-													var result = that.goods.tranCarNo.substr(that.goods.tranCarNo.indexOf("C") + 1,that.goods.tranCarNo.length);
-												    var num=Number(result)+1
-													if(num<=9){
-														num='C00'+num
-													}else if(num<100&&num>9){
-														num='C0'+num
-													}else  if(num<1000&&num>99){
-														num='C'+num
-													}
-													that.goods={
-														tranCarNo:num,
-														carNo:'',
-														grossWeight:'',
-														tare:'',
-														loadNetWeight:'',
-														loadPoundImg:'',
-														 contractNo:that.contractNo,
-														 goodsName:that.goodsName,
-														 sendDateStart:''	
+				})
+			},
+			getList() {
+				debugger
+				this.utils.nullToString(this.goods)
+				var that = this
+				uni.showModal({
+					content: '确定提交收货信息?',
+					success: function(res) {
+						if (res.confirm) {
+							that.$api.doRequest('post',
+									'/freightReceivingDispatching/api/confirmFreightReceivingDispatchingCar',
+									that.goods).then(
+									res => {
+										if (res.data.code == 200) {
+											debugger
+											console.log(that.goods)
+											uni.showModal({
+												content: '提交成功!',
+												success: function(res) {
+													if (res.confirm) {
+														that.$store.commit(
+															'configfreightTransport', true)
+														uni.navigateTo({
+															url: `/pageA/freightTransport/record/payrecord?id=` +
+																this.id
+														})
+														// var result = that.goods.tranCarNo.substr(
+														// 	that.goods.tranCarNo.indexOf("C") +
+														// 	1, that.goods.tranCarNo.length);
+														// var num = Number(result) + 1
+														// if (num <= 9) {
+														// 	num = 'C00' + num
+														// } else if (num < 100 && num > 9) {
+														// 	num = 'C0' + num
+														// } else if (num < 1000 && num > 99) {
+														// 	num = 'C' + num
+														// }
+														// that.goods = {
+														// 	tranCarNo: num,
+														// 	carNo: '',
+														// 	grossWeight: '',
+														// 	tare: '',
+														// 	loadNetWeight: '',
+														// 	loadPoundImg: '',
+														// 	contractNo: that.contractNo,
+														// 	goodsName: that.goodsName,
+														// 	sendDateStart: ''
+														// }
+													} else if (res.cancel) {
+														// uni.navigateBack();
 													}
-												}else if (res.cancel) {
-													uni.navigateBack();
 												}
-											}
-										});
-									}else if(res.data.code==11015){
-										uni.showToast({
-										 title: '该司机未认证身份,请司机认证后再操作',
-										 icon:'none',
-										 duration: 2000
-										})
-									}
-								    })
-								    .catch(res => {
-								     uni.showToast({
-								      title: res.errmsg,
-								      icon:'none',
-								      duration: 2000
-								     })
-								    });
-							} else if (res.cancel) {
-							
-							}
-						}
-					});
-				},
-				ChooseImagePerson() {
-					uni.chooseImage({
-						count: 1, //默认9
-						sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
-						sourceType: ['album','camera'], //从相册选择
-						success: (res) => {
-							//上传图片
-							//图片路径可自行修改
-							
-							uploadImage(res.tempFilePaths[0], 'loadPoundImg/',
-								result => {
-	
-								 	this.goods.loadPoundImg = result
-								 uni.hideLoading();
-								}
-							)
-						}
-					});
-				},
-				ChooseImageDriver() {
-					uni.chooseImage({
-						count: 1, //默认9
-						sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
-						sourceType: ['album','camera'], //从相册选择
-						success: (res) => {
-							//上传图片
-							//图片路径可自行修改
-							uploadImage(res.tempFilePaths[0], 'driverNoImg/',
-								result => {
-									if (this.driverNoImg.length != 0) {
-										this.driverNoImg1 = result
-									} else {
-										this.driverNoImg = result
-									}
-									uni.hideLoading();
-								}
-							)
-						}
-					});
-				},
-				ChooseImageCar() {
-					uni.chooseImage({
-						count: 1, //默认9
-						sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
-						sourceType: ['album','camera'], //从相册选择
-						success: (res) => {
-							//上传图片
-							//图片路径可自行修改
-							uploadImage(res.tempFilePaths[0], 'carNoImg/',
-								result => {
-									if (this.carNoImg.length != 0) {
-										this.carNoImg1 = result
-									} else {
-										this.carNoImg = result
-									}
-									uni.hideLoading();
-								}
-							)
-						}
-					});
-				},
-				ViewImage(e) {
-					var img = [];
-					img = e.currentTarget.dataset.url.split(' ')
-					uni.previewImage({
-						current:0,
-						urls: img
-					});
-				},
-				DelImg(e) {
-					uni.showModal({
-						title: '提示',
-						content: '确定要删除该照片吗?',
-						cancelText: '取消',
-						confirmText: '确定',
-						success: res => {
-							if (res.confirm) {
-								if(e.currentTarget.dataset.index == 0){
-									this.personNoImg = "";
-								}
-								else if(e.currentTarget.dataset.index == 1){
-									this.personNoImg1 = "";
-								}
-								else if(e.currentTarget.dataset.index == 2){
-									this.driverNoImg = "";
-								}
-								else if(e.currentTarget.dataset.index == 3){
-									this.driverNoImg1 = "";
-								}
-								else if(e.currentTarget.dataset.index == 4){
-									this.carNoImg = "";
-								}
-								else if(e.currentTarget.dataset.index == 5){
-									this.carNoImg1 = "";
-								}
-								
-							}
+											});
+										} else if (res.data.code == 11015) {
+											// uni.showToast({
+											// 	title: '该司机未认证身份,请司机认证后再操作',
+											// 	icon: 'none',
+											// 	duration: 2000
+											// })
+										}
+									})
+								.catch(res => {
+									uni.showToast({
+										title: res.errmsg,
+										icon: 'none',
+										duration: 2000
+									})
+								});
+						} else if (res.cancel) {
+
 						}
-					})
-				},
+					}
+				});
 			},
-		}
+
+		},
+	}
 </script>
 
 <style scoped>
-	.container{
+	.container {
 		padding: 10px 10px;
 		background-color: #F5F6FA;
 	}
-	.title1{
+
+	.title1 {
 		font-size: 18px;
 		font-weight: 600;
-		}
+	}
+
 	.cu-form-group input {
 		text-align: right;
 	}
-	.text-white text{
+
+	.text-white text {
 		background: linear-gradient(45deg, #3DC146, #B2D612);
-		padding:5px 10px;
+		padding: 5px 10px;
 		border-radius: 38rpx;
 	}
+
 	.cu-form-group textarea {
 		text-align: right;
 	}
-	.commit{
+
+	.commit {
 		background: linear-gradient(45deg, #DF331C, #DA611A);
-		color:#fff;
+		color: #fff;
 	}
+
 	.c-row {
 		display: -webkit-box;
 		display: -webkit-flex;
@@ -427,6 +376,7 @@
 		padding: 20rpx 30rpx;
 		position: relative;
 	}
+
 	.con-list {
 		-webkit-box-flex: 1;
 		-webkit-flex: 1;
@@ -444,16 +394,22 @@
 		padding-right: 20rpx;
 		font-size: 14px;
 	}
-	.information{
+
+	.information {
 		background-color: #FFFFFF;
 		border-radius: 20px;
 		margin-top: 10px;
 	}
-	.btn{
+
+	.btn {
 		margin-top: 10px;
 		border-radius: 25px;
 		background-color: #22C572;
 		border: none;
 		color: #FFFFFF;
 	}
+
+	.uForm {
+		padding: 0 40rpx;
+	}
 </style>

+ 361 - 384
pageA/freightTransport/contract_detail.vue

@@ -1,60 +1,39 @@
 <template>
 	<view class="container">
 		<view class="information">
-		<!-- <block v-if="TabCur==2"> -->
-		<view class="c-row">
-			<view class="title1">发车信息</view>
-			
-		</view>
-			<view class="c-row b-b">
-				<view class="title">派车编号</view>
-				<view class="con-list">
-					<input disabled  name="input" v-model="goods.tranCarNo"></input>
-				</view>
-			</view>
-			<view class="c-row b-b">
-				<view class="title">车牌号</view>
-				<view class="con-list">
-				<input maxlength='7' placeholder="请输入车牌号" name="input" v-model="goods.carNo"></input>
-				</view>
-			</view>
-			<view class="c-row b-b">
-				<view class="title">司机手机号</view>
-				<view class="con-list">
-				<input  maxlength='11' placeholder="请输入司机手机号" name="input" v-model="goods.driverPhone"></input>
-			  </view>
-			</view>
-			<view class="c-row b-b">
-				<view class="title">毛重(吨)</view>
-				<view class="con-list">
-				<input placeholder="请输入毛重" type="mobile" name="input"  @input="grossWeightchange" v-model="goods.grossWeight"></input>
-			</view>
-			</view>
-			<view class="c-row b-b">
-				<view class="title">皮重(吨)</view>
-				<view class="con-list">
-				<input placeholder="请输入皮重" type="mobile" name="input"  @input="tarechange" v-model="goods.tare"></input>
-			</view>
-			</view>
-			<view class="c-row b-b">
-				<view class="title">净重(吨)</view>
-				<view class="con-list">
-				<view class="con-list">
-				<input placeholder="自动计算" type="mobile" name="input" v-model="goods.loadNetWeight"></input>
-				</view>
-			</view>
-			</view>
-			<view class="c-row ">
-				<view class="title">发货日期</view>
-				<view class="con-list">
-				<view @click="show = true">{{goods.sendDateStart!=''?goods.sendDateStart:time}}</view>
-				<u-picker  :params='params' :default-time='time' @confirm="DateChange" v-model="show" mode="time"></u-picker>
-			</view>
-			</view>
-			
-				
+			<view class="c-row">
+				<view class="title1">发车信息</view>
 			</view>
-			<view class="information">
+			<u-form :model="goods" ref="uForm" class="uForm">
+				<u-form-item label="派车编号" prop="tranCarNo" label-width="160" required>
+					<u-input v-model="goods.tranCarNo" input-align="right" placeholder="请输入派车编号" />
+				</u-form-item>
+				<u-form-item label="车牌号" prop="carNo" label-width="160" required>
+					<u-input v-model="goods.carNo" input-align="right" placeholder="请输入车牌号" />
+				</u-form-item>
+				<u-form-item label="司机手机号" prop="driverPhone" label-width="160" required>
+					<u-input v-model="goods.driverPhone" input-align="right" placeholder="请输入司机手机号" />
+				</u-form-item>
+				<u-form-item label="毛重(吨)" prop="grossWeight" label-width="160" required>
+					<u-input v-model="goods.grossWeight" input-align="right" placeholder="请输入毛重"
+						@input="grossWeightchange" />
+				</u-form-item>
+				<u-form-item label="皮重(吨)" prop="tare" label-width="160" required>
+					<u-input v-model="goods.tare" input-align="right" placeholder="请输入皮重" @input="tarechange" />
+				</u-form-item>
+				<u-form-item label="净重(吨)" prop="reciveNetWeight" label-width="160" required>
+					<u-input v-model="goods.reciveNetWeight" input-align="right" disabled="" placeholder="自动计算" />
+				</u-form-item>
+				<u-form-item label="发货日期" label-width="160" required>
+					<view @click="show = true" class="time-style">
+						{{goods.dispatchingDate!=''?goods.dispatchingDate:time}}
+					</view>
+					<u-picker :params='params' :default-time='time' @confirm="DateChange" v-model="show" mode="time">
+					</u-picker>
+				</u-form-item>
+			</u-form>
+		</view>
+		<view class="information">
 			<view class="c-row">
 				<view class="action">
 					上传磅单照片
@@ -62,21 +41,22 @@
 			</view>
 			<view class="c-row">
 				<view class="grid col-4 grid-square flex-sub">
-					<view class="bg-img" v-if="goods.loadPoundImg != ''" @tap="ViewImage" :data-url="goods.loadPoundImg">
-					 <image :src="goods.loadPoundImg" mode="aspectFit"></image>
+					<view class="bg-img" v-if="goods.collectionScreenshot != ''" @tap="ViewImage"
+						:data-url="goods.collectionScreenshot">
+						<image :src="goods.collectionScreenshot" mode="aspectFit"></image>
 						<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="0">
 							<text class='cuIcon-close'></text>
 						</view>
 					</view>
-					<view class="solids" @tap="ChooseImagePerson" v-if="goods.loadPoundImg == ''">
+					<view class="solids" @tap="ChooseImagePerson" v-if="goods.collectionScreenshot == ''">
 						<text class='cuIcon-cameraadd'></text>
 					</view>
 				</view>
 			</view>
-			</view>
-			
-				<button class="btn btns" @click="getList">提交</button>
-			
+		</view>
+
+		<button class="btn btns" @click="getList">提交</button>
+
 		<!-- </block> -->
 	</view>
 </template>
@@ -87,360 +67,345 @@
 		mapState
 	} from 'vuex';
 	export default {
-			name: "trust",
-			data() {
-				return {
-					goods: {
-						tranCarNo:'',
-						carNo:'',
-						grossWeight:'',
-						tare:'',
-						loadNetWeight:'',
-						loadPoundImg:'',
-						 contractNo:'',
-						 goodsName:'',
-						 sendDateStart:''
-						
-					},
-					params:{
-						year: true,
-						month: true,
-						day: true,
-					},
-					carNo:'',
-					PageCur: "trust",
-					TabCur: 0,
-					priceTypeIndex:-1,
-					priceType: ['库内价', '到库价', '到港价'],
-					unitPrice:0,
-					price:'',
-					seller:'',
-					sellerPhone:'',
-					minSale:'',
-					exsitCount:0,
-					origin:'',
-					stock:'',
-					show:false,
-					goodsName:'',
-					verifyCode:'',
-					sendText0:'获取验证码',
-					sendText1:'获取验证码',
-					sendText2:'获取验证码',
-					sendText3:'获取验证码',
-					sendDisabled0: false,
-					sendDisabled1: false,
-					sendDisabled2: false,
-					sendDisabled3: false,
-					buyer:'',
-					buyerPhone:'',
-					level:'',
-					sender:'',
-					senderPhone:'',
-					receiver:'',
-					receiverPhone:'',
-					total:0,
-					startPlace:'',
-					endPlace:'',
-					driver:'',
-					driverPhone:'',
-					carNo:'',
-					personNoImg:'',
-					personNoImg1:'',
-					driverNoImg:'',
-					driverNoImg1:'',
-					carNoImg:'',
-					carNoImg1:'',
-					goodsName:'',
-					showTran:true
-				};
+		name: "trust",
+		data() {
+			return {
+				show: false,
+				goods: {
+					tranCarNo: '',
+					carNo: '',
+					driverPhone: '',
+					grossWeight: '',
+					tare: '',
+					reciveNetWeight: '',
+					collectionScreenshot: '',
+					dispatchingDate: '',
+					// compId: '2710b21efc1e4393930c5dc800010dc4',
+					batch: ""
+
+				},
+				rules: {
+					tranCarNo: [{
+						validator: (rule, value, callback) => {
+							return !this.$u.test.isEmpty(value)
+						},
+						message: '派车编号不能为空',
+						trigger: ['change', 'blur']
+					}],
+					carNo: [{
+						validator: (rule, value, callback) => {
+							return this.$u.test.carNo(value)
+						},
+						message: '车牌号格式不正确',
+						trigger: ['change', 'blur']
+					}],
+					driverPhone: [{
+						validator: (rule, value, callback) => {
+							return this.$u.test.mobile(value);
+						},
+						message: '手机号格式不正确',
+						trigger: ['change', 'blur']
+					}],
+
+					grossWeight: [{
+							validator: (rule, value, callback) => {
+								return !this.$u.test.isEmpty(value)
+							},
+							message: '毛重不能为空',
+							trigger: ['change', 'blur']
+						},
+						{
+							validator: (rule, value, callback) => {
+								return this.$u.test.amount(value)
+							},
+							message: '数值类型,最多保留两位小数',
+							trigger: ['change', 'blur'],
+						},
+						{
+							validator: (rule, value, callback) => {
+								return this.$u.test.range(value, [1, 100])
+							},
+							message: '数值类型,1-100之间',
+							trigger: ['change', 'blur'],
+						},
+
+					],
+					tare: [{
+							validator: (rule, value, callback) => {
+								return !this.$u.test.isEmpty(value)
+							},
+							message: '皮重不能为空',
+							trigger: ['change', 'blur']
+						},
+						{
+							validator: (rule, value, callback) => {
+								return this.$u.test.amount(value)
+							},
+							message: '数值类型,最多保留两位小数',
+							trigger: ['change', 'blur'],
+						},
+						{
+							validator: (rule, value, callback) => {
+								return this.$u.test.range(value, [1, 50])
+							},
+							message: '数值类型,1-50之间',
+							trigger: ['change', 'blur'],
+						},
+
+					],
+				},
+				params: {
+					year: true,
+					month: true,
+					day: true,
+				}
+
+			};
+		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo']),
+			time() {
+				var date = new Date()
+				var year = date.getFullYear()
+				var month = date.getMonth()
+				var date1 = date.getDate()
+				if (month + 1 < 10) {
+					month = "0" + (month + 1)
+				}
+				if (date1 + 1 < 10) {
+					date1 = "0" + date1
+				}
+				return year + '-' + month + "-" + date1
 			},
-			computed: {
-				...mapState(['hasLogin','userInfo']),
-					time() {
-						var date=new Date()
-						var year=date.getFullYear()
-						var month=date.getMonth()
-						var date1=date.getDate()
-						if(month+1<10){
-							month="0"+(month+1)
-						}
-						if(date1+1<10){
-							date1="0"+date1
-						}
-						return year+'-'+month+"-"+date1
-					},
-					startDate() {
-					//限制开始时间;
-					//也可以直接限定为当天日期 var date= new Date(); return date
-						return new Date(new Date(new Date().toLocaleDateString()).getTime()-(1*60*60*1000))
-					},
-					endDate() {
-						return new Date()
-					}
-				},	
-			onShow() {
+			startDate() {
+				//限制开始时间;
+				//也可以直接限定为当天日期 var date= new Date(); return date
+				return new Date(new Date(new Date().toLocaleDateString()).getTime() - (1 * 60 * 60 * 1000))
 			},
-			onLoad(option) {
-				this.goods.planId=option.planId
-				this.goodsName=option.goodsName
-				this.contractNo = option.contractNo
-				this.goods.goodsName=option.goodsName
-				this.goods.contractNo = option.contractNo
-				this.goods.tranCarNo=option.tranCarNo
-				console.log(this.goods.tranCarNo)
-				
+			endDate() {
+				return new Date()
+			}
+		},
+		onShow() {},
+		onReady() {
+			this.$refs.uForm.setRules(this.rules);
+		},
+		onLoad(option) {
+			debugger
+			this.goods.dispatchingDate = this.time;
+			this.goods.batch = option.id;
+
+		},
+		methods: {
+			DateChange(e) {
+				this.goods.sendDateStart = e.year + '-' + e.month + '-' + e.day
 			},
-			methods: {
-				 DateChange(e) {
-					 this.goods.sendDateStart=e.year+'-'+e.month+'-'+e.day
-				 	// this.goods.sendDateStart = e.detail.value
-				 },
-				commit1(item){
-					uni.navigateTo({				
-						url: `/pageB/contract/look?id=${item.id}&netWeight=${item.netWeight}&carNo=${item.carNo}&sendDateStart=${item.sendDateStart}`
-					})
-				},
-				grossWeightchange(e) {
-				      if (this.goods.grossWeight && this.goods.tare) {
-				        this.goods.loadNetWeight = Number(
-				          this.goods.grossWeight - this.goods.tare
-				        )
-				      }
-				    },
-				tarechange(e) {
-				      if (this.goods.grossWeight && this.goods.tare) {
-				        this.goods.loadNetWeight = Number(
-				          this.goods.grossWeight - this.goods.tare
-				        )
-				      }
-				    },
-				getList(){
-					// tranCarNo:'',
-					// carNo:'',
-					// grossWeight:'',
-					// tare:'',
-					// loadNetWeight:'',
-					// loadPoundImg:'',
-					//  contractNo:'',
-					//  goodsName:'',
-					if(this.goods.carNo.length==0){
-						this.$api.msg('车牌号不能为空')
-						return
-					}
-					if(this.goods.carNo.length!=7){
-						this.$api.msg('车牌号输入错误')
-						return
-					}
-					if(this.goods.driverPhone.length==0){
-						this.$api.msg('手机号不能为空')
-						return
-					}
-					if(this.goods.driverPhone.length!=11){
-						this.$api.msg('司机手机号输入错误')
-						return
-					}
-					if(this.goods.grossWeight==''){
-						this.$api.msg('毛重不能为空')
-						return
-					}
-					if(this.goods.tare==''){
-						this.$api.msg('皮重不能为空')
-						return
-					}
-					if(this.goods.grossWeight>100){
-						this.$api.msg('毛重输入错误')
-						return
-					}
-					if(this.goods.tare>50){
-						this.$api.msg('皮重输入错误')
-						return
-					}
-					var that=this
-					uni.showModal({
-						content: '确定提交发车信息?',
-						success: function (res) {
-							if (res.confirm) {
-								that.$api.doRequest('post','/tranCarInfo/api/addTranTask',that.goods).then(res => {
-								    if(res.data.code==200){
-										console.log(that.goods)
-										uni.showModal({
-											content: '提交成功!',
-											success: function (res) {
-												if (res.confirm) {
-													var result = that.goods.tranCarNo.substr(that.goods.tranCarNo.indexOf("C") + 1,that.goods.tranCarNo.length);
-												    var num=Number(result)+1
-													if(num<=9){
-														num='C00'+num
-													}else if(num<100&&num>9){
-														num='C0'+num
-													}else  if(num<1000&&num>99){
-														num='C'+num
-													}
-													that.goods={
-														tranCarNo:num,
-														carNo:'',
-														grossWeight:'',
-														tare:'',
-														loadNetWeight:'',
-														loadPoundImg:'',
-														 contractNo:that.contractNo,
-														 goodsName:that.goodsName,
-														 sendDateStart:''	
+			commit1(item) {
+				uni.navigateTo({
+					url: `/pageB/contract/look?id=${item.id}&netWeight=${item.netWeight}&carNo=${item.carNo}&sendDateStart=${item.sendDateStart}`
+				})
+			},
+			grossWeightchange(e) {
+				if (this.goods.grossWeight && this.goods.tare) {
+					this.goods.reciveNetWeight = Number(
+						this.goods.grossWeight - this.goods.tare
+					)
+				}
+			},
+			tarechange(e) {
+				if (this.goods.grossWeight && this.goods.tare) {
+					this.goods.reciveNetWeight = Number(
+						this.goods.grossWeight - this.goods.tare
+					)
+				}
+			},
+			getList() {
+
+				this.grossWeight = parseInt(this.grossWeight)
+				var that = this
+				uni.showModal({
+					content: '确定提交发车信息?',
+					success: function(res) {
+						if (res.confirm) {
+							debugger
+							that.$refs.uForm.validate(valid => {
+								if (valid) {
+									console.log('验证通过');
+									that.$api.doRequest('post',
+											'/freightReceivingDispatching/api/insertFreightReceivingDispatchingCar',
+											that.goods).then(res => {
+											if (res.data.code == 200) {
+												console.log(that.goods)
+												uni.showModal({
+													content: '提交成功!',
+													cancelText: "返回",
+													confirmText: "继续添加",
+													success: function(res) {
+														if (res.confirm) {
+															that.goods = {
+																carNo: '',
+																collectionScreenshot: '',
+																dispatchingDate: '',
+																loadNetWeight: '',
+																driverPhone: '',
+																reciveNetWeight: '',
+																tare: '',
+																tranCarNo: ''
+															}
+														} else if (res.cancel) {
+
+															// uni.navigateBack({
+															// 	delta: 1,
+															// 	success: function() {
+															// 		beforePage.$vm.init(); 
+															// 	}
+															// });
+														}
 													}
-												}else if (res.cancel) {
-													uni.navigateBack();
-												}
+												});
+											} else if (res.data.code == 11015) {
+												uni.showToast({
+													title: '该司机未认证身份,请司机认证后再操作',
+													icon: 'none',
+													duration: 2000
+												})
 											}
-										});
-									}else if(res.data.code==11015){
-										uni.showToast({
-										 title: '该司机未认证身份,请司机认证后再操作',
-										 icon:'none',
-										 duration: 2000
 										})
-									}
-								    })
-								    .catch(res => {
-								     uni.showToast({
-								      title: res.errmsg,
-								      icon:'none',
-								      duration: 2000
-								     })
-								    });
-							} else if (res.cancel) {
-							
-							}
-						}
-					});
-				},
-				ChooseImagePerson() {
-					uni.chooseImage({
-						count: 1, //默认9
-						sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
-						sourceType: ['album','camera'], //从相册选择
-						success: (res) => {
-							//上传图片
-							//图片路径可自行修改
-							
-							uploadImage(res.tempFilePaths[0], 'loadPoundImg/',
-								result => {
-	
-								 	this.goods.loadPoundImg = result
-								 uni.hideLoading();
-								}
-							)
-						}
-					});
-				},
-				ChooseImageDriver() {
-					uni.chooseImage({
-						count: 1, //默认9
-						sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
-						sourceType: ['album','camera'], //从相册选择
-						success: (res) => {
-							//上传图片
-							//图片路径可自行修改
-							uploadImage(res.tempFilePaths[0], 'driverNoImg/',
-								result => {
-									if (this.driverNoImg.length != 0) {
-										this.driverNoImg1 = result
-									} else {
-										this.driverNoImg = result
-									}
-									uni.hideLoading();
-								}
-							)
-						}
-					});
-				},
-				ChooseImageCar() {
-					uni.chooseImage({
-						count: 1, //默认9
-						sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
-						sourceType: ['album','camera'], //从相册选择
-						success: (res) => {
-							//上传图片
-							//图片路径可自行修改
-							uploadImage(res.tempFilePaths[0], 'carNoImg/',
-								result => {
-									if (this.carNoImg.length != 0) {
-										this.carNoImg1 = result
-									} else {
-										this.carNoImg = result
-									}
-									uni.hideLoading();
+										.catch(res => {
+											uni.showToast({
+												title: res.errmsg,
+												icon: 'none',
+												duration: 2000
+											})
+										});
+								} else {
+									console.log('验证失败');
 								}
-							)
+							});
+
+						} else if (res.cancel) {
+
 						}
-					});
-				},
-				ViewImage(e) {
-					var img = [];
-					img = e.currentTarget.dataset.url.split(' ')
-					uni.previewImage({
-						current:0,
-						urls: img
-					});
-				},
-				DelImg(e) {
-					uni.showModal({
-						title: '提示',
-						content: '确定要删除该照片吗?',
-						cancelText: '取消',
-						confirmText: '确定',
-						success: res => {
-							if (res.confirm) {
-								if(e.currentTarget.dataset.index == 0){
-									this.personNoImg = "";
-								}
-								else if(e.currentTarget.dataset.index == 1){
-									this.personNoImg1 = "";
-								}
-								else if(e.currentTarget.dataset.index == 2){
-									this.driverNoImg = "";
-								}
-								else if(e.currentTarget.dataset.index == 3){
-									this.driverNoImg1 = "";
-								}
-								else if(e.currentTarget.dataset.index == 4){
-									this.carNoImg = "";
+					}
+				});
+			},
+			ChooseImagePerson() {
+				uni.chooseImage({
+					count: 1, //默认9
+					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+					sourceType: ['album', 'camera'], //从相册选择
+					success: (res) => {
+						//上传图片
+						//图片路径可自行修改
+
+						uploadImage(res.tempFilePaths[0], 'collectionScreenshot/',
+							result => {
+								debugger
+								this.goods.collectionScreenshot = result
+								uni.hideLoading();
+							}
+						)
+					}
+				});
+			},
+			ChooseImageDriver() {
+				uni.chooseImage({
+					count: 1, //默认9
+					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+					sourceType: ['album', 'camera'], //从相册选择
+					success: (res) => {
+						//上传图片
+						//图片路径可自行修改
+						uploadImage(res.tempFilePaths[0], 'driverNoImg/',
+							result => {
+								if (this.driverNoImg.length != 0) {
+									this.driverNoImg1 = result
+								} else {
+									this.driverNoImg = result
 								}
-								else if(e.currentTarget.dataset.index == 5){
-									this.carNoImg1 = "";
+								uni.hideLoading();
+							}
+						)
+					}
+				});
+			},
+			ChooseImageCar() {
+				uni.chooseImage({
+					count: 1, //默认9
+					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+					sourceType: ['album', 'camera'], //从相册选择
+					success: (res) => {
+						//上传图片
+						//图片路径可自行修改
+						uploadImage(res.tempFilePaths[0], 'carNoImg/',
+							result => {
+								if (this.carNoImg.length != 0) {
+									this.carNoImg1 = result
+								} else {
+									this.carNoImg = result
 								}
-								
+								uni.hideLoading();
 							}
+						)
+					}
+				});
+			},
+			ViewImage(e) {
+				var img = [];
+				img = e.currentTarget.dataset.url.split(' ')
+				uni.previewImage({
+					current: 0,
+					urls: img
+				});
+			},
+			DelImg(e) {
+				uni.showModal({
+					title: '提示',
+					content: '确定要删除该照片吗?',
+					cancelText: '取消',
+					confirmText: '确定',
+					success: res => {
+						debugger
+						if (res.confirm) {
+							this.goods.collectionScreenshot = ""
 						}
-					})
-				},
+					}
+				})
 			},
-		}
+		},
+	}
 </script>
 
 <style scoped>
-	.container{
+	.container {
 		padding: 10px 10px;
 		background-color: #F5F6FA;
 	}
-	.title1{
+
+	.title1 {
 		font-size: 18px;
 		font-weight: 600;
-		}
+	}
+
 	.cu-form-group input {
 		text-align: right;
 	}
-	.text-white text{
+
+	.text-white text {
 		background: linear-gradient(45deg, #3DC146, #B2D612);
-		padding:5px 10px;
+		padding: 5px 10px;
 		border-radius: 38rpx;
 	}
+
 	.cu-form-group textarea {
 		text-align: right;
 	}
-	.commit{
+
+	.commit {
 		background: linear-gradient(45deg, #DF331C, #DA611A);
-		color:#fff;
+		color: #fff;
 	}
+
 	.c-row {
 		display: -webkit-box;
 		display: -webkit-flex;
@@ -451,6 +416,7 @@
 		padding: 20rpx 30rpx;
 		position: relative;
 	}
+
 	.con-list {
 		-webkit-box-flex: 1;
 		-webkit-flex: 1;
@@ -468,16 +434,27 @@
 		padding-right: 20rpx;
 		font-size: 14px;
 	}
-	.information{
+
+	.information {
 		background-color: #FFFFFF;
 		border-radius: 20px;
 		margin-top: 10px;
 	}
-	.btn{
+
+	.btn {
 		margin-top: 10px;
 		border-radius: 25px;
 		background-color: #22C572;
 		border: none;
 		color: #FFFFFF;
 	}
+
+	.uForm {
+		padding: 0 40rpx;
+	}
+
+	.time-style {
+		position: absolute;
+		right: 0;
+	}
 </style>

+ 229 - 109
pageA/freightTransport/index.vue

@@ -2,59 +2,46 @@
 	<view class="">
 		<view class="content">
 			<view style='background:#fff;display:flex;' class="cu-bar search">
-				<view style='flex:6;' class="search-form round" >
-					<text style='color: #ccc;text-indent:6px;' class="cuIcon-search"></text>
-					<input type="text" v-model="searchKeyWord" @input="doSearch" placeholder="请输入业务编号或对方名称" confirm-type="search"></input>
-					
-				</view>
-				<view style="width:4%;flex:1;">{{content}}</view>
-				<text  v-if='searchKeyWord.length>0' class='tip_text cuIcon-roundclosefill'></text>
+				<u-search placeholder="请输入业务编号或对方名称" v-model="searchKeyWord" @custom="doSearch"></u-search>
 			</view>
 			<view style='background:#fff;padding:0 15px;'>
 				<view @click='tabcarchange(0)' class='line' :class='status==0?"active":""'>全部</view>
 				<view @click='tabcarchange(1)' class='line' :class='status==1?"active":""'>待签收</view>
-				<view @click='tabcarchange(1)' class='line' :class='status==1?"active":""'>待结算</view>
+				<view @click='tabcarchange(2)' class='line' :class='status==2?"active":""'>待结算</view>
 			</view>
-			<view @click='sendreceiverecord({status:0})' class="guess-section">
-				<view style='width:100%;align-items:center;' class="flex justify-between">
-					<view class='type send'>发</view>
-					<view>
-						<view class='businessnumber'>我是业务编号最长这么长</view>
-						<view class='consigner'>发货方名称最多十个字</view>
-					</view>
-					<view>
-						<view class='time'>2021-07-05</view>
-						<view class='goods'>优质玉米淀粉</view>
-					</view>
-				</view>
-				<view style='width:100%;' class='goodsstatus'>
-					<text style='margin-right:10px;'>待签收:3</text>
-					<text>待结算:0</text>
-				</view>
-				<view style='width:100%;' class='flex justify-end'>
-					<view class='del'>删除</view>
-				</view>
+			<view class="no-data" v-if="isShowNoData">
+				暂无相关结果
 			</view>
-			<view @click='sendreceiverecord({status:1})' class="guess-section">
-				<view style='width:100%;align-items:center;' class="flex justify-between">
-					<view class='type put'>收</view>
-					<view>
-						<view>我是业务编号最长这么长</view>
-						<view>发货方名称最多十个字</view>
-					</view>
-					<view>
-						<view>2021-07-05</view>
-						<view>优质玉米淀粉</view>
+			<view class="" v-if="!isShowNoData">
+				<view v-for="(item,index) in listData" :key="index">
+					<view @click='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="number">
+									<view class='businessnumber'>{{item.businessNumber}}</view>
+									<view class='consigner'>{{item.consignee}}</view>
+								</view>
+							</view>
+					
+							<view class="list-item-right">
+								<view class='time'>{{item.createDate}}</view>
+								<view class='goods'>{{item.goodsName}}</view>
+							</view>
+						</view>
+						<view style='width:100%;' class='goodsstatus'>
+							<text style='margin-right:10px;'>待签收:{{item.signedFor}}</text>
+							<text>待结算:{{item.toSettled}}</text>
+						</view>
+						<view style='width:100%;' class='flex justify-end'>
+							<view class='del' @click="delRow(item)">删除</view>
+						</view>
 					</view>
 				</view>
-				<view class='goodsstatus'>
-					<text style='margin-right:10px;'>待签收:3</text>
-					<text>待结算:0</text>
-				</view>
-				<view style='width:100%;' class='flex justify-end'>
-					<view class='del'>删除</view>
-				</view>
 			</view>
+	
+
 		</view>
 		<view class="footer">
 			<button @click='addgoods' class='addgoods'>新建发货任务</button>
@@ -63,45 +50,139 @@
 </template>
 
 <script>
+	import store from "@/store";
 	export default {
 		name: "business",
 		data() {
 			return {
-				searchKeyWord:'',
-				content:'搜索',
-				status:0,
+				searchKeyWord: '',
+				content: '搜索',
+				status: 0,
+				listData: [],
+				searchData: {},
+				userinfo: {},
+				isShowNoData:false
+
 			}
 		},
 		onShow() {
-			
+
 		},
 		onLoad(options) {
-			
+			// 获取用户信息
+			this.getUserInfo()
+			//获取列表数据
+			this.initData();
 		},
 		onPageScroll(e) {
-			
+
 		},
 		//下拉刷新
-		onPullDownRefresh() {
-		},
+		onPullDownRefresh() {},
 		onReachBottom() { //上拉触底函数
 		},
 		methods: {
-			addgoods(){
+			getUserInfo() {
+				debugger
+				this.userinfo = store.getters.getUserInfo
+			},
+			addgoods() {
 				uni.navigateTo({
-					url:'/pageA/freightTransport/addsendgoods'
+					url: '/pageA/freightTransport/addsendgoods?phone=' + this.userInfo.phone
 				})
 			},
-			sendreceiverecord(item){
-				if(item.status==0){
+			sendreceiverecord(item) {
+
+				if (item.status == '发货') {
 					uni.navigateTo({
-						url:'/pageA/freightTransport/sendrecord'
+						url: '/pageA/freightTransport/record/sendrecord?id=' + item.id
 					})
-				}else{
+				} else {
 					uni.navigateTo({
-						url:'/pageA/freightTransport/payrecord'
+						url: '/pageA/freightTransport/record/payrecord?id=' + item.id
 					})
 				}
+			},
+			initData() {
+				this.getListData(0)
+			},
+			getListData(state, type) {
+				debugger
+				let _data = {}
+				if (state == "searchKeyWord") {
+					_data = {
+						pageSize: 10,
+						currentPage: 1,
+						searchKeyWord: type,
+						accountNumber: this.userInfo.phone
+					}
+				} else {
+					_data = {
+						pageSize: 10,
+						currentPage: 1,
+						searchType: state,
+						accountNumber: this.userInfo.phone
+					}
+				}
+				let that = this
+				this.$api.doRequest('get', '/freightReceivingDispatching/selectFreightReceivingDispatchingPage', _data)
+					.then(res => {
+						if (res.data.code == 200) {
+							debugger
+							that.listData = res.data.data.records;
+							for (let i = 0; i < that.listData.length; i++) {
+								that.utils.nullToString(that.listData[i])
+								that.listData[i].toSettled = that.listData[i].toSettled == '' ? 0 : that.listData[i]
+									.toSettled
+								that.listData[i].signedFor = that.listData[i].signedFor == '' ? 0 : that.listData[i]
+									.signedFor
+							}
+							console.log(that.listData)
+						}
+
+					}).catch(res => {
+						// uni.showToast({
+						// 	title: res.data.message,
+						// 	icon: 'none',
+						// 	duration: 2000
+						// })
+					})
+			},
+			tabcarchange(val) {
+				this.searchKeyWord = ""
+				console.log(val)
+				this.status = val
+				this.getListData(val)
+
+			},
+			// 搜索
+			doSearch() {
+				console.log(this.searchKeyWord)
+				this.getListData("searchKeyWord", this.searchKeyWord)
+			},
+			//删除
+			delRow(val) {
+				debugger
+				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
+					// })
+				})
 			}
 
 		}
@@ -120,6 +201,9 @@
 		position: relative;
 		font-size: 17px;
 	}
+	.line:nth-last-of-type(2),.line:nth-last-of-type(1){
+		margin-left: 68rpx;
+	}
 
 	.line.active {
 		font-size: 19px;
@@ -213,54 +297,65 @@
 		padding-bottom: 100upx;
 		display: flex;
 		flex-wrap: wrap;
-		padding:30upx;
+		padding: 30upx;
 		background: #fff;
-		margin:10px;
-		border-radius:6px;
-		.type{
-			border-radius:10px;
-			padding:5px;
-			wdith:22px;height:22px;
-			line-height:14px;
-			font-size:12px;
+		margin: 10px;
+		border-radius: 6px;
+
+		.type {
+			border-radius: 10px;
+			padding: 5px;
+			wdith: 22px;
+			height: 22px;
+			line-height: 14px;
+			font-size: 12px;
 		}
-		.type.send{
-			background:#22C572;
-			color:#fff;
-		}
-		.type.put{
-			background:#FD714F;
-			color:#fff;
+
+		.type.send {
+			background: #22C572;
+			color: #fff;
 		}
-		.businessnumber{
-			font-size:16px;
-			font-weight:600;
+
+		.type.put {
+			background: #FD714F;
+			color: #fff;
 		}
-		.consigner{
-			font-size:12px;
+
+		.businessnumber {
+			font-size: 16px;
+			font-weight: 600;
 		}
-		.time{
-			color:#878C9C;
+
+		.time {
+			color: #878C9C;
 		}
-		.goods{
-			font-size:12px;
+
+		.goods,
+		.consigner {
+			font-size: 24rpx;
+			font-weight: 500;
+			color: #333333;
+			text-align: right;
+			margin: 20rpx 0
 		}
-		.goodsstatus{
-			background:#F9F9FA;
-			color:#9698A2;
-			padding:10px 0;
-			padding-left:47px;
-			margin:10px 0;
+
+		.goodsstatus {
+			background: #F9F9FA;
+			color: #9698A2;
+			padding: 10px 0;
+			padding-left: 47px;
+			margin: 10px 0;
 		}
-		.del{
-			width:60px;
+
+		.del {
+			width: 60px;
 			height: 33px;
-			line-height:33px;
-			font-size:14px;
+			line-height: 33px;
+			font-size: 14px;
 			background: #fff;
-			border:1px solid #CDCDCD;
-			border-radius:30px;
-			text-align:center;
+			border: 1px solid #CDCDCD;
+			border-radius: 30px;
+			text-align: center;
 		}
 	}
 
@@ -483,20 +578,45 @@
 			}
 		}
 	}
-	.footer{
-		background:#fff;
-		position:fixed;
-		bottom:0;
+
+	.footer {
+		background: #fff;
+		position: fixed;
+		bottom: 0;
 		width: 100%;
-		padding:20px 0;
+		padding: 20px 0;
+	}
+
+	.addgoods {
+		width: 90%;
+		background: #22C572;
+		color: #fff;
+		border-radius: 30px;
+	}
+
+	.addgoods:after {
+		border: none;
+	}
+	.cu-bar{
+		padding: 0 30rpx;
 	}
-	.addgoods{
-		width:90%;
-		background:#22C572;
-		color:#fff;
-		border-radius:30px;
+	.no-data{
+		/* background: red; */
+		text-align: center;
+		font-size: 36rpx;
+		margin-top: 300rpx;
 	}
-	.addgoods:after{
-		border:none;
+	.list-item{
+		width: 100%;
+		display: flex;
+		justify-content: space-between;
+		.list-item-left{
+			display: flex;
+			align-items: center;
+			.number{
+				margin-left: 40rpx;
+			}
+			
+		}
 	}
 </style>

+ 0 - 630
pageA/freightTransport/payrecord.vue

@@ -1,630 +0,0 @@
-<template>
-	<view class="center">
-		<view class="transaction">
-			<view style='padding-top:10px;' class="c-row">
-				<view class="title">业务编号</view>
-				<view class="con-list">
-				<input v-model='purchaseOrder.transactionsNumber' placeholder="请输入业务编号" placeholder-style="font-size: 12px;" name="input"></input>
-				</view>
-			</view>
-			<view  class="c-row">
-				<view class="title">货名</view>
-				<view class="con-list">
-				<input v-model='purchaseOrder.transactionsNumber' placeholder="请输入货名,如玉米" placeholder-style="font-size: 12px;" name="input"></input>
-				</view>
-			</view>
-			<view  class="c-row">
-				<view class="title">收货方</view>
-				<view class="con-list">
-				<input v-model='purchaseOrder.transactionsNumber' placeholder="请输入收货方名称" placeholder-style="font-size: 12px;" name="input"></input>
-				</view>
-			</view>
-			<view  class="c-row">
-				<view class="title">货物单价(元/吨)</view>
-				<view class="con-list">
-				<input v-model='purchaseOrder.transactionsNumber' placeholder="请输入货物单价" placeholder-style="font-size: 12px;" name="input"></input>
-				</view>
-			</view>
-			<view  class="c-row">
-				<view class="title">运费单价(元/吨)</view>
-				<view class="con-list">
-				<input v-model='purchaseOrder.transactionsNumber' placeholder="请输入运费单价" placeholder-style="font-size: 12px;" name="input"></input>
-				</view>
-			</view>
-			<view  class="c-row">
-				<view class="title">累计收发</view>
-				<view class="con-list">
-				<input v-model='purchaseOrder.transactionsNumber' placeholder="请输入收货地址" placeholder-style="font-size: 12px;" name="input"></input>
-				</view>
-				
-			</view>
-			<view  class="c-row">
-				<view class="title">收货地址</view>
-				<view class="con-list">
-				<input v-model='purchaseOrder.transactionsNumber' placeholder="请输入收货人账号" placeholder-style="font-size: 12px;" name="input"></input>
-				</view>
-			</view>
-		</view>
-		<view class="transaction">
-			<view  style='padding-top:10px;' class="c-row b-b justify-between">
-				<view class="title">辽H12345(C003)</view>
-				<view style='align-items: center;' class="flex">
-					<text style='color:#878C9C;'>2021-07-05</text>
-					<text class='type send'>发</text>
-				</view>
-			</view>
-			<view class="c-row  justify-between">
-				<view style='flex:1;'  class="title-black">净重</view>
-				<view  style='align-items: center;flex:2;' class="flex">
-					<view style='flex:1;text-align:right;'>
-						<text>33</text>
-						<text class='type send'>发</text>
-						<view class='weightnotes'>查看磅单</view>
-					</view>
-					<view style='flex:1;text-align:right;'>
-						<text>30</text>
-						<text class='type send'>发</text>
-						<view class='weightnotes'>查看磅单</view>
-					</view>
-				</view>
-			</view>
-			<view  class="c-row">
-				<view class="title-black">贷款</view>
-				<view class="con-list">
-				¥10000.00
-				</view>
-			</view>
-			<view  class="c-row">
-				<view class="title">已付贷款</view>
-				<view style='color:#22C572;' class="con-list">
-					¥10000.00
-				</view>
-			</view>
-			<view  class="c-row">
-				<view class="title">贷款扣款</view>
-				<view class="con-list">
-					¥10000.00
-				</view>
-			</view>
-			<view  class="c-row">
-				<view class="title-black">运费</view>
-				<view class="con-list">
-					¥10000.00
-				</view>
-			</view>
-			<view  class="c-row">
-				<view class="title">已付运费</view>
-				<view style='color:#22C572;' class="con-list">
-					¥10000.00
-				</view>
-			</view>
-			<view  class="c-row">
-				<view class="title">运费扣款</view>
-				<view class="con-list">
-					¥10000.00
-				</view>
-			</view>
-			<view  class="c-row flex justify-end">
-				<view style='flex:1;' class='deductfreight'>扣运费</view>
-				<view style='flex:1;' class='payfreight'>付运费</view>
-				<view style='flex:1;' class='deductfreight'>扣货款</view>
-				<view style='flex:1;' class='payfreight'>付货款</view>
-				<view @click='confirmpaygoods' style='flex:2;' class='payfreight'>确认收货</view>
-			</view>
-		</view>
-	<view class='footer'>
-		<button class="btn" @click="commit()">添加收货人</button>
-	</view>
-			
-	
-	</view>
-</template>
-
-<script>
-	export default {
-		name: "business",
-		data() {
-			return {
-				purchaseOrder:{}
-			}
-		},
-		onShow() {
-			
-		},
-		onLoad(options) {
-			
-		},
-		onPageScroll(e) {
-			
-		},
-		//下拉刷新
-		onPullDownRefresh() {
-		},
-		onReachBottom() { //上拉触底函数
-		},
-		methods: {
-			confirmpaygoods(){
-				uni.navigateTo({
-					url:'/pageA/freightTransport/confirmpaygoods'
-				})
-			},
-			commit(){
-				console.log(1111)
-				uni.navigateTo({
-					url:'/pageA/freightTransport/addpaygoods'
-				})
-			}
-
-		}
-	}
-</script>
-
-<style lang='scss'>
-	page,
-	.content {
-		background: #F5F6FA;
-	}
-.c-row {
-	    display: -webkit-box;
-	    display: -webkit-flex;
-	    display: flex;
-	    -webkit-box-align: center;
-	    -webkit-align-items: center;
-	    align-items: center;
-	    padding: 10rpx 30rpx;
-	    position: relative;
-		.title{
-			color:#9698A2;
-		}
-		.title-black{
-			color:#333;
-		}
-	}
-	.con-list {
-	    -webkit-box-flex: 1;
-	    -webkit-flex: 1;
-	    flex: 1;
-	    display: -webkit-box;
-	    display: -webkit-flex;
-	    display: flex;
-	    -webkit-box-orient: vertical;
-	    -webkit-box-direction: normal;
-	    -webkit-flex-direction: column;
-	    flex-direction: column;
-	    color: #303133;
-	    line-height: 40rpx;
-	    text-align: right;
-	    padding-right: 20rpx;
-		font-size:12px;
-	}
-	.transaction{
-		background-color: #FFFFFF;
-		margin: 10px;
-		padding-bottom: 10px;
-		border-radius: 20px;
-		.type{
-			display:inline-block;
-			font-size:10px;
-			padding:1px 3px;
-			border-radius:50%;
-			width:19px;height:19px;
-			line-height:19px;
-		}
-		.type.send{
-			color:#22C572;
-			background:#E9F8F0;
-		}
-		.type.put{
-			color:#22C572;
-			background:#E9F8F0;
-		}
-		.weightnotes{
-			display:inline-block;
-			border:1px solid #CDCDCD;
-			padding:5px;
-			font-size:10px;
-			margin-left:3px;
-		}
-		.deductfreight,.payfreight{
-			width:75px;
-			height: 33px;
-			line-height:33px;
-			font-size:14px;
-			background: #fff;
-			border:1px solid #CDCDCD;
-			border-radius:30px;
-			text-align:center;
-			margin:0 5px;
-		}
-		.payfreight{
-			margin-right:0;
-		}
-	}
-	.line {
-		display: inline-block;
-		padding: 5px;
-		position: relative;
-		font-size: 17px;
-	}
-
-	.line.active {
-		font-size: 19px;
-		font-weight: 900;
-	}
-
-	.line.active:after {
-		content: '';
-		display: block;
-		position: absolute;
-		width: 38px;
-		left: 50%;
-		transform: translateX(-50%);
-		bottom: 0;
-		border-bottom: 1px solid #22C572;
-	}
-
-	.cu-tag.badge {
-		right: 26rpx;
-	}
-
-	.cu-item {
-		height: 80rpx;
-		display: inline-block;
-		line-height: 80rpx;
-	}
-
-	.search-form {
-		background: #F5F6F9;
-		padding-left: 20rpx;
-	}
-
-	.title-tip {
-		color: #E63113;
-		text-align: right;
-	}
-
-	.tag1 {
-		background: #F5F6F9;
-		padding: 5px;
-		color: #333333;
-		display: inline-flex;
-		font-size: 22rpx;
-		border-radius: 3px;
-		margin: 3px;
-	}
-
-	.tag {
-		background: #F5F6F9;
-		padding: 7px 12px;
-		color: #333333;
-		display: inline-flex;
-		font-size: 22rpx;
-		border-radius: 15px;
-		margin: 3px;
-	}
-
-	.tag-bule {
-		background: #EBEEFA;
-		color: #5C76DF;
-	}
-
-	.tag-green {
-		background: #C6F7BC;
-		color: #065112;
-	}
-
-	.tag-yellow {
-		background: #F9F2EA;
-		color: #BE9C69;
-	}
-
-	.tag-red {
-		background: #FEECE6;
-		color: #FE6430;
-	}
-
-	.text-white {
-		color: #fff;
-	}
-
-	.text-white text {
-		position: relative;
-		z-index: 2;
-		background: linear-gradient(45deg, #3DC146, #B2D612);
-		padding: 5px 10px;
-		border-radius: 38rpx;
-	}
-	.center{
-		margin-bottom:100px;
-	}
-	.guess-section {
-		padding-bottom: 100upx;
-		display: flex;
-		flex-wrap: wrap;
-		padding:30upx;
-		background: #fff;
-		margin:10px;
-		border-radius:6px;
-		.type{
-			border-radius:10px;
-			padding:5px;
-			wdith:22px;height:22px;
-			line-height:14px;
-			font-size:12px;
-		}
-		.type.send{
-			background:#22C572;
-			color:#fff;
-		}
-		.type.put{
-			background:#FD714F;
-			color:#fff;
-		}
-		.businessnumber{
-			font-size:16px;
-			font-weight:600;
-		}
-		.consigner{
-			font-size:12px;
-		}
-		.time{
-			color:#878C9C;
-		}
-		.goods{
-			font-size:12px;
-		}
-		.goodsstatus{
-			background:#F9F9FA;
-			color:#9698A2;
-			padding:10px 0;
-			padding-left:47px;
-			margin:10px 0;
-		}
-		.del{
-			width:60px;
-			height: 33px;
-			line-height:33px;
-			font-size:14px;
-			background: #fff;
-			border:1px solid #CDCDCD;
-			border-radius:30px;
-			text-align:center;
-		}
-	}
-
-	.navbar {
-		position: fixed;
-		left: 0;
-		top: var(--window-top);
-		display: flex;
-		width: 100%;
-		height: 80upx;
-		background: #fff;
-		box-shadow: 0 2upx 10upx rgba(0, 0, 0, .06);
-		z-index: 10;
-
-		.nav-item {
-			flex: 1;
-			display: flex;
-			justify-content: center;
-			align-items: center;
-			height: 100%;
-			font-size: 30upx;
-			color: $font-color-dark;
-			position: relative;
-
-			&.current {
-				color: $base-color;
-
-				&:after {
-					content: '';
-					position: absolute;
-					left: 50%;
-					bottom: 0;
-					transform: translateX(-50%);
-					width: 120upx;
-					height: 0;
-					border-bottom: 4upx solid $base-color;
-				}
-			}
-		}
-
-		.p-box {
-			display: flex;
-			flex-direction: column;
-
-			.yticon {
-				display: flex;
-				align-items: center;
-				justify-content: center;
-				width: 30upx;
-				height: 14upx;
-				line-height: 1;
-				margin-left: 4upx;
-				font-size: 26upx;
-				color: #888;
-
-				&.active {
-					color: $base-color;
-				}
-			}
-
-			.xia {
-				transform: scaleY(-1);
-			}
-		}
-
-		.cate-item {
-			display: flex;
-			justify-content: center;
-			align-items: center;
-			height: 100%;
-			width: 80upx;
-			position: relative;
-			font-size: 44upx;
-
-			&:after {
-				content: '';
-				position: absolute;
-				left: 0;
-				top: 50%;
-				transform: translateY(-50%);
-				border-left: 1px solid #ddd;
-				width: 0;
-				height: 36upx;
-			}
-		}
-	}
-
-	/* 分类 */
-	.cate-mask {
-		position: fixed;
-		left: 0;
-		top: var(--window-top);
-		bottom: 0;
-		width: 100%;
-		background: rgba(0, 0, 0, 0);
-		z-index: 95;
-		transition: .3s;
-
-		.cate-content {
-			width: 630upx;
-			height: 100%;
-			background: #fff;
-			float: right;
-			transform: translateX(100%);
-			transition: .3s;
-		}
-
-		&.none {
-			display: none;
-		}
-
-		&.show {
-			background: rgba(0, 0, 0, .4);
-
-			.cate-content {
-				transform: translateX(0);
-			}
-		}
-	}
-
-	.cate-list {
-		display: flex;
-		flex-direction: column;
-		height: 100%;
-
-		.cate-item {
-			display: flex;
-			align-items: center;
-			height: 90upx;
-			padding-left: 30upx;
-			font-size: 28upx;
-			color: #555;
-			position: relative;
-		}
-
-		.two {
-			height: 64upx;
-			color: #303133;
-			font-size: 30upx;
-			background: #f8f8f8;
-		}
-
-		.active {
-			color: $base-color;
-		}
-	}
-
-	.introduce-section .title {
-		font-size: 17px;
-		font-weight: bold;
-		height: 40px;
-		line-height: 40px;
-		flex: 2.5;
-		border-bottom: 1px solid #EEEEEE;
-	}
-
-	.introduce-section .address {
-		color: #878C9C;
-		font-size: 12px;
-		padding: 10px 0 10px;
-	}
-
-	.introduce-section .price {
-		padding: 10px 0 10px;
-		color: #FD714F;
-		font-size: 19px;
-		font-weight: 700;
-	}
-
-	.introduce-section .guess-item {
-		border-radius: 10px;
-		background: #fff;
-		padding: 0upx 30upx 20upx;
-		margin: 8px;
-		border-bottom: 1px solid #ccc;
-	}
-
-	/* 销售信息 */
-	.introduce-section {
-		.title-tip {
-			flex: 1;
-		}
-
-		.price-box {
-			display: flex;
-			align-items: baseline;
-			font-size: 26upx;
-		}
-
-		.price {
-			font-size: $font-lg + 2upx;
-		}
-
-		.m-price {
-			margin: 0 12upx;
-			color: $font-color-light;
-			text-decoration: line-through;
-		}
-
-		.coupon-tip {
-			align-items: center;
-			padding: 4upx 10upx;
-			background: $uni-color-primary;
-			font-size: $font-sm;
-			color: #fff;
-			border-radius: 6upx;
-			line-height: 1;
-			transform: translateY(-4upx);
-		}
-
-		.bot-row {
-			display: flex;
-			align-items: center;
-			height: 50upx;
-			font-size: $font-sm;
-			color: $font-color-light;
-
-			view {
-				flex: 1;
-			}
-		}
-	}
-	.footer{
-		position:fixed;
-		bottom:0;
-		width: 100%;
-		padding:20px 0;
-	}
-	.btn{
-		width:90%;
-		background:#22C572;
-		color:#fff;
-		border-radius:30px;
-	}
-	.btn:after{
-		border:none;
-	}
-</style>
-

+ 64 - 0
pageA/freightTransport/record/index.js

@@ -0,0 +1,64 @@
+export function getDetail(id, that) {
+	that.$api.doRequest('get', 'freightReceivingDispatching/getFreightReceivingDispatching', {
+		"id": id
+	}).then(res => {
+
+		if (res.data.code == 200) {
+			that.purchaseOrder = res.data.data
+			makeData(res.data.data,that)
+			return res.data.data
+		}else{
+			
+		}
+		
+
+	}).catch(res => {
+		// uni.showToast({
+		// 	title: res.data.message,
+		// 	icon: 'none',
+		// 	duration: 2000
+		// })
+	})
+}
+export function makeData(val,that) {
+	debugger
+	//累加净重收发
+	let _goodsPrice = val.goodsPrice;
+	let _freightUnitPrice = val.freightUnitPrice
+	let _data = val.freightReceivingDispatchingCars
+	for (let i = 0; i < _data.length; i++) {
+		if (_data[i].reciveNetWeight == null) {
+			_data[i].reciveNetWeight = 0
+		}
+		if (_data[i].dispatchNetWeight == null) {
+			_data[i].dispatchNetWeight = 0
+		}
+		//应付货款
+		// if(_data[i].reciveNetWeight!=0&&_data[i].dispatchNetWeight!=0){
+		// 	if(_data[i].reciveNetWeight-_data[i].dispatchNetWeight>0){
+		// 		_data[i].goodsIngPayable = _data[i].reciveNetWeight*_goodsPrice
+		// 	}else{
+		// 		_data[i].goodsIngPayable = _data[i].dispatchNetWeight*_goodsPrice
+		// 	}
+		// }else{
+		// 	_data[i].goodsIngPayable = _data[i].reciveNetWeight*_goodsPrice
+		// }
+		// 运费
+		// _data[i].freightIngPayable = 
+		if (_data[i].reciveNetWeight != 0 && _data[i].dispatchNetWeight != 0) {
+			if (_data[i].reciveNetWeight - _data[i].dispatchNetWeight > 0) {
+				_data[i].freightIngPayable = _data[i].reciveNetWeight * _freightUnitPrice - _data[i]
+					.freightDeductionAmount
+			} else {
+				_data[i].freightIngPayable = _data[i].dispatchNetWeight * _freightUnitPrice - _data[i]
+					.freightDeductionAmount
+			}
+		} else {
+			_data[i].freightIngPayable = _data[i].reciveNetWeight * _freightUnitPrice - _data[i]
+				.freightDeductionAmount
+		}
+		that.radTotal.receipt += parseInt(_data[i].reciveNetWeight)
+		that.radTotal.delivery += parseInt(_data[i].dispatchNetWeight)
+	}
+
+}

+ 1095 - 0
pageA/freightTransport/record/payrecord.vue

@@ -0,0 +1,1095 @@
+<template>
+	<view class="center">
+		<view class="transaction">
+			<view style='padding-top:10px;' class="c-row">
+				<view class="title">业务编号</view>
+				<view class="con-list">
+					<input v-model='purchaseOrder.businessNumber' placeholder="请输入业务编号"
+						placeholder-style="font-size: 12px;" disabled name="input"></input>
+				</view>
+			</view>
+			<view class="c-row">
+				<view class="title">货名</view>
+				<view class="con-list">
+					<input v-model='purchaseOrder.goodsName' placeholder="请输入货名,如玉米"
+						placeholder-style="font-size: 12px;" disabled name="input"></input>
+				</view>
+			</view>
+			<view class="c-row">
+				<view class="title">收货方</view>
+				<view class="con-list">
+					<input v-model='purchaseOrder.consignee' disabled placeholder="请输入收货方名称" placeholder-style="font-size: 12px;"
+						name="input"></input>
+				</view>
+			</view>
+			<view class="c-row">
+				<view class="title">货物单价(元/吨)</view>
+				<view class="con-list">
+					<input v-model='purchaseOrder.goodsPrice' disabled placeholder="请输入货物单价" placeholder-style="font-size: 12px;"
+						name="input"></input>
+				</view>
+			</view>
+			<view class="c-row">
+				<view class="title">运费单价(元/吨)</view>
+				<view class="con-list">
+					<input v-model='purchaseOrder.freightUnitPrice' disabled placeholder="请输入运费单价"
+						placeholder-style="font-size: 12px;" name="input"></input>
+				</view>
+			</view>
+			<view class="c-row">
+				<view class="title">累计收发</view>
+				<view class="con-list cumulative-style">
+					<!-- <input v-model='purchaseOrder.transactionsNumber' disabled name="text"></input> -->
+					<view>
+						<text>{{ radTotal.receipt}}</text>
+						<text class='type send'>发</text>
+					</view>
+					<view>
+						<text>{{ radTotal.delivery}}</text>
+						<text class='type send'>收</text>
+					</view>
+				</view>
+
+			</view>
+			<view class="c-row">
+				<view class="title">收货地址</view>
+				<view class="con-list">
+					<input v-model='purchaseOrder.receivingAddress' disabled placeholder="请输入收货人账号"
+						placeholder-style="font-size: 12px;" name="input"></input>
+				</view>
+			</view>
+		</view>
+		<view class="transaction" v-for="(item,index) in purchaseOrder.freightReceivingDispatchingCars">
+			<view style='padding-top:10px;' class="c-row b-b justify-between">
+				<view class="title">{{item.carNo}}</view>
+				<view style='align-items: center;' class="flex">
+					<text style='color:#878C9C;'>{{item.dispatchingDate}}</text>
+					<text class='type send' v-if="item.statusFlag==1">发</text>
+					<text class='type send' v-if="item.statusFlag==2">收</text>
+				</view>
+			</view>
+			<view class="c-row  justify-between">
+				<view style='flex:1;' class="title-black">净重</view>
+				<view style='align-items: center;flex:2;' class="flex">
+					<view style='flex:1;text-align:right;'>
+						<text>{{item.reciveNetWeight}}</text>
+						<text class='type send'>发</text>
+						<view class='weightnotes'>查看磅单</view>
+					</view>
+					<view style='flex:1;text-align:right;'>
+						<text>{{item.dispatchNetWeight}}</text>
+						<text class='type send'>发</text>
+						<view class='weightnotes'>查看磅单</view>
+					</view>
+				</view>
+			</view>
+			<view class="c-row">
+				<view class="title-black">应付贷款</view>
+				<view class="con-list">
+					¥{{item.goodsIngPayable}}
+				</view>
+			</view>
+			<view class="c-row">
+				<view class="title">已付贷款</view>
+				<view style='color:#22C572;' class="con-list">
+					¥{{item.goodsEdPayable}}
+				</view>
+			</view>
+			<view class="c-row">
+				<view class="title">贷款扣款</view>
+				<view class="con-list">
+					¥{{item.goodsDeductionAmount}}
+				</view>
+			</view>
+			<view class="c-row">
+				<view class="title-black">应付运费</view>
+				<view class="con-list">
+					¥{{item.freightIngPayable}}
+				</view>
+			</view>
+			<view class="c-row">
+				<view class="title">已付运费</view>
+				<view style='color:#22C572;' class="con-list">
+					¥{{item.freightEdPayable}}
+				</view>
+			</view>
+			<view class="c-row">
+				<view class="title">运费扣款</view>
+				<view class="con-list">
+					¥{{item.freightDeductionAmount}}
+				</view>
+			</view>
+			<view class="c-row flex justify-end">
+				<view style='flex:1;' class='deductfreight' v-if="!purchaseOrder.freightPayer=='发货方承担'"
+					@click="freightDeduction(item)">扣运费</view>
+				<view class="freightAlert-model">
+					<u-modal v-model="freightAlert" cancel-color="#AFB3BF" confirm-color="#22C572" :show-title="false"
+						show-cancel-button=true @confirm="confirmFreight(0,item)">
+						<view class="freightAlert-warp">
+							<view class="freightAlert-row">
+								<view class="title">扣运费</view>
+								<u-icon name="close" class="close" size="20" @click="closeModel"></u-icon>
+							</view>
+							<!-- <u-cell-item :arrow="false" title="运输损耗"></u-cell-item> -->
+							<view class="freightAlert-row2 row">
+								<view>运输损耗</view>
+								<view>{{item.reciveNetWeight-item.dispatchNetWeight}}</view>
+							</view>
+							<view class="freightAlert-row3 row">
+								扣款金额
+							</view>
+							<view class="freightAlert-row4">
+								<u-input v-model="freightDeductionAmount" :type="type" :border="border"
+									placeholder="请输入扣款金额" class="uview-border" @input="inputWatch" />
+								<view class="text">
+									元
+								</view>
+							</view>
+							<view class="red-tip" v-show="isShowFreightTip">
+								扣款金额输入错误/扣款金额不能为空
+							</view>
+						</view>
+					</u-modal>
+				</view>
+				<view class='payfreight' style='flex:1;' v-if="!purchaseOrder.freightPayer=='发货方承担'"
+					@click="payDeduction()">付运费</view>
+				<view class="freightAlert-model">
+					<u-modal v-model="payAlert" cancel-color="#AFB3BF" confirm-color="#22C572" :show-title="false"
+						show-cancel-button=true @confirm="confirmFreight(1,item)">
+						<view class="freightAlert-warp payAlert">
+							<view class="freightAlert-row">
+								<view class="title">付运费</view>
+								<u-icon name="close" class="close" size="20" @click="closeModel"></u-icon>
+							</view>
+							<view class="freightAlert-row3 row">
+								应付
+							</view>
+							<view class="freightAlert-row4">
+								<u-input v-model="item.freightIngPayable" :type="type" :border="border"
+									placeholder="请输入付款金额" class="uview-border" @input="paidInputWatch" />
+								<view class="text">
+									元
+								</view>
+							</view>
+							<view class="red-tip paid-tip" v-show="isShowPaidTip">
+								应付金额不能为空/应付运费不能小于已付运费
+							</view>
+							<view class="paid">
+								<view class="">
+									已付
+								</view>
+								<view>
+									{{item.freightEdPayable}}元
+								</view>
+							</view>
+							<view class="unpaid">
+								<view class="">
+									未付
+								</view>
+								<view>
+									{{item.freightIngPayable-item.freightEdPayable}}元
+								</view>
+							</view>
+							<view class="freightAlert-row3 row">
+								付款金额
+							</view>
+							<view class="freightAlert-row4">
+								<u-input v-model="money" :type="type" :border="border" placeholder="请输入扣款金额"
+									class="uview-border" @input="payInputWatch($event,item)" />
+								<view class="text">
+									元
+								</view>
+							</view>
+							<view class="red-tip pay-tip" v-show="isShowPayTip">
+								付款金额输入错误/付款金额不能超过未付金额/付款金额不能为空
+							</view>
+						</view>
+					</u-modal>
+				</view>
+				<view style='flex:1;' class='deductfreight' @click="deductPayment()" v-if="!payfreightCli">扣货款</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)">
+						<view class="freightAlert-warp payAlert">
+							<view class="freightAlert-row">
+								<view class="title">扣货款</view>
+								<u-icon name="close" class="close" size="20" @click="closeModel"></u-icon>
+							</view>
+							<view class="freightAlert-row3 row">
+								扣款金额
+							</view>
+							<view class="freightAlert-row4">
+								<u-input v-model="ductPayment" :type="type" :border="border" placeholder="请输入扣款金额"
+									class="uview-border" @input="deductPaymentInputWatch($event,item)" />
+								<view class="text">
+									元
+								</view>
+							</view>
+							<view class="red-tip pay-tip" v-show="isShowFreightTip">
+								付款金额输入错误/付款金额不能为空
+							</view>
+						</view>
+					</u-modal>
+				</view>
+				<view style='flex:1;' class='payfreight' @click="Payment()" v-if="!payfreightCli">付货款</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)">
+						<view class="freightAlert-warp payAlert">
+							<view class="freightAlert-row">
+								<view class="title">付货款</view>
+								<u-icon name="close" class="close" size="20" @click="closeModel"></u-icon>
+							</view>
+							<view class="freightAlert-row3 row">
+								应付
+							</view>
+							<view class="freightAlert-row4">
+								<u-input v-model="item.goodsIngPayable" :type="type" :border="border" disabled
+									placeholder="请输入付款金额" class="uview-border" @input="paymentInputWatch" />
+								<view class="text">
+									元
+								</view>
+							</view>
+							<view class="red-tip paid-tip" v-show="isShowPaymenMoneyTip">
+								应付金额不能为空/应付货款不能小于已付货款
+							</view>
+							<view class="paid">
+								<view class="">
+									已付
+								</view>
+								<view>
+									{{item.goodsEdPayable}}元
+								</view>
+							</view>
+							<view class="unpaid">
+								<view class="">
+									未付
+								</view>
+								<view>
+									{{item.goodsIngPayable-item.goodsEdPayable}}元
+								</view>
+							</view>
+							<view class="freightAlert-row3 row">
+								付款金额
+							</view>
+							<view class="freightAlert-row4">
+								<u-input v-model="paymenMoney" :type="type" :border="border" placeholder="请输入货款金额"
+									class="uview-border" @input="payInputWatch($event,item)" />
+								<view class="text">
+									元
+								</view>
+							</view>
+							<view class="red-tip pay-tip" v-show="isShowPayTip">
+								付款金额输入错误/付款金额不能超过未付金额/付款金额不能为空
+							</view>
+						</view>
+					</u-modal>
+				</view>
+
+				<view @click='confirmpaygoods(item)' style='flex:2;' class='payfreight' v-if="payfreightCli">确认收货</view>
+			</view>
+
+		</view>
+		<view class='footer'>
+			<button class="btn" @click="commit()">添加收货人</button>
+		</view>
+
+
+	</view>
+</template>
+
+<script>
+	import {
+		getDetail
+	} from "./index";
+	export default {
+		name: "business",
+		data() {
+			return {
+				freightDeductionAmount: 0,
+				money: 0,
+				ductPayment: 0,
+				paymenMoney: 0,
+				purchaseOrder: {},
+				carInfo: [],
+				radTotal: {
+					delivery: 0,
+					receipt: 0
+				},
+				type: 'text',
+				border: false,
+				payValue: '',
+				copePayValue: '',
+				paidValue: '',
+				freightAlert: false,
+				payAlert: false,
+				deductPaymentAlert: false,
+				paymentAlert: false,
+				isShowFreightTip: false,
+				isShowPaidTip: false,
+				isShowPayTip: false,
+				isShowPaymenMoneyTip: false,
+				id: "",
+				payfreightCli: false
+			}
+		},
+		onShow() {
+
+		},
+		onLoad(options) {
+			getDetail(options.id, this)
+			this.id = options.id
+			this.payfreightCli = this.$store.state.isConfigfreightTransport
+		},
+		onPageScroll(e) {
+
+		},
+		//下拉刷新
+		onPullDownRefresh() {},
+		onReachBottom() { //上拉触底函数
+		},
+		methods: {
+			confirmpaygoods(item) {
+				uni.navigateTo({
+					url: '/pageA/freightTransport/confirmpaygoods?toINfo=' + JSON.stringify(item)
+				})
+			},
+			commit() {
+				console.log(1111)
+				uni.navigateTo({
+					url: '/pageA/freightTransport/addpaygoods?id=' + this.id
+				})
+			},
+			// 清空输入子对象数据
+			cleanVal(val, val1) {
+				for (let key in val) {
+					console.log(key + '---' + val[key])
+					if (val[key] == val1) {
+						val[key] == ""
+					}
+				}
+			},
+			confirmFreight(flag, val) {
+				debugger
+				if (flag == 1) {
+					val.money = parseInt(this.money);
+				}
+				val.freightDeductionAmount = this.freightDeductionAmount
+				val.freightIngPayable = parseInt(val.freightIngPayable);
+				val.flag = flag
+				this.$api.doRequest('post', 'freightReceivingDispatching/api/paymentAndDeductionfreight', val).then(
+					res => {
+						debugger
+						if (res.data.code == 200) {
+							location.reload()
+						}
+
+					}).catch(res => {
+
+				})
+			},
+			inputWatch(e) {
+				debugger
+				let _val = this.checkVal(e, "freight");
+				if (_val) {
+					this.isShowFreightTip = true
+				} else {
+					this.isShowFreightTip = false
+				}
+			},
+			paidInputWatch(e) {
+				let _val = this.checkVal(e, "paid");
+				if (_val) {
+					this.isShowPaidTip = true
+				} else {
+					this.isShowPaidTip = false
+				}
+			},
+			payInputWatch(e, item) {
+				let _val = this.checkVal(e, "pay", item);
+				if (_val) {
+					this.isShowPayTip = true
+					this.isShowPaymenMoneyTip = true
+				} else {
+					this.isShowPayTip = false
+					this.isShowPaymenMoneyTip = false
+				}
+			},
+			//扣货款输入监听
+			deductPaymentInputWatch(e, item) {
+				let _val = this.checkVal(e, "deductPayment", item);
+				if (_val) {
+					this.isShowFreightTip = true
+				} else {
+					this.isShowFreightTip = false
+				}
+			},
+			// 扣运费
+			freightDeduction(item) {
+				debugger
+				this.freightAlert = true;
+				this.freightDeductionAmount = 0
+				// this.cleanVal(item,"freightDeductionAmount")
+				console.log("扣运费")
+			},
+			// 付运费
+			payDeduction() {
+				console.log("付运费")
+				this.payAlert = true
+			},
+			deductPayment() {
+				console.log("扣货款")
+				this.deductPaymentAlert = true
+			},
+			Payment() {
+				console.log("付货款")
+				this.paymentAlert = true
+			},
+			confirmPayPayment() {
+				console.log("付货款提交")
+			},
+
+			//判断输入值
+			checkVal(e, state, item) {
+				console.log(e)
+				let _val;
+				let _val1 = this.utils.isEmpty(e)
+				let _val2 = this.utils.isTwoPoint(e)
+				let _val3 = !this.utils.isNumber(e)
+				_val = _val1 || _val2 || _val3
+				switch (state) {
+					//扣运费
+					case "freight":
+
+						break;
+						// 应付
+					case "paid":
+						break;
+					case "deductPayment":
+
+						break;
+
+						// 付款金额
+					case "pay":
+						if (parseInt(e) > item.freightIngPayable - item.freightEdPayable) {
+							_val = true
+						}
+						break;
+				}
+				return _val
+
+			},
+			closeModel() {
+				this.freightAlert = false;
+				this.payAlert = false;
+				this.ductPaymentAlert = false;
+				this.paymentAlert = false;
+			},
+			confirmeductPayment(val) {
+				debugger
+				console.log(val)
+				val.goodsDeductionAmount = parseInt(this.ductPayment);
+				this.$api.doRequest('post', 'freightReceivingDispatching/api/PaymentDeduction', val).then(
+					res => {
+						debugger
+						if (res.data.code == 200) {
+							uni.showToast({
+								title: "扣款成功!",
+								icon: 'none',
+								duration: 2000
+							})
+							location.reload()
+						} else {
+							uni.showToast({
+								title: "扣款失败!",
+								icon: 'none',
+								duration: 2000
+							})
+							this.ductPayment = 0
+						}
+
+					}).catch(res => {
+
+				})
+			}
+
+		}
+	}
+</script>
+
+<style lang='scss'>
+	page,
+	.content {
+		background: #F5F6FA;
+	}
+
+	.c-row {
+		display: -webkit-box;
+		display: -webkit-flex;
+		display: flex;
+		-webkit-box-align: center;
+		-webkit-align-items: center;
+		align-items: center;
+		padding: 10rpx 30rpx;
+		position: relative;
+
+		.title {
+			color: #9698A2;
+		}
+
+		.title-black {
+			color: #333;
+		}
+	}
+
+	.con-list {
+		-webkit-box-flex: 1;
+		-webkit-flex: 1;
+		flex: 1;
+		display: -webkit-box;
+		display: -webkit-flex;
+		display: flex;
+		-webkit-box-orient: vertical;
+		-webkit-box-direction: normal;
+		-webkit-flex-direction: column;
+		flex-direction: column;
+		color: #303133;
+		line-height: 40rpx;
+		text-align: right;
+		padding-right: 20rpx;
+		font-size: 12px;
+	}
+
+	.transaction {
+		background-color: #FFFFFF;
+		margin: 10px;
+		padding-bottom: 10px;
+		border-radius: 20px;
+
+		.type {
+			display: inline-block;
+			font-size: 10px;
+			padding: 1px 3px;
+			border-radius: 50%;
+			width: 19px;
+			height: 19px;
+			line-height: 19px;
+		}
+
+		.type.send {
+			color: #22C572;
+			background: #E9F8F0;
+		}
+
+		.type.put {
+			color: #22C572;
+			background: #E9F8F0;
+		}
+
+		.weightnotes {
+			display: inline-block;
+			border: 1px solid #CDCDCD;
+			padding: 5px;
+			font-size: 10px;
+			margin-left: 3px;
+		}
+
+		.deductfreight,
+		.payfreight {
+			width: 75px;
+			height: 33px;
+			line-height: 33px;
+			font-size: 14px;
+			background: #fff;
+			border: 1px solid #CDCDCD;
+			border-radius: 30px;
+			text-align: center;
+			margin: 0 5px;
+		}
+
+		.payfreight {
+			margin-right: 0;
+		}
+	}
+
+	.line {
+		display: inline-block;
+		padding: 5px;
+		position: relative;
+		font-size: 17px;
+	}
+
+	.line.active {
+		font-size: 19px;
+		font-weight: 900;
+	}
+
+	.line.active:after {
+		content: '';
+		display: block;
+		position: absolute;
+		width: 38px;
+		left: 50%;
+		transform: translateX(-50%);
+		bottom: 0;
+		border-bottom: 1px solid #22C572;
+	}
+
+	.cu-tag.badge {
+		right: 26rpx;
+	}
+
+	.cu-item {
+		height: 80rpx;
+		display: inline-block;
+		line-height: 80rpx;
+	}
+
+	.search-form {
+		background: #F5F6F9;
+		padding-left: 20rpx;
+	}
+
+	.title-tip {
+		color: #E63113;
+		text-align: right;
+	}
+
+	.tag1 {
+		background: #F5F6F9;
+		padding: 5px;
+		color: #333333;
+		display: inline-flex;
+		font-size: 22rpx;
+		border-radius: 3px;
+		margin: 3px;
+	}
+
+	.tag {
+		background: #F5F6F9;
+		padding: 7px 12px;
+		color: #333333;
+		display: inline-flex;
+		font-size: 22rpx;
+		border-radius: 15px;
+		margin: 3px;
+	}
+
+	.tag-bule {
+		background: #EBEEFA;
+		color: #5C76DF;
+	}
+
+	.tag-green {
+		background: #C6F7BC;
+		color: #065112;
+	}
+
+	.tag-yellow {
+		background: #F9F2EA;
+		color: #BE9C69;
+	}
+
+	.tag-red {
+		background: #FEECE6;
+		color: #FE6430;
+	}
+
+	.text-white {
+		color: #fff;
+	}
+
+	.text-white text {
+		position: relative;
+		z-index: 2;
+		background: linear-gradient(45deg, #3DC146, #B2D612);
+		padding: 5px 10px;
+		border-radius: 38rpx;
+	}
+
+	.center {
+		margin-bottom: 100px;
+	}
+
+	.guess-section {
+		padding-bottom: 100upx;
+		display: flex;
+		flex-wrap: wrap;
+		padding: 30upx;
+		background: #fff;
+		margin: 10px;
+		border-radius: 6px;
+
+		.type {
+			border-radius: 10px;
+			padding: 5px;
+			wdith: 22px;
+			height: 22px;
+			line-height: 14px;
+			font-size: 12px;
+		}
+
+		.type.send {
+			background: #22C572;
+			color: #fff;
+		}
+
+		.type.put {
+			background: #FD714F;
+			color: #fff;
+		}
+
+		.businessnumber {
+			font-size: 16px;
+			font-weight: 600;
+		}
+
+		.consigner {
+			font-size: 12px;
+		}
+
+		.time {
+			color: #878C9C;
+		}
+
+		.goods {
+			font-size: 12px;
+		}
+
+		.goodsstatus {
+			background: #F9F9FA;
+			color: #9698A2;
+			padding: 10px 0;
+			padding-left: 47px;
+			margin: 10px 0;
+		}
+
+		.del {
+			width: 60px;
+			height: 33px;
+			line-height: 33px;
+			font-size: 14px;
+			background: #fff;
+			border: 1px solid #CDCDCD;
+			border-radius: 30px;
+			text-align: center;
+		}
+	}
+
+	.navbar {
+		position: fixed;
+		left: 0;
+		top: var(--window-top);
+		display: flex;
+		width: 100%;
+		height: 80upx;
+		background: #fff;
+		box-shadow: 0 2upx 10upx rgba(0, 0, 0, .06);
+		z-index: 10;
+
+		.nav-item {
+			flex: 1;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 100%;
+			font-size: 30upx;
+			color: $font-color-dark;
+			position: relative;
+
+			&.current {
+				color: $base-color;
+
+				&:after {
+					content: '';
+					position: absolute;
+					left: 50%;
+					bottom: 0;
+					transform: translateX(-50%);
+					width: 120upx;
+					height: 0;
+					border-bottom: 4upx solid $base-color;
+				}
+			}
+		}
+
+		.p-box {
+			display: flex;
+			flex-direction: column;
+
+			.yticon {
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				width: 30upx;
+				height: 14upx;
+				line-height: 1;
+				margin-left: 4upx;
+				font-size: 26upx;
+				color: #888;
+
+				&.active {
+					color: $base-color;
+				}
+			}
+
+			.xia {
+				transform: scaleY(-1);
+			}
+		}
+
+		.cate-item {
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 100%;
+			width: 80upx;
+			position: relative;
+			font-size: 44upx;
+
+			&:after {
+				content: '';
+				position: absolute;
+				left: 0;
+				top: 50%;
+				transform: translateY(-50%);
+				border-left: 1px solid #ddd;
+				width: 0;
+				height: 36upx;
+			}
+		}
+	}
+
+	/* 分类 */
+	.cate-mask {
+		position: fixed;
+		left: 0;
+		top: var(--window-top);
+		bottom: 0;
+		width: 100%;
+		background: rgba(0, 0, 0, 0);
+		z-index: 95;
+		transition: .3s;
+
+		.cate-content {
+			width: 630upx;
+			height: 100%;
+			background: #fff;
+			float: right;
+			transform: translateX(100%);
+			transition: .3s;
+		}
+
+		&.none {
+			display: none;
+		}
+
+		&.show {
+			background: rgba(0, 0, 0, .4);
+
+			.cate-content {
+				transform: translateX(0);
+			}
+		}
+	}
+
+	.cate-list {
+		display: flex;
+		flex-direction: column;
+		height: 100%;
+
+		.cate-item {
+			display: flex;
+			align-items: center;
+			height: 90upx;
+			padding-left: 30upx;
+			font-size: 28upx;
+			color: #555;
+			position: relative;
+		}
+
+		.two {
+			height: 64upx;
+			color: #303133;
+			font-size: 30upx;
+			background: #f8f8f8;
+		}
+
+		.active {
+			color: $base-color;
+		}
+	}
+
+	.introduce-section .title {
+		font-size: 17px;
+		font-weight: bold;
+		height: 40px;
+		line-height: 40px;
+		flex: 2.5;
+		border-bottom: 1px solid #EEEEEE;
+	}
+
+	.introduce-section .address {
+		color: #878C9C;
+		font-size: 12px;
+		padding: 10px 0 10px;
+	}
+
+	.introduce-section .price {
+		padding: 10px 0 10px;
+		color: #FD714F;
+		font-size: 19px;
+		font-weight: 700;
+	}
+
+	.introduce-section .guess-item {
+		border-radius: 10px;
+		background: #fff;
+		padding: 0upx 30upx 20upx;
+		margin: 8px;
+		border-bottom: 1px solid #ccc;
+	}
+
+	/* 销售信息 */
+	.introduce-section {
+		.title-tip {
+			flex: 1;
+		}
+
+		.price-box {
+			display: flex;
+			align-items: baseline;
+			font-size: 26upx;
+		}
+
+		.price {
+			font-size: $font-lg + 2upx;
+		}
+
+		.m-price {
+			margin: 0 12upx;
+			color: $font-color-light;
+			text-decoration: line-through;
+		}
+
+		.coupon-tip {
+			align-items: center;
+			padding: 4upx 10upx;
+			background: $uni-color-primary;
+			font-size: $font-sm;
+			color: #fff;
+			border-radius: 6upx;
+			line-height: 1;
+			transform: translateY(-4upx);
+		}
+
+		.bot-row {
+			display: flex;
+			align-items: center;
+			height: 50upx;
+			font-size: $font-sm;
+			color: $font-color-light;
+
+			view {
+				flex: 1;
+			}
+		}
+	}
+
+	.footer {
+		position: fixed;
+		bottom: 0;
+		width: 100%;
+		padding: 20px 0;
+	}
+
+	.btn {
+		width: 90%;
+		background: #22C572;
+		color: #fff;
+		border-radius: 30px;
+	}
+
+	.btn:after {
+		border: none;
+	}
+
+	.cumulative-style {
+		justify-content: flex-end;
+		align-items: center;
+		display: flex;
+		flex-direction: row;
+	}
+
+	.freightAlert-warp {
+		padding: 0 60rpx 80rpx 60rpx;
+		font-size: 26rpx;
+		/* height: 400rpx; */
+	}
+
+	.row {
+		margin: 26rpx 0;
+	}
+
+	.uview-border {
+		border-bottom: 1px solid #E8E9ED;
+	}
+
+	.freightAlert-model {
+		.freightAlert-row {
+			display: flex;
+			justify-content: center;
+			position: relative;
+
+			.close {
+				position: absolute;
+				right: 20rpx;
+				top: 0;
+				bottom: 0;
+				margin: auto;
+
+			}
+
+			.title {
+				font-size: 34rpx;
+				font-weight: 500;
+				color: #333333;
+				line-height: 48px;
+			}
+		}
+
+		.red-tip {
+			color: red;
+			margin-top: 20rpx;
+		}
+
+		.freightAlert-row2,
+		.freightAlert-row4 {
+			display: flex;
+			justify-content: space-between;
+
+			.text {
+				display: flex;
+				align-items: center;
+			}
+		}
+	}
+
+	.payAlert {
+		/* height: 800rpx; */
+	}
+
+	.unpaid,
+	.paid {
+		display: flex;
+		justify-content: space-between;
+		margin: 20rpx 0;
+	}
+
+	.cumulative-style {
+		justify-content: flex-end;
+		align-items: center;
+		display: flex;
+		flex-direction: row;
+	}
+</style>

+ 958 - 0
pageA/freightTransport/record/sendrecord.vue

@@ -0,0 +1,958 @@
+<template>
+	<view class="center">
+		<view class="transaction">
+			<view style='padding-top:10px;' class="c-row">
+				<view class="title">业务编号</view>
+				<view class="con-list">
+					<input v-model='purchaseOrder.businessNumber' disabled name="text"></input>
+				</view>
+			</view>
+			<view class="c-row">
+				<view class="title">货名</view>
+				<view class="con-list">
+					<input v-model='purchaseOrder.goodsName' disabled name="text"></input>
+				</view>
+			</view>
+			<view class="c-row">
+				<view class="title">收货方</view>
+				<view class="con-list">
+					<input v-model='purchaseOrder.consignee' disabled name="text"></input>
+				</view>
+			</view>
+			<view class="c-row">
+				<view class="title">货物单价(元/吨)</view>
+				<view class="con-list">
+					<input v-model='purchaseOrder.goodsPrice' disabled name="text"></input>
+				</view>
+			</view>
+			<view class="c-row">
+				<view class="title">运费单价(元/吨)</view>
+				<view class="con-list">
+					<input v-model='purchaseOrder.freightUnitPrice' disabled name="text"></input>
+				</view>
+			</view>
+			<view class="c-row">
+				<view class="title">累计收发</view>
+				<view class="con-list cumulative-style">
+					<!-- <input v-model='purchaseOrder.transactionsNumber' disabled name="text"></input> -->
+					<view>
+						<text>{{ radTotal.receipt}}</text>
+						<text class='type send'>发</text>
+					</view>
+					<view>
+						<text>{{ radTotal.delivery}}</text>
+						<text class='type send'>收</text>
+					</view>
+				</view>
+
+			</view>
+			<view class="c-row">
+				<view class="title">收货地址</view>
+				<view class="con-list">
+					<input v-model='purchaseOrder.receivingAddress' disabled name="text"></input>
+				</view>
+			</view>
+		</view>
+
+		<view class="transaction" v-for="(item,index) in purchaseOrder.freightReceivingDispatchingCars">
+			<view style='padding-top:10px;' class="c-row b-b justify-between">
+				<view class="title">{{item.carNo}}</view>
+				<view style='align-items: center;' class="flex">
+					<text style='color:#878C9C;'>{{item.dispatchingDate}}</text>
+					<text class='type send' v-if="item.statusFlag==1">发</text>
+					<text class='type send' v-if="item.statusFlag==2">收</text>
+				</view>
+			</view>
+			<view class="c-row  justify-between">
+				<view style='flex:1;' class="title-black">净重</view>
+				<view style='align-items: center;flex:2;' class="flex">
+					<view style='flex:1;text-align:right;'>
+						<text>{{item.reciveNetWeight}}</text>
+						<text class='type send'>发</text>
+						<view class='weightnotes' @click="viewPoundList(0)">查看磅单</view>
+						<u-modal v-model="isShowFViewPoundList" title="磅单(发)" show-cancel-button=true>
+							<view v-if="item.collectionScreenshot==''||item.collectionScreenshot==null" class="noimg">
+								暂未上传磅单</view>
+							<img :src="item.collectionScreenshot" alt="" class="img">
+						</u-modal>
+					</view>
+					<view style='flex:1;text-align:right;'>
+						<text>{{item.dispatchNetWeight}}</text>
+						<text class='type send'>收</text>
+						<view class='weightnotes' @click="viewPoundList(1)">查看磅单</view>
+						<u-modal v-model="isShowSViewPoundList" title="磅单(收)" show-cancel-button=true>
+							<view v-if="item.reciveCollectionScreenshot==''||item.reciveCollectionScreenshot==null"
+								class="noimg">暂未上传磅单</view>
+							<img :src="item.reciveCollectionScreenshot" alt="" class="img">
+						</u-modal>
+					</view>
+
+				</view>
+			</view>
+			<view class="c-row">
+				<view class="title-black">应付贷款</view>
+				<view class="con-list">
+					¥{{item.goodsIngPayable}}
+				</view>
+			</view>
+			<view class="c-row">
+				<view class="title">已付贷款</view>
+				<view style='color:#22C572;' class="con-list">
+					¥{{item.goodsEdPayable}}
+				</view>
+			</view>
+			<view class="c-row">
+				<view class="title">贷款扣款</view>
+				<view class="con-list">
+					¥{{item.goodsDeductionAmount}}
+				</view>
+			</view>
+			<view class="c-row">
+				<view class="title-black">应付运费</view>
+				<view class="con-list">
+					{{item.freightIngPayable}}
+				</view>
+			</view>
+			<view class="c-row">
+				<view class="title">已付运费</view>
+				<view style='color:#22C572;' class="con-list">
+					¥{{item.freightEdPayable}}
+				</view>
+			</view>
+			<view class="c-row">
+				<view class="title">运费扣款</view>
+				<view class="con-list">
+					¥{{item.freightDeductionAmount}}
+				</view>
+			</view>
+			<view class="c-row flex justify-end">
+				<view class='deductfreight' @click="freightDeduction(item)">扣运费</view>
+				<view class="freightAlert-model">
+					<u-modal v-model="freightAlert" cancel-color="#AFB3BF" confirm-color="#22C572" :show-title="false"
+						show-cancel-button=true @confirm="confirmFreight(0,item)">
+						<view class="freightAlert-warp">
+							<view class="freightAlert-row">
+								<view class="title">扣运费</view>
+								<u-icon name="close" class="close" size="20" @click="closeModel"></u-icon>
+							</view>
+							<view class="freightAlert-row2 row">
+								<view>运输损耗</view>
+								<view>{{item.reciveNetWeight-item.dispatchNetWeight}}</view>
+							</view>
+							<view class="freightAlert-row3 row">
+								扣款金额
+							</view>
+							<view class="freightAlert-row4">
+								<u-input v-model="freightDeductionAmount" :type="type" :border="border"
+									placeholder="请输入扣款金额" class="uview-border" @input="inputWatch" />
+								<view class="text">
+									元
+								</view>
+							</view>
+							<view class="red-tip" v-show="isShowFreightTip">
+								扣款金额输入错误/扣款金额不能为空
+							</view>
+						</view>
+					</u-modal>
+				</view>
+				<view class='payfreight' @click="payDeduction()">付运费</view>
+				<view class="freightAlert-model">
+					<u-modal v-model="payAlert" cancel-color="#AFB3BF" confirm-color="#22C572" :show-title="false"
+						show-cancel-button=true @confirm="confirmFreight(1,item)">
+						<view class="freightAlert-warp payAlert">
+							<view class="freightAlert-row">
+								<view class="title">付运费</view>
+								<u-icon name="close" class="close" size="20" @click="closeModel"></u-icon>
+							</view>
+							<view class="freightAlert-row3 row">
+								应付
+							</view>
+							<view class="freightAlert-row4">
+								<u-input v-model="item.freightIngPayable" :type="type" :border="border"
+									placeholder="请输入付款金额" class="uview-border" @input="paidInputWatch" />
+								<view class="text">
+									元
+								</view>
+							</view>
+							<view class="red-tip paid-tip" v-show="isShowPaidTip">
+								应付金额不能为空/应付运费不能小于已付运费
+							</view>
+							<view class="paid">
+								<view class="">
+									已付
+								</view>
+								<view>
+									{{item.freightEdPayable}}元
+								</view>
+							</view>
+							<view class="unpaid">
+								<view class="">
+									未付
+								</view>
+								<view>
+									{{item.freightIngPayable-item.freightEdPayable}}元
+								</view>
+							</view>
+							<view class="freightAlert-row3 row">
+								付款金额
+							</view>
+							<view class="freightAlert-row4">
+								<u-input v-model="item.money" :type="type" :border="border" placeholder="请输入扣款金额"
+									class="uview-border" @input="payInputWatch($event,item)" />
+								<view class="text">
+									元
+								</view>
+							</view>
+							<view class="red-tip pay-tip" v-show="isShowPayTip">
+								付款金额输入错误/付款金额不能超过未付金额/付款金额不能为空
+							</view>
+						</view>
+					</u-modal>
+				</view>
+			</view>
+		</view>
+		<view class='footer'>
+			<button class="btn" @click="commit()">添加发车信息</button>
+		</view>
+
+
+	</view>
+</template>
+
+<script>
+	import {
+		getDetail
+	} from "./index";
+	export default {
+		name: "business",
+		data() {
+			return {
+				isShowFViewPoundList: false,
+				isShowSViewPoundList: false,
+				purchaseOrder: {},
+				freightDeductionAmount: 0,
+				money: 0,
+				carInfo: [],
+				radTotal: {
+					delivery: 0,
+					receipt: 0
+				},
+				type: 'text',
+				border: false,
+				payValue: '',
+				copePayValue: '',
+				paidValue: '',
+				freightAlert: false,
+				payAlert: false,
+				isShowFreightTip: false,
+				isShowPaidTip: false,
+				isShowPayTip: false,
+				id: ""
+			}
+		},
+		onShow() {
+
+		},
+		onLoad(options) {
+			debugger
+			getDetail(options.id, this)
+			this.id = options.id
+		},
+		onPageScroll(e) {
+
+		},
+		//下拉刷新
+		onPullDownRefresh() {},
+		onReachBottom() { //上拉触底函数
+		},
+		computed: {
+
+		},
+		methods: {
+			commit() {
+				uni.navigateTo({
+					url: '/pageA/freightTransport/contract_detail?id=' + this.purchaseOrder.batch
+				})
+			},
+			// 查看磅单
+			viewPoundList(type) {
+				if (type == 0) {
+					this.isShowFViewPoundList = true
+				} else {
+					this.isShowSViewPoundList = true
+				}
+			},
+			confirmFreight(flag, val) {
+				debugger
+				if (flag == 1) {
+					val.money = parseInt(val.money);
+				} else {
+					val.freightDeductionAmount = parseInt(this.freightDeductionAmount);
+				}
+				val.freightIngPayable = parseInt(val.freightIngPayable);
+				val.flag = flag
+				this.$api.doRequest('post', 'freightReceivingDispatching/api/paymentAndDeductionfreight', val).then(
+					res => {
+						debugger
+						if (res.data.code == 200) {
+							location.reload()
+						}
+
+					}).catch(res => {
+
+				})
+			},
+			inputWatch(e) {
+				debugger
+				let _val = this.checkVal(e, "freight");
+				if (_val) {
+					this.isShowFreightTip = true
+				} else {
+					this.isShowFreightTip = false
+				}
+			},
+			paidInputWatch(e) {
+				let _val = this.checkVal(e, "paid");
+				if (_val) {
+					this.isShowPaidTip = true
+				} else {
+					this.isShowPaidTip = false
+				}
+			},
+			payInputWatch(e, item) {
+				let _val = this.checkVal(e, "pay", item);
+				if (_val) {
+					this.isShowPayTip = true
+				} else {
+					this.isShowPayTip = false
+				}
+			},
+			// 扣运费
+			freightDeduction(item) {
+				debugger
+				this.freightAlert = true;
+				item.freightDeductionAmount = ""
+				console.log("扣运费")
+			},
+			// 付运费
+			payDeduction() {
+				console.log("付运费")
+				this.payAlert = true
+			},
+
+			//判断输入值
+			checkVal(e, state, item) {
+				debugger
+				debugger
+				console.log(e)
+				let _val;
+				let _val1 = this.utils.isEmpty(e)
+				let _val2 = this.utils.isTwoPoint(e)
+				let _val3 = !this.utils.isNumber(e)
+				_val = _val1 || _val2 || _val3
+				switch (state) {
+					//扣运费
+					case "freight":
+
+						break
+						// 应付
+					case "paid":
+
+						break
+						// 付款金额
+					case "pay":
+						if (parseInt(e) > item.freightIngPayable - item.freightEdPayable) {
+							_val = true
+						}
+						break
+				}
+				return _val
+
+			},
+			closeModel() {
+				this.freightAlert = false;
+				this.payAlert = false;
+			}
+
+		}
+	}
+</script>
+
+<style lang='scss'>
+	page,
+	.content {
+		background: #F5F6FA;
+	}
+
+	.c-row {
+		display: -webkit-box;
+		display: -webkit-flex;
+		display: flex;
+		-webkit-box-align: center;
+		-webkit-align-items: center;
+		align-items: center;
+		padding: 10rpx 30rpx;
+		position: relative;
+
+		.title {
+			color: #9698A2;
+		}
+
+		.title-black {
+			color: #333;
+		}
+	}
+
+	.con-list {
+		-webkit-box-flex: 1;
+		-webkit-flex: 1;
+		flex: 1;
+		display: -webkit-box;
+		display: -webkit-flex;
+		display: flex;
+		-webkit-box-orient: vertical;
+		-webkit-box-direction: normal;
+		-webkit-flex-direction: column;
+		flex-direction: column;
+		color: #303133;
+		line-height: 40rpx;
+		text-align: right;
+		padding-right: 20rpx;
+		font-size: 12px;
+	}
+
+	.transaction {
+		background-color: #FFFFFF;
+		margin: 10px;
+		padding-bottom: 10px;
+		border-radius: 20px;
+
+		.type {
+			display: inline-block;
+			font-size: 10px;
+			padding: 1px 3px;
+			border-radius: 50%;
+			width: 19px;
+			height: 19px;
+			line-height: 19px;
+		}
+
+		.type.send {
+			color: #22C572;
+			background: #E9F8F0;
+		}
+
+		.type.put {
+			color: #22C572;
+			background: #E9F8F0;
+		}
+
+		.weightnotes {
+			display: inline-block;
+			border: 1px solid #CDCDCD;
+			padding: 5px;
+			font-size: 10px;
+			margin-left: 3px;
+		}
+
+		.deductfreight,
+		.payfreight {
+			width: 75px;
+			height: 33px;
+			line-height: 33px;
+			font-size: 14px;
+			background: #fff;
+			border: 1px solid #CDCDCD;
+			border-radius: 30px;
+			text-align: center;
+			margin: 0 10px;
+		}
+
+		.payfreight {
+			margin-right: 0;
+		}
+	}
+
+	.line {
+		display: inline-block;
+		padding: 5px;
+		position: relative;
+		font-size: 17px;
+	}
+
+	.line.active {
+		font-size: 19px;
+		font-weight: 900;
+	}
+
+	.line.active:after {
+		content: '';
+		display: block;
+		position: absolute;
+		width: 38px;
+		left: 50%;
+		transform: translateX(-50%);
+		bottom: 0;
+		border-bottom: 1px solid #22C572;
+	}
+
+	.cu-tag.badge {
+		right: 26rpx;
+	}
+
+	.cu-item {
+		height: 80rpx;
+		display: inline-block;
+		line-height: 80rpx;
+	}
+
+	.search-form {
+		background: #F5F6F9;
+		padding-left: 20rpx;
+	}
+
+	.title-tip {
+		color: #E63113;
+		text-align: right;
+	}
+
+	.tag1 {
+		background: #F5F6F9;
+		padding: 5px;
+		color: #333333;
+		display: inline-flex;
+		font-size: 22rpx;
+		border-radius: 3px;
+		margin: 3px;
+	}
+
+	.tag {
+		background: #F5F6F9;
+		padding: 7px 12px;
+		color: #333333;
+		display: inline-flex;
+		font-size: 22rpx;
+		border-radius: 15px;
+		margin: 3px;
+	}
+
+	.tag-bule {
+		background: #EBEEFA;
+		color: #5C76DF;
+	}
+
+	.tag-green {
+		background: #C6F7BC;
+		color: #065112;
+	}
+
+	.tag-yellow {
+		background: #F9F2EA;
+		color: #BE9C69;
+	}
+
+	.tag-red {
+		background: #FEECE6;
+		color: #FE6430;
+	}
+
+	.text-white {
+		color: #fff;
+	}
+
+	.text-white text {
+		position: relative;
+		z-index: 2;
+		background: linear-gradient(45deg, #3DC146, #B2D612);
+		padding: 5px 10px;
+		border-radius: 38rpx;
+	}
+
+	.center {
+		margin-bottom: 100px;
+	}
+
+	.guess-section {
+		padding-bottom: 100upx;
+		display: flex;
+		flex-wrap: wrap;
+		padding: 30upx;
+		background: #fff;
+		margin: 10px;
+		border-radius: 6px;
+
+		.type {
+			border-radius: 10px;
+			padding: 5px;
+			wdith: 22px;
+			height: 22px;
+			line-height: 14px;
+			font-size: 12px;
+		}
+
+		.type.send {
+			background: #22C572;
+			color: #fff;
+		}
+
+		.type.put {
+			background: #FD714F;
+			color: #fff;
+		}
+
+		.businessnumber {
+			font-size: 16px;
+			font-weight: 600;
+		}
+
+		.consigner {
+			font-size: 12px;
+		}
+
+		.time {
+			color: #878C9C;
+		}
+
+		.goods {
+			font-size: 12px;
+		}
+
+		.goodsstatus {
+			background: #F9F9FA;
+			color: #9698A2;
+			padding: 10px 0;
+			padding-left: 47px;
+			margin: 10px 0;
+		}
+
+		.del {
+			width: 60px;
+			height: 33px;
+			line-height: 33px;
+			font-size: 14px;
+			background: #fff;
+			border: 1px solid #CDCDCD;
+			border-radius: 30px;
+			text-align: center;
+		}
+	}
+
+	.navbar {
+		position: fixed;
+		left: 0;
+		top: var(--window-top);
+		display: flex;
+		width: 100%;
+		height: 80upx;
+		background: #fff;
+		box-shadow: 0 2upx 10upx rgba(0, 0, 0, .06);
+		z-index: 10;
+
+		.nav-item {
+			flex: 1;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 100%;
+			font-size: 30upx;
+			color: $font-color-dark;
+			position: relative;
+
+			&.current {
+				color: $base-color;
+
+				&:after {
+					content: '';
+					position: absolute;
+					left: 50%;
+					bottom: 0;
+					transform: translateX(-50%);
+					width: 120upx;
+					height: 0;
+					border-bottom: 4upx solid $base-color;
+				}
+			}
+		}
+
+		.p-box {
+			display: flex;
+			flex-direction: column;
+
+			.yticon {
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				width: 30upx;
+				height: 14upx;
+				line-height: 1;
+				margin-left: 4upx;
+				font-size: 26upx;
+				color: #888;
+
+				&.active {
+					color: $base-color;
+				}
+			}
+
+			.xia {
+				transform: scaleY(-1);
+			}
+		}
+
+		.cate-item {
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 100%;
+			width: 80upx;
+			position: relative;
+			font-size: 44upx;
+
+			&:after {
+				content: '';
+				position: absolute;
+				left: 0;
+				top: 50%;
+				transform: translateY(-50%);
+				border-left: 1px solid #ddd;
+				width: 0;
+				height: 36upx;
+			}
+		}
+	}
+
+	/* 分类 */
+	.cate-mask {
+		position: fixed;
+		left: 0;
+		top: var(--window-top);
+		bottom: 0;
+		width: 100%;
+		background: rgba(0, 0, 0, 0);
+		z-index: 95;
+		transition: .3s;
+
+		.cate-content {
+			width: 630upx;
+			height: 100%;
+			background: #fff;
+			float: right;
+			transform: translateX(100%);
+			transition: .3s;
+		}
+
+		&.none {
+			display: none;
+		}
+
+		&.show {
+			background: rgba(0, 0, 0, .4);
+
+			.cate-content {
+				transform: translateX(0);
+			}
+		}
+	}
+
+	.cate-list {
+		display: flex;
+		flex-direction: column;
+		height: 100%;
+
+		.cate-item {
+			display: flex;
+			align-items: center;
+			height: 90upx;
+			padding-left: 30upx;
+			font-size: 28upx;
+			color: #555;
+			position: relative;
+		}
+
+		.two {
+			height: 64upx;
+			color: #303133;
+			font-size: 30upx;
+			background: #f8f8f8;
+		}
+
+		.active {
+			color: $base-color;
+		}
+	}
+
+	.introduce-section .title {
+		font-size: 17px;
+		font-weight: bold;
+		height: 40px;
+		line-height: 40px;
+		flex: 2.5;
+		border-bottom: 1px solid #EEEEEE;
+	}
+
+	.introduce-section .address {
+		color: #878C9C;
+		font-size: 12px;
+		padding: 10px 0 10px;
+	}
+
+	.introduce-section .price {
+		padding: 10px 0 10px;
+		color: #FD714F;
+		font-size: 19px;
+		font-weight: 700;
+	}
+
+	.introduce-section .guess-item {
+		border-radius: 10px;
+		background: #fff;
+		padding: 0upx 30upx 20upx;
+		margin: 8px;
+		border-bottom: 1px solid #ccc;
+	}
+
+	/* 销售信息 */
+	.introduce-section {
+		.title-tip {
+			flex: 1;
+		}
+
+		.price-box {
+			display: flex;
+			align-items: baseline;
+			font-size: 26upx;
+		}
+
+		.price {
+			font-size: $font-lg + 2upx;
+		}
+
+		.m-price {
+			margin: 0 12upx;
+			color: $font-color-light;
+			text-decoration: line-through;
+		}
+
+		.coupon-tip {
+			align-items: center;
+			padding: 4upx 10upx;
+			background: $uni-color-primary;
+			font-size: $font-sm;
+			color: #fff;
+			border-radius: 6upx;
+			line-height: 1;
+			transform: translateY(-4upx);
+		}
+
+		.bot-row {
+			display: flex;
+			align-items: center;
+			height: 50upx;
+			font-size: $font-sm;
+			color: $font-color-light;
+
+			view {
+				flex: 1;
+			}
+		}
+	}
+
+	.footer {
+		position: fixed;
+		bottom: 0;
+		width: 100%;
+		padding: 20px 0;
+	}
+
+	.btn {
+		width: 90%;
+		background: #22C572;
+		color: #fff;
+		border-radius: 30px;
+	}
+
+	.btn:after {
+		border: none;
+	}
+
+	.freightAlert-warp {
+		padding: 0 60rpx 80rpx 60rpx;
+		font-size: 26rpx;
+		/* height: 400rpx; */
+	}
+
+	.row {
+		margin: 26rpx 0;
+	}
+
+	.uview-border {
+		border-bottom: 1px solid #E8E9ED;
+	}
+
+	.freightAlert-model {
+		.freightAlert-row {
+			display: flex;
+			justify-content: center;
+			position: relative;
+
+			.close {
+				position: absolute;
+				right: 20rpx;
+				top: 0;
+				bottom: 0;
+				margin: auto;
+
+			}
+
+			.title {
+				font-size: 34rpx;
+				font-weight: 500;
+				color: #333333;
+				line-height: 48px;
+			}
+		}
+
+		.red-tip {
+			color: red;
+			margin-top: 20rpx;
+		}
+
+		.freightAlert-row2,
+		.freightAlert-row4 {
+			display: flex;
+			justify-content: space-between;
+
+			.text {
+				display: flex;
+				align-items: center;
+			}
+		}
+	}
+
+	.payAlert {
+		/* height: 800rpx; */
+	}
+
+	.unpaid,
+	.paid {
+		display: flex;
+		justify-content: space-between;
+		margin: 20rpx 0;
+	}
+
+	.cumulative-style {
+		justify-content: flex-end;
+		align-items: center;
+		display: flex;
+		flex-direction: row;
+	}
+
+	.noimg {
+		margin-top: 20rpx;
+		text-align: center;
+	}
+
+	.img {
+		margin-top: 20rpx;
+	}
+</style>

+ 0 - 621
pageA/freightTransport/sendrecord.vue

@@ -1,621 +0,0 @@
-<template>
-	<view class="center">
-		<view class="transaction">
-			<view style='padding-top:10px;' class="c-row">
-				<view class="title">业务编号</view>
-				<view class="con-list">
-				<input v-model='purchaseOrder.transactionsNumber' placeholder="请输入业务编号" placeholder-style="font-size: 12px;" name="input"></input>
-				</view>
-			</view>
-			<view  class="c-row">
-				<view class="title">货名</view>
-				<view class="con-list">
-				<input v-model='purchaseOrder.transactionsNumber' placeholder="请输入货名,如玉米" placeholder-style="font-size: 12px;" name="input"></input>
-				</view>
-			</view>
-			<view  class="c-row">
-				<view class="title">收货方</view>
-				<view class="con-list">
-				<input v-model='purchaseOrder.transactionsNumber' placeholder="请输入收货方名称" placeholder-style="font-size: 12px;" name="input"></input>
-				</view>
-			</view>
-			<view  class="c-row">
-				<view class="title">货物单价(元/吨)</view>
-				<view class="con-list">
-				<input v-model='purchaseOrder.transactionsNumber' placeholder="请输入货物单价" placeholder-style="font-size: 12px;" name="input"></input>
-				</view>
-			</view>
-			<view  class="c-row">
-				<view class="title">运费单价(元/吨)</view>
-				<view class="con-list">
-				<input v-model='purchaseOrder.transactionsNumber' placeholder="请输入运费单价" placeholder-style="font-size: 12px;" name="input"></input>
-				</view>
-			</view>
-			<view  class="c-row">
-				<view class="title">累计收发</view>
-				<view class="con-list">
-				<input v-model='purchaseOrder.transactionsNumber' placeholder="请输入收货地址" placeholder-style="font-size: 12px;" name="input"></input>
-				</view>
-				
-			</view>
-			<view  class="c-row">
-				<view class="title">收货地址</view>
-				<view class="con-list">
-				<input v-model='purchaseOrder.transactionsNumber' placeholder="请输入收货人账号" placeholder-style="font-size: 12px;" name="input"></input>
-				</view>
-			</view>
-		</view>
-		<view class="transaction">
-			<view  style='padding-top:10px;' class="c-row b-b justify-between">
-				<view class="title">辽H12345(C003)</view>
-				<view style='align-items: center;' class="flex">
-					<text style='color:#878C9C;'>2021-07-05</text>
-					<text class='type send'>发</text>
-				</view>
-			</view>
-			<view class="c-row  justify-between">
-				<view style='flex:1;'  class="title-black">净重</view>
-				<view  style='align-items: center;flex:2;' class="flex">
-					<view style='flex:1;text-align:right;'>
-						<text>33</text>
-						<text class='type send'>发</text>
-						<view class='weightnotes'>查看磅单</view>
-					</view>
-					<view style='flex:1;text-align:right;'>
-						<text>30</text>
-						<text class='type send'>发</text>
-						<view class='weightnotes'>查看磅单</view>
-					</view>
-				</view>
-			</view>
-			<view  class="c-row">
-				<view class="title-black">贷款</view>
-				<view class="con-list">
-				¥10000.00
-				</view>
-			</view>
-			<view  class="c-row">
-				<view class="title">已付贷款</view>
-				<view style='color:#22C572;' class="con-list">
-					¥10000.00
-				</view>
-			</view>
-			<view  class="c-row">
-				<view class="title">贷款扣款</view>
-				<view class="con-list">
-					¥10000.00
-				</view>
-			</view>
-			<view  class="c-row">
-				<view class="title-black">运费</view>
-				<view class="con-list">
-					¥10000.00
-				</view>
-			</view>
-			<view  class="c-row">
-				<view class="title">已付运费</view>
-				<view style='color:#22C572;' class="con-list">
-					¥10000.00
-				</view>
-			</view>
-			<view  class="c-row">
-				<view class="title">运费扣款</view>
-				<view class="con-list">
-					¥10000.00
-				</view>
-			</view>
-			<view  class="c-row flex justify-end">
-				<view class='deductfreight'>扣运费</view>
-				<view class='payfreight'>付运费</view>
-			</view>
-		</view>
-	<view class='footer'>
-		<button class="btn" @click="commit()">添加发车信息</button>
-	</view>
-			
-	
-	</view>
-</template>
-
-<script>
-	export default {
-		name: "business",
-		data() {
-			return {
-				purchaseOrder:{}
-			}
-		},
-		onShow() {
-			
-		},
-		onLoad(options) {
-			
-		},
-		onPageScroll(e) {
-			
-		},
-		//下拉刷新
-		onPullDownRefresh() {
-		},
-		onReachBottom() { //上拉触底函数
-		},
-		methods: {
-			commit(){
-				uni.navigateTo({
-					url:'/pageA/freightTransport/contract_detail'
-				})
-			}
-
-		}
-	}
-</script>
-
-<style lang='scss'>
-	page,
-	.content {
-		background: #F5F6FA;
-	}
-.c-row {
-	    display: -webkit-box;
-	    display: -webkit-flex;
-	    display: flex;
-	    -webkit-box-align: center;
-	    -webkit-align-items: center;
-	    align-items: center;
-	    padding: 10rpx 30rpx;
-	    position: relative;
-		.title{
-			color:#9698A2;
-		}
-		.title-black{
-			color:#333;
-		}
-	}
-	.con-list {
-	    -webkit-box-flex: 1;
-	    -webkit-flex: 1;
-	    flex: 1;
-	    display: -webkit-box;
-	    display: -webkit-flex;
-	    display: flex;
-	    -webkit-box-orient: vertical;
-	    -webkit-box-direction: normal;
-	    -webkit-flex-direction: column;
-	    flex-direction: column;
-	    color: #303133;
-	    line-height: 40rpx;
-	    text-align: right;
-	    padding-right: 20rpx;
-		font-size:12px;
-	}
-	.transaction{
-		background-color: #FFFFFF;
-		margin: 10px;
-		padding-bottom: 10px;
-		border-radius: 20px;
-		.type{
-			display:inline-block;
-			font-size:10px;
-			padding:1px 3px;
-			border-radius:50%;
-			width:19px;height:19px;
-			line-height:19px;
-		}
-		.type.send{
-			color:#22C572;
-			background:#E9F8F0;
-		}
-		.type.put{
-			color:#22C572;
-			background:#E9F8F0;
-		}
-		.weightnotes{
-			display:inline-block;
-			border:1px solid #CDCDCD;
-			padding:5px;
-			font-size:10px;
-			margin-left:3px;
-		}
-		.deductfreight,.payfreight{
-			width:75px;
-			height: 33px;
-			line-height:33px;
-			font-size:14px;
-			background: #fff;
-			border:1px solid #CDCDCD;
-			border-radius:30px;
-			text-align:center;
-			margin:0 10px;
-		}
-		.payfreight{
-			margin-right:0;
-		}
-	}
-	.line {
-		display: inline-block;
-		padding: 5px;
-		position: relative;
-		font-size: 17px;
-	}
-
-	.line.active {
-		font-size: 19px;
-		font-weight: 900;
-	}
-
-	.line.active:after {
-		content: '';
-		display: block;
-		position: absolute;
-		width: 38px;
-		left: 50%;
-		transform: translateX(-50%);
-		bottom: 0;
-		border-bottom: 1px solid #22C572;
-	}
-
-	.cu-tag.badge {
-		right: 26rpx;
-	}
-
-	.cu-item {
-		height: 80rpx;
-		display: inline-block;
-		line-height: 80rpx;
-	}
-
-	.search-form {
-		background: #F5F6F9;
-		padding-left: 20rpx;
-	}
-
-	.title-tip {
-		color: #E63113;
-		text-align: right;
-	}
-
-	.tag1 {
-		background: #F5F6F9;
-		padding: 5px;
-		color: #333333;
-		display: inline-flex;
-		font-size: 22rpx;
-		border-radius: 3px;
-		margin: 3px;
-	}
-
-	.tag {
-		background: #F5F6F9;
-		padding: 7px 12px;
-		color: #333333;
-		display: inline-flex;
-		font-size: 22rpx;
-		border-radius: 15px;
-		margin: 3px;
-	}
-
-	.tag-bule {
-		background: #EBEEFA;
-		color: #5C76DF;
-	}
-
-	.tag-green {
-		background: #C6F7BC;
-		color: #065112;
-	}
-
-	.tag-yellow {
-		background: #F9F2EA;
-		color: #BE9C69;
-	}
-
-	.tag-red {
-		background: #FEECE6;
-		color: #FE6430;
-	}
-
-	.text-white {
-		color: #fff;
-	}
-
-	.text-white text {
-		position: relative;
-		z-index: 2;
-		background: linear-gradient(45deg, #3DC146, #B2D612);
-		padding: 5px 10px;
-		border-radius: 38rpx;
-	}
-	.center{
-		margin-bottom:100px;
-	}
-	.guess-section {
-		padding-bottom: 100upx;
-		display: flex;
-		flex-wrap: wrap;
-		padding:30upx;
-		background: #fff;
-		margin:10px;
-		border-radius:6px;
-		.type{
-			border-radius:10px;
-			padding:5px;
-			wdith:22px;height:22px;
-			line-height:14px;
-			font-size:12px;
-		}
-		.type.send{
-			background:#22C572;
-			color:#fff;
-		}
-		.type.put{
-			background:#FD714F;
-			color:#fff;
-		}
-		.businessnumber{
-			font-size:16px;
-			font-weight:600;
-		}
-		.consigner{
-			font-size:12px;
-		}
-		.time{
-			color:#878C9C;
-		}
-		.goods{
-			font-size:12px;
-		}
-		.goodsstatus{
-			background:#F9F9FA;
-			color:#9698A2;
-			padding:10px 0;
-			padding-left:47px;
-			margin:10px 0;
-		}
-		.del{
-			width:60px;
-			height: 33px;
-			line-height:33px;
-			font-size:14px;
-			background: #fff;
-			border:1px solid #CDCDCD;
-			border-radius:30px;
-			text-align:center;
-		}
-	}
-
-	.navbar {
-		position: fixed;
-		left: 0;
-		top: var(--window-top);
-		display: flex;
-		width: 100%;
-		height: 80upx;
-		background: #fff;
-		box-shadow: 0 2upx 10upx rgba(0, 0, 0, .06);
-		z-index: 10;
-
-		.nav-item {
-			flex: 1;
-			display: flex;
-			justify-content: center;
-			align-items: center;
-			height: 100%;
-			font-size: 30upx;
-			color: $font-color-dark;
-			position: relative;
-
-			&.current {
-				color: $base-color;
-
-				&:after {
-					content: '';
-					position: absolute;
-					left: 50%;
-					bottom: 0;
-					transform: translateX(-50%);
-					width: 120upx;
-					height: 0;
-					border-bottom: 4upx solid $base-color;
-				}
-			}
-		}
-
-		.p-box {
-			display: flex;
-			flex-direction: column;
-
-			.yticon {
-				display: flex;
-				align-items: center;
-				justify-content: center;
-				width: 30upx;
-				height: 14upx;
-				line-height: 1;
-				margin-left: 4upx;
-				font-size: 26upx;
-				color: #888;
-
-				&.active {
-					color: $base-color;
-				}
-			}
-
-			.xia {
-				transform: scaleY(-1);
-			}
-		}
-
-		.cate-item {
-			display: flex;
-			justify-content: center;
-			align-items: center;
-			height: 100%;
-			width: 80upx;
-			position: relative;
-			font-size: 44upx;
-
-			&:after {
-				content: '';
-				position: absolute;
-				left: 0;
-				top: 50%;
-				transform: translateY(-50%);
-				border-left: 1px solid #ddd;
-				width: 0;
-				height: 36upx;
-			}
-		}
-	}
-
-	/* 分类 */
-	.cate-mask {
-		position: fixed;
-		left: 0;
-		top: var(--window-top);
-		bottom: 0;
-		width: 100%;
-		background: rgba(0, 0, 0, 0);
-		z-index: 95;
-		transition: .3s;
-
-		.cate-content {
-			width: 630upx;
-			height: 100%;
-			background: #fff;
-			float: right;
-			transform: translateX(100%);
-			transition: .3s;
-		}
-
-		&.none {
-			display: none;
-		}
-
-		&.show {
-			background: rgba(0, 0, 0, .4);
-
-			.cate-content {
-				transform: translateX(0);
-			}
-		}
-	}
-
-	.cate-list {
-		display: flex;
-		flex-direction: column;
-		height: 100%;
-
-		.cate-item {
-			display: flex;
-			align-items: center;
-			height: 90upx;
-			padding-left: 30upx;
-			font-size: 28upx;
-			color: #555;
-			position: relative;
-		}
-
-		.two {
-			height: 64upx;
-			color: #303133;
-			font-size: 30upx;
-			background: #f8f8f8;
-		}
-
-		.active {
-			color: $base-color;
-		}
-	}
-
-	.introduce-section .title {
-		font-size: 17px;
-		font-weight: bold;
-		height: 40px;
-		line-height: 40px;
-		flex: 2.5;
-		border-bottom: 1px solid #EEEEEE;
-	}
-
-	.introduce-section .address {
-		color: #878C9C;
-		font-size: 12px;
-		padding: 10px 0 10px;
-	}
-
-	.introduce-section .price {
-		padding: 10px 0 10px;
-		color: #FD714F;
-		font-size: 19px;
-		font-weight: 700;
-	}
-
-	.introduce-section .guess-item {
-		border-radius: 10px;
-		background: #fff;
-		padding: 0upx 30upx 20upx;
-		margin: 8px;
-		border-bottom: 1px solid #ccc;
-	}
-
-	/* 销售信息 */
-	.introduce-section {
-		.title-tip {
-			flex: 1;
-		}
-
-		.price-box {
-			display: flex;
-			align-items: baseline;
-			font-size: 26upx;
-		}
-
-		.price {
-			font-size: $font-lg + 2upx;
-		}
-
-		.m-price {
-			margin: 0 12upx;
-			color: $font-color-light;
-			text-decoration: line-through;
-		}
-
-		.coupon-tip {
-			align-items: center;
-			padding: 4upx 10upx;
-			background: $uni-color-primary;
-			font-size: $font-sm;
-			color: #fff;
-			border-radius: 6upx;
-			line-height: 1;
-			transform: translateY(-4upx);
-		}
-
-		.bot-row {
-			display: flex;
-			align-items: center;
-			height: 50upx;
-			font-size: $font-sm;
-			color: $font-color-light;
-
-			view {
-				flex: 1;
-			}
-		}
-	}
-	.footer{
-		position:fixed;
-		bottom:0;
-		width: 100%;
-		padding:20px 0;
-	}
-	.btn{
-		width:90%;
-		background:#22C572;
-		color:#fff;
-		border-radius:30px;
-	}
-	.btn:after{
-		border:none;
-	}
-</style>
-

+ 11 - 10
pageD/warehousings/warehousings.vue

@@ -78,8 +78,7 @@
 					<text class="tit">入库类型 </text>
 					<picker @change="ruChange" :value="ruIndex" :range="ruType" class="con-list">
 						<view >
-							{{ruIndex > -1?ruType[ruIndex]:'请选择入库类型'}} 
-							
+							 {{ruIndex > -1?ruType[ruIndex]:'请选择入库类型'}} 
 						</view>
 					</picker>
 				</view>
@@ -179,7 +178,7 @@
 					<text class="tit">品级 </text>
 					<picker @change="pinChange" :value="pinIndex" :range="pinType" class="con-list">
 						<view >
-							{{pinIndex>-1?pinType[pinIndex]:'请选择品级'}}
+							{{pinIndex > -1 ? pinType[pinIndex]:'请选择品级'}}
 						</view>
 					</picker>
 				</view>
@@ -216,10 +215,10 @@ import upload from '@/components/upload.vue';
 					contractNo: {},
 					carNo: {},
 				},
-				pinIndex: 0,
+				pinIndex: -1,
 				pinTypes: '',
 				pinType: ['一等品', '二等品', '三等品', '等外'],
-				ruIndex: -2,
+				ruIndex: -1,
 				rutypes: '',
 				warehouse:[],
 				warehouseIndex:-1,
@@ -267,9 +266,7 @@ import upload from '@/components/upload.vue';
 			onShow(){
 				this.$api.doRequest('get', '/warehouseInOutInfo/selectCompId', {contractNo:this.WarehouseInOutInfo.contractNo,warehouseType:1,}).then(res => {
 					 if(res.data.code==200){
-						 console.log("selectCompId",res.data)
 						 this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouse', {compId:res.data.data,warehouseType:1,}).then(res => {
-							console.log("selectWarehouse",res.data)
 						 	 if(res.data.code==200){
 						 		 var arr=[]
 						 		 for(var i=0;i<res.data.data.length;i++){
@@ -279,7 +276,6 @@ import upload from '@/components/upload.vue';
 						 			 arr.push(res.data.data[i].warehouseName)
 						 		 }
 								 this.warehouse = arr
-								 console.log(arr,this.warehouseIndex)
 						 		 this.warehouselist=res.data.data
 								 for(var i=0;i<this.warehouselist.length;i++){
 								 	if(this.warehouselist[i].warehouseName==this.WarehouseInOutInfo.warehouseName){
@@ -335,8 +331,13 @@ import upload from '@/components/upload.vue';
 					if( that.WarehouseInOutInfo.warehouseInOutDetail != null){
 						that.list = that.WarehouseInOutInfo.warehouseInOutDetail
 					} 
-					this.pinIndex = this.WarehouseInOutInfo.gradeKey
-					this.ruIndex = this.WarehouseInOutInfo.inOutTypeKey 
+					if(this.WarehouseInOutInfo.gradeKey != null){
+						this.pinIndex = this.WarehouseInOutInfo.gradeKey
+					}
+					if(this.WarehouseInOutInfo.inOutTypeKey != null){
+						this.ruIndex = this.WarehouseInOutInfo.inOutTypeKey 
+					}
+					
 					this.WarehouseInOutInfo.deductionAmount = Math.abs(res.data.data.deductionAmount) 
 				})
 				.catch(res => {

+ 2 - 2
pages.json

@@ -504,7 +504,7 @@
 					}
 				},
 				{
-					"path": "freightTransport/sendrecord",
+					"path": "freightTransport/record/sendrecord",
 					"style": {
 						"navigationBarTitleText": "发货记录",
 						"enablePullDownRefresh": false
@@ -525,7 +525,7 @@
 					}
 				},
 				{
-					"path": "freightTransport/payrecord",
+					"path": "freightTransport/record/payrecord",
 					"style": {
 						"navigationBarTitleText": "收货记录",
 						"enablePullDownRefresh": false

+ 1 - 1
pages/task/my_task.vue

@@ -68,7 +68,7 @@
 		},
 		onShow() {
 			this.getIndexBuyData()
-			this.userInfo =  uni.getStorageSync("userInfo")
+			// this.userInfo =  uni.getStorageSync("userInfo")
 			this.warehouseInOutInfo.phone = this.userInfo.phone
 		},
 		// onLoad(options) {

+ 6 - 0
store/index.js

@@ -85,6 +85,8 @@ const store = new Vuex.Store({
 		circleBgList:[
 		],
 		clientId: lifeData.clientId?lifeData.clientId: "",
+		// 确定收货
+		isConfigfreightTransport:false
 	},
 	mutations: {
 		$uStore(state, payload) {
@@ -116,7 +118,11 @@ const store = new Vuex.Store({
 			state.hasLogin = false;
 			state.userInfo = {};
 			uni.removeStorageSync('userInfo')
+		},
+		configfreightTransport(state,flag){
+			state.isConfigfreightTransport = flag
 		}
+		
 	},
 	actions: {
 	

+ 0 - 0
store/modules/freightTransport.js


+ 37 - 27
util/util.js

@@ -13,7 +13,8 @@ const utils = {
 			duration: duration || 2000
 		})
 	},
-	modal: function(title, content, showCancel = false, callback, confirmColor, confirmText, cancelColor, cancelText) {
+	modal: function(title, content, showCancel = false, callback, confirmColor, confirmText, cancelColor,
+		cancelText) {
 		uni.showModal({
 			title: title || '提示',
 			content: content,
@@ -67,7 +68,8 @@ const utils = {
 	 *  true: 隐藏
 	 *  false:显示
 	 */
-	request: function(url, postData = {}, method = "POST", contentType = "application/x-www-form-urlencoded", isDelay, hideLoading) {
+	request: function(url, postData = {}, method = "POST", contentType = "application/x-www-form-urlencoded",
+		isDelay, hideLoading) {
 		//接口请求
 		let loadding = false;
 		utils.delayed && uni.hideLoading();
@@ -106,8 +108,10 @@ const utils = {
 								key: 'token',
 								success() {
 									//个人中心页不跳转
-									if (uni.getStorageSync("navUrl") != "/pages/ucenter/index/index") {
-										utils.modal('温馨提示', '您还没有登录,是否去登录', true, (confirm) => {
+									if (uni.getStorageSync("navUrl") !=
+										"/pages/ucenter/index/index") {
+										utils.modal('温馨提示', '您还没有登录,是否去登录', true, (
+											confirm) => {
 											if (confirm) {
 												uni.redirectTo({
 													url: '/pages/auth/btnAuth/btnAuth',
@@ -225,8 +229,9 @@ const utils = {
 	},
 	//金额格式化
 	rmoney: function(money) {
-		return parseFloat(money).toFixed(2).toString().split('').reverse().join('').replace(/(\d{3})/g, '$1,').replace(
-			/\,$/, '').split('').reverse().join('');
+		return parseFloat(money).toFixed(2).toString().split('').reverse().join('').replace(/(\d{3})/g, '$1,')
+			.replace(
+				/\,$/, '').split('').reverse().join('');
 	},
 	// 时间格式化输出,如11:03 25:19 每1s都会调用一次
 	dateformat: function(micro_second) {
@@ -303,8 +308,9 @@ const utils = {
 		let radLat2 = Rad(lat2);
 		let a = radLat1 - radLat2;
 		let b = Rad(lng1) - Rad(lng2);
-		let s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(
-			Math.sin(b / 2), 2)));
+		let s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) *
+			Math.pow(
+				Math.sin(b / 2), 2)));
 		s = s * 6378.137;
 		s = Math.round(s * 10000) / 10000;
 		s = '(距您' + s.toFixed(2) + '公里)' //保留两位小数
@@ -358,14 +364,16 @@ const utils = {
 		}
 		for (let k in o) {
 			if (new RegExp('(' + k + ')').test(fmt)) {
-				fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
+				fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[
+					k]).length)))
 			}
 		}
 		return fmt
 	},
 	isNumber: function(val) {
 		let regPos = /^\d+(\.\d+)?$/; //非负浮点数
-		let regNeg = /^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/; //负浮点数
+		let regNeg =
+		/^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/; //负浮点数
 		if (regPos.test(val) || regNeg.test(val)) {
 			return true;
 		} else {
@@ -382,19 +390,19 @@ const utils = {
 	},
 	//判断保留两位小数
 	isTwoPoint: function(str) {
-	if(str.indexOf('.')>-1){
-		let _str = str.split('.')
-		if(_str[1].length>2) return true
-		return false
-	}else{
-		return false
-	}
-
-		// if (str === '' || str === undefined || str === null) {
-		// 	return true;
-		// } else {
-		// 	return false;
-		// }
+		if (str.indexOf('.') > -1) {
+			let _str = str.split('.')
+			if (_str[1].length > 2) return true
+			return false
+		} else {
+			return false
+		}
+	},
+	// null赋值空字符串
+	nullToString:function(obj){debugger
+		for(key in obj){
+			if(obj[key]==null) obj[key] = ""
+		}
 	},
 	expireTime: function(str) {
 		if (!str) {
@@ -427,8 +435,9 @@ const utils = {
 			}, 'POST').then((res) => {
 				if (res.errno === 0) {
 					// #ifdef H5
-					location.href = res.mwebOrderResult.mwebUrl + '&redirect_url=' + encodeURIComponent(utils.domain +
-						'h5/#/pageD/payResult/payResult?orderId=' + orderId)
+					location.href = res.mwebOrderResult.mwebUrl + '&redirect_url=' +
+						encodeURIComponent(utils.domain +
+							'h5/#/pageD/payResult/payResult?orderId=' + orderId)
 					// #endif
 
 					// #ifdef APP-PLUS
@@ -534,8 +543,9 @@ module.exports = {
 	transDate: utils.transDate,
 	isNumber: utils.isNumber,
 	isEmpty: utils.isEmpty,
-	isTwoPoint:utils.isTwoPoint,
+	isTwoPoint: utils.isTwoPoint,
 	expireTime: utils.expireTime,
 	payOrder: utils.payOrder,
-	login: utils.login
+	login: utils.login,
+	nullToString:utils.nullToString
 }