|  | @@ -226,7 +226,7 @@ import { mapGetters } from "vuex";
 | 
	
		
			
				|  |  |  import { tableList } from "./api";
 | 
	
		
			
				|  |  |  import DataRangePicker from "@/components/dateTime/daterange.picker.vue";
 | 
	
		
			
				|  |  |  import dayjs from "dayjs";
 | 
	
		
			
				|  |  | -import { timeCheck } from "@/utils/ruoyi";
 | 
	
		
			
				|  |  | +import { timeCheckNew } from "@/utils/ruoyi";
 | 
	
		
			
				|  |  |  import { editWorkTime, addWorkTimeDay } from "@/views/system/workTimeSet/api";
 | 
	
		
			
				|  |  |  import DialogTemplate from "./dialog.template";
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -383,6 +383,7 @@ export default {
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    methods: {
 | 
	
		
			
				|  |  |      dayjs,
 | 
	
		
			
				|  |  | +    timeCheckNew,
 | 
	
		
			
				|  |  |      createButton(btnContent, backgroundColorCss, marginRight) {
 | 
	
		
			
				|  |  |        let button = document.createElement("button");
 | 
	
		
			
				|  |  |        button.type = "button"; // 类型
 | 
	
	
		
			
				|  | @@ -447,6 +448,16 @@ export default {
 | 
	
		
			
				|  |  |          this.isNeedLoadedCalendarDate = false;
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +    onEnableChange(workTime) {
 | 
	
		
			
				|  |  | +      if (workTime.isEnable == '0') {
 | 
	
		
			
				|  |  | +        workTime.openTime = null;
 | 
	
		
			
				|  |  | +        workTime.closeTime = null;
 | 
	
		
			
				|  |  | +        // workTime.noonbreakStart = null;
 | 
	
		
			
				|  |  | +        // workTime.noonbreakEnd = null;
 | 
	
		
			
				|  |  | +        workTime.workTime = null;
 | 
	
		
			
				|  |  | +        workTime.workOffTime = null;
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |      reset(day) {
 | 
	
		
			
				|  |  |        return {
 | 
	
		
			
				|  |  |          orgId: this.queryParams.orgId,
 | 
	
	
		
			
				|  | @@ -547,7 +558,7 @@ export default {
 | 
	
		
			
				|  |  |        this.$refs.form.validate((isValidate) => {
 | 
	
		
			
				|  |  |          if (!isValidate) return;
 | 
	
		
			
				|  |  |          if (
 | 
	
		
			
				|  |  | -          !timeCheck([
 | 
	
		
			
				|  |  | +          !timeCheckNew([
 | 
	
		
			
				|  |  |              this.formData.workTime,
 | 
	
		
			
				|  |  |              this.formData.openTime,
 | 
	
		
			
				|  |  |              this.formData.closeTime,
 | 
	
	
		
			
				|  | @@ -555,7 +566,7 @@ export default {
 | 
	
		
			
				|  |  |            ])
 | 
	
		
			
				|  |  |          ) {
 | 
	
		
			
				|  |  |            this.$message.error(
 | 
	
		
			
				|  |  | -            `请按照(上班时间<营业时间<营业结束<下班时间)顺序配置`
 | 
	
		
			
				|  |  | +            `请按照(上班时间<=营业时间<营业结束<=下班时间)顺序配置`
 | 
	
		
			
				|  |  |            );
 | 
	
		
			
				|  |  |            return false;
 | 
	
		
			
				|  |  |          }
 | 
	
	
		
			
				|  | @@ -594,10 +605,24 @@ export default {
 | 
	
		
			
				|  |  |            return this.$message.error("请选择上班时间");
 | 
	
		
			
				|  |  |          if (!this.formData.workOffTime)
 | 
	
		
			
				|  |  |            return this.$message.error("请选择下班时间");
 | 
	
		
			
				|  |  | -        if (!timeCheck([this.formData.openTime, this.formData.closeTime]))
 | 
	
		
			
				|  |  | -          return this.$message.error("开始时间不能大于结束时间");
 | 
	
		
			
				|  |  | -        if (!timeCheck([this.formData.workTime, this.formData.workOffTime]))
 | 
	
		
			
				|  |  | -          return this.$message.error("上班时间不能大于下班时间");
 | 
	
		
			
				|  |  | +        // if (!timeCheckNew([this.formData.openTime, this.formData.closeTime]))
 | 
	
		
			
				|  |  | +        //   return this.$message.error("开始时间不能大于结束时间");
 | 
	
		
			
				|  |  | +        // if (!timeCheckNew([this.formData.workTime, this.formData.workOffTime]))
 | 
	
		
			
				|  |  | +        //   return this.$message.error("上班时间不能大于下班时间");
 | 
	
		
			
				|  |  | +        
 | 
	
		
			
				|  |  | +        if (
 | 
	
		
			
				|  |  | +          !timeCheckNew([
 | 
	
		
			
				|  |  | +            this.formData.workTime,
 | 
	
		
			
				|  |  | +            this.formData.openTime,
 | 
	
		
			
				|  |  | +            this.formData.closeTime,
 | 
	
		
			
				|  |  | +            this.formData.workOffTime,
 | 
	
		
			
				|  |  | +          ])
 | 
	
		
			
				|  |  | +        ) {
 | 
	
		
			
				|  |  | +          this.$message.error(
 | 
	
		
			
				|  |  | +            `请按照(上班时间<=营业时间<营业结束<=下班时间)顺序配置`
 | 
	
		
			
				|  |  | +          );
 | 
	
		
			
				|  |  | +          return false;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |        let data = {
 | 
	
		
			
				|  |  |          orgIdList: [this.formData.orgId],
 | 
	
	
		
			
				|  | @@ -612,11 +637,15 @@ export default {
 | 
	
		
			
				|  |  |      copyDataToMonth() {
 | 
	
		
			
				|  |  |        let startOfMonthDay = dayjs(this.formData.ymdDate).startOf("month");
 | 
	
		
			
				|  |  |        let endOfMonthDay = dayjs(this.formData.ymdDate).endOf("month");
 | 
	
		
			
				|  |  | +      let nowData=new Date();
 | 
	
		
			
				|  |  |        let dataList = [];
 | 
	
		
			
				|  |  |        while (startOfMonthDay.isBefore(endOfMonthDay)) {
 | 
	
		
			
				|  |  |          let temp = { ...this.formData };
 | 
	
		
			
				|  |  |          temp.ymdDate = startOfMonthDay.format("YYYY-MM-DD");
 | 
	
		
			
				|  |  | -        dataList.push(temp);
 | 
	
		
			
				|  |  | +        if(startOfMonthDay.isAfter(nowData))
 | 
	
		
			
				|  |  | +        {
 | 
	
		
			
				|  |  | +          dataList.push(temp);
 | 
	
		
			
				|  |  | +        }        
 | 
	
		
			
				|  |  |          startOfMonthDay = startOfMonthDay.add(1, "day");
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |        return dataList;
 |