|
|
|
@ -15,7 +15,7 @@ |
|
|
|
|
<el-input-number |
|
|
|
|
v-model="row.year" |
|
|
|
|
size="small" |
|
|
|
|
:min="1" |
|
|
|
|
:min="0" |
|
|
|
|
:controls="false" |
|
|
|
|
style="width: 100px" |
|
|
|
|
/> |
|
|
|
@ -33,7 +33,7 @@ |
|
|
|
|
<el-input-number |
|
|
|
|
v-model="row[item + ''].shouldWorkDay" |
|
|
|
|
size="small" |
|
|
|
|
:min="1" |
|
|
|
|
:min="0" |
|
|
|
|
:max="31" |
|
|
|
|
:controls="false" |
|
|
|
|
style="width: 50px" |
|
|
|
@ -101,7 +101,9 @@ const open = async (type, row) => { |
|
|
|
|
return item |
|
|
|
|
}) |
|
|
|
|
form.value = { |
|
|
|
|
attendanceSettingId: data.attendanceSettingId, |
|
|
|
|
name: data.name, |
|
|
|
|
status: data.status, |
|
|
|
|
planList: list |
|
|
|
|
} |
|
|
|
|
} finally { |
|
|
|
@ -125,18 +127,18 @@ function resetForm() { |
|
|
|
|
function handleAddYearPlan() { |
|
|
|
|
form.value.planList.push({ |
|
|
|
|
year: new Date().getFullYear(), |
|
|
|
|
1: { shouldWorkDay: undefined, paidLeaveDay: undefined }, |
|
|
|
|
2: { shouldWorkDay: undefined, paidLeaveDay: undefined }, |
|
|
|
|
3: { shouldWorkDay: undefined, paidLeaveDay: undefined }, |
|
|
|
|
4: { shouldWorkDay: undefined, paidLeaveDay: undefined }, |
|
|
|
|
5: { shouldWorkDay: undefined, paidLeaveDay: undefined }, |
|
|
|
|
6: { shouldWorkDay: undefined, paidLeaveDay: undefined }, |
|
|
|
|
7: { shouldWorkDay: undefined, paidLeaveDay: undefined }, |
|
|
|
|
8: { shouldWorkDay: undefined, paidLeaveDay: undefined }, |
|
|
|
|
9: { shouldWorkDay: undefined, paidLeaveDay: undefined }, |
|
|
|
|
10: { shouldWorkDay: undefined, paidLeaveDay: undefined }, |
|
|
|
|
11: { shouldWorkDay: undefined, paidLeaveDay: undefined }, |
|
|
|
|
12: { shouldWorkDay: undefined, paidLeaveDay: undefined } |
|
|
|
|
1: { shouldWorkDay: 0, paidLeaveDay: 0 }, |
|
|
|
|
2: { shouldWorkDay: 0, paidLeaveDay: 0 }, |
|
|
|
|
3: { shouldWorkDay: 0, paidLeaveDay: 0 }, |
|
|
|
|
4: { shouldWorkDay: 0, paidLeaveDay: 0 }, |
|
|
|
|
5: { shouldWorkDay: 0, paidLeaveDay: 0 }, |
|
|
|
|
6: { shouldWorkDay: 0, paidLeaveDay: 0 }, |
|
|
|
|
7: { shouldWorkDay: 0, paidLeaveDay: 0 }, |
|
|
|
|
8: { shouldWorkDay: 0, paidLeaveDay: 0 }, |
|
|
|
|
9: { shouldWorkDay: 0, paidLeaveDay: 0 }, |
|
|
|
|
10: { shouldWorkDay: 0, paidLeaveDay: 0 }, |
|
|
|
|
11: { shouldWorkDay: 0, paidLeaveDay: 0 }, |
|
|
|
|
12: { shouldWorkDay: 0, paidLeaveDay: 0 } |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -171,6 +173,8 @@ const submitForm = async () => { |
|
|
|
|
await PlanApi.createPlan(data) |
|
|
|
|
message.success(t('common.createSuccess')) |
|
|
|
|
} else { |
|
|
|
|
data.attendanceSettingId = form.value.attendanceSettingId |
|
|
|
|
data.status = form.value.status |
|
|
|
|
await PlanApi.updatePlan(data) |
|
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
|
} |
|
|
|
|