Commit 6ff911b147dc67aaec367fcf064043f601202614

Authored by liujun001
1 parent b917e960

添加驾驶员名称

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