yangan
2024-09-12 75811022288e2c4832974a1586f442608706c30a
pages/driver-page/delivery-my/delivery-my/delivery-my.vue
@@ -67,6 +67,7 @@
               required v-if="daydata.isWeighing==1">
               <u--input v-model="clean"
               border="surround"
               disabled
                  placeholder="请输入净重"
                  clearable></u--input>
            </u-form-item>
@@ -205,6 +206,7 @@
   import { apiRegister } from '@/api/publicInterface.js';
   import { mapMutations } from 'vuex';
   import { BaseUrl } from '@/api/publicInterface.js';
   import BigNumber from "bignumber.js"
   export default {
      // 监听页面初次渲染完成。注意如果渲染速度快,会在页面进入动画完成前触发
      onReady() {
@@ -244,7 +246,6 @@
            },
            skin:"",
            hair:"",
            clean:"",
            TableData:[],
            radiolist1: [{
                  name: '否',
@@ -317,6 +318,27 @@
               // ],
            },
         };
      },
      computed:{
         clean() {
            if(this.daydata.isWeighing==1){
            let xx = BigNumber(this.hair ? this.hair : 0)
            let yy = BigNumber(this.skin ? this.skin : 0)
            return xx.minus(yy).toNumber() > 0 ? xx.minus(yy).toNumber().toFixed(2) : 0
            }else{
               //数量
               if(!this.tmTaskCoalList.length){
                  return false
               }else{
                  const reslut = this.tmTaskCoalList.find(item=>!item.productQuantity);
                  if(reslut){
                     return false
                  }else{
                     return true
                  }
               }
            }
         }
      },
      methods: {
         ...mapMutations(['changeisUploadimg']),
@@ -414,7 +436,7 @@
                     });
                     if (res.code === 0) {
                        uni.$u.toast('预约成功')
                        this.GetMyDelivery()
                        this.GetMyDeliverys()
                     } else {
                        uni.$u.toast(res.msg ? res.msg : '预约失败')
                     }
@@ -445,7 +467,7 @@
                     });
                     if (res.code === 0) {
                        uni.$u.toast('预约成功')
                        this.GetMyDelivery()
                        this.GetMyDeliverys()
                     } else {
                        uni.$u.toast(res.msg ? res.msg : '预约失败')
                     }
@@ -471,7 +493,7 @@
                  });
                  if (res.code === 0) {
                     uni.$u.toast('预约成功')
                     this.GetMyDelivery()
                     this.GetMyDeliverys()
                  } else {
                     uni.$u.toast(res.msg ? res.msg : '预约失败')
                  }
@@ -479,6 +501,21 @@
            }
            })
         },
         GetMyDeliverys() {
            this.$reqGet('driverYuYueList', {orderPlanId:this.id}).then(res => {
               if (res.code == 0) {
                  this.yuYueData = res.data;
               } else {
                  this.$u.toast('加载失败');
               }
            });
            this.$reqGetId('myDelivery',this.id).then(res => {
               if (res.data) {
                  this.daydata=res.data
                  this.tmTaskCoalList=res.data.jhOrderPlanList
               }
            });
         },
         GetMyDelivery() {
            uni.showLoading({
               title: '加载中...'