qingyiay
2023-05-17 ae1aad66a165ee7253bed2127a3b53baa40c2361
pages/customer-page/customer-my/customer-my.vue
@@ -16,12 +16,14 @@
                           <u-swipe-action-item
                              :options="options1"
                              v-for="(item, index) in huoDaiData"
                              :index="index"
                              :index="item.userId"
                              :name="item.userId"
                              :key="index"
                              @click="deleteHuoDaiClick"
                           >
                              <u-cell :title="item.name" value="详情" @click="toFreightForwarderDetails(item.userId)"></u-cell>
                              <u-cell :title="item.name" value="详情" @click="toFreightForwarderDetails(item.userId)">
                                 <u-icon name="arrow-right" color="#999999" size="30" slot="right-icon"></u-icon>
                              </u-cell>
                           </u-swipe-action-item>
                        </u-cell-group>
                     </u-swipe-action>
@@ -43,12 +45,14 @@
                           <u-swipe-action-item
                              :options="options1"
                              v-for="(item, index) in fleetData"
                              :index="index"
                              :index="item.id"
                              :name="item.id"
                              :key="index"
                              @click="deleteFleetClick"
                           >
                              <u-cell :title="item.name" :value="item.userSijisum + '辆'" @click="tofleetDetails(item.id)"></u-cell>
                              <u-cell :title="item.name" :value="item.userSijisum + '辆'" @click="tofleetDetails(item.id)">
                                 <u-icon name="arrow-right" color="#999999" size="30" slot="right-icon"></u-icon>
                              </u-cell>
                           </u-swipe-action-item>
                        </u-cell-group>
                     </u-swipe-action>
@@ -218,15 +222,19 @@
            title: '加载中...'
         });
         // 新建车队
         this.$reqPost('saveFleet', this.addGroupForm, 'params').then(res => {
            uni.hideLoading();
            if (res.code == 0) {
               this.$u.toast('添加成功');
         this.$reqPost('saveFleet', this.addGroupForm, 'params')
            .then(res => {
               uni.hideLoading();
               console.log(res, '新建车队');
               if (res.code == 0) {
                  this.$u.toast('添加成功');
               } else {
                  this.$u.toast(res.msg ? res.msg : '添加失败');
               }
            })
            .then(r => {
               this.getFleet();
            } else {
               this.$u.toast(res.msg ? res.msg : '添加失败');
            }
         });
            });
         this.updateGroupShow = false;
      },
      // 删除货代
@@ -251,17 +259,18 @@
         uni.showLoading({
            title: '加载中...'
         });
         this.$reqPost('deleteHuoDai', { id: this.deleteHuoDaiId }, 'params').then(res => {
            uni.hideLoading();
            if (res.code == 0) {
               if (res.data) {
         this.$reqPost('deleteHuoDai', { id: this.deleteHuoDaiId }, 'params')
            .then(res => {
               uni.hideLoading();
               if (res.code == 0) {
                  this.$u.toast('删除成功');
                  this.getAllHuoDaiByCustomerId();
               } else {
                  this.$u.toast('删除失败');
                  this.$u.toast(res.msg ? res.msg : '删除失败');
               }
            }
         });
            })
            .then(r => {
               this.getAllHuoDaiByCustomerId();
            });
      },
      // 删除车队
      deleteFleetClick(args) {
@@ -285,16 +294,19 @@
         uni.showLoading({
            title: '加载中...'
         });
         this.$reqPost('deleteFleet', { id: this.deleteFleetId }, 'params').then(res => {
            console.log('删除车队', res);
            if (res.code == 0) {
               this.$u.toast('删除成功');
            } else {
               this.$u.toast(res.msg ? res.msg : '删除失败');
            }
            uni.hideLoading();
            this.getFleet();
         });
         this.$reqPost('deleteFleet', { id: this.deleteFleetId }, 'params')
            .then(res => {
               console.log('删除车队', res);
               if (res.code == 0) {
                  this.$u.toast('删除成功');
               } else {
                  this.$u.toast(res.msg ? res.msg : '删除失败');
               }
               uni.hideLoading();
            })
            .then(() => {
               this.getFleet();
            });
      },
      // 货代详情
      toFreightForwarderDetails(userId) {
@@ -361,10 +373,9 @@
      position: fixed;
      top: 0;
      .navgation {
         width: 77rpx;
         width: 80rpx;
         height: 37rpx;
         font-size: 40rpx;
         font-family: Adobe Heiti Std;
         font-weight: normal;
         color: #ffffff;
         line-height: 69rpx;