From 240d061c28b9bea56f4f3143ea17f5d7db4d4903 Mon Sep 17 00:00:00 2001 From: lxf Date: Tue, 31 Dec 2024 15:46:44 +0800 Subject: [PATCH] fix: 打卡加设备信息记录,部分ui间距 --- common/api.js | 3 +++ components/card/payee.vue | 2 +- config/request.js | 1 + pages/me/index.vue | 2 +- pages/order/arrival-car.vue | 2 ++ pages/order/card.vue | 1 + pages/order/detail.vue | 21 ++++++--------------- pages/order/start-car.vue | 2 ++ styles/common.scss | 66 +++++++++++++++++++++++++++++++++--------------------------------- 9 files changed, 50 insertions(+), 50 deletions(-) diff --git a/common/api.js b/common/api.js index 22a7e51..771f249 100644 --- a/common/api.js +++ b/common/api.js @@ -151,5 +151,8 @@ module.exports = (vm) => { buildMaQrcode:params => vm.$u.http.get( freightAdmin + '/woss/freightOrder/buildMaQrcode', {params}), supplementTrailerVehicle: params => vm.$u.http.get( freightAPI + '/freightOrder/supplementTrailerVehicle', params), // 绑定车挂 }, + freightMaRecord: { + add: params => vm.$u.http.post( freightAPI + '/freightMaRecord/add', params,{custom: {toast:true}}), // 出发到达记录日志 + } }; } diff --git a/components/card/payee.vue b/components/card/payee.vue index d829360..80b2c71 100644 --- a/components/card/payee.vue +++ b/components/card/payee.vue @@ -65,6 +65,6 @@ export default { min-width: 70rpx; float: right; } - margin-bottom: $padding-sm; + margin: $padding-sm 0; } diff --git a/config/request.js b/config/request.js index a7e841a..b25aa22 100644 --- a/config/request.js +++ b/config/request.js @@ -1,4 +1,5 @@ import config from '@/config/index.js'; +import store from '@/store/index.js'; const apiHost = config.apiHost; const systemInfo = wx.getSystemInfoSync(); diff --git a/pages/me/index.vue b/pages/me/index.vue index 6273b3b..524febd 100644 --- a/pages/me/index.vue +++ b/pages/me/index.vue @@ -32,7 +32,7 @@ {{ freightInfo.enterpriseName || '' }} - + 管理员 diff --git a/pages/order/arrival-car.vue b/pages/order/arrival-car.vue index b9e9358..a984efd 100644 --- a/pages/order/arrival-car.vue +++ b/pages/order/arrival-car.vue @@ -88,10 +88,12 @@ export default { uni.showToast({ title: '到达时间不能小于发车时间', icon: 'none' }); return; } + let driverInfo = uni.getDeviceInfo(); uni.$u.api.freightOrder .arrive({ codeList: [this.item.code], ...this.form }) .then(res => { if (res.success) { + uni.$u.api.freightMaRecord.add({ orderCode: this.item.code, operateType: 'ARRIVE', ...driverInfo }); uni.showToast({ title: '操作成功', icon: 'none' }); this.getOpenerEventChannel().emit('refreshData'); setTimeout(() => uni.navigateBack(), 500); diff --git a/pages/order/card.vue b/pages/order/card.vue index 61b7ce4..b055ca4 100644 --- a/pages/order/card.vue +++ b/pages/order/card.vue @@ -256,6 +256,7 @@ export default { font-style: normal; } .address { + margin-top: $padding-xs; font-weight: 400; font-size: 24upx; color: #999999; diff --git a/pages/order/detail.vue b/pages/order/detail.vue index 236c75d..abdf414 100644 --- a/pages/order/detail.vue +++ b/pages/order/detail.vue @@ -21,7 +21,7 @@ {{ item.waypoints[0].cityName }}-{{ item.waypoints[0].areaName }} {{ item.waypoints[0].address }} - + {{ item.waypoints[0].contactName ? item.waypoints[0].contactName : '' }} {{ item.waypoints[0].contactMobile ? item.waypoints[0].contactMobile : '' }} @@ -38,7 +38,7 @@ {{ item.waypoints[1].cityName }}-{{ item.waypoints[1].areaName }} {{ item.waypoints[1].address }} - + {{ item.waypoints[1].contactName ? item.waypoints[1].contactName : '' }} {{ item.waypoints[1].contactMobile ? item.waypoints[1].contactMobile : '' }} @@ -128,7 +128,7 @@ 收款人 - {{ item.payee ? item.payee : '' }} + {{ item.payee ? item.payee : '' }} {{ item.payeeMobile ? item.payeeMobile : '' }} 未绑卡 @@ -437,7 +437,6 @@ export default { font-weight: 400; font-size: 32rpx; color: #2b2a27; - line-height: 45px; text-align: left; font-style: normal; } @@ -485,14 +484,12 @@ export default { font-weight: 400; font-size: 28upx; color: #999999; - line-height: 28upx; text-align: left; } .number { font-weight: 600; font-size: 28upx; color: #2b2a27; - line-height: 28upx; text-align: center; font-style: normal; } @@ -532,7 +529,6 @@ export default { &_field { font-weight: 400; font-size: 28upx; - line-height: 28upx; color: #999999; width: 170upx; text-align: left; @@ -541,7 +537,6 @@ export default { flex: 1; font-weight: 400; font-size: 28upx; - line-height: 28upx; color: #2b2a27; text-align: left; font-style: normal; @@ -550,14 +545,12 @@ export default { &_text { font-weight: 400; font-size: 28upx; - line-height: 28upx; text-align: left; font-style: normal; } &_action { font-weight: 400; font-size: 28upx; - line-height: 28upx; color: #2673fb; text-align: right; font-style: normal; @@ -588,15 +581,14 @@ export default { font-weight: 500; font-size: 32upx; color: #2b2a27; - line-height: 32upx; text-align: left; font-style: normal; } .address { + margin-top: $padding-xs; font-weight: 400; font-size: 24upx; color: #999999; - line-height: 33upx; text-align: left; font-style: normal; text + text { @@ -604,10 +596,10 @@ export default { } } .address_action { + margin-top: $padding-xs; font-weight: 400; font-size: 24upx; color: #2673fb; - line-height: 33upx; text-align: left; font-style: normal; display: flex; @@ -630,8 +622,7 @@ export default { color: #2b2a27; } .action { - font-weight: 400; - font-size: 28rpx; + font-size: 26rpx; color: #007aff; } } diff --git a/pages/order/start-car.vue b/pages/order/start-car.vue index 251fefd..ec17f35 100644 --- a/pages/order/start-car.vue +++ b/pages/order/start-car.vue @@ -72,10 +72,12 @@ export default { uni.showToast({ title: '发车时间不能大于当前时间', icon: 'none' }); return; } + let driverInfo = uni.getDeviceInfo(); uni.$u.api.freightOrder .depart({ codeList: [this.item.code], ...this.form }) .then(res => { if (res.success) { + uni.$u.api.freightMaRecord.add({ orderCode: this.item.code, operateType: 'DEPART', ...driverInfo }); uni.showToast({ title: '操作成功', icon: 'none' }); this.getOpenerEventChannel().emit('refreshData'); setTimeout(() => uni.navigateBack(), 500); diff --git a/styles/common.scss b/styles/common.scss index 6321afb..f3b442c 100644 --- a/styles/common.scss +++ b/styles/common.scss @@ -135,7 +135,7 @@ body { align-items: center; justify-content: center; background: $color-primary; - box-shadow: $shadow-normal + box-shadow: $shadow-normal; &::after { border: none; } @@ -151,32 +151,32 @@ body { } /* 空白省略号 */ -.ellipsis { - width: 100%; +.ellipsis { + width: 100%; overflow: hidden; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -} - -.checkbox { - width: $padding-md * 1.2; - height: $padding-md * 1.2; - - &__wrapper { - border-radius: 100%; - width: $padding-md * 1.2; - height: $padding-md * 1.2; - box-sizing: border-box; - border: 1upx solid $color-text-placeholder; +} + +.checkbox { + width: $padding-md * 1.2; + height: $padding-md * 1.2; + + &__wrapper { + border-radius: 100%; + width: $padding-md * 1.2; + height: $padding-md * 1.2; + box-sizing: border-box; + border: 1upx solid $color-text-placeholder; display: inline-flex; align-items: center; - justify-content: center; - &--selected { - background-color: $u-primary; - border: 1upx solid $u-primary; - } - } + justify-content: center; + &--selected { + background-color: $u-primary; + border: 1upx solid $u-primary; + } + } } .link { @@ -186,15 +186,15 @@ body { .color-primary { color: $color-primary; } - -.color-red { - color: $color-red; -} - -.color-orange { - color: $color-zy-orange; -} - -.color-placeholder { - color: $color-text-placeholder; -} + +.color-red { + color: $color-red; +} + +.color-orange { + color: $color-zy-orange; +} + +.color-placeholder { + color: $color-text-placeholder; +} -- libgit2 0.21.0