|
@@ -14,6 +14,7 @@
|
|
value-format="timestamp"
|
|
value-format="timestamp"
|
|
placeholder="考试日期"
|
|
placeholder="考试日期"
|
|
style="width: 150px"
|
|
style="width: 150px"
|
|
|
|
+ :editable="false"
|
|
@change="timeChange"
|
|
@change="timeChange"
|
|
>
|
|
>
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
@@ -25,6 +26,7 @@
|
|
end-placeholder="考试结束时间"
|
|
end-placeholder="考试结束时间"
|
|
placeholder="选择时间范围"
|
|
placeholder="选择时间范围"
|
|
value-format="timestamp"
|
|
value-format="timestamp"
|
|
|
|
+ :editable="false"
|
|
@change="timeChange"
|
|
@change="timeChange"
|
|
>
|
|
>
|
|
</el-time-picker>
|
|
</el-time-picker>
|
|
@@ -274,12 +276,21 @@ export default {
|
|
});
|
|
});
|
|
this.updatePackageInfos();
|
|
this.updatePackageInfos();
|
|
},
|
|
},
|
|
- checkData() {
|
|
|
|
|
|
+ checkTime() {
|
|
if (!this.modalForm.examStartTime || !this.modalForm.examEndTime) {
|
|
if (!this.modalForm.examStartTime || !this.modalForm.examEndTime) {
|
|
this.$message.error("请选择考试时间!");
|
|
this.$message.error("请选择考试时间!");
|
|
- return Promise.reject();
|
|
|
|
|
|
+ return false;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (this.modalForm.examStartTime >= this.modalForm.examEndTime) {
|
|
|
|
+ this.$message.error("考试开始时间必须小于考试结束时间!");
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ return true;
|
|
|
|
+ },
|
|
|
|
+ checkData() {
|
|
|
|
+ if (!this.checkTime()) return Promise.reject();
|
|
|
|
+
|
|
if (this.IS_MODEL2) {
|
|
if (this.IS_MODEL2) {
|
|
if (!this.modalForm.printCount) {
|
|
if (!this.modalForm.printCount) {
|
|
this.$message.error("请输入印刷分数!");
|
|
this.$message.error("请输入印刷分数!");
|
|
@@ -444,15 +455,7 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
toAdd() {
|
|
toAdd() {
|
|
- if (!this.modalForm.examStartTime || !this.modalForm.examEndTime) {
|
|
|
|
- this.$message.error("请选择考试时间!");
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (this.modalForm.examStartTime === this.modalForm.examEndTime) {
|
|
|
|
- this.$message.error("考试开始时间不能等于考试结束时间!");
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
|
|
+ if (!this.checkTime()) return;
|
|
|
|
|
|
this.curRow = {
|
|
this.curRow = {
|
|
examPlace: "",
|
|
examPlace: "",
|