| | |
| | | <script> |
| | | import { customerId } from '@/utils/status.js'; |
| | | export default { |
| | | onLoad(params) { |
| | | onLoad(params) { |
| | | this.role = params.role; |
| | | if (params.fleetId) { |
| | | this.fleetId = params.fleetId; |
| | |
| | | } |
| | | }, |
| | | // 邀请货代 |
| | | bindHuoDai() { |
| | | bindHuoDai() { |
| | | // this.$reqPost('bindHuoDai', { customerId: this.customerId, name: this.name, phone: this.phone }, 'params').then(res => { |
| | | this.$reqPost('bindHuoDai', { name: this.name, phone: this.phone }).then(res => { |
| | | this.$reqPost('bindHuoDai', { name: this.name, phone: this.phone }, 'params').then(res => { |
| | | if (res.code == 0) { |
| | | this.$u.toast(res.msg ? res.msg : res.data); |
| | | this.$u.toast('添加成功'); |
| | | setTimeout(() => { |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }); |
| | | }, 1000); |
| | | } else { |
| | | this.$u.toast(res.msg ? res.msg : '未成功添加'); |
| | | } |
| | | console.log('邀请货代', res); |
| | | }); |
| | |
| | | this.$reqPost('bindUserFleet', { fleetId: this.fleetId, name: this.name, phone: this.phone, carNo: this.carNo }, 'params').then(res => { |
| | | console.log('邀请司机', res); |
| | | if (res.code == 0) { |
| | | this.$u.toast(res.data?res.data:'操作成功'); |
| | | this.$u.toast(res.data ? res.data : '操作成功'); |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }); |