上传
This commit is contained in:
@@ -1,11 +1,16 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form :model="searchForm" inline>
|
||||
<el-form :model="searchForm" inline @submit.prevent>
|
||||
<el-form-item>
|
||||
<el-input v-model="searchForm.name" placeholder="请输入员工姓名" clearable />
|
||||
<el-input
|
||||
v-model="searchForm.name"
|
||||
placeholder="请输入员工姓名"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-radio-group v-model="searchForm.status">
|
||||
<el-radio-group v-model="searchForm.status" @change="handleQuery">
|
||||
<el-radio :label="0"> 在职 </el-radio>
|
||||
<el-radio :label="1"> 离职 </el-radio>
|
||||
</el-radio-group>
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form :model="searchForm" inline>
|
||||
<el-form :model="searchForm" inline @submit.prevent>
|
||||
<el-form-item>
|
||||
<el-input v-model="searchForm.name" placeholder="方案名称" clearable />
|
||||
<el-input
|
||||
v-model="searchForm.name"
|
||||
placeholder="方案名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="searchForm.status" placeholder="启用状态" clearable filterable>
|
||||
|
||||
@@ -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'))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user