|
@@ -13,30 +13,33 @@
|
|
|
{{ listData.goodsList[0].educationName }}
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="业务层次">
|
|
|
- {{listData.goodsList[0].projectName + ' - ' + listData.goodsList[0].businessName }}
|
|
|
-
|
|
|
+ {{
|
|
|
+ listData.goodsList[0].projectName +
|
|
|
+ " - " +
|
|
|
+ listData.goodsList[0].businessName
|
|
|
+ }}
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="专业">
|
|
|
{{ listData.goodsList[0].categoryName }}
|
|
|
-
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="商品名称">
|
|
|
{{ listData.goodsList[0].goodsName }}
|
|
|
-
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="学时">
|
|
|
{{ listData.goodsList[0].classHours }}
|
|
|
-
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="年份">
|
|
|
{{ listData.sevenYear || listData.goodsList[0].year }}
|
|
|
-
|
|
|
</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
<div class="top_style">班级信息</div>
|
|
|
<el-row
|
|
|
:gutter="20"
|
|
|
- style="background: rgb(242, 242, 242); border-radius: 8px;padding: 20px;"
|
|
|
+ style="
|
|
|
+ background: rgb(242, 242, 242);
|
|
|
+ border-radius: 8px;
|
|
|
+ padding: 20px;
|
|
|
+ "
|
|
|
>
|
|
|
<el-form
|
|
|
label-position="right"
|
|
@@ -170,6 +173,18 @@
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
|
|
|
+ <el-form-item
|
|
|
+ label="报名提前截止(天)"
|
|
|
+ prop="pastDueDay"
|
|
|
+ v-if="listData.classStatus === 1"
|
|
|
+ >
|
|
|
+ <el-input-number
|
|
|
+ v-model="listData.pastDueDay"
|
|
|
+ :min="10"
|
|
|
+ :controls="false"
|
|
|
+ :precision="0"
|
|
|
+ ></el-input-number>
|
|
|
+ </el-form-item>
|
|
|
<!-- <el-tooltip class="item" effect="dark" placement="right">
|
|
|
<div slot="content">
|
|
|
商品学习有效期:{{
|
|
@@ -367,6 +382,19 @@
|
|
|
import { mapGetters } from "vuex";
|
|
|
export default {
|
|
|
data() {
|
|
|
+ const validatorDay = (rule, value, callback) => {
|
|
|
+ if (
|
|
|
+ this.listData.classStartTime &&
|
|
|
+ this.listData.classEndTime &&
|
|
|
+ parseInt(this.listData.classEndTime) -
|
|
|
+ parseInt(this.listData.classStartTime) <
|
|
|
+ parseInt(Number(value) * 86400000)
|
|
|
+ ) {
|
|
|
+ callback(new Error("报名截止时间需小于班级有效天数"));
|
|
|
+ } else {
|
|
|
+ callback();
|
|
|
+ }
|
|
|
+ };
|
|
|
return {
|
|
|
copyData: {},
|
|
|
classStartStatus: false,
|
|
@@ -408,6 +436,17 @@ export default {
|
|
|
classEndTime: [
|
|
|
{ required: true, message: "请选择结束时间", trigger: "change" },
|
|
|
],
|
|
|
+ pastDueDay: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "请输入报名截至提前时间",
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ validator: validatorDay,
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
+ ],
|
|
|
status: [{ required: true, message: "请选择状态", trigger: "change" }],
|
|
|
learningTimeStart: [
|
|
|
{
|
|
@@ -591,6 +630,7 @@ export default {
|
|
|
this.listData.officialName = "";
|
|
|
this.listData.classStartTime = "";
|
|
|
this.listData.classEndTime = "";
|
|
|
+ this.listData.pastDueDay = 0;
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.listData.clearValidate();
|
|
|
});
|
|
@@ -607,6 +647,7 @@ export default {
|
|
|
submitForm(formName) {
|
|
|
this.$refs[formName].validate((valid) => {
|
|
|
if (valid) {
|
|
|
+ return;
|
|
|
this.submit(); //提交
|
|
|
} else {
|
|
|
console.log("error submit!!");
|
|
@@ -620,6 +661,7 @@ export default {
|
|
|
if (!data.classStartTime && !data.classEndTime) {
|
|
|
data.classStartTime = null;
|
|
|
data.classEndTime = null;
|
|
|
+ data.pastDueDay = null
|
|
|
} else {
|
|
|
if (data.classStartTime && data.classEndTime) {
|
|
|
data.classStartTime = data.classStartTime / 1000;
|