|
@@ -165,23 +165,23 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="培训学时" style="width: 50%;">
|
|
|
<el-input-number v-model="courseForm.teachDuration" :min="0" step-strictly
|
|
|
- :step="1" controls-position="right"></el-input-number>
|
|
|
+ :step="1" controls-position="right" @blur="inputNumberBlur('teachDuration')"></el-input-number>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="培训费/认证费" style="width: 50%;">
|
|
|
<el-input-number v-model="courseForm.teachVeriPrice" :min="0" step-strictly
|
|
|
- :step="1" controls-position="right"></el-input-number>
|
|
|
+ :step="1" controls-position="right" @blur="inputNumberBlur('teachVeriPrice')"></el-input-number>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="资料费" style="width: 50%;">
|
|
|
<el-input-number v-model="courseForm.materialPrice" :min="0" step-strictly
|
|
|
- :step="1" controls-position="right"></el-input-number>
|
|
|
+ :step="1" controls-position="right" @blur="inputNumberBlur('materialPrice')"></el-input-number>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="其他费用1" style="width: 50%;">
|
|
|
<el-input-number v-model="courseForm.other1Price" :min="0" step-strictly
|
|
|
- :step="1" controls-position="right"></el-input-number>
|
|
|
+ :step="1" controls-position="right" @blur="inputNumberBlur('other1Price')"></el-input-number>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="其他费用2" style="width: 50%;">
|
|
|
<el-input-number v-model="courseForm.other2Price" :min="0" step-strictly
|
|
|
- :step="1" controls-position="right"></el-input-number>
|
|
|
+ :step="1" controls-position="right" @blur="inputNumberBlur('other2Price')"></el-input-number>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
<el-form-item label="课程封面">
|
|
@@ -436,6 +436,11 @@ export default {
|
|
|
this.courseForm.courseDuration = 1
|
|
|
}
|
|
|
},
|
|
|
+ inputNumberBlur(type) {
|
|
|
+ if(!(this.courseForm[type] || this.courseForm[type] === 0)) {
|
|
|
+ this.courseForm[type] = 0
|
|
|
+ }
|
|
|
+ },
|
|
|
saveVideo() {
|
|
|
console.log(this.displayVideoList, '<=== 看看数据')
|
|
|
const courseInfoId = this.addVideoRow.id
|
|
@@ -820,7 +825,6 @@ export default {
|
|
|
if (!valid) {
|
|
|
return false;
|
|
|
}
|
|
|
-
|
|
|
const formData = new FormData();
|
|
|
if (this.courseForm.id) {
|
|
|
formData.append('id', this.courseForm.id);
|