Commit ea602bf329d44085a9181144bb8937a5af76f208
1 parent
f654f8b4
feat: 分包,处理个人信息菜单
Showing
24 changed files
with
1448 additions
and
312 deletions
garbage-removal/src/apis/order.js
| @@ -25,7 +25,7 @@ export async function queryOrderTransportDetail(id) { | @@ -25,7 +25,7 @@ export async function queryOrderTransportDetail(id) { | ||
| 25 | */ | 25 | */ |
| 26 | export async function queryOrderList(data) { | 26 | export async function queryOrderList(data) { |
| 27 | return await request.get( | 27 | return await request.get( |
| 28 | - `/order/query/list?type=${data.type}&pageNo=${data.pageNo}&pageSize=${data.pageSize}` | 28 | + `/order/query/list?type=${data.type}${data.evaluateFlag ? '&evaluateFlag='+ data.evaluateFlag : ''}&pageNo=${data.pageNo}&pageSize=${data.pageSize}` |
| 29 | ); | 29 | ); |
| 30 | } | 30 | } |
| 31 | 31 | ||
| @@ -114,3 +114,7 @@ export async function readMessage(data) { | @@ -114,3 +114,7 @@ export async function readMessage(data) { | ||
| 114 | export async function successOrder(data) { | 114 | export async function successOrder(data) { |
| 115 | return await request.put(`/order/update`,data); | 115 | return await request.put(`/order/update`,data); |
| 116 | } | 116 | } |
| 117 | + | ||
| 118 | +export async function queryBadgeByType(type) { | ||
| 119 | + return await request.get(`/order/queryBadgeByType/${type}`); | ||
| 120 | +} |
garbage-removal/src/pages.json
| @@ -16,12 +16,6 @@ | @@ -16,12 +16,6 @@ | ||
| 16 | } | 16 | } |
| 17 | }, | 17 | }, |
| 18 | { | 18 | { |
| 19 | - "path": "pages/wode/choose/index", | ||
| 20 | - "style": { | ||
| 21 | - "navigationBarTitleText": "身份选择" | ||
| 22 | - } | ||
| 23 | - }, | ||
| 24 | - { | ||
| 25 | "path": "pages/login/index", | 19 | "path": "pages/login/index", |
| 26 | "style": { | 20 | "style": { |
| 27 | "navigationBarTitleText": "装饰装修垃圾智慧功能模块登录", | 21 | "navigationBarTitleText": "装饰装修垃圾智慧功能模块登录", |
| @@ -99,7 +93,7 @@ | @@ -99,7 +93,7 @@ | ||
| 99 | "pages":[ | 93 | "pages":[ |
| 100 | 94 | ||
| 101 | { | 95 | { |
| 102 | - "path": "order-handler/transport-detail/index", | 96 | + "path": "order-disposal/transport-detail/index", |
| 103 | "style": { | 97 | "style": { |
| 104 | "navigationBarTitleText": "收运单详情", | 98 | "navigationBarTitleText": "收运单详情", |
| 105 | "enablePullDownRefresh": false, | 99 | "enablePullDownRefresh": false, |
| @@ -108,7 +102,7 @@ | @@ -108,7 +102,7 @@ | ||
| 108 | } | 102 | } |
| 109 | }, | 103 | }, |
| 110 | { | 104 | { |
| 111 | - "path": "order-handler/scan-detail/index", | 105 | + "path": "order-disposal/scan-detail/index", |
| 112 | "style": { | 106 | "style": { |
| 113 | "navigationBarTitleText": "收运单扫描", | 107 | "navigationBarTitleText": "收运单扫描", |
| 114 | "enablePullDownRefresh": false, | 108 | "enablePullDownRefresh": false, |
| @@ -181,6 +175,42 @@ | @@ -181,6 +175,42 @@ | ||
| 181 | } | 175 | } |
| 182 | } | 176 | } |
| 183 | ] | 177 | ] |
| 178 | + }, | ||
| 179 | + { | ||
| 180 | + "root": "pages/wode-info", | ||
| 181 | + "pages" :[{ | ||
| 182 | + "path": "wode-info-other-order/index", | ||
| 183 | + "style": { | ||
| 184 | + "navigationBarTitleText": "我的订单", | ||
| 185 | + "navigationBarTextStyle": "white", | ||
| 186 | + "navigationBarBackgroundColor": "#19a97c", | ||
| 187 | + "enablePullDownRefresh": false | ||
| 188 | + } | ||
| 189 | + }, | ||
| 190 | + { | ||
| 191 | + "path": "wode-info-driver-order/index", | ||
| 192 | + "style": { | ||
| 193 | + "navigationBarTitleText": "我的订单", | ||
| 194 | + "navigationBarTextStyle": "white", | ||
| 195 | + "navigationBarBackgroundColor": "#19a97c", | ||
| 196 | + "enablePullDownRefresh": false | ||
| 197 | + } | ||
| 198 | + }, | ||
| 199 | + { | ||
| 200 | + "path": "wode-info-disposal-order/index", | ||
| 201 | + "style": { | ||
| 202 | + "navigationBarTitleText": "我的订单", | ||
| 203 | + "navigationBarTextStyle": "white", | ||
| 204 | + "navigationBarBackgroundColor": "#19a97c", | ||
| 205 | + "enablePullDownRefresh": false | ||
| 206 | + } | ||
| 207 | + }, | ||
| 208 | + { | ||
| 209 | + "path": "wode-info-choose/index", | ||
| 210 | + "style": { | ||
| 211 | + "navigationBarTitleText": "身份选择" | ||
| 212 | + } | ||
| 213 | + }] | ||
| 184 | }], | 214 | }], |
| 185 | "tabBar": { | 215 | "tabBar": { |
| 186 | "color": "#7A7E83", | 216 | "color": "#7A7E83", |
garbage-removal/src/pages/home/index.vue
| @@ -338,7 +338,7 @@ const handleCleanClick = () => { | @@ -338,7 +338,7 @@ const handleCleanClick = () => { | ||
| 338 | if (res.confirm) { | 338 | if (res.confirm) { |
| 339 | queryRole().then(res => { | 339 | queryRole().then(res => { |
| 340 | uni.$u.route({ | 340 | uni.$u.route({ |
| 341 | - url: `pages/wode/choose/index?ruleVos= ${encodeURIComponent(JSON.stringify(res.data.data.ruleVos))}`, | 341 | + url: `pages/wode-info/wode-info-choose/index?ruleVos= ${encodeURIComponent(JSON.stringify(res.data.data.ruleVos))}`, |
| 342 | }) | 342 | }) |
| 343 | }) | 343 | }) |
| 344 | } else if (res.cancel) { | 344 | } else if (res.cancel) { |
garbage-removal/src/pages/login/code.vue
| @@ -75,7 +75,7 @@ const checkVerifyNum = (code) => { | @@ -75,7 +75,7 @@ const checkVerifyNum = (code) => { | ||
| 75 | verifyFlag.value = false; | 75 | verifyFlag.value = false; |
| 76 | store.tempToken = res.data.data.token | 76 | store.tempToken = res.data.data.token |
| 77 | uni.navigateTo({ | 77 | uni.navigateTo({ |
| 78 | - url: `/pages/wode/choose/index?ruleVos= ${encodeURIComponent(JSON.stringify(res.data.data.ruleVos))}` | 78 | + url: `/pages/wode-info/wode-info-choose/index?ruleVos= ${encodeURIComponent(JSON.stringify(res.data.data.ruleVos))}` |
| 79 | }); | 79 | }); |
| 80 | } else { | 80 | } else { |
| 81 | verifyFlag.value = true; | 81 | verifyFlag.value = true; |
garbage-removal/src/pages/order-info/order-handler/scan-detail/index.vue renamed to garbage-removal/src/pages/order-info/order-disposal/scan-detail/index.vue
garbage-removal/src/pages/order-info/order-handler/transport-detail/index.vue renamed to garbage-removal/src/pages/order-info/order-disposal/transport-detail/index.vue
| @@ -124,7 +124,7 @@ const spaceStr = ref("") | @@ -124,7 +124,7 @@ const spaceStr = ref("") | ||
| 124 | const transportWeightCount = ref(); | 124 | const transportWeightCount = ref(); |
| 125 | const goTransportDetail = (val) => { | 125 | const goTransportDetail = (val) => { |
| 126 | uni.$u.route({ | 126 | uni.$u.route({ |
| 127 | - url: `pages/order-info/order-handler/scan-detail/index` | 127 | + url: `pages/order-info/order-disposal/scan-detail/index` |
| 128 | , params: { | 128 | , params: { |
| 129 | garAskId: val.garAskId | 129 | garAskId: val.garAskId |
| 130 | } | 130 | } |
garbage-removal/src/pages/order/index.vue
| 1 | <template> | 1 | <template> |
| 2 | <view class="container" style="width: 100%;height: 100%;"> | 2 | <view class="container" style="width: 100%;height: 100%;"> |
| 3 | <order-driver v-if="userType == '清运车辆驾驶员'"></order-driver> | 3 | <order-driver v-if="userType == '清运车辆驾驶员'"></order-driver> |
| 4 | - <order-handler v-else-if="userType == '处置场所负责人'"></order-handler> | 4 | + <order-disposal v-else-if="userType == '处置场所负责人'"></order-disposal> |
| 5 | <order-other v-else></order-other> | 5 | <order-other v-else></order-other> |
| 6 | </view> | 6 | </view> |
| 7 | </template> | 7 | </template> |
| 8 | <script setup> | 8 | <script setup> |
| 9 | import { useMainStore } from "@/stores/index.js"; | 9 | import { useMainStore } from "@/stores/index.js"; |
| 10 | import { computed } from 'vue'; | 10 | import { computed } from 'vue'; |
| 11 | +import OrderDisposal from './order-disposal/index.vue'; | ||
| 11 | import OrderDriver from './order-driver/index.vue'; | 12 | import OrderDriver from './order-driver/index.vue'; |
| 12 | -import OrderHandler from './order-handler/index.vue'; | ||
| 13 | import OrderOther from './order-other/index.vue'; | 13 | import OrderOther from './order-other/index.vue'; |
| 14 | const mainStore = useMainStore() | 14 | const mainStore = useMainStore() |
| 15 | const userType = computed(() => mainStore.userType) | 15 | const userType = computed(() => mainStore.userType) |
garbage-removal/src/pages/order/order-handler/index.vue renamed to garbage-removal/src/pages/order/order-disposal/index.vue
| @@ -38,7 +38,7 @@ | @@ -38,7 +38,7 @@ | ||
| 38 | <script setup> | 38 | <script setup> |
| 39 | import { checkCode } from '@/apis/order.js'; | 39 | import { checkCode } from '@/apis/order.js'; |
| 40 | import { onShow } from '@dcloudio/uni-app'; | 40 | import { onShow } from '@dcloudio/uni-app'; |
| 41 | -import { ref } from 'vue'; | 41 | +import { nextTick, ref } from 'vue'; |
| 42 | import swiperListItem from './swiper-list-item/index.vue'; | 42 | import swiperListItem from './swiper-list-item/index.vue'; |
| 43 | const list = ref([{ name: '处理中' }, { name: '已完成' }]) | 43 | const list = ref([{ name: '处理中' }, { name: '已完成' }]) |
| 44 | const current = ref(0); | 44 | const current = ref(0); |
| @@ -71,7 +71,7 @@ const handleScan = () => { | @@ -71,7 +71,7 @@ const handleScan = () => { | ||
| 71 | console.log(res); | 71 | console.log(res); |
| 72 | if (res.data.code == 200) { | 72 | if (res.data.code == 200) { |
| 73 | uni.$u.route({ | 73 | uni.$u.route({ |
| 74 | - url: `pages/order-info/order-handler/scan-detail/index`, | 74 | + url: `pages/order-info/order-disposal/scan-detail/index`, |
| 75 | params: { | 75 | params: { |
| 76 | data: encodeURIComponent(JSON.stringify(res.data.data)) | 76 | data: encodeURIComponent(JSON.stringify(res.data.data)) |
| 77 | } | 77 | } |
| @@ -90,15 +90,18 @@ const handleScan = () => { | @@ -90,15 +90,18 @@ const handleScan = () => { | ||
| 90 | 90 | ||
| 91 | 91 | ||
| 92 | onShow(() => { | 92 | onShow(() => { |
| 93 | - try { | ||
| 94 | - const { height, top } = uni.getMenuButtonBoundingClientRect(); | ||
| 95 | - topMargin.value = top + 'px'; | ||
| 96 | - lightHeight.value = height + 'px'; | ||
| 97 | - } catch (error) { | ||
| 98 | - topMargin.value = '60rpx'; | ||
| 99 | - lightHeight.value = '60rpx' | ||
| 100 | - console.log('There is no menu because the current app is not a small program'); | ||
| 101 | - } | 93 | + console.log("处理场所"); |
| 94 | + nextTick(() => { | ||
| 95 | + try { | ||
| 96 | + const { height, top } = uni.getMenuButtonBoundingClientRect(); | ||
| 97 | + topMargin.value = top + 'px'; | ||
| 98 | + lightHeight.value = height + 'px'; | ||
| 99 | + } catch (error) { | ||
| 100 | + topMargin.value = '60rpx'; | ||
| 101 | + lightHeight.value = '60rpx'; | ||
| 102 | + console.log('There is no menu because the current app is not a small program'); | ||
| 103 | + } | ||
| 104 | + }) | ||
| 102 | }) | 105 | }) |
| 103 | </script> | 106 | </script> |
| 104 | <style lang="scss" scoped> | 107 | <style lang="scss" scoped> |
garbage-removal/src/pages/order/order-handler/swiper-list-item/index.vue renamed to garbage-removal/src/pages/order/order-disposal/swiper-list-item/index.vue
| @@ -47,7 +47,7 @@ const firstLoaded = ref(false) | @@ -47,7 +47,7 @@ const firstLoaded = ref(false) | ||
| 47 | 47 | ||
| 48 | const handleClick = (garOrderId) => { | 48 | const handleClick = (garOrderId) => { |
| 49 | uni.$u.route({ | 49 | uni.$u.route({ |
| 50 | - url: `pages/order-info/order-handler/transport-detail/index`, | 50 | + url: `pages/order-info/order-disposal/transport-detail/index`, |
| 51 | params: { | 51 | params: { |
| 52 | garOrderId | 52 | garOrderId |
| 53 | } | 53 | } |
garbage-removal/src/pages/order/order-driver/index.vue
| @@ -28,7 +28,7 @@ | @@ -28,7 +28,7 @@ | ||
| 28 | </template> | 28 | </template> |
| 29 | <script setup> | 29 | <script setup> |
| 30 | import { onShow } from '@dcloudio/uni-app'; | 30 | import { onShow } from '@dcloudio/uni-app'; |
| 31 | -import { ref } from 'vue'; | 31 | +import { nextTick, ref } from 'vue'; |
| 32 | import swiperListItem from './swiper-list-item/index.vue'; | 32 | import swiperListItem from './swiper-list-item/index.vue'; |
| 33 | const list = ref([{ name: '待清运' }, { name: '清运中' }, { name: '全部' }, { name: '已完成' }]) | 33 | const list = ref([{ name: '待清运' }, { name: '清运中' }, { name: '全部' }, { name: '已完成' }]) |
| 34 | const current = ref(0); | 34 | const current = ref(0); |
| @@ -48,15 +48,18 @@ const translation = (e) => { | @@ -48,15 +48,18 @@ const translation = (e) => { | ||
| 48 | uTabsElement.value.setDx(e.detail.dx) | 48 | uTabsElement.value.setDx(e.detail.dx) |
| 49 | } | 49 | } |
| 50 | onShow(() => { | 50 | onShow(() => { |
| 51 | - try { | ||
| 52 | - const { height, top } = uni.getMenuButtonBoundingClientRect(); | ||
| 53 | - topMargin.value = top + 'px'; | ||
| 54 | - lightHeight.value = height + 'px'; | ||
| 55 | - } catch (error) { | ||
| 56 | - topMargin.value = '60rpx'; | ||
| 57 | - lightHeight.value = '80rpx' | ||
| 58 | - console.log('There is no menu because the current app is not a small program'); | ||
| 59 | - } | 51 | + console.log("驾驶员"); |
| 52 | + nextTick(() => { | ||
| 53 | + try { | ||
| 54 | + const { height, top } = uni.getMenuButtonBoundingClientRect(); | ||
| 55 | + topMargin.value = top + 'px'; | ||
| 56 | + lightHeight.value = height + 'px'; | ||
| 57 | + } catch (error) { | ||
| 58 | + topMargin.value = '60rpx'; | ||
| 59 | + lightHeight.value = '80rpx' | ||
| 60 | + console.log('There is no menu because the current app is not a small program'); | ||
| 61 | + } | ||
| 62 | + }) | ||
| 60 | }) | 63 | }) |
| 61 | </script> | 64 | </script> |
| 62 | <style lang="scss" scoped> | 65 | <style lang="scss" scoped> |
garbage-removal/src/pages/order/order-driver/swiper-list-item/index.vue
| @@ -32,10 +32,10 @@ | @@ -32,10 +32,10 @@ | ||
| 32 | </template> | 32 | </template> |
| 33 | 33 | ||
| 34 | <script setup> | 34 | <script setup> |
| 35 | -import { queryOrderList, updateOrder } from "@/apis/order.js"; | 35 | +import { queryOrderList } from "@/apis/order.js"; |
| 36 | import { useMainStore } from '@/stores/index.js'; | 36 | import { useMainStore } from '@/stores/index.js'; |
| 37 | import { onShow } from "@dcloudio/uni-app"; | 37 | import { onShow } from "@dcloudio/uni-app"; |
| 38 | -import { computed, ref, watch } from 'vue'; | 38 | +import { ref, watch } from 'vue'; |
| 39 | const props = defineProps({ | 39 | const props = defineProps({ |
| 40 | tabIndex: { | 40 | tabIndex: { |
| 41 | type: Number | 41 | type: Number |
| @@ -46,7 +46,6 @@ const props = defineProps({ | @@ -46,7 +46,6 @@ const props = defineProps({ | ||
| 46 | }) | 46 | }) |
| 47 | 47 | ||
| 48 | const store = useMainStore(); | 48 | const store = useMainStore(); |
| 49 | -const userType = computed(() => store.userType) | ||
| 50 | const currentCancelOrderId = ref(""); | 49 | const currentCancelOrderId = ref(""); |
| 51 | const currentCancelName = ref(""); | 50 | const currentCancelName = ref(""); |
| 52 | const cancelShow = ref(false) | 51 | const cancelShow = ref(false) |
| @@ -64,34 +63,6 @@ const goDetail = (val) => { | @@ -64,34 +63,6 @@ const goDetail = (val) => { | ||
| 64 | }) | 63 | }) |
| 65 | } | 64 | } |
| 66 | 65 | ||
| 67 | -const selectClick = (index) => { | ||
| 68 | - currentCancelName.value = index.name; | ||
| 69 | -} | ||
| 70 | -/** | ||
| 71 | - * 提交取消订单 | ||
| 72 | - */ | ||
| 73 | -const submitFunction = (otherReason) => { | ||
| 74 | - let reason = otherReason | ||
| 75 | - if (currentCancelName.value != "其他") { | ||
| 76 | - reason = currentCancelName.value | ||
| 77 | - } | ||
| 78 | - if (!reason) { | ||
| 79 | - uni.$u.toast("请提供取消订单的原因") | ||
| 80 | - return | ||
| 81 | - } | ||
| 82 | - let params = { | ||
| 83 | - garOrderId: currentCancelOrderId.value, | ||
| 84 | - garCancelFlag: 1, | ||
| 85 | - garReason: reason | ||
| 86 | - } | ||
| 87 | - updateOrder(params).then(res => { | ||
| 88 | - if (res.data.success) { | ||
| 89 | - cancelShow.value = false | ||
| 90 | - uni.$u.toast(res.data.data) | ||
| 91 | - paging.value.reload(); | ||
| 92 | - } | ||
| 93 | - }) | ||
| 94 | -} | ||
| 95 | const handleClick = (orderId) => { | 66 | const handleClick = (orderId) => { |
| 96 | uni.$u.route({ | 67 | uni.$u.route({ |
| 97 | url: `pages/order-info/order-driver/detail/index`, | 68 | url: `pages/order-info/order-driver/detail/index`, |
| @@ -101,13 +72,6 @@ const handleClick = (orderId) => { | @@ -101,13 +72,6 @@ const handleClick = (orderId) => { | ||
| 101 | }) | 72 | }) |
| 102 | } | 73 | } |
| 103 | 74 | ||
| 104 | -/** | ||
| 105 | - * 订单评价 | ||
| 106 | - * @param {*} orderId | ||
| 107 | - */ | ||
| 108 | -const handleUserEvaluate = (orderId, userType) => { | ||
| 109 | - uni.$u.route(`pages/order-info/order-other/evaluate/index?orderId=${orderId}&userType=${userType}`) | ||
| 110 | -} | ||
| 111 | // list集合 | 75 | // list集合 |
| 112 | const queryList = (pageNo, pageSize) => { | 76 | const queryList = (pageNo, pageSize) => { |
| 113 | //这里的pageNo和pageSize会自动计算好,直接传给服务器即可 | 77 | //这里的pageNo和pageSize会自动计算好,直接传给服务器即可 |
garbage-removal/src/pages/order/order-other/index.vue
| @@ -35,7 +35,7 @@ | @@ -35,7 +35,7 @@ | ||
| 35 | import { queryOrderMessageCount } from '@/apis/order.js'; | 35 | import { queryOrderMessageCount } from '@/apis/order.js'; |
| 36 | import { useMainStore } from '@/stores/index.js'; | 36 | import { useMainStore } from '@/stores/index.js'; |
| 37 | import { onShow } from '@dcloudio/uni-app'; | 37 | import { onShow } from '@dcloudio/uni-app'; |
| 38 | -import { computed, ref } from 'vue'; | 38 | +import { computed, nextTick, ref } from 'vue'; |
| 39 | import swiperListItem from './swiper-list-item/index.vue'; | 39 | import swiperListItem from './swiper-list-item/index.vue'; |
| 40 | const store = useMainStore(); | 40 | const store = useMainStore(); |
| 41 | const list = ref([{ name: '待清运' }, { name: '清运中' }, { name: '全部' }, { name: '已完成' }]) | 41 | const list = ref([{ name: '待清运' }, { name: '清运中' }, { name: '全部' }, { name: '已完成' }]) |
| @@ -61,15 +61,17 @@ const handlerMessageClick = () => { | @@ -61,15 +61,17 @@ const handlerMessageClick = () => { | ||
| 61 | uni.$u.route("pages/order-info/order-other/user-message/index") | 61 | uni.$u.route("pages/order-info/order-other/user-message/index") |
| 62 | } | 62 | } |
| 63 | onShow(() => { | 63 | onShow(() => { |
| 64 | - try { | ||
| 65 | - const { height, top } = uni.getMenuButtonBoundingClientRect(); | ||
| 66 | - topMargin.value = top + "px"; | ||
| 67 | - lightHeight.value = height + 'px'; | ||
| 68 | - } catch (error) { | ||
| 69 | - topMargin.value = "60rpx"; | ||
| 70 | - lightHeight.value = "60rpx" | ||
| 71 | - console.log("There is no menu because the current app is not a small program"); | ||
| 72 | - } | 64 | + nextTick(() => { |
| 65 | + try { | ||
| 66 | + const { height, top } = uni.getMenuButtonBoundingClientRect(); | ||
| 67 | + topMargin.value = top + "px"; | ||
| 68 | + lightHeight.value = height + 'px'; | ||
| 69 | + } catch (error) { | ||
| 70 | + topMargin.value = "60rpx"; | ||
| 71 | + lightHeight.value = "60rpx" | ||
| 72 | + console.log("There is no menu because the current app is not a small program"); | ||
| 73 | + } | ||
| 74 | + }) | ||
| 73 | }) | 75 | }) |
| 74 | onShow(() => { | 76 | onShow(() => { |
| 75 | if (userType.value == '用户') { | 77 | if (userType.value == '用户') { |
garbage-removal/src/pages/wode/choose/index.vue renamed to garbage-removal/src/pages/wode-info/wode-info-choose/index.vue
| @@ -44,6 +44,10 @@ import { updateUserInfo } from "@/apis/user.js"; | @@ -44,6 +44,10 @@ import { updateUserInfo } from "@/apis/user.js"; | ||
| 44 | import driverImage from "@/static/image/driver.png"; | 44 | import driverImage from "@/static/image/driver.png"; |
| 45 | import handleImage from "@/static/image/handler.png"; | 45 | import handleImage from "@/static/image/handler.png"; |
| 46 | import managerImage from "@/static/image/manager.png"; | 46 | import managerImage from "@/static/image/manager.png"; |
| 47 | +import companyPngUrl from '@/static/image/role/company.png'; | ||
| 48 | +import disposalPngUrl from '@/static/image/role/disposal.png'; | ||
| 49 | +import handlerPngUrl from '@/static/image/role/handler.png'; | ||
| 50 | +import userPngUrl from '@/static/image/role/user.png'; | ||
| 47 | import userImage from "@/static/image/user.png"; | 51 | import userImage from "@/static/image/user.png"; |
| 48 | import { useMainStore } from '@/stores/index.js'; | 52 | import { useMainStore } from '@/stores/index.js'; |
| 49 | import { setRequestToken } from '@/utils/request/request.js'; | 53 | import { setRequestToken } from '@/utils/request/request.js'; |
| @@ -59,7 +63,7 @@ const typeList = ref([{ | @@ -59,7 +63,7 @@ const typeList = ref([{ | ||
| 59 | classStyle: 'choose-type-item-top-back-sky', | 63 | classStyle: 'choose-type-item-top-back-sky', |
| 60 | isNow: false, | 64 | isNow: false, |
| 61 | isExit: true, | 65 | isExit: true, |
| 62 | - imageUrl: import.meta.env.VITE_BASE_URL + "/role/user.png" | 66 | + imageUrl: userPngUrl |
| 63 | }, { | 67 | }, { |
| 64 | label: "运输企业负责人", | 68 | label: "运输企业负责人", |
| 65 | info: '负责订单处理', | 69 | info: '负责订单处理', |
| @@ -69,7 +73,7 @@ const typeList = ref([{ | @@ -69,7 +73,7 @@ const typeList = ref([{ | ||
| 69 | classStyle: 'choose-type-item-top-back-sun', | 73 | classStyle: 'choose-type-item-top-back-sun', |
| 70 | order: 1, | 74 | order: 1, |
| 71 | isNow: false, | 75 | isNow: false, |
| 72 | - imageUrl: import.meta.env.VITE_BASE_URL + "/role/company.png" | 76 | + imageUrl: companyPngUrl |
| 73 | }, { | 77 | }, { |
| 74 | label: "清运车辆驾驶员", | 78 | label: "清运车辆驾驶员", |
| 75 | info: '负责垃圾清运', | 79 | info: '负责垃圾清运', |
| @@ -79,7 +83,7 @@ const typeList = ref([{ | @@ -79,7 +83,7 @@ const typeList = ref([{ | ||
| 79 | classStyle: 'choose-type-item-top-back-blue', | 83 | classStyle: 'choose-type-item-top-back-blue', |
| 80 | order: 2, | 84 | order: 2, |
| 81 | isNow: false, | 85 | isNow: false, |
| 82 | - imageUrl: import.meta.env.VITE_BASE_URL + "/role/handler.png" | 86 | + imageUrl: handlerPngUrl |
| 83 | }, { | 87 | }, { |
| 84 | label: "处置场所负责人", | 88 | label: "处置场所负责人", |
| 85 | info: '负责现场指导', | 89 | info: '负责现场指导', |
| @@ -89,7 +93,7 @@ const typeList = ref([{ | @@ -89,7 +93,7 @@ const typeList = ref([{ | ||
| 89 | classStyle: 'choose-type-item-top-back-pink', | 93 | classStyle: 'choose-type-item-top-back-pink', |
| 90 | order: 3, | 94 | order: 3, |
| 91 | isNow: false, | 95 | isNow: false, |
| 92 | - imageUrl: import.meta.env.VITE_BASE_URL + "/role/disposal.png" | 96 | + imageUrl: disposalPngUrl |
| 93 | }]) | 97 | }]) |
| 94 | const unitInfo = ref([]) | 98 | const unitInfo = ref([]) |
| 95 | const handlerClick = (val) => { | 99 | const handlerClick = (val) => { |
| @@ -184,147 +188,133 @@ onLoad((options) => { | @@ -184,147 +188,133 @@ onLoad((options) => { | ||
| 184 | 188 | ||
| 185 | .choose-type-item { | 189 | .choose-type-item { |
| 186 | width: 100%; | 190 | width: 100%; |
| 187 | - height: 230rpx; | 191 | + height: 200rpx; |
| 188 | // box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.1); | 192 | // box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.1); |
| 189 | margin-bottom: 40rpx; | 193 | margin-bottom: 40rpx; |
| 190 | // border-radius: 15rpx 15rpx 0rpx 0rpx; | 194 | // border-radius: 15rpx 15rpx 0rpx 0rpx; |
| 191 | 195 | ||
| 192 | 196 | ||
| 193 | - .choose-type-item-top-back-blue { | ||
| 194 | - background: linear-gradient(135deg, #a1c4fd, #c2e9fb) !important; | ||
| 195 | - } | ||
| 196 | - | ||
| 197 | - .choose-type-item-top-back-pink { | ||
| 198 | - background: linear-gradient(135deg, #c7e9fb, #a6defa, #80d4f9, #5bc9f8, #35bef7) !important; | ||
| 199 | - } | ||
| 200 | - | ||
| 201 | - .choose-type-item-top-back-sun { | ||
| 202 | - background: linear-gradient(135deg, #f6d365, #fda085) !important; | ||
| 203 | - } | ||
| 204 | - | ||
| 205 | - .choose-type-item-top-back-sky { | ||
| 206 | - background: linear-gradient(135deg, #c2ef8c, #83e455) !important; | ||
| 207 | - } | ||
| 208 | - | ||
| 209 | - .choose-type-item-top { | ||
| 210 | - height: 235rpx; | ||
| 211 | - display: flex; | ||
| 212 | - align-items: center; | ||
| 213 | - box-sizing: border-box; | ||
| 214 | - padding: 30rpx; | ||
| 215 | - border-radius: 15rpx 15rpx 5rpx 5rpx; | ||
| 216 | - box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); | ||
| 217 | - | ||
| 218 | - .choose-type-item-image { | ||
| 219 | - width: 160rpx; | ||
| 220 | - height: 180rpx; | ||
| 221 | - border-radius: 50%; | ||
| 222 | - display: flex; | ||
| 223 | - align-items: center; | ||
| 224 | - justify-content: flex-start; | ||
| 225 | - margin-right: 50rpx; | ||
| 226 | - | ||
| 227 | - image { | ||
| 228 | - width: 100%; | ||
| 229 | - height: 100%; | ||
| 230 | - background-size: 100% 100%; | ||
| 231 | - } | ||
| 232 | - } | ||
| 233 | - | ||
| 234 | - .choose-type-item-text { | ||
| 235 | - width: 100%; | ||
| 236 | - height: 100%; | ||
| 237 | - | ||
| 238 | - .choose-type-item-text-right { | ||
| 239 | - width: 100%; | ||
| 240 | - height: 100%; | ||
| 241 | - display: flex; | ||
| 242 | - flex-direction: column; | ||
| 243 | - align-items: flex-start; | ||
| 244 | - justify-content: space-around; | ||
| 245 | - color: white; | ||
| 246 | - | ||
| 247 | - .choose-type-item-text-right-company { | ||
| 248 | - font-weight: bolder; | ||
| 249 | - font-size: 32rpx; | ||
| 250 | - } | ||
| 251 | - | ||
| 252 | - .choose-type-item-text-right-label { | ||
| 253 | - font-size: 30rpx; | ||
| 254 | - padding: 8rpx 15rpx; | ||
| 255 | - border-radius: 5rpx; | ||
| 256 | - color: $u-info-dark; | ||
| 257 | - font-weight: 600; | ||
| 258 | - margin-bottom: 10rpx; | ||
| 259 | - background: #ffffffad; | ||
| 260 | - border: 3rpx solid white; | ||
| 261 | - } | ||
| 262 | - } | ||
| 263 | - } | ||
| 264 | - | ||
| 265 | - } | ||
| 266 | - | ||
| 267 | - .choose-type-item-bottom { | ||
| 268 | - width: 100%; | ||
| 269 | - height: 35rpx; | ||
| 270 | - box-sizing: border-box; | ||
| 271 | - display: flex; | ||
| 272 | - align-items: center; | ||
| 273 | - justify-content: flex-end; | ||
| 274 | - background: #ffffff; | ||
| 275 | - | ||
| 276 | - .choose-type-item-bottom-button { | ||
| 277 | - font-size: 25rpx; | ||
| 278 | - color: #999999; | ||
| 279 | - display: flex; | ||
| 280 | - } | ||
| 281 | - | ||
| 282 | - .choose-type-item-bottom-button-active { | ||
| 283 | - color: #19a97c !important; | ||
| 284 | - } | ||
| 285 | - } | 197 | + // .choose-type-item-top-back-blue { |
| 198 | + // background: linear-gradient(135deg, #a1c4fd, #c2e9fb) !important; | ||
| 199 | + // } | ||
| 200 | + | ||
| 201 | + // .choose-type-item-top-back-pink { | ||
| 202 | + // background: linear-gradient(135deg, #c7e9fb, #a6defa, #80d4f9, #5bc9f8, #35bef7) !important; | ||
| 203 | + // } | ||
| 204 | + | ||
| 205 | + // .choose-type-item-top-back-sun { | ||
| 206 | + // background: linear-gradient(135deg, #f6d365, #fda085) !important; | ||
| 207 | + // } | ||
| 208 | + | ||
| 209 | + // .choose-type-item-top-back-sky { | ||
| 210 | + // background: linear-gradient(135deg, #c2ef8c, #83e455) !important; | ||
| 211 | + // } | ||
| 212 | + | ||
| 213 | + // .choose-type-item-top { | ||
| 214 | + // height: 235rpx; | ||
| 215 | + // display: flex; | ||
| 216 | + // align-items: center; | ||
| 217 | + // box-sizing: border-box; | ||
| 218 | + // padding: 30rpx; | ||
| 219 | + // border-radius: 15rpx 15rpx 5rpx 5rpx; | ||
| 220 | + // box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); | ||
| 221 | + | ||
| 222 | + // .choose-type-item-image { | ||
| 223 | + // width: 160rpx; | ||
| 224 | + // height: 180rpx; | ||
| 225 | + // border-radius: 50%; | ||
| 226 | + // display: flex; | ||
| 227 | + // align-items: center; | ||
| 228 | + // justify-content: flex-start; | ||
| 229 | + // margin-right: 50rpx; | ||
| 230 | + | ||
| 231 | + // image { | ||
| 232 | + // width: 100%; | ||
| 233 | + // height: 100%; | ||
| 234 | + // background-size: 100% 100%; | ||
| 235 | + // } | ||
| 236 | + // } | ||
| 237 | + | ||
| 238 | + // .choose-type-item-text { | ||
| 239 | + // width: 100%; | ||
| 240 | + // height: 100%; | ||
| 241 | + | ||
| 242 | + // .choose-type-item-text-right { | ||
| 243 | + // width: 100%; | ||
| 244 | + // height: 100%; | ||
| 245 | + // display: flex; | ||
| 246 | + // flex-direction: column; | ||
| 247 | + // align-items: flex-start; | ||
| 248 | + // justify-content: space-around; | ||
| 249 | + // color: white; | ||
| 250 | + | ||
| 251 | + // .choose-type-item-text-right-company { | ||
| 252 | + // font-weight: bolder; | ||
| 253 | + // font-size: 32rpx; | ||
| 254 | + // } | ||
| 255 | + | ||
| 256 | + // .choose-type-item-text-right-label { | ||
| 257 | + // font-size: 30rpx; | ||
| 258 | + // padding: 8rpx 15rpx; | ||
| 259 | + // border-radius: 5rpx; | ||
| 260 | + // color: $u-info-dark; | ||
| 261 | + // font-weight: 600; | ||
| 262 | + // margin-bottom: 10rpx; | ||
| 263 | + // background: #ffffffad; | ||
| 264 | + // border: 3rpx solid white; | ||
| 265 | + // } | ||
| 266 | + // } | ||
| 267 | + // } | ||
| 268 | + | ||
| 269 | + // } | ||
| 270 | + | ||
| 271 | + // .choose-type-item-bottom { | ||
| 272 | + // width: 100%; | ||
| 273 | + // height: 35rpx; | ||
| 274 | + // box-sizing: border-box; | ||
| 275 | + // display: flex; | ||
| 276 | + // align-items: center; | ||
| 277 | + // justify-content: flex-end; | ||
| 278 | + // background: #ffffff; | ||
| 279 | + | ||
| 280 | + // .choose-type-item-bottom-button { | ||
| 281 | + // font-size: 25rpx; | ||
| 282 | + // color: #999999; | ||
| 283 | + // display: flex; | ||
| 284 | + // } | ||
| 285 | + | ||
| 286 | + // .choose-type-item-bottom-button-active { | ||
| 287 | + // color: #19a97c !important; | ||
| 288 | + // } | ||
| 289 | + // } | ||
| 286 | 290 | ||
| 287 | .choose-type-item-img { | 291 | .choose-type-item-img { |
| 288 | width: 100%; | 292 | width: 100%; |
| 289 | - height: 200rpx; | 293 | + height: 100%; |
| 290 | 294 | ||
| 291 | image { | 295 | image { |
| 292 | width: 100%; | 296 | width: 100%; |
| 293 | - height: 200rpx; | 297 | + height: 100%; |
| 298 | + background-size: 100% 100%; | ||
| 294 | } | 299 | } |
| 295 | 300 | ||
| 296 | } | 301 | } |
| 302 | + | ||
| 303 | + | ||
| 297 | } | 304 | } |
| 298 | 305 | ||
| 299 | .itemActive { | 306 | .itemActive { |
| 300 | - animation: overScroll 0.8s forwards ease-in-out; | 307 | + animation: overScroll 0.2s forwards ease-in-out; |
| 301 | } | 308 | } |
| 302 | 309 | ||
| 303 | @keyframes overScroll { | 310 | @keyframes overScroll { |
| 304 | - 0% { | ||
| 305 | - transform: translateY(6rpx); | ||
| 306 | - } | ||
| 307 | - | ||
| 308 | - 20% { | ||
| 309 | - transform: translateY(-2rpx); | ||
| 310 | - } | ||
| 311 | - | ||
| 312 | - 40% { | ||
| 313 | - transform: translateY(6rpx); | ||
| 314 | - } | ||
| 315 | - | ||
| 316 | - 60% { | ||
| 317 | - transform: translateY(-2rpx); | ||
| 318 | - } | ||
| 319 | - | ||
| 320 | - 80% { | ||
| 321 | - transform: translateY(6rpx); | ||
| 322 | - } | ||
| 323 | 311 | ||
| 324 | 100% { | 312 | 100% { |
| 325 | - transform: translateY(0); | 313 | + width: 110%; |
| 314 | + height: 210rpx; | ||
| 326 | } | 315 | } |
| 327 | } | 316 | } |
| 317 | + | ||
| 328 | } | 318 | } |
| 329 | 319 | ||
| 330 | .choose-user-bottom-button-box { | 320 | .choose-user-bottom-button-box { |
garbage-removal/src/pages/wode-info/wode-info-disposal-order/index.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="content-container"> | ||
| 3 | + <z-paging ref="paging" :fixed="false" v-model="dataList" height="100%" @query="queryList"> | ||
| 4 | + <empty-view slot:empty></empty-view> | ||
| 5 | + <view class="page-box"> | ||
| 6 | + <view class="order" v-for="(item, index) in dataList" :key="index"> | ||
| 7 | + <view class="top"> | ||
| 8 | + <view class="left" @click="goDetail(item)"> | ||
| 9 | + <u-icon name="home" :size="30" color="rgb(94,94,94)"></u-icon> | ||
| 10 | + <view class="store">{{ item.garOrderCompanyName }}</view> | ||
| 11 | + <u-icon name="arrow-right" color="rgb(203,203,203)" :size="26"></u-icon> | ||
| 12 | + </view> | ||
| 13 | + </view> | ||
| 14 | + <view class="item" @click="handleClick(item.garOrderId)"> | ||
| 15 | + <view class="content"> | ||
| 16 | + <view class="title u-line-2">{{ item.garOrderAddressDetails }}</view> | ||
| 17 | + <view class="type">垃圾类型: {{ item.garOrderTrashType }}</view> | ||
| 18 | + <view class="delivery-time">创建时间 {{ item.garCreateTime }}</view> | ||
| 19 | + <view class="transport-num">载运量 {{ item.garNowCarCount }} /{{ item.garRealCarCount }}</view> | ||
| 20 | + </view> | ||
| 21 | + </view> | ||
| 22 | + </view> | ||
| 23 | + </view> | ||
| 24 | + </z-paging> | ||
| 25 | + </view> | ||
| 26 | +</template> | ||
| 27 | + | ||
| 28 | +<script setup> | ||
| 29 | +import { queryOrderList } from "@/apis/order.js"; | ||
| 30 | +import { onLoad } from "@dcloudio/uni-app"; | ||
| 31 | +import { ref } from 'vue'; | ||
| 32 | +const type = ref(0); | ||
| 33 | +const evaluateFlag = ref(); | ||
| 34 | + | ||
| 35 | +const dataList = ref([]); | ||
| 36 | +const paging = ref(null); | ||
| 37 | +const firstLoaded = ref(false) | ||
| 38 | + | ||
| 39 | +const handleClick = (garOrderId) => { | ||
| 40 | + uni.$u.route({ | ||
| 41 | + url: `pages/order-info/order-disposal/transport-detail/index`, | ||
| 42 | + params: { | ||
| 43 | + garOrderId | ||
| 44 | + } | ||
| 45 | + }) | ||
| 46 | +} | ||
| 47 | + | ||
| 48 | + | ||
| 49 | +// list集合 | ||
| 50 | +const queryList = (pageNo, pageSize) => { | ||
| 51 | + //这里的pageNo和pageSize会自动计算好,直接传给服务器即可 | ||
| 52 | + //这里的请求只是演示,请替换成自己的项目的网络请求,并在网络请求回调中通过paging.value.complete(请求回来的数组)将请求结果传给z-paging | ||
| 53 | + //request.queryList({ pageNo, pageSize }).then(res => { | ||
| 54 | + //请勿在网络请求回调中给dataList赋值!!只需要调用complete就可以了 | ||
| 55 | + queryOrderList({ type: type.value, pageNo, pageSize }).then((res) => { | ||
| 56 | + paging.value.complete(res.data.data.list); | ||
| 57 | + console.log(res); | ||
| 58 | + firstLoaded.value = true | ||
| 59 | + }).catch(res => { | ||
| 60 | + //如果请求失败写paging.value.complete(false),会自动展示错误页面 | ||
| 61 | + //注意,每次都需要在catch中写这句话很麻烦,z-paging提供了方案可以全局统一处理 | ||
| 62 | + //在底层的网络请求抛出异常时,写uni.$emit('z-paging-error-emit');即可 | ||
| 63 | + paging.value.complete(false); | ||
| 64 | + }) | ||
| 65 | +} | ||
| 66 | +/** | ||
| 67 | + * 跳转公司详情 | ||
| 68 | + * @param {*} val | ||
| 69 | + */ | ||
| 70 | +const goDetail = (val) => { | ||
| 71 | + uni.$u.route({ | ||
| 72 | + url: `pages/home-info/clean/company-detail/index?companyId=${val.garOrderCompanyId}`, | ||
| 73 | + }) | ||
| 74 | +} | ||
| 75 | +onLoad((options) => { | ||
| 76 | + type.value = options.type; | ||
| 77 | + if (options.evaluateFlag) { | ||
| 78 | + evaluateFlag.value = options.evaluateFlag; | ||
| 79 | + } | ||
| 80 | +}) | ||
| 81 | + | ||
| 82 | +</script> | ||
| 83 | + | ||
| 84 | +<style lang="scss" scoped> | ||
| 85 | +.content-container { | ||
| 86 | + height: 100%; | ||
| 87 | + | ||
| 88 | + .order { | ||
| 89 | + width: 90%; | ||
| 90 | + background-color: #ffffff; | ||
| 91 | + margin: 20rpx auto; | ||
| 92 | + border-radius: 20rpx; | ||
| 93 | + box-sizing: border-box; | ||
| 94 | + padding: 20rpx; | ||
| 95 | + font-size: 28rpx; | ||
| 96 | + | ||
| 97 | + &:active { | ||
| 98 | + background-color: #f3f4f6; | ||
| 99 | + opacity: 0.8; | ||
| 100 | + transition: opacity 0.3s; | ||
| 101 | + -webkit-transition: opacity 0.3s; | ||
| 102 | + -moz-transition: opacity 0.3s; | ||
| 103 | + -ms-transition: opacity 0.3s; | ||
| 104 | + } | ||
| 105 | + | ||
| 106 | + .top { | ||
| 107 | + display: flex; | ||
| 108 | + justify-content: space-between; | ||
| 109 | + | ||
| 110 | + .left { | ||
| 111 | + display: flex; | ||
| 112 | + align-items: center; | ||
| 113 | + | ||
| 114 | + .store { | ||
| 115 | + margin: 0 10rpx; | ||
| 116 | + font-size: 32rpx; | ||
| 117 | + font-weight: bold; | ||
| 118 | + } | ||
| 119 | + } | ||
| 120 | + } | ||
| 121 | + | ||
| 122 | + .item { | ||
| 123 | + display: flex; | ||
| 124 | + align-items: center; | ||
| 125 | + margin: 20rpx 0 0; | ||
| 126 | + | ||
| 127 | + .left { | ||
| 128 | + margin-right: 20rpx; | ||
| 129 | + | ||
| 130 | + image { | ||
| 131 | + width: 100rpx; | ||
| 132 | + height: 100rpx; | ||
| 133 | + border-radius: 10rpx; | ||
| 134 | + } | ||
| 135 | + } | ||
| 136 | + | ||
| 137 | + .content { | ||
| 138 | + width: 100%; | ||
| 139 | + | ||
| 140 | + .title { | ||
| 141 | + font-size: 28rpx; | ||
| 142 | + line-height: 50rpx; | ||
| 143 | + } | ||
| 144 | + | ||
| 145 | + .type { | ||
| 146 | + margin: 10rpx 0; | ||
| 147 | + font-size: 24rpx; | ||
| 148 | + color: $u-tips-color; | ||
| 149 | + } | ||
| 150 | + | ||
| 151 | + .delivery-time { | ||
| 152 | + color: $u-tips-color; | ||
| 153 | + font-size: 24rpx; | ||
| 154 | + } | ||
| 155 | + | ||
| 156 | + .transport-num { | ||
| 157 | + font-size: 24rpx; | ||
| 158 | + color: #19a97c; | ||
| 159 | + text-align: end; | ||
| 160 | + } | ||
| 161 | + } | ||
| 162 | + | ||
| 163 | + | ||
| 164 | + } | ||
| 165 | + | ||
| 166 | + .total { | ||
| 167 | + margin-top: 20rpx; | ||
| 168 | + text-align: right; | ||
| 169 | + font-size: 24rpx; | ||
| 170 | + | ||
| 171 | + .total-price { | ||
| 172 | + font-size: 32rpx; | ||
| 173 | + } | ||
| 174 | + } | ||
| 175 | + | ||
| 176 | + .bottom { | ||
| 177 | + display: flex; | ||
| 178 | + margin-top: 20rpx; | ||
| 179 | + padding: 0 10rpx; | ||
| 180 | + justify-content: space-between; | ||
| 181 | + align-items: center; | ||
| 182 | + | ||
| 183 | + .btn { | ||
| 184 | + line-height: 52rpx; | ||
| 185 | + width: 160rpx; | ||
| 186 | + border-radius: 26rpx; | ||
| 187 | + border: 2rpx solid $u-border-color; | ||
| 188 | + font-size: 26rpx; | ||
| 189 | + text-align: center; | ||
| 190 | + color: $u-info-dark; | ||
| 191 | + } | ||
| 192 | + | ||
| 193 | + .btn--hover { | ||
| 194 | + background-color: $u-success-light; | ||
| 195 | + } | ||
| 196 | + | ||
| 197 | + .evaluate { | ||
| 198 | + color: $u-warning-dark; | ||
| 199 | + border-color: $u-warning-dark; | ||
| 200 | + } | ||
| 201 | + } | ||
| 202 | + } | ||
| 203 | + | ||
| 204 | + .centre { | ||
| 205 | + text-align: center; | ||
| 206 | + margin: 200rpx auto; | ||
| 207 | + font-size: 32rpx; | ||
| 208 | + | ||
| 209 | + image { | ||
| 210 | + width: 164rpx; | ||
| 211 | + height: 164rpx; | ||
| 212 | + border-radius: 50%; | ||
| 213 | + margin-bottom: 20rpx; | ||
| 214 | + } | ||
| 215 | + | ||
| 216 | + .tips { | ||
| 217 | + font-size: 24rpx; | ||
| 218 | + color: #999999; | ||
| 219 | + margin-top: 20rpx; | ||
| 220 | + } | ||
| 221 | + | ||
| 222 | + .btn { | ||
| 223 | + margin: 80rpx auto; | ||
| 224 | + width: 200rpx; | ||
| 225 | + border-radius: 32rpx; | ||
| 226 | + line-height: 64rpx; | ||
| 227 | + color: #ffffff; | ||
| 228 | + font-size: 26rpx; | ||
| 229 | + background: linear-gradient(270deg, rgba(249, 116, 90, 1) 0%, rgba(255, 158, 1, 1) 100%); | ||
| 230 | + } | ||
| 231 | + } | ||
| 232 | + | ||
| 233 | +} | ||
| 234 | +</style> |
garbage-removal/src/pages/wode-info/wode-info-driver-order/index.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="content-container"> | ||
| 3 | + <z-paging ref="paging" :fixed="false" v-model="dataList" @query="queryList"> | ||
| 4 | + <empty-view slot:empty></empty-view> | ||
| 5 | + <view class="page-box"> | ||
| 6 | + <view class="order" v-for="(item, index) in dataList" :key="index"> | ||
| 7 | + <view class="top"> | ||
| 8 | + <view class="left" @click="goDetail(item)"> | ||
| 9 | + <u-icon name="home" :size="30" color="rgb(94,94,94)"></u-icon> | ||
| 10 | + <view class="store">{{ item.garOrderCompanyName }}</view> | ||
| 11 | + <u-icon name="arrow-right" color="rgb(203,203,203)" :size="26"></u-icon> | ||
| 12 | + </view> | ||
| 13 | + <view style="display: flex;align-items: center;"> | ||
| 14 | + <view v-if="item.garOrderHandlerStatus === 0 && item.garCancelFlag === 0" class="right">待清运 </view> | ||
| 15 | + <view v-if="item.garOrderHandlerStatus === 1 && item.garCancelFlag === 0" class="right">清运中 </view> | ||
| 16 | + <view v-if="item.garOrderHandlerStatus === 3" class="right">已完成 </view> | ||
| 17 | + </view> | ||
| 18 | + </view> | ||
| 19 | + <view class="item" @click="handleClick(item.garOrderId)"> | ||
| 20 | + <view class="content"> | ||
| 21 | + <view class="title u-line-2">{{ item.garOrderAddress + item.garOrderAddressDetails }}</view> | ||
| 22 | + <view class="type">垃圾类型: {{ item.garOrderTrashType }}</view> | ||
| 23 | + <view class="delivery-time">预约时间 {{ item.garOrderAgreementTime }}</view> | ||
| 24 | + </view> | ||
| 25 | + </view> | ||
| 26 | + </view> | ||
| 27 | + </view> | ||
| 28 | + </z-paging> | ||
| 29 | + </view> | ||
| 30 | +</template> | ||
| 31 | + | ||
| 32 | +<script setup> | ||
| 33 | +import { queryOrderList } from "@/apis/order.js"; | ||
| 34 | +import { onLoad } from '@dcloudio/uni-app'; | ||
| 35 | +import { ref } from 'vue'; | ||
| 36 | +const props = defineProps({ | ||
| 37 | + tabIndex: { | ||
| 38 | + type: Number | ||
| 39 | + }, | ||
| 40 | + currentIndex: { | ||
| 41 | + type: Number | ||
| 42 | + } | ||
| 43 | +}) | ||
| 44 | + | ||
| 45 | +const type = ref(0); | ||
| 46 | +const currentCancelOrderId = ref(""); | ||
| 47 | +const currentCancelName = ref(""); | ||
| 48 | +const cancelShow = ref(false) | ||
| 49 | +const dataList = ref([]); | ||
| 50 | +const paging = ref(null); | ||
| 51 | +const firstLoaded = ref(false) | ||
| 52 | + | ||
| 53 | +/** | ||
| 54 | + * 跳转公司详情 | ||
| 55 | + * @param {*} val | ||
| 56 | + */ | ||
| 57 | +const goDetail = (val) => { | ||
| 58 | + uni.$u.route({ | ||
| 59 | + url: `pages/home-info/clean/company-detail/index?companyId=${val.garOrderCompanyId}`, | ||
| 60 | + }) | ||
| 61 | +} | ||
| 62 | + | ||
| 63 | +const handleClick = (orderId) => { | ||
| 64 | + uni.$u.route({ | ||
| 65 | + url: `pages/order-info/order-driver/detail/index`, | ||
| 66 | + params: { | ||
| 67 | + orderId: orderId | ||
| 68 | + } | ||
| 69 | + }) | ||
| 70 | +} | ||
| 71 | + | ||
| 72 | +// list集合 | ||
| 73 | +const queryList = (pageNo, pageSize) => { | ||
| 74 | + //这里的pageNo和pageSize会自动计算好,直接传给服务器即可 | ||
| 75 | + //这里的请求只是演示,请替换成自己的项目的网络请求,并在网络请求回调中通过paging.value.complete(请求回来的数组)将请求结果传给z-paging | ||
| 76 | + // request.queryList({ pageNo, pageSize }).then(res => { | ||
| 77 | + // //请勿在网络请求回调中给dataList赋值!!只需要调用complete就可以了 | ||
| 78 | + queryOrderList({ type: type.value, pageNo, pageSize }).then((res) => { | ||
| 79 | + paging.value.complete(res.data.data.list); | ||
| 80 | + firstLoaded.value = true | ||
| 81 | + }).catch(res => { | ||
| 82 | + //如果请求失败写paging.value.complete(false),会自动展示错误页面 | ||
| 83 | + //注意,每次都需要在catch中写这句话很麻烦,z-paging提供了方案可以全局统一处理 | ||
| 84 | + //在底层的网络请求抛出异常时,写uni.$emit('z-paging-error-emit');即可 | ||
| 85 | + paging.value.complete(false); | ||
| 86 | + }) | ||
| 87 | +} | ||
| 88 | + | ||
| 89 | +onLoad((options) => { | ||
| 90 | + type.value = options.type; | ||
| 91 | +}) | ||
| 92 | + | ||
| 93 | +</script> | ||
| 94 | + | ||
| 95 | +<style lang="scss" scoped> | ||
| 96 | +.content-container { | ||
| 97 | + height: 100%; | ||
| 98 | + | ||
| 99 | + .order { | ||
| 100 | + width: 90%; | ||
| 101 | + background-color: #ffffff; | ||
| 102 | + margin: 20rpx auto; | ||
| 103 | + border-radius: 20rpx; | ||
| 104 | + box-sizing: border-box; | ||
| 105 | + padding: 20rpx; | ||
| 106 | + font-size: 28rpx; | ||
| 107 | + | ||
| 108 | + &:active { | ||
| 109 | + background-color: #f3f4f6; | ||
| 110 | + opacity: 0.8; | ||
| 111 | + transition: opacity 0.3s; | ||
| 112 | + -webkit-transition: opacity 0.3s; | ||
| 113 | + -moz-transition: opacity 0.3s; | ||
| 114 | + -ms-transition: opacity 0.3s; | ||
| 115 | + } | ||
| 116 | + | ||
| 117 | + .top { | ||
| 118 | + display: flex; | ||
| 119 | + justify-content: space-between; | ||
| 120 | + | ||
| 121 | + .left { | ||
| 122 | + display: flex; | ||
| 123 | + align-items: center; | ||
| 124 | + | ||
| 125 | + .store { | ||
| 126 | + margin: 0 10rpx; | ||
| 127 | + font-size: 32rpx; | ||
| 128 | + font-weight: bold; | ||
| 129 | + } | ||
| 130 | + } | ||
| 131 | + } | ||
| 132 | + | ||
| 133 | + .item { | ||
| 134 | + display: flex; | ||
| 135 | + align-items: center; | ||
| 136 | + margin: 20rpx 0 0; | ||
| 137 | + | ||
| 138 | + .left { | ||
| 139 | + margin-right: 20rpx; | ||
| 140 | + | ||
| 141 | + image { | ||
| 142 | + width: 160rpx; | ||
| 143 | + height: 160rpx; | ||
| 144 | + border-radius: 10rpx; | ||
| 145 | + } | ||
| 146 | + } | ||
| 147 | + | ||
| 148 | + .content { | ||
| 149 | + | ||
| 150 | + .title { | ||
| 151 | + font-size: 28rpx; | ||
| 152 | + line-height: 50rpx; | ||
| 153 | + } | ||
| 154 | + | ||
| 155 | + .type { | ||
| 156 | + margin: 10rpx 0; | ||
| 157 | + font-size: 24rpx; | ||
| 158 | + color: $u-tips-color; | ||
| 159 | + } | ||
| 160 | + | ||
| 161 | + .delivery-time { | ||
| 162 | + color: #e5d001; | ||
| 163 | + font-size: 24rpx; | ||
| 164 | + } | ||
| 165 | + } | ||
| 166 | + | ||
| 167 | + | ||
| 168 | + } | ||
| 169 | + | ||
| 170 | + .total { | ||
| 171 | + margin-top: 20rpx; | ||
| 172 | + text-align: right; | ||
| 173 | + font-size: 24rpx; | ||
| 174 | + | ||
| 175 | + .total-price { | ||
| 176 | + font-size: 32rpx; | ||
| 177 | + } | ||
| 178 | + } | ||
| 179 | + | ||
| 180 | + .bottom { | ||
| 181 | + display: flex; | ||
| 182 | + margin-top: 20rpx; | ||
| 183 | + padding: 0 10rpx; | ||
| 184 | + justify-content: space-between; | ||
| 185 | + align-items: center; | ||
| 186 | + | ||
| 187 | + .btn { | ||
| 188 | + line-height: 52rpx; | ||
| 189 | + width: 160rpx; | ||
| 190 | + border-radius: 26rpx; | ||
| 191 | + border: 2rpx solid $u-border-color; | ||
| 192 | + font-size: 26rpx; | ||
| 193 | + text-align: center; | ||
| 194 | + color: $u-info-dark; | ||
| 195 | + } | ||
| 196 | + | ||
| 197 | + .btn--hover { | ||
| 198 | + background-color: $u-success-light; | ||
| 199 | + } | ||
| 200 | + | ||
| 201 | + .evaluate { | ||
| 202 | + color: $u-warning-dark; | ||
| 203 | + border-color: $u-warning-dark; | ||
| 204 | + } | ||
| 205 | + } | ||
| 206 | + } | ||
| 207 | + | ||
| 208 | + .centre { | ||
| 209 | + text-align: center; | ||
| 210 | + margin: 200rpx auto; | ||
| 211 | + font-size: 32rpx; | ||
| 212 | + | ||
| 213 | + image { | ||
| 214 | + width: 164rpx; | ||
| 215 | + height: 164rpx; | ||
| 216 | + border-radius: 50%; | ||
| 217 | + margin-bottom: 20rpx; | ||
| 218 | + } | ||
| 219 | + | ||
| 220 | + .tips { | ||
| 221 | + font-size: 24rpx; | ||
| 222 | + color: #999999; | ||
| 223 | + margin-top: 20rpx; | ||
| 224 | + } | ||
| 225 | + | ||
| 226 | + .btn { | ||
| 227 | + margin: 80rpx auto; | ||
| 228 | + width: 200rpx; | ||
| 229 | + border-radius: 32rpx; | ||
| 230 | + line-height: 64rpx; | ||
| 231 | + color: #ffffff; | ||
| 232 | + font-size: 26rpx; | ||
| 233 | + background: linear-gradient(270deg, rgba(249, 116, 90, 1) 0%, rgba(255, 158, 1, 1) 100%); | ||
| 234 | + } | ||
| 235 | + } | ||
| 236 | +} | ||
| 237 | +</style> |
garbage-removal/src/pages/wode-info/wode-info-other-order/index.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="content-container"> | ||
| 3 | + <z-paging ref="paging" :fixed="false" v-model="dataList" @query="queryList"> | ||
| 4 | + <empty-view slot:empty></empty-view> | ||
| 5 | + <view class="page-box"> | ||
| 6 | + <view class="order" v-for="(item, index) in dataList" :key="index"> | ||
| 7 | + <view class="top"> | ||
| 8 | + <view class="left" @click="goDetail(item)"> | ||
| 9 | + <u-icon name="home" :size="30" color="rgb(94,94,94)"></u-icon> | ||
| 10 | + <view class="store">{{ item.garOrderCompanyName }}</view> | ||
| 11 | + <u-icon name="arrow-right" color="rgb(203,203,203)" :size="26"></u-icon> | ||
| 12 | + </view> | ||
| 13 | + <view style="display: flex;align-items: center;"> | ||
| 14 | + <view v-if="item.garOrderHandlerStatus === 0 && item.garCancelFlag === 0" class="right">待清运 </view> | ||
| 15 | + <view v-if="item.garCancelFlag === 1" class="right">已取消 </view> | ||
| 16 | + <view v-if="item.garOrderHandlerStatus === 1 && item.garCancelFlag === 0" class="right">清运中 </view> | ||
| 17 | + </view> | ||
| 18 | + <view v-if="item.garEvaluateFlag === 0 && userType === '用户'" class="right">待评价 | ||
| 19 | + </view> | ||
| 20 | + <view v-if="item.garTimeOutFlag === 1" class="right" style="color: red;">超时取消 | ||
| 21 | + </view> | ||
| 22 | + <view v-if="item.garHandlerEvaluateFlag === 0 && userType === '运输企业负责人'" class="right">待评价 | ||
| 23 | + </view> | ||
| 24 | + <view v-if="item.garEvaluateFlag === 1 && userType === '用户'" class="right">已评价 | ||
| 25 | + </view> | ||
| 26 | + <view v-if="item.garHandlerEvaluateFlag === 1 && userType === '运输企业负责人'" class="right">已评价 | ||
| 27 | + </view> | ||
| 28 | + </view> | ||
| 29 | + <view class="item" @click="handleClick(item.garOrderId)"> | ||
| 30 | + <view class="content"> | ||
| 31 | + <view class="title u-line-2">{{ item.garOrderAddress + item.garOrderAddressDetails }}</view> | ||
| 32 | + <view class="type">垃圾类型: {{ item.garOrderTrashType }}</view> | ||
| 33 | + <view class="delivery-time">预约时间 {{ item.garOrderAgreementTime }}</view> | ||
| 34 | + </view> | ||
| 35 | + </view> | ||
| 36 | + <view class="bottom" v-if="item.garOrderHandlerStatus === 0 && item.garCancelFlag === 0"> | ||
| 37 | + <view class="more"> | ||
| 38 | + <!-- <u-icon name="more-dot-fill" color="rgb(203,203,203)"></u-icon> --> | ||
| 39 | + </view> | ||
| 40 | + <view hover-class="btn-hover" class="logistics btn" @click="handleCancelOrder(item.garOrderId)">取消订单</view> | ||
| 41 | + </view> | ||
| 42 | + <!-- 用户对公司评价 --> | ||
| 43 | + <view class="bottom" | ||
| 44 | + v-if="item.garEvaluateFlag === 0 && item.garOrderHandlerStatus === 3 && userType === '用户'"> | ||
| 45 | + <view class="more"> | ||
| 46 | + <!-- <u-icon name="more-dot-fill" color="rgb(203,203,203)"></u-icon> --> | ||
| 47 | + </view> | ||
| 48 | + <view hover-class="btn-hover" class="logistics btn" @click="handleUserEvaluate(item.garOrderId, userType)"> | ||
| 49 | + 去评价 | ||
| 50 | + </view> | ||
| 51 | + </view> | ||
| 52 | + <!-- 公司对用户评价 --> | ||
| 53 | + <view class="bottom" | ||
| 54 | + v-if="item.garHandlerEvaluateFlag === 0 && item.garOrderHandlerStatus === 3 && userType === '运输企业负责人'"> | ||
| 55 | + <view class="more"> | ||
| 56 | + <!-- <u-icon name="more-dot-fill" color="rgb(203,203,203)"></u-icon> --> | ||
| 57 | + </view> | ||
| 58 | + <view hover-class="btn-hover" class="logistics btn" @click="handleUserEvaluate(item.garOrderId, userType)"> | ||
| 59 | + 去评价 | ||
| 60 | + </view> | ||
| 61 | + </view> | ||
| 62 | + </view> | ||
| 63 | + </view> | ||
| 64 | + </z-paging> | ||
| 65 | + <u-action-sheet :closeOnClickOverlay="true" :closeOnClickAction="false" @actionSheetClose="handleClose" | ||
| 66 | + @submitFunction="submitFunction" @select="selectClick" :actions="list" round="15" title="取消订单" :show="cancelShow"> | ||
| 67 | + </u-action-sheet> | ||
| 68 | + </view> | ||
| 69 | +</template> | ||
| 70 | + | ||
| 71 | +<script setup> | ||
| 72 | +import { queryOrderList, updateOrder } from "@/apis/order.js"; | ||
| 73 | +import { useMainStore } from '@/stores/index.js'; | ||
| 74 | +import { onLoad } from "@dcloudio/uni-app"; | ||
| 75 | +import { computed, ref } from 'vue'; | ||
| 76 | +const store = useMainStore(); | ||
| 77 | +const userType = computed(() => store.userType) | ||
| 78 | +const currentCancelOrderId = ref(""); | ||
| 79 | +const currentCancelName = ref(""); | ||
| 80 | +const cancelShow = ref(false); | ||
| 81 | +const type = ref(0); | ||
| 82 | +const evaluateFlag = ref(); | ||
| 83 | +const list = computed(() => { | ||
| 84 | + let reason = [ | ||
| 85 | + { | ||
| 86 | + name: '订单信息填写有误', | ||
| 87 | + }, | ||
| 88 | + { | ||
| 89 | + name: '线下协商有问题', | ||
| 90 | + }, | ||
| 91 | + { | ||
| 92 | + name: '不需要清运了', | ||
| 93 | + }, | ||
| 94 | + { | ||
| 95 | + name: '其他', | ||
| 96 | + }, | ||
| 97 | + { | ||
| 98 | + name: '提交', | ||
| 99 | + } | ||
| 100 | + ] | ||
| 101 | + if (userType.value === '用户') { | ||
| 102 | + reason.unshift({ | ||
| 103 | + name: '长时间无人接单', | ||
| 104 | + }) | ||
| 105 | + } | ||
| 106 | + return reason | ||
| 107 | +}) | ||
| 108 | +const dataList = ref([]); | ||
| 109 | +const paging = ref(null); | ||
| 110 | +const firstLoaded = ref(false) | ||
| 111 | +/** | ||
| 112 | + * 取消订单 | ||
| 113 | + * @param {string} orderId | ||
| 114 | + */ | ||
| 115 | +const handleCancelOrder = (orderId) => { | ||
| 116 | + currentCancelOrderId.value = orderId | ||
| 117 | + cancelShow.value = true | ||
| 118 | +} | ||
| 119 | +const handleClose = (e) => { | ||
| 120 | + cancelShow.value = false | ||
| 121 | +} | ||
| 122 | + | ||
| 123 | +/** | ||
| 124 | + * 跳转公司详情 | ||
| 125 | + * @param {*} val | ||
| 126 | + */ | ||
| 127 | +const goDetail = (val) => { | ||
| 128 | + uni.$u.route({ | ||
| 129 | + url: `pages/home-info/clean/company-detail/index?companyId=${val.garOrderCompanyId}`, | ||
| 130 | + }) | ||
| 131 | +} | ||
| 132 | + | ||
| 133 | +const selectClick = (index) => { | ||
| 134 | + currentCancelName.value = index.name; | ||
| 135 | +} | ||
| 136 | +/** | ||
| 137 | + * 提交取消订单 | ||
| 138 | + */ | ||
| 139 | +const submitFunction = (otherReason) => { | ||
| 140 | + let reason = otherReason | ||
| 141 | + if (currentCancelName.value != "其他") { | ||
| 142 | + reason = currentCancelName.value | ||
| 143 | + } | ||
| 144 | + if (!reason) { | ||
| 145 | + uni.$u.toast("请提供取消订单的原因") | ||
| 146 | + return | ||
| 147 | + } | ||
| 148 | + let params = { | ||
| 149 | + garOrderId: currentCancelOrderId.value, | ||
| 150 | + garCancelFlag: 1, | ||
| 151 | + garReason: reason | ||
| 152 | + } | ||
| 153 | + updateOrder(params).then(res => { | ||
| 154 | + if (res.data.success) { | ||
| 155 | + cancelShow.value = false | ||
| 156 | + uni.$u.toast("取消成功") | ||
| 157 | + paging.value.reload(); | ||
| 158 | + } | ||
| 159 | + }) | ||
| 160 | +} | ||
| 161 | +const handleClick = (orderId) => { | ||
| 162 | + uni.$u.route({ | ||
| 163 | + url: `pages/order-info/order-other/detail/index`, | ||
| 164 | + params: { | ||
| 165 | + orderId: orderId | ||
| 166 | + } | ||
| 167 | + }) | ||
| 168 | +} | ||
| 169 | + | ||
| 170 | +/** | ||
| 171 | + * 订单评价 | ||
| 172 | + * @param {*} orderId | ||
| 173 | + */ | ||
| 174 | +const handleUserEvaluate = (orderId, userType) => { | ||
| 175 | + uni.$u.route(`pages/order-info/order-other/evaluate/index?orderId=${orderId}&userType=${userType}`) | ||
| 176 | +} | ||
| 177 | +// list集合 | ||
| 178 | +const queryList = (pageNo, pageSize) => { | ||
| 179 | + //这里的pageNo和pageSize会自动计算好,直接传给服务器即可 | ||
| 180 | + //这里的请求只是演示,请替换成自己的项目的网络请求,并在网络请求回调中通过paging.value.complete(请求回来的数组)将请求结果传给z-paging | ||
| 181 | + // request.queryList({ pageNo, pageSize }).then(res => { | ||
| 182 | + // //请勿在网络请求回调中给dataList赋值!!只需要调用complete就可以了 | ||
| 183 | + queryOrderList({ type: type.value, evaluateFlag: evaluateFlag.value, pageNo, pageSize }).then((res) => { | ||
| 184 | + paging.value.complete(res.data.data.list); | ||
| 185 | + firstLoaded.value = true | ||
| 186 | + }).catch(res => { | ||
| 187 | + //如果请求失败写paging.value.complete(false),会自动展示错误页面 | ||
| 188 | + //注意,每次都需要在catch中写这句话很麻烦,z-paging提供了方案可以全局统一处理 | ||
| 189 | + //在底层的网络请求抛出异常时,写uni.$emit('z-paging-error-emit');即可 | ||
| 190 | + paging.value.complete(false); | ||
| 191 | + }) | ||
| 192 | +} | ||
| 193 | + | ||
| 194 | +onLoad((options) => { | ||
| 195 | + type.value = options.type; | ||
| 196 | + if (options.evaluateFlag) { | ||
| 197 | + evaluateFlag.value = options.evaluateFlag; | ||
| 198 | + } | ||
| 199 | +}) | ||
| 200 | + | ||
| 201 | +</script> | ||
| 202 | + | ||
| 203 | +<style lang="scss" scoped> | ||
| 204 | +.content-container { | ||
| 205 | + height: 100%; | ||
| 206 | + width: 100%; | ||
| 207 | + | ||
| 208 | + .order { | ||
| 209 | + width: 90%; | ||
| 210 | + background-color: #ffffff; | ||
| 211 | + margin: 20rpx auto; | ||
| 212 | + border-radius: 20rpx; | ||
| 213 | + box-sizing: border-box; | ||
| 214 | + padding: 20rpx; | ||
| 215 | + font-size: 28rpx; | ||
| 216 | + | ||
| 217 | + &:active { | ||
| 218 | + background-color: #f3f4f6; | ||
| 219 | + opacity: 0.8; | ||
| 220 | + transition: opacity 0.3s; | ||
| 221 | + -webkit-transition: opacity 0.3s; | ||
| 222 | + -moz-transition: opacity 0.3s; | ||
| 223 | + -ms-transition: opacity 0.3s; | ||
| 224 | + } | ||
| 225 | + | ||
| 226 | + .top { | ||
| 227 | + display: flex; | ||
| 228 | + justify-content: space-between; | ||
| 229 | + | ||
| 230 | + .left { | ||
| 231 | + display: flex; | ||
| 232 | + align-items: center; | ||
| 233 | + | ||
| 234 | + .store { | ||
| 235 | + margin: 0 10rpx; | ||
| 236 | + font-size: 32rpx; | ||
| 237 | + font-weight: bold; | ||
| 238 | + } | ||
| 239 | + } | ||
| 240 | + } | ||
| 241 | + | ||
| 242 | + .item { | ||
| 243 | + display: flex; | ||
| 244 | + align-items: center; | ||
| 245 | + margin: 20rpx 0 0; | ||
| 246 | + | ||
| 247 | + .left { | ||
| 248 | + margin-right: 20rpx; | ||
| 249 | + | ||
| 250 | + image { | ||
| 251 | + width: 160rpx; | ||
| 252 | + height: 160rpx; | ||
| 253 | + border-radius: 10rpx; | ||
| 254 | + } | ||
| 255 | + } | ||
| 256 | + | ||
| 257 | + .content { | ||
| 258 | + | ||
| 259 | + .title { | ||
| 260 | + font-size: 28rpx; | ||
| 261 | + line-height: 50rpx; | ||
| 262 | + } | ||
| 263 | + | ||
| 264 | + .type { | ||
| 265 | + margin: 10rpx 0; | ||
| 266 | + font-size: 24rpx; | ||
| 267 | + color: $u-tips-color; | ||
| 268 | + } | ||
| 269 | + | ||
| 270 | + .delivery-time { | ||
| 271 | + color: #e5d001; | ||
| 272 | + font-size: 24rpx; | ||
| 273 | + } | ||
| 274 | + } | ||
| 275 | + | ||
| 276 | + | ||
| 277 | + } | ||
| 278 | + | ||
| 279 | + .total { | ||
| 280 | + margin-top: 20rpx; | ||
| 281 | + text-align: right; | ||
| 282 | + font-size: 24rpx; | ||
| 283 | + | ||
| 284 | + .total-price { | ||
| 285 | + font-size: 32rpx; | ||
| 286 | + } | ||
| 287 | + } | ||
| 288 | + | ||
| 289 | + .bottom { | ||
| 290 | + display: flex; | ||
| 291 | + margin-top: 20rpx; | ||
| 292 | + padding: 0 10rpx; | ||
| 293 | + justify-content: space-between; | ||
| 294 | + align-items: center; | ||
| 295 | + | ||
| 296 | + .btn { | ||
| 297 | + line-height: 52rpx; | ||
| 298 | + width: 160rpx; | ||
| 299 | + border-radius: 26rpx; | ||
| 300 | + border: 2rpx solid $u-border-color; | ||
| 301 | + font-size: 26rpx; | ||
| 302 | + text-align: center; | ||
| 303 | + color: $u-info-dark; | ||
| 304 | + } | ||
| 305 | + | ||
| 306 | + .btn--hover { | ||
| 307 | + background-color: $u-success-light; | ||
| 308 | + } | ||
| 309 | + | ||
| 310 | + .evaluate { | ||
| 311 | + color: $u-warning-dark; | ||
| 312 | + border-color: $u-warning-dark; | ||
| 313 | + } | ||
| 314 | + } | ||
| 315 | + } | ||
| 316 | + | ||
| 317 | + .centre { | ||
| 318 | + text-align: center; | ||
| 319 | + margin: 200rpx auto; | ||
| 320 | + font-size: 32rpx; | ||
| 321 | + | ||
| 322 | + image { | ||
| 323 | + width: 164rpx; | ||
| 324 | + height: 164rpx; | ||
| 325 | + border-radius: 50%; | ||
| 326 | + margin-bottom: 20rpx; | ||
| 327 | + } | ||
| 328 | + | ||
| 329 | + .tips { | ||
| 330 | + font-size: 24rpx; | ||
| 331 | + color: #999999; | ||
| 332 | + margin-top: 20rpx; | ||
| 333 | + } | ||
| 334 | + | ||
| 335 | + .btn { | ||
| 336 | + margin: 80rpx auto; | ||
| 337 | + width: 200rpx; | ||
| 338 | + border-radius: 32rpx; | ||
| 339 | + line-height: 64rpx; | ||
| 340 | + color: #ffffff; | ||
| 341 | + font-size: 26rpx; | ||
| 342 | + background: linear-gradient(270deg, rgba(249, 116, 90, 1) 0%, rgba(255, 158, 1, 1) 100%); | ||
| 343 | + } | ||
| 344 | + } | ||
| 345 | +} | ||
| 346 | +</style> |
garbage-removal/src/pages/wode/index.vue
| @@ -14,52 +14,10 @@ | @@ -14,52 +14,10 @@ | ||
| 14 | </view> | 14 | </view> |
| 15 | </view> | 15 | </view> |
| 16 | <view class="order-icon-container"> | 16 | <view class="order-icon-container"> |
| 17 | - <view class="order-icon-btn"> | ||
| 18 | - <view class="order-icon-btn-box" @click="queryMyOrderList()"> | ||
| 19 | - <view class="order-icon-btn-box-img"> | ||
| 20 | - <image :src="orderUrl"></image> | ||
| 21 | - <view class="order-icon-btn-box-img-badge"> | ||
| 22 | - <up-badge max="99" bgColor="#f3a200" :value="messageCount"></up-badge> | ||
| 23 | - </view> | ||
| 24 | - </view> | ||
| 25 | - <view class="order-icon-btn-box-label"> | ||
| 26 | - 我的订单 | ||
| 27 | - </view> | ||
| 28 | - </view> | ||
| 29 | - <view class="order-icon-btn-box" @click="queryNoCleanOrderList"> | ||
| 30 | - <view class="order-icon-btn-box-img"> | ||
| 31 | - <image :src="cleanWaitUrl"></image> | ||
| 32 | - <view class="order-icon-btn-box-img-badge"> | ||
| 33 | - <up-badge max="99" bgColor="#f3a200" :value="messageCount"></up-badge> | ||
| 34 | - </view> | ||
| 35 | - </view> | ||
| 36 | - <view class="order-icon-btn-box-label"> | ||
| 37 | - 待清运 | ||
| 38 | - </view> | ||
| 39 | - </view> | ||
| 40 | - <view class="order-icon-btn-box" @click="queryCleanOrderList"> | ||
| 41 | - <view class="order-icon-btn-box-img"> | ||
| 42 | - <image :src="cleanActiveUrl"></image> | ||
| 43 | - <view class="order-icon-btn-box-img-badge"> | ||
| 44 | - <up-badge max="99" bgColor="#f3a200" :value="messageCount"></up-badge> | ||
| 45 | - </view> | ||
| 46 | - </view> | ||
| 47 | - <view class="order-icon-btn-box-label"> | ||
| 48 | - 清运中 | ||
| 49 | - </view> | ||
| 50 | - </view> | ||
| 51 | - <view class="order-icon-btn-box" @click="queryEvaluateOrderList"> | ||
| 52 | - <view class="order-icon-btn-box-img"> | ||
| 53 | - <image :src="evaluateUrl"></image> | ||
| 54 | - <view class="order-icon-btn-box-img-badge"> | ||
| 55 | - <up-badge max="99" bgColor="#f3a200" :value="messageCount"></up-badge> | ||
| 56 | - </view> | ||
| 57 | - </view> | ||
| 58 | - <view class="order-icon-btn-box-label"> | ||
| 59 | - 待评价 | ||
| 60 | - </view> | ||
| 61 | - </view> | ||
| 62 | - </view> | 17 | + <!-- TODO --> |
| 18 | + <wode-other v-if="userInfo.userType === '用户' || userInfo.userType === '运输企业负责人'"></wode-other> | ||
| 19 | + <wode-driver v-else-if="userInfo.userType === '清运车辆驾驶员'"></wode-driver> | ||
| 20 | + <wode-disposal v-else></wode-disposal> | ||
| 63 | </view> | 21 | </view> |
| 64 | <view class="more-setting-box"> | 22 | <view class="more-setting-box"> |
| 65 | <view class="more-setting-title"> | 23 | <view class="more-setting-title"> |
| @@ -94,18 +52,16 @@ | @@ -94,18 +52,16 @@ | ||
| 94 | </template> | 52 | </template> |
| 95 | 53 | ||
| 96 | <script setup> | 54 | <script setup> |
| 97 | -import { loginOut, queryRole } from "@/apis/user"; | ||
| 98 | -import cleanActiveUrl from '@/static/image/clean-active.png'; | ||
| 99 | -import cleanWaitUrl from '@/static/image/clean-wait.png'; | ||
| 100 | -import evaluateUrl from '@/static/image/evaluate.png'; | ||
| 101 | -import orderUrl from '@/static/image/order.png'; | 55 | +import { loginOut, queryRole } from '@/apis/user'; |
| 102 | import headImg from "@/static/image/st_pic.png"; | 56 | import headImg from "@/static/image/st_pic.png"; |
| 103 | import { useMainStore } from "@/stores/index"; | 57 | import { useMainStore } from "@/stores/index"; |
| 104 | import { setRequestToken } from '@/utils/request/request.js'; | 58 | import { setRequestToken } from '@/utils/request/request.js'; |
| 105 | import { computed, ref } from "vue"; | 59 | import { computed, ref } from "vue"; |
| 60 | +import wodeDisposal from './wode-disposal/index.vue'; | ||
| 61 | +import wodeDriver from './wode-driver/index.vue'; | ||
| 62 | +import wodeOther from './wode-other/index.vue'; | ||
| 106 | const store = useMainStore(); | 63 | const store = useMainStore(); |
| 107 | const pic = ref(headImg) | 64 | const pic = ref(headImg) |
| 108 | -const messageCount = ref(9); | ||
| 109 | const userInfo = computed(() => store.userInfo) | 65 | const userInfo = computed(() => store.userInfo) |
| 110 | const handleAddressManager = () => { | 66 | const handleAddressManager = () => { |
| 111 | uni.$u.route({ | 67 | uni.$u.route({ |
| @@ -113,22 +69,7 @@ const handleAddressManager = () => { | @@ -113,22 +69,7 @@ const handleAddressManager = () => { | ||
| 113 | }) | 69 | }) |
| 114 | } | 70 | } |
| 115 | 71 | ||
| 116 | -const queryMyOrderList = () => { | ||
| 117 | - // TODO 查询我的订单 | ||
| 118 | - // uni.$u.route({ | ||
| 119 | - // url: `pages/order-info/order-other/swiper-list-item/index`, | ||
| 120 | - // }) | ||
| 121 | -} | ||
| 122 | -const queryNoCleanOrderList = () => { | ||
| 123 | - // TODO 查询待清运订单 | ||
| 124 | -} | ||
| 125 | -const queryCleanOrderList = () => { | ||
| 126 | - // TODO 查询清运中订单 | ||
| 127 | -} | ||
| 128 | -const queryEvaluateOrderList = () => { | ||
| 129 | - console.log("queryEvaluateOrderList"); | ||
| 130 | - // TODO 查询待评价订单 | ||
| 131 | -} | 72 | + |
| 132 | const handlerChangeRole = () => { | 73 | const handlerChangeRole = () => { |
| 133 | uni.showModal({ | 74 | uni.showModal({ |
| 134 | title: '提示', | 75 | title: '提示', |
| @@ -138,7 +79,7 @@ const handlerChangeRole = () => { | @@ -138,7 +79,7 @@ const handlerChangeRole = () => { | ||
| 138 | queryRole().then(res => { | 79 | queryRole().then(res => { |
| 139 | if (res.data.success) { | 80 | if (res.data.success) { |
| 140 | uni.$u.route({ | 81 | uni.$u.route({ |
| 141 | - url: `pages/wode/choose/index?ruleVos= ${encodeURIComponent(JSON.stringify(res.data.data.ruleVos))}`, | 82 | + url: `pages/wode-info/wode-info-choose/index?ruleVos= ${encodeURIComponent(JSON.stringify(res.data.data.ruleVos))}`, |
| 142 | }) | 83 | }) |
| 143 | } | 84 | } |
| 144 | }) | 85 | }) |
| @@ -172,6 +113,8 @@ const handleLoginOut = () => { | @@ -172,6 +113,8 @@ const handleLoginOut = () => { | ||
| 172 | } | 113 | } |
| 173 | }); | 114 | }); |
| 174 | } | 115 | } |
| 116 | + | ||
| 117 | + | ||
| 175 | </script> | 118 | </script> |
| 176 | 119 | ||
| 177 | <style lang="scss" scoped> | 120 | <style lang="scss" scoped> |
| @@ -203,45 +146,7 @@ const handleLoginOut = () => { | @@ -203,45 +146,7 @@ const handleLoginOut = () => { | ||
| 203 | padding: 0 30rpx; | 146 | padding: 0 30rpx; |
| 204 | box-sizing: border-box; | 147 | box-sizing: border-box; |
| 205 | 148 | ||
| 206 | - .order-icon-btn { | ||
| 207 | - display: flex; | ||
| 208 | - align-items: center; | ||
| 209 | - justify-content: space-between; | ||
| 210 | - width: 100%; | ||
| 211 | - height: 150rpx; | ||
| 212 | - box-sizing: border-box; | ||
| 213 | - padding: 0 30rpx; | ||
| 214 | - background-color: white; | ||
| 215 | - border-radius: 15rpx; | ||
| 216 | - margin-top: 20rpx; | ||
| 217 | - | ||
| 218 | - .order-icon-btn-box { | ||
| 219 | - display: flex; | ||
| 220 | - flex-direction: column; | ||
| 221 | - align-items: center; | ||
| 222 | - justify-content: center; | ||
| 223 | - color: $u-main-color; | ||
| 224 | - @include handleClick; | ||
| 225 | 149 | ||
| 226 | - .order-icon-btn-box-img { | ||
| 227 | - margin-bottom: 10rpx; | ||
| 228 | - display: flex; | ||
| 229 | - | ||
| 230 | - image { | ||
| 231 | - width: 35rpx; | ||
| 232 | - height: 35rpx; | ||
| 233 | - background-size: 100% 100%; | ||
| 234 | - transform: translate(9rpx, 8rpx) | ||
| 235 | - } | ||
| 236 | - | ||
| 237 | - .order-icon-btn-box-img-badge { | ||
| 238 | - z-index: 9999; | ||
| 239 | - } | ||
| 240 | - } | ||
| 241 | - | ||
| 242 | - .order-icon-btn-box-label {} | ||
| 243 | - } | ||
| 244 | - } | ||
| 245 | } | 150 | } |
| 246 | 151 | ||
| 247 | .more-setting-box { | 152 | .more-setting-box { |
garbage-removal/src/pages/wode/wode-disposal/index.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="order-icon-btn"> | ||
| 3 | + <view class="order-icon-btn-box" @click="querySuccessOrderList"> | ||
| 4 | + <view class="order-icon-btn-box-img"> | ||
| 5 | + <image :src="orderUrl"></image> | ||
| 6 | + <view class="order-icon-btn-box-img-badge"> | ||
| 7 | + <!-- <up-badge max="99" bgColor="#f3a200" :value="messageCount"></up-badge> --> | ||
| 8 | + | ||
| 9 | + </view> | ||
| 10 | + </view> | ||
| 11 | + <view class="order-icon-btn-box-label"> | ||
| 12 | + 已完成 | ||
| 13 | + </view> | ||
| 14 | + </view> | ||
| 15 | + <view class="order-icon-btn-box" @click="queryCleanOrderList"> | ||
| 16 | + <view class="order-icon-btn-box-img"> | ||
| 17 | + <image :src="cleanActiveUrl"></image> | ||
| 18 | + <view class="order-icon-btn-box-img-badge"> | ||
| 19 | + <up-badge max="99" bgColor="#f3a200" :value="cleanBadgeCount"></up-badge> | ||
| 20 | + </view> | ||
| 21 | + </view> | ||
| 22 | + <view class="order-icon-btn-box-label"> | ||
| 23 | + 处理中 | ||
| 24 | + </view> | ||
| 25 | + </view> | ||
| 26 | + </view> | ||
| 27 | +</template> | ||
| 28 | + | ||
| 29 | +<script setup> | ||
| 30 | +import { queryBadgeByType } from "@/apis/order"; | ||
| 31 | +import cleanActiveUrl from '@/static/image/clean-active.png'; | ||
| 32 | +import orderUrl from '@/static/image/order.png'; | ||
| 33 | +import { onShow } from "@dcloudio/uni-app"; | ||
| 34 | +import { ref } from 'vue'; | ||
| 35 | +const cleanBadgeCount = ref(0); | ||
| 36 | +const querySuccessOrderList = () => { | ||
| 37 | + // TODO 查询我的订单 | ||
| 38 | + uni.$u.route({ | ||
| 39 | + url: `pages/wode-info/wode-info-disposal-order/index`, | ||
| 40 | + params: { | ||
| 41 | + type: 3 | ||
| 42 | + } | ||
| 43 | + }) | ||
| 44 | +} | ||
| 45 | +const queryCleanOrderList = () => { | ||
| 46 | + uni.$u.route({ | ||
| 47 | + url: `pages/wode-info/wode-info-disposal-order/index`, | ||
| 48 | + params: { | ||
| 49 | + type: 1 | ||
| 50 | + } | ||
| 51 | + }) | ||
| 52 | +} | ||
| 53 | +const initBadge = () => { | ||
| 54 | + let cleanType = 1; | ||
| 55 | + queryBadgeByType(cleanType).then((res) => { | ||
| 56 | + cleanBadgeCount.value = res.data.data.badge; | ||
| 57 | + }) | ||
| 58 | +} | ||
| 59 | +onShow(() => { | ||
| 60 | + initBadge(); | ||
| 61 | +}) | ||
| 62 | +</script> | ||
| 63 | + | ||
| 64 | +<style lang="scss" scoped> | ||
| 65 | +.order-icon-btn { | ||
| 66 | + display: flex; | ||
| 67 | + align-items: center; | ||
| 68 | + justify-content: space-around; | ||
| 69 | + width: 100%; | ||
| 70 | + height: 150rpx; | ||
| 71 | + box-sizing: border-box; | ||
| 72 | + padding: 0 30rpx; | ||
| 73 | + background-color: white; | ||
| 74 | + border-radius: 15rpx; | ||
| 75 | + margin-top: 20rpx; | ||
| 76 | + | ||
| 77 | + .order-icon-btn-box { | ||
| 78 | + display: flex; | ||
| 79 | + flex-direction: column; | ||
| 80 | + align-items: center; | ||
| 81 | + justify-content: center; | ||
| 82 | + color: $u-main-color; | ||
| 83 | + @include handleClick; | ||
| 84 | + | ||
| 85 | + .order-icon-btn-box-img { | ||
| 86 | + margin-bottom: 20rpx; | ||
| 87 | + display: flex; | ||
| 88 | + font-weight: small; | ||
| 89 | + | ||
| 90 | + image { | ||
| 91 | + width: 45rpx; | ||
| 92 | + height: 45rpx; | ||
| 93 | + background-size: 100% 100%; | ||
| 94 | + transform: translate(9rpx, 8rpx); | ||
| 95 | + } | ||
| 96 | + | ||
| 97 | + .order-icon-btn-box-img-badge { | ||
| 98 | + z-index: 9999; | ||
| 99 | + } | ||
| 100 | + } | ||
| 101 | + | ||
| 102 | + .order-icon-btn-box-label {} | ||
| 103 | + } | ||
| 104 | +} | ||
| 105 | +</style> |
garbage-removal/src/pages/wode/wode-driver/index.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="order-icon-btn"> | ||
| 3 | + <view class="order-icon-btn-box" @click="queryMyOrderList()"> | ||
| 4 | + <view class="order-icon-btn-box-img"> | ||
| 5 | + <image :src="orderUrl"></image> | ||
| 6 | + <view class="order-icon-btn-box-img-badge"> | ||
| 7 | + <!-- <up-badge max="99" bgColor="#f3a200" :value="messageCount"></up-badge> --> | ||
| 8 | + | ||
| 9 | + </view> | ||
| 10 | + </view> | ||
| 11 | + <view class="order-icon-btn-box-label"> | ||
| 12 | + 我的订单 | ||
| 13 | + </view> | ||
| 14 | + </view> | ||
| 15 | + <view class="order-icon-btn-box" @click="queryNoCleanOrderList"> | ||
| 16 | + <view class="order-icon-btn-box-img"> | ||
| 17 | + <image :src="cleanWaitUrl"></image> | ||
| 18 | + <view class="order-icon-btn-box-img-badge"> | ||
| 19 | + <up-badge max="99" bgColor="#f3a200" :value="newBadgeCount"></up-badge> | ||
| 20 | + </view> | ||
| 21 | + </view> | ||
| 22 | + <view class="order-icon-btn-box-label"> | ||
| 23 | + 待清运 | ||
| 24 | + </view> | ||
| 25 | + </view> | ||
| 26 | + <view class="order-icon-btn-box" @click="queryCleanOrderList"> | ||
| 27 | + <view class="order-icon-btn-box-img"> | ||
| 28 | + <image :src="cleanActiveUrl"></image> | ||
| 29 | + <view class="order-icon-btn-box-img-badge"> | ||
| 30 | + <up-badge max="99" bgColor="#f3a200" :value="cleanBadgeCount"></up-badge> | ||
| 31 | + </view> | ||
| 32 | + </view> | ||
| 33 | + <view class="order-icon-btn-box-label"> | ||
| 34 | + 清运中 | ||
| 35 | + </view> | ||
| 36 | + </view> | ||
| 37 | + <view class="order-icon-btn-box" @click="querySuccessOrderList"> | ||
| 38 | + <view class="order-icon-btn-box-img"> | ||
| 39 | + <image :src="evaluateUrl"></image> | ||
| 40 | + <view class="order-icon-btn-box-img-badge"> | ||
| 41 | + | ||
| 42 | + </view> | ||
| 43 | + </view> | ||
| 44 | + <view class="order-icon-btn-box-label"> | ||
| 45 | + 已完成 | ||
| 46 | + </view> | ||
| 47 | + </view> | ||
| 48 | + </view> | ||
| 49 | +</template> | ||
| 50 | + | ||
| 51 | +<script setup> | ||
| 52 | +import { queryBadgeByType } from "@/apis/order"; | ||
| 53 | +import cleanActiveUrl from '@/static/image/clean-active.png'; | ||
| 54 | +import cleanWaitUrl from '@/static/image/clean-wait.png'; | ||
| 55 | +import evaluateUrl from '@/static/image/evaluate.png'; | ||
| 56 | +import orderUrl from '@/static/image/order.png'; | ||
| 57 | +import { onShow } from "@dcloudio/uni-app"; | ||
| 58 | +import { ref } from 'vue'; | ||
| 59 | +const cleanBadgeCount = ref(0); | ||
| 60 | +const newBadgeCount = ref(0); | ||
| 61 | +const queryMyOrderList = () => { | ||
| 62 | + // TODO 查询我的订单 | ||
| 63 | + uni.$u.route({ | ||
| 64 | + url: `pages/wode-info/wode-info-driver-order/index`, | ||
| 65 | + params: { | ||
| 66 | + type: 2 | ||
| 67 | + } | ||
| 68 | + }) | ||
| 69 | +} | ||
| 70 | +const queryNoCleanOrderList = () => { | ||
| 71 | + // TODO 查询待清运订单 | ||
| 72 | + uni.$u.route({ | ||
| 73 | + url: `pages/wode-info/wode-info-driver-order/index`, | ||
| 74 | + params: { | ||
| 75 | + type: 0 | ||
| 76 | + } | ||
| 77 | + }) | ||
| 78 | +} | ||
| 79 | +const queryCleanOrderList = () => { | ||
| 80 | + // TODO 查询清运中订单 | ||
| 81 | + uni.$u.route({ | ||
| 82 | + url: `pages/wode-info/wode-info-driver-order/index`, | ||
| 83 | + params: { | ||
| 84 | + type: 1 | ||
| 85 | + } | ||
| 86 | + }) | ||
| 87 | +} | ||
| 88 | +const querySuccessOrderList = () => { | ||
| 89 | + console.log("querySuccessOrderList"); | ||
| 90 | + uni.$u.route({ | ||
| 91 | + url: `pages/wode-info/wode-info-driver-order/index`, | ||
| 92 | + params: { | ||
| 93 | + type: 3 | ||
| 94 | + } | ||
| 95 | + }) | ||
| 96 | +} | ||
| 97 | +const initBadge = () => { | ||
| 98 | + let newType = 0; | ||
| 99 | + let cleanType = 1; | ||
| 100 | + queryBadgeByType(newType).then((res) => { | ||
| 101 | + newBadgeCount.value = res.data.data.badge; | ||
| 102 | + }) | ||
| 103 | + queryBadgeByType(cleanType).then((res) => { | ||
| 104 | + cleanBadgeCount.value = res.data.data.badge; | ||
| 105 | + }) | ||
| 106 | +} | ||
| 107 | +onShow(() => { | ||
| 108 | + initBadge(); | ||
| 109 | +}) | ||
| 110 | +</script> | ||
| 111 | + | ||
| 112 | +<style lang="scss" scoped> | ||
| 113 | +.order-icon-btn { | ||
| 114 | + display: flex; | ||
| 115 | + align-items: center; | ||
| 116 | + justify-content: space-between; | ||
| 117 | + width: 100%; | ||
| 118 | + height: 150rpx; | ||
| 119 | + box-sizing: border-box; | ||
| 120 | + padding: 0 30rpx; | ||
| 121 | + background-color: white; | ||
| 122 | + border-radius: 15rpx; | ||
| 123 | + margin-top: 20rpx; | ||
| 124 | + | ||
| 125 | + .order-icon-btn-box { | ||
| 126 | + display: flex; | ||
| 127 | + flex-direction: column; | ||
| 128 | + align-items: center; | ||
| 129 | + justify-content: center; | ||
| 130 | + color: $u-main-color; | ||
| 131 | + @include handleClick; | ||
| 132 | + | ||
| 133 | + .order-icon-btn-box-img { | ||
| 134 | + margin-bottom: 20rpx; | ||
| 135 | + display: flex; | ||
| 136 | + font-weight: small; | ||
| 137 | + | ||
| 138 | + image { | ||
| 139 | + width: 45rpx; | ||
| 140 | + height: 45rpx; | ||
| 141 | + background-size: 100% 100%; | ||
| 142 | + transform: translate(9rpx, 8rpx); | ||
| 143 | + } | ||
| 144 | + | ||
| 145 | + .order-icon-btn-box-img-badge { | ||
| 146 | + z-index: 9999; | ||
| 147 | + } | ||
| 148 | + } | ||
| 149 | + | ||
| 150 | + .order-icon-btn-box-label {} | ||
| 151 | + } | ||
| 152 | +} | ||
| 153 | +</style> |
garbage-removal/src/pages/wode/wode-other/index.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="order-icon-btn"> | ||
| 3 | + <view class="order-icon-btn-box" @click="queryMyOrderList()"> | ||
| 4 | + <view class="order-icon-btn-box-img"> | ||
| 5 | + <image :src="orderUrl"></image> | ||
| 6 | + <view class="order-icon-btn-box-img-badge"> | ||
| 7 | + <!-- <up-badge max="99" bgColor="#f3a200" :value="messageCount"></up-badge> --> | ||
| 8 | + | ||
| 9 | + </view> | ||
| 10 | + </view> | ||
| 11 | + <view class="order-icon-btn-box-label"> | ||
| 12 | + 我的订单 | ||
| 13 | + </view> | ||
| 14 | + </view> | ||
| 15 | + <view class="order-icon-btn-box" @click="queryNoCleanOrderList"> | ||
| 16 | + <view class="order-icon-btn-box-img"> | ||
| 17 | + <image :src="cleanWaitUrl"></image> | ||
| 18 | + <view class="order-icon-btn-box-img-badge"> | ||
| 19 | + <up-badge max="99" bgColor="#f3a200" :value="newBadgeCount"></up-badge> | ||
| 20 | + </view> | ||
| 21 | + </view> | ||
| 22 | + <view class="order-icon-btn-box-label"> | ||
| 23 | + 待清运 | ||
| 24 | + </view> | ||
| 25 | + </view> | ||
| 26 | + <view class="order-icon-btn-box" @click="queryCleanOrderList"> | ||
| 27 | + <view class="order-icon-btn-box-img"> | ||
| 28 | + <image :src="cleanActiveUrl"></image> | ||
| 29 | + <view class="order-icon-btn-box-img-badge"> | ||
| 30 | + <up-badge max="99" bgColor="#f3a200" :value="cleanBadgeCount"></up-badge> | ||
| 31 | + </view> | ||
| 32 | + </view> | ||
| 33 | + <view class="order-icon-btn-box-label"> | ||
| 34 | + 清运中 | ||
| 35 | + </view> | ||
| 36 | + </view> | ||
| 37 | + <view class="order-icon-btn-box" @click="queryEvaluateOrderList"> | ||
| 38 | + <view class="order-icon-btn-box-img"> | ||
| 39 | + <image :src="evaluateUrl"></image> | ||
| 40 | + <view class="order-icon-btn-box-img-badge"> | ||
| 41 | + <up-badge max="99" bgColor="#f3a200" :value="evaluateBadgeCount"></up-badge> | ||
| 42 | + </view> | ||
| 43 | + </view> | ||
| 44 | + <view class="order-icon-btn-box-label"> | ||
| 45 | + 待评价 | ||
| 46 | + </view> | ||
| 47 | + </view> | ||
| 48 | + </view> | ||
| 49 | +</template> | ||
| 50 | + | ||
| 51 | +<script setup> | ||
| 52 | +import { queryBadgeByType } from "@/apis/order"; | ||
| 53 | +import cleanActiveUrl from '@/static/image/clean-active.png'; | ||
| 54 | +import cleanWaitUrl from '@/static/image/clean-wait.png'; | ||
| 55 | +import evaluateUrl from '@/static/image/evaluate.png'; | ||
| 56 | +import orderUrl from '@/static/image/order.png'; | ||
| 57 | +import { onShow } from "@dcloudio/uni-app"; | ||
| 58 | +import { ref } from 'vue'; | ||
| 59 | +const evaluateBadgeCount = ref(0); | ||
| 60 | +const cleanBadgeCount = ref(0); | ||
| 61 | +const newBadgeCount = ref(0); | ||
| 62 | +const queryMyOrderList = () => { | ||
| 63 | + // TODO 查询我的订单 | ||
| 64 | + uni.$u.route({ | ||
| 65 | + url: `pages/wode-info/wode-info-other-order/index`, | ||
| 66 | + params: { | ||
| 67 | + type: 2 | ||
| 68 | + } | ||
| 69 | + }) | ||
| 70 | +} | ||
| 71 | +const queryNoCleanOrderList = () => { | ||
| 72 | + // TODO 查询待清运订单 | ||
| 73 | + uni.$u.route({ | ||
| 74 | + url: `pages/wode-info/wode-info-other-order/index`, | ||
| 75 | + params: { | ||
| 76 | + type: 0 | ||
| 77 | + } | ||
| 78 | + }) | ||
| 79 | +} | ||
| 80 | +const queryCleanOrderList = () => { | ||
| 81 | + // TODO 查询清运中订单 | ||
| 82 | + uni.$u.route({ | ||
| 83 | + url: `pages/wode-info/wode-info-other-order/index`, | ||
| 84 | + params: { | ||
| 85 | + type: 1 | ||
| 86 | + } | ||
| 87 | + }) | ||
| 88 | +} | ||
| 89 | +const queryEvaluateOrderList = () => { | ||
| 90 | + console.log("queryEvaluateOrderList"); | ||
| 91 | + // TODO 查询待评价订单 | ||
| 92 | + uni.$u.route({ | ||
| 93 | + url: `pages/wode-info/wode-info-other-order/index`, | ||
| 94 | + params: { | ||
| 95 | + type: 3, | ||
| 96 | + evaluateFlag: 1 | ||
| 97 | + } | ||
| 98 | + }) | ||
| 99 | +} | ||
| 100 | +const initBadge = () => { | ||
| 101 | + let newType = 0; | ||
| 102 | + let cleanType = 1; | ||
| 103 | + let evaluateType = 3; | ||
| 104 | + queryBadgeByType(newType).then((res) => { | ||
| 105 | + newBadgeCount.value = res.data.data.badge; | ||
| 106 | + }) | ||
| 107 | + queryBadgeByType(cleanType).then((res) => { | ||
| 108 | + cleanBadgeCount.value = res.data.data.badge; | ||
| 109 | + }) | ||
| 110 | + queryBadgeByType(evaluateType).then((res) => { | ||
| 111 | + evaluateBadgeCount.value = res.data.data.badge; | ||
| 112 | + }) | ||
| 113 | +} | ||
| 114 | +onShow(() => { | ||
| 115 | + initBadge(); | ||
| 116 | +}) | ||
| 117 | +</script> | ||
| 118 | + | ||
| 119 | +<style lang="scss" scoped> | ||
| 120 | +.order-icon-btn { | ||
| 121 | + display: flex; | ||
| 122 | + align-items: center; | ||
| 123 | + justify-content: space-between; | ||
| 124 | + width: 100%; | ||
| 125 | + height: 150rpx; | ||
| 126 | + box-sizing: border-box; | ||
| 127 | + padding: 0 30rpx; | ||
| 128 | + background-color: white; | ||
| 129 | + border-radius: 15rpx; | ||
| 130 | + margin-top: 20rpx; | ||
| 131 | + | ||
| 132 | + .order-icon-btn-box { | ||
| 133 | + display: flex; | ||
| 134 | + flex-direction: column; | ||
| 135 | + align-items: center; | ||
| 136 | + justify-content: center; | ||
| 137 | + color: $u-main-color; | ||
| 138 | + @include handleClick; | ||
| 139 | + | ||
| 140 | + .order-icon-btn-box-img { | ||
| 141 | + margin-bottom: 20rpx; | ||
| 142 | + display: flex; | ||
| 143 | + font-weight: small; | ||
| 144 | + | ||
| 145 | + image { | ||
| 146 | + width: 45rpx; | ||
| 147 | + height: 45rpx; | ||
| 148 | + background-size: 100% 100%; | ||
| 149 | + transform: translate(9rpx, 8rpx); | ||
| 150 | + } | ||
| 151 | + | ||
| 152 | + .order-icon-btn-box-img-badge { | ||
| 153 | + z-index: 9999; | ||
| 154 | + } | ||
| 155 | + } | ||
| 156 | + | ||
| 157 | + .order-icon-btn-box-label {} | ||
| 158 | + } | ||
| 159 | +} | ||
| 160 | +</style> |
garbage-removal/src/static/image/role/company.png
0 → 100644
9.26 KB
garbage-removal/src/static/image/role/disposal.png
0 → 100644
8.61 KB
garbage-removal/src/static/image/role/handler.png
0 → 100644
9.41 KB
garbage-removal/src/static/image/role/user.png
0 → 100644
7.55 KB