Commit 1249937f381b9e983d83e109c18bac1f2f87dffe

Authored by guzijian
1 parent fec135c8

feat: 角色信息提示

garbage-removal/src/pages/home/clean/company-detail/index.vue
... ... @@ -36,10 +36,10 @@
36 36 </view>
37 37 <view class="company-content-car-info">
38 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 40 <view class="company-content-car-info-car-list">
41 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 43 </view>
44 44 </view>
45 45 <view class="company-content-remark">
... ...
garbage-removal/src/pages/home/clean/index.vue
... ... @@ -403,10 +403,11 @@ const handleOderSure = () =&gt; {
403 403 if (userType.value === "运输驾驶员") {
404 404 uni.$u.toast("派单成功,请切换成且角色查看订单详情")
405 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 411 } else {
411 412 uni.$u.route({
412 413 type: "redirect",
... ...
garbage-removal/src/pages/home/index.vue
... ... @@ -47,7 +47,7 @@
47 47 :src="item.carParkPanorama ? item.carParkPanorama : 'https://ijry.github.io/uview-plus/h5/assets/logo-8d54bbeb.png'" />
48 48 </view>
49 49 <view class="company-list-item-main-right"
50   - @click="handleDetailClick(item, item.service_phone, userAddress)">
  50 + @click="handleDetailClick(item, item.servicePhone, userAddress)">
51 51 <view class="company-list-item-main-right-name">
52 52 {{ item.name }}
53 53 </view>
... ... @@ -77,11 +77,11 @@
77 77 </view>
78 78 <view class="company-list-item-bottom">
79 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 81 type="success" :hairline="true" shape="circle" text="联系公司"></u-button>
82 82 </view>
83 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 85 :hairline="true" size="normal" shape="circle" text="垃圾清运"></u-button>
86 86 </view>
87 87 </view>
... ...
garbage-removal/src/pages/order/detail/index.vue
... ... @@ -233,8 +233,9 @@ import uqrcode from &#39;@/components/Sansnn-uQRCode_4.0.6/components/uqrcode/uqrcod
233 233 import clashDispatch from '@/components/clash-dispatch/index.vue';
234 234 import zStatic from '@/components/z-paging/js/z-paging-static';
235 235 import { useMainStore } from '@/stores/index.js';
236   -import { onLoad } from '@dcloudio/uni-app';
  236 +import { onLoad, onShow } from '@dcloudio/uni-app';
237 237 import { computed, ref } from 'vue';
  238 +const isOnloadIn = ref(false)
238 239 const clashDispatchRef = ref()
239 240 const personnelList = ref([])
240 241 const store = useMainStore();
... ... @@ -532,20 +533,18 @@ onLoad((options) =&gt; {
532 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 548 </script>
550 549  
551 550 <style lang="scss" scoped>
... ...
garbage-removal/src/pages/order/upload/index.vue
... ... @@ -82,15 +82,12 @@ const handleSubmit = (id, type) =&gt; {
82 82 uploadImageUrlByType(params).then(res => {
83 83 if (res.data.success) {
84 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 14 </view>
15 15 </view>
16 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 19 </view>
20   - <view class="manager-info-parent-company-name">
  20 + <view v-else class="manager-info-parent-company-name">
21 21 未匹配到该手机号绑定的运输公司!
22 22 </view>
23 23 </view>
24 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 27 </view>
28   - <view class="manager-info-parent-company-name">
  28 + <view v-else class="manager-info-parent-company-name">
29 29 未匹配到该手机号绑定运输公司公司服务账号!
30 30 </view>
31 31 </view>
... ... @@ -44,6 +44,7 @@ import { onLoad } from &quot;@dcloudio/uni-app&quot;;
44 44 import { ref } from 'vue';
45 45 const store = useMainStore();
46 46 const userType = ref("居民用户")
  47 +const tempUserType = ref()
47 48 const typeList = ref([{ name: "居民用户" }, { name: "运输驾驶员" }, { name: "企业负责人" }])
48 49 const unitInfo = ref({})
49 50 const radioChange = (e) => {
... ... @@ -71,6 +72,7 @@ const submit = (userType) =&gt; {
71 72 onLoad((options) => {
72 73 unitInfo.value = options
73 74 userType.value = options.userType
  75 + tempUserType.value = options.userType
74 76 // submit(options.userType)
75 77 })
76 78 </script>
... ...
garbage-removal/src/stores/main.js
... ... @@ -30,7 +30,7 @@ export const useMainStore = defineStore(
30 30 export const useMainStoreNoPersist = defineStore(
31 31 "main",
32 32 () => {
33   - const info = ref("hhhh");
  33 + const handleOrderDetail = ref("hhhh");
34 34 return { info };
35 35 }
36 36 );
... ...