|
@@ -8,74 +8,37 @@
|
|
|
</view>
|
|
|
<view class="infos">
|
|
|
<view class="title">
|
|
|
- {{courseBase.courseName}}
|
|
|
+ 舞蹈班
|
|
|
</view>
|
|
|
- <!-- <view class="else">
|
|
|
+ <view class="else">
|
|
|
<text>春季班</text>
|
|
|
<text>36课时</text>
|
|
|
<text>x1</text>
|
|
|
- </view> -->
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <!-- 班级信息 -->
|
|
|
- <view class="infos" style="margin-top: 24rpx;">
|
|
|
- <view class="item">
|
|
|
- <view class="title">
|
|
|
- <text class="asterisk">*</text>
|
|
|
- <text>报名班级</text>
|
|
|
- </view>
|
|
|
- <view class="value" @click="classSelect">
|
|
|
- <text class="placeholder" v-if="!classId">请选择报名班级</text>
|
|
|
- <text v-else>{{className}}</text>
|
|
|
- <text class="icon"><u-icon name="arrow-right" color="#c8c8c8"></u-icon></text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="item">
|
|
|
- <view class="title">
|
|
|
- <text class="asterisk">*</text>
|
|
|
- <text>选择套餐</text>
|
|
|
- </view>
|
|
|
- <view class="value" @click="packageSelect">
|
|
|
- <text class="placeholder" v-if="!packageId">请选择套餐</text>
|
|
|
- <text v-else>{{packageName}}</text>
|
|
|
- <text class="icon"><u-icon name="arrow-right" color="#c8c8c8"></u-icon></text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
<!-- 学员信息 -->
|
|
|
<view class="infos">
|
|
|
<view class="item">
|
|
|
<view class="title">
|
|
|
- <text class="asterisk">*</text>
|
|
|
<text>学员姓名</text>
|
|
|
</view>
|
|
|
- <view class="value">
|
|
|
- <text class="add" v-if="!studentId" @click="toAddChildInformation">请先添加子女信息</text>
|
|
|
- <text v-else @click="studentSelect">{{stuDetail.studentName}}</text>
|
|
|
+ <view class="value" @click="show=true">
|
|
|
+ <text>花花</text>
|
|
|
<text class="icon"><u-icon name="arrow-right" color="#c8c8c8"></u-icon></text>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <u-select v-model="show" mode="single-column" :list="list" @confirm="confirm"></u-select>
|
|
|
+ <u-select v-model="show" mode="single-column" :list="studentList" @confirm="confirm"></u-select>
|
|
|
|
|
|
- <view class="item">
|
|
|
- <view class="title">
|
|
|
- <text>年龄</text>
|
|
|
- </view>
|
|
|
- <view class="value">
|
|
|
- <text class="placeholder" v-if="!studentId">选择学员后自动显示</text>
|
|
|
- <text v-else>{{stuDetail.age}}</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
<view class="item">
|
|
|
<view class="title">
|
|
|
<text class="asterisk">*</text>
|
|
|
<text>联系人手机号</text>
|
|
|
</view>
|
|
|
<view class="value">
|
|
|
- <text>{{stuDetail.firstContactPhone}}</text>
|
|
|
+ <text>15500001111</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
@@ -85,7 +48,7 @@
|
|
|
</view>
|
|
|
<view class="value">
|
|
|
<text>
|
|
|
- <input type="text" placeholder="请填写手机号" v-model="stuDetail.secondContactPhone">
|
|
|
+ <input type="text" placeholder="请填写手机号">
|
|
|
</text>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -96,16 +59,11 @@
|
|
|
</view>
|
|
|
<view class="value">
|
|
|
<text>
|
|
|
- <input type="text" placeholder="请填写家长姓名" v-model="stuDetail.secondContactName">
|
|
|
+ <input type="text" placeholder="请填写家长姓名">
|
|
|
</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <!-- 家长信息 -->
|
|
|
- <!-- <view class="infos">
|
|
|
-
|
|
|
-
|
|
|
- </view> -->
|
|
|
|
|
|
<!-- 金额 -->
|
|
|
<view class="amount" style="margin-top: 12px;">
|
|
@@ -114,8 +72,7 @@
|
|
|
应付金额
|
|
|
</view>
|
|
|
<view class="value">
|
|
|
- {{packageDetail.unitPrice!=null && packageDetail.courseAmount!=null ?
|
|
|
- (packageDetail.unitPrice*packageDetail.courseAmount).toFixed(2) : '0.00'}}元
|
|
|
+ 720.00元
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="discount-amount">
|
|
@@ -131,36 +88,7 @@
|
|
|
实付金额
|
|
|
</view>
|
|
|
<view class="value">
|
|
|
- {{packageDetail.unitPrice!=null && packageDetail.courseAmount!=null ?
|
|
|
- (packageDetail.unitPrice*packageDetail.courseAmount).toFixed(2) : '0.00'}}元
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="amount">
|
|
|
- <view class="amount-paid">
|
|
|
- <view class="title">
|
|
|
- 老师信息
|
|
|
- </view>
|
|
|
- <view class="value">
|
|
|
- {{classDetail.courseTeachersN}}
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="amount-paid">
|
|
|
- <view class="title">
|
|
|
- 教室
|
|
|
- </view>
|
|
|
- <view class="value">
|
|
|
- {{classDetail.classRoomN}}
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="amount-paid">
|
|
|
- <view class="title">
|
|
|
- 联系电话
|
|
|
- </view>
|
|
|
- <view class="value">
|
|
|
- {{classDetail.consultPhone}}
|
|
|
+ 720.00元
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -168,10 +96,9 @@
|
|
|
<!-- 确认订单 -->
|
|
|
<view class="confirm">
|
|
|
<view class="money">
|
|
|
- <view class="title">实付金额</view>
|
|
|
+ <view class="title">合计</view>
|
|
|
<view class="value">
|
|
|
- {{packageDetail.unitPrice!=null && packageDetail.courseAmount!=null ?
|
|
|
- (packageDetail.unitPrice*packageDetail.courseAmount).toFixed(2) : '0.00'}}元
|
|
|
+ 720.00元
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="pay">
|
|
@@ -207,103 +134,28 @@
|
|
|
coursePackageList: [],
|
|
|
tclassList: [],
|
|
|
packageDetail: {},
|
|
|
- classDetail: {}
|
|
|
- }
|
|
|
- },
|
|
|
- onLoad(op) {
|
|
|
- if(op.id) {
|
|
|
- console.log(op)
|
|
|
- this.courseId = op.id;
|
|
|
- this.getCourseDetail();
|
|
|
+ classDetail: {},
|
|
|
+ shoppingCartList: []
|
|
|
}
|
|
|
},
|
|
|
onReady() {
|
|
|
+ if (this.carhelp.getShoppingCartList()) {
|
|
|
+ this.shoppingCartList = this.carhelp.getShoppingCartList();
|
|
|
+ }
|
|
|
if (this.carhelp.getStudentId()) {
|
|
|
this.studentId = this.carhelp.getStudentId().studentId;
|
|
|
- this.getStudentDetail();
|
|
|
}
|
|
|
this.getStudentList();
|
|
|
},
|
|
|
methods: {
|
|
|
- getCourseDetail() {
|
|
|
- uni.showLoading({
|
|
|
- title: "加载中",
|
|
|
- mask: true,
|
|
|
- })
|
|
|
- courseApi.getCourseDetail({
|
|
|
- courseId: this.courseId
|
|
|
- }).then((res) => {
|
|
|
- uni.hideLoading();
|
|
|
- this.courseBase = res.data.courseBase;
|
|
|
- this.coursePackageList = res.data.coursePackageList;
|
|
|
- this.tclassList = res.data.tclassList;
|
|
|
- var list1 = [];
|
|
|
- var list2 = [];
|
|
|
- for (var i = 0; i < this.coursePackageList.length; i++) {
|
|
|
- list1.push({
|
|
|
- value: this.coursePackageList[i].packageId,
|
|
|
- label: this.coursePackageList[i].packageName
|
|
|
- })
|
|
|
- }
|
|
|
- this.packageList = list1;
|
|
|
-
|
|
|
- for (var j = 0; j < this.tclassList.length; j++) {
|
|
|
- list2.push({
|
|
|
- value: this.tclassList[j].classId,
|
|
|
- label: this.tclassList[j].className
|
|
|
- })
|
|
|
- }
|
|
|
- this.classList = list2;
|
|
|
- }).catch(error => {
|
|
|
- uni.showToast({
|
|
|
- title: error,
|
|
|
- icon: "none"
|
|
|
- })
|
|
|
- })
|
|
|
- },
|
|
|
topayResult() {
|
|
|
uni.navigateTo({
|
|
|
url: '/pages/parents/course/payResult'
|
|
|
})
|
|
|
},
|
|
|
- classSelect() {
|
|
|
- this.selectNum = 'class';
|
|
|
- this.list = this.classList;
|
|
|
- this.show = true;
|
|
|
- },
|
|
|
- packageSelect() {
|
|
|
- this.selectNum = 'package';
|
|
|
- this.list = this.packageList;
|
|
|
- this.show = true;
|
|
|
- },
|
|
|
- studentSelect() {
|
|
|
- this.selectNum = 'student';
|
|
|
- this.list = this.studentList;
|
|
|
- this.show = true;
|
|
|
- },
|
|
|
confirm(e) {
|
|
|
- if(this.selectNum == 'class') {
|
|
|
- this.classId = e[0].value;
|
|
|
- this.className = e[0].label;
|
|
|
- for (var i = 0; i < this.tclassList.length; i++) {
|
|
|
- if(this.tclassList[i].classId == this.classId) {
|
|
|
- this.classDetail = this.tclassList[i]
|
|
|
- }
|
|
|
- }
|
|
|
- } else if(this.selectNum == 'package') {
|
|
|
- this.packageId = e[0].value;
|
|
|
- this.packageName = e[0].label;
|
|
|
- for (var i = 0; i < this.coursePackageList.length; i++) {
|
|
|
- if(this.coursePackageList[i].packageId == this.packageId) {
|
|
|
- this.packageDetail = this.coursePackageList[i]
|
|
|
- }
|
|
|
- }
|
|
|
- } else if(this.selectNum == 'student') {
|
|
|
- this.studentId = e[0].value;
|
|
|
- this.getStudentDetail();
|
|
|
- } else {
|
|
|
-
|
|
|
- }
|
|
|
+ this.studentId = e[0].value;
|
|
|
+ this.getStudentDetail();
|
|
|
},
|
|
|
getStudentList() {
|
|
|
uni.showLoading({
|
|
@@ -328,11 +180,6 @@
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
- toAddChildInformation() {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/parents/mine/addChildInformation'
|
|
|
- })
|
|
|
- },
|
|
|
getStudentDetail() {
|
|
|
uni.showLoading({
|
|
|
title: "加载中",
|
|
@@ -435,7 +282,7 @@
|
|
|
.infos {
|
|
|
padding: 0px 30rpx;
|
|
|
background-color: #fff;
|
|
|
- // margin-top: 24rpx;
|
|
|
+ margin-top: 24rpx;
|
|
|
|
|
|
.item {
|
|
|
display: flex;
|