doum
2025-09-03 d7c630319b0476602eac576f06ec75e1e3834dfa
small-program/pages/order-details/order-details.vue
@@ -5,16 +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) || (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">
@@ -105,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) }}
@@ -122,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>
@@ -178,20 +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 ===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 && userInfo.id === info.acceptMemberId && info.status ===3">确认费用</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>
@@ -289,27 +289,18 @@
               <viem class=" money">{{((info.price||0)/100).toFixed(2) }}{{info.priceUnit || '' }}</viem>
            </view>
            <view class="querenfee-c" >                
               <view class="querenfee-c-info1" v-if="info.type ==1 && info.carType ==0"><text style="color: red;">*</text>实际用车天数:</view>
               <view class="querenfee-c-info1" v-if="info.type ==1 && info.carType ==1"><text style="color: red;">*</text>实际用车次数:</view>
               <view class="querenfee-c-info1" v-if="info.type ==0 && info.workType ==0"><text style="color: red;">*</text>实际采摘重量:</view>
               <view class="querenfee-c-info1" v-if="info.type ==0 && info.workType ==1"><text style="color: red;">*</text>实际用工天数:</view>
               <view class="querenfee-c-info1" v-if="info.type ==0 && info.workType ==2"><text style="color: red;">*</text>实际用车次数:</view>
               <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" v-if="info.type ==1 && info.carType ==0">天</text>
               <text class="querenfee-c-info1" v-if="info.type ==1 && info.carType ==1">次</text>
               <text class="querenfee-c-info1" >{{feeFrom.priceParam1.unit}}</text>
            </view>
            <view class="querenfee-c"  v-if="info.type ==0 && (info.workType ==1 ||info.workType ==2)">
               <view class="querenfee-c-info1" v-if="info.workType ==1"><text style="color: red;">*</text>实际用工人数:</view>
               <view class="querenfee-c-info1" v-if="info.workType ==2 && info.carType ==0"><text style="color: red;">*</text>实际用工人数:</view>
               <view class="querenfee-c-info1" v-if="info.workType ==2 && info.carType ==1"><text style="color: red;">*</text>实际用工时间:</view>
               <view class="querenfee-c-info1" v-if="info.workType ==2 && info.carType ==1"><text style="color: red;">*</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" v-if="info.workType ==1">人</text>
               <text class="querenfee-c-info1" v-if="info.workType ==2 && ">次</text>
               <text class="querenfee-c-info1" >{{feeFrom.priceParam2.unit}}</text>
            </view>
            <view class="querenfee-c">
               <view class="querenfee-c-info1">其他费用:</view>
@@ -369,6 +360,8 @@
      },
      data() {
         return {
            isPushlishor:false,
            isAcceptor:false,
            show: false,
            show1: false,
            show2: false,
@@ -391,6 +384,14 @@
            amount: '',
            confirmPayFee:0.00,
            feeFrom:{
               priceParam1:{
                  name:null,
                  unit:null
               },
               priceParam2:{
                  name:null,
                  unit:null
               }
               priceNum1:null,
               priceNum2:null,
               confirmFeeRemark:null,
@@ -658,10 +659,26 @@
         getOrderData(){
            var that = this
            var param ={ orderId:that.id}
            this.isPushlishor =false
            this.isAcceptor =false
            this.$u.api.getDetail(param).then(res =>{
               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.isAcceptor ){
                     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)
@@ -669,11 +686,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 ='次'
            }
         }
      }
   }