qingyiay
2023-05-16 72935b2a35765bcc3622561bb06f2eccd64caf83
pages/customer-page/customer-my/customer-my.vue
@@ -16,7 +16,7 @@
                           <u-swipe-action-item
                              :options="options1"
                              v-for="(item, index) in huoDaiData"
                              :index="index"
                              :index="item.userId"
                              :name="item.userId"
                              :key="index"
                              @click="deleteHuoDaiClick"
@@ -43,7 +43,7 @@
                           <u-swipe-action-item
                              :options="options1"
                              v-for="(item, index) in fleetData"
                              :index="index"
                              :index="item.id"
                              :name="item.id"
                              :key="index"
                              @click="deleteFleetClick"
@@ -218,14 +218,18 @@
            title: '加载中...'
         });
         // 新建车队
         this.$reqPost('saveFleet', this.addGroupForm, 'params').then(res => {
         this.$reqPost('saveFleet', this.addGroupForm, 'params')
            .then(res => {
            uni.hideLoading();
               console.log(res, '新建车队');
            if (res.code == 0) {
               this.$u.toast('添加成功');
               this.getFleet();
            } else {
               this.$u.toast(res.msg ? res.msg : '添加失败');
            }
            })
            .then(r => {
               this.getFleet();
         });
         this.updateGroupShow = false;
      },
@@ -251,16 +255,17 @@
         uni.showLoading({
            title: '加载中...'
         });
         this.$reqPost('deleteHuoDai', { id: this.deleteHuoDaiId }, 'params').then(res => {
         this.$reqPost('deleteHuoDai', { id: this.deleteHuoDaiId }, 'params')
            .then(res => {
            uni.hideLoading();
            if (res.code == 0) {
               if (res.data) {
                  this.$u.toast('删除成功');
                  this.getAllHuoDaiByCustomerId();
               } else {
                  this.$u.toast('删除失败');
                  this.$u.toast(res.msg ? res.msg : '删除失败');
               }
            }
            })
            .then(r => {
               this.getAllHuoDaiByCustomerId();
         });
      },
      // 删除车队
@@ -285,7 +290,8 @@
         uni.showLoading({
            title: '加载中...'
         });
         this.$reqPost('deleteFleet', { id: this.deleteFleetId }, 'params').then(res => {
         this.$reqPost('deleteFleet', { id: this.deleteFleetId }, 'params')
            .then(res => {
            console.log('删除车队', res);
            if (res.code == 0) {
               this.$u.toast('删除成功');
@@ -293,6 +299,8 @@
               this.$u.toast(res.msg ? res.msg : '删除失败');
            }
            uni.hideLoading();
            })
            .then(() => {
            this.getFleet();
         });
      },