Commit 9289d6f9c10f3f03109e0ac8c9498f4cd025e42c
1 parent
08852e31
Exists in
master
and in
1 other branch
fix: 24年7月3周优化
Showing
15 changed files
with
245 additions
and
100 deletions
Show diff stats
App.vue
| ... | ... | @@ -160,8 +160,10 @@ export default { |
| 160 | 160 | uni.$u.api.login.wechat({ code }).then(response => { |
| 161 | 161 | const result = response.result || {}; |
| 162 | 162 | this.$store.commit('SET_AUTHED', result.hasBind); |
| 163 | - this.$store.commit('SET_USER_INFO', result); | |
| 164 | - uni.$emit('refresh-permission'); | |
| 163 | + if (result.hasBind) { | |
| 164 | + this.$store.commit('SET_USER_INFO', result); | |
| 165 | + uni.$emit('refresh-permission'); | |
| 166 | + } | |
| 165 | 167 | }); |
| 166 | 168 | } |
| 167 | 169 | }, | ... | ... |
common/api.js
| ... | ... | @@ -138,8 +138,8 @@ module.exports = (vm) => { |
| 138 | 138 | getPayeeInfo: params => vm.$u.http.get( freightAPI + '/freightOrder/getPayeeInfo', params), // 获取收款人 |
| 139 | 139 | modifyCustomerOrderCode: params => vm.$u.http.post( freightAPI + '/freightOrder/modifyCustomerOrderCode', params), // 修改内部单号 |
| 140 | 140 | modifyAddress: params => vm.$u.http.get( freightAPI + '/freightOrder/modifyAddress', params), // 更改地址 |
| 141 | - modifyGoods: params => vm.$u.http.post( freightAPI + '/freightOrder/modifyGoods', params), // 更改货物信息 | |
| 142 | - adjustAmount: params => vm.$u.http.post( freightAPI + '/freightOrder/adjustAmount', params), // 更改运费 | |
| 141 | + modifyGoods: params => vm.$u.http.post( freightAPI + '/freightOrder/maModifyGoods', params), // 更改货物信息 | |
| 142 | + adjustAmount: params => vm.$u.http.post( freightAPI + '/freightOrder/maAdjustAmount', params), // 更改运费 | |
| 143 | 143 | modifyReceiptAttachment: params => vm.$u.http.post( freightAdmin + '/woss/freightOrder/modifyReceiptAttachment', params), // 修改回单附件 |
| 144 | 144 | count: params => vm.$u.http.post( freightAPI + '/freightOrder/count', params), // 状态数量 |
| 145 | 145 | getDetail: params => vm.$u.http.get( freightAPI + '/freightOrder/getDetail', {params}), // 订单详情 | ... | ... |
config/index.js
| ... | ... | @@ -29,28 +29,28 @@ const newUploadHost = `${envMapping[env] || envMapping.develop}/driver-app-api/u |
| 29 | 29 | export default { |
| 30 | 30 | // 微信小程序名称 |
| 31 | 31 | wxAppName: '则一飞牛货主', |
| 32 | - | |
| 32 | + | |
| 33 | 33 | // 微信小程序ID |
| 34 | 34 | wxAppId: 'wxc92a99760d6b0a99', |
| 35 | - | |
| 35 | + | |
| 36 | 36 | // 企业微信小程序SuiteID |
| 37 | 37 | suiteId: '', |
| 38 | - | |
| 38 | + | |
| 39 | 39 | // 钉钉第三方企业版小程序应用ID |
| 40 | 40 | clientId: '', |
| 41 | - | |
| 41 | + | |
| 42 | 42 | // 腾讯地图位置服务KEY(对应插件chooseLocation) |
| 43 | 43 | mapServiceKey: 'CFKBZ-6L3C4-LZSUR-DJQAY-3R7NT-IPFJR', |
| 44 | 44 | |
| 45 | 45 | // 小程序的 Code Name |
| 46 | - name: 'outscourced-ma', | |
| 46 | + name: 'freight-ma', | |
| 47 | 47 | |
| 48 | 48 | // 全局分享文案 |
| 49 | 49 | shareMessage: '则一飞牛货主', |
| 50 | 50 | |
| 51 | 51 | // 服务地址 |
| 52 | 52 | apiHost, |
| 53 | - | |
| 53 | + | |
| 54 | 54 | // 上传地址 |
| 55 | 55 | uploadHost, |
| 56 | 56 | |
| ... | ... | @@ -62,4 +62,4 @@ export default { |
| 62 | 62 | |
| 63 | 63 | // 小程序版本(生产) |
| 64 | 64 | version: miniProgram?.version, |
| 65 | -} | |
| 65 | +}; | ... | ... |
main.js
| ... | ... | @@ -18,16 +18,16 @@ uni.$u.setConfig({ |
| 18 | 18 | 'u-primary': colorPrimary, |
| 19 | 19 | }, |
| 20 | 20 | }, |
| 21 | - props: { | |
| 21 | + props: { | |
| 22 | 22 | line: { |
| 23 | - color: 'rgba(151, 151, 151, 0.2)' | |
| 23 | + color: 'rgba(151, 151, 151, 0.2)', | |
| 24 | 24 | }, |
| 25 | 25 | swiper: { |
| 26 | - bgColor: 'inherit' | |
| 26 | + bgColor: 'inherit', | |
| 27 | 27 | }, |
| 28 | - tabs: { | |
| 28 | + tabs: { | |
| 29 | 29 | lineColor: colorPrimary, |
| 30 | - }, | |
| 30 | + }, | |
| 31 | 31 | steps: { |
| 32 | 32 | activeColor: colorPrimary, |
| 33 | 33 | }, |
| ... | ... | @@ -44,18 +44,19 @@ uni.$u.setConfig({ |
| 44 | 44 | activeColor: colorPrimary, |
| 45 | 45 | }, |
| 46 | 46 | input: { |
| 47 | - fontSize: 'inherit' | |
| 47 | + fontSize: 'inherit', | |
| 48 | 48 | }, |
| 49 | 49 | text: { |
| 50 | 50 | size: 'inherit', |
| 51 | - color: 'inherit' | |
| 51 | + color: 'inherit', | |
| 52 | 52 | }, |
| 53 | 53 | icon: { |
| 54 | - color: 'inherit' | |
| 54 | + color: 'inherit', | |
| 55 | 55 | }, |
| 56 | - } | |
| 56 | + }, | |
| 57 | 57 | }); |
| 58 | - | |
| 58 | +import mpShare from './uni_modules/uview-ui/libs/mixin/mpShare.js'; | |
| 59 | +Vue.mixin(mpShare); | |
| 59 | 60 | // 混入与组件List相关的页面生命周期 |
| 60 | 61 | Vue.mixin({ |
| 61 | 62 | onPullDownRefresh() { |
| ... | ... | @@ -68,7 +69,7 @@ Vue.mixin({ |
| 68 | 69 | onSearch(config) { |
| 69 | 70 | if (this.mpType === 'page' && this.$refs.list) this.$refs.list.search(config); |
| 70 | 71 | }, |
| 71 | - } | |
| 72 | + }, | |
| 72 | 73 | }); |
| 73 | 74 | |
| 74 | 75 | // 页面内获取当前页面参数 |
| ... | ... | @@ -79,7 +80,7 @@ Object.defineProperty(Vue.prototype, '$params', { |
| 79 | 80 | }, |
| 80 | 81 | }); |
| 81 | 82 | |
| 82 | -import store from './store' | |
| 83 | +import store from './store'; | |
| 83 | 84 | |
| 84 | 85 | Vue.config.productionTip = false; |
| 85 | 86 | Vue.prototype.$store = store; |
| ... | ... | @@ -88,7 +89,7 @@ App.mpType = 'app'; |
| 88 | 89 | |
| 89 | 90 | const app = new Vue({ |
| 90 | 91 | store, |
| 91 | - ...App | |
| 92 | + ...App, | |
| 92 | 93 | }); |
| 93 | 94 | |
| 94 | 95 | require('@/utils/uniapp.js')(uni); | ... | ... |
pages/login/login.vue
| ... | ... | @@ -4,8 +4,8 @@ |
| 4 | 4 | <image src="/static/logo.png" mode="aspectFit"></image> |
| 5 | 5 | </view> |
| 6 | 6 | <view class="page-login__title"> |
| 7 | - <view>您好,</view> | |
| 8 | - <view>欢迎使用则一飞牛货主</view> | |
| 7 | + <view class="welcome">欢迎使用</view> | |
| 8 | + <view class="title">则一飞牛货主</view> | |
| 9 | 9 | </view> |
| 10 | 10 | <!-- #ifdef MP-WEIXIN --> |
| 11 | 11 | <view class="page-login__content"> |
| ... | ... | @@ -40,7 +40,7 @@ |
| 40 | 40 | <view class="page-login__wechat"> |
| 41 | 41 | <u-button type="primary" plain shape="circle" open-type="getPhoneNumber" :loading="submitting" loading-text="登录中..." @getphonenumber="onGetPhoneNumber"> |
| 42 | 42 | <!-- <u-icon name="weixin-fill" size="inherit" /> --> |
| 43 | - <text>手机号快捷登录</text> | |
| 43 | + <text>微信一键登录</text> | |
| 44 | 44 | </u-button> |
| 45 | 45 | </view> |
| 46 | 46 | <!-- #endif --> |
| ... | ... | @@ -202,6 +202,14 @@ export default { |
| 202 | 202 | font-size: $font-lg * 1.2; |
| 203 | 203 | padding: $padding-md; |
| 204 | 204 | line-height: 2; |
| 205 | + text-align: center; | |
| 206 | + color: $color-primary; | |
| 207 | + .welcome { | |
| 208 | + font-size: 40rpx; | |
| 209 | + } | |
| 210 | + .title { | |
| 211 | + font-size: 70rpx; | |
| 212 | + } | |
| 205 | 213 | } |
| 206 | 214 | &__content { |
| 207 | 215 | color: $color-minor; |
| ... | ... | @@ -224,7 +232,7 @@ export default { |
| 224 | 232 | background-color: $color-primary; |
| 225 | 233 | padding: $padding-md; |
| 226 | 234 | line-height: 1.5; |
| 227 | - text-align: cener; | |
| 235 | + text-align: center; | |
| 228 | 236 | font-size: $font-md * 1.2; |
| 229 | 237 | border-radius: $radius-lg * 2; |
| 230 | 238 | &::after { |
| ... | ... | @@ -245,7 +253,7 @@ export default { |
| 245 | 253 | } |
| 246 | 254 | } |
| 247 | 255 | &__wechat { |
| 248 | - color: $color-wx; | |
| 256 | + color: $color-primary; | |
| 249 | 257 | margin-top: $padding-md * 3; |
| 250 | 258 | .u-icon { |
| 251 | 259 | margin-right: $padding-base; | ... | ... |
pages/me/index.vue
| 1 | 1 | <template> |
| 2 | - <Page name="my" flank> | |
| 3 | - <template #content> | |
| 4 | - <view class="page-my__background"></view> | |
| 5 | - <view class="page-my__info"> | |
| 6 | - <view class="page-my__info-avatar"> | |
| 7 | - <view class="avatar"> | |
| 8 | - <image v-if="freightInfo.headImgUrl" class="image" :src="freightInfo.headImgUrl" mode="aspectFill" /> | |
| 9 | - <!-- #ifdef MP-WEIXIN --> | |
| 10 | - <open-data v-else type="userAvatarUrl"></open-data> | |
| 11 | - <!-- #endif --> | |
| 12 | - <!-- #ifndef MP-WEIXIN --> | |
| 13 | - <!-- #ifdef MP-DINGTALK --> | |
| 14 | - <image class="image" :src="formatImagePath('dingtalk', 'svg')" mode="aspectFill"></image> | |
| 15 | - <!-- #endif --> | |
| 16 | - <!-- #ifndef MP-DINGTALK --> | |
| 17 | - <image class="image" :src="formatImagePath('avatar-none', 'svg')" mode="aspectFill"></image> | |
| 18 | - <!-- #endif --> | |
| 19 | - <!-- #endif --> | |
| 20 | - </view> | |
| 21 | - </view> | |
| 22 | - <view class="page-my__info-content"> | |
| 23 | - <view class="name"> | |
| 24 | - <text v-if="freightInfo.name">{{ freightInfo.name }}{{ mobileFilter(freightInfo.mobile) }}</text> | |
| 25 | - <!-- #ifdef MP-WEIXIN --> | |
| 26 | - <open-data v-else type="userNickName"></open-data> | |
| 27 | - <!-- #endif --> | |
| 28 | - <!-- #ifndef MP-WEIXIN --> | |
| 29 | - <text>钉钉用户</text> | |
| 30 | - <!-- #endif --> | |
| 31 | - </view> | |
| 32 | - <view class="mobile"> | |
| 33 | - {{ freightInfo.enterpriseName }} | |
| 34 | - </view> | |
| 35 | - <view class="mobile"> | |
| 36 | - <render-dict v-if="freightInfo.job" v-else dict="FREIGHT_ENTERPRISE_EMPLOYEE_JOB" :value="freightInfo.job"></render-dict> | |
| 37 | - <text v-else-if="freightInfo.enterpriseAdmin">管理员</text> | |
| 38 | - </view> | |
| 2 | + <view class="page-my"> | |
| 3 | + <view class="page-my__background"></view> | |
| 4 | + <view class="page-my__info"> | |
| 5 | + <view class="page-my__info-avatar"> | |
| 6 | + <view class="avatar"> | |
| 7 | + <image class="image" src="/static/user_img.png" mode="aspectFill" /> | |
| 39 | 8 | <!-- #ifdef MP-WEIXIN --> |
| 40 | - <view class="refresh-version" @click.stop="handleRefreshVersion"> | |
| 41 | - <view :class="[loading && 'loading']"><u-icon name="reload" size="20" /></view> | |
| 42 | - <text>检测更新</text> | |
| 43 | - </view> | |
| 9 | + <!-- <open-data v-else type="userAvatarUrl"></open-data>--> | |
| 10 | + <!-- #endif --> | |
| 11 | + <!-- #ifndef MP-WEIXIN --> | |
| 12 | + <!-- #ifdef MP-DINGTALK --> | |
| 13 | + <image class="image" :src="formatImagePath('dingtalk', 'svg')" mode="aspectFill"></image> | |
| 14 | + <!-- #endif --> | |
| 15 | + <!-- #ifndef MP-DINGTALK --> | |
| 16 | + <image class="image" :src="formatImagePath('avatar-none', 'svg')" mode="aspectFill"></image> | |
| 17 | + <!-- #endif --> | |
| 44 | 18 | <!-- #endif --> |
| 45 | 19 | </view> |
| 46 | 20 | </view> |
| 47 | - <view class="page-my__login"> | |
| 48 | - <template v-if="authed"> | |
| 49 | - <u-button shape="circle" @click="handleLogout">退出登录</u-button> | |
| 50 | - </template> | |
| 51 | - <template v-else> | |
| 52 | - <u-button shape="circle" @click="handleLogin">立即登录</u-button> | |
| 53 | - </template> | |
| 21 | + <view class="page-my__info-content"> | |
| 22 | + <view class="name"> | |
| 23 | + <text v-if="freightInfo.name">{{ freightInfo.name }}{{ mobileFilter(freightInfo.mobile) }}</text> | |
| 24 | + <!-- #ifdef MP-WEIXIN --> | |
| 25 | + <open-data v-else type="userNickName"></open-data> | |
| 26 | + <!-- #endif --> | |
| 27 | + <!-- #ifndef MP-WEIXIN --> | |
| 28 | + <text>钉钉用户</text> | |
| 29 | + <!-- #endif --> | |
| 30 | + </view> | |
| 31 | + <view class="mobile"> | |
| 32 | + {{ freightInfo.enterpriseName || '' }} | |
| 33 | + </view> | |
| 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> | |
| 36 | + <text v-else-if="freightInfo.enterpriseAdmin">管理员</text> | |
| 37 | + </view> | |
| 38 | + <!-- #ifdef MP-WEIXIN --> | |
| 39 | + <!-- <view class="refresh-version" @click.stop="handleRefreshVersion">--> | |
| 40 | + <!-- <view :class="[loading && 'loading']"><u-icon name="reload" size="20" /></view>--> | |
| 41 | + <!-- <text>检测更新</text>--> | |
| 42 | + <!-- </view>--> | |
| 43 | + <!-- #endif --> | |
| 54 | 44 | </view> |
| 45 | + </view> | |
| 46 | + <view class="page-my__login"> | |
| 47 | + <u-button shape="circle" @click="handleRefreshVersion">检测更新</u-button> | |
| 48 | + <template v-if="authed"> | |
| 49 | + <u-button shape="circle" @click="handleLogout">退出登录</u-button> | |
| 50 | + </template> | |
| 51 | + <template v-else> | |
| 52 | + <u-button shape="circle" @click="handleLogin">立即登录</u-button> | |
| 53 | + </template> | |
| 55 | 54 | <view class="card-version"> |
| 56 | 55 | <text class="cell-version">SDK: {{ versionInfo.SDKVersion }}</text> |
| 57 | 56 | <text class="cell-version">wechat: {{ versionInfo.version }}</text> |
| 58 | 57 | <text class="cell-version" v-if="version">version: {{ version }}</text> |
| 59 | 58 | </view> |
| 60 | - </template> | |
| 61 | - </Page> | |
| 59 | + </view> | |
| 60 | + </view> | |
| 62 | 61 | </template> |
| 63 | 62 | |
| 64 | 63 | <script> |
| ... | ... | @@ -134,8 +133,10 @@ export default { |
| 134 | 133 | box-sizing: border-box; |
| 135 | 134 | overflow-x: hidden; |
| 136 | 135 | &__info { |
| 137 | - padding-top: $padding-md * 6; | |
| 138 | - padding-bottom: $padding-md * 3; | |
| 136 | + margin: $padding-md; | |
| 137 | + background: $color-white; | |
| 138 | + padding: $padding-md; | |
| 139 | + border-radius: $radius-md; | |
| 139 | 140 | display: flex; |
| 140 | 141 | text-align: center; |
| 141 | 142 | align-items: center; |
| ... | ... | @@ -176,6 +177,15 @@ export default { |
| 176 | 177 | } |
| 177 | 178 | .mobile { |
| 178 | 179 | color: $color-text-minor; |
| 180 | + font-size: 26upx; | |
| 181 | + } | |
| 182 | + .tag-job { | |
| 183 | + color: #2673fb; | |
| 184 | + font-size: 20upx; | |
| 185 | + margin-top: $padding-base; | |
| 186 | + border-radius: $radius-sm; | |
| 187 | + padding: 4upx 10upx; | |
| 188 | + border: 1px solid #2673fb; | |
| 179 | 189 | } |
| 180 | 190 | } |
| 181 | 191 | &__background { |
| ... | ... | @@ -208,8 +218,11 @@ export default { |
| 208 | 218 | } |
| 209 | 219 | } |
| 210 | 220 | &__login { |
| 211 | - margin-top: $padding-md * 24; | |
| 221 | + position: absolute; | |
| 222 | + width: 100%; | |
| 223 | + bottom: 20upx; | |
| 212 | 224 | .u-button { |
| 225 | + margin-bottom: $padding-md; | |
| 213 | 226 | box-shadow: $shadow-normal; |
| 214 | 227 | } |
| 215 | 228 | } | ... | ... |
pages/order/add.vue
| ... | ... | @@ -27,7 +27,7 @@ |
| 27 | 27 | <u-input v-model="form.goodsName" border="none" suffix-icon="arrow-right" placeholder="请选择" disabledColor="#ffffff" disabled /> |
| 28 | 28 | </u-form-item> |
| 29 | 29 | <u-form-item v-if="showGoodsValue" label="货物价值" required> |
| 30 | - <u-input v-model="form.goodsValue" border="none" type="digit" placeholder="请输入" /> | |
| 30 | + <u-input v-model="form.goodsValue" border="none" type="digit" placeholder="请输入" @change="computedService" /> | |
| 31 | 31 | </u-form-item> |
| 32 | 32 | <u-form-item label="货物件数"> |
| 33 | 33 | <u-input v-model="form.goodsPiece" border="none" type="digit" placeholder="请输入,选填" /> |
| ... | ... | @@ -41,7 +41,11 @@ |
| 41 | 41 | </view> |
| 42 | 42 | <view class="card"> |
| 43 | 43 | <u-form-item label="司机手机" required> |
| 44 | - <u-input v-model="form.mobile" border="none" type="number" placeholder="请输入" @blur="mobileChange" /> | |
| 44 | + <u-input v-model="form.mobile" border="none" type="number" placeholder="请输入" @blur="mobileChange"> | |
| 45 | + <template #suffix> | |
| 46 | + <u-tag @click="(showModal = true), (content = '')" text="粘贴识别" plain size="mini"></u-tag> | |
| 47 | + </template> | |
| 48 | + </u-input> | |
| 45 | 49 | </u-form-item> |
| 46 | 50 | <u-form-item label="司机姓名" required> |
| 47 | 51 | <u-input v-model="form.driverName" border="none" placeholder="请输入" :disabled="!!form.driverId" /> |
| ... | ... | @@ -75,7 +79,11 @@ |
| 75 | 79 | :disabled="autoComputedArrival" |
| 76 | 80 | :placeholder="autoComputedArrival ? '自动计算' : '请输入'" |
| 77 | 81 | @change="computedService" |
| 78 | - /> | |
| 82 | + > | |
| 83 | + <template #suffix> | |
| 84 | + <span v-if="autoComputedArrival && form.driverSecurityServiceAmount" class="color-red">已扣安全服务费{{ form.driverSecurityServiceAmount }}</span> | |
| 85 | + </template> | |
| 86 | + </u-input> | |
| 79 | 87 | </u-form-item> |
| 80 | 88 | <u-form-item label="尾款/回单付"> |
| 81 | 89 | <u-input |
| ... | ... | @@ -86,7 +94,11 @@ |
| 86 | 94 | @change="computedService" |
| 87 | 95 | :disabled="!autoComputedArrival" |
| 88 | 96 | :placeholder="!autoComputedArrival ? '自动计算' : '请输入'" |
| 89 | - /> | |
| 97 | + > | |
| 98 | + <template #suffix> | |
| 99 | + <span v-if="!autoComputedArrival && form.driverSecurityServiceAmount" class="color-red">已扣安全服务费{{ form.driverSecurityServiceAmount }}</span> | |
| 100 | + </template> | |
| 101 | + </u-input> | |
| 90 | 102 | </u-form-item> |
| 91 | 103 | </view> |
| 92 | 104 | <view class="card" @tap="more = !more"> |
| ... | ... | @@ -127,6 +139,9 @@ |
| 127 | 139 | <u-button type="primary" @tap="submitAddFun">下单并指派</u-button> |
| 128 | 140 | </template> |
| 129 | 141 | <u-toast ref="uToast"></u-toast> |
| 142 | + <u-modal :show="showModal" title="粘贴识别司机车辆信息" :showCancelButton="true" @cancel="cliCancel" @confirm="cliSubmit" confirmText="确定"> | |
| 143 | + <u--textarea v-model="content" placeholder="支持同时粘贴司机手机号、车牌号、车挂号"></u--textarea> | |
| 144 | + </u-modal> | |
| 130 | 145 | <popup-platenumber :visible="showCar" @update:visible="e => (showCar = e)" @confirm="carConfirm" v-model="carNumber"></popup-platenumber> |
| 131 | 146 | </Page> |
| 132 | 147 | </template> |
| ... | ... | @@ -135,11 +150,14 @@ import { urlParam } from '@/utils/param'; |
| 135 | 150 | import dayjs from 'dayjs'; |
| 136 | 151 | import payee from '../../components/card/payee.vue'; |
| 137 | 152 | import PopupPlatenumber from '../../components/popup/popup-platenumber.vue'; |
| 153 | +import UTextarea from '../../uni_modules/uview-ui/components/u--textarea/u--textarea.vue'; | |
| 138 | 154 | export default { |
| 139 | 155 | name: 'order-add', |
| 140 | - components: { PopupPlatenumber, payee }, | |
| 156 | + components: { UTextarea, PopupPlatenumber, payee }, | |
| 141 | 157 | data() { |
| 142 | 158 | return { |
| 159 | + showModal: '', | |
| 160 | + content: '', | |
| 143 | 161 | carNumber: '', |
| 144 | 162 | showLoadTime: false, |
| 145 | 163 | loadTimeDef: new Date(), |
| ... | ... | @@ -195,6 +213,57 @@ export default { |
| 195 | 213 | this.initConfig(); |
| 196 | 214 | }, |
| 197 | 215 | methods: { |
| 216 | + clipboard(data) { | |
| 217 | + if (!data) return; | |
| 218 | + let mobileReg = /1[3456789]\d{9}/; | |
| 219 | + let vehicleReg = /[京津冀晋蒙辽吉黑沪苏浙皖闽赣鲁豫鄂湘粤桂琼川贵云渝藏陕甘青宁新]{1}[ABCDEFGHJKLMNOPQRSTUVWXY]{1}[0-9A-Z]{5,6}/; | |
| 220 | + let trailerReg = /[京津冀晋蒙辽吉黑沪苏浙皖闽赣鲁豫鄂湘粤桂琼川贵云渝藏陕甘青宁新]{1}[ABCDEFGHJKLMNPQRSTUVWXY]{1}[0-9A-Z]{4}[挂超]{1}/; | |
| 221 | + let mobile = mobileReg.exec(data.toUpperCase()); | |
| 222 | + let vehicle = vehicleReg.exec(data.toUpperCase()); | |
| 223 | + let trailer = trailerReg.exec(data.toUpperCase()); | |
| 224 | + let cliMobile = '', | |
| 225 | + cliVehicle = '', | |
| 226 | + cliTrailer = ''; | |
| 227 | + if (mobile && mobile.input) { | |
| 228 | + cliMobile = mobile[0]; | |
| 229 | + } | |
| 230 | + if (vehicle && vehicle.input) { | |
| 231 | + cliVehicle = vehicle[0]; | |
| 232 | + } | |
| 233 | + if (trailer && trailer.input) { | |
| 234 | + cliTrailer = trailer[0]; | |
| 235 | + } | |
| 236 | + console.info(cliMobile, cliVehicle, cliTrailer); | |
| 237 | + if (cliMobile || cliVehicle || cliTrailer) { | |
| 238 | + this.form = { | |
| 239 | + ...this.form, | |
| 240 | + mobile: cliMobile || this.form.mobile, | |
| 241 | + licenseNumber: cliVehicle || this.form.licenseNumber, | |
| 242 | + }; | |
| 243 | + if (cliMobile) { | |
| 244 | + this.mobileChange(); | |
| 245 | + } | |
| 246 | + if (cliVehicle) { | |
| 247 | + this.typeCar = 'licenseNumber'; | |
| 248 | + this.vehicleChange(cliVehicle); | |
| 249 | + } | |
| 250 | + if (cliTrailer) { | |
| 251 | + setTimeout(() => { | |
| 252 | + this.typeCar = 'trailerNumber'; | |
| 253 | + this.form.trailerNumber = cliTrailer ? cliTrailer.replace('超', '挂') : this.form.trailerNumber; | |
| 254 | + this.vehicleChange(cliTrailer); | |
| 255 | + }, 500); | |
| 256 | + } | |
| 257 | + } | |
| 258 | + }, | |
| 259 | + cliCancel() { | |
| 260 | + this.showModal = false; | |
| 261 | + }, | |
| 262 | + cliSubmit() { | |
| 263 | + this.clipboard(this.content); | |
| 264 | + this.cliCancel(); | |
| 265 | + }, | |
| 266 | + | |
| 198 | 267 | initConfig() { |
| 199 | 268 | uni.$u.api.freightOrder.currentFreight({}).then(en => { |
| 200 | 269 | this.currentFreight = en?.result || {}; | ... | ... |
pages/order/card.vue
| ... | ... | @@ -30,6 +30,11 @@ |
| 30 | 30 | </view> |
| 31 | 31 | </view> |
| 32 | 32 | </view> |
| 33 | + <view class="card-order__item"> | |
| 34 | + <image src="/static/driver.png" /> | |
| 35 | + {{ item.driverName ? item.driverName.substring(0, 4) : '' }} {{ item.driverMobile ? item.driverMobile : '' }} | {{ item.vehicleLicenseNum ? item.vehicleLicenseNum : '' }} | |
| 36 | + {{ item.trailerLicenseNum ? item.trailerLicenseNum : '' }} | |
| 37 | + </view> | |
| 33 | 38 | <view class="card-order__tags"> |
| 34 | 39 | <view class="tag--warning" v-if="item.driverCertifiedStatus === 'NOT_CERTIFIED'">司机未认证</view> |
| 35 | 40 | <view class="tag--paying" v-if="item.driverCertifiedStatus === 'CERTIFYING'">司机认证中</view> |
| ... | ... | @@ -43,10 +48,6 @@ |
| 43 | 48 | <text class="tag--warning" v-if="item.extraTrailerFlag">多车挂</text> |
| 44 | 49 | <text class="tag--warning" v-if="item.missTrailerFlag">缺车挂</text> |
| 45 | 50 | </view> |
| 46 | - <view class="card-order__item"> | |
| 47 | - {{ item.driverName ? item.driverName : '' }} {{ item.driverMobile ? item.driverMobile : '' }} | {{ item.vehicleLicenseNum ? item.vehicleLicenseNum : '' }} | |
| 48 | - {{ item.trailerLicenseNum ? item.trailerLicenseNum : '' }} | |
| 49 | - </view> | |
| 50 | 51 | <view class="card-order__footer"> |
| 51 | 52 | <view class="amount"> |
| 52 | 53 | 运费<text class="red">¥{{ item.freightAmount }}</text> |
| ... | ... | @@ -185,12 +186,19 @@ export default { |
| 185 | 186 | } |
| 186 | 187 | } |
| 187 | 188 | &__item { |
| 189 | + margin-top: $padding-xs; | |
| 188 | 190 | display: flex; |
| 189 | 191 | font-size: 26upx; |
| 190 | 192 | color: #999999; |
| 193 | + align-items: baseline; | |
| 194 | + image { | |
| 195 | + margin-right: $padding-xs; | |
| 196 | + width: 24upx; | |
| 197 | + height: 24upx; | |
| 198 | + } | |
| 191 | 199 | } |
| 192 | 200 | &__tags { |
| 193 | - margin-bottom: $padding-sm; | |
| 201 | + margin-top: $padding-xs; | |
| 194 | 202 | display: flex; |
| 195 | 203 | align-items: center; |
| 196 | 204 | flex-wrap: wrap; |
| ... | ... | @@ -206,6 +214,7 @@ export default { |
| 206 | 214 | font-size: $font-sm; |
| 207 | 215 | background-color: rgba($color-primary, 0.1); |
| 208 | 216 | &--warning { |
| 217 | + margin-right: $padding-xs; | |
| 209 | 218 | color: #f52723; |
| 210 | 219 | font-size: 20rpx; |
| 211 | 220 | padding-left: 10rpx; |
| ... | ... | @@ -214,6 +223,7 @@ export default { |
| 214 | 223 | border: 2rpx solid #f52723; |
| 215 | 224 | } |
| 216 | 225 | &--paying { |
| 226 | + margin-right: $padding-xs; | |
| 217 | 227 | color: #ff9339; |
| 218 | 228 | font-size: 20rpx; |
| 219 | 229 | padding-left: 10upx; |
| ... | ... | @@ -314,7 +324,7 @@ export default { |
| 314 | 324 | color: #ffffff; |
| 315 | 325 | } |
| 316 | 326 | } |
| 317 | - margin-top: $padding-sm; | |
| 327 | + margin-top: $padding-base; | |
| 318 | 328 | } |
| 319 | 329 | } |
| 320 | 330 | </style> | ... | ... |
pages/order/change-fee.vue
| ... | ... | @@ -73,7 +73,11 @@ |
| 73 | 73 | :suffix-icon="autoComputedArrival ? '' : 'arrow-right'" |
| 74 | 74 | :placeholder="autoComputedArrival ? '自动计算' : '请输入'" |
| 75 | 75 | :disabled="autoComputedArrival || arrivalPay.disabled" |
| 76 | - ></u-input> | |
| 76 | + > | |
| 77 | + <template #suffix> | |
| 78 | + <span v-if="autoComputedArrival && form.driverSecurityServiceAmount" class="color-red">-{{ form.driverSecurityServiceAmount }}</span> | |
| 79 | + </template> | |
| 80 | + </u-input> | |
| 77 | 81 | </view> |
| 78 | 82 | </view> |
| 79 | 83 | <view class="item"> |
| ... | ... | @@ -95,7 +99,11 @@ |
| 95 | 99 | :suffix-icon="!autoComputedArrival ? '' : 'arrow-right'" |
| 96 | 100 | :placeholder="!autoComputedArrival ? '自动计算' : '请输入'" |
| 97 | 101 | :disabled="!autoComputedArrival || final.disabled" |
| 98 | - ></u-input> | |
| 102 | + > | |
| 103 | + <template #suffix> | |
| 104 | + <span v-if="!autoComputedArrival && form.driverSecurityServiceAmount" class="color-red">-{{ form.driverSecurityServiceAmount }}</span> | |
| 105 | + </template> | |
| 106 | + </u-input> | |
| 99 | 107 | </view> |
| 100 | 108 | </view> |
| 101 | 109 | </view> | ... | ... |
pages/order/detail.vue
| ... | ... | @@ -79,7 +79,9 @@ |
| 79 | 79 | <text v-if="!!item.goodsWeight">{{ item.goodsWeight }}吨</text> |
| 80 | 80 | <text v-if="!!item.goodsVolume">{{ item.goodsVolume }}方</text> |
| 81 | 81 | </view> |
| 82 | - <view v-if="$permission('/freightOrder/modifyGoods')" class="action" @tap="toChangeGoods"> <u--text text="修改" suffixIcon="arrow-right"></u--text> </view> | |
| 82 | + <view v-if="$permission('/freightOrder/modifyGoods') && !['ALREADY_SETTLEMENT'].includes(item.paymentSettlementStatus)" class="action" @tap="toChangeGoods"> | |
| 83 | + <u--text text="修改" suffixIcon="arrow-right"></u--text> | |
| 84 | + </view> | |
| 83 | 85 | </view> |
| 84 | 86 | </view> |
| 85 | 87 | <view class="card__item"> |
| ... | ... | @@ -218,7 +220,13 @@ |
| 218 | 220 | <view class="card__item_field"> |
| 219 | 221 | <render-dict dict="ONLINE_FREIGHT_ORDER_FEE_TYPE" :value="it.type"></render-dict> |
| 220 | 222 | </view> |
| 221 | - <view class="card__item_content">¥{{ it.amount }}</view> | |
| 223 | + <view class="card__item_content"> | |
| 224 | + ¥{{ it.amount || 0 }} | |
| 225 | + <span v-if="item.driverSecurityServiceAmount"> | |
| 226 | + <span v-if="autoComputedArrival && it.type === 'OUT_INVITE_ARRIVAL'" class="color-red">已扣安全服务费{{ item.driverSecurityServiceAmount }}</span> | |
| 227 | + <span v-if="!autoComputedArrival && it.type === 'OUT_INVITE_FINAL'" class="color-red">已扣安全服务费{{ item.driverSecurityServiceAmount }}</span> | |
| 228 | + </span> | |
| 229 | + </view> | |
| 222 | 230 | <view v-if="it.payStatus === 'PAY_FAILED'" class="card__item--warning">支付失败:{{ it.remark }}</view> |
| 223 | 231 | <view v-if="it.payStatus === 'PAYING'" class="card__item--paying">支付中</view> |
| 224 | 232 | <view v-if="it.payStatus === 'PAY_SUCCESS'" class="card__item--success">已支付</view> |
| ... | ... | @@ -285,11 +293,30 @@ export default { |
| 285 | 293 | { cityName: '', areaName: '', address: '' }, |
| 286 | 294 | ], |
| 287 | 295 | }, |
| 296 | + currentFreight: {}, | |
| 288 | 297 | }; |
| 289 | 298 | }, |
| 290 | 299 | computed: { |
| 291 | 300 | amountList() { |
| 292 | - return this.item.orderFeePayPlanList ? this.item.orderFeePayPlanList.filter(i => i.amount && i.amount > 0) : []; | |
| 301 | + let list = this.item.orderFeePayPlanList; | |
| 302 | + if (!list || list.length === 0) return []; | |
| 303 | + const { prePayFlag, arrivalPayFlag, oilPayFlag } = this.item; | |
| 304 | + let oilPay = list.filter(i => i.type === 'OIL_COST')[0]; | |
| 305 | + let prePay = list.filter(i => i.type === 'OUT_INVITE_PRE')[0]; | |
| 306 | + let arrivalPay = list.filter(i => i.type === 'OUT_INVITE_ARRIVAL')[0]; | |
| 307 | + let finalPay = list.filter(i => i.type === 'OUT_INVITE_FINAL')[0]; | |
| 308 | + let res = []; | |
| 309 | + if (oilPayFlag || (oilPay.amount && oilPay.amount > 0)) { | |
| 310 | + res.push(oilPay); | |
| 311 | + } | |
| 312 | + if (prePayFlag || (prePay.amount && prePay.amount > 0)) { | |
| 313 | + res.push(prePay); | |
| 314 | + } | |
| 315 | + if (arrivalPayFlag || (arrivalPay.amount && arrivalPay.amount > 0) || (this.autoComputedArrival && this.item.driverSecurityServiceAmount)) { | |
| 316 | + res.push(arrivalPay); | |
| 317 | + } | |
| 318 | + res.push(finalPay); | |
| 319 | + return res; | |
| 293 | 320 | }, |
| 294 | 321 | payeeModel() { |
| 295 | 322 | return this.item.payee |
| ... | ... | @@ -300,6 +327,10 @@ export default { |
| 300 | 327 | } |
| 301 | 328 | : {}; |
| 302 | 329 | }, |
| 330 | + autoComputedArrival() { | |
| 331 | + // 自动计算货到 | |
| 332 | + return 'OUT_INVITE_ARRIVAL' === this.currentFreight ? this.currentFreight.autoComputeFeeType : false; | |
| 333 | + }, | |
| 303 | 334 | }, |
| 304 | 335 | onLoad(options) { |
| 305 | 336 | if (options.code) { |
| ... | ... | @@ -308,6 +339,9 @@ export default { |
| 308 | 339 | }, |
| 309 | 340 | methods: { |
| 310 | 341 | initData(code) { |
| 342 | + uni.$u.api.freightOrder.currentFreight({}).then(en => { | |
| 343 | + this.currentFreight = en.result || {}; | |
| 344 | + }); | |
| 311 | 345 | uni.$u.api.freightOrder.getDetail({ code }).then(res => { |
| 312 | 346 | this.item = res.result || {}; |
| 313 | 347 | }); | ... | ... |
pages/order/index.vue
| ... | ... | @@ -33,7 +33,7 @@ |
| 33 | 33 | </view> |
| 34 | 34 | </template> |
| 35 | 35 | <template #content> |
| 36 | - <List ref="list" v-model="list" :api="orderAPI" @update:loading="e => (loading = e)"> | |
| 36 | + <List ref="list" v-model="list" :api="orderAPI" @update:loading="e => (loading = e)" :verify="true"> | |
| 37 | 37 | <template v-for="(item, index) in list"> |
| 38 | 38 | <card |
| 39 | 39 | @more="more" | ... | ... |
pages/settlement/index.vue
| ... | ... | @@ -40,7 +40,7 @@ |
| 40 | 40 | </view> |
| 41 | 41 | </template> |
| 42 | 42 | <template #content> |
| 43 | - <List ref="list" v-model="list" :api="orderAPI" @update:loading="e => (loading = e)"> | |
| 43 | + <List ref="list" v-model="list" :api="orderAPI" @update:loading="e => (loading = e)" :verify="true"> | |
| 44 | 44 | <template v-for="(item, index) in list"> |
| 45 | 45 | <card @apply="applySub" @audit="auditFun" @cancelApply="cancelApplySub" @tap="toDetail(item.orderCode)" :key="index" :item="item"></card> |
| 46 | 46 | </template> | ... | ... |
7.25 KB
static/qr.png
11.4 KB