调整选课退费相关逻辑
This commit is contained in:
parent
1e99b1ef23
commit
d97d77430a
@ -25,7 +25,7 @@
|
||||
@click="goHome"
|
||||
/>
|
||||
<u-button
|
||||
text="提交"
|
||||
:text="isSubmitting ? '申请中...' : '提交申请'"
|
||||
class="mr-15 mr-7"
|
||||
type="primary"
|
||||
@click="submit"
|
||||
@ -44,10 +44,13 @@ import { showToast } from "@/utils/uniapp";
|
||||
import dayjs from "dayjs";
|
||||
import { useUserStore } from "@/store/modules/user";
|
||||
import { useCommonStore } from "@/store/modules/common";
|
||||
import { useDebounce } from "@/utils/debounce";
|
||||
|
||||
const { getCurXs, getUser } = useUserStore();
|
||||
const { findByPid } = useDicStore();
|
||||
const commonStore = useCommonStore();
|
||||
// 替换 isSubmitting 状态为 useDebounce
|
||||
const { isProcessing: isSubmitting, debounce } = useDebounce(2000);
|
||||
|
||||
// 接收外部传入属性
|
||||
const props = withDefaults(defineProps<{
|
||||
@ -214,7 +217,7 @@ const validateTime = () => {
|
||||
return true;
|
||||
}
|
||||
|
||||
const submit = async () => {
|
||||
const submit = debounce(async () => {
|
||||
const fd = await getValue();
|
||||
if (!validateTime()) {
|
||||
return;
|
||||
@ -243,7 +246,7 @@ const submit = async () => {
|
||||
showToast({ title: res.message, icon: "error" });
|
||||
}
|
||||
}, 500);
|
||||
};
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@ import { imagUrl } from "@/utils";
|
||||
// 接收外部传入属性并设置默认值
|
||||
const props = withDefaults(defineProps<{
|
||||
dataList: any[];
|
||||
canSelected: boolean,
|
||||
canSelected?: boolean,
|
||||
}>(), {
|
||||
xk: () => ({}),
|
||||
canSelected: false,
|
||||
|
||||
@ -7,12 +7,32 @@
|
||||
<!-- 课程信息卡片 -->
|
||||
<XkPaySuccessXkkc :dataList="xkTfQdList" />
|
||||
|
||||
<!-- 退费信息卡片 -->
|
||||
<!-- 家长信息卡片 -->
|
||||
<view class="xkTf-card">
|
||||
<view class="card-title">家长信息</view>
|
||||
<view class="card-body">
|
||||
<view class="info-column">
|
||||
<text class="label">退费说明:</text>
|
||||
<text class="value">{{ xkTf.tfSm }}</text>
|
||||
<text class="label">家长姓名:</text>
|
||||
<text class="value">{{ xkTf.jzXm }}</text>
|
||||
</view>
|
||||
<view class="info-column">
|
||||
<text class="label">手机号:</text>
|
||||
<text class="value">{{ xkTf.sjh }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 退费信息卡片 -->
|
||||
<view class="xkTf-card">
|
||||
<view class="card-title">缴费信息</view>
|
||||
<view class="card-body">
|
||||
<view class="info-column">
|
||||
<text class="label">开户人:</text>
|
||||
<text class="value">{{ xkTf.khrXm }}</text>
|
||||
</view>
|
||||
<view class="info-column">
|
||||
<text class="label">银行账号:</text>
|
||||
<text class="value">{{ xkTf.khZh }}</text>
|
||||
</view>
|
||||
<view class="info-column">
|
||||
<text class="label">缴费凭证:</text>
|
||||
|
||||
@ -8,16 +8,14 @@
|
||||
<!-- 课程信息卡片 -->
|
||||
<XkPaySuccessXkkc :dataList="dataList" :can-selected="true" ref="xkQdRef" />
|
||||
|
||||
<!-- 表单卡片 -->
|
||||
<view class="form-card">
|
||||
<BasicForm @register="register" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<template #bottom>
|
||||
<view class="white-bg-color py-5">
|
||||
<!-- 表单卡片 -->
|
||||
<view class="form-card">
|
||||
|
||||
<BasicForm @register="register" />
|
||||
|
||||
</view>
|
||||
<view class="flex-row items-center pb-10 pt-5">
|
||||
<u-button
|
||||
text="返回"
|
||||
@ -61,18 +59,41 @@ const xkQdRef = ref<any>(null);
|
||||
|
||||
const [register, { getValue, setValue }] = useForm({
|
||||
schema: [
|
||||
{ title: "家长信息" },
|
||||
{
|
||||
field: "tfSm",
|
||||
label: "退费说明",
|
||||
field: "jzXm",
|
||||
label: "家长姓名",
|
||||
component: "BasicInput",
|
||||
required: true,
|
||||
itemProps: {
|
||||
labelPosition: "top",
|
||||
},
|
||||
componentProps: {
|
||||
type: "textarea",
|
||||
componentProps: { },
|
||||
},
|
||||
{
|
||||
field: "sjh",
|
||||
label: "手机号",
|
||||
component: "BasicInput",
|
||||
required: true,
|
||||
componentProps: {
|
||||
maxlength: 11,
|
||||
minlength: 11,
|
||||
type: "number",
|
||||
},
|
||||
},
|
||||
{ interval: true },
|
||||
{ title: "缴费信息" },
|
||||
{
|
||||
field: "khrXm",
|
||||
label: "开户人",
|
||||
component: "BasicInput",
|
||||
required: true,
|
||||
componentProps: { },
|
||||
},
|
||||
{
|
||||
field: "khZh",
|
||||
label: "银行账号",
|
||||
component: "BasicInput",
|
||||
required: true,
|
||||
componentProps: { },
|
||||
},
|
||||
{
|
||||
field: "jfPz",
|
||||
label: "缴费凭证",
|
||||
@ -191,7 +212,8 @@ onLoad((options:any) => {
|
||||
}
|
||||
|
||||
.form-card {
|
||||
margin: 0 15px;
|
||||
margin: 0 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user