diff --git a/pc4mobx/hrmSalary/apis/calculate.js b/pc4mobx/hrmSalary/apis/calculate.js index b14015a7..28067063 100644 --- a/pc4mobx/hrmSalary/apis/calculate.js +++ b/pc4mobx/hrmSalary/apis/calculate.js @@ -1,141 +1,5 @@ import { WeaTools } from "ecCom"; -//薪资核算-薪资核算列表 -export const getCalcList = params => { - return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/list", "POST", params); -}; - - -//薪资核算-删除薪资核算记录 -export const deleteCalc = params => { - return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/delete", "POST", params); -}; - -//薪资核算-归档薪资核算记录 -export const fileCalc = params => { - return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/file", "POST", params); -}; - -//薪资核算-薪资核算详情 -export const getCalcForm = params => { - return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/getForm", "get", params); -}; - -//薪资核算-保存薪资核算的基本信息 -export const saveCalc = params => { - return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/basic/save", "POST", params); -}; - -//薪资核算-获取薪资核算提示信息 -export const getCalcInfo = params => { - return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/getSalarySobCycle", "get", params); -}; - -//薪资核算-薪资核算人员确认列表 -export const getCalcPersonList = params => { - return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/acctEmployee/list", "POST", params); -}; - -//薪资核算-薪资核算人员高级搜索 -export const getCalcPersonSa = params => { - return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/acctEmployee/getSearchCondition", "get", params); -}; - -//薪资核算-删除薪资核算人员 -export const deleteCalcPerson = params => { - return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/acctEmployee/delete", "POST", params); -}; - -//薪资核算-添加薪资核算人员 -export const saveCalcPerson = params => { - return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/acctEmployee/save", "POST", params); -}; - -//薪资核算-导出人员范围 -export const exportCalcPerson = params => { - return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/acctEmployee/export", "POST", params); -}; - -//薪资核算-薪资核算环比上期减少人员列表 -export const getCalcPersonSubList = params => { - return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/reducedEmployee/list", "POST", params); -}; - -//薪资核算-导出环比减少人员 -export const exportCalcPersonSub = params => { - return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/reducedEmployee/export", "POST", params); -}; - - -//薪资核算-执行薪资核算 -export const doScCalc = params => { - return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/acctResult/accounting", "POST", params); -}; - - -//薪资核算-获取薪资核算结果高级搜索 -export const getScSa = params => { - return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/acctResult/getSearchCondition", "get", params); -}; - -//薪资核算-薪资核算结果列表 -export const getScList = params => { - return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/acctResult/list", "post", params); -}; - - -//薪资核算-导出薪资核算 -export const exportSc = params => { - return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/acctResult/export", "post", params); -}; - -//薪资核算-导出线下对比结果 -export const exportOc = params => { - return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/comparisonResult/export", "post", params); -}; - - -//薪资核算-薪资核算结果详情 -export const getScDetail = params => { - return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/acctResult/detail", "get", params); -}; - -//薪资核算-薪资核算合并计税详情 -export const getScMergeTaxDetail = params => { - return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/acctResult/getConsolidatedTaxDetail", "get", params); -}; - -//薪资核算-编辑薪资核算结果 -export const editScResult = params => { - return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/acctResult/save", "post", params); -}; - -//薪资核算-薪资核算结果校验 -export const checkScResult = params => { - return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/acctResult/check", "post", params); -}; - - -//薪资核算-获取校验结果(异常)总数 -export const getScResultExceptionCount = params => { - return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/checkResult/getCount", "get", params); -}; - -//薪资核算-校验结果列表 -export const getCheckResultList = params => { - return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/checkResult/list", "POST", params); -}; - -//薪资核算-校验结果明细列表 -export const getCheckResultDetailList = params => { - return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/checkResultRecord/list", "POST", params); -}; - -//薪资核算-获取导入组件前置参数 -export const getImportParams = params => { - return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/checkResultRecord/list", "POST", params); -}; - // 薪资记录--薪资核算列表 export const getSalaryAcctList = params => { return fetch("/api/bs/hrmsalary/salaryacct/list", { @@ -176,6 +40,17 @@ export const reducedemployeeList = params => { body: JSON.stringify(params) }).then(res => res.json()); }; +// 核算人员--薪资核算环比上月增加人员 +export const addedemployeeList = params => { + return fetch("/api/bs/hrmsalary/salaryacct/addedemployee/list", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; // 核算人员--薪资核算人员确认列表 export const acctemployeeList = params => { @@ -206,7 +81,6 @@ export const getSalarySobCycle = params => { return WeaTools.callApi("/api/bs/hrmsalary/salaryacct/getSalarySobCycle", "GET", params); }; - // 核算人员--添加薪资核算人员 export const saveAcctemployee = params => { return fetch("/api/bs/hrmsalary/salaryacct/acctemployee/save", { @@ -232,7 +106,6 @@ export const exportReducedEmployee = (id) => { })); }; - // 核算人员--导出人员范围 export const exportAcctEmployee = (id) => { fetch("/api/bs/hrmsalary/salaryacct/acctemployee/export?salaryAcctRecordId=" + id).then(res => res.blob().then(blob => { @@ -374,7 +247,6 @@ export const getImportField = (params) => { return WeaTools.callApi("/api/bs/hrmsalary/salaryacct/acctresult/importField", "GET", params); }; - // 核算结果-导入模板 export const getImportTemplate = (salaryItemIds, salaryAcctRecordId) => { fetch("/api/bs/hrmsalary/salaryacct/acctresult/importtemplate/export?salaryItemIds=" + salaryItemIds + "&salaryAcctRecordId=" + salaryAcctRecordId).then(res => res.blob().then(blob => { @@ -412,7 +284,6 @@ export const importAcctResult = (params) => { }).then(res => res.json()); }; - // 核算结果-导出全部 export const exportAcctResult = (salaryAcctRecordId, ids) => { fetch("/api/bs/hrmsalary/salaryacct/acctresult/export?salaryAcctRecordId=" + salaryAcctRecordId + "&ids=" + ids).then(res => res.blob().then(blob => { @@ -509,50 +380,6 @@ export const updateLockStatus = (params) => { body: JSON.stringify(params) }).then(res => res.json()); }; -// 社保福利台账合计接口 -export const siaccountDetailCommonListSum = (params) => { - return fetch("/api/bs/hrmsalary/siaccount/detail/common/list/sum", { - method: "POST", - mode: "cors", - headers: { - "Content-Type": "application/json" - }, - body: JSON.stringify(params) - }).then(res => res.json()); -}; -// 社保福利台账补缴合计接口 -export const siaccountDetailSupplementaryListSum = (params) => { - return fetch("/api/bs/hrmsalary/siaccount/detail/supplementary/list/sum", { - method: "POST", - mode: "cors", - headers: { - "Content-Type": "application/json" - }, - body: JSON.stringify(params) - }).then(res => res.json()); -}; -// 社保福利台账退差合计接口 -export const siaccountDetailRecessionListSum = (params) => { - return fetch("/api/bs/hrmsalary/siaccount/detail/recession/list/sum", { - method: "POST", - mode: "cors", - headers: { - "Content-Type": "application/json" - }, - body: JSON.stringify(params) - }).then(res => res.json()); -}; -// 社保福利台账补差合计接口 -export const siaccountDetailBalanceListSum = (params) => { - return fetch("/api/bs/hrmsalary/siaccount/detail/balance/list/sum", { - method: "POST", - mode: "cors", - headers: { - "Content-Type": "application/json" - }, - body: JSON.stringify(params) - }).then(res => res.json()); -}; // 导入薪资核算添加表头字段缓存 export const cacheImportField = (params) => { return fetch("/api/bs/hrmsalary/salaryacct/acctresult/cacheImportField", { diff --git a/pc4mobx/hrmSalary/apis/item.js b/pc4mobx/hrmSalary/apis/item.js index 3c3bb052..2d23377a 100644 --- a/pc4mobx/hrmSalary/apis/item.js +++ b/pc4mobx/hrmSalary/apis/item.js @@ -1,4 +1,4 @@ -import { WeaTools } from 'ecCom'; +import { WeaTools } from "ecCom"; /** * 薪资项目api @@ -7,171 +7,171 @@ import { WeaTools } from 'ecCom'; // 薪资项目-获取列表 export const getItemList = params => { - return fetch('/api/bs/hrmsalary/salaryitem/list', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) + return fetch("/api/bs/hrmsalary/salaryitem/list", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); }; //薪资项目的高级搜索 export const getSaCondition = params => { - return WeaTools.callApi('/api/bs/hrmsalary/salaryitem/getSearchCondition', 'GET', params); + return WeaTools.callApi("/api/bs/hrmsalary/salaryitem/getSearchCondition", "GET", params); }; //数据源列表字典项 export const formulaDatasourceList = params => { - return WeaTools.callApi('/api/bs/hrmsalary/formula/datasource/list', 'GET', params); + return WeaTools.callApi("/api/bs/hrmsalary/formula/datasource/list", "GET", params); }; //薪资项目-系统薪资项目列表 export const getSysItemList = params => { - return fetch('/api/bs/hrmsalary/salaryitem/sysList', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) + return fetch("/api/bs/hrmsalary/salaryitem/sysList", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); }; //系统薪资项目的高级搜索 export const getSysSaCondition = params => { - return WeaTools.callApi('/api/bs/hrmsalary/salaryitem/getSysSearchCondition', 'GET', params); -} + return WeaTools.callApi("/api/bs/hrmsalary/salaryitem/getSysSearchCondition", "GET", params); +}; //薪资项目-批量删除薪资项目 export const deleteItem = params => { - return fetch('/api/bs/hrmsalary/salaryitem/delete', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) -} + return fetch("/api/bs/hrmsalary/salaryitem/delete", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; //薪资项目-批量删除列表 export const deleteItemList = params => { - return fetch('/api/bs/hrmsalary/salaryitem/listCanDelete', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) -} + return fetch("/api/bs/hrmsalary/salaryitem/listCanDelete", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; //薪资项目-新增薪资项目 export const saveItem = params => { - delete params.formulaContent - return fetch('/api/bs/hrmsalary/salaryitem/save', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) -} + delete params.formulaContent; + return fetch("/api/bs/hrmsalary/salaryitem/save", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; //薪资项目-更新薪资项目 export const updateItem = params => { - return WeaTools.callApi('/api/bs/hrmsalary/salaryitem/update', 'POST', params); -} + return WeaTools.callApi("/api/bs/hrmsalary/salaryitem/update", "POST", params); +}; //薪资项目-薪资项目详情 export const getItemForm = params => { - return WeaTools.callApi('/api/bs/hrmsalary/salaryitem/getSalaryForm', 'GET', params); -} + return WeaTools.callApi("/api/bs/hrmsalary/salaryitem/getSalaryForm", "GET", params); +}; //薪资项目-添加系统薪资项目 export const saveSysItem = params => { - return fetch('/api/bs/hrmsalary/salaryitem/saveSys', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) -} + return fetch("/api/bs/hrmsalary/salaryitem/saveSys", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; //获取薪资项目可选的类型(与属性有联动) export const getItemTypeOption = params => { - return WeaTools.callApi('/api/bs/hrmsalary/salaryitem/listSalaryItemTypeOption', 'GET', params); -} + return WeaTools.callApi("/api/bs/hrmsalary/salaryitem/listSalaryItemTypeOption", "GET", params); +}; //获取公式描述 export const getFormulaDes = params => { - return WeaTools.callApi('/api/bs/hrmsalary/formula/des', 'GET', params); -} + return WeaTools.callApi("/api/bs/hrmsalary/formula/des", "GET", params); +}; // *** 公式 start *** // 获取公式变量类型 export const formualSearchGroup = params => { - return fetch('/api/bs/hrmsalary/formula/search/group', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) -} + return fetch("/api/bs/hrmsalary/formula/search/group", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; //获取公式变量字段 export const formualSearchField = params => { - return fetch('/api/bs/hrmsalary/formula/search/field', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) -} + return fetch("/api/bs/hrmsalary/formula/search/field", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; // /api/bs/hrmsalary/formula/save // 保存公式 export const saveFormual = params => { - return fetch('/api/bs/hrmsalary/formula/save', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) -} + return fetch("/api/bs/hrmsalary/formula/save", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; // 公式测试 export const testFormual = params => { - return fetch('/api/bs/hrmsalary/formula/mock', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) -} + return fetch("/api/bs/hrmsalary/formula/mock", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; // 根据id获取formual export const detailFormual = params => { - return fetch('/api/bs/hrmsalary/formula/detail', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) -} + return fetch("/api/bs/hrmsalary/formula/detail", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; // *** 公式 end *** @@ -179,14 +179,28 @@ export const detailFormual = params => { // 列出可以删除的薪资项目 export const listCanDelete = params => { - return fetch('/api/bs/hrmsalary/salaryitem/listCanDelete', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) -} - + return fetch("/api/bs/hrmsalary/salaryitem/listCanDelete", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; +//获取哪些账套中使用了该薪资项目 +export const getSalarySobBySalaryItem = params => { + return WeaTools.callApi("/api/bs/hrmsalary/salaryitem/getSalarySobBySalaryItem", "GET", params); +}; +// 同步到薪资账套 +export const syncSalaryItemToSalarySobItem = params => { + return fetch("/api/bs/hrmsalary/salaryitem/syncSalaryItemToSalarySobItem ", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; diff --git a/pc4mobx/hrmSalary/apis/mySalaryBenefits.js b/pc4mobx/hrmSalary/apis/mySalaryBenefits.js index c87cd3ab..e985ac5a 100644 --- a/pc4mobx/hrmSalary/apis/mySalaryBenefits.js +++ b/pc4mobx/hrmSalary/apis/mySalaryBenefits.js @@ -1,4 +1,5 @@ import { WeaTools } from "ecCom"; +import { convertToUrlString } from "../util/url"; // 工资单列表 export const mySalaryBillList = params => { @@ -25,7 +26,13 @@ export const recordList = params => { // 工资查看详情 export const mySalaryBill = params => { - return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/mySalaryBill", "GET", params); + return fetch(`/api/bs/hrmsalary/salaryBill/mySalaryBill?${convertToUrlString(params)}`, { + method: "GET", + mode: "cors", + headers: { + "Content-Type": "application/json" + } + }).then(res => res.json()); }; export const isNeedSecondPwdVerify = params => { diff --git a/pc4mobx/hrmSalary/apis/statistics.js b/pc4mobx/hrmSalary/apis/statistics.js index f5f4aff6..6297dfa8 100644 --- a/pc4mobx/hrmSalary/apis/statistics.js +++ b/pc4mobx/hrmSalary/apis/statistics.js @@ -78,3 +78,31 @@ export const statisticsEmployeeDetailList = (params) => { export const getDataPerspective = (params) => { return postFetch("/api/bs/hrmsalary/report/statistics/report/getDataPerspective", params); }; +//报表分享-确认分享 +export const salaryStatisticsPushSendMsg = (params) => { + return postFetch("/api/bs/salaryreport/salary/statistics/push/sendMsg", params); +}; +//报表分享-表单数据 +export const salaryStatisticsPushGetForm = (params) => { + return WeaTools.callApi("/api/bs/salaryreport/salary/statistics/push/getForm", "GET", params); +}; +//报表记录-全部撤回 +export const salaryStatisticsPushcancelAll = (params) => { + return WeaTools.callApi("/api/bs/salaryreport/salary/statistics/push/cancelAll", "GET", params); +}; +//报表记录-撤回单条记录 +export const salaryStatisticsPushcancel = (params) => { + return WeaTools.callApi("/api/bs/salaryreport/salary/statistics/push/cancel", "GET", params); +}; +//报表记录-列表数据 +export const salaryStatisticsPushGetTable = (params) => { + return postFetch("/api/bs/salaryreport/salary/statistics/push/getTable", params); +}; +//报表记录-查看分享记录详情 +export const salaryStatisticsPushGetDetail = (params) => { + return postFetch("/api/bs/salaryreport/salary/statistics/push/getDetail", params); +}; +//报表记录-追加被分享人 +export const salaryStatisticsPushAddSharedSendMsg = (params) => { + return postFetch("/api/bs/salaryreport/salary/statistics/push/addSharedSendMsg", params); +}; diff --git a/pc4mobx/hrmSalary/apis/taxAgent.js b/pc4mobx/hrmSalary/apis/taxAgent.js index 25747f12..1b0f58d8 100644 --- a/pc4mobx/hrmSalary/apis/taxAgent.js +++ b/pc4mobx/hrmSalary/apis/taxAgent.js @@ -1,5 +1,5 @@ import { WeaTools } from "ecCom"; -import { formPost, postFetch } from "../util/request"; +import { postFetch } from "../util/request"; //个税扣缴义务人列表 export const getTaxAgentList = (params) => { @@ -7,9 +7,9 @@ export const getTaxAgentList = (params) => { method: "POST", mode: "cors", headers: { - "Content-Type": "application/json", + "Content-Type": "application/json" }, - body: JSON.stringify(params), + body: JSON.stringify(params) }).then((res) => res.json()); }; //同步人员范围 @@ -18,9 +18,9 @@ export const taxAgentRangeSync = (params) => { method: "POST", mode: "cors", headers: { - "Content-Type": "application/json", + "Content-Type": "application/json" }, - body: JSON.stringify(params), + body: JSON.stringify(params) }).then((res) => res.json()); }; @@ -108,12 +108,8 @@ export const taxAgentRangeImportData = (params) => { }; //个税扣缴义务人下拉列表 -export const getTaxAgentSelectList = (params) => { - return WeaTools.callApi( - "/api/bs/hrmsalary/taxAgent/selectList", - "GET", - params - ); +export const getTaxAgentSelectList = (isShare = false) => { + return WeaTools.callApi("/api/bs/hrmsalary/taxAgent/selectList", "GET", { isShare }); }; //当前登录人个税扣缴义务人下拉列表 diff --git a/pc4mobx/hrmSalary/apis/welfareArchive.js b/pc4mobx/hrmSalary/apis/welfareArchive.js index a38f22ce..e86e909e 100644 --- a/pc4mobx/hrmSalary/apis/welfareArchive.js +++ b/pc4mobx/hrmSalary/apis/welfareArchive.js @@ -13,6 +13,10 @@ export const getCondition = params => { export const queryList = (params) => { return postFetch("/api/bs/hrmsalary/archives/getTable", params); }; +//社保福利档案_非系统人员列表 +export const getExtTable = (params) => { + return postFetch("/api/bs/hrmsalary/archives/getExtTable", params); +}; //社保福利档案列表 export const queryInsuranceTabTotal = (params) => { return WeaTools.callApi("/api/bs/hrmsalary/archives/queryInsuranceTabTotal", params); diff --git a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js index 7707880c..19a14492 100644 --- a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js +++ b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js @@ -8,6 +8,7 @@ import React, { Component } from "react"; import { WeaBrowser, WeaDialog, WeaFormItem, WeaSearchGroup, WeaSelect, WeaLocaleProvider } from "ecCom"; import { Button, message, Modal } from "antd"; import { getTaxAgentRangeForm } from "../../apis/taxAgent"; +import { commonEnumList } from "../../apis/ruleconfig"; import { SelectWithAll } from "../../pages/socialSecurityBenefits/standingBookDetail/components/regAddEmployee"; import "./index.less"; @@ -32,41 +33,74 @@ class PersonalScopeModal extends Component { if (isTaxgent) { this.getTaxAgentRangeForm(); } else { - const employeeStatus = [ - { key: "TRIAL", showname: getLabel(18883, "试用") }, - { key: "FORMAL", showname: getLabel(15711, "正式") }, - { key: "TEMPORARY", showname: getLabel(480, "临时") }, - { key: "DELAY", showname: getLabel(15844, "试用延期") }, - { key: "FIRE", showname: getLabel(542707, "解雇") }, - { key: "DEPARTURE", showname: getLabel(6091, "离职") }, - { key: "RETIRED", showname: getLabel(6092, "退休") } - ]; - const targetTypeList = [ - { - key: "EMPLOYEE", - showname: getLabel(30042, "人员"), - selected: false - }, - { - key: "SUBCOMPANY", - showname: getLabel(33553, "分部"), - selected: false - }, - { - key: "DEPT", - showname: getLabel(27511, "部门"), - selected: false - }, - { - key: "POSITION", - showname: getLabel(6086, "岗位"), - selected: false - } - ]; - this.setState({ targetTypeList, employeeStatus }); + this.commonEnumList(); + // const employeeStatus = [ + // { key: "TRIAL", showname: "试用" }, + // { key: "FORMAL", showname: "正式" }, + // { key: "TEMPORARY", showname: "临时" }, + // { key: "DELAY", showname: "试用延期" }, + // { key: "FIRE", showname: "解雇" }, + // { key: "DEPARTURE", showname: "离职" }, + // { key: "RETIRED", showname: "退休" } + // ]; + // const targetTypeList = [ + // { + // key: "EMPLOYEE", + // showname: "人员", + // selected: false + // }, + // { + // key: "SUBCOMPANY", + // showname: "分部", + // selected: false + // }, + // { + // key: "DEPT", + // showname: "部门", + // selected: false + // }, + // { + // key: "POSITION", + // showname: "岗位", + // selected: false + // } + // ]; + // this.setState({ targetTypeList, employeeStatus }); } } + commonEnumList = () => { + commonEnumList({ enumClass: "com.engine.salary.enums.UserStatusEnum" }).then(({ status, data }) => { + if (status) { + const targetTypeList = [ + { + key: "EMPLOYEE", + showname: "人员", + selected: false + }, + { + key: "SUBCOMPANY", + showname: "分部", + selected: false + }, + { + key: "DEPT", + showname: "部门", + selected: false + }, + { + key: "POSITION", + showname: "岗位", + selected: false + } + ]; + this.setState({ + targetTypeList, + employeeStatus: _.map(_.filter(data, o => o.value !== 7), it => ({ key: it.enum, showname: it.defaultLabel })) + }); + } + }); + }; getTaxAgentRangeForm = () => { getTaxAgentRangeForm().then(({ status, data }) => { if (status) { @@ -92,7 +126,7 @@ class PersonalScopeModal extends Component { employeeStatus: status.split(","), includeType, targetParams: _.map(targetTypeIds.split(","), it => ({ targetType, targetId: it })), - [saveKeyVal["key"]]: saveKeyVal["value"], + [saveKeyVal["key"]]: saveKeyVal["value"] }; this.setState({ loading: true }); APISaveFox["save"](payload).then(({ status, errormsg }) => { diff --git a/pc4mobx/hrmSalary/components/importDialog/components/impStep1.js b/pc4mobx/hrmSalary/components/importDialog/components/impStep1.js new file mode 100644 index 00000000..209125fb --- /dev/null +++ b/pc4mobx/hrmSalary/components/importDialog/components/impStep1.js @@ -0,0 +1,94 @@ +/* + * Author: 黎永顺 + * name: 导入-步骤一 + * Description: + * Date: 2023/8/11 + */ +import React, { Component } from "react"; +import { WeaLocaleProvider } from "ecCom"; +import { Icon, message, Upload } from "antd"; + +const Dragger = Upload.Dragger; +const { getLabel } = WeaLocaleProvider; + +class ImpStep1 extends Component { + constructor(props) { + super(props); + this.state = { + fileList: [] + }; + } + + handleChange = (data) => { + const { fileList, file } = data; + if (file.response && typeof (file.response) != "undefined" && file.status !== "removed") message.success(getLabel(111, "上传成功")); + this.setState({ fileList: fileList.slice(-1) }); + }; + + render() { + const { fileList } = this.state; + const dragger = { + accept: ".xlsx", + name: "file", + multiple: false, + action: "/api/doc/upload/uploadFile", + fileList, + onChange: this.handleChange + }; + return ( +
+ {getLabel(543203, "点击或将文件拖拽到此区域上传")} {getLabel(543204, "支持单个或批量上传,严禁上传公司内部资料及其他违禁文件")}
+ {`1. ${getLabel(30907, "第一步")},${getLabel(543205, "请选择导出的Excel文件或")}`} + { + typeof this.props.link === "string" ? + {getLabel(543207, "点击这里下载模板")} : + {getLabel(543207, "点击这里下载模板")} + } + + {this.props.exportDataDom} +
+{`2. ${getLabel(543211, "第二步")},${getLabel(543212, "请一定要确定Excel文档中的格式是模板中的格式")},${getLabel(543213, "没有被修改掉")};`}
+{`3. ${getLabel(543216, "第三步")},${getLabel(543215, "选择填写好的Excel文档")},${getLabel(543214, "点击“下一步”按钮进行数据预览")};`}
++ {`4. ${getLabel(543217, "第四步")},${getLabel(543218, "如果以上步骤和Excel文档正确的话")},${getLabel(543219, "导入成功会有提示")},${getLabel(543220, "数据会被正确导入")}。${getLabel(543221, "如果有问题")},${getLabel(543222, "则会提示Excel文档的错误之处")}。`} +
+{`1. ${getLabel(543224, "后缀名为xls或者xlsx")};`}
+{`2. ${getLabel(543225, "数据请勿放在合并的单元格中")};`}
+{`3. ${getLabel(543226, "账单月份格式必须为")}:YYYY-MM;`}
++ {getLabel(389249, "已导入")} + {importResult.successCount} + {`${getLabel(30690, "条数据")},${getLabel(25009, "失败")}`} + {importResult.errorCount} {getLabel(30690, "条数据")} +
+{getLabel(111, "导入失败")}
+