Browse Source

Merge branch 'master' of http://git.zthymaoyi.com/gongdecai/wangluohuoyun-huozhuapp

ccj 2 years ago
parent
commit
b68b12f35d

+ 12 - 13
pages/order/orderDetails.vue

@@ -26,9 +26,9 @@
 				</u-button>
 				</u-button>
 				<u-button class="btn" text="终止" @click="clickstop()" v-if="dataObj.cargoOwnerStatus=='未装车'">
 				<u-button class="btn" text="终止" @click="clickstop()" v-if="dataObj.cargoOwnerStatus=='未装车'">
 				</u-button>
 				</u-button>
-				<u-button class="btn" @click="lookContract" v-if="dataObj.cargoOwnerContract=='1'">查看合同</u-button>
+				<!-- <u-button class="btn" @click="lookContract" v-if="dataObj.cargoOwnerContract=='1'">查看合同</u-button>
 				<u-button class="btn" text="签订合同" @click="signContract" v-if="dataObj.cargoOwnerStatus=='待确认装车'&&dataObj.cargoOwnerContract!='1'">
 				<u-button class="btn" text="签订合同" @click="signContract" v-if="dataObj.cargoOwnerStatus=='待确认装车'&&dataObj.cargoOwnerContract!='1'">
-				</u-button>
+				</u-button> -->
 
 
 				<u-button class="btn" text="驳回装车信息" @click="confirmLoading(5)" v-if="dataObj.cargoOwnerStatus=='待确认装车'">
 				<u-button class="btn" text="驳回装车信息" @click="confirmLoading(5)" v-if="dataObj.cargoOwnerStatus=='待确认装车'">
 				</u-button>
 				</u-button>
@@ -534,7 +534,6 @@
 				});
 				});
 			},
 			},
 			signContract() {
 			signContract() {
-				
 				// this.lookAlert = true
 				// this.lookAlert = true
 				uni.$u.route('/pages/order/signContract', {
 				uni.$u.route('/pages/order/signContract', {
 					obj: JSON.stringify(this.dataObj)
 					obj: JSON.stringify(this.dataObj)
@@ -582,15 +581,16 @@
 			},
 			},
 			confirmLoading(type) {
 			confirmLoading(type) {
 				this.type = type
 				this.type = type
-				if(this.type == 3 || this.type == 4){
-					if (this.dataObj.cargoOwnerContract != '1') {
-					uni.showToast({
-						title: '请先签订合同!',
-						icon: 'none'
-					})
-					return
-				}
-				}
+				//货主签订合同改为 已每个任务签订,不是按车每次签订合同
+				// if(this.type == 3 || this.type == 4){
+				// 	if (this.dataObj.cargoOwnerContract != '1') {
+				// 	uni.showToast({
+				// 		title: '请先签订合同!',
+				// 		icon: 'none'
+				// 	})
+				// 	return
+				// }
+				// }
 				if (type == 3) {
 				if (type == 3) {
 					this.alertTitle = '确认装车?'
 					this.alertTitle = '确认装车?'
 					this.confirmText = '确定'
 					this.confirmText = '确定'
@@ -628,7 +628,6 @@
 				// uni.$u.route('/pages/order/confirmUnloading', item);
 				// uni.$u.route('/pages/order/confirmUnloading', item);
 			},
 			},
 			confirmClick() {
 			confirmClick() {
-				console.log(111111111)
 				var that=this
 				var that=this
 				that.isShowAlert = false
 				that.isShowAlert = false
 				if (this.type == 1 || this.type == 2) {
 				if (this.type == 1 || this.type == 2) {

+ 208 - 64
pages/order/signContract.vue

@@ -52,6 +52,16 @@
 				<view class="gray">收费比例(%)</view>
 				<view class="gray">收费比例(%)</view>
 				<view class="">{{chargeProportion}}</view><!-- 暂时写死6% -->
 				<view class="">{{chargeProportion}}</view><!-- 暂时写死6% -->
 			</view>
 			</view>
+			<view style='color:#6A6A6A;margin-top:20px;font-size:30rpx;align-items: center;' class="flex">
+				<u--image style='margin-right:3px;position:relative;top:1rpx;' @click='consent'
+					:src="consentStatus==true?'../../static/images/mine/duihao@2x.png':'../../static/images/mine/wxz.png'"
+					width="17px" height="17px"></u--image>
+				我已阅读并同意
+				<view>
+					<u--text type="primary" text="《货物运输委托协议》" @click="lookContract"></u--text>
+				</view>
+				条款
+			</view>
 		</view>
 		</view>
 		<view class="wrapper content3">
 		<view class="wrapper content3">
 			<view class="qm-row">
 			<view class="qm-row">
@@ -67,19 +77,20 @@
 			<view class="handRight">
 			<view class="handRight">
 
 
 			</view>
 			</view>
-			<view class="handBtn">
-				<!-- 			<image @click="selectColorEvent('black','#1A1A1A')"
-					:src="selectColor === 'black' ? '/static/other/color_black_selected.png' : '/static/other/color_black.png'"
-					:class="[selectColor === 'black' ? 'color_select' : '', 'black-select']"></image>
-				<image @click="selectColorEvent('red','#ca262a')"
-					:src="selectColor === 'red' ? '/static/other/color_red_selected.png' : '/static/other/color_red.png'"
-					:class="[selectColor === 'red' ? 'color_select' : '', 'black-select']"></image> -->
-
-				<!-- <button @click="saveCanvasAsImg" class="saveBtn">保存</button> -->
-				<view @click="$u.throttle(submit, 1000)" class="saveBtn">提交</view>
-				<!-- <button @click="previewCanvasImg" class="previewBtn">预览</button> -->
-				<!-- <button @click="subCanvas" class="subBtn">完成</button> -->
-			</view>
+
+		</view>
+		<view class="handBtn">
+			<!-- 			<image @click="selectColorEvent('black','#1A1A1A')"
+				:src="selectColor === 'black' ? '/static/other/color_black_selected.png' : '/static/other/color_black.png'"
+				:class="[selectColor === 'black' ? 'color_select' : '', 'black-select']"></image>
+			<image @click="selectColorEvent('red','#ca262a')"
+				:src="selectColor === 'red' ? '/static/other/color_red_selected.png' : '/static/other/color_red.png'"
+				:class="[selectColor === 'red' ? 'color_select' : '', 'black-select']"></image> -->
+
+			<!-- <button @click="saveCanvasAsImg" class="saveBtn">保存</button> -->
+			<view @click="$u.throttle(submit, 1000)" class="saveBtn">提交</view>
+			<!-- <button @click="previewCanvasImg" class="previewBtn">预览</button> -->
+			<!-- <button @click="subCanvas" class="subBtn">完成</button> -->
 		</view>
 		</view>
 		<u-toast ref="uToast"></u-toast>
 		<u-toast ref="uToast"></u-toast>
 	</view>
 	</view>
@@ -110,7 +121,7 @@
 				value: true,
 				value: true,
 				dataDetails: {
 				dataDetails: {
 					carrierInfo: {},
 					carrierInfo: {},
-					serviceCharge:'50'
+					serviceCharge: '50'
 				},
 				},
 				radiolist1: [{
 				radiolist1: [{
 						name: '平台垫付运费',
 						name: '平台垫付运费',
@@ -121,7 +132,10 @@
 						disabled: false
 						disabled: false
 					},
 					},
 				],
 				],
-				chargeProportion:"",//收费比例
+				chargeProportion: "", //收费比例
+				consentStatus: false,
+				codestatus: false,
+				addType: "",
 			};
 			};
 		},
 		},
 		computed: {
 		computed: {
@@ -135,10 +149,10 @@
 			}).then(res => {
 			}).then(res => {
 				uni.setStorageSync("firstAuthentication", res.data)
 				uni.setStorageSync("firstAuthentication", res.data)
 				//收费比例从缓存中取
 				//收费比例从缓存中取
-				that.chargeProportion =uni.getStorageSync("firstAuthentication").chargeProportion*100
+				that.chargeProportion = uni.getStorageSync("firstAuthentication").chargeProportion * 100
 			})
 			})
-			
 			this.dataDetails = JSON.parse(decodeURIComponent(options.obj))
 			this.dataDetails = JSON.parse(decodeURIComponent(options.obj))
+			this.addType = JSON.parse(decodeURIComponent(options.type))
 			// this.dataDetails.advanceFreightService = '平台垫付运费'
 			// this.dataDetails.advanceFreightService = '平台垫付运费'
 			this.ctx = uni.createCanvasContext("handWriting");
 			this.ctx = uni.createCanvasContext("handWriting");
 			this.$nextTick(() => {
 			this.$nextTick(() => {
@@ -184,6 +198,28 @@
 			});
 			});
 		},
 		},
 		methods: {
 		methods: {
+			lookContract() {
+				uni.downloadFile({
+					url: "https://taohaoliang.oss-cn-beijing.aliyuncs.com/pcfiles/hzContract.pdf",
+					success: function(res) {
+						var filePath = res.tempFilePath;
+						uni.openDocument({
+							filePath: filePath,
+							showMenu: true,
+							success: function(res) {
+								console.log('打开文档成功');
+							}
+						});
+					}
+				});
+			},
+			consent() {
+				this.consentStatus = !this.consentStatus
+				uni.setStorage({
+					key: 'policyStorageKey',
+					data: this.consentStatus
+				});
+			},
 			submit() {
 			submit() {
 				if (!that.isScaleStart) {
 				if (!that.isScaleStart) {
 					that.$refs.uToast.show({
 					that.$refs.uToast.show({
@@ -199,15 +235,22 @@
 				// 	})
 				// 	})
 				// 	return
 				// 	return
 				// }
 				// }
-				
+				if (!that.consentStatus) {
+					that.$refs.uToast.show({
+						type: 'error',
+						message: "请阅读并确认协议条款!",
+					})
+					return
+				}
+
 				uni.canvasToTempFilePath({
 				uni.canvasToTempFilePath({
 					canvasId: 'handWriting',
 					canvasId: 'handWriting',
 					fileType: 'png',
 					fileType: 'png',
 					quality: 1, //图片质量
 					quality: 1, //图片质量
-					width:330,
-					height:244,
-					destWidth:330,
-					destHeight:244,
+					width: 330,
+					height: 244,
+					destWidth: 330,
+					destHeight: 244,
 					success(res) {
 					success(res) {
 						console.log(res.tempFilePath, 'canvas生成图片地址');
 						console.log(res.tempFilePath, 'canvas生成图片地址');
 						uploadImage('image', res.tempFilePath, 'appData/',
 						uploadImage('image', res.tempFilePath, 'appData/',
@@ -219,52 +262,141 @@
 									title: '加载中',
 									title: '加载中',
 									mask: true
 									mask: true
 								})
 								})
-								let _obj = {}
-								_obj.id = that.dataDetails.id
-								_obj.submitFlag=2
-								_obj.typeFlag = 1
-								_obj.cargoOwnerAutograph = that.dataDetails.cargoOwnerAutograph
-								that.$request.baseRequest('get', '/orderInfo/setPdf', _obj).then(
-										res => {
+								if (that.addType == 1) { //新增
+									that.$request.baseRequest('post', '/publishTaskInfo/api/addTask', that
+											.dataDetails).then(res => {
+											if (res.code == 200) {
+												uni.removeStorage({
+													key: 'storage_saddress'
+												});
+												uni.removeStorage({
+													key: 'storage_faddress'
+												});
+												uni.removeStorage({
+													key: 'releaseCargoOwner'
+												});
+												uni.removeStorage({
+													key: 'releasecompId'
+												});
+												// uni.redirectTo({
+												// 		url: "/pages/release/release"
+												// })
+												that.dataDetails.id = res.data
+												let _obj = {}
+												_obj.id = that.dataDetails.id
+												_obj.cargoOwnerAutograph = that.dataDetails
+													.cargoOwnerAutograph
+												that.$request.baseRequest('get',
+														'/publishTaskInfo/signContract', _obj).then(
+														res => {
+															uni.hideLoading()
+															if (res.code == 200) {
+
+																// that.contractSrc = res.data
+																// uni.downloadFile({
+																// 	url: res.data,
+																// 	success: function(res) {
+																// 		var filePath = res.tempFilePath;
+																// 		uni.openDocument({
+																//  		filePath: filePath,
+																// 			showMenu: true,
+																// 			success: function(res) {
+																// 				console.log('打开文档成功');
+																// 			}
+																// 		});
+																// 	}
+																// });
+																that.$refs.uToast.show({
+																	type: 'success',
+																	message: "发布成功",
+																	complete() {
+																		uni.switchTab({
+																			url: '/pages/order/index'
+																		});
+																	}
+																})
+															}
+														})
+													.catch(res => {
+														uni.hideLoading()
+														uni.$u.toast(res.message);
+													});
+											}
+										})
+										.catch(res => {
 											uni.hideLoading()
 											uni.hideLoading()
-											uni.navigateBack({
-												delta:1
+											uni.showToast({
+												title: res.message,
+												icon: 'none',
+												duration: 2000
 											})
 											})
+										});
+								} else if (that.addType == 2) { //编辑
+									that.$request.baseRequest('post', '/publishTaskInfo/api/editTask', that
+											.dataDetails).then(res => {
 											if (res.code == 200) {
 											if (res.code == 200) {
-												// that.contractSrc = res.data
-												// uni.downloadFile({
-												// 	url: res.data,
-												// 	success: function(res) {
-												// 		var filePath = res.tempFilePath;
-												// 		uni.openDocument({
-												//  		filePath: filePath,
-												// 			showMenu: true,
-												// 			success: function(res) {
-												// 				console.log('打开文档成功');
-												// 			}
-												// 		});
-												// 	}
-												// });
-												// this.$refs.uToast.show({
-												// 	type: 'success',
-												// 	message: "提交成功",
-												// 	complete() {
-												// 		that.upCallback({
-												// 			size: 10,
-												// 			num: 1
-												// 		})
-												// 	}
-												// })
-
+												uni.removeStorage({
+													key: 'storage_saddress'
+												});
+												uni.removeStorage({
+													key: 'storage_faddress'
+												});
+												uni.removeStorage({
+													key: 'releaseCargoOwner'
+												});
+												uni.removeStorage({
+													key: 'releasecompId'
+												});
+												let _obj = {}
+												_obj.id = that.dataDetails.id
+												_obj.cargoOwnerAutograph = that.dataDetails
+													.cargoOwnerAutograph
+												that.$request.baseRequest('get',
+														'/publishTaskInfo/signContract', _obj).then(
+														res => {
+															uni.hideLoading()
+															if (res.code == 200) {
+																// that.contractSrc = res.data
+																// uni.downloadFile({
+																// 	url: res.data,
+																// 	success: function(res) {
+																// 		var filePath = res.tempFilePath;
+																// 		uni.openDocument({
+																//  		filePath: filePath,
+																// 			showMenu: true,
+																// 			success: function(res) {
+																// 				console.log('打开文档成功');
+																// 			}
+																// 		});
+																// 	}
+																// });
+																that.$refs.uToast.show({
+																	type: 'success',
+																	message: "修改成功",
+																	complete() {
+																		uni.switchTab({
+																			url: '/pages/order/index'
+																		});
+																	}
+																})
+															}
+														})
+													.catch(res => {
+														uni.hideLoading()
+														uni.$u.toast(res.message);
+													});
 											}
 											}
 										})
 										})
-									.catch(res => {
-										uni.hideLoading()
-										uni.$u.toast(res.message);
-									});
-							}
-						)
-
+										.catch(res => {
+											uni.hideLoading()
+											uni.showToast({
+												title: res.message,
+												icon: 'none',
+												duration: 2000
+											})
+										});
+								}
+							})
 					}
 					}
 				});
 				});
 			},
 			},
@@ -286,7 +418,7 @@
 				//设置线条粗细
 				//设置线条粗细
 				this.ctx.setLineWidth(this.lineSize)
 				this.ctx.setLineWidth(this.lineSize)
 				//设置线条的结束端点样式
 				//设置线条的结束端点样式
-				this.ctx.setLineCap("round")//'butt'、'round'、'square'
+				this.ctx.setLineCap("round") //'butt'、'round'、'square'
 				//开始画笔
 				//开始画笔
 				this.ctx.beginPath()
 				this.ctx.beginPath()
 			},
 			},
@@ -501,13 +633,25 @@
 		text-align: center;
 		text-align: center;
 		border-radius: 50rpx;
 		border-radius: 50rpx;
 		padding: 20rpx;
 		padding: 20rpx;
+		height: 50rpx;
 	}
 	}
 
 
 	.handBtn {
 	.handBtn {
 		display: flex;
 		display: flex;
+		height: 60px;
+		bottom: 0px;
+		padding-top: 20rpx;
+		background-color: #FFFFFF;
 		justify-content: center;
 		justify-content: center;
 	}
 	}
 
 
+	uni-navigator {
+		//条款
+		display: inline-block;
+		color: #2772FB;
+
+	}
+
 	/* 
 	/* 
 	.wrapper {
 	.wrapper {
 		width: 100%;
 		width: 100%;

+ 48 - 60
pages/release/editRelease.vue

@@ -222,8 +222,14 @@
 				@cancel='isShowcardValidity=false' :closeOnClickOverlay='true'>
 				@cancel='isShowcardValidity=false' :closeOnClickOverlay='true'>
 			</u-picker> -->
 			</u-picker> -->
 			<itmister-date-picker :overdueContent="'任务已过期'" :dateStatus="1" :periodOfValidity="true" :startYear='2022' :checkYear="year" :checkMonth="month" :checkDay="day" ref="dateEl" :endDate="array" :futureYear="30" @dateConfirm="confirmValidityPeriodcq"></itmister-date-picker>
 			<itmister-date-picker :overdueContent="'任务已过期'" :dateStatus="1" :periodOfValidity="true" :startYear='2022' :checkYear="year" :checkMonth="month" :checkDay="day" ref="dateEl" :endDate="array" :futureYear="30" @dateConfirm="confirmValidityPeriodcq"></itmister-date-picker>
+		
+		<view class="flex row noborder">
+			<view class="left-text flex">查看 
+			    <u--text type="primary" text="《货物运输委托协议》" @click="lookContract"></u--text>
+			</view>
+		</view>
 		</view>
 		</view>
-		<view class="submit" @click="submit">立即发布</view>
+		<view class="submit" @click="submit">下一步</view>
 		
 		
 		<!-- <u-picker :show="isShowValidity" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
 		<!-- <u-picker :show="isShowValidity" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
 			:closeOnClickOverlay='true' @close='isShowValidity=false' @cancel='isShowValidity=false'>
 			:closeOnClickOverlay='true' @close='isShowValidity=false' @cancel='isShowValidity=false'>
@@ -397,6 +403,21 @@
 			...mapState(['hasLogin', 'userInfo']),
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		},
 		methods: {
 		methods: {
+			lookContract(){
+				uni.downloadFile({
+					url: "https://taohaoliang.oss-cn-beijing.aliyuncs.com/pcfiles/hzContract.pdf",
+					success: function(res) {
+						var filePath = res.tempFilePath;
+						uni.openDocument({
+							filePath: filePath,
+							showMenu: true,
+							success: function(res) {
+								console.log('打开文档成功');
+							}
+						});
+					}
+				});
+			},
 			goodstypeChange(){
 			goodstypeChange(){
 				this.isGoodsType = true
 				this.isGoodsType = true
 			},
 			},
@@ -531,7 +552,7 @@
 				}
 				}
 				if (
 				if (
 					this.dataObj.freightPrice < 0 || this.dataObj.freightPrice > 100000 || (
 					this.dataObj.freightPrice < 0 || this.dataObj.freightPrice > 100000 || (
-						String(this.dataObj.freightPrice).indexOf('.') != -1 && String(tthis.dataObj.freightPrice).length -
+						String(this.dataObj.freightPrice).indexOf('.') != -1 && String(this.dataObj.freightPrice).length -
 						(String(this.dataObj.freightPrice).indexOf(
 						(String(this.dataObj.freightPrice).indexOf(
 							'.') + 1) > 2)
 							'.') + 1) > 2)
 				) {
 				) {
@@ -545,7 +566,7 @@
 				if (this.dataObj.weight) {
 				if (this.dataObj.weight) {
 					if (
 					if (
 						this.dataObj.weight < 0.1 || this.dataObj.weight > 10000000 || (
 						this.dataObj.weight < 0.1 || this.dataObj.weight > 10000000 || (
-							String(this.dataObj.weight).indexOf('.') != -1 && String(tthis.dataObj.weight).length -
+							String(this.dataObj.weight).indexOf('.') != -1 && String(this.dataObj.weight).length -
 							(String(this.dataObj.weight).indexOf(
 							(String(this.dataObj.weight).indexOf(
 								'.') + 1) > 2)
 								'.') + 1) > 2)
 					) {
 					) {
@@ -656,62 +677,24 @@
 				}
 				}
 				this.dataObj.carModel = _list.toString()
 				this.dataObj.carModel = _list.toString()
 				this.dataObj.commonId = this.userInfo.id
 				this.dataObj.commonId = this.userInfo.id
-				this.$request.baseRequest('post', '/publishTaskInfo/api/editTask', this.dataObj).then(res => {
-
-						this.$refs.uToast.show({
-							type: 'success',
-							message: "修改成功",
-							complete() {
-								uni.navigateBack({
-									delta:1
-								})
-								_this.dataObj = {
-									commonId: '',
-									cargoOwner: '',
-									sendPrivate: '',
-									sendCity: '',
-									sendArea: '',
-									sendDetailedAddress: '',
-									unloadPrivate: '',
-									unloadCity: '',
-									unloadArea: '',
-									unloadDetailedAddress: '',
-									distance: '',
-									goodsName: '',
-									billingMethod: '元/吨',
-									freightPrice: '',
-									freightAdvance: true,
-									sender: '',
-									senderPhone: '',
-									receiver: '',
-									receiverPhone: '',
-									weight: '',
-									loadingDateStart: '',
-									loadingDateEnd: '',
-									carLengthSmall: '',
-									carLength: '',
-									loadWeightSmall: '',
-									loadWeight: '',
-									carModel: '',
-									taskDescription: '',
-									taskValidity: '',
-									sendLongitude: '',
-									sendLatitude: '',
-									unsendLongitude: '',
-									unsendLatitude: '',
-								}
-								_this.checkboxValue1 = ['不限']
-							}
-						})
-
-					})
-					.catch(res => {
-						uni.showToast({
-							title: res.message,
-							icon: 'none',
-							duration: 2000
-						})
-					});
+				uni.$u.route('/pages/order/signContract', {
+					obj: JSON.stringify(this.dataObj),
+					type:2,//编辑
+				});
+				// this.$request.baseRequest('post', '/publishTaskInfo/api/editTask', this.dataObj).then(res => {
+				// 	if(res.code == 200){
+				// 		uni.$u.route('/pages/order/signContract', {
+				// 			obj: JSON.stringify(this.dataObj)
+				// 		});
+				// 	}
+				// 	})
+				// 	.catch(res => {
+				// 		uni.showToast({
+				// 			title: res.message,
+				// 			icon: 'none',
+				// 			duration: 2000
+				// 		})
+				// 	});
 
 
 			},
 			},
 			cancelClick() {
 			cancelClick() {
@@ -929,7 +912,8 @@
 			},
 			},
 			submit() {
 			submit() {
 				if (this.validate()) return
 				if (this.validate()) return
-				this.isShowAlert = true;
+				this.confirmClick()
+				// this.isShowAlert = true;
 			},
 			},
 		}
 		}
 	}
 	}
@@ -1137,4 +1121,8 @@
 		box-sizing: border-box;
 		box-sizing: border-box;
 		border-radius: 10rpx;
 		border-radius: 10rpx;
 	}
 	}
+	uni-navigator {//条款
+		display: inline-block;
+		color: #2772FB;
+	}
 </style>
 </style>

+ 1 - 1
pages/release/record.vue

@@ -94,7 +94,7 @@
 						<!-- <view class="car">{{good.freight}}{{good.illingMethod==0?'元/吨':'元/车'}}</view> -->
 						<!-- <view class="car">{{good.freight}}{{good.illingMethod==0?'元/吨':'元/车'}}</view> -->
 					</view>
 					</view>
 					<view class="row5 flex flex-end">
 					<view class="row5 flex flex-end">
-						<view class="normal" @click.stop="edit(good)" v-if="good.status!='审核中'">编辑</view>
+						<view class="normal" @click.stop="edit(good)" v-if="good.status =='未通过'">编辑</view>  <!-- 只有已驳回的任务有编辑-->
 						<view class="normal" @click.stop="del(good)">删除</view>
 						<view class="normal" @click.stop="del(good)">删除</view>
 						<!-- v-if="good.status!='已通过'" -->
 						<!-- v-if="good.status!='已通过'" -->
 						<view class="normal" @click.stop="Refresh(good)" v-if="good.status=='已通过'">刷新</view>
 						<view class="normal" @click.stop="Refresh(good)" v-if="good.status=='已通过'">刷新</view>

+ 63 - 99
pages/release/release.vue

@@ -242,8 +242,13 @@
 			<itmister-date-picker :overdueContent="'任务已过期'" :dateStatus="1" :periodOfValidity="true" :startYear='2022'
 			<itmister-date-picker :overdueContent="'任务已过期'" :dateStatus="1" :periodOfValidity="true" :startYear='2022'
 				ref="dateEl" :endDate="array" :futureYear="30" @dateConfirm="confirmValidityPeriodcq">
 				ref="dateEl" :endDate="array" :futureYear="30" @dateConfirm="confirmValidityPeriodcq">
 			</itmister-date-picker>
 			</itmister-date-picker>
+			<view class="flex row noborder" >
+				<view class="left-text flex">查看 
+					<u--text type="primary" text="《货物运输委托协议》" @click="lookContract"></u--text>
+				</view>
+			</view>
 		</view>
 		</view>
-		<view class="submit" @click="submit">立即发布</view>
+		<view class="submit" @click="submit">下一步</view>
 		<!-- <u-picker :show="isShowValidity" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
 		<!-- <u-picker :show="isShowValidity" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
 			:closeOnClickOverlay='true' @close='isShowValidity=false' @cancel='isShowValidity=false'>
 			:closeOnClickOverlay='true' @close='isShowValidity=false' @cancel='isShowValidity=false'>
 		</u-picker> -->
 		</u-picker> -->
@@ -515,6 +520,21 @@
 			...mapState(['hasLogin', 'userInfo']),
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		},
 		methods: {
 		methods: {
+			lookContract(){
+				uni.downloadFile({
+					url: "https://taohaoliang.oss-cn-beijing.aliyuncs.com/pcfiles/hzContract.pdf",
+					success: function(res) {
+						var filePath = res.tempFilePath;
+						uni.openDocument({
+							filePath: filePath,
+							showMenu: true,
+							success: function(res) {
+								console.log('打开文档成功');
+							}
+						});
+					}
+				});
+			},
 			queryGoodsList() {
 			queryGoodsList() {
 				this.$request.baseRequest('get', '/commonSysParameter/getInfo', {
 				this.$request.baseRequest('get', '/commonSysParameter/getInfo', {
 					constId: "CON1"
 					constId: "CON1"
@@ -741,7 +761,7 @@
 				if (this.dataObj.weight) {
 				if (this.dataObj.weight) {
 					if (
 					if (
 						this.dataObj.weight < 0.1 || this.dataObj.weight > 10000000 || (
 						this.dataObj.weight < 0.1 || this.dataObj.weight > 10000000 || (
-							String(this.dataObj.weight).indexOf('.') != -1 && String(tthis.dataObj.weight).length -
+							String(this.dataObj.weight).indexOf('.') != -1 && String(this.dataObj.weight).length -
 							(String(this.dataObj.weight).indexOf(
 							(String(this.dataObj.weight).indexOf(
 								'.') + 1) > 2)
 								'.') + 1) > 2)
 					) {
 					) {
@@ -787,7 +807,7 @@
 				if (this.dataObj.loadWeightSmall) {
 				if (this.dataObj.loadWeightSmall) {
 					if (
 					if (
 						this.dataObj.loadWeightSmall < 0.1 || this.dataObj.loadWeightSmall > 100 || (
 						this.dataObj.loadWeightSmall < 0.1 || this.dataObj.loadWeightSmall > 100 || (
-							String(this.dataObj.loadWeightSmall).indexOf('.') != -1 && String(tthis.dataObj
+							String(this.dataObj.loadWeightSmall).indexOf('.') != -1 && String(this.dataObj
 								.loadWeightSmall).length -
 								.loadWeightSmall).length -
 							(String(this.dataObj.loadWeightSmall).indexOf(
 							(String(this.dataObj.loadWeightSmall).indexOf(
 								'.') + 1) > 3)
 								'.') + 1) > 3)
@@ -803,7 +823,7 @@
 				if (this.dataObj.loadWeight) {
 				if (this.dataObj.loadWeight) {
 					if (
 					if (
 						this.dataObj.loadWeight < 0.1 || this.dataObj.loadWeight > 100 || (
 						this.dataObj.loadWeight < 0.1 || this.dataObj.loadWeight > 100 || (
-							String(this.dataObj.loadWeight).indexOf('.') != -1 && String(tthis.dataObj.loadWeight).length -
+							String(this.dataObj.loadWeight).indexOf('.') != -1 && String(this.dataObj.loadWeight).length -
 							(String(this.dataObj.loadWeight).indexOf(
 							(String(this.dataObj.loadWeight).indexOf(
 								'.') + 1) > 3)
 								'.') + 1) > 3)
 					) {
 					) {
@@ -880,100 +900,39 @@
 				}
 				}
 				this.dataObj.carModel = _list.toString()
 				this.dataObj.carModel = _list.toString()
 				this.dataObj.commonId = this.userInfo.id
 				this.dataObj.commonId = this.userInfo.id
-				this.$request.baseRequest('post', '/publishTaskInfo/api/addTask', this.dataObj).then(res => {
-						uni.removeStorage({
-							key: 'storage_saddress'
-						});
-						uni.removeStorage({
-							key: 'storage_faddress'
-						});
-						uni.removeStorage({
-							key: 'releaseCargoOwner'
-						});
-						uni.removeStorage({
-							key: 'releasecompId'
-						});
-						this.$refs.uToast.show({
-							type: 'success',
-							message: "发布成功",
-							complete() {
-								// _this.dataObj = {
-								// 	commonId: '',
-								// 	cargoOwner: '',
-								// 	sendPrivate: '',
-								// 	sendCity: '',
-								// 	sendArea: '',
-								// 	sendDetailedAddress: '',
-								// 	unloadPrivate: '',
-								// 	unloadCity: '',
-								// 	unloadArea: '',
-								// 	unloadDetailedAddress: '',
-								// 	distance: '',
-								// 	goodsName: '',
-								// 	billingMethod: '元/吨',
-								// 	freightPrice: '',
-								// 	freightAdvance: true,
-								// 	sender: '',
-								// 	senderPhone: '',
-								// 	receiver: '',
-								// 	receiverPhone: '',
-								// 	weight: '',
-								// 	loadingDateStart: '',
-								// 	loadingDateEnd: '',
-								// 	carLengthSmall: '',
-								// 	carLength: '',
-								// 	loadWeightSmall: '',
-								// 	loadWeight: '',
-								// 	carModel: '',
-								// 	taskDescription: '',
-								// 	taskValidity: '',
-								// 	sendLongitude: '',
-								// 	receiverIdcard:'',
-								// 	sendLatitude: '',
-								// 	receiverCreditCode:'',
-								// 	unsendLongitude: '',
-								// 	unsendLatitude: '',
-								// }
-								// _this.checkboxValue1 = ['不限']
-								// _this.queryGoodsList() // 查询货物类别
-								// let goods = uni.getStorageSync("goodsType")
-								// if(goods){
-								// 	_this.dataObj.goodsType = goods.name
-								// 	_this.dataObj.goodsTypeKey = goods.key
-								// }
-								// const pages = getCurrentPages()
-								// console.log(pages)
-								// 声明一个pages使用getCurrentPages方法
-								// const curPage = pages[pages.length - 1]
-								// 声明一个当前页面
-								// curPage.$vm.$options.onLoad[1].bind(curPage.$vm); // 传入参数
-								// curPage.$vm.$options.onShow[1].bind(curPage.$vm); // curPage.onShow()
-								//       curPage.$vm.$options.onReady[1].bind(curPage.$vm);
-								// curPage.onReady()
-								// uni.switchTab({
-								// 	url: '/pages/mine/index'
-								// })
-								// uni.switchTab({
-								// 	url: '/pages/mine/index'
-								// })
-								uni.redirectTo({
-									url: "/pages/release/release"
-								})
-								// uni.reLaunch({url:"/pages/release/release"})
-								// uni.redirectTo("/pages/release/record")
-								// uni.$u.route("/pages/release/record")
-							}
-						})
-						this.isShowAlert = false
-
-					})
-					.catch(res => {
-						uni.showToast({
-							title: res.message,
-							icon: 'none',
-							duration: 2000
-						})
-					});
+				uni.$u.route('/pages/order/signContract', {
+					obj: JSON.stringify(this.dataObj),
+					type:1
+				});
+				// this.$request.baseRequest('post', '/publishTaskInfo/api/addTask', this.dataObj).then(res => {
+					
+				// 	if(res.code == 200){
+				// 		uni.removeStorage({
+				// 			key: 'storage_saddress'
+				// 		});
+				// 		uni.removeStorage({
+				// 			key: 'storage_faddress'
+				// 		});
+				// 		uni.removeStorage({
+				// 			key: 'releaseCargoOwner'
+				// 		});
+				// 		uni.removeStorage({
+				// 			key: 'releasecompId'
+				// 		});
+				// 		// uni.redirectTo({
+				// 		// 		url: "/pages/release/release"
+				// 		// })
+				// 		this.dataObj.id = res.data 
+						
+				// 	}
+				// 	})
+				// 	.catch(res => {
+				// 		uni.showToast({
+				// 			title: res.message,
+				// 			icon: 'none',
+				// 			duration: 2000
+				// 		})
+				// 	});
 			},
 			},
 			cancelClick() {
 			cancelClick() {
 				this.isShowAlert = false
 				this.isShowAlert = false
@@ -1175,7 +1134,8 @@
 						}
 						}
 					}
 					}
 				}
 				}
-				this.isShowAlert = true;
+				uni.$u.throttle(this.requestdata, 500)
+				// this.isShowAlert = true;
 			},
 			},
 		}
 		}
 	}
 	}
@@ -1408,4 +1368,8 @@
 		box-sizing: border-box;
 		box-sizing: border-box;
 		border-radius: 10rpx;
 		border-radius: 10rpx;
 	}
 	}
+	uni-navigator {
+		display: inline-block;
+		color: #2772FB;
+	}
 </style>
 </style>