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