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