|
|
@@ -18,8 +18,7 @@
|
|
|
<template slot-scope="r" >
|
|
|
<el-date-picker
|
|
|
style="width: 100%"
|
|
|
- v-model="r.row.date"
|
|
|
- value-format="yyyy-MM-dd hh:mm:ss"
|
|
|
+ v-model="r.row.ymdDate"
|
|
|
:clearable=false
|
|
|
popper-class="no-atTheMoment"
|
|
|
:picker-options="startDatepickerOptions"
|
|
|
@@ -30,7 +29,7 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="星期" width="80px">
|
|
|
<template slot-scope="r">
|
|
|
- <span>{{parseTime(r.row.date ,'dddd')}}</span>
|
|
|
+ <span>{{parseTime(r.row.ymdDate ,'dddd')}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="状态" width="160px">
|
|
|
@@ -132,6 +131,7 @@ import BtnTip from "@/components/btnTip";
|
|
|
import dayjs from "dayjs";
|
|
|
import {formatTime, timeCheck} from "@/utils/ruoyi";
|
|
|
import {addWorkTimeDay} from "@/views/system/workTimeSet/api";
|
|
|
+import day from "@/components/Crontab/day";
|
|
|
|
|
|
|
|
|
export default {
|
|
|
@@ -183,18 +183,18 @@ export default {
|
|
|
//获取workTimeList最后一条数据
|
|
|
let workTime = {
|
|
|
isEnable: 1,
|
|
|
- workTime: '07:00',
|
|
|
+ workTime: '08:30',
|
|
|
openTime: '09:00',
|
|
|
- noonbreakStart: null,
|
|
|
- noonbreakEnd: null,
|
|
|
+ noonbreakStart: '12:00',
|
|
|
+ noonbreakEnd: '14:00',
|
|
|
closeTime: '17:00',
|
|
|
- workOffTime: '20:00',
|
|
|
- date: new Date(),
|
|
|
+ workOffTime: '17:30',
|
|
|
+ ymdDate: new Date(),
|
|
|
disabled: false,
|
|
|
};
|
|
|
if(this.workTimeList.length>0){
|
|
|
- if(this.workTimeList[this.workTimeList.length-1].date!=null){
|
|
|
- workTime.date = dayjs(this.workTimeList[this.workTimeList.length-1].date).add(1,'day').toDate();
|
|
|
+ if(this.workTimeList[this.workTimeList.length-1].ymdDate!=null){
|
|
|
+ workTime.ymdDate = dayjs(this.workTimeList[this.workTimeList.length-1].ymdDate).add(1,'day').toDate()
|
|
|
}
|
|
|
}
|
|
|
this.workTimeList.push(workTime);
|
|
|
@@ -218,11 +218,11 @@ export default {
|
|
|
},
|
|
|
//
|
|
|
check(other) {
|
|
|
- if(!other.date){
|
|
|
+ if(!other.ymdDate){
|
|
|
this.$message.error(`日期不能为空`);
|
|
|
return;
|
|
|
}
|
|
|
- const ds = this.formatTime(other.date,"YYYY-MM-DD");
|
|
|
+ const ds = this.formatTime(other.ymdDate,"YYYY-MM-DD");
|
|
|
console.log(other,'ds')
|
|
|
if ( !other.isEnable === null && !other.disabled ) {
|
|
|
this.$message.error(`${ds}未进行配置`);
|
|
|
@@ -283,9 +283,8 @@ export default {
|
|
|
let dateList = [];
|
|
|
let workTimeList = JSON.parse(JSON.stringify(this.workTimeList))
|
|
|
for (let v of workTimeList) {
|
|
|
- if (v.date) {
|
|
|
- let date = this.formatTime(v.date,"YYYY-MM-DD");
|
|
|
- v.ymdDate = date;
|
|
|
+ if (v.ymdDate) {
|
|
|
+ let date = this.formatTime(v.ymdDate,"YYYY-MM-DD");
|
|
|
if (dateList.indexOf(date) > -1) {
|
|
|
this.$message.error(`日期: ${date} 重复`);
|
|
|
return;
|
|
|
@@ -304,7 +303,7 @@ export default {
|
|
|
workTimeList:workTimeList
|
|
|
}
|
|
|
addWorkTimeDay(data).then(res=>{
|
|
|
- this.$emit("success");
|
|
|
+ this.$emit("ok");
|
|
|
this.handleClose();
|
|
|
})
|
|
|
|