From 965079d252ed4c028e34a0cefc80cf5d38812c16 Mon Sep 17 00:00:00 2001 From: hky <1499449886@qq.com> Date: Mon, 6 Jan 2025 19:19:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=91=98=E5=B7=A5=E8=8A=B1?= =?UTF-8?q?=E5=90=8D=E5=86=8C=E5=B2=97=E4=BD=8D=E4=B8=8B=E6=8B=89=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=EF=BC=8C=E4=BC=98=E5=8C=96=E7=BC=B4=E5=AD=98=E6=AF=94?= =?UTF-8?q?=E4=BE=8B=E9=85=8D=E7=BD=AE=E6=98=BE=E7=A4=BA=EF=BC=8C=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E8=89=B0=E8=8B=A6=E8=A1=A5=E8=B4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/hardshipallowanceconf/index.ts | 41 +++ .../arcb/salary/employee/EmployeeForm.vue | 26 +- src/views/arcb/salary/employee/index.vue | 32 +- .../salary/expenseconf/ExpenseConfForm.vue | 4 +- src/views/arcb/salary/expenseconf/index.vue | 6 +- .../HardshipAllowanceConfForm.vue | 180 +++++++++++ .../salary/hardshipallowanceconf/index.vue | 281 ++++++++++++++++++ 7 files changed, 518 insertions(+), 52 deletions(-) create mode 100644 src/api/arcb/salary/hardshipallowanceconf/index.ts create mode 100644 src/views/arcb/salary/hardshipallowanceconf/HardshipAllowanceConfForm.vue create mode 100644 src/views/arcb/salary/hardshipallowanceconf/index.vue diff --git a/src/api/arcb/salary/hardshipallowanceconf/index.ts b/src/api/arcb/salary/hardshipallowanceconf/index.ts new file mode 100644 index 000000000..893cddd7e --- /dev/null +++ b/src/api/arcb/salary/hardshipallowanceconf/index.ts @@ -0,0 +1,41 @@ +import request from '@/config/axios' + +// 艰苦补贴配置 VO +export interface HardshipAllowanceConfVO { + id: number // 序号 + stationName: string // 岗位名称 + subsidyAmount: number // 补贴金额 +} + +// 艰苦补贴配置 API +export const HardshipAllowanceConfApi = { + // 查询艰苦补贴配置分页 + getHardshipAllowanceConfPage: async (params: any) => { + return await request.get({ url: `/salary/hardship-allowance-conf/page`, params }) + }, + + // 查询艰苦补贴配置详情 + getHardshipAllowanceConf: async (id: number) => { + return await request.get({ url: `/salary/hardship-allowance-conf/get?id=` + id }) + }, + + // 新增艰苦补贴配置 + createHardshipAllowanceConf: async (data: HardshipAllowanceConfVO) => { + return await request.post({ url: `/salary/hardship-allowance-conf/create`, data }) + }, + + // 修改艰苦补贴配置 + updateHardshipAllowanceConf: async (data: HardshipAllowanceConfVO) => { + return await request.put({ url: `/salary/hardship-allowance-conf/update`, data }) + }, + + // 删除艰苦补贴配置 + deleteHardshipAllowanceConf: async (id: number) => { + return await request.delete({ url: `/salary/hardship-allowance-conf/delete?id=` + id }) + }, + + // 导出艰苦补贴配置 Excel + exportHardshipAllowanceConf: async (params) => { + return await request.download({ url: `/salary/hardship-allowance-conf/export-excel`, params }) + }, +} \ No newline at end of file diff --git a/src/views/arcb/salary/employee/EmployeeForm.vue b/src/views/arcb/salary/employee/EmployeeForm.vue index ce5e3eacb..f83c196ef 100644 --- a/src/views/arcb/salary/employee/EmployeeForm.vue +++ b/src/views/arcb/salary/employee/EmployeeForm.vue @@ -27,6 +27,7 @@ v-for="item in group.options" :key="item.value" :value="item.value" + :label="`${item.label} (${getSequenceLabel(item.key)})`" > {{ item.label }}({{ getSequenceLabel(item.key) }}) @@ -161,7 +162,6 @@ const open = async (type: string, id?: number) => { if (id) { formLoading.value = true try { - // formData.value = await EmployeeApi.getEmployee(id) const employeeData = await EmployeeApi.getEmployee(id) // 处理 workTime 数组 if (Array.isArray(employeeData.workTime)) { @@ -177,17 +177,6 @@ const open = async (type: string, id?: number) => { defineExpose({open}) // 提供 open 方法,用于打开弹窗 // 获取岗位下拉框 -// const getStationOptions = async () => { -// stationOptions.value = (await StationApi.getStationPage({ -// pageNo: 1, -// pageSize: 100 -// })).list.map((item: StationVO) => { -// return { -// label: item.stationName, -// value: item.stationCode -// } -// }) -// } const getStationOptions = async () => { const response = await StationApi.getStationPage({ pageNo: 1, @@ -221,16 +210,9 @@ const getStationOptions = async () => { /** 根据 professionalSequence 获取序列标签 */ const getSequenceLabel = (sequence: string): string => { - switch (sequence) { - case '0': - return '管理序列'; - case '1': - return '专业序列'; - case '2': - return '非领导职务'; - default: - return '未知序列'; - } + const dictOptions = getStrDictOptions(DICT_TYPE.ARCB_POSITION_CATEGORY); + const dictOption = dictOptions.find(option => option.value === sequence); + return dictOption ? dictOption.label : '未知序列'; } const getOrgNo = async () => { diff --git a/src/views/arcb/salary/employee/index.vue b/src/views/arcb/salary/employee/index.vue index d35d93278..55dac2c93 100644 --- a/src/views/arcb/salary/employee/index.vue +++ b/src/views/arcb/salary/employee/index.vue @@ -37,6 +37,7 @@ v-for="item in group.options" :key="item.value" :value="item.value" + :label="`${item.label} (${getSequenceLabel(item.key)})`" > {{ item.label }}({{ getSequenceLabel(item.key) }}) @@ -238,7 +239,6 @@ const getList = async () => { loading.value = true try { const data = await EmployeeApi.getEmployeePage(queryParams) - console.log(data) await getStationOptions() list.value = data.list total.value = data.total @@ -247,18 +247,6 @@ const getList = async () => { } } -// const getStationOptions = async () => { -// stationOptions.value = (await StationApi.getStationPage({ -// pageNo: 1, -// pageSize: 100 -// })).list.map((item: StationVO) => { -// return { -// label: item.stationName, -// value: item.stationCode -// } -// }) -// } - const getStationOptions = async () => { const response = await StationApi.getStationPage({ pageNo: 1, @@ -292,22 +280,10 @@ const getStationOptions = async () => { /** 根据 professionalSequence 获取序列标签 */ const getSequenceLabel = (sequence: string): string => { - switch (sequence) { - case '0': - return '管理序列'; - case '1': - return '专业序列'; - case '2': - return '非领导职务'; - default: - return '未知序列'; - } + const dictOptions = getStrDictOptions(DICT_TYPE.ARCB_POSITION_CATEGORY); + const dictOption = dictOptions.find(option => option.value === sequence); + return dictOption ? dictOption.label : '未知序列'; } -// const getSequenceLabel = (sequence: string): string => { -// const dictOptions = getStrDictOptions(DICT_TYPE.ARCB_POSITION_CATEGORY); -// const dictOption = dictOptions.find(option => option.value === sequence); -// return dictOption ? dictOption.label : '未知序列'; -// } /** 搜索按钮操作 */ const handleQuery = () => { diff --git a/src/views/arcb/salary/expenseconf/ExpenseConfForm.vue b/src/views/arcb/salary/expenseconf/ExpenseConfForm.vue index 5439fe155..a4d8dbdad 100644 --- a/src/views/arcb/salary/expenseconf/ExpenseConfForm.vue +++ b/src/views/arcb/salary/expenseconf/ExpenseConfForm.vue @@ -21,7 +21,9 @@ - + + + - + + + + + + + + + + + {{ item.label }}({{ getSequenceLabel(item.key) }}) + 比照区联社: {{ item.accordingToQls }} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/arcb/salary/hardshipallowanceconf/index.vue b/src/views/arcb/salary/hardshipallowanceconf/index.vue new file mode 100644 index 000000000..d041a0576 --- /dev/null +++ b/src/views/arcb/salary/hardshipallowanceconf/index.vue @@ -0,0 +1,281 @@ + + + + \ No newline at end of file