Commit 7bce5260b8d66f3aa235cb3d2a16b69836281ddc

Authored by lxf
2 parents 42b352e0 e1a0031f

Merge branch 'master' into 货源管理

@@ -116,6 +116,14 @@ module.exports = (vm) => { @@ -116,6 +116,14 @@ module.exports = (vm) => {
116 audit: params => vm.$u.http.post(freightAPI + '/freightPayApply/audit', params,{custom: {toast:true}}), // 审核 116 audit: params => vm.$u.http.post(freightAPI + '/freightPayApply/audit', params,{custom: {toast:true}}), // 审核
117 getCount: params => vm.$u.http.get(freightAPI + '/freightPayApply/getCount', {params}), // 总数 117 getCount: params => vm.$u.http.get(freightAPI + '/freightPayApply/getCount', {params}), // 总数
118 }, 118 },
  119 + // 支付计划
  120 + paymentPlan: {
  121 + page: params => vm.$u.http.post(freightAPI + '/freightPayPlan/page', params),
  122 + getCount: params => vm.$u.http.get(freightAPI + '/freightPayPlan/getCount', {params}), // 总数
  123 + getApplyDetailByIds: params => vm.$u.http.post(freightAPI + '/freightPayPlan/getApplyDetailByIds', params,{custom: {toast:true}}), // 查询支付明细信息
  124 + checkPayPassword: data => vm.$u.http.post(freightAPI + '/account/checkPayPassword', data), // 校验密码
  125 + pay: data => vm.$u.http.post(freightAPI + '/freightPayPlan/pay', data), // 支付
  126 + },
119 // 订单管理-网货货运-new 127 // 订单管理-网货货运-new
120 freightOrder: { 128 freightOrder: {
121 add: params => vm.$u.http.post(freightAPI + '/freightOrder/maAdd', params,{custom: {toast:true}}), // 下单 129 add: params => vm.$u.http.post(freightAPI + '/freightOrder/maAdd', params,{custom: {toast:true}}), // 下单
iconfont/iconfont.css
@@ -370,3 +370,9 @@ @@ -370,3 +370,9 @@
370 content: "\e722"; 370 content: "\e722";
371 } 371 }
372 372
  373 +.icon-radio-no:before {
  374 + content: "\e723";
  375 +}
  376 +.icon-radio-chose:before {
  377 + content: "\e724";
  378 +}
iconfont/iconfont.ttf
No preview for this file type
1 import Vue from 'vue'; 1 import Vue from 'vue';
2 import App from './App'; 2 import App from './App';
3 -import '@/config/umtrack.js'; 3 +// import '@/config/umtrack.js';
4 import cache from '@/utils/cache'; 4 import cache from '@/utils/cache';
5 import { formatImagePath } from '@/utils/imagePath'; 5 import { formatImagePath } from '@/utils/imagePath';
6 6
@@ -219,6 +219,30 @@ @@ -219,6 +219,30 @@
219 } 219 }
220 } 220 }
221 ] 221 ]
  222 + },
  223 + {
  224 + "root":"pages/payPlan",
  225 + "pages":[
  226 + {
  227 + "path": "list",
  228 + "style": {
  229 + "navigationBarTitleText": "支付计划",
  230 + "enablePullDownRefresh": true
  231 + }
  232 + },
  233 + {
  234 + "path": "filter",
  235 + "style": {
  236 + "navigationBarTitleText": "筛选器"
  237 + }
  238 + },
  239 + {
  240 + "path": "paySubmit",
  241 + "style": {
  242 + "navigationBarTitleText": "支付信息确认"
  243 + }
  244 + }
  245 + ]
222 } 246 }
223 ], 247 ],
224 "globalStyle": { 248 "globalStyle": {
pages/me/index.vue
@@ -43,6 +43,12 @@ @@ -43,6 +43,12 @@
43 <!-- #endif --> 43 <!-- #endif -->
44 </view> 44 </view>
45 </view> 45 </view>
  46 + <view class="page-my__list">
  47 + <u-cell-group>
  48 + <!-- <u-cell v-if="$permission('/settlement/paymentPlan')" icon="file-text" title="支付申请" is-link url="/pages/payPlan/list"> </u-cell>-->
  49 + <u-cell v-if="$permission('/settlement/paymentPlan')" icon="rmb" icon-style="color:#333" title-style="color:#333" title="支付计划" is-link url="/pages/payPlan/list"> </u-cell>
  50 + </u-cell-group>
  51 + </view>
46 <view class="page-my__login"> 52 <view class="page-my__login">
47 <u-button shape="circle" @click="handleRefreshVersion">检测更新</u-button> 53 <u-button shape="circle" @click="handleRefreshVersion">检测更新</u-button>
48 <template v-if="authed"> 54 <template v-if="authed">
@@ -64,8 +70,10 @@ @@ -64,8 +70,10 @@
64 import cache from '@/utils/cache'; 70 import cache from '@/utils/cache';
65 import { mapState, mapGetters } from 'vuex'; 71 import { mapState, mapGetters } from 'vuex';
66 import { version } from '@/config'; 72 import { version } from '@/config';
  73 +import page from '@/mixins/page';
67 74
68 export default { 75 export default {
  76 + mixins: [page],
69 data() { 77 data() {
70 return { 78 return {
71 loading: false, 79 loading: false,
@@ -217,6 +225,12 @@ export default { @@ -217,6 +225,12 @@ export default {
217 background-color: rgba($color-primary, 0.3); 225 background-color: rgba($color-primary, 0.3);
218 } 226 }
219 } 227 }
  228 + &__list {
  229 + margin: $padding-md;
  230 + padding: 0 $padding-xs;
  231 + background: $color-white;
  232 + border-radius: $radius-md;
  233 + }
220 &__login { 234 &__login {
221 position: absolute; 235 position: absolute;
222 width: 100%; 236 width: 100%;
pages/order/card.vue
@@ -34,7 +34,7 @@ @@ -34,7 +34,7 @@
34 </view> 34 </view>
35 </view> 35 </view>
36 <view class="card-order__item"> 36 <view class="card-order__item">
37 - <image src="/static/driver.png" /> 37 + <image class="image" src="/static/driver.png" />
38 {{ item.driverName ? item.driverName.substring(0, 4) : '' }} {{ item.driverMobile ? item.driverMobile : '' }} | {{ item.vehicleLicenseNum ? item.vehicleLicenseNum : '' }} 38 {{ item.driverName ? item.driverName.substring(0, 4) : '' }} {{ item.driverMobile ? item.driverMobile : '' }} | {{ item.vehicleLicenseNum ? item.vehicleLicenseNum : '' }}
39 {{ item.trailerLicenseNum ? item.trailerLicenseNum : '' }} 39 {{ item.trailerLicenseNum ? item.trailerLicenseNum : '' }}
40 </view> 40 </view>
@@ -43,28 +43,31 @@ @@ -43,28 +43,31 @@
43 <view class="tag--paying" v-if="item.driverCertifiedStatus === 'CERTIFYING'">司机认证中</view> 43 <view class="tag--paying" v-if="item.driverCertifiedStatus === 'CERTIFYING'">司机认证中</view>
44 <view class="tag--warning" v-if="item.payeeMobile && item.bindBankCardNoFlag === false">收款人未绑卡</view> 44 <view class="tag--warning" v-if="item.payeeMobile && item.bindBankCardNoFlag === false">收款人未绑卡</view>
45 <view class="tag--warning" v-if="item.vehicleLicenseNum && item.vehicleCertifiedStatus === 'NOT_CERTIFIED' && !item.trailerLicenseNum">车辆未认证</view> 45 <view class="tag--warning" v-if="item.vehicleLicenseNum && item.vehicleCertifiedStatus === 'NOT_CERTIFIED' && !item.trailerLicenseNum">车辆未认证</view>
46 - <view class="tag--paying" v-if="item.vehicleLicenseNum && item.vehicleCertifiedStatus === 'CERTIFYING' && !item.trailerLicenseNum">车辆认证中</view>  
47 - <view class="tag--warning" v-if="item.vehicleLicenseNum && item.vehicleCertifiedStatus === 'NOT_CERTIFIED' && item.trailerLicenseNum">车头未认证</view>  
48 - <view class="tag--paying" v-if="item.vehicleLicenseNum && item.vehicleCertifiedStatus === 'CERTIFYING' && item.trailerLicenseNum">车头认证中</view>  
49 - <view class="tag--warning" v-if="item.trailerLicenseNum && !item.extraTrailerFlag && item.trailerVehicleCertifiedStatus === 'NOT_CERTIFIED'">车挂未认证</view>  
50 - <view class="tag--paying" v-if="item.trailerLicenseNum && !item.extraTrailerFlag && item.trailerVehicleCertifiedStatus === 'CERTIFYING'">车挂认证中</view> 46 + <view class="tag--paying" v-else-if="item.vehicleLicenseNum && item.vehicleCertifiedStatus === 'CERTIFYING' && !item.trailerLicenseNum">车辆认证中</view>
  47 + <view class="tag--warning" v-else-if="item.vehicleLicenseNum && item.vehicleCertifiedStatus === 'NOT_CERTIFIED' && item.trailerLicenseNum">车头未认证</view>
  48 + <view class="tag--paying" v-else-if="item.vehicleLicenseNum && item.vehicleCertifiedStatus === 'CERTIFYING' && item.trailerLicenseNum">车头认证中</view>
  49 + <view class="tag--paying" v-else-if="item.vehicleLicenseNum && item.vehicleExpiredFlag && item.vehicleCertifiedStatus === 'CERTIFIED'">车头证件过期</view>
  50 +
51 <text class="tag--warning" v-if="item.extraTrailerFlag">多车挂</text> 51 <text class="tag--warning" v-if="item.extraTrailerFlag">多车挂</text>
52 - <text class="tag--warning" v-if="item.missTrailerFlag">缺车挂</text> 52 + <text class="tag--warning" v-else-if="item.missTrailerFlag">缺车挂</text>
  53 + <view class="tag--warning" v-else-if="item.trailerLicenseNum && !item.extraTrailerFlag && item.trailerVehicleCertifiedStatus === 'NOT_CERTIFIED'">车挂未认证</view>
  54 + <view class="tag--paying" v-else-if="item.trailerLicenseNum && !item.extraTrailerFlag && item.trailerVehicleCertifiedStatus === 'CERTIFYING'">车挂认证中</view>
  55 + <text class="tag--warning" v-else-if="item.trailerLicenseNum && item.trailerExpiredFlag && item.trailerVehicleCertifiedStatus === 'CERTIFIED'">车挂证件过期</text>
53 </view> 56 </view>
54 <view class="card-order__footer"> 57 <view class="card-order__footer">
55 <view class="amount"> 58 <view class="amount">
56 运费<text class="red">¥{{ item.freightAmount }}</text> 59 运费<text class="red">¥{{ item.freightAmount }}</text>
57 </view> 60 </view>
58 <view class="status" :style="{ color: payStatusColorMap[item.payStatus], background: bgPayStatusColorMap[item.payStatus] }"> 61 <view class="status" :style="{ color: payStatusColorMap[item.payStatus], background: bgPayStatusColorMap[item.payStatus] }">
59 - <render-dict dict="ONLINE_FREIGHT_ORDER_PAY_PROCESS" :value="item.payStatus"></render-dict> 62 + <render-dict v-if="item.payStatus" dict="ONLINE_FREIGHT_ORDER_PAY_PROCESS" :value="item.payStatus"></render-dict>
60 </view> 63 </view>
61 <view class="action"> 64 <view class="action">
62 <zb-tooltip placement="bottom" :visible="visible" @update:visible="e => (visible = e)"> 65 <zb-tooltip placement="bottom" :visible="visible" @update:visible="e => (visible = e)">
63 <template #content> 66 <template #content>
64 <view class="more-action"> 67 <view class="more-action">
65 - <view v-if="$permission('/freightOrder/add')" @tap="againOne"> 再来一单 </view>  
66 - <view v-if="$permission('/freightOrder/delete') && ['CANCEL'].includes(item.status)" @tap="deleteOrder"> 删除订单 </view>  
67 - <view v-if="$permission('/freightOrder/cancel') && ['WAIT_CONFIRM', 'WAIT_ACCEPT', 'WAIT_DEPART'].includes(item.status)" @tap="cancelOrder"> 取消订单 </view> 68 + <view class="view" v-if="$permission('/freightOrder/add')" @tap="againOne"> 再来一单 </view>
  69 + <view class="view" v-if="$permission('/freightOrder/delete') && ['CANCEL'].includes(item.status)" @tap="deleteOrder"> 删除订单 </view>
  70 + <view class="view" v-if="$permission('/freightOrder/cancel') && ['WAIT_CONFIRM', 'WAIT_ACCEPT', 'WAIT_DEPART'].includes(item.status)" @tap="cancelOrder"> 取消订单 </view>
68 </view> 71 </view>
69 </template> 72 </template>
70 <view class="button"> 73 <view class="button">
@@ -206,7 +209,7 @@ export default { @@ -206,7 +209,7 @@ export default {
206 font-size: 26upx; 209 font-size: 26upx;
207 color: #999999; 210 color: #999999;
208 align-items: baseline; 211 align-items: baseline;
209 - image { 212 + .image {
210 margin-right: $padding-xs; 213 margin-right: $padding-xs;
211 width: 24upx; 214 width: 24upx;
212 height: 24upx; 215 height: 24upx;
@@ -309,10 +312,10 @@ export default { @@ -309,10 +312,10 @@ export default {
309 text-align: center; 312 text-align: center;
310 color: #666666; 313 color: #666666;
311 box-shadow: 0px 2px 8px 2px rgba(0, 0, 0, 0.22); 314 box-shadow: 0px 2px 8px 2px rgba(0, 0, 0, 0.22);
312 - view { 315 + .view {
313 padding: $padding-sm; 316 padding: $padding-sm;
314 } 317 }
315 - view + view { 318 + .view + .view {
316 border-top: 1px solid #eaeaea; 319 border-top: 1px solid #eaeaea;
317 } 320 }
318 } 321 }
pages/order/index.vue
@@ -425,6 +425,9 @@ export default { @@ -425,6 +425,9 @@ export default {
425 } 425 }
426 } 426 }
427 } 427 }
  428 + &__content {
  429 + padding-bottom: 60px !important;
  430 + }
428 .add-order { 431 .add-order {
429 right: 34upx; 432 right: 34upx;
430 bottom: 34upx; 433 bottom: 34upx;
pages/payPlan/card.vue 0 → 100644
@@ -0,0 +1,192 @@ @@ -0,0 +1,192 @@
  1 +<template>
  2 + <view class="payment-card" @mousedown="mousedown" @mouseup="mouseup" @touchstart="mousedown" @touchend="mouseup" @tap="choseFun">
  3 + <view class="title">
  4 + <view class="code">
  5 + <field-copy :value="item.payCode" v-if="item.payCode">{{ item.payCode }} </field-copy>
  6 + </view>
  7 + <view style="display: flex">
  8 + <render-dict v-if="item.payStatus" class="status" :style="{ color: colorMap[item.payStatus] }" dict="ONLINE_FREIGHT_ORDER_PAY_STATUS" :value="item.payStatus"></render-dict>
  9 + <template v-if="choseMore">
  10 + <zui-icon v-if="choseIds.includes(item.id)" name="radio-chose" size="18px" color="#1E7B6B"></zui-icon>
  11 + <zui-icon v-else name="radio-no" size="18px"></zui-icon>
  12 + <!-- <u-icon v-if="choseIds.includes(item.id)" name="checkmark-circle-fill" size="20" color="#1E7B6B"></u-icon>-->
  13 + </template>
  14 + </view>
  15 + </view>
  16 + <view class="title-sub">{{ item.projectName ? item.projectName : '' }}{{ item.loadTime ? '|' + item.loadTime + '装货' : '' }}</view>
  17 + <view class="item">
  18 + <view class="label">
  19 + <render-dict v-if="item.feeType" dict="ONLINE_FREIGHT_ORDER_FEE_TYPE" :value="item.feeType"></render-dict>
  20 + </view>
  21 + <view class="content">
  22 + <text class="amount">¥{{ item.feeAmount ? item.feeAmount : '' }}</text>
  23 + </view>
  24 + </view>
  25 + <view class="item">
  26 + <view class="label">承运司机</view>
  27 + <view class="content">
  28 + <text>{{ item.driverName ? item.driverName : '' }}</text>
  29 + <text>{{ item.driverMobile ? item.driverMobile : '' }}</text>
  30 + </view>
  31 + </view>
  32 + <view class="item">
  33 + <view class="label">收款人</view>
  34 + <view class="content">
  35 + <text>{{ item.recAccountName ? item.recAccountName : '' }}</text>
  36 + <text>{{ item.recMobile ? item.recMobile : '' }}</text>
  37 + </view>
  38 + </view>
  39 + <view class="item">
  40 + <view class="label">承运车辆</view>
  41 + <view class="content">{{ item.vehicleLicenseNum ? item.vehicleLicenseNum : '' }}{{ item.trailerLicenseNum ? '·' + item.trailerLicenseNum : '' }}</view>
  42 + </view>
  43 + <view class="item">
  44 + <view class="label">订单号</view>
  45 + <view class="content">
  46 + <text>{{ item.orderCode }}</text>
  47 + <text v-if="!!item.waitHandleExceptionNumber" class="content--warning">{{ item.waitHandleExceptionNumber || '0' }}个异常待处理</text>
  48 + </view>
  49 + </view>
  50 + <view class="item">
  51 + <view class="label">线路名称</view>
  52 + <view class="content">{{ item.lineName ? item.lineName : '' }}</view>
  53 + </view>
  54 + <view class="item" v-if="!choseMore && ['NOT_PAY', 'PAY_FAILED'].includes(item.payStatus)">
  55 + <u-button v-if="$permission('/freightPayPlan/apply')" type="primary" @tap="paymentFun">{{ item.payStatus === 'PAY_FAILED' ? '重新支付' : '提交支付' }}</u-button>
  56 + </view>
  57 + </view>
  58 +</template>
  59 +<script>
  60 +import FieldCopy from '../../components/field/field-copy.vue';
  61 +import UButton from '../../uni_modules/uview-ui/components/u-button/u-button.vue';
  62 +import page from '../../mixins/page';
  63 +export default {
  64 + name: 'payment-card',
  65 + mixins: [page],
  66 + components: { UButton, FieldCopy },
  67 + props: {
  68 + choseMore: Boolean,
  69 + choseIds: {
  70 + type: Array,
  71 + default() {
  72 + return [];
  73 + },
  74 + },
  75 + item: {
  76 + type: Object,
  77 + default() {
  78 + return {};
  79 + },
  80 + },
  81 + },
  82 + data() {
  83 + return {
  84 + visible: false,
  85 + pressTimer: '',
  86 + isLongClick: false,
  87 + colorMap: {
  88 + NOT_PAY: '#ff4f3b',
  89 + PAYING: '#0000FF',
  90 + PAY_FAILED: '#999999',
  91 + PAY_SUCCESS: '#00B87A',
  92 + },
  93 + };
  94 + },
  95 + methods: {
  96 + paymentFun() {
  97 + if (!this.isLongClick) {
  98 + this.$emit('payment', this.item.id);
  99 + }
  100 + },
  101 + choseFun() {
  102 + if (!this.isLongClick) {
  103 + this.$emit('chose', this.item.id);
  104 + }
  105 + },
  106 + mousedown() {
  107 + if (this.choseMore) return;
  108 + this.pressTimer = setTimeout(() => {
  109 + this.isLongClick = true;
  110 + this.$emit('longClick', this.item);
  111 + }, 1000);
  112 + },
  113 + mouseup() {
  114 + clearTimeout(this.pressTimer);
  115 + setTimeout(() => {
  116 + this.isLongClick = false;
  117 + }, 100);
  118 + },
  119 + },
  120 +};
  121 +</script>
  122 +
  123 +<style scoped lang="scss">
  124 +.payment-card {
  125 + background-color: $color-white;
  126 + color: $color-text;
  127 + padding: $padding-sm;
  128 + margin-bottom: $padding-sm;
  129 + border-radius: $radius-md;
  130 + box-shadow: $shadow-normal;
  131 + font-size: $font-md;
  132 + .title {
  133 + padding-bottom: $padding-sm;
  134 + display: flex;
  135 + justify-content: space-between;
  136 + .code {
  137 + font-weight: 500;
  138 + font-size: 30upx;
  139 + color: #2b2a27;
  140 + line-height: 34upx;
  141 + text-align: left;
  142 + font-style: normal;
  143 + }
  144 + border-bottom: 1px solid $color-border;
  145 + }
  146 + .title-sub {
  147 + margin-top: $padding-sm;
  148 + font-weight: 400;
  149 + font-size: 26upx;
  150 + color: #5d5d5d;
  151 + line-height: 37upx;
  152 + text-align: left;
  153 + font-style: normal;
  154 + }
  155 + .item {
  156 + margin-top: $padding-sm;
  157 + display: flex;
  158 + .label {
  159 + width: 170upx;
  160 + font-weight: 400;
  161 + font-size: 28upx;
  162 + color: #999999;
  163 + line-height: 28upx;
  164 + text-align: left;
  165 + font-style: normal;
  166 + }
  167 + .content {
  168 + font-weight: 400;
  169 + font-size: 28upx;
  170 + color: #2b2a27;
  171 + line-height: 28upx;
  172 + text-align: left;
  173 + font-style: normal;
  174 + text + text {
  175 + margin-left: $padding-sm;
  176 + }
  177 + .amount {
  178 + color: #ff4f3b;
  179 + }
  180 + &--warning {
  181 + color: #f52723;
  182 + font-size: 20rpx;
  183 + margin-left: 20upx;
  184 + padding-left: 10upx;
  185 + padding-right: 10upx;
  186 + border-radius: 8upx;
  187 + border: 2rpx solid #f52723;
  188 + }
  189 + }
  190 + }
  191 +}
  192 +</style>
pages/payPlan/filter.vue 0 → 100644
@@ -0,0 +1,140 @@ @@ -0,0 +1,140 @@
  1 +<template>
  2 + <Page name="payPlan-filter" flank>
  3 + <template #content>
  4 + <u-form :model="searchForm" ref="uForm" labelWidth="100">
  5 + <view class="card">
  6 + <u-form-item label="订单号"><u-input v-model="searchForm.orderCode" placeholder="请输入" /></u-form-item>
  7 + </view>
  8 + <view class="card">
  9 + <u-form-item label="司机姓名"><u-input v-model="searchForm.driverName" placeholder="请输入" /></u-form-item>
  10 + </view>
  11 + <view class="card">
  12 + <u-form-item label="司机手机号"><u-input v-model="searchForm.driverMobile" placeholder="请输入" /></u-form-item>
  13 + </view>
  14 + <view class="card">
  15 + <u-form-item label="车牌号"><u-input v-model="searchForm.vehicleLicenseNum" placeholder="请输入" /></u-form-item>
  16 + </view>
  17 + <view class="card">
  18 + <u-form-item label="存在未处理异常" labelWidth="130">
  19 + <u-radio-group v-model="searchForm.unHandledExceptionFlag">
  20 + <u-radio v-for="(item, index) in radioList" :key="index" :name="item.value">
  21 + {{ item.text }}
  22 + </u-radio>
  23 + </u-radio-group>
  24 + </u-form-item>
  25 + </view>
  26 + </u-form>
  27 + </template>
  28 + <template #footer>
  29 + <view class="footer">
  30 + <view class="reset" @click="resetChange">重置</view>
  31 + <view class="inquiry" @click="inquiryChange">查询</view>
  32 + </view>
  33 + </template>
  34 + </Page>
  35 +</template>
  36 +
  37 +<script>
  38 +import { urlParam } from '@/utils/param';
  39 +export default {
  40 + name: 'payPlanFilter',
  41 + props: {
  42 + searchModel: {
  43 + type: Object,
  44 + default: () => {
  45 + return {};
  46 + },
  47 + },
  48 + },
  49 + data() {
  50 + return {
  51 + radioList: [
  52 + { text: '是', value: 'true' },
  53 + { text: '否', value: 'false' },
  54 + ],
  55 + searchForm: {
  56 + orderCode: '', // 订单号
  57 + driverName: '',
  58 + driverMobile: '', //
  59 + vehicleLicenseNum: '',
  60 + unHandledExceptionFlag: '', // 存在异常
  61 + },
  62 + };
  63 + },
  64 + onLoad(option) {
  65 + Object.keys(option).forEach(i => {
  66 + this.searchForm[i] = option[i];
  67 + });
  68 + },
  69 + methods: {
  70 + // 重置
  71 + resetChange() {
  72 + this.searchForm = {
  73 + orderCode: '', // 订单号
  74 + startCityCode: '',
  75 + startCityName: '',
  76 + endCityCode: '',
  77 + endCityName: '',
  78 + projectCode: '',
  79 + projectName: '',
  80 + feeType: '',
  81 + feeTypeName: '',
  82 + driverName: '',
  83 + driverMobile: '', //
  84 + vehicleLicenseNum: '',
  85 + unHandledExceptionFlag: '', // 存在异常
  86 + };
  87 + },
  88 + // 查询
  89 + inquiryChange() {
  90 + this.getOpenerEventChannel().emit('refreshData', this.searchForm);
  91 + setTimeout(() => uni.navigateBack(), 500);
  92 + },
  93 + },
  94 +};
  95 +</script>
  96 +
  97 +<style lang="scss">
  98 +.page-payPlan-filter {
  99 + &__content {
  100 + .card {
  101 + background-color: $color-white;
  102 + padding-left: $padding-xs;
  103 + padding-right: $padding-xs;
  104 + border-radius: $radius-md;
  105 + box-shadow: $shadow-normal;
  106 + margin-bottom: $padding-sm;
  107 + }
  108 + }
  109 + &__footer {
  110 + background: $color-white;
  111 + .footer {
  112 + display: flex;
  113 + justify-content: space-between;
  114 + .reset {
  115 + text-align: center;
  116 + width: 236upx;
  117 + height: 82upx;
  118 + line-height: 82upx;
  119 + margin-right: 20upx;
  120 + background: #dfebff;
  121 + border-radius: 14upx;
  122 + font-size: 30upx;
  123 + font-weight: 500;
  124 + color: $color-primary;
  125 + }
  126 + .inquiry {
  127 + text-align: center;
  128 + width: 450upx;
  129 + height: 82upx;
  130 + line-height: 82upx;
  131 + background: $color-primary;
  132 + border-radius: 14upx;
  133 + font-size: 30upx;
  134 + font-weight: 500;
  135 + color: #ffffff;
  136 + }
  137 + }
  138 + }
  139 +}
  140 +</style>
pages/payPlan/list.vue 0 → 100644
@@ -0,0 +1,551 @@ @@ -0,0 +1,551 @@
  1 +<template>
  2 + <Page name="settlement" flank>
  3 + <template #header>
  4 + <u-tabs :current="activeTab" :list="tabList" @click="onTabChange" :activeStyle="{ color: '#1E7B6B' }"> </u-tabs>
  5 + <view class="line"></view>
  6 + <view class="quick-tag">
  7 + <view class="quick-tag-group">
  8 + <view class="quick-tag-item" :class="searchForm.feeType ? 'active' : ''" @click="selectQuickTag({ key: 'feeType', value: searchForm.feeType })">
  9 + <text>{{ searchForm.feeTypeName || '款项类型' }}</text>
  10 + <view class="sx-img">
  11 + <image v-if="searchForm.feeType" class="sx-image" :src="formatImagePath('active-down')"></image>
  12 + <image v-else class="sx-image" :src="formatImagePath('down')"></image>
  13 + </view>
  14 + </view>
  15 + <view class="quick-tag-item" :class="searchForm.projectCode ? 'active' : ''" @click="selectQuickTag({ key: 'projectCode', value: searchForm.projectCode })">
  16 + <text>{{ searchForm.projectName || '所属项目' }}</text>
  17 + <view class="sx-img">
  18 + <image v-if="searchForm.projectCode" class="sx-image" :src="formatImagePath('active-down')"></image>
  19 + <image v-else class="sx-image" :src="formatImagePath('down')"></image>
  20 + </view>
  21 + </view>
  22 + <view class="quick-tag-item" :class="searchForm.startCityCode ? 'active' : ''" @click="selectQuickTag({ key: 'startCityCode', value: searchForm.startCityCode })">
  23 + <text>{{ searchForm.startCityName || '始发地' }}</text>
  24 + <view class="sx-img">
  25 + <image v-if="searchForm.startCityCode" class="sx-image" :src="formatImagePath('active-down')"></image>
  26 + <image v-else class="sx-image" :src="formatImagePath('down')"></image>
  27 + </view>
  28 + </view>
  29 + <view class="quick-tag-item" :class="searchForm.endCityCode ? 'active' : ''" @click="selectQuickTag({ key: 'endCityCode', value: searchForm.endCityCode })">
  30 + <text>{{ searchForm.endCityName || '目的地' }}</text>
  31 + <view class="sx-img">
  32 + <image v-if="searchForm.startCityCode" class="sx-image" :src="formatImagePath('active-down')"></image>
  33 + <image v-else class="sx-image" :src="formatImagePath('down')"></image>
  34 + </view>
  35 + </view>
  36 + </view>
  37 + <view class="quick-screen" @click="openFilter">
  38 + <image class="search-image" :src="formatImagePath('search')"></image>
  39 + </view>
  40 + </view>
  41 + </template>
  42 + <template #content>
  43 + <List ref="list" v-model="list" :api="orderAPI" @update:loading="e => (loading = e)" :verify="true">
  44 + <template v-for="(item, index) in list">
  45 + <card @payment="onePaymentPlanFun" @longClick="longClick" @chose="choseItemFun" :key="index" :item="item" :choseIds="selection" :choseMore="longClickFlag"></card>
  46 + </template>
  47 + <template #empty>
  48 + <Empty tips="暂无数据" />
  49 + </template>
  50 + </List>
  51 + </template>
  52 + <template v-if="longClickFlag">
  53 + <view class="foot-submit">
  54 + <view class="foot-but">
  55 + <view style="flex: 1">
  56 + <text style="color: #999999">已选中:</text>
  57 + <text class="color-red">{{ choseWaybillNum }}</text>
  58 + 个订单,
  59 + <text class="color-red">{{ selection.length }}</text>
  60 + 笔款项
  61 + </view>
  62 + <view class="but-view">
  63 + <u-button type="info" size="small" @click="toCancelChose">取消</u-button>
  64 + <u-button type="primary" size="small" @click="toPayUrl">去支付</u-button>
  65 + </view>
  66 + </view>
  67 + <u-safe-bottom></u-safe-bottom>
  68 + </view>
  69 + </template>
  70 + <u-popup :show="popShow" @close="closePopShow" @click="closePopShow" mode="center" :round="10" :safeAreaInsetBottom="false">
  71 + <view class="popup">
  72 + <view class="title">支付信息确认</view>
  73 + <view class="alert"><u-icon name="error-circle" size="12"> </u-icon>列表长按可以批量选择支付哦~ </view>
  74 + <view>
  75 + <view class="row"><view class="text">订单号:</view>{{ payPlanForm.detail[0].orderCode }}</view>
  76 + <view class="row"><view class="text">车牌号:</view>{{ payPlanForm.detail[0].vehicleLicenseNum }}</view>
  77 + <view class="row"><view class="text">收款人:</view>{{ payPlanForm.detail[0].recAccountName }}{{ payPlanForm.detail[0].recMobile }}</view>
  78 + <view class="row"><view class="text">运费:</view>{{ payPlanForm.detail[0].feeAmount }}元</view>
  79 + <view class="row"><view class="text">服务费:</view>{{ payPlanForm.detail[0].serviceAmount }}元</view>
  80 + <view class="row"><view class="text">总额:</view>{{ payPlanForm.detail[0].payAmount }}元</view>
  81 + </view>
  82 + <view class="but">
  83 + <u-button @tap="popShow = false">取消</u-button>
  84 + <u-button type="primary" @tap="(pwdStr = ''), (popShow = false), (pwdShow = true)">继续支付</u-button>
  85 + </view>
  86 + </view>
  87 + </u-popup>
  88 + <u-popup :show="pwdShow" mode="center" :round="10" :safeAreaInsetBottom="false">
  89 + <view class="popup">
  90 + <view class="title">输入密码</view>
  91 + <view class="row">
  92 + <u-input v-model="pwdStr" type="password" input-align="center" border="bottom" placeholder="请输入支付密码"></u-input>
  93 + </view>
  94 + <view class="but">
  95 + <u-button @tap="(pwdShow = false), (popShow = true)">取消</u-button>
  96 + <u-button type="primary" @tap="onSubmit">确定支付</u-button>
  97 + </view>
  98 + </view>
  99 + </u-popup>
  100 + <u-toast ref="uToast"></u-toast>
  101 + </Page>
  102 +</template>
  103 +<script>
  104 +import { urlParam } from '@/utils/param';
  105 +import card from './card.vue';
  106 +import UFormItem from '../../uni_modules/uview-ui/components/u-form-item/u-form-item.vue';
  107 +import page from '@/mixins/page';
  108 +export default {
  109 + name: 'payPlan',
  110 + components: { UFormItem, card },
  111 + data() {
  112 + return {
  113 + longClickFlag: false,
  114 + pwdStr: '',
  115 + pwdShow: false,
  116 + loading: false,
  117 + popShow: false,
  118 + payPlanForm: {
  119 + oilRate: '',
  120 + payCount: '',
  121 + serviceRate: '',
  122 + totalFeeAmount: '',
  123 + totalPayAmount: '',
  124 + totalServiceAmount: '',
  125 + detail: [
  126 + {
  127 + customerOrderCode: '',
  128 + driverMobile: '',
  129 + driverName: '',
  130 + feeAmount: '',
  131 + feeType: '',
  132 + orderCode: '',
  133 + payAmount: '',
  134 + payCode: '',
  135 + recAccountName: '',
  136 + recMobile: '',
  137 + serviceAmount: '',
  138 + vehicleLicenseNum: '',
  139 + },
  140 + ],
  141 + },
  142 + searchForm: {
  143 + payStatus: '', // 支付状态
  144 + feeType: '', // 费用类型
  145 + feeTypeName: '', // 费用类型
  146 + projectCode: '',
  147 + projectName: '',
  148 + startCityCode: '',
  149 + startCityName: '',
  150 + endCityCode: '',
  151 + endCityName: '',
  152 + orderCode: '', // 订单号
  153 + driverName: '',
  154 + driverMobile: '', //
  155 + vehicleLicenseNum: '',
  156 + unHandledExceptionFlag: '', // 存在异常
  157 + },
  158 + activeTab: 0,
  159 + count: {},
  160 + list: [],
  161 + selection: [],
  162 + };
  163 + },
  164 + onPullDownRefresh() {
  165 + this.onSearch();
  166 + },
  167 + computed: {
  168 + tabList() {
  169 + let res = [
  170 + { name: '未支付', value: 'NOT_PAY', key: 'notPayCount' },
  171 + { name: '支付中', value: 'PAYING', key: 'payingCount' },
  172 + { name: '支付失败', value: 'PAY_FAILED', key: 'payFailedCount' },
  173 + { name: '支付成功', value: 'PAY_SUCCESS', key: 'paySuccessCount' },
  174 + ];
  175 + return Object.keys(this.count).length > 0
  176 + ? res.map(item => {
  177 + return { ...item, name: `${item.name}(${this.count[item.key] || 0})`, disabled: this.loading };
  178 + })
  179 + : res;
  180 + },
  181 + choseWaybillNum() {
  182 + if (this.list.length === 0 || this.selection.length === 0) {
  183 + return 0;
  184 + } else {
  185 + let orderList = this.list.filter(i => this.selection.includes(i.id)).map(i2 => i2.orderCode);
  186 + return new Set(orderList).size;
  187 + }
  188 + },
  189 + },
  190 + methods: {
  191 + onTabChange({ index }) {
  192 + if (this.loading) {
  193 + return;
  194 + }
  195 + this.activeTab = index;
  196 + this.list = [];
  197 + this.selection = [];
  198 + this.longClickFlag = false;
  199 + this.onSearch();
  200 + },
  201 + orderAPI(params) {
  202 + let format = {
  203 + ...this.searchForm,
  204 + payStatus: this.tabList[this.activeTab].value,
  205 + };
  206 + this.getAggregateType(format);
  207 + return uni.$u.api.paymentPlan.page({
  208 + ...format,
  209 + ...params,
  210 + });
  211 + },
  212 + // 获取聚合数量
  213 + getAggregateType() {
  214 + uni.$u.api.paymentPlan.getCount({}).then(res => {
  215 + this.count = res?.result || {};
  216 + });
  217 + },
  218 + selectQuickTag({ key, value }) {
  219 + this.searchForm = Object.assign(this.searchForm, { [key]: value });
  220 + if (key == 'feeType') {
  221 + uni.$once('select-dict', option => {
  222 + this.searchForm.feeType = option.valueCode;
  223 + this.searchForm.feeTypeName = option.valueName;
  224 + this.onSearch();
  225 + });
  226 + uni.navigateTo({
  227 + url: `/pages/global/search-dict${urlParam({
  228 + title: '款项类型',
  229 + dict: 'ONLINE_FREIGHT_ORDER_FEE_TYPE',
  230 + })}`,
  231 + });
  232 + } else if (key == 'startCityCode') {
  233 + uni.$once('select-city', option => {
  234 + this.searchForm.startCityCode = option.code;
  235 + this.searchForm.startCityName = option.shortName;
  236 + this.onSearch();
  237 + });
  238 + uni.navigateTo({ url: '/pages/global/search-city' });
  239 + } else if (key == 'endCityCode') {
  240 + uni.$once('select-city', option => {
  241 + this.searchForm.endCityCode = option.code;
  242 + this.searchForm.endCityName = option.shortName;
  243 + this.onSearch();
  244 + });
  245 + uni.navigateTo({ url: '/pages/global/search-city' });
  246 + } else if (key == 'projectCode') {
  247 + uni.$once('select-common', option => {
  248 + this.searchForm.projectCode = option.code;
  249 + this.searchForm.projectName = option.name;
  250 + this.onSearch();
  251 + });
  252 + uni.navigateTo({
  253 + url: `/pages/global/search-common${urlParam({
  254 + mode: 'select',
  255 + url: 'projectCode',
  256 + title: '项目',
  257 + label: 'name',
  258 + value: '',
  259 + })}`,
  260 + });
  261 + }
  262 + },
  263 + // 筛选
  264 + openFilter() {
  265 + uni.navigateTo({
  266 + url: `/pages/payPlan/filter${urlParam(this.searchForm)}`,
  267 + events: {
  268 + refreshData: option => {
  269 + this.searchForm = { ...this.searchForm, ...option };
  270 + this.onSearch();
  271 + },
  272 + },
  273 + });
  274 + },
  275 + toCancelChose() {
  276 + this.selection = [];
  277 + this.longClickFlag = false;
  278 + },
  279 + choseItemFun(id) {
  280 + if (this.longClickFlag) {
  281 + if (this.selection.includes(id)) {
  282 + this.selection = this.selection.filter(i => i !== id);
  283 + } else {
  284 + this.selection.push(id);
  285 + }
  286 + }
  287 + },
  288 + longClick(item) {
  289 + if (['NOT_PAY', 'PAY_FAILED'].includes(item.payStatus)) {
  290 + this.selection = [item.id];
  291 + this.longClickFlag = true;
  292 + }
  293 + },
  294 + onePaymentPlanFun(id) {
  295 + uni.showLoading({ title: '加载中' });
  296 + this.selection = [id];
  297 + uni.$u.api.paymentPlan
  298 + .getApplyDetailByIds([id])
  299 + .then(res => {
  300 + uni.hideLoading();
  301 + this.payPlanForm = res.result || {};
  302 + this.popShow = true;
  303 + })
  304 + .catch(res => {
  305 + uni.hideLoading();
  306 + this.$refs.uToast.default(res);
  307 + });
  308 + },
  309 + onSubmit() {
  310 + if (this.loading) {
  311 + return;
  312 + }
  313 + if (!this.pwdStr) {
  314 + uni.showToast({ title: '支付密码不能为空' });
  315 + return;
  316 + }
  317 + this.loading = true;
  318 + uni.$u.api.paymentPlan
  319 + .checkPayPassword({ payPassword: this.pwdStr })
  320 + .then(res => {
  321 + uni.$u.api.paymentPlan
  322 + .pay(this.selection)
  323 + .then(res => {
  324 + this.loading = false;
  325 + this.pwdStr = '';
  326 + uni.showToast({ title: '提交成功' });
  327 + this.onSearch();
  328 + this.pwdShow = false;
  329 + this.popShow = false;
  330 + })
  331 + .catch(() => {
  332 + this.loading = false;
  333 + });
  334 + })
  335 + .catch(() => {
  336 + this.loading = false;
  337 + });
  338 + },
  339 + closePopShow() {
  340 + console.info('close');
  341 + this.popShow = false;
  342 + },
  343 + toPayUrl() {
  344 + uni.showLoading({ title: '加载中' });
  345 + let selection = this.selection;
  346 + uni.$u.api.paymentPlan
  347 + .getApplyDetailByIds(this.selection)
  348 + .then(resp => {
  349 + uni.navigateTo({
  350 + url: '/pages/payPlan/paySubmit',
  351 + events: {
  352 + refreshData: () => {
  353 + this.selection = [];
  354 + this.longClickFlag = false;
  355 + this.onSearch();
  356 + },
  357 + },
  358 + success(res) {
  359 + res.eventChannel.emit('payPlanDate', { form: resp.result, selection });
  360 + },
  361 + });
  362 + })
  363 + .catch(res => {
  364 + this.$refs.uToast.default(res);
  365 + })
  366 + .finally(() => {
  367 + uni.hideLoading();
  368 + });
  369 + },
  370 + },
  371 +};
  372 +</script>
  373 +<style lang="scss">
  374 +.page-settlement {
  375 + &__header {
  376 + padding: 0 !important;
  377 +
  378 + .line {
  379 + height: 1rpx;
  380 + background: #f6f6f6;
  381 + position: relative;
  382 + top: -5rpx;
  383 + }
  384 +
  385 + .quick-tag {
  386 + display: flex;
  387 + padding: 15upx 22upx;
  388 + box-sizing: border-box;
  389 + position: relative;
  390 +
  391 + .quick-cover {
  392 + width: 25upx;
  393 + height: 90upx;
  394 + position: absolute;
  395 + right: 122upx;
  396 + top: 0;
  397 +
  398 + .cover-image {
  399 + width: 100%;
  400 + height: 100%;
  401 + }
  402 + }
  403 +
  404 + .quick-screen {
  405 + width: 100upx;
  406 + display: flex;
  407 + align-items: center;
  408 + justify-content: center;
  409 +
  410 + .search-image {
  411 + width: 42upx;
  412 + height: 42upx;
  413 + }
  414 + }
  415 +
  416 + .quick-tag-group {
  417 + flex: 1;
  418 + display: flex;
  419 + align-items: center;
  420 + background-color: #fff;
  421 + padding-left: $padding-xs !important;
  422 + padding-right: $padding-xs !important;
  423 + overflow-y: auto;
  424 +
  425 + .quick-tag-item {
  426 + flex-shrink: 0;
  427 + min-width: 158upx;
  428 + height: 58upx;
  429 + background: #f6f6f6;
  430 + border-radius: 8upx;
  431 + font-size: 28upx;
  432 + font-weight: 400;
  433 + color: #2b2a27;
  434 + display: flex;
  435 + align-items: center;
  436 + justify-content: center;
  437 + padding: 0 10upx;
  438 + box-sizing: border-box;
  439 +
  440 + &:not(:last-child) {
  441 + margin-right: 18upx;
  442 + }
  443 +
  444 + &.active {
  445 + background: #ffffff;
  446 + border-radius: 8upx;
  447 + border: 2upx solid #2673fb;
  448 + font-size: 28upx;
  449 + font-family:
  450 + PingFangSC,
  451 + PingFang SC;
  452 + font-weight: 400;
  453 + color: #2673fb;
  454 + }
  455 +
  456 + .sx-img {
  457 + height: 12upx;
  458 + width: 14upx;
  459 + position: relative;
  460 + margin-left: 12upx;
  461 +
  462 + .sx-image {
  463 + width: 100%;
  464 + height: 100%;
  465 + position: absolute;
  466 + top: 0;
  467 + left: 0;
  468 + }
  469 + }
  470 + }
  471 +
  472 + .z-dropdown__text .text {
  473 + word-break: keep-all;
  474 + }
  475 + }
  476 + }
  477 + }
  478 + .add-order {
  479 + right: 34upx;
  480 + bottom: 34upx;
  481 + height: 106upx;
  482 + width: 106upx;
  483 + position: fixed;
  484 + .sx-image {
  485 + width: 100%;
  486 + height: 100%;
  487 + position: absolute;
  488 + top: 0;
  489 + left: 0;
  490 + }
  491 + }
  492 + .popup {
  493 + padding-left: $padding-md;
  494 + padding-right: $padding-md;
  495 + padding-bottom: $padding-lg;
  496 + width: 70vw;
  497 + z-index: 100;
  498 + .title {
  499 + padding-top: $padding-xs;
  500 + padding-bottom: $padding-xs;
  501 + display: flex;
  502 + align-content: center;
  503 + justify-content: center;
  504 + font-weight: 400;
  505 + font-size: 32rpx;
  506 + color: #2b2a27;
  507 + line-height: 45px;
  508 + text-align: left;
  509 + font-style: normal;
  510 + }
  511 + .alert {
  512 + color: orange;
  513 + font-size: 24rpx;
  514 + display: flex;
  515 + padding-bottom: 20rpx;
  516 + }
  517 + .row {
  518 + display: flex;
  519 + padding: 10upx 0;
  520 + .text {
  521 + width: 130rpx;
  522 + }
  523 + }
  524 + .but {
  525 + margin-top: $padding-md;
  526 + display: flex;
  527 + gap: 20px;
  528 + }
  529 + }
  530 + &__content {
  531 + padding-bottom: 100px !important;
  532 + }
  533 + .foot-submit {
  534 + position: fixed;
  535 + width: 100vw;
  536 + bottom: 0;
  537 + background: white;
  538 + .foot-but {
  539 + display: flex;
  540 + align-items: center;
  541 + justify-content: space-between;
  542 + padding: 10px;
  543 + .but-view {
  544 + display: flex;
  545 + gap: 10px;
  546 + max-width: 210px;
  547 + }
  548 + }
  549 + }
  550 +}
  551 +</style>
pages/payPlan/paySubmit.vue 0 → 100644
@@ -0,0 +1,240 @@ @@ -0,0 +1,240 @@
  1 +<template>
  2 + <Page name="paySubmit" flank>
  3 + <template #header>
  4 + <view class="row">
  5 + <view class="label">支付数量:</view>
  6 + <view>合计运费:{{ form.totalFeeAmount }},合计服务费:{{ form.totalServiceAmount }},支付总额:{{ form.totalPayAmount }}</view>
  7 + </view>
  8 + <view class="row" style="justify-content: space-between; color: #999999">
  9 + <view>服务费率:{{ form.serviceRate }}</view>
  10 + <view>油卡返点率:{{ form.oilRate }}</view>
  11 + </view>
  12 + </template>
  13 + <template #content>
  14 + <view class="card" v-for="(item, key) in form.detail" :key="key">
  15 + <view class="item">
  16 + <view class="label"><render-dict dict="ONLINE_FREIGHT_ORDER_FEE_TYPE" :value="item.feeType"></render-dict></view>
  17 + <view class="content"
  18 + ><text class="amount">¥{{ item.feeAmount }}</text></view
  19 + >
  20 + </view>
  21 + <view class="item">
  22 + <view class="label">服务费</view>
  23 + <view class="content"
  24 + ><text class="amount">¥{{ item.serviceAmount }}</text></view
  25 + >
  26 + </view>
  27 + <view class="item">
  28 + <view class="label">支付总额</view>
  29 + <view class="content"
  30 + ><text class="amount">¥{{ item.payAmount }}</text></view
  31 + >
  32 + </view>
  33 + <view class="item">
  34 + <view class="label">承运司机</view>
  35 + <view class="content">{{ item.driverName }}{{ item.driverMobile }}</view>
  36 + </view>
  37 + <view class="item">
  38 + <view class="label">收款人</view>
  39 + <view class="content">{{ item.recAccountName }}{{ item.recMobile }}</view>
  40 + </view>
  41 + <view class="item">
  42 + <view class="label">承运车辆</view>
  43 + <view class="content">{{ item.vehicleLicenseNum }}</view>
  44 + </view>
  45 + <view class="item">
  46 + <view class="label">订单号</view>
  47 + <view class="content" style="color: #0066ff">{{ item.orderCode }}</view>
  48 + </view>
  49 + </view>
  50 + </template>
  51 + <template #footer>
  52 + <u-button :loading="loading" type="primary" @tap="(pwdStr = ''), (pwdShow = true)">继续支付</u-button>
  53 + </template>
  54 + <u-popup :show="pwdShow" :closeable="false" mode="center" :round="10" :safeAreaInsetBottom="false">
  55 + <view class="popup">
  56 + <view class="title">输入密码</view>
  57 + <view class="row">
  58 + <u-input v-model="pwdStr" type="password" input-align="center" border="bottom" placeholder="请输入支付密码"></u-input>
  59 + </view>
  60 + <view class="but">
  61 + <u-button @tap="pwdShow = false">取消</u-button>
  62 + <u-button :loading="loading" type="primary" @tap="onSubmit">确定支付</u-button>
  63 + </view>
  64 + </view>
  65 + </u-popup>
  66 + </Page>
  67 +</template>
  68 +<script>
  69 +export default {
  70 + name: 'paySubmit',
  71 + data() {
  72 + return {
  73 + loading: false,
  74 + pwdShow: false,
  75 + pwdStr: '',
  76 + selection: [],
  77 + form: {
  78 + oilRate: '',
  79 + payCount: '',
  80 + serviceRate: '',
  81 + totalFeeAmount: '',
  82 + totalPayAmount: '',
  83 + totalServiceAmount: '',
  84 + detail: [
  85 + {
  86 + customerOrderCode: '',
  87 + driverMobile: '',
  88 + driverName: '',
  89 + feeAmount: '',
  90 + feeType: '',
  91 + orderCode: '',
  92 + payAmount: '',
  93 + payCode: '',
  94 + recAccountName: '',
  95 + recMobile: '',
  96 + serviceAmount: '',
  97 + vehicleLicenseNum: '',
  98 + },
  99 + ],
  100 + },
  101 + };
  102 + },
  103 + onLoad() {
  104 + const eventChannel = this.getOpenerEventChannel();
  105 + eventChannel.on('payPlanDate', data => {
  106 + this.form = data.form || {};
  107 + this.selection = data.selection || [];
  108 + });
  109 + },
  110 + methods: {
  111 + onSubmit() {
  112 + if (this.loading) {
  113 + return;
  114 + }
  115 + if (!this.pwdStr) {
  116 + uni.showToast({ title: '支付密码不能为空' });
  117 + return;
  118 + }
  119 + this.loading = true;
  120 + uni.$u.api.paymentPlan
  121 + .checkPayPassword({ payPassword: this.pwdStr })
  122 + .then(res => {
  123 + uni.$u.api.paymentPlan
  124 + .pay(this.selection)
  125 + .then(res => {
  126 + this.pwdShow = false;
  127 + uni.showToast({ title: '提交成功' });
  128 + this.getOpenerEventChannel().emit('refreshData');
  129 + setTimeout(() => uni.navigateBack(), 500);
  130 + })
  131 + .catch(() => {
  132 + this.loading = false;
  133 + });
  134 + })
  135 + .catch(() => {
  136 + this.loading = false;
  137 + });
  138 + },
  139 + },
  140 +};
  141 +</script>
  142 +<style lang="scss">
  143 +.page-paySubmit {
  144 + &__header {
  145 + padding: 0 !important;
  146 + .row {
  147 + margin: 10px;
  148 + display: flex;
  149 + .label {
  150 + width: 180rpx;
  151 + }
  152 + }
  153 + }
  154 + &__content {
  155 + .card {
  156 + background-color: $color-white;
  157 + color: $color-text;
  158 + padding: $padding-base $padding-sm;
  159 + margin-bottom: $padding-sm;
  160 + border-radius: $radius-md;
  161 + box-shadow: $shadow-normal;
  162 + font-size: $font-md;
  163 + .item {
  164 + margin: $padding-sm 0;
  165 + display: flex;
  166 + justify-content: space-between;
  167 + .label {
  168 + width: 170upx;
  169 + font-weight: 400;
  170 + font-size: 28upx;
  171 + color: #999999;
  172 + line-height: 28upx;
  173 + text-align: left;
  174 + font-style: normal;
  175 + }
  176 + .content {
  177 + font-weight: 400;
  178 + font-size: 28upx;
  179 + color: #2b2a27;
  180 + line-height: 28upx;
  181 + text-align: right;
  182 + font-style: normal;
  183 + .amount {
  184 + color: #ff4f3b;
  185 + }
  186 + &--warning {
  187 + color: #f52723;
  188 + font-size: 20rpx;
  189 + margin-left: 20upx;
  190 + padding-left: 10upx;
  191 + padding-right: 10upx;
  192 + border-radius: 8upx;
  193 + border: 2rpx solid #f52723;
  194 + }
  195 + }
  196 + }
  197 + }
  198 + }
  199 + &__footer {
  200 + background-color: $color-white;
  201 + }
  202 + .popup {
  203 + padding-left: $padding-md;
  204 + padding-right: $padding-md;
  205 + padding-bottom: $padding-lg;
  206 + width: 70vw;
  207 + .title {
  208 + padding-top: $padding-xs;
  209 + padding-bottom: $padding-xs;
  210 + display: flex;
  211 + align-content: center;
  212 + justify-content: center;
  213 + font-weight: 400;
  214 + font-size: 32rpx;
  215 + color: #2b2a27;
  216 + line-height: 45px;
  217 + text-align: left;
  218 + font-style: normal;
  219 + }
  220 + .alert {
  221 + color: orange;
  222 + font-size: 24rpx;
  223 + display: flex;
  224 + padding-bottom: 20rpx;
  225 + }
  226 + .row {
  227 + display: flex;
  228 + padding: 10upx 0;
  229 + .text {
  230 + width: 130rpx;
  231 + }
  232 + }
  233 + .but {
  234 + margin-top: $padding-md;
  235 + display: flex;
  236 + gap: 20px;
  237 + }
  238 + }
  239 +}
  240 +</style>