gjy 2 anni fa
parent
commit
6e38587cd6

+ 68 - 0
pages/mine/manageBankCards/addBankCard.vue

@@ -248,6 +248,72 @@
 				// 	uni.$u.route('/pages/mine/camera/idcard/idcard?dotype=bank');
 				// }
 			},
+			validate() {
+				// true 为校验不通过
+				// if (uni.$u.test.isEmpty(this.dataDetails.payeeAddressUrl)) {
+				// 	this.$refs.uToast.show({
+				// 		type: 'error',
+				// 		message: "请上传银行卡卡号页!",
+				// 	})
+				// 	return true
+				// }
+				if (uni.$u.test.isEmpty(this.dataDetails.bankCard)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "银行卡卡号不能为空!",
+					})
+					return true
+				}
+				if (uni.$u.test.rangeLength(this.dataDetails.bankCard,[16,20])) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "银行卡号输入错误!",
+					})
+					return true
+				}
+				if (uni.$u.test.isEmpty(this.dataDetails.bankDeposit)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "开户行不能为空!",
+					})
+					return true
+				}
+				if (uni.$u.test.rangeLength(this.dataDetails.bankDeposit,[4,25])) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "开户行输入错误!",
+					})
+					return true
+				}
+				if (uni.$u.test.isEmpty(this.dataDetails.bankDepositBranch)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "开户支行不能为空!",
+					})
+					return true
+				}
+				if (uni.$u.test.rangeLength(this.dataDetails.bankDepositBranch,[4,25])) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "开户支行输入错误!",
+					})
+					return true
+				}
+				if (uni.$u.test.isEmpty(this.dataDetails.cardholderName)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "持卡人姓名不能为空!",
+					})
+					return true
+				}
+				if (uni.$u.test.isEmpty(this.dataDetails.cardholderIdNumber)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "持卡人身份证号不能为空!",
+					})
+					return true
+				}
+			},
 			//身份证正面
 			getImgUrl1(src) {
 				// console.log(src)
@@ -280,6 +346,7 @@
 				// })
 			},
 			submit() {
+				var that = this
 				// // 获取银行卡颜色
 				// let _obj = {
 				// 	"input":this.dataDetails.payeeAddressUrl
@@ -297,6 +364,7 @@
 				// 	.catch(res => {
 				// 		uni.$u.toast(res.message);
 				// 	});
+				if (that.validate()) return
 				if(this.dataDetails.payeeName != uni.getStorageSync("firstAuthentication").driverName){
 					this.$refs.uToast.show({
 						type: 'error',

+ 44 - 0
pages/order/confirmUnloading.vue

@@ -75,6 +75,11 @@
 				<u-upload class="uview-upload" :fileList="fileList1" @afterRead="afterRead($event)" @delete="deletePic"
 					name="1" multiple :maxCount="3"></u-upload>
 			</view>
+			<view class='s-flex'>
+				<view class="row-left-text" style="margin:20rpx 0;">上传回单照片(磅单)</view>
+				<u-upload class="uview-upload" :fileList="fileList2" @afterRead="afterRead1($event)" @delete="deletePic1"
+					name="2" multiple :maxCount="3"></u-upload>
+			</view>
 		</view>
 		<view class="bottom-btn">
 			<view class="store" @click="submit(1)">暂存</view>
@@ -98,9 +103,11 @@
 			return {
 				imgList: [],
 				fileList1: [],
+				fileList2:[],
 				isShowValidity: false,
 				validityPeriod: [],
 				sourceType: ['camera'],
+				imgList1:[],
 				detailData: {
 					addressUrl: '',
 					hyCarrierInfo:{},
@@ -158,6 +165,9 @@
 			deletePic(event) {
 				this[`fileList${event.name}`].splice(event.index, 1)
 			},
+			deletePic1(event) {
+				this[`fileList${event.name}`].splice(event.index, 1)
+			},
 			getNowTime() {
 				let now = new Date();
 				let year = now.getFullYear(); //得到年份
@@ -328,6 +338,29 @@
 					fileListLen++
 				}
 			},
+			// 新增图片
+			async afterRead1(event) {
+				// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
+				let lists = [].concat(event.file)
+				let fileListLen = this[`fileList${event.name}`].length
+				lists.map((item) => {
+					this[`fileList${event.name}`].push({
+						...item,
+						status: 'uploading',
+						message: '上传中'
+					})
+				})
+				for (let i = 0; i < lists.length; i++) {
+					const result = await this.uploadFilePromise1(lists[i].url)
+					let item = this[`fileList${event.name}`][fileListLen]
+					this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
+						status: 'success',
+						message: '',
+						url: result
+					}))
+					fileListLen++
+				}
+			},
 			uploadFilePromise(url) {
 				uploadImage('image', url, 'appData/',
 					result => {
@@ -338,6 +371,16 @@
 					}
 				)
 			},
+			uploadFilePromise1(url) {
+				uploadImage('image', url, 'appData/',
+					result => {
+						// 上传成功回调函数
+						console.log('图片地址', result)
+						this.imgList1.push(result)
+			
+					}
+				)
+			},
 			onProgress(e) {
 				console.log(e)
 			},
@@ -368,6 +411,7 @@
 				}
 				this.detailData.carrierInfo.statusFlag = this.detailData.statusFlag
 				this.detailData.carrierInfo.unloadingImg = this.imgList.toString()
+				this.detailData.carrierInfo.receiptImg = this.imgList1.toString()
 				// if (!this.detailData.carrierInfo.totalFreight) {
 				// 	uni.showToast({
 				// 		title: '运费不能为空!',

+ 5 - 1
pages/order/index.vue

@@ -186,7 +186,10 @@
 					<!-- 普通弹窗 -->
 			<u-popup :show="show" mode="bottom" @close="close" @open="open">
 				<view class="">
-					<view ><u-icon @click="closepopup" class='close' name="close" size="20"></u-icon></view>
+					<view >
+						<image style='width:12px;height:12px;' @click='closepopup' class='close'  src="../../static/images/order/guanbi@3x.png" mode=""></image>
+						<!-- <u-icon @click="closepopup" class='close' name="close" size="20"></u-icon> -->
+					</view>
 					
 					<view style='fon-size:34rpx;margin-bottom:20px;text-align:center;font-weight: 600;'>确认终止订单</view>
 					<view style="margin: 0 auto;">
@@ -972,6 +975,7 @@
 	.close{
 		position:absolute;
 		right:20px;
+		top:26px;
 	}
 	.termination{
 		background:#F1F3F6;

+ 37 - 4
pages/order/orderDetails.vue

@@ -156,7 +156,7 @@
 			<view class='row-between'>
 				<view class=" gray">装车照片</view>
 				<view class="flex">
-					<u--image :showLoading="true" :src='item' width="40px" height="40px" v-for="(item,index) in zcPhoneList"></u--image>
+					<u--image @click='ylImg(zcPhoneList)' :showLoading="true" :src='item' width="40px" height="40px" v-for="(item,index) in zcPhoneList"></u--image>
 				</view>
 			</view>
 			<view v-if='dataObj.orderStatus!="待货主确认"&&dataObj.orderStatus!="未装车"&&dataObj.orderStatus!="待货主确认装车"&&dataObj.orderStatus!="货主驳回装车信息"&&dataObj.orderStatus!="待平台确认装车"&&dataObj.orderStatus!="平台驳回装车信息"&&dataObj.orderStatus!="运输中"&&dataObj.orderStatus!="已终止"'>
@@ -171,7 +171,13 @@
 				<view class='row-between'>
 					<view class=" gray">卸车照片</view>
 					<view class="flex">
-						<u--image :showLoading="true" :src='item' width="40px" height="40px" v-for="(item,index) in xcPhoneList"></u--image>
+						<u--image @click='ylImg(xcPhoneList)' :showLoading="true" :src='item' width="40px" height="40px" v-for="(item,index) in xcPhoneList"></u--image>
+					</view>
+				</view>
+				<view class='row-between'>
+					<view class=" gray">回单照片</view>
+					<view class="flex">
+						<u--image @click='ylImg(hdPhoneList)' :showLoading="true" :src='item' width="40px" height="40px" v-for="(item,index) in hdPhoneList"></u--image>
 					</view>
 				</view>
 			</view>
@@ -210,7 +216,10 @@
 		</u-modal>
 		<u-popup :show="show" mode="bottom" @close="close" @open="open">
 			<view class="">
-				<view ><u-icon @click="closepopup" class='close' name="close" size="20"></u-icon></view>
+				<view>
+					<image style='width:12px;height:12px;' @click='closepopup' class='close'  src="../../static/images/order/guanbi@3x.png" mode=""></image>
+					<!-- <u-icon @click="closepopup" class='close' name="close" size="20"></u-icon> -->
+				</view>
 				
 				<view style='fon-size:34rpx;margin-bottom:20px;text-align:center;font-weight: 600;'>确认终止订单</view>
 				<view style="margin: 0 auto;">
@@ -243,6 +252,7 @@
 			return {
 				zcPhoneList:[],
 				xcPhoneList:[],
+				hdPhoneList:[],
 				show:false,
 				carrierInfo:{},
 				freightInfo:{},
@@ -284,6 +294,23 @@
 			this.getList()
 		},
 		methods: {
+			ylImg(src) {
+				uni.previewImage({
+					urls: src,
+					longPressActions: {
+						itemList: ['发送给朋友', '保存图片', '收藏'],
+						success: function(data) {
+							console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
+						},
+						fail: function(err) {
+							console.log(err.errMsg);
+						}
+					}
+				});
+			},
+			closepopup(){
+				this.show=false
+			},
 			lookContract(){
 				uni.downloadFile({
 				  url: this.dataObj.driverContractUrl,
@@ -450,7 +477,12 @@
 							if(this.carrierInfo.loadingImg&&this.carrierInfo.loadingImg.length>0){
 								this.zcPhoneList = this.carrierInfo.loadingImg.split(',')
 							}
-							
+							if(this.carrierInfo.unloadingImg&&this.carrierInfo.unloadingImg.length>0){
+								this.xcPhoneList = this.carrierInfo.unloadingImg.split(',')
+							}
+							if(this.carrierInfo.receiptImg&&this.carrierInfo.receiptImg.length>0){
+								this.hdPhoneList = this.carrierInfo.receiptImg.split(',')
+							}
 							// if(res.data.orderStatus!="待货主确认"&&res.data.orderStatus!="未装车"&&res.data.orderStatus!="已终止"){
 							// 	this.status1 = true
 							// }
@@ -668,6 +700,7 @@
 	.close{
 		position:absolute;
 		right:20px;
+		top:26px;
 	}
 	.termination{
 		background:#F1F3F6;

+ 25 - 16
pages/order/signContract.vue

@@ -246,7 +246,27 @@
 				
 				})
 			}
-			console.log(this.dataDetails.advanceCharge)
+			this.$request.baseRequest('get', '/commonUser/getSignatureAddress', {
+				phone: this.userInfo.phone,
+				identification:1
+			}).then(res => {
+				if(res.data){
+					if(res.data.signImg){
+						// 获取远程图片,canvas无法直接绘制远程图片
+						uni.getImageInfo({
+							src:res.data.signImg,
+							success(res){
+								var ctx=uni.createCanvasContext('handWriting')
+								ctx.drawImage(res.path,0,0,330,244)
+								ctx.save()
+								ctx.draw()
+							}
+						})
+					}
+				}
+			})
+			
+			console.log(this.dataDetails)
 			this.$set(this.dataDetails.carrierInfo,'carNo',this.dataDetails.carNumber)
 			this.preMoney()
 			// this.$set(this.dataDetails,'advanceCharge',this.dataDetails.advanceCharge)
@@ -261,27 +281,16 @@
 			
 			this.dataDetails = JSON.parse(options.obj)
 			// console.log(this.dataDetails.carNo,this.dataDetails.carrierInfo)
-			
-			if(this.userInfo.signImg){
-				// 获取远程图片,canvas无法直接绘制远程图片
-				uni.getImageInfo({
-					src:this.userInfo.signImg,
-					success(res){
-						var ctx=uni.createCanvasContext('handWriting')
-						ctx.drawImage(res.path,0,0,330,244)
-						ctx.save()
-						ctx.draw()
-					}
-				})
-			}
 			// this.dataDetails.advanceFreightService = '平台垫付运费'
 			this.dataDetails = JSON.parse(decodeURIComponent(options.obj))
+			if(this.dataDetails.hyCarrierInfo){
+				this.dataDetails.weight=this.dataDetails.hyCarrierInfo.loadingWeight
+			}
 			if(this.dataDetails.freightAdvance == 1){
 				this.proportion = this.dataDetails.driverAdvancePayment >= this.dataDetails.ownerAdvancePayment ? this.dataDetails.ownerAdvancePayment:this.dataDetails.driverAdvancePayment
 			}
-			console.log(this.dataDetails)
+			// console.log(this.dataDetails)
 			this.dataDetails.carrierInfo = {}
-			
 			this.ctx = uni.createCanvasContext("handWriting");
 			this.$nextTick(() => {
 				uni.createSelectorQuery().select('.handCenter').boundingClientRect(rect => {

BIN
static/images/order/guanbi@3x.png