|
@@ -79,7 +79,7 @@
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
- <el-dialog title="申请开通课程" :visible.sync="buyCourseDialog" :append-to-body="true"
|
|
|
+ <el-dialog title="申请开通课程" :visible.sync="buyCourseDialog"
|
|
|
width="800px" top="20px" align="center">
|
|
|
<el-form label-width="80px" label-position="right" :inline="true" :model="buyForm" status-icon :rules="rules" ref="elForm">
|
|
|
<el-row align="left">
|
|
@@ -144,7 +144,7 @@
|
|
|
|
|
|
<el-row class="tc fc">
|
|
|
<el-form-item >
|
|
|
- <el-button @click="buyCourseDialog=false">取 消</el-button>
|
|
|
+ <el-button @click="cancelBuyCourse">取 消</el-button>
|
|
|
<el-button @click="buyCourse" type="primary">确 定</el-button>
|
|
|
</el-form-item>
|
|
|
</el-row>
|
|
@@ -260,6 +260,7 @@
|
|
|
email:'',
|
|
|
company:'',
|
|
|
buyImg:'',
|
|
|
+ name:'',
|
|
|
courseName: ''
|
|
|
},
|
|
|
promise,
|
|
@@ -382,6 +383,10 @@
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ cancelBuyCourse(){
|
|
|
+ this.$refs["elForm"].resetFields();
|
|
|
+ this.buyCourseDialog=false
|
|
|
+ },
|
|
|
buyCourse() {
|
|
|
this.$refs["elForm"].validate((valid) => {
|
|
|
if (!valid) return;
|
|
@@ -396,6 +401,7 @@
|
|
|
this.$message.successMsg("申请购买成功", 1);
|
|
|
this.buyForm.temp.marks = this.buyForm.marks
|
|
|
Object.assign( this.buyForm.temp, param);
|
|
|
+ this.$refs["elForm"].resetFields();
|
|
|
this.buyForm.temp.is_pay = 0
|
|
|
this.buyCourseDialog = false
|
|
|
}
|
|
@@ -410,9 +416,10 @@
|
|
|
},
|
|
|
goPay(index) {
|
|
|
let item = this.list[index];
|
|
|
- this.buyForm = Object.assign({}, item)
|
|
|
+ this.buyForm = Object.assign(this.buyForm, item)
|
|
|
this.buyForm.company = this.userInfo.company;
|
|
|
this.buyForm.temp = item;
|
|
|
+ this.buyForm.courseName = item.name;
|
|
|
let isEdu = this.type == '施工现场专业人员';
|
|
|
|
|
|
// 绕开检查
|