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