Commit 240d061c28b9bea56f4f3143ea17f5d7db4d4903

Authored by lxf
1 parent 4064fd15

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

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