Commit ff4f8ac13240c6c1e63591bc9fc60766f1f2eb3e
1 parent
dd38c11c
feat: 驾驶员操作与用户和企业隔离
Showing
18 changed files
with
1340 additions
and
55 deletions
Too many changes to show.
To preserve performance only 18 of 19 files are displayed.
garbage-removal/src/apis/order.js
| ... | ... | @@ -94,3 +94,7 @@ export async function askTransport(params,config) { |
| 94 | 94 | export async function scanDetail(askId) { |
| 95 | 95 | return await request.get(`/order/scan/detail/${askId}`); |
| 96 | 96 | } |
| 97 | + | |
| 98 | +export async function createHandlerQrCode(orderId) { | |
| 99 | + return await request.get(`/order/handler/qrCode/${orderId}`); | |
| 100 | +} | ... | ... |
garbage-removal/src/components/clash-driver-dispatch/index.vue
| ... | ... | @@ -19,7 +19,7 @@ |
| 19 | 19 | </next-tree> |
| 20 | 20 | </template> |
| 21 | 21 | |
| 22 | -<script setup > | |
| 22 | +<script setup> | |
| 23 | 23 | import { nextTick, ref, unref } from 'vue'; |
| 24 | 24 | // @ts-ignore |
| 25 | 25 | import nextTree from '../next-tree/next-tree.vue'; |
| ... | ... | @@ -91,6 +91,7 @@ function handlerTreeData(dataList) { |
| 91 | 91 | "children": item.personnelInfo.map((childrenItem, childrenIndex) => { |
| 92 | 92 | return { |
| 93 | 93 | "id": (index + 1) + '-' + (childrenIndex + 1), |
| 94 | + "garOrderContainerVolume": item.containerVolume, | |
| 94 | 95 | "tel": childrenItem.tel, |
| 95 | 96 | "name": childrenItem.name, |
| 96 | 97 | "label": childrenItem.name + '-' + childrenItem.tel, | ... | ... |
garbage-removal/src/pages.json
| ... | ... | @@ -71,6 +71,14 @@ |
| 71 | 71 | "enablePullDownRefresh": false |
| 72 | 72 | } |
| 73 | 73 | },{ |
| 74 | + "path": "pages/order/driver-home/detail/index", | |
| 75 | + "style": { | |
| 76 | + "navigationBarTitleText": "订单详情", | |
| 77 | + "navigationBarTextStyle": "white", | |
| 78 | + "navigationBarBackgroundColor": "#19a97c", | |
| 79 | + "enablePullDownRefresh": false | |
| 80 | + } | |
| 81 | + },{ | |
| 74 | 82 | "path": "pages/order/other-home/success/index", |
| 75 | 83 | "style": { |
| 76 | 84 | "navigationBarTitleText": "完成订单", |
| ... | ... | @@ -87,7 +95,7 @@ |
| 87 | 95 | "enablePullDownRefresh": false |
| 88 | 96 | } |
| 89 | 97 | },{ |
| 90 | - "path": "pages/order/other-home/upload/index", | |
| 98 | + "path": "pages/order/driver-home/upload/index", | |
| 91 | 99 | "style": { |
| 92 | 100 | "navigationBarTitleText": "上传照片", |
| 93 | 101 | "navigationBarTextStyle": "white", | ... | ... |
garbage-removal/src/pages/order/driver-home/detail/index.vue
0 → 100644
| 1 | +<template> | |
| 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> | |
| 8 | + <view class="order-detail-container" v-if="dataGram != null || dataGram != undefined"> | |
| 9 | + <view class="order-detail-container-box"> | |
| 10 | + <view class="order-detail-top"> | |
| 11 | + <view class="order-detail-top-box"> | |
| 12 | + <view class="order-detail-top-box-step"> | |
| 13 | + <u-steps :current="currentStep(dataGram.garOrderHandlerStatus)" dot> | |
| 14 | + <u-steps-item title="待清运"></u-steps-item> | |
| 15 | + <u-steps-item title="清运中"></u-steps-item> | |
| 16 | + <u-steps-item title="已完成"></u-steps-item> | |
| 17 | + </u-steps> | |
| 18 | + </view> | |
| 19 | + </view> | |
| 20 | + </view> | |
| 21 | + <!-- 订单信息 --> | |
| 22 | + <view class="order-detail-container-box-card"> | |
| 23 | + <view class="order-detail-container-header-card-title"> | |
| 24 | + <view class="order-detail-container-header-card-uicon"></view> | |
| 25 | + 订单信息 | |
| 26 | + </view> | |
| 27 | + <view class="order-detail-container-header-item" | |
| 28 | + @click.stop="handlerJumpOtherApp(dataGram.garLatitude, dataGram.garLongitude, dataGram.garCoordinate)"> | |
| 29 | + <text class="order-detail-container-header-title">订单地点:</text> | |
| 30 | + <view class="order-detail-container-header-content" style="text-decoration: underline"> | |
| 31 | + <text selectable='true'>{{ dataGram.garOrderAddress + dataGram.garOrderAddressDetails }}</text> | |
| 32 | + </view> | |
| 33 | + </view> | |
| 34 | + <view class="order-detail-container-header-item"> | |
| 35 | + <text class="order-detail-container-header-title">现场图片:</text> | |
| 36 | + <view class="order-detail-container-header-content"> | |
| 37 | + <u-upload width="180" height="130" :fileList="currentImages" name="3" multiple :maxCount="10" | |
| 38 | + :previewFullImage="true" :isReadOnly="true"></u-upload> | |
| 39 | + </view> | |
| 40 | + </view> | |
| 41 | + <view class="order-detail-container-header-item"> | |
| 42 | + <text class="order-detail-container-header-title">负责单位:</text> | |
| 43 | + <view class="order-detail-container-header-content"> | |
| 44 | + {{ dataGram.garOrderCompanyName }} | |
| 45 | + </view> | |
| 46 | + </view> | |
| 47 | + <view class="order-detail-container-header-item"> | |
| 48 | + <text class="order-detail-container-header-title">垃圾类型:</text> | |
| 49 | + <view class="order-detail-container-header-content"> | |
| 50 | + {{ dataGram.garOrderTrashType }} | |
| 51 | + </view> | |
| 52 | + </view> | |
| 53 | + <view class="order-detail-container-header-item"> | |
| 54 | + <text class="order-detail-container-header-title">订单号:</text> | |
| 55 | + <view class="order-detail-container-header-content"> | |
| 56 | + <text selectable="true">{{ orderId }}</text> | |
| 57 | + </view> | |
| 58 | + <!-- 生成二维码 --> | |
| 59 | + <view class="order-detail-container-header-qrCode" style="display: flex; align-items: center;"> | |
| 60 | + <view @click="handleQrCodeClick(orderId)" class="iconfont icon-erweima-xian"></view> | |
| 61 | + </view> | |
| 62 | + </view> | |
| 63 | + </view> | |
| 64 | + <!-- 车辆信息 --> | |
| 65 | + <view class="order-detail-container-box-card"> | |
| 66 | + <view class="order-detail-container-header-card-title"> | |
| 67 | + <view class="order-detail-container-header-card-uicon"></view> | |
| 68 | + 车辆信息 | |
| 69 | + </view> | |
| 70 | + <view class="order-detail-container-header-item" style="justify-content: space-between;" | |
| 71 | + v-for="(item) in dataGram.garCarInfoList" :key="item.garId"> | |
| 72 | + <text class="order-detail-container-header-title" style="color: #303133;">{{ item.garOrderCarType }} | |
| 73 | + </text> | |
| 74 | + <view class="order-detail-container-header-content"> | |
| 75 | + <text class="order-detail-container-header-title"> | |
| 76 | + {{ cleanStatus(dataGram.garOrderHandlerStatus) }} | |
| 77 | + </text> | |
| 78 | + </view> | |
| 79 | + </view> | |
| 80 | + </view> | |
| 81 | + <!-- 订单记录 --> | |
| 82 | + <view class="order-detail-container-box-card"> | |
| 83 | + <view class="order-detail-container-header-card-title"> | |
| 84 | + <view class="order-detail-container-header-card-uicon"></view> | |
| 85 | + 订单人员 | |
| 86 | + </view> | |
| 87 | + <!-- <view class="order-detail-container-header-item"> | |
| 88 | + <text class="order-detail-container-header-title">订单时间:</text> | |
| 89 | + <view class="order-detail-container-header-content"> | |
| 90 | + {{ dataGram.garCreateTime }} | |
| 91 | + </view> | |
| 92 | + </view> --> | |
| 93 | + <view class="order-detail-container-header-item"> | |
| 94 | + <text class="order-detail-container-header-title">预约时间:</text> | |
| 95 | + <view class="order-detail-container-header-content"> | |
| 96 | + {{ dataGram.garOrderAgreementTime }} | |
| 97 | + </view> | |
| 98 | + </view> | |
| 99 | + <view class="order-detail-container-header-item"> | |
| 100 | + <text class="order-detail-container-header-title">联系电话:</text> | |
| 101 | + <view class="order-detail-container-header-content"> | |
| 102 | + <text selectable="true">{{ dataGram.garOrderContactTel }}</text> | |
| 103 | + <view class="icon-box" style="display: flex; align-items: center; justify-content: center;"> | |
| 104 | + <u-icon v-if="dataGram.handleFlag" name="phone" size="28" | |
| 105 | + @click="handleContactClick(dataGram.garOrderContactTel)"></u-icon> | |
| 106 | + </view> | |
| 107 | + </view> | |
| 108 | + </view> | |
| 109 | + <view class="order-detail-container-header-item"> | |
| 110 | + <text class="order-detail-container-header-title">订单人:</text> | |
| 111 | + <view class="order-detail-container-header-content"> | |
| 112 | + {{ dataGram.garOrderContactName }} | |
| 113 | + </view> | |
| 114 | + </view> | |
| 115 | + <view class="order-detail-container-header-item"> | |
| 116 | + <text class="order-detail-container-header-title">备注:</text> | |
| 117 | + <view class="order-detail-container-header-content"> | |
| 118 | + {{ dataGram.garRemark }} | |
| 119 | + </view> | |
| 120 | + </view> | |
| 121 | + </view> | |
| 122 | + <!-- 处理信息 --> | |
| 123 | + <view class="order-detail-container-box-card"> | |
| 124 | + <view class="order-detail-container-header-card-title"> | |
| 125 | + <view class="order-detail-container-header-card-uicon"></view> | |
| 126 | + 处理信息 | |
| 127 | + </view> | |
| 128 | + <view v-if="dataGram.garOrderHandlerId" style="width: 100%;"> | |
| 129 | + <!-- <view class="order-detail-container-header-item"> | |
| 130 | + <text class="order-detail-container-header-title">负责人:</text> | |
| 131 | + <view class="order-detail-container-header-content"> | |
| 132 | + {{ dataGram.garOrderHandleName }} | |
| 133 | + </view> | |
| 134 | + </view> --> | |
| 135 | + <view class="order-detail-container-header-item"> | |
| 136 | + <text class="order-detail-container-header-title">服务电话:</text> | |
| 137 | + <view class="order-detail-container-header-content"> | |
| 138 | + {{ dataGram.garOrderCompanyTel }} | |
| 139 | + </view> | |
| 140 | + </view> | |
| 141 | + <view class="order-detail-container-header-item"> | |
| 142 | + <text class=" order-detail-container-header-title">装车照片:</text> | |
| 143 | + <view class="order-detail-container-header-content"> | |
| 144 | + <u-upload width="180" height="130" :fileList="putOnImages" name="3" multiple :maxCount="20" | |
| 145 | + :previewFullImage="true" :isReadOnly="true"></u-upload> | |
| 146 | + </view> | |
| 147 | + </view> | |
| 148 | + <view class="order-detail-container-header-item"> | |
| 149 | + <text class=" order-detail-container-header-title">卸车照片:</text> | |
| 150 | + <view class="order-detail-container-header-content"> | |
| 151 | + <u-upload width="180" height="130" :fileList="putDownImages" name="3" multiple :maxCount="20" | |
| 152 | + :previewFullImage="true" :isReadOnly="true"></u-upload> | |
| 153 | + </view> | |
| 154 | + </view> | |
| 155 | + </view> | |
| 156 | + <view v-else class="empty-image" | |
| 157 | + style="width: 100%; display: flex; justify-content: center; align-items: center;"> | |
| 158 | + <image class="image-style" style="width: 200rpx; height: 200rpx;" :src="emptyBase64Image"></image> | |
| 159 | + </view> | |
| 160 | + </view> | |
| 161 | + <view class="space-box">{{ spaceStr }}</view> | |
| 162 | + </view> | |
| 163 | + <!-- 占位符 --> | |
| 164 | + <view class="order-detail-bottom"> | |
| 165 | + <view class="order-detail-bottom-box"> | |
| 166 | + <view class=" order-detail-bottom-left"> | |
| 167 | + <u-button | |
| 168 | + v-if="dataGram.garOrderHandlerStatus === 1 && dataGram.garCancelFlag === 0 && userType === '清运车辆驾驶员'" | |
| 169 | + @click="createQrCodeValid(orderId)" shape="square" color="#a9e08f" text="出示二维码"></u-button> | |
| 170 | + | |
| 171 | + </view> | |
| 172 | + <view class="order-detail-bottom-right"> | |
| 173 | + | |
| 174 | + <u-button @click="driverHandleOrder(orderId)" | |
| 175 | + v-if="dataGram.garOrderHandlerStatus === 0 && dataGram.handleFlag && dataGram.garCancelFlag === 0 && userType === '清运车辆驾驶员'" | |
| 176 | + shape="square" color="#a9e08f" text="处理订单"></u-button> | |
| 177 | + <u-button @click="handleOrder(orderId)" | |
| 178 | + v-if="dataGram.garOrderHandlerStatus === 0 && dataGram.handleFlag && dataGram.garCancelFlag === 0 && userType === '运输企业负责人'" | |
| 179 | + shape="square" color="#a9e08f" text="处理订单"></u-button> | |
| 180 | + <u-button @click="handleUploadImage(orderId, 'putOnImages')" | |
| 181 | + v-if="dataGram.garOrderHandlerStatus === 1 && dataGram.garCancelFlag === 0 && userType === '清运车辆驾驶员'" | |
| 182 | + shape="square" color="#a9e08f" text="上传图片"></u-button> | |
| 183 | + <u-button @click="handleEvaluate(orderId, userType)" | |
| 184 | + v-if="dataGram.garEvaluateFlag === 0 && userType === '用户'" shape="square" color="#a9e08f" | |
| 185 | + text="去评价"></u-button> | |
| 186 | + <u-button @click="handleEvaluate(orderId, userType)" | |
| 187 | + v-if="dataGram.garHandlerEvaluateFlag === 0 && userType === '运输企业负责人'" shape="square" color="#a9e08f" | |
| 188 | + text="去评价"></u-button> | |
| 189 | + <u-button @click="handleEvaluateDetail(orderId, userType)" | |
| 190 | + v-if="dataGram.garHandlerEvaluateFlag === 1 && userType === '运输企业负责人'" shape="square" color="#a9e08f" | |
| 191 | + text="查看评价"></u-button> | |
| 192 | + <u-button @click="handleEvaluateDetail(orderId, userType)" | |
| 193 | + v-if="dataGram.garEvaluateFlag === 1 && userType === '用户'" shape="square" color="#a9e08f" | |
| 194 | + text="查看评价"></u-button> | |
| 195 | + <u-button v-if="dataGram.garOrderHandlerStatus === 1 && userType == '运输企业负责人'" | |
| 196 | + @click="handleDisposalDispatchClick(orderId)" shape="square" color="#a9e08f" text="分配处置场所"></u-button> | |
| 197 | + | |
| 198 | + <!-- <u-button v-if="dataGram.garOrderHandlerStatus === 1 && dataGram.garCancelFlag === 0 && userType != '清运车辆驾驶员'" | |
| 199 | + @click="handleSubmitSuccess(orderId)" shape="square" color="#a9e08f" text="完成订单"></u-button> --> | |
| 200 | + </view> | |
| 201 | + </view> | |
| 202 | + </view> | |
| 203 | + <u-action-sheet :closeOnClickOverlay="true" :closeOnClickAction="false" @actionSheetClose="handleClose" | |
| 204 | + @submitFunction="submitFunction" @select="selectClick" :actions="list" round="15" title="取消订单" :show="cancelShow"> | |
| 205 | + </u-action-sheet> | |
| 206 | + </view> | |
| 207 | + <view v-if="showUQRcode" class="mask-container" @click="showUQRcode = false"> | |
| 208 | + <uqrcode :h5SaveIsDownload="true" ref="qrCodeRef" canvas-id="qrcode" :value="qrCodeText" | |
| 209 | + :options="{ margin: 10, boxSizing: borderBox }"></uqrcode> | |
| 210 | + </view> | |
| 211 | +</template> | |
| 212 | + | |
| 213 | +<script setup> | |
| 214 | +import { createHandlerQrCode, dispatchDisposalOrders, dispatchOrders, queryDisposalDispatch, queryOrderDetail, queryOrderDispatch, updateOrder } from "@/apis/order.js"; | |
| 215 | +import { createQrCode } from '@/apis/qrcode.js'; | |
| 216 | +import uqrcode from '@/components/Sansnn-uQRCode_4.0.6/components/uqrcode/uqrcode.vue'; | |
| 217 | +import clashDisposalDispatch from '@/components/clash-disposal-dispatch/index.vue'; | |
| 218 | +import clashDriverDispatch from '@/components/clash-driver-dispatch/index.vue'; | |
| 219 | +import zStatic from '@/components/z-paging/js/z-paging-static'; | |
| 220 | +import { useMainStore } from '@/stores/index.js'; | |
| 221 | +import { onLoad, onShow } from '@dcloudio/uni-app'; | |
| 222 | +import { computed, ref } from 'vue'; | |
| 223 | +const isOnloadIn = ref(false) | |
| 224 | +const clashDriverDispatchRef = ref() | |
| 225 | +const clashDisposalDispatchRef = ref() | |
| 226 | +const driverPersonnelList = ref([]) | |
| 227 | +const disposalPersonnelList = ref([]) | |
| 228 | +const store = useMainStore(); | |
| 229 | +const userType = computed(() => store.userType) | |
| 230 | +const dataGram = ref(); | |
| 231 | +const orderId = ref(null) | |
| 232 | +const currentImages = ref([]) | |
| 233 | +const putOnImages = ref([]) | |
| 234 | +const putDownImages = ref([]) | |
| 235 | +const emptyBase64Image = ref(zStatic.base64Empty) | |
| 236 | +const showUQRcode = ref(false) | |
| 237 | +const spaceStr = ref("") | |
| 238 | +const cancelShow = ref(false) | |
| 239 | +const currentCancelName = ref("") | |
| 240 | +const qrCodeRef = ref() | |
| 241 | +const qrCodeText = ref() | |
| 242 | +const list = computed(() => { | |
| 243 | + let reason = [ | |
| 244 | + { | |
| 245 | + name: '订单信息填写有误', | |
| 246 | + }, | |
| 247 | + { | |
| 248 | + name: '线下协商有问题', | |
| 249 | + }, | |
| 250 | + { | |
| 251 | + name: '不需要清运了', | |
| 252 | + }, | |
| 253 | + { | |
| 254 | + name: '其他', | |
| 255 | + }, | |
| 256 | + { | |
| 257 | + name: '提交', | |
| 258 | + } | |
| 259 | + ] | |
| 260 | + if (userType.value === '用户') { | |
| 261 | + reason.unshift({ | |
| 262 | + name: '长时间无人接单', | |
| 263 | + }) | |
| 264 | + } else { | |
| 265 | + reason.unshift({ | |
| 266 | + name: '无修改权限' | |
| 267 | + }) | |
| 268 | + } | |
| 269 | + return reason | |
| 270 | +}) | |
| 271 | + | |
| 272 | +// 创建二维码 | |
| 273 | +const createQrCodeLocal = (orderId) => { | |
| 274 | + // 获取本地地址拼接订单id | |
| 275 | + showUQRcode.value = true; | |
| 276 | + const hostname = window.location.hostname; | |
| 277 | + const port = window.location.port; | |
| 278 | + const protocol = window.location.protocol; | |
| 279 | + const localAddress = `${protocol}//${hostname}:${port}`; | |
| 280 | + // const localAddress = `http://localhost:5173`; | |
| 281 | + qrCodeText.value = localAddress + "/pages/order/other-home/guest/index?orderId=" + orderId; | |
| 282 | + console.log(qrCodeRef.value); | |
| 283 | +} | |
| 284 | +// 获取二维码 | |
| 285 | +const handleQrCodeClick = (orderId) => { | |
| 286 | + // 微信小程序可用 | |
| 287 | + // #ifdef MP-WEIXIN | |
| 288 | + createQrCode(orderId).then((res) => { | |
| 289 | + if (res.data.success) { | |
| 290 | + uni.previewImage({ | |
| 291 | + urls: [res.data.data], | |
| 292 | + longPressActions: { | |
| 293 | + itemList: ['发送给朋友', '保存图片', '收藏'], | |
| 294 | + success: function (res) { | |
| 295 | + console.log('选中了第' + (res.tapIndex + 1) + '个按钮'); | |
| 296 | + }, | |
| 297 | + fail: function (res) { | |
| 298 | + console.log(res); | |
| 299 | + } | |
| 300 | + } | |
| 301 | + }) | |
| 302 | + } | |
| 303 | + }) | |
| 304 | + // #endif | |
| 305 | + // H5 | |
| 306 | + // #ifdef H5 | |
| 307 | + createQrCodeLocal(orderId) | |
| 308 | + // #endif | |
| 309 | +} | |
| 310 | + | |
| 311 | +const handleOrderDispatchClick = (orderId) => { | |
| 312 | + // 获取驾驶员人员 | |
| 313 | + queryOrderDispatch(orderId).then(res => { | |
| 314 | + if (res.data.success) { | |
| 315 | + driverPersonnelList.value = res.data.data | |
| 316 | + clashDriverDispatchRef.value.open(res.data.data) | |
| 317 | + } else { | |
| 318 | + uni.$u.toast(res.data.message) | |
| 319 | + } | |
| 320 | + }) | |
| 321 | +} | |
| 322 | +const handleDisposalDispatchClick = (orderId) => { | |
| 323 | + // 获取处置场所人员 | |
| 324 | + queryDisposalDispatch(orderId).then(res => { | |
| 325 | + if (res.data.success) { | |
| 326 | + disposalPersonnelList.value = res.data.data | |
| 327 | + clashDisposalDispatchRef.value.open(res.data.data) | |
| 328 | + } else { | |
| 329 | + uni.$u.toast(res.data.message) | |
| 330 | + } | |
| 331 | + }) | |
| 332 | +} | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | +const handleClose = (e) => { | |
| 337 | + cancelShow.value = false | |
| 338 | +} | |
| 339 | +const handleEvaluateDetail = (orderId, userType) => { | |
| 340 | + uni.$u.route(`pages/order/other-home/evaluate-info/index`, | |
| 341 | + { orderId: orderId, userType: userType }) | |
| 342 | +} | |
| 343 | +const selectClick = (index) => { | |
| 344 | + currentCancelName.value = index.name; | |
| 345 | +} | |
| 346 | +const handleOrderDetail = (orderId) => { | |
| 347 | + queryOrderDetail(orderId).then(res => { | |
| 348 | + dataGram.value = res.data.data; | |
| 349 | + console.log(res.data.data); | |
| 350 | + currentImages.value = res.data.data.currentImages.map(item => { | |
| 351 | + return { url: import.meta.env.VITE_BASE_URL + item }; | |
| 352 | + }); | |
| 353 | + putOnImages.value = res.data.data.putOnImages.map(item => { | |
| 354 | + return { url: import.meta.env.VITE_BASE_URL + item }; | |
| 355 | + }); | |
| 356 | + putDownImages.value = res.data.data.putDownImages.map(item => { | |
| 357 | + return { url: import.meta.env.VITE_BASE_URL + item }; | |
| 358 | + }); | |
| 359 | + }) | |
| 360 | +} | |
| 361 | +/** | |
| 362 | + * 拨打电话回调 | |
| 363 | + */ | |
| 364 | +const handleContactClick = (val) => { | |
| 365 | + uni.makePhoneCall({ phoneNumber: val }).then(res => { | |
| 366 | + }).catch(err => { }); | |
| 367 | +} | |
| 368 | + | |
| 369 | +const handlerJumpOtherApp = (latitude, longitude, garCoordinate) => { | |
| 370 | + // 给出提示确定要跳转吗 | |
| 371 | + uni.showModal({ | |
| 372 | + title: '提示', | |
| 373 | + content: '是否跳转到app定位进行导航?', | |
| 374 | + success: function (res) { | |
| 375 | + if (res.confirm) { | |
| 376 | + uni.openLocation({ | |
| 377 | + latitude: latitude, | |
| 378 | + longitude: longitude, | |
| 379 | + success: function () { | |
| 380 | + console.log('success'); | |
| 381 | + } | |
| 382 | + }); | |
| 383 | + } | |
| 384 | + } | |
| 385 | + }) | |
| 386 | +} | |
| 387 | + | |
| 388 | +/** | |
| 389 | + * 取消订单 | |
| 390 | + * @param {*} orderId | |
| 391 | + */ | |
| 392 | +const handleOderCancelClick = () => { | |
| 393 | + cancelShow.value = true; | |
| 394 | +} | |
| 395 | + | |
| 396 | +/** | |
| 397 | + * 提交取消订单 | |
| 398 | + */ | |
| 399 | +const submitFunction = (otherReason) => { | |
| 400 | + let reason = otherReason | |
| 401 | + if (currentCancelName.value != "其他") { | |
| 402 | + reason = currentCancelName.value | |
| 403 | + } | |
| 404 | + if (!reason) { | |
| 405 | + uni.$u.toast("请提供取消订单的原因") | |
| 406 | + return | |
| 407 | + } | |
| 408 | + let params = { | |
| 409 | + garOrderId: orderId.value, | |
| 410 | + garCancelFlag: 1, | |
| 411 | + garReason: reason | |
| 412 | + } | |
| 413 | + updateOrder(params).then(res => { | |
| 414 | + if (res.data.success) { | |
| 415 | + cancelShow.value = false | |
| 416 | + uni.$u.toast(res.data.data) | |
| 417 | + uni.$u.route({ | |
| 418 | + type: "reLaunch", | |
| 419 | + url: `pages/order/index`, | |
| 420 | + }) | |
| 421 | + } | |
| 422 | + }) | |
| 423 | +} | |
| 424 | +// 提交完成 | |
| 425 | +const handleSubmitSuccess = (orderId) => { | |
| 426 | + uni.showModal({ | |
| 427 | + title: '提示', | |
| 428 | + content: '订单已经清运完成了吗?', | |
| 429 | + success: function (res) { | |
| 430 | + if (res.confirm) { | |
| 431 | + updateOrder({ garOrderId: orderId, handleType: 3 }).then(res => { | |
| 432 | + if (res.data.success) { | |
| 433 | + uni.$u.toast("已完成") | |
| 434 | + handleOrderDetail(orderId) | |
| 435 | + } | |
| 436 | + }) | |
| 437 | + } else if (res.cancel) { | |
| 438 | + } | |
| 439 | + } | |
| 440 | + }); | |
| 441 | + // uni.$u.route(`pages/order/success/index?orderId=${orderId}`) | |
| 442 | + | |
| 443 | +} | |
| 444 | +const handleEvaluate = (orderId, userType) => { | |
| 445 | + uni.$u.route(`pages/order/other-home/evaluate/index?orderId=${orderId}&userType=${userType}`) | |
| 446 | +} | |
| 447 | + | |
| 448 | +// 接收订单 | |
| 449 | +const handleOrder = (orderId) => { | |
| 450 | + updateOrder({ garOrderId: orderId, handleType: 0 }).then(res => { | |
| 451 | + if (res.data.success) { | |
| 452 | + if (res.data.data === "订单已经被别人接受啦") { | |
| 453 | + uni.$u.toast(res.data.data) | |
| 454 | + uni.$u.route({ | |
| 455 | + type: "reLaunch", | |
| 456 | + url: `pages/order/index`, | |
| 457 | + }) | |
| 458 | + } else { | |
| 459 | + uni.$u.toast(res.data.data) | |
| 460 | + handleOrderDetail(orderId) | |
| 461 | + } | |
| 462 | + } | |
| 463 | + }) | |
| 464 | +} | |
| 465 | + | |
| 466 | +// 接收订单 | |
| 467 | +const driverHandleOrder = (orderId) => { | |
| 468 | + updateOrder({ garOrderId: orderId, handleType: 0 }).then(res => { | |
| 469 | + if (res.data.success) { | |
| 470 | + if (res.data.data === "订单已经被别人接受啦") { | |
| 471 | + uni.$u.toast(res.data.data) | |
| 472 | + uni.$u.route({ | |
| 473 | + type: "reLaunch", | |
| 474 | + url: `pages/order/index`, | |
| 475 | + }) | |
| 476 | + } else { | |
| 477 | + uni.$u.toast(res.data.data) | |
| 478 | + handleOrderDetail(orderId) | |
| 479 | + } | |
| 480 | + } | |
| 481 | + }) | |
| 482 | +} | |
| 483 | + | |
| 484 | + | |
| 485 | +const currentStep = (step) => { | |
| 486 | + if (step > 2) { | |
| 487 | + return step - 1; | |
| 488 | + } | |
| 489 | + return step; | |
| 490 | +} | |
| 491 | + | |
| 492 | +/** | |
| 493 | + * 清运状态 | |
| 494 | + * @param {*} status | |
| 495 | + */ | |
| 496 | +const cleanStatus = (status) => { | |
| 497 | + if (dataGram.garCancelFlag === 1) { | |
| 498 | + return '取消清运'; | |
| 499 | + } | |
| 500 | + switch (status) { | |
| 501 | + case 0: | |
| 502 | + return '准备清运'; | |
| 503 | + case 1: | |
| 504 | + return '正在清运'; | |
| 505 | + case 3: | |
| 506 | + return '清运完成'; | |
| 507 | + } | |
| 508 | +} | |
| 509 | +const createQrCodeValid = (val) => { | |
| 510 | + createHandlerQrCode(val).then(res => { | |
| 511 | + // 获取本地地址拼接订单id | |
| 512 | + showUQRcode.value = true; | |
| 513 | + // const localAddress = `http://localhost:5173`; | |
| 514 | + qrCodeText.value = res.data.data; | |
| 515 | + }) | |
| 516 | +} | |
| 517 | +/** | |
| 518 | + * 上传图片 | |
| 519 | + * @param {string} orderId | |
| 520 | + * @param {string} putType | |
| 521 | + */ | |
| 522 | +const handleUploadImage = (orderId, putType) => { | |
| 523 | + uni.$u.route(`pages/order/other-home/upload/index?orderId=${orderId}`) | |
| 524 | +} | |
| 525 | +const handleDisposalDispatchConfirm = (val) => { | |
| 526 | + console.log(val); | |
| 527 | + if (!val) { | |
| 528 | + return | |
| 529 | + } | |
| 530 | + let data = { | |
| 531 | + garOrderId: orderId.value, | |
| 532 | + dispatchList: [] | |
| 533 | + } | |
| 534 | + for (const key in val) { | |
| 535 | + data.dispatchList.push({ | |
| 536 | + ...val[key] | |
| 537 | + }); | |
| 538 | + } | |
| 539 | + console.log(data); | |
| 540 | + dispatchDisposalOrders(data).then(res => { | |
| 541 | + if (res.data.success) { | |
| 542 | + uni.$u.toast(res.data.msg) | |
| 543 | + } else { | |
| 544 | + uni.$u.toast("指定人员失败,请重试") | |
| 545 | + } | |
| 546 | + clashDriverDispatchRef.value.close() | |
| 547 | + }) | |
| 548 | +} | |
| 549 | + | |
| 550 | +const handlerUpdateOrderClick = () => { | |
| 551 | + // TODO 照搬一键清运得弹窗 | |
| 552 | + console.log("点击了修改订单按钮"); | |
| 553 | +} | |
| 554 | +// 指定人员 | |
| 555 | +const handleDriverDispatchConfirm = (val) => { | |
| 556 | + console.log(val); | |
| 557 | + if (!val) { | |
| 558 | + return | |
| 559 | + } | |
| 560 | + let data = { | |
| 561 | + garOrderId: orderId.value, | |
| 562 | + dispatchList: [] | |
| 563 | + } | |
| 564 | + for (const key in val) { | |
| 565 | + data.dispatchList.push({ | |
| 566 | + ...val[key] | |
| 567 | + }); | |
| 568 | + } | |
| 569 | + console.log(data); | |
| 570 | + dispatchOrders(data).then(res => { | |
| 571 | + if (res.data.success) { | |
| 572 | + uni.$u.toast(res.data.msg) | |
| 573 | + } else { | |
| 574 | + uni.$u.toast("指定人员失败,请重试") | |
| 575 | + } | |
| 576 | + clashDriverDispatchRef.value.close() | |
| 577 | + }) | |
| 578 | +} | |
| 579 | + | |
| 580 | +/** | |
| 581 | + * 初始化信息 | |
| 582 | + */ | |
| 583 | +onLoad((options) => { | |
| 584 | + orderId.value = options.orderId | |
| 585 | + handleOrderDetail(orderId.value) | |
| 586 | +}) | |
| 587 | + | |
| 588 | +onShow(() => { | |
| 589 | + try { | |
| 590 | + if (isOnloadIn.value) { | |
| 591 | + handleOrderDetail(orderId.value) | |
| 592 | + } else { | |
| 593 | + isOnloadIn.value = true | |
| 594 | + } | |
| 595 | + } catch (error) { | |
| 596 | + console.log(error); | |
| 597 | + } | |
| 598 | +}) | |
| 599 | +</script> | |
| 600 | + | |
| 601 | +<style lang="scss" scoped> | |
| 602 | +$custom-marin-bottom: 20rpx; | |
| 603 | +$custom-page-padding: 20rpx; | |
| 604 | +$custom-border-radio: 20rpx; | |
| 605 | +$custom-bottom-height: 200rpx; | |
| 606 | + | |
| 607 | +@mixin card { | |
| 608 | + padding: $custom-page-padding; | |
| 609 | + box-sizing: border-box; | |
| 610 | + background-color: #ffffff; | |
| 611 | + border-radius: $custom-border-radio; | |
| 612 | + margin-bottom: $custom-marin-bottom; | |
| 613 | +} | |
| 614 | + | |
| 615 | +.order-detail-container { | |
| 616 | + height: 100%; | |
| 617 | + width: 100%; | |
| 618 | + background-color: $u-info-light; | |
| 619 | + box-sizing: border-box; | |
| 620 | + overflow-y: scroll; | |
| 621 | + background: linear-gradient(to bottom, #19a97c, $u-info-light, $u-info-light, $u-info-light); | |
| 622 | + | |
| 623 | + | |
| 624 | + .order-detail-container-box { | |
| 625 | + height: 100%; | |
| 626 | + width: 100%; | |
| 627 | + padding: $custom-page-padding; | |
| 628 | + box-sizing: border-box; | |
| 629 | + | |
| 630 | + .order-detail-top { | |
| 631 | + @include card(); | |
| 632 | + | |
| 633 | + .order-detail-top-box { | |
| 634 | + .order-detail-top-box-step { | |
| 635 | + u-steps { | |
| 636 | + u-steps-item {} | |
| 637 | + } | |
| 638 | + } | |
| 639 | + } | |
| 640 | + } | |
| 641 | + | |
| 642 | + .order-detail-container-box-card { | |
| 643 | + @include card(); | |
| 644 | + | |
| 645 | + .order-detail-container-header-card-title { | |
| 646 | + font-weight: bold; | |
| 647 | + line-height: 80rpx; | |
| 648 | + border-bottom: 3rpx solid $u-info-light; | |
| 649 | + margin-bottom: $custom-marin-bottom; | |
| 650 | + color: $u-primary; | |
| 651 | + display: flex; | |
| 652 | + align-items: center; | |
| 653 | + | |
| 654 | + .order-detail-container-header-card-uicon { | |
| 655 | + background-color: $u-primary; | |
| 656 | + margin-right: 10rpx; | |
| 657 | + height: 35rpx; | |
| 658 | + width: 15rpx; | |
| 659 | + } | |
| 660 | + } | |
| 661 | + | |
| 662 | + .order-detail-container-header-item { | |
| 663 | + display: flex; | |
| 664 | + margin-bottom: $custom-marin-bottom; | |
| 665 | + | |
| 666 | + // font-size: 30rpx; | |
| 667 | + // font-weight: bold; | |
| 668 | + // color: $u-main-color; | |
| 669 | + .order-detail-container-header-title { | |
| 670 | + color: $u-main-color; | |
| 671 | + white-space: nowrap; //溢出不换行 | |
| 672 | + color: $u-info; | |
| 673 | + } | |
| 674 | + | |
| 675 | + .order-detail-container-header-content { | |
| 676 | + display: flex; | |
| 677 | + } | |
| 678 | + } | |
| 679 | + } | |
| 680 | + } | |
| 681 | + | |
| 682 | + | |
| 683 | + .space-box { | |
| 684 | + padding-bottom: $custom-bottom-height; | |
| 685 | + margin-bottom: 40rpx; | |
| 686 | + } | |
| 687 | + | |
| 688 | + | |
| 689 | + .order-detail-bottom { | |
| 690 | + position: absolute; | |
| 691 | + width: 100%; | |
| 692 | + // height: 100%; | |
| 693 | + bottom: 0; | |
| 694 | + left: 0; | |
| 695 | + | |
| 696 | + .movableAreaDetail { | |
| 697 | + pointer-events: none; | |
| 698 | + position: fixed; | |
| 699 | + left: 0; | |
| 700 | + top: 0; | |
| 701 | + width: 100%; | |
| 702 | + height: calc(100% - $custom-bottom-height); | |
| 703 | + z-index: 999; | |
| 704 | + | |
| 705 | + .movableView { | |
| 706 | + pointer-events: auto; | |
| 707 | + min-height: 60rpx; | |
| 708 | + min-width: 60rpx; | |
| 709 | + | |
| 710 | + .order-detail-call-box-container { | |
| 711 | + min-height: 60rpx; | |
| 712 | + min-width: 60rpx; | |
| 713 | + display: flex; | |
| 714 | + align-items: center; | |
| 715 | + justify-content: center; | |
| 716 | + background-color: #a9e08f; | |
| 717 | + border-radius: 100%; | |
| 718 | + } | |
| 719 | + } | |
| 720 | + } | |
| 721 | + | |
| 722 | + .order-detail-bottom-box { | |
| 723 | + height: $custom-bottom-height; | |
| 724 | + padding: 50rpx; | |
| 725 | + box-sizing: border-box; | |
| 726 | + display: flex; | |
| 727 | + justify-content: space-between; | |
| 728 | + align-items: center; | |
| 729 | + | |
| 730 | + .order-detail-bottom-left { | |
| 731 | + min-width: 200rpx; | |
| 732 | + } | |
| 733 | + | |
| 734 | + .order-detail-bottom-right { | |
| 735 | + min-width: 200rpx; | |
| 736 | + } | |
| 737 | + } | |
| 738 | + } | |
| 739 | +} | |
| 740 | + | |
| 741 | +.mask-container { | |
| 742 | + position: fixed; | |
| 743 | + top: 0; | |
| 744 | + left: 0; | |
| 745 | + width: 100%; | |
| 746 | + height: 100%; | |
| 747 | + z-index: 999; | |
| 748 | + background-color: rgba(0, 0, 0, 0.5); | |
| 749 | + display: flex; | |
| 750 | + align-items: center; | |
| 751 | + justify-content: center; | |
| 752 | +} | |
| 753 | +</style> | ... | ... |
garbage-removal/src/pages/order/driver-home/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <z-paging-swiper> | |
| 3 | + <template v-slot:top> | |
| 4 | + <u-tabs lineWidth="40" lineColor="#ffffff" lineHeight="6" | |
| 5 | + :activeStyle="{ 'color': '#ffffff', 'font-weight': 'bolder' }" :inactiveStyle="{ color: '#ffffff' }" | |
| 6 | + ref="uTabsElement" :list="list" :current="current" @change="tabsChange" :scrollable="false"></u-tabs> | |
| 7 | + </template> | |
| 8 | + <swiper class="swiper" :current="swiperCurrent" @translation="translation" @animationfinish="animationfinish"> | |
| 9 | + <swiper-item class="swiper-item" v-for="(item, index) in list" :key="index"> | |
| 10 | + <swiper-list-item :tabIndex="index" :currentIndex="swiperCurrent"></swiper-list-item> | |
| 11 | + </swiper-item> | |
| 12 | + </swiper> | |
| 13 | + </z-paging-swiper> | |
| 14 | +</template> | |
| 15 | +<script setup> | |
| 16 | +import { ref } from 'vue'; | |
| 17 | +import swiperListItem from './swiper-list-item/index.vue'; | |
| 18 | +const list = ref([{ name: '待清运' }, { name: '清运中' }, { name: '全部' }, { name: '已完成' }]) | |
| 19 | +const current = ref(0); | |
| 20 | +const swiperCurrent = ref(0) | |
| 21 | +const uTabsElement = ref() | |
| 22 | +const tabsChange = (el) => { | |
| 23 | + swiperCurrent.value = Number(el.index) | |
| 24 | +} | |
| 25 | +const animationfinish = (e) => { | |
| 26 | + current.value = e.detail.current | |
| 27 | + swiperCurrent.value = e.detail.current | |
| 28 | +} | |
| 29 | +const translation = (e) => { | |
| 30 | + uTabsElement.value.setDx(e.detail.dx) | |
| 31 | +} | |
| 32 | +</script> | |
| 33 | +<style lang="scss" scoped> | |
| 34 | +.swiper { | |
| 35 | + height: 100%; | |
| 36 | + background: linear-gradient(to bottom, #19a97c, $u-bg-color, $u-bg-color, $u-bg-color, $u-bg-color, $u-bg-color, $u-bg-color); | |
| 37 | +} | |
| 38 | +</style> | ... | ... |
garbage-removal/src/pages/order/driver-home/swiper-list-item/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <view class="content-container"> | |
| 3 | + <z-paging ref="paging" :fixed="false" v-model="dataList" :auto="false" @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 | + <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 | + </view> | |
| 21 | + <view class="item" @click="handleClick(item.garOrderId)"> | |
| 22 | + <view class="left"> | |
| 23 | + <image :src="item.goodsUrl" mode="aspectFill"></image> | |
| 24 | + </view> | |
| 25 | + <view class="content"> | |
| 26 | + <view class="title u-line-2">{{ item.garOrderAddress + item.garOrderAddressDetails }}</view> | |
| 27 | + <view class="type">垃圾类型: {{ item.garOrderTrashType }}</view> | |
| 28 | + <view class="delivery-time">预约时间 {{ item.garOrderAgreementTime }}</view> | |
| 29 | + </view> | |
| 30 | + </view> | |
| 31 | + <view class="bottom" | |
| 32 | + v-if="item.garOrderHandlerStatus === 0 && item.garCancelFlag === 0 && userType != '清运车辆驾驶员'"> | |
| 33 | + <view class="more"> | |
| 34 | + <!-- <u-icon name="more-dot-fill" color="rgb(203,203,203)"></u-icon> --> | |
| 35 | + </view> | |
| 36 | + </view> | |
| 37 | + </view> | |
| 38 | + </view> | |
| 39 | + </z-paging> | |
| 40 | + <u-action-sheet :closeOnClickOverlay="true" :closeOnClickAction="false" @actionSheetClose="handleClose" | |
| 41 | + @submitFunction="submitFunction" @select="selectClick" :actions="list" round="15" title="取消订单" :show="cancelShow"> | |
| 42 | + </u-action-sheet> | |
| 43 | + </view> | |
| 44 | +</template> | |
| 45 | + | |
| 46 | +<script setup> | |
| 47 | +import { queryOrderList, updateOrder } from "@/apis/order.js"; | |
| 48 | +import { useMainStore } from '@/stores/index.js'; | |
| 49 | +import { onShow } from "@dcloudio/uni-app"; | |
| 50 | +import { computed, ref, watch } from 'vue'; | |
| 51 | +const props = defineProps({ | |
| 52 | + tabIndex: { | |
| 53 | + type: Number | |
| 54 | + }, | |
| 55 | + currentIndex: { | |
| 56 | + type: Number | |
| 57 | + } | |
| 58 | +}) | |
| 59 | + | |
| 60 | +const store = useMainStore(); | |
| 61 | +const userType = computed(() => store.userType) | |
| 62 | +const currentCancelOrderId = ref(""); | |
| 63 | +const currentCancelName = ref(""); | |
| 64 | +const cancelShow = ref(false) | |
| 65 | +const list = ref([ | |
| 66 | + { | |
| 67 | + name: '长时间无人接单', | |
| 68 | + }, | |
| 69 | + { | |
| 70 | + name: '订单信息填写有误', | |
| 71 | + }, | |
| 72 | + { | |
| 73 | + name: '线下协商有问题', | |
| 74 | + }, | |
| 75 | + { | |
| 76 | + name: '不需要清运了', | |
| 77 | + }, | |
| 78 | + { | |
| 79 | + name: '其他', | |
| 80 | + }, | |
| 81 | + { | |
| 82 | + name: '提交', | |
| 83 | + } | |
| 84 | +]) | |
| 85 | +const dataList = ref([]); | |
| 86 | +const paging = ref(null); | |
| 87 | +const firstLoaded = ref(false) | |
| 88 | +/** | |
| 89 | + * 取消订单 | |
| 90 | + * @param {string} orderId | |
| 91 | + */ | |
| 92 | +const handleCancelOrder = (orderId) => { | |
| 93 | + currentCancelOrderId.value = orderId | |
| 94 | + cancelShow.value = true | |
| 95 | +} | |
| 96 | +const handleClose = (e) => { | |
| 97 | + cancelShow.value = false | |
| 98 | +} | |
| 99 | + | |
| 100 | +/** | |
| 101 | + * 跳转公司详情 | |
| 102 | + * @param {*} val | |
| 103 | + */ | |
| 104 | +const goDetail = (val) => { | |
| 105 | + uni.$u.route({ | |
| 106 | + url: `pages/home/clean/company-detail/index?companyId=${val.garOrderCompanyId}`, | |
| 107 | + }) | |
| 108 | +} | |
| 109 | + | |
| 110 | +const selectClick = (index) => { | |
| 111 | + currentCancelName.value = index.name; | |
| 112 | +} | |
| 113 | +/** | |
| 114 | + * 提交取消订单 | |
| 115 | + */ | |
| 116 | +const submitFunction = (otherReason) => { | |
| 117 | + let reason = otherReason | |
| 118 | + if (currentCancelName.value != "其他") { | |
| 119 | + reason = currentCancelName.value | |
| 120 | + } | |
| 121 | + if (!reason) { | |
| 122 | + uni.$u.toast("请提供取消订单的原因") | |
| 123 | + return | |
| 124 | + } | |
| 125 | + let params = { | |
| 126 | + garOrderId: currentCancelOrderId.value, | |
| 127 | + garCancelFlag: 1, | |
| 128 | + garReason: reason | |
| 129 | + } | |
| 130 | + updateOrder(params).then(res => { | |
| 131 | + if (res.data.success) { | |
| 132 | + cancelShow.value = false | |
| 133 | + uni.$u.toast(res.data.data) | |
| 134 | + paging.value.reload(); | |
| 135 | + } | |
| 136 | + }) | |
| 137 | +} | |
| 138 | +const handleClick = (orderId) => { | |
| 139 | + uni.$u.route({ | |
| 140 | + url: `pages/order/driver-home/detail/index`, | |
| 141 | + params: { | |
| 142 | + orderId: orderId | |
| 143 | + } | |
| 144 | + }) | |
| 145 | +} | |
| 146 | + | |
| 147 | +/** | |
| 148 | + * 订单评价 | |
| 149 | + * @param {*} orderId | |
| 150 | + */ | |
| 151 | +const handleUserEvaluate = (orderId, userType) => { | |
| 152 | + uni.$u.route(`pages/order/other-home/evaluate/index?orderId=${orderId}&userType=${userType}`) | |
| 153 | +} | |
| 154 | +// list集合 | |
| 155 | +const queryList = (pageNo, pageSize) => { | |
| 156 | + //这里的pageNo和pageSize会自动计算好,直接传给服务器即可 | |
| 157 | + //这里的请求只是演示,请替换成自己的项目的网络请求,并在网络请求回调中通过paging.value.complete(请求回来的数组)将请求结果传给z-paging | |
| 158 | + // request.queryList({ pageNo, pageSize }).then(res => { | |
| 159 | + // //请勿在网络请求回调中给dataList赋值!!只需要调用complete就可以了 | |
| 160 | + queryOrderList({ type: props.tabIndex, pageNo, pageSize }).then((res) => { | |
| 161 | + paging.value.complete(res.data.data.list); | |
| 162 | + firstLoaded.value = true | |
| 163 | + }).catch(res => { | |
| 164 | + //如果请求失败写paging.value.complete(false),会自动展示错误页面 | |
| 165 | + //注意,每次都需要在catch中写这句话很麻烦,z-paging提供了方案可以全局统一处理 | |
| 166 | + //在底层的网络请求抛出异常时,写uni.$emit('z-paging-error-emit');即可 | |
| 167 | + paging.value.complete(false); | |
| 168 | + }) | |
| 169 | +} | |
| 170 | + | |
| 171 | +onShow(() => { | |
| 172 | + if (props.currentIndex == props.tabIndex) { | |
| 173 | + if (firstLoaded.value) { | |
| 174 | + setTimeout(() => { | |
| 175 | + paging.value.reload(); | |
| 176 | + }, 50); | |
| 177 | + } | |
| 178 | + } | |
| 179 | +}) | |
| 180 | + | |
| 181 | +// 重写load的方法,自动刷新 | |
| 182 | +watch(() => props.currentIndex, (val1, val2) => { | |
| 183 | + if (props.currentIndex == props.tabIndex) { | |
| 184 | + if (!firstLoaded.value) { | |
| 185 | + setTimeout(() => { | |
| 186 | + paging.value.reload(); | |
| 187 | + }, 50); | |
| 188 | + } | |
| 189 | + } | |
| 190 | +}, { immediate: true }) | |
| 191 | +</script> | |
| 192 | + | |
| 193 | +<style lang="scss" scoped> | |
| 194 | +.content-container { | |
| 195 | + height: 100%; | |
| 196 | + | |
| 197 | + .order { | |
| 198 | + width: 90%; | |
| 199 | + background-color: #ffffff; | |
| 200 | + margin: 20rpx auto; | |
| 201 | + border-radius: 20rpx; | |
| 202 | + box-sizing: border-box; | |
| 203 | + padding: 20rpx; | |
| 204 | + font-size: 28rpx; | |
| 205 | + | |
| 206 | + &:active { | |
| 207 | + background-color: #f3f4f6; | |
| 208 | + opacity: 0.8; | |
| 209 | + transition: opacity 0.3s; | |
| 210 | + -webkit-transition: opacity 0.3s; | |
| 211 | + -moz-transition: opacity 0.3s; | |
| 212 | + -ms-transition: opacity 0.3s; | |
| 213 | + } | |
| 214 | + | |
| 215 | + .top { | |
| 216 | + display: flex; | |
| 217 | + justify-content: space-between; | |
| 218 | + | |
| 219 | + .left { | |
| 220 | + display: flex; | |
| 221 | + align-items: center; | |
| 222 | + | |
| 223 | + .store { | |
| 224 | + margin: 0 10rpx; | |
| 225 | + font-size: 32rpx; | |
| 226 | + font-weight: bold; | |
| 227 | + } | |
| 228 | + } | |
| 229 | + } | |
| 230 | + | |
| 231 | + .item { | |
| 232 | + display: flex; | |
| 233 | + align-items: center; | |
| 234 | + margin: 20rpx 0 0; | |
| 235 | + | |
| 236 | + .left { | |
| 237 | + margin-right: 20rpx; | |
| 238 | + | |
| 239 | + image { | |
| 240 | + width: 160rpx; | |
| 241 | + height: 160rpx; | |
| 242 | + border-radius: 10rpx; | |
| 243 | + } | |
| 244 | + } | |
| 245 | + | |
| 246 | + .content { | |
| 247 | + | |
| 248 | + .title { | |
| 249 | + font-size: 28rpx; | |
| 250 | + line-height: 50rpx; | |
| 251 | + } | |
| 252 | + | |
| 253 | + .type { | |
| 254 | + margin: 10rpx 0; | |
| 255 | + font-size: 24rpx; | |
| 256 | + color: $u-tips-color; | |
| 257 | + } | |
| 258 | + | |
| 259 | + .delivery-time { | |
| 260 | + color: #e5d001; | |
| 261 | + font-size: 24rpx; | |
| 262 | + } | |
| 263 | + } | |
| 264 | + | |
| 265 | + | |
| 266 | + } | |
| 267 | + | |
| 268 | + .total { | |
| 269 | + margin-top: 20rpx; | |
| 270 | + text-align: right; | |
| 271 | + font-size: 24rpx; | |
| 272 | + | |
| 273 | + .total-price { | |
| 274 | + font-size: 32rpx; | |
| 275 | + } | |
| 276 | + } | |
| 277 | + | |
| 278 | + .bottom { | |
| 279 | + display: flex; | |
| 280 | + margin-top: 20rpx; | |
| 281 | + padding: 0 10rpx; | |
| 282 | + justify-content: space-between; | |
| 283 | + align-items: center; | |
| 284 | + | |
| 285 | + .btn { | |
| 286 | + line-height: 52rpx; | |
| 287 | + width: 160rpx; | |
| 288 | + border-radius: 26rpx; | |
| 289 | + border: 2rpx solid $u-border-color; | |
| 290 | + font-size: 26rpx; | |
| 291 | + text-align: center; | |
| 292 | + color: $u-info-dark; | |
| 293 | + } | |
| 294 | + | |
| 295 | + .btn--hover { | |
| 296 | + background-color: $u-success-light; | |
| 297 | + } | |
| 298 | + | |
| 299 | + .evaluate { | |
| 300 | + color: $u-warning-dark; | |
| 301 | + border-color: $u-warning-dark; | |
| 302 | + } | |
| 303 | + } | |
| 304 | + } | |
| 305 | + | |
| 306 | + .centre { | |
| 307 | + text-align: center; | |
| 308 | + margin: 200rpx auto; | |
| 309 | + font-size: 32rpx; | |
| 310 | + | |
| 311 | + image { | |
| 312 | + width: 164rpx; | |
| 313 | + height: 164rpx; | |
| 314 | + border-radius: 50%; | |
| 315 | + margin-bottom: 20rpx; | |
| 316 | + } | |
| 317 | + | |
| 318 | + .tips { | |
| 319 | + font-size: 24rpx; | |
| 320 | + color: #999999; | |
| 321 | + margin-top: 20rpx; | |
| 322 | + } | |
| 323 | + | |
| 324 | + .btn { | |
| 325 | + margin: 80rpx auto; | |
| 326 | + width: 200rpx; | |
| 327 | + border-radius: 32rpx; | |
| 328 | + line-height: 64rpx; | |
| 329 | + color: #ffffff; | |
| 330 | + font-size: 26rpx; | |
| 331 | + background: linear-gradient(270deg, rgba(249, 116, 90, 1) 0%, rgba(255, 158, 1, 1) 100%); | |
| 332 | + } | |
| 333 | + } | |
| 334 | +} | |
| 335 | +</style> | ... | ... |
garbage-removal/src/pages/order/driver-home/upload/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <view class="upload-image-box"> | |
| 3 | + <view class="upload-image-box-choose"> | |
| 4 | + <text class="upload-image-box-choose-txt">请选着上传图片类型:</text> | |
| 5 | + <view class="upload-image-box-choose-type"> | |
| 6 | + <u-radio-group v-model="putType" @change="groupChange" placement="row"> | |
| 7 | + <u-radio activeColor="#19be6b" :customStyle="{ marginBottom: '8px' }" size="28" labelSize="28" | |
| 8 | + v-for="(item, index) in chooseList" :key="index" :label="item.name" :name="item.name" @change="radioChange"> | |
| 9 | + </u-radio> | |
| 10 | + </u-radio-group> | |
| 11 | + </view> | |
| 12 | + </view> | |
| 13 | + <view class="upload-image-box-bottom"> | |
| 14 | + <text class="upload-image-box-bottom-txt">{{ putType }}(最多上传10张)</text> | |
| 15 | + <view class="upload-image-box-button-container"> | |
| 16 | + <u-upload :fileList="fileList" @afterRead="afterRead" @delete="deletePic" name="3" multiple :maxCount="10" | |
| 17 | + :previewFullImage="true" width="200" height="150"></u-upload> | |
| 18 | + </view> | |
| 19 | + </view> | |
| 20 | + <view class="upload-image-box-submit-box"> | |
| 21 | + <view class="upload-image-box-submit-box-button" @click="handleSubmit(orderId, putType)"> | |
| 22 | + <view class="upload-image-box-submit-box-button-container"> | |
| 23 | + <up-button color="#19be6b" type="primary" shape="square" text="确定"></up-button> | |
| 24 | + </view> | |
| 25 | + </view> | |
| 26 | + </view> | |
| 27 | + </view> | |
| 28 | +</template> | |
| 29 | + | |
| 30 | +<script setup> | |
| 31 | +import { uploadFilePromise } from '@/apis/common.js'; | |
| 32 | +import { uploadImageUrlByType } from '@/apis/order.js'; | |
| 33 | +import { onLoad } from '@dcloudio/uni-app'; | |
| 34 | +import { reactive, ref } from 'vue'; | |
| 35 | +const putType = ref("装车图片") | |
| 36 | +const orderId = ref(); | |
| 37 | +const fileList = ref([]) | |
| 38 | +const chooseList = reactive([{ name: "装车图片" }, { name: "卸车图片" }]) | |
| 39 | +// 删除图片 | |
| 40 | +const deletePic = (event) => { | |
| 41 | + fileList.value.splice(event.index, 1); | |
| 42 | +}; | |
| 43 | + | |
| 44 | +// 新增图片 | |
| 45 | +const afterRead = async (event) => { | |
| 46 | + // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式 | |
| 47 | + let lists = [].concat(event.file); | |
| 48 | + let fileListLen = fileList.value.length; | |
| 49 | + lists.map((item) => { | |
| 50 | + fileList.value.push({ | |
| 51 | + ...item, | |
| 52 | + status: 'uploading', | |
| 53 | + message: '上传中', | |
| 54 | + }); | |
| 55 | + }); | |
| 56 | + for (let i = 0; i < lists.length; i++) { | |
| 57 | + let requestPath = import.meta.env.VITE_BASE_URL + import.meta.env.VITE_BASE_FILE_UPLOAD_PREFIX; | |
| 58 | + const result = await uploadFilePromise(requestPath, lists[i].url); | |
| 59 | + let item = fileList.value[fileListLen]; | |
| 60 | + fileList.value.splice(fileListLen, 1, { | |
| 61 | + ...item, | |
| 62 | + status: 'success', | |
| 63 | + message: '', | |
| 64 | + url: result.data.fileName, | |
| 65 | + }); | |
| 66 | + fileListLen++; | |
| 67 | + } | |
| 68 | +}; | |
| 69 | +// 提交图片 | |
| 70 | +const handleSubmit = (id, type) => { | |
| 71 | + if (!validateImage()) { | |
| 72 | + uni.$u.toast("请等待图片上传~") | |
| 73 | + return | |
| 74 | + } | |
| 75 | + let params = { | |
| 76 | + garOrderId: id, | |
| 77 | + type: type == "装车图片" ? 1 : 2, | |
| 78 | + imageUrls: fileList.value.map(item => item.url) | |
| 79 | + } | |
| 80 | + uploadImageUrlByType(params).then(res => { | |
| 81 | + if (res.data.success) { | |
| 82 | + uni.$u.toast("图片上传完毕!"); | |
| 83 | + setTimeout(() => { | |
| 84 | + uni.$u.route({ | |
| 85 | + type: 'navigateBack', | |
| 86 | + url: `pages/order/other-home/detail/index`, | |
| 87 | + }) | |
| 88 | + }, 300) | |
| 89 | + } | |
| 90 | + }) | |
| 91 | +} | |
| 92 | + | |
| 93 | +const validateImage = () => { | |
| 94 | + for (let index = 0; index < fileList.value.length; index++) { | |
| 95 | + const str = fileList.value[index].url; | |
| 96 | + if (!str.startsWith("/profile/upload")) { | |
| 97 | + return false; | |
| 98 | + } | |
| 99 | + } | |
| 100 | + return true; | |
| 101 | +} | |
| 102 | + | |
| 103 | +onLoad((options) => { | |
| 104 | + orderId.value = options.orderId; | |
| 105 | + // putType.value = options.putType === "putOnImages" ? "装车图片" : "卸车图片"; | |
| 106 | + | |
| 107 | +}) | |
| 108 | +</script> | |
| 109 | + | |
| 110 | +<style lang="scss" scoped> | |
| 111 | +.upload-image-box { | |
| 112 | + height: 100%; | |
| 113 | + width: 100%; | |
| 114 | + background-color: #ffffff; | |
| 115 | + padding: 20rpx; | |
| 116 | + box-sizing: border-box; | |
| 117 | + line-height: 80rpx; | |
| 118 | + | |
| 119 | + .upload-image-box-choose { | |
| 120 | + display: flex; | |
| 121 | + | |
| 122 | + .upload-image-box-choose-txt { | |
| 123 | + white-space: nowrap; | |
| 124 | + } | |
| 125 | + | |
| 126 | + .upload-image-box-choose-type { | |
| 127 | + display: flex; | |
| 128 | + justify-content: center; | |
| 129 | + align-items: center; | |
| 130 | + } | |
| 131 | + } | |
| 132 | + | |
| 133 | + .upload-image-box-bottom { | |
| 134 | + .upload-image-box-bottom-txt { | |
| 135 | + color: $u-info; | |
| 136 | + } | |
| 137 | + | |
| 138 | + .upload-image-box-button-container { | |
| 139 | + min-height: 350rpx; | |
| 140 | + min-width: 100%; | |
| 141 | + padding: 20rpx; | |
| 142 | + // background-color: $u-info-light; | |
| 143 | + border: 2rpx solid $u-border-color; | |
| 144 | + box-sizing: border-box; | |
| 145 | + border-radius: 10rpx; | |
| 146 | + } | |
| 147 | + } | |
| 148 | + | |
| 149 | + .upload-image-box-submit-box { | |
| 150 | + box-sizing: border-box; | |
| 151 | + margin-top: 80rpx; | |
| 152 | + width: 100%; | |
| 153 | + | |
| 154 | + .upload-image-box-submit-box-button { | |
| 155 | + box-sizing: border-box; | |
| 156 | + display: flex; | |
| 157 | + justify-content: flex-end; | |
| 158 | + align-items: center; | |
| 159 | + | |
| 160 | + .upload-image-box-submit-box-button-container { | |
| 161 | + white-space: nowrap; | |
| 162 | + box-sizing: border-box; | |
| 163 | + width: 200rpx; | |
| 164 | + } | |
| 165 | + } | |
| 166 | + } | |
| 167 | +} | |
| 168 | +</style> | ... | ... |
garbage-removal/src/pages/order/handler-home/index.vue
| ... | ... | @@ -44,7 +44,7 @@ const translation = (e) => { |
| 44 | 44 | const handleScan = () => { |
| 45 | 45 | // 调用uniapi开启二维码扫描 |
| 46 | 46 | // 允许从相机和相册扫码 |
| 47 | - checkCode("18977778888,1789190664111099906,508235").then(res => { | |
| 47 | + checkCode("1789590734475624449,1730466747975798786,501684").then(res => { | |
| 48 | 48 | console.log(res); |
| 49 | 49 | if (res.data.code == 200) { |
| 50 | 50 | uni.$u.route({ | ... | ... |
garbage-removal/src/pages/order/handler-home/scan-detail/index.vue
| ... | ... | @@ -89,13 +89,13 @@ import { onLoad } from '@dcloudio/uni-app'; |
| 89 | 89 | import { ref } from 'vue'; |
| 90 | 90 | const details = ref({}) |
| 91 | 91 | const fileList = ref([]) |
| 92 | -const isDeletable = ref(true) | |
| 92 | +const isDeletable = ref(false) | |
| 93 | 93 | // 删除图片 |
| 94 | 94 | const deletePic = (event) => { |
| 95 | 95 | fileList.value.splice(event.index, 1); |
| 96 | 96 | }; |
| 97 | 97 | |
| 98 | -const isNew = ref(true) | |
| 98 | +const isNew = ref(false) | |
| 99 | 99 | // 新增图片 |
| 100 | 100 | const afterRead = async (event) => { |
| 101 | 101 | // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式 |
| ... | ... | @@ -176,6 +176,8 @@ const validateImage = (fillImageList) => { |
| 176 | 176 | onLoad((options) => { |
| 177 | 177 | if (options.data) { |
| 178 | 178 | details.value = JSON.parse(decodeURIComponent(options.data)) |
| 179 | + isDeletable.value = true | |
| 180 | + isNew.value = true | |
| 179 | 181 | } |
| 180 | 182 | if (options.garAskId) { |
| 181 | 183 | // TODO query |
| ... | ... | @@ -186,9 +188,6 @@ onLoad((options) => { |
| 186 | 188 | fileList.value = details.value.fillImageList.map((item) => { |
| 187 | 189 | return { url: import.meta.env.VITE_BASE_URL + item } |
| 188 | 190 | }) |
| 189 | - console.log(details.value); | |
| 190 | - isDeletable.value = false | |
| 191 | - isNew.value = false | |
| 192 | 191 | }) |
| 193 | 192 | } |
| 194 | 193 | }) | ... | ... |
garbage-removal/src/pages/order/handler-home/swiper-list-item/index.vue
| ... | ... | @@ -19,7 +19,7 @@ |
| 19 | 19 | <view class="title u-line-2">{{ item.garOrderAddressDetails }}</view> |
| 20 | 20 | <view class="type">垃圾类型: {{ item.garOrderTrashType }}</view> |
| 21 | 21 | <view class="delivery-time">创建时间 {{ item.garCreateTime }}</view> |
| 22 | - <view class="transport-num">载运量 {{ item.transportNum ? 6 : 8 }}</view> | |
| 22 | + <view class="transport-num">载运量 {{ item.garNowCarCount }} /{{ item.garRealCarCount }}</view> | |
| 23 | 23 | </view> |
| 24 | 24 | </view> |
| 25 | 25 | </view> | ... | ... |
garbage-removal/src/pages/order/handler-home/transport-detail/index.vue
| ... | ... | @@ -84,41 +84,10 @@ |
| 84 | 84 | <script setup> |
| 85 | 85 | import { queryOrderTransportDetail } from '@/apis/order.js'; |
| 86 | 86 | import zStatic from '@/components/z-paging/js/z-paging-static'; |
| 87 | -import { useMainStore } from '@/stores/index.js'; | |
| 88 | 87 | import { onLoad, onShow } from '@dcloudio/uni-app'; |
| 89 | -import { computed, ref } from 'vue'; | |
| 88 | +import { ref } from 'vue'; | |
| 90 | 89 | 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 | - transportDetails: [{ | |
| 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 | -}); | |
| 90 | +const dataGram = ref(); | |
| 122 | 91 | const orderId = ref(null) |
| 123 | 92 | const currentImages = ref([]) |
| 124 | 93 | const emptyBase64Image = ref(zStatic.base64Empty) | ... | ... |
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> | |
| 4 | - <handler-home v-else></handler-home> | |
| 3 | + <driver-home v-if="userType == '清运车辆驾驶员'"></driver-home> | |
| 4 | + <handler-home v-else-if="userType == '处置场所负责人'"></handler-home> | |
| 5 | + <other-home v-else></other-home> | |
| 5 | 6 | </view> |
| 6 | 7 | </template> |
| 7 | 8 | <script setup> |
| 8 | 9 | import { useMainStore } from "@/stores/index.js"; |
| 9 | 10 | import { computed } from 'vue'; |
| 11 | +import driverHome from "./driver-home/index.vue"; | |
| 10 | 12 | import handlerHome from "./handler-home/index.vue"; |
| 11 | 13 | import otherHome from "./other-home/index.vue"; |
| 12 | 14 | const mainStore = useMainStore() | ... | ... |
garbage-removal/src/pages/order/other-home/detail/index.vue
| ... | ... | @@ -174,11 +174,11 @@ |
| 174 | 174 | <view class=" order-detail-bottom-left"> |
| 175 | 175 | <u-button |
| 176 | 176 | v-if="dataGram.garOrderHandlerStatus === 1 && dataGram.garCancelFlag === 0 && userType === '清运车辆驾驶员'" |
| 177 | - @click="createQrCodeValid(dataGram.validCode)" shape="square" color="#a9e08f" text="出示二维码"></u-button> | |
| 177 | + @click="createQrCodeValid(orderId)" shape="square" color="#a9e08f" text="出示二维码"></u-button> | |
| 178 | 178 | <u-button v-if="dataGram.garOrderHandlerStatus === 0 && userType == '运输企业负责人' && dataGram.garCancelFlag === 0" |
| 179 | 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> | |
| 180 | + <u-button v-if="dataGram.garOrderScanHandlerFlag === 0 && userType == '用户' && dataGram.garCancelFlag === 0" | |
| 181 | + @click="handlerUpdateOrderClick()" shape="square" color="#a9e08f" text="修改订单"></u-button> | |
| 182 | 182 | <u-button v-if="dataGram.garOrderHandlerStatus === 1 && userType == '运输企业负责人'" |
| 183 | 183 | @click="handleOrderDispatchClick(orderId)" shape="square" color="#a9e08f" text="分配驾驶员"></u-button> |
| 184 | 184 | </view> |
| ... | ... | @@ -225,7 +225,7 @@ |
| 225 | 225 | </template> |
| 226 | 226 | |
| 227 | 227 | <script setup> |
| 228 | -import { dispatchDisposalOrders, dispatchOrders, queryDisposalDispatch, queryOrderDetail, queryOrderDispatch, updateOrder } from "@/apis/order.js"; | |
| 228 | +import { createHandlerQrCode, dispatchDisposalOrders, dispatchOrders, queryDisposalDispatch, queryOrderDetail, queryOrderDispatch, updateOrder } from "@/apis/order.js"; | |
| 229 | 229 | import { createQrCode } from '@/apis/qrcode.js'; |
| 230 | 230 | import uqrcode from '@/components/Sansnn-uQRCode_4.0.6/components/uqrcode/uqrcode.vue'; |
| 231 | 231 | import clashDisposalDispatch from '@/components/clash-disposal-dispatch/index.vue'; |
| ... | ... | @@ -323,7 +323,7 @@ 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 | 329 | driverPersonnelList.value = res.data.data |
| ... | ... | @@ -334,7 +334,7 @@ const handleOrderDispatchClick = (orderId) => { |
| 334 | 334 | }) |
| 335 | 335 | } |
| 336 | 336 | const handleDisposalDispatchClick = (orderId) => { |
| 337 | - // 获取订单人员 | |
| 337 | + // 获取处置场所人员 | |
| 338 | 338 | queryDisposalDispatch(orderId).then(res => { |
| 339 | 339 | if (res.data.success) { |
| 340 | 340 | disposalPersonnelList.value = res.data.data |
| ... | ... | @@ -521,10 +521,12 @@ const cleanStatus = (status) => { |
| 521 | 521 | } |
| 522 | 522 | } |
| 523 | 523 | const createQrCodeValid = (val) => { |
| 524 | - // 获取本地地址拼接订单id | |
| 525 | - showUQRcode.value = true; | |
| 526 | - // const localAddress = `http://localhost:5173`; | |
| 527 | - qrCodeText.value = val; | |
| 524 | + createHandlerQrCode(val).then(res => { | |
| 525 | + // 获取本地地址拼接订单id | |
| 526 | + showUQRcode.value = true; | |
| 527 | + // const localAddress = `http://localhost:5173`; | |
| 528 | + qrCodeText.value = res.data.data; | |
| 529 | + }) | |
| 528 | 530 | } |
| 529 | 531 | /** |
| 530 | 532 | * 上传图片 |
| ... | ... | @@ -558,6 +560,11 @@ const handleDisposalDispatchConfirm = (val) => { |
| 558 | 560 | clashDriverDispatchRef.value.close() |
| 559 | 561 | }) |
| 560 | 562 | } |
| 563 | + | |
| 564 | +const handlerUpdateOrderClick = () => { | |
| 565 | + // TODO 照搬一键清运得弹窗 | |
| 566 | + console.log("点击了修改订单按钮"); | |
| 567 | +} | |
| 561 | 568 | // 指定人员 |
| 562 | 569 | const handleDriverDispatchConfirm = (val) => { |
| 563 | 570 | console.log(val); | ... | ... |
garbage-removal/src/pages/order/other-home/swiper-list-item/index.vue
| ... | ... | @@ -37,7 +37,8 @@ |
| 37 | 37 | <view class="delivery-time">预约时间 {{ item.garOrderAgreementTime }}</view> |
| 38 | 38 | </view> |
| 39 | 39 | </view> |
| 40 | - <view class="bottom" v-if="item.garOrderHandlerStatus === 0 && item.garCancelFlag === 0"> | |
| 40 | + <view class="bottom" | |
| 41 | + v-if="item.garOrderHandlerStatus === 0 && item.garCancelFlag === 0 && userType != '清运车辆驾驶员'"> | |
| 41 | 42 | <view class="more"> |
| 42 | 43 | <!-- <u-icon name="more-dot-fill" color="rgb(203,203,203)"></u-icon> --> |
| 43 | 44 | </view> | ... | ... |
garbage-removal/src/static/image/driver.png
garbage-removal/src/static/image/garbage.png
garbage-removal/src/static/image/handler.png
garbage-removal/src/static/image/manager.png