diff --git a/pc4mobx/hrmSalary/apis/cumDeduct.js b/pc4mobx/hrmSalary/apis/cumDeduct.js index fc963bb5..c06780e1 100644 --- a/pc4mobx/hrmSalary/apis/cumDeduct.js +++ b/pc4mobx/hrmSalary/apis/cumDeduct.js @@ -137,3 +137,15 @@ export const getTableRecordDate = ({ url, ...params }) => { return postFetch(url, params); }; +//个税-在线获取 +export const onlineRequest = (params) => { + return postFetch("/api/bs/hrmsalary/addUpDeduction/online/request", params); +}; + +//个税-在线获取结果查询 +export const onlineFeedback = () => { + return fetch("/api/bs/hrmsalary/addUpDeduction/online/feedback", { + method: "GET", + mode: "cors" + }).then((res) => res.json()); +}; diff --git a/pc4mobx/hrmSalary/apis/cumSituation.js b/pc4mobx/hrmSalary/apis/cumSituation.js index 512f3d14..cd712d88 100644 --- a/pc4mobx/hrmSalary/apis/cumSituation.js +++ b/pc4mobx/hrmSalary/apis/cumSituation.js @@ -121,3 +121,7 @@ export const deleteAllAddUpSituation = (params) => { export const getAddUpSituation = (params) => { return postFetch('/api/bs/hrmsalary/addUpSituation/getAddUpSituation', params); } +//个税相关-在线获取 +export const onlineActualAddUpAdvanceTax = (params) => { + return postFetch('/api/bs/hrmsalary/addUpSituation/online/actualAddUpAdvanceTax', params); +} diff --git a/pc4mobx/hrmSalary/apis/declare.js b/pc4mobx/hrmSalary/apis/declare.js index 360c8b62..c8dd0f3f 100644 --- a/pc4mobx/hrmSalary/apis/declare.js +++ b/pc4mobx/hrmSalary/apis/declare.js @@ -1,68 +1,241 @@ -import { WeaTools } from 'ecCom'; -import { postFetch } from '../util/request'; +import { WeaTools } from "ecCom"; +import { postFetch } from "../util/request"; //个税申报表-个税申报表列表 export const getDeclareList = params => { - return fetch('/api/bs/hrmsalary/taxdeclaration/list', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) -} + return fetch("/api/bs/hrmsalary/taxdeclaration/list", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; //个税申报表-个税申报表表单 export const getDeclareForm = params => { - return WeaTools.callApi('/api/bs/hrmsalary/taxdeclaration/getForm', 'get', params); -} + return WeaTools.callApi("/api/bs/hrmsalary/taxdeclaration/getForm", "get", params); +}; //个税申报表-个税申报表生成 export const saveDeclare = params => { - return fetch('/api/bs/hrmsalary/taxdeclaration/save', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) -} + return fetch("/api/bs/hrmsalary/taxdeclaration/save", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; //个税申报表-个税申报表相关信息 export const getDeclareInfo = params => { - return WeaTools.callApi('/api/bs/hrmsalary/taxdeclaration/getTaxDeclarationInfo', 'get', params); -} + return WeaTools.callApi("/api/bs/hrmsalary/taxdeclaration/getTaxDeclarationInfo", "get", params); +}; // 个税申报表详情列表 export const getDetailList = params => { - return fetch('/api/bs/hrmsalary/taxdeclaration/detail/list', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) -} + return fetch("/api/bs/hrmsalary/taxdeclaration/detail/list", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; // 个税申报表导出 export const exportSalaryArchive = (id = "") => { - fetch('/api/bs/hrmsalary/taxdeclaration/export?taxDeclarationId=' + id).then(res => res.blob().then(blob => { - var filename=`个税申报表.xlsx` - var a = document.createElement('a'); - var url = window.URL.createObjectURL(blob); - a.href = url; - a.download = filename; - a.click(); - window.URL.revokeObjectURL(url); - })) -} + fetch("/api/bs/hrmsalary/taxdeclaration/export?taxDeclarationId=" + id).then(res => res.blob().then(blob => { + var filename = `个税申报表.xlsx`; + var a = document.createElement("a"); + var url = window.URL.createObjectURL(blob); + a.href = url; + a.download = filename; + a.click(); + window.URL.revokeObjectURL(url); + })); +}; //个税申报表-撤回申报 export const withDrawTaxDeclaration = (params) => { - return postFetch('/api/bs/hrmsalary/taxdeclaration/withDrawTaxDeclaration', params); -} + return postFetch("/api/bs/hrmsalary/taxdeclaration/withDrawTaxDeclaration", params); +}; + +//人员信息报送-个税扣缴义务人列表 +export const taxAgentDeclareList = (params) => { + return postFetch("/api/bs/hrmsalary/employeedeclare/taxAgentDeclareList", params); +}; +//人员信息报送-全部人员列表 +export const employeedeclareList = (params) => { + return postFetch("/api/bs/hrmsalary/employeedeclare/list", params); +}; +//人员信息报送-本月新增人员列表 +export const employeedeclareList4Add = (params) => { + return postFetch("/api/bs/hrmsalary/employeedeclare/list4Add", params); +}; +//人员信息报送-本月信息变动列表 +export const employeedeclareList4Update = (params) => { + return postFetch("/api/bs/hrmsalary/employeedeclare/list4Update", params); +}; + +//人员信息报送-本月报送失败人员列表 +export const employeedeclareList4Fail = (params) => { + return postFetch("/api/bs/hrmsalary/employeedeclare/list4Fail", params); +}; + +//人员报送-刷新数据 +export const employeedeclareRefresh = (params) => { + return postFetch("/api/bs/hrmsalary/employeedeclare/refresh", params); +}; + +//人员报送-获取报送结果反馈 +export const getDeclareFeedback = (params) => { + return postFetch("/api/bs/hrmsalary/employeedeclare/getDeclareFeedback", params); +}; + +//人员报送-获取整体的报送情况 +export const getEmployeeDeclareInfo = (params) => { + return postFetch("/api/bs/hrmsalary/employeedeclare/getDeclareInfo", params); +}; + +//人员报送-后端业务逻辑是否已经完成 +export const employeedeclareGetRate = params => { + return WeaTools.callApi("/api/bs/hrmsalary/employeedeclare/getRate", "GET", params); +}; + +//人员报送-获取新建或编辑的表单 +export const employeedeclareGetForm = params => { + return WeaTools.callApi("/api/bs/hrmsalary/employeedeclare/getForm", "GET", params); +}; + +//人员报送-新增人员/编辑人员保存 +export const getEmployeeSave = (params) => { + return postFetch("/api/bs/hrmsalary/employeedeclare/save", params); +}; + +//人员报送-删除 +export const employeeDelete = (params) => { + return postFetch("/api/bs/hrmsalary/employeedeclare/delete", params); +}; + +//人员报送-全部报送 +export const employeedeclareDeclare = (params) => { + return postFetch("/api/bs/hrmsalary/employeedeclare/declare", params); +}; + +//个税在线对接-获取个税申报记录下的个税申报表TAB +export const getTaxDeclarationTab = params => { + return WeaTools.callApi("/api/bs/hrmsalary/taxdeclaration/getTaxDeclarationTab", "GET", params); +}; + +//个税在线对接-个税申报表是否已经生成 +export const taxdeclarationGetRate = params => { + return WeaTools.callApi("/api/bs/hrmsalary/taxdeclaration/getRate", "GET", params); +}; + +//人员报送-刷新数据 +export const taxdeclarationRefreshData = (params) => { + return postFetch("/api/bs/hrmsalary/taxdeclaration/refreshData", params); +}; + +//人员报送-在线申报 +export const taxdeclarationDeclare = (params) => { + return postFetch("/api/bs/hrmsalary/taxdeclaration/declare", params); +}; +//个税申报表申报数据-人员未报送列表 +export const taxdeclarationEmployeeList4NotDeclare = (params) => { + return postFetch("/api/bs/hrmsalary/taxdeclaration/employee/list4NotDeclare", params); +}; +//个税申报表申报数据-报送人员无申报数据列表 +export const taxdeclarationEmployeeList4NoValue = (params) => { + return postFetch("/api/bs/hrmsalary/taxdeclaration/employee/list4NoValue", params); +}; +//个税申报表申报数据-申报失败列表 +export const taxdeclarationEmployeeList4Fail = (params) => { + return postFetch("/api/bs/hrmsalary/taxdeclaration/employee/list4Fail", params); +}; +//个税申报表申报数据-删除个税申报表 +export const taxdeclarationDelete = (params) => { + return postFetch("/api/bs/hrmsalary/taxdeclaration/delete", params); +}; + +//个税申报表申报数据-获取在线申报反馈 +export const taxdeclarationGetDeclareFeedback = (params) => { + return postFetch("/api/bs/hrmsalary/taxdeclaration/getDeclareFeedback", params); +}; + +//个税申报表申报数据-更正申报 +export const taxdeclaratioUpdateDeclare = (params) => { + return postFetch("/api/bs/hrmsalary/taxdeclaration/updateDeclare", params); +}; + +//个税申报表申报数据-作废申报 +export const taxdeclaratioUpdateCancel = (params) => { + return postFetch("/api/bs/hrmsalary/taxdeclaration/cancel", params); +}; + +//个税申报表申报数据-获取作废反馈 +export const taxdeclaratioGetCancelFeedback = (params) => { + return postFetch("/api/bs/hrmsalary/taxdeclaration/getCancelFeedback", params); +}; + +//个税申报表申报数据-三方协议缴款反馈 +export const taxPaymentAgreementPayFeedback = (params) => { + return postFetch("/api/bs/hrmsalary/taxPayment/agreement/pay/feedback", params); +}; + +//个税申报表申报数据-应缴税额查询 +export const taxPaymentTaxAmount = (params) => { + return postFetch("/api/bs/hrmsalary/taxPayment/tax/amount", params); +}; + +//个税申报表申报数据-获取企业的三方信息 +export const taxPaymentgetAgreement = (params) => { + return postFetch("/api/bs/hrmsalary/taxPayment/getAgreement", params); +}; + +//个税申报表申报数据-获取企业的三方信息查询反馈 +export const taxPaymentgetAgreementFeedback = (params) => { + return postFetch("/api/bs/hrmsalary/taxPayment/getAgreementFeedback", params); +}; + +//个税申报表申报数据-同步缴款状态 +export const taxPaymentVoucherStatusSync = (params) => { + return postFetch("/api/bs/hrmsalary/taxPayment/voucher/status/sync", params); +}; + +//个税申报表申报数据-三方缴款,最终支付 +export const taxPaymentAgreemenPay = (params) => { + return postFetch("/api/bs/hrmsalary/taxPayment/agreement/pay", params); +}; + +//个税申报表申报数据-开具企业缴税完税证明 +export const taxPaymentWithheldVoucherGet = (params) => { + return postFetch("/api/bs/hrmsalary/taxPayment/withheldVoucher/get", params); +}; + +//个税申报表申报数据-作废缴款凭证 +export const taxPaymentVoucherCancel = (params) => { + return postFetch("/api/bs/hrmsalary/taxPayment/voucher/cancel", params); +}; + +//个税申报表申报数据-缴款凭证打印 +export const taxPaymentVoucherPrint = (params) => { + return postFetch("/api/bs/hrmsalary/taxPayment/voucher/print", params); +}; + +//个税申报表申报数据-缴款凭证打印反馈 +export const taxPaymentVoucherPrintFeedback = (params) => { + return postFetch("/api/bs/hrmsalary/taxPayment/voucher/print/feedback", params); +}; + +//个税申报表申报数据-缴款凭证打印反馈 +export const taxdeclarationUpdateIcon = (params) => { + return postFetch("/api/bs/hrmsalary/taxdeclaration/updateIcon", params); +}; diff --git a/pc4mobx/hrmSalary/apis/index.js b/pc4mobx/hrmSalary/apis/index.js index 854c9bf6..bec52975 100644 --- a/pc4mobx/hrmSalary/apis/index.js +++ b/pc4mobx/hrmSalary/apis/index.js @@ -1,4 +1,5 @@ import { WeaTools } from "ecCom"; +import { postFetch } from "../util/request"; // form基础数据 export const getBaseForm = (params) => { @@ -19,3 +20,8 @@ export const getCondition = (params) => { export const getTableDatas = (params) => { return WeaTools.callApi("/api/demo03/weatableDemo", "GET", params); }; + +// 薪资账套-浏览按钮数据 +export const commonBrowserData = (params) => { + return postFetch("/api/bs/hrmsalary/common/browser/data", params); +}; diff --git a/pc4mobx/hrmSalary/apis/intelligentCalculateSalarySettings.js b/pc4mobx/hrmSalary/apis/intelligentCalculateSalarySettings.js new file mode 100644 index 00000000..cd51bce3 --- /dev/null +++ b/pc4mobx/hrmSalary/apis/intelligentCalculateSalarySettings.js @@ -0,0 +1,55 @@ +import { WeaTools } from "ecCom"; +import { postFetch } from "../util/request"; + +//智能算薪-计费配置编辑表单 +export const apiflowBillingConfigGet = (params) => { + return WeaTools.callApi("/api/bs/hrmsalary/taxdeclaration/apiflow/billing/config/get", "GET", params); +}; +//智能算薪-查询计费配置开关状态 +export const apiflowBillingConfigStatus = (params) => { + return WeaTools.callApi("/api/bs/hrmsalary/taxdeclaration/apiflow/billing/config/status", "GET", params); +}; +//智能算薪-计费配置保存 +export const apiflowBillingConfigSave = (params) => { + return postFetch("/api/bs/hrmsalary/taxdeclaration/apiflow/billing/config/save", params); +}; +//智能算薪-计费配置开关 +export const apiflowBillingConfigEnable = (params) => { + return postFetch("/api/bs/hrmsalary/taxdeclaration/apiflow/billing/config/enable", params); +}; +//智能算薪-流量不足提醒初始化表单 +export const apiflowWarnConfigGetForm = (params) => { + return WeaTools.callApi("/api/bs/hrmsalary/taxdeclaration/apiflow/warn/config/getForm", "GET", params); +}; +//智能算薪-接口流量使用记录 +export const apiflowRecordList = (params) => { + return postFetch("/api/bs/hrmsalary/taxdeclaration/apiflow/record/list", params); +}; +//智能算薪-接口流量使用记录 +export const apiflowStatisticsInfo = (params) => { + return postFetch("/api/bs/hrmsalary/taxdeclaration/apiflow/statistics/info", params); +}; +//智能算薪-接口流量使用明细 +export const apiflowStatisticsList = (params) => { + return postFetch("/api/bs/hrmsalary/taxdeclaration/apiflow/statistics/list", params); +}; +//智能算薪-流量不足提醒编辑或保存 +export const apiflowWarnConfigSave = (params) => { + return postFetch("/api/bs/hrmsalary/taxdeclaration/apiflow/warn/config/save", params); +}; +//智能算薪-流量不足提醒对象列表 +export const apiflowWarnReceiverList = (params) => { + return WeaTools.callApi("/api/bs/hrmsalary/taxdeclaration/apiflow/warn/receiver/list", "GET", params); +}; +//智能算薪-编辑保存流量不足提醒对象 +export const apiflowWarnReceiverSave = (params) => { + return postFetch("/api/bs/hrmsalary/taxdeclaration/apiflow/warn/receiver/save", params); +}; +//智能算薪-编辑保存流量不足提醒对象 +export const apiflowWarnReceiverGetForm = (params) => { + return postFetch("/api/bs/hrmsalary/taxdeclaration/apiflow/warn/receiver/getForm", params); +}; +//智能算薪-流量不足提醒对象-删除 +export const apiflowWarnReceiverDelete = (params) => { + return WeaTools.callApi("/api/bs/hrmsalary/taxdeclaration/apiflow/warn/receiver/delete", "GET", params); +}; 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/ledger.js b/pc4mobx/hrmSalary/apis/ledger.js index c74cf8b7..d5e20da8 100644 --- a/pc4mobx/hrmSalary/apis/ledger.js +++ b/pc4mobx/hrmSalary/apis/ledger.js @@ -172,7 +172,7 @@ export const getLedgerItemGroupForm = params => { //保存薪资帐套薪资项目 export const saveLedgerItem = params => { - const { itemGroups, items, ...extra } = params; + const { itemGroups, items, ...extra } = params; const payload = { itemGroups: _.map(itemGroups, item => { return { @@ -330,6 +330,22 @@ export const getAggregate = params => { export const getBackitemForm = params => { return WeaTools.callApi("/api/bs/hrmsalary/salarysob/backitem/getForm", "GET", params); }; +//薪资账套下的个税申报表-申报字段对应 +export const taxreportruleGetForm = params => { + return WeaTools.callApi("/api/bs/hrmsalary/salarysob/taxreportrule/getForm", "GET", params); +}; +//薪资账套下的个税申报-累计字段对应 +export const addupruleGetForm = params => { + return WeaTools.callApi("/api/bs/hrmsalary/salarysob/adduprule/getForm", "GET", params); +}; +//保存薪资账套下的个税申报表规则 +export const taxreportruleSave = params => { + return postFetch("/api/bs/hrmsalary/salarysob/taxreportrule/save", params); +}; +//保存薪资账套下的累计字段对应关系 +export const addupruleSave = params => { + return postFetch("/api/bs/hrmsalary/salarysob/adduprule/save", params); +}; //保存回算薪资项目详情 export const salarysobBackitemSave = params => { return postFetch("/api/bs/hrmsalary/salarysob/backitem/save", params); @@ -342,6 +358,10 @@ export const salarysobRangePreview = params => { export const salarysobRangeImportData = params => { return postFetch("/api/bs/hrmsalary/salarysob/range/importData", params); }; +//保存薪资账套个税字段 +export const saveTaxMapping = params => { + return postFetch("/api/bs/hrmsalary/salarysob/tax/saveTaxMapping", params); +}; //薪资账套-获取薪资账套中薪资项目明细 export const getSalaryItemForm = params => { return postFetch("/api/bs/hrmsalary/salarysob/item/getSalaryItemForm", 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..8c58759d 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 }); }; //当前登录人个税扣缴义务人下拉列表 @@ -132,3 +128,12 @@ export const hasIconInTax = (params) => { params ); }; +//获取报税信息表单 +export const taxReturnGetForm = (params) => { + return WeaTools.callApi("/api/bs/hrmsalary/taxAgent/taxReturn/getForm", "GET", params); +}; + +//个税信息-保存并验证报税信息 +export const saveAndCheck = (params) => { + return postFetch("/api/bs/hrmsalary/taxAgent/taxReturn/saveAndCheck", params); +}; 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/common/purchased.png b/pc4mobx/hrmSalary/common/purchased.png new file mode 100644 index 00000000..64223fdc Binary files /dev/null and b/pc4mobx/hrmSalary/common/purchased.png differ diff --git a/pc4mobx/hrmSalary/common/remaining.png b/pc4mobx/hrmSalary/common/remaining.png new file mode 100644 index 00000000..655818c0 Binary files /dev/null and b/pc4mobx/hrmSalary/common/remaining.png differ diff --git a/pc4mobx/hrmSalary/common/traffic.png b/pc4mobx/hrmSalary/common/traffic.png new file mode 100644 index 00000000..477bfa10 Binary files /dev/null and b/pc4mobx/hrmSalary/common/traffic.png differ diff --git a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js index 1668de36..b6fd6ffb 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 } 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"; @@ -31,41 +32,74 @@ class PersonalScopeModal extends Component { if (isTaxgent) { this.getTaxAgentRangeForm(); } else { - 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 }); + 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) { @@ -91,7 +125,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/TipLabel/index.less b/pc4mobx/hrmSalary/components/TipLabel/index.less index addc7741..b88403e9 100644 --- a/pc4mobx/hrmSalary/components/TipLabel/index.less +++ b/pc4mobx/hrmSalary/components/TipLabel/index.less @@ -1,36 +1,41 @@ .tipLabelWrapper { - border-left: 1px solid #e2ecf2; + border-left: 1px solid #e2ecf2; + border-bottom: 1px solid #e2ecf2; + border-right: 1px solid #e2ecf2; + border-radius: 0px 0px 5px 5px; + width: 100%; + overflow: hidden; + + .titleWrapper { + width: 100%; + line-height: 19.2px; + padding: 10px; border-bottom: 1px solid #e2ecf2; - border-right: 1px solid #e2ecf2; - border-radius: 0px 0px 5px 5px; + background-color: #f7fbfe; + } + + .tipContentWrapper { + padding: 10px; + background: #FFF; + } + + .tipContentItem { + line-height: 20px; + padding: 10px 16px 0px; + color: rgb(153, 153, 153); + } + + .tipContentItem:first-child { + padding-top: 0; + } + + .formLabel { + font-size: 14px; + } + + .contentWrapper { width: 100%; overflow: hidden; - .titleWrapper { - width: 100%; - line-height: 19.2px; - padding: 10px; - border-bottom: 1px solid #e2ecf2; - background-color: #f7fbfe; - } - .tipContentWrapper { - padding: 10px; - } - .tipContentItem { - line-height: 20px; - padding: 0px 16px; - padding-top: 10px; - color: rgb(153, 153, 153); - } - .tipContentItem:first { - padding-top: 0px; - } - - .formLabel { - font-size: 14px; - } - .contentWrapper { - width: 100%; - overflow: hidden; - } + } } diff --git a/pc4mobx/hrmSalary/components/excelEditor/components/codeAction.js b/pc4mobx/hrmSalary/components/excelEditor/components/codeAction.js index bca61000..80d7df91 100644 --- a/pc4mobx/hrmSalary/components/excelEditor/components/codeAction.js +++ b/pc4mobx/hrmSalary/components/excelEditor/components/codeAction.js @@ -123,10 +123,10 @@ class CodeAction extends Component {
-
{getLabel(111, "变量")}
+
{getLabel(33748, "变量")}
- this.setState({ variableText })}/> this.setState({ variItemText })} /> } @@ -166,10 +166,10 @@ class CodeAction extends Component {
-
{getLabel(111, "函数")}
+
{getLabel(30686, "函数")}
- this.setState({ funcText })}/>
- {!_.isEmpty(funcHoverItem) ? funcHoverItem.name : getLabel(111, "提示")} + {!_.isEmpty(funcHoverItem) ? funcHoverItem.name : getLabel(558, "提示")}
@@ -232,12 +232,12 @@ const TipList = (props) => {
:
-
{getLabel(111, "语法")}
+
{getLabel(543403, "语法")}
{formatString}
{description}
-
{getLabel(111, "参数")}
+
{getLabel(561, "参数")}
{ _.map(paramDescs, it => { return
@@ -246,9 +246,9 @@ const TipList = (props) => {
; }) } -
{getLabel(111, "示例")}
+
{getLabel(82159, "示例")}
{example} -
{getLabel(111, "结果")}
+
{getLabel(356, "结果")}
{result}
; diff --git a/pc4mobx/hrmSalary/components/excelEditor/index.js b/pc4mobx/hrmSalary/components/excelEditor/index.js index 8b0fe4ae..c3a8fefc 100644 --- a/pc4mobx/hrmSalary/components/excelEditor/index.js +++ b/pc4mobx/hrmSalary/components/excelEditor/index.js @@ -157,7 +157,7 @@ class ExcelEditor extends Component {
} diff --git a/pc4mobx/hrmSalary/components/importDialog/components/impStep1.js b/pc4mobx/hrmSalary/components/importDialog/components/impStep1.js new file mode 100644 index 00000000..7e0bf3db --- /dev/null +++ b/pc4mobx/hrmSalary/components/importDialog/components/impStep1.js @@ -0,0 +1,87 @@ +/* + * Author: 黎永顺 + * name: 导入-步骤一 + * Description: + * Date: 2023/8/11 + */ +import React, { Component } from "react"; +import { WeaLocaleProvider } from "ecCom"; +import { Icon, Upload, message } 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 ( +
+ {/* 导入选项 */} + { + this.props.importParams && +
+
{getLabel(543201, "导入选项")}
+ {this.props.importParams} +
+ } +
{getLabel(543202, "导入Excel")}
+

+ +

+

+

{getLabel(543203, "点击或将文件拖拽到此区域上传")}

+

{getLabel(543204, "支持单个或批量上传,严禁上传公司内部资料及其他违禁文件")}

+
+ +

+ +
+
{getLabel(27577, "操作步骤")}
+

+ {`1. ${getLabel(30907, "第一步")},${getLabel(543205, "请选择导出的Excel文件或")}`}   + {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文档的错误之处")}。`} +

+
+ +
+
{getLabel(543223, "Excel文件说明")}
+

{`1. ${getLabel(543224, "后缀名为xls或者xlsx")};`}

+

{`2. ${getLabel(543225, "数据请勿放在合并的单元格中")};`}

+

{`3. ${getLabel(543226, "账单月份格式必须为")}:YYYY-MM;`}

+
+ +
+ ); + } +} + +export default ImpStep1; diff --git a/pc4mobx/hrmSalary/components/importDialog/components/impStep2.js b/pc4mobx/hrmSalary/components/importDialog/components/impStep2.js new file mode 100644 index 00000000..8a7373d4 --- /dev/null +++ b/pc4mobx/hrmSalary/components/importDialog/components/impStep2.js @@ -0,0 +1,49 @@ +/* + * Author: 黎永顺 + * name: 导入-步骤二 + * Description: + * Date: 2023/9/5 + */ +import React, { Component } from "react"; +import { WeaTable } from "ecCom"; +import { postFetch } from "../../../util/request"; + +class ImpStep2 extends Component { + constructor(props) { + super(props); + this.state = { + loading: false, columns: [], dataSource: [] + }; + } + + componentDidMount() { + this.init(); + } + + init = () => { + const { previewUrl, imageId } = this.props; + const payload = { imageId }; + this.setState({ loading: true }); + postFetch(previewUrl, payload).then(({ status, data }) => { + this.setState({ loading: false }); + if (status) { + const { headers, list } = data; + this.setState({ + columns: _.map(headers, (item, index) => ({ title: item, dataIndex: index + "", width: 120 })), + dataSource: _.map(list, item => { + return _.reduce(item, (pre, cur, key) => (_.assign(pre, { [key]: cur })), {}); + }) + }); + } + }).catch(() => this.setState({ loading: false })); + }; + + render() { + const { dataSource, columns, loading } = this.state; + return ( + + ); + } +} + +export default ImpStep2; diff --git a/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js b/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js new file mode 100644 index 00000000..481813b4 --- /dev/null +++ b/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js @@ -0,0 +1,51 @@ +/* + * Author: 黎永顺 + * name: 导入-步骤3 + * Description: + * Date: 2023/8/11 + */ +import React, { Component } from "react"; +import { WeaLocaleProvider, WeaTable } from "ecCom"; +import successImg from "../../importModal/success.svg"; + +const getLabel = WeaLocaleProvider.getLabel; + +class ImpStep3 extends Component { + render() { + const { importResult } = this.props; + return ( +
+ { + !_.isEmpty(importResult) ? +
+

+

+ {getLabel(389249, "已导入")} + {importResult.successCount}   + {`${getLabel(30690, "条数据")},${getLabel(25009, "失败")}`} + {importResult.errorCount}  {getLabel(30690, "条数据")} +

+
: +
+

{getLabel(111, "导入失败")}

+
+ } + { + !_.isEmpty(importResult.errorData) && + + } +
+ ); + } +} + +export default ImpStep3; diff --git a/pc4mobx/hrmSalary/components/importDialog/index.js b/pc4mobx/hrmSalary/components/importDialog/index.js new file mode 100644 index 00000000..fc790558 --- /dev/null +++ b/pc4mobx/hrmSalary/components/importDialog/index.js @@ -0,0 +1,154 @@ +/* + * Author: 黎永顺 + * name: 导入弹框-步骤条 + * Description: + * Date: 2023/8/11 + */ +import React, { Component } from "react"; +import { Button, message, Modal } from "antd"; +import { WeaDialog, WeaLocaleProvider, WeaSteps } from "ecCom"; +import ImpStep1 from "./components/impStep1"; +import ImpStep2 from "./components/impStep2"; +import ImpStep3 from "./components/impStep3"; +import "./index.less"; + +const { getLabel } = WeaLocaleProvider; +const Step = WeaSteps.Step; + +class Index extends Component { + constructor(props) { + super(props); + this.state = { + current: 0 + }; + } + + componentWillReceiveProps(nextProps, nextContext) { + if (JSON.stringify(nextProps.importResult) !== JSON.stringify(this.props.importResult) && !_.isEmpty(nextProps.importResult)) { + this.setState({ + current: this.state.current + 1 + }); + } + if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({ current: 0 }); + } + + renderChildren = () => { + const { current } = this.state; + const { importParams, link, excludeKey, importResult, exportDataDom = null } = this.props; + let CurrentDom = null; + switch (current) { + case 0: + CurrentDom = this.step1Ref = dom}/>; + break; + case 1: + CurrentDom = ; + if (excludeKey) { + CurrentDom = ; + } + break; + case 2: + CurrentDom = ; + break; + default: + CurrentDom = null; + break; + } + return CurrentDom; + }; + /* + * Author: 黎永顺 + * Description: 上一步 + * Params: + * Date: 2023/9/5 + */ + handlePreviousStep = () => { + Modal.confirm({ + title: getLabel(131329, "信息确认"), + content: getLabel(111, "是否放弃已上传的文件?"), + onOk: () => this.setState({ current: this.state.current - 1 }, () => this.props.onResetImportResult()) + }); + }; + + /* + * Author: 黎永顺 + * Description: 下一步 + * Params: + * Date: 2023/8/11 + */ + handleNext = () => { + const { params, importResult } = this.props; + if (_.isEmpty(importResult)) { + const { fileList } = this.step1Ref.state; + if (!_.isEmpty(params)) { + if (!Object.values(params).every(o => !!o)) { + Modal.warning({ + title: getLabel(131329, "信息确认"), + content: getLabel(518702, "必要信息不完整,红色*为必填项!") + }); + return; + } + } + if (_.isEmpty(fileList)) { + message.warning(getLabel(111, "请先上传EXCEL文件")); + return; + } + const [file] = fileList; + const { response } = file; + this.props.nextCallback(response.data.fileid); + } else { + this.setState({ current: this.state.current + 1 }); + } + }; + + render() { + const { current } = this.state; + const stepData = [ + { key: 0, label: getLabel(543202, "上传EXCEL") }, + { key: 1, label: getLabel(543200, "数据预览") }, + { key: 2, label: getLabel(502835, "导入数据") } + ]; + const btns = [ + , + , + + ]; + return ( + +
+
+ + {/*this.props.key: 不需要展示的步骤*/} + { + _.map(_.filter(stepData, item => item.key !== this.props.excludeKey), it => ( + )) + } + +
+
+ { + this.renderChildren() + } +
+
+
+ ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/components/importDialog/index.less b/pc4mobx/hrmSalary/components/importDialog/index.less new file mode 100644 index 00000000..95cee40b --- /dev/null +++ b/pc4mobx/hrmSalary/components/importDialog/index.less @@ -0,0 +1,143 @@ +.importBox { + .importCont { + padding: 16px 8px; + + .weapp-batch-impsteps-picker-content-imp-steps { + width: 80%; + margin: 0 auto; + } + + .weapp-batch-impsteps-picker { + margin: 16px auto; + + .weapp-batch-impsteps-picker-content-imp-step1 { + width: 98%; + background-color: #fff; + margin: 8px auto; + border-radius: 3px; + padding: 1px 12px; + + .weapp-batch-impsteps-picker-content-imp-step1 div { + color: #111; + line-height: 22px; + } + + .weapp-salary-tb-border-bottom .weapp-salary-tb-filter.weapp-salary-import-param { + box-sizing: border-box; + padding: 16px; + height: auto; + flex-wrap: wrap; + width: 100%; + } + + .weapp-salary-import-param { + border: 1px solid #ebedf0; + padding: 8px; + margin: 4px 0 14px; + } + + .weapp-salary-tb-filter { + display: flex; + flex-wrap: wrap; + align-items: center; + height: 46px; + } + + .weapp-salary-tb-border-bottom .weapp-salary-tb-filter.weapp-salary-import-param .tbf-item { + display: flex; + justify-content: flex-start !important; + } + + .weapp-salary-tb-filter .tbf-item { + padding: 0 20px 0 0; + display: flex; + align-items: center; + font-size: 12px; + color: #111; + height: 40px; + } + + .weapp-salary-tb-filter .tbf-item > .tbfi-label { + flex-basis: 100px; + flex-shrink: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + padding-right: 10px; + color: #666; + } + + .draggerUploadWrapper { + margin: 16px 0 0; + + .ant-upload-drag-container { + padding: 24px 0 16px; + + .iconUpload { + i { + color: #5d9cec; + font-size: 43px; + } + } + + .uplaod-title { + font-size: 14px; + color: #333; + height: 24px; + line-height: 24px; + margin-top: 8px; + } + + .uplaod-subTitle { + height: 22px; + font-size: 12px; + color: #666; + text-align: center; + line-height: 22px; + } + } + } + + .bottom-border, .description { + margin-top: 12px; + + p { + font-size: 12px; + color: #666; + line-height: 15px; + margin: 12px 0; + } + } + + .bottom-border { + border-bottom: 1px solid #e5e5e5; + + .weapp-salary-link { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + color: #5d9cec; + } + } + + } + } + + .weapp-batch-impsteps-picker-content-imp-step3 { + .weapp-batch-impsteps-picker-spinText { + position: relative; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + text-align: center; + + p { + margin: 14px 0; + } + } + } + + } +} diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index bd2d3c12..683ad7d8 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -20,8 +20,14 @@ import Payroll from "./pages/payroll"; import PayrollGrant from "./pages/payroll/payrollGrant"; import PayrollDetail from "./pages/payroll/payrollDetail"; import Declare from "./pages/declare"; +import DeclareDetail from "./pages/declareDetail"; +import Employeedeclare from "./pages/employeedeclare"; +import EnterprisePayCertificationDetail from "./pages/enterprisePayCertificationDetail"; +import BankVoucherDetail from "./pages/bankVoucherDetail"; +import EmployeedeclareDetail from "./pages/employeedeclareDetail"; import TaxRate from "./pages/taxRate"; -import TaxAgent from "./pages/taxAgent"; +import TaxAgents from "./pages/taxAgent"; +import TaxAgent from "./pages/salary/taxAgent"; import CalculateDetail from "./pages/calculateDetail"; import PlaceOnFileDetail from "./pages/calculateDetail/placeOnFileDetail"; import CompareDetail from "./pages/calculateDetail/compareDetail"; @@ -37,6 +43,7 @@ import EmployeeList from "./pages/employeeView"; import ReportView from "./pages/reportView"; import MySalaryView from "./pages/mySalary/mySalaryView"; import WatermarkPreview from "./pages/payroll/watermarkPreview"; +import IntelligentCalculateSalarySettings from "./pages/intelligentCalculateSalarySettings"; import ExternalPersonManage from "./pages/externalPersonManage"; import stores from "./stores"; @@ -88,6 +95,9 @@ const DataAcquisition = (props) => props.children; // analysisOfSalaryStatistics 薪酬统计分析 // reportView 薪酬报表查看 // externalPersonManage 非系统人员管理 +// employeedeclare 人员信息报送 +// employeedeclareDetail 人员信息报送详情 +// intelligentCalculateSalarySettings 智能算薪 const Routes = ( + + + + + + @@ -157,6 +175,8 @@ const Routes = ( + ); diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/conditions.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/conditions.js index a622aefb..3fd68eba 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/conditions.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/conditions.js @@ -11,7 +11,7 @@ export const condition = [ conditionType: "SELECT", domkey: ["dimType"], fieldcol: 14, - label: getLabel(111, "维度类型"), + label: getLabel(389137, "维度类型"), labelcol: 6, options: [], detailtype: 3, @@ -23,7 +23,7 @@ export const condition = [ conditionType: "SELECT", domkey: ["setting4Qualitative"], fieldcol: 14, - label: getLabel(111, "统计维度"), + label: getLabel(506800, "统计维度"), labelcol: 6, options: [], rules: "required|string", @@ -34,7 +34,7 @@ export const condition = [ conditionType: "INPUT", domkey: ["dimName"], fieldcol: 14, - label: getLabel(111, "统计维度名称"), + label: getLabel(543321, "统计维度名称"), labelcol: 6, value: "", rules: "required|string", @@ -45,7 +45,7 @@ export const condition = [ conditionType: "SELECT", domkey: ["dimCode"], fieldcol: 14, - label: getLabel(111, "分组所属字段"), + label: getLabel(543322, "分组所属字段"), labelcol: 6, options: [], viewAttr: 2, @@ -57,13 +57,13 @@ export const condition = [ conditionType: "TEXTAREA", domkey: ["remark"], fieldcol: 14, - label: getLabel(111, "描述"), + label: getLabel(433, "描述"), labelcol: 6, value: "", viewAttr: 2 } ], - title: getLabel(111, "基础设置"), + title: getLabel(82751, "基础设置"), defaultshow: true } ]; @@ -75,7 +75,7 @@ export const reportCondition = [ conditionType: "INPUT", domkey: ["reportName"], fieldcol: 14, - label: getLabel(111, "报表名称"), + label: getLabel(15517, "报表名称"), labelcol: 6, value: "", rules: "required|string", @@ -86,7 +86,7 @@ export const reportCondition = [ conditionType: "SELECT", domkey: ["dimensionIds"], fieldcol: 14, - label: getLabel(111, "统计维度"), + label: getLabel(506800, "统计维度"), labelcol: 6, options: [], rules: "required|string", diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/dimensionSlide.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/dimensionSlide.js index b7bd9c2e..8afc64d6 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/dimensionSlide.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/dimensionSlide.js @@ -89,8 +89,8 @@ class DimensionSlide extends Component { if (dimType === "QUALITATIVE") { if (!setting4Qualitative || !extraParams.dimName) { Modal.warning({ - title: getLabel(111, "信息确认"), - content: getLabel(111, "必要信息不完整,红色*为必填项!") + title: getLabel(131329, "信息确认"), + content: getLabel(383779, "必要信息不完整,红色*为必填项!") }); return; } @@ -100,8 +100,8 @@ class DimensionSlide extends Component { } else { if (!extraParams.dimName) { Modal.warning({ - title: getLabel(111, "信息确认"), - content: getLabel(111, "必要信息不完整,红色*为必填项!") + title: getLabel(131329, "信息确认"), + content: getLabel(383779, "必要信息不完整,红色*为必填项!") }); return; } @@ -109,7 +109,7 @@ class DimensionSlide extends Component { const { setting4RationGroupSpacing } = this.state; const bool = _.every(setting4RationGroupSpacing, it => it.startValue !== "" && it.endValue !== "" && it.startValue <= it.endValue); if (_.isEmpty(setting4RationGroupSpacing) || !bool) { - message.warning(getLabel(111, "请完善分组设置相关数据!分组设置不能为空,起始值结束值必填,且起始值需小于结束值!")); + message.warning(getLabel(543318, "请完善分组设置相关数据!分组设置不能为空,起始值结束值必填,且起始值需小于结束值!")); return; } else { payload = { @@ -127,7 +127,7 @@ class DimensionSlide extends Component { const { setting4RationGroupIndividual } = this.state; const bool = _.every(setting4RationGroupIndividual, it => it.value !== ""); if (_.isEmpty(setting4RationGroupIndividual) || !bool) { - message.warning(getLabel(111, "请完善分组设置相关数据!分组设置不能为空,且数值必填")); + message.warning(getLabel(543319, "请完善分组设置相关数据!分组设置不能为空,且数值必填")); return; } else { payload = { @@ -141,11 +141,11 @@ class DimensionSlide extends Component { dimensionSave(payload).then(({ status, errormsg }) => { this.setState({ loading: false }); if (status) { - message.success(getLabel(111, "保存成功")); + message.success(getLabel(22619, "保存成功")); onCancel(true); this.props.form.resetForm(); } else { - message.error(errormsg || getLabel(111, "保存失败")); + message.error(errormsg || getLabel(22620, "保存失败")); } }).catch(() => this.setState({ loading: false })); }; @@ -176,15 +176,15 @@ class DimensionSlide extends Component { className="dimensionSlideWrapper" title={
- {formId ? getLabel(111, "编辑统计维度") : getLabel(111, "新建统计维度")} - + {formId ? getLabel(543407, "编辑统计维度") : getLabel(543314, "新建统计维度")} +
} > {getSearchs(form, condition, 1, false, this.formItemChange)} { dimType !== "QUALITATIVE" && - + { dimType === "RATION_GROUP_SPACING" && { Modal.confirm({ - title: getLabel(111, "信息确认"), - content: getLabel(111, "确认要删除吗?"), + title: getLabel(131329, "信息确认"), + content: getLabel(388758, "确认要删除吗?"), onOk: () => { dimensionDelete(payload).then(({ status, errormsg }) => { if (status) { - message.success(getLabel(111, "删除成功")); + message.success(getLabel(502230, "删除成功")); this.dimensionList(); } else { - message.error(errormsg || getLabel(111, "删除失败")); + message.error(errormsg || getLabel(20462, "删除失败")); } }); } @@ -67,7 +67,7 @@ class DimensionTable extends Component { const { onEdit } = this.props; const pagination = { ...pageInfo, - showTotal: total => `${getLabel(111, "共")} ${total} ${getLabel(111, "条")}`, + showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`, showQuickJumper: true, showSizeChanger: true, pageSizeOptions: ["10", "20", "50", "100"], @@ -83,22 +83,22 @@ class DimensionTable extends Component { } }; const columns = [ - { dataIndex: "dimName", title: getLabel(111, "统计维度") }, - { dataIndex: "remark", title: getLabel(111, "描述") }, - { dataIndex: "dimType", title: getLabel(111, "维度类型") }, + { dataIndex: "dimName", title: getLabel(506800, "统计维度") }, + { dataIndex: "remark", title: getLabel(433, "描述") }, + { dataIndex: "dimType", title: getLabel(389137, "维度类型") }, { - dataIndex: "operate", title: getLabel(111, "操作"), + dataIndex: "operate", title: getLabel(30585, "操作"), render: (_, record) => { return ( { record.canEdit && - onEdit(record.id)}>{getLabel(111, "编辑")} + onEdit(record.id)}>{getLabel(501169, "编辑")} } { record.canDelete && this.dimensionDelete([record.id])}>{getLabel(111, "删除")} + onClick={() => this.dimensionDelete([record.id])}>{getLabel(535052, "删除")} } ); diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/employeeDetails.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/employeeDetails.js index dc89547d..bbc6d643 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/employeeDetails.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/employeeDetails.js @@ -55,7 +55,7 @@ class EmployeeDetails extends Component { width: 80, render: (_, record) => { return {getLabel(111, "查看")}; + href={`${window.location.origin}/spa/hrmSalary/static/index.html#/main/hrmSalary/analysisOfSalaryStatistics/${record.id}?name=${record.name}&dept=${record.department || ""}`}>{getLabel(33564, "查看")}; } }] }); @@ -67,7 +67,7 @@ class EmployeeDetails extends Component { const { dataSource, loading, columns, pageInfo } = this.state; const pagination = { ...pageInfo, - showTotal: total => `${getLabel(111, "共")} ${total} ${getLabel(111, "条")}`, + showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`, showQuickJumper: true, showSizeChanger: true, pageSizeOptions: ["10", "20", "50", "100"], diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/groupIndividualEditTable.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/groupIndividualEditTable.js index 1d709bc6..50b864b5 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/groupIndividualEditTable.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/groupIndividualEditTable.js @@ -32,7 +32,7 @@ class GroupIndividualEditTable extends Component { const { dataSource } = this.state; const columns = [ { - title: getLabel(111, "分组设置值"), + title: getLabel(543320, "分组设置值"), dataIndex: "value", key: "value", com: [ diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/groupSpacingEditTable.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/groupSpacingEditTable.js index c976cd93..3cb29022 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/groupSpacingEditTable.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/groupSpacingEditTable.js @@ -39,7 +39,7 @@ class GroupSpacingEditTable extends Component { const { dataSource } = this.state; const columns = [ { - title: getLabel(111, "起始值"), + title: getLabel(541412, "起始值"), dataIndex: "startValue", key: "startValue", com: [ @@ -47,19 +47,19 @@ class GroupSpacingEditTable extends Component { ] }, { - title: getLabel(111, "含"), + title: getLabel(33864, "含"), dataIndex: "includeStart", key: "includeStart", com: [ { type: "CHECKBOX", key: "includeStart", - otherParams: { content: getLabel(111, "含") } + otherParams: { content: getLabel(33864, "含") } } ] }, { - title: getLabel(111, "至"), + title: getLabel(15322, "至"), dataIndex: "to", key: "to", com: [ @@ -67,7 +67,7 @@ class GroupSpacingEditTable extends Component { ] }, { - title: getLabel(111, "结束值"), + title: getLabel(508931, "结束值"), dataIndex: "endValue", key: "endValue", com: [ @@ -75,14 +75,14 @@ class GroupSpacingEditTable extends Component { ] }, { - title: getLabel(111, "含"), + title: getLabel(33864, "含"), dataIndex: "includeEnd", key: "includeEnd", com: [ { type: "CHECKBOX", key: "includeEnd", - otherParams: { content: getLabel(111, "含") } + otherParams: { content: getLabel(33864, "含") } } ] } @@ -90,7 +90,7 @@ class GroupSpacingEditTable extends Component { return ( ({ ...item, to: getLabel(111, "至") }))} + datas={_.map(dataSource, item => ({ ...item, to: getLabel(15322, "至") }))} showCopy={false} onChange={this.handleChangeTableData} /> ); diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/reportList.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/reportList.js index 6510d5b1..9a4c55f0 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/reportList.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/reportList.js @@ -34,16 +34,16 @@ class ReportList extends Component { }; reportStatisticsReportDelete = (payload) => { Modal.confirm({ - title: getLabel(111, "信息确认"), - content: getLabel(111, "确认删除本条数据吗?"), + title: getLabel(131329, "信息确认"), + content: getLabel(543231, "确认删除本条数据吗?"), onOk: () => { const { reportName = "" } = this.props; reportStatisticsReportDelete(payload).then(({ status, errormsg }) => { if (status) { - message.success(getLabel(111, "删除成功")); + message.success(getLabel(502230, "删除成功")); this.reportStatisticsReportList({ reportName }); } else { - message.error(errormsg || getLabel(111, "删除失败")); + message.error(errormsg || getLabel(20462, "删除失败")); } }); } @@ -71,28 +71,31 @@ class ReportList extends Component { return ( { - _.isEmpty(dataSource) ?
{getLabel(111, "暂无数据")}
: + _.isEmpty(dataSource) ?
{getLabel(83553, "暂无数据")}
: _.map(dataSource, it => { - const { reportName, dimension, id, dimensionId } = it; + const { reportName, dimension, id, dimensionId, isShare } = it; return this.handleGoReportView(id)}>
{reportName}
-
{getLabel(111, "统计维度")}:
+
{getLabel(506800, "统计维度")}:
{dimension}
- this.handleOptsClick(e, id, dimensionId)}> - {getLabel(111, "编辑")} - {getLabel(111, "删除")} - - }> - - + { + !isShare && + this.handleOptsClick(e, id, dimensionId)}> + {getLabel(501169, "编辑")} + {getLabel(535052, "删除")} + + }> + + + }
; diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/statisticsModal.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/statisticsModal.js index c8920887..75595c3e 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/statisticsModal.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/statisticsModal.js @@ -31,15 +31,15 @@ class StatisticsModal extends Component { this.setState({ loading: false }); if (status) { onCancel(true); - message.success(getLabel(111, "保存成功")); + message.success(getLabel(22619, "保存成功")); form.resetForm(); } else { - message.error(errormsg || getLabel(111, "保存失败")); + message.error(errormsg || getLabel(22620, "保存失败")); } }).catch(() => this.setState({ loading: false })); } else { Modal.warning({ - title: getLabel(111, "信息确认"), + title: getLabel(131329, "信息确认"), content: getLabel(111, "必要信息不完整,红色*为必填项!") }); } diff --git a/pc4mobx/hrmSalary/pages/bankVoucherDetail/index.js b/pc4mobx/hrmSalary/pages/bankVoucherDetail/index.js new file mode 100644 index 00000000..43916c7f --- /dev/null +++ b/pc4mobx/hrmSalary/pages/bankVoucherDetail/index.js @@ -0,0 +1,494 @@ +/* + * Author: 黎永顺 + * name: 个税在线申报-银行端缴款凭证打印查看页面 + * Description: + * Date: 2023/8/24 + */ +import React, { Component } from "react"; +import { Button, message, Spin } from "antd"; +import { WeaLocaleProvider } from "ecCom"; +import { printDom } from "../../util"; +import { getQueryString } from "../../util/url"; +import { taxPaymentVoucherPrintFeedback } from "../../apis/declare"; +import "./index.less"; + +const { getLabel } = WeaLocaleProvider; + +class Index extends Component { + constructor(props) { + super(props); + this.state = { + loading: false, + bankVoucherDetail: {} + }; + } + + componentDidMount() { + this.taxPaymentVoucherPrintFeedback(); + } + + taxPaymentVoucherPrintFeedback = () => { + const payload = { + taxDeclareRecordId: getQueryString("taxDeclareRecordId"), + taxAgentId: getQueryString("taxAgentId"), + taxYearMonth: getQueryString("taxYearMonth"), + checkFeedback: 0 + }; + this.setState({ loading: true }); + taxPaymentVoucherPrintFeedback(payload).then(({ status, data, errormsg }) => { + this.setState({ loading: false }); + if (status) { + this.setState({ bankVoucherDetail: data }); + } else { + message.error(errormsg || ""); + } + }).catch(() => this.setState({ loading: false })); + }; + print = () => { + printDom({ + hideDomId: "header_print_btn" + }); + }; + + render() { + const { loading, bankVoucherDetail } = this.state; + if (loading) { + return
+ +
; + } + return ( +
+
+
+ +
+
+
+
{getLabel(111, "银行端查询缴税凭证")}
+
+
+
{getLabel(111, "银行端查询缴税凭证号:")}
+
{bankVoucherDetail.voucherNo || ""}
+
+
{bankVoucherDetail.firstPrintDate}
+
+ +
+
+
+
{getLabel(111, "纳税人识别码")}
+
{bankVoucherDetail.taxCode || ""}
+
+
+
{getLabel(111, "税务机关代码")}
+
{bankVoucherDetail.taxAuthoritiesNo || ""}
+
+
+ +
+
+
{getLabel(111, "纳税人名称")}
+
{bankVoucherDetail.taxAgentName || ""}
+
+
+
{getLabel(111, "税务机关名称")}
+
{bankVoucherDetail.taxAuthoritiesName}
+
+
+ +
+
+
{getLabel(111, "付款人名称")}
+
{}
+
+
+
{getLabel(111, "开户银行名称")}
+
{}
+
+
+ +
+
+
{getLabel(111, "付款人账号")}
+
{}
+
+
+
{getLabel(111, "税款限缴日期")}
+
{bankVoucherDetail.deadline || ""}
+
+
+ +
+
+
{getLabel(111, "征收顶目名称")}
+
{getLabel(111, "征收品目名称")}
+
{getLabel(111, "应繳税额")}
+
+
+ { + !_.isEmpty(bankVoucherDetail.details) ? bankVoucherDetail.details.map((row, index) => ( +
+
{row.paymentCode}
+
{row.paymentItem}
+
{row.payAmount}
+
+ )) : null + } +
+
+
{getLabel(111, "金额合计(小写):")} {bankVoucherDetail.lowerFormatAmount}
+
{getLabel(111, "金额合计(大写):")} {bankVoucherDetail.upperFormatAmount}
+ +
+
+
{getLabel(111, "付款人 (签章)")}
+
{getLabel(111, "经办人 (签章)")}
+
+
+
{getLabel(111, "银行记账员")}
+
{getLabel(111, "(签章)")}
+
+
+
{getLabel(111, "备注:")}
+
{bankVoucherDetail.remark}
+
+
+
+
+
+
+
+ ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/bankVoucherDetail/index.less b/pc4mobx/hrmSalary/pages/bankVoucherDetail/index.less new file mode 100644 index 00000000..3dc296ac --- /dev/null +++ b/pc4mobx/hrmSalary/pages/bankVoucherDetail/index.less @@ -0,0 +1,30 @@ +.loading-layout { + width: 100%; + height: 100%; + display: flex; + align-items: center; + justify-content: center; +} + +.printBankLayout { + width: 100%; + height: 100%; + overflow-y: auto; + + .print-bank-voucher-container { + font-size: 14px; + + #header_print_btn { + display: flex; + padding: calc(16 * 1px) calc(32 * 1px) 0; + justify-content: flex-end; + } + + .content { + padding: calc(32 * 1px) 0 calc(16 * 1px); + display: flex; + justify-content: center; + align-items: center; + } + } +} diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/index.less b/pc4mobx/hrmSalary/pages/calculateDetail/index.less index 64b163fa..37d09d86 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/index.less +++ b/pc4mobx/hrmSalary/pages/calculateDetail/index.less @@ -270,3 +270,9 @@ } } } + +.salaryMonthTip-layout{ + display: flex; + flex-direction: column; + +} diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js b/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js index bbcdaad6..84e7dbf5 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js @@ -6,9 +6,10 @@ import EditSalaryDetail from "./editSalaryDetail"; import SlideModalTitle from "../../components/slideModalTitle"; import { getQueryString } from "../../util/url"; import { inject, observer } from "mobx-react"; +import ProgressModal from "../../components/progressModal"; +import { SalaryMonthTip } from "./userSure"; import { toJS } from "mobx"; import "./index.less"; -import ProgressModal from "../../components/progressModal"; @inject("calculateStore", "taxAgentStore") @observer @@ -151,6 +152,7 @@ export default class SalaryDetail extends React.Component { progressVisible: false, progress: 0 }, () => { + const { current, pageSize } = this.pageInfo; const childFrameObj = document.getElementById("atdTable"); const payload = { type: "PR", @@ -158,7 +160,8 @@ export default class SalaryDetail extends React.Component { url: "/api/bs/hrmsalary/salaryacct/acctresult/list", queryParams: { salaryAcctRecordId, - ...this.props.employeeName + ...this.props.employeeName, + current, pageSize } }; childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*"); @@ -186,13 +189,15 @@ export default class SalaryDetail extends React.Component { this.setState({ loading: false }); const childFrameObj = document.getElementById("atdTable"); const salaryAcctRecordId = getQueryString("id"); + const { current, pageSize } = this.pageInfo; const payload = { type: "PR", listType: "", url: "/api/bs/hrmsalary/salaryacct/acctresult/list", queryParams: { salaryAcctRecordId, - ...this.props.employeeName + ...this.props.employeeName, + current, pageSize } }; childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*"); @@ -211,17 +216,9 @@ export default class SalaryDetail extends React.Component {
薪资所属月:{baseSalarySobCycle.salaryMonth} : ""} placement="topLeft" /> {/*暂时隐藏*/} diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js b/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js index 89f77d11..b7c3ac5f 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js @@ -1,10 +1,20 @@ import React from "react"; import { Button, Col, Icon, message, Modal, Row } from "antd"; -import { WeaBrowser, WeaFormItem, WeaHelpfulTip, WeaInput, WeaSearchGroup, WeaSelect, WeaTab } from "ecCom"; +import { + WeaBrowser, + WeaFormItem, + WeaHelpfulTip, + WeaInput, + WeaLocaleProvider, + WeaSearchGroup, + WeaSelect, + WeaTab +} from "ecCom"; import { inject, observer } from "mobx-react"; -import "./index.less"; import { getQueryString } from "../../util/url"; +import "./index.less"; +const { getLabel } = WeaLocaleProvider; @inject("calculateStore", "salaryFileStore") @observer export default class UserSure extends React.Component { @@ -120,7 +130,7 @@ export default class UserSure extends React.Component { url: "/api/bs/hrmsalary/salaryacct/acctemployee/list", queryParams: { salaryAcctRecordId, - ...this.state.searchItemsValue, + ...this.state.searchItemsValue } }; childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*"); //window.postMessage @@ -375,12 +385,8 @@ export default class UserSure extends React.Component { 薪资所属月: : ""} placement="topLeft" /> @@ -430,7 +436,7 @@ export default class UserSure extends React.Component { url: "/api/bs/hrmsalary/salaryacct/acctemployee/list", queryParams: { salaryAcctRecordId, - ...this.state.searchItemsValue, + ...this.state.searchItemsValue } }; childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*"); //window.postMessage @@ -460,7 +466,7 @@ export default class UserSure extends React.Component { url: "/api/bs/hrmsalary/salaryacct/reducedemployee/list", queryParams: { salaryAcctRecordId, - ...this.state.searchItemsValue, + ...this.state.searchItemsValue } }; childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*"); @@ -490,7 +496,7 @@ export default class UserSure extends React.Component { url: "/api/bs/hrmsalary/salaryacct/addedemployee/list", queryParams: { salaryAcctRecordId, - ...this.state.searchItemsValue, + ...this.state.searchItemsValue } }; childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*"); @@ -587,3 +593,32 @@ export default class UserSure extends React.Component { ); } } + +export const SalaryMonthTip = (props) => { + const { baseSalarySobCycle } = props; + const { salaryCycle, taxCycle, attendCycle, socialSecurityCycle } = baseSalarySobCycle; + const { fromDate: salaryCycleFromDate, endDate: salaryCycleEndDate } = salaryCycle; + const { fromDate: attendCycleFromDate, endDate: attendCycleEndDate } = attendCycle; + return ( +
+
+
{getLabel(543375, "薪资周期")}
+
{`${salaryCycleFromDate}${getLabel(15322, "至")}${salaryCycleEndDate}`}
+
+
+
{getLabel(542240, "税款所属期")}
+
{taxCycle}
+
+
+
{getLabel(543475, "考勤取值周期")}
+
{`${attendCycleFromDate}${getLabel(15322, "至")}${attendCycleEndDate}`}
+
+
+
{getLabel(543466, "福利台账月份")}
+
+ {`${getLabel(19422, "引用")}${socialSecurityCycle}${getLabel(543476, "的福利台账数据")}`} +
+
+
+ ); +}; diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/columns.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/columns.js index 9956585a..8a35e6e9 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/columns.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/columns.js @@ -469,7 +469,27 @@ export const dataCollectCondition = [ viewAttr: 2 } ], - title: '数据采集', + title: "数据采集", + defaultshow: true + } +]; + + +export const cumTaxPeriodCondition = [ + { + items: [{ + colSpan: 1, + conditionType: "MONTHPICKER", + domkey: ["declareMonth"], + fieldcol: 18, + label: "税款所属期", + lanId: 542240, + labelcol: 6, + value: "", + rules: "required", + viewAttr: 3 + }], + title: "", defaultshow: true } ]; diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/components/salaryCumDeductChooseTaxPeriodDialog.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/components/salaryCumDeductChooseTaxPeriodDialog.js new file mode 100644 index 00000000..7e0c76f4 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/components/salaryCumDeductChooseTaxPeriodDialog.js @@ -0,0 +1,82 @@ +/* + * Author: 黎永顺 + * name: 个税对接-在线获取 + * Description: + * Date: 2023/9/5 + */ +import React, { Component } from "react"; +import { inject, observer } from "mobx-react"; +import { WeaDialog, WeaLocaleProvider } from "ecCom"; +import { Button, message } from "antd"; +import { getSearchs } from "../../../../util"; +import { cumTaxPeriodCondition } from "../columns"; +import { onlineRequest } from "../../../../apis/cumDeduct"; +import { onlineActualAddUpAdvanceTax } from "../../../../apis/cumSituation"; + +const getLabel = WeaLocaleProvider.getLabel; +const APIFox = { + online: onlineRequest, + advance: onlineActualAddUpAdvanceTax +}; + +@inject("cumDeductStore") +@observer +class SalaryCumDeductChooseTaxPeriodDialog extends Component { + constructor(props) { + super(props); + this.state = { + loading: false + }; + } + + componentWillReceiveProps(nextProps, nextContext) { + const { cumDeductStore: { cumTaxPeriodForm, changeCumTaxPeriodForm } } = nextProps; + if (nextProps.visible !== this.props.visible && nextProps.visible) { + cumTaxPeriodForm.initFormFields(cumTaxPeriodCondition); + } + if (nextProps.visible !== this.props.visible && !nextProps.visible) { + cumTaxPeriodForm.resetForm(); + changeCumTaxPeriodForm(); + } + } + + save = () => { + const { cumDeductStore: { cumTaxPeriodForm }, type } = this.props; + cumTaxPeriodForm.validateForm().then(f => { + const { declareMonth } = cumTaxPeriodForm.getFormParams(); + if (f.isValid) { + this.setState({ loading: true }); + APIFox[type]({ declareMonth: declareMonth + "-01" }).then(({ status, errormsg }) => { + this.setState({ loading: false }); + if (status) { + message.success(getLabel(111, "获取成功!")); + this.props.onCancel(); + } else { + message.error(errormsg); + } + }).catch(() => this.setState({ loading: false })); + } else { + f.showErrors(); + } + }); + }; + + render() { + const { loading } = this.state; + const { cumDeductStore: { cumTaxPeriodForm } } = this.props; + return ( + {getLabel(33703, "确认")}]} + bottomLeft={getLabel(111, "点击保存后,稍后请点击【获取结果下载】下载获取结果。获取的数据将覆盖列表原本数据(有则覆盖无则新增)。")} + > +
+ {getSearchs(cumTaxPeriodForm, cumTaxPeriodCondition, 1, false)} +
+
+ ); + } +} + +export default SalaryCumDeductChooseTaxPeriodDialog; diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js index 0e106ae3..0fb0136e 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js @@ -1,6 +1,14 @@ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; -import { WeaDatePicker, WeaFormItem, WeaHelpfulTip, WeaInput, WeaSearchGroup, WeaSelect } from "ecCom"; +import { + WeaDatePicker, + WeaFormItem, + WeaHelpfulTip, + WeaInput, + WeaLocaleProvider, + WeaSearchGroup, + WeaSelect +} from "ecCom"; import { Button, Dropdown, Menu, message, Modal } from "antd"; import { autoAddAll, @@ -11,8 +19,10 @@ import { getAddUpDeduction, getCumDeductSaCondition, importCumDeductParam, - importCumDeductPreview + importCumDeductPreview, + onlineFeedback } from "../../../apis/cumDeduct"; +import { apiflowBillingConfigStatus } from "../../../apis/intelligentCalculateSalarySettings"; import DataTables from "../dataTables"; import AddItems from "../addItems"; import ImportFormCom from "./components/importFormCom"; @@ -22,6 +32,9 @@ import { removePropertyCondition } from "../../../util/response"; import { convertToUrlString } from "../../../util/url"; import Layout from "../layout"; import moment from "moment"; +import SalaryCumDeductChooseTaxPeriodDialog from "./components/salaryCumDeductChooseTaxPeriodDialog"; + +const getLabel = WeaLocaleProvider.getLabel; @inject("taxAgentStore", "cumDeductStore") @observer @@ -54,7 +67,12 @@ class Index extends Component { }, exportPayloadUrl: "", exportPayloadType: false, - advanceCondition: null + advanceCondition: null, + cumTaxPeriodDialog: { + visible: false, title: "", type: "" + }, + feedbackLoading: false, + incomeTaxStatus: false }; this.tableRef = null; this.addItemRef = null; @@ -63,8 +81,14 @@ class Index extends Component { componentDidMount() { this.getAdvanceCondition(); + this.apiflowBillingConfigStatus(); } + apiflowBillingConfigStatus = () => { + apiflowBillingConfigStatus().then(({ status, data }) => { + this.setState({ incomeTaxStatus: status && data }); + }); + }; /* * Author: 黎永顺 * Description:一键累计 @@ -383,8 +407,8 @@ class Index extends Component { * Date: 2023/2/17 */ getTopBtns = () => { - const { addAllLoading } = this.state; - return [ + const { addAllLoading, cumTaxPeriodDialog, feedbackLoading, incomeTaxStatus } = this.state; + const commonBtns = [ , , , @@ -401,6 +425,18 @@ class Index extends Component { ]; + const incomeTaxBtns = [ + , + + ]; + return incomeTaxStatus ? [...incomeTaxBtns, ...commonBtns] : commonBtns; }; handleDataMenuClick = ({ key: keyFunc }) => this[keyFunc](); /* @@ -498,11 +534,26 @@ class Index extends Component { }); }; + onlineFeedback = () => { + this.setState({ feedbackLoading: true }); + onlineFeedback().then(({ status, errormsg }) => { + this.setState({ feedbackLoading: false }); + if (status) { + message.success(getLabel(111, "获取成功!")); + this.tableRef.getTableDate(); + } else { + message.error(errormsg); + } + }).catch((error) => { + this.setState({ feedbackLoading: false }); + }); + }; + render() { const { taxAgentStore: { showOperateBtn }, cumDeductStore: { form } } = this.props; const { declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition, - importPayload, exportPayloadType + importPayload, exportPayloadType, cumTaxPeriodDialog } = this.state; const tablePayload = { declareMonth: [declareMonth], taxAgentId }; return ( @@ -526,6 +577,12 @@ class Index extends Component { onViewDetails={(record) => this.handleAddData("累计专项附加扣除记录", record)} form={form} /> + this.setState({ + cumTaxPeriodDialog: { ...cumTaxPeriodDialog, visible: false, title: "", type: "" } + })} + /> ); } diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js index ae006af6..7ebb597d 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js @@ -108,66 +108,68 @@ export const dataCollectCondition = [ precision: 2, viewAttr: 2 }, - { - conditionType: "INPUTNUMBER", - domkey: ["addUpChildEducation"], - fieldcol: 14, - label: "累计子女教育", - labelcol: 8, - value: "", - precision: 2, - viewAttr: 2 - }, - { - conditionType: "INPUTNUMBER", - domkey: ["addUpContinuingEducation"], - fieldcol: 14, - label: "累计继续教育", - labelcol: 8, - value: "", - precision: 2, - viewAttr: 2 - }, - { - conditionType: "INPUTNUMBER", - domkey: ["addUpHousingLoanInterest"], - fieldcol: 14, - label: "累计住房贷款利息", - labelcol: 8, - value: "", - precision: 2, - viewAttr: 2 - }, - { - conditionType: "INPUTNUMBER", - domkey: ["addUpHousingRent"], - fieldcol: 14, - label: "累计住房租金", - labelcol: 8, - value: "", - precision: 2, - viewAttr: 2 - }, - { - conditionType: "INPUTNUMBER", - domkey: ["addUpSupportElderly"], - fieldcol: 14, - label: "累计赡养老人", - labelcol: 8, - value: "", - precision: 2, - viewAttr: 2 - }, - { - conditionType: "INPUTNUMBER", - domkey: ["addUpIllnessMedical"], - fieldcol: 14, - label: "累计大病医疗", - labelcol: 8, - value: "", - precision: 2, - viewAttr: 2 - }, + + // { + // conditionType: "INPUTNUMBER", + // domkey: ["addUpChildEducation"], + // fieldcol: 14, + // label: "累计子女教育", + // labelcol: 8, + // value: "", + // precision: 2, + // viewAttr: 2 + // }, + // { + // conditionType: "INPUTNUMBER", + // domkey: ["addUpContinuingEducation"], + // fieldcol: 14, + // label: "累计继续教育", + // labelcol: 8, + // value: "", + // precision: 2, + // viewAttr: 2 + // }, + // { + // conditionType: "INPUTNUMBER", + // domkey: ["addUpHousingLoanInterest"], + // fieldcol: 14, + // label: "累计住房贷款利息", + // labelcol: 8, + // value: "", + // precision: 2, + // viewAttr: 2 + // }, + // { + // conditionType: "INPUTNUMBER", + // domkey: ["addUpHousingRent"], + // fieldcol: 14, + // label: "累计住房租金", + // labelcol: 8, + // value: "", + // precision: 2, + // viewAttr: 2 + // }, + // { + // conditionType: "INPUTNUMBER", + // domkey: ["addUpSupportElderly"], + // fieldcol: 14, + // label: "累计赡养老人", + // labelcol: 8, + // value: "", + // precision: 2, + // viewAttr: 2 + // }, + // { + // conditionType: "INPUTNUMBER", + // domkey: ["addUpIllnessMedical"], + // fieldcol: 14, + // label: "累计大病医疗", + // labelcol: 8, + // value: "", + // precision: 2, + // viewAttr: 2 + // }, + { conditionType: "INPUTNUMBER", domkey: ["addUpEnterpriseAndOther"], @@ -230,14 +232,47 @@ export const dataCollectCondition = [ }, { conditionType: "INPUTNUMBER", - domkey: ["addUpInfantCare"], + domkey: ["actualAddUpAdvanceTax"], fieldcol: 14, - label: "累计婴幼儿照护", + label: "实际累计已预扣预缴税额", labelcol: 8, value: "", precision: 2, viewAttr: 2 - } + }, + { + conditionType: "INPUTNUMBER", + domkey: ["taxAdjustment"], + fieldcol: 14, + label: "个税调差", + helpfulTitle: "1、【个税调差】=【实际累计已预扣预缴税额】-【累计已预扣预缴税额】。\n" + + "2、直接输入或导入【个税调差】值,则以输入/导入为准,公式失效。再次编辑减数或被减数,会再次按公式自动计算。", + labelcol: 8, + value: "", + precision: 2, + viewAttr: 2 + }, + { + conditionType: "INPUTNUMBER", + domkey: ["addUpTaxableIncome"], + fieldcol: 14, + label: "累计应纳税所得额", + labelcol: 8, + value: "", + precision: 2, + viewAttr: 2 + }, + + // { + // conditionType: "INPUTNUMBER", + // domkey: ["addUpInfantCare"], + // fieldcol: 14, + // label: "累计婴幼儿照护", + // labelcol: 8, + // value: "", + // precision: 2, + // viewAttr: 2 + // } ], title: "数据采集", defaultshow: true diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js index 78c77a40..e4975825 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js @@ -6,7 +6,7 @@ */ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; -import { WeaSearchGroup } from "ecCom"; +import { WeaLocaleProvider, WeaSearchGroup } from "ecCom"; import { Button, Dropdown, Menu, message, Modal } from "antd"; import { createAddUpSituation, @@ -18,6 +18,7 @@ import { importCumSituationParam, importCumSituationPreview } from "../../../apis/cumSituation"; +import { apiflowBillingConfigStatus } from "../../../apis/intelligentCalculateSalarySettings"; import { removePropertyCondition } from "../../../util/response"; import DataTables from "../dataTables"; import Layout from "../layout"; @@ -29,6 +30,9 @@ import AddItems from "../addItems"; import TableRecord from "../components/tableRecord"; import { situationModalColumns } from "../cumDeduct/columns"; import { convertToUrlString } from "../../../util/url"; +import SalaryCumDeductChooseTaxPeriodDialog from "../cumDeduct/components/salaryCumDeductChooseTaxPeriodDialog"; + +const getLabel = WeaLocaleProvider.getLabel; @inject("taxAgentStore", "cumSituationStore") @observer @@ -61,7 +65,11 @@ class Index extends Component { }, exportPayloadUrl: "", exportPayloadType: false, - advanceCondition: null + advanceCondition: null, + incomeTaxStatus: false, + cumTaxPeriodDialog: { + visible: false, title: "", type: "" + } }; this.tableRef = null; this.addItemRef = null; @@ -70,8 +78,14 @@ class Index extends Component { componentDidMount() { this.getAdvanceCondition(); + this.apiflowBillingConfigStatus(); } + apiflowBillingConfigStatus = () => { + apiflowBillingConfigStatus().then(({ status, data }) => { + this.setState({ incomeTaxStatus: status && data }); + }); + }; /* * Author: 黎永顺 * Description: 高级搜素框-表单项 @@ -304,6 +318,29 @@ class Index extends Component { exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/addUpSituation/export?ids=${ids.join(",")}&year=${year}&taxYearMonth=${year}-${declareMonth}&taxAgentId=${taxAgentId}` }); }; + /* + * Author: 黎永顺 + * Description: 个税相关-在线获取 + * Params: + * Date: 2023/9/6 + */ + handleOnlineAccess = () => { + Modal.confirm({ + title: getLabel(131329, "信息确认"), + content: getLabel(111, "确定要在线获取税局数据更新实际累计已预扣预缴税额?\n" + + "此操作会依据实际累计已预扣预缴税额自动计算个税调差,不可回退,可重复获取,每次获取后重复数据会进行覆盖处理。"), + onOk: this.onlineActualAddUpAdvanceTax + }); + }; + onlineActualAddUpAdvanceTax = () => { + this.setState({ + cumTaxPeriodDialog: { + ...this.state.cumTaxPeriodDialog, + visible: true, type: "advance", + title: getLabel(542240, "税款所属期") + } + }); + }; /* * Author: 黎永顺 * Description: 顶部操作按钮 @@ -311,9 +348,10 @@ class Index extends Component { * Date: 2023/2/17 */ getTopBtns = () => { - const { addAllLoading } = this.state; - return [ + const { addAllLoading, incomeTaxStatus } = this.state; + const commonBtns = [ , + , , 更多 ]; + return incomeTaxStatus ? commonBtns : _.filter(commonBtns, (__, index) => index !== 1); }; handleDataMenuClick = ({ key: keyFunc }) => this[keyFunc](); /* @@ -516,7 +555,7 @@ class Index extends Component { const { taxAgentStore: { showOperateBtn }, cumSituationStore: { form } } = this.props; const { declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition, - importPayload, year, exportPayloadType + importPayload, year, exportPayloadType, cumTaxPeriodDialog } = this.state; const tablePayload = { taxYearMonth: `${year}-${declareMonth}`, year, taxAgentId }; return ( @@ -532,6 +571,12 @@ class Index extends Component { onPreviewImport={this.handlePreviewImport} detailOptBtns={this.getDetailOptBtns()} columns={situationModalColumns} > + this.setState({ + cumTaxPeriodDialog: { ...cumTaxPeriodDialog, visible: false, title: "", type: "" } + })} + /> this.tableRef = dom} url="/api/bs/hrmsalary/addUpSituation/list" diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/layout.js b/pc4mobx/hrmSalary/pages/dataAcquisition/layout.js index 4c421d60..0d5f93ba 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/layout.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/layout.js @@ -56,7 +56,7 @@ class Layout extends Component { title, btns, leftComp, children, taxAgentStore: { showOperateBtn }, slidePayload, onClose, onSave, slideLoading, form, condition, onAdSearch, onCancel, importPayload, onImportSetStep, onImportFile, - onPreviewImport, detailOptBtns, columns + onPreviewImport, detailOptBtns, columns, tabBtns = [] } = this.props; const { visible, title: subtitle, children: slideChildren } = slidePayload; const { @@ -80,6 +80,7 @@ class Layout extends Component { onSearch={onAdSearch} onSearchChange={(v) => form.updateFields({ username: v })} searchsBaseValue={form.getFormParams().username} + buttons={showOperateBtn ? tabBtns : []} />
{children} diff --git a/pc4mobx/hrmSalary/pages/declare/generateModal.js b/pc4mobx/hrmSalary/pages/declare/generateModal.js index cde3f435..bc0f5c45 100644 --- a/pc4mobx/hrmSalary/pages/declare/generateModal.js +++ b/pc4mobx/hrmSalary/pages/declare/generateModal.js @@ -9,8 +9,10 @@ import { WeaSelect, WeaTextarea } from "ecCom"; -import { Button } from "antd"; +import { Button, message } from "antd"; import { inject, observer } from "mobx-react"; +import { taxdeclarationGetRate } from "../../apis/declare"; +import moment from "moment"; import "./index.less"; const getLabel = WeaLocaleProvider.getLabel; @@ -25,6 +27,7 @@ export default class GenerateModal extends React.Component { description: "", loading: false }; + this.timer = null; } // 生成申报表 @@ -47,13 +50,41 @@ export default class GenerateModal extends React.Component { return; } this.setState({ loading: true }); - saveDeclare({ salaryMonthStr: date, taxAgentId, description }).then(() => { + saveDeclare({ + salaryMonth: moment(date).startOf("month").format("YYYY-MM-DD"), + taxAgentId, + description + }).then((data) => { this.setState({ loading: false }); - this.props.onGenerate(); + this.props.onCancel(); + message.destroy(); + message.loading(getLabel(111, "正在生成中..."), 0); + this.timer = setInterval(async () => { + const { status: resStatus, data: result } = await this.taxdeclarationGetRate(data); + const { status: rateStatus, finish, msg } = result; + if (resStatus && rateStatus) { + if (finish) { + message.destroy(); + clearInterval(this.timer); + message.success(msg || getLabel(22619, "保存成功!")); + this.props.onGenerate(); + } + } else { + clearInterval(this.timer); + message.destroy(); + message.warning(msg || getLabel(111, "生成申报表失败!")); + this.props.onGenerate(); + } + }, 1000); }).catch(() => { + message.destroy(); + clearInterval(this.timer); this.setState({ loading: false }); }); }; + taxdeclarationGetRate = (index) => { + return taxdeclarationGetRate({ index }); + }; render() { const { taxAgentStore: { taxAgentAdminOption } } = this.props; diff --git a/pc4mobx/hrmSalary/pages/declare/index.js b/pc4mobx/hrmSalary/pages/declare/index.js index 57e37c37..cffb075e 100644 --- a/pc4mobx/hrmSalary/pages/declare/index.js +++ b/pc4mobx/hrmSalary/pages/declare/index.js @@ -1,11 +1,11 @@ import React from "react"; import { inject, observer } from "mobx-react"; -import { Button, DatePicker, message, Modal } from "antd"; +import { Button, DatePicker, message, Modal, Tag } from "antd"; import { WeaLocaleProvider, WeaNewScroll, WeaTop } from "ecCom"; import CustomTab from "../../components/customTab"; import CustomTable from "../../components/customTable"; import GenerateModal from "./generateModal"; -import { getDeclareList, withDrawTaxDeclaration } from "../../apis/declare"; +import { getDeclareList, taxdeclarationDelete, taxdeclarationUpdateIcon } from "../../apis/declare"; import { sysConfCodeRule } from "../../apis/ruleconfig"; import moment from "moment"; @@ -65,13 +65,13 @@ export default class Declare extends React.Component { if (status && data === "1") this.setState({ showWithDrawBtn: data === "1" }); }); }; - withDrawTaxDeclaration = (taxDeclarationId) => { - withDrawTaxDeclaration({ taxDeclarationId }).then(({ status, errormsg }) => { + taxdeclarationDelete = (taxDeclarationId) => { + taxdeclarationDelete([taxDeclarationId]).then(({ status, errormsg }) => { if (status) { - message.success(getLabel(111, "撤回成功")); + message.success(getLabel(502230, "删除成功")); this.getDeclareList(); } else { - message.error(errormsg || getLabel(111, "撤回失败")); + message.error(errormsg || getLabel(20462, "删除失败")); } }); }; @@ -96,6 +96,17 @@ export default class Declare extends React.Component { } }, () => this.getDeclareList()); }; + handleUpdateicon = (record) => { + const { id: taxDeclareRecordId } = record; + taxdeclarationUpdateIcon({ taxDeclareRecordId }).then(({ status, errormsg }) => { + this.getDeclareList(); + if (status) { + message.success(getLabel(502230, "删除成功!")); + } else { + message.error(errormsg || getLabel(20462, "删除失败!")); + } + }); + }; render() { const { taxAgentStore: { showOperateBtn } } = this.props; @@ -129,7 +140,7 @@ export default class Declare extends React.Component { onClick={() => { this.setState({ declarationModalVisible: true }); }}> - 生成申报单 + {getLabel(111, "生成申报表")} }
@@ -147,21 +158,38 @@ export default class Declare extends React.Component { { + if (it.dataIndex === "taxDeclareStatusDesc") { + return { + ...it, + render: (text, record) => { + return (
+ {text} + { + record.displayIcon && + + this.handleUpdateicon(record)}> + + + + } +
); + } + }; + } + return { ...it }; + }), { title: "操作", dataIndex: "operate", render: (text, record) => { return ( - { - window.open( - "/spa/hrmSalary/static/index.html#/main/hrmSalary/generateDeclarationDetail?id=" + - record.id - ); - }}> - 查看 + + {getLabel(83110, "查看详情")} { showWithDrawBtn && @@ -169,13 +197,13 @@ export default class Declare extends React.Component { href="javascript:void(0);" style={{ marginLeft: 10 }} onClick={() => { Modal.confirm({ - title: getLabel(111, "信息确认"), - content: getLabel(111, "确认撤回该条数据吗?"), - onOk: () => this.withDrawTaxDeclaration(record.id) + title: getLabel(131329, "信息确认"), + content: getLabel(388758, "确认要删除吗?"), + onOk: () => this.taxdeclarationDelete(record.id) }); }} > - {getLabel(111, "撤回")} + {getLabel(535052, "删除")} } diff --git a/pc4mobx/hrmSalary/pages/declare/index.less b/pc4mobx/hrmSalary/pages/declare/index.less index 81e72b6f..41dfd6c3 100644 --- a/pc4mobx/hrmSalary/pages/declare/index.less +++ b/pc4mobx/hrmSalary/pages/declare/index.less @@ -1,7 +1,8 @@ .generateDeclarationDetail { - .tabWrapper{ + .tabWrapper { padding-left: 10px } + .tableWrapper { height: calc(100vh - 48px); overflow: auto; @@ -24,3 +25,32 @@ } } } + +.declare-status-box { + .icon-span { + cursor: pointer; + + .ant-tag:hover .anticon-cross { + display: block; + } + + .ant-tag { + background: transparent; + border-radius: 0; + border: none; + position: relative; + + .anticon-cross { + position: absolute; + right: -1px; + top: -1px; + display: none; + } + } + + i.icon-coms02-Warning-01 { + font-size: 16px; + color: red; + } + } +} diff --git a/pc4mobx/hrmSalary/pages/declareDetail/components/constants.js b/pc4mobx/hrmSalary/pages/declareDetail/components/constants.js new file mode 100644 index 00000000..483d987c --- /dev/null +++ b/pc4mobx/hrmSalary/pages/declareDetail/components/constants.js @@ -0,0 +1,93 @@ +export const paymentFeedbackConditions = [ + { + items: [ + { + colSpan: 1, + conditionType: "SELECT", + domkey: ["type"], + fieldcol: 12, + label: "缴款方式", + lanId: 111, + labelcol: 6, + value: "", + rules: "required", + viewAttr: 3, + detailtype: 3, + options: [] + } + ], + defaultshow: true + } +]; +export const paymentTripartiteConditions = [ + { + items: [ + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["taxAgent"], + fieldcol: 12, + label: "个税扣缴义务人", + lanId: 537996, + labelcol: 6, + value: "", + viewAttr: 1 + }, + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["amount"], + fieldcol: 12, + label: "应缴金额", + lanId: 111, + labelcol: 6, + value: "", + viewAttr: 1 + }, + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["personNum"], + fieldcol: 12, + label: "申报人数", + lanId: 111, + labelcol: 6, + value: "", + viewAttr: 1 + } + ], + defaultshow: true + } +]; +export const paymentBankConditions = [ + { + items: [ + { + colSpan: 1, + conditionType: "SELECT", + domkey: ["protocolNumber"], + fieldcol: 12, + label: "开户行", + lanId: 111, + labelcol: 6, + value: "", + rules: "required", + viewAttr: 3, + options: [] + }, + { + colSpan: 1, + conditionType: "SELECT", + domkey: ["count"], + fieldcol: 12, + label: "开户行号", + lanId: 111, + labelcol: 6, + value: "", + viewAttr: 1, + options: [] + } + ], + defaultshow: true + } +]; diff --git a/pc4mobx/hrmSalary/pages/declareDetail/components/declareResultDialog.js b/pc4mobx/hrmSalary/pages/declareDetail/components/declareResultDialog.js new file mode 100644 index 00000000..a462a426 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/declareDetail/components/declareResultDialog.js @@ -0,0 +1,157 @@ +/* + * Author: 黎永顺 + * name: 个税申报-异常、失败详情 + * Description: + * Date: 2023/8/18 + */ +import React, { Component } from "react"; +import { WeaDialog, WeaInputSearch, WeaLocaleProvider, WeaReqTop, WeaTable } from "ecCom"; +import { Button, Col, Row } from "antd"; +import { + taxdeclarationEmployeeList4Fail, + taxdeclarationEmployeeList4NotDeclare, + taxdeclarationEmployeeList4NoValue +} from "../../../apis/declare"; +import { convertToUrlString, getQueryString } from "../../../util/url"; + +const { getLabel } = WeaLocaleProvider; +const APIFox = { + list4NotDeclare: taxdeclarationEmployeeList4NotDeclare, + list4NoValue: taxdeclarationEmployeeList4NoValue, + list4Fail: taxdeclarationEmployeeList4Fail +}; + +class DeclareResultDialog extends Component { + constructor(props) { + super(props); + this.state = { + keyword: "", selectedKey: "", + pageInfo: { current: 1, pageSize: 10, total: 0 }, + loading: false, columns: [], dataSource: [] + }; + } + + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.visible !== this.props.visible && nextProps.visible) { + const { type } = nextProps; + this.setState({ + selectedKey: _.head(type).key + }, () => this.queryList()); + } + } + + queryList = () => { + const taxDeclareRecordId = getQueryString("id"); + const { keyword, pageInfo, selectedKey } = this.state; + const payload = { + ...pageInfo, keyword, taxDeclareRecordId + }; + this.setState({ loading: true }); + APIFox[selectedKey](payload).then(({ status, data }) => { + this.setState({ loading: false }); + if (status) { + const { columns, list: dataSource, pageNum: current, pageSize, total } = data; + this.setState({ + dataSource, pageInfo: { ...pageInfo, current, pageSize, total }, columns + }); + } else { + + } + }).catch(() => this.setState({ loading: false })); + }; + errorExport = () => { + let exportUrl = ""; + const { selectedKey, keyword } = this.state; + const payload = { + taxDeclareRecordId: getQueryString("id"), keyword + }; + if (selectedKey === "list4NotDeclare") { + exportUrl = "/api/bs/hrmsalary/taxdeclaration/employee/export4NotDeclare"; + } else if (selectedKey === "list4NoValue") { + exportUrl = "/api/bs/hrmsalary/taxdeclaration/employee/export4NoValue"; + } + window.open(`${window.ecologyContentPath || ""}${exportUrl}?${convertToUrlString(payload)}`, "_blank"); + }; + failExport = () => { + const payload = { + taxDeclareRecordId: getQueryString("id") + }; + window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/taxdeclaration/employee/export4Fail?${convertToUrlString(payload)}`, "_blank"); + }; + + render() { + const { type } = this.props; + const { loading, columns, dataSource, pageInfo, selectedKey, keyword } = this.state; + const pagination = { + ...pageInfo, + showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`, + showQuickJumper: true, + showSizeChanger: true, + pageSizeOptions: ["10", "20", "50", "100"], + onShowSizeChange: (current, pageSize) => { + this.setState({ + pageInfo: { ...pageInfo, current, pageSize } + }, () => this.queryList()); + }, + onChange: current => { + this.setState({ + pageInfo: { ...pageInfo, current } + }, () => this.queryList()); + } + }; + return ( + + + {this.props.title} + + + + +
) : + {getLabel(17416, "导出")} + ]} + onChange={key => this.setState({ selectedKey: key }, () => this.queryList())} + /> + } + style={{ + width: 1150, + height: 606.6, + minHeight: 200, + minWidth: 380, + maxHeight: "90%", + maxWidth: "90%", + overflow: "hidden", + transform: "translate(0px, 0px)" + }} + > +
+ { + type.length !== 1 && + < div className="declareNoSearchBox"> + this.setState({ keyword: val })} + onSearch={this.queryList} + /> +
+ } + +
+ + ); + } +} + +export default DeclareResultDialog; diff --git a/pc4mobx/hrmSalary/pages/declareDetail/components/paymentBtn.js b/pc4mobx/hrmSalary/pages/declareDetail/components/paymentBtn.js new file mode 100644 index 00000000..428344c8 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/declareDetail/components/paymentBtn.js @@ -0,0 +1,351 @@ +/* + * Author: 黎永顺 + * name: 在线申报-缴款按钮 + * Description: + * Date: 2023/8/22 + */ +import React, { Component } from "react"; +import { WeaLocaleProvider } from "ecCom"; +import { inject, observer } from "mobx-react"; +import { Button, Dropdown, Menu, message, Modal } from "antd"; +import PaymentDialog from "./paymentDialog"; +import { + taxPaymentAgreemenPay, + taxPaymentgetAgreement, + taxPaymentgetAgreementFeedback, + taxPaymentTaxAmount, + taxPaymentVoucherCancel, + taxPaymentVoucherPrint +} from "../../../apis/declare"; +import { getQueryString } from "../../../util/url"; +import { paymentBankConditions, paymentTripartiteConditions } from "./constants"; + +const { getLabel } = WeaLocaleProvider; + +@inject("declareStore") +@observer +class PaymentBtn extends Component { + constructor(props) { + super(props); + this.state = { + paymentDialog: { + visible: false, title: "", + buttons: [], conditions: [], + taxAmount: "" + } + }; + this.timer = null; + } + + handleTripartiteContributions = () => { + Modal.confirm({ + title: getLabel(131329, "信息确认"), + content:
+
{getLabel(111, "确定要进行三方缴款吗?")}
+
{getLabel(111, "若申请过银行缴款,点击确定,将自动作废银行缴款凭证。并进行三方缴款。 ")}
+
, + onOk: () => { + taxPaymentTaxAmount({ taxDeclareRecordId: getQueryString("id") }) + .then(({ status, data, errormsg }) => { + if (status) { + const { paymentDialog } = this.state; + this.setState({ + paymentDialog: { + ...paymentDialog, visible: true, + title: getLabel(111, "应缴纳"), taxAmount: data.amount, + buttons: [ + + ], + conditions: _.map(paymentTripartiteConditions, item => { + return { + ...item, + items: _.map(item.items, it => { + const key = it["domkey"][0]; + return { + ...it, + value: data[key] + }; + }) + }; + }) + } + }); + } else { + message.error(errormsg); + } + }); + } + }); + }; + taxPaymentgetAgreement = () => { + const { taxCycle: taxYearMonth, taxAgentId } = this.props.declareInfo; + const payload = { + taxDeclareRecordId: getQueryString("id"), + taxAgentId, taxYearMonth + }; + this.setState({ + paymentDialog: { + ...this.state.paymentDialog, + buttons: [ + + ] + } + }); + taxPaymentgetAgreement(payload).then(({ status, data, errormsg }) => { + if (status) { + this.handleCancel(); + this.getBankAccountInfo({ ...payload, requestId: data }); + } else { + this.setState({ + paymentDialog: { + ...this.state.paymentDialog, + buttons: [ + + ] + } + }); + message.error(errormsg); + } + }).catch(() => { + this.setState({ + paymentDialog: { + ...this.state.paymentDialog, + buttons: [ + + ] + } + }); + }); + }; + getBankAccountInfo = (payload) => { + let loop = () => { + clearTimeout(this.timer); + this.timer = setTimeout(async () => { + let response = await taxPaymentgetAgreementFeedback(payload); + const { data, status, errormsg } = response; + if (status) { + const { finish, form } = data; + if (finish) { + const { feedbacks, bankForm } = form; + const { paymentDialog } = this.state; + this.setState({ + paymentDialog: { + ...paymentDialog, visible: true, + title: getLabel(111, "银行账号信息"), + buttons: [ + + ], + conditions: _.map(paymentBankConditions, item => { + return { + ...item, + items: _.map(item.items, it => { + const key = it["domkey"][0]; + if (key === "protocolNumber") { + return { + ...it, + value: !_.isEmpty(bankForm) ? bankForm.bank : "", + options: _.map(feedbacks, o => ({ key: o.sfxyh, showname: o.yhhbmc })) + }; + } else if (key === "count") { + return { + ...it, + value: !_.isEmpty(bankForm) ? bankForm.bank : "", + options: _.map(feedbacks, o => ({ key: o.sfxyh, showname: o.khhhh })) + }; + } + return { ...it }; + }) + }; + }) + } + }); + } else { + loop(); + } + } else { + message.warning(errormsg); + clearTimeout(this.timer); + } + }, 800); + }; + loop(); + }; + taxPaymentAgreemenPay = () => { + const { paymentDialog } = this.state; + const { taxAmount } = paymentDialog; + const { declareStore: { paymentForm } } = this.props; + const { taxCycle: taxYearMonth, taxAgentId } = this.props.declareInfo; + paymentForm.validateForm().then(f => { + if (f.isValid) { + const { protocolNumber } = paymentForm.getFormParams(); + const payload = { + taxDeclareRecordId: getQueryString("id"), + taxAgentId, taxYearMonth, taxAmount, protocolNumber + }; + this.setState({ + paymentDialog: { + ...this.state.paymentDialog, + buttons: [ + + ] + } + }); + taxPaymentAgreemenPay(payload).then(({ status, errormsg }) => { + this.setState({ + paymentDialog: { + ...this.state.paymentDialog, + buttons: [ + + ] + } + }); + if (status) { + message.success(getLabel(111, "缴款处理中,请稍后点击缴款反馈按钮获取缴款信息")); + this.handleCancel(); + } else { + message.error(errormsg); + } + }).catch(() => this.setState({ + paymentDialog: { + ...this.state.paymentDialog, + buttons: [ + + ] + } + })); + } else { + f.showErrors(); + } + }); + }; + handleMenuChange = ({ key }) => { + if (key === "bank_voucher_payment") { + taxPaymentTaxAmount({ taxDeclareRecordId: getQueryString("id") }) + .then(({ status, data, errormsg }) => { + if (status) { + const { paymentDialog } = this.state; + this.setState({ + paymentDialog: { + ...paymentDialog, visible: true, title: getLabel(111, "应缴纳"), + buttons: [ + + ], + conditions: _.map(paymentTripartiteConditions, item => { + return { + ...item, + items: _.map(item.items, it => { + const key = it["domkey"][0]; + return { + ...it, + value: data[key] + }; + }) + }; + }) + } + }); + } else { + message.error(errormsg); + } + }); + } else if (key === "destory_voucher") { + Modal.confirm({ + title: getLabel(131329, "信息确认"), + content: getLabel(111, "确定作废缴款凭证吗?作废后可重新获取。"), + onOk: () => { + const { taxAgentId, taxCycle: taxYearMonth } = this.props.declareInfo; + const payload = { + taxDeclareRecordId: getQueryString("id"), + taxAgentId, taxYearMonth + }; + taxPaymentVoucherCancel(payload).then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(111, "作废缴款凭证成功!")); + } else { + message.error(errormsg || getLabel(111, "作废失败!")); + } + }); + } + }); + } + }; + taxPaymentVoucherPrint = () => { + const { taxCycle: taxYearMonth, taxAgentId } = this.props.declareInfo; + const payload = { + taxDeclareRecordId: getQueryString("id"), + taxAgentId, taxYearMonth + }; + this.setState({ + paymentDialog: { + ...this.state.paymentDialog, + buttons: [ + + ] + } + }); + taxPaymentVoucherPrint(payload).then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(111, "处理中,请稍后点击缴款反馈!")); + this.handleCancel(); + } else { + this.setState({ + paymentDialog: { + ...this.state.paymentDialog, + buttons: [ + + ] + } + }); + message.error(errormsg || getLabel(111, "缴款反馈失败!")); + } + }).catch(() => { + this.setState({ + paymentDialog: { + ...this.state.paymentDialog, + buttons: [ + + ] + } + }); + }); + }; + handleCancel = () => { + const { paymentDialog } = this.state; + this.setState({ + paymentDialog: { + ...paymentDialog, visible: false, + title: "", buttons: [], conditions: [] + } + }); + }; + + render() { + const { paymentDialog } = this.state; + return ( + + + {getLabel(111, "银行端凭证缴款")} + {getLabel(111, "作废缴款凭证")} + + } + type="ghost">{getLabel(111, "三方缴款")} + + + ); + } +} + +export default PaymentBtn; diff --git a/pc4mobx/hrmSalary/pages/declareDetail/components/paymentDialog.js b/pc4mobx/hrmSalary/pages/declareDetail/components/paymentDialog.js new file mode 100644 index 00000000..e5ffc64f --- /dev/null +++ b/pc4mobx/hrmSalary/pages/declareDetail/components/paymentDialog.js @@ -0,0 +1,51 @@ +/* + * Author: 黎永顺 + * name: 在线申报-缴款弹框 + * Description: + * Date: 2023/8/22 + */ +import React, { Component } from "react"; +import { inject, observer } from "mobx-react"; +import { WeaDialog } from "ecCom"; +import { getSearchs } from "../../../util"; + +@inject("declareStore") +@observer +class PaymentDialog extends Component { + componentWillReceiveProps(nextProps, nextContext) { + const { declareStore: { paymentForm, changePaymentForm }, conditions } = nextProps; + if (nextProps.visible !== this.props.visible && nextProps.visible && nextProps.conditions) { + paymentForm.initFormFields(conditions); + } + if (nextProps.visible !== this.props.visible && !nextProps.visible) { + paymentForm.resetForm(); + changePaymentForm(); + } + } + + handleChange = (val) => { + const key = Object.keys(val)[0]; + if (key === "protocolNumber") { + const { declareStore: { paymentForm } } = this.props; + paymentForm.updateFields({ + count: val[key].value + }); + } + }; + + render() { + const { conditions, declareStore: { paymentForm } } = this.props; + return ( + +
+ {!_.isEmpty(conditions) && getSearchs(paymentForm, conditions, 1, false, this.handleChange)} +
+
+ ); + } +} + +export default PaymentDialog; diff --git a/pc4mobx/hrmSalary/pages/declareDetail/components/paymentFeedBackDetail.js b/pc4mobx/hrmSalary/pages/declareDetail/components/paymentFeedBackDetail.js new file mode 100644 index 00000000..9dad86e6 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/declareDetail/components/paymentFeedBackDetail.js @@ -0,0 +1,42 @@ +/* + * Author: 黎永顺 + * name: 在线申报-三方缴款详情 + * Description: + * Date: 2023/8/22 + */ +import React, { Component } from "react"; +import { WeaDialog, WeaLocaleProvider } from "ecCom"; + +const { getLabel } = WeaLocaleProvider; + +class PaymentFeedBackDetail extends Component { + + render() { + const { showData } = this.props; + return ( + +
+
{getLabel(111, "缴款成功")}
+
+
{getLabel(111, "状态:")}
+
{getLabel(111, "申报成功,已缴款")}
+
+
+
{getLabel(111, "实缴金额:")}
+
{showData.payAmount}      {parseFloat(showData.otherAmount) > 0 ? `(含滞纳金等{${showData.otherAmount}元)` : ""}
+
+
+
{getLabel(111, "申报人数:")}
+
{showData.personNum}
+
+
+
+ ); + } +} + +export default PaymentFeedBackDetail; diff --git a/pc4mobx/hrmSalary/pages/declareDetail/components/paymentFeedbackBtn.js b/pc4mobx/hrmSalary/pages/declareDetail/components/paymentFeedbackBtn.js new file mode 100644 index 00000000..7a9809bd --- /dev/null +++ b/pc4mobx/hrmSalary/pages/declareDetail/components/paymentFeedbackBtn.js @@ -0,0 +1,199 @@ +/* + * Author: 黎永顺 + * name: 在线申报-缴款反馈按钮 + * Description: + * Date: 2023/8/22 + */ +import React, { Component } from "react"; +import { WeaLocaleProvider } from "ecCom"; +import { Button, message } from "antd"; +import { inject, observer } from "mobx-react"; +import PaymentDialog from "./paymentDialog"; +import PaymentFeedBackDetail from "./paymentFeedBackDetail"; +import { paymentFeedbackConditions } from "./constants"; +import { convertToUrlString, getQueryString } from "../../../util/url"; +import { taxPaymentAgreementPayFeedback, taxPaymentVoucherPrintFeedback } from "../../../apis/declare"; + +const { getLabel } = WeaLocaleProvider; + +@inject("declareStore") +@observer +class PaymentFeedbackBtn extends Component { + constructor(props) { + super(props); + this.state = { + paymentDialog: { + visible: false, title: "", + buttons: [], conditions: null + }, + paymentFeedbackDialog: { + visible: false, title: "", showData: {} + }, + loading: false + }; + } + + getFeedback = () => { + const { declareStore: { paymentForm } } = this.props; + paymentForm.validateForm().then(f => { + const { type } = paymentForm.getFormParams(); + if (f.isValid) { + if (type === "WITHHOLDING_PAY") { + // 三方缴款 弹窗,打印新开页面 + this.taxPaymentAgreementPayFeedback(); + } else { + this.taxPaymentVoucherPrintFeedback(); + } + } else { + f.showErrors(); + } + }); + }; + taxPaymentAgreementPayFeedback = () => { + const { taxCycle: taxYearMonth, taxAgentId } = this.props.declareInfo; + const payload = { + taxDeclareRecordId: getQueryString("id"), + taxAgentId, taxYearMonth + }; + this.setState({ + paymentDialog: { + ...this.state.paymentDialog, + buttons: [ + + ] + } + }); + taxPaymentAgreementPayFeedback(payload).then(({ status, data, errormsg }) => { + this.setState({ + paymentDialog: { + ...this.state.paymentDialog, + buttons: [ + + ] + } + }); + if (status) { + this.handleCancel(); + this.setState({ + paymentFeedbackDialog: { + ...this.state.paymentFeedbackDialog, + visible: true, title: getLabel(111, "三方缴款详情"), + showData: data + } + }); + } else { + message.error(errormsg || getLabel(111, "缴款反馈失败!")); + } + }).catch(() => { + this.setState({ + paymentDialog: { + ...this.state.paymentDialog, + buttons: [ + + ] + } + }); + }); + }; + taxPaymentVoucherPrintFeedback = () => { + const { taxCycle: taxYearMonth, taxAgentId } = this.props.declareInfo; + const payload = { + taxDeclareRecordId: getQueryString("id"), + taxAgentId, taxYearMonth, checkFeedback: 1 + }; + this.setState({ + paymentDialog: { + ...this.state.paymentDialog, + buttons: [ + + ] + } + }); + taxPaymentVoucherPrintFeedback(payload).then(({ status, data, errormsg }) => { + this.setState({ + paymentDialog: { + ...this.state.paymentDialog, + buttons: [ + + ] + } + }); + if (status) { + this.handleCancel(); + window.open(`${window.ecologyContentPath || ""}/spa/hrmSalary/static/index.html#/main/hrmSalary/bankVoucherDetail?${convertToUrlString(payload)}`); + } else { + message.error(errormsg || getLabel(111, "缴款反馈失败!")); + } + }).catch(() => { + this.setState({ + paymentDialog: { + ...this.state.paymentDialog, + buttons: [ + + ] + } + }); + }); + }; + handlePaymentFeedback = () => { + const { paymentDialog } = this.state; + this.setState({ + paymentDialog: { + ...paymentDialog, visible: true, + title: getLabel(111, "获取反馈"), + buttons: [ + + ], + conditions: _.map(paymentFeedbackConditions, item => { + return { + ...item, + items: _.map(item.items, it => { + return { + ...it, + options: [ + { key: "WITHHOLDING_PAY", showname: getLabel(111, "三方缴款") }, + { key: "WITHHOLDING_VOUCHER", showname: getLabel(111, "缴款凭证打印") } + ] + }; + }) + }; + }) + } + }); + }; + handleCancel = () => { + const { paymentDialog } = this.state; + this.setState({ + paymentDialog: { + ...paymentDialog, visible: false, + title: "", buttons: [], conditions: null + } + }); + }; + + render() { + const { paymentDialog, paymentFeedbackDialog } = this.state; + return ( + + + + { + this.setState({ + paymentFeedbackDialog: { + ...paymentFeedbackDialog, + visible: false, title: "", showData: {} + } + }, () => this.props.updateDeclare()); + }} + /> + + ); + } +} + +export default PaymentFeedbackBtn; diff --git a/pc4mobx/hrmSalary/pages/declareDetail/components/taxDeclarationInfo.js b/pc4mobx/hrmSalary/pages/declareDetail/components/taxDeclarationInfo.js new file mode 100644 index 00000000..30b34e53 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/declareDetail/components/taxDeclarationInfo.js @@ -0,0 +1,107 @@ +/* + * Author: 黎永顺 + * name: 个税申报表详情-基本信息 + * Description: + * Date: 2023/8/18 + */ +import React, { Component } from "react"; +import { message, Tag } from "antd"; +import { WeaLocaleProvider } from "ecCom"; +import DeclareResultDialog from "./declareResultDialog"; +import { taxdeclarationUpdateIcon } from "../../../apis/declare"; +import { getQueryString } from "../../../util/url"; + +const { getLabel } = WeaLocaleProvider; + +class TaxDeclarationInfo extends Component { + constructor(props) { + super(props); + this.state = { + resDialog: { + visible: false, title: "", + type: [] + } + }; + } + + handleSeeResult = (type, title) => { + this.setState({ + resDialog: { ...this.state.resDialog, visible: true, title: `${title}${getLabel(111, "详情")}`, type } + }); + }; + handleUpdateicon = () => { + taxdeclarationUpdateIcon({ taxDeclareRecordId: getQueryString("id") }) + .then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(502230, "删除成功!")); + } else { + message.error(errormsg || getLabel(20462, "删除失败!")); + } + }); + }; + + render() { + const { resDialog } = this.state; + const { declareInfo } = this.props; + const { abnormalSize, declareFailSize } = declareInfo; + const infoItem = [ + { key: "salaryMonth", label: getLabel(542604, "薪资所属月") }, + { key: "taxAgentName", label: getLabel(537996, "个税扣缴义务人") }, + { key: "declareTypeDesc", label: getLabel(111, "申报类型") }, + { key: "declareStatusDesc", label: getLabel(111, "申报状态") }, + { key: "taxCycle", label: getLabel(542240, "税款所属期") }, + { key: "taxPaidAmount", label: getLabel(111, "已缴金额") } + ]; + return ( +
+
+ { + _.map(infoItem, item => { + return
+ {item["label"]}: + + {declareInfo[item["key"]]} + { + (item["key"] === "declareStatusDesc" && declareInfo["displayIcon"]) && + + + + + + } + + { + item.key === "taxPaidAmount" && + {getLabel(111, "元")} + } +
; + }) + } +
+
+ this.handleSeeResult([ + { key: "list4NotDeclare", title: getLabel(111, "待报送") }, + { key: "list4NoValue", title: getLabel(111, "缺申报数据") } + ], getLabel(111, "申报校验异常"))}> + {getLabel(111, "申报校验异常")}({abnormalSize || 0}) + + this.handleSeeResult([{ key: "list4Fail" }], getLabel(111, "申报失败数据"))}> + {getLabel(111, "申报失败数据")}({declareFailSize || 0}) + + { + this.setState({ + resDialog: { ...resDialog, visible: false, title: "", type: [] } + }); + }} + /> +
+
+ ); + } +} + +export default TaxDeclarationInfo; diff --git a/pc4mobx/hrmSalary/pages/declareDetail/index.js b/pc4mobx/hrmSalary/pages/declareDetail/index.js new file mode 100644 index 00000000..28f482f5 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/declareDetail/index.js @@ -0,0 +1,324 @@ +/* + * Author: 黎永顺 + * name: 个税查看详情页面 + * Description: + * Date: 2023/8/18 + */ +import React, { Component } from "react"; +import { WeaLocaleProvider, WeaTab, WeaTable } from "ecCom"; +import { Button, message } from "antd"; +import TaxDeclarationInfo from "./components/taxDeclarationInfo"; +import { apiflowBillingConfigStatus } from "../../apis/intelligentCalculateSalarySettings"; +import PaymentBtn from "./components/paymentBtn"; +import PaymentFeedbackBtn from "./components/paymentFeedbackBtn"; +import { + getDeclareInfo, + getDetailList, + getTaxDeclarationTab, + taxdeclaratioGetCancelFeedback, + taxdeclarationDeclare, + taxdeclarationGetDeclareFeedback, + taxdeclarationGetRate, + taxdeclarationRefreshData, + taxdeclaratioUpdateCancel, + taxdeclaratioUpdateDeclare, + taxPaymentVoucherStatusSync, + taxPaymentWithheldVoucherGet +} from "../../apis/declare"; +import { convertToUrlString, getQueryString } from "../../util/url"; +import "./index.less"; + +const { getLabel } = WeaLocaleProvider; + +const APIFox = { + refresh: taxdeclarationRefreshData, //刷新数据 + declare: taxdeclarationDeclare, //在线申报 + feedback: taxdeclarationGetDeclareFeedback,//申报反馈 + correct: taxdeclaratioUpdateDeclare,//更正申报 + cancel: taxdeclaratioUpdateCancel,//作废申报 + cancelFeedback: taxdeclaratioGetCancelFeedback//作废反馈 +}; + +class Index extends Component { + constructor(props) { + super(props); + this.state = { + tabs: [], selectedKey: "", columns: [], dataSource: [], + loading: { + query: false, refresh: false, declare: false, feedback: false, + correct: false, cancel: false, cancelFeedback: false, refreshingPay: false, + issuance: false + }, + intelCalcSalaryStatus: false, //智能算薪 总开关是否开启 + declareInfo: {}, pageInfo: { current: 0, pageSize: 10, total: 0 } + }; + this.timer = null; + } + + componentDidMount() { + const promise = this.init(); + } + + init = async () => { + const [tabsResult, infoResult, calcResult] = await Promise.all([this.getTaxDeclarationTab(), this.getDeclareInfo(), this.apiflowBillingConfigStatus()]); + const { data: tabDataSource, status: tabStatus } = tabsResult; + const { data: infoDataSource, status: infoStatus } = infoResult; + const { data: calcSalaryStatus, status: calcStatus } = calcResult; + this.setState({ + tabs: tabStatus ? _.map(tabDataSource, it => ({ + viewcondition: `${it.incomeCategory}%%${it.taxDeclarationId}`, + title: it.tabName + })) : this.state.tabs, + selectedKey: tabStatus ? `${_.take(tabDataSource)[0].incomeCategory}%%${_.take(tabDataSource)[0].taxDeclarationId}` : this.state.selectedKey, + declareInfo: infoStatus ? infoDataSource : this.state.declareInfo, + intelCalcSalaryStatus: calcStatus && calcSalaryStatus + }); + this.getDetailList(); + }; + declare = async () => { + const [infoResult] = await Promise.all([this.getDeclareInfo()]); + const { data: infoDataSource, status: infoStatus } = infoResult; + this.setState({ + declareInfo: infoStatus ? infoDataSource : this.state.declareInfo + }); + this.getDetailList(); + }; + getTaxDeclarationTab = () => { + return getTaxDeclarationTab({ id: getQueryString("id") }); + }; + getDeclareInfo = () => { + return getDeclareInfo({ id: getQueryString("id") }); + }; + apiflowBillingConfigStatus = () => { + return apiflowBillingConfigStatus(); + }; + taxdeclarationGetRate = (index) => { + return taxdeclarationGetRate({ index }); + }; + getDetailList = () => { + const { loading, pageInfo, selectedKey } = this.state; + const [incomeCategory, taxDeclarationId] = selectedKey.split("%%"); + const payload = { + ...pageInfo, incomeCategory, taxDeclarationId, + taxDeclareRecordId: getQueryString("id") + }; + this.setState({ loading: { ...loading, query: true } }); + getDetailList(payload).then(({ status, data }) => { + this.setState({ loading: { ...loading, query: false } }); + if (status) { + const { columns, list: dataSource, pageNum: current, pageSize, total } = data; + this.setState({ + dataSource, pageInfo: { ...pageInfo, current, pageSize, total }, + columns: _.map(columns, (it, idx) => { + if (idx <= 1) { + return { ...it, width: 150, fixed: "left" }; + } + return { ...it, width: 150 }; + }) + }); + } + }).catch(() => this.setState({ loading: { ...loading, query: false } })); + }; + handleOperateDeclare = (type) => { + const loadingTxt = { + refresh: getLabel(111, "刷新中..."), //刷新数据 + declare: getLabel(111, "申报中..."), //在线申报 + feedback: getLabel(111, "反馈中..."),//申报反馈 + correct: getLabel(111, "更正申报中..."),//更正申报 + cancel: getLabel(111, "作废申报中..."),//作废申报 + cancelFeedback: getLabel(111, "作废反馈中...")//作废反馈 + }, successTxt = { + refresh: getLabel(111, "刷新数据成功!"), //刷新数据 + declare: getLabel(111, "在线申报成功!"), //在线申报 + feedback: getLabel(111, "申报反馈成功!"),//申报反馈 + correct: getLabel(111, "更正申报成功!"),//更正申报 + cancel: getLabel(111, "作废申报成功!"),//作废申报 + cancelFeedback: getLabel(111, "作废反馈成功!")//作废反馈 + }, failTxt = { + refresh: getLabel(111, "刷新数据失败!"), //刷新数据 + declare: getLabel(111, "在线申报失败!"), //在线申报 + feedback: getLabel(111, "申报反馈失败!"),//申报反馈 + correct: getLabel(111, "更正申报失败!"),//更正申报 + cancel: getLabel(111, "作废申报失败!"),//作废申报 + cancelFeedback: getLabel(111, "作废反馈失败!")//作废反馈 + }; + this.setState({ loading: { ...this.state.loading, [type]: true } }); + APIFox[type]({ taxDeclareRecordId: getQueryString("id") }) + .then(async ({ status, data, errormsg }) => { + if (status) { + message.destroy(); + message.loading(loadingTxt[type], 0); + this.timer = setInterval(async () => { + const { status: resStatus, data: result } = await this.taxdeclarationGetRate(data); + const { status: rateStatus, finish, msg } = result; + if (resStatus && rateStatus) { + if (finish) { + this.setState({ loading: { ...this.state.loading, [type]: false } }); + clearInterval(this.timer); + message.destroy(); + message.success(successTxt[type]); + const promise = type === "refresh" ? await this.init() : await this.declare(); + } + } else { + this.setState({ loading: { ...this.state.loading, [type]: false } }); + clearInterval(this.timer); + message.destroy(); + message.warning(msg || failTxt[type]); + const promise = type === "refresh" ? await this.init() : await this.declare(); + } + }, 1000); + } else { + this.setState({ loading: { ...this.state.loading, [type]: false } }); + clearInterval(this.timer); + message.destroy(); + message.warning(errormsg); + } + }).catch(() => { + message.destroy(); + clearInterval(this.timer); + this.setState({ loading: { ...this.state.loading, [type]: false } }); + }); + }; + taxPaymentVoucherStatusSync = () => { + const { taxAgentId, taxCycle: taxYearMonth } = this.state.declareInfo; + const payload = { + taxDeclareRecordId: getQueryString("id"), + taxAgentId, taxYearMonth + }; + this.setState({ loading: { ...this.state.loading, refreshingPay: true } }); + taxPaymentVoucherStatusSync(payload).then(({ status, errormsg }) => { + this.setState({ loading: { ...this.state.loading, refreshingPay: false } }); + if (status) { + message.success(getLabel(111, "刷新成功!")); + const promise = this.declare(); + } else { + message.error(errormsg || getLabel(111, "刷新失败!")); + } + }).catch(() => this.setState({ loading: { ...this.state.loading, refreshingPay: false } })); + }; + getEnterprisePayCertificate = () => { + const { taxAgentId, taxCycle: taxYearMonth } = this.state.declareInfo; + const payload = { + taxDeclareRecordId: getQueryString("id"), + taxAgentId, taxYearMonth + }; + this.setState({ loading: { ...this.state.loading, issuance: true } }); + taxPaymentWithheldVoucherGet(payload).then(({ status, data, errormsg }) => { + this.setState({ loading: { ...this.state.loading, issuance: false } }); + if (status && !_.isEmpty(data.vouchers)) { + window.open(`${window.ecologyContentPath || ""}/spa/hrmSalary/static/index.html#/main/hrmSalary/enterprisePayCertificationDetail?${convertToUrlString(payload)}`); + } else { + message.error(errormsg || ""); + } + }).catch(() => this.setState({ loading: { ...this.state.loading, issuance: false } })); + }; + export = () => { + const [incomeCategory, taxDeclarationId] = this.state.selectedKey.split("%%"); + const payload = { + taxDeclareRecordId: getQueryString("id"), + taxDeclarationId: taxDeclarationId.toString(), + incomeCategory + }; + window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/taxdeclaration/detail/export?${convertToUrlString(payload)}`, "_blank"); + }; + + render() { + const { + tabs, selectedKey, columns, pageInfo, + dataSource, loading, declareInfo, intelCalcSalaryStatus + } = this.state; + let btns = [ + , + , + + ]; + const pagination = { + ...pageInfo, + showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`, + showQuickJumper: true, + showSizeChanger: true, + pageSizeOptions: ["10", "20", "50", "100"], + onShowSizeChange: (current, pageSize) => { + this.setState({ + pageInfo: { ...pageInfo, current, pageSize } + }, () => this.getDetailList()); + }, + onChange: current => { + this.setState({ + pageInfo: { ...pageInfo, current } + }, () => this.getDetailList()); + } + }; + //申报状态:作废中 + declareInfo.declareStatus === "DECLARE_CANCELLING" && (btns.splice(1, 2, )); + //申报状态:申报中 + declareInfo.declareStatus === "DECLARING" && (btns.splice(1, 2, )); + //申报状态:缴款中 + declareInfo.declareStatus === "DECLARE_SUCCESS_PAYING" && (btns.splice(1, 2)); + //申报状态:已缴款 + declareInfo.declareStatus === "DECLARE_SUCCESS_PAID" && (btns.splice(1, 2, + )); + //申报状态:申报成功,无需缴款 + declareInfo.declareStatus === "DECLARE_SUCCESS_NO_PAY" && + (btns.splice(1, 2, + , + + )); + //申报状态:申报成功,未缴款 + declareInfo.declareStatus === "DECLARE_SUCCESS_UNPAID" && + (btns.splice(1, 2, + , + , + + )); + if (!intelCalcSalaryStatus) { + if (["NOT_DECLARE", "DECLARE_FAIL"].includes(declareInfo.declareStatus)) { + btns.splice(1, 1); + } + } + if (intelCalcSalaryStatus && (declareInfo.declareStatus === "DECLARE_SUCCESS_UNPAID")) { + btns.push( + , + + ); + } + if (intelCalcSalaryStatus && declareInfo.taxPaidAmount && parseFloat(declareInfo.taxPaidAmount) > 0) { + btns.push(); + } + return ( +
+ +
+ + +
+
+ ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/declareDetail/index.less b/pc4mobx/hrmSalary/pages/declareDetail/index.less new file mode 100644 index 00000000..596d9423 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/declareDetail/index.less @@ -0,0 +1,211 @@ +.declareDetail-layout { + .declareDetail-layout-content { + padding: 0 16px; + } + + .icon-span { + cursor: pointer; + + .ant-tag:hover .anticon-cross { + display: block; + } + + .ant-tag { + background: transparent; + border-radius: 0; + border: none; + position: relative; + + .anticon-cross { + position: absolute; + right: -1px; + top: -1px; + display: none; + } + } + + i.icon-coms02-Warning-01 { + font-size: 16px; + color: red; + } + } +} + +.taxDeclarationInfo_layout { + border-bottom: 1px solid #e5e5e5; + height: 48px; + padding: 0 16px; + font-size: 12px; + color: #111; + display: flex; + justify-content: space-between; + align-items: center; + + .base-info { + display: flex; + align-items: center; + justify-content: flex-start; + + .info-item { + margin-right: 25px; + + .label { + color: #666; + } + + .value { + color: #111; + } + } + } + + .weapp-salary-btn-flex { + display: flex; + align-items: center; + justify-content: flex-end; + cursor: auto; + } + + .tools-line { + font-size: 12px; + display: flex; + align-items: center; + color: #111; + + .item { + margin-left: 8px; + cursor: pointer; + } + } +} + +.declareResultDialog { + .wea-new-top-req-wapper .wea-new-top-req-main { + padding: 12px 0 0 0; + background: transparent; + } + + .wea-new-top-req-wapper .wea-new-top-req-main .wea-new-top-req-title-text { + color: #111; + font-weight: 700; + } + + .wea-new-top-req-wapper .wea-new-top-req { + background: transparent; + } + + .wea-new-top-req-wapper .wea-new-top-req-title > div:first-child > div { + max-width: 500px !important; + } + + .wea-new-top-req-wapper .wea-new-top-req-title > div:last-child { + background: transparent; + } + + .declareResultDialogTitle { + display: flex; + align-items: center; + + .declareResultDialogTitle-left { + text-align: left; + + .title { + color: #111; + font-weight: 700; + } + } + + .declareResultDialogTitle-right { + text-align: right; + } + } + + .declareResultDialogContent { + height: 100%; + padding: 16px; + background: #f6f6f6; + overflow-y: auto; + + .declareTable { + background: #FFF; + } + + .declareNoSearchBox { + display: flex; + justify-content: flex-end; + padding: 5px 5px 9px 0; + background: #Ffff; + margin-bottom: 16px; + } + + } +} + +.paymentDialog { + .ant-modal-title { + .text-elli { + color: #111; + font-weight: 700; + } + } + + .ant-modal-footer { + .ext-link { + padding-left: 0 !important; + padding-right: 10px !important; + text-align: left !important; + } + } + + .paymentDialogContent { + padding: 16px 25px; + background: #f6f6f6; + + .wea-search-group { + border: 1px solid #e5e5e5; + padding: 0; + border-bottom: none; + + .ant-row, .ant-col-24 { + padding: 0; + } + + .wea-form-item { + padding: 5px 16px; + background: #fff; + border-bottom: 1px solid #e5e5e5; + } + } + } + + .with-holding-pay-detail { + display: flex; + flex-direction: column; + padding: 16px; + + & > div { + line-height: 32px; + } + + .status { + height: 32px; + display: flex; + align-items: center; + justify-content: center; + color: #8ED36E; + } + + .line { + display: flex; + height: 32px; + align-items: center; + + .label { + width: 30%; + flex-grow: 0; + flex-shrink: 0; + } + + } + } +} diff --git a/pc4mobx/hrmSalary/pages/employeedeclare/index.js b/pc4mobx/hrmSalary/pages/employeedeclare/index.js new file mode 100644 index 00000000..deb90613 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/employeedeclare/index.js @@ -0,0 +1,111 @@ +/* + * Author: 黎永顺 + * name: 人员信息报送 + * Description: + * Date: 2023/7/24 + */ +import React, { Component } from "react"; +import { WeaInputSearch, WeaLocaleProvider, WeaTable, WeaTop } from "ecCom"; +import { Col, message, Row } from "antd"; +import { taxAgentDeclareList } from "../../apis/declare"; +import TipLabel from "../../components/TipLabel"; +import "./index.less"; + + +const { getLabel } = WeaLocaleProvider; + +class Index extends Component { + constructor(props) { + super(props); + this.state = { + dataSource: [], loading: false, taxAgentName: "", + pageInfo: { current: 1, pageSize: 10, total: 0 } + }; + } + + componentDidMount() { + this.taxAgentDeclareList(); + } + + taxAgentDeclareList = () => { + const { pageInfo, taxAgentName } = this.state; + const payload = { ...pageInfo, taxAgentName }; + this.setState({ loading: true }); + taxAgentDeclareList(payload).then(({ status, data, errormsg }) => { + this.setState({ loading: false }); + if (status) { + const { pageNum: current, pageSize, total, list: dataSource } = data; + this.setState({ + pageInfo: { ...pageInfo, current, pageSize, total }, + dataSource + }); + } else { + message.error(errormsg); + } + }).catch(() => this.setState({ loading: false })); + }; + + render() { + const { pageInfo, taxAgentName, dataSource } = this.state; + const tipList = [ + getLabel(544290, "1、点击查看详情,管理各个个税扣缴义务人的人员报送信息,如购买了在线报送服务,可在线报送,如未购买在线报送服务,也可导出数据线下报送。") + ]; + return ( + } + buttons={[ + this.setState({ taxAgentName: val })} + onSearch={this.taxAgentDeclareList} + /> + ]} + > +
+ + + ({getLabel(83110, "查看详情")}) + } + ]} + dataSource={dataSource} + pagination={{ + ...pageInfo, + showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`, + showQuickJumper: true, + showSizeChanger: true, + pageSizeOptions: ["10", "20", "50", "100"], + onShowSizeChange: (current, pageSize) => { + this.setState({ + pageInfo: { ...pageInfo, current, pageSize } + }, () => this.taxAgentDeclareList()); + }, + onChange: current => { + this.setState({ + pageInfo: { ...pageInfo, current } + }, () => this.taxAgentDeclareList()); + } + }} + /> + + + +
+
+ ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/employeedeclare/index.less b/pc4mobx/hrmSalary/pages/employeedeclare/index.less new file mode 100644 index 00000000..fb271337 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/employeedeclare/index.less @@ -0,0 +1,3 @@ +.declareTable { + background: #FFF; +} diff --git a/pc4mobx/hrmSalary/pages/employeedeclareDetail/components/baseInfo.js b/pc4mobx/hrmSalary/pages/employeedeclareDetail/components/baseInfo.js new file mode 100644 index 00000000..4496e505 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/employeedeclareDetail/components/baseInfo.js @@ -0,0 +1,79 @@ +/* + * Author: 黎永顺 + * name: 人员信息报送-基础信息 + * Description: + * Date: 2023/8/14 + */ +import React, { Component } from "react"; +import { WeaLocaleProvider } from "ecCom"; +import { getQueryString } from "../../../util/url"; +import EmployeeDeclareDetailCalcDialog from "./employeeDeclareDetailCalcDialog"; +import { getEmployeeDeclareInfo } from "../../../apis/declare"; + +const { getLabel } = WeaLocaleProvider; + +class BaseInfo extends Component { + constructor(props) { + super(props); + this.state = { + declareCalcDialog: { + visible: false, taxCycle: "" + }, + declareInfo: {} + }; + } + + /* + * Author: 黎永顺 + * Description: 人员报送-获取整体的报送情况 + * Params: + * Date: 2023/8/14 + */ + getEmployeeDeclareInfo = () => { + const payload = { + taxAgentId: getQueryString("id"), + taxCycle: this.props.taxCycle + }; + getEmployeeDeclareInfo(payload).then(({ status, data }) => { + if (status) this.setState({ declareInfo: data }); + }); + }; + handleOpenFailDialog = () => { + this.setState({ + declareCalcDialog: { + visible: true, taxCycle: this.props.taxCycle + } + }); + }; + + render() { + const { declareCalcDialog, declareInfo } = this.state; + const { declareFailSize, notDeclareSize } = declareInfo; + return ( +
+
+ {getLabel(537996, "个税扣缴义务人")}:{decodeURIComponent(getQueryString("taxName") || "")}
+
+
+ {getLabel(111, "报送失败")}:  {declareFailSize || 0} + {getLabel(111, "未报送")}:  {notDeclareSize || 0} +
+
+ {/*报送失败数据查看*/} + { + this.setState({ + declareCalcDialog: { + visible: false, taxCycle: "" + } + }); + }} + /> +
+ ); + } +} + +export default BaseInfo; diff --git a/pc4mobx/hrmSalary/pages/employeedeclareDetail/components/employeeDeclareDetailCalcDialog.js b/pc4mobx/hrmSalary/pages/employeedeclareDetail/components/employeeDeclareDetailCalcDialog.js new file mode 100644 index 00000000..9d6a18e8 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/employeedeclareDetail/components/employeeDeclareDetailCalcDialog.js @@ -0,0 +1,102 @@ +/* + * Author: 黎永顺 + * name: 报送信息-失败查看弹框 + * Description: + * Date: 2023/8/14 + */ +import React, { Component } from "react"; +import { WeaDialog, WeaLocaleProvider, WeaTable } from "ecCom"; +import { employeedeclareList4Fail } from "../../../apis/declare"; +import { Button, Col, Row } from "antd"; +import { getQueryString } from "../../../util/url"; + +const { getLabel } = WeaLocaleProvider; + +class EmployeeDeclareDetailCalcDialog extends Component { + constructor(props) { + super(props); + this.state = { + pageInfo: { current: 1, pageSize: 10, total: 0 }, + loading: false, columns: [], dataSource: [] + }; + } + + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.visible !== this.props.visible && nextProps.visible) this.employeedeclareList4Fail(nextProps); + } + + employeedeclareList4Fail = (props) => { + const { pageInfo } = this.state; + const payload = { + ...pageInfo, + taxAgentId: getQueryString("id"), + taxCycle: props.taxCycle + }; + this.setState({ loading: true }); + employeedeclareList4Fail(payload).then(({ status, data }) => { + this.setState({ loading: false }); + if (status) { + const { columns, list: dataSource, pageNum: current, pageSize, total } = data; + this.setState({ + columns, dataSource, + pageInfo: { ...pageInfo, current, pageSize, total } + }); + } + }).catch(() => this.setState({ loading: false })); + }; + + render() { + const { loading, columns, dataSource, pageInfo } = this.state; + const pagination = { + ...pageInfo, + showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`, + showQuickJumper: true, + showSizeChanger: true, + pageSizeOptions: ["10", "20", "50", "100"], + onShowSizeChange: (current, pageSize) => { + this.setState({ + pageInfo: { ...pageInfo, current, pageSize } + }, () => this.employeedeclareList4Fail(this.props)); + }, + onChange: current => { + this.setState({ + pageInfo: { ...pageInfo, current } + }, () => this.employeedeclareList4Fail(this.props)); + } + }; + return ( + + + {getLabel(111, "报送失败数据详情")} + + + {/**/} + +
)} + style={{ + width: 1150, + height: 606.6, + minHeight: 200, + minWidth: 380, + maxHeight: "90%", + maxWidth: "90%", + overflow: "hidden", + transform: "translate(0px, 0px)" + }} + > +
+ +
+ + ); + } +} + +export default EmployeeDeclareDetailCalcDialog; diff --git a/pc4mobx/hrmSalary/pages/employeedeclareDetail/components/employeeDeclareDetailSchemaEditDialog.js b/pc4mobx/hrmSalary/pages/employeedeclareDetail/components/employeeDeclareDetailSchemaEditDialog.js new file mode 100644 index 00000000..a76fecfa --- /dev/null +++ b/pc4mobx/hrmSalary/pages/employeedeclareDetail/components/employeeDeclareDetailSchemaEditDialog.js @@ -0,0 +1,267 @@ +/* + * Author: 黎永顺 + * name: 报送信息-编辑、新增弹框 + * Description: + * Date: 2023/8/14 + */ +import React, { Component } from "react"; +import { WeaLocaleProvider, WeaSlideModal } from "ecCom"; +import { Button, Col, message, Modal, Row } from "antd"; +import { inject, observer } from "mobx-react"; +import { declareConditions } from "../constants"; +import { getSearchs } from "../../../util"; +import { getQueryString } from "../../../util/url"; +import { employeedeclareGetForm, getEmployeeSave } from "../../../apis/declare"; + +const { getLabel } = WeaLocaleProvider; + +@inject("employeeDeclareStore") +@observer +class EmployeeDeclareDetailSchemaEditDialog extends Component { + constructor(props) { + super(props); + this.state = { + loading: false, + eConditions: [], + employeeInfo: {} + }; + this.employeeChangeInfo = {}; + } + + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.visible !== this.props.visible && nextProps.visible) this.employeedeclareGetForm(nextProps); + if (nextProps.visible !== this.props.visible && !nextProps.visible) this.employeeChangeInfo = {}; + } + + employeedeclareGetForm = (props) => { + employeedeclareGetForm(_.pick(props, ["id"])).then(({ status, data }) => { + if (status) { + this.setState({ + eConditions: _.map(declareConditions, it => { + return { + ...it, + items: _.map(it.items, child => { + if (child.domkey[0] === "employmentStatus") { + return { + ...child, + value: _.take(props.employmentStatusList)[0].enum, + options: _.map(props.employmentStatusList, it => ({ + key: it.enum, + showname: getLabel(it.labelId, it.defaultLabel) + })) + }; + } else if (child.domkey[0] === "employmentType") { + return { + ...child, + value: _.take(props.employmentTypeList)[0].enum, + options: _.map(props.employmentTypeList, it => ({ + key: it.enum, + showname: getLabel(it.labelId, it.defaultLabel) + })) + }; + } else if (child.domkey[0] === "gender") { + return { + ...child, + value: "MALE", + options: [ + { key: "MALE", showname: getLabel(111, "男") }, + { key: "FEMALE", showname: getLabel(111, "女") } + ] + }; + } else if (child.domkey[0] === "employeeType") { + return { + ...child, + viewAttr: props.id ? 1 : 3, + options: [ + { key: "ORGANIZATION", showname: getLabel(30042, "人员") } + ] + }; + } + if (child.conditionType === "SELECT" && child.domkey[0] !== "gender" && child.domkey[0] !== "employmentStatus" && child.domkey[0] !== "employmentType") { + return { + ...child, + options: [ + { key: "ON", showname: getLabel(538048, "是") }, + { key: "OFF", showname: getLabel(111, "否") } + ] + }; + } + return { ...child }; + }) + }; + }), + employeeInfo: data.data + }, () => { + const { data: result, columns } = data; + const { employeeDeclareStore: { declareForm } } = this.props; + declareForm.initFormFields(this.state.eConditions); + const filedKes = _.map(columns, it => it.dataIndex); + _.map(filedKes, item => { + if (item === "disability" || item === "lonelyOld" || item === "martyrDependents") { + declareForm.updateFields({ [item]: result[item] || "OFF" }); + } else if (item === "deductExpenses") { + declareForm.updateFields({ [item]: result[item] || "ON" }); + } else if (item === "gender") { + declareForm.updateFields({ [item]: result[item] || "MALE" }); + } else if (item === "employmentStatus") { + declareForm.updateFields({ [item]: result[item] || _.take(props.employmentStatusList)[0].enum }); + } else if (item === "employmentType") { + declareForm.updateFields({ [item]: result[item] || _.take(props.employmentTypeList)[0].enum }); + } else if (item === "cardType") { + declareForm.updateFields({ [item]: "居民身份证" }); + } else if (item === "employee") { + const [employeeData] = result[item] || []; + !_.isEmpty(employeeData) && declareForm.updateFields({ + employeeType: { + value: [employeeData._entityType, [employeeData.id, employeeData.name, [{ + id: employeeData.id, + lastname: employeeData.name + }]]], + valueSpan: ["employeeId"] + } + }); + } else { + declareForm.updateFields({ [item]: result[item] || "" }); + } + }); + }); + } + }); + }; + onChange = (res) => { + const { eConditions } = this.state; + const { employeeDeclareStore: { declareForm } } = this.props; + const key = Object.keys(res)[0]; + const value = res[key].value; + if (key === "employeeType") { + const [v1, v2] = value; + this.employeeChangeInfo = { + employee: [{ _entityType: v1, name: v2[1], id: v2[0] }] + }; + } + switch (key) { + case "employmentStatus": + this.setState({ + eConditions: _.map(eConditions, it => { + return { + ...it, + items: _.map(it.items, child => { + if (child.domkey[0] === "dismissDate") { + return { + ...child, + viewAttr: value === "ABNORMAL" ? 3 : 2 + }; + } + return { ...child }; + }) + }; + }) + }, () => { + declareForm.initFormFields(this.state.eConditions); + const [employeeData] = this.state.employeeInfo["employee"] || this.employeeChangeInfo["employee"] || []; + !_.isEmpty(employeeData) && declareForm.updateFields({ + employeeType: { + value: [employeeData._entityType, [employeeData.id, employeeData.name, [{ + id: employeeData.id, + lastname: employeeData.name + }]]], + valueSpan: ["employeeId"] + } + }); + }); + break; + case "employmentType": + this.setState({ + eConditions: _.map(eConditions, it => { + return { + ...it, + items: _.map(it.items, child => { + if (child.domkey[0] === "employmentDate") { + return { + ...child, + viewAttr: value !== "OTHER" ? 3 : 2 + }; + } + return { ...child }; + }) + }; + }) + }, () => { + declareForm.initFormFields(this.state.eConditions); + const [employeeData] = this.state.employeeInfo["employee"] || this.employeeChangeInfo["employee"] || []; + !_.isEmpty(employeeData) && declareForm.updateFields({ + employeeType: { + value: [employeeData._entityType, [employeeData.id, employeeData.name, [{ + id: employeeData.id, + lastname: employeeData.name + }]]], + valueSpan: ["employeeId"] + } + }); + }); + break; + default: + break; + } + }; + + handleSubmit = () => { + const { employeeDeclareStore: { declareForm: form } } = this.props; + form.validateForm().then(f => { + if (f.isValid) { + const { employmentType, employmentDate, employmentStatus, dismissDate, ...params } = form.getFormParams(); + if ((employmentType !== "OTHER" && !employmentDate) || (employmentStatus === "ABNORMAL" && !dismissDate)) { + Modal.warning({ + title: getLabel(131329, "信息确认"), + content: getLabel(518702, "必要信息不完整,红色*为必填项!") + }); + return; + } + const payload = { + ...form.getFormParams(), id: this.props.id, + cardType: "RESIDENT_IDENTITY_CARDS", //暂时写死身份证类型 + taxAgentId: getQueryString("id"), + taxCycle: this.props.taxCycle + }; + this.setState({ loading: true }); + getEmployeeSave(payload).then(({ status, errormsg }) => { + this.setState({ loading: false }); + if (status) { + message.success(getLabel(22619, "保存成功!")); + this.props.onClose("true"); + } else { + message.error(errormsg || getLabel(22620, "保存失败!")); + } + }).catch(() => this.setState({ loading: false })); + } else { + f.showErrors(); + } + }); + }; + + render() { + const { eConditions, loading } = this.state; + const { employeeDeclareStore: { declareForm: form }, title = "" } = this.props; + return ( + + +
+ {title || getLabel(111, "本月新增数据")} + + + + + )} + content={(
{getSearchs(form, eConditions, 1, false, this.onChange)}
)} + /> + ); + } +} + +export default EmployeeDeclareDetailSchemaEditDialog; diff --git a/pc4mobx/hrmSalary/pages/employeedeclareDetail/constants.js b/pc4mobx/hrmSalary/pages/employeedeclareDetail/constants.js new file mode 100644 index 00000000..e602f0e4 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/employeedeclareDetail/constants.js @@ -0,0 +1,434 @@ +export const submitStatus = [ + { + key: "ALL", + showname: "全部(报送状态)", + lanId: 111 + } +]; + + +export const advanceConditions = [ + { + items: [ + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["keyword"], + fieldcol: 18, + label: "姓名或工号", + lanId: 111, + labelcol: 6, + value: "" + }, + { + browserConditionParam: { + completeParams: {}, + conditionDataParams: {}, + dataParams: {}, + destDataParams: {}, + hasAddBtn: false, + hasAdvanceSerach: true, + idSeparator: ",", + isAutoComplete: 1, + isDetail: 0, + isMultCheckbox: false, + isSingle: false, + linkUrl: "", + pageSize: 10, + quickSearchName: "", + replaceDatas: [], + title: "", + type: "57" + }, + colSpan: 1, + conditionType: "BROWSER", + domkey: ["departmentIds"], + fieldcol: 18, + label: "部门", + lanId: 27511, + labelcol: 6 + }, + { + browserConditionParam: { + completeParams: {}, + conditionDataParams: {}, + dataParams: {}, + destDataParams: {}, + hasAddBtn: false, + hasAdvanceSerach: true, + idSeparator: ",", + isAutoComplete: 1, + isDetail: 0, + isMultCheckbox: false, + isSingle: false, + linkUrl: "", + pageSize: 10, + quickSearchName: "", + replaceDatas: [], + title: "", + type: "278" + }, + colSpan: 1, + conditionType: "BROWSER", + domkey: ["positionIds"], + fieldcol: 18, + label: "岗位", + lanId: 6086, + labelcol: 6 + }, + { + colSpan: 1, + conditionType: "SELECT", + domkey: ["employmentStatus"], + fieldcol: 18, + label: "人员状态", + lanId: 382300, + labelcol: 6, + value: "", + options: [] + }, + { + colSpan: 1, + conditionType: "SELECT", + domkey: ["employmentType"], + fieldcol: 18, + label: "任职受雇从业类型", + lanId: 111, + labelcol: 6, + value: "", + options: [] + }, + { + colSpan: 1, + conditionType: "RANGEPICKER", + domkey: ["fromEmploymentDate", "endEmploymentDate"], + fieldcol: 18, + label: "任职受雇日期", + lanId: 111, + labelcol: 6, + value: "" + }, + { + colSpan: 1, + conditionType: "RANGEPICKER", + domkey: ["fromDismissDate", "endDismissDate"], + fieldcol: 18, + label: "离职日期", + lanId: 111, + labelcol: 6, + value: "" + }, + { + colSpan: 1, + conditionType: "SELECT", + domkey: ["disability"], + fieldcol: 18, + label: "是否残疾", + lanId: 111, + labelcol: 6, + value: "", + options: [] + }, + { + colSpan: 1, + conditionType: "SELECT", + domkey: ["lonelyOld"], + fieldcol: 18, + label: "是否孤老", + lanId: 111, + labelcol: 6, + value: "", + options: [] + }, + { + colSpan: 1, + conditionType: "SELECT", + domkey: ["martyrDependents"], + fieldcol: 18, + label: "是否是烈属", + lanId: 111, + labelcol: 6, + value: "", + options: [] + }, + { + colSpan: 1, + conditionType: "SELECT", + domkey: ["deductExpenses"], + fieldcol: 18, + label: "是否扣除减除费用", + lanId: 111, + labelcol: 6, + value: "", + options: [] + } + ], + defaultshow: true + } +]; + +export const declareConditions = [ + { + items: [ + { + colSpan: 1, + fieldcol: 12, + labelcol: 6, + rules: "selectLinkageRequired", + conditionType: "SELECT_LINKAGE", + selectLinkageDatas: { + "ORGANIZATION": { + browserConditionParam: { + completeParams: {}, + conditionDataParams: {}, + dataParams: {}, + destDataParams: {}, + hasAddBtn: false, + hasAdvanceSerach: true, + idSeparator: ",", + isAutoComplete: 1, + isDetail: 0, + isMultCheckbox: false, + isSingle: true, + linkUrl: "", + pageSize: 10, + quickSearchName: "", + replaceDatas: [], + title: "", + type: "1" + }, + conditionType: "BROWSER", + domkey: ["employeeId"] + }, + "EXT_EMPLOYEE": { + conditionType: "BROWSER", + domkey: ["INPUT2"] + } + }, + options: [], + domkey: ["employeeType"], + label: "系统名称", + lanId: 111, + viewAttr: 3 + }, + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["employeeName"], + fieldcol: 12, + label: "证件姓名", + lanId: 111, + labelcol: 6, + value: "", + rules: "required", + viewAttr: 3 + }, + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["jobNum"], + fieldcol: 12, + label: "工号", + lanId: 1933, + labelcol: 6, + value: "", + viewAttr: 2 + }, + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["nationality"], + fieldcol: 12, + label: "国籍", + lanId: 111, + labelcol: 6, + value: "", + viewAttr: 1 + }, + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["cardType"], + fieldcol: 12, + label: "证件类型", + lanId: 111, + labelcol: 6, + value: "居民身份证", + viewAttr: 1 + }, + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["cardNum"], + fieldcol: 12, + label: "证件号码", + lanId: 1839, + labelcol: 6, + value: "", + rules: "required", + viewAttr: 3 + }, + { + colSpan: 1, + conditionType: "SELECT", + domkey: ["gender"], + fieldcol: 12, + label: "性别", + lanId: 111, + labelcol: 6, + value: "", + viewAttr: 3, + rules: "required", + options: [] + }, + { + colSpan: 1, + conditionType: "DATEPICKER", + domkey: ["birthday"], + fieldcol: 12, + label: "出生日期", + lanId: 111, + labelcol: 6, + rules: "required", + value: "", + viewAttr: 3 + }, + { + colSpan: 1, + conditionType: "SELECT", + domkey: ["employmentStatus"], + fieldcol: 12, + label: "状态", + lanId: 535101, + labelcol: 6, + value: "", + viewAttr: 3, + rules: "required", + detailtype: 3, + options: [] + }, + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["mobile"], + fieldcol: 12, + label: "手机号码", + lanId: 111, + labelcol: 6, + value: "", + rules: "required", + viewAttr: 3 + }, + { + colSpan: 1, + conditionType: "SELECT", + domkey: ["employmentType"], + fieldcol: 12, + label: "任职受雇从业类型", + lanId: 111, + labelcol: 6, + value: "", + viewAttr: 3, + rules: "required", + options: [] + }, + { + colSpan: 1, + conditionType: "DATEPICKER", + domkey: ["employmentDate"], + fieldcol: 12, + label: "任职受雇从业日期", + lanId: 111, + labelcol: 6, + value: "", + viewAttr: 3 + }, + { + colSpan: 1, + conditionType: "DATEPICKER", + domkey: ["dismissDate"], + fieldcol: 12, + label: "离职日期", + lanId: 111, + labelcol: 6, + value: "", + viewAttr: 2 + }, + { + colSpan: 1, + conditionType: "SELECT", + domkey: ["disability"], + fieldcol: 12, + label: "是否残疾", + lanId: 111, + labelcol: 6, + value: "", + viewAttr: 2, + detailtype: 3, + options: [] + }, + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["disabilityCardNo"], + fieldcol: 12, + label: "残疾证号", + lanId: 111, + labelcol: 6, + value: "", + viewAttr: 2 + }, + { + colSpan: 1, + conditionType: "SELECT", + domkey: ["lonelyOld"], + fieldcol: 12, + label: "是否孤老", + lanId: 111, + labelcol: 6, + value: "", + viewAttr: 2, + detailtype: 3, + options: [] + }, + { + colSpan: 1, + conditionType: "SELECT", + domkey: ["martyrDependents"], + fieldcol: 12, + label: "是否是烈属", + lanId: 111, + labelcol: 6, + value: "", + viewAttr: 2, + detailtype: 3, + options: [] + }, + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["martyrDependentsCardNo"], + fieldcol: 12, + label: "烈属证号", + lanId: 111, + labelcol: 6, + value: "", + viewAttr: 2 + }, + { + colSpan: 1, + conditionType: "SELECT", + domkey: ["deductExpenses"], + fieldcol: 12, + label: "是否扣除减除费用", + lanId: 111, + labelcol: 6, + value: "", + viewAttr: 2, + detailtype: 3, + options: [] + } + ], + defaultshow: true + } +]; diff --git a/pc4mobx/hrmSalary/pages/employeedeclareDetail/index.js b/pc4mobx/hrmSalary/pages/employeedeclareDetail/index.js new file mode 100644 index 00000000..7280fec4 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/employeedeclareDetail/index.js @@ -0,0 +1,528 @@ +/* + * Author: 黎永顺 + * name: 人员信息报送-查看详情 + * Description: + * Date: 2023/8/11 + */ +import React, { Component } from "react"; +import { WeaDatePicker, WeaLocaleProvider, WeaSelect, WeaTab, WeaTop } from "ecCom"; +import { Button, Dropdown, Menu, message, Modal, Spin } from "antd"; +import BaseInfo from "./components/baseInfo"; +import EmployeeDeclareDetailSchemaEditDialog from "./components/employeeDeclareDetailSchemaEditDialog"; +import { commonEnumList } from "../../apis/payrollFiles"; +import { + employeedeclareDeclare, + employeedeclareGetRate, + employeedeclareList, + employeedeclareList4Add, + employeedeclareList4Update, + employeedeclareRefresh, + employeeDelete, + getDeclareFeedback +} from "../../apis/declare"; +import { advanceConditions, submitStatus } from "./constants"; +import moment from "moment"; +import { getSearchs } from "../../util"; +import { inject, observer } from "mobx-react"; +import { toJS } from "mobx"; +import { getQueryString } from "../../util/url"; +import "./index.less"; + +const { getLabel } = WeaLocaleProvider; +const API = { + list: employeedeclareList, + list4Add: employeedeclareList4Add, + list4Update: employeedeclareList4Update +}; + +@inject("taxAgentStore", "employeeDeclareStore") +@observer +class Index extends Component { + constructor(props) { + super(props); + this.state = { + selectedKey: "list", showSearchAd: false, declareStatus: "ALL", + taxCycle: new Date(), loading: { query: false, refresh: false, feedback: false, declare: false }, + pageInfo: { current: 1, pageSize: 10, total: 0 }, + declareEditDialog: { visible: false, id: "", title: "" }, + declareStatusList: [], employmentStatusList: [], + employmentTypeList: [], adConditons: [], + selectedRowKeys: [] + }; + this.baseInfoRef = null; + this.timer = null; + } + + componentDidMount() { + document.title = getLabel(544289, "人员信息报送"); + window.addEventListener("message", this.handleReceive, false); + this.initEmployeeDeclare().then(r => { + }); + } + + initEmployeeDeclare = async () => { + const { employeeDeclareStore: { advanceForm } } = this.props; + const [declareStatusList, employmentStatusList, employmentTypeList] = await Promise.all([this.commonEnumList("DeclareStatusEnum"), this.commonEnumList("EmploymentStatusEnum"), this.commonEnumList("EmploymentTypeEnum")]); + if (declareStatusList.status && employmentStatusList.status && employmentTypeList.status) { + this.setState({ + declareStatusList: declareStatusList.data, + employmentStatusList: employmentStatusList.data, + employmentTypeList: employmentTypeList.data, + adConditons: _.map(advanceConditions, it => { + return { + ...it, + items: _.map(it.items, child => { + if (child.domkey[0] === "employmentStatus") { + return { + ...child, + options: _.map(employmentStatusList.data, it => ({ + key: it.enum, + showname: getLabel(it.labelId, it.defaultLabel) + })) + }; + } else if (child.domkey[0] === "employmentType") { + return { + ...child, + options: _.map(employmentTypeList.data, it => ({ + key: it.enum, + showname: getLabel(it.labelId, it.defaultLabel) + })) + }; + } + if (child.conditionType === "SELECT" && child.domkey[0] !== "employmentStatus" && child.domkey[0] !== "employmentType") { + return { + ...child, + options: [ + { key: "ON", showname: getLabel(538048, "是") }, + { key: "OFF", showname: getLabel(111, "否") } + ] + }; + } + return { ...child }; + }) + }; + }) + }, () => { + advanceForm.initFormFields(this.state.adConditons); + }); + } + }; + + componentWillUnmount() { + window.removeEventListener("message", this.handleReceive, false); + } + + handleReceive = ({ data }) => { + const { type, payload: { id, params } = {} } = data; + if (type === "init") { + this.queryEmployeeList(); + } else if (type === "turn") { + if (id === "PAGEINFO") { + const { pageNum: current, size: pageSize } = params; + this.setState({ pageInfo: { ...this.state.pageInfo, current, pageSize } }); + } else if (id === "EDIT") { + this.setState({ + declareEditDialog: { + ...this.state.declareEditDialog, + visible: true, id: params.id, title: params.employeeName + } + }); + } else if (id === "DELETE") { + this.handleDeleteDeclare([params.id]); + } else if (id === "ROWSELECT") { + const { selectedRowKeys } = params; + this.setState({ selectedRowKeys }); + } + } + }; + postMessageToChild = (payload = {}) => { + const i18n = { + "总计": getLabel(523, "总计"), "编辑": getLabel(501169, "编辑"), + "操作": getLabel(30585, "操作"), "删除": getLabel(535052, "删除"), + "共": getLabel(83698, "共"), "条": getLabel(18256, "条"), + "加载中": getLabel(83698, "加载中") + }; + const childFrameObj = document.getElementById("atdTable"); + childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*"); + }; + commonEnumList = (key) => { + const payload = { enumClass: `com.engine.salary.enums.employeedeclare.${key}` }; + return commonEnumList(payload); + }; + /* + * Author: 黎永顺 + * Description: 报送列表查询 + * Params: + * Date: 2023/8/14 + */ + queryEmployeeList = () => { + const { employeeDeclareStore: { advanceForm: form } } = this.props; + const { pageInfo, declareStatus, taxCycle, selectedKey, selectedRowKeys } = this.state; + const { departmentIds, positionIds, ...formParams } = form.getFormParams(); + const payload = { + ...formParams, ...pageInfo, + declareStatus, + taxAgentId: getQueryString("id"), + taxCycle: moment(taxCycle).startOf("month").format("YYYY-MM-DD"), + departmentIds: departmentIds ? departmentIds.split(",") : [], + positionIds: positionIds ? positionIds.split(",") : [] + }; + this.setState({ loading: { ...this.state.loading, query: true } }); + API[selectedKey](payload).then(({ status, data }) => { + this.setState({ loading: { ...this.state.loading, query: false } }); + if (status) { + const { pageInfo: result } = data; + const { columns, list: dataSource, pageNum: current, pageSize, total } = result; + this.baseInfoRef.getEmployeeDeclareInfo(); + this.setState({ + pageInfo: { ...pageInfo, current, pageSize, total } + }, () => { + const payload = { + dataSource, selectedRowKeys, selectedKey, + pageInfo: this.state.pageInfo, + columns: _.map(columns, it => { + if (it.dataIndex === "employeeName" || it.dataIndex === "subCompanyName") { + return { ...it, width: 150, fixed: "left" }; + } + if (it.dataIndex === "declareStatusDesc") { + return { ...it, width: 150, fixed: "right" }; + } + return { ...it, width: 150 }; + }) + }; + this.postMessageToChild(payload); + }); + } + }).then(() => this.setState({ loading: { ...this.state.loading, query: false } })); + }; + /* + * Author: 黎永顺 + * Description: 刷新数据 + * Params: + * Date: 2023/8/14 + */ + employeedeclareRefresh = () => { + const payload = { + taxAgentId: getQueryString("id"), + taxCycle: moment(this.state.taxCycle).startOf("month").format("YYYY-MM-DD") + }; + this.setState({ loading: { ...this.state.loading, refresh: true } }); + employeedeclareRefresh(payload).then(async ({ status, data, errormsg }) => { + if (status) { + message.destroy(); + message.loading(getLabel(111, "刷新中..."), 0); + this.timer = setInterval(async () => { + const { status: resStatus, data: result } = await employeedeclareGetRate({ index: data }); + const { status: rateStatus, finish, msg } = result; + if (resStatus && rateStatus) { + if (finish) { + this.setState({ loading: { ...this.state.loading, refresh: false } }); + clearInterval(this.timer); + message.destroy(); + message.success(getLabel(111, "刷新成功!")); + this.queryEmployeeList(); + } + } else { + this.setState({ loading: { ...this.state.loading, refresh: false } }); + clearInterval(this.timer); + message.destroy(); + message.warning(msg || getLabel(111, "刷新失败!")); + this.queryEmployeeList(); + } + }, 1000); + } else { + this.setState({ loading: { ...this.state.loading, refresh: false } }); + clearInterval(this.timer); + message.destroy(); + message.error(errormsg); + } + }).catch(() => { + clearInterval(this.timer); + message.destroy(); + this.setState({ loading: { ...this.state.loading, refresh: false } }); + }); + }; + /* + * Author: 黎永顺 + * Description:获取报送结果反馈 + * Params: + * Date: 2023/8/15 + */ + getDeclareFeedback = () => { + const payload = { + taxAgentId: getQueryString("id"), + taxCycle: moment(this.state.taxCycle).startOf("month").format("YYYY-MM-DD") + }; + this.setState({ loading: { ...this.state.loading, feedback: true } }); + getDeclareFeedback(payload).then(async ({ status, data, errormsg }) => { + if (status) { + message.destroy(); + message.loading(getLabel(111, "获取报送中..."), 0); + this.timer = setInterval(async () => { + const { status: resStatus, data: result } = await employeedeclareGetRate({ index: data }); + const { status: rateStatus, finish, msg } = result; + if (resStatus && rateStatus) { + if (finish) { + this.setState({ loading: { ...this.state.loading, feedback: false } }); + clearInterval(this.timer); + message.destroy(); + message.success(getLabel(111, "获取报送结果成功!")); + this.queryEmployeeList(); + } + } else { + this.setState({ loading: { ...this.state.loading, feedback: false } }); + clearInterval(this.timer); + message.destroy(); + message.warning(msg || getLabel(111, "获取失败!")); + this.queryEmployeeList(); + } + }, 1000); + } else { + this.setState({ loading: { ...this.state.loading, feedback: false } }); + clearInterval(this.timer); + message.destroy(); + message.error(errormsg); + } + }).catch(() => { + clearInterval(this.timer); + message.destroy(); + this.setState({ loading: { ...this.state.loading, feedback: false } }); + }); + }; + /* + * Author: 黎永顺 + * Description: 删除个税申报人员信息 + * Params: + * Date: 2023/8/15 + */ + handleDeleteDeclare = (paylaod) => { + const { selectedRowKeys } = this.state; + Modal.confirm({ + title: getLabel(131329, "信息确认"), + content: getLabel(543548, "确认删除吗?"), + onOk: () => { + employeeDelete(paylaod).then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(502230, "删除成功!")); + this.setState({ + selectedRowKeys: _.xorWith(selectedRowKeys, paylaod, _.isEqual) + }); + this.queryEmployeeList(); + } else { + message.error(errormsg || getLabel(20462, "删除失败!")); + } + }); + } + }); + }; + /* + * Author: 黎永顺 + * Description: 全部报送 + * Params: + * Date: 2023/8/15 + */ + employeedeclareDeclare = () => { + const payload = { + taxAgentId: getQueryString("id"), + taxCycle: moment(this.state.taxCycle).startOf("month").format("YYYY-MM-DD") + }; + this.setState({ loading: { ...this.state.loading, declare: true } }); + employeedeclareDeclare(payload).then(async ({ status, data, errormsg }) => { + if (status) { + message.destroy(); + message.loading(getLabel(111, "报送中..."), 0); + this.timer = setInterval(async () => { + const { status: resStatus, data: result } = await employeedeclareGetRate({ index: data }); + const { status: rateStatus, finish, msg } = result; + if (resStatus && rateStatus) { + if (finish) { + this.setState({ loading: { ...this.state.loading, declare: false } }); + clearInterval(this.timer); + message.destroy(); + message.success(getLabel(111, "全部报送成功!")); + this.queryEmployeeList(); + } + } else { + this.setState({ loading: { ...this.state.loading, declare: false } }); + clearInterval(this.timer); + message.destroy(); + message.warning(msg || getLabel(111, "报送失败!")); + this.queryEmployeeList(); + } + }, 1000); + } else { + this.setState({ loading: { ...this.state.loading, declare: false } }); + clearInterval(this.timer); + message.destroy(); + message.error(errormsg); + } + }).catch(() => { + clearInterval(this.timer); + message.destroy(); + this.setState({ loading: { ...this.state.loading, declare: false } }); + }); + }; + handleAdd = () => { + this.setState({ + declareEditDialog: { + ...this.state.declareEditDialog, + visible: true + } + }); + }; + handleMenuClick = ({ key }) => { + const { selectedRowKeys } = this.state; + switch (key) { + case "1": + if (_.isEmpty(selectedRowKeys)) { + message.warning(getLabel(111, "请先选择需要删除的人员!")); + return; + } + this.handleDeleteDeclare(selectedRowKeys); + break; + default: + break; + } + }; + + render() { + const { + selectedKey, showSearchAd, declareStatus, declareStatusList, taxCycle, declareEditDialog, loading, + pageInfo, adConditons, employmentTypeList, employmentStatusList + } = this.state; + const { taxAgentStore: { showOperateBtn }, employeeDeclareStore: { advanceForm: form, declareForm } } = this.props; + const menu = ( + + {getLabel(32136, "批量删除")} + {/*{getLabel(111, "批量编辑")}*/} + {/*{getLabel(81272, "导出全部")}*/} + {/*{getLabel(543715, "导出所选")}*/} + + ); + const buttons = [ + this.setState({ + taxCycle: val, + pageInfo: { + ...pageInfo, + current: 1 + } + }, () => this.queryEmployeeList())}/>, + , + , + , + +