261024
This commit is contained in:
@@ -49,24 +49,6 @@
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<!-- 排版样式备份 -->
|
||||
<view class="period-item" style="display: none;">
|
||||
<view class="period">18:00 - 20:00</view>
|
||||
<view class="field-list">
|
||||
<view class="field web-bg-info">
|
||||
<text class="field-name">1号场地</text>
|
||||
<text class="price">580元</text>
|
||||
</view>
|
||||
<view class="field web-bg-success active">
|
||||
<text class="field-name">2号场地</text>
|
||||
<text class="price">580元</text>
|
||||
</view>
|
||||
<view class="field web-bg-warning">
|
||||
<text class="field-name">3号场地</text>
|
||||
<text class="price">580元</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 支付按钮 -->
|
||||
<uv-gap height="50"></uv-gap>
|
||||
@@ -169,6 +151,7 @@ export default {
|
||||
where: {},
|
||||
// 时段
|
||||
periodList: [],
|
||||
periodListOrigin: [],
|
||||
// 场地
|
||||
fieldList: [],
|
||||
// 选中的场地
|
||||
@@ -199,9 +182,10 @@ export default {
|
||||
const app = this
|
||||
let totalPrice = 0;
|
||||
app.selection.map(d => {
|
||||
if (app.isHalf === 1) totalPrice += d.halfPrice
|
||||
else totalPrice += d.price
|
||||
if (app.isHalf === 1) totalPrice += parseFloat(d.halfPrice)
|
||||
else totalPrice += parseFloat(d.price)
|
||||
})
|
||||
totalPrice = totalPrice.toFixed(2)
|
||||
carStore.totalPrice = totalPrice
|
||||
// console.log('totalPrice: ', totalPrice);
|
||||
return totalPrice;
|
||||
@@ -264,6 +248,7 @@ export default {
|
||||
this.next7day = []
|
||||
let day = 7
|
||||
if (this.merchantId === 37) day = 1
|
||||
// else if (this.merchantId === 28) day = 30
|
||||
for (let i = 0; i < day; i++) {
|
||||
const day = dayjs().add(i, 'day')
|
||||
this.next7day.push({
|
||||
@@ -293,18 +278,26 @@ export default {
|
||||
const weekList = JSON.parse(item.week)
|
||||
if (parseInt(this.merchantId) === 37) {
|
||||
const today = dayjs().format('YYYY-MM-DD')
|
||||
if ((dayjs().isBefore(dayjs(today + ' 21:00:00')) || dayjs(this.dateTime).isAfter(dayjs())) && weekList.includes(this.week)) this.periodList.push(item)
|
||||
if ((dayjs().isBefore(dayjs(today + ' 21:30:00')) || dayjs(this.dateTime).isAfter(dayjs())) && weekList.includes(this.week)) this.periodList.push(item)
|
||||
} else {
|
||||
// console.log(this.dateTime + ' ' + item.timePeriod.split(' - ')[0])
|
||||
// console.log(dayjs().isBefore(dayjs(this.dateTime + ' ' + item.timePeriod.split(' - ')[0])))
|
||||
if (weekList.includes(this.week) && dayjs().isBefore(dayjs(this.dateTime + ' ' + item.timePeriod.split(' - ')[0]))) this.periodList.push(item)
|
||||
}
|
||||
})
|
||||
const month = dayjs().format('YYYY-MM')
|
||||
this.periodList.map(item => {
|
||||
console.log('this.periodList', this.periodList)
|
||||
// console.log(this.dateTime)
|
||||
const month = dayjs(this.dateTime).format('YYYY-MM')
|
||||
this.periodListOrigin = JSON.parse(JSON.stringify(this.periodList))
|
||||
this.periodList.map((item, index) => {
|
||||
item.price = item.priceOrigin
|
||||
item.halfPrice = item.halfPriceOrigin
|
||||
if (item.prices && item.prices.includes('{')) {
|
||||
const dataList = JSON.parse(item.prices)[month]
|
||||
console.log(JSON.parse(item.prices), month)
|
||||
if (dataList) {
|
||||
console.log(dayjs(this.dateTime).format('D'))
|
||||
console.log(dataList[dayjs(this.dateTime).format('D') - 1])
|
||||
const price = dataList[dayjs(this.dateTime).format('D') - 1]
|
||||
if (price && price !== '') {
|
||||
item.price = price
|
||||
@@ -320,9 +313,10 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// console.log('item', item)
|
||||
return item
|
||||
})
|
||||
console.log('this.timeListOrigin', this.timeListOrigin)
|
||||
},
|
||||
onDisabled() {
|
||||
this.disabled = !this.disabled;
|
||||
@@ -469,7 +463,8 @@ export default {
|
||||
orderCode: key,
|
||||
siteTimeId: siteTime.id,
|
||||
dateTime: `${this.dateTime}`,
|
||||
comments: `${this.dateTime}(${getWeek(week)})${item.timePeriod}`,
|
||||
// comments: `${this.dateTime}(${getWeek(week)})${item.timePeriod}`,
|
||||
comments: `${this.dateTime} ${item.timePeriod}`,
|
||||
week
|
||||
})
|
||||
console.log(app.selection);
|
||||
|
||||
@@ -80,6 +80,18 @@
|
||||
</template>
|
||||
</uv-cell>
|
||||
</block>
|
||||
<uv-cell
|
||||
:title="balancePayTitle"
|
||||
icon="https://oss.wsdns.cn/20240511/fae57a94fa0042b9bceb721421304db1.png?x-oss-process=image/resize,m_fixed,w_100,h_100/quality,Q_90"
|
||||
:cellStyle="{ padding: '20rpx 10rpx', borderRadius: '8rpx', backgroundColor: 19 === form.payType ? '#f6fff1' : '', opacity: canUseBalancePay ? 1 : 0.45 }"
|
||||
:border="false"
|
||||
@click="onPayType(19)"
|
||||
>
|
||||
<template v-slot:right-icon>
|
||||
<text v-if="!canUseBalancePay" class="balance-tip">余额不足</text>
|
||||
<uv-icon v-else-if="19 === form.payType" size="30rpx" name="checkbox-mark"></uv-icon>
|
||||
</template>
|
||||
</uv-cell>
|
||||
</uv-cell-group>
|
||||
<view slot="actions" class="card-actions">
|
||||
<view class="card-actions-item">
|
||||
@@ -182,10 +194,11 @@ import {checkPayPassword} from '@/api/passport/login';
|
||||
import {getWeek, getKey} from '@/utils/common';
|
||||
import {useUserStore} from '@/store/modules/user';
|
||||
import dayjs from "dayjs";
|
||||
import {addThinkOrder} from "@/api/think/thinkOrder";
|
||||
import {addThinkOrder, updateThinkOrder} from "@/api/think/thinkOrder";
|
||||
import {listUserThinkCard} from "@/api/think/thinkCard";
|
||||
import {listThinkUsersVip} from "@/api/think/thinkUsersVip";
|
||||
import {number} from "@/uni_modules/uv-ui-tools/libs/function/test";
|
||||
import md5 from 'md5'
|
||||
|
||||
const userStore = useUserStore();
|
||||
// const carStore = useCarStore();
|
||||
@@ -195,6 +208,15 @@ export default {
|
||||
computed: {
|
||||
dayjs() {
|
||||
return dayjs
|
||||
},
|
||||
currentBalance() {
|
||||
return Number(this.userInfo?.balance || this.userInfo?.money || 0);
|
||||
},
|
||||
canUseBalancePay() {
|
||||
return this.currentBalance >= Number(this.payPrice || 0);
|
||||
},
|
||||
balancePayTitle() {
|
||||
return `余额支付(当前余额¥${this.currentBalance.toFixed(2)})`;
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -558,6 +580,13 @@ export default {
|
||||
},
|
||||
// 切换支付方式
|
||||
async onPayType(index) {
|
||||
if (index === 19 && !this.canUseBalancePay) {
|
||||
uni.showToast({
|
||||
title: '当前余额不足',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
// app.payType = index;
|
||||
this.form.payType = index;
|
||||
console.log(this.form.payType)
|
||||
@@ -643,10 +672,6 @@ export default {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (form.payType === 0 && !this.isPayPasswordCorrect) {
|
||||
app.$refs.payPasswordForm.open('center');
|
||||
return false;
|
||||
}
|
||||
uni.showLoading({
|
||||
title: '订单提交中.'
|
||||
});
|
||||
@@ -663,13 +688,15 @@ export default {
|
||||
}
|
||||
return item
|
||||
})
|
||||
const postTime = dayjs().valueOf()
|
||||
form.postTime = postTime
|
||||
form.sign = md5(postTime + "wxd38cc38c54fa7370" + form.startTime + this.userInfo.uid)
|
||||
addThinkOrder(form)
|
||||
.then((data) => {
|
||||
const orderInfo = data;
|
||||
console.log(data)
|
||||
// 调起微信支付
|
||||
if (form.payType === 1) {
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.requestPayment({
|
||||
provider: orderInfo.provider, // 服务提供商
|
||||
timeStamp: orderInfo.timeStamp, // 时间戳
|
||||
@@ -683,34 +710,30 @@ export default {
|
||||
title: '支付成功',
|
||||
icon: 'success'
|
||||
});
|
||||
setTimeout(function () {
|
||||
setTimeout(() => {
|
||||
app.disabled = false;
|
||||
// uni.reLaunch({
|
||||
// url: '/pages/order/order',
|
||||
// success: function (e) {
|
||||
// var page = getCurrentPages()[0];
|
||||
// if (page == undefined || page == null) return;
|
||||
// page.onLoad();
|
||||
// }
|
||||
// });
|
||||
uni.switchTab({url: '/pages/order'})
|
||||
}, 1500);
|
||||
},
|
||||
fail: function (err) {
|
||||
fail: async (err) => {
|
||||
uni.showToast({
|
||||
title: '取消支付',
|
||||
icon: 'error'
|
||||
});
|
||||
await updateThinkOrder({
|
||||
id: orderInfo.orderId,
|
||||
orderStatus: 3
|
||||
})
|
||||
console.log('支付失败', err);
|
||||
app.disabled = false;
|
||||
uni.switchTab({
|
||||
url: '/pages/order'
|
||||
});
|
||||
// uni.switchTab({
|
||||
// url: '/pages/order/order'
|
||||
// })
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
}
|
||||
// 使用余额支付
|
||||
if (form.payType === 0) {
|
||||
if (form.payType === 19) {
|
||||
if (!orderInfo) {
|
||||
return uni.showToast({
|
||||
title: '支付失败',
|
||||
@@ -724,7 +747,6 @@ export default {
|
||||
});
|
||||
setTimeout(function () {
|
||||
app.disabled = false;
|
||||
app.$refs.payPasswordForm.close();
|
||||
uni.switchTab({url: '/pages/order'})
|
||||
}, 1500);
|
||||
}
|
||||
@@ -757,6 +779,11 @@ export default {
|
||||
title: res.message || '请检查您的网络.',
|
||||
icon: 'none'
|
||||
});
|
||||
if (res.message === '未绑定人脸') {
|
||||
setTimeout(() => {
|
||||
uni.switchTab({url: '/pages/user'})
|
||||
}, 1500)
|
||||
}
|
||||
});
|
||||
},
|
||||
selectVipCard(card) {
|
||||
@@ -807,6 +834,11 @@ page {
|
||||
.container {
|
||||
}
|
||||
|
||||
.balance-tip {
|
||||
font-size: 24rpx;
|
||||
color: #fa3534;
|
||||
}
|
||||
|
||||
.checkout-car {
|
||||
width: 700rpx;
|
||||
left: 25rpx;
|
||||
|
||||
@@ -14,15 +14,18 @@
|
||||
<text class="web-text-success"></text>
|
||||
</template> -->
|
||||
</uv-cell>
|
||||
<uv-cell title="场馆地址" :label="merchant.address" :cellStyle="{padding: '10px 5px'}">
|
||||
</uv-cell>
|
||||
<uv-cell title="场馆位置" v-if="merchant"
|
||||
:label="`距离【${merchant.name}】${merchant.distance}公里·约${merchant.duration}分钟`" isLink
|
||||
:cellStyle="{padding: '10px 5px'}" @click="mapTo(merchant)">
|
||||
<uv-cell title="场馆地址" :label="merchant.address" :cellStyle="{padding: '10px 5px'}" @click="mapTo(merchant)">
|
||||
<template v-slot:right-icon>
|
||||
<uv-icon size="50rpx" name="map-fill" color="#5ac725" style="color: #ff0000;"></uv-icon>
|
||||
</template>
|
||||
</uv-cell>
|
||||
<!-- <uv-cell title="场馆位置" v-if="merchant"-->
|
||||
<!-- :label="`距离【${merchant.name}】${merchant.distance}公里·约${merchant.duration}分钟`" isLink-->
|
||||
<!-- :cellStyle="{padding: '10px 5px'}" @click="mapTo(merchant)">-->
|
||||
<!-- <template v-slot:right-icon>-->
|
||||
<!-- <uv-icon size="50rpx" name="map-fill" color="#5ac725" style="color: #ff0000;"></uv-icon>-->
|
||||
<!-- </template>-->
|
||||
<!-- </uv-cell>-->
|
||||
<uv-cell title="服务前台电话" :label="merchant.tel" :border="false" :cellStyle="{padding: '10px 5px'}"
|
||||
@click="callPhone(merchant.phone)">
|
||||
|
||||
@@ -108,6 +111,7 @@ import X2js from 'x2js';
|
||||
import {getArticle, pageArticle} from "@/api/cms/article";
|
||||
import coordtransform from "coordtransform";
|
||||
import dayjs from "dayjs";
|
||||
import {thinkOrderSetInterval} from "@/api/think/thinkOrder";
|
||||
|
||||
const carStore = useCarStore();
|
||||
|
||||
@@ -131,9 +135,9 @@ export default {
|
||||
async onLoad(option) {
|
||||
this.id = option.id
|
||||
carStore.merchantId = option.id
|
||||
const {longitude, latitude} = await getLocationAction()
|
||||
this.lat = latitude
|
||||
this.lng = longitude
|
||||
// const {longitude, latitude} = await getLocationAction()
|
||||
// this.lat = latitude
|
||||
// this.lng = longitude
|
||||
await this.getProtocol()
|
||||
await this.reload();
|
||||
},
|
||||
@@ -152,13 +156,16 @@ export default {
|
||||
}
|
||||
},
|
||||
openProtocol() {
|
||||
const hour = dayjs().format('H')
|
||||
if (hour < 8 || hour === 23) {
|
||||
return uni.showModal({
|
||||
showCancel: false,
|
||||
title: '场地预定时间为:8:00-23:00。',
|
||||
})
|
||||
if (!this.isLogin) {
|
||||
return this.$refs.login.open('bottom');
|
||||
}
|
||||
const hour = dayjs().format('H')
|
||||
// if (parseInt(hour) < 8 || parseInt(hour) === 23) {
|
||||
// return uni.showModal({
|
||||
// showCancel: false,
|
||||
// title: '场地预定时间为:8:00-23:00。',
|
||||
// })
|
||||
// }
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer)
|
||||
this.timer = null
|
||||
@@ -201,7 +208,7 @@ export default {
|
||||
carStore.merchantId = merchant.merchantId
|
||||
carStore.merchantName = merchant.merchantName
|
||||
carStore.merchantCode = merchant.merchantCode
|
||||
this.getDuration()
|
||||
// this.getDuration()
|
||||
})
|
||||
},
|
||||
async getDuration() {
|
||||
@@ -269,7 +276,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
save() {
|
||||
async save() {
|
||||
// if (!this.disabled) {
|
||||
// uni.showToast({
|
||||
// title: '请先阅读并同意订票协议',
|
||||
@@ -278,6 +285,7 @@ export default {
|
||||
// return false
|
||||
// }
|
||||
if (this.timer) clearTimeout(this.timer)
|
||||
await thinkOrderSetInterval()
|
||||
this.$refs.protocolPopup.close()
|
||||
uni.navigateTo({
|
||||
url: '/package/booking/checkout?id=' + this.id
|
||||
@@ -323,7 +331,7 @@ page {
|
||||
.booking-tel {
|
||||
position: fixed;
|
||||
z-index: 1;
|
||||
top: 270px;
|
||||
top: 270rpx;
|
||||
right: 0;
|
||||
width: 80px;
|
||||
height: 38px;
|
||||
|
||||
+61
-102
@@ -5,43 +5,49 @@
|
||||
inActiveColor="#808080" @clickItem="onClickItem"/>
|
||||
</view>
|
||||
<view class="card-list">
|
||||
<block v-for="(group, groupIndex) in cardList" :key="groupIndex">
|
||||
<view class="flex flex-col justify-start items-start">
|
||||
<view class="group-title">{{ group.siteNames }}</view>
|
||||
<view @click="openUrl(`/package/card/checkout?cardId=${item.id}`)" class="container"
|
||||
v-for="(item, index) in group.cardList" :key="index">
|
||||
<view class="flex justify-between items-center w-100p p-20">
|
||||
<view class="flex justify-start items-center text-28 font-bold w-100p">
|
||||
<view class="web-text-heading">
|
||||
{{ item.name }}
|
||||
<template v-if="cardList.length">
|
||||
<block v-for="(group, groupIndex) in cardList" :key="groupIndex">
|
||||
<view class="flex flex-col justify-start items-start">
|
||||
<view class="group-title">{{ group.siteNames }}</view>
|
||||
<view @click="doBuy(item.id)" class="container"
|
||||
v-for="(item, index) in group.cardList" :key="index">
|
||||
<view class="flex justify-between items-center w-100p p-20">
|
||||
<view class="flex justify-start items-center text-28 font-bold w-100p">
|
||||
<view class="web-text-heading">
|
||||
{{ item.name }}
|
||||
</view>
|
||||
<view class="ml-10" v-if="item.type === 1">{{
|
||||
item.term
|
||||
}}年
|
||||
</view>
|
||||
<view class="ml-10" v-if="item.type === 3 || item.type === 4">{{
|
||||
item.month
|
||||
}}个月
|
||||
</view>
|
||||
<view v-if="item.type === 2" class="ml-10">
|
||||
{{ item.count }}次
|
||||
</view>
|
||||
<view v-if="item.type === 5" class="ml-10">{{
|
||||
item.discount
|
||||
}}折
|
||||
</view>
|
||||
</view>
|
||||
<view class="ml-10" v-if="item.type === 1">{{
|
||||
item.term
|
||||
}}年
|
||||
</view>
|
||||
<view class="ml-10" v-if="item.type === 3">{{
|
||||
item.month
|
||||
}}个月
|
||||
</view>
|
||||
<view v-if="item.type === 2" class="ml-10">
|
||||
{{ item.count }}次
|
||||
</view>
|
||||
<view v-if="item.type === 4" class="ml-10">{{
|
||||
item.discount
|
||||
}}折
|
||||
<view class="price">
|
||||
<text class="web-text-price">{{ `¥${item.price}` }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="price">
|
||||
<text class="web-text-price">{{ `¥${item.price}` }}</text>
|
||||
<view class="text-25 text-blue pt-10 mx-20" style="line-height: 35rpx" v-if="item.siteNames">
|
||||
可用场馆: {{ item.siteNames }}
|
||||
</view>
|
||||
<view class="text-25 text-gray py-15 mx-20" style="line-height: 35rpx">
|
||||
{{ item.info }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-25 text-gray p-20">
|
||||
{{ item.info }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<block v-if="cardList.length == 0">
|
||||
</block>
|
||||
</template>
|
||||
<uv-empty v-else text="暂无会员卡"/>
|
||||
<block v-if="loading">
|
||||
<uni-card :border="false" :padding="'18px 6px'">
|
||||
<uv-skeleton rows="2" avatar :loading="hideTools" :title="false"></uv-skeleton>
|
||||
</uni-card>
|
||||
@@ -72,6 +78,8 @@ import * as Api from '@/api/booking/card';
|
||||
import {pageWechatDeposit} from '@/api/shop/wechatDeposit';
|
||||
import {getWeek, getKey} from '@/utils/common';
|
||||
import {listThinkVip, listThinkVipByGroup} from "@/api/think/thinkVip";
|
||||
import {listThinkUsersVip} from "@/api/think/thinkUsersVip";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
@@ -79,6 +87,7 @@ export default {
|
||||
return {
|
||||
isRefresh: false,
|
||||
isLogin: false,
|
||||
loading: true,
|
||||
userId: 0,
|
||||
where: {
|
||||
page: 1,
|
||||
@@ -109,7 +118,8 @@ export default {
|
||||
styleType: 'text',
|
||||
getWeek,
|
||||
// 骨架屏
|
||||
hideTools: true
|
||||
hideTools: true,
|
||||
userVipList: []
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
@@ -143,48 +153,15 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async getCardList() {
|
||||
this.loading = true
|
||||
this.cardList = await listThinkVipByGroup({
|
||||
type: this.where.type
|
||||
})
|
||||
this.loading = false
|
||||
this.getUserVipList()
|
||||
},
|
||||
reload() {
|
||||
return;
|
||||
const app = this;
|
||||
const {where, userId} = this;
|
||||
if (userId == 0) {
|
||||
app.openLogin();
|
||||
return;
|
||||
}
|
||||
// where.userId = userId;
|
||||
// uni.showLoading({
|
||||
// title: '数据读取中.'
|
||||
// });
|
||||
app.loadMore = 'loading';
|
||||
Api.pageCard(where)
|
||||
.then((res) => {
|
||||
const list = res.list.map((d) => {
|
||||
return d;
|
||||
});
|
||||
if (app.cardList.length < res.count) {
|
||||
app.cardList = app.cardList.concat(list);
|
||||
app.canReset = true;
|
||||
app.loadMore = 'no-more';
|
||||
} else {
|
||||
app.canReset = false;
|
||||
app.loadMore = 'no-more';
|
||||
}
|
||||
// uni.hideLoading();
|
||||
app.isRefresh = false;
|
||||
app.hideTools = false;
|
||||
})
|
||||
.catch(() => {
|
||||
uni.showToast({
|
||||
title: '请检查您的网络.',
|
||||
icon: 'none'
|
||||
});
|
||||
app.isRefresh = false;
|
||||
app.hideTools = false;
|
||||
});
|
||||
async getUserVipList() {
|
||||
this.userVipList = await listThinkUsersVip()
|
||||
},
|
||||
onClickItem({currentIndex}) {
|
||||
|
||||
@@ -209,38 +186,6 @@ export default {
|
||||
url
|
||||
});
|
||||
},
|
||||
toPay(orderId) {
|
||||
uni.navigateTo({
|
||||
url: '/package/booking/confirm?id=' + orderId
|
||||
});
|
||||
},
|
||||
closeOrder(item) {
|
||||
uni.showModal({
|
||||
title: '确定取消此订单?',
|
||||
success(o) {
|
||||
if (o.confirm) {
|
||||
// Api.updateOrder({
|
||||
// orderStatus: 2,
|
||||
// orderId: item.orderId
|
||||
// })
|
||||
// .then((msg) => {
|
||||
// uni.showToast({
|
||||
// title: msg,
|
||||
// icon: 'none'
|
||||
// });
|
||||
// item.orderStatus = 2;
|
||||
// })
|
||||
// .catch(() => {
|
||||
// uni.showToast({
|
||||
// title: '请检查您的网络.',
|
||||
// icon: 'none'
|
||||
// });
|
||||
// uni.hideLoading();
|
||||
// });
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 弹出登录提示框
|
||||
async openLogin() {
|
||||
this.userId = uni.getStorageSync('user_id');
|
||||
@@ -248,6 +193,20 @@ export default {
|
||||
this.$refs.login.open('bottom');
|
||||
return false;
|
||||
}
|
||||
},
|
||||
doBuy(id) {
|
||||
const hasCard = this.userVipList.find(item => item.vid === id)
|
||||
if (hasCard) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: `您已有该会员卡(${dayjs(hasCard.expireTime * 1000).format('YYYY-MM-DD HH:mm:ss')}过期),继续购买将在该卡上叠加过期时间/次数/金额,是否继续?`,
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.openUrl(`/package/card/checkout?cardId=${id}`)
|
||||
}
|
||||
}
|
||||
})
|
||||
} else this.openUrl(`/package/card/checkout?cardId=${id}`)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</block>
|
||||
</uv-cell-group>
|
||||
<view class="py-20"
|
||||
v-if="!expired && info.payStatus === 1 && info.orderStatus === 2 && (hasMerchantRole || hasMerchantClerkRole || hasSuperAdminRole)">
|
||||
v-if="info.payStatus === 1 && info.orderStatus === 2 && (hasMerchantRole || hasMerchantClerkRole || hasSuperAdminRole)">
|
||||
<uv-button :disabled="disabled" @click="doCheck" shape="circle" :custom-style="{width: '500rpx'}"
|
||||
type="primary">核销
|
||||
</uv-button>
|
||||
|
||||
@@ -3,8 +3,18 @@
|
||||
<view class="qrcode" v-if="form.payStatus === 1 && form.orderStatus === 2">
|
||||
<!-- <uv-image :src="`${IMG_URL}${form.qrcode}`" width="200" height="200"/>-->
|
||||
<text class="text-25 mb-20 text-gray">{{ countDown }}秒后自动刷新</text>
|
||||
<uv-qrcode size="300px" :value="form.qrcode" v-if="form.qrcode" @click="getOrder"/>
|
||||
<template v-if="form.qrCodeList && form.qrCodeList.length">
|
||||
<view v-for="(item, index) in form.qrCodeList" :key="index" class="mb-25">
|
||||
<uv-qrcode :size="`${qrSize}rpx`" :value="item"
|
||||
@click="getOrder"/>
|
||||
</view>
|
||||
</template>
|
||||
<uv-qrcode v-else :size="`${qrSize}rpx`" :value="form.qrcode" v-if="form.qrcode" @click="getOrder"/>
|
||||
<text class="web-text-secondary">核销码(每30秒刷新,点击二维码手动刷新)</text>
|
||||
<view class="flex justify-between items-center w-80p mt-20">
|
||||
<uv-button @click="changeSize('-')" type="error">缩小</uv-button>
|
||||
<uv-button @click="changeSize('+')" type="primary">放大</uv-button>
|
||||
</view>
|
||||
</view>
|
||||
<uni-card title="预定信息" :border="false" :is-shadow="false" :padding="0">
|
||||
<view class="order-body web-cell web-cell-align-top">
|
||||
@@ -39,7 +49,7 @@
|
||||
<uv-cell-group :customStyle="{ backgroundColor: '#ffffff', padding: '8px 0' }" :border="false">
|
||||
<uv-cell :title="`姓名`" :value="`${form.name}`" :cellStyle="{ padding: '8px' }"/>
|
||||
<uv-cell :title="`手机号码`" :value="`${form.phone}`" :cellStyle="{ padding: '8px' }"/>
|
||||
<!-- <uv-cell :title="`订单号`" :value="`${form.id}`" :cellStyle="{ padding: '8px' }"/>-->
|
||||
<!-- <uv-cell :title="`订单号`" :value="`${form.id}`" :cellStyle="{ padding: '8px' }"/>-->
|
||||
<uv-cell :title="`订单编号`" :value="`${form.orderNum}`" :cellStyle="{ padding: '8px' }"/>
|
||||
<uv-cell :title="`订单状态`" :cellStyle="{ padding: '8px' }">
|
||||
<template v-slot:value>
|
||||
@@ -53,7 +63,8 @@
|
||||
<uv-cell :title="`下单时间`" :value="`${timeFormat(form.createTime,'yyyy-mm-dd hh:MM:ss')}`"
|
||||
:cellStyle="{ padding: '8px' }"/>
|
||||
<uv-cell :title="`支付方式`" :value="`${payType[form.payType]}`" :cellStyle="{ padding: '8px' }"/>
|
||||
<uv-cell :title="`优惠说明`" :titleStyle="{width: '200rpx'}" :value="`${form.desc ? form.desc : '无'}`" :cellStyle="{ padding: '8px' }"
|
||||
<uv-cell :title="`优惠说明`" :titleStyle="{width: '200rpx'}" :value="`${form.desc ? form.desc : '无'}`"
|
||||
:cellStyle="{ padding: '8px' }"
|
||||
:border="false"/>
|
||||
</uv-cell-group>
|
||||
</view>
|
||||
@@ -143,7 +154,8 @@ export default {
|
||||
activeColor: '#108001',
|
||||
styleType: 'text',
|
||||
countDown: 30,
|
||||
interval: null
|
||||
interval: null,
|
||||
qrSize: 500
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
@@ -228,7 +240,7 @@ export default {
|
||||
clearInterval(this.interval)
|
||||
this.getOrder()
|
||||
}
|
||||
}else clearInterval(this.interval)
|
||||
} else clearInterval(this.interval)
|
||||
}, 1000)
|
||||
},
|
||||
async openPay() {
|
||||
@@ -255,6 +267,17 @@ export default {
|
||||
console.log('支付失败', err);
|
||||
}
|
||||
})
|
||||
},
|
||||
changeSize(dir) {
|
||||
if (dir === '-') {
|
||||
if (this.qrSize > 200) {
|
||||
this.qrSize -= 100
|
||||
}
|
||||
} else {
|
||||
if (this.qrSize < 700) {
|
||||
this.qrSize += 100
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
@@ -0,0 +1,318 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<view class="text-24 font-bold mt-20 text-center text-red">注:开具会员卡发票后,无法再次开具使用该卡订场的订单发票。
|
||||
</view>
|
||||
<uni-card :border="false" :is-shadow="false">
|
||||
<uv-cell
|
||||
:title="`${formData.name ? formData.name : '请填写开票信息'}`"
|
||||
:label="`${userInvoice && userInvoice.isCompany === 1 ? '单位' : '个人'}`"
|
||||
:cellStyle="{ padding: '5px 0' }"
|
||||
:border="false"
|
||||
@click="editInvoice"
|
||||
>
|
||||
<template v-slot:right-icon>
|
||||
<uv-icon name="arrow-right"></uv-icon>
|
||||
</template>
|
||||
</uv-cell>
|
||||
</uni-card>
|
||||
<uni-card v-if="formData.name" :border="false" :is-shadow="false" :padding="20">
|
||||
<uni-forms ref="form" :modelValue="formData" :rules="rules" :label-width="100" label-position="left">
|
||||
<uni-forms-item label="发票类型" name="type">
|
||||
<uni-data-checkbox v-model="formData.type" :localdata="type"/>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="开票类型" name="invoicetype">
|
||||
<uni-data-checkbox v-model="formData.invoicetype" :localdata="invoiceType"/>
|
||||
</uni-forms-item>
|
||||
<block v-if="userInvoice && userInvoice.isCompany === 0">
|
||||
<uni-forms-item label="名称" name="name" required>
|
||||
<uv-input class="input" v-model="formData.name" type="text"/>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="税号/身份证号" name="code" required>
|
||||
<uv-input class="input" v-model="formData.code" type="text" placeholder="税号/身份证号(必填)"/>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="手机号码" name="phone" required>
|
||||
<uv-input class="input" v-model="formData.phone" type="text" placeholder="手机号码"/>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="电子邮箱" name="email">
|
||||
<uv-input class="input" v-model="formData.email" type="text" placeholder="电子邮箱"/>
|
||||
</uni-forms-item>
|
||||
</block>
|
||||
<block v-if="userInvoice && userInvoice.isCompany === 1">
|
||||
<uni-forms-item label="名称" name="name" required>
|
||||
<uv-input class="input" v-model="formData.name" type="text" placeholder="单位名称(必填)"/>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="税号" name="code" required>
|
||||
<uv-input class="input" v-model="formData.code" type="text" placeholder="纳税人识别号(必填)"/>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="手机号码" name="phone" required>
|
||||
<uv-input class="input" v-model="formData.phone" type="text" placeholder="手机号码"/>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="电子邮箱" name="email" required>
|
||||
<uv-input class="input" v-model="formData.email" type="text" placeholder="电子邮箱"/>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="开户行" name="bankName">
|
||||
<uv-input class="input" v-model="formData.bank" type="text" placeholder="开户银行名称"/>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="银行账号" name="bankAccount">
|
||||
<uv-input class="input" v-model="formData.account" type="text" placeholder="开户银行账号"/>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="单位地址" name="address">
|
||||
<uv-input class="input" v-model="formData.address" type="text" placeholder="单位地址"/>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="单位电话" name="tel">
|
||||
<uv-input class="input" v-model="formData.tel" type="text" placeholder="单位电话"/>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="备注" name="comments">
|
||||
<uv-textarea v-model="formData.comments" placeholder="请输入备注信息" auto-height></uv-textarea>
|
||||
</uni-forms-item>
|
||||
</block>
|
||||
<uv-button
|
||||
:disabled="disabled"
|
||||
class="add-emergency"
|
||||
:customStyle="{ background: 'linear-gradient(to right, #70b915, #008e04)', borderRadius: '30px', color: '#ffffff' }"
|
||||
text="确认开票"
|
||||
@click="submit"
|
||||
></uv-button>
|
||||
</uni-forms>
|
||||
</uni-card>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {useUserStore} from '@/store/modules/user';
|
||||
import {openUrl} from '@/utils/common';
|
||||
|
||||
import {useTenantStore} from '@/store/modules/tenant';
|
||||
import {addThinkInvoice, pageThinkInvoice, removeThinkInvoice} from "@/api/think/thinkInvoice";
|
||||
import {doInvoice, doInvoiceByList, pageUserInvoice} from "@/api/booking/userInvoice";
|
||||
|
||||
const tenantStore = useTenantStore();
|
||||
|
||||
const userStore = useUserStore();
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
orderId: 0,
|
||||
list: [],
|
||||
statusBarHeight: 104,
|
||||
isLogin: false,
|
||||
fields: {},
|
||||
logo: '',
|
||||
bookingUser: {},
|
||||
server: [],
|
||||
order: [],
|
||||
// 表单数据
|
||||
formData: {
|
||||
incoiveNum: null,
|
||||
code: null,
|
||||
orderNum: null,
|
||||
oid: null,
|
||||
uid: null,
|
||||
price: null,
|
||||
name: null,
|
||||
tel: null,
|
||||
address: null,
|
||||
bank: null,
|
||||
account: null,
|
||||
code: null,
|
||||
phone: null,
|
||||
email: '',
|
||||
type: 2,
|
||||
itype: null,
|
||||
invoicetype: 1,
|
||||
isOpen: 2,
|
||||
},
|
||||
// 发票类型
|
||||
type: [
|
||||
{
|
||||
text: '电子',
|
||||
value: 2
|
||||
},
|
||||
// {
|
||||
// text: '纸质',
|
||||
// value: 1
|
||||
// }
|
||||
],
|
||||
// 开票类型
|
||||
invoiceType: [
|
||||
{
|
||||
text: '普票',
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
text: '专票',
|
||||
value: 2
|
||||
}
|
||||
],
|
||||
rules: {
|
||||
// 对name字段进行必填验证
|
||||
name: {
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
errorMessage: '请输入开票名称'
|
||||
}
|
||||
]
|
||||
},
|
||||
// 对email字段进行必填验证
|
||||
email: {
|
||||
rules: [
|
||||
{
|
||||
format: 'email',
|
||||
errorMessage: '请输入正确的邮箱地址'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
userInvoice: null,
|
||||
disabled: false,
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
this.formData.orderIdList = e.idList.split(',').map(Number)
|
||||
this.formData.itype = 1
|
||||
this.formData.price = e.price
|
||||
},
|
||||
onShow() {
|
||||
this.reload();
|
||||
},
|
||||
methods: {
|
||||
async reload(e) {
|
||||
const app = this;
|
||||
// 当前登录用户信息
|
||||
const userInfo = await userStore.fetchUserInfo();
|
||||
app.isLogin = Object.keys(userInfo).length > 0;
|
||||
|
||||
// 读取最后一次
|
||||
pageUserInvoice({
|
||||
limit: 1
|
||||
}).then((res) => {
|
||||
if (res.count > 0 && !app.formData.id) {
|
||||
if (res.list && res.list.length > 0) {
|
||||
this.userInvoice = res.list[0];
|
||||
for (let key in app.formData) {
|
||||
if (res.list[0][key]) {
|
||||
app.formData[key] = res.list[0][key];
|
||||
}
|
||||
}
|
||||
if (this.userInvoice.invoiceCode) this.formData.code = this.userInvoice.invoiceCode
|
||||
if (this.userInvoice.bankName) this.formData.bank = this.userInvoice.bankName
|
||||
if (this.userInvoice.bankAccount) this.formData.account = this.userInvoice.bankAccount
|
||||
}
|
||||
// app.formData.orderId = app.orderId
|
||||
}
|
||||
});
|
||||
},
|
||||
navTo(item) {
|
||||
if (!this.isLogin) {
|
||||
this.$refs.login.open('bottom');
|
||||
return false;
|
||||
}
|
||||
openUrl(item);
|
||||
},
|
||||
// 弹出登录提示框
|
||||
openLogin() {
|
||||
if (!this.isLogin) {
|
||||
this.$refs.login.open('bottom');
|
||||
return false;
|
||||
}
|
||||
},
|
||||
editInvoice() {
|
||||
uni.navigateTo({
|
||||
url: `/package/user/invoice-edit?id=${this.formData.id}`
|
||||
})
|
||||
},
|
||||
add() {
|
||||
this.$refs.addForm.open('center');
|
||||
},
|
||||
// 触发提交表单
|
||||
submit() {
|
||||
const {formData} = this
|
||||
this.$refs.form
|
||||
.validate()
|
||||
.then(async () => {
|
||||
this.disabled = true
|
||||
uni.showLoading({title: '保存中'})
|
||||
if (!formData.phone) {
|
||||
this.disabled = false
|
||||
return uni.showToast({
|
||||
title: '请输入手机号',
|
||||
icon: 'success'
|
||||
});
|
||||
}
|
||||
if (!/^1[3456789]\d{9}$/.test(formData.phone)) {
|
||||
this.disabled = false
|
||||
return uni.showToast({
|
||||
title: '请输入正确的手机号',
|
||||
icon: 'success'
|
||||
})
|
||||
}
|
||||
if (!formData.email) formData.email = ''
|
||||
// const res = await addThinkInvoice(formData)
|
||||
uni.hideLoading()
|
||||
// if (res && res.data) {
|
||||
uni.showLoading({title: '申请开票中'})
|
||||
const openRes = await doInvoiceByList(formData).catch(() => {
|
||||
this.disabled = false
|
||||
uni.hideLoading()
|
||||
})
|
||||
this.disabled = false
|
||||
if (openRes) {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '已申请',
|
||||
icon: 'success'
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 1000)
|
||||
}
|
||||
// }
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log('表单错误信息:', err);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
page {
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-color: #f0f2f5;
|
||||
width: 750rpx;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss">
|
||||
.avatar {
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.save-user-profile {
|
||||
width: 700rpx;
|
||||
margin: 40rpx auto;
|
||||
}
|
||||
|
||||
.add-emergency {
|
||||
width: 500rpx !important;
|
||||
margin: 40rpx auto;
|
||||
}
|
||||
|
||||
.btn-bar {
|
||||
width: 700rpx;
|
||||
left: 25rpx;
|
||||
position: fixed;
|
||||
bottom: 30rpx;
|
||||
margin: auto;
|
||||
clear: both;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,233 @@
|
||||
<template>
|
||||
<view class="min-height bg-gray-light">
|
||||
<uv-tabs :list="tabList" :current="current" :scrollable="false" @click="changeType"></uv-tabs>
|
||||
<uv-tabs v-if="siteList.length && current === 0" :list="siteList" :current="currentSite" :scrollable="false"
|
||||
@click="changeSite"></uv-tabs>
|
||||
<view class="order" v-if="current === 0">
|
||||
<template v-if="list.length > 0">
|
||||
<block v-for="(item,index) in list" :key="index">
|
||||
<view class="card m-20 border pos-r" @click="changeSelect(index)"
|
||||
:class="[selectedList.includes(index) ? 'selected': '']">
|
||||
<view class="order-title web-cell text-25">
|
||||
<view class="web-cell web-cell-content">
|
||||
<text class="merchant-name">订单号: {{ item.orderNum }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-body web-cell web-cell-align-top">
|
||||
<view class="web-cell-content">
|
||||
<uv-cell-group :customStyle="{backgroundColor: '#ffffff'}" :border="false">
|
||||
<block v-for="(sub,subIndex) in item.thinkOrderInfos" :key="subIndex">
|
||||
<uv-cell :title="`${item.siteName} - ${sub.fieldName}`" :label="`${sub.dateTime}`"
|
||||
:cellStyle="{padding: '0', paddingBottom: '5px'}" :border="false"/>
|
||||
</block>
|
||||
</uv-cell-group>
|
||||
<view class="total-price">
|
||||
<view class="text-orange text-30 font-bold">实付:¥{{ item.payPrice }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<uv-gap height="140rpx"/>
|
||||
<view class="footer">
|
||||
<view class="p-20">
|
||||
<uv-button type="primary" shape="circle" :disabled="!selectedList.length" @click="confirm">合并开票
|
||||
</uv-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<uv-empty v-else text="暂无可开票订单"/>
|
||||
</view>
|
||||
<view v-else>
|
||||
<template v-if="list.length > 0">
|
||||
<block v-for="(item, index) in list" :key="index">
|
||||
<view class="card m-20 text-25">
|
||||
<view class="flex justify-between items-center">
|
||||
<view class="text-main">开票金额: {{ item.price }}元</view>
|
||||
<text :class="[item.isOpen === 1 ? 'text-green' : '']">{{
|
||||
item.isOpen === 1 ? '已开票' : '开票中'
|
||||
}}
|
||||
</text>
|
||||
</view>
|
||||
<view class="mt-15">税号/身份证号: {{ item.code }}</view>
|
||||
<view class="mt-15">名称: {{ item.name }}</view>
|
||||
<view class="mt-15">手机号码: {{ item.phone }}</view>
|
||||
<view class="py-15 border-top flex justify-center items-center" v-if="item.isOpen && item.url">
|
||||
<view>
|
||||
<uv-button type="success" shape="circle" @click="copy(item.url)" size="mini">复制PDF链接</uv-button>
|
||||
</view>
|
||||
<view v-if="item.xmlUrl" class="ml-15">
|
||||
<uv-button type="primary" shape="circle" @click="copy(item.xmlUrl)" size="mini">复制XML链接</uv-button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="py-15 border-top flex justify-center items-center" v-if="item.isOpen === 2">
|
||||
<view>
|
||||
<uv-button type="success" shape="circle" @click="checkRes(item)" size="mini">查询状态</uv-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<uv-gap height="140rpx"/>
|
||||
</template>
|
||||
<uv-empty v-else text="暂无发票"/>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {listThinkOrder} from "@/api/think/thinkOrder";
|
||||
import {getThinkInvoiceRes, listThinkInvoice} from "@/api/think/thinkInvoice";
|
||||
|
||||
export default {
|
||||
name: "multiInvoice",
|
||||
data() {
|
||||
return {
|
||||
current: 0,
|
||||
currentSite: 0,
|
||||
tabList: [{name: '开票'}, {name: '我的发票'}],
|
||||
siteList: [],
|
||||
list: [],
|
||||
originList: [],
|
||||
selectedList: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeType({index}) {
|
||||
this.current = index
|
||||
if (index === 0) this.getOrderList()
|
||||
else this.getInvoiceList()
|
||||
},
|
||||
changeSite({index}) {
|
||||
this.currentSite = index
|
||||
this.selectedList = []
|
||||
this.calList()
|
||||
},
|
||||
async getOrderList() {
|
||||
this.list = []
|
||||
let list = await listThinkOrder({
|
||||
isInvoice: 2,
|
||||
orderStatus: 1,
|
||||
payStatus: 1,
|
||||
})
|
||||
list = list.filter(item => {
|
||||
return item.payPrice > 0 && item.createTime > 1742400000
|
||||
})
|
||||
this.originList = JSON.parse(JSON.stringify(list))
|
||||
console.log(this.originList)
|
||||
this.siteList = []
|
||||
if (this.originList.length) {
|
||||
this.originList.forEach(item => {
|
||||
if (!this.siteList.includes(item.siteName)) this.siteList.push(item.siteName)
|
||||
})
|
||||
this.siteList = this.siteList.map(name => {
|
||||
return {name}
|
||||
})
|
||||
console.log(this.siteList)
|
||||
this.calList()
|
||||
}
|
||||
},
|
||||
calList() {
|
||||
this.list = this.originList.filter(item => {
|
||||
return item.siteName === this.siteList[this.currentSite].name
|
||||
})
|
||||
console.log(this.list)
|
||||
},
|
||||
async getInvoiceList() {
|
||||
this.list = await listThinkInvoice({group: true})
|
||||
},
|
||||
changeSelect(dataIndex) {
|
||||
if (this.selectedList.includes(dataIndex)) {
|
||||
this.selectedList = this.selectedList.filter(item => item !== dataIndex)
|
||||
} else {
|
||||
this.selectedList.push(dataIndex)
|
||||
}
|
||||
},
|
||||
confirm() {
|
||||
const list = this.list.filter((item, index) => this.selectedList.includes(index))
|
||||
const totalPrice = list.reduce((total, item) => total + item.payPrice, 0)
|
||||
const idList = list.map(item => item.id)
|
||||
uni.showModal({
|
||||
title: `合并开票金额:${totalPrice}元,确定要继续吗?`,
|
||||
success(o) {
|
||||
if (o.confirm) {
|
||||
let url = `/package/order/doMultiInvoice?idList=${idList}&price=${totalPrice}`
|
||||
uni.navigateTo({url})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
copy(url) {
|
||||
uni.setClipboardData({
|
||||
data: url,
|
||||
success() {
|
||||
uni.showToast({
|
||||
title: '复制成功',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
async checkRes(item){
|
||||
const res = await getThinkInvoiceRes({id: item.id})
|
||||
console.log(res)
|
||||
this.getInvoiceList()
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.selectedList = []
|
||||
this.getOrderList()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.order {
|
||||
.order-title {
|
||||
|
||||
padding: 20rpx 0;
|
||||
border-bottom: 1px #eee solid;
|
||||
|
||||
.merchant-avatar {
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.btn-status {
|
||||
font-size: 30rpx;
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
.order-body {
|
||||
padding: 16px 0;
|
||||
}
|
||||
}
|
||||
|
||||
.selected {
|
||||
border-color: #3c9cff;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
border: 16px solid #3c9cff;
|
||||
border-top-color: transparent;
|
||||
border-left-color: transparent;
|
||||
border-radius: 0 0 10px 0;
|
||||
}
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
width: 5px;
|
||||
height: 10px;
|
||||
position: absolute;
|
||||
right: 6px;
|
||||
bottom: 7px;
|
||||
border: 1px solid #fff;
|
||||
border-top-color: transparent;
|
||||
border-left-color: transparent;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<web-view :src="url"></web-view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
url: 'https://fsabk.fujica.com.cn/pages/pay/paycost?parkid=614478505861189&code=051Omill2As1Bi4XgVnl2nAH6E3OmilS&state=STATE'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,432 @@
|
||||
<template>
|
||||
<view class="balance-page">
|
||||
<view class="balance-card">
|
||||
<text class="balance-label">当前余额</text>
|
||||
<text class="balance-value">¥{{ balanceText }}</text>
|
||||
<button class="charge-button" @click="openChargePopup">充值</button>
|
||||
</view>
|
||||
|
||||
<view class="history-card">
|
||||
<view class="history-header">
|
||||
<text class="history-title">余额历史</text>
|
||||
</view>
|
||||
<block v-if="historyList.length">
|
||||
<view
|
||||
v-for="item in historyList"
|
||||
:key="item.logId"
|
||||
class="history-item"
|
||||
>
|
||||
<view class="history-main">
|
||||
<text class="history-remark">{{ getHistoryTitle(item) }}</text>
|
||||
<text class="history-time">{{ dayjs(item.createTime).format('YYYY-MM-DD HH:mm:ss') || '--' }}</text>
|
||||
</view>
|
||||
<view class="history-side">
|
||||
<text
|
||||
class="history-amount"
|
||||
:class="isIncome(item) ? 'income' : 'expense'"
|
||||
>
|
||||
{{ isIncome(item) ? '+' : '-' }}¥{{ formatMoney(item.money) }}
|
||||
</text>
|
||||
<text class="history-balance">余额 ¥{{ formatMoney(item.balance) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<uv-empty
|
||||
v-else-if="!loading"
|
||||
mode="list"
|
||||
text="暂无余额记录"
|
||||
icon="https://oss.wsdns.cn/20260507/5dbf1446663e49b3b13d637d100ab917.png"
|
||||
></uv-empty>
|
||||
</view>
|
||||
|
||||
<uni-popup ref="chargePopup" type="center">
|
||||
<view class="popup-body">
|
||||
<view class="popup-title">余额充值</view>
|
||||
<view class="popup-label">充值金额</view>
|
||||
<view class="popup-input-wrap">
|
||||
<text class="popup-currency">¥</text>
|
||||
<input
|
||||
v-model="chargeAmount"
|
||||
class="popup-input"
|
||||
type="digit"
|
||||
placeholder="请输入充值金额"
|
||||
@input="onChargeAmountInput"
|
||||
/>
|
||||
</view>
|
||||
<view class="quick-amounts">
|
||||
<view
|
||||
v-for="item in quickAmounts"
|
||||
:key="item"
|
||||
class="quick-amount"
|
||||
:class="{ active: chargeAmount === String(item) }"
|
||||
@click="selectQuickAmount(item)"
|
||||
>
|
||||
{{ item }}元
|
||||
</view>
|
||||
</view>
|
||||
<view class="popup-actions">
|
||||
<button class="popup-btn ghost" @click="closeChargePopup">取消</button>
|
||||
<button class="popup-btn primary" :disabled="submitting" @click="submitCharge">
|
||||
{{ submitting ? '处理中...' : '确认充值' }}
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
|
||||
<uv-loading-page :loading="loading" loading-text="加载中..."></uv-loading-page>
|
||||
<ws-login ref="login" :logo="logo" @done="reload"/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {useUserStore} from '@/store/modules/user';
|
||||
import {pageUserBalanceLog} from '@/api/user/balance-log';
|
||||
import {rechargeBalance} from '@/api/shop/balanceChargeLog';
|
||||
import dayjs from "dayjs";
|
||||
|
||||
const userStore = useUserStore();
|
||||
|
||||
export default {
|
||||
name: 'UserBalance',
|
||||
data() {
|
||||
return {
|
||||
logo: uni.getStorageSync('app_logo'),
|
||||
loading: false,
|
||||
submitting: false,
|
||||
balance: 0,
|
||||
historyList: [],
|
||||
chargeAmount: '',
|
||||
quickAmounts: [10, 20, 50, 100, 200, 500]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
balanceText() {
|
||||
return this.formatMoney(this.balance);
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.reload();
|
||||
},
|
||||
methods: {
|
||||
dayjs,
|
||||
formatMoney(value) {
|
||||
const amount = Number(value || 0);
|
||||
return amount.toFixed(2);
|
||||
},
|
||||
isIncome(item) {
|
||||
return [0, 2, 3].includes(item.scene);
|
||||
},
|
||||
getHistoryTitle(item) {
|
||||
if (item.remark) return item.remark;
|
||||
const sceneMap = {
|
||||
0: '余额充值',
|
||||
1: '余额消费',
|
||||
2: '管理员操作',
|
||||
3: '订单退款'
|
||||
};
|
||||
return sceneMap[item.scene] || '余额变动';
|
||||
},
|
||||
onChargeAmountInput(e) {
|
||||
this.chargeAmount = e.detail.value;
|
||||
},
|
||||
selectQuickAmount(amount) {
|
||||
this.chargeAmount = String(amount);
|
||||
},
|
||||
async reload() {
|
||||
this.loading = true;
|
||||
try {
|
||||
const userInfo = await userStore.fetchUserInfo();
|
||||
if (!userInfo || !Object.keys(userInfo).length) {
|
||||
this.$refs.login.open('bottom');
|
||||
this.historyList = [];
|
||||
return;
|
||||
}
|
||||
this.balance = Number(userInfo.balance || 0);
|
||||
const historyRes = await pageUserBalanceLog({
|
||||
page: 1,
|
||||
limit: 100,
|
||||
userId: userInfo.userId
|
||||
});
|
||||
this.historyList = historyRes.list || [];
|
||||
} catch (error) {
|
||||
this.historyList = [];
|
||||
uni.showToast({
|
||||
title: error.message || '加载失败',
|
||||
icon: 'none'
|
||||
});
|
||||
} finally {
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
openChargePopup() {
|
||||
this.chargeAmount = '';
|
||||
this.$refs.chargePopup.open();
|
||||
},
|
||||
closeChargePopup() {
|
||||
this.$refs.chargePopup.close();
|
||||
},
|
||||
async submitCharge() {
|
||||
const amount = Number(this.chargeAmount);
|
||||
if (!amount || amount <= 0) {
|
||||
uni.showToast({
|
||||
title: '请输入正确的充值金额',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.submitting = true;
|
||||
try {
|
||||
const orderInfo = await rechargeBalance({
|
||||
amount: amount.toFixed(2)
|
||||
});
|
||||
if (!orderInfo) {
|
||||
throw new Error('生成订单失败');
|
||||
}
|
||||
uni.requestPayment({
|
||||
provider: orderInfo.provider,
|
||||
timeStamp: orderInfo.timeStamp,
|
||||
nonceStr: orderInfo.nonceStr,
|
||||
package: orderInfo.package,
|
||||
signType: orderInfo.signType,
|
||||
paySign: orderInfo.paySign,
|
||||
success: async () => {
|
||||
uni.showToast({
|
||||
title: '支付成功',
|
||||
icon: 'success'
|
||||
});
|
||||
this.closeChargePopup();
|
||||
await this.reload();
|
||||
},
|
||||
fail: (err) => {
|
||||
if (err?.errMsg && err.errMsg.includes('cancel')) {
|
||||
uni.showToast({
|
||||
title: '已取消支付',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
uni.showToast({
|
||||
title: '支付失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
uni.showToast({
|
||||
title: error.message || '充值失败',
|
||||
icon: 'none'
|
||||
});
|
||||
} finally {
|
||||
this.submitting = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background: #f3f5f7;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.balance-page {
|
||||
min-height: 100vh;
|
||||
padding: 24rpx;
|
||||
}
|
||||
|
||||
.balance-card {
|
||||
padding: 40rpx 36rpx;
|
||||
border-radius: 28rpx;
|
||||
background: linear-gradient(135deg, #ff7a45 0%, #ff9a62 100%);
|
||||
color: #ffffff;
|
||||
box-shadow: 0 20rpx 40rpx rgba(255, 122, 69, 0.18);
|
||||
}
|
||||
|
||||
.balance-label {
|
||||
font-size: 26rpx;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.balance-value {
|
||||
display: block;
|
||||
margin-top: 20rpx;
|
||||
font-size: 64rpx;
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.charge-button {
|
||||
margin-top: 36rpx;
|
||||
width: 220rpx;
|
||||
height: 76rpx;
|
||||
line-height: 76rpx;
|
||||
border-radius: 999rpx;
|
||||
border: none;
|
||||
background: rgba(255, 255, 255, 0.18);
|
||||
color: #ffffff;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.history-card {
|
||||
margin-top: 24rpx;
|
||||
padding: 28rpx;
|
||||
border-radius: 28rpx;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.history-header {
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.history-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
.history-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 26rpx 0;
|
||||
border-bottom: 1rpx solid #f0f2f5;
|
||||
}
|
||||
|
||||
.history-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.history-main,
|
||||
.history-side {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.history-side {
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.history-remark {
|
||||
font-size: 30rpx;
|
||||
color: #303133;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.history-time,
|
||||
.history-balance {
|
||||
margin-top: 10rpx;
|
||||
font-size: 24rpx;
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
.history-amount {
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.history-amount.income {
|
||||
color: #19be6b;
|
||||
}
|
||||
|
||||
.history-amount.expense {
|
||||
color: #fa3534;
|
||||
}
|
||||
|
||||
.popup-body {
|
||||
width: 620rpx;
|
||||
padding: 36rpx 32rpx;
|
||||
border-radius: 24rpx;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.popup-title {
|
||||
text-align: center;
|
||||
font-size: 34rpx;
|
||||
font-weight: 600;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
.popup-label {
|
||||
margin-top: 32rpx;
|
||||
margin-bottom: 18rpx;
|
||||
font-size: 26rpx;
|
||||
color: #606266;
|
||||
}
|
||||
|
||||
.popup-input-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 24rpx;
|
||||
height: 96rpx;
|
||||
border-radius: 18rpx;
|
||||
background: #f5f7fa;
|
||||
}
|
||||
|
||||
.popup-currency {
|
||||
margin-right: 12rpx;
|
||||
font-size: 40rpx;
|
||||
font-weight: 600;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
.popup-input {
|
||||
flex: 1;
|
||||
font-size: 38rpx;
|
||||
color: #303133;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.quick-amounts {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 16rpx;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
|
||||
.quick-amount {
|
||||
min-width: 120rpx;
|
||||
padding: 18rpx 0;
|
||||
border-radius: 16rpx;
|
||||
background: #f7f8fa;
|
||||
text-align: center;
|
||||
font-size: 26rpx;
|
||||
color: #606266;
|
||||
}
|
||||
|
||||
.quick-amount.active {
|
||||
background: #fff1eb;
|
||||
color: #ff7a45;
|
||||
}
|
||||
|
||||
.popup-actions {
|
||||
display: flex;
|
||||
gap: 20rpx;
|
||||
margin-top: 36rpx;
|
||||
}
|
||||
|
||||
.popup-btn {
|
||||
flex: 1;
|
||||
height: 84rpx;
|
||||
line-height: 84rpx;
|
||||
border-radius: 999rpx;
|
||||
font-size: 28rpx;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.popup-btn.ghost {
|
||||
background: #f2f4f7;
|
||||
color: #606266;
|
||||
}
|
||||
|
||||
.popup-btn.primary {
|
||||
background: linear-gradient(135deg, #ff7a45 0%, #ff9a62 100%);
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.popup-btn[disabled] {
|
||||
opacity: 0.7;
|
||||
}
|
||||
</style>
|
||||
@@ -34,7 +34,7 @@
|
||||
item.remainingMoney
|
||||
}}
|
||||
</view>
|
||||
<view class="desc web-text-heading" v-if="item.type === 1 || item.type === 3"
|
||||
<view class="desc web-text-heading"
|
||||
style="color: #ffffff; font-size: 14px">
|
||||
{{ dayjs(item.expireTime * 1000).format('YYYY-MM-DD HH:mm') }}过期
|
||||
</view>
|
||||
@@ -70,7 +70,7 @@
|
||||
<ws-login ref="login" :logo="logo" @done="reload"/>
|
||||
</view>
|
||||
<view v-if="!hideTools && cardList.length == 0">
|
||||
<uv-empty mode="list" icon="https://cdn.uviewui.com/uview/empty/list.png"></uv-empty>
|
||||
<uv-empty mode="list" icon="https://oss.wsdns.cn/20260507/5dbf1446663e49b3b13d637d100ab917.png"></uv-empty>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -3,7 +3,13 @@
|
||||
<view v-for="(item, index) in list" :key="index">
|
||||
<image class="responsive-image" :src="item.imgUrls" mode="widthFix"
|
||||
@click="onDown(item.pdfUrl)"></image>
|
||||
<uv-button @click="onDown(item.pdfUrl)">复制发票链接</uv-button>
|
||||
<view class="flex justify-center items-center m-20" v-if="item.pdfUrl">
|
||||
<view class="mr-10">
|
||||
<uv-button @click="onDown(item.pdfUrl)" v-if="item.pdfUrl" type="success">复制PDF链接</uv-button>
|
||||
</view>
|
||||
<uv-button @click="onDown(item.xmlUrl)" v-if="item.xmlUrl">复制XML链接</uv-button>
|
||||
</view>
|
||||
<uv-button type="primary" v-else>开票中</uv-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -48,6 +54,7 @@ export default {
|
||||
if (res && res.list && res.list.length > 0) {
|
||||
const invoiceRes = await showInvoice(res.list[0].id)
|
||||
this.list = JSON.parse(invoiceRes)
|
||||
console.log(this.list)
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
:title="`场地发票`"
|
||||
:cellStyle="{ padding: '5px 0' }"
|
||||
:border="false"
|
||||
@click="switchTabTo(`/pages/order`)"
|
||||
@click="navTo(`/package/order/multiInvoice`)"
|
||||
icon="https://oss.wsdns.cn/20241206/eb94f79b4d9049999554e11bc355480e.png"
|
||||
>
|
||||
<template v-slot:right-icon>
|
||||
@@ -13,19 +13,19 @@
|
||||
</template>
|
||||
</uv-cell>
|
||||
</uni-card>
|
||||
<uni-card :border="false" :is-shadow="false">
|
||||
<uv-cell
|
||||
:title="`租赁发票`"
|
||||
:cellStyle="{ padding: '5px 0' }"
|
||||
:border="false"
|
||||
@click="navTo(`/package/user/invoiceRent`)"
|
||||
icon="https://oss.wsdns.cn/20241206/51119131ac50427ca72272634f24e2a1.png"
|
||||
>
|
||||
<template v-slot:right-icon>
|
||||
<uv-icon name="arrow-right"></uv-icon>
|
||||
</template>
|
||||
</uv-cell>
|
||||
</uni-card>
|
||||
<!-- <uni-card :border="false" :is-shadow="false">-->
|
||||
<!-- <uv-cell-->
|
||||
<!-- :title="`租赁发票`"-->
|
||||
<!-- :cellStyle="{ padding: '5px 0' }"-->
|
||||
<!-- :border="false"-->
|
||||
<!-- @click="navTo(`/package/user/invoiceRent`)"-->
|
||||
<!-- icon="https://oss.wsdns.cn/20241206/51119131ac50427ca72272634f24e2a1.png"-->
|
||||
<!-- >-->
|
||||
<!-- <template v-slot:right-icon>-->
|
||||
<!-- <uv-icon name="arrow-right"></uv-icon>-->
|
||||
<!-- </template>-->
|
||||
<!-- </uv-cell>-->
|
||||
<!-- </uni-card>-->
|
||||
<!-- <uni-card :border="false" :is-shadow="false">-->
|
||||
<!-- <uv-cell-->
|
||||
<!-- :title="`商城发票`"-->
|
||||
|
||||
@@ -23,24 +23,24 @@
|
||||
</uni-forms-item>
|
||||
<block v-if="userInvoice && userInvoice.isCompany === 0">
|
||||
<uni-forms-item label="名称" name="name" required>
|
||||
<uv-input class="input" disabled v-model="formData.name" type="text"/>
|
||||
<uv-input class="input" v-model="formData.name" type="text"/>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="税号/身份证号" name="incoiveCode" required>
|
||||
<uv-input class="input" v-model="formData.incoiveCode" type="text" placeholder="税号/身份证号(必填)"/>
|
||||
<uni-forms-item label="税号/身份证号" name="code" required>
|
||||
<uv-input class="input" v-model="formData.code" type="text" placeholder="税号/身份证号(必填)"/>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="手机号码" name="phone">
|
||||
<uv-input class="input" disabled v-model="formData.phone" type="text" placeholder="手机号码"/>
|
||||
<uni-forms-item label="手机号码" name="phone" required>
|
||||
<uv-input class="input" v-model="formData.phone" type="text" placeholder="手机号码"/>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="电子邮箱" name="email">
|
||||
<uv-input class="input" disabled v-model="formData.email" type="text" placeholder="电子邮箱"/>
|
||||
<uv-input class="input" v-model="formData.email" type="text" placeholder="电子邮箱"/>
|
||||
</uni-forms-item>
|
||||
</block>
|
||||
<block v-if="userInvoice && userInvoice.isCompany === 1">
|
||||
<uni-forms-item label="名称" name="name" required>
|
||||
<uv-input class="input" v-model="formData.name" type="text" placeholder="单位名称(必填)"/>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="税号" name="incoiveCode" required>
|
||||
<uv-input class="input" v-model="formData.incoiveCode" type="text" placeholder="纳税人识别号(必填)"/>
|
||||
<uni-forms-item label="税号" name="code" required>
|
||||
<uv-input class="input" v-model="formData.code" type="text" placeholder="纳税人识别号(必填)"/>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="手机号码" name="phone" required>
|
||||
<uv-input class="input" v-model="formData.phone" type="text" placeholder="手机号码"/>
|
||||
@@ -65,6 +65,7 @@
|
||||
</uni-forms-item>
|
||||
</block>
|
||||
<uv-button
|
||||
:disabled="disabled"
|
||||
class="add-emergency"
|
||||
:customStyle="{ background: 'linear-gradient(to right, #70b915, #008e04)', borderRadius: '30px', color: '#ffffff' }"
|
||||
text="确认开票"
|
||||
@@ -72,6 +73,7 @@
|
||||
></uv-button>
|
||||
</uni-forms>
|
||||
</uni-card>
|
||||
<view class="text-24 font-bold mt-20 text-center text-red">注:开具会员卡发票后,无法再次开具使用该卡订场的订单发票。</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -102,7 +104,7 @@ export default {
|
||||
// 表单数据
|
||||
formData: {
|
||||
incoiveNum: null,
|
||||
incoiveCode: null,
|
||||
incoiveCode: '91450100737617400R',
|
||||
orderNum: null,
|
||||
oid: null,
|
||||
uid: null,
|
||||
@@ -114,10 +116,11 @@ export default {
|
||||
account: null,
|
||||
code: null,
|
||||
phone: null,
|
||||
email: null,
|
||||
email: '',
|
||||
type: 2,
|
||||
itype: null,
|
||||
invoicetype: 1,
|
||||
isOpen: 2,
|
||||
},
|
||||
// 发票类型
|
||||
type: [
|
||||
@@ -134,11 +137,13 @@ export default {
|
||||
invoiceType: [
|
||||
{
|
||||
text: '普票',
|
||||
value: 1
|
||||
value: 1,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
text: '专票',
|
||||
value: 2
|
||||
value: 2,
|
||||
disabled: false
|
||||
}
|
||||
],
|
||||
rules: {
|
||||
@@ -162,6 +167,7 @@ export default {
|
||||
}
|
||||
},
|
||||
userInvoice: null,
|
||||
disabled: false,
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
@@ -169,6 +175,9 @@ export default {
|
||||
this.formData.orderNum = e.orderNum
|
||||
this.formData.itype = e.itype
|
||||
this.formData.price = e.price
|
||||
if (parseInt(this.formData.itype) === 2) {
|
||||
this.invoiceType[1].disabled = true
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.reload();
|
||||
@@ -192,7 +201,7 @@ export default {
|
||||
app.formData[key] = res.list[0][key];
|
||||
}
|
||||
}
|
||||
if (this.userInvoice.invoiceCode) this.formData.incoiveCode = this.userInvoice.invoiceCode
|
||||
if (this.userInvoice.invoiceCode) this.formData.code = this.userInvoice.invoiceCode
|
||||
if (this.userInvoice.bankName) this.formData.bank = this.userInvoice.bankName
|
||||
if (this.userInvoice.bankAccount) this.formData.account = this.userInvoice.bankAccount
|
||||
}
|
||||
@@ -254,23 +263,47 @@ export default {
|
||||
// 触发提交表单
|
||||
submit() {
|
||||
const {formData} = this
|
||||
this.disabled = true
|
||||
this.$refs.form
|
||||
.validate()
|
||||
.then(async () => {
|
||||
formData.code.replace(/\s/g,"")
|
||||
uni.showLoading({title: '保存中'})
|
||||
if (!formData.phone) {
|
||||
this.disabled = false
|
||||
return uni.showToast({
|
||||
title: '请输入手机号',
|
||||
icon: 'success'
|
||||
});
|
||||
}
|
||||
// 手机号校验
|
||||
if (!/^1[3456789]\d{9}$/.test(formData.phone)) {
|
||||
this.disabled = false
|
||||
return uni.showToast({
|
||||
title: '请输入正确的手机号',
|
||||
icon: 'success'
|
||||
})
|
||||
}
|
||||
if (!formData.email) formData.email = ''
|
||||
const res = await addThinkInvoice(formData)
|
||||
uni.hideLoading()
|
||||
if (res && res.data) {
|
||||
uni.showLoading({title: '申请开票中'})
|
||||
await doInvoice(res.data)
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '开票成功',
|
||||
icon: 'success'
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 1000)
|
||||
const openRes = await doInvoice(res.data).catch(() => {
|
||||
this.disabled = true
|
||||
uni.hideLoading()
|
||||
})
|
||||
if (openRes) {
|
||||
this.disabled = true
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '已申请',
|
||||
icon: 'success'
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 1000)
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
<template>
|
||||
<view class="min-height bg-gray-light">
|
||||
<uv-empty v-if="!list.length"/>
|
||||
<view v-else class="flex flex-col justify-center items-center w-100p">
|
||||
<view class="card m-20 text-25 w-90p" v-for="(item, index) in list" :key="index">
|
||||
<view class="font-bold">订单号: {{ item.thinkOrder.orderNum }}</view>
|
||||
<view class="my-10">下单时间: {{
|
||||
dayjs(item.thinkOrder.createTime * 1000).format('YYYY-MM-DD HH:mm:ss')
|
||||
}}
|
||||
</view>
|
||||
<view class="my-10">下申请时间: {{ dayjs(item.createTime).format('YYYY-MM-DD HH:mm:ss') }}</view>
|
||||
<view class="my-10">申请原因: {{ item.reqReason }}</view>
|
||||
<view class="my-10">场馆: {{ item.thinkOrder.siteName }}</view>
|
||||
<view class="my-10 flex justify-start items-center">
|
||||
<text>预定信息:</text>
|
||||
<view class="flex justify-center items-start flex-col ml-10">
|
||||
<view class="mb-15" v-for="(booking, bookingIndex) in item.bookingList" :key="bookingIndex">{{
|
||||
booking
|
||||
}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="my-10 flex justify-start items-center">
|
||||
<text>审核状态:</text>
|
||||
<text class="ml-10" v-if="item.status === 0">待审核</text>
|
||||
<text class="ml-10 text-green" v-else-if="item.status === 1">已同意</text>
|
||||
<text class="ml-10 text-red" v-else-if="item.status === 2">已拒绝</text>
|
||||
</view>
|
||||
<view class="my-10" v-if="item.status === 2">拒绝原因: {{ item.refuseReason }}</view>
|
||||
<view class="py-15 border-top flex justify-center items-center" v-if="item.status === 0">
|
||||
<view class="mx-10 flex-1">
|
||||
<uv-button type="success" shape="circle" @click="pass(item)">通过</uv-button>
|
||||
</view>
|
||||
<view class="mx-10 flex-1">
|
||||
<uv-button type="error" shape="circle" @click="refuse(item)">拒绝</uv-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {ref} from 'vue'
|
||||
import {listThinkOrderOffCheck, updateThinkOrderOffCheck} from "@/api/think/thinkOrderOffCheck";
|
||||
import {onLoad} from "@dcloudio/uni-app";
|
||||
import dayjs from "dayjs";
|
||||
import * as Api from "@/api/booking/userInvoice";
|
||||
|
||||
const list = ref([])
|
||||
const getList = async () => {
|
||||
list.value = await listThinkOrderOffCheck()
|
||||
list.value = list.value.map(item => {
|
||||
item.bookingList = []
|
||||
item.thinkOrder.thinkOrderInfos.forEach(d => {
|
||||
item.bookingList.push(`${d.fieldName}(${d.dateTime})`)
|
||||
})
|
||||
return item
|
||||
})
|
||||
}
|
||||
|
||||
const pass = async (item) => {
|
||||
uni.showLoading({title: '加载中'})
|
||||
await updateThinkOrderOffCheck({
|
||||
id: item.id,
|
||||
status: 1
|
||||
}).catch(err => {
|
||||
uni.hideLoading()
|
||||
})
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '操作成功',
|
||||
icon: 'none'
|
||||
})
|
||||
await getList()
|
||||
}
|
||||
const refuse = async (item) => {
|
||||
uni.showModal({
|
||||
title: '请输入拒绝原因',
|
||||
editable: true,
|
||||
success: async (o) => {
|
||||
if (o.confirm) {
|
||||
if (!o.content) {
|
||||
return uni.showToast({
|
||||
title: '请输入拒绝原因',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
uni.showLoading({title: '加载中'})
|
||||
await updateThinkOrderOffCheck({
|
||||
id: item.id,
|
||||
status: 2,
|
||||
refuseReason: o.content
|
||||
}).catch(err => {
|
||||
uni.hideLoading()
|
||||
})
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '操作成功',
|
||||
icon: 'none'
|
||||
})
|
||||
await getList()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
onLoad(() => {
|
||||
getList()
|
||||
})
|
||||
</script>
|
||||
@@ -0,0 +1,145 @@
|
||||
<template>
|
||||
<view class="record-page">
|
||||
<view v-if="records.length" class="record-list">
|
||||
<view
|
||||
class="record-card"
|
||||
v-for="(item, index) in records"
|
||||
:key="item.id || index"
|
||||
>
|
||||
<view class="card-header">
|
||||
<view class="flex flex-col justify-start items-start">
|
||||
<text class="card-title">{{ getCardLabel(item) }}</text>
|
||||
<text class="text-24 mt-15" v-if="item.card">卡号:{{ item.card.code }}</text>
|
||||
<text class="text-24 mt-15" v-if="item.usersVip">卡号:{{ item.usersVip.code }}</text>
|
||||
</view>
|
||||
<text class="card-amount">+¥{{ item.amount }}</text>
|
||||
</view>
|
||||
<view class="card-footer">
|
||||
<text class="card-time">{{ formatTime(item.createTime) }}</text>
|
||||
<text class="card-id" v-if="item.id">单号:{{ item.orderNo }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<uv-empty
|
||||
v-else-if="!loading"
|
||||
mode="list"
|
||||
icon="https://oss.wsdns.cn/20260507/5dbf1446663e49b3b13d637d100ab917.png"
|
||||
text="暂无充值记录"
|
||||
></uv-empty>
|
||||
|
||||
<view v-if="loading" class="load-tips">加载中...</view>
|
||||
<view v-else-if="finished && records.length" class="load-tips">没有更多了</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
||||
import dayjs from 'dayjs';
|
||||
import { pageThinkSmallRecharge } from '@/api/think/thinkSmallRecharge';
|
||||
|
||||
const records = ref([]);
|
||||
const page = ref(1);
|
||||
const limit = 20;
|
||||
const loading = ref(false);
|
||||
const finished = ref(false);
|
||||
|
||||
const formatTime = (timestamp) => {
|
||||
if (!timestamp) return '';
|
||||
return dayjs(timestamp * 1000).format('YYYY-MM-DD HH:mm');
|
||||
};
|
||||
|
||||
const getCardLabel = (item) => {
|
||||
if (item.vid) return 'VIP卡充值';
|
||||
if (item.cid) return 'IC卡充值';
|
||||
return '充值';
|
||||
};
|
||||
|
||||
const fetchRecords = async () => {
|
||||
if (loading.value || finished.value) return;
|
||||
loading.value = true;
|
||||
try {
|
||||
const res = await pageThinkSmallRecharge({
|
||||
page: page.value,
|
||||
limit
|
||||
});
|
||||
const list = (res && res.list) || [];
|
||||
records.value = records.value.concat(list);
|
||||
const total = res && typeof res.count === 'number' ? res.count : 0;
|
||||
|
||||
if (total && records.value.length >= total) {
|
||||
finished.value = true;
|
||||
} else if (list.length < limit) {
|
||||
finished.value = true;
|
||||
} else {
|
||||
page.value += 1;
|
||||
}
|
||||
} catch (error) {
|
||||
uni.showToast({
|
||||
title: error.message || '获取记录失败',
|
||||
icon: 'none'
|
||||
});
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
onLoad(() => {
|
||||
fetchRecords();
|
||||
});
|
||||
|
||||
onReachBottom(() => {
|
||||
fetchRecords();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.record-page {
|
||||
min-height: 100vh;
|
||||
padding: 20rpx;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.record-card {
|
||||
background-color: #fff;
|
||||
border-radius: 16rpx;
|
||||
padding: 24rpx 28rpx;
|
||||
margin-bottom: 20rpx;
|
||||
box-shadow: 0 8rpx 20rpx rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.card-amount {
|
||||
font-size: 32rpx;
|
||||
color: #d81e06;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.card-footer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
color: #888;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.load-tips {
|
||||
text-align: center;
|
||||
color: #888;
|
||||
font-size: 24rpx;
|
||||
padding: 16rpx 0;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,485 @@
|
||||
<template>
|
||||
<view class="recharge-page">
|
||||
<view class="record-entry" @click="goRechargeRecord">
|
||||
<text class="record-text">充值记录</text>
|
||||
<text class="record-arrow">></text>
|
||||
</view>
|
||||
|
||||
<view class="card-type-section">
|
||||
<view class="section-title">选择卡类型</view>
|
||||
<view class="card-type-tabs">
|
||||
<view
|
||||
class="tab-item"
|
||||
:class="{ active: cardType === 'vip' }"
|
||||
@click="changeCardType('vip')"
|
||||
>
|
||||
VIP卡
|
||||
</view>
|
||||
<view
|
||||
class="tab-item"
|
||||
:class="{ active: cardType === 'ic' }"
|
||||
@click="changeCardType('ic')"
|
||||
>
|
||||
IC卡
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="search-section">
|
||||
<view class="section-title">手机号搜索</view>
|
||||
<view class="search-box">
|
||||
<input
|
||||
class="phone-input"
|
||||
v-model="phone"
|
||||
type="number"
|
||||
maxlength="11"
|
||||
placeholder="请输入手机号"
|
||||
@input="onPhoneInput"
|
||||
/>
|
||||
<button
|
||||
class="search-btn"
|
||||
:disabled="!canSearch"
|
||||
@click="searchCard"
|
||||
>
|
||||
搜索
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="card-list-section" v-if="cardList.length > 0">
|
||||
<view class="section-title">选择卡片</view>
|
||||
<view class="card-list">
|
||||
<view
|
||||
class="card-item"
|
||||
v-for="(item, index) in cardList"
|
||||
:key="index"
|
||||
:class="{ selected: selectedCard && selectedCard.id === item.id }"
|
||||
@click="selectCard(item)"
|
||||
>
|
||||
<view class="card-name">{{ item.name || item.cardNo }}</view>
|
||||
<view class="card-info" v-if="cardType === 'vip'">
|
||||
<text>有效期至: {{ formatTime(item.expireTime) }}</text>
|
||||
</view>
|
||||
<view class="card-info" v-if="cardType === 'ic'">
|
||||
<text>卡号: {{ item.cardNo }}</text>
|
||||
</view>
|
||||
<view class="card-balance" v-if="item.remainingMoney !== undefined">
|
||||
余额: ¥{{ item.remainingMoney }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="amount-section" v-if="selectedCard">
|
||||
<view class="section-title">充值金额</view>
|
||||
<view class="amount-input-box">
|
||||
<text class="currency">¥</text>
|
||||
<input
|
||||
class="amount-input"
|
||||
v-model="amount"
|
||||
type="digit"
|
||||
placeholder="请输入充值金额"
|
||||
@input="onAmountInput"
|
||||
/>
|
||||
</view>
|
||||
<view class="quick-amount">
|
||||
<view
|
||||
class="amount-btn"
|
||||
v-for="(item, index) in quickAmounts"
|
||||
:key="index"
|
||||
@click="selectQuickAmount(item)"
|
||||
>
|
||||
{{ item }}元
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="submit-section" v-if="selectedCard && amount">
|
||||
<button class="submit-btn" @click="submitRecharge">
|
||||
确认充值
|
||||
</button>
|
||||
</view>
|
||||
|
||||
<uv-loading-page :loading="loading" loading-text="加载中..."></uv-loading-page>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {listThinkCard} from '@/api/think/thinkCard';
|
||||
import {listThinkUsersVip} from '@/api/think/thinkUsersVip';
|
||||
import dayjs from 'dayjs';
|
||||
import {addThinkSmallRecharge} from "@/api/think/thinkSmallRecharge";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
cardType: 'vip', // vip 或 ic
|
||||
phone: '',
|
||||
cardList: [],
|
||||
selectedCard: null,
|
||||
amount: '',
|
||||
quickAmounts: [10, 20, 30, 50, 100],
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
canSearch() {
|
||||
return this.phone.length === 11;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goRechargeRecord() {
|
||||
uni.navigateTo({
|
||||
url: '/package/user/recharge-record'
|
||||
});
|
||||
},
|
||||
|
||||
changeCardType(type) {
|
||||
this.cardType = type;
|
||||
this.cardList = [];
|
||||
this.selectedCard = null;
|
||||
this.amount = '';
|
||||
},
|
||||
|
||||
onPhoneInput(e) {
|
||||
this.phone = e.detail.value;
|
||||
},
|
||||
|
||||
async searchCard() {
|
||||
if (!this.canSearch) {
|
||||
uni.showToast({
|
||||
title: '请输入正确的手机号',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
try {
|
||||
|
||||
if (this.cardType === 'vip') {
|
||||
this.cardList = await listThinkUsersVip({keywords: this.phone, forAdmin: true});
|
||||
} else {
|
||||
this.cardList = await listThinkCard({phone: this.phone, forAdmin: true});
|
||||
}
|
||||
|
||||
if (this.cardList.length === 0) {
|
||||
uni.showToast({
|
||||
title: '未找到相关卡片',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
uni.showToast({
|
||||
title: error.message || '搜索失败',
|
||||
icon: 'none'
|
||||
});
|
||||
} finally {
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
|
||||
selectCard(card) {
|
||||
this.selectedCard = card;
|
||||
},
|
||||
|
||||
onAmountInput(e) {
|
||||
this.amount = e.detail.value;
|
||||
},
|
||||
|
||||
selectQuickAmount(amount) {
|
||||
this.amount = amount.toString();
|
||||
},
|
||||
|
||||
formatTime(timestamp) {
|
||||
if (!timestamp) return '';
|
||||
return dayjs(timestamp * 1000).format('YYYY-MM-DD');
|
||||
},
|
||||
|
||||
submitRecharge() {
|
||||
console.log(this.selectedCard)
|
||||
if (!this.selectedCard) {
|
||||
uni.showToast({
|
||||
title: '请选择卡片',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.amount || parseFloat(this.amount) <= 0) {
|
||||
uni.showToast({
|
||||
title: '请输入正确的充值金额',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (parseFloat(this.amount) > 100) {
|
||||
uni.showToast({
|
||||
title: '充值金额不能大于100元',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
uni.showModal({
|
||||
title: '确认充值',
|
||||
content: `确认为${this.cardType === 'vip' ? 'VIP卡' : 'IC卡'}充值 ¥${this.amount} 元?`,
|
||||
success: async (res) => {
|
||||
if (res.confirm) {
|
||||
const data = {
|
||||
amount: this.amount
|
||||
}
|
||||
if (this.cardType === 'vip') {
|
||||
data.vid = this.selectedCard.id;
|
||||
} else {
|
||||
data.cid = this.selectedCard.id;
|
||||
}
|
||||
const res = await addThinkSmallRecharge(data).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: 'none'
|
||||
});
|
||||
})
|
||||
if (!res) return
|
||||
const orderInfo = res.data
|
||||
uni.requestPayment({
|
||||
provider: orderInfo.provider, // 服务提供商
|
||||
timeStamp: orderInfo.timeStamp, // 时间戳
|
||||
nonceStr: orderInfo.nonceStr, // 随机字符串
|
||||
package: orderInfo.package,
|
||||
signType: orderInfo.signType, // 签名算法
|
||||
paySign: orderInfo.paySign, // 签名
|
||||
success: function (res) {
|
||||
uni.showToast({
|
||||
title: '支付成功',
|
||||
icon: 'success'
|
||||
});
|
||||
this.cardList = [];
|
||||
this.selectedCard = null;
|
||||
this.amount = '';
|
||||
},
|
||||
fail: function (err) {
|
||||
console.log('支付失败', err);
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.recharge-page {
|
||||
min-height: 100vh;
|
||||
background-color: #f5f5f5;
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.card-type-section {
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.record-entry {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
padding: 24rpx 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.record-text {
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.record-arrow {
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.card-type-tabs {
|
||||
display: flex;
|
||||
gap: 20rpx;
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
flex: 1;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
background: #f5f5f5;
|
||||
border-radius: 12rpx;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.tab-item.active {
|
||||
background: #d81e06;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.search-section {
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.search-box {
|
||||
display: flex;
|
||||
gap: 20rpx;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.phone-input {
|
||||
flex: 1;
|
||||
height: 80rpx;
|
||||
padding: 0 20rpx;
|
||||
background: #f5f5f5;
|
||||
border-radius: 12rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.search-btn {
|
||||
width: 160rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
background: #d81e06;
|
||||
color: #fff;
|
||||
border-radius: 12rpx;
|
||||
font-size: 28rpx;
|
||||
padding: 0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.search-btn[disabled] {
|
||||
background: #ccc;
|
||||
}
|
||||
|
||||
.card-list-section {
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.card-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20rpx;
|
||||
}
|
||||
|
||||
.card-item {
|
||||
padding: 30rpx;
|
||||
background: #f5f5f5;
|
||||
border-radius: 12rpx;
|
||||
border: 2rpx solid transparent;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.card-item.selected {
|
||||
border-color: #d81e06;
|
||||
background: #fff5f5;
|
||||
}
|
||||
|
||||
.card-name {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.card-info {
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
margin-bottom: 5rpx;
|
||||
}
|
||||
|
||||
.card-balance {
|
||||
font-size: 28rpx;
|
||||
color: #d81e06;
|
||||
font-weight: 600;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.amount-section {
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.amount-input-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100rpx;
|
||||
padding: 0 20rpx;
|
||||
background: #f5f5f5;
|
||||
border-radius: 12rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.currency {
|
||||
font-size: 40rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.amount-input {
|
||||
flex: 1;
|
||||
font-size: 40rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.quick-amount {
|
||||
display: flex;
|
||||
gap: 20rpx;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.amount-btn {
|
||||
flex: 1;
|
||||
min-width: 150rpx;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
text-align: center;
|
||||
background: #f5f5f5;
|
||||
border-radius: 12rpx;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.submit-section {
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
||||
.submit-btn {
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
background: #d81e06;
|
||||
color: #fff;
|
||||
border-radius: 45rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
border: none;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user