Commit 1249937f381b9e983d83e109c18bac1f2f87dffe
1 parent
fec135c8
feat: 角色信息提示
Showing
7 changed files
with
38 additions
and
39 deletions
garbage-removal/src/pages/home/clean/company-detail/index.vue
| @@ -36,10 +36,10 @@ | @@ -36,10 +36,10 @@ | ||
| 36 | </view> | 36 | </view> |
| 37 | <view class="company-content-car-info"> | 37 | <view class="company-content-car-info"> |
| 38 | <view class="company-content-car-info-title">核准车辆信息</view> | 38 | <view class="company-content-car-info-title">核准车辆信息</view> |
| 39 | - <view class="company-content-car-info-sub-title">车牌号(车型)</view> | 39 | + <view class="company-content-car-info-sub-title">车牌号</view> |
| 40 | <view class="company-content-car-info-car-list"> | 40 | <view class="company-content-car-info-car-list"> |
| 41 | <view v-for="(item, index) in carList" :key="index" class="company-content-car-info-car-list-item"> | 41 | <view v-for="(item, index) in carList" :key="index" class="company-content-car-info-car-list-item"> |
| 42 | - {{ item.carCode }}<text class="car-type">({{ item.carType }})</text> | 42 | + {{ item.carCode }} |
| 43 | </view> | 43 | </view> |
| 44 | </view> | 44 | </view> |
| 45 | <view class="company-content-remark"> | 45 | <view class="company-content-remark"> |
garbage-removal/src/pages/home/clean/index.vue
| @@ -403,10 +403,11 @@ const handleOderSure = () => { | @@ -403,10 +403,11 @@ const handleOderSure = () => { | ||
| 403 | if (userType.value === "运输驾驶员") { | 403 | if (userType.value === "运输驾驶员") { |
| 404 | uni.$u.toast("派单成功,请切换成且角色查看订单详情") | 404 | uni.$u.toast("派单成功,请切换成且角色查看订单详情") |
| 405 | setTimeout(() => { | 405 | setTimeout(() => { |
| 406 | - uni.navigateBack({ | ||
| 407 | - delta: 1, | 406 | + uni.$u.route({ |
| 407 | + type: 'navigateBack', | ||
| 408 | + url: `pages/home/index`, | ||
| 408 | }) | 409 | }) |
| 409 | - }, 50) | 410 | + }, 300) |
| 410 | } else { | 411 | } else { |
| 411 | uni.$u.route({ | 412 | uni.$u.route({ |
| 412 | type: "redirect", | 413 | type: "redirect", |
garbage-removal/src/pages/home/index.vue
| @@ -47,7 +47,7 @@ | @@ -47,7 +47,7 @@ | ||
| 47 | :src="item.carParkPanorama ? item.carParkPanorama : 'https://ijry.github.io/uview-plus/h5/assets/logo-8d54bbeb.png'" /> | 47 | :src="item.carParkPanorama ? item.carParkPanorama : 'https://ijry.github.io/uview-plus/h5/assets/logo-8d54bbeb.png'" /> |
| 48 | </view> | 48 | </view> |
| 49 | <view class="company-list-item-main-right" | 49 | <view class="company-list-item-main-right" |
| 50 | - @click="handleDetailClick(item, item.service_phone, userAddress)"> | 50 | + @click="handleDetailClick(item, item.servicePhone, userAddress)"> |
| 51 | <view class="company-list-item-main-right-name"> | 51 | <view class="company-list-item-main-right-name"> |
| 52 | {{ item.name }} | 52 | {{ item.name }} |
| 53 | </view> | 53 | </view> |
| @@ -77,11 +77,11 @@ | @@ -77,11 +77,11 @@ | ||
| 77 | </view> | 77 | </view> |
| 78 | <view class="company-list-item-bottom"> | 78 | <view class="company-list-item-bottom"> |
| 79 | <view class="company-list-item-bottom-contact-company"> | 79 | <view class="company-list-item-bottom-contact-company"> |
| 80 | - <u-button @click="handleContactClick(item.service_phone)" color="#a9e08f" size="normal" | 80 | + <u-button @click="handleContactClick(item.servicePhone)" color="#a9e08f" size="normal" |
| 81 | type="success" :hairline="true" shape="circle" text="联系公司"></u-button> | 81 | type="success" :hairline="true" shape="circle" text="联系公司"></u-button> |
| 82 | </view> | 82 | </view> |
| 83 | <view class="company-list-item-bottom-button-clean"> | 83 | <view class="company-list-item-bottom-button-clean"> |
| 84 | - <u-button @click="handleCleanGarbage(item, item.service_phone, userAddress)" type="success" | 84 | + <u-button @click="handleCleanGarbage(item, item.servicePhone, userAddress)" type="success" |
| 85 | :hairline="true" size="normal" shape="circle" text="垃圾清运"></u-button> | 85 | :hairline="true" size="normal" shape="circle" text="垃圾清运"></u-button> |
| 86 | </view> | 86 | </view> |
| 87 | </view> | 87 | </view> |
garbage-removal/src/pages/order/detail/index.vue
| @@ -233,8 +233,9 @@ import uqrcode from '@/components/Sansnn-uQRCode_4.0.6/components/uqrcode/uqrcod | @@ -233,8 +233,9 @@ import uqrcode from '@/components/Sansnn-uQRCode_4.0.6/components/uqrcode/uqrcod | ||
| 233 | import clashDispatch from '@/components/clash-dispatch/index.vue'; | 233 | import clashDispatch from '@/components/clash-dispatch/index.vue'; |
| 234 | import zStatic from '@/components/z-paging/js/z-paging-static'; | 234 | import zStatic from '@/components/z-paging/js/z-paging-static'; |
| 235 | import { useMainStore } from '@/stores/index.js'; | 235 | import { useMainStore } from '@/stores/index.js'; |
| 236 | -import { onLoad } from '@dcloudio/uni-app'; | 236 | +import { onLoad, onShow } from '@dcloudio/uni-app'; |
| 237 | import { computed, ref } from 'vue'; | 237 | import { computed, ref } from 'vue'; |
| 238 | +const isOnloadIn = ref(false) | ||
| 238 | const clashDispatchRef = ref() | 239 | const clashDispatchRef = ref() |
| 239 | const personnelList = ref([]) | 240 | const personnelList = ref([]) |
| 240 | const store = useMainStore(); | 241 | const store = useMainStore(); |
| @@ -532,20 +533,18 @@ onLoad((options) => { | @@ -532,20 +533,18 @@ onLoad((options) => { | ||
| 532 | handleOrderDetail(orderId.value) | 533 | handleOrderDetail(orderId.value) |
| 533 | }) | 534 | }) |
| 534 | 535 | ||
| 535 | -// onShow(() => { | ||
| 536 | -// try { | ||
| 537 | -// let pages = getCurrentPages(); | ||
| 538 | -// let currPage = pages[pages.length - 1]; | ||
| 539 | -// if (currPage.__data__.isRefresh) { | ||
| 540 | -// // 重新获取数据 | ||
| 541 | -// this.getData(true)//获取列表数据 | ||
| 542 | -// // 每一次需要清除,否则会参数会缓存 | ||
| 543 | -// currPage.__data__.isRefresh = false | ||
| 544 | -// } | ||
| 545 | -// } catch (error) { | ||
| 546 | -// console.log(error); | ||
| 547 | -// } | ||
| 548 | -// }) | 536 | +onShow(() => { |
| 537 | + | ||
| 538 | + try { | ||
| 539 | + if (isOnloadIn.value) { | ||
| 540 | + handleOrderDetail(orderId.value) | ||
| 541 | + } else { | ||
| 542 | + isOnloadIn.value = true | ||
| 543 | + } | ||
| 544 | + } catch (error) { | ||
| 545 | + console.log(error); | ||
| 546 | + } | ||
| 547 | +}) | ||
| 549 | </script> | 548 | </script> |
| 550 | 549 | ||
| 551 | <style lang="scss" scoped> | 550 | <style lang="scss" scoped> |
garbage-removal/src/pages/order/upload/index.vue
| @@ -82,15 +82,12 @@ const handleSubmit = (id, type) => { | @@ -82,15 +82,12 @@ const handleSubmit = (id, type) => { | ||
| 82 | uploadImageUrlByType(params).then(res => { | 82 | uploadImageUrlByType(params).then(res => { |
| 83 | if (res.data.success) { | 83 | if (res.data.success) { |
| 84 | uni.$u.toast("图片上传完毕!"); | 84 | uni.$u.toast("图片上传完毕!"); |
| 85 | - let pages = getCurrentPages(); | ||
| 86 | - console.log(pages); | ||
| 87 | - uni.navigateBack({ | ||
| 88 | - delta: 1, | ||
| 89 | - success() { | ||
| 90 | - //pages.length-1 即最后一个为当前页,所以取当前页面的上一级 | ||
| 91 | - pages[pages.length - 2].$vm.handleOrderDetail(id); // init 是上一个页面的方法名称 | ||
| 92 | - } | ||
| 93 | - }) | 85 | + setTimeout(() => { |
| 86 | + uni.$u.route({ | ||
| 87 | + type: 'navigateBack', | ||
| 88 | + url: `pages/order/detail/index`, | ||
| 89 | + }) | ||
| 90 | + }, 300) | ||
| 94 | } | 91 | } |
| 95 | }) | 92 | }) |
| 96 | } | 93 | } |
garbage-removal/src/pages/wode/choose/index.vue
| @@ -14,18 +14,18 @@ | @@ -14,18 +14,18 @@ | ||
| 14 | </view> | 14 | </view> |
| 15 | </view> | 15 | </view> |
| 16 | <view class="manager-info" v-if="userType === '运输驾驶员'"> | 16 | <view class="manager-info" v-if="userType === '运输驾驶员'"> |
| 17 | - <view class="manager-info-parent-company-name"> | ||
| 18 | - 长沙有限运输运输公司-运输驾驶员-李伟 | 17 | + <view v-if="tempUserType === '运输驾驶员'" class="manager-info-parent-company-name"> |
| 18 | + {{ unitInfo.transportCompanyName }}运输公司-运输驾驶员 | ||
| 19 | </view> | 19 | </view> |
| 20 | - <view class="manager-info-parent-company-name"> | 20 | + <view v-else class="manager-info-parent-company-name"> |
| 21 | 未匹配到该手机号绑定的运输公司! | 21 | 未匹配到该手机号绑定的运输公司! |
| 22 | </view> | 22 | </view> |
| 23 | </view> | 23 | </view> |
| 24 | <view class="manager-info" v-if="userType === '企业负责人'"> | 24 | <view class="manager-info" v-if="userType === '企业负责人'"> |
| 25 | - <view class="manager-info-parent-company-name"> | ||
| 26 | - 长沙有限运输运输公司公司服务账号! | 25 | + <view v-if="tempUserType === '企业负责人'" class="manager-info-parent-company-name"> |
| 26 | + {{ unitInfo.transportCompanyName }}服务账号 | ||
| 27 | </view> | 27 | </view> |
| 28 | - <view class="manager-info-parent-company-name"> | 28 | + <view v-else class="manager-info-parent-company-name"> |
| 29 | 未匹配到该手机号绑定运输公司公司服务账号! | 29 | 未匹配到该手机号绑定运输公司公司服务账号! |
| 30 | </view> | 30 | </view> |
| 31 | </view> | 31 | </view> |
| @@ -44,6 +44,7 @@ import { onLoad } from "@dcloudio/uni-app"; | @@ -44,6 +44,7 @@ import { onLoad } from "@dcloudio/uni-app"; | ||
| 44 | import { ref } from 'vue'; | 44 | import { ref } from 'vue'; |
| 45 | const store = useMainStore(); | 45 | const store = useMainStore(); |
| 46 | const userType = ref("居民用户") | 46 | const userType = ref("居民用户") |
| 47 | +const tempUserType = ref() | ||
| 47 | const typeList = ref([{ name: "居民用户" }, { name: "运输驾驶员" }, { name: "企业负责人" }]) | 48 | const typeList = ref([{ name: "居民用户" }, { name: "运输驾驶员" }, { name: "企业负责人" }]) |
| 48 | const unitInfo = ref({}) | 49 | const unitInfo = ref({}) |
| 49 | const radioChange = (e) => { | 50 | const radioChange = (e) => { |
| @@ -71,6 +72,7 @@ const submit = (userType) => { | @@ -71,6 +72,7 @@ const submit = (userType) => { | ||
| 71 | onLoad((options) => { | 72 | onLoad((options) => { |
| 72 | unitInfo.value = options | 73 | unitInfo.value = options |
| 73 | userType.value = options.userType | 74 | userType.value = options.userType |
| 75 | + tempUserType.value = options.userType | ||
| 74 | // submit(options.userType) | 76 | // submit(options.userType) |
| 75 | }) | 77 | }) |
| 76 | </script> | 78 | </script> |
garbage-removal/src/stores/main.js
| @@ -30,7 +30,7 @@ export const useMainStore = defineStore( | @@ -30,7 +30,7 @@ export const useMainStore = defineStore( | ||
| 30 | export const useMainStoreNoPersist = defineStore( | 30 | export const useMainStoreNoPersist = defineStore( |
| 31 | "main", | 31 | "main", |
| 32 | () => { | 32 | () => { |
| 33 | - const info = ref("hhhh"); | 33 | + const handleOrderDetail = ref("hhhh"); |
| 34 | return { info }; | 34 | return { info }; |
| 35 | } | 35 | } |
| 36 | ); | 36 | ); |