Commit 240d061c28b9bea56f4f3143ea17f5d7db4d4903

Authored by lxf
1 parent 4064fd15

fix: 打卡加设备信息记录,部分ui间距

@@ -151,5 +151,8 @@ module.exports = (vm) => { @@ -151,5 +151,8 @@ module.exports = (vm) => {
151 buildMaQrcode:params => vm.$u.http.get( freightAdmin + '/woss/freightOrder/buildMaQrcode', {params}), 151 buildMaQrcode:params => vm.$u.http.get( freightAdmin + '/woss/freightOrder/buildMaQrcode', {params}),
152 supplementTrailerVehicle: params => vm.$u.http.get( freightAPI + '/freightOrder/supplementTrailerVehicle', params), // 绑定车挂 152 supplementTrailerVehicle: params => vm.$u.http.get( freightAPI + '/freightOrder/supplementTrailerVehicle', params), // 绑定车挂
153 }, 153 },
  154 + freightMaRecord: {
  155 + add: params => vm.$u.http.post( freightAPI + '/freightMaRecord/add', params,{custom: {toast:true}}), // 出发到达记录日志
  156 + }
154 }; 157 };
155 } 158 }
components/card/payee.vue
@@ -65,6 +65,6 @@ export default { @@ -65,6 +65,6 @@ export default {
65 min-width: 70rpx; 65 min-width: 70rpx;
66 float: right; 66 float: right;
67 } 67 }
68 - margin-bottom: $padding-sm; 68 + margin: $padding-sm 0;
69 } 69 }
70 </style> 70 </style>
config/request.js
1 import config from '@/config/index.js'; 1 import config from '@/config/index.js';
  2 +import store from '@/store/index.js';
2 3
3 const apiHost = config.apiHost; 4 const apiHost = config.apiHost;
4 const systemInfo = wx.getSystemInfoSync(); 5 const systemInfo = wx.getSystemInfoSync();
pages/me/index.vue
@@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
32 {{ freightInfo.enterpriseName || '' }} 32 {{ freightInfo.enterpriseName || '' }}
33 </view> 33 </view>
34 <view class="tag-job" v-if="freightInfo.id"> 34 <view class="tag-job" v-if="freightInfo.id">
35 - <render-dict v-if="freightInfo.job" v-else dict="FREIGHT_ENTERPRISE_EMPLOYEE_JOB" :value="freightInfo.job"></render-dict> 35 + <render-dict v-if="freightInfo.job" dict="FREIGHT_ENTERPRISE_EMPLOYEE_JOB" :value="freightInfo.job"></render-dict>
36 <text v-else-if="freightInfo.enterpriseAdmin">管理员</text> 36 <text v-else-if="freightInfo.enterpriseAdmin">管理员</text>
37 </view> 37 </view>
38 <!-- #ifdef MP-WEIXIN --> 38 <!-- #ifdef MP-WEIXIN -->
pages/order/arrival-car.vue
@@ -88,10 +88,12 @@ export default { @@ -88,10 +88,12 @@ export default {
88 uni.showToast({ title: '到达时间不能小于发车时间', icon: 'none' }); 88 uni.showToast({ title: '到达时间不能小于发车时间', icon: 'none' });
89 return; 89 return;
90 } 90 }
  91 + let driverInfo = uni.getDeviceInfo();
91 uni.$u.api.freightOrder 92 uni.$u.api.freightOrder
92 .arrive({ codeList: [this.item.code], ...this.form }) 93 .arrive({ codeList: [this.item.code], ...this.form })
93 .then(res => { 94 .then(res => {
94 if (res.success) { 95 if (res.success) {
  96 + uni.$u.api.freightMaRecord.add({ orderCode: this.item.code, operateType: 'ARRIVE', ...driverInfo });
95 uni.showToast({ title: '操作成功', icon: 'none' }); 97 uni.showToast({ title: '操作成功', icon: 'none' });
96 this.getOpenerEventChannel().emit('refreshData'); 98 this.getOpenerEventChannel().emit('refreshData');
97 setTimeout(() => uni.navigateBack(), 500); 99 setTimeout(() => uni.navigateBack(), 500);
pages/order/card.vue
@@ -256,6 +256,7 @@ export default { @@ -256,6 +256,7 @@ export default {
256 font-style: normal; 256 font-style: normal;
257 } 257 }
258 .address { 258 .address {
  259 + margin-top: $padding-xs;
259 font-weight: 400; 260 font-weight: 400;
260 font-size: 24upx; 261 font-size: 24upx;
261 color: #999999; 262 color: #999999;
pages/order/detail.vue
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 <view style="flex: 1"> 21 <view style="flex: 1">
22 <view class="city">{{ item.waypoints[0].cityName }}-{{ item.waypoints[0].areaName }}</view> 22 <view class="city">{{ item.waypoints[0].cityName }}-{{ item.waypoints[0].areaName }}</view>
23 <view class="address">{{ item.waypoints[0].address }}</view> 23 <view class="address">{{ item.waypoints[0].address }}</view>
24 - <view class="address"> 24 + <view v-if="item.waypoints[0].contactName || item.waypoints[0].contactMobile" class="address">
25 <text>{{ item.waypoints[0].contactName ? item.waypoints[0].contactName : '' }}</text> 25 <text>{{ item.waypoints[0].contactName ? item.waypoints[0].contactName : '' }}</text>
26 <text>{{ item.waypoints[0].contactMobile ? item.waypoints[0].contactMobile : '' }}</text> 26 <text>{{ item.waypoints[0].contactMobile ? item.waypoints[0].contactMobile : '' }}</text>
27 </view> 27 </view>
@@ -38,7 +38,7 @@ @@ -38,7 +38,7 @@
38 <view style="flex: 1"> 38 <view style="flex: 1">
39 <view class="city">{{ item.waypoints[1].cityName }}-{{ item.waypoints[1].areaName }}</view> 39 <view class="city">{{ item.waypoints[1].cityName }}-{{ item.waypoints[1].areaName }}</view>
40 <view class="address">{{ item.waypoints[1].address }}</view> 40 <view class="address">{{ item.waypoints[1].address }}</view>
41 - <view class="address"> 41 + <view v-if="item.waypoints[1].contactName || item.waypoints[1].contactMobile" class="address">
42 <text>{{ item.waypoints[1].contactName ? item.waypoints[1].contactName : '' }}</text> 42 <text>{{ item.waypoints[1].contactName ? item.waypoints[1].contactName : '' }}</text>
43 <text>{{ item.waypoints[1].contactMobile ? item.waypoints[1].contactMobile : '' }}</text> 43 <text>{{ item.waypoints[1].contactMobile ? item.waypoints[1].contactMobile : '' }}</text>
44 </view> 44 </view>
@@ -128,7 +128,7 @@ @@ -128,7 +128,7 @@
128 <view class="card__item_field">收款人</view> 128 <view class="card__item_field">收款人</view>
129 <view class="card__item_content"> 129 <view class="card__item_content">
130 <view class="text"> 130 <view class="text">
131 - <text>{{ item.payee ? item.payee : '' }}</text> 131 + <text v-if="item.payee">{{ item.payee ? item.payee : '' }}</text>
132 <text> 132 <text>
133 {{ item.payeeMobile ? item.payeeMobile : '' }} 133 {{ item.payeeMobile ? item.payeeMobile : '' }}
134 <text v-if="item.payeeMobile && item.bindBankCardNoFlag === false" class="card__item--warning">未绑卡</text> 134 <text v-if="item.payeeMobile && item.bindBankCardNoFlag === false" class="card__item--warning">未绑卡</text>
@@ -437,7 +437,6 @@ export default { @@ -437,7 +437,6 @@ export default {
437 font-weight: 400; 437 font-weight: 400;
438 font-size: 32rpx; 438 font-size: 32rpx;
439 color: #2b2a27; 439 color: #2b2a27;
440 - line-height: 45px;  
441 text-align: left; 440 text-align: left;
442 font-style: normal; 441 font-style: normal;
443 } 442 }
@@ -485,14 +484,12 @@ export default { @@ -485,14 +484,12 @@ export default {
485 font-weight: 400; 484 font-weight: 400;
486 font-size: 28upx; 485 font-size: 28upx;
487 color: #999999; 486 color: #999999;
488 - line-height: 28upx;  
489 text-align: left; 487 text-align: left;
490 } 488 }
491 .number { 489 .number {
492 font-weight: 600; 490 font-weight: 600;
493 font-size: 28upx; 491 font-size: 28upx;
494 color: #2b2a27; 492 color: #2b2a27;
495 - line-height: 28upx;  
496 text-align: center; 493 text-align: center;
497 font-style: normal; 494 font-style: normal;
498 } 495 }
@@ -532,7 +529,6 @@ export default { @@ -532,7 +529,6 @@ export default {
532 &_field { 529 &_field {
533 font-weight: 400; 530 font-weight: 400;
534 font-size: 28upx; 531 font-size: 28upx;
535 - line-height: 28upx;  
536 color: #999999; 532 color: #999999;
537 width: 170upx; 533 width: 170upx;
538 text-align: left; 534 text-align: left;
@@ -541,7 +537,6 @@ export default { @@ -541,7 +537,6 @@ export default {
541 flex: 1; 537 flex: 1;
542 font-weight: 400; 538 font-weight: 400;
543 font-size: 28upx; 539 font-size: 28upx;
544 - line-height: 28upx;  
545 color: #2b2a27; 540 color: #2b2a27;
546 text-align: left; 541 text-align: left;
547 font-style: normal; 542 font-style: normal;
@@ -550,14 +545,12 @@ export default { @@ -550,14 +545,12 @@ export default {
550 &_text { 545 &_text {
551 font-weight: 400; 546 font-weight: 400;
552 font-size: 28upx; 547 font-size: 28upx;
553 - line-height: 28upx;  
554 text-align: left; 548 text-align: left;
555 font-style: normal; 549 font-style: normal;
556 } 550 }
557 &_action { 551 &_action {
558 font-weight: 400; 552 font-weight: 400;
559 font-size: 28upx; 553 font-size: 28upx;
560 - line-height: 28upx;  
561 color: #2673fb; 554 color: #2673fb;
562 text-align: right; 555 text-align: right;
563 font-style: normal; 556 font-style: normal;
@@ -588,15 +581,14 @@ export default { @@ -588,15 +581,14 @@ export default {
588 font-weight: 500; 581 font-weight: 500;
589 font-size: 32upx; 582 font-size: 32upx;
590 color: #2b2a27; 583 color: #2b2a27;
591 - line-height: 32upx;  
592 text-align: left; 584 text-align: left;
593 font-style: normal; 585 font-style: normal;
594 } 586 }
595 .address { 587 .address {
  588 + margin-top: $padding-xs;
596 font-weight: 400; 589 font-weight: 400;
597 font-size: 24upx; 590 font-size: 24upx;
598 color: #999999; 591 color: #999999;
599 - line-height: 33upx;  
600 text-align: left; 592 text-align: left;
601 font-style: normal; 593 font-style: normal;
602 text + text { 594 text + text {
@@ -604,10 +596,10 @@ export default { @@ -604,10 +596,10 @@ export default {
604 } 596 }
605 } 597 }
606 .address_action { 598 .address_action {
  599 + margin-top: $padding-xs;
607 font-weight: 400; 600 font-weight: 400;
608 font-size: 24upx; 601 font-size: 24upx;
609 color: #2673fb; 602 color: #2673fb;
610 - line-height: 33upx;  
611 text-align: left; 603 text-align: left;
612 font-style: normal; 604 font-style: normal;
613 display: flex; 605 display: flex;
@@ -630,8 +622,7 @@ export default { @@ -630,8 +622,7 @@ export default {
630 color: #2b2a27; 622 color: #2b2a27;
631 } 623 }
632 .action { 624 .action {
633 - font-weight: 400;  
634 - font-size: 28rpx; 625 + font-size: 26rpx;
635 color: #007aff; 626 color: #007aff;
636 } 627 }
637 } 628 }
pages/order/start-car.vue
@@ -72,10 +72,12 @@ export default { @@ -72,10 +72,12 @@ export default {
72 uni.showToast({ title: '发车时间不能大于当前时间', icon: 'none' }); 72 uni.showToast({ title: '发车时间不能大于当前时间', icon: 'none' });
73 return; 73 return;
74 } 74 }
  75 + let driverInfo = uni.getDeviceInfo();
75 uni.$u.api.freightOrder 76 uni.$u.api.freightOrder
76 .depart({ codeList: [this.item.code], ...this.form }) 77 .depart({ codeList: [this.item.code], ...this.form })
77 .then(res => { 78 .then(res => {
78 if (res.success) { 79 if (res.success) {
  80 + uni.$u.api.freightMaRecord.add({ orderCode: this.item.code, operateType: 'DEPART', ...driverInfo });
79 uni.showToast({ title: '操作成功', icon: 'none' }); 81 uni.showToast({ title: '操作成功', icon: 'none' });
80 this.getOpenerEventChannel().emit('refreshData'); 82 this.getOpenerEventChannel().emit('refreshData');
81 setTimeout(() => uni.navigateBack(), 500); 83 setTimeout(() => uni.navigateBack(), 500);
styles/common.scss
@@ -135,7 +135,7 @@ body { @@ -135,7 +135,7 @@ body {
135 align-items: center; 135 align-items: center;
136 justify-content: center; 136 justify-content: center;
137 background: $color-primary; 137 background: $color-primary;
138 - box-shadow: $shadow-normal 138 + box-shadow: $shadow-normal;
139 &::after { 139 &::after {
140 border: none; 140 border: none;
141 } 141 }
@@ -151,32 +151,32 @@ body { @@ -151,32 +151,32 @@ body {
151 } 151 }
152 152
153 /* 空白省略号 */ 153 /* 空白省略号 */
154 -.ellipsis {  
155 - width: 100%; 154 +.ellipsis {
  155 + width: 100%;
156 overflow: hidden; 156 overflow: hidden;
157 white-space: nowrap; 157 white-space: nowrap;
158 overflow: hidden; 158 overflow: hidden;
159 text-overflow: ellipsis; 159 text-overflow: ellipsis;
160 -}  
161 -  
162 -.checkbox {  
163 - width: $padding-md * 1.2;  
164 - height: $padding-md * 1.2;  
165 -  
166 - &__wrapper {  
167 - border-radius: 100%;  
168 - width: $padding-md * 1.2;  
169 - height: $padding-md * 1.2;  
170 - box-sizing: border-box;  
171 - border: 1upx solid $color-text-placeholder; 160 +}
  161 +
  162 +.checkbox {
  163 + width: $padding-md * 1.2;
  164 + height: $padding-md * 1.2;
  165 +
  166 + &__wrapper {
  167 + border-radius: 100%;
  168 + width: $padding-md * 1.2;
  169 + height: $padding-md * 1.2;
  170 + box-sizing: border-box;
  171 + border: 1upx solid $color-text-placeholder;
172 display: inline-flex; 172 display: inline-flex;
173 align-items: center; 173 align-items: center;
174 - justify-content: center;  
175 - &--selected {  
176 - background-color: $u-primary;  
177 - border: 1upx solid $u-primary;  
178 - }  
179 - } 174 + justify-content: center;
  175 + &--selected {
  176 + background-color: $u-primary;
  177 + border: 1upx solid $u-primary;
  178 + }
  179 + }
180 } 180 }
181 181
182 .link { 182 .link {
@@ -186,15 +186,15 @@ body { @@ -186,15 +186,15 @@ body {
186 .color-primary { 186 .color-primary {
187 color: $color-primary; 187 color: $color-primary;
188 } 188 }
189 -  
190 -.color-red {  
191 - color: $color-red;  
192 -}  
193 -  
194 -.color-orange {  
195 - color: $color-zy-orange;  
196 -}  
197 -  
198 -.color-placeholder {  
199 - color: $color-text-placeholder;  
200 -} 189 +
  190 +.color-red {
  191 + color: $color-red;
  192 +}
  193 +
  194 +.color-orange {
  195 + color: $color-zy-orange;
  196 +}
  197 +
  198 +.color-placeholder {
  199 + color: $color-text-placeholder;
  200 +}