Commit 70490f929f20967ec8065c3f23daef2834199270
1 parent
34f76d71
趟次功能,优化扫码
Showing
17 changed files
with
449 additions
and
329 deletions
garbage-removal/.env.production
| 1 | -VITE_BASE_URL=http://61.169.120.202:18888/workflow | 1 | +VITE_BASE_URL=/workflow |
| 2 | # VITE_BASE_URL=http://175.6.47.84:10001/workflow | 2 | # VITE_BASE_URL=http://175.6.47.84:10001/workflow |
| 3 | # VITE_BASE_FILE_UPLOAD_PREFIX=/common/upload | 3 | # VITE_BASE_FILE_UPLOAD_PREFIX=/common/upload |
| 4 | # VITE_STOMP_URL=http://localhost:8860/ws | 4 | # VITE_STOMP_URL=http://localhost:8860/ws |
garbage-removal/dist1.zip
0 → 100644
No preview for this file type
garbage-removal/package-lock.json
| @@ -9,7 +9,7 @@ | @@ -9,7 +9,7 @@ | ||
| 9 | "version": "0.0.0", | 9 | "version": "0.0.0", |
| 10 | "dependencies": { | 10 | "dependencies": { |
| 11 | "@dcloudio/uni-app": "3.0.0-3090620231104002", | 11 | "@dcloudio/uni-app": "3.0.0-3090620231104002", |
| 12 | - "@dcloudio/uni-app-plus": "3.0.0-3090620231104002", | 12 | + "@dcloudio/uni-app-plus": "^3.0.0-3090620231104002", |
| 13 | "@dcloudio/uni-components": "3.0.0-3090620231104002", | 13 | "@dcloudio/uni-components": "3.0.0-3090620231104002", |
| 14 | "@dcloudio/uni-h5": "3.0.0-3090620231104002", | 14 | "@dcloudio/uni-h5": "3.0.0-3090620231104002", |
| 15 | "@dcloudio/uni-mp-alipay": "3.0.0-3090620231104002", | 15 | "@dcloudio/uni-mp-alipay": "3.0.0-3090620231104002", |
| @@ -1887,7 +1887,6 @@ | @@ -1887,7 +1887,6 @@ | ||
| 1887 | "version": "3.0.0-3090620231104002", | 1887 | "version": "3.0.0-3090620231104002", |
| 1888 | "resolved": "https://registry.npmmirror.com/@dcloudio/uni-app-plus/-/uni-app-plus-3.0.0-3090620231104002.tgz", | 1888 | "resolved": "https://registry.npmmirror.com/@dcloudio/uni-app-plus/-/uni-app-plus-3.0.0-3090620231104002.tgz", |
| 1889 | "integrity": "sha512-L4+OgMQYKP6R7TXFBl0OiYKa0Ys/X9TbDHERFOe0IFYeuDCLbXpWU3k8zRCTOAmtRVNAulBIaet++YpxkpR/pw==", | 1889 | "integrity": "sha512-L4+OgMQYKP6R7TXFBl0OiYKa0Ys/X9TbDHERFOe0IFYeuDCLbXpWU3k8zRCTOAmtRVNAulBIaet++YpxkpR/pw==", |
| 1890 | - "license": "Apache-2.0", | ||
| 1891 | "dependencies": { | 1890 | "dependencies": { |
| 1892 | "@dcloudio/uni-app-uts": "3.0.0-3090620231104002", | 1891 | "@dcloudio/uni-app-uts": "3.0.0-3090620231104002", |
| 1893 | "@dcloudio/uni-app-vite": "3.0.0-3090620231104002", | 1892 | "@dcloudio/uni-app-vite": "3.0.0-3090620231104002", |
garbage-removal/package.json
| @@ -41,7 +41,7 @@ | @@ -41,7 +41,7 @@ | ||
| 41 | }, | 41 | }, |
| 42 | "dependencies": { | 42 | "dependencies": { |
| 43 | "@dcloudio/uni-app": "3.0.0-3090620231104002", | 43 | "@dcloudio/uni-app": "3.0.0-3090620231104002", |
| 44 | - "@dcloudio/uni-app-plus": "3.0.0-3090620231104002", | 44 | + "@dcloudio/uni-app-plus": "^3.0.0-3090620231104002", |
| 45 | "@dcloudio/uni-components": "3.0.0-3090620231104002", | 45 | "@dcloudio/uni-components": "3.0.0-3090620231104002", |
| 46 | "@dcloudio/uni-h5": "3.0.0-3090620231104002", | 46 | "@dcloudio/uni-h5": "3.0.0-3090620231104002", |
| 47 | "@dcloudio/uni-mp-alipay": "3.0.0-3090620231104002", | 47 | "@dcloudio/uni-mp-alipay": "3.0.0-3090620231104002", |
garbage-removal/src/components/QrScanner/QrScanner.vue
| @@ -96,12 +96,16 @@ defineExpose({ qrcodeData }) | @@ -96,12 +96,16 @@ defineExpose({ qrcodeData }) | ||
| 96 | border-radius: 50%; | 96 | border-radius: 50%; |
| 97 | background-color: #fff; | 97 | background-color: #fff; |
| 98 | color: #000; | 98 | color: #000; |
| 99 | - text-align: left; | 99 | + text-align: center; |
| 100 | line-height: 30px; | 100 | line-height: 30px; |
| 101 | - font-size: 20px; | 101 | + font-size: 25px; |
| 102 | cursor: pointer; | 102 | cursor: pointer; |
| 103 | z-index: 1000000; | 103 | z-index: 1000000; |
| 104 | } | 104 | } |
| 105 | + .close-view span{ | ||
| 106 | + position: absolute; | ||
| 107 | + left: 7px; | ||
| 108 | + } | ||
| 105 | } | 109 | } |
| 106 | 110 | ||
| 107 | .qr-scanner { | 111 | .qr-scanner { |
garbage-removal/src/components/clash-disposal-dispatch/index.vue
| @@ -43,14 +43,16 @@ function getTitle(checked) { | @@ -43,14 +43,16 @@ function getTitle(checked) { | ||
| 43 | function changeVerify(current, chooseList) { | 43 | function changeVerify(current, chooseList) { |
| 44 | // 注意:返回非空字符串会阻止原有行为,并提示返回的字符串 | 44 | // 注意:返回非空字符串会阻止原有行为,并提示返回的字符串 |
| 45 | // 如果函数体不做return返回值,即验证通过,控件正常处理业务 | 45 | // 如果函数体不做return返回值,即验证通过,控件正常处理业务 |
| 46 | - // 限制条件 | ||
| 47 | - if (chooseList) { | 46 | + // 限制条件 只能选择一个处置场所 |
| 47 | + if (chooseList && chooseList.length<2) { | ||
| 48 | for (let index = 0; index < chooseList.length; index++) { | 48 | for (let index = 0; index < chooseList.length; index++) { |
| 49 | const element = chooseList[index]; | 49 | const element = chooseList[index]; |
| 50 | if (current.id.indexOf(element.id) === -1 && element.label.indexOf(current.label) != -1) { | 50 | if (current.id.indexOf(element.id) === -1 && element.label.indexOf(current.label) != -1) { |
| 51 | return "该处置场所负责人已经被选中了" | 51 | return "该处置场所负责人已经被选中了" |
| 52 | } | 52 | } |
| 53 | } | 53 | } |
| 54 | + }else{ | ||
| 55 | + return "只能选择一个处置场所" | ||
| 54 | } | 56 | } |
| 55 | } | 57 | } |
| 56 | function open(dataList) { | 58 | function open(dataList) { |
garbage-removal/src/pages/home-info/clean/index.vue
| @@ -115,7 +115,7 @@ | @@ -115,7 +115,7 @@ | ||
| 115 | </view> | 115 | </view> |
| 116 | <view class="company-clean-container-site-image-info"> | 116 | <view class="company-clean-container-site-image-info"> |
| 117 | <view class="company-clean-container-site-image-info-remark"> | 117 | <view class="company-clean-container-site-image-info-remark"> |
| 118 | - <text style="color: red;">*</text>请上传垃圾量照片(至少1张,最多5张),照片须看清全貌。 | 118 | + <text style="color: red;" @click="openPhone">*测试</text>请上传垃圾量照片(至少1张,最多5张),照片须看清全貌。 |
| 119 | </view> | 119 | </view> |
| 120 | <view class="company-clean-container-site-image-info-img"> | 120 | <view class="company-clean-container-site-image-info-img"> |
| 121 | <u-upload width="200" height="150" :fileList="fileList" @afterRead="afterRead" :deletable="deletable" | 121 | <u-upload width="200" height="150" :fileList="fileList" @afterRead="afterRead" :deletable="deletable" |
| @@ -237,6 +237,17 @@ const handleTimeChoose = () => { | @@ -237,6 +237,17 @@ const handleTimeChoose = () => { | ||
| 237 | chooseTime.value.open(); | 237 | chooseTime.value.open(); |
| 238 | } | 238 | } |
| 239 | 239 | ||
| 240 | +const openPhone = () => { | ||
| 241 | + alert("网页调试---->>> 拍照点击事件 调用安卓层功能 "); | ||
| 242 | + window.JsInterface.takePhone(); | ||
| 243 | +} | ||
| 244 | + | ||
| 245 | +const takePhoneCallBack = (path) => { | ||
| 246 | + //如果用户不授予权限 或者没有权限 获取拍照之后没确定 不会过这里 | ||
| 247 | + //最好也是判断 path 非空的时候 去处理逻辑 | ||
| 248 | + alert("网页调试---->>> 拍照后回调 路径=" + path); | ||
| 249 | + } | ||
| 250 | + | ||
| 240 | const changeTime = (e) => { | 251 | const changeTime = (e) => { |
| 241 | dayTime.value = e.value | 252 | dayTime.value = e.value |
| 242 | 253 |
garbage-removal/src/pages/login/code.vue
| @@ -76,6 +76,7 @@ const checkVerifyNum = (code) => { | @@ -76,6 +76,7 @@ const checkVerifyNum = (code) => { | ||
| 76 | verifyFlag.value = false; | 76 | verifyFlag.value = false; |
| 77 | store.tempToken = res.data.data.token | 77 | store.tempToken = res.data.data.token |
| 78 | store.userName = res.data.data.name; | 78 | store.userName = res.data.data.name; |
| 79 | + store.userPhone = res.data.data.loginPhone; | ||
| 79 | if(res.data.data.testUser){ | 80 | if(res.data.data.testUser){ |
| 80 | uni.navigateTo({ | 81 | uni.navigateTo({ |
| 81 | url: `/pages/wode-info/wode-info-choose/index?ruleVos= ${encodeURIComponent(JSON.stringify(res.data.data.ruleVos))}&userName=${encodeURIComponent(res.data.data.name)}` | 82 | url: `/pages/wode-info/wode-info-choose/index?ruleVos= ${encodeURIComponent(JSON.stringify(res.data.data.ruleVos))}&userName=${encodeURIComponent(res.data.data.name)}` |
garbage-removal/src/pages/order-info/order-disposal/scan-detail/index.vue
| 1 | <template> | 1 | <template> |
| 2 | - <view class="scan-detail-container"> | ||
| 3 | - <view class="scan-detail-box"> | ||
| 4 | - <view class="scan-time"> | ||
| 5 | - <view class="scan-label"> | ||
| 6 | - 分发时间: | ||
| 7 | - </view> | ||
| 8 | - <view class="scan-time"> | ||
| 9 | - {{ details.garCreateTime }} | ||
| 10 | - </view> | ||
| 11 | - | ||
| 12 | - </view> | ||
| 13 | - <view class="scan-time"> | ||
| 14 | - <view class="scan-label"> | ||
| 15 | - 司机姓名: | ||
| 16 | - </view> | ||
| 17 | - <view class="scan-time"> | ||
| 18 | - {{ details.garOrderHandlerName }} | ||
| 19 | - </view> | ||
| 20 | - </view> | ||
| 21 | - <view class="scan-time"> | ||
| 22 | - <view class="scan-label"> | ||
| 23 | - 司机电话: | ||
| 24 | - </view> | ||
| 25 | - <view class="scan-time" style="color: #000000"> | ||
| 26 | - {{ details.garOrderHandlerTel }} | ||
| 27 | - </view> | ||
| 28 | - </view> | ||
| 29 | - <view class="scan-time"> | ||
| 30 | - <view class="scan-label"> | ||
| 31 | - 所属公司: | ||
| 32 | - </view> | ||
| 33 | - <view class="scan-time"> | ||
| 34 | - {{ details.garOrderCompanyName }} | ||
| 35 | - </view> | ||
| 36 | - </view> | ||
| 37 | - </view> | ||
| 38 | - <view class="scan-submit-info"> | ||
| 39 | - <view class="scan-submit-title-box"> | ||
| 40 | - <up-badge :isDot="true" type="success"></up-badge><text>提交信息</text> | ||
| 41 | - </view> | ||
| 42 | - <view class="scan-car-num"> | ||
| 43 | - <view class="scan-car-num-label"> | ||
| 44 | - 车牌号 | ||
| 45 | - </view> | ||
| 46 | - <view class="scan-car-num-content"> | ||
| 47 | - {{ details.garHandlerCarCode }} | ||
| 48 | - </view> | ||
| 49 | - </view> | ||
| 50 | - <view class="scan-car-num"> | ||
| 51 | - <view class="scan-car-num-label"> | ||
| 52 | - 车辆载重 | ||
| 53 | - </view> | ||
| 54 | - <view class="scan-car-num-content"> | ||
| 55 | - <up-input :disabled="!isDeletable" placeholder="请输入数字,单位吨" border="surround" | ||
| 56 | - v-model="details.garCarryingWeight" @change="handlerInputChange"></up-input> | ||
| 57 | - </view> | ||
| 58 | - </view> | ||
| 59 | - <view class="scan-car-num"> | ||
| 60 | - <view class="scan-car-num-label"> | ||
| 61 | - 接收量 | ||
| 62 | - </view> | ||
| 63 | - <view class="scan-car-num-content"> | ||
| 64 | - <up-input :disabled="!isDeletable" placeholder="请输入数字" border="surround" | ||
| 65 | - v-model="details.garReceptionQuantity" @change="handlerInputChange"></up-input> | ||
| 66 | - </view> | ||
| 67 | - </view> | ||
| 68 | - <view class="scan-upload-fill-image-box"> | ||
| 69 | - <view class="scan-upload-fill-image-label"> | ||
| 70 | - <view> | ||
| 71 | - 全景照片 | ||
| 72 | - </view> | ||
| 73 | - <view v-if="isDeletable"> | ||
| 74 | - {{ fileList.length }}/{{ maxCount }} | ||
| 75 | - </view> | ||
| 76 | - </view> | ||
| 77 | - <view class="scan-upload-fill-image-btn" v-if="maxCount"> | ||
| 78 | - <u-upload width="200" height="150" :deletable="isDeletable" :fileList="fileList" @afterRead="afterRead" | ||
| 79 | - @delete="deletePic" name="3" multiple :maxCount="maxCount" :previewFullImage="true"></u-upload> | ||
| 80 | - </view> | ||
| 81 | - </view> | ||
| 82 | - </view> | ||
| 83 | - <view class="scan-submit-button-box" v-if="isNew"> | ||
| 84 | - <view class="scan-submit-button-btn"> | ||
| 85 | - <u-button type="primary" @tap="handlerSubmit" text="确认"></u-button> | ||
| 86 | - </view> | ||
| 87 | - </view> | ||
| 88 | - </view> | 2 | + <view class="scan-detail-container"> |
| 3 | + <view class="scan-detail-box"> | ||
| 4 | + <view class="scan-time"> | ||
| 5 | + <view class="scan-label"> | ||
| 6 | + 分发时间: | ||
| 7 | + </view> | ||
| 8 | + <view class="scan-time"> | ||
| 9 | + {{ details.garCreateTime }} | ||
| 10 | + </view> | ||
| 11 | + | ||
| 12 | + </view> | ||
| 13 | + <view class="scan-time"> | ||
| 14 | + <view class="scan-label"> | ||
| 15 | + 司机姓名: | ||
| 16 | + </view> | ||
| 17 | + <view class="scan-time"> | ||
| 18 | + {{ details.garOrderHandlerName }} | ||
| 19 | + </view> | ||
| 20 | + </view> | ||
| 21 | + <view class="scan-time"> | ||
| 22 | + <view class="scan-label"> | ||
| 23 | + 司机电话: | ||
| 24 | + </view> | ||
| 25 | + <view class="scan-time" style="color: #000000"> | ||
| 26 | + {{ details.garOrderHandlerTel }} | ||
| 27 | + </view> | ||
| 28 | + </view> | ||
| 29 | + <view class="scan-time"> | ||
| 30 | + <view class="scan-label"> | ||
| 31 | + 所属公司: | ||
| 32 | + </view> | ||
| 33 | + <view class="scan-time"> | ||
| 34 | + {{ details.garOrderCompanyName }} | ||
| 35 | + </view> | ||
| 36 | + </view> | ||
| 37 | + </view> | ||
| 38 | + <view class="scan-submit-info"> | ||
| 39 | + <view class="scan-submit-title-box"> | ||
| 40 | + <up-badge :isDot="true" type="success"></up-badge><text>提交信息</text> | ||
| 41 | + </view> | ||
| 42 | + <view class="scan-car-num"> | ||
| 43 | + <view class="scan-car-num-label"> | ||
| 44 | + 车牌号 | ||
| 45 | + </view> | ||
| 46 | + <view class="scan-car-num-content"> | ||
| 47 | + {{ details.garHandlerCarCode }} | ||
| 48 | + </view> | ||
| 49 | + </view> | ||
| 50 | + <view class="scan-car-num"> | ||
| 51 | + <view class="scan-car-num-label"> | ||
| 52 | + 车辆载重 | ||
| 53 | + </view> | ||
| 54 | + <view class="scan-car-num-content"> | ||
| 55 | + <up-input :disabled="!isDeletable" placeholder="请输入数字,单位吨" border="surround" | ||
| 56 | + v-model="details.garCarryingWeight" @change="handlerInputChange"></up-input> | ||
| 57 | + </view> | ||
| 58 | + </view> | ||
| 59 | + <view class="scan-car-num"> | ||
| 60 | + <view class="scan-car-num-label"> | ||
| 61 | + 接收量 | ||
| 62 | + </view> | ||
| 63 | + <view class="scan-car-num-content"> | ||
| 64 | + <up-input :disabled="!isDeletable" placeholder="请输入数字" border="surround" | ||
| 65 | + v-model="details.garReceptionQuantity" @change="handlerInputChange"></up-input> | ||
| 66 | + </view> | ||
| 67 | + </view> | ||
| 68 | + <view class="scan-upload-fill-image-box"> | ||
| 69 | + <view class="scan-upload-fill-image-label"> | ||
| 70 | + <view> | ||
| 71 | + 全景照片 | ||
| 72 | + </view> | ||
| 73 | + <view v-if="isDeletable"> | ||
| 74 | + {{ fileList.length }}/{{ maxCount }} | ||
| 75 | + </view> | ||
| 76 | + </view> | ||
| 77 | + <view class="scan-upload-fill-image-btn" v-if="maxCount"> | ||
| 78 | + <u-upload width="200" height="150" :deletable="isDeletable" :fileList="fileList" | ||
| 79 | + @afterRead="afterRead" @delete="deletePic" name="3" multiple :maxCount="maxCount" | ||
| 80 | + :previewFullImage="true"></u-upload> | ||
| 81 | + </view> | ||
| 82 | + </view> | ||
| 83 | + </view> | ||
| 84 | + <view class="scan-submit-button-box" v-if="isNew"> | ||
| 85 | + <view class="scan-submit-button-btn"> | ||
| 86 | + <u-button type="primary" @tap="handlerSubmit" text="确认"></u-button> | ||
| 87 | + </view> | ||
| 88 | + </view> | ||
| 89 | + </view> | ||
| 89 | </template> | 90 | </template> |
| 90 | 91 | ||
| 91 | <script setup> | 92 | <script setup> |
| 92 | -import { uploadFilePromise } from '@/apis/common.js'; | ||
| 93 | -import { askTransport, scanDetail } from '@/apis/order.js'; | ||
| 94 | -import { onLoad } from '@dcloudio/uni-app'; | ||
| 95 | -import { computed, ref } from 'vue'; | ||
| 96 | -const details = ref({}); | ||
| 97 | -const fileList = ref([]); | ||
| 98 | -const isDeletable = ref(false); | ||
| 99 | -const maxCount = computed(() => isDeletable.value ? 3 : fileList.value.length); | ||
| 100 | -// 删除图片 | ||
| 101 | -const deletePic = (event) => { | ||
| 102 | - fileList.value.splice(event.index, 1); | ||
| 103 | -}; | 93 | + import { |
| 94 | + uploadFilePromise | ||
| 95 | + } from '@/apis/common.js'; | ||
| 96 | + import { | ||
| 97 | + askTransport, | ||
| 98 | + scanDetail | ||
| 99 | + } from '@/apis/order.js'; | ||
| 100 | + import { | ||
| 101 | + onLoad | ||
| 102 | + } from '@dcloudio/uni-app'; | ||
| 103 | + import { | ||
| 104 | + computed, | ||
| 105 | + ref | ||
| 106 | + } from 'vue'; | ||
| 107 | + const details = ref({}); | ||
| 108 | + const fileList = ref([]); | ||
| 109 | + const isDeletable = ref(false); | ||
| 110 | + const maxCount = computed(() => isDeletable.value ? 3 : fileList.value.length); | ||
| 111 | + // 删除图片 | ||
| 112 | + const deletePic = (event) => { | ||
| 113 | + fileList.value.splice(event.index, 1); | ||
| 114 | + }; | ||
| 104 | 115 | ||
| 105 | -const isNew = ref(false) | ||
| 106 | -// 新增图片 | ||
| 107 | -const afterRead = async (event) => { | ||
| 108 | - // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式 | ||
| 109 | - let lists = [].concat(event.file); | ||
| 110 | - let fileListLen = fileList.value.length; | ||
| 111 | - lists.map((item) => { | ||
| 112 | - fileList.value.push({ | ||
| 113 | - ...item, | ||
| 114 | - status: 'uploading', | ||
| 115 | - message: '上传中', | ||
| 116 | - }); | ||
| 117 | - }); | ||
| 118 | - for (let i = 0; i < lists.length; i++) { | ||
| 119 | - let requestPath = import.meta.env.VITE_BASE_URL + import.meta.env.VITE_BASE_FILE_UPLOAD_PREFIX; | ||
| 120 | - const result = await uploadFilePromise(requestPath, lists[i].url); | ||
| 121 | - let item = fileList.value[fileListLen]; | ||
| 122 | - fileList.value.splice(fileListLen, 1, { | ||
| 123 | - ...item, | ||
| 124 | - status: 'success', | ||
| 125 | - message: '', | ||
| 126 | - url: result.data.fileName, | ||
| 127 | - }); | ||
| 128 | - fileListLen++; | ||
| 129 | - } | ||
| 130 | -}; | ||
| 131 | -const handlerInputChange = (val) => { | ||
| 132 | - console.log(val); | ||
| 133 | -} | ||
| 134 | -const handlerSubmit = async () => { | ||
| 135 | - // 校验参数 | ||
| 136 | - let params = { | ||
| 137 | - ...details.value, | ||
| 138 | - fillImageList: fileList.value.map((item) => item.url), | ||
| 139 | - garOrderHandlerCompanyName: details.value.garOrderCompanyName, | ||
| 140 | - garOrderHandlerCompanyId: details.value.garOrderCompanyId | ||
| 141 | - } | ||
| 142 | - if (validateParams(params)) { | ||
| 143 | - await askTransport(params).then((res) => { | ||
| 144 | - console.log(res); | ||
| 145 | - if (res.data.code == 200) { | ||
| 146 | - uni.$u.toast("当前趟次记录完毕!") | ||
| 147 | - } | ||
| 148 | - }).catch((err) => { | ||
| 149 | - uni.$u.toast("当前趟次记录失败") | ||
| 150 | - }) | ||
| 151 | - // 返回上级 | ||
| 152 | - uni.navigateBack({ | ||
| 153 | - delta: 1 | ||
| 154 | - }); | ||
| 155 | - } | ||
| 156 | -} | 116 | + const isNew = ref(false) |
| 117 | + // 新增图片 | ||
| 118 | + const afterRead = async (event) => { | ||
| 119 | + // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式 | ||
| 120 | + let lists = [].concat(event.file); | ||
| 121 | + let fileListLen = fileList.value.length; | ||
| 122 | + lists.map((item) => { | ||
| 123 | + fileList.value.push({ | ||
| 124 | + ...item, | ||
| 125 | + status: 'uploading', | ||
| 126 | + message: '上传中', | ||
| 127 | + }); | ||
| 128 | + }); | ||
| 129 | + for (let i = 0; i < lists.length; i++) { | ||
| 130 | + let requestPath = import.meta.env.VITE_BASE_URL + import.meta.env.VITE_BASE_FILE_UPLOAD_PREFIX; | ||
| 131 | + const result = await uploadFilePromise(requestPath, lists[i].url); | ||
| 132 | + let item = fileList.value[fileListLen]; | ||
| 133 | + fileList.value.splice(fileListLen, 1, { | ||
| 134 | + ...item, | ||
| 135 | + status: 'success', | ||
| 136 | + message: '', | ||
| 137 | + url: result.data.fileName, | ||
| 138 | + }); | ||
| 139 | + fileListLen++; | ||
| 140 | + } | ||
| 141 | + }; | ||
| 142 | + const handlerInputChange = (val) => { | ||
| 143 | + console.log(val); | ||
| 144 | + } | ||
| 145 | + const handlerSubmit = async () => { | ||
| 146 | + try { | ||
| 147 | + // 获取定位信息 | ||
| 148 | + const location = await new Promise((resolve, reject) => { | ||
| 149 | + uni.getLocation({ | ||
| 150 | + type: 'wgs84', | ||
| 151 | + success: resolve, | ||
| 152 | + fail: reject | ||
| 153 | + }); | ||
| 154 | + }); | ||
| 155 | + // 校验参数 | ||
| 156 | + let params = { | ||
| 157 | + ...details.value, | ||
| 158 | + fillImageList: fileList.value.map((item) => item.url), | ||
| 159 | + garOrderHandlerCompanyName: details.value.garOrderCompanyName, | ||
| 160 | + garOrderHandlerCompanyId: details.value.garOrderCompanyId, | ||
| 161 | + // 添加定位信息 | ||
| 162 | + latitude: location.latitude, | ||
| 163 | + longitude: location.longitude | ||
| 164 | + } | ||
| 165 | + if (validateParams(params)) { | ||
| 166 | + await askTransport(params).then((res) => { | ||
| 167 | + console.log(res); | ||
| 168 | + if (res.data.code == 200) { | ||
| 169 | + uni.$u.toast("当前趟次记录完毕!") | ||
| 170 | + } | ||
| 171 | + }).catch((err) => { | ||
| 172 | + uni.$u.toast("当前趟次记录失败") | ||
| 173 | + }) | ||
| 174 | + // 返回上级 | ||
| 175 | + uni.navigateBack({ | ||
| 176 | + delta: 1 | ||
| 177 | + }); | ||
| 178 | + } | ||
| 179 | + } catch (error) { | ||
| 180 | + console.error('定位获取失败:', error); | ||
| 181 | + uni.$u.toast("需要位置权限才能提交"); | ||
| 182 | + // 可选:引导用户打开设置 | ||
| 183 | + uni.openSetting({ | ||
| 184 | + success(res) { | ||
| 185 | + console.log('授权设置:', res.authSetting); | ||
| 186 | + } | ||
| 187 | + }); | ||
| 188 | + } | ||
| 189 | + } | ||
| 157 | 190 | ||
| 158 | -const validateParams = (params) => { | ||
| 159 | - if (!params.garOrderHandlerName) { | ||
| 160 | - uni.$u.toast("请输入处理人姓名"); | ||
| 161 | - return false; | ||
| 162 | - } | ||
| 163 | - if (!params.garOrderHandlerTel) { | ||
| 164 | - uni.$u.toast("请输入处理人电话"); | ||
| 165 | - return false; | ||
| 166 | - } | ||
| 167 | - if (!params.garOrderCompanyName) { | ||
| 168 | - uni.$u.toast("请输入处理人单位"); | ||
| 169 | - return false; | ||
| 170 | - } | ||
| 171 | - if (!params.garReceptionQuantity) { | ||
| 172 | - uni.$u.toast("请输入接收量"); | ||
| 173 | - return false; | ||
| 174 | - } | ||
| 175 | - if (!validateImage(params.fillImageList)) { | ||
| 176 | - return false; | ||
| 177 | - } | ||
| 178 | - return true; | ||
| 179 | -} | 191 | + const validateParams = (params) => { |
| 192 | + if (!params.garOrderHandlerName) { | ||
| 193 | + uni.$u.toast("请输入处理人姓名"); | ||
| 194 | + return false; | ||
| 195 | + } | ||
| 196 | + if (!params.garOrderHandlerTel) { | ||
| 197 | + uni.$u.toast("请输入处理人电话"); | ||
| 198 | + return false; | ||
| 199 | + } | ||
| 200 | + if (!params.garOrderCompanyName) { | ||
| 201 | + uni.$u.toast("请输入处理人单位"); | ||
| 202 | + return false; | ||
| 203 | + } | ||
| 204 | + if (!params.garReceptionQuantity) { | ||
| 205 | + uni.$u.toast("请输入接收量"); | ||
| 206 | + return false; | ||
| 207 | + } | ||
| 208 | + if (!validateImage(params.fillImageList)) { | ||
| 209 | + return false; | ||
| 210 | + } | ||
| 211 | + return true; | ||
| 212 | + } | ||
| 180 | 213 | ||
| 181 | -const validateImage = (fillImageList) => { | ||
| 182 | - if (fillImageList instanceof Array && fillImageList.length > 0) { | ||
| 183 | - for (let index = 0; index < fillImageList.length; index++) { | ||
| 184 | - const str = fillImageList[index]; | ||
| 185 | - if (!str.startsWith("/profile/upload")) { | ||
| 186 | - uni.$u.toast("请等待图片上传~"); | ||
| 187 | - return false; | ||
| 188 | - } | ||
| 189 | - } | ||
| 190 | - return true; | ||
| 191 | - } | ||
| 192 | - uni.$u.toast("请上传图片~"); | ||
| 193 | - return false; | ||
| 194 | -} | 214 | + const validateImage = (fillImageList) => { |
| 215 | + if (fillImageList instanceof Array && fillImageList.length > 0) { | ||
| 216 | + for (let index = 0; index < fillImageList.length; index++) { | ||
| 217 | + const str = fillImageList[index]; | ||
| 218 | + if (!str.startsWith("/profile/upload")) { | ||
| 219 | + uni.$u.toast("请等待图片上传~"); | ||
| 220 | + return false; | ||
| 221 | + } | ||
| 222 | + } | ||
| 223 | + return true; | ||
| 224 | + } | ||
| 225 | + uni.$u.toast("请上传图片~"); | ||
| 226 | + return false; | ||
| 227 | + } | ||
| 195 | 228 | ||
| 196 | -onLoad((options) => { | ||
| 197 | - if (options.data) { | ||
| 198 | - details.value = JSON.parse(decodeURIComponent(options.data)); | ||
| 199 | - isDeletable.value = true; | ||
| 200 | - isNew.value = true; | ||
| 201 | - } | ||
| 202 | - if (options.garAskId) { | ||
| 203 | - // TODO query | ||
| 204 | - scanDetail(options.garAskId).then((res) => { | ||
| 205 | - console.log(res); | ||
| 206 | - details.value = res.data.data; | ||
| 207 | - details.value.garOrderCompanyName = details.value.garOrderHandlerCompanyName; | ||
| 208 | - fileList.value = details.value.fillImageList.map((item) => { | ||
| 209 | - return { url: import.meta.env.VITE_BASE_URL + item } | ||
| 210 | - }) | ||
| 211 | - }) | ||
| 212 | - } | ||
| 213 | -}) | 229 | + onLoad((options) => { |
| 230 | + if (options.data) { | ||
| 231 | + details.value = JSON.parse(decodeURIComponent(options.data)); | ||
| 232 | + isDeletable.value = true; | ||
| 233 | + isNew.value = true; | ||
| 234 | + } | ||
| 235 | + if (options.garAskId) { | ||
| 236 | + // TODO query | ||
| 237 | + scanDetail(options.garAskId).then((res) => { | ||
| 238 | + console.log(res); | ||
| 239 | + details.value = res.data.data; | ||
| 240 | + details.value.garOrderCompanyName = details.value.garOrderHandlerCompanyName; | ||
| 241 | + fileList.value = details.value.fillImageList.map((item) => { | ||
| 242 | + return { | ||
| 243 | + url: import.meta.env.VITE_BASE_URL + item | ||
| 244 | + } | ||
| 245 | + }) | ||
| 246 | + }) | ||
| 247 | + } | ||
| 248 | + }) | ||
| 214 | </script> | 249 | </script> |
| 215 | 250 | ||
| 216 | <style lang="scss" scoped> | 251 | <style lang="scss" scoped> |
| 217 | -$l-h-8: 80rpx; | 252 | + $l-h-8: 80rpx; |
| 218 | 253 | ||
| 219 | -.scan-detail-container { | ||
| 220 | - width: 100%; | ||
| 221 | - height: 100%; | ||
| 222 | - box-sizing: border-box; | ||
| 223 | - padding: 20rpx; | 254 | + .scan-detail-container { |
| 255 | + width: 100%; | ||
| 256 | + height: 100%; | ||
| 257 | + box-sizing: border-box; | ||
| 258 | + padding: 20rpx; | ||
| 224 | 259 | ||
| 225 | - .scan-detail-box { | ||
| 226 | - background-color: white; | ||
| 227 | - margin-bottom: 40rpx; | ||
| 228 | - color: $u-main-color; | 260 | + .scan-detail-box { |
| 261 | + background-color: white; | ||
| 262 | + margin-bottom: 40rpx; | ||
| 263 | + color: $u-main-color; | ||
| 229 | 264 | ||
| 230 | - .scan-time { | ||
| 231 | - display: flex; | ||
| 232 | - width: 100%; | ||
| 233 | - // 底部阴影 向内发散 | ||
| 234 | - border-bottom: 1rpx solid #f5f5f5; | ||
| 235 | - line-height: 100rpx; | ||
| 236 | - align-items: center; | 265 | + .scan-time { |
| 266 | + display: flex; | ||
| 267 | + width: 100%; | ||
| 268 | + // 底部阴影 向内发散 | ||
| 269 | + border-bottom: 1rpx solid #f5f5f5; | ||
| 270 | + line-height: 100rpx; | ||
| 271 | + align-items: center; | ||
| 237 | 272 | ||
| 238 | - .scan-label { | ||
| 239 | - width: 30%; | ||
| 240 | - display: flex; | ||
| 241 | - align-items: center; | ||
| 242 | - justify-content: center; | ||
| 243 | - } | 273 | + .scan-label { |
| 274 | + width: 30%; | ||
| 275 | + display: flex; | ||
| 276 | + align-items: center; | ||
| 277 | + justify-content: center; | ||
| 278 | + } | ||
| 244 | 279 | ||
| 245 | - .scan-time { | ||
| 246 | - width: 60%; | ||
| 247 | - } | 280 | + .scan-time { |
| 281 | + width: 60%; | ||
| 282 | + } | ||
| 248 | 283 | ||
| 249 | - .scan-icon { | ||
| 250 | - width: 10%; | ||
| 251 | - display: flex; | ||
| 252 | - } | ||
| 253 | - } | 284 | + .scan-icon { |
| 285 | + width: 10%; | ||
| 286 | + display: flex; | ||
| 287 | + } | ||
| 288 | + } | ||
| 254 | 289 | ||
| 255 | - } | 290 | + } |
| 256 | 291 | ||
| 257 | - .scan-submit-info { | ||
| 258 | - width: 100%; | ||
| 259 | - background-color: white; | ||
| 260 | - box-sizing: border-box; | ||
| 261 | - padding: 20rpx; | ||
| 262 | - color: $u-content-color; | 292 | + .scan-submit-info { |
| 293 | + width: 100%; | ||
| 294 | + background-color: white; | ||
| 295 | + box-sizing: border-box; | ||
| 296 | + padding: 20rpx; | ||
| 297 | + color: $u-content-color; | ||
| 263 | 298 | ||
| 264 | - .scan-submit-title-box { | ||
| 265 | - display: flex; | ||
| 266 | - align-items: center; | 299 | + .scan-submit-title-box { |
| 300 | + display: flex; | ||
| 301 | + align-items: center; | ||
| 267 | 302 | ||
| 268 | - text { | ||
| 269 | - margin-left: 15rpx; | ||
| 270 | - } | ||
| 271 | - } | 303 | + text { |
| 304 | + margin-left: 15rpx; | ||
| 305 | + } | ||
| 306 | + } | ||
| 272 | 307 | ||
| 273 | - .scan-car-num { | ||
| 274 | - display: flex; | ||
| 275 | - line-height: $l-h-8; | ||
| 276 | - align-items: center; | 308 | + .scan-car-num { |
| 309 | + display: flex; | ||
| 310 | + line-height: $l-h-8; | ||
| 311 | + align-items: center; | ||
| 277 | 312 | ||
| 278 | - .scan-car-num-label { | ||
| 279 | - width: 20%; | ||
| 280 | - // 文字不换行 | ||
| 281 | - white-space: nowrap; | ||
| 282 | - } | 313 | + .scan-car-num-label { |
| 314 | + width: 20%; | ||
| 315 | + // 文字不换行 | ||
| 316 | + white-space: nowrap; | ||
| 317 | + } | ||
| 283 | 318 | ||
| 284 | - .scan-car-num-content { | ||
| 285 | - width: auto; | ||
| 286 | - display: flex; | ||
| 287 | - justify-content: center; | ||
| 288 | - align-items: center; | ||
| 289 | - } | ||
| 290 | - } | 319 | + .scan-car-num-content { |
| 320 | + width: auto; | ||
| 321 | + display: flex; | ||
| 322 | + justify-content: center; | ||
| 323 | + align-items: center; | ||
| 324 | + } | ||
| 325 | + } | ||
| 291 | 326 | ||
| 292 | - .scan-upload-fill-image-box { | ||
| 293 | - line-height: $l-h-8; | ||
| 294 | - width: 100%; | 327 | + .scan-upload-fill-image-box { |
| 328 | + line-height: $l-h-8; | ||
| 329 | + width: 100%; | ||
| 295 | 330 | ||
| 296 | - .scan-upload-fill-image-label { | ||
| 297 | - display: flex; | ||
| 298 | - justify-content: space-between; | ||
| 299 | - } | 331 | + .scan-upload-fill-image-label { |
| 332 | + display: flex; | ||
| 333 | + justify-content: space-between; | ||
| 334 | + } | ||
| 300 | 335 | ||
| 301 | - .scan-upload-fill-image-btn {} | ||
| 302 | - } | ||
| 303 | - } | 336 | + .scan-upload-fill-image-btn {} |
| 337 | + } | ||
| 338 | + } | ||
| 304 | 339 | ||
| 305 | - .scan-submit-button-box { | ||
| 306 | - margin-top: 40rpx; | ||
| 307 | - background-color: white; | ||
| 308 | - padding: 20rpx; | ||
| 309 | - } | ||
| 310 | -} | ||
| 311 | -</style> | 340 | + .scan-submit-button-box { |
| 341 | + margin-top: 40rpx; | ||
| 342 | + background-color: white; | ||
| 343 | + padding: 20rpx; | ||
| 344 | + } | ||
| 345 | + } | ||
| 346 | +</style> | ||
| 312 | \ No newline at end of file | 347 | \ No newline at end of file |
garbage-removal/src/pages/order-info/order-driver/detail/index.vue
| @@ -282,7 +282,7 @@ const selectClick = (index) => { | @@ -282,7 +282,7 @@ const selectClick = (index) => { | ||
| 282 | const handleOrderDetail = (orderId) => { | 282 | const handleOrderDetail = (orderId) => { |
| 283 | queryOrderDetail(orderId).then(res => { | 283 | queryOrderDetail(orderId).then(res => { |
| 284 | dataGram.value = res.data.data; | 284 | dataGram.value = res.data.data; |
| 285 | - console.log(res.data.data); | 285 | + console.log(res.data.data); |
| 286 | currentImages.value = res.data.data.currentImages.map(item => { | 286 | currentImages.value = res.data.data.currentImages.map(item => { |
| 287 | return { url: import.meta.env.VITE_BASE_URL + item }; | 287 | return { url: import.meta.env.VITE_BASE_URL + item }; |
| 288 | }); | 288 | }); |
| @@ -384,7 +384,8 @@ const createQrCodeValid = (val) => { | @@ -384,7 +384,8 @@ const createQrCodeValid = (val) => { | ||
| 384 | * @param {string} putType | 384 | * @param {string} putType |
| 385 | */ | 385 | */ |
| 386 | const handleUploadImage = (orderId, putType) => { | 386 | const handleUploadImage = (orderId, putType) => { |
| 387 | - uni.$u.route(`pages/order-info/order-driver/upload/index?orderId=${orderId}`) | 387 | + const data = dataGram.value; |
| 388 | + uni.$u.route(`pages/order-info/order-driver/upload/index?orderId=${orderId}&carPlate=${data.garHandlerCarCode}&driver=${store.userInfo.userName}`) | ||
| 388 | } | 389 | } |
| 389 | 390 | ||
| 390 | /** | 391 | /** |
garbage-removal/src/pages/order-info/order-driver/upload/index.vue
| @@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
| 18 | </view> | 18 | </view> |
| 19 | </view> | 19 | </view> |
| 20 | <view class="upload-image-box-submit-box"> | 20 | <view class="upload-image-box-submit-box"> |
| 21 | - <view class="upload-image-box-submit-box-button" @click="handleSubmit(orderId, putType)"> | 21 | + <view class="upload-image-box-submit-box-button" @click="handleSubmit(orderId, putType,driver,carPlate)"> |
| 22 | <view class="upload-image-box-submit-box-button-container"> | 22 | <view class="upload-image-box-submit-box-button-container"> |
| 23 | <up-button color="#19be6b" type="primary" shape="square" text="确定"></up-button> | 23 | <up-button color="#19be6b" type="primary" shape="square" text="确定"></up-button> |
| 24 | </view> | 24 | </view> |
| @@ -32,8 +32,12 @@ import { uploadFilePromise } from '@/apis/common.js'; | @@ -32,8 +32,12 @@ import { uploadFilePromise } from '@/apis/common.js'; | ||
| 32 | import { uploadImageUrlByType } from '@/apis/order.js'; | 32 | import { uploadImageUrlByType } from '@/apis/order.js'; |
| 33 | import { onLoad } from '@dcloudio/uni-app'; | 33 | import { onLoad } from '@dcloudio/uni-app'; |
| 34 | import { reactive, ref } from 'vue'; | 34 | import { reactive, ref } from 'vue'; |
| 35 | +import { useMainStore } from '@/stores/index.js'; | ||
| 36 | +const store = useMainStore(); | ||
| 35 | const putType = ref("装车图片") | 37 | const putType = ref("装车图片") |
| 36 | const orderId = ref(); | 38 | const orderId = ref(); |
| 39 | +const carPlate = ref(); | ||
| 40 | +const driver = ref(); | ||
| 37 | const fileList = ref([]) | 41 | const fileList = ref([]) |
| 38 | const chooseList = reactive([{ name: "装车图片" }, { name: "卸车图片" }]) | 42 | const chooseList = reactive([{ name: "装车图片" }, { name: "卸车图片" }]) |
| 39 | // 删除图片 | 43 | // 删除图片 |
| @@ -67,33 +71,95 @@ const afterRead = async (event) => { | @@ -67,33 +71,95 @@ const afterRead = async (event) => { | ||
| 67 | } | 71 | } |
| 68 | }; | 72 | }; |
| 69 | // 提交图片 | 73 | // 提交图片 |
| 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 | - if(params.imageUrls && params.imageUrls.length == 0){ | ||
| 81 | - uni.$u.toast("请上传现场图片"); | ||
| 82 | - return; | ||
| 83 | - } | ||
| 84 | - | ||
| 85 | - uploadImageUrlByType(params).then(res => { | ||
| 86 | - if (res.data.success) { | ||
| 87 | - uni.$u.toast("图片上传完毕!"); | ||
| 88 | - setTimeout(() => { | ||
| 89 | - uni.$u.route({ | ||
| 90 | - type: 'navigateBack', | ||
| 91 | - url: `pages/order-info/order-other/detail/index`, | ||
| 92 | - }) | ||
| 93 | - }, 300) | 74 | +const handleSubmit = async (id, type, driver, carPlate) => { |
| 75 | + try { | ||
| 76 | + // 获取定位信息 | ||
| 77 | + const location = await new Promise((resolve, reject) => { | ||
| 78 | + uni.getLocation({ | ||
| 79 | + type: 'wgs84', | ||
| 80 | + success: resolve, | ||
| 81 | + fail: reject | ||
| 82 | + }); | ||
| 83 | + }); | ||
| 84 | + | ||
| 85 | + if (!validateImage()) { | ||
| 86 | + uni.$u.toast("请等待图片上传~") | ||
| 87 | + return | ||
| 88 | + } | ||
| 89 | + | ||
| 90 | + const userPhone = store.userPhone; | ||
| 91 | + let params = { | ||
| 92 | + garOrderId: id, | ||
| 93 | + driver: driver, | ||
| 94 | + carPlate: carPlate, | ||
| 95 | + userPhone: userPhone, | ||
| 96 | + type: type == "装车图片" ? 1 : 2, | ||
| 97 | + imageUrls: fileList.value.map(item => item.url), | ||
| 98 | + // 添加定位信息 | ||
| 99 | + latitude: location.latitude, | ||
| 100 | + longitude: location.longitude | ||
| 94 | } | 101 | } |
| 95 | - }) | 102 | + |
| 103 | + if(params.imageUrls && params.imageUrls.length == 0){ | ||
| 104 | + uni.$u.toast("请上传现场图片"); | ||
| 105 | + return; | ||
| 106 | + } | ||
| 107 | + | ||
| 108 | + uploadImageUrlByType(params).then(res => { | ||
| 109 | + if (res.data.success) { | ||
| 110 | + uni.$u.toast("图片上传完毕!"); | ||
| 111 | + setTimeout(() => { | ||
| 112 | + uni.$u.route({ | ||
| 113 | + type: 'navigateBack', | ||
| 114 | + url: `pages/order-info/order-other/detail/index`, | ||
| 115 | + }) | ||
| 116 | + }, 300) | ||
| 117 | + } | ||
| 118 | + }) | ||
| 119 | + | ||
| 120 | + } catch (error) { | ||
| 121 | + console.error('定位获取失败:', error); | ||
| 122 | + uni.$u.toast("需要位置权限才能提交"); | ||
| 123 | + // 可选:引导用户打开设置 | ||
| 124 | + uni.openSetting({ | ||
| 125 | + success(res) { | ||
| 126 | + console.log('授权设置:', res.authSetting); | ||
| 127 | + } | ||
| 128 | + }); | ||
| 129 | + } | ||
| 96 | } | 130 | } |
| 131 | +// 提交图片 | ||
| 132 | +// const handleSubmit = async (id, type,driver,carPlate) => { | ||
| 133 | +// if (!validateImage()) { | ||
| 134 | +// uni.$u.toast("请等待图片上传~") | ||
| 135 | +// return | ||
| 136 | +// } | ||
| 137 | +// const userPhone = store.userPhone; | ||
| 138 | +// let params = { | ||
| 139 | +// garOrderId: id, | ||
| 140 | +// driver:driver, | ||
| 141 | +// carPlate:carPlate, | ||
| 142 | +// userPhone:userPhone, | ||
| 143 | +// type: type == "装车图片" ? 1 : 2, | ||
| 144 | +// imageUrls: fileList.value.map(item => item.url) | ||
| 145 | +// } | ||
| 146 | +// if(params.imageUrls && params.imageUrls.length == 0){ | ||
| 147 | +// uni.$u.toast("请上传现场图片"); | ||
| 148 | +// return; | ||
| 149 | +// } | ||
| 150 | + | ||
| 151 | +// uploadImageUrlByType(params).then(res => { | ||
| 152 | +// if (res.data.success) { | ||
| 153 | +// uni.$u.toast("图片上传完毕!"); | ||
| 154 | +// setTimeout(() => { | ||
| 155 | +// uni.$u.route({ | ||
| 156 | +// type: 'navigateBack', | ||
| 157 | +// url: `pages/order-info/order-other/detail/index`, | ||
| 158 | +// }) | ||
| 159 | +// }, 300) | ||
| 160 | +// } | ||
| 161 | +// }) | ||
| 162 | +// } | ||
| 97 | 163 | ||
| 98 | const validateImage = () => { | 164 | const validateImage = () => { |
| 99 | for (let index = 0; index < fileList.value.length; index++) { | 165 | for (let index = 0; index < fileList.value.length; index++) { |
| @@ -107,6 +173,8 @@ const validateImage = () => { | @@ -107,6 +173,8 @@ const validateImage = () => { | ||
| 107 | 173 | ||
| 108 | onLoad((options) => { | 174 | onLoad((options) => { |
| 109 | orderId.value = options.orderId; | 175 | orderId.value = options.orderId; |
| 176 | + carPlate.value = options.carPlate; | ||
| 177 | + driver.value = options.driver; | ||
| 110 | // putType.value = options.putType === "putOnImages" ? "装车图片" : "卸车图片"; | 178 | // putType.value = options.putType === "putOnImages" ? "装车图片" : "卸车图片"; |
| 111 | 179 | ||
| 112 | }) | 180 | }) |
garbage-removal/src/pages/order-info/order-other/detail/index.vue
| @@ -210,7 +210,7 @@ | @@ -210,7 +210,7 @@ | ||
| 210 | v-if="dataGram.garOrderHandlerStatus === 0 && userType == '运输企业负责人' && dataGram.garCancelFlag === 0" | 210 | v-if="dataGram.garOrderHandlerStatus === 0 && userType == '运输企业负责人' && dataGram.garCancelFlag === 0" |
| 211 | @click="handleOderCancelClick()" shape="square" color="#19a97c" text="取消订单"></u-button> | 211 | @click="handleOderCancelClick()" shape="square" color="#19a97c" text="取消订单"></u-button> |
| 212 | <u-button | 212 | <u-button |
| 213 | - v-if="dataGram.garOrderScanHandlerFlag === 0 && userType == '用户' && dataGram.garOrderHandlerStatus != 3" | 213 | + v-if="dataGram.garOrderScanHandlerFlag === 0 && userType == '用户' && dataGram.garOrderHandlerStatus != 3 && dataGram.garAskStatus != '1'" |
| 214 | @click="handlerUpdateOrderClick()" shape="square" color="#19a97c" text="修改车辆信息"></u-button> | 214 | @click="handlerUpdateOrderClick()" shape="square" color="#19a97c" text="修改车辆信息"></u-button> |
| 215 | <u-button v-if="dataGram.garOrderHandlerStatus === 1 && userType == '运输企业负责人'" | 215 | <u-button v-if="dataGram.garOrderHandlerStatus === 1 && userType == '运输企业负责人'" |
| 216 | @click="handleOrderDispatchClick(orderId)" shape="square" color="#19a97c" | 216 | @click="handleOrderDispatchClick(orderId)" shape="square" color="#19a97c" |
garbage-removal/src/pages/order/order-disposal/index.vue
| @@ -196,9 +196,7 @@ | @@ -196,9 +196,7 @@ | ||
| 196 | } | 196 | } |
| 197 | } | 197 | } |
| 198 | const qrReaderClose = () => { | 198 | const qrReaderClose = () => { |
| 199 | - uni.$u.toast("qrReaderClose",data) | ||
| 200 | - alert("qrReaderClose") | ||
| 201 | - // showScan.value = false | 199 | + showScan.value = false |
| 202 | } | 200 | } |
| 203 | onMounted(() => { | 201 | onMounted(() => { |
| 204 | console.log("处理场所"); | 202 | console.log("处理场所"); |
garbage-removal/src/pages/wode-info/wode-info-choose/index.vue
| @@ -159,7 +159,7 @@ onLoad((options) => { | @@ -159,7 +159,7 @@ onLoad((options) => { | ||
| 159 | const element = loginInfo[index]; | 159 | const element = loginInfo[index]; |
| 160 | element.userName = userName; | 160 | element.userName = userName; |
| 161 | unitInfo.value[element.userType] = element | 161 | unitInfo.value[element.userType] = element |
| 162 | - | 162 | + console.log(unitInfo.value); |
| 163 | 163 | ||
| 164 | 164 | ||
| 165 | } | 165 | } |
garbage-removal/src/stores/main.js
| @@ -7,8 +7,9 @@ export const useMainStore = defineStore( | @@ -7,8 +7,9 @@ export const useMainStore = defineStore( | ||
| 7 | const tempToken = ref(null); | 7 | const tempToken = ref(null); |
| 8 | const userType = ref("") | 8 | const userType = ref("") |
| 9 | const userInfo = ref("") | 9 | const userInfo = ref("") |
| 10 | + const userPhone = ref(""); | ||
| 10 | 11 | ||
| 11 | - return { token,tempToken,userType,userInfo }; | 12 | + return { token,tempToken,userType,userInfo,userPhone }; |
| 12 | }, | 13 | }, |
| 13 | { | 14 | { |
| 14 | persist: { | 15 | persist: { |
garbage-removal/vite.config.js
| @@ -8,7 +8,7 @@ export default defineConfig({ | @@ -8,7 +8,7 @@ export default defineConfig({ | ||
| 8 | plugins: [ | 8 | plugins: [ |
| 9 | uni(), | 9 | uni(), |
| 10 | //本地环境开启https | 10 | //本地环境开启https |
| 11 | - // basicSsl() | 11 | + basicSsl() |
| 12 | ], | 12 | ], |
| 13 | resolve: { | 13 | resolve: { |
| 14 | alias: { | 14 | alias: { |
| @@ -19,6 +19,6 @@ export default defineConfig({ | @@ -19,6 +19,6 @@ export default defineConfig({ | ||
| 19 | server: { | 19 | server: { |
| 20 | port: 9000, | 20 | port: 9000, |
| 21 | //本地环境开启https | 21 | //本地环境开启https |
| 22 | - // https: true | 22 | + https: true |
| 23 | } | 23 | } |
| 24 | }) | 24 | }) |
garbage-removal/yarn.lock
| @@ -975,7 +975,7 @@ | @@ -975,7 +975,7 @@ | ||
| 975 | "resolved" "https://registry.npmmirror.com/@dcloudio/types/-/types-3.4.3.tgz" | 975 | "resolved" "https://registry.npmmirror.com/@dcloudio/types/-/types-3.4.3.tgz" |
| 976 | "version" "3.4.3" | 976 | "version" "3.4.3" |
| 977 | 977 | ||
| 978 | -"@dcloudio/uni-app-plus@3.0.0-3090620231104002": | 978 | +"@dcloudio/uni-app-plus@^3.0.0-3090620231104002": |
| 979 | "integrity" "sha512-L4+OgMQYKP6R7TXFBl0OiYKa0Ys/X9TbDHERFOe0IFYeuDCLbXpWU3k8zRCTOAmtRVNAulBIaet++YpxkpR/pw==" | 979 | "integrity" "sha512-L4+OgMQYKP6R7TXFBl0OiYKa0Ys/X9TbDHERFOe0IFYeuDCLbXpWU3k8zRCTOAmtRVNAulBIaet++YpxkpR/pw==" |
| 980 | "resolved" "https://registry.npmmirror.com/@dcloudio/uni-app-plus/-/uni-app-plus-3.0.0-3090620231104002.tgz" | 980 | "resolved" "https://registry.npmmirror.com/@dcloudio/uni-app-plus/-/uni-app-plus-3.0.0-3090620231104002.tgz" |
| 981 | "version" "3.0.0-3090620231104002" | 981 | "version" "3.0.0-3090620231104002" |