yangan
2024-06-29 6a232ec3d1d75af66b5afb475895d585a494cbaf
pages/driver-page/driver-index/driver-index.vue
@@ -460,7 +460,6 @@
         },
         // 接单按钮
         qiangDanBtn(value) {
            this.activeObj = value;
            //是否可以场内接单,1 可以2不可以
            if (value.isInsideConnect === 1) {
               this.insideConnectShow = true
@@ -507,12 +506,6 @@
                  uni.hideLoading()
                  if (res.code == 0) {
                     this.$u.toast('接单成功');
                     //判断是不是集装箱 是否需要输入
                     if(this.activeObj.isContainerNum){
                        this.enterCode = true;
                     }else{
                        this.enterCode = false;
                     }
                     
                  } else {
                     this.$u.toast(res.msg ? res.msg : '接单失败');
@@ -619,8 +612,15 @@
         // 去预约
         toAppointmentClick(value) {
            // 由于自主配送单 是外购单 但是不需要填写原发为1不需要填写原发
            uni.setStorageSync('isNeedOrigin', value.orderType === '外购' && value.isSpecial === 1 ? 1 : 0)
            if (value.orderType === '外购') {
            uni.setStorageSync('isNeedOrigin', value.orderType === '外购' && value.isSpecial === 1 ? 1 : 0);
            //判断是不是集装箱 是否需要输入
            this.activeObj = value;
            console.log(value,'123')
            if(value.isContainerNum){
              this.enterCode = true;
            }else{
              this.enterCode = false;
                 if (value.orderType === '外购') {
               uni.navigateTo({
                  url: `/pages/driver-page/driver-index/bill-of-lading-details/originInfo/originInfo?orderPlanId=${value.id}&filedId=${value.filedId}&deptId=${value.deptId}&sendDate=${value.sendDate}&isSpecial=${value.isSpecial}&isWeight=${value.isWeight}`
               });
@@ -629,6 +629,8 @@
                  url: `/pages/driver-page/appointment/appointment?takeCoalId=${value.id}&filedId=${value.filedId}&deptId=${value.deptId}&sendDate=${value.sendDate}`
               });
            }
              }
         },
         // 自主配送
         selfDeliver() {
@@ -637,9 +639,10 @@
            })
         },
         cancelCodeEnter(){
            console.log(this.activeObj,'tmid')
            this.activeObj.containerNumber = this.enterCodeStr;
             this.$reqPut('addContainer',{
               id:this.activeObj.tmId,
               id:this.activeObj.id,
               containerNumber:this.activeObj.containerNumber
            }).then(res=>{
               this.$u.toast('操作成功');
@@ -648,12 +651,30 @@
            }).catch(err=>{
            }).finally(() => {
               if (this.activeObj.orderType === '外购') {
               uni.navigateTo({
                  url: `/pages/driver-page/driver-index/bill-of-lading-details/originInfo/originInfo?orderPlanId=${this.activeObj.id}&filedId=${this.activeObj.filedId}&deptId=${this.activeObj.deptId}&sendDate=${this.activeObj.sendDate}&isSpecial=${this.activeObj.isSpecial}&isWeight=${this.activeObj.isWeight}`
               });
            } else {
               uni.navigateTo({
                  url: `/pages/driver-page/appointment/appointment?takeCoalId=${this.activeObj.id}&filedId=${this.activeObj.filedId}&deptId=${this.activeObj.deptId}&sendDate=${this.activeObj.sendDate}`
               });
            }
            })
         },
         cancelCodeCancel(){
            this.activeObj = {};
            this.enterCode = false;
            this.enterCodeStr = '';
               if (this.activeObj.orderType === '外购') {
               uni.navigateTo({
                  url: `/pages/driver-page/driver-index/bill-of-lading-details/originInfo/originInfo?orderPlanId=${this.activeObj.id}&filedId=${this.activeObj.filedId}&deptId=${this.activeObj.deptId}&sendDate=${this.activeObj.sendDate}&isSpecial=${this.activeObj.isSpecial}&isWeight=${this.activeObj.isWeight}`
               });
            } else {
               uni.navigateTo({
                  url: `/pages/driver-page/appointment/appointment?takeCoalId=${this.activeObj.id}&filedId=${this.activeObj.filedId}&deptId=${this.activeObj.deptId}&sendDate=${this.activeObj.sendDate}`
               });
            }
         }
      }
   };