rk
2025-08-27 58d63637b67a7c565618379268da604e6231fc4c
small-program/pages/order-details/order-details.vue
@@ -7,12 +7,12 @@
         <view class="order-head-status">{{info.statusName || ''}}</view>
         <view class="order-head-info">{{getStatusInfo()}}</view> 
      </view>
      <view class="order-quxiao" v-if="userInfo.useIdentity != 0">
      <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.status ===0 ||  info.status ===1|| info.status ===2)">取消订单</view>
         <view class="order-quxiao-btn1" v-if="userInfo.id === info.releaseMemberId && (info.status ===0 ||  info.status ===1|| info.status ===2)" @click="jumpEdit()">修改订单</view>
      </view>
      <view class="order-user"  v-if="userInfo.id === info.releaseMemberId && userInfo.useIdentity != 0">
      <view class="order-user"  v-if="userInfo.id === info.releaseMemberId && info.acceptMemberId">
         <view class="order-user-info">
            <view class="user-info-l">
               <view class="user-info-l-image">
@@ -31,7 +31,7 @@
                     </view>
                     <view class="user-info-l-i-bottom-item">
                        <text>单数:</text>
                        <text>{{info.publishNum || 0}}</text>
                        <text>{{info.receiveNum ? info.receiveNum : 0}}</text>
                     </view>
                  </view>
               </view>
@@ -98,8 +98,15 @@
            </view>
            <view class="price-row">
               <view class="price-row-label">预估总费用(元)</view>
               <view class="price-row-val" style="color: #FF0000;">
               <view class="price-row-val" :style="{color: userInfo.id !== info.acceptMemberId ? '#FF0000' : ''}">
                  ¥{{((info.estimatedAccount||0)/100).toFixed(2) }}
               </view>
            </view>
            <view class="price-row" v-if="userInfo.id === info.acceptMemberId">
               <view class="price-row-label">实际到账(元)</view>
               <view class="price-row-val" style="color: #FF0000;">
                  ¥{{((info.estimatedAccount * (1 - (info.platformRata || 0))) / 100).toFixed(2) }}
               </view>
            </view>
         </view>
@@ -108,7 +115,7 @@
         <view class="order-info-title">
            <text>评价</text>
         </view>
         <u-rate :count="count" activeColor="#FFC331" size="26" v-model="info.commentLevel"></u-rate>
         <u-rate :count="count" readonly activeColor="#FFC331" size="26" v-model="info.commentLevel"></u-rate>
         <view class="order-info-remark">
            {{ info.commentInfo || '-'}}
         </view>
@@ -176,7 +183,10 @@
            <view class="order-footer-btn-a" @click="show = true" v-if="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">完成并支付</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="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-b" @click="startJobs()" v-if="userInfo.id === info.releaseMemberId && (info.status ===2)">开始作业</view>
@@ -362,6 +372,16 @@
               })
            }
         },
         payment1() {
            var that = this
            this.$u.api.doneOrder({
               orderId: this.info.id
            }).then(res => {
               if (res.code === 200) {
                  that.getOrderData()
               }
            })
         },
         payment() {
            var that = this
            // 订餐
@@ -466,18 +486,27 @@
         },
         cancelDo(){
            var that = this
            var param ={ orderId:that.id}
            this.$u.api.cancelOrder(param).then(res =>{
               if(res.code ===200){
                  that.show=false
                  uni.showToast({ title: '订单取消成功', icon: 'error', duration: 2000 });
                  if(that.userInfo.id !== that.info.releaseMemberId){
                     uni.navigateBack({ delta: 1 })
                  }else{
                     that.getOrderData()
                  }
            uni.requestSubscribeMessage({
               tmplIds: ['AA97cHjvlPiNO4viMkVe4JifCf9TD5b5Eb7s6El3VS8'],
               success(res) {
                  var param ={ orderId:that.id}
                  that.$u.api.cancelOrder(param).then(res =>{
                     if(res.code ===200){
                        that.show=false
                        uni.showToast({ title: '订单取消成功', icon: 'error', duration: 2000 });
                        if(that.userInfo.id !== that.info.releaseMemberId){
                           uni.navigateBack({ delta: 1 })
                        }else{
                           that.getOrderData()
                        }
                     }
                   })
               },
               fail(err) {
                  console.log(err)
               }
             })
            })
         },
         previemImg(src){
            uni.previewImage({