| | |
| | | <view class="personal-information-block"> |
| | | <view class="block-main"> |
| | | <view class="huodai"> |
| | | <combined-title title="我的货代" |
| | | <combined-title title="我的承运商" |
| | | @rightText="addHuoDai"> |
| | | <template v-slot:rightText> |
| | | <text>添加</text> |
| | |
| | | <view class="logout"><u-button text="退出登录" |
| | | type="primary" |
| | | @click="logout()"></u-button></view> |
| | | <view class="logout"><u-button text="联系我们" |
| | | type="primary" |
| | | @click="contactUs()"></u-button></view> |
| | | </view> |
| | | <u-toast ref="uToast"></u-toast> |
| | | <!-- 新建车队弹出框 --> |
| | |
| | | @click="addNewGroupClick"></u-button></view> |
| | | </u-popup> |
| | | </view> |
| | | |
| | | <!-- 删除货代模态框 --> |
| | | <!-- 删除承运商模态框 --> |
| | | <view class="deleteHuoDaiModal"> |
| | | <u-modal :show="deleteHuoDaiShow" |
| | | :title="deleteHuoDaiTitle" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { BaseUrl } from '@/api/publicInterface.js' |
| | | import combinedTitle from '@/components/combined-title/combined-title.vue'; |
| | | import { customerId, redirectLogin } from '@/utils/status'; |
| | | export default { |
| | |
| | | options1: [{ |
| | | text: '删除' |
| | | }], |
| | | // 删除货代模态框 |
| | | deleteHuoDaiId: null, // 删除货代id |
| | | // 删除承运商模态框 |
| | | deleteHuoDaiId: null, // 删除承运商id |
| | | deleteHuoDaiShow: false, |
| | | deleteHuoDaiTitle: '', |
| | | deleteHuoDaiContent: '', |
| | |
| | | userEntity: {}, |
| | | initPwdShow: false, |
| | | modifyPwdShow: false, |
| | | passwordModified: '' |
| | | passwordModified: '', |
| | | phoneList:[] |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | this.getAllHuoDaiByCustomerId(); |
| | | this.getFleet(); |
| | | this.getUserEntity(); |
| | | uni.request({ |
| | | url: `${BaseUrl}/admin/dict/page`, |
| | | method: 'GET', |
| | | data: { |
| | | dictType:'Setings' |
| | | }, |
| | | header: { |
| | | Authorization: 'Bearer' + ' ' + uni.getStorageSync('token'), |
| | | clientToc: 'Y', |
| | | 'CLIENT_TOC': 'Y', |
| | | }, |
| | | success: res => { |
| | | let dictId=res.data.data?.records[0].id |
| | | uni.request({ |
| | | url: `${BaseUrl}/admin/dict/item/page`, |
| | | method: 'GET', |
| | | data: { |
| | | dictId:dictId |
| | | }, |
| | | header: { |
| | | Authorization: 'Bearer' + ' ' + uni.getStorageSync('token'), |
| | | clientToc: 'Y', |
| | | 'CLIENT_TOC': 'Y', |
| | | }, |
| | | success: res => { |
| | | res.data.data.records.forEach(item=>{ |
| | | if(item.description.includes('联系')){ |
| | | this.phoneList=item.value.split(',') |
| | | } |
| | | }) |
| | | }, |
| | | fail: err => { |
| | | } |
| | | }) |
| | | }, |
| | | fail: err => { |
| | | } |
| | | }) |
| | | }, |
| | | getUserEntity() { |
| | | uni.showLoading({ |
| | |
| | | this.BuyCardData = res.data; |
| | | }); |
| | | }, |
| | | // 获取货代列表 |
| | | // 获取承运商列表 |
| | | getAllHuoDaiByCustomerId() { |
| | | uni.showLoading({ |
| | | title: '加载中...' |
| | |
| | | this.fleetData = res.data; |
| | | }); |
| | | }, |
| | | // 添加货代 |
| | | // 添加承运商 |
| | | addHuoDai() { |
| | | uni.navigateTo({ |
| | | url: '/pages/customer-page/addTo-freightForwarder-driver/addTo-freightForwarder-driver?role=1' // 1代表的是货代 |
| | | url: '/pages/customer-page/addTo-freightForwarder-driver/addTo-freightForwarder-driver?role=1' // 1代表的是承运商 |
| | | }); |
| | | }, |
| | | // 添加购买证 |
| | |
| | | }); |
| | | this.updateGroupShow = false; |
| | | }, |
| | | // 删除货代 |
| | | // 删除承运商 |
| | | deleteHuoDaiClick(args) { |
| | | console.log(args, '货代id'); |
| | | console.log(args, '承运商id'); |
| | | this.deleteHuoDaiId = args.name; |
| | | this.deleteHuoDaiShow = true; |
| | | this.huoDaiData.forEach(item => { |
| | | if (item.userId == this.deleteHuoDaiId) { |
| | | this.deleteHuoDaiContent = '确认删除货代' + item.name + '吗?'; |
| | | this.deleteHuoDaiContent = '确认删除承运商' + item.name + '吗?'; |
| | | } |
| | | }); |
| | | }, |
| | |
| | | this.getFleet(); |
| | | }); |
| | | }, |
| | | // 货代详情 |
| | | // 承运商详情 |
| | | toFreightForwarderDetails(userId) { |
| | | uni.navigateTo({ |
| | | url: `/pages/customer-page/freight-forwarder-details/freight-forwarder-details?userId=${userId}` |
| | |
| | | logout() { |
| | | this.logoutShow = true; |
| | | }, |
| | | contactUs(){ |
| | | uni.showActionSheet({ |
| | | itemList: this.phoneList, |
| | | success: (res) => { |
| | | uni.makePhoneCall({ |
| | | phoneNumber:this.phoneList[res.tapIndex].split(":")[1] |
| | | }) |
| | | }, |
| | | fail: (err) => { |
| | | console.log('弹窗取消'); |
| | | } |
| | | }); |
| | | }, |
| | | logoutConfirm() { |
| | | redirectLogin(); |
| | | this.$store.commit('changeisLogin', false) |