Commit eca2e4d3358b3bdf74e5c39e090072808b1b86a7
1 parent
ff4f8ac1
feat: 用户修改按钮
Showing
11 changed files
with
253 additions
and
270 deletions
garbage-removal/src/pages.json
| ... | ... | @@ -168,8 +168,8 @@ |
| 168 | 168 | },{ |
| 169 | 169 | "path": "pages/wode/index", |
| 170 | 170 | "style": { |
| 171 | - "navigationBarTitleText": "", | |
| 172 | - "navigationBarBackgroundColor": "#ffffff", | |
| 171 | + "navigationStyle":"custom", | |
| 172 | + "navigationBarBackgroundColorr":"#ffffff00", | |
| 173 | 173 | "enablePullDownRefresh": false |
| 174 | 174 | } |
| 175 | 175 | } | ... | ... |
garbage-removal/src/pages/home/clean/index.vue
garbage-removal/src/pages/order/driver-home/detail/index.vue
| 1 | 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 | 2 | <view class="order-detail-container" v-if="dataGram != null || dataGram != undefined"> |
| 9 | 3 | <view class="order-detail-container-box"> |
| 10 | 4 | <view class="order-detail-top"> |
| ... | ... | @@ -125,7 +119,7 @@ |
| 125 | 119 | <view class="order-detail-container-header-card-uicon"></view> |
| 126 | 120 | 处理信息 |
| 127 | 121 | </view> |
| 128 | - <view v-if="dataGram.garOrderHandlerId" style="width: 100%;"> | |
| 122 | + <view v-if="putDownImages.length || putOnImages.length" style="width: 100%;"> | |
| 129 | 123 | <!-- <view class="order-detail-container-header-item"> |
| 130 | 124 | <text class="order-detail-container-header-title">负责人:</text> |
| 131 | 125 | <view class="order-detail-container-header-content"> |
| ... | ... | @@ -192,11 +186,6 @@ |
| 192 | 186 | <u-button @click="handleEvaluateDetail(orderId, userType)" |
| 193 | 187 | v-if="dataGram.garEvaluateFlag === 1 && userType === '用户'" shape="square" color="#a9e08f" |
| 194 | 188 | 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 | 189 | </view> |
| 201 | 190 | </view> |
| 202 | 191 | </view> |
| ... | ... | @@ -211,20 +200,15 @@ |
| 211 | 200 | </template> |
| 212 | 201 | |
| 213 | 202 | <script setup> |
| 214 | -import { createHandlerQrCode, dispatchDisposalOrders, dispatchOrders, queryDisposalDispatch, queryOrderDetail, queryOrderDispatch, updateOrder } from "@/apis/order.js"; | |
| 203 | +import { createHandlerQrCode, queryOrderDetail, updateOrder } from "@/apis/order.js"; | |
| 215 | 204 | import { createQrCode } from '@/apis/qrcode.js'; |
| 216 | 205 | 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 | 206 | import zStatic from '@/components/z-paging/js/z-paging-static'; |
| 220 | 207 | import { useMainStore } from '@/stores/index.js'; |
| 221 | 208 | import { onLoad, onShow } from '@dcloudio/uni-app'; |
| 222 | 209 | import { computed, ref } from 'vue'; |
| 223 | 210 | const isOnloadIn = ref(false) |
| 224 | 211 | const clashDriverDispatchRef = ref() |
| 225 | -const clashDisposalDispatchRef = ref() | |
| 226 | -const driverPersonnelList = ref([]) | |
| 227 | -const disposalPersonnelList = ref([]) | |
| 228 | 212 | const store = useMainStore(); |
| 229 | 213 | const userType = computed(() => store.userType) |
| 230 | 214 | const dataGram = ref(); |
| ... | ... | @@ -308,30 +292,6 @@ const handleQrCodeClick = (orderId) => { |
| 308 | 292 | // #endif |
| 309 | 293 | } |
| 310 | 294 | |
| 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 | 295 | |
| 336 | 296 | const handleClose = (e) => { |
| 337 | 297 | cancelShow.value = false |
| ... | ... | @@ -386,14 +346,6 @@ const handlerJumpOtherApp = (latitude, longitude, garCoordinate) => { |
| 386 | 346 | } |
| 387 | 347 | |
| 388 | 348 | /** |
| 389 | - * 取消订单 | |
| 390 | - * @param {*} orderId | |
| 391 | - */ | |
| 392 | -const handleOderCancelClick = () => { | |
| 393 | - cancelShow.value = true; | |
| 394 | -} | |
| 395 | - | |
| 396 | -/** | |
| 397 | 349 | * 提交取消订单 |
| 398 | 350 | */ |
| 399 | 351 | const submitFunction = (otherReason) => { |
| ... | ... | @@ -421,26 +373,7 @@ const submitFunction = (otherReason) => { |
| 421 | 373 | } |
| 422 | 374 | }) |
| 423 | 375 | } |
| 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 | 376 | |
| 443 | -} | |
| 444 | 377 | const handleEvaluate = (orderId, userType) => { |
| 445 | 378 | uni.$u.route(`pages/order/other-home/evaluate/index?orderId=${orderId}&userType=${userType}`) |
| 446 | 379 | } |
| ... | ... | @@ -520,61 +453,7 @@ const createQrCodeValid = (val) => { |
| 520 | 453 | * @param {string} putType |
| 521 | 454 | */ |
| 522 | 455 | 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 | - }) | |
| 456 | + uni.$u.route(`pages/order/driver-home/upload/index?orderId=${orderId}`) | |
| 578 | 457 | } |
| 579 | 458 | |
| 580 | 459 | /** | ... | ... |
garbage-removal/src/pages/order/driver-home/swiper-list-item/index.vue
| ... | ... | @@ -11,8 +11,8 @@ |
| 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.garOrderHandlerStatus === 1 && item.garCancelFlag === 0" class="right">清运中 </view> |
| 18 | 18 | <view v-if="item.garOrderHandlerStatus === 3 && userType === '清运车辆驾驶员'" class="right">已完成 </view> | ... | ... |
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("1789590734475624449,1730466747975798786,501684").then(res => { | |
| 47 | + checkCode("1789622015702335490,1730466747975798786,956117").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
| ... | ... | @@ -76,7 +76,7 @@ |
| 76 | 76 | </view> |
| 77 | 77 | <view class="scan-submit-button-box" v-if="isNew"> |
| 78 | 78 | <view class="scan-submit-button-btn"> |
| 79 | - <u-button type="primary" @click="handlerSubmit" text="确认"></u-button> | |
| 79 | + <u-button type="primary" @tap="handlerSubmit" text="确认"></u-button> | |
| 80 | 80 | </view> |
| 81 | 81 | </view> |
| 82 | 82 | </view> |
| ... | ... | @@ -122,8 +122,7 @@ const afterRead = async (event) => { |
| 122 | 122 | } |
| 123 | 123 | }; |
| 124 | 124 | |
| 125 | -const handlerSubmit = () => { | |
| 126 | - console.log("确认提交"); | |
| 125 | +const handlerSubmit = async () => { | |
| 127 | 126 | // 校验参数 |
| 128 | 127 | let params = { |
| 129 | 128 | ...details.value, |
| ... | ... | @@ -131,11 +130,19 @@ const handlerSubmit = () => { |
| 131 | 130 | garOrderHandlerCompanyName: details.value.garOrderCompanyName, |
| 132 | 131 | garOrderHandlerCompanyId: details.value.garOrderCompanyId |
| 133 | 132 | } |
| 134 | - if (!validateParams(params)) { | |
| 135 | - askTransport(params).then((res) => { | |
| 133 | + if (validateParams(params)) { | |
| 134 | + await askTransport(params).then((res) => { | |
| 136 | 135 | console.log(res); |
| 136 | + if (res.data.code == 200) { | |
| 137 | + uni.$u.toast("当前趟次记录完毕!") | |
| 138 | + } | |
| 139 | + }).catch((err) => { | |
| 140 | + uni.$u.toast("当前趟次记录失败") | |
| 137 | 141 | }) |
| 138 | - uni.$u.toast("确认提交了") | |
| 142 | + // 返回上级 | |
| 143 | + // uni.navigateBack({ | |
| 144 | + // delta: 1 | |
| 145 | + // }) | |
| 139 | 146 | } |
| 140 | 147 | } |
| 141 | 148 | |
| ... | ... | @@ -153,13 +160,13 @@ const validateParams = (params) => { |
| 153 | 160 | return false; |
| 154 | 161 | } |
| 155 | 162 | if (!validateImage(params.fillImageList)) { |
| 156 | - return | |
| 163 | + return false; | |
| 157 | 164 | } |
| 165 | + return true; | |
| 158 | 166 | } |
| 159 | 167 | |
| 160 | 168 | const validateImage = (fillImageList) => { |
| 161 | - console.log(fillImageList); | |
| 162 | - if (fillImageList instanceof Array) { | |
| 169 | + if (fillImageList instanceof Array && fillImageList.length > 0) { | |
| 163 | 170 | for (let index = 0; index < fillImageList.length; index++) { |
| 164 | 171 | const str = fillImageList[index]; |
| 165 | 172 | if (!str.startsWith("/profile/upload")) { | ... | ... |
garbage-removal/src/pages/order/handler-home/transport-detail/index.vue
| ... | ... | @@ -91,23 +91,7 @@ const dataGram = ref(); |
| 91 | 91 | const orderId = ref(null) |
| 92 | 92 | const currentImages = ref([]) |
| 93 | 93 | const emptyBase64Image = ref(zStatic.base64Empty) |
| 94 | -const showUQRcode = ref(false) | |
| 95 | 94 | const spaceStr = ref("") |
| 96 | -const qrCodeRef = ref() | |
| 97 | -const qrCodeText = ref() | |
| 98 | - | |
| 99 | -// 创建二维码 | |
| 100 | -const createQrCodeLocal = (orderId) => { | |
| 101 | - // 获取本地地址拼接订单id | |
| 102 | - showUQRcode.value = true; | |
| 103 | - const hostname = window.location.hostname; | |
| 104 | - const port = window.location.port; | |
| 105 | - const protocol = window.location.protocol; | |
| 106 | - const localAddress = `${protocol}//${hostname}:${port}`; | |
| 107 | - // const localAddress = `http://localhost:5173`; | |
| 108 | - qrCodeText.value = localAddress + "/pages/order/other-home/guest/index?orderId=" + orderId; | |
| 109 | - console.log(qrCodeRef.value); | |
| 110 | -} | |
| 111 | 95 | const goTransportDetail = (val) => { |
| 112 | 96 | uni.$u.route({ |
| 113 | 97 | url: `pages/order/handler-home/scan-detail/index` | ... | ... |
garbage-removal/src/pages/order/other-home/detail/index.vue
| ... | ... | @@ -5,6 +5,37 @@ |
| 5 | 5 | <clashDisposalDispatch ref="clashDisposalDispatchRef" :valueKey="'companyName'" |
| 6 | 6 | :onconfirm="handleDisposalDispatchConfirm" :dataList="driverPersonnelList"> |
| 7 | 7 | </clashDisposalDispatch> |
| 8 | + <u-popup :zIndex="10074" closeOnClickOverlay :show="carPopupShowFlag" :round="10" @close="handlePopupClick(false)" | |
| 9 | + @open="handlePopupClick(true)"> | |
| 10 | + <view class="company-clean-container-car-popup"> | |
| 11 | + <!-- 主要内容 --> | |
| 12 | + <view class="company-clean-container-car-popup-content"> | |
| 13 | + <view class="company-clean-container-car-popup-content-title"> | |
| 14 | + <view style="text-align: center;"> | |
| 15 | + 车辆类型 | |
| 16 | + </view> | |
| 17 | + </view> | |
| 18 | + <view class="company-clean-container-car-popup-content-box"> | |
| 19 | + <view class="company-clean-container-car-popup-content-box-item" v-for="(item, index) in garCarInfoList" | |
| 20 | + :key="index"> | |
| 21 | + <view class="company-clean-container-car-popup-content-box-item-text"> | |
| 22 | + {{ item.garOrderCarType }} | |
| 23 | + </view> | |
| 24 | + <view class="company-clean-container-car-popup-content-box-item-number" hover-class="hoverClickStyle"> | |
| 25 | + <u-number-box :min="0" :max="9999" integer buttonSize="46" :inputWidth="100" | |
| 26 | + v-model="garCarInfoList[item.garOrderCarType].garOrderCarNumber" :disabledInput="true"></u-number-box> | |
| 27 | + </view> | |
| 28 | + </view> | |
| 29 | + </view> | |
| 30 | + </view> | |
| 31 | + <!-- 占位盒子 --> | |
| 32 | + <view class="company-clean-container-car-popup-button-safe"> | |
| 33 | + <view class="company-clean-container-car-popup-button-safe-btn"> | |
| 34 | + <u-button type="primary" color="#19a97c" @click="submitUpdateCarInfo">确定</u-button> | |
| 35 | + </view> | |
| 36 | + </view> | |
| 37 | + </view> | |
| 38 | + </u-popup> | |
| 8 | 39 | <view class="order-detail-container" v-if="dataGram != null || dataGram != undefined"> |
| 9 | 40 | <view class="order-detail-container-box"> |
| 10 | 41 | <view class="order-detail-top"> |
| ... | ... | @@ -133,19 +164,7 @@ |
| 133 | 164 | <view class="order-detail-container-header-card-uicon"></view> |
| 134 | 165 | 处理信息 |
| 135 | 166 | </view> |
| 136 | - <view v-if="dataGram.garOrderHandlerId" style="width: 100%;"> | |
| 137 | - <!-- <view class="order-detail-container-header-item"> | |
| 138 | - <text class="order-detail-container-header-title">负责人:</text> | |
| 139 | - <view class="order-detail-container-header-content"> | |
| 140 | - {{ dataGram.garOrderHandleName }} | |
| 141 | - </view> | |
| 142 | - </view> --> | |
| 143 | - <view class="order-detail-container-header-item"> | |
| 144 | - <text class="order-detail-container-header-title">服务电话:</text> | |
| 145 | - <view class="order-detail-container-header-content"> | |
| 146 | - {{ dataGram.garOrderCompanyTel }} | |
| 147 | - </view> | |
| 148 | - </view> | |
| 167 | + <view v-if="putDownImages.length || putOnImages.length" style="width: 100%;"> | |
| 149 | 168 | <view class="order-detail-container-header-item"> |
| 150 | 169 | <text class=" order-detail-container-header-title">装车照片:</text> |
| 151 | 170 | <view class="order-detail-container-header-content"> |
| ... | ... | @@ -172,45 +191,33 @@ |
| 172 | 191 | <view class="order-detail-bottom"> |
| 173 | 192 | <view class="order-detail-bottom-box"> |
| 174 | 193 | <view class=" order-detail-bottom-left"> |
| 175 | - <u-button | |
| 176 | - v-if="dataGram.garOrderHandlerStatus === 1 && dataGram.garCancelFlag === 0 && userType === '清运车辆驾驶员'" | |
| 177 | - @click="createQrCodeValid(orderId)" shape="square" color="#a9e08f" text="出示二维码"></u-button> | |
| 178 | 194 | <u-button v-if="dataGram.garOrderHandlerStatus === 0 && userType == '运输企业负责人' && dataGram.garCancelFlag === 0" |
| 179 | - @click="handleOderCancelClick()" shape="square" color="#a9e08f" text="取消订单"></u-button> | |
| 195 | + @click="handleOderCancelClick()" shape="square" color="#19a97c" text="取消订单"></u-button> | |
| 180 | 196 | <u-button v-if="dataGram.garOrderScanHandlerFlag === 0 && userType == '用户' && dataGram.garCancelFlag === 0" |
| 181 | - @click="handlerUpdateOrderClick()" shape="square" color="#a9e08f" text="修改订单"></u-button> | |
| 197 | + @click="handlerUpdateOrderClick()" shape="square" color="#19a97c" text="修改车辆信息"></u-button> | |
| 182 | 198 | <u-button v-if="dataGram.garOrderHandlerStatus === 1 && userType == '运输企业负责人'" |
| 183 | - @click="handleOrderDispatchClick(orderId)" shape="square" color="#a9e08f" text="分配驾驶员"></u-button> | |
| 199 | + @click="handleOrderDispatchClick(orderId)" shape="square" color="#19a97c" text="分配驾驶员"></u-button> | |
| 184 | 200 | </view> |
| 185 | 201 | <view class="order-detail-bottom-right"> |
| 186 | 202 | <u-button v-if="dataGram.garOrderHandlerStatus === 0 && userType == '用户' && dataGram.garCancelFlag === 0" |
| 187 | - @click="handleOderCancelClick()" shape="square" color="#a9e08f" text="取消订单"></u-button> | |
| 188 | - <u-button @click="driverHandleOrder(orderId)" | |
| 189 | - v-if="dataGram.garOrderHandlerStatus === 0 && dataGram.handleFlag && dataGram.garCancelFlag === 0 && userType === '清运车辆驾驶员'" | |
| 190 | - shape="square" color="#a9e08f" text="处理订单"></u-button> | |
| 203 | + @click="handleOderCancelClick()" shape="square" color="#19a97c" text="取消订单"></u-button> | |
| 191 | 204 | <u-button @click="handleOrder(orderId)" |
| 192 | 205 | v-if="dataGram.garOrderHandlerStatus === 0 && dataGram.handleFlag && dataGram.garCancelFlag === 0 && userType === '运输企业负责人'" |
| 193 | - shape="square" color="#a9e08f" text="处理订单"></u-button> | |
| 194 | - <u-button @click="handleUploadImage(orderId, 'putOnImages')" | |
| 195 | - v-if="dataGram.garOrderHandlerStatus === 1 && dataGram.garCancelFlag === 0 && userType === '清运车辆驾驶员'" | |
| 196 | - shape="square" color="#a9e08f" text="上传图片"></u-button> | |
| 206 | + shape="square" color="#19a97c" text="处理订单"></u-button> | |
| 197 | 207 | <u-button @click="handleEvaluate(orderId, userType)" |
| 198 | - v-if="dataGram.garEvaluateFlag === 0 && userType === '用户'" shape="square" color="#a9e08f" | |
| 208 | + v-if="dataGram.garEvaluateFlag === 0 && userType === '用户'" shape="square" color="#19a97c" | |
| 199 | 209 | text="去评价"></u-button> |
| 200 | 210 | <u-button @click="handleEvaluate(orderId, userType)" |
| 201 | - v-if="dataGram.garHandlerEvaluateFlag === 0 && userType === '运输企业负责人'" shape="square" color="#a9e08f" | |
| 211 | + v-if="dataGram.garHandlerEvaluateFlag === 0 && userType === '运输企业负责人'" shape="square" color="#19a97c" | |
| 202 | 212 | text="去评价"></u-button> |
| 203 | 213 | <u-button @click="handleEvaluateDetail(orderId, userType)" |
| 204 | - v-if="dataGram.garHandlerEvaluateFlag === 1 && userType === '运输企业负责人'" shape="square" color="#a9e08f" | |
| 214 | + v-if="dataGram.garHandlerEvaluateFlag === 1 && userType === '运输企业负责人'" shape="square" color="#19a97c" | |
| 205 | 215 | text="查看评价"></u-button> |
| 206 | 216 | <u-button @click="handleEvaluateDetail(orderId, userType)" |
| 207 | - v-if="dataGram.garEvaluateFlag === 1 && userType === '用户'" shape="square" color="#a9e08f" | |
| 217 | + v-if="dataGram.garEvaluateFlag === 1 && userType === '用户'" shape="square" color="#19a97c" | |
| 208 | 218 | text="查看评价"></u-button> |
| 209 | 219 | <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> --> | |
| 220 | + @click="handleDisposalDispatchClick(orderId)" shape="square" color="#19a97c" text="分配处置场所"></u-button> | |
| 214 | 221 | </view> |
| 215 | 222 | </view> |
| 216 | 223 | </view> |
| ... | ... | @@ -225,7 +232,8 @@ |
| 225 | 232 | </template> |
| 226 | 233 | |
| 227 | 234 | <script setup> |
| 228 | -import { createHandlerQrCode, dispatchDisposalOrders, dispatchOrders, queryDisposalDispatch, queryOrderDetail, queryOrderDispatch, updateOrder } from "@/apis/order.js"; | |
| 235 | +import { queryCarList } from '@/apis/carinfo.js'; | |
| 236 | +import { dispatchDisposalOrders, dispatchOrders, queryDisposalDispatch, queryOrderDetail, queryOrderDispatch, updateOrder } from "@/apis/order.js"; | |
| 229 | 237 | import { createQrCode } from '@/apis/qrcode.js'; |
| 230 | 238 | import uqrcode from '@/components/Sansnn-uQRCode_4.0.6/components/uqrcode/uqrcode.vue'; |
| 231 | 239 | import clashDisposalDispatch from '@/components/clash-disposal-dispatch/index.vue'; |
| ... | ... | @@ -234,6 +242,12 @@ import zStatic from '@/components/z-paging/js/z-paging-static'; |
| 234 | 242 | import { useMainStore } from '@/stores/index.js'; |
| 235 | 243 | import { onLoad, onShow } from '@dcloudio/uni-app'; |
| 236 | 244 | import { computed, ref } from 'vue'; |
| 245 | +const paramFrom = ref({ | |
| 246 | + carNumber: 0, | |
| 247 | + carType: "" | |
| 248 | +}) | |
| 249 | +const garCarInfoList = ref({}) | |
| 250 | +const carPopupShowFlag = ref(false) | |
| 237 | 251 | const isOnloadIn = ref(false) |
| 238 | 252 | const clashDriverDispatchRef = ref() |
| 239 | 253 | const clashDisposalDispatchRef = ref() |
| ... | ... | @@ -253,6 +267,9 @@ const cancelShow = ref(false) |
| 253 | 267 | const currentCancelName = ref("") |
| 254 | 268 | const qrCodeRef = ref() |
| 255 | 269 | const qrCodeText = ref() |
| 270 | +const candidates = ref([]) | |
| 271 | +const garCarLabelInfoList = ref({}) | |
| 272 | +const garCarLabelInfoNow = ref() | |
| 256 | 273 | const list = computed(() => { |
| 257 | 274 | let reason = [ |
| 258 | 275 | { |
| ... | ... | @@ -283,6 +300,9 @@ const list = computed(() => { |
| 283 | 300 | return reason |
| 284 | 301 | }) |
| 285 | 302 | |
| 303 | +const handlePopupClick = (val) => { | |
| 304 | + carPopupShowFlag.value = val | |
| 305 | +} | |
| 286 | 306 | // 创建二维码 |
| 287 | 307 | const createQrCodeLocal = (orderId) => { |
| 288 | 308 | // 获取本地地址拼接订单id |
| ... | ... | @@ -452,7 +472,6 @@ const handleSubmitSuccess = (orderId) => { |
| 452 | 472 | } |
| 453 | 473 | } |
| 454 | 474 | }); |
| 455 | - // uni.$u.route(`pages/order/success/index?orderId=${orderId}`) | |
| 456 | 475 | |
| 457 | 476 | } |
| 458 | 477 | const handleEvaluate = (orderId, userType) => { |
| ... | ... | @@ -477,25 +496,6 @@ const handleOrder = (orderId) => { |
| 477 | 496 | }) |
| 478 | 497 | } |
| 479 | 498 | |
| 480 | -// 接收订单 | |
| 481 | -const driverHandleOrder = (orderId) => { | |
| 482 | - updateOrder({ garOrderId: orderId, handleType: 0 }).then(res => { | |
| 483 | - if (res.data.success) { | |
| 484 | - if (res.data.data === "订单已经被别人接受啦") { | |
| 485 | - uni.$u.toast(res.data.data) | |
| 486 | - uni.$u.route({ | |
| 487 | - type: "reLaunch", | |
| 488 | - url: `pages/order/index`, | |
| 489 | - }) | |
| 490 | - } else { | |
| 491 | - uni.$u.toast(res.data.data) | |
| 492 | - handleOrderDetail(orderId) | |
| 493 | - } | |
| 494 | - } | |
| 495 | - }) | |
| 496 | -} | |
| 497 | - | |
| 498 | - | |
| 499 | 499 | const currentStep = (step) => { |
| 500 | 500 | if (step > 2) { |
| 501 | 501 | return step - 1; |
| ... | ... | @@ -520,22 +520,7 @@ const cleanStatus = (status) => { |
| 520 | 520 | return '清运完成'; |
| 521 | 521 | } |
| 522 | 522 | } |
| 523 | -const createQrCodeValid = (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 | - }) | |
| 530 | -} | |
| 531 | -/** | |
| 532 | - * 上传图片 | |
| 533 | - * @param {string} orderId | |
| 534 | - * @param {string} putType | |
| 535 | - */ | |
| 536 | -const handleUploadImage = (orderId, putType) => { | |
| 537 | - uni.$u.route(`pages/order/other-home/upload/index?orderId=${orderId}`) | |
| 538 | -} | |
| 523 | + | |
| 539 | 524 | const handleDisposalDispatchConfirm = (val) => { |
| 540 | 525 | console.log(val); |
| 541 | 526 | if (!val) { |
| ... | ... | @@ -562,8 +547,33 @@ const handleDisposalDispatchConfirm = (val) => { |
| 562 | 547 | } |
| 563 | 548 | |
| 564 | 549 | const handlerUpdateOrderClick = () => { |
| 550 | + carPopupShowFlag.value = true; | |
| 565 | 551 | // TODO 照搬一键清运得弹窗 |
| 566 | 552 | console.log("点击了修改订单按钮"); |
| 553 | + // TODO | |
| 554 | + queryCarList({ | |
| 555 | + companyId: dataGram.value.garOrderCompanyId | |
| 556 | + }).then(res => { | |
| 557 | + // 设置车辆类型 | |
| 558 | + candidates.value = [[...new Set(res.data.rows | |
| 559 | + .filter(item => item.containerVolume) | |
| 560 | + .map(item => { | |
| 561 | + garCarLabelInfoList.value[item.containerVolume + "方车"] = item | |
| 562 | + return item.containerVolume + "方车" | |
| 563 | + })) | |
| 564 | + ]]; | |
| 565 | + // 设置初始车辆数量 | |
| 566 | + candidates.value[0].forEach((item, index) => { | |
| 567 | + garCarInfoList.value[item] = { | |
| 568 | + garOrderCarNumber: 0, | |
| 569 | + garOrderCarType: item | |
| 570 | + } | |
| 571 | + }) | |
| 572 | + // 设置默认车辆 | |
| 573 | + paramFrom.value.carType = candidates.value[0][0]; | |
| 574 | + garCarLabelInfoNow.value = garCarLabelInfoList.value[paramFrom.value.carType] | |
| 575 | + console.log(garCarLabelInfoList.value, garCarInfoList.value, paramFrom.value.carType); | |
| 576 | + }) | |
| 567 | 577 | } |
| 568 | 578 | // 指定人员 |
| 569 | 579 | const handleDriverDispatchConfirm = (val) => { |
| ... | ... | @@ -591,6 +601,30 @@ const handleDriverDispatchConfirm = (val) => { |
| 591 | 601 | }) |
| 592 | 602 | } |
| 593 | 603 | |
| 604 | +const submitUpdateCarInfo = () => { | |
| 605 | + let garCarInfos = []; | |
| 606 | + for (const key in garCarInfoList.value) { | |
| 607 | + garCarInfos.push(garCarInfoList.value[key]) | |
| 608 | + } | |
| 609 | + | |
| 610 | + let data = { | |
| 611 | + garOrderId: orderId.value, | |
| 612 | + garCarInfoList: garCarInfos, | |
| 613 | + updated: true | |
| 614 | + } | |
| 615 | + updateOrder(data).then(res => { | |
| 616 | + if (res.data.code == 200) { | |
| 617 | + uni.$u.toast("车辆信息修改成功") | |
| 618 | + // 更新数据 | |
| 619 | + handleOrderDetail(orderId.value) | |
| 620 | + // 关闭弹窗 | |
| 621 | + carPopupShowFlag.value = false | |
| 622 | + } | |
| 623 | + }).catch(err => { | |
| 624 | + uni.$u.toast("修改失败,请重试") | |
| 625 | + }) | |
| 626 | +} | |
| 627 | + | |
| 594 | 628 | /** |
| 595 | 629 | * 初始化信息 |
| 596 | 630 | */ |
| ... | ... | @@ -727,7 +761,7 @@ $custom-bottom-height: 200rpx; |
| 727 | 761 | display: flex; |
| 728 | 762 | align-items: center; |
| 729 | 763 | justify-content: center; |
| 730 | - background-color: #a9e08f; | |
| 764 | + background-color: #19a97c; | |
| 731 | 765 | border-radius: 100%; |
| 732 | 766 | } |
| 733 | 767 | } |
| ... | ... | @@ -764,4 +798,58 @@ $custom-bottom-height: 200rpx; |
| 764 | 798 | align-items: center; |
| 765 | 799 | justify-content: center; |
| 766 | 800 | } |
| 801 | + | |
| 802 | +// 弹出框 | |
| 803 | +.company-clean-container-car-popup { | |
| 804 | + min-height: 450rpx; | |
| 805 | + padding: $custom-page-padding; | |
| 806 | + box-sizing: border-box; | |
| 807 | + | |
| 808 | + .company-clean-container-car-popup-content { | |
| 809 | + font-size: 28rpx; | |
| 810 | + | |
| 811 | + .company-clean-container-car-popup-content-box { | |
| 812 | + box-sizing: border-box; | |
| 813 | + padding: $custom-page-padding; | |
| 814 | + border: 2rpx solid #19a97c; | |
| 815 | + border-radius: 10rpx; | |
| 816 | + | |
| 817 | + .company-clean-container-car-popup-content-box-item { | |
| 818 | + display: flex; | |
| 819 | + align-items: center; | |
| 820 | + justify-content: space-between; | |
| 821 | + margin: 20rpx 0; | |
| 822 | + box-sizing: border-box; | |
| 823 | + | |
| 824 | + .company-clean-container-car-popup-content-box-item-text {} | |
| 825 | + | |
| 826 | + .company-clean-container-car-popup-content-box-item-number {} | |
| 827 | + } | |
| 828 | + } | |
| 829 | + | |
| 830 | + .company-clean-container-car-popup-content-title { | |
| 831 | + color: $u-main-color; | |
| 832 | + box-sizing: border-box; | |
| 833 | + margin-bottom: 20rpx; | |
| 834 | + font-size: 30rpx; | |
| 835 | + font-weight: bold; | |
| 836 | + } | |
| 837 | + } | |
| 838 | + | |
| 839 | + .company-clean-container-car-popup-button-safe { | |
| 840 | + width: 100%; | |
| 841 | + height: $custom-bottom-height; | |
| 842 | + box-sizing: border-box; | |
| 843 | + padding: 20rpx; | |
| 844 | + | |
| 845 | + .company-clean-container-car-popup-button-safe-btn { | |
| 846 | + width: 100%; | |
| 847 | + height: 100%; | |
| 848 | + border-radius: 10rpx; | |
| 849 | + font-size: 30rpx; | |
| 850 | + line-height: 100rpx; | |
| 851 | + text-align: center; | |
| 852 | + } | |
| 853 | + } | |
| 854 | +} | |
| 767 | 855 | </style> | ... | ... |
garbage-removal/src/pages/order/other-home/swiper-list-item/index.vue
| ... | ... | @@ -11,12 +11,9 @@ |
| 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> | |
| 16 | 14 | <view v-if="item.garOrderHandlerStatus === 0 && item.garCancelFlag === 0" class="right">待清运 </view> |
| 17 | 15 | <view v-if="item.garCancelFlag === 1" class="right">已取消 </view> |
| 18 | 16 | <view v-if="item.garOrderHandlerStatus === 1 && item.garCancelFlag === 0" class="right">清运中 </view> |
| 19 | - <view v-if="item.garOrderHandlerStatus === 3 && userType === '清运车辆驾驶员'" class="right">已完成 </view> | |
| 20 | 17 | </view> |
| 21 | 18 | <view v-if="item.garEvaluateFlag === 0 && userType === '用户'" class="right">待评价 |
| 22 | 19 | </view> |
| ... | ... | @@ -37,8 +34,7 @@ |
| 37 | 34 | <view class="delivery-time">预约时间 {{ item.garOrderAgreementTime }}</view> |
| 38 | 35 | </view> |
| 39 | 36 | </view> |
| 40 | - <view class="bottom" | |
| 41 | - v-if="item.garOrderHandlerStatus === 0 && item.garCancelFlag === 0 && userType != '清运车辆驾驶员'"> | |
| 37 | + <view class="bottom" v-if="item.garOrderHandlerStatus === 0 && item.garCancelFlag === 0"> | |
| 42 | 38 | <view class="more"> |
| 43 | 39 | <!-- <u-icon name="more-dot-fill" color="rgb(203,203,203)"></u-icon> --> |
| 44 | 40 | </view> | ... | ... |
garbage-removal/src/pages/wode/index.vue
| 1 | 1 | <template> |
| 2 | - <view> | |
| 3 | - <view class="u-flex u-flex-y-center u-flex-around user-box u-p-l-30 u-p-r-20 u-p-b-30"> | |
| 4 | - <view class="u-m-r-10"> | |
| 2 | + <view class="wode-container"> | |
| 3 | + <view class="head-top-box"> | |
| 4 | + <view class="head-image-box"> | |
| 5 | 5 | <u-avatar :src="pic" size="140"></u-avatar> |
| 6 | 6 | </view> |
| 7 | - <view class="u-flex-1"> | |
| 8 | - <view class="u-font-18 u-p-b-20">{{ userInfo.userType }}</view> | |
| 9 | - <view class="manager-info" v-if="userInfo.userType === '清运车辆驾驶员'"> | |
| 7 | + <view style="display: flex; flex-direction: column; width: 100%;"> | |
| 8 | + <view class="manager-info"> | |
| 10 | 9 | <view class="manager-info-transport-company-name"> |
| 11 | - <text style="margin-right: 20rpx;">所属运输公司:</text> | |
| 12 | - <text>{{ userInfo.transportCompanyName }}</text> | |
| 13 | - </view> | |
| 14 | - </view> | |
| 15 | - <view class="manager-info" v-if="userInfo.userType === '运输企业负责人'"> | |
| 16 | - <view class="manager-info-transport-company-name"> | |
| 17 | - <text style="margin-right: 20rpx;">所属运输公司:</text> | |
| 18 | - <text>{{ userInfo.transportCompanyName }}</text> | |
| 10 | + <view class=""> | |
| 11 | + <text>{{ userInfo.transportCompanyName }}</text> | |
| 12 | + </view> | |
| 19 | 13 | </view> |
| 14 | + <view class="choose-type-item-text-right-label">{{ userInfo.userType }}</view> | |
| 20 | 15 | </view> |
| 21 | 16 | </view> |
| 22 | 17 | </view> |
| ... | ... | @@ -84,17 +79,28 @@ const handleLoginOut = () => { |
| 84 | 79 | } |
| 85 | 80 | </script> |
| 86 | 81 | |
| 87 | -<style lang="scss"> | |
| 82 | +<style lang="scss" scoped> | |
| 88 | 83 | page { |
| 89 | - background-color: #ededed; | |
| 84 | + background-color: #19a97c; | |
| 90 | 85 | } |
| 91 | 86 | |
| 92 | -.camera { | |
| 93 | - width: 54px; | |
| 94 | - height: 44px; | |
| 87 | +.wode-container { | |
| 88 | + height: 100%; | |
| 89 | + box-sizing: border-box; | |
| 90 | + background: linear-gradient(to bottom, #19a97c, $u-bg-color, $u-bg-color, $u-bg-color, $u-bg-color, $u-bg-color, $u-bg-color); | |
| 91 | + | |
| 92 | + .head-top-box { | |
| 93 | + margin-top: 100rpx; | |
| 94 | + display: flex; | |
| 95 | + align-items: center; | |
| 95 | 96 | |
| 96 | - &:active { | |
| 97 | - background-color: #ededed; | |
| 97 | + .head-image-box { | |
| 98 | + display: flex; | |
| 99 | + align-items: center; | |
| 100 | + justify-content: center; | |
| 101 | + width: 200rpx; | |
| 102 | + height: 200rpx; | |
| 103 | + } | |
| 98 | 104 | } |
| 99 | 105 | } |
| 100 | 106 | |
| ... | ... | @@ -111,21 +117,46 @@ page { |
| 111 | 117 | } |
| 112 | 118 | |
| 113 | 119 | .manager-info { |
| 114 | - font-size: 25rpx; | |
| 115 | - color: $u-main-color; | |
| 116 | - box-sizing: border-box; | |
| 120 | + width: 100%; | |
| 121 | + height: 100%; | |
| 122 | + display: flex; | |
| 123 | + flex-direction: column; | |
| 124 | + align-items: flex-start; | |
| 125 | + justify-content: space-around; | |
| 126 | + color: white; | |
| 127 | + | |
| 128 | + .choose-tyep-item-text-right-info { | |
| 129 | + font-size: 28rpx; | |
| 130 | + } | |
| 117 | 131 | |
| 118 | - .manager-info-parent-company-name { | |
| 132 | + .choose-tyep-item-text-right-compay { | |
| 133 | + font-weight: bolder; | |
| 134 | + line-height: 35rpx; | |
| 135 | + font-size: 32rpx; | |
| 136 | + } | |
| 119 | 137 | |
| 120 | - text { | |
| 121 | - color: $u-info; | |
| 122 | - } | |
| 138 | + .choose-type-item-text-right-label { | |
| 139 | + font-size: 23rpx; | |
| 140 | + padding: 8rpx 15rpx; | |
| 141 | + border-radius: 5rpx; | |
| 142 | + color: $u-info-dark; | |
| 143 | + font-weight: 600; | |
| 144 | + margin-bottom: 10rpx; | |
| 145 | + background: #ffffffad; | |
| 146 | + border: 3rpx solid white; | |
| 123 | 147 | } |
| 148 | +} | |
| 124 | 149 | |
| 125 | - .manager-info-transport-company-name { | |
| 126 | - text { | |
| 127 | - color: $u-info; | |
| 128 | - } | |
| 150 | +.manager-info-parent-company-name { | |
| 151 | + | |
| 152 | + text { | |
| 153 | + color: $u-info; | |
| 129 | 154 | } |
| 130 | 155 | } |
| 156 | + | |
| 157 | +.manager-info-transport-company-name { | |
| 158 | + display: flex; | |
| 159 | + color: white; | |
| 160 | + line-height: 80rpx; | |
| 161 | +} | |
| 131 | 162 | </style> | ... | ... |
garbage-removal/src/uview-plus/components/u-action-sheet/u-action-sheet.vue
| 1 | - | |
| 2 | 1 | <template> |
| 3 | 2 | <u-popup :show="show" mode="bottom" @close="closeHandler" :safeAreaInsetBottom="safeAreaInsetBottom" :round="round"> |
| 4 | 3 | <view class="u-action-sheet"> |
| ... | ... | @@ -9,8 +8,8 @@ |
| 9 | 8 | </view> |
| 10 | 9 | </view> |
| 11 | 10 | <text class="u-action-sheet__description" :style="[{ |
| 12 | - marginTop: `${title && description ? 0 : '18px'}` | |
| 13 | - }]" v-if="description">{{ description }}</text> | |
| 11 | + marginTop: `${title && description ? 0 : '18px'}` | |
| 12 | + }]" v-if="description">{{ description }}</text> | |
| 14 | 13 | <slot> |
| 15 | 14 | <u-line v-if="description"></u-line> |
| 16 | 15 | <view class="u-action-sheet__item-wrap"> |
| ... | ... | @@ -223,7 +222,7 @@ $u-action-sheet-cancel-text-hover-background-color: rgb(242, 243, 245) !default; |
| 223 | 222 | |
| 224 | 223 | .u-reset-button-btn { |
| 225 | 224 | margin: 20rpx 0; |
| 226 | - background-color: $u-success; | |
| 225 | + background-color: #19a97c; | |
| 227 | 226 | width: $u-action-sheet-reset-button-width; |
| 228 | 227 | box-sizing: border-box; |
| 229 | 228 | } |
| ... | ... | @@ -293,7 +292,7 @@ $u-action-sheet-cancel-text-hover-background-color: rgb(242, 243, 245) !default; |
| 293 | 292 | } |
| 294 | 293 | |
| 295 | 294 | &--active { |
| 296 | - background-color: $u-success-light; | |
| 295 | + background-color: #19a97b79; | |
| 297 | 296 | } |
| 298 | 297 | } |
| 299 | 298 | </style> | ... | ... |