|
@@ -166,7 +166,7 @@ export default defineComponent({
|
|
|
showSelectStudent: false, // 选择学生
|
|
|
studentList: [], // 手机号关联学生列表
|
|
|
studentItem: {} as any, // 选择的学生
|
|
|
- joinType: '' as 'digitalize' | 'tradition',
|
|
|
+ joinType: 'digitalize' as 'digitalize' | 'tradition',
|
|
|
gradeList: [] as any,
|
|
|
classList: [] as any,
|
|
|
saveUserId: null as any,
|
|
@@ -188,8 +188,8 @@ export default defineComponent({
|
|
|
showOtherSchool: false,
|
|
|
showCloseButton: true, // 是否显示关闭按钮
|
|
|
showOtherMessage: '',
|
|
|
- /** limit 超限制,change 更换学生,nickname 名称不一致 */
|
|
|
- otherType: '' as 'limit' | 'change' | 'nickname' | 'member',
|
|
|
+ /** limit 超限制,change 更换学生,nickname 名称不一致 member 会员购买, payment 支付方式 */
|
|
|
+ otherType: '' as 'limit' | 'change' | 'nickname' | 'member' | 'payment',
|
|
|
showCancelButton: true,
|
|
|
cancelButtonColor: '',
|
|
|
cancelButtonText: '取消',
|
|
@@ -419,7 +419,8 @@ export default defineComponent({
|
|
|
let originAmount: number = 0; // 原价
|
|
|
const vipList: any[] = studentRegisterStore.getVip;
|
|
|
vipList.forEach((vip: any) => {
|
|
|
- amount += Number(vip.currentPrice);
|
|
|
+ amount +=
|
|
|
+ forms.joinType === 'digitalize' ? Number(vip.currentPrice) : 0;
|
|
|
originAmount += Number(vip.originalPrice);
|
|
|
});
|
|
|
|
|
@@ -671,10 +672,8 @@ export default defineComponent({
|
|
|
forms.showMessage = '团购时间已截止,感谢您的参与'; //result.message;
|
|
|
forms.showButton = false;
|
|
|
}
|
|
|
- console.log('-----');
|
|
|
return false;
|
|
|
} else {
|
|
|
- console.log('=====');
|
|
|
return true;
|
|
|
}
|
|
|
} catch {}
|
|
@@ -684,8 +683,11 @@ export default defineComponent({
|
|
|
const onRegisterSubmit = async () => {
|
|
|
try {
|
|
|
// 请求是否有待支付订单,如果有则自动关闭
|
|
|
- const status = await paymentOrderUnpaid();
|
|
|
- if (status) return;
|
|
|
+ if (forms.joinType !== 'tradition') {
|
|
|
+ const status = await paymentOrderUnpaid();
|
|
|
+ if (status) return;
|
|
|
+ }
|
|
|
+
|
|
|
const schoolInfo = await request.get(
|
|
|
'/edu-app/userPaymentOrder/registerStatus/' + forms.schoolId
|
|
|
);
|
|
@@ -819,22 +821,26 @@ export default defineComponent({
|
|
|
if (isFinal && forms.joinType === 'tradition') {
|
|
|
const studentResult = await updateStudentInfo();
|
|
|
if (!studentResult) return;
|
|
|
- setTimeout(() => {
|
|
|
- showToast('您已通过数字化方式报名成功');
|
|
|
- }, 100);
|
|
|
- return true;
|
|
|
+ // setTimeout(() => {
|
|
|
+ // showToast('您已通过数字化方式报名成功');
|
|
|
+ // }, 100);
|
|
|
+ return false;
|
|
|
}
|
|
|
|
|
|
// 提交报名信息时,判断该手机号是否存在待支付订单,若存则判断本次提交的报名方式,若本次提交的是团购则提示【您有待支付的报名订单,是否继续支付 重新下单/继续支付】,点击重新下单时,关闭老订单,创建新订单;若本次提交的是自备,则提示 【您有数字化方式报名的待支付订单,请关闭订单后重新报名 取消/关闭】取消则停留在当前界面,关闭则关闭订单,并停留在当前界面,用户需要再次点击报名按钮提交信息
|
|
|
if (isPadding && forms.joinType === 'tradition') {
|
|
|
- forms.dialogStatus = true;
|
|
|
- forms.dialogMessage =
|
|
|
- '您有数字化方式报名的待支付订单,请关闭订单后重新报名';
|
|
|
- forms.cancelButtonText = '取消';
|
|
|
- forms.confirmButtonText = '关闭';
|
|
|
- forms.dialogConfig = paddingConfig;
|
|
|
- forms.messageAlign = 'left';
|
|
|
- return true;
|
|
|
+ // forms.dialogStatus = true;
|
|
|
+ // forms.dialogMessage =
|
|
|
+ // '您有数字化方式报名的待支付订单,请关闭订单后重新报名';
|
|
|
+ // forms.cancelButtonText = '取消';
|
|
|
+ // forms.confirmButtonText = '关闭';
|
|
|
+ // forms.dialogConfig = paddingConfig;
|
|
|
+ // forms.messageAlign = 'left';
|
|
|
+ // const cancelStatus = await cancelPaymentOrder();
|
|
|
+ // if (cancelStatus) {
|
|
|
+ // await paymentContinue();
|
|
|
+ // }
|
|
|
+ return false;
|
|
|
}
|
|
|
if (isPadding && forms.joinType === 'digitalize') {
|
|
|
// 最终确认,有待支付订单直接去支付,没有则才会创建订单
|
|
@@ -895,7 +901,7 @@ export default defineComponent({
|
|
|
const paymentContinue = async () => {
|
|
|
try {
|
|
|
const vipList = studentRegisterStore.getVip;
|
|
|
- const goodsList = studentRegisterStore.getGoods;
|
|
|
+ // const goodsList = studentRegisterStore.getGoods;
|
|
|
const params: any[] = [];
|
|
|
vipList.forEach((vip: any) => {
|
|
|
params.push({
|
|
@@ -908,19 +914,19 @@ export default defineComponent({
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- goodsList.forEach((goods: any) => {
|
|
|
- params.push({
|
|
|
- goodsId: goods.productId,
|
|
|
- goodsNum: goods.quantity,
|
|
|
- goodsType: 'INSTRUMENTS',
|
|
|
- paymentCashAmount: goods.price, // 现金支付金额
|
|
|
- paymentCouponAmount: 0, // 优惠券金额
|
|
|
- goodsSkuId: goods.productSkuId
|
|
|
- });
|
|
|
- });
|
|
|
+ // goodsList.forEach((goods: any) => {
|
|
|
+ // params.push({
|
|
|
+ // goodsId: goods.productId,
|
|
|
+ // goodsNum: goods.quantity,
|
|
|
+ // goodsType: 'INSTRUMENTS',
|
|
|
+ // paymentCashAmount: goods.price, // 现金支付金额
|
|
|
+ // paymentCouponAmount: 0, // 优惠券金额
|
|
|
+ // goodsSkuId: goods.productSkuId
|
|
|
+ // });
|
|
|
+ // });
|
|
|
// 创建订单
|
|
|
const updateStatus = await updateStudentInfo();
|
|
|
- console.log(updateStatus, 'updateStatus');
|
|
|
+ // console.log(updateStatus, 'updateStatus');
|
|
|
if (!updateStatus) return;
|
|
|
|
|
|
const result = await request.post(
|
|
@@ -1302,9 +1308,9 @@ export default defineComponent({
|
|
|
秒
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class={styles.timerTip}>
|
|
|
+ {/* <div class={styles.timerTip}>
|
|
|
为了确保您能顺利参与学习,请在规定时间内报名。
|
|
|
- </div>
|
|
|
+ </div> */}
|
|
|
</div>
|
|
|
)}
|
|
|
|
|
@@ -1312,11 +1318,9 @@ export default defineComponent({
|
|
|
class={[
|
|
|
styles.studentSection,
|
|
|
styles.studentSectionForm,
|
|
|
- styles.noSendDay
|
|
|
- ]}
|
|
|
- // style={{ display: 'none' }}
|
|
|
- >
|
|
|
- <div class={styles.title3}></div>
|
|
|
+ forms.giftVipDay <= 0 && styles.noSendDay
|
|
|
+ ]}>
|
|
|
+ {/* <div class={styles.title1}></div> */}
|
|
|
|
|
|
<Form labelAlign="left" class={styles.registerForm}>
|
|
|
<Field
|
|
@@ -1346,6 +1350,7 @@ export default defineComponent({
|
|
|
</Field>
|
|
|
<div class={['van-hairline--bottom', styles.fieldTipsGroup]}>
|
|
|
<div class={[styles.fieldTips]}>
|
|
|
+ <i class={styles.iconQuestion}></i>
|
|
|
手机号是音乐数字课堂的唯一登录账户
|
|
|
</div>
|
|
|
</div>
|
|
@@ -1387,22 +1392,8 @@ export default defineComponent({
|
|
|
)
|
|
|
}}
|
|
|
</Field>
|
|
|
- </Form>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div
|
|
|
- class={[
|
|
|
- styles.studentSection,
|
|
|
- styles.studentSectionForm,
|
|
|
- forms.giftVipDay <= 0 && styles.noSendDay
|
|
|
- ]}
|
|
|
- // style={{ display: 'none' }}
|
|
|
- >
|
|
|
- <div class={styles.title1}></div>
|
|
|
-
|
|
|
- <Form labelAlign="left" class={styles.registerForm}>
|
|
|
{/* 大于等于2,则可以切换学生 */}
|
|
|
- {forms.studentList.length > 1 && (
|
|
|
+ {/* {forms.studentList.length > 1 && (
|
|
|
<div
|
|
|
class={[
|
|
|
styles.selectStudentGroup,
|
|
@@ -1420,7 +1411,7 @@ export default defineComponent({
|
|
|
: '新增学生'}
|
|
|
</span>
|
|
|
</div>
|
|
|
- )}
|
|
|
+ )} */}
|
|
|
|
|
|
<Field
|
|
|
clearable={false}
|
|
@@ -1430,8 +1421,24 @@ export default defineComponent({
|
|
|
placeholder="请输入学生姓名"
|
|
|
autocomplete="off"
|
|
|
maxlength={14}
|
|
|
- v-model={studentInfo.extra.nickname}
|
|
|
- />
|
|
|
+ v-model={studentInfo.extra.nickname}>
|
|
|
+ {{
|
|
|
+ extra: () =>
|
|
|
+ forms.studentList.length > 1 && (
|
|
|
+ <div
|
|
|
+ class={[
|
|
|
+ styles.selectStudentGroup,
|
|
|
+ forms.showSelectStudent &&
|
|
|
+ styles.selectStudentGroupChecked
|
|
|
+ ]}
|
|
|
+ onClick={() => (forms.showSelectStudent = true)}>
|
|
|
+ <span>
|
|
|
+ {forms.studentItem.userId ? '切换' : '新增'}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ )
|
|
|
+ }}
|
|
|
+ </Field>
|
|
|
<Field
|
|
|
clearable={false}
|
|
|
required
|
|
@@ -1530,7 +1537,7 @@ export default defineComponent({
|
|
|
)}
|
|
|
</Form>
|
|
|
</div>
|
|
|
- <div class={styles.studentSection}>
|
|
|
+ {/* <div class={styles.studentSection}>
|
|
|
<div class={styles.title2}></div>
|
|
|
|
|
|
<div class={styles.goodsGroup}>
|
|
@@ -1581,63 +1588,85 @@ export default defineComponent({
|
|
|
<div class={styles.goodsInner}>传统方式</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
-
|
|
|
- {forms.joinType === 'digitalize' && (
|
|
|
- <div class={[styles.goodsExtra]}>
|
|
|
- <i class={styles.iconArrow}></i>
|
|
|
- <Cell border={false} class={styles.goodsCell}>
|
|
|
- {{
|
|
|
- icon: () => (
|
|
|
+ </div> */}
|
|
|
+
|
|
|
+ <div class={[styles.goodsExtra]}>
|
|
|
+ {/* <i class={styles.iconArrow}></i> */}
|
|
|
+ <Cell
|
|
|
+ border={false}
|
|
|
+ class={styles.goodsCell}
|
|
|
+ center
|
|
|
+ onClick={() => {
|
|
|
+ // console.log(forms.joinType, 'joinType');
|
|
|
+ if (forms.joinType === 'digitalize') {
|
|
|
+ otherParams.showOtherMessage = `没有专业工具的辅助,将会增加乐器学练难度`;
|
|
|
+ otherParams.showOtherSchool = true;
|
|
|
+ otherParams.showCloseButton = true;
|
|
|
+ otherParams.showCancelButton = true;
|
|
|
+ otherParams.cancelButtonColor = '';
|
|
|
+ otherParams.cancelButtonText = '确认取消';
|
|
|
+ otherParams.confirmButtonColor = '';
|
|
|
+ otherParams.confirmButtonText = '放弃取消';
|
|
|
+ otherParams.otherType = 'payment';
|
|
|
+ otherParams.messageAlign = 'left';
|
|
|
+ } else if (forms.joinType === 'tradition') {
|
|
|
+ forms.joinType = 'digitalize';
|
|
|
+ }
|
|
|
+ }}>
|
|
|
+ {{
|
|
|
+ icon: () => (
|
|
|
+ <i
|
|
|
+ class={[
|
|
|
+ styles.iconChecked,
|
|
|
+ forms.joinType === 'digitalize' && styles.selected
|
|
|
+ ]}></i>
|
|
|
+ ),
|
|
|
+ title: () => (
|
|
|
+ <div class={styles.section}>
|
|
|
<Image
|
|
|
class={styles.img}
|
|
|
src={forms.detailVip.goodsUrl || tuangou}
|
|
|
/>
|
|
|
- ),
|
|
|
- title: () => (
|
|
|
- <div class={styles.section}>
|
|
|
- <div class={styles.sectionContent}>
|
|
|
- <h2>
|
|
|
- {/* {forms.detailVip.goodsName} */}
|
|
|
- <img src={icon5} class={styles.goodsName} />
|
|
|
- <Tag class={styles.brandName}>
|
|
|
- {/* {forms.detailVip.brandName} */}
|
|
|
- 12个月
|
|
|
- </Tag>
|
|
|
- </h2>
|
|
|
- <p class={[styles.model]}>
|
|
|
- {/* 解决学生不会练、不知练的对错、家长无法辅导、无需再额外请老师 */}
|
|
|
- {/* {forms.detailVip.description} */}
|
|
|
- <p>
|
|
|
- <i></i>解决学生不会练、不知练的对错
|
|
|
- </p>
|
|
|
- <p>
|
|
|
- <i></i>家长无法辅导、无需再额外请老师
|
|
|
- </p>
|
|
|
+ <div class={styles.sectionContent}>
|
|
|
+ <h2>
|
|
|
+ {/* {forms.detailVip.goodsName} */}
|
|
|
+ <img src={icon5} class={styles.goodsName} />
|
|
|
+ {/* <Tag class={styles.brandName}>
|
|
|
+ 12个月
|
|
|
+ </Tag> */}
|
|
|
+ </h2>
|
|
|
+ <p class={[styles.model]}>
|
|
|
+ {/* 解决学生不会练、不知练的对错、家长无法辅导、无需再额外请老师 */}
|
|
|
+ {/* {forms.detailVip.description} */}
|
|
|
+ <p>
|
|
|
+ <i></i>解决学生不会练、不知练的对错
|
|
|
</p>
|
|
|
- {/* <span class={styles.sendInstrument}>赠送课堂乐器</span> */}
|
|
|
- <img src={icon6} class={styles.sendInstrument} />
|
|
|
- </div>
|
|
|
+ <p>
|
|
|
+ <i></i>家长无法辅导、无需再额外请老师
|
|
|
+ </p>
|
|
|
+ </p>
|
|
|
+ {/* <span class={styles.sendInstrument}>赠送课堂乐器</span> */}
|
|
|
+ <img src={icon6} class={styles.sendInstrument} />
|
|
|
</div>
|
|
|
- )
|
|
|
- }}
|
|
|
- </Cell>
|
|
|
-
|
|
|
- {forms.detailVip.membershipDays ? (
|
|
|
- <div class={styles.memberNumer}>
|
|
|
- <img src={iconGift} class={styles.iconGift} />
|
|
|
- <p>
|
|
|
- 现在购买赠送乐器AI学练工具
|
|
|
- <span>{forms.detailVip.membershipDays || 0}</span>天有效期
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- ) : (
|
|
|
- ''
|
|
|
- )}
|
|
|
- </div>
|
|
|
- )}
|
|
|
+ </div>
|
|
|
+ )
|
|
|
+ }}
|
|
|
+ </Cell>
|
|
|
+
|
|
|
+ {/* {forms.detailVip.membershipDays ? (
|
|
|
+ <div class={styles.memberNumer}>
|
|
|
+ <img src={iconGift} class={styles.iconGift} />
|
|
|
+ <p>
|
|
|
+ 现在购买赠送乐器AI学练工具
|
|
|
+ <span>{forms.detailVip.membershipDays || 0}</span>天有效期
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ ) : (
|
|
|
+ ''
|
|
|
+ )} */}
|
|
|
+ </div>
|
|
|
|
|
|
- {forms.joinType === 'tradition' && (
|
|
|
+ {/* {forms.joinType === 'tradition' && (
|
|
|
<div class={styles.goodsTradition}>
|
|
|
<i class={styles.iconArrow}></i>
|
|
|
|
|
@@ -1675,55 +1704,51 @@ export default defineComponent({
|
|
|
'C调、木质、高音德式八孔;'}
|
|
|
{forms.instrumentCode === 'Woodwind' &&
|
|
|
'C调、红木色、树脂或木质;'}
|
|
|
- {/* 管数不限,建议20管以上C调加嘴排箫(音域宽,能演奏更多复杂乐曲,不需要重复更换),黑色,要选择单一原调(调性多学生很难掌握),价格由学生根据自身情况确定。 */}
|
|
|
</div>
|
|
|
</div>
|
|
|
)}
|
|
|
</div>
|
|
|
</div>
|
|
|
- )}
|
|
|
+ )} */}
|
|
|
|
|
|
{forms.joinType && (
|
|
|
<MSticky position="bottom" ref={mstickyRef}>
|
|
|
<div class={styles.paymentContainer}>
|
|
|
- {forms.joinType === 'digitalize' && (
|
|
|
- <>
|
|
|
- <div class={styles.payemntPrice}>
|
|
|
- <img src={giftTip} class={styles.giftTip} />
|
|
|
- <div>
|
|
|
- <span class={styles.needPrice}>
|
|
|
- <i style="font-style: normal">¥ </i>
|
|
|
- <span>{moneyFormat(calcPrice.value.amount)}</span>
|
|
|
- <i class={styles.unit} style="font-style: normal">
|
|
|
- /年
|
|
|
- </i>
|
|
|
- </span>
|
|
|
- {calcPrice.value.originAmount >
|
|
|
- calcPrice.value.amount ? (
|
|
|
- <del class={styles.allPrice}>
|
|
|
- ¥ {moneyFormat(calcPrice.value.originAmount)}
|
|
|
- </del>
|
|
|
- ) : (
|
|
|
- ''
|
|
|
- )}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div
|
|
|
- class={styles.paymentBtn}
|
|
|
- onClick={() => {
|
|
|
- onSubmit();
|
|
|
- }}>
|
|
|
- <Button
|
|
|
- round
|
|
|
- disabled={forms.submitLoading}
|
|
|
- loading={forms.submitLoading}>
|
|
|
- 立即支付
|
|
|
- </Button>
|
|
|
- </div>
|
|
|
- </>
|
|
|
- )}
|
|
|
+ <div class={styles.payemntPrice}>
|
|
|
+ {/* <img src={giftTip} class={styles.giftTip} /> */}
|
|
|
+ <div>
|
|
|
+ <span class={styles.needPrice}>
|
|
|
+ <i style="font-style: normal">¥ </i>
|
|
|
+ <span>{moneyFormat(calcPrice.value.amount)}</span>
|
|
|
+ <i class={styles.unit} style="font-style: normal">
|
|
|
+ /年
|
|
|
+ </i>
|
|
|
+ </span>
|
|
|
+ {calcPrice.value.originAmount > calcPrice.value.amount ? (
|
|
|
+ <del class={styles.allPrice}>
|
|
|
+ ¥ {moneyFormat(calcPrice.value.originAmount)}
|
|
|
+ </del>
|
|
|
+ ) : (
|
|
|
+ ''
|
|
|
+ )}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class={styles.paymentBtn}
|
|
|
+ onClick={() => {
|
|
|
+ onSubmit();
|
|
|
+ }}>
|
|
|
+ <Button
|
|
|
+ round
|
|
|
+ disabled={forms.submitLoading}
|
|
|
+ loading={forms.submitLoading}>
|
|
|
+ {forms.joinType === 'digitalize'
|
|
|
+ ? '报名与支付'
|
|
|
+ : '提交报名'}
|
|
|
+ </Button>
|
|
|
+ </div>
|
|
|
|
|
|
- {forms.joinType === 'tradition' && (
|
|
|
+ {/* {forms.joinType === 'tradition' && (
|
|
|
<div
|
|
|
class={styles.traditionBtn}
|
|
|
onClick={() => {
|
|
@@ -1736,7 +1761,7 @@ export default defineComponent({
|
|
|
提交报名
|
|
|
</Button>
|
|
|
</div>
|
|
|
- )}
|
|
|
+ )} */}
|
|
|
</div>
|
|
|
</MSticky>
|
|
|
)}
|
|
@@ -1965,15 +1990,8 @@ export default defineComponent({
|
|
|
if (forms.registerExpireTime && forms.activeOverStatus) {
|
|
|
applyOver();
|
|
|
}
|
|
|
- // onConfirm={async () => {
|
|
|
- // await paymentContinue();
|
|
|
- // }}
|
|
|
- // onCancel={() => {
|
|
|
- // //取消支付,判断是否有结束时间,是否已经结束
|
|
|
- // if (forms.registerExpireTime && forms.activeOverStatus) {
|
|
|
- // applyOver();
|
|
|
- // }
|
|
|
- // }}
|
|
|
+ } else if (otherParams.otherType === 'payment') {
|
|
|
+ forms.joinType = 'tradition';
|
|
|
}
|
|
|
}}
|
|
|
onConfirm={async () => {
|