qingyiay
2023-03-27 7986bc00e330411ffc73da24fdd168c6af8cf295
pages/driver-page/driver-index/driver-index.vue
@@ -137,7 +137,8 @@
         qiangDanShow: false,
         qiangDanTitle: '抢单提示',
         qiangDanContent: '',
         qiangDanOrderPlanId: null
         qiangDanOrderPlanId: null,
         fleetId: ''
      };
   },
   onShow() {
@@ -160,9 +161,10 @@
      // 抢单按钮
      qiangDanBtn(value) {
         if (value.tmcCount == '0') {
            this.qiangDan(value.orderPlanId);
            this.qiangDan(value.orderPlanId, value.fleetId);
         } else {
            this.qiangDanOrderPlanId = value.orderPlanId;
            this.fleetId = value.fleetId;
            this.qiangDanShow = true;
            this.qiangDanContent = `已抢${value.tmcCount}单,确定抢单?`;
         }
@@ -170,20 +172,22 @@
      // 抢单模态框
      qiangDanConfirm() {
         this.qiangDanContent = '';
         this.qiangDan(this.qiangDanOrderPlanId);
         this.qiangDan(this.qiangDanOrderPlanId, this.fleetId);
      },
      qiangDanCancel() {
         this.qiangDanShow = false;
      },
      // 抢单请求
      qiangDan(id) {
         this.$reqPost('qiangDan', { orderPlanId: id }, 'params').then(res => {
      qiangDan(id, fleetId) {
         this.$reqPost('qiangDan', { orderPlanId: id, fleetId: fleetId }, 'params').then(res => {
            if (res.code == 0) {
               this.$u.toast('抢单成功');
               this.qiangDanShow = false;
               this.qiangDanList();
            } else {
               this.$u.toast(res.data ? res.data : '抢单失败');
               this.qiangDanShow = false;
            }
            this.qiangDanList();
         });
      },
      list3CardIconClick(value) {