From dbccd6b83b9e30f9fdcb2c7900a16cb038648c62 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期三, 03 九月 2025 10:55:39 +0800
Subject: [PATCH] 前端

---
 small-program/pages/order-details/order-details.vue |  314 +++++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 283 insertions(+), 31 deletions(-)

diff --git a/small-program/pages/order-details/order-details.vue b/small-program/pages/order-details/order-details.vue
index 26843f6..2fa75fd 100644
--- a/small-program/pages/order-details/order-details.vue
+++ b/small-program/pages/order-details/order-details.vue
@@ -5,17 +5,16 @@
 		</view> -->
 		<view class="order-head" :style="{ backgroundImage: 'url(' + bgImg + ')' }">
 			<view class="order-head-status">{{info.statusName || ''}}</view> 			
-			<view class="order-head-info" v-if="userInfo.id === info.acceptMemberId && info.isUpdate ==1" style="color: red;">
+			<view class="order-head-info" v-if="isAcceptor && info.isUpdate ==1" style="color: red;">
 				璁㈠崟淇℃伅宸蹭慨鏀癸紝璇峰強鏃剁‘璁わ紝{{timeInfo}}鍚庡皢鑷姩鍚屾剰
 			</view> 
 			<view class="order-head-info" v-else >{{getStatusInfo()}}</view> 
 		</view>
 		<view class="order-quxiao">
-			<view class="order-quxiao-btn" @click="show = true" v-if="userInfo.id === info.acceptMemberId && info.status ===2">鍙栨秷璁㈠崟</view>
-			<view class="order-quxiao-btn" @click="show = true" v-if="userInfo.id === info.releaseMemberId  &&  info.isUpdate!=1 &&  info.status ===2">鍙栨秷璁㈠崟</view>
-			<view class="order-quxiao-btn1" v-if="userInfo.id === info.releaseMemberId && info.type!=2 &&  info.isUpdate!=1 &&   info.status ===2 " @click="jumpEdit()">淇敼璁㈠崟</view>
+			<view class="order-quxiao-btn" @click="show = true" v-if="(isAcceptor && info.status ===2) || (isPushlishor  &&  info.isUpdate!=1 &&  info.status ===2)">鍙栨秷璁㈠崟</view>
+			<view class="order-quxiao-btn1" v-if="isPushlishor && info.type!=2 &&  info.isUpdate!=1 &&   info.status ===2 " @click="jumpEdit()">淇敼璁㈠崟</view>
 		</view>
-		<view class="order-user"  v-if="userInfo.id === info.releaseMemberId && info.acceptMemberId">
+		<view class="order-user"  v-if="isPushlishor && info.acceptMemberId">
 			<view class="order-user-info">
 				<view class="user-info-l">
 					<view class="user-info-l-image">
@@ -39,7 +38,7 @@
 						</view>
 					</view>
 				</view>
-				<view class="user-info-r" @click="contactPhone(info.acceptPhone)">
+				<view class="user-info-r" @click="contactPhone(info.acceptPhone)" v-if="info.status ==2||info.status==3||info.status==5">
 					<image src="/static/icon/ic_call@2x.png" mode="widthFix"></image>
 					<text>鑱旂郴甯堝倕</text>
 				</view>
@@ -106,7 +105,7 @@
 					</view>
 				</view>
 				
-				<view class="price-row" v-if="userInfo.id === info.acceptMemberId">
+				<view class="price-row" v-if="isAcceptor">
 					<view class="price-row-label">瀹為檯鍒拌处(鍏�)</view>
 					<view class="price-row-val" style="color: #FF0000;">
 						楼{{((info.estimatedAccount * (1 - (info.platformRata || 0))) / 100).toFixed(2) }}
@@ -123,7 +122,7 @@
 				{{ info.commentInfo || '-'}}
 			</view>
 		</view>
-		<view class="order-ren" v-if="userInfo.id === info.acceptMemberId">
+		<view class="order-ren" v-if="isAcceptor">
 			<view class="order-ren-left">
 				<view class="order-ren-left-img">
 					<image v-if="info.releaseCoverImage" :src="info.releaseCoverImage" mode="widthFix"></image>
@@ -133,7 +132,7 @@
 				<view class="order-ren-left-tip">涓氫富</view>
 			</view>
 			<view class="order-ren-x"></view>
-			<view class="order-ren-lx"  @click="contactPhone(info.releasePhone)">
+			<view class="order-ren-lx"  v-if="info.status ==2||info.status==3||info.status==5"  @click="contactPhone(info.releasePhone)">
 				<image src="/static/icon/ic_call@2x.png" mode="widthFix"></image>
 				<text>鍙戝崟鏂�</text>
 			</view>
@@ -179,21 +178,20 @@
 		</view>
 		<view style="width: 100%; height: calc(108rpx + env(safe-area-inset-bottom));" v-if="![99].includes(info.status)"></view>
 		<view class="order-footer" v-if="![99].includes(info.status)">
-			<template v-if="(userInfo.id === info.releaseMemberId) && info.isUpdate!=1 &&info.status ===2">
+			<template v-if="isPushlishor && info.isUpdate!=1 &&info.status ===2">
 				<sunui-mverify hint="寮�濮嬩綔涓�" @change="getaccept($event)"></sunui-mverify>
 			</template>
 			<view class="order-footer-btn" v-else> 
-				<view class="order-footer-btn-a" @click="show = true" v-if="1==2&& userInfo.id === info.acceptMemberId && info.status ===2">鍙栨秷璁㈠崟</view>
-				<view class="order-footer-btn-a" @click="show = true" v-if="userInfo.id === info.releaseMemberId && (info.status ===0 ||  info.status ===1|| info.status ===2)">鍙栨秷璁㈠崟</view>
-				<view class="order-footer-btn-b" @click="show2=true" v-if="userInfo.id === info.releaseMemberId && (info.status ===4 && info.commentStatus!=1)">鍘昏瘎浠�</view>
-				<view class="order-footer-btn-b" v-if="userInfo.id === info.releaseMemberId &&((info.status ===3 && info.type !==2)|| (info.status ===0 && info.type===2))" @click="show1 = true">{{info.type === 2 ? '缁х画鏀粯' : '瀹屾垚骞舵敮浠�'}}</view>
-				
-				<view class="order-footer-btn-b" v-if="userInfo.id === info.releaseMemberId && ((info.status ===3 && info.type===2))" @click="payment1">瀹屾垚浣滀笟</view>
-				
-				<view class="order-footer-btn-b" v-if="info.type !=2 && info.isUpdate!=1&& userInfo.id === info.releaseMemberId && (info.status ===0 ||  info.status ===1|| info.status ===2)" @click="jumpEdit()">淇敼璁㈠崟</view>
-				<view class="order-footer-btn-b" @click="show5 =true" v-if="userInfo.id === info.acceptMemberId && (info.isUpdate==1 && info.status ===2)">淇敼纭</view>
+				<view class="order-footer-btn-a" @click="show = true" v-if="1==2&& isAcceptor && info.status ===2">鍙栨秷璁㈠崟</view>
+				<view class="order-footer-btn-a" @click="show = true" v-if="isPushlishor && (info.status ===0 ||  info.status ===1|| info.status ===2)">鍙栨秷璁㈠崟</view>
+				<view class="order-footer-btn-b" @click="show2=true" v-if="isPushlishor && (info.status ===4 && info.commentStatus!=1)">鍘昏瘎浠�</view>
+				<view class="order-footer-btn-b" v-if="isPushlishor&&((info.status ===5 && info.type !==2)|| (info.status ===0 && info.type===2))" @click="show1 = true">{{info.type === 2 ? '缁х画鏀粯' : '瀹屾垚骞舵敮浠�'}}</view>
+				<view class="order-footer-btn-a" @click="show7 = true" v-if=" info.type!==2 &&isAcceptor && info.status ===3">纭璐圭敤</view>
+				<view class="order-footer-btn-b" v-if="isPushlishor && ((info.status ===3 && info.type===2))" @click="payment1">瀹屾垚浣滀笟</view>
+				<view class="order-footer-btn-b" v-if="info.type !=2 && info.isUpdate!=1&& isPushlishor && (info.status ===0 ||  info.status ===1|| info.status ===2)" @click="jumpEdit()">淇敼璁㈠崟</view>
+				<view class="order-footer-btn-b" @click="show5 =true" v-if="isAcceptor&& (info.isUpdate==1 && info.status ===2)">淇敼纭</view>
 				<!-- <view class="order-footer-btn-b" @click="startJobs()" v-if="userInfo.id === info.releaseMemberId && (info.status ===2)">寮�濮嬩綔涓�</view> -->
-				<view class="order-footer-btn-b"  @click="show6 =true" v-if="userInfo.id !== info.releaseMemberId && (info.status ===1)">鎶㈠崟</view>
+				<view class="order-footer-btn-b"  @click="show6 =true" v-if="!isPushlishor && (info.status ===1)">鎶㈠崟</view>
 			</view>
 			<view style="width: 100%; height: env(safe-area-inset-bottom);"></view>
 		</view>
@@ -278,7 +276,57 @@
 				<view class="zhifu-botton" @click="payment">纭鏀粯</view>
 			</view>
 		</u-popup>
-		
+		<!-- 鏀粯寮圭獥 -->
+		<u-popup :show="show7" round="15" mode="bottom">
+			<view class="querenfee">
+				<view class="querenfee-head">
+					<view></view>
+					<text>璐圭敤纭</text>
+					<image @click="show7 = false" src="/static/icon/ic_close@2x.png" mode="widthFix"></image>
+				</view>
+				<view class="querenfee-c">
+					<view class="querenfee-c-info1">璐圭敤鏍囧噯锛�</view>
+					<viem class=" money">{{((info.price||0)/100).toFixed(2) }}{{info.priceUnit || '' }}</viem>
+				</view>
+				<view class="querenfee-c" >					 
+					<view class="querenfee-c-info1"><text style="color: red;">*</text>{{feeFrom.priceParam1.name}}锛�</view>
+					<view class="querenfee-c-input"> 
+						<input type="number" v-model="feeForm.priceNum1"   placeholder="璇疯緭鍏�" />
+					</view>
+					<text class="querenfee-c-info1" >{{feeFrom.priceParam1.unit}}</text>
+				</view>
+				<view class="querenfee-c" v-if="feeFrom.priceParam2.name !=null">
+					<view class="querenfee-c-info1"><text style="color: red;">*</text>{{feeFrom.priceParam2.name}}锛�</view>
+					<view class="querenfee-c-input"> 
+						<input type="number" v-model="feeForm.priceNum2"   placeholder="璇疯緭鍏�" />
+					</view>
+					<text class="querenfee-c-info1" >{{feeFrom.priceParam2.unit}}</text>
+				</view>
+				<view class="querenfee-c">
+					<view class="querenfee-c-info1">鍏朵粬璐圭敤锛�</view>
+					<view class="querenfee-c-input">
+						<input type="number" v-model="feeForm.confirmOtherFee"  placeholder="璇疯緭鍏�" />
+					</view>
+				</view>
+				<view class="querenfee-c">
+					<view class="querenfee-c-info1">澶囨敞淇℃伅锛�</view>
+					<view class="querenfee-c-input">
+						<u--textarea placeholder="濡傞渶澶囨敞锛岃杈撳叆" border="none" v-model="feeForm.confirmFeeRemark"  ></u--textarea>
+					</view>
+				</view>
+				<view class="querenfee-c">
+					<view class="querenfee-c-info1">瀹為檯鎬昏垂鐢細</view>
+					<view class="querenfee-c-input">
+						<image src="/static/icon/ic_money@2x.png" mode="widthFix"></image>
+						<text class="querenfee-c-input money">{{confirmPayFee}}</text>
+					</view>
+				</view>
+				<view class="querenfee-c">
+					<view class="querenfee-tips">鏈�缁堣垂鐢ㄧ敱鍙戝崟鏂规敮浠橈紝鎺ュ崟鏂规敹鍒扮殑閲戦灏嗘墸闄ゅ钩鍙版墜缁垂鐢�</view>
+				</view>
+				<view class="querenfee-botton" @click="confirmFee">纭璐圭敤</view>
+			</view>
+		</u-popup>
 		<!-- 璇勪环 -->
 		<u-popup :show="show2" round="15" mode="bottom">
 			<view class="zhifu">
@@ -312,6 +360,8 @@
 		},
 		data() {
 			return {
+				isPushlishor:false,
+				isAcceptor:false,
 				show: false,
 				show1: false,
 				show2: false,
@@ -321,6 +371,7 @@
 				show4:false,
 				show5:false,
 				show6:false,
+				show7:true,
 				timeInfo:'00:00:00',
 				lessTime:null,
 				value:0,
@@ -330,7 +381,22 @@
 				loading:false,
 				commentInfo:'',
 				info: {},
-				amount: ''
+				amount: '',
+				confirmPayFee:0.00,
+				feeFrom:{
+					priceParam1:{
+						name:null,
+						unit:null
+					},
+					priceParam2:{
+						name:null,
+						unit:null
+					},
+					priceNum1:null,
+					priceNum2:null,
+					confirmFeeRemark:null,
+					confirmOtherFee:null,
+				}
 			};
 		},
 		onLoad(options) {
@@ -389,6 +455,9 @@
 						that.getOrderData()
 					}
 				})
+			},
+			confirmFee(){
+				console.log("confirmFee")
 			},
 			payment() {
 				var that = this
@@ -575,22 +644,43 @@
 				} 
 				var that =this
 				this.lessTime = Math.floor( Number(that.info.confirmCountdown || 0)/1000) ;
-				this.timer =  setInterval(function(){ 
-					   let h = Math.floor(that.lessTime/60/60) ;
-					   let m = Math.floor((that.lessTime - h*60*60)/60); 
-					   let s=  Math.floor(that.lessTime- h*60*60 -m*60);
-					   that.timeInfo =(h<10?'0':'')+ h+":"+(m<10?'0':'')+m+":"+(s<10?'0':'')+s;
-					   that.lessTime =that.lessTime-1;
-					   // console.log( that.timeInfo)
-				},1000) 
+				if(this.lessTime>0){
+					this.timer =  setInterval(function(){
+						   let h = Math.floor(that.lessTime/60/60) ;
+						   let m = Math.floor((that.lessTime - h*60*60)/60); 
+						   let s=  Math.floor(that.lessTime- h*60*60 -m*60);
+						   that.timeInfo =(h<10?'0':'')+ h+":"+(m<10?'0':'')+m+":"+(s<10?'0':'')+s;
+						   that.lessTime =that.lessTime-1;
+						   // console.log( that.timeInfo)
+					},1000) 
+				}
+			
 			},
 			getOrderData(){
 				var that = this
 				var param ={ orderId:that.id}
+				this.isPushlishor =false
+				this.isAcceptor =false
 				this.$u.api.getDetail(param).then(res =>{
+					console.error("=============================",res.data.releaseMemberId,res.data.acceptMemberId,that.userInfo.id)
+					
 					if(res.code ===200){
-						if(that.userInfo.id === res.data.releaseMemberId || that.userInfo.id === res.data.acceptMemberId ){
+						if(that.userInfo.id === res.data.releaseMemberId ){
+							//濡傛灉鏄彂鍗曟柟
+							that.isPushlishor =true
+						}else if(that.userInfo.id ===res.data.acceptMemberId ){
+							//濡傛灉鏄帴鍗曟柟
+							that.isAcceptor =true
+						}
+						if(that.isAcceptor ||that.isPushlishor ){
 							that.info = res.data
+							if(that.userInfo.id === that.info.releaseMemberId ){
+								//濡傛灉鏄彂鍗曟柟
+								that.isPushlishor =true
+							}else if(that.userInfo.id === that.info.acceptMemberId ){
+								//濡傛灉鏄帴鍗曟柟
+								that.isAcceptor =true
+							}
 							that.amount = ((that.info.estimatedAccount || 0) / 100).toFixed(2)
 							if(that.info.wayInfo){
 								that.wayList = JSON.parse(that.info.wayInfo)
@@ -598,11 +688,60 @@
 							if(res.data.isUpdate == 1){
 								that.updateTimeInfo()
 							}
+							that.initPriceNumParam()
 						}else{
 							uni.showToast({ title: '璁㈠崟淇℃伅涓嶅瓨鍦�', icon: 'error', duration: 2000 });
 						}
 					}
 				 }) 
+			},
+			initPriceNumParam(){
+				this.feeFrom.priceParam1.name =null
+				this.feeFrom.priceParam1.unit =null
+				this.feeFrom.priceParam2.name =null
+				this.feeFrom.priceParam2.unit =null
+				if(this.info.type==0 && this.info.workType==1){
+					//鍒嗘嫞宸�
+					this.feeFrom.priceParam1.name ='瀹為檯鐢ㄥ伐澶╂暟锛�'
+					this.feeFrom.priceParam1.unit ='澶�'
+					this.feeFrom.priceParam2.name ='瀹為檯鐢ㄥ伐浜烘暟锛�'
+					this.feeFrom.priceParam2.unit ='浜�'
+				}else if(this.info.type==0 && this.info.workType==0){
+					//閲囨憳宸�
+					this.feeFrom.priceParam1.name ='瀹為檯閲囨憳閲嶉噺锛�'
+					this.feeFrom.priceParam1.unit ='鏂�'
+					this.feeFrom.priceParam2.name =null
+					this.feeFrom.priceParam2.unit =null
+				}else if(this.info.type==0 && this.info.workType==2){
+					//鍖呰宸�
+					if(this.info.carType==0){
+						//鎸夊ぉ
+						this.feeFrom.priceParam1.name ='瀹為檯鐢ㄥ伐澶╂暟锛�'
+						this.feeFrom.priceParam1.unit ='澶�'
+						this.feeFrom.priceParam2.name ='瀹為檯鐢ㄥ伐浜烘暟锛�'
+						this.feeFrom.priceParam2.unit ='浜�'
+					}else if(this.info.carType==1){
+						//鎸夊皬鏃�
+						this.feeFrom.priceParam1.name ='瀹為檯鐢ㄥ伐鏃堕棿锛�'
+						this.feeFrom.priceParam1.unit ='鏃�'
+						this.feeFrom.priceParam2.name ='瀹為檯鐢ㄥ伐浜烘暟锛�'
+						this.feeFrom.priceParam2.unit ='浜�'
+					}else if(this.info.carType==1){
+						//鎸夊皬鏃�
+						this.feeFrom.priceParam1.name ='瀹為檯鍖呰閲嶉噺锛�'
+						this.feeFrom.priceParam1.unit ='鏂�'
+						this.feeFrom.priceParam2.name =null
+						this.feeFrom.priceParam2.unit =null
+					}					 
+				}else if(this.info.type==1 && this.info.carType==0){
+					//杩愯揣鍗� 鎸夊ぉ鏁�
+					this.feeFrom.priceParam1.name ='瀹為檯鐢ㄨ溅澶╂暟锛�'
+					this.feeFrom.priceParam1.unit ='澶�' 
+				}else if(this.info.type==1 && this.info.carType==1){
+					//杩愯揣鍗� 鎸夋鏁�
+					this.feeFrom.priceParam1.name ='瀹為檯鐢ㄨ溅娆℃暟锛�'
+					this.feeFrom.priceParam1.unit ='娆�' 
+				}
 			}
 		}
 	}
@@ -630,6 +769,116 @@
 <style lang="scss" scoped>
 	.order {
 		width: 100%;
+		.querenfee {
+			width: 100%;
+			padding: 40rpx 30rpx;
+			box-sizing: border-box;
+			
+			.querenfee-textarea {
+				width: 100%;
+				height: 364rpx;
+				padding: 30rpx;
+				box-sizing: border-box;
+				background: #F7F7F7;
+				border-radius: 16rpx;
+				border: 1rpx solid #EEEEEE;
+				margin-top: 48rpx;
+				display: flex;
+				align-items: start;
+				image {
+					flex-shrink: 0;
+					width: 29rpx;
+					height: 29rpx;
+					margin-right: 10rpx;
+				}
+			}
+			 
+			.querenfee-head {
+				width: 100%;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				image {
+					width: 28rpx;
+					height: 28rpx;
+				}
+				text {
+					font-weight: 500;
+					font-size: 32rpx;
+					color: #222222;
+				}
+			}
+			.querenfee-c {
+				width: 100%;
+				margin-top: 46rpx;
+				display: flex;
+				.querenfee-c-info {					
+					align-items: center;
+					font-weight: 500;
+					font-size: 30rpx;
+					color: #222222;
+					margin-bottom: 30rpx;
+					text {
+						color: #00BC12;
+						margin-left: 10rpx;
+					}
+				}
+				.querenfee-c-info1 {
+					width: 50%;
+					font-weight: 400;
+					font-size: 30rpx;
+					color: #666666;
+					margin-bottom: 20rpx;
+				}
+				.querenfee-tips{
+					width: 100%;
+					font-weight: 400;
+					font-size: 26rpx;
+					color: #999999;
+					line-height: 36rpx; 
+				}
+				.money{
+					width: 50%;
+					text-align: right;
+					color: red !important; 
+				}
+				.querenfee-c-input {
+					width: 100%;
+					padding: 0 30rpx;
+					box-sizing: border-box;
+					height: 60rpx;
+					background: #F7F7F7;
+					border-radius: 10rpx;
+					border: 1rpx solid #EEEEEE;
+					display: flex;
+					align-items: center;
+					image {
+						flex-shrink: 0;
+						width: 28rpx;
+						height: 60rpx;
+						margin-right: 24rpx;
+					}
+					input {
+						flex: 1;
+						height: 100%;
+						font-weight: 500;
+						color: #222222;
+					}
+				}
+			}
+			.querenfee-botton {
+				width: 100%;
+				height: 88rpx;
+				line-height: 88rpx;
+				text-align: center;
+				font-weight: 500;
+				font-size: 32rpx;
+				color: #FFFFFF;
+				background: #00BC12;
+				border-radius: 44rpx;
+				margin-top: 264rpx;
+			}
+		}
 		.zhifu {
 			width: 100%;
 			padding: 40rpx 30rpx;
@@ -702,6 +951,9 @@
 					color: #666666;
 					margin-bottom: 20rpx;
 				}
+				.money{
+					color: red !important; 
+				}
 				.zhifu-c-input {
 					width: 100%;
 					padding: 0 30rpx;

--
Gitblit v1.9.3