dev-cl
qsh 2 months ago
parent fc71e47903
commit 9ade90355b
  1. 11
      src/views/Pers/Employee/index.vue
  2. 9
      src/views/Pers/Setting/Comp/AttendancePlan.vue
  3. 32
      src/views/Pers/Setting/Comp/DialogPlan.vue

@ -1,11 +1,16 @@
<template> <template>
<div> <div>
<el-form :model="searchForm" inline> <el-form :model="searchForm" inline @submit.prevent>
<el-form-item> <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-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="0"> 在职 </el-radio>
<el-radio :label="1"> 离职 </el-radio> <el-radio :label="1"> 离职 </el-radio>
</el-radio-group> </el-radio-group>

@ -1,8 +1,13 @@
<template> <template>
<div> <div>
<el-form :model="searchForm" inline> <el-form :model="searchForm" inline @submit.prevent>
<el-form-item> <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-form-item> <el-form-item>
<el-select v-model="searchForm.status" placeholder="启用状态" clearable filterable> <el-select v-model="searchForm.status" placeholder="启用状态" clearable filterable>

@ -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'))
} }

Loading…
Cancel
Save