Commit 90d4fba270751bb16e42920d0579d2fa31857dfe
1 parent
32854707
新增处置场所逻辑
Showing
21 changed files
with
1110 additions
and
232 deletions
garbage-removal/src/apis/order.js
| 1 | 1 | import { request } from "@/utils/request"; |
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | - * @method 保存派单 | |
| 4 | + * @method 保存订单 | |
| 5 | 5 | */ |
| 6 | 6 | export async function saveOrder(params, config) { |
| 7 | 7 | return await request.post(`/order/add`, params, config); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | 10 | /** |
| 11 | - * @method 派单详情 | |
| 11 | + * @method 订单详情 | |
| 12 | 12 | */ |
| 13 | 13 | export async function queryOrderDetail(id) { |
| 14 | 14 | return await request.get(`/order/detail/${id}`); |
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | - * @method 派单列表 | |
| 18 | + * @method 订单列表 | |
| 19 | 19 | */ |
| 20 | 20 | export async function queryOrderList(data) { |
| 21 | 21 | return await request.get( |
| ... | ... | @@ -24,7 +24,7 @@ export async function queryOrderList(data) { |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | /** |
| 27 | - * @method 修改派单状态 | |
| 27 | + * @method 修改订单状态 | |
| 28 | 28 | */ |
| 29 | 29 | export async function updateOrder(params, config) { |
| 30 | 30 | return await request.put(`/order/update`, params, config); |
| ... | ... | @@ -54,7 +54,7 @@ export async function queryGuestOrderDetail(orderId) { |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | - * 查询公司下运输驾驶员 | |
| 57 | + * 查询公司下清运车辆驾驶员 | |
| 58 | 58 | * @param {*} companyId |
| 59 | 59 | */ |
| 60 | 60 | export async function queryOrderDispatch(orderId) { |
| ... | ... | @@ -66,6 +66,14 @@ export async function dispatchOrders(params,config) { |
| 66 | 66 | return await request.put('/order/dispatch', params,config); |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | +export async function dispatchDisposalOrders(params,config) { | |
| 70 | + return await request.put('/order/dispatch/disposal', params,config); | |
| 71 | +} | |
| 72 | + | |
| 69 | 73 | export async function queryOrderHandlerStatus(orderId, config) { |
| 70 | 74 | return await request.get(`/order/queryOrderHandlerStatus/${orderId}`, config); |
| 71 | 75 | } |
| 76 | + | |
| 77 | +export async function queryDisposalDispatch(orderId) { | |
| 78 | + return await request.get(`/order/queryDisposalDispatch/${orderId}`); | |
| 79 | +} | ... | ... |
garbage-removal/src/components/clash-disposal-dispatch/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <next-tree :changeVerify="changeVerify" :title="getTitle" ref="nextTreeRef" :checkStrictly="checkStrictly" | |
| 3 | + :selectParent="selectParent" :multiple="multiple" :treeData="treeData" @cancel="close" @confirm="onconfirm"> | |
| 4 | + </next-tree> | |
| 5 | +</template> | |
| 6 | + | |
| 7 | +<script setup> | |
| 8 | +import { nextTick, ref, unref } from 'vue'; | |
| 9 | +// @ts-ignore | |
| 10 | +import nextTree from '../next-tree/next-tree.vue'; | |
| 11 | +const props = defineProps({ | |
| 12 | + dataList: { | |
| 13 | + type: Array, | |
| 14 | + default: [] | |
| 15 | + }, | |
| 16 | + valueKey: { | |
| 17 | + type: String, | |
| 18 | + default: 'id' | |
| 19 | + }, | |
| 20 | + multiple: { | |
| 21 | + type: Boolean, | |
| 22 | + default: true | |
| 23 | + }, | |
| 24 | + selectParent: { | |
| 25 | + type: Boolean, | |
| 26 | + default: false | |
| 27 | + }, | |
| 28 | + checkStrictly: { | |
| 29 | + type: Boolean, | |
| 30 | + default: false | |
| 31 | + }, | |
| 32 | + onconfirm: { | |
| 33 | + type: Function, | |
| 34 | + default: () => { } | |
| 35 | + } | |
| 36 | + | |
| 37 | +}) | |
| 38 | +const treeData = ref([]) | |
| 39 | +const nextTreeRef = ref() | |
| 40 | +function getTitle(checked) { | |
| 41 | + return `已选:${checked.length}位处置场所负责人` | |
| 42 | +} | |
| 43 | +function changeVerify(current, chooseList) { | |
| 44 | + // 注意:返回非空字符串会阻止原有行为,并提示返回的字符串 | |
| 45 | + // 如果函数体不做return返回值,即验证通过,控件正常处理业务 | |
| 46 | + // 限制条件 | |
| 47 | + if (chooseList) { | |
| 48 | + for (let index = 0; index < chooseList.length; index++) { | |
| 49 | + const element = chooseList[index]; | |
| 50 | + if (current.id.indexOf(element.id) === -1 && element.label.indexOf(current.label) != -1) { | |
| 51 | + return "该处置场所负责人已经被选中了" | |
| 52 | + } | |
| 53 | + } | |
| 54 | + } | |
| 55 | +} | |
| 56 | +function open(dataList) { | |
| 57 | + treeData.value = handlerTreeData(dataList) | |
| 58 | + treeData.value = treeData.value.filter(item => { | |
| 59 | + return item.children[0].id | |
| 60 | + }) | |
| 61 | + setTimeout(() => { | |
| 62 | + nextTick(() => { | |
| 63 | + unref(nextTreeRef).showTree = true | |
| 64 | + }) | |
| 65 | + }, 0) | |
| 66 | +} | |
| 67 | + | |
| 68 | +function handlerTreeData(dataList) { | |
| 69 | + return dataList | |
| 70 | + .map((item, index) => { | |
| 71 | + return { | |
| 72 | + "id": (index + 1), | |
| 73 | + "companyName": item.garOrderDisposalCompanyName, | |
| 74 | + "label": item.garOrderDisposalCompanyName, | |
| 75 | + "children": item.personnelInfo.map((childrenItem, childrenIndex) => { | |
| 76 | + return { | |
| 77 | + "id": (index + 1) + '-' + (childrenIndex + 1), | |
| 78 | + "tel": childrenItem.tel, | |
| 79 | + "name": childrenItem.name, | |
| 80 | + "label": childrenItem.tel, | |
| 81 | + "checked": childrenItem.checked, | |
| 82 | + "disabled": childrenItem.checked ? true : childrenItem.tel ? false : true | |
| 83 | + } | |
| 84 | + }) | |
| 85 | + } | |
| 86 | + }) | |
| 87 | +} | |
| 88 | +function cleanTreeData(treeData) { | |
| 89 | + treeData.map(item => { | |
| 90 | + item.checked = false | |
| 91 | + if (item.children && item.children.length) { | |
| 92 | + cleanTreeData(item.children) | |
| 93 | + } | |
| 94 | + }) | |
| 95 | +} | |
| 96 | +function close() { | |
| 97 | + // 清除treeData的选中状态 | |
| 98 | + cleanTreeData(unref(treeData)) | |
| 99 | +} | |
| 100 | +defineExpose({ | |
| 101 | + open, close, nextTreeRef | |
| 102 | +}) | |
| 103 | +</script> | |
| 104 | +<style lang="scss"> | |
| 105 | +.line-block { | |
| 106 | + display: flex; | |
| 107 | + flex-direction: row; | |
| 108 | + justify-content: flex-start; | |
| 109 | + align-items: center; | |
| 110 | + | |
| 111 | + .img { | |
| 112 | + width: 40rpx; | |
| 113 | + height: 40rpx; | |
| 114 | + border-radius: 10rpx; | |
| 115 | + margin: 0 20rpx; | |
| 116 | + } | |
| 117 | +} | |
| 118 | +</style> | ... | ... |
garbage-removal/src/components/clash-dispatch/index.vue renamed to garbage-removal/src/components/clash-driver-dispatch/index.vue
garbage-removal/src/pages.json
| ... | ... | @@ -33,6 +33,24 @@ |
| 33 | 33 | } |
| 34 | 34 | }, |
| 35 | 35 | { |
| 36 | + "path": "pages/order/handler-home/transport-detail/index", | |
| 37 | + "style": { | |
| 38 | + "navigationBarTitleText": "收运单详情", | |
| 39 | + "enablePullDownRefresh": false, | |
| 40 | + "navigationBarBackgroundColor":"#53c21d", | |
| 41 | + "navigationBarTextStyle": "white" | |
| 42 | + } | |
| 43 | + }, | |
| 44 | + { | |
| 45 | + "path": "pages/order/handler-home/scan-detail/index", | |
| 46 | + "style": { | |
| 47 | + "navigationBarTitleText": "收运单扫描", | |
| 48 | + "enablePullDownRefresh": false, | |
| 49 | + "navigationBarBackgroundColor":"#53c21d", | |
| 50 | + "navigationBarTextStyle": "white" | |
| 51 | + } | |
| 52 | + }, | |
| 53 | + { | |
| 36 | 54 | "path": "pages/login/index", |
| 37 | 55 | "style": { |
| 38 | 56 | "navigationBarTitleText": "装饰装修垃圾智慧功能模块登录", |
| ... | ... | @@ -47,7 +65,7 @@ |
| 47 | 65 | },{ |
| 48 | 66 | "path": "pages/order/other-home/detail/index", |
| 49 | 67 | "style": { |
| 50 | - "navigationBarTitleText": "派单详情", | |
| 68 | + "navigationBarTitleText": "订单详情", | |
| 51 | 69 | "navigationBarTextStyle": "white", |
| 52 | 70 | "navigationBarBackgroundColor": "#53c21d", |
| 53 | 71 | "enablePullDownRefresh": false |
| ... | ... | @@ -55,7 +73,7 @@ |
| 55 | 73 | },{ |
| 56 | 74 | "path": "pages/order/other-home/success/index", |
| 57 | 75 | "style": { |
| 58 | - "navigationBarTitleText": "完成派单", | |
| 76 | + "navigationBarTitleText": "完成订单", | |
| 59 | 77 | "navigationBarTextStyle": "white", |
| 60 | 78 | "navigationBarBackgroundColor": "#53c21d", |
| 61 | 79 | "enablePullDownRefresh": false |
| ... | ... | @@ -134,7 +152,7 @@ |
| 134 | 152 | },{ |
| 135 | 153 | "path": "pages/order/index", |
| 136 | 154 | "style": { |
| 137 | - "navigationBarTitleText": "派单详情", | |
| 155 | + "navigationBarTitleText": "订单详情", | |
| 138 | 156 | "navigationBarTextStyle":"white", |
| 139 | 157 | "navigationBarBackgroundColor":"#53c21d", |
| 140 | 158 | "enablePullDownRefresh": false |
| ... | ... | @@ -162,7 +180,7 @@ |
| 162 | 180 | "pagePath": "pages/order/index", |
| 163 | 181 | "iconPath": "static/tabbar/icon/order.png", |
| 164 | 182 | "selectedIconPath": "static/tabbar/icon/order-green.png", |
| 165 | - "text": "派单" | |
| 183 | + "text": "订单" | |
| 166 | 184 | }, { |
| 167 | 185 | "pagePath": "pages/wode/index", |
| 168 | 186 | "iconPath": "static/tabbar/icon/wode.png", | ... | ... |
garbage-removal/src/pages/home/clean/index.vue
| ... | ... | @@ -174,7 +174,7 @@ |
| 174 | 174 | </view> |
| 175 | 175 | </view> |
| 176 | 176 | <view class="company-clean-bottom-right"> |
| 177 | - <u-button @click="handleOderSure" shape="square" color="#a9e08f" text="立即派单"></u-button> | |
| 177 | + <u-button @click="handleOderSure" shape="square" color="#a9e08f" text="立即订单"></u-button> | |
| 178 | 178 | </view> |
| 179 | 179 | </view> |
| 180 | 180 | </view> |
| ... | ... | @@ -295,15 +295,20 @@ const handlePopupClick = (val) => { |
| 295 | 295 | * 初始化信息 |
| 296 | 296 | */ |
| 297 | 297 | onLoad((options) => { |
| 298 | + initOptions(options); | |
| 299 | +}) | |
| 300 | + | |
| 301 | +const initOptions = async (options) => { | |
| 298 | 302 | companyObj.value = JSON.parse(options.companyObj); |
| 299 | 303 | tel.value = options.tel; |
| 300 | 304 | if (options.userAddress == 'undefined') { |
| 301 | - queryAddress('CURRENT').then(res => { | |
| 305 | + await queryAddress('CURRENT').then(res => { | |
| 302 | 306 | try { |
| 303 | 307 | if (res.data.data && res.data.data[0]) { |
| 304 | 308 | console.log(res); |
| 305 | 309 | userAddress.value = res.data.data[0] ? res.data.data[0] : {} |
| 306 | - console.log(userAddress.value); | |
| 310 | + } else { | |
| 311 | + userAddress.value = {}; | |
| 307 | 312 | } |
| 308 | 313 | } catch (error) { |
| 309 | 314 | userAddress.value = {}; |
| ... | ... | @@ -312,6 +317,14 @@ onLoad((options) => { |
| 312 | 317 | } else { |
| 313 | 318 | userAddress.value = JSON.parse(options.userAddress); |
| 314 | 319 | } |
| 320 | + if (!userAddress.value.garLongitude) { | |
| 321 | + uni.$u.toast("请设置清运地址!") | |
| 322 | + // 返回上级 | |
| 323 | + uni.navigateBack({ | |
| 324 | + delta: 1 | |
| 325 | + }) | |
| 326 | + return | |
| 327 | + } | |
| 315 | 328 | queryCarList({ companyId: companyObj.value.id }).then(res => { |
| 316 | 329 | // 设置车辆类型 |
| 317 | 330 | candidates.value = [[...new Set(res.data.rows |
| ... | ... | @@ -332,7 +345,7 @@ onLoad((options) => { |
| 332 | 345 | paramFrom.value.carType = candidates.value[0][0]; |
| 333 | 346 | garCarLabelInfoNow.value = garCarLabelInfoList.value[paramFrom.value.carType] |
| 334 | 347 | }) |
| 335 | -}) | |
| 348 | +} | |
| 336 | 349 | |
| 337 | 350 | const handleInCarClick = () => { |
| 338 | 351 | paramFrom.value.garInCarStore = !paramFrom.value.garInCarStore |
| ... | ... | @@ -410,17 +423,17 @@ const handleOderSure = () => { |
| 410 | 423 | |
| 411 | 424 | let params = { |
| 412 | 425 | /** |
| 413 | - * 派单地址 | |
| 426 | + * 订单地址 | |
| 414 | 427 | */ |
| 415 | 428 | garOrderAddress: userAddress.value.garUserAddress, |
| 416 | 429 | |
| 417 | 430 | /** |
| 418 | - * 派单详细地址 | |
| 431 | + * 订单详细地址 | |
| 419 | 432 | */ |
| 420 | 433 | garOrderAddressDetails: userAddress.value.garRemark, |
| 421 | 434 | |
| 422 | 435 | /** |
| 423 | - * 派单姓名 | |
| 436 | + * 订单姓名 | |
| 424 | 437 | */ |
| 425 | 438 | garOrderContactName: userAddress.value.garUserContactName, |
| 426 | 439 | garCarInfoList: garCarInfos, |
| ... | ... | @@ -431,7 +444,7 @@ const handleOderSure = () => { |
| 431 | 444 | garOrderTrashType: paramFrom.value.garbageType[0], |
| 432 | 445 | |
| 433 | 446 | /** |
| 434 | - * 派单人电话 | |
| 447 | + * 订单人电话 | |
| 435 | 448 | */ |
| 436 | 449 | garOrderContactTel: userAddress.value.garUserContactTel, |
| 437 | 450 | |
| ... | ... | @@ -473,10 +486,10 @@ const handleOderSure = () => { |
| 473 | 486 | } |
| 474 | 487 | |
| 475 | 488 | saveOrder(params).then(res => { |
| 476 | - // TODO 派单详情 | |
| 489 | + // TODO 订单详情 | |
| 477 | 490 | if (res.data.success) { |
| 478 | - if (userType.value === "运输驾驶员") { | |
| 479 | - uni.$u.toast("派单成功,请切换成且角色查看派单详情") | |
| 491 | + if (userType.value === "清运车辆驾驶员") { | |
| 492 | + uni.$u.toast("订单成功,请切换成且角色查看订单详情") | |
| 480 | 493 | setTimeout(() => { |
| 481 | 494 | uni.$u.route({ |
| 482 | 495 | type: 'navigateBack', | ... | ... |
garbage-removal/src/pages/order/handler-home/index.vue
| ... | ... | @@ -16,12 +16,12 @@ |
| 16 | 16 | <script setup> |
| 17 | 17 | import { ref } from 'vue'; |
| 18 | 18 | import swiperListItem from './swiper-list-item/index.vue'; |
| 19 | -const list = ref([{ name: '待清运' }, { name: '清运中' }, { name: '全部' }, { name: '已完成' }]) | |
| 19 | +const list = ref([{ name: '处理中' }, { name: '已完成' }]) | |
| 20 | 20 | const current = ref(0); |
| 21 | 21 | const swiperCurrent = ref(0); |
| 22 | 22 | const uTabsElement = ref(); |
| 23 | 23 | uni.setNavigationBarTitle({ |
| 24 | - title: "处理场所" | |
| 24 | + title: "处置场所" | |
| 25 | 25 | }) |
| 26 | 26 | const tabsChange = (el) => { |
| 27 | 27 | swiperCurrent.value = Number(el.index) |
| ... | ... | @@ -35,10 +35,6 @@ const translation = (e) => { |
| 35 | 35 | } |
| 36 | 36 | </script> |
| 37 | 37 | <style lang="scss" scoped> |
| 38 | -::v-deep .u-tabs__wrapper__scroll-view { | |
| 39 | - background-color: #53c21d; | |
| 40 | -} | |
| 41 | - | |
| 42 | 38 | .swiper { |
| 43 | 39 | height: 100%; |
| 44 | 40 | background: linear-gradient(to bottom, $u-success-dark, $u-bg-color, $u-bg-color, $u-bg-color, $u-bg-color, $u-bg-color, $u-bg-color); | ... | ... |
garbage-removal/src/pages/order/handler-home/scan-detail/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <view class="scan-detail-container"> | |
| 3 | + <view class="scan-detail-box"> | |
| 4 | + <view class="scan-time"> | |
| 5 | + <view class="scan-label"> | |
| 6 | + 分发时间 | |
| 7 | + </view> | |
| 8 | + <view class="scan-time"> | |
| 9 | + {{ details.scanTime }} | |
| 10 | + </view> | |
| 11 | + <view class="scan-icon"> | |
| 12 | + <up-icon name="calendar" color="#53c21d" size="40"></up-icon> | |
| 13 | + </view> | |
| 14 | + </view> | |
| 15 | + <view class="scan-time"> | |
| 16 | + <view class="scan-label"> | |
| 17 | + 司机姓名 | |
| 18 | + </view> | |
| 19 | + <view class="scan-time"> | |
| 20 | + {{ details.name }} | |
| 21 | + </view> | |
| 22 | + <view class="scan-icon"> | |
| 23 | + <up-icon name="account" color="#53c21d" size="40"></up-icon> | |
| 24 | + </view> | |
| 25 | + </view> | |
| 26 | + <view class="scan-time"> | |
| 27 | + <view class="scan-label"> | |
| 28 | + 司机电话 | |
| 29 | + </view> | |
| 30 | + <view class="scan-time" style="color: #a0cfff"> | |
| 31 | + {{ details.driverTel }} | |
| 32 | + </view> | |
| 33 | + <view class="scan-icon"> | |
| 34 | + <up-icon name="phone" color="#53c21d" size="40"></up-icon> | |
| 35 | + </view> | |
| 36 | + </view> | |
| 37 | + <view class="scan-time"> | |
| 38 | + <view class="scan-label"> | |
| 39 | + 所属公司 | |
| 40 | + </view> | |
| 41 | + <view class="scan-time"> | |
| 42 | + {{ details.companyName }} | |
| 43 | + </view> | |
| 44 | + <view class="scan-icon"> | |
| 45 | + <up-icon name="map" color="#53c21d" size="40"></up-icon> | |
| 46 | + </view> | |
| 47 | + </view> | |
| 48 | + </view> | |
| 49 | + <view class="scan-submit-info"> | |
| 50 | + <view class="scan-submit-title-box"> | |
| 51 | + <up-badge :isDot="true" type="success"></up-badge><text>提交信息</text> | |
| 52 | + </view> | |
| 53 | + <view class="scan-car-num"> | |
| 54 | + <view class="scan-car-num-label"> | |
| 55 | + 车牌号 | |
| 56 | + </view> | |
| 57 | + <view class="scan-car-num-content"> | |
| 58 | + {{ details.carNum }} | |
| 59 | + </view> | |
| 60 | + </view> | |
| 61 | + <view class="scan-upload-fill-image-box"> | |
| 62 | + <view class="scan-upload-fill-image-label"> | |
| 63 | + <view> | |
| 64 | + 全景照片 | |
| 65 | + </view> | |
| 66 | + <view> | |
| 67 | + {{ fileList.length }}/3 | |
| 68 | + </view> | |
| 69 | + </view> | |
| 70 | + <view class="scan-upload-fill-image-btn"> | |
| 71 | + <u-upload :fileList="fileList" @afterRead="afterRead" @delete="deletePic" name="3" multiple :maxCount="3" | |
| 72 | + :previewFullImage="true" width="200" height="150"></u-upload> | |
| 73 | + </view> | |
| 74 | + </view> | |
| 75 | + </view> | |
| 76 | + <view class="scan-submit-button-box"> | |
| 77 | + <view class="scan-submit-button-btn"> | |
| 78 | + <u-button type="primary" @click="handlerSubmit" text="确认"></u-button> | |
| 79 | + </view> | |
| 80 | + </view> | |
| 81 | + </view> | |
| 82 | +</template> | |
| 83 | + | |
| 84 | +<script setup> | |
| 85 | +import { uploadFilePromise } from '@/apis/common.js'; | |
| 86 | +import { ref } from 'vue'; | |
| 87 | +const details = ref({ | |
| 88 | + scanTime: '2022-09-09 12:00:00', | |
| 89 | + carNum: '湘A12345', | |
| 90 | + name: "里斯", | |
| 91 | + driverTel: "13888888888", | |
| 92 | + companyName: "测试公司", | |
| 93 | + fillImageList: [], | |
| 94 | +}) | |
| 95 | +const fileList = ref([]) | |
| 96 | +// 删除图片 | |
| 97 | +const deletePic = (event) => { | |
| 98 | + fileList.value.splice(event.index, 1); | |
| 99 | +}; | |
| 100 | + | |
| 101 | + | |
| 102 | +// 新增图片 | |
| 103 | +const afterRead = async (event) => { | |
| 104 | + // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式 | |
| 105 | + let lists = [].concat(event.file); | |
| 106 | + let fileListLen = fileList.value.length; | |
| 107 | + lists.map((item) => { | |
| 108 | + fileList.value.push({ | |
| 109 | + ...item, | |
| 110 | + status: 'uploading', | |
| 111 | + message: '上传中', | |
| 112 | + }); | |
| 113 | + }); | |
| 114 | + for (let i = 0; i < lists.length; i++) { | |
| 115 | + let requestPath = import.meta.env.VITE_BASE_URL + import.meta.env.VITE_BASE_FILE_UPLOAD_PREFIX; | |
| 116 | + const result = await uploadFilePromise(requestPath, lists[i].url); | |
| 117 | + let item = fileList.value[fileListLen]; | |
| 118 | + fileList.value.splice(fileListLen, 1, { | |
| 119 | + ...item, | |
| 120 | + status: 'success', | |
| 121 | + message: '', | |
| 122 | + url: result.data.fileName, | |
| 123 | + }); | |
| 124 | + fileListLen++; | |
| 125 | + } | |
| 126 | +}; | |
| 127 | +const handlerSubmit = () => { | |
| 128 | + console.log("确认提交"); | |
| 129 | + uni.$u.toast("确认提交了") | |
| 130 | +} | |
| 131 | +</script> | |
| 132 | + | |
| 133 | +<style lang="scss" scoped> | |
| 134 | +$l-h-8: 80rpx; | |
| 135 | + | |
| 136 | +.scan-detail-container { | |
| 137 | + width: 100%; | |
| 138 | + height: 100%; | |
| 139 | + box-sizing: border-box; | |
| 140 | + padding: 20rpx; | |
| 141 | + | |
| 142 | + .scan-detail-box { | |
| 143 | + background-color: white; | |
| 144 | + margin-bottom: 40rpx; | |
| 145 | + color: $u-main-color; | |
| 146 | + | |
| 147 | + .scan-time { | |
| 148 | + display: flex; | |
| 149 | + width: 100%; | |
| 150 | + // 底部阴影 向内发散 | |
| 151 | + border-bottom: 1rpx solid #f5f5f5; | |
| 152 | + line-height: 100rpx; | |
| 153 | + | |
| 154 | + .scan-label { | |
| 155 | + width: 30%; | |
| 156 | + display: flex; | |
| 157 | + align-items: center; | |
| 158 | + justify-content: center; | |
| 159 | + } | |
| 160 | + | |
| 161 | + .scan-time { | |
| 162 | + width: 60%; | |
| 163 | + } | |
| 164 | + | |
| 165 | + .scan-icon { | |
| 166 | + width: 10%; | |
| 167 | + display: flex; | |
| 168 | + } | |
| 169 | + } | |
| 170 | + | |
| 171 | + } | |
| 172 | + | |
| 173 | + .scan-submit-info { | |
| 174 | + width: 100%; | |
| 175 | + background-color: white; | |
| 176 | + box-sizing: border-box; | |
| 177 | + padding: 20rpx; | |
| 178 | + color: $u-content-color; | |
| 179 | + | |
| 180 | + .scan-submit-title-box { | |
| 181 | + display: flex; | |
| 182 | + align-items: center; | |
| 183 | + | |
| 184 | + text { | |
| 185 | + margin-left: 15rpx; | |
| 186 | + } | |
| 187 | + } | |
| 188 | + | |
| 189 | + .scan-car-num { | |
| 190 | + display: flex; | |
| 191 | + line-height: $l-h-8; | |
| 192 | + align-items: center; | |
| 193 | + | |
| 194 | + .scan-car-num-label { | |
| 195 | + width: 20%; | |
| 196 | + // 文字不换行 | |
| 197 | + white-space: nowrap; | |
| 198 | + } | |
| 199 | + | |
| 200 | + .scan-car-num-content { | |
| 201 | + width: auto; | |
| 202 | + display: flex; | |
| 203 | + justify-content: center; | |
| 204 | + align-items: center; | |
| 205 | + } | |
| 206 | + } | |
| 207 | + | |
| 208 | + .scan-upload-fill-image-box { | |
| 209 | + line-height: $l-h-8; | |
| 210 | + width: 100%; | |
| 211 | + | |
| 212 | + .scan-upload-fill-image-label { | |
| 213 | + display: flex; | |
| 214 | + justify-content: space-between; | |
| 215 | + } | |
| 216 | + | |
| 217 | + .scan-upload-fill-image-btn { | |
| 218 | + u-upload {} | |
| 219 | + } | |
| 220 | + } | |
| 221 | + } | |
| 222 | + | |
| 223 | + .scan-submit-button-box { | |
| 224 | + margin-top: 40rpx; | |
| 225 | + background-color: white; | |
| 226 | + padding: 20rpx; | |
| 227 | + } | |
| 228 | +} | |
| 229 | +</style> | ... | ... |
garbage-removal/src/pages/order/handler-home/swiper-list-item/index.vue
| ... | ... | @@ -5,18 +5,11 @@ |
| 5 | 5 | <view class="page-box"> |
| 6 | 6 | <view class="order" v-for="(item, index) in dataList" :key="index"> |
| 7 | 7 | <view class="top"> |
| 8 | - <view class="left"> | |
| 8 | + <view class="left" @click="goDetail(item)"> | |
| 9 | 9 | <u-icon name="home" :size="30" color="rgb(94,94,94)"></u-icon> |
| 10 | 10 | <view class="store">{{ item.garOrderCompanyName }}</view> |
| 11 | 11 | <u-icon name="arrow-right" color="rgb(203,203,203)" :size="26"></u-icon> |
| 12 | 12 | </view> |
| 13 | - <view style="display: flex;align-items: center;"> | |
| 14 | - <text v-if="item.garOrderHandlerStatus != 3 && item.garOrderStatus === 3 && userType === '运输驾驶员'" | |
| 15 | - style="font-size: small;color: #f56c6c;">派单已经完成了。</text> | |
| 16 | - <view v-if="item.garOrderHandlerStatus === 0 && item.garCancelFlag === 0" class="right">待清运 </view> | |
| 17 | - <view v-if="item.garOrderHandlerStatus === 1 && item.garCancelFlag === 0" class="right">清运中 </view> | |
| 18 | - <view v-if="item.garOrderHandlerStatus === 3 && userType === '运输驾驶员'" class="right">已完成 </view> | |
| 19 | - </view> | |
| 20 | 13 | </view> |
| 21 | 14 | <view class="item" @click="handleClick(item.garOrderId)"> |
| 22 | 15 | <view class="left"> |
| ... | ... | @@ -25,12 +18,20 @@ |
| 25 | 18 | <view class="content"> |
| 26 | 19 | <view class="title u-line-2">{{ item.garOrderAddress + item.garOrderAddressDetails }}</view> |
| 27 | 20 | <view class="type">垃圾类型: {{ item.garOrderTrashType }}</view> |
| 28 | - <view class="delivery-time">预约时间 {{ item.garOrderAgreementTime }}</view> | |
| 21 | + <view class="delivery-time">创建时间 {{ item.createTime }}</view> | |
| 22 | + <view class="transport-num">载运量 {{ item.transportNum }}</view> | |
| 29 | 23 | </view> |
| 30 | 24 | </view> |
| 31 | 25 | </view> |
| 32 | 26 | </view> |
| 33 | 27 | </z-paging> |
| 28 | + <view class="scan-box"> | |
| 29 | + <view class="scan-btn"> | |
| 30 | + <view class="scan-icon"> | |
| 31 | + <u-icon @click="handleScan" name="scan" :size="80" color="#fff"></u-icon> | |
| 32 | + </view> | |
| 33 | + </view> | |
| 34 | + </view> | |
| 34 | 35 | </view> |
| 35 | 36 | </template> |
| 36 | 37 | |
| ... | ... | @@ -54,15 +55,30 @@ const dataList = ref([]); |
| 54 | 55 | const paging = ref(null); |
| 55 | 56 | const firstLoaded = ref(false) |
| 56 | 57 | |
| 57 | -const handleClick = (orderId) => { | |
| 58 | +const handleClick = (companyId) => { | |
| 58 | 59 | uni.$u.route({ |
| 59 | - url: `pages/order/other-home/detail/index`, | |
| 60 | + url: `pages/order/handler-home/transport-detail/index`, | |
| 60 | 61 | params: { |
| 61 | - orderId: orderId | |
| 62 | + companyId | |
| 62 | 63 | } |
| 63 | 64 | }) |
| 64 | 65 | } |
| 65 | 66 | |
| 67 | +const handleScan = () => { | |
| 68 | + // 调用uniapi开启二维码扫描 | |
| 69 | + // 允许从相机和相册扫码 | |
| 70 | + uni.$u.route({ | |
| 71 | + url: `pages/order/handler-home/scan-detail/index` | |
| 72 | + }) | |
| 73 | + uni.scanCode({ | |
| 74 | + success: function (res) { | |
| 75 | + console.log('条码类型:' + res.scanType); | |
| 76 | + console.log('条码内容:' + res.result); | |
| 77 | + } | |
| 78 | + }); | |
| 79 | + | |
| 80 | +} | |
| 81 | + | |
| 66 | 82 | // list集合 |
| 67 | 83 | const queryList = (pageNo, pageSize) => { |
| 68 | 84 | //这里的pageNo和pageSize会自动计算好,直接传给服务器即可 |
| ... | ... | @@ -73,6 +89,8 @@ const queryList = (pageNo, pageSize) => { |
| 73 | 89 | paging.value.complete([ |
| 74 | 90 | { |
| 75 | 91 | garOrderId: 1, |
| 92 | + garOrderCompanyName: '长沙', | |
| 93 | + garOrderCompanyId: '3', | |
| 76 | 94 | garOrderAddress: '广东省广州市天河区', |
| 77 | 95 | garOrderAddressDetails: '天河北路168号', |
| 78 | 96 | garOrderTrashType: '可回收垃圾', |
| ... | ... | @@ -80,18 +98,24 @@ const queryList = (pageNo, pageSize) => { |
| 80 | 98 | garOrderHandlerStatus: 0, |
| 81 | 99 | garCancelFlag: 0, |
| 82 | 100 | garOrderStatus: 0, |
| 83 | - goodsUrl: 'https://cdn.uviewui.com/uview/swiper/1.jpg' | |
| 101 | + goodsUrl: 'https://cdn.uviewui.com/uview/swiper/1.jpg', | |
| 102 | + createTime: '2022-08-01 10:00', | |
| 103 | + transportNum: 0 | |
| 84 | 104 | }, |
| 85 | 105 | { |
| 86 | 106 | garOrderId: 2, |
| 107 | + garOrderCompanyName: '长沙', | |
| 87 | 108 | garOrderAddress: '广东省广州市天河区', |
| 88 | 109 | garOrderAddressDetails: '天河北路168号', |
| 110 | + garOrderCompanyId: '3', | |
| 89 | 111 | garOrderTrashType: '可回收垃圾', |
| 90 | 112 | garOrderAgreementTime: '2022-08-01 10:00', |
| 91 | 113 | garOrderHandlerStatus: 0, |
| 92 | 114 | garCancelFlag: 0, |
| 93 | 115 | garOrderStatus: 0, |
| 94 | - goodsUrl: 'https://cdn.uviewui.com/uview/swiper/2.jpg' | |
| 116 | + goodsUrl: 'https://cdn.uviewui.com/uview/swiper/2.jpg', | |
| 117 | + createTime: '2022-08-01 10:00', | |
| 118 | + transportNum: "0" | |
| 95 | 119 | } |
| 96 | 120 | ]); |
| 97 | 121 | firstLoaded.value = true |
| ... | ... | @@ -102,7 +126,15 @@ const queryList = (pageNo, pageSize) => { |
| 102 | 126 | paging.value.complete(false); |
| 103 | 127 | }) |
| 104 | 128 | } |
| 105 | - | |
| 129 | +/** | |
| 130 | + * 跳转公司详情 | |
| 131 | + * @param {*} val | |
| 132 | + */ | |
| 133 | +const goDetail = (val) => { | |
| 134 | + uni.$u.route({ | |
| 135 | + url: `pages/home/clean/company-detail/index?companyId=${val.garOrderCompanyId}`, | |
| 136 | + }) | |
| 137 | +} | |
| 106 | 138 | onShow(() => { |
| 107 | 139 | if (props.currentIndex == props.tabIndex) { |
| 108 | 140 | if (firstLoaded.value) { |
| ... | ... | @@ -192,9 +224,15 @@ watch(() => props.currentIndex, (val1, val2) => { |
| 192 | 224 | } |
| 193 | 225 | |
| 194 | 226 | .delivery-time { |
| 195 | - color: #e5d001; | |
| 227 | + color: $u-tips-color; | |
| 196 | 228 | font-size: 24rpx; |
| 197 | 229 | } |
| 230 | + | |
| 231 | + .transport-num { | |
| 232 | + font-size: 24rpx; | |
| 233 | + color: #e5d001; | |
| 234 | + text-align: end; | |
| 235 | + } | |
| 198 | 236 | } |
| 199 | 237 | |
| 200 | 238 | |
| ... | ... | @@ -266,5 +304,38 @@ watch(() => props.currentIndex, (val1, val2) => { |
| 266 | 304 | background: linear-gradient(270deg, rgba(249, 116, 90, 1) 0%, rgba(255, 158, 1, 1) 100%); |
| 267 | 305 | } |
| 268 | 306 | } |
| 307 | + | |
| 308 | + .scan-box { | |
| 309 | + position: fixed; | |
| 310 | + bottom: 100rpx; | |
| 311 | + right: 30rpx; | |
| 312 | + width: 90rpx; | |
| 313 | + height: 90rpx; | |
| 314 | + border-radius: 15rpx; | |
| 315 | + box-shadow: 0 0 10rpx rgba(0, 0, 0, .1); | |
| 316 | + display: flex; | |
| 317 | + justify-content: center; | |
| 318 | + align-items: center; | |
| 319 | + padding: 2rpx; | |
| 320 | + box-sizing: border-box; | |
| 321 | + background-color: #ffffff71; | |
| 322 | + | |
| 323 | + .scan-btn { | |
| 324 | + width: 80rpx; | |
| 325 | + height: 80rpx; | |
| 326 | + border-radius: 50%; | |
| 327 | + display: flex; | |
| 328 | + justify-content: center; | |
| 329 | + align-items: center; | |
| 330 | + background-color: #82e455b1; | |
| 331 | + @include handleClick; | |
| 332 | + | |
| 333 | + .scan-icon { | |
| 334 | + display: flex; | |
| 335 | + justify-content: center; | |
| 336 | + align-items: center; | |
| 337 | + } | |
| 338 | + } | |
| 339 | + } | |
| 269 | 340 | } |
| 270 | 341 | </style> | ... | ... |
garbage-removal/src/pages/order/handler-home/transport-detail/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <view class="order-detail-container" v-if="dataGram != null || dataGram != undefined"> | |
| 3 | + <view class="order-detail-container-box"> | |
| 4 | + <!-- 订单信息 --> | |
| 5 | + <view class="order-detail-container-box-card"> | |
| 6 | + <view class="order-detail-container-header-card-title"> | |
| 7 | + <view class="order-detail-container-header-card-uicon"></view> | |
| 8 | + 订单信息 | |
| 9 | + </view> | |
| 10 | + <view class="order-detail-container-header-item" | |
| 11 | + @click.stop="handlerJumpOtherApp(dataGram.garLatitude, dataGram.garLongitude, dataGram.garCoordinate)"> | |
| 12 | + <text class="order-detail-container-header-title">订单地点:</text> | |
| 13 | + <view class="order-detail-container-header-content" style="text-decoration: underline"> | |
| 14 | + <text selectable='true'>{{ dataGram.garOrderAddress + dataGram.garOrderAddressDetails }}</text> | |
| 15 | + </view> | |
| 16 | + </view> | |
| 17 | + <view class="order-detail-container-header-item"> | |
| 18 | + <text class="order-detail-container-header-title">现场图片:</text> | |
| 19 | + <view class="order-detail-container-header-content"> | |
| 20 | + <u-upload width="180" height="130" :fileList="currentImages" name="3" multiple :maxCount="10" | |
| 21 | + :previewFullImage="true" :isReadOnly="true"></u-upload> | |
| 22 | + </view> | |
| 23 | + </view> | |
| 24 | + <view class="order-detail-container-header-item"> | |
| 25 | + <text class="order-detail-container-header-title">负责单位:</text> | |
| 26 | + <view class="order-detail-container-header-content"> | |
| 27 | + {{ dataGram.garOrderCompanyName }} | |
| 28 | + </view> | |
| 29 | + </view> | |
| 30 | + <view class="order-detail-container-header-item"> | |
| 31 | + <text class="order-detail-container-header-title">垃圾类型:</text> | |
| 32 | + <view class="order-detail-container-header-content"> | |
| 33 | + {{ dataGram.garOrderTrashType }} | |
| 34 | + </view> | |
| 35 | + </view> | |
| 36 | + <view class="order-detail-container-header-item"> | |
| 37 | + <text class="order-detail-container-header-title">订单号:</text> | |
| 38 | + <view class="order-detail-container-header-content"> | |
| 39 | + <text selectable="true">{{ orderId }}</text> | |
| 40 | + </view> | |
| 41 | + </view> | |
| 42 | + </view> | |
| 43 | + <!-- 收运进度 --> | |
| 44 | + <view class="order-detail-container-box-card"> | |
| 45 | + <view class="order-detail-container-header-card-title"> | |
| 46 | + <view class="order-detail-container-header-card-uicon"></view> | |
| 47 | + 收运清单 | |
| 48 | + </view> | |
| 49 | + <view v-if="dataGram.garTransportList" v-for="item in dataGram.garTransportList" | |
| 50 | + style="width: 100%; box-sizing: border-box;"> | |
| 51 | + <view class="transport-process-item" style="display: flex;width: 100%; margin: 20rpx 0 ;"> | |
| 52 | + <view style="width: 150rpx;"> | |
| 53 | + <up-image :show-loading="true" :src="item.fillImage" width="80rpx" height="80rpx"></up-image> | |
| 54 | + </view> | |
| 55 | + <view style="display: flex;align-items: center;width: 100%;justify-content: center;"> | |
| 56 | + <text style=" transform: rotateY(180deg);"> | |
| 57 | + <up-icon name="car-fill" size="40" color="#a9e08f"></up-icon></text> | |
| 58 | + <text style="margin-left:15rpx;font-size: 25rpx;">{{ item.garCarNum }}</text> | |
| 59 | + </view> | |
| 60 | + <view style="display: flex; align-items: center;width: 150rpx; justify-content: flex-end;" | |
| 61 | + @click="goTransportDetail(item)"> | |
| 62 | + <text style="font-size: 30rpx;white-space: nowrap;margin-right: 15rpx;color: #3c9cff;">详情</text> | |
| 63 | + <up-icon name="arrow-right" size="30" color="#3c9cff"></up-icon> | |
| 64 | + </view> | |
| 65 | + </view> | |
| 66 | + </view> | |
| 67 | + <view v-else class="empty-image" | |
| 68 | + style="width: 100%; display: flex; justify-content: center; align-items: center;"> | |
| 69 | + <image class="image-style" style="width: 200rpx; height: 200rpx;" :src="emptyBase64Image"></image> | |
| 70 | + </view> | |
| 71 | + </view> | |
| 72 | + <view class="space-box">{{ spaceStr }}</view> | |
| 73 | + </view> | |
| 74 | + <!-- 占位符 --> | |
| 75 | + <view class="order-detail-bottom"> | |
| 76 | + <view class="order-detail-bottom-box"> | |
| 77 | + <view class=" order-detail-bottom-left"> | |
| 78 | + </view> | |
| 79 | + </view> | |
| 80 | + </view> | |
| 81 | + </view> | |
| 82 | +</template> | |
| 83 | + | |
| 84 | +<script setup> | |
| 85 | +import { dispatchOrders } from "@/apis/order.js"; | |
| 86 | +import zStatic from '@/components/z-paging/js/z-paging-static'; | |
| 87 | +import { useMainStore } from '@/stores/index.js'; | |
| 88 | +import { onLoad, onShow } from '@dcloudio/uni-app'; | |
| 89 | +import { computed, ref } from 'vue'; | |
| 90 | +const isOnloadIn = ref(false) | |
| 91 | +const clashDispatchRef = ref() | |
| 92 | +const personnelList = ref([]) | |
| 93 | +const store = useMainStore(); | |
| 94 | +const userType = computed(() => store.userType) | |
| 95 | +const dataGram = ref({ | |
| 96 | + garOrderId: "1", | |
| 97 | + garOrderCompanyId: "3", | |
| 98 | + garOrderCompanyName: "测试公司", | |
| 99 | + garOrderHandlerName: "张三", | |
| 100 | + garOrderAddress: "测试地址", | |
| 101 | + garOrderAddressDetails: "测试地址详情", | |
| 102 | + garOrderTrashType: "测试类型", | |
| 103 | + garOrderId: "3", | |
| 104 | + garOrderTime: "2022-08-01 12:00:00", | |
| 105 | + garOrderType: "1", | |
| 106 | + garRemark: "测试", | |
| 107 | + garTransportList: [{ | |
| 108 | + fillImage: "https://img1.baidu.com/it/u=1846112660,2512843120&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=450", | |
| 109 | + garCarNum: "湘AT123456", | |
| 110 | + garTransportId: "1" | |
| 111 | + }, { | |
| 112 | + fillImage: "https://img1.baidu.com/it/u=1846112660,2512843120&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=450", | |
| 113 | + garCarNum: "湘AT123456", | |
| 114 | + garTransportId: "2" | |
| 115 | + }, { | |
| 116 | + fillImage: "https://img1.baidu.com/it/u=1846112660,2512843120&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=450", | |
| 117 | + garCarNum: "湘AT123456", | |
| 118 | + garTransportId: "3" | |
| 119 | + } | |
| 120 | + ] | |
| 121 | +}); | |
| 122 | +const orderId = ref(null) | |
| 123 | +const currentImages = ref([]) | |
| 124 | +const putOnImages = ref([]) | |
| 125 | +const putDownImages = ref([]) | |
| 126 | +const emptyBase64Image = ref(zStatic.base64Empty) | |
| 127 | +const showUQRcode = ref(false) | |
| 128 | +const spaceStr = ref("") | |
| 129 | +const qrCodeRef = ref() | |
| 130 | +const qrCodeText = ref() | |
| 131 | + | |
| 132 | +// 创建二维码 | |
| 133 | +const createQrCodeLocal = (orderId) => { | |
| 134 | + // 获取本地地址拼接订单id | |
| 135 | + showUQRcode.value = true; | |
| 136 | + const hostname = window.location.hostname; | |
| 137 | + const port = window.location.port; | |
| 138 | + const protocol = window.location.protocol; | |
| 139 | + const localAddress = `${protocol}//${hostname}:${port}`; | |
| 140 | + // const localAddress = `http://localhost:5173`; | |
| 141 | + qrCodeText.value = localAddress + "/pages/order/other-home/guest/index?orderId=" + orderId; | |
| 142 | + console.log(qrCodeRef.value); | |
| 143 | +} | |
| 144 | +const goTransportDetail = (val) => { | |
| 145 | + uni.$u.route({ | |
| 146 | + url: `pages/order/handler-home/scan-detail/index` | |
| 147 | + }) | |
| 148 | +} | |
| 149 | + | |
| 150 | +const handleOrderDetail = (orderId) => { | |
| 151 | + // queryOrderDetail(orderId).then(res => { | |
| 152 | + // dataGram.value = res.data.data; | |
| 153 | + // console.log(res.data.data); | |
| 154 | + // currentImages.value = res.data.data.currentImages.map(item => { | |
| 155 | + // return { url: import.meta.env.VITE_BASE_URL + item }; | |
| 156 | + // }); | |
| 157 | + // putOnImages.value = res.data.data.putOnImages.map(item => { | |
| 158 | + // return { url: import.meta.env.VITE_BASE_URL + item }; | |
| 159 | + // }); | |
| 160 | + // putDownImages.value = res.data.data.putDownImages.map(item => { | |
| 161 | + // return { url: import.meta.env.VITE_BASE_URL + item }; | |
| 162 | + // }); | |
| 163 | + // }) | |
| 164 | +} | |
| 165 | +/** | |
| 166 | + * 拨打电话回调 | |
| 167 | + */ | |
| 168 | +const handleContactClick = (val) => { | |
| 169 | + uni.makePhoneCall({ phoneNumber: val }).then(res => { | |
| 170 | + }).catch(err => { }); | |
| 171 | +} | |
| 172 | + | |
| 173 | +const handlerJumpOtherApp = (latitude, longitude, garCoordinate) => { | |
| 174 | + // 给出提示确定要跳转吗 | |
| 175 | + uni.showModal({ | |
| 176 | + title: '提示', | |
| 177 | + content: '是否跳转到app定位进行导航?', | |
| 178 | + success: function (res) { | |
| 179 | + if (res.confirm) { | |
| 180 | + uni.openLocation({ | |
| 181 | + latitude: latitude, | |
| 182 | + longitude: longitude, | |
| 183 | + success: function () { | |
| 184 | + console.log('success'); | |
| 185 | + } | |
| 186 | + }); | |
| 187 | + } | |
| 188 | + } | |
| 189 | + }) | |
| 190 | +} | |
| 191 | + | |
| 192 | +const handleDispatchConfirm = (val) => { | |
| 193 | + console.log(val); | |
| 194 | + if (!val) { | |
| 195 | + return | |
| 196 | + } | |
| 197 | + let data = { | |
| 198 | + garOrderId: orderId.value, | |
| 199 | + dispatchList: [] | |
| 200 | + } | |
| 201 | + for (const key in val) { | |
| 202 | + data.dispatchList.push({ | |
| 203 | + ...val[key] | |
| 204 | + }); | |
| 205 | + } | |
| 206 | + console.log(data); | |
| 207 | + dispatchOrders(data).then(res => { | |
| 208 | + if (res.data.success) { | |
| 209 | + uni.$u.toast(res.data.msg) | |
| 210 | + } else { | |
| 211 | + uni.$u.toast("订单下发失败,请重试") | |
| 212 | + } | |
| 213 | + clashDispatchRef.value.close() | |
| 214 | + }) | |
| 215 | +} | |
| 216 | + | |
| 217 | +/** | |
| 218 | + * 初始化信息 | |
| 219 | + */ | |
| 220 | +onLoad((options) => { | |
| 221 | + orderId.value = options.orderId | |
| 222 | + handleOrderDetail(orderId.value) | |
| 223 | +}) | |
| 224 | + | |
| 225 | +onShow(() => { | |
| 226 | + try { | |
| 227 | + if (isOnloadIn.value) { | |
| 228 | + handleOrderDetail(orderId.value) | |
| 229 | + } else { | |
| 230 | + isOnloadIn.value = true | |
| 231 | + } | |
| 232 | + } catch (error) { | |
| 233 | + console.log(error); | |
| 234 | + } | |
| 235 | +}) | |
| 236 | +</script> | |
| 237 | + | |
| 238 | +<style lang="scss" scoped> | |
| 239 | +$custom-marin-bottom: 20rpx; | |
| 240 | +$custom-page-padding: 20rpx; | |
| 241 | +$custom-border-radio: 20rpx; | |
| 242 | +$custom-bottom-height: 200rpx; | |
| 243 | + | |
| 244 | +@mixin card { | |
| 245 | + padding: $custom-page-padding; | |
| 246 | + box-sizing: border-box; | |
| 247 | + background-color: #ffffff; | |
| 248 | + border-radius: $custom-border-radio; | |
| 249 | + margin-bottom: $custom-marin-bottom; | |
| 250 | +} | |
| 251 | + | |
| 252 | +.order-detail-container { | |
| 253 | + height: 100%; | |
| 254 | + width: 100%; | |
| 255 | + background-color: $u-info-light; | |
| 256 | + box-sizing: border-box; | |
| 257 | + overflow-y: scroll; | |
| 258 | + background: linear-gradient(to bottom, $u-success-dark, $u-info-light, $u-info-light, $u-info-light); | |
| 259 | + | |
| 260 | + | |
| 261 | + .order-detail-container-box { | |
| 262 | + height: 100%; | |
| 263 | + width: 100%; | |
| 264 | + padding: $custom-page-padding; | |
| 265 | + box-sizing: border-box; | |
| 266 | + | |
| 267 | + .order-detail-top { | |
| 268 | + @include card(); | |
| 269 | + | |
| 270 | + .order-detail-top-box { | |
| 271 | + .order-detail-top-box-step { | |
| 272 | + u-steps { | |
| 273 | + u-steps-item {} | |
| 274 | + } | |
| 275 | + } | |
| 276 | + } | |
| 277 | + } | |
| 278 | + | |
| 279 | + .order-detail-container-box-card { | |
| 280 | + @include card(); | |
| 281 | + | |
| 282 | + .order-detail-container-header-card-title { | |
| 283 | + font-weight: bold; | |
| 284 | + line-height: 80rpx; | |
| 285 | + border-bottom: 3rpx solid $u-info-light; | |
| 286 | + margin-bottom: $custom-marin-bottom; | |
| 287 | + color: $u-primary; | |
| 288 | + display: flex; | |
| 289 | + align-items: center; | |
| 290 | + | |
| 291 | + .order-detail-container-header-card-uicon { | |
| 292 | + background-color: $u-primary; | |
| 293 | + margin-right: 10rpx; | |
| 294 | + height: 35rpx; | |
| 295 | + width: 15rpx; | |
| 296 | + } | |
| 297 | + } | |
| 298 | + | |
| 299 | + .order-detail-container-header-item { | |
| 300 | + display: flex; | |
| 301 | + margin-bottom: $custom-marin-bottom; | |
| 302 | + | |
| 303 | + // font-size: 30rpx; | |
| 304 | + // font-weight: bold; | |
| 305 | + // color: $u-main-color; | |
| 306 | + .order-detail-container-header-title { | |
| 307 | + color: $u-main-color; | |
| 308 | + white-space: nowrap; //溢出不换行 | |
| 309 | + color: $u-info; | |
| 310 | + } | |
| 311 | + | |
| 312 | + .order-detail-container-header-content { | |
| 313 | + display: flex; | |
| 314 | + } | |
| 315 | + } | |
| 316 | + } | |
| 317 | + } | |
| 318 | + | |
| 319 | + | |
| 320 | + .space-box { | |
| 321 | + padding-bottom: $custom-bottom-height; | |
| 322 | + margin-bottom: 40rpx; | |
| 323 | + } | |
| 324 | + | |
| 325 | + | |
| 326 | + .order-detail-bottom { | |
| 327 | + position: absolute; | |
| 328 | + width: 100%; | |
| 329 | + // height: 100%; | |
| 330 | + bottom: 0; | |
| 331 | + left: 0; | |
| 332 | + | |
| 333 | + .movableAreaDetail { | |
| 334 | + pointer-events: none; | |
| 335 | + position: fixed; | |
| 336 | + left: 0; | |
| 337 | + top: 0; | |
| 338 | + width: 100%; | |
| 339 | + height: calc(100% - $custom-bottom-height); | |
| 340 | + z-index: 999; | |
| 341 | + | |
| 342 | + .movableView { | |
| 343 | + pointer-events: auto; | |
| 344 | + min-height: 60rpx; | |
| 345 | + min-width: 60rpx; | |
| 346 | + | |
| 347 | + .order-detail-call-box-container { | |
| 348 | + min-height: 60rpx; | |
| 349 | + min-width: 60rpx; | |
| 350 | + display: flex; | |
| 351 | + align-items: center; | |
| 352 | + justify-content: center; | |
| 353 | + background-color: #a9e08f; | |
| 354 | + border-radius: 100%; | |
| 355 | + } | |
| 356 | + } | |
| 357 | + } | |
| 358 | + | |
| 359 | + .order-detail-bottom-box { | |
| 360 | + height: $custom-bottom-height; | |
| 361 | + padding: 50rpx; | |
| 362 | + box-sizing: border-box; | |
| 363 | + display: flex; | |
| 364 | + justify-content: space-between; | |
| 365 | + align-items: center; | |
| 366 | + | |
| 367 | + .order-detail-bottom-left { | |
| 368 | + min-width: 200rpx; | |
| 369 | + } | |
| 370 | + | |
| 371 | + .order-detail-bottom-right { | |
| 372 | + min-width: 200rpx; | |
| 373 | + } | |
| 374 | + } | |
| 375 | + } | |
| 376 | +} | |
| 377 | + | |
| 378 | +.mask-container { | |
| 379 | + position: fixed; | |
| 380 | + top: 0; | |
| 381 | + left: 0; | |
| 382 | + width: 100%; | |
| 383 | + height: 100%; | |
| 384 | + z-index: 999; | |
| 385 | + background-color: rgba(0, 0, 0, 0.5); | |
| 386 | + display: flex; | |
| 387 | + align-items: center; | |
| 388 | + justify-content: center; | |
| 389 | +} | |
| 390 | +</style> | ... | ... |
garbage-removal/src/pages/order/index.vue
| 1 | 1 | <template> |
| 2 | 2 | <view class="container" style="width: 100%;height: 100%;"> |
| 3 | - <other-home v-if="userType != '处理场所负责人'"></other-home> | |
| 3 | + <other-home v-if="userType != '处置场所负责人'"></other-home> | |
| 4 | 4 | <handler-home v-else></handler-home> |
| 5 | 5 | </view> |
| 6 | 6 | </template> |
| ... | ... | @@ -13,4 +13,8 @@ const mainStore = useMainStore() |
| 13 | 13 | const userType = computed(() => mainStore.userType) |
| 14 | 14 | console.log(userType.value); |
| 15 | 15 | </script> |
| 16 | -<style lang="scss" scoped></style> | |
| 16 | +<style lang="scss" scoped> | |
| 17 | +::v-deep .u-tabs__wrapper__scroll-view { | |
| 18 | + background-color: #53c21d; | |
| 19 | +} | |
| 20 | +</style> | ... | ... |
garbage-removal/src/pages/order/other-home/detail/index.vue
| 1 | 1 | <template> |
| 2 | - <clashDispatch ref="clashDispatchRef" :valueKey="'licensePlateNumber'" :onconfirm="handleDispatchConfirm" | |
| 3 | - :dataList="personnelList"> | |
| 4 | - </clashDispatch> | |
| 2 | + <clashDriverDispatch ref="clashDriverDispatchRef" :valueKey="'licensePlateNumber'" | |
| 3 | + :onconfirm="handleDriverDispatchConfirm" :dataList="driverPersonnelList"> | |
| 4 | + </clashDriverDispatch> | |
| 5 | + <clashDisposalDispatch ref="clashDisposalDispatchRef" :valueKey="'companyName'" | |
| 6 | + :onconfirm="handleDisposalDispatchConfirm" :dataList="driverPersonnelList"> | |
| 7 | + </clashDisposalDispatch> | |
| 5 | 8 | <view class="order-detail-container" v-if="dataGram != null || dataGram != undefined"> |
| 6 | 9 | <view class="order-detail-container-box"> |
| 7 | 10 | <view class="order-detail-top"> |
| ... | ... | @@ -20,18 +23,18 @@ |
| 20 | 23 | <text v-if="dataGram.garCancelFlag == 0" style="color: red;">请于交易完成后线下支付!!</text> |
| 21 | 24 | <view v-else style="display: flex; color:red;"> |
| 22 | 25 | <u-icon name="close-circle" color="red"></u-icon> |
| 23 | - <text> 派单已被取消!原因:{{ dataGram.garReason }}</text> | |
| 26 | + <text> 订单已被取消!原因:{{ dataGram.garReason }}</text> | |
| 24 | 27 | </view> |
| 25 | 28 | </view> |
| 26 | - <!-- 派单信息 --> | |
| 29 | + <!-- 订单信息 --> | |
| 27 | 30 | <view class="order-detail-container-box-card"> |
| 28 | 31 | <view class="order-detail-container-header-card-title"> |
| 29 | 32 | <view class="order-detail-container-header-card-uicon"></view> |
| 30 | - 派单信息 | |
| 33 | + 订单信息 | |
| 31 | 34 | </view> |
| 32 | 35 | <view class="order-detail-container-header-item" |
| 33 | 36 | @click.stop="handlerJumpOtherApp(dataGram.garLatitude, dataGram.garLongitude, dataGram.garCoordinate)"> |
| 34 | - <text class="order-detail-container-header-title">派单地点:</text> | |
| 37 | + <text class="order-detail-container-header-title">订单地点:</text> | |
| 35 | 38 | <view class="order-detail-container-header-content" style="text-decoration: underline"> |
| 36 | 39 | <text selectable='true'>{{ dataGram.garOrderAddress + dataGram.garOrderAddressDetails }}</text> |
| 37 | 40 | </view> |
| ... | ... | @@ -56,7 +59,7 @@ |
| 56 | 59 | </view> |
| 57 | 60 | </view> |
| 58 | 61 | <view class="order-detail-container-header-item"> |
| 59 | - <text class="order-detail-container-header-title">派单号:</text> | |
| 62 | + <text class="order-detail-container-header-title">订单号:</text> | |
| 60 | 63 | <view class="order-detail-container-header-content"> |
| 61 | 64 | <text selectable="true">{{ orderId }}</text> |
| 62 | 65 | </view> |
| ... | ... | @@ -83,14 +86,14 @@ |
| 83 | 86 | </view> |
| 84 | 87 | </view> |
| 85 | 88 | </view> |
| 86 | - <!-- 派单记录 --> | |
| 89 | + <!-- 订单记录 --> | |
| 87 | 90 | <view class="order-detail-container-box-card"> |
| 88 | 91 | <view class="order-detail-container-header-card-title"> |
| 89 | 92 | <view class="order-detail-container-header-card-uicon"></view> |
| 90 | - 派单人员 | |
| 93 | + 订单人员 | |
| 91 | 94 | </view> |
| 92 | 95 | <!-- <view class="order-detail-container-header-item"> |
| 93 | - <text class="order-detail-container-header-title">派单时间:</text> | |
| 96 | + <text class="order-detail-container-header-title">订单时间:</text> | |
| 94 | 97 | <view class="order-detail-container-header-content"> |
| 95 | 98 | {{ dataGram.garCreateTime }} |
| 96 | 99 | </view> |
| ... | ... | @@ -112,7 +115,7 @@ |
| 112 | 115 | </view> |
| 113 | 116 | </view> |
| 114 | 117 | <view class="order-detail-container-header-item"> |
| 115 | - <text class="order-detail-container-header-title">派单人:</text> | |
| 118 | + <text class="order-detail-container-header-title">订单人:</text> | |
| 116 | 119 | <view class="order-detail-container-header-content"> |
| 117 | 120 | {{ dataGram.garOrderContactName }} |
| 118 | 121 | </view> |
| ... | ... | @@ -169,56 +172,50 @@ |
| 169 | 172 | <view class="order-detail-bottom"> |
| 170 | 173 | <view class="order-detail-bottom-box"> |
| 171 | 174 | <view class=" order-detail-bottom-left"> |
| 172 | - <u-button v-if="dataGram.garOrderHandlerStatus === 1 && dataGram.garCancelFlag === 0 && userType === '运输驾驶员'" | |
| 173 | - @click="handleSubmitSuccess(orderId)" shape="square" color="#a9e08f" text="完成派单"></u-button> | |
| 174 | - <u-button v-if="dataGram.garOrderHandlerStatus === 0 && userType == '企业负责人' && dataGram.garCancelFlag === 0" | |
| 175 | - @click="handleOderCancelClick()" shape="square" color="#a9e08f" text="取消派单"></u-button> | |
| 176 | - <u-button v-if="dataGram.garOrderHandlerStatus === 0 && userType == '运输驾驶员' && dataGram.garCancelFlag === 0" | |
| 177 | - @click="handleOderCancelClick()" shape="square" color="#a9e08f" text="取消派单"></u-button> | |
| 178 | - <u-button v-if="dataGram.garOrderHandlerStatus === 1 && userType == '企业负责人'" | |
| 179 | - @click="handleOrderDispatchClick(orderId)" shape="square" color="#a9e08f" | |
| 180 | - :text="dataGram.garOrderMatchFlag === 0 ? '派单下发' : '继续下发'"></u-button> | |
| 175 | + <u-button | |
| 176 | + v-if="dataGram.garOrderHandlerStatus === 1 && dataGram.garCancelFlag === 0 && userType === '清运车辆驾驶员'" | |
| 177 | + @click="createQrCodeValid(dataGram.validCode)" shape="square" color="#a9e08f" text="出示二维码"></u-button> | |
| 178 | + <u-button v-if="dataGram.garOrderHandlerStatus === 0 && userType == '运输企业负责人' && dataGram.garCancelFlag === 0" | |
| 179 | + @click="handleOderCancelClick()" shape="square" color="#a9e08f" text="取消订单"></u-button> | |
| 180 | + <u-button v-if="dataGram.garOrderHandlerStatus === 0 && userType == '清运车辆驾驶员' && dataGram.garCancelFlag === 0" | |
| 181 | + @click="handleOderCancelClick()" shape="square" color="#a9e08f" text="取消订单"></u-button> | |
| 182 | + <u-button v-if="dataGram.garOrderHandlerStatus === 1 && userType == '运输企业负责人'" | |
| 183 | + @click="handleOrderDispatchClick(orderId)" shape="square" color="#a9e08f" text="分配驾驶员"></u-button> | |
| 181 | 184 | </view> |
| 182 | 185 | <view class="order-detail-bottom-right"> |
| 183 | - <u-button v-if="dataGram.garOrderHandlerStatus === 0 && userType == '居民用户' && dataGram.garCancelFlag === 0" | |
| 184 | - @click="handleOderCancelClick()" shape="square" color="#a9e08f" text="取消派单"></u-button> | |
| 186 | + <u-button v-if="dataGram.garOrderHandlerStatus === 0 && userType == '用户' && dataGram.garCancelFlag === 0" | |
| 187 | + @click="handleOderCancelClick()" shape="square" color="#a9e08f" text="取消订单"></u-button> | |
| 185 | 188 | <u-button @click="driverHandleOrder(orderId)" |
| 186 | - v-if="dataGram.garOrderHandlerStatus === 0 && dataGram.handleFlag && dataGram.garCancelFlag === 0 && userType === '运输驾驶员'" | |
| 187 | - shape="square" color="#a9e08f" text="处理派单"></u-button> | |
| 189 | + v-if="dataGram.garOrderHandlerStatus === 0 && dataGram.handleFlag && dataGram.garCancelFlag === 0 && userType === '清运车辆驾驶员'" | |
| 190 | + shape="square" color="#a9e08f" text="处理订单"></u-button> | |
| 188 | 191 | <u-button @click="handleOrder(orderId)" |
| 189 | - v-if="dataGram.garOrderHandlerStatus === 0 && dataGram.handleFlag && dataGram.garCancelFlag === 0 && userType === '企业负责人'" | |
| 190 | - shape="square" color="#a9e08f" text="处理派单"></u-button> | |
| 192 | + v-if="dataGram.garOrderHandlerStatus === 0 && dataGram.handleFlag && dataGram.garCancelFlag === 0 && userType === '运输企业负责人'" | |
| 193 | + shape="square" color="#a9e08f" text="处理订单"></u-button> | |
| 191 | 194 | <u-button @click="handleUploadImage(orderId, 'putOnImages')" |
| 192 | - v-if="dataGram.garOrderHandlerStatus === 1 && dataGram.garCancelFlag === 0 && userType === '运输驾驶员'" | |
| 195 | + v-if="dataGram.garOrderHandlerStatus === 1 && dataGram.garCancelFlag === 0 && userType === '清运车辆驾驶员'" | |
| 193 | 196 | shape="square" color="#a9e08f" text="上传图片"></u-button> |
| 194 | - <!-- <u-button @click="handleUploadImage(orderId, 'putOnImages')" | |
| 195 | - v-if="dataGram.garOrderHandlerStatus === 1 && dataGram.putOnImages.length === 0 && dataGram.handleFlag && dataGram.garCancelFlag === 0 && userType === '运输驾驶员'" | |
| 196 | - shape="square" color="#a9e08f" text="装车照片"></u-button> | |
| 197 | - <u-button @click="handleUploadImage(orderId, 'putDownImages')" | |
| 198 | - v-else-if="dataGram.garOrderHandlerStatus === 1 && dataGram.putDownImages.length === 0 && dataGram.handleFlag && dataGram.garCancelFlag === 0 && userType === '运输驾驶员'" | |
| 199 | - shape="square" color="#a9e08f" text="卸车照片"></u-button> --> | |
| 200 | - <!-- <u-button @click="handleUploadImage(orderId, 'putDownImages')" | |
| 201 | - v-else-if="dataGram.garOrderHandlerStatus === 1 && dataGram.putDownImages.length === 0 && dataGram.handleFlag && dataGram.garCancelFlag === 0 && userType === '企业负责人'" | |
| 202 | - shape="square" color="#a9e08f" text="上传照片"></u-button> --> | |
| 203 | 197 | <u-button @click="handleEvaluate(orderId, userType)" |
| 204 | - v-if="dataGram.garEvaluateFlag === 0 && userType === '居民用户'" shape="square" color="#a9e08f" | |
| 198 | + v-if="dataGram.garEvaluateFlag === 0 && userType === '用户'" shape="square" color="#a9e08f" | |
| 205 | 199 | text="去评价"></u-button> |
| 206 | 200 | <u-button @click="handleEvaluate(orderId, userType)" |
| 207 | - v-if="dataGram.garHandlerEvaluateFlag === 0 && userType === '企业负责人'" shape="square" color="#a9e08f" | |
| 201 | + v-if="dataGram.garHandlerEvaluateFlag === 0 && userType === '运输企业负责人'" shape="square" color="#a9e08f" | |
| 208 | 202 | text="去评价"></u-button> |
| 209 | 203 | <u-button @click="handleEvaluateDetail(orderId, userType)" |
| 210 | - v-if="dataGram.garHandlerEvaluateFlag === 1 && userType === '企业负责人'" shape="square" color="#a9e08f" | |
| 204 | + v-if="dataGram.garHandlerEvaluateFlag === 1 && userType === '运输企业负责人'" shape="square" color="#a9e08f" | |
| 211 | 205 | text="查看评价"></u-button> |
| 212 | 206 | <u-button @click="handleEvaluateDetail(orderId, userType)" |
| 213 | - v-if="dataGram.garEvaluateFlag === 1 && userType === '居民用户'" shape="square" color="#a9e08f" | |
| 207 | + v-if="dataGram.garEvaluateFlag === 1 && userType === '用户'" shape="square" color="#a9e08f" | |
| 214 | 208 | text="查看评价"></u-button> |
| 215 | - <u-button v-if="dataGram.garOrderHandlerStatus === 1 && dataGram.garCancelFlag === 0 && userType != '运输驾驶员'" | |
| 216 | - @click="handleSubmitSuccess(orderId)" shape="square" color="#a9e08f" text="完成派单"></u-button> | |
| 209 | + <u-button v-if="dataGram.garOrderHandlerStatus === 1 && userType == '运输企业负责人'" | |
| 210 | + @click="handleDisposalDispatchClick(orderId)" shape="square" color="#a9e08f" text="分配处置场所"></u-button> | |
| 211 | + | |
| 212 | + <!-- <u-button v-if="dataGram.garOrderHandlerStatus === 1 && dataGram.garCancelFlag === 0 && userType != '清运车辆驾驶员'" | |
| 213 | + @click="handleSubmitSuccess(orderId)" shape="square" color="#a9e08f" text="完成订单"></u-button> --> | |
| 217 | 214 | </view> |
| 218 | 215 | </view> |
| 219 | 216 | </view> |
| 220 | 217 | <u-action-sheet :closeOnClickOverlay="true" :closeOnClickAction="false" @actionSheetClose="handleClose" |
| 221 | - @submitFunction="submitFunction" @select="selectClick" :actions="list" round="15" title="取消派单" :show="cancelShow"> | |
| 218 | + @submitFunction="submitFunction" @select="selectClick" :actions="list" round="15" title="取消订单" :show="cancelShow"> | |
| 222 | 219 | </u-action-sheet> |
| 223 | 220 | </view> |
| 224 | 221 | <view v-if="showUQRcode" class="mask-container" @click="showUQRcode = false"> |
| ... | ... | @@ -228,17 +225,20 @@ |
| 228 | 225 | </template> |
| 229 | 226 | |
| 230 | 227 | <script setup> |
| 231 | -import { dispatchOrders, queryOrderDetail, queryOrderDispatch, updateOrder } from "@/apis/order.js"; | |
| 228 | +import { dispatchDisposalOrders, dispatchOrders, queryDisposalDispatch, queryOrderDetail, queryOrderDispatch, updateOrder } from "@/apis/order.js"; | |
| 232 | 229 | import { createQrCode } from '@/apis/qrcode.js'; |
| 233 | 230 | import uqrcode from '@/components/Sansnn-uQRCode_4.0.6/components/uqrcode/uqrcode.vue'; |
| 234 | -import clashDispatch from '@/components/clash-dispatch/index.vue'; | |
| 231 | +import clashDisposalDispatch from '@/components/clash-disposal-dispatch/index.vue'; | |
| 232 | +import clashDriverDispatch from '@/components/clash-driver-dispatch/index.vue'; | |
| 235 | 233 | import zStatic from '@/components/z-paging/js/z-paging-static'; |
| 236 | 234 | import { useMainStore } from '@/stores/index.js'; |
| 237 | 235 | import { onLoad, onShow } from '@dcloudio/uni-app'; |
| 238 | 236 | import { computed, ref } from 'vue'; |
| 239 | 237 | const isOnloadIn = ref(false) |
| 240 | -const clashDispatchRef = ref() | |
| 241 | -const personnelList = ref([]) | |
| 238 | +const clashDriverDispatchRef = ref() | |
| 239 | +const clashDisposalDispatchRef = ref() | |
| 240 | +const driverPersonnelList = ref([]) | |
| 241 | +const disposalPersonnelList = ref([]) | |
| 242 | 242 | const store = useMainStore(); |
| 243 | 243 | const userType = computed(() => store.userType) |
| 244 | 244 | const dataGram = ref(); |
| ... | ... | @@ -256,7 +256,7 @@ const qrCodeText = ref() |
| 256 | 256 | const list = computed(() => { |
| 257 | 257 | let reason = [ |
| 258 | 258 | { |
| 259 | - name: '派单信息填写有误', | |
| 259 | + name: '订单信息填写有误', | |
| 260 | 260 | }, |
| 261 | 261 | { |
| 262 | 262 | name: '线下协商有问题', |
| ... | ... | @@ -271,7 +271,7 @@ const list = computed(() => { |
| 271 | 271 | name: '提交', |
| 272 | 272 | } |
| 273 | 273 | ] |
| 274 | - if (userType.value === '居民用户') { | |
| 274 | + if (userType.value === '用户') { | |
| 275 | 275 | reason.unshift({ |
| 276 | 276 | name: '长时间无人接单', |
| 277 | 277 | }) |
| ... | ... | @@ -285,7 +285,7 @@ const list = computed(() => { |
| 285 | 285 | |
| 286 | 286 | // 创建二维码 |
| 287 | 287 | const createQrCodeLocal = (orderId) => { |
| 288 | - // 获取本地地址拼接派单id | |
| 288 | + // 获取本地地址拼接订单id | |
| 289 | 289 | showUQRcode.value = true; |
| 290 | 290 | const hostname = window.location.hostname; |
| 291 | 291 | const port = window.location.port; |
| ... | ... | @@ -323,18 +323,28 @@ const handleQrCodeClick = (orderId) => { |
| 323 | 323 | } |
| 324 | 324 | |
| 325 | 325 | const handleOrderDispatchClick = (orderId) => { |
| 326 | - // 获取派单人员 | |
| 326 | + // 获取订单人员 | |
| 327 | 327 | queryOrderDispatch(orderId).then(res => { |
| 328 | 328 | if (res.data.success) { |
| 329 | - personnelList.value = res.data.data | |
| 330 | - clashDispatchRef.value.open(res.data.data) | |
| 331 | - | |
| 332 | - handleOrderDetail(orderId) | |
| 329 | + driverPersonnelList.value = res.data.data | |
| 330 | + clashDriverDispatchRef.value.open(res.data.data) | |
| 333 | 331 | } else { |
| 334 | 332 | uni.$u.toast(res.data.message) |
| 335 | 333 | } |
| 336 | 334 | }) |
| 337 | 335 | } |
| 336 | +const handleDisposalDispatchClick = (orderId) => { | |
| 337 | + // 获取订单人员 | |
| 338 | + queryDisposalDispatch(orderId).then(res => { | |
| 339 | + if (res.data.success) { | |
| 340 | + disposalPersonnelList.value = res.data.data | |
| 341 | + clashDisposalDispatchRef.value.open(res.data.data) | |
| 342 | + } else { | |
| 343 | + uni.$u.toast(res.data.message) | |
| 344 | + } | |
| 345 | + }) | |
| 346 | +} | |
| 347 | + | |
| 338 | 348 | |
| 339 | 349 | |
| 340 | 350 | const handleClose = (e) => { |
| ... | ... | @@ -390,7 +400,7 @@ const handlerJumpOtherApp = (latitude, longitude, garCoordinate) => { |
| 390 | 400 | } |
| 391 | 401 | |
| 392 | 402 | /** |
| 393 | - * 取消派单 | |
| 403 | + * 取消订单 | |
| 394 | 404 | * @param {*} orderId |
| 395 | 405 | */ |
| 396 | 406 | const handleOderCancelClick = () => { |
| ... | ... | @@ -398,7 +408,7 @@ const handleOderCancelClick = () => { |
| 398 | 408 | } |
| 399 | 409 | |
| 400 | 410 | /** |
| 401 | - * 提交取消派单 | |
| 411 | + * 提交取消订单 | |
| 402 | 412 | */ |
| 403 | 413 | const submitFunction = (otherReason) => { |
| 404 | 414 | let reason = otherReason |
| ... | ... | @@ -406,7 +416,7 @@ const submitFunction = (otherReason) => { |
| 406 | 416 | reason = currentCancelName.value |
| 407 | 417 | } |
| 408 | 418 | if (!reason) { |
| 409 | - uni.$u.toast("请提供取消派单的原因") | |
| 419 | + uni.$u.toast("请提供取消订单的原因") | |
| 410 | 420 | return |
| 411 | 421 | } |
| 412 | 422 | let params = { |
| ... | ... | @@ -429,7 +439,7 @@ const submitFunction = (otherReason) => { |
| 429 | 439 | const handleSubmitSuccess = (orderId) => { |
| 430 | 440 | uni.showModal({ |
| 431 | 441 | title: '提示', |
| 432 | - content: '派单已经清运完成了吗?', | |
| 442 | + content: '订单已经清运完成了吗?', | |
| 433 | 443 | success: function (res) { |
| 434 | 444 | if (res.confirm) { |
| 435 | 445 | updateOrder({ garOrderId: orderId, handleType: 3 }).then(res => { |
| ... | ... | @@ -449,11 +459,11 @@ const handleEvaluate = (orderId, userType) => { |
| 449 | 459 | uni.$u.route(`pages/order/other-home/evaluate/index?orderId=${orderId}&userType=${userType}`) |
| 450 | 460 | } |
| 451 | 461 | |
| 452 | -// 接收派单 | |
| 462 | +// 接收订单 | |
| 453 | 463 | const handleOrder = (orderId) => { |
| 454 | 464 | updateOrder({ garOrderId: orderId, handleType: 0 }).then(res => { |
| 455 | 465 | if (res.data.success) { |
| 456 | - if (res.data.data === "派单已经被别人接受啦") { | |
| 466 | + if (res.data.data === "订单已经被别人接受啦") { | |
| 457 | 467 | uni.$u.toast(res.data.data) |
| 458 | 468 | uni.$u.route({ |
| 459 | 469 | type: "reLaunch", |
| ... | ... | @@ -467,11 +477,11 @@ const handleOrder = (orderId) => { |
| 467 | 477 | }) |
| 468 | 478 | } |
| 469 | 479 | |
| 470 | -// 接收派单 | |
| 480 | +// 接收订单 | |
| 471 | 481 | const driverHandleOrder = (orderId) => { |
| 472 | 482 | updateOrder({ garOrderId: orderId, handleType: 0 }).then(res => { |
| 473 | 483 | if (res.data.success) { |
| 474 | - if (res.data.data === "派单已经被别人接受啦") { | |
| 484 | + if (res.data.data === "订单已经被别人接受啦") { | |
| 475 | 485 | uni.$u.toast(res.data.data) |
| 476 | 486 | uni.$u.route({ |
| 477 | 487 | type: "reLaunch", |
| ... | ... | @@ -510,16 +520,12 @@ const cleanStatus = (status) => { |
| 510 | 520 | return '清运完成'; |
| 511 | 521 | } |
| 512 | 522 | } |
| 513 | - | |
| 514 | -// /** | |
| 515 | -// * 上传图片 | |
| 516 | -// * @param {string} orderId | |
| 517 | -// * @param {string} putType | |
| 518 | -// */ | |
| 519 | -// const handleUploadImage = (orderId, putType) => { | |
| 520 | -// uni.$u.route(`pages/order/upload/index?orderId=${orderId}&putType=${putType}`) | |
| 521 | -// } | |
| 522 | - | |
| 523 | +const createQrCodeValid = (val) => { | |
| 524 | + // 获取本地地址拼接订单id | |
| 525 | + showUQRcode.value = true; | |
| 526 | + // const localAddress = `http://localhost:5173`; | |
| 527 | + qrCodeText.value = val; | |
| 528 | +} | |
| 523 | 529 | /** |
| 524 | 530 | * 上传图片 |
| 525 | 531 | * @param {string} orderId |
| ... | ... | @@ -528,9 +534,32 @@ const cleanStatus = (status) => { |
| 528 | 534 | const handleUploadImage = (orderId, putType) => { |
| 529 | 535 | uni.$u.route(`pages/order/other-home/upload/index?orderId=${orderId}`) |
| 530 | 536 | } |
| 531 | - | |
| 532 | - | |
| 533 | -const handleDispatchConfirm = (val) => { | |
| 537 | +const handleDisposalDispatchConfirm = (val) => { | |
| 538 | + console.log(val); | |
| 539 | + if (!val) { | |
| 540 | + return | |
| 541 | + } | |
| 542 | + let data = { | |
| 543 | + garOrderId: orderId.value, | |
| 544 | + dispatchList: [] | |
| 545 | + } | |
| 546 | + for (const key in val) { | |
| 547 | + data.dispatchList.push({ | |
| 548 | + ...val[key] | |
| 549 | + }); | |
| 550 | + } | |
| 551 | + console.log(data); | |
| 552 | + dispatchDisposalOrders(data).then(res => { | |
| 553 | + if (res.data.success) { | |
| 554 | + uni.$u.toast(res.data.msg) | |
| 555 | + } else { | |
| 556 | + uni.$u.toast("指定人员失败,请重试") | |
| 557 | + } | |
| 558 | + clashDriverDispatchRef.value.close() | |
| 559 | + }) | |
| 560 | +} | |
| 561 | +// 指定人员 | |
| 562 | +const handleDriverDispatchConfirm = (val) => { | |
| 534 | 563 | console.log(val); |
| 535 | 564 | if (!val) { |
| 536 | 565 | return |
| ... | ... | @@ -549,9 +578,9 @@ const handleDispatchConfirm = (val) => { |
| 549 | 578 | if (res.data.success) { |
| 550 | 579 | uni.$u.toast(res.data.msg) |
| 551 | 580 | } else { |
| 552 | - uni.$u.toast("派单下发失败,请重试") | |
| 581 | + uni.$u.toast("指定人员失败,请重试") | |
| 553 | 582 | } |
| 554 | - clashDispatchRef.value.close() | |
| 583 | + clashDriverDispatchRef.value.close() | |
| 555 | 584 | }) |
| 556 | 585 | } |
| 557 | 586 | ... | ... |
garbage-removal/src/pages/order/other-home/evaluate-info/index.vue
| ... | ... | @@ -4,13 +4,13 @@ |
| 4 | 4 | <view class="user-info-title"> |
| 5 | 5 | <u-avatar :src="pic" size="70"></u-avatar> |
| 6 | 6 | <view class="user-name"> |
| 7 | - 居民用户 | |
| 7 | + 用户 | |
| 8 | 8 | </view> |
| 9 | 9 | </view> |
| 10 | 10 | <view v-if="evaluateUser" class="evaluate-content"> |
| 11 | 11 | <view class="evaluate-score"> |
| 12 | - <u-icon v-for="todo in maxStar" :name="evaluateUser.garEvaluateScore > todo ? 'star-fill' : 'star'" :key="todo" | |
| 13 | - color="#f9ae3d" size="28"></u-icon> | |
| 12 | + <u-icon v-for="todo in maxStar" :name="evaluateUser.garEvaluateScore > todo ? 'star-fill' : 'star'" | |
| 13 | + :key="todo" color="#f9ae3d" size="28"></u-icon> | |
| 14 | 14 | </view> |
| 15 | 15 | <view class="evaluate-txt"> |
| 16 | 16 | {{ evaluateUser.garEvaluateContent }} |
| ... | ... | @@ -24,7 +24,7 @@ |
| 24 | 24 | <view class="user-info-title"> |
| 25 | 25 | <u-avatar :src="pic" size="70"></u-avatar> |
| 26 | 26 | <view class="user-name"> |
| 27 | - 企业负责人 | |
| 27 | + 运输企业负责人 | |
| 28 | 28 | </view> |
| 29 | 29 | </view> |
| 30 | 30 | <view v-if="evaluateManager" class="evaluate-content"> |
| ... | ... | @@ -55,7 +55,7 @@ const maxStar = ref([]) |
| 55 | 55 | |
| 56 | 56 | // 用户评价对象 |
| 57 | 57 | const evaluateUser = ref() |
| 58 | -// 企业负责人评价 | |
| 58 | +// 运输企业负责人评价 | |
| 59 | 59 | const evaluateManager = ref() |
| 60 | 60 | onLoad((options) => { |
| 61 | 61 | for (let index = 0; index < maxScore; index++) { | ... | ... |
garbage-removal/src/pages/order/other-home/evaluate/index.vue
| 1 | 1 | <template> |
| 2 | 2 | <view class='issue'> |
| 3 | 3 | <view class="issue-head"> |
| 4 | - <text class="issue-head-title">派单评价</text> | |
| 4 | + <text class="issue-head-title">订单评价</text> | |
| 5 | 5 | <view class="issue-head-star-box"> |
| 6 | 6 | <u-icon v-for="(todo, index) in maxStar" :name="score > todo ? 'star-fill' : 'star'" :key="todo" color="#f9ae3d" |
| 7 | 7 | size="28" @click="setScore(index + 1)"></u-icon> |
| ... | ... | @@ -47,7 +47,7 @@ const blur = (e) => { |
| 47 | 47 | } |
| 48 | 48 | onLoad((options) => { |
| 49 | 49 | orderId.value = options.orderId |
| 50 | - evaluateType.value = options.userType === "居民用户" ? 0 : 1 | |
| 50 | + evaluateType.value = options.userType === "用户" ? 0 : 1 | |
| 51 | 51 | // 积分初始化 |
| 52 | 52 | for (let index = 0; index < maxScore.value; index++) { |
| 53 | 53 | maxStar.value.push(index); | ... | ... |
garbage-removal/src/pages/order/other-home/guest/index.vue
| ... | ... | @@ -17,17 +17,17 @@ |
| 17 | 17 | <text v-if="dataGram.garCancelFlag == 0" style="color: red;">请于交易完成后线下支付!!</text> |
| 18 | 18 | <view v-else style="display: flex; color:red;"> |
| 19 | 19 | <u-icon name="close-circle" color="red"></u-icon> |
| 20 | - <text> 派单已被取消!原因:{{ dataGram.garReason }}</text> | |
| 20 | + <text> 订单已被取消!原因:{{ dataGram.garReason }}</text> | |
| 21 | 21 | </view> |
| 22 | 22 | </view> |
| 23 | - <!-- 派单信息 --> | |
| 23 | + <!-- 订单信息 --> | |
| 24 | 24 | <view class="order-detail-container-box-card"> |
| 25 | 25 | <view class="order-detail-container-header-card-title"> |
| 26 | 26 | <view class="order-detail-container-header-card-uicon"></view> |
| 27 | - 派单信息 | |
| 27 | + 订单信息 | |
| 28 | 28 | </view> |
| 29 | 29 | <view class="order-detail-container-header-item"> |
| 30 | - <text class="order-detail-container-header-title">派单地点:</text> | |
| 30 | + <text class="order-detail-container-header-title">订单地点:</text> | |
| 31 | 31 | <view class="order-detail-container-header-content"> |
| 32 | 32 | {{ dataGram.garOrderAddress + dataGram.garOrderAddressDetails }} |
| 33 | 33 | </view> |
| ... | ... | @@ -58,7 +58,7 @@ |
| 58 | 58 | </view> |
| 59 | 59 | </view> |
| 60 | 60 | <view class="order-detail-container-header-item"> |
| 61 | - <text class="order-detail-container-header-title">派单号:</text> | |
| 61 | + <text class="order-detail-container-header-title">订单号:</text> | |
| 62 | 62 | <view class="order-detail-container-header-content"> |
| 63 | 63 | {{ orderId }} |
| 64 | 64 | </view> |
| ... | ... | @@ -66,14 +66,14 @@ |
| 66 | 66 | </view> |
| 67 | 67 | |
| 68 | 68 | </view> |
| 69 | - <!-- 派单记录 --> | |
| 69 | + <!-- 订单记录 --> | |
| 70 | 70 | <view class="order-detail-container-box-card"> |
| 71 | 71 | <view class="order-detail-container-header-card-title"> |
| 72 | 72 | <view class="order-detail-container-header-card-uicon"></view> |
| 73 | - 派单人员 | |
| 73 | + 订单人员 | |
| 74 | 74 | </view> |
| 75 | 75 | <!-- <view class="order-detail-container-header-item"> |
| 76 | - <text class="order-detail-container-header-title">派单时间:</text> | |
| 76 | + <text class="order-detail-container-header-title">订单时间:</text> | |
| 77 | 77 | <view class="order-detail-container-header-content"> |
| 78 | 78 | {{ dataGram.garCreateTime }} |
| 79 | 79 | </view> |
| ... | ... | @@ -93,7 +93,7 @@ |
| 93 | 93 | </view> |
| 94 | 94 | </view> |
| 95 | 95 | <view class="order-detail-container-header-item"> |
| 96 | - <text class="order-detail-container-header-title">派单人:</text> | |
| 96 | + <text class="order-detail-container-header-title">订单人:</text> | |
| 97 | 97 | <view class="order-detail-container-header-content"> |
| 98 | 98 | {{ dataGram.garOrderContactName }} |
| 99 | 99 | </view> | ... | ... |
garbage-removal/src/pages/order/other-home/index.vue
| ... | ... | @@ -31,10 +31,6 @@ const translation = (e) => { |
| 31 | 31 | } |
| 32 | 32 | </script> |
| 33 | 33 | <style lang="scss" scoped> |
| 34 | -::v-deep .u-tabs__wrapper__scroll-view { | |
| 35 | - background-color: #53c21d; | |
| 36 | -} | |
| 37 | - | |
| 38 | 34 | .swiper { |
| 39 | 35 | height: 100%; |
| 40 | 36 | background: linear-gradient(to bottom, $u-success-dark, $u-bg-color, $u-bg-color, $u-bg-color, $u-bg-color, $u-bg-color, $u-bg-color); | ... | ... |
garbage-removal/src/pages/order/other-home/swiper-list-item/index.vue
| ... | ... | @@ -11,20 +11,20 @@ |
| 11 | 11 | <u-icon name="arrow-right" color="rgb(203,203,203)" :size="26"></u-icon> |
| 12 | 12 | </view> |
| 13 | 13 | <view style="display: flex;align-items: center;"> |
| 14 | - <text v-if="item.garOrderHandlerStatus != 3 && item.garOrderStatus === 3 && userType === '运输驾驶员'" | |
| 15 | - style="font-size: small;color: #f56c6c;">派单已经完成了。</text> | |
| 14 | + <text v-if="item.garOrderHandlerStatus != 3 && item.garOrderStatus === 3 && userType === '清运车辆驾驶员'" | |
| 15 | + style="font-size: small;color: #f56c6c;">订单已经完成了。</text> | |
| 16 | 16 | <view v-if="item.garOrderHandlerStatus === 0 && item.garCancelFlag === 0" class="right">待清运 </view> |
| 17 | 17 | <view v-if="item.garCancelFlag === 1" class="right">已取消 </view> |
| 18 | 18 | <view v-if="item.garOrderHandlerStatus === 1 && item.garCancelFlag === 0" class="right">清运中 </view> |
| 19 | - <view v-if="item.garOrderHandlerStatus === 3 && userType === '运输驾驶员'" class="right">已完成 </view> | |
| 19 | + <view v-if="item.garOrderHandlerStatus === 3 && userType === '清运车辆驾驶员'" class="right">已完成 </view> | |
| 20 | 20 | </view> |
| 21 | - <view v-if="item.garEvaluateFlag === 0 && userType === '居民用户'" class="right">待评价 | |
| 21 | + <view v-if="item.garEvaluateFlag === 0 && userType === '用户'" class="right">待评价 | |
| 22 | 22 | </view> |
| 23 | - <view v-if="item.garHandlerEvaluateFlag === 0 && userType === '企业负责人'" class="right">待评价 | |
| 23 | + <view v-if="item.garHandlerEvaluateFlag === 0 && userType === '运输企业负责人'" class="right">待评价 | |
| 24 | 24 | </view> |
| 25 | - <view v-if="item.garEvaluateFlag === 1 && userType === '居民用户'" class="right">已评价 | |
| 25 | + <view v-if="item.garEvaluateFlag === 1 && userType === '用户'" class="right">已评价 | |
| 26 | 26 | </view> |
| 27 | - <view v-if="item.garHandlerEvaluateFlag === 1 && userType === '企业负责人'" class="right">已评价 | |
| 27 | + <view v-if="item.garHandlerEvaluateFlag === 1 && userType === '运输企业负责人'" class="right">已评价 | |
| 28 | 28 | </view> |
| 29 | 29 | </view> |
| 30 | 30 | <view class="item" @click="handleClick(item.garOrderId)"> |
| ... | ... | @@ -41,11 +41,11 @@ |
| 41 | 41 | <view class="more"> |
| 42 | 42 | <!-- <u-icon name="more-dot-fill" color="rgb(203,203,203)"></u-icon> --> |
| 43 | 43 | </view> |
| 44 | - <view hover-class="btn-hover" class="logistics btn" @click="handleCancelOrder(item.garOrderId)">取消派单</view> | |
| 44 | + <view hover-class="btn-hover" class="logistics btn" @click="handleCancelOrder(item.garOrderId)">取消订单</view> | |
| 45 | 45 | </view> |
| 46 | 46 | <!-- 用户对公司评价 --> |
| 47 | 47 | <view class="bottom" |
| 48 | - v-if="item.garEvaluateFlag === 0 && item.garOrderHandlerStatus === 3 && userType === '居民用户'"> | |
| 48 | + v-if="item.garEvaluateFlag === 0 && item.garOrderHandlerStatus === 3 && userType === '用户'"> | |
| 49 | 49 | <view class="more"> |
| 50 | 50 | <!-- <u-icon name="more-dot-fill" color="rgb(203,203,203)"></u-icon> --> |
| 51 | 51 | </view> |
| ... | ... | @@ -55,7 +55,7 @@ |
| 55 | 55 | </view> |
| 56 | 56 | <!-- 公司对用户评价 --> |
| 57 | 57 | <view class="bottom" |
| 58 | - v-if="item.garHandlerEvaluateFlag === 0 && item.garOrderHandlerStatus === 3 && userType === '企业负责人'"> | |
| 58 | + v-if="item.garHandlerEvaluateFlag === 0 && item.garOrderHandlerStatus === 3 && userType === '运输企业负责人'"> | |
| 59 | 59 | <view class="more"> |
| 60 | 60 | <!-- <u-icon name="more-dot-fill" color="rgb(203,203,203)"></u-icon> --> |
| 61 | 61 | </view> |
| ... | ... | @@ -67,7 +67,7 @@ |
| 67 | 67 | </view> |
| 68 | 68 | </z-paging> |
| 69 | 69 | <u-action-sheet :closeOnClickOverlay="true" :closeOnClickAction="false" @actionSheetClose="handleClose" |
| 70 | - @submitFunction="submitFunction" @select="selectClick" :actions="list" round="15" title="取消派单" :show="cancelShow"> | |
| 70 | + @submitFunction="submitFunction" @select="selectClick" :actions="list" round="15" title="取消订单" :show="cancelShow"> | |
| 71 | 71 | </u-action-sheet> |
| 72 | 72 | </view> |
| 73 | 73 | </template> |
| ... | ... | @@ -96,7 +96,7 @@ const list = ref([ |
| 96 | 96 | name: '长时间无人接单', |
| 97 | 97 | }, |
| 98 | 98 | { |
| 99 | - name: '派单信息填写有误', | |
| 99 | + name: '订单信息填写有误', | |
| 100 | 100 | }, |
| 101 | 101 | { |
| 102 | 102 | name: '线下协商有问题', |
| ... | ... | @@ -115,7 +115,7 @@ const dataList = ref([]); |
| 115 | 115 | const paging = ref(null); |
| 116 | 116 | const firstLoaded = ref(false) |
| 117 | 117 | /** |
| 118 | - * 取消派单 | |
| 118 | + * 取消订单 | |
| 119 | 119 | * @param {string} orderId |
| 120 | 120 | */ |
| 121 | 121 | const handleCancelOrder = (orderId) => { |
| ... | ... | @@ -140,7 +140,7 @@ const selectClick = (index) => { |
| 140 | 140 | currentCancelName.value = index.name; |
| 141 | 141 | } |
| 142 | 142 | /** |
| 143 | - * 提交取消派单 | |
| 143 | + * 提交取消订单 | |
| 144 | 144 | */ |
| 145 | 145 | const submitFunction = (otherReason) => { |
| 146 | 146 | let reason = otherReason |
| ... | ... | @@ -148,7 +148,7 @@ const submitFunction = (otherReason) => { |
| 148 | 148 | reason = currentCancelName.value |
| 149 | 149 | } |
| 150 | 150 | if (!reason) { |
| 151 | - uni.$u.toast("请提供取消派单的原因") | |
| 151 | + uni.$u.toast("请提供取消订单的原因") | |
| 152 | 152 | return |
| 153 | 153 | } |
| 154 | 154 | let params = { |
| ... | ... | @@ -174,7 +174,7 @@ const handleClick = (orderId) => { |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | /** |
| 177 | - * 派单评价 | |
| 177 | + * 订单评价 | |
| 178 | 178 | * @param {*} orderId |
| 179 | 179 | */ |
| 180 | 180 | const handleUserEvaluate = (orderId, userType) => { | ... | ... |
garbage-removal/src/pages/wode/choose/index.vue
garbage-removal/src/pages/wode/index.vue
| ... | ... | @@ -6,13 +6,13 @@ |
| 6 | 6 | </view> |
| 7 | 7 | <view class="u-flex-1"> |
| 8 | 8 | <view class="u-font-18 u-p-b-20">{{ userInfo.userType }}</view> |
| 9 | - <view class="manager-info" v-if="userInfo.userType === '运输驾驶员'"> | |
| 9 | + <view class="manager-info" v-if="userInfo.userType === '清运车辆驾驶员'"> | |
| 10 | 10 | <view class="manager-info-transport-company-name"> |
| 11 | 11 | <text style="margin-right: 20rpx;">所属运输公司:</text> |
| 12 | 12 | <text>{{ userInfo.transportCompanyName }}</text> |
| 13 | 13 | </view> |
| 14 | 14 | </view> |
| 15 | - <view class="manager-info" v-if="userInfo.userType === '企业负责人'"> | |
| 15 | + <view class="manager-info" v-if="userInfo.userType === '运输企业负责人'"> | |
| 16 | 16 | <view class="manager-info-transport-company-name"> |
| 17 | 17 | <text style="margin-right: 20rpx;">所属运输公司:</text> |
| 18 | 18 | <text>{{ userInfo.transportCompanyName }}</text> |
| ... | ... | @@ -48,6 +48,7 @@ |
| 48 | 48 | import { loginOut } from "@/apis/user"; |
| 49 | 49 | import headImg from "@/static/image/st_pic.png"; |
| 50 | 50 | import { useMainStore } from "@/stores/index"; |
| 51 | +import { setRequestToken } from '@/utils/request/request.js'; | |
| 51 | 52 | import { computed, ref } from "vue"; |
| 52 | 53 | const store = useMainStore(); |
| 53 | 54 | const pic = ref(headImg) |
| ... | ... | @@ -67,6 +68,7 @@ const handleLoginOut = () => { |
| 67 | 68 | loginOut().then(res => { |
| 68 | 69 | if (res.data.success) { |
| 69 | 70 | store.token = null; |
| 71 | + setRequestToken(); | |
| 70 | 72 | uni.$u.toast("已退出") |
| 71 | 73 | uni.$u.route({ |
| 72 | 74 | type: "reLaunch", | ... | ... |
garbage-removal/src/static/icon/download.zip deleted
100644 → 0
No preview for this file type
garbage-removal/src/utils/request/request.js
| ... | ... | @@ -52,7 +52,7 @@ const instance = axios.create({ |
| 52 | 52 | // 请求拦截器 |
| 53 | 53 | instance.interceptors.request.use((config) => { |
| 54 | 54 | if (requestUrlCheck(config.url)) { |
| 55 | - setRequestToken(null); | |
| 55 | + setRequestToken(); | |
| 56 | 56 | } |
| 57 | 57 | if (config.method.toLocaleLowerCase() == "get") { |
| 58 | 58 | handleGet(config); |
| ... | ... | @@ -95,11 +95,15 @@ instance.interceptors.response.use((response) => { |
| 95 | 95 | export default instance; |
| 96 | 96 | |
| 97 | 97 | export function setRequestToken(token) { |
| 98 | - instance.defaults.headers.common["Authorization"] = `${token}`; | |
| 98 | + if (token) { | |
| 99 | + instance.defaults.headers.common["Authorization"] = `${token}`; | |
| 100 | + } else { | |
| 101 | + delete instance.defaults.headers.common["Authorization"]; | |
| 102 | + } | |
| 99 | 103 | } |
| 100 | 104 | |
| 101 | 105 | const reSetLoginStatus = () => { |
| 102 | - setRequestToken(null); | |
| 106 | + setRequestToken(); | |
| 103 | 107 | |
| 104 | 108 | // uni确定是否需要跳转登录页 |
| 105 | 109 | uni.showModal({ | ... | ... |
garbage-removal/src/uview-plus/components/u-empty/u-empty.vue
| ... | ... | @@ -3,10 +3,10 @@ |
| 3 | 3 | <u-icon v-if="!isSrc" :name="mode === 'message' ? 'chat' : `empty-${mode}`" :size="iconSize" :color="iconColor" |
| 4 | 4 | margin-top="14"></u-icon> |
| 5 | 5 | <image v-else :style="{ |
| 6 | - width: $u.addUnit(width), | |
| 7 | - height: $u.addUnit(height), | |
| 8 | - }" :src="icon" mode="widthFix"></image> | |
| 9 | - <text class="u-empty__text" :style="[textStyle]">{{text ? text : icons[mode]}}</text> | |
| 6 | + width: $u.addUnit(width), | |
| 7 | + height: $u.addUnit(height), | |
| 8 | + }" :src="icon" mode="widthFix"></image> | |
| 9 | + <text class="u-empty__text" :style="[textStyle]">{{ text ? text : icons[mode] }}</text> | |
| 10 | 10 | <view class="u-empty__wrap" v-if="$slots.default || $slots.$default"> |
| 11 | 11 | <slot /> |
| 12 | 12 | </view> |
| ... | ... | @@ -14,75 +14,75 @@ |
| 14 | 14 | </template> |
| 15 | 15 | |
| 16 | 16 | <script> |
| 17 | - import mixin from '../../libs/mixin/mixin.js'; | |
| 17 | +import mixin from '../../libs/mixin/mixin.js'; | |
| 18 | 18 | import mpMixin from '../../libs/mixin/mpMixin.js'; |
| 19 | 19 | import props from './props.js'; |
| 20 | - /** | |
| 21 | - * empty 内容为空 | |
| 22 | - * @description 该组件用于需要加载内容,但是加载的第一页数据就为空,提示一个"没有内容"的场景, 我们精心挑选了十几个场景的图标,方便您使用。 | |
| 23 | - * @tutorial https://ijry.github.io/uview-plus/components/empty.html | |
| 24 | - * @property {String} icon 内置图标名称,或图片路径,建议绝对路径 | |
| 25 | - * @property {String} text 提示文字 | |
| 26 | - * @property {String} textColor 文字颜色 (默认 '#c0c4cc' ) | |
| 27 | - * @property {String | Number} textSize 文字大小 (默认 14 ) | |
| 28 | - * @property {String} iconColor 图标的颜色 (默认 '#c0c4cc' ) | |
| 29 | - * @property {String | Number} iconSize 图标的大小 (默认 90 ) | |
| 30 | - * @property {String} mode 选择预置的图标类型 (默认 'data' ) | |
| 31 | - * @property {String | Number} width 图标宽度,单位px (默认 160 ) | |
| 32 | - * @property {String | Number} height 图标高度,单位px (默认 160 ) | |
| 33 | - * @property {Boolean} show 是否显示组件 (默认 true ) | |
| 34 | - * @property {String | Number} marginTop 组件距离上一个元素之间的距离,默认px单位 (默认 0 ) | |
| 35 | - * @property {Object} customStyle 定义需要用到的外部样式 | |
| 36 | - * | |
| 37 | - * @event {Function} click 点击组件时触发 | |
| 38 | - * @event {Function} close 点击关闭按钮时触发 | |
| 39 | - * @example <u-empty text="所谓伊人,在水一方" mode="list"></u-empty> | |
| 40 | - */ | |
| 41 | - export default { | |
| 42 | - name: "u-empty", | |
| 43 | - mixins: [mpMixin, mixin, props], | |
| 44 | - data() { | |
| 45 | - return { | |
| 46 | - icons: { | |
| 47 | - car: '购物车为空', | |
| 48 | - page: '页面不存在', | |
| 49 | - search: '没有搜索结果', | |
| 50 | - address: '没有收货地址', | |
| 51 | - wifi: '没有WiFi', | |
| 52 | - order: '派单为空', | |
| 53 | - coupon: '没有优惠券', | |
| 54 | - favor: '暂无收藏', | |
| 55 | - permission: '无权限', | |
| 56 | - history: '无历史记录', | |
| 57 | - news: '无新闻列表', | |
| 58 | - message: '消息列表为空', | |
| 59 | - list: '列表为空', | |
| 60 | - data: '数据为空', | |
| 61 | - comment: '暂无评论', | |
| 62 | - } | |
| 20 | +/** | |
| 21 | + * empty 内容为空 | |
| 22 | + * @description 该组件用于需要加载内容,但是加载的第一页数据就为空,提示一个"没有内容"的场景, 我们精心挑选了十几个场景的图标,方便您使用。 | |
| 23 | + * @tutorial https://ijry.github.io/uview-plus/components/empty.html | |
| 24 | + * @property {String} icon 内置图标名称,或图片路径,建议绝对路径 | |
| 25 | + * @property {String} text 提示文字 | |
| 26 | + * @property {String} textColor 文字颜色 (默认 '#c0c4cc' ) | |
| 27 | + * @property {String | Number} textSize 文字大小 (默认 14 ) | |
| 28 | + * @property {String} iconColor 图标的颜色 (默认 '#c0c4cc' ) | |
| 29 | + * @property {String | Number} iconSize 图标的大小 (默认 90 ) | |
| 30 | + * @property {String} mode 选择预置的图标类型 (默认 'data' ) | |
| 31 | + * @property {String | Number} width 图标宽度,单位px (默认 160 ) | |
| 32 | + * @property {String | Number} height 图标高度,单位px (默认 160 ) | |
| 33 | + * @property {Boolean} show 是否显示组件 (默认 true ) | |
| 34 | + * @property {String | Number} marginTop 组件距离上一个元素之间的距离,默认px单位 (默认 0 ) | |
| 35 | + * @property {Object} customStyle 定义需要用到的外部样式 | |
| 36 | + * | |
| 37 | + * @event {Function} click 点击组件时触发 | |
| 38 | + * @event {Function} close 点击关闭按钮时触发 | |
| 39 | + * @example <u-empty text="所谓伊人,在水一方" mode="list"></u-empty> | |
| 40 | + */ | |
| 41 | +export default { | |
| 42 | + name: "u-empty", | |
| 43 | + mixins: [mpMixin, mixin, props], | |
| 44 | + data() { | |
| 45 | + return { | |
| 46 | + icons: { | |
| 47 | + car: '购物车为空', | |
| 48 | + page: '页面不存在', | |
| 49 | + search: '没有搜索结果', | |
| 50 | + address: '没有收货地址', | |
| 51 | + wifi: '没有WiFi', | |
| 52 | + order: '订单为空', | |
| 53 | + coupon: '没有优惠券', | |
| 54 | + favor: '暂无收藏', | |
| 55 | + permission: '无权限', | |
| 56 | + history: '无历史记录', | |
| 57 | + news: '无新闻列表', | |
| 58 | + message: '消息列表为空', | |
| 59 | + list: '列表为空', | |
| 60 | + data: '数据为空', | |
| 61 | + comment: '暂无评论', | |
| 63 | 62 | } |
| 63 | + } | |
| 64 | + }, | |
| 65 | + computed: { | |
| 66 | + // 组件样式 | |
| 67 | + emptyStyle() { | |
| 68 | + const style = {} | |
| 69 | + style.marginTop = uni.$u.addUnit(this.marginTop) | |
| 70 | + // 合并customStyle样式,此参数通过mixin中的props传递 | |
| 71 | + return uni.$u.deepMerge(uni.$u.addStyle(this.customStyle), style) | |
| 64 | 72 | }, |
| 65 | - computed: { | |
| 66 | - // 组件样式 | |
| 67 | - emptyStyle() { | |
| 68 | - const style = {} | |
| 69 | - style.marginTop = uni.$u.addUnit(this.marginTop) | |
| 70 | - // 合并customStyle样式,此参数通过mixin中的props传递 | |
| 71 | - return uni.$u.deepMerge(uni.$u.addStyle(this.customStyle), style) | |
| 72 | - }, | |
| 73 | - // 文本样式 | |
| 74 | - textStyle() { | |
| 75 | - const style = {} | |
| 76 | - style.color = this.textColor | |
| 77 | - style.fontSize = uni.$u.addUnit(this.textSize) | |
| 78 | - return style | |
| 79 | - }, | |
| 80 | - // 判断icon是否图片路径 | |
| 81 | - isSrc() { | |
| 82 | - return this.icon.indexOf('/') >= 0 | |
| 83 | - } | |
| 73 | + // 文本样式 | |
| 74 | + textStyle() { | |
| 75 | + const style = {} | |
| 76 | + style.color = this.textColor | |
| 77 | + style.fontSize = uni.$u.addUnit(this.textSize) | |
| 78 | + return style | |
| 79 | + }, | |
| 80 | + // 判断icon是否图片路径 | |
| 81 | + isSrc() { | |
| 82 | + return this.icon.indexOf('/') >= 0 | |
| 84 | 83 | } |
| 85 | 84 | } |
| 85 | +} | |
| 86 | 86 | </script> |
| 87 | 87 | |
| 88 | 88 | <style lang="scss" scoped> | ... | ... |