|
@@ -6,9 +6,15 @@
|
|
|
</h2>
|
|
|
<div class="m-core">
|
|
|
<div class="vipLeft">
|
|
|
- <h4>课程信息</h4>
|
|
|
+ <el-alert
|
|
|
+ title="课程信息"
|
|
|
+ type="info"
|
|
|
+ :closable="false"
|
|
|
+ class="vipMsg"
|
|
|
+ ></el-alert>
|
|
|
<el-form
|
|
|
ref="leftForm"
|
|
|
+ :inline="true"
|
|
|
:rules="leftFormRules"
|
|
|
:label-position="labelPosition"
|
|
|
label-width="110px"
|
|
@@ -49,13 +55,14 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <!-- @change="setSection($event)" -->
|
|
|
+ <!-- -->
|
|
|
<el-form-item label="指导老师" prop="teacher">
|
|
|
<el-select
|
|
|
v-model.trim="leftForm.teacher"
|
|
|
filterable
|
|
|
clearable
|
|
|
:disabled="!leftForm.subject"
|
|
|
+ @change="setSection($event)"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="(item, index) in teacherList"
|
|
@@ -112,34 +119,6 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="上课学员" prop="students">
|
|
|
- <el-select
|
|
|
- v-model.trim="leftForm.students"
|
|
|
- multiple
|
|
|
- clearable
|
|
|
- placeholder="请输入上课学员"
|
|
|
- remote
|
|
|
- reserve-keyword
|
|
|
- filterable
|
|
|
- :multiple-limit="studentLimit"
|
|
|
- :disabled="!leftForm.classOrganId || !leftForm.courseType"
|
|
|
- :remote-method="remoteMethod"
|
|
|
- :loading="remoteLoading"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in studentList"
|
|
|
- :key="item.userId"
|
|
|
- :label="item.username"
|
|
|
- :value="item.userId"
|
|
|
- >
|
|
|
- <span style="float: left">{{ item.username }}</span>
|
|
|
- <span style="float: right; color: #8492a6; font-size: 13px">{{
|
|
|
- item.parentsPhone
|
|
|
- }}</span>
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
<el-form-item label="活动方案" prop="activeType">
|
|
|
<el-select
|
|
|
v-model.trim="leftForm.activeType"
|
|
@@ -156,19 +135,7 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
-
|
|
|
- <!-- <el-form-item label="每班人数">
|
|
|
- <el-input
|
|
|
- type="number"
|
|
|
- @mousewheel.native.prevent
|
|
|
- v-model.trim="leftForm.classNum"
|
|
|
- disabled
|
|
|
- />
|
|
|
- </el-form-item> -->
|
|
|
<el-form-item label="每课时长">
|
|
|
- <!-- <el-input type="number"
|
|
|
- v-model.trim="leftForm.classTime"
|
|
|
- disabled />-->
|
|
|
<el-select
|
|
|
v-model.trim="leftForm.classTime"
|
|
|
:disabled="timeTable.length > 0"
|
|
@@ -181,11 +148,8 @@
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item
|
|
|
- label="
|
|
|
- 报名开始时间"
|
|
|
- prop="signUpStart"
|
|
|
- >
|
|
|
+
|
|
|
+ <el-form-item label="报名开始时间" prop="signUpStart">
|
|
|
<!-- @change="changeStartTime" -->
|
|
|
<el-date-picker
|
|
|
v-model.trim="leftForm.signUpStart"
|
|
@@ -194,6 +158,14 @@
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
placeholder="请选择时间"
|
|
|
/>
|
|
|
+ <!-- <el-date-picker
|
|
|
+ v-model="leftForm.signTimer"
|
|
|
+ type="daterange"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ >
|
|
|
+ </el-date-picker> -->
|
|
|
</el-form-item>
|
|
|
<el-form-item label="报名结束时间" prop="signUpEnd">
|
|
|
<el-date-picker
|
|
@@ -204,6 +176,49 @@
|
|
|
placeholder="请选择时间"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="上课学员" prop="students">
|
|
|
+ <el-select
|
|
|
+ v-model.trim="leftForm.students"
|
|
|
+ multiple
|
|
|
+ clearable
|
|
|
+ placeholder="请输入上课学员"
|
|
|
+ remote
|
|
|
+ reserve-keyword
|
|
|
+ @change="changeStudent"
|
|
|
+ filterable
|
|
|
+ :multiple-limit="studentLimit"
|
|
|
+ :disabled="!leftForm.classOrganId || !leftForm.courseType"
|
|
|
+ :remote-method="remoteMethod"
|
|
|
+ :loading="remoteLoading"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in studentList"
|
|
|
+ :key="item.userId"
|
|
|
+ :label="item.username"
|
|
|
+ :value="item.userId"
|
|
|
+ >
|
|
|
+ <span style="float: left">{{ item.username }}</span>
|
|
|
+ <span style="float: right; color: #8492a6; font-size: 13px">{{
|
|
|
+ item.parentsPhone
|
|
|
+ }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ <div class="center">
|
|
|
+ <el-alert
|
|
|
+ title="排课设置"
|
|
|
+ type="info"
|
|
|
+ :closable="false"
|
|
|
+ class="vipMsg"
|
|
|
+ ></el-alert>
|
|
|
+ <el-form
|
|
|
+ :inline="true"
|
|
|
+ :model="centerForm"
|
|
|
+ label-width="100px"
|
|
|
+ :label-position="labelPosition"
|
|
|
+ >
|
|
|
<el-form-item v-if="leftForm.courseStart" label="最早排课时间">
|
|
|
<el-date-picker
|
|
|
v-model.trim="leftForm.courseStart"
|
|
@@ -222,15 +237,6 @@
|
|
|
placeholder="请选择时间"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- </el-form>
|
|
|
- </div>
|
|
|
- <div class="center">
|
|
|
- <h4>排课设置</h4>
|
|
|
- <el-form
|
|
|
- :model="centerForm"
|
|
|
- label-width="100px"
|
|
|
- :label-position="labelPosition"
|
|
|
- >
|
|
|
<el-form-item v-if="hasOnline" label="线上课数">
|
|
|
<el-input
|
|
|
v-model.trim="centerForm.onlineCourseNum"
|
|
@@ -259,23 +265,60 @@
|
|
|
>线下课</el-radio
|
|
|
>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="">
|
|
|
+ <el-button type="danger" @click="setCourse">点击排课</el-button>
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
- <!-- 排课列表开始 -->
|
|
|
- <div class="planList">
|
|
|
- <div class="planTop">
|
|
|
+ <!-- 排课列表开始 planList-->
|
|
|
+ <div class="">
|
|
|
+ <!-- <div class="planTop">
|
|
|
<p>已排课程</p>
|
|
|
<el-button type="text" @click="setCourse">{{
|
|
|
id ? "新增排课" : "点击排课"
|
|
|
}}</el-button>
|
|
|
- </div>
|
|
|
- <div class="planCore">
|
|
|
- <div class="row">
|
|
|
+ </div> -->
|
|
|
+ <!-- <div class="planCore"> -->
|
|
|
+ <el-table
|
|
|
+ style="width: 100%"
|
|
|
+ :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
|
+ :data="timeTable"
|
|
|
+ >
|
|
|
+ <el-table-column align="center" prop="studentId" label="课程时间">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>{{ scope.row.classDate | formatTimer }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="studentId"
|
|
|
+ label="课程开始时间"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>{{ scope.row.startClassTimeStr }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="studentId"
|
|
|
+ label="课程结束时间"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>{{ scope.row.endClassTimeStr }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" prop="studentId" label="课程类型">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>{{ scope.row.teachMode | teachMode }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <!-- <div class="row">
|
|
|
<div class="name">时间</div>
|
|
|
<div class="week">开始时间</div>
|
|
|
<div class="time">结束时间</div>
|
|
|
<div class="time">课程类型</div>
|
|
|
- </div>
|
|
|
- <div
|
|
|
+ </div> -->
|
|
|
+ <!-- <div
|
|
|
v-for="(item, index) in this.timeTable"
|
|
|
:key="index"
|
|
|
class="row"
|
|
@@ -284,16 +327,22 @@
|
|
|
<div class="week">{{ item.startClassTimeStr }}</div>
|
|
|
<div class="time">{{ item.endClassTimeStr }}</div>
|
|
|
<div class="time">{{ item.teachMode | teachMode }}</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
+ <!-- </div> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="right">
|
|
|
- <h4>课酬设置</h4>
|
|
|
+ <el-alert
|
|
|
+ title="课酬&缴费设置"
|
|
|
+ type="info"
|
|
|
+ :closable="false"
|
|
|
+ class="vipMsg"
|
|
|
+ ></el-alert>
|
|
|
<el-form
|
|
|
:model="rightForm"
|
|
|
label-width="100px"
|
|
|
:label-position="labelPosition"
|
|
|
+ :inline="true"
|
|
|
>
|
|
|
<el-form-item v-if="hasOnline" label="线上课课酬">
|
|
|
<el-input v-model.trim="rightForm.onlineCourse" :disabled="true" />
|
|
@@ -303,7 +352,7 @@
|
|
|
<el-input v-model.trim="rightForm.offlineCourse" :disabled="true" />
|
|
|
<!-- || offlineSalary!='TEACHER_DEFAULT' salaryReadonlyFlag==0 -->
|
|
|
</el-form-item>
|
|
|
- <el-form-item v-if="hasOnline" label="线上课单价">
|
|
|
+ <!-- <el-form-item v-if="hasOnline" label="线上课单价">
|
|
|
<el-input
|
|
|
v-model.trim="rightForm.onlinePrice"
|
|
|
:disabled="paymentReadonlyFlag == 0"
|
|
@@ -314,14 +363,75 @@
|
|
|
v-model.trim="rightForm.offlinePrice"
|
|
|
:disabled="paymentReadonlyFlag == 0"
|
|
|
/>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="课程总价">
|
|
|
+ </el-form-item> -->
|
|
|
+ <!-- <el-form-item label="课程总价">
|
|
|
<el-input v-model.trim="rightForm.allPrice" disabled />
|
|
|
+ </el-form-item> -->
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" @click="computational">计算</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
- <el-button type="primary" style="float: right" @click="computational"
|
|
|
- >计算</el-button
|
|
|
- >
|
|
|
+ <div style="width: 700px">
|
|
|
+ <el-table
|
|
|
+ :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
|
+ :data="activeStudentList"
|
|
|
+ >
|
|
|
+ <el-table-column align="center" prop="studentId" label="学员编号">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" prop="userName" label="学员名称">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="studentId"
|
|
|
+ v-if="hasOnline"
|
|
|
+ label="线上课单价"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input-number
|
|
|
+ size="mini"
|
|
|
+ style="width: 90% !important"
|
|
|
+ class="number-input"
|
|
|
+ v-model="scope.row.onlineClassesUnitPrice"
|
|
|
+ :controls="false"
|
|
|
+ :min="0"
|
|
|
+ placeholder="线上课单价"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="studentId"
|
|
|
+ v-if="hasOffline"
|
|
|
+ label="线下课单价"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input-number
|
|
|
+ size="mini"
|
|
|
+ style="width: 90% !important"
|
|
|
+ class="number-input"
|
|
|
+ v-model="scope.row.offlineClassesUnitPrice"
|
|
|
+ :controls="false"
|
|
|
+ :min="0"
|
|
|
+ placeholder="线下课单价"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" prop="studentId" label="缴费总额">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input-number
|
|
|
+ size="mini"
|
|
|
+ style="width: 90% !important"
|
|
|
+ class="number-input"
|
|
|
+ v-model="scope.row.paymentPrice"
|
|
|
+ :controls="false"
|
|
|
+ :min="0"
|
|
|
+ :disabled="true"
|
|
|
+ placeholder="缴费总额"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 弹窗 -->
|
|
@@ -471,18 +581,20 @@ export default {
|
|
|
activeType: "",
|
|
|
classNum: "",
|
|
|
classTime: "",
|
|
|
+ // signTimer:[],
|
|
|
signUpStart: "",
|
|
|
signUpEnd: "",
|
|
|
courseStartOnline: "",
|
|
|
courseStartOffline: "",
|
|
|
- courseEnd: "",
|
|
|
section: "",
|
|
|
courseStart: "",
|
|
|
courseEnd: "",
|
|
|
educationalTeacherId: "",
|
|
|
students: [],
|
|
|
+
|
|
|
classOrganId: "", // 课程分部
|
|
|
},
|
|
|
+ activeStudentList: [],
|
|
|
studentLimit: 0,
|
|
|
classTimeList: [],
|
|
|
centerForm: {
|
|
@@ -512,8 +624,8 @@ export default {
|
|
|
// classOrganList: [], // 公用分部
|
|
|
courseTypeList: [], // 课程类型集合
|
|
|
activeList: [], //活动集合
|
|
|
- hasOnline: false,
|
|
|
- hasOffline: false,
|
|
|
+ hasOnline: true,
|
|
|
+ hasOffline: true,
|
|
|
onlineSalary: "", // 线上课课酬结算方式
|
|
|
offlineSalary: "", // 线下课课酬结算方式
|
|
|
hotType: "",
|
|
@@ -597,13 +709,13 @@ export default {
|
|
|
trigger: "change",
|
|
|
},
|
|
|
],
|
|
|
- activeType: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: "请选择活动",
|
|
|
- trigger: "change",
|
|
|
- },
|
|
|
- ],
|
|
|
+ // activeType: [
|
|
|
+ // {
|
|
|
+ // required: true,
|
|
|
+ // message: "请选择活动",
|
|
|
+ // trigger: "change",
|
|
|
+ // },
|
|
|
+ // ],
|
|
|
signUpStart: [
|
|
|
{
|
|
|
required: true,
|
|
@@ -809,68 +921,74 @@ export default {
|
|
|
this.attribute2 = "";
|
|
|
this.giveNum = 0;
|
|
|
this.isGiveClass = false;
|
|
|
- // 重置课程单价
|
|
|
- for (let i in this.courseTypeList) {
|
|
|
- if (this.courseTypeList[i].id == this.leftForm.courseType) {
|
|
|
- // 学生人数
|
|
|
- this.leftForm.classNum = this.courseTypeList[i].studentNum;
|
|
|
- // 每课时长
|
|
|
- this.classTimeList = this.courseTypeList[i].singleClassMinutes.split(
|
|
|
- ","
|
|
|
- );
|
|
|
- // this.leftForm.classTime = this.courseTypeList[i].singleClassMinutes;
|
|
|
- this.leftForm.classTime = this.classTimeList[0];
|
|
|
- // 线上课单节价格
|
|
|
- this.rightForm.onlinePrice = this.courseTypeList[
|
|
|
- i
|
|
|
- ].onlineClassesUnitPrice;
|
|
|
- // 线下课单节价格
|
|
|
- this.rightForm.offlinePrice = this.courseTypeList[
|
|
|
- i
|
|
|
- ].offlineClassesUnitPrice;
|
|
|
+ this.leftForm.courseStart = "";
|
|
|
+ this.leftForm.courseEnd = "";
|
|
|
+ this.hasOnline = true;
|
|
|
+ this.hasOffline = true;
|
|
|
+ if (val) {
|
|
|
+ for (let i in this.courseTypeList) {
|
|
|
+ if (this.courseTypeList[i].id == this.leftForm.courseType) {
|
|
|
+ // 学生人数
|
|
|
+ this.leftForm.classNum = this.courseTypeList[i].studentNum;
|
|
|
+ // 每课时长
|
|
|
+ this.classTimeList = this.courseTypeList[
|
|
|
+ i
|
|
|
+ ].singleClassMinutes.split(",");
|
|
|
+ // this.leftForm.classTime = this.courseTypeList[i].singleClassMinutes;
|
|
|
+ this.leftForm.classTime = this.classTimeList[0];
|
|
|
+ // 线上课单节价格
|
|
|
+ this.rightForm.onlinePrice = this.courseTypeList[
|
|
|
+ i
|
|
|
+ ].onlineClassesUnitPrice;
|
|
|
+ // 线下课单节价格
|
|
|
+ this.rightForm.offlinePrice = this.courseTypeList[
|
|
|
+ i
|
|
|
+ ].offlineClassesUnitPrice;
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- // 根须活动id获取 相应的值
|
|
|
- for (let i in this.activeList) {
|
|
|
- if (this.activeList[i].id == val) {
|
|
|
- // 如果是买赠就必须选择赠课类型
|
|
|
- // 报名开始 报名结束 课程开始 课程结束 // 判断是否有线上,线下课 并同步状态
|
|
|
- // this.leftForm.signUpStart = this.activeList[i].startTime;
|
|
|
- // this.leftForm.signUpEnd = this.activeList[i].endTime;
|
|
|
- this.leftForm.courseStart = this.activeList[i].coursesStartTime;
|
|
|
- this.leftForm.courseEnd = this.activeList[i].coursesEndTime;
|
|
|
- // 获取活动种类并保存
|
|
|
- this.hotType = this.activeList[i].type;
|
|
|
- // 获取买赠必要参数
|
|
|
- this.attribute1 = this.activeList[i].attribute1;
|
|
|
- this.attribute2 = this.activeList[i].attribute2;
|
|
|
- // 存储课酬是否可配置
|
|
|
- this.salaryReadonlyFlag = this.activeList[i].salaryReadonlyFlag;
|
|
|
- this.paymentReadonlyFlag = this.activeList[i].paymentReadonlyFlag;
|
|
|
- // hasOnline: false, hasOffline: false 还需要判断type类型 根据活动id获取
|
|
|
- if (this.activeList[i].salarySettlementJson) {
|
|
|
- let obj = JSON.parse(this.activeList[i].salarySettlementJson);
|
|
|
- if (obj && obj.onlineSalarySettlement) {
|
|
|
- // 有线上课
|
|
|
- this.hasOnline = true;
|
|
|
- this.onlineSalary =
|
|
|
- obj.onlineSalarySettlement.salarySettlementType;
|
|
|
- // console.log('线上:' + this.onlineSalary)
|
|
|
- } else {
|
|
|
- this.hasOnline = false;
|
|
|
- }
|
|
|
- if (obj && obj.offlineSalarySettlement) {
|
|
|
- // 有线下课
|
|
|
- this.hasOffline = true;
|
|
|
- this.offlineSalary =
|
|
|
- obj.offlineSalarySettlement.salarySettlementType;
|
|
|
- // console.log('线下:' + this.offlineSalary)
|
|
|
- } else {
|
|
|
- this.hasOffline = false;
|
|
|
+ // 根须活动id获取 相应的值
|
|
|
+ for (let i in this.activeList) {
|
|
|
+ if (this.activeList[i].id == val) {
|
|
|
+ // 如果是买赠就必须选择赠课类型
|
|
|
+ // 报名开始 报名结束 课程开始 课程结束 // 判断是否有线上,线下课 并同步状态
|
|
|
+ // this.leftForm.signUpStart = this.activeList[i].startTime;
|
|
|
+ // this.leftForm.signUpEnd = this.activeList[i].endTime;
|
|
|
+ this.leftForm.courseStart = this.activeList[i].coursesStartTime;
|
|
|
+ this.leftForm.courseEnd = this.activeList[i].coursesEndTime;
|
|
|
+ // 获取活动种类并保存
|
|
|
+ this.hotType = this.activeList[i].type;
|
|
|
+ // 获取买赠必要参数
|
|
|
+ this.attribute1 = this.activeList[i].attribute1;
|
|
|
+ this.attribute2 = this.activeList[i].attribute2;
|
|
|
+ // 存储课酬是否可配置
|
|
|
+ this.salaryReadonlyFlag = this.activeList[i].salaryReadonlyFlag;
|
|
|
+ this.paymentReadonlyFlag = this.activeList[i].paymentReadonlyFlag;
|
|
|
+ // hasOnline: false, hasOffline: false 还需要判断type类型 根据活动id获取
|
|
|
+ if (this.activeList[i].salarySettlementJson) {
|
|
|
+ let obj = JSON.parse(this.activeList[i].salarySettlementJson);
|
|
|
+ if (obj && obj.onlineSalarySettlement) {
|
|
|
+ // 有线上课
|
|
|
+ this.hasOnline = true;
|
|
|
+ this.onlineSalary =
|
|
|
+ obj.onlineSalarySettlement.salarySettlementType;
|
|
|
+ // console.log('线上:' + this.onlineSalary)
|
|
|
+ } else {
|
|
|
+ this.hasOnline = false;
|
|
|
+ }
|
|
|
+ if (obj && obj.offlineSalarySettlement) {
|
|
|
+ // 有线下课
|
|
|
+ this.hasOffline = true;
|
|
|
+ this.offlineSalary =
|
|
|
+ obj.offlineSalarySettlement.salarySettlementType;
|
|
|
+ // console.log('线下:' + this.offlineSalary)
|
|
|
+ } else {
|
|
|
+ this.hasOffline = false;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ // 重置课程单价
|
|
|
},
|
|
|
// 点击确插入课表
|
|
|
addWeek() {
|
|
@@ -1192,11 +1310,17 @@ export default {
|
|
|
userId,
|
|
|
giveTeachMode,
|
|
|
singleClassMinutes,
|
|
|
+ vipGroupStudentCoursePrices: this.activeStudentList,
|
|
|
}).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
this.rightForm.onlineCourse = res.data.onlineTeacherSalary;
|
|
|
this.rightForm.offlineCourse = res.data.offlineTeacherSalary;
|
|
|
this.rightForm.allPrice = res.data.totalPrice;
|
|
|
+ this.activeStudentList.forEach((stu) => {
|
|
|
+ if (res.data.hasOwnProperty(stu.studentId)) {
|
|
|
+ stu.paymentPrice = res.data[stu.studentId];
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -1214,7 +1338,7 @@ export default {
|
|
|
this.$message.error("请点击计算按钮计算课酬");
|
|
|
return;
|
|
|
}
|
|
|
- if (this.leftForm.students.length !== this.studentLimit) {
|
|
|
+ if (this.leftForm.students.length > this.studentLimit) {
|
|
|
this.$message.error(`请选择上课学生为${this.studentLimit}人`);
|
|
|
return;
|
|
|
}
|
|
@@ -1248,6 +1372,7 @@ export default {
|
|
|
let studentIdList = this.leftForm.students.join(",") || null;
|
|
|
obj.vipGroupApplyBaseInfo = {
|
|
|
studentIdList, // 这个不要了
|
|
|
+ vipGroupStudentCoursePrices:this.activeStudentList,
|
|
|
coursesExpireDate: this.leftForm.courseEnd,
|
|
|
teacherSchoolId: this.leftForm.section,
|
|
|
// name: this.leftForm.name,
|
|
@@ -1341,7 +1466,7 @@ export default {
|
|
|
// );
|
|
|
// }
|
|
|
// }
|
|
|
- this.getClassOrgan(); // 获取公用部分
|
|
|
+ // this.getClassOrgan(); // 获取公用部分
|
|
|
},
|
|
|
// getClassOrgan() {
|
|
|
// // 获取公用分部
|
|
@@ -1378,7 +1503,10 @@ export default {
|
|
|
this.leftForm.teacherId = "";
|
|
|
this.leftForm.educationalTeacherId = "";
|
|
|
this.courseTypeList = [];
|
|
|
- this.$set(this.leftForm, "courseType", null);
|
|
|
+ if (this.leftForm.courseType) {
|
|
|
+ this.$set(this.leftForm, "courseType", null);
|
|
|
+ }
|
|
|
+
|
|
|
// this.leftForm.courseType = null;
|
|
|
if (val) {
|
|
|
vipGroupCategory({
|
|
@@ -1428,7 +1556,7 @@ export default {
|
|
|
this.changeSubject(parseInt(data.subjectIdList));
|
|
|
// 设置老师
|
|
|
this.leftForm.teacher = data.userId;
|
|
|
- // this.setSection(data.userId);
|
|
|
+ this.setSection(data.userId);
|
|
|
// 课程形式
|
|
|
this.leftForm.courseType = data.vipGroupCategoryId;
|
|
|
// 获取课程形式下的活动方案
|
|
@@ -1506,6 +1634,21 @@ export default {
|
|
|
// });
|
|
|
}
|
|
|
},
|
|
|
+ changeStudent(val) {
|
|
|
+ console.log(val, this.studentList);
|
|
|
+ this.activeStudentList = [];
|
|
|
+ this.studentList.forEach((stu) => {
|
|
|
+ if (val.indexOf(stu.userId) != -1) {
|
|
|
+ this.activeStudentList.push({
|
|
|
+ studentId: stu.userId,
|
|
|
+ userName: stu.username,
|
|
|
+ onlineClassesUnitPrice: this.rightForm.onlinePrice,
|
|
|
+ offlineClassesUnitPrice: this.rightForm.offlinePrice,
|
|
|
+ paymentPrice: "",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
// 制定属性去重
|
|
|
deweight(arr, key) {
|
|
|
let res = [];
|
|
@@ -1549,9 +1692,9 @@ export default {
|
|
|
<style lang="scss" scoped>
|
|
|
.m-core {
|
|
|
margin-top: 30px;
|
|
|
- display: flex;
|
|
|
- flex-direction: row;
|
|
|
- justify-content: space-around;
|
|
|
+ // display: flex;
|
|
|
+ // flex-direction: row;
|
|
|
+ // justify-content: space-around;
|
|
|
|
|
|
.el-input {
|
|
|
width: 180px;
|
|
@@ -1561,36 +1704,39 @@ export default {
|
|
|
font-size: 16px;
|
|
|
background-color: #ccc;
|
|
|
color: #fff;
|
|
|
- text-align: center;
|
|
|
+ // text-align: center;
|
|
|
width: 100%;
|
|
|
height: 40px;
|
|
|
line-height: 40px;
|
|
|
margin-bottom: 20px;
|
|
|
+ padding: 0 20px;
|
|
|
}
|
|
|
|
|
|
- .vipLeft {
|
|
|
- width: 400px;
|
|
|
- // h4 {
|
|
|
- // font-size: 16px;
|
|
|
- // background-color: #ccc;
|
|
|
- // color: #fff;
|
|
|
- // text-align: center;
|
|
|
- // width: 100%;
|
|
|
- // height: 40px;
|
|
|
- // line-height: 40px;
|
|
|
- // margin-bottom: 20px;
|
|
|
- // }
|
|
|
- }
|
|
|
+ // .vipLeft {
|
|
|
+ // width: 400px;
|
|
|
+ // // h4 {
|
|
|
+ // // font-size: 16px;
|
|
|
+ // // background-color: #ccc;
|
|
|
+ // // color: #fff;
|
|
|
+ // // text-align: center;
|
|
|
+ // // width: 100%;
|
|
|
+ // // height: 40px;
|
|
|
+ // // line-height: 40px;
|
|
|
+ // // margin-bottom: 20px;
|
|
|
+ // // }
|
|
|
+ // }
|
|
|
|
|
|
- .center {
|
|
|
- width: 400px;
|
|
|
- }
|
|
|
+ // .center {
|
|
|
+ // width: 400px;
|
|
|
+ // }
|
|
|
|
|
|
- .right {
|
|
|
- width: 400px;
|
|
|
- }
|
|
|
+ // .right {
|
|
|
+ // width: 400px;
|
|
|
+ // }
|
|
|
+}
|
|
|
+.vipMsg {
|
|
|
+ margin-bottom: 20px;
|
|
|
}
|
|
|
-
|
|
|
.planList {
|
|
|
padding: 0 25px;
|
|
|
|