Commit 6ff911b147dc67aaec367fcf064043f601202614
1 parent
b917e960
添加驾驶员名称
Showing
5 changed files
with
37 additions
and
16 deletions
garbage-removal/src/apis/carinfo.js
garbage-removal/src/pages/home-info/clean/index.vue
| ... | ... | @@ -326,7 +326,7 @@ const initOptions = async (options) => { |
| 326 | 326 | await queryAddress('CURRENT').then(res => { |
| 327 | 327 | try { |
| 328 | 328 | if (res.data.data && res.data.data[0]) { |
| 329 | - userAddress.value = res.data.data[0] ? res.data.data[0] : {} | |
| 329 | + userAddress.value = res.data.data[0] ? res.data.data[0] : {} | |
| 330 | 330 | } else { |
| 331 | 331 | userAddress.value = {}; |
| 332 | 332 | } |
| ... | ... | @@ -386,10 +386,6 @@ const afterRead = async (event) => { |
| 386 | 386 | for (let i = 0; i < lists.length; i++) { |
| 387 | 387 | let requestPath = import.meta.env.VITE_BASE_URL + import.meta.env.VITE_BASE_FILE_UPLOAD_PREFIX; |
| 388 | 388 | const result = await uploadFilePromise(requestPath, lists[i].url); |
| 389 | - console.log("=====================>"); | |
| 390 | - | |
| 391 | - console.log(result); | |
| 392 | - | |
| 393 | 389 | let item = fileList.value[fileListLen]; |
| 394 | 390 | fileList.value.splice(fileListLen, 1, { |
| 395 | 391 | ...item, |
| ... | ... | @@ -421,11 +417,8 @@ const orderClick = ref(true) |
| 421 | 417 | * 处理下单 |
| 422 | 418 | */ |
| 423 | 419 | const handleOderSure = async () => { |
| 424 | - console.log("paramFrom.value.garEstimatedCost=======================>"+paramFrom.value.garEstimatedCost); | |
| 425 | - | |
| 426 | 420 | if(null == paramFrom.value.garEstimatedCost|| "" == paramFrom.value.garEstimatedCost || undefined == paramFrom.value.garEstimatedCost){ |
| 427 | 421 | jumpPrompt("预估费用不能为空"); |
| 428 | - console.log("----------------------->2"); | |
| 429 | 422 | |
| 430 | 423 | return; |
| 431 | 424 | } |
| ... | ... | @@ -433,7 +426,6 @@ const handleOderSure = async () => { |
| 433 | 426 | jumpPrompt("预估费用必须大于0"); |
| 434 | 427 | return; |
| 435 | 428 | } |
| 436 | - | |
| 437 | 429 | let garCarInfos = []; |
| 438 | 430 | for (const key in garCarInfoList.value) { |
| 439 | 431 | if(garCarInfoList.value[key]&& garCarInfoList.value[key].garOrderCarNumber && garCarInfoList.value[key].garOrderCarNumber>0){ |
| ... | ... | @@ -441,7 +433,6 @@ const handleOderSure = async () => { |
| 441 | 433 | } |
| 442 | 434 | |
| 443 | 435 | } |
| 444 | - | |
| 445 | 436 | if(dayTime.value != null && dayTime.value != "" && dayTime.value != undefined){ |
| 446 | 437 | if(dayTimeType.value != '2207' ){ |
| 447 | 438 | let length = garCarInfos.length; |
| ... | ... | @@ -449,13 +440,13 @@ const handleOderSure = async () => { |
| 449 | 440 | |
| 450 | 441 | if(garCarInfos[index].containerVolume && parseFloat(garCarInfos[index].containerVolume) >=8){ |
| 451 | 442 | jumpPrompt("中大型车辆只能选择22:00-07:00时间段"); |
| 443 | + | |
| 452 | 444 | return; |
| 453 | 445 | } |
| 454 | 446 | |
| 455 | 447 | } |
| 456 | 448 | } |
| 457 | 449 | } |
| 458 | - | |
| 459 | 450 | |
| 460 | 451 | |
| 461 | 452 | |
| ... | ... | @@ -519,8 +510,10 @@ const handleOderSure = async () => { |
| 519 | 510 | garInCarStore: paramFrom.value.garInCarStore, |
| 520 | 511 | garEstimatedCost:paramFrom.value.garEstimatedCost |
| 521 | 512 | } |
| 513 | + console.log("----------------------->5"); | |
| 522 | 514 | if (!validateParams(params)) { |
| 523 | 515 | console.log("未通过", params); |
| 516 | + | |
| 524 | 517 | return; |
| 525 | 518 | } |
| 526 | 519 | |
| ... | ... | @@ -563,6 +556,10 @@ const handlerChooseAddress = () => { |
| 563 | 556 | } |
| 564 | 557 | const currentChange = (val) => { |
| 565 | 558 | userAddress.value = val |
| 559 | + console.log("currentChange====================>"); | |
| 560 | + | |
| 561 | + console.log(userAddress.value); | |
| 562 | + | |
| 566 | 563 | } |
| 567 | 564 | /** |
| 568 | 565 | * 校验参数 |
| ... | ... | @@ -592,8 +589,12 @@ const validateParams = (params) => { |
| 592 | 589 | case "garEstimatedCost": |
| 593 | 590 | jumpPrompt('请输入预估费用') |
| 594 | 591 | break; |
| 595 | - | |
| 592 | + case "garOrderCompanyTel": | |
| 593 | + jumpPrompt('企业负责人手机号不能为空') | |
| 594 | + break; | |
| 596 | 595 | } |
| 596 | + console.log("201================="+key); | |
| 597 | + | |
| 597 | 598 | return false; |
| 598 | 599 | } |
| 599 | 600 | if (key === "garCarInfoList") { | ... | ... |
garbage-removal/src/pages/login/code.vue
| ... | ... | @@ -74,8 +74,10 @@ const checkVerifyNum = (code) => { |
| 74 | 74 | if (res.data.success) { |
| 75 | 75 | verifyFlag.value = false; |
| 76 | 76 | store.tempToken = res.data.data.token |
| 77 | + | |
| 78 | + store.userName = res.data.data.name; | |
| 77 | 79 | uni.navigateTo({ |
| 78 | - url: `/pages/wode-info/wode-info-choose/index?ruleVos= ${encodeURIComponent(JSON.stringify(res.data.data.ruleVos))}` | |
| 80 | + url: `/pages/wode-info/wode-info-choose/index?ruleVos= ${encodeURIComponent(JSON.stringify(res.data.data.ruleVos))}&userName=${encodeURIComponent(res.data.data.name)}` | |
| 79 | 81 | }); |
| 80 | 82 | } else { |
| 81 | 83 | verifyFlag.value = true; | ... | ... |
garbage-removal/src/pages/wode-info/wode-info-choose/index.vue
| ... | ... | @@ -154,9 +154,14 @@ const combinationImagePath=(url)=>{ |
| 154 | 154 | onLoad((options) => { |
| 155 | 155 | // let loginInfo = JSON.parse(options) |
| 156 | 156 | let loginInfo = JSON.parse(decodeURIComponent(options.ruleVos)) |
| 157 | + let userName = decodeURIComponent(options.userName) | |
| 157 | 158 | for (let index = 0; index < loginInfo.length; index++) { |
| 158 | 159 | const element = loginInfo[index]; |
| 160 | + element.userName = userName; | |
| 159 | 161 | unitInfo.value[element.userType] = element |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 160 | 165 | } |
| 161 | 166 | let order = 999; |
| 162 | 167 | let index = 0; |
| ... | ... | @@ -183,7 +188,7 @@ onLoad((options) => { |
| 183 | 188 | |
| 184 | 189 | typeList.value[0].imageUrl = combinationImagePath('role/user.png'); |
| 185 | 190 | typeList.value[1].imageUrl = combinationImagePath('role/company.png'); |
| 186 | - typeList.value[2].imageUrl = combinationImagePath('role/company.png'); | |
| 191 | + typeList.value[2].imageUrl = combinationImagePath('role/handler.png'); | |
| 187 | 192 | typeList.value[3].imageUrl = combinationImagePath('role/disposal.png'); |
| 188 | 193 | |
| 189 | 194 | ... | ... |
garbage-removal/src/pages/wode/index.vue
| ... | ... | @@ -9,7 +9,10 @@ |
| 9 | 9 | <view class="manager-info-transport-company-name"> |
| 10 | 10 | <text>{{ userInfo.transportCompanyName }}</text> |
| 11 | 11 | </view> |
| 12 | - <view class="choose-type-item-text-right-label">{{ userInfo.userType }}</view> | |
| 12 | + <view class="choose-type-item-text-right-label">{{ userInfo.userType }} | |
| 13 | + <view>{{userNameMrthod(userInfo.userName)}}</view> | |
| 14 | + </view> | |
| 15 | + | |
| 13 | 16 | </view> |
| 14 | 17 | </view> |
| 15 | 18 | </view> |
| ... | ... | @@ -18,6 +21,7 @@ |
| 18 | 21 | <wode-other v-if="userInfo.userType === '用户' || userInfo.userType === '运输企业负责人'"></wode-other> |
| 19 | 22 | <wode-driver v-else-if="userInfo.userType === '清运车辆驾驶员'"></wode-driver> |
| 20 | 23 | <wode-disposal v-else></wode-disposal> |
| 24 | + | |
| 21 | 25 | </view> |
| 22 | 26 | <view class="more-setting-box"> |
| 23 | 27 | <view class="more-setting-title"> |
| ... | ... | @@ -63,12 +67,21 @@ import wodeOther from './wode-other/index.vue'; |
| 63 | 67 | const store = useMainStore(); |
| 64 | 68 | const pic = ref(headImg) |
| 65 | 69 | const userInfo = computed(() => store.userInfo) |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 66 | 75 | const handleAddressManager = () => { |
| 67 | 76 | uni.$u.route({ |
| 68 | 77 | url: `pages/home-info/address/index`, |
| 69 | 78 | }) |
| 70 | 79 | } |
| 71 | 80 | |
| 81 | +const userNameMrthod = (userName) => { | |
| 82 | + return null == userName?"":undefined == userName?"":"undefined"==userName?"":userName; | |
| 83 | +} | |
| 84 | + | |
| 72 | 85 | |
| 73 | 86 | const handlerChangeRole = () => { |
| 74 | 87 | uni.showModal({ | ... | ... |