yangan
2024-08-08 7af16f32de779ba2360344218f807c9909677ee1
pages/driver-page/driver-index/driver-index.vue
@@ -2,14 +2,14 @@
   <view class="">
      <view class="driver-index">
         <view class="driver-index-body">
            <!-- 待领取提煤单 -->
            <!-- 待领取收发单 -->
            <view class="wait-collection"
               style="background: url('https://mx.jzeg.cn:9096/appimg/image/banner/diverbanner.png') no-repeat;background-size:contain">
            </view>
            <!-- 引导页 -->
            <noob-tour></noob-tour>
            <!-- 自主配送界面 -->
            <view class="self-deliver">
            <!-- <view class="self-deliver">
               <view class="self-deliver_text">
                  创建自主配送单
               </view>
@@ -19,7 +19,7 @@
                     shape="cirle"
                     @click="selfDeliver"></u-button>
               </view>
            </view>
            </view> -->
            <view class="collection-form">
               <view class="collection-form-item"
                  v-for="(item, index) in driverBillOfLoadingData.list1"
@@ -89,9 +89,9 @@
                  @confirm="qiangDanConfirm"
                  @cancel="qiangDanCancel"></u-modal>
            </view>
            <!-- 待预约提煤单 -->
            <!-- 待预约收发单 -->
            <view class="wait-appointment">
               <combined-title title="待预约提煤单"></combined-title>
               <combined-title title="待预约收发单"></combined-title>
               <u-empty mode="data"
                  icon="http://cdn.uviewui.com/uview/empty/data.png"
                  text="暂无数据"
@@ -157,7 +157,7 @@
                     </view>
                     <view class="fifth-line">
                        <view class="button-img"
                            v-if="item.isDanger === 1"
                            v-if="item.isDanger === 1 && !item.idCardEscort"
                           @click.stop="cancelCerifCate(item)">
                           道路运输证
                        </view>
@@ -191,7 +191,7 @@
                  @confirm="insideConnectConfirm"
                  @cancel="insideConnectCancel"></u-modal>
            </view>
            <!-- 已预约提煤单 -->
            <!-- 已预约收发单 -->
            <!-- 填写集装箱号 -->
               <view class="">
               <u-modal :show="enterCode"
@@ -210,7 +210,7 @@
                  </u-modal>
            </view>
            <view class="Reserved">
               <combined-title title="已预约提煤单"></combined-title>
               <combined-title title="已预约收发单"></combined-title>
               <u-empty mode="data"
                  icon="http://cdn.uviewui.com/uview/empty/data.png"
                  textSize="30"
@@ -343,14 +343,13 @@
   import { customerId } from '@/utils/status';
   import combinedTitle from '@/components/combined-title/combined-title.vue';
   import previewImage from '@/components/kxj-previewImage/kxj-previewImage.vue';
   import noobTour from '@/components/noobTour/noobTour.vue'
   import { mapState } from 'vuex'
   import { BaseUrl } from '@/api/publicInterface.js'
   export default {
      components: {
         combinedTitle,
         previewImage,
         noobTour
      },
      props: {
         indexdriverBillOfLoadingData: {
@@ -430,6 +429,7 @@
               .then(res => {
                  if (res.code == 0) {
                     this.$u.toast('添加成功');
                     this.qiangDanList();
                     this.show=false
                  } else {
                     this.$u.toast(res.msg ? res.msg : '添加失败');
@@ -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 : '接单失败');
@@ -547,13 +540,13 @@
         },
         list3CardIconClick(value) {
            uni.navigateTo({
               url: `/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details?orderPlanId=${value.id}&yyId=${value.yyId}&orderType=${value.orderType}`
               url: `/subPages/bill-of-lading-details/bill-of-lading-details?orderPlanId=${value.id}&yyId=${value.yyId}&orderType=${value.orderType}`
            });
         },
         // 提煤单详情
         // 收发单详情
         cardBodyClick(name) {
            uni.navigateTo({
               url: `/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details?orderPlanId=${name}`
               url: `/subPages/bill-of-lading-details/bill-of-lading-details?orderPlanId=${name}`
            });
         },
         // 请求退单
@@ -619,16 +612,31 @@
         // 去预约
         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;
            if(value.isDanger === 1){
               if(!value.idCardEscort){
                  this.$u.toast('请选择道路运输证司机!');
                  this.cancelCerifCate(value);
                  return
               }
            }
            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}`
                  url: `/subPages/bill-of-lading-details/originInfo/originInfo?orderPlanId=${value.id}&filedId=${value.filedId}&deptId=${value.deptId}&sendDate=${value.sendDate}&isSpecial=${value.isSpecial}&isWeight=${value.isWeight}`
               });
            } else {
               uni.navigateTo({
                  url: `/pages/driver-page/appointment/appointment?takeCoalId=${value.id}&filedId=${value.filedId}&deptId=${value.deptId}&sendDate=${value.sendDate}`
               });
            }
              }
         },
         // 自主配送
         selfDeliver() {
@@ -637,9 +645,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 +657,30 @@
            }).catch(err=>{
            }).finally(() => {
               if (this.activeObj.orderType === '外购') {
               uni.navigateTo({
                  url: `/subPages/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: `/subPages/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}`
               });
            }
         }
      }
   };
@@ -691,7 +718,7 @@
      align-items: center;
      .send-date {
         width: 148rpx;
         min-width: 170rpx;
         height: 24rpx;
         line-height: 24rpx;
         font-size: 28rpx;
@@ -700,7 +727,7 @@
      }
      .havedclock {
         width: 58% !important;
         width: 70% !important;
         margin-right: 0 !important;
         .send-date {
@@ -795,7 +822,7 @@
      .driver-index-body {
         // margin-bottom: vww(56);
         // 待领取提煤单
         // 待领取收发单
         .wait-collection {
            width: 100%;
            height: 600rpx;
@@ -971,7 +998,7 @@
                  align-items: center;
                  .send-date {
                     width: 148rpx;
                     min-width: 146rpx;
                     height: 24rpx;
                     margin-left: vww(14);
                     margin-right: vww(56);