|
@@ -247,7 +247,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="学员声部"
|
|
|
prop="sound">
|
|
|
- <el-select v-model="maskForm.sound">
|
|
|
+ <el-select v-model="maskForm.sound" @change="onSoundChange">
|
|
|
<el-option v-for='(item,index) in soundList'
|
|
|
:key='index'
|
|
|
:value="item.id"
|
|
@@ -255,6 +255,21 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
|
|
|
+
|
|
|
+ <!-- <el-form-item label="证件号"
|
|
|
+ prop="id">
|
|
|
+ <el-input v-model="maskForm.id"></el-input>
|
|
|
+ </el-form-item> -->
|
|
|
+ <el-form-item label="出生日期" style="margin-right: 0;"
|
|
|
+ prop="timer">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-date-picker v-model="maskForm.timer"
|
|
|
+ type="date"
|
|
|
+ placeholder="选择日期">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-col>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
<el-form-item label="单技课班级"
|
|
|
prop="signClass">
|
|
|
<el-select v-model="maskForm.signClass">
|
|
@@ -264,21 +279,56 @@
|
|
|
:label="item.name"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="首缴金额"
|
|
|
+ <!-- <el-form-item label="首缴金额"
|
|
|
prop="price">
|
|
|
<el-input v-model="maskForm.price"></el-input>
|
|
|
+ </el-form-item> -->
|
|
|
+
|
|
|
+ <el-form-item label="声部费用"
|
|
|
+ prop="courseFee">
|
|
|
+ <el-input v-model="maskForm.courseFee"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="证件号"
|
|
|
- prop="id">
|
|
|
- <el-input v-model="maskForm.id"></el-input>
|
|
|
+
|
|
|
+ <el-divider></el-divider>
|
|
|
+ <el-form-item label="课程" prop="temporaryCourseFee">
|
|
|
+ <el-input v-model="maskForm.temporaryCourseFee" placeholder="本次课程费用"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="出生日期"
|
|
|
- prop="timer">
|
|
|
- <el-date-picker v-model="maskForm.timer"
|
|
|
- type="date"
|
|
|
- placeholder="选择日期">
|
|
|
- </el-date-picker>
|
|
|
+
|
|
|
+ <el-form-item label="乐器" required style="display: flex;">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item prop="musicGoodsIdList">
|
|
|
+ <el-select placeholder="选择乐器" clearable v-model="maskForm.musicGoodsIdList">
|
|
|
+ <el-option v-for="(item, index) in INSTRUMENTLIST" :key="index" :value="item.value" :label="item.label"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="1"> </el-col>
|
|
|
+ <el-col :span="7">
|
|
|
+ <el-input disabled v-model="maskForm.musicMode" placeholder="购买方式"></el-input>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="1"> </el-col>
|
|
|
+ <el-col :span="7">
|
|
|
+ <el-form-item prop="musicPrice">
|
|
|
+ <el-input v-model="maskForm.musicPrice" placeholder="输入金额"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="辅件">
|
|
|
+ <el-col :span="11">
|
|
|
+ <el-form-item prop="instrGoodsIdList">
|
|
|
+ <el-select filterable multiple placeholder="选择辅件" clearable v-model="maskForm.instrGoodsIdList">
|
|
|
+ <el-option v-for="(item, index) in ACCESSORIESLIST" :key="index" :value="item.value" :label="item.label"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="2"> </el-col>
|
|
|
+ <el-col :span="11">
|
|
|
+ <el-form-item prop="instrPrice">
|
|
|
+ <el-input v-model="maskForm.instrPrice" placeholder="输入金额"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
</el-form>
|
|
|
<div slot="footer"
|
|
|
class="dialog-footer">
|
|
@@ -304,7 +354,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { getTeamStudentList, getTeamStudentInfo, getSingleClass, findSound, StudentQuit } from '@/api/buildTeam'
|
|
|
+import { getTeamStudentList, getTeamStudentInfo, getSingleClass, findSound, StudentQuit, findSubjectPlan, getGoods } from '@/api/buildTeam'
|
|
|
import { addStudent, getStudentClass } from '@/api/studentManager'
|
|
|
import pagination from '@/components/Pagination/index'
|
|
|
export default {
|
|
@@ -317,7 +367,7 @@ export default {
|
|
|
data () {
|
|
|
return {
|
|
|
studentClassVisible: false, // 学员所在班级弹窗
|
|
|
- addStudentVisible: false, //新增学员弹窗
|
|
|
+ addStudentVisible: true, //新增学员弹窗
|
|
|
topFrom: { // 顶部的禁选框集合
|
|
|
expect: '2', // 预期招生
|
|
|
studing: '5', // 在读人数
|
|
@@ -359,9 +409,16 @@ export default {
|
|
|
sound: '',
|
|
|
timer: '',
|
|
|
signClass: '',
|
|
|
- price: '',
|
|
|
+ // price: '',
|
|
|
startClass: '',
|
|
|
- id: ''
|
|
|
+ id: '',
|
|
|
+ courseFee: null, // 声部费用
|
|
|
+ temporaryCourseFee: null, // 本次课程费用
|
|
|
+ musicGoodsIdList: null, // 乐器商品编号
|
|
|
+ musicMode: null, // 乐器购买方式
|
|
|
+ musicPrice: null, // 乐器购买金额
|
|
|
+ instrGoodsIdList: [], // 辅件商品编号
|
|
|
+ instrPrice: null // 辅件购买金额
|
|
|
},
|
|
|
remark: '', // 退团原因
|
|
|
classList: [],
|
|
@@ -374,10 +431,19 @@ export default {
|
|
|
sound: [{ required: true, message: '请选择声部' },],
|
|
|
timer: [{ required: true, message: '请选择出生日期' },],
|
|
|
signClass: [{ required: true, message: '请选择单技班' },],
|
|
|
- price: [{ required: true, message: '请输入首缴金额' },],
|
|
|
+ // price: [{ required: true, message: '请输入首缴金额' },],
|
|
|
startClass: [{ required: true, message: '请选择年级' }],
|
|
|
- id: [{ required: true, message: '请输入证件号' }]
|
|
|
- }
|
|
|
+ id: [{ required: true, message: '请输入证件号' }],
|
|
|
+ courseFee: [{ required: true, message: '请输入声部费用' }],
|
|
|
+ temporaryCourseFee: [{ required: true, message: '请输课程费用' }],
|
|
|
+ musicGoodsIdList: [{ required: true, message: '请选择乐器', trigger: 'change' }],
|
|
|
+ musicPrice: [{ required: true, message: '请输入乐器购买金额' }],
|
|
|
+ instrGoodsIdList: [{ required: true, message: '请选择辅件' }],
|
|
|
+ instrPrice: [{ required: true, message: '请输入辅件金额' }]
|
|
|
+
|
|
|
+ },
|
|
|
+ INSTRUMENTLIST: [], // 乐器列表
|
|
|
+ ACCESSORIESLIST: [] // 辅件列表
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
@@ -414,6 +480,8 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
getList () {
|
|
@@ -436,7 +504,6 @@ export default {
|
|
|
this.$router.push({ path: '/business/studentSignin', query: { id: this.teamid } })
|
|
|
},
|
|
|
chioseType (row) {
|
|
|
- console.log(row);
|
|
|
row.userId;
|
|
|
// 发请求 退团
|
|
|
StudentQuit({ musicGroupId: this.teamid, userId: row.userId, reason: this.remark }).then(res => {
|
|
@@ -450,24 +517,41 @@ export default {
|
|
|
},
|
|
|
//
|
|
|
addStudent () {
|
|
|
-
|
|
|
// 发请求添加学员
|
|
|
this.$refs['maskForm'].validate(res => {
|
|
|
if (res) {
|
|
|
// this.maskForm.parentName.timer 少个生日的字段
|
|
|
- addStudent({
|
|
|
- currentClass: this.maskForm.course,
|
|
|
- currentGrade: this.maskForm.startClass,
|
|
|
- gender: this.maskForm.sex,
|
|
|
- musicGroupId: this.teamid,
|
|
|
- name: this.maskForm.studentName,
|
|
|
- parentsName: this.maskForm.parentName,
|
|
|
- parentsPhone: this.maskForm.phone,
|
|
|
- subjectId: this.maskForm.sound,
|
|
|
- idCardNo: this.maskForm.id,
|
|
|
- classGroupId: this.maskForm.signClass
|
|
|
+ let maskForm = this.maskForm
|
|
|
+ let params = {
|
|
|
+ courseFee: maskForm.courseFee,
|
|
|
+ temporaryCourseFee: maskForm.temporaryCourseFee,
|
|
|
+ studentRegistration: {
|
|
|
+ name: maskForm.studentName,
|
|
|
+ gender: maskForm.sex,
|
|
|
+ parentsName: maskForm.parentName,
|
|
|
+ parentsPhone: maskForm.phone,
|
|
|
+ currentGrade: maskForm.startClass,
|
|
|
+ currentClass: maskForm.course,
|
|
|
+ subjectId: maskForm.sound,
|
|
|
+ musicGroupId: this.teamid,
|
|
|
+ classGroupId: maskForm.signClass
|
|
|
+ },
|
|
|
+ studentPaymentOrderDetails: [
|
|
|
+ {
|
|
|
+ goodsIdList: maskForm.musicGoodsIdList,
|
|
|
+ type: 'MUSICAL',
|
|
|
+ price: maskForm.musicPrice
|
|
|
+ },
|
|
|
+ {
|
|
|
+ goodsIdList: maskForm.instrGoodsIdList.join(','),
|
|
|
+ type: 'ACCESSORIES',
|
|
|
+ price: maskForm.instrPrice
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
|
|
|
- }).then(res => {
|
|
|
+ console.log(params)
|
|
|
+ addStudent(params).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.$message.success('添加学生成功');
|
|
|
this.getList()
|
|
@@ -477,6 +561,54 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ onSoundChange(value) { // 学员声部切换时
|
|
|
+ this.findSubjectPlan(value)
|
|
|
+ this.getGoodsList(value, 'INSTRUMENT') // 乐器
|
|
|
+ this.getGoodsList(value, 'ACCESSORIES') // 辅件
|
|
|
+ },
|
|
|
+ // 获取购买方式
|
|
|
+ findSubjectPlan(subjectId) {
|
|
|
+ findSubjectPlan({
|
|
|
+ musicGroupId: this.teamid,
|
|
|
+ subjectId: subjectId
|
|
|
+ }).then(res => {
|
|
|
+ let result = res.data
|
|
|
+ if(res.code == 200) {
|
|
|
+ this.maskForm.musicMode = this.getBranchType(result.kitGroupPurchaseType)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getGoodsList(subjectId, type) {
|
|
|
+ getGoods({
|
|
|
+ subjectId: subjectId,
|
|
|
+ type: type
|
|
|
+ }).then(res => {
|
|
|
+ let result = res.data
|
|
|
+ if(res.code == 200) {
|
|
|
+ let tempArr = []
|
|
|
+ result.forEach(item => {
|
|
|
+ tempArr.push({
|
|
|
+ label: item.name,
|
|
|
+ value: item.id
|
|
|
+ })
|
|
|
+ })
|
|
|
+ if(type == 'ACCESSORIES') {
|
|
|
+ this.ACCESSORIESLIST = tempArr
|
|
|
+ }
|
|
|
+ if(type == 'INSTRUMENT') {
|
|
|
+ this.INSTRUMENTLIST = tempArr
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getBranchType(status) {
|
|
|
+ let common = {
|
|
|
+ FREE: "免费",
|
|
|
+ GROUP: "团购",
|
|
|
+ LEASE: "租赁"
|
|
|
+ }
|
|
|
+ return common[status]
|
|
|
+ },
|
|
|
lookClass (row) {
|
|
|
this.classMask.studentName = row.realName;
|
|
|
getStudentClass({
|
|
@@ -492,7 +624,28 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
-<style lang="scss" scope>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.moreInput {
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ /deep/.el-form-item__content {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ }
|
|
|
+ // .el-input {
|
|
|
+ // flex: 1;
|
|
|
+ // margin-right: 15px;
|
|
|
+ // &:last-child {
|
|
|
+ // margin-right: 0;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+}
|
|
|
+/deep/.el-date-editor.el-input {
|
|
|
+ width: auto;
|
|
|
+ .el-input__inner {
|
|
|
+ padding-right: 0;
|
|
|
+ }
|
|
|
+}
|
|
|
.stu-container {
|
|
|
.topFrom {
|
|
|
margin: 20px 30px 0;
|