|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179 |
- <template>
- <view class="content-value">
- <view class="t-card">
- <view v-for="(item, index) in state.dataArray" @click="confirmPay(item)" class="ul-item" :key="index">
- <image style="width: 100%; height: 146rpx;" :src="`${$imgUrl}issuance/equity-bg.png`"
- mode='scaleToFill'>
- </image>
- <view class="item-value">
- <view class="money">
- <text class='unit'>¥</text>
- <text>{{ item.fee * 0.01 }}</text>
- </view>
- <view class="content">
- <view class="title">
- {{ item.payName }}
- </view>
- </view>
- <view class="r-btn">
- {{ item.payStatusName }}
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
-
- <script setup lang="ts">
- import { reactive, ref, computed } from "vue";
- import { onLoad } from "@dcloudio/uni-app";
- import { breachContractPaySearch, deviceLogOutStateQuery, afterSalesPayApply, confirmBreachContract } from '@/utils/network/api.js'
- import { requestNew } from "@/utils/network/request.js";
- import { number } from "echarts";
- import { confirm } from '@/utils/utils'
- import { logOffOver } from './js/log-off.js'
- import { deviceStore } from '@/stores/device.js'
- import { getAfterSalesPayQuery, PayQuery, afterSalesPayApplyPro } from '@/datas/afterSalesPay'
-
- const deviceStores = deviceStore()
- const state = reactive({
- orderNo: '',
- vehicleId: '',
- dataArray: [],
- isConnectDevice: false, // 是否连接设备
- deviceLogOutState: {
- cancelAgeLimit: 0, // 注销年限
- cancelAmount: 0, // 注销违约金 单位:分
- isBlack: false, // 是否存在黑名单
- isCancel: false, // 是否需要支付违约金
- productName: "" // 产品名称
- },
- flag: true,
- isclick: true,
- payOK: false
- })
-
- onLoad(({orderNo, vehicleId, isConnectDevice}) => {
- if (orderNo) {
- state.orderNo = orderNo
- state.vehicleId = decodeURIComponent(vehicleId)
- state.isConnectDevice = isConnectDevice === '1'
- getAfterSalesPayQueryHandle()
- }
- })
-
- const confirmPay = (val) => {
- if (state.isclick) {
- if (val.payStatus == "SUCCESS") {
- return;
- }
- state.isclick = false
- payMethods(val)
-
- }
- }
-
- // 支付
- const payMethods = (val) => {
- afterSalesPayApplyPro(val).then(() => {
- state.payOK = true
- getAfterSalesPayQueryHandle()
- }).catch(() => {
- state.isclick = true
- })
- }
-
- // 支付信息查询
- const getAfterSalesPayQueryHandle = () => {
- getAfterSalesPayQuery(state.orderNo).then((res: PayQuery) => {
- if (res.paymentStatus === 1) {
- // uni.navigateTo({
- // url: `/subpackage/after-sale/sign-info-change/sign?orderNo=${state.orderNo}`
- // })
- // uni.showToast({
- // title: ''
- // })
- if (state.isConnectDevice) { // 如果可以连接设备
- uni.navigateTo({
- url: `/pages/bluetooth/bluetooth?routeType=13&vehicleId=${state.vehicleId}`
- })
- } else {
- logOffOver()
- }
- }
- state.dataArray = res.datas
- })
- }
-
- const confirmLogOut = () => {
-
- }
- </script>
-
- <style lang="scss" scoped>
- .content-value{
- padding: 32rpx;
- }
- .ul-item {
- display: flex;
- align-items: center;
-
- &:nth-child(n+2) {
- margin-top: 30rpx;
- }
-
- .item-value {
- padding: 20rpx;
- position: absolute;
- display: flex;
- align-items: center;
- box-sizing: border-box;
- height: 146rpx;
- left: 50rpx;
- right: 50rpx;
- .money {
- color: #fff;
- font-size: 46rpx;
- font-family: SourceHanSansCN, SourceHanSansCN;
- font-weight: 400;
- flex: 1;
-
- .unit {
- font-size: 29rpx;
- margin-right: 2rpx;
- }
- }
-
- .content {
- margin-left: 60rpx;
- flex: 2;
-
- .title {
- font-weight: 400;
- font-family: SourceHanSansCN, SourceHanSansCN;
- font-size: 36rpx;
- color: #2C3246;
- }
- }
-
- .r-btn {
- width: 139rpx;
- height: 65rpx;
- background: radial-gradient(at 0% 0%, #C6B077 0%, #DFCC96 100%);
- border-radius: 33rpx;
- font-family: SourceHanSansCN, SourceHanSansCN;
- font-weight: 400;
- font-size: 26rpx;
- color: #FFFFFF;
- line-height: 65rpx;
- text-align: center;
- flex: 1;
- }
- }
-
- .icon-tip {
- width: 100rpx;
- height: 100rpx;
- }
- }
- </style>
|