|
|
@ -82,7 +82,7 @@ |
|
|
</el-time-picker> |
|
|
</el-time-picker> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="'休息时长1:'"> |
|
|
<el-form-item :label="'休息时长1:'"> |
|
|
<el-input v-model="workingCalendar.exceptduration1" style="width: 130px"></el-input> |
|
|
|
|
|
|
|
|
<el-input v-model="workingCalendar.exceptduration1" @change="workTimeSum" style="width: 130px"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="'休息时间点2:'"> |
|
|
<el-form-item :label="'休息时间点2:'"> |
|
|
<el-time-picker |
|
|
<el-time-picker |
|
|
@ -94,7 +94,7 @@ |
|
|
</el-time-picker> |
|
|
</el-time-picker> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="'休息时长2:'"> |
|
|
<el-form-item :label="'休息时长2:'"> |
|
|
<el-input v-model="workingCalendar.exceptduration2" style="width: 130px"></el-input> |
|
|
|
|
|
|
|
|
<el-input v-model="workingCalendar.exceptduration2" @change="workTimeSum" style="width: 130px"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="'休息时间点3:'"> |
|
|
<el-form-item :label="'休息时间点3:'"> |
|
|
<el-time-picker |
|
|
<el-time-picker |
|
|
@ -106,7 +106,7 @@ |
|
|
</el-time-picker> |
|
|
</el-time-picker> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="'休息时长3:'"> |
|
|
<el-form-item :label="'休息时长3:'"> |
|
|
<el-input v-model="workingCalendar.exceptduration3" style="width: 130px"></el-input> |
|
|
|
|
|
|
|
|
<el-input v-model="workingCalendar.exceptduration3" @change="workTimeSum" style="width: 130px"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="'休息时间点4:'"> |
|
|
<el-form-item :label="'休息时间点4:'"> |
|
|
<el-time-picker |
|
|
<el-time-picker |
|
|
@ -118,7 +118,7 @@ |
|
|
</el-time-picker> |
|
|
</el-time-picker> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="'休息时长4:'"> |
|
|
<el-form-item :label="'休息时长4:'"> |
|
|
<el-input v-model="workingCalendar.exceptduration4" style="width: 130px"></el-input> |
|
|
|
|
|
|
|
|
<el-input v-model="workingCalendar.exceptduration4" @change="workTimeSum" style="width: 130px"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="'休息时间点5:'"> |
|
|
<el-form-item :label="'休息时间点5:'"> |
|
|
<el-time-picker |
|
|
<el-time-picker |
|
|
@ -130,7 +130,7 @@ |
|
|
</el-time-picker> |
|
|
</el-time-picker> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="'休息时长5:'"> |
|
|
<el-form-item :label="'休息时长5:'"> |
|
|
<el-input v-model="workingCalendar.exceptduration5" style="width: 130px"></el-input> |
|
|
|
|
|
|
|
|
<el-input v-model="workingCalendar.exceptduration5" @change="workTimeSum" style="width: 130px"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="'休息时间点6:'"> |
|
|
<el-form-item :label="'休息时间点6:'"> |
|
|
<el-time-picker |
|
|
<el-time-picker |
|
|
@ -142,10 +142,10 @@ |
|
|
</el-time-picker> |
|
|
</el-time-picker> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="'休息时长6:'"> |
|
|
<el-form-item :label="'休息时长6:'"> |
|
|
<el-input v-model="workingCalendar.exceptduration6" style="width: 130px"></el-input> |
|
|
|
|
|
|
|
|
<el-input v-model="workingCalendar.exceptduration6" @change="workTimeSum" style="width: 130px"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="'备注:'"> |
|
|
|
|
|
<el-input v-model="workingCalendar.remark" style="width: 275px"></el-input> |
|
|
|
|
|
|
|
|
<el-form-item :label="'累计工作时间:'"> |
|
|
|
|
|
<el-input v-model="workingCalendar.worktime" disabled style="width: 275px"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
|
|
@ -518,15 +518,33 @@ export default { |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
workTimeSum() { |
|
|
|
|
|
let durationTime = parseFloat(this.workingCalendar.exceptduration1 || 0) + parseFloat(this.workingCalendar.exceptduration2 || 0) + parseFloat(this.workingCalendar.exceptduration3 || 0) |
|
|
|
|
|
+ parseFloat(this.workingCalendar.exceptduration4 || 0) + parseFloat(this.workingCalendar.exceptduration5 || 0) + parseFloat(this.workingCalendar.exceptduration6 || 0) |
|
|
|
|
|
|
|
|
|
|
|
this.workingCalendar.worktime = 24 - durationTime |
|
|
|
|
|
}, |
|
|
// 保存修改后的班次信息 |
|
|
// 保存修改后的班次信息 |
|
|
updateWorkingCalendar() { |
|
|
updateWorkingCalendar() { |
|
|
|
|
|
|
|
|
this.workingCalendar.excepttime1 = this.dayjs(this.workingCalendar.scheduledate + ' ' + this.workingCalendar.exceptexacttime1 + ':00').format('H') |
|
|
|
|
|
this.workingCalendar.excepttime2 = this.dayjs(this.workingCalendar.scheduledate + ' ' + this.workingCalendar.exceptexacttime2 + ':00').format('H') |
|
|
|
|
|
this.workingCalendar.excepttime3 = this.dayjs(this.workingCalendar.scheduledate + ' ' + this.workingCalendar.exceptexacttime3 + ':00').format('H') |
|
|
|
|
|
this.workingCalendar.excepttime4 = this.dayjs(this.workingCalendar.scheduledate + ' ' + this.workingCalendar.exceptexacttime4 + ':00').format('H') |
|
|
|
|
|
this.workingCalendar.excepttime5 = this.dayjs(this.workingCalendar.scheduledate + ' ' + this.workingCalendar.exceptexacttime5 + ':00').format('H') |
|
|
|
|
|
this.workingCalendar.excepttime6 = this.dayjs(this.workingCalendar.scheduledate + ' ' + this.workingCalendar.exceptexacttime6 + ':00').format('H') |
|
|
|
|
|
|
|
|
this.workingCalendar.excepttime1 = parseInt(this.dayjs(this.workingCalendar.scheduledate + ' ' + this.workingCalendar.exceptexacttime1 + ':00').format('H')) |
|
|
|
|
|
+ parseFloat(this.dayjs(this.workingCalendar.scheduledate + ' ' + this.workingCalendar.exceptexacttime1 + ':00').format('mm')) / 60 |
|
|
|
|
|
this.workingCalendar.excepttime2 = parseInt(this.dayjs(this.workingCalendar.scheduledate + ' ' + this.workingCalendar.exceptexacttime2 + ':00').format('H')) |
|
|
|
|
|
+ parseFloat(this.dayjs(this.workingCalendar.scheduledate + ' ' + this.workingCalendar.exceptexacttime2 + ':00').format('mm')) / 60 |
|
|
|
|
|
this.workingCalendar.excepttime3 = parseInt(this.dayjs(this.workingCalendar.scheduledate + ' ' + this.workingCalendar.exceptexacttime3 + ':00').format('H')) |
|
|
|
|
|
+ parseFloat(this.dayjs(this.workingCalendar.scheduledate + ' ' + this.workingCalendar.exceptexacttime3 + ':00').format('mm')) / 60 |
|
|
|
|
|
this.workingCalendar.excepttime4 = parseInt(this.dayjs(this.workingCalendar.scheduledate + ' ' + this.workingCalendar.exceptexacttime4 + ':00').format('H')) |
|
|
|
|
|
+ parseFloat(this.dayjs(this.workingCalendar.scheduledate + ' ' + this.workingCalendar.exceptexacttime4 + ':00').format('mm')) / 60 |
|
|
|
|
|
this.workingCalendar.excepttime5 = parseInt(this.dayjs(this.workingCalendar.scheduledate + ' ' + this.workingCalendar.exceptexacttime5 + ':00').format('H')) |
|
|
|
|
|
+ parseFloat(this.dayjs(this.workingCalendar.scheduledate + ' ' + this.workingCalendar.exceptexacttime5 + ':00').format('mm')) / 60 |
|
|
|
|
|
this.workingCalendar.excepttime6 = parseInt(this.dayjs(this.workingCalendar.scheduledate + ' ' + this.workingCalendar.exceptexacttime6 + ':00').format('H')) |
|
|
|
|
|
+ parseFloat(this.dayjs(this.workingCalendar.scheduledate + ' ' + this.workingCalendar.exceptexacttime6 + ':00').format('mm')) / 60 |
|
|
|
|
|
|
|
|
|
|
|
let durationTime = parseFloat(this.workingCalendar.exceptduration1 || 0) + parseFloat(this.workingCalendar.exceptduration2 || 0) + parseFloat(this.workingCalendar.exceptduration3 || 0) |
|
|
|
|
|
+ parseFloat(this.workingCalendar.exceptduration4 || 0) + parseFloat(this.workingCalendar.exceptduration5 || 0) + parseFloat(this.workingCalendar.exceptduration6 || 0) |
|
|
|
|
|
|
|
|
|
|
|
this.workingCalendar.worktime = 24 - durationTime |
|
|
|
|
|
|
|
|
updateWorkingCalendar(this.workingCalendar).then(({data}) => { |
|
|
updateWorkingCalendar(this.workingCalendar).then(({data}) => { |
|
|
if (data && data.code == 0) { |
|
|
if (data && data.code == 0) { |
|
|
this.$message.success(data.msg) |
|
|
this.$message.success(data.msg) |
|
|
|