yangan
2025-04-11 5e08d4f61c24db589bd6d30875fcb1191f719b16
pages/driver-page/driver-index/driver-index.vue
@@ -424,6 +424,36 @@
    >
      <div v-html="notice.content"></div>
    </u-modal>
   <!-- 外销抢单选择车牌 -->
   <u-modal :show="show"
   showCancelButton
     @confirm="showConFirm(activeObj)"
        @cancel="showCancel"
   :title="title" >
         <view class="slot-content">
            <view style="text-align: left;">
            <u-radio-group
            v-model="paramsCarNo"
            placement="column"
         >
            <u-radio
            :iconSize="40"
            :labelSize="40"
            :size="40"
            :customStyle="{marginBottom: '8px'}"
            v-for="(item, index) in paramsArr"
            :key="index"
            :label="item.carNo + '--' + item.name"
            :name="item.carNo"
            @change="radioChange"
            >
            </u-radio>
         </u-radio-group>
      </view>
         </view>
      </u-modal>
  </div>
</template>
<script>
@@ -464,9 +494,14 @@
      labaIcon: `${onlineurl}/appimg/image/aboutUs/laba.jpg`,
      newIcon: `${onlineurl}/appimg/image/aboutUs/labaHeight.jpg`,
      markFlag: "none",
     activeObj:{},
      noticeModelShow: false,
      garidInitTop: "", //元素初始距离顶部的高度
      screenHeight: "",
     show:false,
     paramsArr:[],
     paramsCarNo:'',
     title:'选择车牌',
      notice: {
        title: "",
        content: "",
@@ -691,7 +726,31 @@
    },
    // 抢单按钮
    qiangDanBtn: Debounce(function (value) {
      if (value.tmcCount == "0") {
      console.log(value,'value')
      this.activeObj = value;
      if(value.orderType === '外销'){
         this.$reqPost('getCarNosByFleetId',{fleetId:value.fleetId},'params').then(res=>{
         console.log(res,'ress')
         this.paramsArr = res.data;
         this.show = true;
   //       if (value.tmcCount == "0") {
    //     this.qiangDan(
    //       value.orderPlanId,
    //       value.fleetId,
    //       value.customerId === null ? "0" : value.customerId,
    //       value.xsUserId === null ? "0" : value.xsUserId
    //     );
    //   } else {
    //     this.qiangDanOrderPlanId = value.orderPlanId;
    //     this.fleetId = value.fleetId;
    //     this.customerId = value.customerId === null ? "0" : value.customerId;
    //     this.xsUserId = value.xsUserId === null ? "0" : value.xsUserId;
    //     this.qiangDanShow = true;
    //     this.qiangDanContent = `已抢${value.tmcCount}单,确定抢单?`;
    //   }
      })
      }else{
         if (value.tmcCount == "0") {
        this.qiangDan(
          value.orderPlanId,
          value.fleetId,
@@ -706,7 +765,33 @@
        this.qiangDanShow = true;
        this.qiangDanContent = `已抢${value.tmcCount}单,确定抢单?`;
      }
      }
    }, 500),
   showConFirm(value){
      if (value.tmcCount == "0") {
        this.qiangDan(
          value.orderPlanId,
          value.fleetId,
          value.customerId === null ? "0" : value.customerId,
          value.xsUserId === null ? "0" : value.xsUserId
        );
      } else {
        this.qiangDanOrderPlanId = value.orderPlanId;
        this.fleetId = value.fleetId;
        this.customerId = value.customerId === null ? "0" : value.customerId;
        this.xsUserId = value.xsUserId === null ? "0" : value.xsUserId;
        this.qiangDanShow = true;
        this.qiangDanContent = `已抢${value.tmcCount}单,确定抢单?`;
      }
     this.show  =false;
   },
   showCancel(){
      this.show = false;
   },
    // 抢单模态框
    qiangDanConfirm() {
@@ -724,6 +809,7 @@
    },
    // 抢单请求
    qiangDan(id, fleetId, customerId, xsUserId) {
      console.log(this.paramsCarNo,'paramsCarNo')
      this.$reqPost(
        "qiangDan",
        {
@@ -731,11 +817,13 @@
          fleetId: fleetId,
          customerId: customerId,
          xsUserId: xsUserId,
        carNo:this.paramsCarNo ? this.paramsCarNo : '',
        },
        "params"
      )
        .then((res) => {
          if (res.code == 0) {
         this.paramsCarNo = '';
            this.$u.toast("抢单成功");
          } else {
            this.$u.toast(res.msg ? res.msg : "抢单失败");
@@ -814,8 +902,8 @@
.indexPageDiv{
  width: 100%;
  position: absolute;
  height: calc(100vh - 45px);
  top: 30%;
  height: calc(100vh - 100rpx);
  top: 280rpx;
  left: 0;
}
.warp {
@@ -942,7 +1030,7 @@
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height: 150rpx;
        .centerLine {
          width: 510rpx;
@@ -1318,6 +1406,7 @@
        0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12);
      border-radius: 20rpx;
      transform: translateY(-10rpx);
      padding-bottom: 100rpx;
       .u-list{
      height: auto !important;
     }