|
@@ -75,6 +75,18 @@ export default class AddConfig extends Vue {
|
|
|
this.$message.error('请选择结束时间');
|
|
|
return;
|
|
|
}
|
|
|
+ //判断两个时间之间不能大于8天,并且开始时间不能大于结束时间
|
|
|
+ const begin = new Date(this.form.modifiedBegin);
|
|
|
+ const end = new Date(this.form.modifiedEnd);
|
|
|
+ const diff = end.getTime() - begin.getTime();
|
|
|
+ if (diff > 7 * 24 * 60 * 60 * 1000) {
|
|
|
+ this.$message.error('时间范围不能大于7天');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (begin.getTime() > end.getTime()) {
|
|
|
+ this.$message.error('开始时间不能大于结束时间');
|
|
|
+ return;
|
|
|
+ }
|
|
|
this.$confirm('确认同步订单吗?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|