| | |
| | | <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-swipe-action-item |
| | | :options="options1" |
| | | v-for="(item, index) in fleetData" |
| | | :index="index" |
| | | :index="item.id" |
| | | :name="item.id" |
| | | :key="index" |
| | | @click="deleteFleetClick" |
| | |
| | | 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; |
| | | }, |
| | |
| | | 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(); |
| | | }); |
| | | }, |
| | | // 删除车队 |
| | |
| | | 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('删除成功'); |
| | |
| | | this.$u.toast(res.msg ? res.msg : '删除失败'); |
| | | } |
| | | uni.hideLoading(); |
| | | }) |
| | | .then(() => { |
| | | this.getFleet(); |
| | | }); |
| | | }, |