Merge branch 'release/2.19.1.2503.01-业务线个税' into custom/杭州钱塘新区建设投资集团有限公司(0401个税)
This commit is contained in:
commit
232c5923e8
|
|
@ -290,5 +290,23 @@ export const getCompareSobConfig = params => {
|
|||
export const updateSobConfig = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryacct/updateSobConfig", "GET", params);
|
||||
};
|
||||
|
||||
|
||||
//薪资核算-计算个税
|
||||
export const acctresultCalcTax = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/calcTax", params);
|
||||
};
|
||||
//薪资核算-获取个税计算反馈
|
||||
export const calcTaxFeedback = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/calcTaxFeedback", params);
|
||||
};
|
||||
//薪资核算-人员异常
|
||||
export const listPage4NotDeclare = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctemployee/listPage4NotDeclare", params);
|
||||
};
|
||||
// 核算结果--核算税后工资
|
||||
export const afterTaxAccounting = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/afterTaxAccounting", params);
|
||||
};
|
||||
// 核算税后工资进度条
|
||||
export const getAfterTaxAccountingProgress = (id) => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/progress/getRate?cacheKey=AFTER_TAX_ACCT_PROGRESS_" + id, "get", {});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -95,3 +95,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());
|
||||
};
|
||||
|
|
|
|||
|
|
@ -80,3 +80,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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,19 +1,28 @@
|
|||
import { WeaTools } from "ecCom";
|
||||
import { postFetch } from "../util/request";
|
||||
import { postExportFetch, postFetch } from "../util/request";
|
||||
import { convertToUrlString } from "../util/url";
|
||||
|
||||
//个税申报表-个税申报表列表
|
||||
export const getDeclareList = params => {
|
||||
return postFetch("/api/bs/hrmsalary/taxdeclaration/list", params);
|
||||
};
|
||||
//个税申报表-个税申报表表单
|
||||
export const getDeclareForm = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/taxdeclaration/getForm", "get", params);
|
||||
};
|
||||
|
||||
//个税申报表-个税申报表生成
|
||||
export const saveDeclare = params => {
|
||||
return postFetch("/api/bs/hrmsalary/taxdeclaration/save", params);
|
||||
};
|
||||
|
||||
//个税申报表-获取分类
|
||||
export const getTaxReports = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/taxdeclaration/getTaxReports", "get", params);
|
||||
};
|
||||
//个税申报表-个税申报表相关信息
|
||||
export const getDeclareInfo = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/taxdeclaration/getTaxDeclarationInfo", "get", params);
|
||||
return postFetch("/api/bs/hrmsalary/taxdeclaration/getTaxDeclarationInfo", params);
|
||||
};
|
||||
|
||||
// 个税申报表详情列表
|
||||
|
|
@ -37,5 +46,265 @@ export const exportSalaryArchive = (id = "") => {
|
|||
export const 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 employeeInvalid = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/employeedeclare/invalid", params);
|
||||
};
|
||||
|
||||
//人员报送-全部报送
|
||||
export const employeedeclareDeclare = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/employeedeclare/declare", params);
|
||||
};
|
||||
|
||||
//个税在线对接-获取个税申报记录下的个税申报表TAB
|
||||
export const getTaxDeclarationTab = params => {
|
||||
return postFetch("/api/bs/hrmsalary/taxdeclaration/getTaxDeclarationTab", 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);
|
||||
};
|
||||
export const employeedeclareExport = params => {
|
||||
return postExportFetch("/api/bs/hrmsalary/employeedeclare/export", params);
|
||||
};
|
||||
//个税申报表申报数据-获取表单
|
||||
export const getTaxDecForm = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/taxdeclaration/getAddForm", params);
|
||||
};
|
||||
//个税申报表申报数据-新增
|
||||
export const taxdeclarationAdd = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/taxdeclaration/add", params);
|
||||
};
|
||||
//个税申报表申报数据-编辑
|
||||
export const taxdeclarationEdit = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/taxdeclaration/edit", params);
|
||||
};
|
||||
//个税申报表申报数据-详情
|
||||
export const getTaxdeclarationDetailInfo = (params) => {
|
||||
return fetch(`/api/bs/hrmsalary/taxdeclaration/detailInfo?${convertToUrlString(params)}`, {
|
||||
method: "GET",
|
||||
mode: "cors"
|
||||
}).then((res) => res.json());
|
||||
};
|
||||
//个税申报表申报数据-下载模板
|
||||
export const taxdeclarationExportTemplate = params => {
|
||||
return postExportFetch("/api/bs/hrmsalary/taxdeclaration/downloadTemplate", params);
|
||||
};
|
||||
//人员信息报送-下载人员信息报送导入模板
|
||||
export const employeedeclareExportTemplate = params => {
|
||||
return postExportFetch("/api/bs/hrmsalary/employeedeclare/exportTemplate", params);
|
||||
};
|
||||
//个税申报表申报数据-下载申报内置算税结果
|
||||
export const exportGetDeclareTaxResultFeedback = params => {
|
||||
return postExportFetch("/api/bs/hrmsalary/taxdeclaration/exportGetDeclareTaxResultFeedback", params);
|
||||
};
|
||||
//个税申报表申报数据-数据导入
|
||||
export const taxdeclarationImportData = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/taxdeclaration/importData", params);
|
||||
};
|
||||
//人员信息报送-人员信息报送导入
|
||||
export const employeedeclareImportData = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/employeedeclare/importData", params);
|
||||
};
|
||||
//个税申报表-新增申报表Tab
|
||||
export const addTaxDeclaration = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/taxdeclaration/addTaxDeclaration", params);
|
||||
};
|
||||
//个税申报表-删除申报表Tab
|
||||
export const deleteTaxDeclaration = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/taxdeclaration/deleteTaxDeclaration", params);
|
||||
};
|
||||
//个税申报表-删除申报表
|
||||
export const deleteInfo = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/taxdeclaration/deleteInfo", params);
|
||||
};
|
||||
//个税申报表-对比申报结果
|
||||
export const getTaxdeclarationContrastList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/taxdeclaration/contrast", params);
|
||||
};
|
||||
export const exportContrast = params => {
|
||||
return postExportFetch("/api/bs/hrmsalary/taxdeclaration/exportContrast", params);
|
||||
};
|
||||
|
||||
//扣除名单确认-人员列表
|
||||
export const getDeductionAmountList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/deductionAmount/list", params);
|
||||
};
|
||||
//扣除名单确认-增加人员
|
||||
export const addDeductionAmount = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/deductionAmount/add", params);
|
||||
};
|
||||
//扣除名单确认-删除人员
|
||||
export const deleteDeductionAmount = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/deductionAmount/delete", params);
|
||||
};
|
||||
//扣除名单确认-编辑人员
|
||||
export const editDeductionAmount = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/deductionAmount/edit", params);
|
||||
};
|
||||
//扣除名单确认-确认人员
|
||||
export const confirmDeductionAmount = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/deductionAmount/confirm", params);
|
||||
};
|
||||
//扣除名单确认-反馈人员
|
||||
export const feedbackDeductionAmount = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/deductionAmount/feedback", params);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -43,3 +43,8 @@ export const getSalarysobListAll = params => {
|
|||
export const supplementAcctRecord = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/supplementAcctRecord", params);
|
||||
};
|
||||
|
||||
// 薪资账套-浏览按钮数据
|
||||
export const commonBrowserData = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/common/browser/data", params);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
};
|
||||
|
|
@ -25,6 +25,10 @@ export const deleteLedger = params => {
|
|||
export const getLedgerBasicForm = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salarysob/basic/getForm", "get", params);
|
||||
};
|
||||
//薪资帐套基本信息工资类型接口
|
||||
export const getIncomeCategoryList = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salarysob/incomeCategoryList", "get", params);
|
||||
};
|
||||
|
||||
//保存薪资帐套基本信息
|
||||
export const saveLedgerBasic = params => {
|
||||
|
|
@ -143,6 +147,30 @@ 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 taxruleGetForm = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salarysob/taxrule/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 taxruleSave = params => {
|
||||
return postFetch("/api/bs/hrmsalary/salarysob/taxrule/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);
|
||||
|
|
@ -155,6 +183,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);
|
||||
|
|
@ -171,3 +203,7 @@ export const salaryApprovalSaveForm = params => {
|
|||
export const getListSalaryItem = params => {
|
||||
return postFetch("/api/bs/hrmsalary/salarysob/salaryApproval/listSalaryItem", params);
|
||||
};
|
||||
//薪资账套-获取薪资账套中拓扑图数据
|
||||
export const getSalaryItemTopology = params => {
|
||||
return postFetch("/api/bs/hrmsalary/salarysob/item/topology", params);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ export const recessionListSum = (params) => {
|
|||
return postFetch("/api/bs/hrmsalary/siaccount/detail/recession/list/sum", params);
|
||||
};
|
||||
//查询补差列表
|
||||
export const balanceList = (params) => {
|
||||
export const balanceList = (params, ids) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/detail/balance/list", params);
|
||||
};
|
||||
//查询补差列表合计行
|
||||
|
|
|
|||
|
|
@ -102,6 +102,23 @@ export const getTaxAgentSelectListAsAdmin = (params) => {
|
|||
export const hasIconInTax = (params) => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/sys/conf/code?code=hideIconInTax", "GET", 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);
|
||||
};
|
||||
//个税信息-部门备案报税信息保存
|
||||
export const saveDepartmentCodeAndCheck = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/taxAgent/taxReturn/departmentCode/check", params);
|
||||
};
|
||||
//个税信息-提交报税信息
|
||||
export const registrationCheck = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/taxAgent/taxReturn/registration/check", params);
|
||||
};
|
||||
|
||||
/**权限-角色相关*/
|
||||
//同步业务线
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 6.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.5 KiB |
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -124,10 +124,10 @@ class CodeAction extends Component {
|
|||
<div className="excel-codeAction">
|
||||
<div className="excel-codeAction-item">
|
||||
<div className="excel-codeAction-header">
|
||||
<div className="excel-codeAction-header-title">{getLabel(111, "变量")}</div>
|
||||
<div className="excel-codeAction-header-title">{getLabel(33748, "变量")}</div>
|
||||
</div>
|
||||
<div className="excel-codeAction-content">
|
||||
<WeaInputSearch value={variableText} placeholder={getLabel(111, "请输入变量名称")}
|
||||
<WeaInputSearch value={variableText} placeholder={getLabel(125864, "请输入变量名称")}
|
||||
className="variableOuterInput"
|
||||
onChange={variableText => this.setState({ variableText })}/>
|
||||
<Tree className="variableTree" showLine expandedKeys={variableExpandedKeys}
|
||||
|
|
@ -147,7 +147,7 @@ class CodeAction extends Component {
|
|||
title={
|
||||
<WeaInputSearch
|
||||
value={variItemText}
|
||||
placeholder={getLabel(111, "请输入变量名称")}
|
||||
placeholder={getLabel(125864, "请输入变量名称")}
|
||||
onChange={variItemText => this.setState({ variItemText })}
|
||||
/>
|
||||
}
|
||||
|
|
@ -177,10 +177,10 @@ class CodeAction extends Component {
|
|||
<React.Fragment>
|
||||
<div className="excel-codeAction-item">
|
||||
<div className="excel-codeAction-header">
|
||||
<div className="excel-codeAction-header-title">{getLabel(111, "函数")}</div>
|
||||
<div className="excel-codeAction-header-title">{getLabel(30686, "函数")}</div>
|
||||
</div>
|
||||
<div className="excel-codeAction-content">
|
||||
<WeaInputSearch value={funcText} placeholder={getLabel(111, "请输入函数名称")}
|
||||
<WeaInputSearch value={funcText} placeholder={getLabel(543713, "请输入函数名称")}
|
||||
className="variableOuterInput"
|
||||
onChange={funcText => this.setState({ funcText })}/>
|
||||
<Tree className="variableTree" showLine expandedKeys={funcExpandedKeys}
|
||||
|
|
@ -218,7 +218,7 @@ class CodeAction extends Component {
|
|||
<div className="excel-codeAction-item">
|
||||
<div className="excel-codeAction-header">
|
||||
<div className="excel-codeAction-header-title">
|
||||
{!_.isEmpty(funcHoverItem) ? funcHoverItem.name : getLabel(111, "提示")}
|
||||
{!_.isEmpty(funcHoverItem) ? funcHoverItem.name : getLabel(558, "提示")}
|
||||
</div>
|
||||
</div>
|
||||
<div className="excel-codeAction-content"><TipList tips={funcHoverItem}/></div>
|
||||
|
|
@ -243,12 +243,12 @@ const TipList = (props) => {
|
|||
</div>
|
||||
</div> : <div className="code-action-list">
|
||||
<div className="code-action-tips">
|
||||
<div className="code-action-tips-title">{getLabel(111, "语法")}</div>
|
||||
<div className="code-action-tips-title">{getLabel(543403, "语法")}</div>
|
||||
<div className="code-action-tips-info">
|
||||
<div>{formatString}</div>
|
||||
<div>{description}</div>
|
||||
</div>
|
||||
<div className="code-action-tips-title">{getLabel(111, "参数")}</div>
|
||||
<div className="code-action-tips-title">{getLabel(561, "参数")}</div>
|
||||
{
|
||||
_.map(paramDescs, it => {
|
||||
return <div className="code-action-tips-info">
|
||||
|
|
@ -257,9 +257,9 @@ const TipList = (props) => {
|
|||
</div>;
|
||||
})
|
||||
}
|
||||
<div className="code-action-tips-title">{getLabel(111, "示例")}</div>
|
||||
<div className="code-action-tips-title">{getLabel(82159, "示例")}</div>
|
||||
<span className="code-action-tips-info">{example}</span>
|
||||
<div className="code-action-tips-title">{getLabel(111, "结果")}</div>
|
||||
<div className="code-action-tips-title">{getLabel(356, "结果")}</div>
|
||||
<span className="code-action-tips-info">{result}</span>
|
||||
</div>
|
||||
</div>;
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ class ExcelEditor extends Component {
|
|||
</div>
|
||||
<Button type="ghost"
|
||||
onClick={() => this.setState({ isFormter: !isFormter }, () => this.autoFormatSelection())}>
|
||||
{!isFormter ? getLabel(111, "格式美化") : getLabel(111, "格式还原")}
|
||||
{!isFormter ? getLabel(543711, "格式美化") : getLabel(543712, "格式还原")}
|
||||
</Button>
|
||||
</div>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,12 @@ class Index extends Component {
|
|||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||
this.setState({ targetIds: "", targetNames: "" });
|
||||
}
|
||||
}
|
||||
|
||||
handleExternalPersonSave = () => {
|
||||
const { targetIds } = this.state;
|
||||
const { onExternalPersonSave } = this.props;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
import { Icon, message, Upload } from "antd";
|
||||
import { Icon, Upload, message } from "antd";
|
||||
|
||||
const Dragger = Upload.Dragger;
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ class Index extends Component {
|
|||
onOk: () => this.setState({ current: this.state.current - 1 }, () => this.props.onResetImportResult())
|
||||
});
|
||||
};
|
||||
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 下一步
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
export const PAGE = {
|
||||
"salaryArchive": ["/hrmSalary/salaryFile"], //薪资档案
|
||||
"salarySob": ["/hrmSalary/ledger"], //薪资账套
|
||||
"salaryAcct": ["/hrmSalary/calculate", "/hrmSalary/calcView"], //薪资核算
|
||||
"salarySob": ["/hrmSalary/ledger", "/hrmSalary/ledger/topologyView/"], //薪资账套
|
||||
"salaryAcct": ["/hrmSalary/calculate", "/hrmSalary/calcView", "/hrmSalary/topologyView"], //薪资核算
|
||||
"salaryBill": ["/hrmSalary/payroll", "/hrmSalary/payrollGrant", "/hrmSalary/payrollDetail"], //工资单
|
||||
"taxDeclaration": ["/hrmSalary/declare", "/hrmSalary/generateDeclarationDetail"], //个税
|
||||
"addUpDeduction": ["/dataAcquisition/cumDeduct"], //累计专项附加扣除
|
||||
|
|
@ -20,6 +20,7 @@ export const PAGE = {
|
|||
"siScheme": ["/socialSecurityBenefits/programme"], //社保福利方案
|
||||
"report": ["/hrmSalary/analysisOfSalaryStatistics", "/hrmSalary/reportView"], //报表
|
||||
"dataPush": ["/hrmSalary/datapush"], //数据推送
|
||||
"adjustRecord": ["/hrmSalary/adjustSalaryManage"] //调薪管理
|
||||
"adjustRecord": ["/hrmSalary/adjustSalaryManage"], //调薪管理
|
||||
"employeeDeclare": ["/hrmSalary/employeedeclare"] //个税-人员信息报送给
|
||||
};
|
||||
export const EXCLUDE_PAGE = ["mobilepayroll"];
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import SalaryAdjustmentRecords from "./pages/salaryAdjustmentRecords";
|
|||
import MySalaryMobile from "./pages/mySalaryMobile";
|
||||
import MySalary from "./pages/mySalaryBenefits";
|
||||
import Programme from "./pages/socialSecurityBenefits/welfarePlan";
|
||||
// import Archivess from "./pages/socialSecurityBenefits/archives";
|
||||
import Archives from "./pages/socialSecurityBenefits/welfareArchive"; //社保福利档案重构页面
|
||||
import StandingBook from "./pages/socialSecurityBenefits/standingBook/standingBook"; //社保福利台账重构页面
|
||||
import StandingBookDetail from "./pages/socialSecurityBenefits/standingBookDetail";
|
||||
|
|
@ -19,15 +18,19 @@ import CumSituation from "./pages/dataAcquisition/cumSituation";
|
|||
import Attendance from "./pages/dataAcquisition/attendance";
|
||||
import SpecialAddDeduction from "./pages/dataAcquisition/specialAddDeduction";
|
||||
import Ledger from "./pages/ledgerPage";
|
||||
// import Calculate from "./pages/calculate";
|
||||
import Calculate from "./pages/calculate/calculate"; //重构的薪资核算页面
|
||||
// import Payroll from "./pages/payroll";
|
||||
import Payroll from "./pages/payrollRelease"; //重构的工资单发放页面
|
||||
import PayrollGrant from "./pages/payroll/payrollGrant";
|
||||
import PayrollDetail from "./pages/payroll/payrollDetail/payrollDetail";
|
||||
// import Declare from "./pages/declare";
|
||||
import DeclareDetail from "./pages/declareDetail";
|
||||
import DeclareOnlineComparison from "./pages/declareOnlineComparison";
|
||||
import Employeedeclare from "./pages/employeedeclare";
|
||||
import EnterprisePayCertificationDetail from "./pages/enterprisePayCertificationDetail";
|
||||
import BankVoucherDetail from "./pages/bankVoucherDetail";
|
||||
import EmployeedeclareDetail from "./pages/employeedeclareDetail";
|
||||
import Declare from "./pages/declare/declare"; //重构的个税申报表
|
||||
import TaxRate from "./pages/taxRate";
|
||||
import TaxAgents from "./pages/taxAgent";
|
||||
import TaxAgent from "./pages/salary/taxAgent";
|
||||
import CalculateDetail from "./pages/calculateDetail";
|
||||
import PlaceOnFileDetail from "./pages/calculateDetail/placeOnFileDetail";
|
||||
|
|
@ -49,6 +52,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 AdjustSalaryManage from "./pages/adjustSalaryManage";
|
||||
import TopologyMap from "./pages/topologyMap";
|
||||
|
|
@ -92,6 +96,7 @@ const Routes = (
|
|||
<Route key="specialAddDeduction" path="specialAddDeduction" component={SpecialAddDeduction}/>
|
||||
</Route>
|
||||
<Route key="ledger" path="ledger" component={Ledger}/>
|
||||
<Route key="topologyView" path="ledger/topologyView/:salarySobId/:salaryItemId" component={TopologyMap}/>
|
||||
<Route key="calculate" path="calculate" component={Calculate}/>
|
||||
<Route key="calculateDetail" path="calculateDetail" component={CalculateDetail}/>
|
||||
<Route key="doCalc" path="calculate/:salaryAcctRecordId" component={DoCalcDetail}/>
|
||||
|
|
@ -106,9 +111,17 @@ const Routes = (
|
|||
<Route key="templatePreview" path="templatePreview" component={TemplatePreview}/>
|
||||
<Route key="payrollinfo" path="payrollinfo" component={PayrollTemplatePreview}/>
|
||||
<Route key="declare" path="declare" component={Declare}/>
|
||||
<Route key="declareDetail" path="declareDetail" component={DeclareDetail}/>
|
||||
<Route key="declareOnlineComparison" path="declareDetail/:taxDeclarationId" component={DeclareOnlineComparison}/>
|
||||
<Route key="employeedeclare" path="employeedeclare" component={Employeedeclare}/>
|
||||
<Route key="enterprisePayCertificationDetail" path="enterprisePayCertificationDetail"
|
||||
component={EnterprisePayCertificationDetail}/>
|
||||
<Route key="bankVoucherDetail" path="bankVoucherDetail" component={BankVoucherDetail}/>
|
||||
<Route key="employeedeclareDetail" path="employeedeclareDetail" component={EmployeedeclareDetail}/>
|
||||
<Route key="generateDeclarationDetail" path="generateDeclarationDetail" component={GenerateDeclarationDetail}/>
|
||||
<Route key="taxRate" path="taxRate" component={TaxRate}/>
|
||||
<Route key="taxAgent" path="taxAgent" component={TaxAgent}/>
|
||||
<Route key="taxAgents" path="taxAgents" component={TaxAgents}/>
|
||||
<Route key="mobilepayroll" path="mobilepayroll" component={MobilePayroll}/>
|
||||
<Route key="sysconfig" path="sysconfig" component={SysConfig}/>
|
||||
<Route key="sysconfig-1" path="sysconfig-1" component={RuleConfig}/>
|
||||
|
|
@ -119,6 +132,8 @@ const Routes = (
|
|||
<Route key="analysisOfSalaryStatisticsId" path="analysisOfSalaryStatistics/:employeeId" component={EmployeeList}/>
|
||||
<Route key="datapush" path="datapush" component={Datapush}/>
|
||||
<Route key="reportView" path="reportView" component={ReportView}/>
|
||||
<Route key="intelligentCalculateSalarySettings" path="intelligentCalculateSalarySettings"
|
||||
component={IntelligentCalculateSalarySettings}/>
|
||||
<Route key="externalPersonManage" path="externalPersonManage" component={ExternalPersonManage}/>
|
||||
<Route key="topologyView" path="topologyView/:salarySobId/:salaryItemId" component={TopologyMap}/>
|
||||
<Route key="supplementaryCalc" path="supplementaryCalc" component={SupplementaryCalc}/>
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
@ -37,7 +37,7 @@ export const condition = [
|
|||
conditionType: "INPUT",
|
||||
domkey: ["dimName"],
|
||||
fieldcol: 14,
|
||||
label: getLabel(111, "统计维度名称"),
|
||||
label: getLabel(543321, "统计维度名称"),
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
|
|
@ -48,7 +48,7 @@ export const condition = [
|
|||
conditionType: "SELECT",
|
||||
domkey: ["dimCode"],
|
||||
fieldcol: 14,
|
||||
label: getLabel(111, "分组所属字段"),
|
||||
label: getLabel(543322, "分组所属字段"),
|
||||
labelcol: 6,
|
||||
options: [],
|
||||
viewAttr: 2,
|
||||
|
|
@ -59,13 +59,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
|
||||
}
|
||||
];
|
||||
|
|
@ -77,7 +77,7 @@ export const reportCondition = [
|
|||
conditionType: "INPUT",
|
||||
domkey: ["reportName"],
|
||||
fieldcol: 14,
|
||||
label: getLabel(111, "报表名称"),
|
||||
label: getLabel(15517, "报表名称"),
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
|
|
@ -88,7 +88,7 @@ export const reportCondition = [
|
|||
conditionType: "SELECT",
|
||||
domkey: ["dimensionIds"],
|
||||
fieldcol: 14,
|
||||
label: getLabel(111, "统计维度"),
|
||||
label: getLabel(506800, "统计维度"),
|
||||
labelcol: 6,
|
||||
options: [],
|
||||
rules: "required|string",
|
||||
|
|
|
|||
|
|
@ -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={
|
||||
<div className="dimensionTitle">
|
||||
<span>{formId ? getLabel(111, "编辑统计维度") : getLabel(111, "新建统计维度")}</span>
|
||||
<Button type="primary" onClick={this.handleSave} loading={loading}>{getLabel(111, "保存")}</Button>
|
||||
<span>{formId ? getLabel(543407, "编辑统计维度") : getLabel(543314, "新建统计维度")}</span>
|
||||
<Button type="primary" onClick={this.handleSave} loading={loading}>{getLabel(537558, "保存")}</Button>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
{getSearchs(form, condition, 1, false, this.formItemChange)}
|
||||
{
|
||||
dimType !== "QUALITATIVE" &&
|
||||
<WeaSearchGroup title={getLabel(111, "分组设置")} showGroup>
|
||||
<WeaSearchGroup title={getLabel(34105, "分组设置")} showGroup>
|
||||
{
|
||||
dimType === "RATION_GROUP_SPACING" &&
|
||||
<GroupSpacingEditTable onChange={this.handleConvertGroupDatasource}
|
||||
|
|
|
|||
|
|
@ -47,15 +47,15 @@ class DimensionTable extends Component {
|
|||
};
|
||||
dimensionDelete = (payload) => {
|
||||
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 (
|
||||
<span className="space10">
|
||||
{
|
||||
record.canEdit &&
|
||||
<a href="javascript: void(0);" onClick={() => onEdit(record.id)}>{getLabel(111, "编辑")}</a>
|
||||
<a href="javascript: void(0);" onClick={() => onEdit(record.id)}>{getLabel(501169, "编辑")}</a>
|
||||
}
|
||||
{
|
||||
record.canDelete &&
|
||||
<a href="javascript: void(0);"
|
||||
onClick={() => this.dimensionDelete([record.id])}>{getLabel(111, "删除")}</a>
|
||||
onClick={() => this.dimensionDelete([record.id])}>{getLabel(535052, "删除")}</a>
|
||||
}
|
||||
{
|
||||
record.dimName === getLabel(30042, "人员") && record.dimType === getLabel(111, "定性") &&
|
||||
|
|
|
|||
|
|
@ -81,7 +81,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"],
|
||||
|
|
|
|||
|
|
@ -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: [
|
||||
|
|
|
|||
|
|
@ -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 (
|
||||
<WeaTableEdit
|
||||
draggable={true} deleteConfirm columns={columns}
|
||||
datas={_.map(dataSource, item => ({ ...item, to: getLabel(111, "至") }))}
|
||||
datas={_.map(dataSource, item => ({ ...item, to: getLabel(15322, "至") }))}
|
||||
showCopy={false} onChange={this.handleChangeTableData}
|
||||
/>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -49,16 +49,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, "删除失败"));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -97,7 +97,7 @@ class ReportList extends Component {
|
|||
<div className="cardCenter">
|
||||
<span className="reportName">{reportName}</span>
|
||||
<div className="dimension">
|
||||
<div className="label">{getLabel(111, "统计维度")}:</div>
|
||||
<div className="label">{getLabel(506800, "统计维度")}:</div>
|
||||
<div className="value">{dimension}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -106,9 +106,9 @@ class ReportList extends Component {
|
|||
!isShare &&
|
||||
<Dropdown overlay={
|
||||
<Menu onClick={e => this.handleOptsClick(e, id, dimensionId)}>
|
||||
<Menu.Item key="edit">{getLabel(111, "编辑")}</Menu.Item>
|
||||
<Menu.Item key="edit">{getLabel(501169, "编辑")}</Menu.Item>
|
||||
<Menu.Item key="copy">{getLabel(77, "复制")}</Menu.Item>
|
||||
<Menu.Item key="delete">{getLabel(111, "删除")}</Menu.Item>
|
||||
<Menu.Item key="delete">{getLabel(535052, "删除")}</Menu.Item>
|
||||
<Menu.Item key="log">{getLabel(545781, "操作日志")}</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
|
|
|
|||
|
|
@ -39,15 +39,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, "必要信息不完整,红色*为必填项!")
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 <div className="loading-layout">
|
||||
<Spin spinning={loading}/>
|
||||
</div>;
|
||||
}
|
||||
return (
|
||||
<div className="printBankLayout">
|
||||
<div className="print-bank-voucher-container">
|
||||
<div id="header_print_btn">
|
||||
<Button type="primary" onClick={this.print}>{getLabel(111, "打印")}</Button>
|
||||
</div>
|
||||
<div className="content">
|
||||
<div id="bank_voucher_detail_area" style={{
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
width: "1000px"
|
||||
}}>
|
||||
<div style={{
|
||||
"height": " calc(36 * 1px)",
|
||||
"fontSize": "calc(20 * 1px)",
|
||||
"textAlign": "center",
|
||||
"lineHeight": " calc(32 * 1px)",
|
||||
"fontWeight": "900"
|
||||
}}>{getLabel(111, "银行端查询缴税凭证")}</div>
|
||||
<div style={{
|
||||
height: "calc(28 * 1px)",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-between"
|
||||
}}>
|
||||
<div style={{ display: "flex" }}>
|
||||
<div className="label">{getLabel(111, "银行端查询缴税凭证号:")}</div>
|
||||
<div className="value">{bankVoucherDetail.voucherNo || ""}</div>
|
||||
</div>
|
||||
<div className="time">{bankVoucherDetail.firstPrintDate}</div>
|
||||
</div>
|
||||
|
||||
<div style={{
|
||||
borderLeft: "calc(2 * 1px) solid #999",
|
||||
borderRight: "calc(2 * 1px) solid #999"
|
||||
}}>
|
||||
<div style={{
|
||||
width: "100%",
|
||||
minHeight: "calc(50 * 1px)",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
flexGrow: "0",
|
||||
flexShrink: "0",
|
||||
borderTop: "calc(2 * 1px) solid #999"
|
||||
}}>
|
||||
<div style={{
|
||||
width: "50%",
|
||||
alignSelf: "stretch",
|
||||
display: "flex",
|
||||
alignItems: "center"
|
||||
}}>
|
||||
<div className="label" style={{
|
||||
height: "100%",
|
||||
padding: "calc(16 * 1px)",
|
||||
flexBasis: "40%",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
borderRight: "calc(2 * 1px) solid #999",
|
||||
flexShrink: "0",
|
||||
flexGrow: "0"
|
||||
}}>{getLabel(111, "纳税人识别码")}</div>
|
||||
<div className="value" style={{
|
||||
flexBasis: "60%",
|
||||
flexShrink: "0",
|
||||
flexGrow: "0",
|
||||
padding: "calc(16 * 1px)"
|
||||
}}>{bankVoucherDetail.taxCode || ""}</div>
|
||||
</div>
|
||||
<div style={{
|
||||
width: "50%",
|
||||
alignSelf: "stretch",
|
||||
display: "flex",
|
||||
alignItems: "center"
|
||||
}}>
|
||||
<div className="label" style={{
|
||||
height: "100%",
|
||||
padding: "calc(16 * 1px)",
|
||||
borderLeft: "calc(2 * 1px) solid #999",
|
||||
flexBasis: "40%",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
borderRight: "calc(2 * 1px) solid #999",
|
||||
flexShrink: "0",
|
||||
flexGrow: "0"
|
||||
}}>{getLabel(111, "税务机关代码")}</div>
|
||||
<div className="value" style={{
|
||||
width: "50%",
|
||||
alignSelf: "stretch",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
padding: "calc(16 * 1px)"
|
||||
}}>{bankVoucherDetail.taxAuthoritiesNo || ""}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style={{
|
||||
width: "100%",
|
||||
minHeight: "calc(50 * 1px)",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
flexGrow: "0",
|
||||
flexShrink: "0",
|
||||
borderTop: "calc(2 * 1px) solid #999"
|
||||
}}>
|
||||
<div style={{
|
||||
width: "50%",
|
||||
alignSelf: "stretch",
|
||||
display: "flex",
|
||||
alignItems: "center"
|
||||
}}>
|
||||
<div className="label" style={{
|
||||
height: "100%",
|
||||
padding: "calc(16 * 1px)",
|
||||
flexBasis: "40%",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
borderRight: "calc(2 * 1px) solid #999",
|
||||
flexShrink: "0",
|
||||
flexGrow: "0"
|
||||
}}>{getLabel(111, "纳税人名称")}</div>
|
||||
<div className="value" style={{
|
||||
flexBasis: "60%",
|
||||
flexShrink: "0",
|
||||
flexGrow: "0",
|
||||
padding: "calc(16 * 1px)"
|
||||
}}>{bankVoucherDetail.taxAgentName || ""}</div>
|
||||
</div>
|
||||
<div style={{
|
||||
width: "50%",
|
||||
alignSelf: "stretch",
|
||||
display: "flex",
|
||||
alignItems: "center"
|
||||
}}>
|
||||
<div className="label" style={{
|
||||
height: "100%",
|
||||
padding: "calc(16 * 1px)",
|
||||
borderLeft: "calc(2 * 1px) solid #999",
|
||||
flexBasis: "40%",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
borderRight: "calc(2 * 1px) solid #999",
|
||||
flexShrink: "0",
|
||||
flexGrow: "0"
|
||||
}}>{getLabel(111, "税务机关名称")}</div>
|
||||
<div className="value" style={{
|
||||
width: "50%",
|
||||
alignSelf: "stretch",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
padding: "calc(16 * 1px)"
|
||||
}}>{bankVoucherDetail.taxAuthoritiesName}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style={{
|
||||
width: "100%",
|
||||
minHeight: "calc(50 * 1px)",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
flexGrow: "0",
|
||||
flexShrink: "0",
|
||||
borderTop: "calc(2 * 1px) solid #999"
|
||||
}}>
|
||||
<div style={{
|
||||
width: "50%",
|
||||
alignSelf: "stretch",
|
||||
display: "flex",
|
||||
alignItems: "center"
|
||||
}}>
|
||||
<div className="label" style={{
|
||||
height: "100%",
|
||||
padding: "calc(16 * 1px)",
|
||||
flexBasis: "40%",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
borderRight: "calc(2 * 1px) solid #999",
|
||||
flexShrink: "0",
|
||||
flexGrow: "0"
|
||||
}}>{getLabel(111, "付款人名称")}</div>
|
||||
<div className="value" style={{
|
||||
flexBasis: "60%",
|
||||
flexShrink: "0",
|
||||
flexGrow: "0",
|
||||
padding: "calc(16 * 1px)"
|
||||
}}>{}</div>
|
||||
</div>
|
||||
<div style={{
|
||||
width: "50%",
|
||||
alignSelf: "stretch",
|
||||
display: "flex",
|
||||
alignItems: "center"
|
||||
}}>
|
||||
<div className="label" style={{
|
||||
height: "100%",
|
||||
padding: "calc(16 * 1px)",
|
||||
borderLeft: "calc(2 * 1px) solid #999",
|
||||
flexBasis: "40%",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
borderRight: "calc(2 * 1px) solid #999",
|
||||
flexShrink: "0",
|
||||
flexGrow: "0"
|
||||
}}>{getLabel(111, "开户银行名称")}</div>
|
||||
<div className="value" style={{
|
||||
width: "50%",
|
||||
alignSelf: "stretch",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
padding: "calc(16 * 1px)"
|
||||
}}>{}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style={{
|
||||
width: "100%",
|
||||
minHeight: "calc(50 * 1px)",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
flexGrow: "0",
|
||||
flexShrink: "0",
|
||||
borderTop: "calc(2 * 1px) solid #999"
|
||||
}}>
|
||||
<div style={{
|
||||
width: "50%",
|
||||
alignSelf: "stretch",
|
||||
display: "flex",
|
||||
alignItems: "center"
|
||||
}}>
|
||||
<div className="label" style={{
|
||||
height: "100%",
|
||||
padding: "calc(16 * 1px)",
|
||||
flexBasis: "40%",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
borderRight: "calc(2 * 1px) solid #999",
|
||||
flexShrink: "0",
|
||||
flexGrow: "0"
|
||||
}}>{getLabel(111, "付款人账号")}</div>
|
||||
<div className="value" style={{
|
||||
flexBasis: "60%",
|
||||
flexShrink: "0",
|
||||
flexGrow: "0",
|
||||
padding: "calc(16 * 1px)"
|
||||
}}>{}</div>
|
||||
</div>
|
||||
<div style={{
|
||||
width: "50%",
|
||||
alignSelf: "stretch",
|
||||
display: "flex",
|
||||
alignItems: "center"
|
||||
}}>
|
||||
<div className="label" style={{
|
||||
height: "100%",
|
||||
padding: "calc(16 * 1px)",
|
||||
borderLeft: "calc(2 * 1px) solid #999",
|
||||
flexBasis: "40%",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
borderRight: "calc(2 * 1px) solid #999",
|
||||
flexShrink: "0",
|
||||
flexGrow: "0"
|
||||
}}>{getLabel(111, "税款限缴日期")}</div>
|
||||
<div className="value" style={{
|
||||
width: "50%",
|
||||
alignSelf: "stretch",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
padding: "calc(16 * 1px)"
|
||||
}}>{bankVoucherDetail.deadline || ""}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="table" style={{
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
borderBottom: "calc(2 * 1px) solid #999",
|
||||
width: "100%"
|
||||
}}>
|
||||
<div className="thead" style={{
|
||||
borderTop: "calc(2 * 1px) solid #999",
|
||||
display: "flex",
|
||||
width: "100%",
|
||||
justifyContent: "space-between"
|
||||
}}>
|
||||
<div style={{
|
||||
width: "calc(100%/ 3)",
|
||||
padding: "calc(16 * 1px)",
|
||||
minHeight: "calc(50 * 1px)",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
flexGrow: "0",
|
||||
flexShrink: "0"
|
||||
}}>{getLabel(111, "征收顶目名称")}</div>
|
||||
<div style={{
|
||||
width: "calc(100%/ 3)",
|
||||
padding: "calc(16 * 1px)",
|
||||
minHeight: "calc(50 * 1px)",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
borderLeft: "calc(2 * 1px) solid #999",
|
||||
flexGrow: "0",
|
||||
flexShrink: "0"
|
||||
}}>{getLabel(111, "征收品目名称")}</div>
|
||||
<div style={{
|
||||
width: "calc(100%/ 3)",
|
||||
padding: "calc(16 * 1px)",
|
||||
minHeight: "calc(50 * 1px)",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
borderLeft: "calc(2 * 1px) solid #999",
|
||||
flexGrow: "0",
|
||||
flexShrink: "0"
|
||||
}}>{getLabel(111, "应繳税额")}</div>
|
||||
</div>
|
||||
<div className="tbody" style={{
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
width: "100%"
|
||||
}}>
|
||||
{
|
||||
!_.isEmpty(bankVoucherDetail.details) ? bankVoucherDetail.details.map((row, index) => (
|
||||
<div className="tr" key={index} style={{
|
||||
display: "flex",
|
||||
borderTop: " calc(2 * 1px) solid #999",
|
||||
justifyContent: "space-between"
|
||||
}}>
|
||||
<div style={{
|
||||
width: "calc(100%/ 3)",
|
||||
padding: "calc(16 * 1px)",
|
||||
minHeight: " calc(50 * 1px)",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
flexGrow: "0",
|
||||
flexShrink: "0"
|
||||
}}>{row.paymentCode}</div>
|
||||
<div style={{
|
||||
width: "calc(100%/ 3)",
|
||||
padding: "calc(16 * 1px)",
|
||||
minHeight: " calc(50 * 1px)",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
borderLeft: "calc(2 * 1px) solid #999",
|
||||
flexGrow: "0",
|
||||
flexShrink: "0"
|
||||
}}>{row.paymentItem}</div>
|
||||
<div style={{
|
||||
width: "calc(100%/ 3)",
|
||||
padding: "calc(16 * 1px)",
|
||||
minHeight: " calc(50 * 1px)",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
borderLeft: "calc(2 * 1px) solid #999",
|
||||
flexGrow: "0",
|
||||
flexShrink: "0"
|
||||
}}>{row.payAmount}</div>
|
||||
</div>
|
||||
)) : null
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div style={{
|
||||
minHeight: "calc(50 * 1px)",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
padding: "calc(16 * 1px)",
|
||||
borderBottom: "calc(2 * 1px) solid #999"
|
||||
}}>{getLabel(111, "金额合计(小写):")} {bankVoucherDetail.lowerFormatAmount}</div>
|
||||
<div style={{
|
||||
minHeight: "calc(50 * 1px)",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
padding: "calc(16 * 1px)",
|
||||
borderBottom: "calc(2 * 1px) solid #999"
|
||||
}}>{getLabel(111, "金额合计(大写):")} {bankVoucherDetail.upperFormatAmount}</div>
|
||||
|
||||
<div className="signet" style={{
|
||||
minHeight: "calc(140 * 1px)",
|
||||
width: "100%",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
borderBottom: " calc(2 * 1px) solid #999",
|
||||
justifyContent: "space-between"
|
||||
}}>
|
||||
<div className="item one" style={{
|
||||
alignSelf: "stretch",
|
||||
width: "calc(100%/ 3)",
|
||||
display: "flex",
|
||||
alignItems: "flex-start",
|
||||
justifyContent: "center",
|
||||
flexDirection: "column",
|
||||
padding: "calc(16 * 1px)"
|
||||
|
||||
}}>
|
||||
<div className="drawee" style={{
|
||||
marginBottom: "calc(16 * 1px)"
|
||||
}}>{getLabel(111, "付款人 (签章)")}</div>
|
||||
<div className="operator">{getLabel(111, "经办人 (签章)")}</div>
|
||||
</div>
|
||||
<div style={{
|
||||
alignSelf: "stretch",
|
||||
borderLeft: "calc(2 * 1px) solid #999",
|
||||
width: "calc(100%/ 3)",
|
||||
display: "flex",
|
||||
alignItems: "flex-start",
|
||||
justifyContent: "center",
|
||||
flexDirection: "column",
|
||||
padding: "calc(16 * 1px)"
|
||||
}}>
|
||||
<div>{getLabel(111, "银行记账员")}</div>
|
||||
<div> {getLabel(111, "(签章)")}</div>
|
||||
</div>
|
||||
<div style={{
|
||||
alignSelf: "stretch",
|
||||
borderLeft: "calc(2 * 1px) solid #999",
|
||||
width: "calc(100%/ 3)",
|
||||
display: "flex",
|
||||
alignItems: "flex-start",
|
||||
justifyContent: "center",
|
||||
flexDirection: "column",
|
||||
padding: "calc(16 * 1px)"
|
||||
}}>
|
||||
<div>{getLabel(111, "备注:")}</div>
|
||||
<div> {bankVoucherDetail.remark}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -92,7 +92,7 @@ class EditCalcTable extends Component {
|
|||
const { salarySobId } = this.props;
|
||||
const { lockStatus, salaryItemId } = payload;
|
||||
if (lockStatus === "DIAGRAM") {
|
||||
window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/topologyView/${salarySobId}/${salaryItemId}`, "_blank");
|
||||
window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/topologyView/${salarySobId}/${salaryItemId}?type=ledger`, "_blank");
|
||||
return;
|
||||
}
|
||||
Modal.confirm({
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import EditCalcAdvanceSearchPannel from "./editCalcAdvanceSearchPannel";
|
|||
import EditCalcTable from "./editCalcTable";
|
||||
import SalaryMonthTip from "../salaryMonthTip";
|
||||
import SalaryCalcLayout from "./salaryCalcLayout";
|
||||
import PersonAbnormalDialog from "./personAbnormalDialog";
|
||||
import cs from "classnames";
|
||||
import "./index.less";
|
||||
|
||||
|
|
@ -22,7 +23,8 @@ class Index extends Component {
|
|||
super(props);
|
||||
this.state = {
|
||||
salarySobCycle: {}, showSearchAd: false,
|
||||
columnDesc: {}, formulaTd: "", showTotalCell: false
|
||||
columnDesc: {}, formulaTd: "", showTotalCell: false,
|
||||
perAbnormalDialog: { visible: false, salaryAcctRecordId: "" }
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -50,7 +52,7 @@ class Index extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { salarySobCycle, showSearchAd, formulaTd, columnDesc, showTotalCell } = this.state;
|
||||
const { salarySobCycle, showSearchAd, formulaTd, columnDesc, showTotalCell, perAbnormalDialog } = this.state;
|
||||
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||
const formulaObj = _.get(columnDesc, [formulaTd]) || {};
|
||||
return (<SalaryCalcLayout {...this.props} init={this.init} onConfirm={() => this.onAdSearch(false)}>
|
||||
|
|
@ -65,7 +67,13 @@ class Index extends Component {
|
|||
style={{ marginLeft: 10 }}
|
||||
/>
|
||||
</div>
|
||||
<div></div>
|
||||
<div>
|
||||
<div className="abnormal-text"
|
||||
onClick={() => this.setState({
|
||||
perAbnormalDialog: { visible: true, salaryAcctRecordId }
|
||||
})}>{getLabel(111, "未报送人员")}:{salarySobCycle.abnormalEmployeeNum}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="salary-flex-between formula-detail-area">
|
||||
<div className="formula-detail">
|
||||
|
|
@ -87,6 +95,10 @@ class Index extends Component {
|
|||
<EditCalcTable ref={dom => this.calcTableRef = dom} salarySobId={salarySobCycle.salarySobId}
|
||||
{...this.props} showTotalCell={showTotalCell}
|
||||
onShowFormulaTd={this.handleShowFormulaTa}/>
|
||||
<PersonAbnormalDialog {...perAbnormalDialog}
|
||||
onCancel={() => this.setState({
|
||||
perAbnormalDialog: { ...perAbnormalDialog, visible: false }
|
||||
})}/>
|
||||
</div>
|
||||
</SalaryCalcLayout>);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,11 @@
|
|||
padding-bottom: 0;
|
||||
height: 46px;
|
||||
margin-bottom: 0;
|
||||
|
||||
.abnormal-text {
|
||||
color: #ef9502;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.formula-detail-area {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,84 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 薪资核算-人员异常
|
||||
* Description:
|
||||
* Date: 2023/8/18
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaDialog, WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import { listPage4NotDeclare } from "../../../../../apis/calculate";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
class PersonAbnormalDialog 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.queryList(nextProps);
|
||||
}
|
||||
|
||||
queryList = (props) => {
|
||||
const { salaryAcctRecordId } = props, { pageInfo } = this.state;
|
||||
const payload = { ...pageInfo, recordId: salaryAcctRecordId };
|
||||
this.setState({ loading: true });
|
||||
listPage4NotDeclare(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 }));
|
||||
};
|
||||
|
||||
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.queryList(this.props));
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current }
|
||||
}, () => this.queryList(this.props));
|
||||
}
|
||||
};
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props}
|
||||
scalable hasScroll className="declareResultDialog" initLoadCss
|
||||
title={getLabel(111, "未报送人员")} ref={dom => this.errorRef = dom}
|
||||
style={{
|
||||
width: 1150, height: 606.6, minHeight: 200, minWidth: 380, maxHeight: "90%",
|
||||
maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
|
||||
}}
|
||||
>
|
||||
<div className="declareResultDialogContent">
|
||||
<WeaTable
|
||||
columns={columns} dataSource={dataSource}
|
||||
loading={loading} className="declareTable"
|
||||
pagination={pagination} scroll={{ y: this.errorRef ? this.errorRef.state.height - 124 : 600 }}
|
||||
/>
|
||||
</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default PersonAbnormalDialog;
|
||||
|
|
@ -9,12 +9,7 @@ import { WeaLocaleProvider, WeaReqTop } from "ecCom";
|
|||
import { Button, Dropdown, Menu, message, Modal } from "antd";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import Layout from "./layout";
|
||||
import {
|
||||
acctresultAccounting,
|
||||
getApprovalInfoByRecordId,
|
||||
getCalculateProgress,
|
||||
getExportField
|
||||
} from "../../../apis/calculate";
|
||||
import * as API from "../../../apis/calculate";
|
||||
import AdvanceInputBtn from "./components/advanceInputBtn";
|
||||
import SalaryCalcPersonConfirm from "./components/salaryCalcPersonConfirm";
|
||||
import SalaryEditCalc from "./components/salaryEditCalc";
|
||||
|
|
@ -32,7 +27,7 @@ class Index extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
selectedKey: "person", progressVisible: false, progress: 0,
|
||||
selectedKey: "person", progressVisible: false, progress: 0, loading: { calcTax: false, feedback: false },
|
||||
customExpDialog: { visible: false, salaryAcctRecordId: "", checkItems: [], itemsByGroup: [] },
|
||||
salaryImpDialog: { visible: false, title: "", salaryAcctRecordId: "" },
|
||||
approvalInfo: {},//审批信息,
|
||||
|
|
@ -45,7 +40,7 @@ class Index extends Component {
|
|||
|
||||
init = () => {
|
||||
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||
getApprovalInfoByRecordId({ salaryAcctRecordId }).then(({ status, data: approvalInfo }) => {
|
||||
API.getApprovalInfoByRecordId({ salaryAcctRecordId }).then(({ status, data: approvalInfo }) => {
|
||||
if (status) this.setState({ approvalInfo });
|
||||
});
|
||||
};
|
||||
|
|
@ -72,11 +67,11 @@ class Index extends Component {
|
|||
this.setState({ progress: 0 });
|
||||
let payload = { salaryAcctRecordId };
|
||||
if (key === "calc_selected") payload = _.assign(payload, { ids: selectedRowKeys });
|
||||
acctresultAccounting(payload).then(() => {
|
||||
API.acctresultAccounting(payload).then(() => {
|
||||
this.setState({ progressVisible: true });
|
||||
if (this.timer) clearInterval(this.timer);
|
||||
this.timer = setInterval(() => {
|
||||
getCalculateProgress(salaryAcctRecordId).then(({ data }) => {
|
||||
API.getCalculateProgress(salaryAcctRecordId).then(({ data }) => {
|
||||
let progress = data.progress;
|
||||
if (progress === 1 && this.timer) {
|
||||
clearInterval(this.timer);
|
||||
|
|
@ -113,7 +108,7 @@ class Index extends Component {
|
|||
window.open(`${window.ecologyContentPath || ""}${url}`, "_blank");
|
||||
break;
|
||||
case "export_custom":
|
||||
getExportField({ salaryAcctRecordId }).then(({ status, data }) => {
|
||||
API.getExportField({ salaryAcctRecordId }).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { checkItems, itemsByGroup } = data;
|
||||
this.setState({
|
||||
|
|
@ -150,9 +145,72 @@ class Index extends Component {
|
|||
break;
|
||||
}
|
||||
};
|
||||
acctresultCalcTax = () => {
|
||||
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||
this.setState({ loading: { ...this.state.loading, calcTax: true } });
|
||||
API.acctresultCalcTax({ salaryAcctRecordId }).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: { ...this.state.loading, calcTax: false } });
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功!"));
|
||||
this.calc.onAdSearch(false);
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
}).catch(() => this.setState({ loading: { ...this.state.loading, calcTax: false } }));
|
||||
};
|
||||
calcTaxFeedback = () => {
|
||||
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||
this.setState({ loading: { ...this.state.loading, feedback: true } });
|
||||
API.calcTaxFeedback({ salaryAcctRecordId }).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: { ...this.state.loading, feedback: false } });
|
||||
if (status) {
|
||||
this.calc.onAdSearch(false);
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(111, "成功获取个税信息,是否继续计算税后工资?"),
|
||||
onOk: () => this.afterTaxAccounting()
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
}).catch(() => this.setState({ loading: { ...this.state.loading, feedback: false } }));
|
||||
};
|
||||
afterTaxAccounting = () => {
|
||||
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||
this.setState({ progress: 0 });
|
||||
let payload = { salaryAcctRecordId };
|
||||
API.afterTaxAccounting(payload).then(() => {
|
||||
this.setState({ progressVisible: true });
|
||||
if (this.timer) clearInterval(this.timer);
|
||||
this.timer = setInterval(() => {
|
||||
API.getAfterTaxAccountingProgress(salaryAcctRecordId).then(({ data }) => {
|
||||
let progress = data.progress;
|
||||
if (progress === 1 && this.timer) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
accountExceptInfo: data.message
|
||||
});
|
||||
message.success(getLabel(111, "操作完成"));
|
||||
this.calc.onAdSearch(false);
|
||||
} else if (!data.status) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
accountExceptInfo: data.message
|
||||
});
|
||||
message.error(data.message);
|
||||
}
|
||||
this.setState({ progress: Number(progress) * 100 });
|
||||
});
|
||||
}, 1000);
|
||||
});
|
||||
};
|
||||
renderReqBtns = () => {
|
||||
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||
const { selectedKey, accountExceptInfo, approvalInfo } = this.state;
|
||||
const { selectedKey, accountExceptInfo, approvalInfo, loading } = this.state;
|
||||
const { isOpenApproval, approvalWorkflowUrl, canEdit } = approvalInfo;
|
||||
let reqBtns = [];
|
||||
switch (selectedKey) {
|
||||
|
|
@ -176,6 +234,10 @@ class Index extends Component {
|
|||
<Dropdown.Button onClick={() => this.doCacl("ALL")} overlay={menu} type="primary">
|
||||
{getLabel(543545, "核算所有人")}
|
||||
</Dropdown.Button>,
|
||||
<Button type="ghost" onClick={this.acctresultCalcTax}
|
||||
loading={loading.calcTax}>{getLabel(111, "在线算税")}</Button>,
|
||||
<Button type="ghost" loading={loading.feedback}
|
||||
onClick={this.calcTaxFeedback}>{getLabel(111, "获取算税结果")}</Button>,
|
||||
<Dropdown overlay={moreMenu}><Button type="ghost">{getLabel(17499, "更多")}</Button></Dropdown>,
|
||||
<AdvanceInputBtn onOpenAdvanceSearch={() => this.calc.openAdvanceSearch()}
|
||||
onAdvanceSearch={() => this.calc.onAdSearch(false)}/>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaBrowser, WeaFormItem } from "ecCom";
|
||||
import { getDomkes, getSearchs } from "../../util";
|
||||
import { WeaSwitch } from "comsMobx";
|
||||
import { getDomkes, toDecimal_n } from "../../util";
|
||||
import FormInfo from "../../components/FormInfo";
|
||||
import "./index.less";
|
||||
|
||||
class AddItems extends Component {
|
||||
|
|
@ -60,9 +62,207 @@ class AddItems extends Component {
|
|||
|
||||
render() {
|
||||
const { form, condition = [] } = this.props;
|
||||
const itemRender = {
|
||||
// 累计专项附加扣除
|
||||
addUpChildEducation: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpChildEducation: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
addUpContinuingEducation: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpContinuingEducation: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
addUpHousingLoanInterest: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpHousingLoanInterest: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
addUpHousingRent: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpHousingRent: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
addUpSupportElderly: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpSupportElderly: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
addUpIllnessMedical: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpIllnessMedical: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
addUpInfantCare: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpInfantCare: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
//专项附加扣除
|
||||
childrenEducation: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ childrenEducation: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
continuingEducation: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ continuingEducation: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
housingLoanInterest: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ housingLoanInterest: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
housingRent: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ housingRent: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
supportingElder: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ supportingElder: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
seriousIllnessTreatment: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ seriousIllnessTreatment: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
infantCare: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ infantCare: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
//往期累计情况(工资、薪金)
|
||||
addUpIncome: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpIncome: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
addUpSubtraction: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpSubtraction: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
addUpSocialSecurityTotal: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpSocialSecurityTotal: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
addUpAccumulationFundTotal: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpAccumulationFundTotal: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
addUpEnterpriseAndOther: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpEnterpriseAndOther: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
addUpOtherDeduction: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpOtherDeduction: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
addUpTaxExemptIncome: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpTaxExemptIncome: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
addUpAllowedDonation: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpAllowedDonation: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
addUpTaxSavings: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpTaxSavings: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
addUpAdvanceTax: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpAdvanceTax: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
actualAddUpAdvanceTax: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ actualAddUpAdvanceTax: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
taxAdjustment: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ taxAdjustment: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
addUpTaxableIncome: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpTaxableIncome: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
// 其他免税扣除
|
||||
freeIncome: (field, textAreaProps, form, formParams) => {
|
||||
return (<React.Fragment>
|
||||
<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ freeIncome: { value: toDecimal_n(v, 2) } })}/>
|
||||
{field.extraDom && field.extraDom}
|
||||
</React.Fragment>);
|
||||
},
|
||||
businessHealthyInsurance: (field, textAreaProps, form, formParams) => {
|
||||
return (<React.Fragment>
|
||||
<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ businessHealthyInsurance: { value: toDecimal_n(v, 2) } })}/>
|
||||
{field.extraDom && field.extraDom}
|
||||
</React.Fragment>);
|
||||
},
|
||||
taxDelayEndowmentInsurance: (field, textAreaProps, form, formParams) => {
|
||||
return (<React.Fragment>
|
||||
<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ taxDelayEndowmentInsurance: { value: toDecimal_n(v, 2) } })}/>
|
||||
{field.extraDom && field.extraDom}
|
||||
</React.Fragment>);
|
||||
},
|
||||
deductionAllowedDonation: (field, textAreaProps, form, formParams) => {
|
||||
return (<React.Fragment>
|
||||
<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ deductionAllowedDonation: { value: toDecimal_n(v, 2) } })}/>
|
||||
{field.extraDom && field.extraDom}
|
||||
</React.Fragment>);
|
||||
},
|
||||
derateDeduction: (field, textAreaProps, form, formParams) => {
|
||||
return (<React.Fragment>
|
||||
<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ derateDeduction: { value: toDecimal_n(v, 2) } })}/>
|
||||
{field.extraDom && field.extraDom}
|
||||
</React.Fragment>);
|
||||
},
|
||||
otherDeduction: (field, textAreaProps, form, formParams) => {
|
||||
return (<React.Fragment>
|
||||
<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ otherDeduction: { value: toDecimal_n(v, 2) } })}/>
|
||||
{field.extraDom && field.extraDom}
|
||||
</React.Fragment>);
|
||||
},
|
||||
privatePension: (field, textAreaProps, form, formParams) => {
|
||||
return (<React.Fragment>
|
||||
<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ privatePension: { value: toDecimal_n(v, 2) } })}/>
|
||||
{field.extraDom && field.extraDom}
|
||||
</React.Fragment>);
|
||||
}
|
||||
};
|
||||
return (
|
||||
<div className="addItemsWrapper form-dialog-layout">
|
||||
{getSearchs(form, condition, 2, false)}
|
||||
<FormInfo center={false} form={form} formFields={condition} colCount={2} custLabelCol={8}
|
||||
itemRender={itemRender}/>
|
||||
<Tips><span>若此员工数据已存在在同期列表中,则当前数据保存后会覆盖列表数据</span></Tips>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -140,6 +140,37 @@ export const dataCollectCondition = [
|
|||
];
|
||||
|
||||
|
||||
export const cumTaxPeriodCondition = [
|
||||
{
|
||||
items: [{
|
||||
colSpan: 1,
|
||||
conditionType: "MONTHPICKER",
|
||||
domkey: ["declareMonth"],
|
||||
fieldcol: 18,
|
||||
label: "税款所属期",
|
||||
lanId: 542240,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
rules: "required",
|
||||
viewAttr: 3
|
||||
},{
|
||||
colSpan: 1,
|
||||
conditionType: "SELECT",
|
||||
domkey: ["taxAgentIds"],
|
||||
multiple: true,
|
||||
fieldcol: 18,
|
||||
label: "个税扣缴义务人",
|
||||
lanId: 537996,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
}],
|
||||
title: "",
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,99 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 个税对接-在线获取
|
||||
* Description:
|
||||
* Date: 2023/9/5
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaDialog, WeaLocaleProvider, WeaTools } 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";
|
||||
import { postFetch } from "../../../../util/request";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const getKey = WeaTools.getKey;
|
||||
const APIFox = {
|
||||
online: onlineRequest,
|
||||
advance: onlineActualAddUpAdvanceTax
|
||||
};
|
||||
|
||||
@inject("cumDeductStore")
|
||||
@observer
|
||||
class SalaryCumDeductChooseTaxPeriodDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: false, conditions: []
|
||||
};
|
||||
}
|
||||
|
||||
async componentWillReceiveProps(nextProps, nextContext) {
|
||||
const { cumDeductStore: { cumTaxPeriodForm, changeCumTaxPeriodForm } } = nextProps;
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
const { data } = await postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "ADMIN_DATA" });
|
||||
this.setState({
|
||||
conditions: _.map(cumTaxPeriodCondition, item => ({
|
||||
...item, items: _.map(item.items, o => {
|
||||
if (getKey(o) === "taxAgentIds") {
|
||||
return {
|
||||
...o, lable: getLabel(o.lanId, o.label),
|
||||
options: _.map(data, g => ({ key: String(g.id), showname: g.name }))
|
||||
};
|
||||
}
|
||||
return { ...o, lable: getLabel(o.lanId, o.label) };
|
||||
})
|
||||
}))
|
||||
});
|
||||
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, taxAgentIds } = cumTaxPeriodForm.getFormParams();
|
||||
if (f.isValid) {
|
||||
this.setState({ loading: true });
|
||||
APIFox[type]({ declareMonth: declareMonth + "-01", taxAgentIds: taxAgentIds ? taxAgentIds.split(",") : [] })
|
||||
.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, conditions } = this.state;
|
||||
const { cumDeductStore: { cumTaxPeriodForm } } = this.props;
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} className="paymentDialog mulSelectDialog" initLoadCss
|
||||
style={{ width: 550 }}
|
||||
buttons={[<Button type="primary" loading={loading} onClick={this.save}>{getLabel(33703, "确认")}</Button>]}
|
||||
bottomLeft={getLabel(111, "点击保存后,稍后请点击【获取结果下载】下载获取结果。获取的数据将覆盖列表原本数据(有则覆盖无则新增)。")}
|
||||
>
|
||||
<div className="paymentDialogContent">
|
||||
{getSearchs(cumTaxPeriodForm, conditions, 1, false)}
|
||||
</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default SalaryCumDeductChooseTaxPeriodDialog;
|
||||
|
|
@ -19,8 +19,10 @@ import {
|
|||
editAddUpDeduction,
|
||||
getAddUpDeduction,
|
||||
getCumDeductSaCondition,
|
||||
importCumDeductParam
|
||||
importCumDeductParam,
|
||||
onlineFeedback
|
||||
} from "../../../apis/cumDeduct";
|
||||
import { apiflowBillingConfigStatus } from "../../../apis/intelligentCalculateSalarySettings";
|
||||
import DataTables from "../dataTables";
|
||||
import AddItems from "../addItems";
|
||||
import ImportFormCom from "./components/importFormCom";
|
||||
|
|
@ -32,11 +34,12 @@ import { postFetch } from "../../../util/request";
|
|||
import { getDomkes } from "../../../util";
|
||||
import Layout from "../layout";
|
||||
import moment from "moment";
|
||||
import SalaryCumDeductChooseTaxPeriodDialog from "./components/salaryCumDeductChooseTaxPeriodDialog";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const getKey = WeaTools.getKey;
|
||||
|
||||
@inject("taxAgentStore", "cumDeductStore")
|
||||
@inject("cumDeductStore")
|
||||
@observer
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
|
|
@ -68,7 +71,12 @@ class Index extends Component {
|
|||
exportPayloadType: false,
|
||||
advanceCondition: null,
|
||||
targetid: "",
|
||||
taxAgentOption: []
|
||||
taxAgentOption: [],
|
||||
cumTaxPeriodDialog: {
|
||||
visible: false, title: "", type: ""
|
||||
},
|
||||
feedbackLoading: false,
|
||||
incomeTaxStatus: false
|
||||
};
|
||||
this.tableRef = null;
|
||||
this.addItemRef = null;
|
||||
|
|
@ -77,8 +85,14 @@ class Index extends Component {
|
|||
|
||||
componentDidMount() {
|
||||
this.getAdvanceCondition();
|
||||
this.apiflowBillingConfigStatus();
|
||||
}
|
||||
|
||||
apiflowBillingConfigStatus = () => {
|
||||
apiflowBillingConfigStatus().then(({ status, data }) => {
|
||||
this.setState({ incomeTaxStatus: status && data });
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description:一键累计
|
||||
|
|
@ -395,8 +409,8 @@ class Index extends Component {
|
|||
* Date: 2023/2/17
|
||||
*/
|
||||
getTopBtns = () => {
|
||||
const { addAllLoading } = this.state;
|
||||
return [
|
||||
const { addAllLoading, cumTaxPeriodDialog, feedbackLoading, incomeTaxStatus } = this.state;
|
||||
const commonBtns = [
|
||||
<Button type="primary" onClick={this.handleOpenImport}>导入</Button>,
|
||||
<Button type="ghost" onClick={() => this.handleAddData()}>新建</Button>,
|
||||
<Button type="ghost" loading={addAllLoading} onClick={this.autoAddAll}>一键累计</Button>,
|
||||
|
|
@ -413,6 +427,18 @@ class Index extends Component {
|
|||
<Button type="ghost">更多</Button>
|
||||
</Dropdown>
|
||||
];
|
||||
const incomeTaxBtns = [
|
||||
<Button type="primary" onClick={() => this.setState({
|
||||
cumTaxPeriodDialog: {
|
||||
...cumTaxPeriodDialog,
|
||||
visible: true, type: "online",
|
||||
title: getLabel(542240, "税款所属期")
|
||||
}
|
||||
})}>{getLabel(111, "在线获取")}</Button>,
|
||||
<Button type="ghost" onClick={this.onlineFeedback}
|
||||
loading={feedbackLoading}>{getLabel(111, "查询在线获取结果")}</Button>
|
||||
];
|
||||
return incomeTaxStatus ? [...incomeTaxBtns, ...commonBtns] : commonBtns;
|
||||
};
|
||||
handleDataMenuClick = ({ key: keyFunc }) => this[keyFunc]();
|
||||
/*
|
||||
|
|
@ -505,11 +531,30 @@ class Index extends Component {
|
|||
});
|
||||
};
|
||||
|
||||
onlineFeedback = () => {
|
||||
this.setState({ feedbackLoading: true });
|
||||
onlineFeedback().then(({ status, data, errormsg }) => {
|
||||
this.setState({ feedbackLoading: false });
|
||||
if (status) {
|
||||
if (data.finish) {
|
||||
message.success(getLabel(111, "获取成功!"));
|
||||
this.tableRef.getTableDate();
|
||||
} else {
|
||||
message.warning(data.msg);
|
||||
}
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.setState({ feedbackLoading: false });
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { cumDeductStore: { form } } = this.props;
|
||||
const {
|
||||
declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition,
|
||||
importPayload, exportPayloadType, targetid
|
||||
importPayload, exportPayloadType, cumTaxPeriodDialog, targetid
|
||||
} = this.state;
|
||||
const tablePayload = { declareMonth: [declareMonth], taxAgentIds: taxAgentId ? taxAgentId.split(",") : [] };
|
||||
return (
|
||||
|
|
@ -531,6 +576,12 @@ class Index extends Component {
|
|||
onViewDetails={(record) => this.handleAddData("累计专项附加扣除记录", record)}
|
||||
form={form}
|
||||
/>
|
||||
<SalaryCumDeductChooseTaxPeriodDialog
|
||||
{...cumTaxPeriodDialog}
|
||||
onCancel={() => this.setState({
|
||||
cumTaxPeriodDialog: { ...cumTaxPeriodDialog, visible: false, title: "", type: "" }
|
||||
})}
|
||||
/>
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,66 +117,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"],
|
||||
|
|
@ -239,14 +241,48 @@ 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: "个税调差",
|
||||
helpfulTip: "1、【个税调差】=【实际累计已预扣预缴税额】-【累计已预扣预缴税额】。\n" +
|
||||
"2、直接输入或导入【个税调差】值,则以输入/导入为准,公式失效。再次编辑减数或被减数,会再次按公式自动计算。",
|
||||
helpfulTipLanId: 111,
|
||||
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,
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ import {
|
|||
getCumSituationSaCondition,
|
||||
importCumSituationParam
|
||||
} from "../../../apis/cumSituation";
|
||||
import { apiflowBillingConfigStatus } from "../../../apis/intelligentCalculateSalarySettings";
|
||||
import { removePropertyCondition } from "../../../util/response";
|
||||
import DataTables from "../dataTables";
|
||||
import Layout from "../layout";
|
||||
|
|
@ -28,10 +29,11 @@ import AddItems from "../addItems";
|
|||
import TableRecord from "../components/tableRecord";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
import { postFetch } from "../../../util/request";
|
||||
import SalaryCumDeductChooseTaxPeriodDialog from "../cumDeduct/components/salaryCumDeductChooseTaxPeriodDialog";
|
||||
import { getDomkes } from "../../../util";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const getKey = WeaTools.getKey;
|
||||
|
||||
@inject("taxAgentStore", "cumSituationStore")
|
||||
@observer
|
||||
|
|
@ -65,7 +67,11 @@ class Index extends Component {
|
|||
exportPayloadType: false,
|
||||
advanceCondition: null,
|
||||
targetid: "",
|
||||
taxAgentOption: []
|
||||
taxAgentOption: [],
|
||||
incomeTaxStatus: false,
|
||||
cumTaxPeriodDialog: {
|
||||
visible: false, title: "", type: ""
|
||||
},
|
||||
};
|
||||
this.tableRef = null;
|
||||
this.addItemRef = null;
|
||||
|
|
@ -74,8 +80,14 @@ class Index extends Component {
|
|||
|
||||
componentDidMount() {
|
||||
this.getAdvanceCondition();
|
||||
this.apiflowBillingConfigStatus();
|
||||
}
|
||||
|
||||
apiflowBillingConfigStatus = () => {
|
||||
apiflowBillingConfigStatus().then(({ status, data }) => {
|
||||
this.setState({ incomeTaxStatus: status && data });
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 高级搜素框-表单项
|
||||
|
|
@ -298,6 +310,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: 顶部操作按钮
|
||||
|
|
@ -305,9 +340,10 @@ class Index extends Component {
|
|||
* Date: 2023/2/17
|
||||
*/
|
||||
getTopBtns = () => {
|
||||
const { addAllLoading } = this.state;
|
||||
return [
|
||||
const { addAllLoading, incomeTaxStatus } = this.state;
|
||||
const commonBtns = [
|
||||
<Button type="primary" onClick={this.handleOpenImport}>导入</Button>,
|
||||
// <Button type="ghost" onClick={this.handleOnlineAccess}>{getLabel(111, "在线获取")}</Button>,
|
||||
<Button type="ghost" onClick={() => this.handleAddData()}>新建</Button>,
|
||||
<Dropdown
|
||||
overlay={
|
||||
|
|
@ -322,6 +358,7 @@ class Index extends Component {
|
|||
<Button type="ghost">更多</Button>
|
||||
</Dropdown>
|
||||
];
|
||||
return incomeTaxStatus ? commonBtns : _.filter(commonBtns, (__, index) => index !== 1);
|
||||
};
|
||||
handleDataMenuClick = ({ key: keyFunc }) => this[keyFunc]();
|
||||
/*
|
||||
|
|
@ -502,10 +539,10 @@ class Index extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { taxAgentStore: { showOperateBtn }, cumSituationStore: { form } } = this.props;
|
||||
const { taxAgentStore: { showOperateBtn, taxAgentOption }, cumSituationStore: { form } } = this.props;
|
||||
const {
|
||||
declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition,
|
||||
importPayload, year, exportPayloadType, targetid
|
||||
importPayload, year, exportPayloadType, cumTaxPeriodDialog, targetid
|
||||
} = this.state;
|
||||
const tablePayload = { taxYearMonth: `${year}-${declareMonth}`, year, taxAgentId };
|
||||
return (
|
||||
|
|
@ -520,6 +557,12 @@ class Index extends Component {
|
|||
importPayload={{ ...importPayload, importOpts: { taxYearMonth: importPayload.importOpts.declareMonth } }}
|
||||
targetid={targetid} onClearTargrtid={() => this.setState({ targetid: "" })}
|
||||
>
|
||||
<SalaryCumDeductChooseTaxPeriodDialog
|
||||
{...cumTaxPeriodDialog} taxAgentOption={taxAgentOption}
|
||||
onCancel={() => this.setState({
|
||||
cumTaxPeriodDialog: { ...cumTaxPeriodDialog, visible: false, title: "", type: "" }
|
||||
})}
|
||||
/>
|
||||
<DataTables
|
||||
ref={dom => this.tableRef = dom}
|
||||
url="/api/bs/hrmsalary/addUpSituation/list"
|
||||
|
|
|
|||
|
|
@ -35,6 +35,18 @@
|
|||
background: #FFF;
|
||||
margin: 0 16px;
|
||||
}
|
||||
|
||||
.extra_tax {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
margin-top: -8px;
|
||||
right: -20px;
|
||||
|
||||
i {
|
||||
color: #2db7f5;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.layoutWrapper {
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ class Layout extends Component {
|
|||
const { showSearchAd, logDialogVisible, filterConditions } = this.state;
|
||||
const {
|
||||
title, btns, leftComp, children, taxAgentStore: { PageAndOptAuth },
|
||||
slidePayload, onClose, form, condition, onImportFile,
|
||||
slidePayload, onClose, form, condition, onImportFile, tabBtns = [],
|
||||
onAdSearch, onCancel, importPayload, logFunction, onClearTargrtid
|
||||
} = this.props;
|
||||
const { visible, children: slideChildren } = slidePayload;
|
||||
|
|
@ -123,6 +123,7 @@ class Layout extends Component {
|
|||
onSearch={onAdSearch}
|
||||
onSearchChange={(v) => form.updateFields({ username: v })}
|
||||
searchsBaseValue={form.getFormParams().username}
|
||||
buttons={showOperateBtn ? tabBtns : []}
|
||||
/>
|
||||
<div className="dataContent">
|
||||
{children}
|
||||
|
|
|
|||
|
|
@ -62,9 +62,22 @@ export const dataCollectCondition = [
|
|||
},
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["freeIncome"],
|
||||
dataType: "freeIncome",
|
||||
fieldcol: 14,
|
||||
label: "免税收入",
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
precision: 2,
|
||||
viewAttr: 2,
|
||||
extraDom: null
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["businessHealthyInsurance"],
|
||||
dataType: "healthInsurance",
|
||||
fieldcol: 14,
|
||||
label: "商业健康保险",
|
||||
labelcol: 8,
|
||||
|
|
@ -75,6 +88,7 @@ export const dataCollectCondition = [
|
|||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["taxDelayEndowmentInsurance"],
|
||||
dataType: "endowmentInsurance",
|
||||
fieldcol: 14,
|
||||
label: "税延养老保险",
|
||||
labelcol: 8,
|
||||
|
|
@ -82,19 +96,10 @@ export const dataCollectCondition = [
|
|||
precision: 2,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["otherDeduction"],
|
||||
fieldcol: 14,
|
||||
label: "其他",
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
precision: 2,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["deductionAllowedDonation"],
|
||||
dataType: "grantDonation",
|
||||
fieldcol: 14,
|
||||
label: "准予扣除的捐赠额",
|
||||
labelcol: 8,
|
||||
|
|
@ -102,9 +107,32 @@ export const dataCollectCondition = [
|
|||
precision: 2,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["derateDeduction"],
|
||||
dataType: "derateDeduction",
|
||||
fieldcol: 14,
|
||||
label: "减免税额",
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
precision: 2,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["otherDeduction"],
|
||||
dataType: "otherDerateDeduction",
|
||||
fieldcol: 14,
|
||||
label: "其他",
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
precision: 2,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["privatePension"],
|
||||
dataType: "personalPension",
|
||||
fieldcol: 14,
|
||||
label: "个人养老金",
|
||||
labelcol: 8,
|
||||
|
|
@ -118,8 +146,493 @@ export const dataCollectCondition = [
|
|||
col: 2
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export const taxDetailSettingsConditions = {
|
||||
freeIncome: [{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["incomeCategory"],
|
||||
fieldcol: 14,
|
||||
label: "所得项目",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["freeItem"],
|
||||
fieldcol: 14,
|
||||
label: "免税事项",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["freeProperty"],
|
||||
fieldcol: 14,
|
||||
label: "免税性质",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["freeAmount"],
|
||||
fieldcol: 14,
|
||||
label: "免税金额",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required",
|
||||
precision: 2,
|
||||
viewAttr: 3
|
||||
}
|
||||
],
|
||||
title: "",
|
||||
defaultshow: true,
|
||||
col: 1
|
||||
}],
|
||||
healthInsurance: [{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["incomeCategory"],
|
||||
fieldcol: 14,
|
||||
label: "所得项目",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["identificationNumber"],
|
||||
fieldcol: 14,
|
||||
label: "税优识别码",
|
||||
lanId: 111,
|
||||
helpfulTip: "为确保税收优惠商业健康保险保单的唯一性、真实性和有效性,由商业健康保险信息平台按照“一人一单一码”的原则进行核发,填写个人保单凭证上打印的数字识别码。",
|
||||
helpfulTipLanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "DATEPICKER",
|
||||
domkey: ["effectiveDate"],
|
||||
fieldcol: 14,
|
||||
label: "保单生效日期",
|
||||
lanId: 111,
|
||||
helpfulTip: "该商业健康保险保单生效的日期。",
|
||||
helpfulTipLanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["yearPremium"],
|
||||
fieldcol: 14,
|
||||
label: "年度保费",
|
||||
lanId: 111,
|
||||
helpfulTip: "商业健康保险保单年度内该保单的总保费。",
|
||||
helpfulTipLanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required",
|
||||
precision: 2,
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["monthPremium"],
|
||||
fieldcol: 14,
|
||||
label: "月度保费",
|
||||
lanId: 111,
|
||||
helpfulTip: "月缴费的保单填写每月所缴保费,按年一次性缴费的保单填写年度保费除以12后的金额。",
|
||||
helpfulTipLanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required",
|
||||
precision: 2,
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["currentDeduction"],
|
||||
fieldcol: 14,
|
||||
label: "本期扣除金额",
|
||||
lanId: 111,
|
||||
helpfulTip: "根据国家有关政策对个人购买或单位统一购买符合规定的商业健康保险产品的支出,扣除限额为2400。",
|
||||
helpfulTipLanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required",
|
||||
precision: 2,
|
||||
viewAttr: 3
|
||||
}
|
||||
],
|
||||
title: "",
|
||||
defaultshow: true,
|
||||
col: 1
|
||||
}],
|
||||
endowmentInsurance: [{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["incomeCategory"],
|
||||
fieldcol: 14,
|
||||
label: "所得项目",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "MONTHPICKER",
|
||||
domkey: ["deductionMonth"],
|
||||
fieldcol: 14,
|
||||
label: "申报扣除月份",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["accountNumber"],
|
||||
fieldcol: 14,
|
||||
label: "税延养老账户编号",
|
||||
lanId: 111,
|
||||
helpfulTip: "按照中国保险信息技术管理有限责任公司相关信息平台出具的《个人税收递延型商业养老保险扣除凭证》载明的对应项目填写。",
|
||||
helpfulTipLanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["checkCode"],
|
||||
fieldcol: 14,
|
||||
label: "报税校验码",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["yearPremium"],
|
||||
fieldcol: 14,
|
||||
label: "年度保费",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required",
|
||||
precision: 2,
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["monthPremium"],
|
||||
fieldcol: 14,
|
||||
label: "月度保费",
|
||||
lanId: 111,
|
||||
helpfulTip: "取得工资薪金所得、连续性劳务报酬所得(特定行业除外)的个人,填写《个人税收递延型商业养老保险扣除凭证》载明的月度保费金额,一次性缴费的保单填写月平均保费金额。",
|
||||
helpfulTipLanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required",
|
||||
precision: 2,
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["currentDeduction"],
|
||||
fieldcol: 14,
|
||||
label: "本期扣除金额",
|
||||
lanId: 111,
|
||||
helpfulTip: "取得工资薪金所得的个人,应按税延养老保险扣除凭证记载的当月金额和扣除限额孰低的方法计算可扣除额。扣除限额按照申报扣除当月的工资薪金的 6%和1000元孰低的办法确定。",
|
||||
helpfulTipLanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required",
|
||||
precision: 2,
|
||||
viewAttr: 3
|
||||
}
|
||||
],
|
||||
title: "",
|
||||
defaultshow: true,
|
||||
col: 1
|
||||
}],
|
||||
grantDonation: [{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["incomeCategory"],
|
||||
fieldcol: 14,
|
||||
label: "所得项目",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["recipientName"],
|
||||
fieldcol: 14,
|
||||
label: "受赠单位名称",
|
||||
lanId: 111,
|
||||
helpfulTip: "受赠单位名称填写受赠单位的法定名称全称。",
|
||||
helpfulTipLanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["taxCode"],
|
||||
fieldcol: 14,
|
||||
label: "受赠单位纳税人识别号",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["donationNumber"],
|
||||
fieldcol: 14,
|
||||
label: "捐赠凭证号",
|
||||
lanId: 111,
|
||||
helpfulTip: "捐赠凭证",
|
||||
helpfulTipLanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "DATEPICKER",
|
||||
domkey: ["donateDate"],
|
||||
fieldcol: 14,
|
||||
label: "捐赠日期",
|
||||
lanId: 111,
|
||||
helpfulTip: "填写个人发生的公益慈善事业捐赠的具体日期。",
|
||||
helpfulTipLanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["donateAmount"],
|
||||
fieldcol: 14,
|
||||
label: "捐赠金额",
|
||||
lanId: 111,
|
||||
helpfulTip: "填写个人发生的公益慈善事业捐赠的具体金额。",
|
||||
helpfulTipLanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required",
|
||||
precision: 2,
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["deductionProportion"],
|
||||
fieldcol: 14,
|
||||
label: "扣除比例",
|
||||
lanId: 111,
|
||||
helpfulTip: "填写税法规定的可以公益慈善事业捐赠支出税前扣除比例。如:0.3(30%)或者1(100%),请注意,必须是小数形式的百分比。",
|
||||
helpfulTipLanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required",
|
||||
precision: 2,
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["actualDeduction"],
|
||||
fieldcol: 14,
|
||||
label: "实际扣除金额",
|
||||
lanId: 111,
|
||||
helpfulTip: "填写个人取得“扣除所得项目”对应收入办理扣缴申报或者自行申报时,实际扣除的公益慈善事业捐赠支出金额。",
|
||||
helpfulTipLanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required",
|
||||
precision: 2,
|
||||
viewAttr: 3
|
||||
}
|
||||
],
|
||||
title: "",
|
||||
defaultshow: true,
|
||||
col: 1
|
||||
}],
|
||||
derateDeduction: [{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["incomeCategory"],
|
||||
fieldcol: 14,
|
||||
label: "所得项目",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["derateItem"],
|
||||
fieldcol: 14,
|
||||
label: "减免事项",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["derateProperty"],
|
||||
fieldcol: 14,
|
||||
label: "减免性质",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["derateAmount"],
|
||||
fieldcol: 14,
|
||||
label: "减免金额",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required",
|
||||
precision: 2,
|
||||
viewAttr: 3
|
||||
}
|
||||
],
|
||||
title: "",
|
||||
defaultshow: true,
|
||||
col: 1
|
||||
}],
|
||||
otherDerateDeduction: [{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["incomeCategory"],
|
||||
fieldcol: 14,
|
||||
label: "所得项目",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["otherDeduction"],
|
||||
fieldcol: 14,
|
||||
label: "减免税额",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required",
|
||||
precision: 2,
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["remark"],
|
||||
fieldcol: 14,
|
||||
label: "备注",
|
||||
lanId: 111,
|
||||
helpfulTip: "根据政策要求,一定要在备注中写明具体扣除项目名称,备注不超过20个字符。",
|
||||
helpfulTipLanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
}
|
||||
],
|
||||
title: "",
|
||||
defaultshow: true,
|
||||
col: 1
|
||||
}],
|
||||
personalPension: [{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["incomeCategory"],
|
||||
fieldcol: 14,
|
||||
label: "所得项目",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["voucherTypeName"],
|
||||
fieldcol: 14,
|
||||
label: "凭证类型",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["voucherNo"],
|
||||
fieldcol: 14,
|
||||
label: "凭证编码",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["payAmount"],
|
||||
fieldcol: 14,
|
||||
label: "缴费金额",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required",
|
||||
precision: 2,
|
||||
viewAttr: 3
|
||||
}
|
||||
],
|
||||
title: "",
|
||||
defaultshow: true,
|
||||
col: 1
|
||||
}]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,181 @@
|
|||
/*
|
||||
* 数据采集-其他免税扣除
|
||||
* 明细设置弹框
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2024/12/24
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaDialog, WeaHelpfulTip, WeaLocaleProvider, WeaTools } from "ecCom";
|
||||
import { WeaSwitch } from "comsMobx";
|
||||
import FormInfo from "../../../components/FormInfo";
|
||||
import { taxDetailSettingsConditions } from "./columns";
|
||||
import { Button, message } from "antd";
|
||||
import { getDomkes, toDecimal_n } from "../../../util";
|
||||
import { postFetch } from "../../../util/request";
|
||||
import { getIncomeCategoryList } from "../../../apis/ledger"; //获取薪资类型
|
||||
import cs from "classnames";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("otherDeductStore")
|
||||
@observer
|
||||
class DetailSettingsDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: false, conditions: []
|
||||
};
|
||||
}
|
||||
|
||||
async componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
const { data } = await getIncomeCategoryList();
|
||||
this.setState({
|
||||
conditions: _.map(taxDetailSettingsConditions[nextProps.dataType], item => ({
|
||||
...item, items: _.map(item.items, o => ({
|
||||
...o, options: getKey(o) === "voucherTypeName" ?
|
||||
[{ key: "MONTH", showname: "月度" }, { key: "YEAR", showname: "年度" }] :
|
||||
getKey(o) === "incomeCategory" ? _.map(data, it => ({
|
||||
key: it.value.toString(),
|
||||
showname: <div className="reportTypeName-box">
|
||||
<span>{it.defaultLabel}</span>
|
||||
<span
|
||||
className={cs("reportTypeName", { "danger": it.reportTypeName === getLabel(111, "非居民所得") })}>
|
||||
{it.reportTypeName}
|
||||
</span>
|
||||
</div>
|
||||
})) : []
|
||||
}))
|
||||
}))
|
||||
}, () => {
|
||||
this.props.otherDeductStore.settingsForm.initFormFields(this.state.conditions);
|
||||
if (nextProps.id) _.map(getDomkes(this.state.conditions), domkey => {
|
||||
this.props.otherDeductStore.settingsForm.updateFields({ [domkey]: { value: nextProps.record[domkey].toString() } });
|
||||
});
|
||||
});
|
||||
} else if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||
this.props.otherDeductStore.initSettingsForm();
|
||||
}
|
||||
}
|
||||
|
||||
save = () => {
|
||||
const { otherDeductStore: { settingsForm }, mainId, id, dataType } = this.props;
|
||||
settingsForm.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
let { deductionMonth, incomeCategory, ...payload } = settingsForm.getFormParams();
|
||||
deductionMonth && (payload = { ...payload, deductionMonth: deductionMonth + "-01" });
|
||||
this.setState({ loading: true });
|
||||
postFetch(`/api/bs/hrmsalary/otherDeduction/save${_.upperFirst(dataType)}`, {
|
||||
...payload, mainId, id,
|
||||
incomeCategory: Number(incomeCategory)
|
||||
}).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功!"));
|
||||
this.props.onCancel(this.props.onSuccess);
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
f.showErrors();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { otherDeductStore: { settingsForm } } = this.props, { loading, conditions } = this.state;
|
||||
const itemRender = {
|
||||
freeAmount: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ freeAmount: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
identificationNumber: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }} form={form} formParams={formParams}/>);
|
||||
},
|
||||
effectiveDate: (field, textAreaProps, form, formParams) => {
|
||||
return (<div className="cust">
|
||||
<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }} form={form} formParams={formParams}/>
|
||||
<div className="cus_helpful">
|
||||
<WeaHelpfulTip title={getLabel(field.helpfulTipLanId, field.helpfulTip)}/>
|
||||
</div>
|
||||
</div>);
|
||||
},
|
||||
donateDate: (field, textAreaProps, form, formParams) => {
|
||||
return (<div className="cust">
|
||||
<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }} form={form} formParams={formParams}/>
|
||||
<div className="cus_helpful">
|
||||
<WeaHelpfulTip title={getLabel(field.helpfulTipLanId, field.helpfulTip)}/>
|
||||
</div>
|
||||
</div>);
|
||||
},
|
||||
yearPremium: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ yearPremium: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
monthPremium: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ monthPremium: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
currentDeduction: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ currentDeduction: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
donateAmount: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ donateAmount: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
deductionProportion: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ deductionProportion: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
actualDeduction: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ actualDeduction: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
derateAmount: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ derateAmount: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
otherDeduction: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ otherDeduction: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
payAmount: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ payAmount: { value: toDecimal_n(v, 2) } })}/>);
|
||||
}
|
||||
};
|
||||
if (_.reduce(conditions, (pre, cur) => (pre += cur.items.length), 0) * 47 + 33 === 33) return null;
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} initLoadCss title={getLabel(111, "明细设置")}
|
||||
style={{ width: 480, height: _.reduce(conditions, (pre, cur) => (pre += cur.items.length), 0) * 47 + 33 }}
|
||||
buttons={[
|
||||
<Button type="primary" onClick={this.save} loading={loading}>{getLabel(111, "确定")}</Button>,
|
||||
<Button type="ghost" onClick={() => this.props.onCancel()}>{getLabel(111, "取消")}</Button>
|
||||
]}
|
||||
>
|
||||
<FormInfo className="form-dialog-layout" center={false} itemRender={itemRender}
|
||||
form={settingsForm} formFields={conditions}/>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default DetailSettingsDialog;
|
||||
|
|
@ -31,6 +31,7 @@ import TableRecord from "../components/tableRecord";
|
|||
import { convertToUrlString } from "../../../util/url";
|
||||
import { postFetch } from "../../../util/request";
|
||||
import { getDomkes } from "../../../util";
|
||||
import TaxSetDialog from "./taxSetDialog";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
|
@ -66,7 +67,8 @@ class Index extends Component {
|
|||
exportPayloadType: false,
|
||||
advanceCondition: null,
|
||||
targetid: "",
|
||||
taxAgentOption: []
|
||||
taxAgentOption: [],
|
||||
taxSetDialog: { visible: false, dataType: "", id: "" }
|
||||
};
|
||||
this.tableRef = null;
|
||||
this.addItemRef = null;
|
||||
|
|
@ -301,7 +303,17 @@ class Index extends Component {
|
|||
return {
|
||||
...it, title: getLabel(83871, "数据采集"),
|
||||
items: _.map(it.items, o => ({
|
||||
...o, label: getLabel(o.lanId, o.label)
|
||||
...o, label: getLabel(o.lanId, o.label),
|
||||
extraDom: !_.isEmpty(editId) &&
|
||||
<a href="javascript:void(0);" className="extra_tax" title={getLabel(111, "添加附表")}
|
||||
onClick={() => this.setState({
|
||||
taxSetDialog: {
|
||||
visible: true, dataType: o.dataType, id: editId.id,
|
||||
label: getLabel(o.lanId, o.label)
|
||||
}
|
||||
})}>
|
||||
<i className="icon-coms02-Preview-1"/>
|
||||
</a>
|
||||
}))
|
||||
};
|
||||
}
|
||||
|
|
@ -524,7 +536,7 @@ class Index extends Component {
|
|||
const { taxAgentStore: { showOperateBtn }, otherDeductStore: { form } } = this.props;
|
||||
const {
|
||||
declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition,
|
||||
importPayload, exportPayloadType, targetid
|
||||
importPayload, exportPayloadType, targetid, taxSetDialog
|
||||
} = this.state;
|
||||
const tablePayload = { declareMonth: [declareMonth], taxAgentId };
|
||||
return (
|
||||
|
|
@ -547,6 +559,8 @@ class Index extends Component {
|
|||
onViewDetails={(record) => this.handleAddData("其他免税扣除记录", record)}
|
||||
form={form}
|
||||
/>
|
||||
<TaxSetDialog {...taxSetDialog}
|
||||
onCancel={() => this.setState({ taxSetDialog: { ...taxSetDialog, visible: false } })}/>
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,143 @@
|
|||
/*
|
||||
* 其他免税扣除设置
|
||||
*
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2024/12/24
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaButtonIcon, WeaDialog, WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import { message, Modal, Spin } from "antd";
|
||||
import { postFetch } from "../../../util/request";
|
||||
import DetailSettingsDialog from "./detailSettingsDialog";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class TaxSetDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
dataSource: [], columns: [], loading: false, pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||
selectedRowKeys: [], detailSettingsDialog: { visible: false, dataType: "", mainId: "", id: "", record: {} }
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
this.setState({
|
||||
detailSettingsDialog: { ...this.state.detailSettingsDialog, dataType: nextProps.dataType, mainId: nextProps.id }
|
||||
}, () => this.getList(nextProps));
|
||||
} else if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||
this.setState({
|
||||
dataSource: [],
|
||||
columns: [],
|
||||
loading: false,
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||
selectedRowKeys: [],
|
||||
detailSettingsDialog: { visible: false }
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
getList = (props) => {
|
||||
const { id, dataType, viewParams = {} } = props || this.props, { pageInfo, detailSettingsDialog } = this.state;
|
||||
this.setState({ loading: true });
|
||||
postFetch(`/api/bs/hrmsalary/otherDeduction/${dataType}List`, { ...pageInfo, ...viewParams, id })
|
||||
.then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
|
||||
this.setState({
|
||||
dataSource, pageInfo: { current, pageSize, total }, columns: _.map(columns, o => ({
|
||||
...o,
|
||||
width: o.dataIndex === "operate" && 120,
|
||||
render: (text, record) => o.dataIndex === "operate" ? (<div className="space_div">
|
||||
<a href="javascript:void(0);" onClick={() => this.setState({
|
||||
detailSettingsDialog: { ...detailSettingsDialog, visible: true, id: record.id, record }
|
||||
})}>{getLabel(111, "编辑")}</a>
|
||||
<a href="javascript:void(0);"
|
||||
onClick={() => this.handleDelete([record.id])}>{getLabel(111, "删除")}</a>
|
||||
</div>) : (<span>{text}</span>)
|
||||
}))
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
handleDelete = (ids = []) => {
|
||||
const { selectedRowKeys } = this.state, { dataType, id: mainId } = this.props;
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(388758, "确认要删除吗?"),
|
||||
onOk: () => {
|
||||
postFetch(`/api/bs/hrmsalary/otherDeduction/delete${_.upperFirst(dataType)}`, { ids, mainId })
|
||||
.then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(502230, "删除成功!"));
|
||||
this.setState({ selectedRowKeys: _.difference(selectedRowKeys, ids) }, () => this.getList());
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { pageInfo, dataSource, loading, columns, selectedRowKeys, detailSettingsDialog } = this.state;
|
||||
const { viewParams } = this.props;
|
||||
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: 1, pageSize } }, () => this.getList());
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({ pageInfo: { ...pageInfo, current } }, () => this.getList());
|
||||
}
|
||||
};
|
||||
const rowSelection = {
|
||||
selectedRowKeys, onChange: (selectedRowKeys) => this.setState({ selectedRowKeys })
|
||||
};
|
||||
return (<WeaDialog {...this.props} initLoadCss className="sys-salary-wrapper" ref={dom => this.taxSetRef = dom}
|
||||
title={`${getLabel(111, "附表明细")}(${this.props.label})`}
|
||||
style={{
|
||||
width: "60vw", height: 600, minHeight: 200, minWidth: 380, maxHeight: "90%",
|
||||
maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
|
||||
}}>
|
||||
<div className="sys-item-table-box">
|
||||
<Spin spinning={loading && pageInfo.total === 0}>
|
||||
{
|
||||
_.isEmpty(viewParams) && <div className="sys-item-table-opts">
|
||||
<WeaButtonIcon buttonType="add" type="primary" title={getLabel(111, "添加")}
|
||||
onClick={() => this.setState({
|
||||
detailSettingsDialog: { ...detailSettingsDialog, visible: true }
|
||||
})}/>
|
||||
<WeaButtonIcon buttonType="del" type="primary" title={getLabel(111, "删除")}
|
||||
disabled={_.isEmpty(selectedRowKeys)} onClick={() => {
|
||||
if (_.isEmpty(selectedRowKeys)) {
|
||||
message.warning(getLabel(111, "请选择要删除的数据!"));
|
||||
return;
|
||||
}
|
||||
this.handleDelete(selectedRowKeys);
|
||||
}}/>
|
||||
</div>
|
||||
}
|
||||
<WeaTable columns={!_.isEmpty(viewParams) ? _.filter(columns, o => o.dataIndex !== "operate") : columns}
|
||||
dataSource={dataSource} pagination={pagination} bordered
|
||||
rowSelection={rowSelection} loading={loading} rowKey="id"
|
||||
scroll={{ y: this.taxSetRef ? this.taxSetRef.state.height - 164 : 600 }}/>
|
||||
<DetailSettingsDialog {...detailSettingsDialog} onCancel={(callback) => this.setState({
|
||||
detailSettingsDialog: { ...detailSettingsDialog, visible: false, id: "" }
|
||||
}, () => callback && callback())} onSuccess={this.getList}/>
|
||||
</Spin>
|
||||
</div>
|
||||
</WeaDialog>);
|
||||
}
|
||||
}
|
||||
|
||||
export default TaxSetDialog;
|
||||
|
|
@ -4,7 +4,7 @@ export const declareConditions = [
|
|||
{
|
||||
colSpan: 1,
|
||||
conditionType: "MONTHPICKER",
|
||||
domkey: ["salaryMonthStr"],
|
||||
domkey: ["salaryMonth"],
|
||||
fieldcol: 14,
|
||||
label: "薪资所属月",
|
||||
lanId: 542604,
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { inject, observer } from "mobx-react";
|
|||
import { WeaDialog, WeaLocaleProvider, WeaTools } from "ecCom";
|
||||
import { Button, message } from "antd";
|
||||
import { getSearchs } from "../../../../util";
|
||||
import { saveDeclare } from "../../../../apis/declare";
|
||||
import { saveDeclare, taxdeclarationGetRate } from "../../../../apis/declare";
|
||||
import { declareConditions } from "./condition";
|
||||
import { postFetch } from "../../../../util/request";
|
||||
import * as API from "../../../../apis/ruleconfig";
|
||||
|
|
@ -48,7 +48,7 @@ class Index extends Component {
|
|||
options: _.map(data, g => ({ key: String(g.id), showname: g.name }))
|
||||
// helpfulTitle: getLabel(563420, "提示:可选择单个个税扣缴义务人进行申报,若不选择,则批量对管理下的所有个税扣缴义务人进行申报;")
|
||||
};
|
||||
} else if (getKey(o) === "salaryMonthStr") {
|
||||
} else if (getKey(o) === "salaryMonth") {
|
||||
return {
|
||||
...o,
|
||||
label: sysinfo["TAX_DECLARATION_DATE_TYPE"] === "1" ? getLabel(111, "税款所属期") : getLabel(111, "薪资所属月")
|
||||
|
|
@ -65,19 +65,43 @@ class Index extends Component {
|
|||
const { declareStore: { declareForm } } = this.props;
|
||||
declareForm.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
const payload = declareForm.getFormParams();
|
||||
const { salaryMonth, ...payload } = declareForm.getFormParams();
|
||||
this.setState({ loading: true });
|
||||
saveDeclare({
|
||||
...payload, taxCycle: `${payload.salaryMonthStr}-01`, salaryDate: `${payload.salaryMonthStr}-01`
|
||||
}).then(({ status, errormsg }) => {
|
||||
...payload, salaryMonth: salaryMonth + "-01",
|
||||
taxCycle: `${salaryMonth}-01`,
|
||||
salaryDate: `${salaryMonth}-01`
|
||||
}).then(async ({ status, data, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.destroy();
|
||||
message.loading(getLabel(111, "生成中..."), 0);
|
||||
this.timer = setInterval(async () => {
|
||||
const { status: resStatus, data: result } = await taxdeclarationGetRate({ index: data });
|
||||
const { status: rateStatus, finish, msg } = result;
|
||||
if (resStatus && rateStatus) {
|
||||
if (finish) {
|
||||
clearInterval(this.timer);
|
||||
message.destroy();
|
||||
message.success(getLabel(30700, "操作成功"));
|
||||
this.props.onCancel("refresh");
|
||||
}
|
||||
} else {
|
||||
clearInterval(this.timer);
|
||||
message.destroy();
|
||||
message.warning(msg);
|
||||
}
|
||||
}, 1000);
|
||||
} else {
|
||||
clearInterval(this.timer);
|
||||
message.destroy();
|
||||
message.warning(errormsg);
|
||||
}
|
||||
}).catch(() => {
|
||||
message.destroy();
|
||||
clearInterval(this.timer);
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(30700, "操作成功"));
|
||||
this.props.onCancel("refresh");
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
});
|
||||
} else {
|
||||
f.showErrors();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import { Dropdown, Menu, message, Modal } from "antd";
|
||||
import { getDeclareList, withDrawTaxDeclaration } from "../../../../apis/declare";
|
||||
import { Dropdown, Menu, message, Modal, Tag } from "antd";
|
||||
import { getDeclareList, taxdeclarationUpdateIcon, withDrawTaxDeclaration } from "../../../../apis/declare";
|
||||
import { sysConfCodeRule, sysinfo } from "../../../../apis/ruleconfig";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
|
@ -31,8 +31,9 @@ class Index extends Component {
|
|||
}
|
||||
|
||||
sysConfCodeRule = () => {
|
||||
const { showOperateBtn } = this.props;
|
||||
sysConfCodeRule({ code: "WITHDRAW_TAX_DECLARATION" }).then(({ status, data }) => {
|
||||
if (status && data === "1") this.setState({ showWithDrawBtn: data === "1" });
|
||||
if (status && data === "1") this.setState({ showWithDrawBtn: data === "1" && showOperateBtn });
|
||||
});
|
||||
};
|
||||
getDeclareList = async (props) => {
|
||||
|
|
@ -51,7 +52,7 @@ class Index extends Component {
|
|||
this.setState({
|
||||
dataSource, pageInfo: { ...pageInfo, pageNum, pageSize, total },
|
||||
columns: _.map(columns, o => {
|
||||
const { dataIndex } = o;
|
||||
const { dataIndex, displayIcon } = o;
|
||||
let width = "";
|
||||
switch (dataIndex) {
|
||||
case "taxAgentName":
|
||||
|
|
@ -65,12 +66,41 @@ class Index extends Component {
|
|||
width = "10%";
|
||||
break;
|
||||
}
|
||||
if (dataIndex === "taxDeclareStatusDesc") {
|
||||
return {
|
||||
...o, width,
|
||||
render: (text, record) => {
|
||||
return (<div className="declare-status-box">
|
||||
{text}
|
||||
{
|
||||
displayIcon &&
|
||||
<span title={getLabel(545219, "该个税申报表对应的核算数据被重新核算")} className="icon-span">
|
||||
<Tag closable onClose={() => this.handleUpdateicon(record)}>
|
||||
<i className="icon-coms02-Warning-01"/>
|
||||
</Tag>
|
||||
</span>
|
||||
}
|
||||
</div>);
|
||||
}
|
||||
};
|
||||
}
|
||||
return { ...o, width };
|
||||
})
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
handleUpdateicon = (record) => {
|
||||
const { id: taxDeclareRecordId } = record;
|
||||
taxdeclarationUpdateIcon({ taxDeclareRecordId }).then(({ status, errormsg }) => {
|
||||
this.getDeclareList(this.props);
|
||||
if (status) {
|
||||
message.success(getLabel(502230, "删除成功!"));
|
||||
} else {
|
||||
message.error(errormsg || getLabel(20462, "删除失败!"));
|
||||
}
|
||||
});
|
||||
};
|
||||
taxdeclarationDelete = (taxDeclarationId) => {
|
||||
withDrawTaxDeclaration({ taxDeclarationId }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
|
|
@ -113,7 +143,7 @@ class Index extends Component {
|
|||
const { id, opts = [] } = record;
|
||||
return <React.Fragment>
|
||||
<a
|
||||
href={`${window.ecologyContentPath || ""}/spa/hrmSalary/static/index.html#/main/hrmSalary/generateDeclarationDetail?id=${id}`}
|
||||
href={`${window.ecologyContentPath || ""}/spa/hrmSalary/static/index.html#/main/hrmSalary/declareDetail?id=${id}`}
|
||||
target="_blank"
|
||||
>
|
||||
{getLabel(83110, "查看详情")}
|
||||
|
|
@ -137,18 +167,16 @@ class Index extends Component {
|
|||
{getLabel(32025, "撤回")}
|
||||
</a>
|
||||
}
|
||||
{
|
||||
showWithDrawBtn && <Dropdown overlay={
|
||||
<Menu>
|
||||
<Menu.Item>
|
||||
<a href="javascript:void(0)"
|
||||
onClick={() => this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<a href="javascript:void(0)" style={{ marginLeft: 10 }}><i className="icon-coms-more"/></a>
|
||||
</Dropdown>
|
||||
}
|
||||
<Dropdown overlay={
|
||||
<Menu>
|
||||
<Menu.Item>
|
||||
<a href="javascript:void(0)"
|
||||
onClick={() => this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<a href="javascript:void(0)" style={{ marginLeft: 10 }}><i className="icon-coms-more"/></a>
|
||||
</Dropdown>
|
||||
</React.Fragment>;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ class Calculate extends Component {
|
|||
|
||||
render() {
|
||||
const { queryParams, isRefresh, declareDaialog, logDialogVisible, filterConditions } = this.state;
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
return (
|
||||
<WeaTop title={getLabel(543353, "个税申报")} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
buttons={this.renderCalculateOpts()} className="declare-main-layout" showDropIcon
|
||||
|
|
@ -84,7 +85,7 @@ class Calculate extends Component {
|
|||
}
|
||||
]}>
|
||||
<div className="declare-body">
|
||||
<DeclareTablelist queryParams={queryParams} isRefresh={isRefresh}
|
||||
<DeclareTablelist queryParams={queryParams} isRefresh={isRefresh} showOperateBtn={showOperateBtn}
|
||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}/>
|
||||
<DeclareDialog {...declareDaialog}
|
||||
onCancel={(bool) => this.setState({
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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, "生成申报表")}
|
||||
</Button>
|
||||
}
|
||||
</div>
|
||||
|
|
@ -147,21 +158,38 @@ export default class Declare extends React.Component {
|
|||
<CustomTable
|
||||
loading={loading}
|
||||
columns={[
|
||||
...columns,
|
||||
..._.map(columns, it => {
|
||||
if (it.dataIndex === "taxDeclareStatusDesc") {
|
||||
return {
|
||||
...it,
|
||||
render: (text, record) => {
|
||||
return (<div className="declare-status-box">
|
||||
{text}
|
||||
{
|
||||
record.displayIcon &&
|
||||
<span title={getLabel(111, "该个税申报表对应的核算数据被重新核算")} className="icon-span">
|
||||
<Tag closable onClose={() => this.handleUpdateicon(record)}>
|
||||
<i className="icon-coms02-Warning-01"/>
|
||||
</Tag>
|
||||
</span>
|
||||
}
|
||||
</div>);
|
||||
}
|
||||
};
|
||||
}
|
||||
return { ...it };
|
||||
}),
|
||||
{
|
||||
title: "操作",
|
||||
dataIndex: "operate",
|
||||
render: (text, record) => {
|
||||
return (
|
||||
<React.Fragment>
|
||||
<a href="javascript:void(0);"
|
||||
onClick={() => {
|
||||
window.open(
|
||||
"/spa/hrmSalary/static/index.html#/main/hrmSalary/generateDeclarationDetail?id=" +
|
||||
record.id
|
||||
);
|
||||
}}>
|
||||
查看
|
||||
<a
|
||||
href={`${window.ecologyContentPath || ""}/spa/hrmSalary/static/index.html#/main/hrmSalary/declareDetail?id=${record.id}`}
|
||||
target="_blank"
|
||||
>
|
||||
{getLabel(83110, "查看详情")}
|
||||
</a>
|
||||
{
|
||||
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, "删除")}
|
||||
</a>
|
||||
}
|
||||
</React.Fragment>
|
||||
|
|
|
|||
|
|
@ -89,3 +89,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,181 @@
|
|||
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: []
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "SELECT",
|
||||
domkey: ["paymentNumber"],
|
||||
fieldcol: 12,
|
||||
label: "缴款帐号",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 1,
|
||||
options: []
|
||||
}
|
||||
],
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
export const incomeTaxDecConditions = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["employeeId"],
|
||||
fieldcol: 16,
|
||||
label: "姓名",
|
||||
lanId: 25034,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3,
|
||||
options: []
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["jobNum"],
|
||||
fieldcol: 16,
|
||||
label: "工号",
|
||||
lanId: 1933,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
viewAttr: 1
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["cardNum"],
|
||||
fieldcol: 16,
|
||||
label: "证件号码",
|
||||
lanId: 1839,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
viewAttr: 1
|
||||
}
|
||||
],
|
||||
title: "baseInfo",
|
||||
defaultshow: true
|
||||
},
|
||||
{
|
||||
items: [],
|
||||
title: "salaryItems",
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
//个税申报表-tab新增删除
|
||||
export const taxTabConditions = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "SELECT",
|
||||
domkey: ["incomeCategory"],
|
||||
fieldcol: 14,
|
||||
label: "申报表类型",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
options: [],
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
}
|
||||
],
|
||||
defaultshow: true,
|
||||
title: ""
|
||||
}
|
||||
];
|
||||
// 查看附表对应字段
|
||||
export const appendixFields = [
|
||||
{ dataIndex: "taxFreeIncome", dataType: "freeIncome" },
|
||||
{ dataIndex: "commercialHealthInsurance", dataType: "healthInsurance" },
|
||||
{ dataIndex: "taxDeferredEndowmentInsurance", dataType: "endowmentInsurance" },
|
||||
{ dataIndex: "allowedDonation", dataType: "grantDonation" },
|
||||
{ dataIndex: "taxDeduction", dataType: "derateDeduction" },
|
||||
{ dataIndex: "other", dataType: "otherDerateDeduction" },
|
||||
{ dataIndex: "", dataType: "personalPension" }
|
||||
];
|
||||
|
|
@ -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 (
|
||||
<WeaDialog
|
||||
{...this.props}
|
||||
scalable hasScroll className="declareResultDialog" initLoadCss
|
||||
title={
|
||||
type.length === 1 ?
|
||||
(<Row className="declareResultDialogTitle" type="flex">
|
||||
<Col span={12} className="declareResultDialogTitle-left">
|
||||
<span className="title">{this.props.title}</span>
|
||||
</Col>
|
||||
<Col span={12} className="declareResultDialogTitle-right">
|
||||
<Button type="primary" onClick={this.failExport}>{getLabel(17416, "导出")}</Button>
|
||||
</Col>
|
||||
</Row>) :
|
||||
<WeaReqTop
|
||||
title={this.props.title} buttonSpace={10} tabDatas={type} selectedKey={selectedKey}
|
||||
buttons={[
|
||||
<Button type="primary" onClick={this.errorExport}>{getLabel(17416, "导出")}</Button>
|
||||
]}
|
||||
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)"
|
||||
}}
|
||||
>
|
||||
<div className="declareResultDialogContent">
|
||||
{
|
||||
type.length !== 1 &&
|
||||
< div className="declareNoSearchBox">
|
||||
<WeaInputSearch
|
||||
style={{ width: 200 }} placeholder={getLabel(111, "请输入姓名/工号/身份证号")}
|
||||
value={keyword} onChange={val => this.setState({ keyword: val })}
|
||||
onSearch={this.queryList}
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
<WeaTable
|
||||
columns={columns} dataSource={dataSource}
|
||||
loading={loading} className="declareTable"
|
||||
pagination={pagination}
|
||||
/>
|
||||
</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default DeclareResultDialog;
|
||||
|
|
@ -0,0 +1,196 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 个税申报人员-新增与编辑
|
||||
* Description:
|
||||
* Date: 2023/12/27
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { incomeTaxDecConditions } from "./constants";
|
||||
import { WeaLocaleProvider, WeaSlideModal, WeaTools } from "ecCom";
|
||||
import { Button, Col, message, Row } from "antd";
|
||||
import { getConditionDomkeys, getSearchs, toDecimal_n } from "../../../util";
|
||||
import * as API from "../../../apis/declare";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const getKey = WeaTools.getKey;
|
||||
const APIFOX = {
|
||||
add: API.taxdeclarationAdd,
|
||||
edit: API.taxdeclarationEdit
|
||||
};
|
||||
|
||||
@inject("declareStore")
|
||||
@observer
|
||||
class IncomeTaxDeclarationPersonnelSlide extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
conditions: [], employeeDeclares: [], taxReportColumns: [],
|
||||
loading: false, detailInfo: {}
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.getTaxDecForm(nextProps);
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||
const { declareStore: { initTaxDecForm } } = nextProps;
|
||||
this.setState({
|
||||
conditions: [], employeeDeclares: [], taxReportColumns: [],
|
||||
loading: false, detailInfo: {}
|
||||
}, () => initTaxDecForm());
|
||||
}
|
||||
}
|
||||
|
||||
getTaxDecForm = (props) => {
|
||||
const { taxDeclarationId, id } = props;
|
||||
API.getTaxDecForm({ taxDeclarationId }).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { employeeDeclares, taxReportColumns } = data;
|
||||
this.setState({
|
||||
employeeDeclares, taxReportColumns,
|
||||
conditions: _.map(incomeTaxDecConditions, item => {
|
||||
if (item.title === "baseInfo") {
|
||||
return {
|
||||
...item, title: getLabel(1361, "基本信息"),
|
||||
items: _.map(item.items, o => {
|
||||
if (getKey(o) === "employeeId") {
|
||||
if (!id) {
|
||||
return {
|
||||
...o, otherParams: { showSearch: true, optionFilterProp: "children" },
|
||||
label: getLabel(o.lanId, o.label),
|
||||
options: _.map(employeeDeclares, g => ({
|
||||
key: g.employeeId.toString(),
|
||||
showname: g.employeeName
|
||||
}))
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
conditionType: "INPUT",
|
||||
domkey: ["username"],
|
||||
fieldcol: 16,
|
||||
label: getLabel(25034, "姓名"),
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
viewAttr: 1
|
||||
};
|
||||
}
|
||||
}
|
||||
return { ...o, label: getLabel(o.lanId, o.label) };
|
||||
})
|
||||
};
|
||||
} else if (item.title === "salaryItems") {
|
||||
return {
|
||||
...item, title: getLabel(111, "薪资项"),
|
||||
items: _.map(taxReportColumns, o => ({
|
||||
conditionType: o.dataType === "number" ? "INPUTNUMBER" : "INPUT",
|
||||
domkey: [o.reportColumnDataIndex],
|
||||
fieldcol: 16,
|
||||
label: o.reportColumnName,
|
||||
labelcol: 8,
|
||||
value: o.dataType === "number" ? 0 : "",
|
||||
rules: o.dataType === "number" ? "required" : "",
|
||||
otherParams: { precision: 2 },
|
||||
viewAttr: o.dataType === "number" ? 3 : 2
|
||||
}))
|
||||
};
|
||||
}
|
||||
})
|
||||
}, () => {
|
||||
const { declareStore: { taxDecForm } } = props;
|
||||
taxDecForm.initFormFields(this.state.conditions);
|
||||
id && this.getTaxdeclarationDetailInfo(id);
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
getTaxdeclarationDetailInfo = (id) => {
|
||||
API.getTaxdeclarationDetailInfo({ id }).then(({ status, data, errormsg }) => {
|
||||
if (status) {
|
||||
const { conditions } = this.state;
|
||||
const { declareStore: { taxDecForm } } = this.props;
|
||||
const detailInfo = { ...data, ...data["resultValue"] };
|
||||
this.setState({
|
||||
detailInfo: detailInfo
|
||||
}, () => {
|
||||
_.forEach(getConditionDomkeys(conditions), o => {
|
||||
taxDecForm.updateFields({
|
||||
[o]: this.state.detailInfo[o] || ""
|
||||
});
|
||||
});
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
this.props.onClose();
|
||||
}
|
||||
});
|
||||
};
|
||||
handleFormChange = (params) => {
|
||||
const { declareStore: { taxDecForm } } = this.props;
|
||||
const { employeeDeclares } = this.state;
|
||||
const key = Object.keys(params)[0];
|
||||
const value = params[key].value;
|
||||
if (key === "employeeId") {
|
||||
taxDecForm.updateFields({
|
||||
jobNum: _.find(employeeDeclares, o => o.employeeId == value).jobNum,
|
||||
cardNum: _.find(employeeDeclares, o => o.employeeId == value).cardNum
|
||||
});
|
||||
}
|
||||
};
|
||||
save = () => {
|
||||
const { declareStore: { taxDecForm }, taxDeclarationId, id } = this.props;
|
||||
const { employeeDeclares, detailInfo } = this.state;
|
||||
const type = id ? "edit" : "add";
|
||||
taxDecForm.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
const { cardNum, jobNum, employeeId, ...taxReportColumnValues } = taxDecForm.getFormParams();
|
||||
const payload = {
|
||||
taxDeclarationId, employeeId: employeeId || detailInfo.employeeId,
|
||||
employeeType: employeeId ? _.find(employeeDeclares, o => o.employeeId == employeeId).employeeType : detailInfo.employeeType,
|
||||
taxReportColumnValues: _.reduce(_.keys(taxReportColumnValues), (pre, cur) => {
|
||||
if (Object.prototype.toString.call(taxReportColumnValues[cur]) === "[object Number]") {
|
||||
return { ...pre, [cur]: toDecimal_n(taxReportColumnValues[cur], 2) };
|
||||
} else {
|
||||
return { ...pre, [cur]: taxReportColumnValues[cur] };
|
||||
}
|
||||
}, {})
|
||||
};
|
||||
this.setState({ loading: true });
|
||||
APIFOX[type](type === "add" ? payload : { ...payload, id }).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(30700, "操作成功!"));
|
||||
this.props.onClose(true);
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
} else {
|
||||
f.showErrors();
|
||||
}
|
||||
});
|
||||
};
|
||||
renderTitle = () => {
|
||||
return <Row className="declareSchemeDialogTitle" type="flex">
|
||||
<Col span={12} className="declareSchemeDialogTitle-left">
|
||||
<div className="icon-circle-base"><i className="icon-coms-fa"/></div>
|
||||
<span className="title">{this.props.title}</span>
|
||||
</Col>
|
||||
<Col span={12} className="declareSchemeDialogTitle-right">
|
||||
<Button type="primary" loading={this.state.loading} onClick={this.save}>{getLabel(537558, "保存")}</Button>
|
||||
</Col>
|
||||
</Row>;
|
||||
};
|
||||
|
||||
render() {
|
||||
const { declareStore: { taxDecForm } } = this.props;
|
||||
const { conditions } = this.state;
|
||||
return (
|
||||
<WeaSlideModal {...this.props} className="incomeTaxDecPerSlideWrapper" onClose={() => this.props.onClose()}
|
||||
top={0} width={60} height={100} measure="%" direction="right" title={this.renderTitle()}
|
||||
content={getSearchs(taxDecForm, conditions, 2, false, this.handleFormChange)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default IncomeTaxDeclarationPersonnelSlide;
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 报表查看-左侧tab标题
|
||||
* Description:
|
||||
* Date: 2023/4/20
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
import { Menu } from "antd";
|
||||
import * as API from "../../../apis/declare";
|
||||
import { getQueryString } from "../../../util/url";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
class LeftTab extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
reportName: "",
|
||||
selectedKeys: "",
|
||||
dataSource: []
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.getTaxReports();
|
||||
}
|
||||
|
||||
getTaxReports = () => {
|
||||
const { onChangeTab, onCollapse } = this.props;
|
||||
API.getTaxReports({ id: getQueryString("id") }).then(({ status, data: dataSource }) => {
|
||||
if (status) this.setState({
|
||||
dataSource, selectedKeys: !_.isEmpty(dataSource) ? _.head(dataSource).id + "" : ""
|
||||
}, () => {
|
||||
!_.isEmpty(this.state.dataSource) && onChangeTab(_.head(this.state.dataSource).reportType);
|
||||
onCollapse(!_.isEmpty(this.state.dataSource) && this.state.dataSource.length > 1);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { selectedKeys, dataSource } = this.state;
|
||||
const { onChangeTab } = this.props;
|
||||
const reportTypeNameMap = {
|
||||
1: getLabel(111, "综合所得"),
|
||||
2: getLabel(111, "分类所得"),
|
||||
3: getLabel(111, "非居民所得"),
|
||||
4: getLabel(111, "限售股所得")
|
||||
};
|
||||
return (
|
||||
<div className="leftTabWrapper">
|
||||
<Menu mode="inline" selectedKeys={selectedKeys}
|
||||
onClick={({ key }) => {
|
||||
this.setState({ selectedKeys: key }, () => {
|
||||
onChangeTab(_.find(dataSource, o => String(o.id) === key).reportType, true);
|
||||
});
|
||||
}}
|
||||
>
|
||||
{
|
||||
_.map(dataSource, item => {
|
||||
const { reportType, id } = item;
|
||||
return <Menu.Item key={id + ""}>{reportTypeNameMap[reportType]}</Menu.Item>;
|
||||
})
|
||||
}
|
||||
</Menu>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default LeftTab;
|
||||
|
|
@ -0,0 +1,365 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 在线申报-缴款按钮
|
||||
* Description:
|
||||
* Date: 2023/8/22
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLoadingGlobal, WeaLocaleProvider } from "ecCom";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Button, 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: <div>
|
||||
<div style={{ textAlign: "center" }}>{getLabel(111, "确定要进行三方缴款吗?")}</div>
|
||||
<div
|
||||
style={{ textAlign: "center" }}>{getLabel(111, "若申请过银行缴款,点击确定,将自动作废银行缴款凭证。并进行三方缴款。 ")}</div>
|
||||
</div>,
|
||||
onOk: () => {
|
||||
taxPaymentTaxAmount({ taxDeclareRecordId: getQueryString("id"), reportType: this.props.reportType })
|
||||
.then(({ status, data, errormsg }) => {
|
||||
if (status) {
|
||||
const { paymentDialog } = this.state;
|
||||
this.setState({
|
||||
paymentDialog: {
|
||||
...paymentDialog, visible: true,
|
||||
title: getLabel(111, "应缴纳"), taxAmount: data.amount,
|
||||
buttons: [
|
||||
<Button type="primary" onClick={this.taxPaymentgetAgreement}>{getLabel(111, "确认缴款")}</Button>
|
||||
],
|
||||
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: taxYearMonth + "-01",
|
||||
reportType: this.props.reportType
|
||||
};
|
||||
this.setState({
|
||||
paymentDialog: {
|
||||
...this.state.paymentDialog,
|
||||
buttons: [
|
||||
<Button type="primary" loading={true}>{getLabel(111, "确认缴款")}</Button>
|
||||
]
|
||||
}
|
||||
});
|
||||
taxPaymentgetAgreement(payload).then(({ status, data, errormsg }) => {
|
||||
if (status) {
|
||||
this.handleCancel();
|
||||
this.getBankAccountInfo({ ...payload, requestId: data });
|
||||
} else {
|
||||
this.setState({
|
||||
paymentDialog: {
|
||||
...this.state.paymentDialog,
|
||||
buttons: [
|
||||
<Button type="primary" onClick={() => this.taxPaymentgetAgreement()}
|
||||
loading={false}>{getLabel(111, "确认缴款")}</Button>
|
||||
]
|
||||
}
|
||||
});
|
||||
message.error(errormsg);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.setState({
|
||||
paymentDialog: {
|
||||
...this.state.paymentDialog,
|
||||
buttons: [
|
||||
<Button type="primary" onClick={() => this.taxPaymentgetAgreement()}
|
||||
loading={false}>{getLabel(111, "确认缴款")}</Button>
|
||||
]
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
getBankAccountInfo = (payload) => {
|
||||
let loop = () => {
|
||||
WeaLoadingGlobal.start({ tip: getLabel(111, "获取三方信息中...") });
|
||||
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) {
|
||||
WeaLoadingGlobal.destroy();
|
||||
const { feedbacks, bankForm } = form;
|
||||
const { paymentDialog } = this.state;
|
||||
this.setState({
|
||||
paymentDialog: {
|
||||
...paymentDialog, visible: true,
|
||||
title: getLabel(111, "银行账号信息"),
|
||||
buttons: [
|
||||
<Button type="primary" onClick={this.taxPaymentAgreemenPay}>{getLabel(826, "确定")}</Button>
|
||||
],
|
||||
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 }))
|
||||
};
|
||||
} else if (key === "paymentNumber") {
|
||||
return {
|
||||
...it,
|
||||
value: !_.isEmpty(bankForm) ? bankForm.bank : "",
|
||||
options: _.map(feedbacks, o => ({ key: o.sfxyh, showname: o.jkzh }))
|
||||
};
|
||||
}
|
||||
return { ...it };
|
||||
})
|
||||
};
|
||||
})
|
||||
}
|
||||
});
|
||||
} else {
|
||||
loop();
|
||||
}
|
||||
} else {
|
||||
message.warning(errormsg);
|
||||
clearTimeout(this.timer);
|
||||
WeaLoadingGlobal.destroy();
|
||||
}
|
||||
}, 800);
|
||||
};
|
||||
loop();
|
||||
};
|
||||
taxPaymentAgreemenPay = () => {
|
||||
const { paymentDialog } = this.state;
|
||||
const { taxAmount } = paymentDialog;
|
||||
const { declareStore: { paymentForm }, reportType } = this.props;
|
||||
const { taxCycle: taxYearMonth, taxAgentId } = this.props.declareInfo;
|
||||
paymentForm.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
const { protocolNumber, paymentNumber } = paymentForm.getFormDatas();
|
||||
const payload = {
|
||||
taxDeclareRecordId: getQueryString("id"),
|
||||
taxYearMonth: taxYearMonth + "-01",
|
||||
taxAgentId, taxAmount, protocolNumber: protocolNumber.value,
|
||||
reportType, paymentNumber: paymentNumber.valueSpan
|
||||
};
|
||||
this.setState({
|
||||
paymentDialog: {
|
||||
...this.state.paymentDialog,
|
||||
buttons: [
|
||||
<Button type="primary" loading={true}>{getLabel(826, "确定")}</Button>
|
||||
]
|
||||
}
|
||||
});
|
||||
taxPaymentAgreemenPay(payload).then(({ status, errormsg }) => {
|
||||
this.setState({
|
||||
paymentDialog: {
|
||||
...this.state.paymentDialog,
|
||||
buttons: [
|
||||
<Button type="primary" loading={false}
|
||||
onClick={this.taxPaymentAgreemenPay}>{getLabel(826, "确定")}</Button>
|
||||
]
|
||||
}
|
||||
});
|
||||
if (status) {
|
||||
message.success(getLabel(111, "缴款处理中,请稍后点击缴款反馈按钮获取缴款信息"));
|
||||
this.handleCancel();
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
}).catch(() => this.setState({
|
||||
paymentDialog: {
|
||||
...this.state.paymentDialog,
|
||||
buttons: [
|
||||
<Button type="primary" loading={false}
|
||||
onClick={this.taxPaymentAgreemenPay}>{getLabel(826, "确定")}</Button>
|
||||
]
|
||||
}
|
||||
}));
|
||||
} else {
|
||||
f.showErrors();
|
||||
}
|
||||
});
|
||||
};
|
||||
handleMenuChange = ({ key }) => {
|
||||
if (key === "bank_voucher_payment") {
|
||||
taxPaymentTaxAmount({ taxDeclareRecordId: getQueryString("id"), reportType: this.props.reportType })
|
||||
.then(({ status, data, errormsg }) => {
|
||||
if (status) {
|
||||
const { paymentDialog } = this.state;
|
||||
this.setState({
|
||||
paymentDialog: {
|
||||
...paymentDialog, visible: true, title: getLabel(111, "应缴纳"),
|
||||
buttons: [
|
||||
<Button type="primary" onClick={this.taxPaymentVoucherPrint}>{getLabel(111, "确认缴款")}</Button>
|
||||
],
|
||||
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: taxYearMonth + "-01",
|
||||
reportType: this.props.reportType
|
||||
};
|
||||
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: taxYearMonth + "-01"
|
||||
};
|
||||
this.setState({
|
||||
paymentDialog: {
|
||||
...this.state.paymentDialog,
|
||||
buttons: [
|
||||
<Button type="primary" loading={true}>{getLabel(111, "确认缴款")}</Button>
|
||||
]
|
||||
}
|
||||
});
|
||||
taxPaymentVoucherPrint(payload).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(111, "处理中,请稍后点击缴款反馈!"));
|
||||
this.handleCancel();
|
||||
} else {
|
||||
this.setState({
|
||||
paymentDialog: {
|
||||
...this.state.paymentDialog,
|
||||
buttons: [
|
||||
<Button type="primary" onClick={() => this.taxPaymentVoucherPrint()}
|
||||
loading={false}>{getLabel(111, "确认缴款")}</Button>
|
||||
]
|
||||
}
|
||||
});
|
||||
message.error(errormsg || getLabel(111, "缴款反馈失败!"));
|
||||
}
|
||||
}).catch(() => {
|
||||
this.setState({
|
||||
paymentDialog: {
|
||||
...this.state.paymentDialog,
|
||||
buttons: [
|
||||
<Button type="primary" onClick={() => this.taxPaymentVoucherPrint()}
|
||||
loading={false}>{getLabel(111, "确认缴款")}</Button>
|
||||
]
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
handleCancel = () => {
|
||||
const { paymentDialog } = this.state;
|
||||
this.setState({
|
||||
paymentDialog: {
|
||||
...paymentDialog, visible: false,
|
||||
title: "", buttons: [], conditions: []
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { paymentDialog } = this.state;
|
||||
return (
|
||||
<React.Fragment>
|
||||
<Button type="ghost" onClick={this.handleTripartiteContributions}>{getLabel(111, "三方缴款")}</Button>
|
||||
{/*<Dropdown.Button*/}
|
||||
{/* onClick={this.handleTripartiteContributions}*/}
|
||||
{/* overlay={*/}
|
||||
{/* <Menu onClick={this.handleMenuChange}>*/}
|
||||
{/* <Menu.Item key="bank_voucher_payment">{getLabel(111, "银行端凭证缴款")}</Menu.Item>*/}
|
||||
{/* <Menu.Item key="destory_voucher">{getLabel(111, "作废缴款凭证")}</Menu.Item>*/}
|
||||
{/* </Menu>*/}
|
||||
{/* }*/}
|
||||
{/* type="ghost">{getLabel(111, "三方缴款")}</Dropdown.Button>*/}
|
||||
<PaymentDialog
|
||||
{...paymentDialog}
|
||||
onCancel={this.handleCancel}
|
||||
/>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default PaymentBtn;
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* 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,
|
||||
paymentNumber: val[key].value,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { conditions, declareStore: { paymentForm } } = this.props;
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} className="paymentDialog" initLoadCss
|
||||
style={{ width: 550 }}
|
||||
>
|
||||
<div className="paymentDialogContent">
|
||||
{!_.isEmpty(conditions) && getSearchs(paymentForm, conditions, 1, false, this.handleChange)}
|
||||
</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default PaymentDialog;
|
||||
|
|
@ -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 (
|
||||
<WeaDialog
|
||||
{...this.props} className="paymentDialog" initLoadCss
|
||||
style={{ width: 550 }}
|
||||
>
|
||||
<div className="with-holding-pay-detail">
|
||||
<div className="status">{getLabel(111, "缴款成功")}</div>
|
||||
<div className="line">
|
||||
<div className="label">{getLabel(111, "状态:")}</div>
|
||||
<div className="value">{getLabel(111, "申报成功,已缴款")}</div>
|
||||
</div>
|
||||
<div className="line">
|
||||
<div className="label">{getLabel(111, "实缴金额:")}</div>
|
||||
<div
|
||||
className="value">{showData.payAmount} {parseFloat(showData.otherAmount) > 0 ? `(含滞纳金等{${showData.otherAmount}元)` : ""} </div>
|
||||
</div>
|
||||
<div className="line">
|
||||
<div className="label">{getLabel(111, "申报人数:")}</div>
|
||||
<div className="value">{showData.personNum} </div>
|
||||
</div>
|
||||
</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default PaymentFeedBackDetail;
|
||||
|
|
@ -0,0 +1,203 @@
|
|||
/*
|
||||
* 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: taxYearMonth + "-01",
|
||||
reportType: this.props.reportType
|
||||
};
|
||||
this.setState({
|
||||
paymentDialog: {
|
||||
...this.state.paymentDialog,
|
||||
buttons: [
|
||||
<Button type="primary" loading={true}>{getLabel(111, "获取反馈")}</Button>
|
||||
]
|
||||
}
|
||||
});
|
||||
taxPaymentAgreementPayFeedback(payload).then(({ status, data, errormsg }) => {
|
||||
this.setState({
|
||||
paymentDialog: {
|
||||
...this.state.paymentDialog,
|
||||
buttons: [
|
||||
<Button type="primary" loading={false} onClick={this.getFeedback}>{getLabel(111, "获取反馈")}</Button>
|
||||
]
|
||||
}
|
||||
});
|
||||
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: [
|
||||
<Button type="primary" loading={false} onClick={this.getFeedback}>{getLabel(111, "获取反馈")}</Button>
|
||||
]
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
taxPaymentVoucherPrintFeedback = () => {
|
||||
const { taxCycle: taxYearMonth, taxAgentId } = this.props.declareInfo;
|
||||
const payload = {
|
||||
taxYearMonth: taxYearMonth + "-01",
|
||||
taxDeclareRecordId: getQueryString("id"),
|
||||
taxAgentId, checkFeedback: 1
|
||||
};
|
||||
this.setState({
|
||||
paymentDialog: {
|
||||
...this.state.paymentDialog,
|
||||
buttons: [
|
||||
<Button type="primary" loading={true}>{getLabel(111, "获取反馈")}</Button>
|
||||
]
|
||||
}
|
||||
});
|
||||
taxPaymentVoucherPrintFeedback(payload).then(({ status, data, errormsg }) => {
|
||||
this.setState({
|
||||
paymentDialog: {
|
||||
...this.state.paymentDialog,
|
||||
buttons: [
|
||||
<Button type="primary" loading={false} onClick={this.getFeedback}>{getLabel(111, "获取反馈")}</Button>
|
||||
]
|
||||
}
|
||||
});
|
||||
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: [
|
||||
<Button type="primary" loading={false} onClick={this.getFeedback}>{getLabel(111, "获取反馈")}</Button>
|
||||
]
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
handlePaymentFeedback = () => {
|
||||
const { paymentDialog } = this.state;
|
||||
this.setState({
|
||||
paymentDialog: {
|
||||
...paymentDialog, visible: true,
|
||||
title: getLabel(111, "获取反馈"),
|
||||
buttons: [
|
||||
<Button type="primary" onClick={this.getFeedback}>{getLabel(111, "获取反馈")}</Button>
|
||||
],
|
||||
conditions: _.map(paymentFeedbackConditions, item => {
|
||||
return {
|
||||
...item,
|
||||
items: _.map(item.items, it => {
|
||||
return {
|
||||
...it,
|
||||
options: [
|
||||
{ key: "WITHHOLDING_PAY", showname: getLabel(111, "三方缴款"), selected: true }
|
||||
// { 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 (
|
||||
<React.Fragment>
|
||||
{/*个税接口改造*/}
|
||||
{/*<Button type="ghost" onClick={this.handlePaymentFeedback}>{getLabel(111, "缴款反馈")}</Button>*/}
|
||||
<Button type="ghost" onClick={this.taxPaymentAgreementPayFeedback}>{getLabel(111, "缴款反馈")}</Button>
|
||||
<PaymentDialog
|
||||
{...paymentDialog}
|
||||
onCancel={this.handleCancel}
|
||||
/>
|
||||
<PaymentFeedBackDetail
|
||||
{...paymentFeedbackDialog}
|
||||
onCancel={() => {
|
||||
this.setState({
|
||||
paymentFeedbackDialog: {
|
||||
...paymentFeedbackDialog,
|
||||
visible: false, title: "", showData: {}
|
||||
}
|
||||
}, () => this.props.updateDeclare());
|
||||
}}
|
||||
/>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default PaymentFeedbackBtn;
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 个税申报表详情-tab动态添加
|
||||
* Description:
|
||||
* Date: 2023/12/29
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaDialog, WeaLocaleProvider, WeaTools } from "ecCom";
|
||||
import { Button, message } from "antd";
|
||||
import { getSearchs } from "../../../util/index";
|
||||
import * as API from "../../../apis/declare";
|
||||
import { commonEnumList } from "../../../apis/ruleconfig";
|
||||
import { taxTabConditions } from "./constants";
|
||||
import { getQueryString } from "../../../util/url";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("declareStore")
|
||||
@observer
|
||||
class TabEditDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
conditions: [], loading: false
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.getTabForm(nextProps);
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.props.declareStore.initTabDecForm();
|
||||
}
|
||||
|
||||
getTabForm = (props) => {
|
||||
const payload = {
|
||||
enumClass: "com.engine.salary.enums.salarysob.IncomeCategoryEnum"
|
||||
};
|
||||
commonEnumList(payload).then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({
|
||||
conditions: _.map(taxTabConditions, item => ({
|
||||
...item, items: _.map(item.items, o => {
|
||||
if (getKey(o) === "incomeCategory") {
|
||||
return {
|
||||
...o, label: getLabel(o.lanId, o.label),
|
||||
options: _.map(data, it => ({ key: it.enum, showname: it.defaultLabel }))
|
||||
};
|
||||
}
|
||||
return { ...o };
|
||||
})
|
||||
}))
|
||||
}, () => props.declareStore.tabDecForm.initFormFields(this.state.conditions));
|
||||
}
|
||||
});
|
||||
};
|
||||
save = () => {
|
||||
const { declareStore: { tabDecForm } } = this.props;
|
||||
tabDecForm.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
const payload = tabDecForm.getFormParams();
|
||||
this.setState({ loading: true });
|
||||
API.addTaxDeclaration({ ...payload, taxDeclareRecordId: Number(getQueryString("id")) })
|
||||
.then(({ status, data, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(30700, "操作成功"));
|
||||
this.props.onCancel(true);
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
} else {
|
||||
f.showErrors();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { conditions, loading } = this.state;
|
||||
const { declareStore: { tabDecForm } } = this.props;
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} style={{ width: 480, height: 80 }} initLoadCss title={getLabel(1421, "新增")}
|
||||
buttons={[
|
||||
<Button type="primary" onClick={this.save} loading={loading}>{getLabel(826, "确定")}</Button>
|
||||
]}
|
||||
>
|
||||
<div className="calculate-dialog-layout">{getSearchs(tabDecForm, conditions, 1, false)}</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default TabEditDialog;
|
||||
|
|
@ -0,0 +1,131 @@
|
|||
/*
|
||||
* 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 MoreBtnMenu from "../../../components/moreBtnMenu";
|
||||
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, onOperate } = this.props;
|
||||
const { abnormalSize, declareFailSize } = declareInfo;
|
||||
const infoItem = [
|
||||
{ key: "taxCycle", label: getLabel(542240, "税款所属期") },
|
||||
{ key: "salaryMonth", label: getLabel(542604, "薪资所属月") },
|
||||
{ key: "taxAgentName", label: getLabel(537996, "个税扣缴义务人") },
|
||||
{ key: "declareTypeDesc", label: getLabel(111, "申报类型") },
|
||||
{ key: "declareStatusDesc", label: getLabel(111, "申报状态") },
|
||||
{ key: "taxPaidAmount", label: getLabel(111, "已缴金额") }
|
||||
];
|
||||
let dropMenuDatas = [];
|
||||
if (["DECLARE_SUCCESS_NO_PAY", "DECLARE_SUCCESS_UNPAID", "DECLARE_SUCCESS_PAID", "DECLARE_SUCCESS_PAYING"].includes(declareInfo.declareStatus)) {
|
||||
dropMenuDatas = dropMenuDatas.concat([
|
||||
{
|
||||
key: "exportGetDeclareTaxResultFeedback",
|
||||
icon: <i className="icon-coms-download2"/>,
|
||||
content: getLabel(111, "下载申报内置算税结果"),
|
||||
onClick: onOperate
|
||||
},
|
||||
{
|
||||
key: "onlineComparison",
|
||||
icon: <i className="icon-coms-Journal-o"/>,
|
||||
content: getLabel(111, "在线对比"),
|
||||
onClick: onOperate
|
||||
}
|
||||
]);
|
||||
}
|
||||
return (
|
||||
<div className="taxDeclarationInfo_layout">
|
||||
<div className="base-info">
|
||||
{
|
||||
_.map(infoItem, item => {
|
||||
return <div className="info-item">
|
||||
<span className="label">{item["label"]}:</span>
|
||||
<span className="value">
|
||||
{declareInfo[item["key"]]}
|
||||
{
|
||||
(
|
||||
(item["key"] === "declareStatusDesc" && declareInfo["displayIcon"])
|
||||
|| (item["key"] === "declareStatusDesc" && declareInfo["declareErrorMsg"])
|
||||
) &&
|
||||
<span
|
||||
title={declareInfo["declareErrorMsg"] || getLabel(545219, "该个税申报表对应的核算数据被重新核算")}
|
||||
className="icon-span">
|
||||
<Tag closable onClose={this.handleUpdateicon}>
|
||||
<i className="icon-coms02-Warning-01"/>
|
||||
</Tag>
|
||||
</span>
|
||||
}
|
||||
</span>
|
||||
{
|
||||
item.key === "taxPaidAmount" &&
|
||||
<span className="value">{getLabel(111, "元")}</span>
|
||||
}
|
||||
</div>;
|
||||
})
|
||||
}
|
||||
</div>
|
||||
<div className="weapp-salary-btn-flex tools-line">
|
||||
<span className="item"
|
||||
onClick={() => this.handleSeeResult([
|
||||
{ key: "list4NotDeclare", title: getLabel(111, "待报送") },
|
||||
{ key: "list4NoValue", title: getLabel(111, "缺申报数据") }
|
||||
], getLabel(111, "申报校验异常"))}>
|
||||
{getLabel(111, "申报校验异常")}({abnormalSize || 0})
|
||||
</span>
|
||||
<span className="item"
|
||||
onClick={() => this.handleSeeResult([{ key: "list4Fail" }], getLabel(111, "申报失败数据"))}>
|
||||
{getLabel(111, "申报失败数据")}({declareFailSize || 0})
|
||||
</span>
|
||||
<MoreBtnMenu dropMenuDatas={dropMenuDatas}/>
|
||||
<DeclareResultDialog
|
||||
{...resDialog}
|
||||
onCancel={() => {
|
||||
this.setState({
|
||||
resDialog: { ...resDialog, visible: false, title: "", type: [] }
|
||||
});
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default TaxDeclarationInfo;
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 个税申报表详情-导入
|
||||
* Description:
|
||||
* Date: 2023/12/28
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaCheckbox, WeaLocaleProvider } from "ecCom";
|
||||
import { message } from "antd";
|
||||
import ImportDialog from "../../../components/importDialog";
|
||||
import * as API from "../../../apis/declare";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class TaxDeclareDetailImportDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
importDialog: {
|
||||
visible: false, title: "", nextloading: false, hasData: "0",
|
||||
link: null, importResult: {}, imageId: "", taxDeclarationId: "",
|
||||
previewUrl: "/api/bs/hrmsalary/taxdeclaration/preview",
|
||||
extraPreview: { taxDeclarationId: "" }
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
handleImportTaxDeclare = (taxDeclarationId) => {
|
||||
this.setState({
|
||||
importDialog: {
|
||||
...this.state.importDialog, link: this.handleExportTemp,
|
||||
taxDeclarationId, visible: true, title: getLabel(24023, "数据导入"),
|
||||
extraPreview: { taxDeclarationId }
|
||||
}
|
||||
});
|
||||
};
|
||||
handleImport = (payload) => {
|
||||
const { importDialog } = this.state;
|
||||
const { taxDeclarationId } = importDialog;
|
||||
this.setState({ importDialog: { ...importDialog, nextloading: true } });
|
||||
API.taxdeclarationImportData({ ...payload, taxDeclarationId })
|
||||
.then(({ data, status }) => {
|
||||
this.setState({ importDialog: { ...importDialog, nextloading: false } });
|
||||
if (status) {
|
||||
this.setState({
|
||||
importDialog: { ...importDialog, ...payload, importResult: data }
|
||||
}, () => this.props.onSuccess());
|
||||
}
|
||||
}).catch(() => this.setState({ importDialog: { ...importDialog, nextloading: false } }));
|
||||
};
|
||||
handleExportTemp = () => {
|
||||
const { importDialog: { taxDeclarationId, hasData } } = this.state;
|
||||
message.destroy();
|
||||
message.loading(getLabel(111, "下载中"), 0);
|
||||
const promise = API.taxdeclarationExportTemplate({ taxDeclarationId, hasData: hasData === "1" });
|
||||
message.destroy();
|
||||
};
|
||||
handleCancel = () => {
|
||||
this.setState({
|
||||
importDialog: {
|
||||
visible: false, title: "", nextloading: false, hasData: "0",
|
||||
link: null, importResult: {}, imageId: "", taxDeclarationId: "",
|
||||
previewUrl: "/api/bs/hrmsalary/taxdeclaration/preview"
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { importDialog } = this.state;
|
||||
return (
|
||||
<ImportDialog
|
||||
{...importDialog} onCancel={this.handleCancel}
|
||||
onResetImportResult={() => this.setState(({
|
||||
importDialog: { ...importDialog, importResult: {}, imageId: "", hasData: "0" }
|
||||
}))}
|
||||
nextCallback={imageId => this.setState({ importDialog: { ...importDialog, imageId } })}
|
||||
nextUplaodCallback={imageId => this.handleImport({ imageId })}
|
||||
exportDataDom={
|
||||
<WeaCheckbox
|
||||
content={getLabel(543208, "导出现有数据")} value={importDialog.hasData}
|
||||
helpfulTip={getLabel(111, "提示:建议先导出现有最新数据,修改后再导入")}
|
||||
onChange={val => this.setState({ importDialog: { ...importDialog, hasData: val } })}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default TaxDeclareDetailImportDialog;
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
import { WeaLocaleProvider } from "ecCom";
|
||||
import { Modal } from "antd";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
export const confirmDialog = (type, callback, reportType) => {
|
||||
let content = "";
|
||||
switch (type) {
|
||||
case "refresh":
|
||||
content = getLabel(111, "刷新数据会重新从核算数据中取值,申报界面新增、编辑的数据会被全部覆盖,是否确认刷新?");
|
||||
break;
|
||||
case "correct":
|
||||
content = getLabel(111, "更正申报,当申报成功后,发现有错报、漏报的情况,可使用更正申报,更正申报成功时,企业状态会变成未申报");
|
||||
break;
|
||||
case "cancel":
|
||||
content = getLabel(111, "申报作废,只有申报成功,无需缴款/申报成功,未缴款的状态才能作废,当作废成功时,企业状态会变成未申报;当作废失败时,企业状态还是原来的未缴款或无需缴款的状态。");
|
||||
break;
|
||||
case "declare":
|
||||
content = reportType === 1 ? getLabel(111, "解除劳动合同一次性补偿金、全年一次性奖金所得,不能单独申报,需要同正常工资薪金一起申报;解除劳动合同一次性补偿金、稿酬所得,由于税务规则需要,解除劳动合同一次性补偿金、稿酬所得必须填写免税附表。是否确认申报?") : getLabel(111, "确认申报?");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"), content,
|
||||
onOk: callback
|
||||
});
|
||||
};
|
||||
|
|
@ -0,0 +1,491 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 个税查看详情页面
|
||||
* Description:
|
||||
* Date: 2023/8/18
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLeftRightLayout, WeaLocaleProvider, WeaTab } from "ecCom";
|
||||
import { Button, message, Modal, Spin } from "antd";
|
||||
import TaxDeclarationInfo from "./components/taxDeclarationInfo";
|
||||
import { apiflowBillingConfigStatus } from "../../apis/intelligentCalculateSalarySettings";
|
||||
import PaymentBtn from "./components/paymentBtn";
|
||||
import PaymentFeedbackBtn from "./components/paymentFeedbackBtn";
|
||||
import {
|
||||
deleteInfo,
|
||||
deleteTaxDeclaration,
|
||||
exportGetDeclareTaxResultFeedback,
|
||||
getDeclareInfo,
|
||||
getDetailList,
|
||||
getTaxDeclarationTab,
|
||||
taxdeclaratioGetCancelFeedback,
|
||||
taxdeclarationDeclare,
|
||||
taxdeclarationGetDeclareFeedback,
|
||||
taxdeclarationGetRate,
|
||||
taxdeclarationRefreshData,
|
||||
taxdeclaratioUpdateCancel,
|
||||
taxdeclaratioUpdateDeclare,
|
||||
taxPaymentVoucherStatusSync
|
||||
} from "../../apis/declare";
|
||||
import { convertToUrlString, getQueryString } from "../../util/url";
|
||||
import IncomeTaxDeclarationPersonnelSlide from "./components/incomeTaxDeclarationPersonnelSlide";
|
||||
import TaxDeclareDetailImportDialog from "./components/taxDeclareDetailImportDialog";
|
||||
import TabEditDialog from "./components/tabEditDialog";
|
||||
import LeftTab from "./components/leftTab";
|
||||
import { confirmDialog } from "./confirm";
|
||||
import { appendixFields } from "./components/constants";
|
||||
import "./index.less";
|
||||
import TaxSetDialog from "../dataAcquisition/otherDeduct/taxSetDialog";
|
||||
|
||||
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: [], editTabVisible: false, keyword: "",
|
||||
loading: {
|
||||
query: false, refresh: false, declare: false, feedback: false,
|
||||
correct: false, cancel: false, cancelFeedback: false, refreshingPay: false,
|
||||
issuance: false
|
||||
},
|
||||
taxDecPersonSlide: {
|
||||
visible: false, title: getLabel(1421, "新增"), taxDeclarationId: "", id: ""
|
||||
},
|
||||
intelCalcSalaryStatus: false, //智能算薪 总开关是否开启
|
||||
declareInfo: {}, pageInfo: { current: 0, pageSize: 10, total: 0 },
|
||||
reportType: "", showLeft: false,
|
||||
taxSetDialog: { visible: false, dataType: "", viewParams: {} }//查看附表
|
||||
};
|
||||
this.timer = null;
|
||||
this.taxDeclareRef = null;
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
window.addEventListener("message", this.handleReceive, false);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
window.removeEventListener("message", this.handleReceive, false);
|
||||
}
|
||||
|
||||
init = async (isInit = true) => {
|
||||
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, editable: true
|
||||
})) : this.state.tabs,
|
||||
selectedKey: (tabStatus && isInit) ?
|
||||
`${_.first(tabDataSource).incomeCategory}%%${_.first(tabDataSource).taxDeclarationId}` :
|
||||
`${_.last(tabDataSource).incomeCategory}%%${_.last(tabDataSource).taxDeclarationId}`,
|
||||
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 = () => {
|
||||
const { reportType } = this.state;
|
||||
return getTaxDeclarationTab({ taxDeclareRecordId: getQueryString("id"), reportType });
|
||||
};
|
||||
getDeclareInfo = () => {
|
||||
const { reportType } = this.state;
|
||||
return getDeclareInfo({ taxDeclareRecordId: getQueryString("id"), reportType });
|
||||
};
|
||||
apiflowBillingConfigStatus = () => {
|
||||
return apiflowBillingConfigStatus();
|
||||
};
|
||||
taxdeclarationGetRate = (index) => {
|
||||
return taxdeclarationGetRate({ index });
|
||||
};
|
||||
handleReceive = ({ data }) => {
|
||||
const { type, payload: { id, params } = {} } = data;
|
||||
if (type === "init") {
|
||||
const promise = this.init();
|
||||
} else if (type === "turn") {
|
||||
if (id === "PAGEINFO") {
|
||||
this.setState({ pageInfo: { ...this.state.pageInfo, ...params } }, () => this.getDetailList());
|
||||
} else if (id === "EDIT") {
|
||||
this.handleTaxDescPerSlide({
|
||||
visible: true, id: params.id,
|
||||
title: getLabel(501169, "编辑")
|
||||
});
|
||||
} else if (id === "DELETE") {
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(543548, "确认删除吗?"),
|
||||
onOk: () => {
|
||||
deleteInfo({ id: params.id }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(502230, "删除成功!"));
|
||||
this.getDetailList();
|
||||
} else {
|
||||
message.error(errormsg || getLabel(20462, "删除失败!"));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
} else if (id === "APPENDIX") {
|
||||
const { taxAgentId, taxCycle } = this.state.declareInfo;
|
||||
this.setState({
|
||||
taxSetDialog: {
|
||||
visible: true, viewParams: { employeeId: params.employeeId, taxAgentId, taxCycle: taxCycle + "-01" },
|
||||
dataType: _.find(appendixFields, o => o.dataIndex === params.dataIndex).dataType,
|
||||
label: params.title
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
postMessageToChild = (payload = {}) => {
|
||||
const { declareInfo, intelCalcSalaryStatus } = this.state;
|
||||
const i18n = {
|
||||
"总计": getLabel(523, "总计"), "编辑": getLabel(501169, "编辑"),
|
||||
"操作": getLabel(30585, "操作"), "共": getLabel(83698, "共"),
|
||||
"条": getLabel(18256, "条"), "删除": getLabel(535052, "删除"),
|
||||
"查看附表": getLabel(111, "查看附表")
|
||||
};
|
||||
const declareStatus = intelCalcSalaryStatus ? declareInfo.declareStatus : "";
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n, declareStatus }), "*");
|
||||
};
|
||||
getDetailList = () => {
|
||||
const { loading, pageInfo, selectedKey, keyword } = this.state;
|
||||
const [incomeCategory, taxDeclarationId] = selectedKey.split("%%");
|
||||
const payload = {
|
||||
...pageInfo, incomeCategory, taxDeclarationId, keyword,
|
||||
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", ellipsis: true };
|
||||
}
|
||||
return {
|
||||
...it, width: 150, ellipsis: true,
|
||||
isAppendix: _.findIndex(appendixFields, o => o.dataIndex === it.dataIndex) !== -1
|
||||
};
|
||||
})
|
||||
}, () => {
|
||||
const payload = {
|
||||
dataSource, pageInfo: this.state.pageInfo,
|
||||
columns: this.state.columns
|
||||
};
|
||||
this.postMessageToChild(payload);
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ loading: { ...loading, query: false } }));
|
||||
};
|
||||
handleOperateDeclare = (type, params = {}) => {
|
||||
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"), ...params })
|
||||
.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: taxYearMonth + "-01",
|
||||
reportType: this.state.reportType
|
||||
};
|
||||
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: taxYearMonth + "-01",
|
||||
reportType: this.state.reportType
|
||||
};
|
||||
window.open(`${window.ecologyContentPath || ""}/spa/hrmSalary/static/index.html#/main/hrmSalary/enterprisePayCertificationDetail?${convertToUrlString(payload)}`);
|
||||
// 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");
|
||||
};
|
||||
handleTaxDescPerSlide = (params) => {
|
||||
const { callback, ...extra } = params;
|
||||
const { taxDecPersonSlide, selectedKey } = this.state;
|
||||
const [__, taxDeclarationId] = selectedKey.split("%%");
|
||||
this.setState({
|
||||
taxDecPersonSlide: { ...taxDecPersonSlide, ...extra, taxDeclarationId }
|
||||
}, () => callback && this.getDetailList());
|
||||
};
|
||||
exportGetDeclareTaxResultFeedback = () => {
|
||||
const { reportType } = this.state;
|
||||
message.destroy();
|
||||
message.loading(getLabel(111, "下载中..."), 0);
|
||||
exportGetDeclareTaxResultFeedback({ id: getQueryString("id"), reportType })
|
||||
.then(async () => {
|
||||
message.destroy();
|
||||
message.success(getLabel(111, "下载成功!"));
|
||||
}).catch(() => {
|
||||
message.destroy();
|
||||
message.error(getLabel(111, "下载失败!"));
|
||||
});
|
||||
};
|
||||
onlineComparison = () => {
|
||||
const [__, taxDeclarationId] = this.state.selectedKey.split("%%");
|
||||
window.open(`${window.location.origin}/spa/hrmSalary/static/index.html#/main/hrmSalary/declareDetail/${taxDeclarationId}`, "_blank");
|
||||
};
|
||||
handleTabEdit = (tabKey, type) => {
|
||||
if (type === "remove") {
|
||||
const [__, taxDeclarationId] = tabKey.split("%%");
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(111, "确认删除吗?"),
|
||||
onOk: () => {
|
||||
message.destroy();
|
||||
message.loading("正在删除中...", 0);
|
||||
deleteTaxDeclaration({ taxDeclarationId })
|
||||
.then(({ status, errormsg }) => {
|
||||
message.destroy();
|
||||
if (status) {
|
||||
message.success(getLabel(502230, "删除成功"));
|
||||
const promise = this.init();
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
}).catch(() => message.destroy());
|
||||
}
|
||||
});
|
||||
} else if (type === "add") {
|
||||
this.setState({ editTabVisible: true });
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const {
|
||||
tabs, selectedKey, loading, declareInfo, intelCalcSalaryStatus, taxDecPersonSlide,
|
||||
editTabVisible, reportType, showLeft, taxSetDialog
|
||||
} = this.state;
|
||||
const [__, taxDeclarationId] = selectedKey.split("%%");
|
||||
let btns = [
|
||||
<Button type="primary" onClick={this.export}>{getLabel(17416, "导出")}</Button>,
|
||||
<Button type="ghost"
|
||||
onClick={() => confirmDialog("declare", () => this.handleOperateDeclare("declare", { reportType }), reportType)}
|
||||
loading={loading.declare}>{getLabel(111, "在线申报")}</Button>,
|
||||
<Button type="ghost" onClick={() => confirmDialog("refresh", () => this.handleOperateDeclare("refresh"))}
|
||||
loading={loading.refresh}>{getLabel(111, "刷新数据")}</Button>
|
||||
];
|
||||
//申报状态:作废中
|
||||
declareInfo.declareStatus === "DECLARE_CANCELLING" && (btns.splice(1, 2, <Button
|
||||
type="ghost" loading={loading.cancelFeedback}
|
||||
onClick={() => this.handleOperateDeclare("cancelFeedback")}>{getLabel(111, "作废反馈")}</Button>));
|
||||
//申报状态:申报中
|
||||
declareInfo.declareStatus === "DECLARING" && (btns.splice(1, 2, <Button
|
||||
type="ghost" loading={loading.feedback}
|
||||
onClick={() => this.handleOperateDeclare("feedback", { reportType })}>{getLabel(111, "申报反馈")}</Button>));
|
||||
//申报状态:缴款中
|
||||
declareInfo.declareStatus === "DECLARE_SUCCESS_PAYING" && (btns.splice(1, 2));
|
||||
//申报状态:已缴款
|
||||
declareInfo.declareStatus === "DECLARE_SUCCESS_PAID" && (btns.splice(1, 2,
|
||||
<Button type="ghost" loading={loading.correct}
|
||||
onClick={() => confirmDialog("correct", () => this.handleOperateDeclare("correct", { reportType }))}>{getLabel(111, "更正申报")}</Button>));
|
||||
//申报状态:申报成功,无需缴款
|
||||
declareInfo.declareStatus === "DECLARE_SUCCESS_NO_PAY" &&
|
||||
(btns.splice(1, 2,
|
||||
<Button type="ghost" loading={loading.correct}
|
||||
onClick={() => confirmDialog("correct", () => this.handleOperateDeclare("correct", { reportType }))}>{getLabel(111, "更正申报")}</Button>,
|
||||
<Button type="ghost"
|
||||
loading={loading.cancel}
|
||||
onClick={() => confirmDialog("cancel", () => this.handleOperateDeclare("cancel", { reportType }))}>{getLabel(111, "作废申报")}</Button>
|
||||
));
|
||||
//申报状态:申报成功,未缴款
|
||||
declareInfo.declareStatus === "DECLARE_SUCCESS_UNPAID" &&
|
||||
(btns.splice(1, 2,
|
||||
<Button type="ghost" loading={loading.correct}
|
||||
onClick={() => confirmDialog("correct", () => this.handleOperateDeclare("correct", { reportType }))}>{getLabel(111, "更正申报")}</Button>,
|
||||
<Button type="ghost"
|
||||
loading={loading.cancel}
|
||||
onClick={() => confirmDialog("cancel", () => this.handleOperateDeclare("cancel", { reportType }))}>{getLabel(111, "作废申报")}</Button>
|
||||
// <Button type="ghost"
|
||||
// loading={loading.refreshingPay}
|
||||
// onClick={this.taxPaymentVoucherStatusSync}>{getLabel(111, "刷新缴款状态")}</Button>
|
||||
));
|
||||
if (!intelCalcSalaryStatus) {
|
||||
if (["NOT_DECLARE", "DECLARE_FAIL"].includes(declareInfo.declareStatus)) {
|
||||
btns.splice(1, 1);
|
||||
}
|
||||
}
|
||||
if (intelCalcSalaryStatus) {
|
||||
if (["NOT_DECLARE", "DECLARE_FAIL"].includes(declareInfo.declareStatus)) {
|
||||
btns.unshift(
|
||||
<Button type="primary"
|
||||
onClick={() => this.taxDeclareRef.handleImportTaxDeclare(taxDeclarationId)}>{getLabel(32935, "导入")}</Button>
|
||||
);
|
||||
btns.unshift(
|
||||
<Button type="primary" onClick={() => this.handleTaxDescPerSlide({
|
||||
visible: true,
|
||||
title: getLabel(1421, "新增")
|
||||
})}>{getLabel(1421, "新增")}</Button>
|
||||
);
|
||||
}
|
||||
}
|
||||
if (intelCalcSalaryStatus && (declareInfo.declareStatus === "DECLARE_SUCCESS_UNPAID")) {
|
||||
btns.push(
|
||||
<PaymentBtn declareInfo={declareInfo} updateDeclare={this.declare} reportType={reportType}/>,
|
||||
<PaymentFeedbackBtn declareInfo={declareInfo} updateDeclare={this.declare} reportType={reportType}/>
|
||||
);
|
||||
}
|
||||
if (intelCalcSalaryStatus && declareInfo.taxPaidAmount && parseFloat(declareInfo.taxPaidAmount) > 0) {
|
||||
btns.push(<Button type="ghost" loading={loading.issuance}
|
||||
onClick={this.getEnterprisePayCertificate}>{getLabel(111, "开具企业完税证明")}</Button>);
|
||||
}
|
||||
return (
|
||||
<WeaLeftRightLayout
|
||||
showLeft={showLeft}
|
||||
leftWidth={210}
|
||||
leftCom={<LeftTab
|
||||
onChangeTab={(reportType, isInit = false) => this.setState({ reportType }, () => isInit && this.init())}
|
||||
onCollapse={showLeft => this.setState({ showLeft })}/>}
|
||||
onCollapse={showLeft => this.setState({ showLeft })}>
|
||||
<div className="declareDetail-layout">
|
||||
<TaxDeclarationInfo declareInfo={declareInfo} onOperate={fun => this[fun]()}/>
|
||||
<div className="declareDetail-layout-content">
|
||||
<WeaTab
|
||||
datas={tabs} keyParam="viewcondition" selectedKey={selectedKey} showAddBtn buttons={btns}
|
||||
type="editable-inline" onEdit={this.handleTabEdit} leftStyle={{ width: "calc(100% - 450px)" }}
|
||||
onChange={(v) => this.setState({ selectedKey: v }, () => this.getDetailList())}
|
||||
searchType={["base"]} searchsBasePlaceHolder={getLabel(26919, "请输入姓名")}
|
||||
onSearchChange={keyword => this.setState({ keyword })}
|
||||
onSearch={this.getDetailList}
|
||||
/>
|
||||
{/*个税申报表-新增编辑框*/}
|
||||
<IncomeTaxDeclarationPersonnelSlide
|
||||
{...taxDecPersonSlide}
|
||||
onClose={(callback) => this.handleTaxDescPerSlide({ visible: false, id: "", callback })}
|
||||
/>
|
||||
{/*个税申报表导入*/}
|
||||
<TaxDeclareDetailImportDialog ref={dom => this.taxDeclareRef = dom}
|
||||
onSuccess={this.declare}
|
||||
/>
|
||||
{/*个税申报表-新增tab弹框*/}
|
||||
<TabEditDialog visible={editTabVisible}
|
||||
onCancel={(isRefresh) => this.setState({ editTabVisible: false }, () => isRefresh && this.init(false))}/>
|
||||
</div>
|
||||
{/*查看附表*/}
|
||||
<TaxSetDialog {...taxSetDialog}
|
||||
onCancel={() => this.setState({ taxSetDialog: { ...taxSetDialog, visible: false } })}/>
|
||||
<div className="declareDetail-layout-table-content">
|
||||
<Spin spinning={loading.query}>
|
||||
<iframe
|
||||
style={{ border: 0, width: "100%", height: "100%" }}
|
||||
// src="http://localhost:7607/#/taxDeclareTable"
|
||||
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/taxDeclareTable"
|
||||
id="atdTable"
|
||||
/>
|
||||
</Spin>
|
||||
</div>
|
||||
</div>
|
||||
</WeaLeftRightLayout>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,268 @@
|
|||
.declareDetail-layout {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.declareDetail-layout-content {
|
||||
padding: 0 16px;
|
||||
|
||||
.ant-table-tbody {
|
||||
td {
|
||||
max-width: 150px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.declareDetail-layout-table-content {
|
||||
flex: 1;
|
||||
padding: 0 16px;
|
||||
|
||||
.ant-spin-nested-loading, .ant-spin-container {
|
||||
height: 100% !important;
|
||||
}
|
||||
}
|
||||
|
||||
.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;
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mulSelectDialog {
|
||||
.wea-form-item .wea-form-item-wrapper {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.wea-date-picker {
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
|
||||
.incomeTaxDecPerSlideWrapper {
|
||||
.wea-slide-modal-content {
|
||||
background: #f6f6f6;
|
||||
padding: 16px;
|
||||
overflow: auto;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.wea-search-group {
|
||||
padding: 0;
|
||||
background: #fff;
|
||||
border: 1px solid #e5e5e5;
|
||||
border-bottom: none;
|
||||
margin-bottom: 16px;
|
||||
|
||||
.wea-form-cell, .wea-content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.wea-form-item {
|
||||
padding: 5px 16px;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,157 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 在线申报-在线对比
|
||||
* Description:
|
||||
* Date: 2024/1/22
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
import { WeaCheckbox, WeaLoadingGlobal, WeaLocaleProvider, WeaTable, WeaTop } from "ecCom";
|
||||
import { Button } from "antd";
|
||||
import { WeaTableNew } from "comsMobx";
|
||||
import { exportContrast } from "../../apis/declare";
|
||||
import "./index.less";
|
||||
|
||||
const WeaTableComx = WeaTableNew.WeaTable;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("payrollFilesStore")
|
||||
@observer
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
dataSource: [], showColumns: [],
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||
queryParams: { onlyShowDiffEmp: true, onlyShowDiffItem: true }
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.getTaxdeclarationContrastList();
|
||||
}
|
||||
|
||||
getTaxdeclarationContrastList = () => {
|
||||
const { pageInfo, queryParams } = this.state;
|
||||
const { params: { taxDeclarationId }, payrollFilesStore: { getTaxdeclarationContrastList } } = this.props;
|
||||
WeaLoadingGlobal.start();
|
||||
getTaxdeclarationContrastList({ taxDeclarationId, ...pageInfo, ...queryParams })
|
||||
.then(({ status, data }) => {
|
||||
WeaLoadingGlobal.destroy();
|
||||
if (status) {
|
||||
const { pageInfo: result, columns: showColumns } = data;
|
||||
const { list: dataSource, pageNum: current, pageSize, total } = result;
|
||||
this.setState({ showColumns, dataSource, pageInfo: { ...pageInfo, current, pageSize, total } });
|
||||
}
|
||||
}).catch(() => WeaLoadingGlobal.destroy());
|
||||
};
|
||||
handleDiffChange = (key, value) => {
|
||||
const { queryParams } = this.state;
|
||||
this.setState({
|
||||
queryParams: { ...queryParams, [key]: value === "1" }
|
||||
}, () => this.getTaxdeclarationContrastList());
|
||||
};
|
||||
handleExport = async () => {
|
||||
const { params: { taxDeclarationId }, payrollFilesStore: { declareTableStore } } = this.props;
|
||||
const { queryParams } = this.state;
|
||||
const columns = _.map(toJS(declareTableStore.columns), k => k.dataIndex);
|
||||
WeaLoadingGlobal.start();
|
||||
const payload = { taxDeclarationId, columns, ...queryParams };
|
||||
const promise = await exportContrast(payload);
|
||||
WeaLoadingGlobal.destroy();
|
||||
};
|
||||
getColumns = () => {
|
||||
const { showColumns } = this.state;
|
||||
const { payrollFilesStore: { declareTableStore } } = this.props;
|
||||
return _.map(_.filter(toJS(declareTableStore.columns), (item) => (item.display === "true" && showColumns.includes(item["dataIndex"]))), o => ({
|
||||
dataIndex: o.dataIndex, title: o.title, width: 150,
|
||||
render: (text, record) => {
|
||||
if (!record[o["dataIndex"]]) return <span/>;
|
||||
return Object.prototype.toString.call(record[o["dataIndex"]]) === "[object String]" ? <span>{text}</span> :
|
||||
<div className="comparison-column-item-container">
|
||||
<div className="comparison-single-row">
|
||||
<span>{getLabel(543280, "系统值")}:</span>
|
||||
<span>{record[o["dataIndex"]].local}</span>
|
||||
</div>
|
||||
<div className="comparison-single-row">
|
||||
<span>{getLabel(111, "线上值")}:</span>
|
||||
<span>{record[o["dataIndex"]].online}</span>
|
||||
</div>
|
||||
{
|
||||
!_.isNil(record[o["dataIndex"]].diff) &&
|
||||
<div className="comparison-single-row danger">
|
||||
<span>{getLabel(543282, "差值")}:</span>
|
||||
<span>{record[o["dataIndex"]].diff}</span>
|
||||
</div>
|
||||
}
|
||||
</div>;
|
||||
}
|
||||
}));
|
||||
};
|
||||
onDropMenuClick = (key) => {
|
||||
switch (key) {
|
||||
case "custom_cols":
|
||||
const { payrollFilesStore: { declareTableStore } } = this.props;
|
||||
declareTableStore.setColSetVisible(true);
|
||||
declareTableStore.tableColSet(true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { payrollFilesStore: { declareTableStore } } = this.props;
|
||||
const { dataSource, pageInfo, queryParams } = this.state;
|
||||
const { onlyShowDiffEmp, onlyShowDiffItem } = queryParams;
|
||||
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.getTaxdeclarationContrastList());
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current }
|
||||
}, () => this.getTaxdeclarationContrastList());
|
||||
}
|
||||
};
|
||||
return (
|
||||
<WeaTop title={getLabel(111, "在线对比")} icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D" buttonSpace={10} showDropIcon onDropMenuClick={this.onDropMenuClick}
|
||||
buttons={[
|
||||
<Button type="primary" onClick={this.handleExport}>{getLabel(81272, "导出全部")}</Button>,
|
||||
<WeaCheckbox content={getLabel(543283, "只显示有差异的人员")} value={onlyShowDiffEmp ? 1 : 0}
|
||||
onChange={v => this.handleDiffChange("onlyShowDiffEmp", v)}
|
||||
/>,
|
||||
<WeaCheckbox content={getLabel(543284, "只显示有差异的薪资项目")} value={onlyShowDiffItem ? 1 : 0}
|
||||
onChange={v => this.handleDiffChange("onlyShowDiffItem", v)}
|
||||
/>
|
||||
]} dropMenuDatas={[{
|
||||
key: "custom_cols",
|
||||
icon: <i className="icon-coms-Custom"/>,
|
||||
content: getLabel(32535, "显示列定制")
|
||||
}]}
|
||||
>
|
||||
<WeaTable rowKey="id" dataSource={dataSource} pagination={pagination} bordered
|
||||
scroll={{ x: 1200, y: `calc(100vh - 170px)` }} className="online-comparison-table"
|
||||
columns={this.getColumns()}
|
||||
/>
|
||||
<WeaTableComx
|
||||
style={{ display: "none" }}
|
||||
comsWeaTableStore={declareTableStore}
|
||||
needScroll={true}
|
||||
columns={this.getColumns()}
|
||||
/>
|
||||
</WeaTop>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
.online-comparison-table {
|
||||
.comparison-column-item-container {
|
||||
.comparison-single-row {
|
||||
margin: 4px 0;
|
||||
}
|
||||
|
||||
.danger {
|
||||
color: #ff4d4f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,143 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 人员信息报送
|
||||
* Description:
|
||||
* Date: 2023/7/24
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaInputSearch, WeaLocaleProvider, WeaTable, WeaTop } from "ecCom";
|
||||
import { Col, Dropdown, Menu, message, Row } from "antd";
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
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 },
|
||||
logDialogVisible: false, filterConditions: "[]"
|
||||
};
|
||||
}
|
||||
|
||||
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 }));
|
||||
};
|
||||
onDropMenuClick = (key, targetid = "") => {
|
||||
switch (key) {
|
||||
case "log":
|
||||
this.setState({
|
||||
logDialogVisible: true,
|
||||
filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]"
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { pageInfo, taxAgentName, dataSource, logDialogVisible, filterConditions } = this.state;
|
||||
const tipList = [
|
||||
getLabel(544290, "1、点击查看详情,管理各个个税扣缴义务人的人员报送信息,如购买了在线报送服务,可在线报送,如未购买在线报送服务,也可导出数据线下报送。")
|
||||
];
|
||||
return (
|
||||
<WeaTop
|
||||
title={getLabel(544289, "人员信息报送")} iconBgcolor="#F14A2D"
|
||||
icon={<i className="icon-coms-fa"/>} showDropIcon onDropMenuClick={this.onDropMenuClick}
|
||||
dropMenuDatas={[{
|
||||
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
}]} buttons={[
|
||||
<WeaInputSearch placeholder={getLabel(543634, "请输入个税扣缴义务人名称")}
|
||||
value={taxAgentName} onChange={val => this.setState({ taxAgentName: val })}
|
||||
onSearch={this.taxAgentDeclareList}
|
||||
/>
|
||||
]}
|
||||
>
|
||||
<div style={{ height: "100%", background: "#f6f6f6", padding: 16 }}>
|
||||
<Row gutter={16}>
|
||||
<Col span={16}>
|
||||
<WeaTable
|
||||
className="declareTable"
|
||||
columns={[
|
||||
{
|
||||
title: getLabel(537996, "个税扣缴义务人"),
|
||||
dataIndex: "taxAgentName"
|
||||
},
|
||||
{
|
||||
title: getLabel(30585, "操作"),
|
||||
dataIndex: "operate",
|
||||
width: 260,
|
||||
render: (_, record) => (<React.Fragment>
|
||||
<a
|
||||
href={`${window.ecologyContentPath || ""}/spa/hrmSalary/static/index.html#/main/hrmSalary/employeedeclareDetail?id=${record.id}&taxName=${encodeURIComponent(record.taxAgentName)}`}
|
||||
target="_blank">{getLabel(83110, "查看详情")}</a>
|
||||
<Dropdown overlay={
|
||||
<Menu>
|
||||
<Menu.Item>
|
||||
<a href="javascript:void(0)"
|
||||
onClick={() => this.onDropMenuClick("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<a href="javascript:void(0)" style={{ marginLeft: 10 }}><i className="icon-coms-more"/></a>
|
||||
</Dropdown>
|
||||
</React.Fragment>)
|
||||
}
|
||||
]}
|
||||
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());
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}><TipLabel tipList={tipList}/></Col>
|
||||
</Row>
|
||||
</div>
|
||||
{/*操作日志*/}
|
||||
<LogDialog visible={logDialogVisible} logFunction="empdeclare" filterConditions={filterConditions}
|
||||
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||
</WeaTop>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
.declareTable {
|
||||
background: #FFF;
|
||||
}
|
||||
|
|
@ -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 (
|
||||
<div className="base-info">
|
||||
<div className="left">
|
||||
<span>{getLabel(537996, "个税扣缴义务人")}:{decodeURIComponent(getQueryString("taxName") || "")}</span></div>
|
||||
<div className="right">
|
||||
<div className="header-declare-info">
|
||||
<a href="javascript:void(0);" className="fail"
|
||||
onClick={this.handleOpenFailDialog}>{getLabel(111, "报送失败")}: {declareFailSize || 0}</a>
|
||||
<span className="not">{getLabel(111, "未报送")}: {notDeclareSize || 0}</span>
|
||||
</div>
|
||||
</div>
|
||||
{/*报送失败数据查看*/}
|
||||
<EmployeeDeclareDetailCalcDialog
|
||||
{...declareCalcDialog}
|
||||
onCancel={() => {
|
||||
this.setState({
|
||||
declareCalcDialog: {
|
||||
visible: false, taxCycle: ""
|
||||
}
|
||||
});
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default BaseInfo;
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
/*
|
||||
* 扣除名单确认
|
||||
* 编辑是否扣除
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2025/3/27
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaDialog, WeaLocaleProvider, WeaTools } from "ecCom";
|
||||
import { Button, message } from "antd";
|
||||
import { WeaForm } from "comsMobx";
|
||||
import FormInfo from "../../../components/FormInfo";
|
||||
import { deductConditions } from "../constants";
|
||||
import * as API from "../../../apis/declare";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const form = new WeaForm();
|
||||
|
||||
class DeductionAmountEditDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
conditions: [], loading: false
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.initForm(nextProps);
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) form.resetForm();
|
||||
}
|
||||
|
||||
initForm = (props) => {
|
||||
const { record } = props;
|
||||
this.setState({
|
||||
conditions: _.map(deductConditions, item => ({
|
||||
...item,
|
||||
items: _.map(item.items, o => ({ ...o, value: record[getKey(o)] + "", label: getLabel(o.lanId, o.label) }))
|
||||
}))
|
||||
}, () => form.initFormFields(this.state.conditions));
|
||||
};
|
||||
save = () => {
|
||||
form.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
const { id } = this.props.record;
|
||||
const paylaod = { id, deductFlag: form.getFormParams().deductFlag };
|
||||
this.setState({ loading: true });
|
||||
API.editDeductionAmount(paylaod).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(30700, "操作成功!"));
|
||||
this.props.onCancel(this.props.onSuccess);
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
} else {
|
||||
f.showErrors();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
render() {
|
||||
const { conditions, loading } = this.state;
|
||||
const height = _.reduce(conditions, (pre, cur) => pre + cur.items.length, 0).length * 47;
|
||||
return (<WeaDialog {...this.props} initLoadCss title={getLabel(111, "编辑")} style={{ height }}
|
||||
buttons={[<Button type="primary" loading={loading}
|
||||
onClick={this.save}>{getLabel(111, "确定")}</Button>,
|
||||
<Button type="ghost" onClick={() => this.props.onCancel()}>{getLabel(111, "取消")}</Button>]}>
|
||||
<FormInfo className="form-dialog-layout" center={false} form={form} formFields={conditions}/>
|
||||
</WeaDialog>);
|
||||
}
|
||||
}
|
||||
|
||||
export default DeductionAmountEditDialog;
|
||||
|
|
@ -0,0 +1,173 @@
|
|||
/*
|
||||
* 扣除名单确认
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2025/3/26
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaButtonIcon, WeaDialog, WeaLocaleProvider, WeaTable, WeaTools } from "ecCom";
|
||||
import DeductionListConfirmEmployeeDialog from "./deductionListConfirmEmployeeDialog";
|
||||
import DeductionAmountEditDialog from "./deductionAmountEditDialog";
|
||||
import { Button, Col, message, Modal, Row } from "antd";
|
||||
import * as API from "../../../apis/declare";
|
||||
import { calcPageNo } from "../../../util";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider, { getUrlParams } = WeaTools;
|
||||
|
||||
class DeductionListConfirmDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }, loading: false, columns: [], dataSource: [], visible: false,
|
||||
selectedRowKeys: [], editDialog: { visible: false, record: {} }, loadingBtn: { confirm: false, feedback: false }
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.getDeductionAmountList(nextProps);
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }, loading: false, dataSource: [], selectedRowKeys: []
|
||||
});
|
||||
}
|
||||
|
||||
getDeductionAmountList = (props) => {
|
||||
const { pageInfo } = this.state, { id: taxAgentId } = getUrlParams(), { year } = props || this.props;
|
||||
const payload = { ...pageInfo, taxAgentId, year };
|
||||
this.setState({ loading: true });
|
||||
API.getDeductionAmountList(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: [..._.map(columns, o => {
|
||||
if (o.dataIndex === "deductFlag") {
|
||||
return { ...o, render: v => (<span>{v === 1 ? getLabel(111, "是") : getLabel(111, "否")}</span>) };
|
||||
}
|
||||
return { ...o };
|
||||
}), {
|
||||
title: getLabel(111, "操作"), dataIndex: "action",
|
||||
render: (v, record) => (<a href="javascript:void(0)" onClick={() => this.setState({
|
||||
editDialog: { visible: true, record }
|
||||
})}>{getLabel(111, "编辑")}</a>)
|
||||
}]
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
handleDelete = () => {
|
||||
Modal.confirm({
|
||||
title: getLabel(111, "信息确认"),
|
||||
content: getLabel(111, "确认删除本条数据吗?"),
|
||||
onOk: () => {
|
||||
API.deleteDeductionAmount({ ids: this.state.selectedRowKeys }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
const { pageInfo } = this.state, { current, pageSize, total } = pageInfo;
|
||||
message.success(getLabel(111, "操作成功"));
|
||||
this.setState({
|
||||
selectedRowKeys: [],
|
||||
pageInfo: {
|
||||
...pageInfo, current: calcPageNo(total, current, pageSize, this.state.selectedRowKeys.length)
|
||||
}
|
||||
}, () => this.getDeductionAmountList());
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
confirmDeductionAmount = () => {
|
||||
const { id: taxAgentId } = getUrlParams(), { year } = this.props;
|
||||
const payload = { taxAgentId, year };
|
||||
this.setState({ loadingBtn: { ...this.state.loadingBtn, confirm: true } });
|
||||
API.confirmDeductionAmount(payload).then(({ status, errormsg }) => {
|
||||
this.setState({ loadingBtn: { ...this.state.loadingBtn, confirm: false } });
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功"));
|
||||
this.getDeductionAmountList();
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
};
|
||||
feedbackDeductionAmount = () => {
|
||||
const { id: taxAgentId } = getUrlParams(), { year } = this.props;
|
||||
const payload = { taxAgentId, year };
|
||||
this.setState({ loadingBtn: { ...this.state.loadingBtn, confirm: true } });
|
||||
API.feedbackDeductionAmount(payload).then(({ status, errormsg }) => {
|
||||
this.setState({ loadingBtn: { ...this.state.loadingBtn, confirm: false } });
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功"));
|
||||
this.getDeductionAmountList();
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { loading, columns, dataSource, pageInfo, visible, selectedRowKeys, editDialog, loadingBtn } = 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.getDeductionAmountList());
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current }
|
||||
}, () => this.getDeductionAmountList());
|
||||
}
|
||||
};
|
||||
const rowSelection = {
|
||||
selectedRowKeys, onChange: v => this.setState({ selectedRowKeys: v })
|
||||
};
|
||||
const height = this.refs.employeeRef ? this.refs.employeeRef.state.height : 400;
|
||||
return (
|
||||
<WeaDialog {...this.props} initLoadCss ref="confirmRef" className="confirmationDialog"
|
||||
title={(<Row type="flex">
|
||||
<Col span={12}>
|
||||
<span className="title">{getLabel(111, "扣除名单确认")}</span>
|
||||
</Col>
|
||||
<Col span={12} className="title-right">
|
||||
<Button type="primary" onClick={this.confirmDeductionAmount}
|
||||
loading={loadingBtn.confirm}>{getLabel(111, "确认")}</Button>
|
||||
<Button type="primary" onClick={this.feedbackDeductionAmount}
|
||||
loading={loadingBtn.feedback}>{getLabel(111, "反馈")}</Button>
|
||||
</Col>
|
||||
</Row>)}
|
||||
style={{
|
||||
width: 1150, height: 490, minHeight: 200, minWidth: 380, maxHeight: "90%",
|
||||
maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
|
||||
}}>
|
||||
<div className="confirmationDialogContent">
|
||||
<div className="tableBtns">
|
||||
<WeaButtonIcon buttonType="add" type="primary" title={getLabel(111, "添加")}
|
||||
onClick={() => this.setState({ visible: true })}/>
|
||||
<WeaButtonIcon buttonType="del" type="primary" title={getLabel(111, "删除")} onClick={this.handleDelete}
|
||||
disabled={_.isEmpty(selectedRowKeys)}/>
|
||||
</div>
|
||||
<WeaTable columns={columns} dataSource={dataSource} loading={loading} pagination={pagination} rowKey="id"
|
||||
rowSelection={rowSelection} scroll={{ y: `calc(${height}px - 113px)` }}/>
|
||||
<DeductionAmountEditDialog {...editDialog} onSuccess={this.getDeductionAmountList}
|
||||
onCancel={(callback) => this.setState({
|
||||
editDialog: { visible: false, record: {} }
|
||||
}, () => callback && callback())}/>
|
||||
<DeductionListConfirmEmployeeDialog visible={visible} onSuccess={this.getDeductionAmountList}
|
||||
year={this.props.year} payload={this.props.payload}
|
||||
onCancel={(callback) => this.setState({ visible: false }, () => callback && callback())}/>
|
||||
</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default DeductionListConfirmDialog;
|
||||
|
|
@ -0,0 +1,106 @@
|
|||
/*
|
||||
* 扣除名单确认
|
||||
* 人员添加列表
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2025/3/26
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaDialog, WeaLocaleProvider, WeaTable, WeaTools } from "ecCom";
|
||||
import { Button, message } from "antd";
|
||||
import * as API from "../../../apis/declare";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider, { getUrlParams } = WeaTools;
|
||||
const columns = [{ title: getLabel(111, "姓名"), dataIndex: "employeeName" }, {
|
||||
title: getLabel(111, "分部"),
|
||||
dataIndex: "subCompanyName"
|
||||
}, { title: getLabel(111, "部门"), dataIndex: "departmentName" }, {
|
||||
title: getLabel(111, "个税扣缴义务人"),
|
||||
dataIndex: "taxAgentName"
|
||||
}, { title: getLabel(111, "工号"), dataIndex: "jobNum" }, { title: getLabel(111, "手机号码"), dataIndex: "mobile" }];
|
||||
|
||||
class DeductionListConfirmEmployeeDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }, loading: false, dataSource: [], selectedRowKeys: [],
|
||||
saveloading: false
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.employeedeclareList(nextProps);
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }, loading: false, dataSource: [], selectedRowKeys: []
|
||||
});
|
||||
}
|
||||
|
||||
employeedeclareList = (props) => {
|
||||
const { pageInfo } = this.state, { payload } = props || this.props;
|
||||
this.setState({ loading: true });
|
||||
API.employeedeclareList({ ...payload, ...pageInfo }).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { pageInfo: result } = data;
|
||||
const { list: dataSource, pageNum: current, pageSize, total } = result;
|
||||
this.setState({ dataSource, pageInfo: { ...pageInfo, current, pageSize, total } });
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
save = () => {
|
||||
const { selectedRowKeys: employeeDeclareIds } = this.state, { id: taxAgentId } = getUrlParams(), { year } = this.props;
|
||||
const payload = { taxAgentId, year, employeeDeclareIds };
|
||||
this.setState({ saveloading: true });
|
||||
API.addDeductionAmount(payload).then(({ status, errormsg }) => {
|
||||
this.setState({ saveloading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功"));
|
||||
this.props.onCancel(this.props.onSuccess);
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { loading, dataSource, pageInfo, selectedRowKeys, saveloading } = 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.employeedeclareList());
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current }
|
||||
}, () => this.employeedeclareList());
|
||||
}
|
||||
};
|
||||
const rowSelection = {
|
||||
selectedRowKeys, onChange: v => this.setState({ selectedRowKeys: v })
|
||||
};
|
||||
const height = this.refs.employeeRef ? this.refs.employeeRef.state.height : 400;
|
||||
return (<WeaDialog {...this.props} hasScroll initLoadCss title={getLabel(111, "选择人员")} ref="employeeRef"
|
||||
buttons={[<Button type="primary" disabled={_.isEmpty(selectedRowKeys)} loading={saveloading}
|
||||
onClick={this.save}>{getLabel(111, "确认")}</Button>,
|
||||
<Button type="ghost" onClick={() => this.props.onCancel()}>{getLabel(111, "取消")}</Button>]}
|
||||
style={{
|
||||
width: 1150, height: 490, minHeight: 200, minWidth: 380, maxHeight: "90%", maxWidth: "90%",
|
||||
overflow: "hidden", transform: "translate(0px, 0px)"
|
||||
}}>
|
||||
<div className="confirmationDialogContent">
|
||||
<WeaTable columns={columns} dataSource={dataSource} loading={loading} pagination={pagination} rowKey="id"
|
||||
rowSelection={rowSelection} scroll={{ y: `calc(${height}px - 113px)` }}/>
|
||||
</div>
|
||||
</WeaDialog>);
|
||||
}
|
||||
}
|
||||
|
||||
export default DeductionListConfirmEmployeeDialog;
|
||||
|
|
@ -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 (
|
||||
<WeaDialog
|
||||
{...this.props}
|
||||
scalable hasScroll className="declareCalcDialog" initLoadCss
|
||||
title={(<Row className="declareCalcDialogTitle" type="flex">
|
||||
<Col span={12} className="declareCalcDialogTitle-left">
|
||||
<span className="title">{getLabel(111, "报送失败数据详情")}</span>
|
||||
</Col>
|
||||
<Col span={12} className="declareCalcDialogTitle-right">
|
||||
{/*<Button type="primary" onClick={this.handleSubmit}>{getLabel(81272, "导出全部")}</Button>*/}
|
||||
</Col>
|
||||
</Row>)}
|
||||
style={{
|
||||
width: 1150,
|
||||
height: 606.6,
|
||||
minHeight: 200,
|
||||
minWidth: 380,
|
||||
maxHeight: "90%",
|
||||
maxWidth: "90%",
|
||||
overflow: "hidden",
|
||||
transform: "translate(0px, 0px)"
|
||||
}}
|
||||
>
|
||||
<div className="declareCalcDialogContent">
|
||||
<WeaTable
|
||||
columns={columns} dataSource={dataSource}
|
||||
loading={loading} className="declareTable"
|
||||
pagination={pagination}
|
||||
/>
|
||||
</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default EmployeeDeclareDetailCalcDialog;
|
||||
|
|
@ -0,0 +1,116 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 人员信息报送-导入
|
||||
* Description:
|
||||
* Date: 2023/12/28
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaCheckbox, WeaLocaleProvider, WeaSelect } from "ecCom";
|
||||
import { message } from "antd";
|
||||
import ImportDialog from "../../../components/importDialog";
|
||||
import * as API from "../../../apis/declare";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class EmployeeDeclareDetailImportDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
importDialog: {
|
||||
visible: false, title: "", nextloading: false, checkType: "jobNum",
|
||||
link: null, importResult: {}, imageId: "", tempPayload: {},
|
||||
previewUrl: "/api/bs/hrmsalary/employeedeclare/preview"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
handleImportEmployeeDeclare = (tempPayload) => {
|
||||
this.setState({
|
||||
importDialog: {
|
||||
...this.state.importDialog, link: this.handleExportTemp,
|
||||
tempPayload, visible: true, title: getLabel(24023, "数据导入")
|
||||
}
|
||||
});
|
||||
};
|
||||
handleImport = (payload) => {
|
||||
const { importDialog } = this.state;
|
||||
const { tempPayload, checkType } = importDialog;
|
||||
this.setState({ importDialog: { ...importDialog, nextloading: true } });
|
||||
API.employeedeclareImportData({ ...payload, ...tempPayload, checkType })
|
||||
.then(({ data, status }) => {
|
||||
this.setState({ importDialog: { ...importDialog, nextloading: false } });
|
||||
if (status) {
|
||||
this.setState({
|
||||
importDialog: { ...importDialog, ...payload, importResult: data }
|
||||
}, () => this.props.onSuccess());
|
||||
}
|
||||
}).catch(() => this.setState({ importDialog: { ...importDialog, nextloading: false } }));
|
||||
};
|
||||
handleExportTemp = () => {
|
||||
const { importDialog: { tempPayload } } = this.state;
|
||||
message.destroy();
|
||||
message.loading(getLabel(111, "下载中"), 0);
|
||||
const promise = API.employeedeclareExportTemplate(tempPayload);
|
||||
message.destroy();
|
||||
};
|
||||
handleCancel = () => {
|
||||
this.setState({
|
||||
importDialog: {
|
||||
visible: false, title: "", nextloading: false, checkType: "jobNum",
|
||||
link: null, importResult: {}, imageId: "", tempPayload: {},
|
||||
previewUrl: "/api/bs/hrmsalary/employeedeclare/preview"
|
||||
}
|
||||
});
|
||||
};
|
||||
renderFormComponent = () => {
|
||||
const { importDialog } = this.state;
|
||||
const { checkType } = importDialog;
|
||||
return <div style={{ padding: "8px 16px", border: "1px solid #e5e5e5", margin: "4px 0" }}>
|
||||
<div className="weapp-salary-tb-filter">
|
||||
<div className="tbf-item">
|
||||
<div className="tbfi-label">{getLabel(111, "校验字段")}</div>
|
||||
<WeaSelect
|
||||
detailtype={3} value={checkType} onChange={checkType => {
|
||||
this.setState(({ importDialog: { ...importDialog, checkType } }));
|
||||
}} options={[
|
||||
{ key: "jobNum", showname: getLabel(1933, "工号") },
|
||||
{ key: "sfz", showname: getLabel(1887, "身份证号码") }
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>;
|
||||
};
|
||||
|
||||
render() {
|
||||
const { importDialog } = this.state;
|
||||
return (
|
||||
<ImportDialog
|
||||
{...importDialog} onCancel={this.handleCancel}
|
||||
onResetImportResult={() => this.setState(({
|
||||
importDialog: { ...importDialog, importResult: {}, imageId: "" }
|
||||
}))}
|
||||
importParams={this.renderFormComponent()}
|
||||
exportDataDom={
|
||||
<WeaCheckbox
|
||||
content={getLabel(543208, "导出现有数据")}
|
||||
value={importDialog.tempPayload.exportData === "true" ? "1" : "0"}
|
||||
helpfulTip={getLabel(545244, "提示:建议先导出现有最新数据,修改后再导入")}
|
||||
onChange={val => {
|
||||
this.setState(({
|
||||
importDialog: {
|
||||
...importDialog,
|
||||
tempPayload: { ...importDialog.tempPayload, exportData: String(val === "1") }
|
||||
}
|
||||
}));
|
||||
}}
|
||||
/>
|
||||
}
|
||||
nextCallback={imageId => this.setState({ importDialog: { ...importDialog, imageId } })}
|
||||
nextUplaodCallback={imageId => this.handleImport({ imageId })}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default EmployeeDeclareDetailImportDialog;
|
||||
|
|
@ -0,0 +1,332 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 报送信息-编辑、新增弹框
|
||||
* Description:
|
||||
* Date: 2023/8/14
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider, WeaSlideModal, WeaTools } from "ecCom";
|
||||
import { Button, Col, message, 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";
|
||||
import { commonEnumList } from "../../../apis/archive";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
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.props.employeeDeclareStore.initDeclareForm()
|
||||
this.employeeChangeInfo = {};
|
||||
}
|
||||
}
|
||||
|
||||
employeedeclareGetForm = async (props) => {
|
||||
const { data: cardTypeEnum } = await commonEnumList({ enumClass: `com.engine.salary.enums.employeedeclare.CardTypeEnum` });
|
||||
employeedeclareGetForm(_.pick(props, ["id"])).then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({
|
||||
eConditions: _.map(declareConditions, it => {
|
||||
return {
|
||||
...it,
|
||||
items: _.map(it.items, child => {
|
||||
if (getKey(child) === "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 (getKey(child) === "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 (getKey(child) === "gender") {
|
||||
return {
|
||||
...child,
|
||||
value: "MALE",
|
||||
options: [
|
||||
{ key: "MALE", showname: getLabel(111, "男") },
|
||||
{ key: "FEMALE", showname: getLabel(111, "女") }
|
||||
]
|
||||
};
|
||||
} else if (getKey(child) === "cardType") {
|
||||
return {
|
||||
...child, options: _.map(cardTypeEnum, o => ({ key: o.enum, showname: o.defaultLabel }))
|
||||
};
|
||||
} else if (getKey(child) === "employeeType") {
|
||||
return {
|
||||
...child,
|
||||
viewAttr: props.id ? 1 : 3,
|
||||
options: [
|
||||
{ key: "ORGANIZATION", showname: getLabel(30042, "人员") }
|
||||
]
|
||||
};
|
||||
}
|
||||
if (child.conditionType === "SELECT" && getKey(child) !== "gender" && getKey(child) !== "employmentStatus" && getKey(child) !== "employmentType" && getKey(child) !== "taxReasons") {
|
||||
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 }, id } = props;
|
||||
declareForm.initFormFields(this.state.eConditions);
|
||||
if (id) {
|
||||
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 === "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 (getKey(child) === "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 (getKey(child) === "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;
|
||||
case "cardType":
|
||||
this.setState({
|
||||
eConditions: _.map(eConditions, it => {
|
||||
return {
|
||||
...it,
|
||||
items: _.map(it.items, child => {
|
||||
if (
|
||||
getKey(child) === "entryDate" || getKey(child) === "departureDate" ||
|
||||
getKey(child) === "birthplace" || getKey(child) === "taxReasons"
|
||||
) {
|
||||
return {
|
||||
...child,
|
||||
viewAttr: value !== "RESIDENT_IDENTITY_CARDS" ? 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, cardType, entryDate, departureDate,
|
||||
birthplace, taxReasons, ...params
|
||||
} = form.getFormParams();
|
||||
if ((employmentType !== "OTHER" && !employmentDate) || (employmentStatus === "ABNORMAL" && !dismissDate)) {
|
||||
form.showError("dismissDate", getLabel(111, "\"离职日期\"未填写"));
|
||||
return;
|
||||
}
|
||||
if ((cardType !== "RESIDENT_IDENTITY_CARDS" && !entryDate && !departureDate && !birthplace && !taxReasons)) {
|
||||
form.showError("entryDate", getLabel(111, "\"首次入境时间\"未填写"));
|
||||
form.showError("departureDate", getLabel(111, "\"预计离境时间\"未填写"));
|
||||
form.showError("birthplace", getLabel(111, "\"出生地\"未填写"));
|
||||
form.showError("taxReasons", getLabel(111, "\"涉税事由\"未填写"));
|
||||
return;
|
||||
}
|
||||
if ((cardType !== "RESIDENT_IDENTITY_CARDS" && !entryDate)) {
|
||||
form.showError("entryDate", getLabel(111, "\"首次入境时间\"未填写"));
|
||||
return;
|
||||
}
|
||||
if ((cardType !== "RESIDENT_IDENTITY_CARDS" && !departureDate)) {
|
||||
form.showError("departureDate", getLabel(111, "\"预计离境时间\"未填写"));
|
||||
return;
|
||||
}
|
||||
if ((cardType !== "RESIDENT_IDENTITY_CARDS" && !birthplace)) {
|
||||
form.showError("birthplace", getLabel(111, "\"出生地\"未填写"));
|
||||
return;
|
||||
}
|
||||
if ((cardType !== "RESIDENT_IDENTITY_CARDS" && !taxReasons)) {
|
||||
form.showError("taxReasons", getLabel(111, "\"涉税事由\"未填写"));
|
||||
return;
|
||||
}
|
||||
const payload = {
|
||||
...form.getFormParams(), id: this.props.id,
|
||||
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 (
|
||||
<WeaSlideModal
|
||||
{...this.props}
|
||||
top={0} measureT="%"
|
||||
width={800} measureX="px"
|
||||
height={100} measureY="%"
|
||||
direction="right"
|
||||
title={(<Row className="declareSchemeDialogTitle" type="flex">
|
||||
<Col span={12} className="declareSchemeDialogTitle-left">
|
||||
<div className="icon-circle-base"><i className="icon-coms-fa"/></div>
|
||||
<span className="title">{title || getLabel(111, "本月新增数据")}</span>
|
||||
</Col>
|
||||
<Col span={12} className="declareSchemeDialogTitle-right">
|
||||
<Button type="primary" onClick={this.handleSubmit} loading={loading}>{getLabel(537558, "保存")}</Button>
|
||||
</Col>
|
||||
</Row>)}
|
||||
content={(<div className="declareSchemeDialog">{getSearchs(form, eConditions, 1, false, this.onChange)}</div>)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default EmployeeDeclareDetailSchemaEditDialog;
|
||||
|
|
@ -0,0 +1,520 @@
|
|||
import React from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
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: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "SELECT",
|
||||
domkey: ["cardType"],
|
||||
fieldcol: 12,
|
||||
label: "证件类型",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
options: [],
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
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: "INPUT",
|
||||
domkey: ["birthplace"],
|
||||
fieldcol: 12,
|
||||
label: "出生地",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
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: "DATEPICKER",
|
||||
domkey: ["entryDate"],
|
||||
fieldcol: 12,
|
||||
label: "首次入境时间",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "DATEPICKER",
|
||||
domkey: ["departureDate"],
|
||||
fieldcol: 12,
|
||||
label: "预计离境时间",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "SELECT",
|
||||
domkey: ["taxReasons"],
|
||||
fieldcol: 12,
|
||||
label: "涉税事由",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
multiple: true,
|
||||
viewAttr: 2,
|
||||
options: [
|
||||
{ key: getLabel(111, "任职受雇"), showname: getLabel(111, "任职受雇") },
|
||||
{ key: getLabel(111, "提供临时劳务"), showname: getLabel(111, "提供临时劳务") },
|
||||
{ key: getLabel(111, "转让财产"), showname: getLabel(111, "转让财产") },
|
||||
{ key: getLabel(111, "从事投资和经营活动"), showname: getLabel(111, "从事投资和经营活动") },
|
||||
{ key: getLabel(111, "其他"), showname: getLabel(111, "其他") }
|
||||
]
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "SELECT",
|
||||
domkey: ["disability"],
|
||||
fieldcol: 12,
|
||||
label: "是否残疾",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "OFF",
|
||||
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: "OFF",
|
||||
viewAttr: 2,
|
||||
detailtype: 3,
|
||||
options: []
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "SELECT",
|
||||
domkey: ["martyrDependents"],
|
||||
fieldcol: 12,
|
||||
label: "是否是烈属",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "OFF",
|
||||
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: "ON",
|
||||
viewAttr: 2,
|
||||
detailtype: 3,
|
||||
options: []
|
||||
}
|
||||
],
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
// 扣除名单确认
|
||||
export const deductConditions = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["employeeName"],
|
||||
fieldcol: 12,
|
||||
label: "姓名",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 1
|
||||
},
|
||||
{
|
||||
conditionType: "SWITCH",
|
||||
domkey: ["deductFlag"],
|
||||
fieldcol: 12,
|
||||
label: "是否扣除",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
],
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
|
|
@ -0,0 +1,610 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 人员信息报送-查看详情
|
||||
* Description:
|
||||
* Date: 2023/8/11
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
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 EmployeeDeclareDetailSchemaImportDialog from "./components/employeeDeclareDetailImportDialog";
|
||||
import DeductionListConfirmDialog from "./components/deductionListConfirmDialog";
|
||||
import { commonEnumList } from "../../apis/payrollFiles";
|
||||
import {
|
||||
employeedeclareDeclare,
|
||||
employeedeclareExport,
|
||||
employeedeclareGetRate,
|
||||
employeedeclareList,
|
||||
employeedeclareList4Add,
|
||||
employeedeclareList4Update,
|
||||
employeedeclareRefresh,
|
||||
employeeDelete,
|
||||
employeeInvalid,
|
||||
getDeclareFeedback
|
||||
} from "../../apis/declare";
|
||||
import { advanceConditions, submitStatus } from "./constants";
|
||||
import moment from "moment";
|
||||
import { getSearchs } from "../../util";
|
||||
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(), pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||
loading: { query: false, refresh: false, feedback: false, declare: false, exportLoading: false },
|
||||
declareEditDialog: { visible: false, id: "", title: "" },
|
||||
confirmationDialog: { visible: false, payload: {} },
|
||||
declareStatusList: [], employmentStatusList: [],
|
||||
employmentTypeList: [], adConditons: [],
|
||||
selectedRowKeys: [], exportPayload: {}
|
||||
};
|
||||
this.baseInfoRef = null;
|
||||
this.importRef = 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() {
|
||||
this.setState({ exportPayload: {} });
|
||||
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 } }, () => this.queryEmployeeList());
|
||||
} 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 === "VOID") {
|
||||
this.handleVoidDeclare(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, "加载中")
|
||||
// "作废": getLabel(111, "作废")
|
||||
};
|
||||
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, confirmationDialog } = 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({ exportPayload: payload, 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 },
|
||||
confirmationDialog: { ...confirmationDialog, payload }
|
||||
}, () => {
|
||||
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: 2024/4/16
|
||||
*/
|
||||
handleVoidDeclare = (id) => {
|
||||
const { selectedRowKeys } = this.state;
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(111, "确认作废吗?"),
|
||||
onOk: () => {
|
||||
employeeInvalid({ id }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(111, "作废成功!"));
|
||||
this.queryEmployeeList();
|
||||
} else {
|
||||
message.error(errormsg || getLabel(111, "作废失败!"));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
/*
|
||||
* 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, confirmationDialog } = this.state;
|
||||
switch (key) {
|
||||
case "1":
|
||||
if (_.isEmpty(selectedRowKeys)) {
|
||||
message.warning(getLabel(111, "请先选择需要删除的人员!"));
|
||||
return;
|
||||
}
|
||||
this.handleDeleteDeclare(selectedRowKeys);
|
||||
break;
|
||||
case"5":
|
||||
this.setState({ confirmationDialog: { ...confirmationDialog, visible: true } });
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
handleEmployeedeclareExport = async ({ key }) => {
|
||||
const { selectedRowKeys, exportPayload } = this.state;
|
||||
if (key === "selected" && _.isEmpty(selectedRowKeys)) {
|
||||
message.warning(getLabel(111, "请先选择需要导出的人员!"));
|
||||
return;
|
||||
}
|
||||
this.setState({ loading: { ...this.state.loading, exportLoading: true } });
|
||||
const promise = await employeedeclareExport(_.omit({
|
||||
...exportPayload,
|
||||
ids: selectedRowKeys
|
||||
}, ["current", "total", "pageSize"]));
|
||||
this.setState({ loading: { ...this.state.loading, exportLoading: false } });
|
||||
};
|
||||
handleEmployeedeclare = ({ key }) => {
|
||||
switch (key) {
|
||||
case "import":
|
||||
const tmplateExpPayload = {
|
||||
exportData: "false", taxAgentId: getQueryString("id"),
|
||||
taxCycle: moment(this.state.taxCycle).startOf("month").format("YYYY-MM-DD")
|
||||
};
|
||||
this.importRef.handleImportEmployeeDeclare(tmplateExpPayload);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const {
|
||||
selectedKey, showSearchAd, declareStatus, declareStatusList, taxCycle, declareEditDialog, loading,
|
||||
pageInfo, adConditons, employmentTypeList, employmentStatusList, confirmationDialog
|
||||
} = this.state;
|
||||
const { taxAgentStore: { showOperateBtn }, employeeDeclareStore: { advanceForm: form, declareForm } } = this.props;
|
||||
const menu = (
|
||||
<Menu onClick={this.handleMenuClick}>
|
||||
<Menu.Item key="1">{getLabel(32136, "批量删除")}</Menu.Item>
|
||||
{/*<Menu.Item key="2">{getLabel(111, "批量编辑")}</Menu.Item>*/}
|
||||
{/*<Menu.Item key="3">{getLabel(81272, "导出全部")}</Menu.Item>*/}
|
||||
{/*<Menu.Item key="4">{getLabel(543715, "导出所选")}</Menu.Item>*/}
|
||||
<Menu.Item key="5">{getLabel(111, "扣除名单确认")}</Menu.Item>
|
||||
</Menu>
|
||||
);
|
||||
const buttons = [
|
||||
<div className="taxPeriod-div">
|
||||
<span className="title">{getLabel(542240, "税款所属期")}:</span>
|
||||
<WeaDatePicker arrow type="month" className="pickerDateCustom flex a-center" value={taxCycle}
|
||||
onChange={val => this.setState({
|
||||
taxCycle: val, pageInfo: { ...pageInfo, current: 1 }
|
||||
}, () => this.queryEmployeeList())}/>
|
||||
</div>,
|
||||
<Button type="primary" onClick={this.employeedeclareDeclare}
|
||||
loading={loading.declare}>{getLabel(111, "全部报送")}</Button>,
|
||||
<Button type="ghost" onClick={this.getDeclareFeedback}
|
||||
loading={loading.feedback}>{getLabel(111, "获取报送结果")}</Button>,
|
||||
<Button type="ghost" onClick={this.employeedeclareRefresh}
|
||||
loading={loading.refresh}>{getLabel(111, "刷新数据")}</Button>,
|
||||
<Dropdown overlay={menu}>
|
||||
<Button type="ghost" icon="ellipsis" className="moreBtn"/>
|
||||
</Dropdown>,
|
||||
<DeductionListConfirmDialog {...confirmationDialog} year={moment(taxCycle).format("YYYY")}
|
||||
onCancel={() => this.setState({
|
||||
confirmationDialog: { ...confirmationDialog, visible: false }
|
||||
})}/>
|
||||
];
|
||||
const topTab = [
|
||||
{ title: getLabel(332, "全部"), viewcondition: "list" },
|
||||
{ title: getLabel(111, "本月新增"), viewcondition: "list4Add" },
|
||||
{ title: getLabel(111, "本月信息变动"), viewcondition: "list4Update" }
|
||||
];
|
||||
const tabBtns = [
|
||||
<Dropdown.Button
|
||||
onClick={this.handleAdd}
|
||||
overlay={
|
||||
<Menu onClick={this.handleEmployeedeclare}>
|
||||
<Menu.Item key="import">{getLabel(32935, "导入")}</Menu.Item>
|
||||
</Menu>
|
||||
}
|
||||
type="primary">{getLabel(1421, "新增")}</Dropdown.Button>,
|
||||
<Dropdown.Button
|
||||
onClick={() => this.handleEmployeedeclareExport({ key: "all" })}
|
||||
loading={loading.exportLoading}
|
||||
overlay={
|
||||
<Menu onClick={this.handleEmployeedeclareExport}>
|
||||
<Menu.Item key="selected">{getLabel(543715, "导出所选")}</Menu.Item>
|
||||
</Menu>
|
||||
}
|
||||
type="primary">{getLabel(17416, "导出全部")}</Dropdown.Button>,
|
||||
// <Button type="ghost" onClick={this.handleEmployeedeclareExport}
|
||||
// loading={loading.exportLoading}>{getLabel(17416, "导出")}</Button>,
|
||||
<WeaSelect
|
||||
value={declareStatus}
|
||||
style={{ width: 150 }}
|
||||
options={[
|
||||
..._.map(submitStatus, it => ({ ...it, showname: getLabel(it.lanId, it.showname) })),
|
||||
..._.map(declareStatusList, it => ({
|
||||
key: it.enum,
|
||||
showname: getLabel(it.labelId, it.defaultLabel)
|
||||
}))
|
||||
]}
|
||||
onChange={declareStatus => this.setState({
|
||||
declareStatus,
|
||||
pageInfo: {
|
||||
...pageInfo,
|
||||
current: 1
|
||||
}
|
||||
}, () => this.queryEmployeeList())}
|
||||
/>
|
||||
];
|
||||
// !showOperateBtn && tabBtns.shift();
|
||||
selectedKey !== "list" && tabBtns.shift();
|
||||
selectedKey !== "list" && tabBtns.shift();
|
||||
return (
|
||||
<WeaTop
|
||||
title={getLabel(544289, "人员信息报送")} iconBgcolor="#F14A2D"
|
||||
icon={<i className="icon-coms-fa"/>} className="declareWrapper"
|
||||
buttons={buttons}
|
||||
// buttons={showOperateBtn ? buttons : []}
|
||||
>
|
||||
<div style={{ height: "100%", background: "#f6f6f6" }} className="flex flex-rollback">
|
||||
{/*基础信息*/}
|
||||
<BaseInfo
|
||||
ref={dom => this.baseInfoRef = dom}
|
||||
taxCycle={moment(taxCycle).startOf("month").format("YYYY-MM-DD")}
|
||||
/>
|
||||
{/*列表数据*/}
|
||||
<div className="listview-com-layout flex-1 flex flex-rollback">
|
||||
<WeaTab
|
||||
datas={topTab} keyParam="viewcondition" showSearchAd={showSearchAd}
|
||||
selectedKey={selectedKey} searchType={["base", "advanced"]}
|
||||
setShowSearchAd={bool => this.setState({ showSearchAd: bool })}
|
||||
advanceHeight={300} searchsAd={getSearchs(form, toJS(adConditons), 2)}
|
||||
buttons={tabBtns} searchsBaseValue={form.getFormParams().keyword}
|
||||
onSearchChange={(v) => form.updateFields({ keyword: v })}
|
||||
onChange={key => this.setState({
|
||||
selectedKey: key,
|
||||
pageInfo: { ...pageInfo, current: 1 }
|
||||
}, () => this.queryEmployeeList())}
|
||||
onAdReset={() => form.resetForm()}
|
||||
onSearch={() => this.setState({
|
||||
pageInfo: { ...pageInfo, current: 1 }
|
||||
}, () => this.queryEmployeeList())}
|
||||
onAdSearch={() => this.setState({
|
||||
pageInfo: {
|
||||
...pageInfo,
|
||||
current: 1
|
||||
}
|
||||
}, () => this.queryEmployeeList())}
|
||||
/>
|
||||
<div className="flex-1">
|
||||
<Spin spinning={loading.query}>
|
||||
<iframe
|
||||
style={{ border: 0, width: "100%", height: "100%" }}
|
||||
// src="http://localhost:7607/#/employeeDeclareTable"
|
||||
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/employeeDeclareTable"
|
||||
id="atdTable"
|
||||
/>
|
||||
</Spin>
|
||||
{/*新增编辑报送信息*/}
|
||||
<EmployeeDeclareDetailSchemaEditDialog
|
||||
{...declareEditDialog}
|
||||
taxCycle={moment(taxCycle).startOf("month").format("YYYY-MM-DD")}
|
||||
employmentStatusList={employmentStatusList}
|
||||
employmentTypeList={employmentTypeList}
|
||||
onClose={(isFresh) => {
|
||||
this.setState({
|
||||
declareEditDialog: {
|
||||
...declareEditDialog,
|
||||
visible: false, id: "", title: ""
|
||||
}
|
||||
}, () => {
|
||||
declareForm.resetForm();
|
||||
isFresh === "true" && this.queryEmployeeList();
|
||||
});
|
||||
}}
|
||||
/>
|
||||
{/*人员信息报送导入*/}
|
||||
<EmployeeDeclareDetailSchemaImportDialog ref={dom => this.importRef = dom}
|
||||
onSuccess={this.queryEmployeeList}/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</WeaTop>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,238 @@
|
|||
.declareWrapper {
|
||||
.wea-new-top {
|
||||
.moreBtn {
|
||||
border: 1px solid transparent;
|
||||
|
||||
i {
|
||||
font-weight: 700;
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
}
|
||||
|
||||
.moreBtn:hover {
|
||||
border: 1px solid #57c5f7;
|
||||
background: #ffffff;
|
||||
color: #57c5f7;
|
||||
}
|
||||
}
|
||||
|
||||
.base-info {
|
||||
background: #ebf4ff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
min-height: 50px;
|
||||
margin-bottom: 8px;
|
||||
border-radius: 4px;
|
||||
padding: 0 16px;
|
||||
|
||||
.right .header-declare-info {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
font-size: 12px;
|
||||
margin-right: 16px;
|
||||
|
||||
.fail {
|
||||
color: #5d9cec;
|
||||
cursor: pointer;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.listview-com-layout {
|
||||
padding: 0 16px;
|
||||
|
||||
.wea-tab .wea-tab-right, .wea-input-focus {
|
||||
background: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.taxPeriod-div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.title {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.pickerDateCustom {
|
||||
.icon-coms-Browse-box-delete, .icon-coms-Browse-box-Add-to {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: 1px solid #e5e5e5;
|
||||
background: transparent;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
padding: 0 6px;
|
||||
height: 30px;
|
||||
top: auto;
|
||||
}
|
||||
|
||||
.icon-coms-Browse-box-delete:hover, .icon-coms-Browse-box-Add-to:hover {
|
||||
color: #5d9cec;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.declareTable {
|
||||
background: #FFF;
|
||||
}
|
||||
|
||||
|
||||
.wea-slide-modal-title {
|
||||
border-bottom: 1px solid #e5e5e5 !important;
|
||||
}
|
||||
|
||||
.wea-slide-modal-content {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.declareSchemeDialogTitle {
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
|
||||
.declareSchemeDialogTitle-left {
|
||||
text-align: left;
|
||||
padding-left: 16px;
|
||||
|
||||
.icon-circle-base {
|
||||
background: rgb(241, 74, 45);
|
||||
}
|
||||
|
||||
.title {
|
||||
color: #111;
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
|
||||
.declareSchemeDialogTitle-right {
|
||||
text-align: right;
|
||||
padding-right: 56px;
|
||||
}
|
||||
}
|
||||
|
||||
.declareSchemeDialog {
|
||||
height: 100%;
|
||||
padding: 16px;
|
||||
overflow-y: auto;
|
||||
background: #f6f6f6;
|
||||
|
||||
.wea-search-group .wea-content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.wea-search-group {
|
||||
border: 1px solid #e5e5e5;
|
||||
border-bottom: none;
|
||||
background: #fff;
|
||||
|
||||
.wea-form-item {
|
||||
padding: 5px 16px;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
}
|
||||
|
||||
.wea-search-group, .wea-form-cell {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.declareCalcDialog {
|
||||
.declareCalcDialogTitle {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.declareCalcDialogTitle-left {
|
||||
text-align: left;
|
||||
|
||||
.title {
|
||||
color: #111;
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
|
||||
.declareCalcDialogTitle-right {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
.declareCalcDialogContent {
|
||||
height: 100%;
|
||||
padding: 16px;
|
||||
background: #f6f6f6;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.flex-rollback {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.flex-1 {
|
||||
flex: 1;
|
||||
|
||||
.ant-spin-nested-loading, .ant-spin-container {
|
||||
height: 99%;
|
||||
}
|
||||
}
|
||||
|
||||
.a-center {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.weapp-salary-tb-filter {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.tbf-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.tbfi-label {
|
||||
flex-basis: 100px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.wea-select {
|
||||
flex-basis: 200px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//扣除名单确认
|
||||
.confirmationDialog {
|
||||
.title-right {
|
||||
text-align: right;
|
||||
|
||||
button {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.confirmationDialogContent {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #f6f6f6;
|
||||
padding: 8px 16px;
|
||||
|
||||
.tableBtns {
|
||||
display: grid;
|
||||
grid-template-columns: auto auto;
|
||||
justify-content: end;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.wea-new-table {
|
||||
background: #FFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 在线申报-个税开具证明查看页面
|
||||
* Description:
|
||||
* Date: 2023/8/23
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { Icon, Menu, message, Spin } from "antd";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
import { getQueryString } from "../../util/url";
|
||||
import { taxPaymentWithheldVoucherGet } from "../../apis/declare";
|
||||
import "./index.less";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: false, current: "",
|
||||
enterprisePayCertifiTipMsg: "",
|
||||
dataSource: []
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.getEnterprisePayCertificate();
|
||||
}
|
||||
|
||||
getEnterprisePayCertificate = () => {
|
||||
const payload = {
|
||||
taxDeclareRecordId: getQueryString("taxDeclareRecordId"),
|
||||
taxAgentId: getQueryString("taxAgentId"),
|
||||
taxYearMonth: getQueryString("taxYearMonth"),
|
||||
reportType: getQueryString("reportType")
|
||||
};
|
||||
this.setState({ loading: true });
|
||||
taxPaymentWithheldVoucherGet(payload).then(({ status, data, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status && !_.isEmpty(data.vouchers)) {
|
||||
this.setState({
|
||||
dataSource: data.vouchers,
|
||||
enterprisePayCertifiTipMsg: data.msg || "",
|
||||
current: _.head(data.vouchers).name
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || "");
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
|
||||
render() {
|
||||
const { dataSource, loading, enterprisePayCertifiTipMsg, current } = this.state;
|
||||
if (loading) {
|
||||
return <div className="loading-layout">
|
||||
<Spin spinning={loading} tip={getLabel(111, "获取企业完税证明中...")}/>
|
||||
</div>;
|
||||
}
|
||||
if (_.isEmpty(dataSource)) {
|
||||
return <div className="pay-certification-detail empty">
|
||||
<p className="iconEmpty"><Icon type="inbox"/></p>
|
||||
<p className="empty-title">{getLabel(83553, "暂无数据")}</p>
|
||||
<p
|
||||
className="empty-subTitle">{enterprisePayCertifiTipMsg || getLabel(111, "暂无企业完税证明相关信息")}</p>
|
||||
</div>;
|
||||
}
|
||||
return (
|
||||
<div className="pay-certification-detail">
|
||||
<div className="left">
|
||||
<Menu selectedKeys={[current]} mode="inline" onClick={({ key: current }) => this.setState({ current })}>
|
||||
{
|
||||
_.map(dataSource, item => {
|
||||
return <Menu.Item key={item.name}>{item.name}</Menu.Item>;
|
||||
})
|
||||
}
|
||||
</Menu>
|
||||
</div>
|
||||
<div className="right">
|
||||
<iframe src={`data:application/pdf;base64,${_.find(dataSource, it => it.name === current).content}`}
|
||||
style={{ border: 0, width: "100%", height: "100%" }}/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
.loading-layout {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.pay-certification-detail {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
.left {
|
||||
width: 220px;
|
||||
flex-grow: 0;
|
||||
flex-shrink: 0;
|
||||
height: 100vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.right {
|
||||
width: calc(100vw - 220px);
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
&.empty {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
|
||||
p {
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
.empty-title {
|
||||
color: #111;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.empty-subTitle {
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.iconEmpty {
|
||||
i {
|
||||
color: #5d9cec;
|
||||
font-size: 43px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
export const trafficUsageConditions = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "RANGEPICKER",
|
||||
domkey: ["startDate", "endDate"],
|
||||
fieldcol: 22,
|
||||
label: "",
|
||||
labelcol: 0,
|
||||
value: ""
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "SELECT",
|
||||
domkey: ["taxAgentId"],
|
||||
fieldcol: 22,
|
||||
label: "",
|
||||
labelcol: 0,
|
||||
value: "",
|
||||
options: []
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "SELECT",
|
||||
domkey: ["businessType"],
|
||||
fieldcol: 22,
|
||||
label: "",
|
||||
labelcol: 0,
|
||||
value: "",
|
||||
options: [
|
||||
{ key: "", showname: "全部(接口业务)", lanId: 111 },
|
||||
{ key: "1", showname: "累计专项附加扣除", lanId: 538006 },
|
||||
{ key: "2", showname: "人员信息报送", lanId: 544289 },
|
||||
{ key: "3", showname: "个税申报", lanId: 543353 }
|
||||
]
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "SELECT",
|
||||
domkey: ["result"],
|
||||
fieldcol: 22,
|
||||
label: "",
|
||||
labelcol: 0,
|
||||
value: "",
|
||||
options: [
|
||||
{ key: "", showname: "全部(结果)", lanId: 111 },
|
||||
{ key: "20", showname: "成功", lanId: 111 },
|
||||
{ key: "30", showname: "失败", lanId: 25009 }
|
||||
]
|
||||
}
|
||||
],
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
export const remindObjConditions = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
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",
|
||||
viewAttr: 3,
|
||||
rules: "required"
|
||||
},
|
||||
colSpan: 1,
|
||||
conditionType: "BROWSER",
|
||||
rules: "required|string",
|
||||
domkey: ["employeeId"],
|
||||
fieldcol: 12,
|
||||
label: "提醒对象",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
viewAttr: 3
|
||||
}
|
||||
],
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 智能算薪-添加提醒对象
|
||||
* Description:
|
||||
* Date: 2023/8/29
|
||||
*/
|
||||
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 { remindObjConditions } from "./constants";
|
||||
import { apiflowWarnReceiverGetForm, apiflowWarnReceiverSave } from "../../../apis/intelligentCalculateSalarySettings";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("intelligentStore")
|
||||
@observer
|
||||
class EditBeRemindObjDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: false
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
const { intelligentStore: { remindObjform }, id } = nextProps;
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
remindObjform.initFormFields(remindObjConditions);
|
||||
id && this.apiflowWarnReceiverGetForm(nextProps);
|
||||
}
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||
remindObjform.resetForm();
|
||||
}
|
||||
}
|
||||
|
||||
apiflowWarnReceiverGetForm = (props) => {
|
||||
const { intelligentStore: { remindObjform } } = this.props;
|
||||
const { id } = props;
|
||||
apiflowWarnReceiverGetForm({ id }).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { employee } = data;
|
||||
remindObjform.updateFields({
|
||||
"employeeId": {
|
||||
value: employee[0].id,
|
||||
valueSpan: employee[0].content,
|
||||
valueObj: [{ id: employee[0].id, name: employee[0].content }]
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
save = () => {
|
||||
const { intelligentStore: { remindObjform }, warnConfigId, id } = this.props;
|
||||
remindObjform.validateForm().then(f => {
|
||||
const { employeeId } = remindObjform.getFormParams();
|
||||
if (f.isValid) {
|
||||
this.setState({ loading: true });
|
||||
apiflowWarnReceiverSave({ employeeId, warnConfigId, id }).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(22619, "保存成功!"));
|
||||
this.props.updateWarnList();
|
||||
this.props.onCancel();
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
} else {
|
||||
f.showErrors();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { intelligentStore: { remindObjform } } = this.props;
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} className="paymentDialog" initLoadCss
|
||||
style={{ width: 550 }}
|
||||
buttons={[<Button type="primary" onClick={this.save}
|
||||
loading={this.state.loading}>{getLabel(537558, "保存")}</Button>]}
|
||||
>
|
||||
<div className="paymentDialogContent">
|
||||
{getSearchs(remindObjform, remindObjConditions, 1)}
|
||||
</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default EditBeRemindObjDialog;
|
||||
|
|
@ -0,0 +1,149 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 启用设置
|
||||
* Description:
|
||||
* Date: 2023/7/19
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { Button, Col, Input, message, Modal, Row } from "antd";
|
||||
import TipLabel from "../../../components/TipLabel";
|
||||
import { WeaCheckbox, WeaFormItem, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
|
||||
import {
|
||||
apiflowBillingConfigEnable,
|
||||
apiflowBillingConfigGet,
|
||||
apiflowBillingConfigSave
|
||||
} from "../../../apis/intelligentCalculateSalarySettings";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class EnableSettings extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
enable: "1", id: "",
|
||||
appKey: "", appSecret: "",
|
||||
loading: false
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.apiflowBillingConfigGet();
|
||||
}
|
||||
|
||||
apiflowBillingConfigGet = () => {
|
||||
apiflowBillingConfigGet().then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { id, appKey, appSecret, enable } = data;
|
||||
this.setState({
|
||||
appKey, appSecret, enable: enable ? "1" : "0", id
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
apiflowBillingConfigEnable = (enable) => {
|
||||
apiflowBillingConfigEnable({ enable }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(enable === "OFF" ? getLabel(111, "关闭成功!") : getLabel(111, "开启成功!"));
|
||||
enable === "OFF" && this.setState({ enable: "0" });
|
||||
} else {
|
||||
message.error(errormsg || (enable === "OFF" ? getLabel(111, "关闭失败!") : getLabel(111, "开启失败!")));
|
||||
this.setState({ enable: this.state.enable });
|
||||
}
|
||||
});
|
||||
};
|
||||
apiflowBillingConfigSave = () => {
|
||||
const { enable, id, appKey, appSecret } = this.state;
|
||||
const payload = {
|
||||
id, appKey, appSecret,
|
||||
enable: enable === "1" ? "ON" : "OFF"
|
||||
};
|
||||
this.setState({ loading: true });
|
||||
apiflowBillingConfigSave(payload).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(384521, "设置成功!"));
|
||||
} else {
|
||||
message.error(errormsg || getLabel(384522, "设置失败!"));
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
handleEnale = (enable) => {
|
||||
if (enable === "1") {
|
||||
this.setState({ enable }, () => this.apiflowBillingConfigEnable("ON"));
|
||||
} else {
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(544344, "确定要关闭智能算薪功能吗?关闭后,将无法使用在线报送人员信息、在线获取专项附加扣除数据、在线个税申报等功能!"),
|
||||
onOk: () => this.apiflowBillingConfigEnable("OFF"),
|
||||
onCancel: () => {
|
||||
this.setState({ enable: this.state.enable });
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
handleChangeInput = (key, val) => this.setState({ [key]: val });
|
||||
|
||||
render() {
|
||||
const { enable, appKey, appSecret, loading } = this.state;
|
||||
const tipList = [
|
||||
getLabel(544282, "1、智能算薪默认是开启的,若购买了智能算薪,请先配置账号密码,在购买的流量足够的前提下即可正常使用;"),
|
||||
getLabel(544283, "2、您可在【接口流量统计】中查看接口流量使用情况;"),
|
||||
getLabel(544284, "3、您可以设置【流量不足提醒】,提前提醒可以避免次月要用时因流量不足无法使用的情况。"),
|
||||
getLabel(544285, "4、如您需了解您购买的流量的使用明细,可查看【流量使用记录】;")
|
||||
];
|
||||
const InputAccount = label => {
|
||||
return (
|
||||
<WeaFormItem label={label} labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
|
||||
<Input
|
||||
value={appKey} autoComplete="new-password" placeholder={getLabel(83869, "请输入")}
|
||||
onChange={e => this.handleChangeInput("appKey", e.target.value)}
|
||||
/>
|
||||
</WeaFormItem>
|
||||
);
|
||||
};
|
||||
const InputPassword = label => {
|
||||
return (
|
||||
<WeaFormItem label={label} labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
|
||||
<Input
|
||||
value={appSecret} type="password" autoComplete="new-password" placeholder={getLabel(83869, "请输入")}
|
||||
onChange={e => this.handleChangeInput("appSecret", e.target.value)}
|
||||
/>
|
||||
</WeaFormItem>
|
||||
);
|
||||
};
|
||||
return (
|
||||
<Row className="enable-settings" gutter={16}>
|
||||
<Col span={16}>
|
||||
<div className="swith-area">
|
||||
<div className="left">
|
||||
<div className="title">{getLabel(111, "智能算薪")}</div>
|
||||
<div
|
||||
className="info">{getLabel(111, "开启智能算薪并输入正确的账号密码,且购买了智能算薪流量,才能正常使用智能算薪功能。")}</div>
|
||||
</div>
|
||||
<div className="right"><WeaCheckbox display="switch" value={enable} onChange={this.handleEnale}/></div>
|
||||
</div>
|
||||
<div className="userinfo">
|
||||
<div className="left">
|
||||
<WeaSearchGroup
|
||||
showGroup needTigger={false} col={3}
|
||||
items={[
|
||||
{ com: InputAccount(getLabel(83594, "账号")) },
|
||||
{ com: InputPassword(getLabel(33150, "密码")) }
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
<div className="right">
|
||||
<Button type="primary" onClick={this.apiflowBillingConfigSave}
|
||||
loading={loading}>{getLabel(725, "提交")}</Button>
|
||||
</div>
|
||||
</div>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<TipLabel tipList={tipList}/>
|
||||
</Col>
|
||||
</Row>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default EnableSettings;
|
||||
|
|
@ -0,0 +1,264 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name:流量不足提醒
|
||||
* Description:
|
||||
* Date: 2023/7/19
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import {
|
||||
WeaButtonIcon,
|
||||
WeaCheckbox,
|
||||
WeaFormItem,
|
||||
WeaInputNumber,
|
||||
WeaLocaleProvider,
|
||||
WeaSearchGroup,
|
||||
WeaTable
|
||||
} from "ecCom";
|
||||
import { message, Modal, Spin } from "antd";
|
||||
import EditBeRemindObjDialog from "./editBeRemindObjDialog";
|
||||
import {
|
||||
apiflowWarnConfigGetForm,
|
||||
apiflowWarnReceiverDelete,
|
||||
apiflowWarnReceiverList
|
||||
} from "../../../apis/intelligentCalculateSalarySettings";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class InsufficientTrafficAlert extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
enable: "0",
|
||||
remindEvent: { businessId: "", eventId: "", moduleId: "", id: "" },
|
||||
threshold: null, channelList: [
|
||||
{ label: "EMobile", type: "IM", channel: "1", value: "1", config: {} },
|
||||
{ label: "邮件", type: "email", channel: "3", value: "1", config: {} },
|
||||
{ label: "短信", type: "message", channel: "4", value: "1", config: {} }
|
||||
], columns: [], dataSource: [],
|
||||
loading: false, remindObjDialog: { visible: false, title: "", warnConfigId: "", id: "" }
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.apiflowWarnConfigGetForm();
|
||||
}
|
||||
|
||||
apiflowWarnConfigGetForm = () => {
|
||||
const { remindEvent } = this.state;
|
||||
apiflowWarnConfigGetForm().then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { enable, businessId, eventId, moduleId, id, threshold } = data;
|
||||
this.setState({
|
||||
enable: enable ? "1" : "0",
|
||||
remindEvent: { ...remindEvent, businessId, eventId, moduleId, id },
|
||||
threshold
|
||||
}, () => {
|
||||
this.state.enable === "1" && this.apiflowWarnReceiverList();
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
apiflowWarnReceiverList = () => {
|
||||
const { remindEvent } = this.state;
|
||||
const { id } = remindEvent;
|
||||
const payload = {
|
||||
warnConfigId: id || this.props.warnConfigId
|
||||
};
|
||||
apiflowWarnReceiverList(payload).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { columns, list: dataSource } = data;
|
||||
this.setState({
|
||||
dataSource,
|
||||
columns: _.map(columns, item => {
|
||||
const { dataIndex } = item;
|
||||
let width = "";
|
||||
switch (dataIndex) {
|
||||
case "employeeName":
|
||||
case "mobile":
|
||||
width = "30%";
|
||||
break;
|
||||
case "email":
|
||||
width = "40%";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return { ...item, width };
|
||||
})
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
apiflowWarnReceiverDelete = (id) => {
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(111, "确定删除吗?删除后数据不可找回"),
|
||||
onOk: () => {
|
||||
apiflowWarnReceiverDelete({ id }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(502230, "删除成功!"));
|
||||
this.apiflowWarnReceiverList();
|
||||
} else {
|
||||
message.error(errormsg || getLabel(20462, "删除失败!"));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
handleEnale = (enable) => {
|
||||
if (enable === "1") {
|
||||
this.setState({ enable }, () => this.apiflowWarnReceiverList());
|
||||
} else {
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(111, "确认关闭提醒吗?关闭并保存后,流量不足时将无法及时提醒。"),
|
||||
onOk: () => {
|
||||
this.setState({ enable });
|
||||
},
|
||||
onCancel: () => {
|
||||
this.setState({ enable: this.state.enable });
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
handleChangeChannel = (o) => {
|
||||
const { channelList } = this.state;
|
||||
this.setState({
|
||||
channelList: _.map(channelList, item => {
|
||||
if (item.type === o.type) {
|
||||
return { ...item, ...o };
|
||||
}
|
||||
return { ...item };
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const {
|
||||
remindEvent, enable, channelList, threshold,
|
||||
loading, columns, dataSource, remindObjDialog
|
||||
} = this.state;
|
||||
const { id } = remindEvent;
|
||||
return (
|
||||
<WeaSearchGroup showGroup needTigger={false} className="insufficientAlertWrapper">
|
||||
<WeaFormItem label={getLabel(501480, "提醒")} labelCol={{ span: 4 }} wrapperCol={{ span: 20 }}>
|
||||
<WeaCheckbox display="switch" value={enable} onChange={this.handleEnale}/>
|
||||
</WeaFormItem>
|
||||
{
|
||||
enable === "1" &&
|
||||
<React.Fragment>
|
||||
<WeaFormItem
|
||||
label={getLabel(544288, "提醒规则")}
|
||||
labelCol={{ span: 4 }} wrapperCol={{ span: 20 }}
|
||||
>
|
||||
<ReminderRules value={threshold} onChange={o => this.setState({ threshold: o })}/>
|
||||
</WeaFormItem>
|
||||
{/*<WeaFormItem*/}
|
||||
{/* colon={false} labelCol={{ span: 4 }} wrapperCol={{ span: 20 }}*/}
|
||||
{/* label={*/}
|
||||
{/* <div className="flex items-center">*/}
|
||||
{/* <span>{getLabel(544287, "提醒推送方式")}:</span>*/}
|
||||
{/* <WeaHelpfulTip*/}
|
||||
{/* width={200} style={{ marginLeft: 10 }}*/}
|
||||
{/* title={getLabel(111, "使用邮箱之前,请先确认是否设置邮件提醒账号。\n" + "使用短信之前,请先确认是否新建签名。")}*/}
|
||||
{/* placement="topLeft"*/}
|
||||
{/* />*/}
|
||||
{/* </div>*/}
|
||||
{/* }*/}
|
||||
{/*>*/}
|
||||
{/* <Pushmethod channelList={channelList} onChange={this.handleChangeChannel}/>*/}
|
||||
{/*</WeaFormItem>*/}
|
||||
</React.Fragment>
|
||||
}
|
||||
{
|
||||
enable === "1" &&
|
||||
<div className="table">
|
||||
<div className="title flex items-center">
|
||||
<span className="titleLeft">{getLabel(111, "提醒对象设置")}</span>
|
||||
<WeaButtonIcon
|
||||
buttonType="add" type="primary"
|
||||
onClick={() => this.setState({
|
||||
remindObjDialog: {
|
||||
...remindObjDialog, visible: true, title: getLabel(111, "添加提醒对象"),
|
||||
warnConfigId: id || this.props.warnConfigId
|
||||
}
|
||||
})}
|
||||
/>
|
||||
{/* 添加提醒对象*/}
|
||||
<EditBeRemindObjDialog
|
||||
{...remindObjDialog}
|
||||
updateWarnList={this.apiflowWarnReceiverList}
|
||||
onCancel={() => this.setState({
|
||||
remindObjDialog: {
|
||||
...remindObjDialog, visible: false, title: "", warnConfigId: "", id: ""
|
||||
}
|
||||
})}
|
||||
/>
|
||||
</div>
|
||||
{
|
||||
loading ? <div className="loading-layout">
|
||||
<Spin spinning={loading}/>
|
||||
</div> : <WeaTable
|
||||
dataSource={dataSource} loading={loading}
|
||||
columns={[
|
||||
...columns,
|
||||
{
|
||||
title: getLabel(30585, "操作"), dataIndex: "operate", width: 120,
|
||||
render: (__, record) => (<div className="space">
|
||||
<a
|
||||
href="javascript:void(0);" className="mr10"
|
||||
onClick={() => this.setState({
|
||||
remindObjDialog: {
|
||||
...remindObjDialog, visible: true, title: getLabel(111, "添加提醒对象"),
|
||||
warnConfigId: id || this.props.warnConfigId, id: record.id
|
||||
}
|
||||
})}>{getLabel(501169, "编辑")}</a>
|
||||
<a href="javascript:void(0);"
|
||||
onClick={() => this.apiflowWarnReceiverDelete(record.id)}>{getLabel(535052, "删除")}</a>
|
||||
</div>)
|
||||
}
|
||||
]} pagination={false}
|
||||
scroll={{ y: `calc(100vh - 190px)` }}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</WeaSearchGroup>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default InsufficientTrafficAlert;
|
||||
|
||||
|
||||
const ReminderRules = (props) => {
|
||||
const { onChange, value } = props;
|
||||
return (
|
||||
<div className="threshold">
|
||||
<span className="before">{getLabel(111, "流量不足")}</span>
|
||||
<WeaInputNumber value={value} onChange={onChange} style={{ width: 180 }} viewAttr={3}/>
|
||||
<span className="after">{getLabel(111, "时提醒")}</span>
|
||||
<span
|
||||
className="tip">{getLabel(111, "为确保智能算薪正常使用,设置建议:若每个月消耗流量10,000,则不足10,000时提醒,以此预留一个月时间续流量")}</span>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const Pushmethod = (props) => {
|
||||
const { onChange, channelList } = props;
|
||||
return <div className="channel-list">
|
||||
{
|
||||
_.map(channelList, item => {
|
||||
const { label, type, value } = item;
|
||||
return (
|
||||
<div className="channel-item">
|
||||
<WeaCheckbox value={value} content={label} onChange={o => onChange({ ...item, value: o })}/>
|
||||
{(type !== "email" && value === "1") && <i className="icon-coms-Flow-setting"/>}
|
||||
</div>
|
||||
);
|
||||
})
|
||||
}
|
||||
</div>;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,162 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 智能算薪-接口流量统计
|
||||
* Description:
|
||||
* Date: 2023/8/29
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { Button, message, Spin } from "antd";
|
||||
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import { apiflowStatisticsInfo, apiflowStatisticsList } from "../../../apis/intelligentCalculateSalarySettings";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class InterfaceFlowStatistics extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
statisticsInfo: {
|
||||
lastUpdateTime: "",
|
||||
staticData: [
|
||||
{
|
||||
key: "total",
|
||||
label: getLabel(111, "购买接口总流量"),
|
||||
value: "",
|
||||
icon: require("../../../common/purchased.png")
|
||||
},
|
||||
{
|
||||
key: "remain", label: getLabel(111, "剩余总流量"), value: "", icon: require("../../../common/remaining.png")
|
||||
},
|
||||
{
|
||||
key: "used", label: getLabel(111, "已使用总流量"), value: "", icon: require("../../../common/traffic.png")
|
||||
}
|
||||
]
|
||||
},
|
||||
columns: [], dataSource: [],
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||
loading: false
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.apiflowStatisticsInfo();
|
||||
this.apiflowStatisticsList();
|
||||
}
|
||||
|
||||
apiflowStatisticsInfo = () => {
|
||||
const { statisticsInfo } = this.state;
|
||||
apiflowStatisticsInfo().then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { lastUpdateTime, ...extraData } = data;
|
||||
this.setState({
|
||||
statisticsInfo: {
|
||||
...statisticsInfo,
|
||||
lastUpdateTime,
|
||||
staticData: _.map(statisticsInfo.staticData, item => ({
|
||||
...item,
|
||||
value: extraData[item["key"]]
|
||||
}))
|
||||
}
|
||||
}, () => this.props.updateTime(this.state.statisticsInfo));
|
||||
}
|
||||
});
|
||||
};
|
||||
apiflowStatisticsList = () => {
|
||||
const { pageInfo } = this.state;
|
||||
const payload = { ...pageInfo };
|
||||
this.setState({ loading: true });
|
||||
apiflowStatisticsList(payload).then(({ status, data, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
|
||||
this.setState({
|
||||
dataSource, pageInfo: { ...pageInfo, current, pageSize, total },
|
||||
columns: _.map(columns, item => {
|
||||
const { dataIndex } = item;
|
||||
let width = "";
|
||||
switch (dataIndex) {
|
||||
case "taxAgentName":
|
||||
case "used":
|
||||
width = "40%";
|
||||
break;
|
||||
default:
|
||||
width = "10%";
|
||||
break;
|
||||
}
|
||||
return { ...item, width };
|
||||
})
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
handleExport = () => {
|
||||
window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/taxdeclaration/apiflow/statistics/export`, "_blank");
|
||||
};
|
||||
|
||||
render() {
|
||||
const { statisticsInfo, pageInfo, loading, dataSource, columns } = this.state;
|
||||
const { staticData } = statisticsInfo;
|
||||
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.apiflowStatisticsList());
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current }
|
||||
}, () => this.apiflowStatisticsList());
|
||||
}
|
||||
};
|
||||
return (
|
||||
<div className="statisticsInfo-layout">
|
||||
<div className="static-data">
|
||||
{
|
||||
_.map(staticData, item => {
|
||||
const { label, icon, value } = item;
|
||||
return (
|
||||
<div className="item">
|
||||
<div className="left"><img src={icon} alt=""/></div>
|
||||
<div className="right">
|
||||
<div className="data">{value}</div>
|
||||
<div className="title">{label}</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
})
|
||||
}
|
||||
</div>
|
||||
<div className="detail-area">
|
||||
<div className="title">
|
||||
<div className="text">{getLabel(111, "使用明细")}</div>
|
||||
<Button type="primary" onClick={this.handleExport}>{getLabel(81272, "导出全部")}</Button>
|
||||
</div>
|
||||
{
|
||||
loading ? <div className="loading-layout">
|
||||
<Spin spinning={loading}/>
|
||||
</div> : <WeaTable
|
||||
dataSource={dataSource} pagination={pagination} loading={loading}
|
||||
columns={[
|
||||
...columns,
|
||||
{
|
||||
title: getLabel(30585, "操作"), dataIndex: "operate",
|
||||
render: () => (<a href="">{getLabel(111, "月统计详情")}</a>)
|
||||
}
|
||||
]}
|
||||
scroll={{ y: `calc(100vh - 190px)` }}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default InterfaceFlowStatistics;
|
||||
|
|
@ -0,0 +1,136 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 智能算薪-流量使用记录
|
||||
* Description:
|
||||
* Date: 2023/8/28
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import { trafficUsageConditions } from "./constants";
|
||||
import { getSearchs } from "../../../util";
|
||||
import moment from "moment";
|
||||
import { apiflowRecordList } from "../../../apis/intelligentCalculateSalarySettings";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("taxAgentStore", "intelligentStore")
|
||||
@observer
|
||||
class TrafficUsageRecords extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
conditions: [], columns: [], dataSource: [],
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||
loading: false
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const { taxAgentStore: { fetchTaxAgentOption }, intelligentStore: { form } } = this.props;
|
||||
fetchTaxAgentOption().then(({ data }) => {
|
||||
this.setState({
|
||||
conditions: _.map(trafficUsageConditions, item => {
|
||||
return {
|
||||
...item,
|
||||
items: _.map(item.items, o => {
|
||||
if (o.conditionType === "SELECT" && o.domkey[0] === "taxAgentId") {
|
||||
return {
|
||||
...o,
|
||||
options: [
|
||||
{ key: "", showname: getLabel(111, "全部(个税扣缴义务人)") },
|
||||
..._.map(data, (i) => ({ key: i.id, showname: i.content }))
|
||||
]
|
||||
};
|
||||
} else if (o.conditionType === "SELECT" && o.domkey[0] !== "taxAgentId") {
|
||||
return {
|
||||
...o,
|
||||
options: _.map(o.options, it => ({ ...it, showname: getLabel(it.lanId, it.showname) }))
|
||||
};
|
||||
}
|
||||
return { ...o };
|
||||
})
|
||||
};
|
||||
})
|
||||
}, () => {
|
||||
form.initFormFields(this.state.conditions);
|
||||
form.updateFields({
|
||||
["startDate__endDate"]: {
|
||||
value: [moment().startOf("month").format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")]
|
||||
}
|
||||
});
|
||||
this.apiflowRecordList();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
apiflowRecordList = () => {
|
||||
const { pageInfo } = this.state;
|
||||
const { intelligentStore: { form } } = this.props;
|
||||
const payload = { ...form.getFormParams(), ...pageInfo };
|
||||
this.setState({ loading: true });
|
||||
apiflowRecordList(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: _.map(columns, item => {
|
||||
const { dataIndex } = item;
|
||||
let width = "";
|
||||
switch (dataIndex) {
|
||||
case "indexNum":
|
||||
case "taxAgentName":
|
||||
case "employeeName":
|
||||
case "businessTypeName":
|
||||
case "creator":
|
||||
case "result":
|
||||
width = "10%";
|
||||
break;
|
||||
case "idCardNo":
|
||||
width = "20%";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return { ...item, width };
|
||||
})
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
|
||||
render() {
|
||||
const { intelligentStore: { form } } = this.props;
|
||||
const { conditions, loading, pageInfo, dataSource, columns } = 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.apiflowRecordList());
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current }
|
||||
}, () => this.apiflowRecordList());
|
||||
}
|
||||
};
|
||||
return (
|
||||
<div className="trafficUsageRecords-layout">
|
||||
<div className="head">{getSearchs(form, conditions, 4, false, this.apiflowRecordList)}</div>
|
||||
<WeaTable
|
||||
columns={columns} dataSource={dataSource}
|
||||
pagination={pagination} loading={loading}
|
||||
scroll={{ y: `calc(100vh - 226px)` }}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default TrafficUsageRecords;
|
||||
|
|
@ -0,0 +1,121 @@
|
|||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaLocaleProvider, WeaReqTop } from "ecCom";
|
||||
import { Button, message, Modal } from "antd";
|
||||
import EnableSettings from "./components/enableSettings";
|
||||
import InsufficientTrafficAlert from "./components/insufficientTrafficAlert";
|
||||
import TrafficUsageRecords from "./components/trafficUsageRecords";
|
||||
import InterfaceFlowStatistics from "./components/interfaceFlowStatistics";
|
||||
import { apiflowWarnConfigSave } from "../../apis/intelligentCalculateSalarySettings";
|
||||
import "./index.less";
|
||||
import { convertToUrlString } from "../../util/url";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const tabs = [
|
||||
{ key: "ENABLE_SETTINGS", title: getLabel(111, "启用设置") },
|
||||
{ key: "INTERFACE_FLOW_STATISTICS", title: getLabel(111, "接口流量统计") },
|
||||
{ key: "INSUFFICIENT_TRAFFIC_ALERT", title: getLabel(111, "流量不足提醒") },
|
||||
{ key: "TRAFFIC_USAGE_RECORD", title: getLabel(111, "流量使用记录") }
|
||||
];
|
||||
|
||||
@inject("intelligentStore")
|
||||
@observer
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
selectedKey: "ENABLE_SETTINGS", lastUpdateTime: "",
|
||||
loading: false, warnConfigId: ""
|
||||
};
|
||||
this.alertRef = null;
|
||||
}
|
||||
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description:流量不足提醒 - 基础信息保存
|
||||
* Params:
|
||||
* Date: 2023/8/29
|
||||
*/
|
||||
saveItaBaseInfo = () => {
|
||||
const { channelList, enable, threshold, remindEvent } = this.alertRef.state;
|
||||
const validateError = (enable === "1") && (_.every(channelList, o => o.channel !== "1") || _.isNil(threshold));
|
||||
if (validateError) {
|
||||
Modal.warning({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(518702, "必要信息不完整,红色*为必填项!")
|
||||
});
|
||||
return;
|
||||
}
|
||||
const { businessId, id } = remindEvent;
|
||||
const config = _.map(_.filter(channelList, p => p.value === "1"), o => ({ channel: o.channel, config: o.config }));
|
||||
const payload = {
|
||||
id, businessId, threshold,
|
||||
enable: enable === "1",
|
||||
config: JSON.stringify(config)
|
||||
};
|
||||
this.setState({ loading: true });
|
||||
apiflowWarnConfigSave(payload).then(({ status, data, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(22619, "保存成功!"));
|
||||
this.setState({ warnConfigId: data });
|
||||
payload.enable && this.alertRef.apiflowWarnReceiverList();
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
renderChildren = () => {
|
||||
const { selectedKey, warnConfigId } = this.state;
|
||||
let CurrentDom = null;
|
||||
switch (selectedKey) {
|
||||
case "ENABLE_SETTINGS":
|
||||
CurrentDom = <EnableSettings/>;
|
||||
break;
|
||||
case "INTERFACE_FLOW_STATISTICS":
|
||||
CurrentDom =
|
||||
<InterfaceFlowStatistics updateTime={(data) => this.setState({ lastUpdateTime: data.lastUpdateTime })}/>;
|
||||
break;
|
||||
case "INSUFFICIENT_TRAFFIC_ALERT":
|
||||
CurrentDom = <InsufficientTrafficAlert ref={dom => this.alertRef = dom} warnConfigId={warnConfigId}/>;
|
||||
break;
|
||||
case "TRAFFIC_USAGE_RECORD":
|
||||
CurrentDom = <TrafficUsageRecords/>;
|
||||
break;
|
||||
default:
|
||||
CurrentDom = null;
|
||||
break;
|
||||
}
|
||||
return CurrentDom;
|
||||
};
|
||||
handleExport = () => {
|
||||
const { intelligentStore: { form } } = this.props;
|
||||
window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/taxdeclaration/apiflow/record/export?${convertToUrlString(form.getFormParams())}`, "_blank");
|
||||
};
|
||||
|
||||
render() {
|
||||
const { selectedKey, lastUpdateTime, loading } = this.state;
|
||||
const buttons = selectedKey === "INSUFFICIENT_TRAFFIC_ALERT" ?
|
||||
[<Button type="primary" onClick={this.saveItaBaseInfo} loading={loading}>{getLabel(537558, "保存")}</Button>] :
|
||||
selectedKey === "TRAFFIC_USAGE_RECORD" ?
|
||||
[<Button type="primary" onClick={this.handleExport}>{getLabel(17416, "导出")}</Button>] :
|
||||
selectedKey === "INTERFACE_FLOW_STATISTICS" ? [
|
||||
<span className="statistic-time">
|
||||
<span className="label">{getLabel(111, "最后统计时间:")}</span>
|
||||
<span className="value">{lastUpdateTime}</span>
|
||||
</span>
|
||||
] : [];
|
||||
return (
|
||||
<WeaReqTop
|
||||
title={getLabel(111, "智能算薪")} selectedKey={selectedKey}
|
||||
icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
tabDatas={tabs} onChange={selectedKey => this.setState({ selectedKey })}
|
||||
buttons={buttons} className="intelligentSetting-layout"
|
||||
>
|
||||
<div style={{ height: "100%", background: "#f6f6f6", padding: 16 }}>{this.renderChildren()}</div>
|
||||
</WeaReqTop>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,224 @@
|
|||
.intelligentSetting-layout {
|
||||
.wea-new-top-req-title > div:last-child {
|
||||
right: 16px !important;
|
||||
}
|
||||
|
||||
.statistic-time {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.space {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.mr10 {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.enable-settings {
|
||||
.swith-area, .userinfo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 10px 16px;
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
height: 80px;
|
||||
border: 2px solid #e5e5e5;
|
||||
border-left-color: #5d9cec;
|
||||
|
||||
.left {
|
||||
padding: 10px 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
|
||||
.title {
|
||||
font-size: 14px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.info {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.userinfo {
|
||||
margin-top: 16px;
|
||||
|
||||
.left {
|
||||
flex: 1 !important;
|
||||
|
||||
.wea-search-group, .wea-form-cell {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.insufficientAlertWrapper {
|
||||
background: #fff;
|
||||
padding: 0;
|
||||
border: 1px solid #f2f2f2;
|
||||
border-bottom: none;
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.items-center {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.wea-content {
|
||||
padding: 0;
|
||||
|
||||
.wea-form-item {
|
||||
padding: 5px 12px;
|
||||
border-bottom: 1px solid #f2f2f2;
|
||||
}
|
||||
}
|
||||
|
||||
.threshold {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.before {
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
.after {
|
||||
margin-left: 16px;
|
||||
margin-right: 16px;
|
||||
}
|
||||
|
||||
.tip {
|
||||
display: inline-block;
|
||||
color: #999;
|
||||
padding: 6px 0;
|
||||
}
|
||||
}
|
||||
|
||||
.channel-list {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
& > .channel-item:not(:first-child) {
|
||||
margin-left: 16px;
|
||||
}
|
||||
|
||||
.channel-item {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
min-height: 30px;
|
||||
}
|
||||
|
||||
.icon-coms-Flow-setting {
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
margin-top: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.table {
|
||||
.title {
|
||||
height: 40px;
|
||||
justify-content: space-between;
|
||||
background: #f6f6f6;
|
||||
|
||||
.titleLeft {
|
||||
font-size: 14px;
|
||||
color: #111;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.trafficUsageRecords-layout {
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
|
||||
.head {
|
||||
margin-bottom: 16px;
|
||||
|
||||
.wea-search-group {
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.wea-search-group, .wea-content, .wea-form-cell, .wea-form-item {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.statisticsInfo-layout {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.static-data {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
height: 80px;
|
||||
background-color: #fff;
|
||||
border: 2px solid #e5e5e5;
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
|
||||
.left {
|
||||
width: 65px;
|
||||
height: 65px;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
margin-left: 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
|
||||
.data {
|
||||
color: #111;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.title {
|
||||
margin-top: 8px;
|
||||
color: #999;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.detail-area {
|
||||
margin-top: 8px;
|
||||
|
||||
.title {
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.text {
|
||||
font-size: 14px;
|
||||
color: #111;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,120 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 个税对接-累计字段对应
|
||||
* Description:
|
||||
* Date: 2023/8/17
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider, WeaSearchGroup, WeaTab } from "ecCom";
|
||||
import LedgerFieldsItemPopver from "./ledgerFieldsItemPopver";
|
||||
import { addupruleGetForm } from "../../../apis/ledger";
|
||||
import LedgerFieldsTable from "./ledgerFieldsTable";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
class CumulativeFields extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
selectedKey: "", tabs: [],
|
||||
addupruleFields: []
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.taxreportruleGetForm();
|
||||
}
|
||||
|
||||
taxreportruleGetForm = () => {
|
||||
const { editId, saveSalarySobId } = this.props;
|
||||
addupruleGetForm({ id: editId || saveSalarySobId }).then(({ status, data }) => {
|
||||
if (status && !_.isEmpty(data)) {
|
||||
this.setState({
|
||||
tabs: _.map(data, it => ({ viewcondition: it.incomeCategoryId, title: it.incomeCategoryName })),
|
||||
selectedKey: _.take(data)[0].incomeCategoryId,
|
||||
addupruleFields: data
|
||||
}, () => this.props.onSetAdduprule(this.state.addupruleFields, this.state.selectedKey));
|
||||
}
|
||||
});
|
||||
};
|
||||
handleChangeSwitch = (visible, id) => {
|
||||
const { addupruleFields, selectedKey } = this.state;
|
||||
this.setState({
|
||||
addupruleFields: _.map(addupruleFields, it => {
|
||||
if (it.incomeCategoryId === selectedKey) {
|
||||
return {
|
||||
...it,
|
||||
addUpRules: _.map(it.addUpRules, child => {
|
||||
if (child.id === id) {
|
||||
return { ...child, visible };
|
||||
}
|
||||
return { ...child, visible: false };
|
||||
})
|
||||
};
|
||||
}
|
||||
return { ...it };
|
||||
})
|
||||
}, () => this.props.onSetAdduprule(this.state.addupruleFields, this.state.selectedKey));
|
||||
};
|
||||
handleChangeAddupruleFieldsItem = (salaryItem, recordRuleId) => {
|
||||
const { addupruleFields, selectedKey } = this.state;
|
||||
this.setState({
|
||||
addupruleFields: _.map(addupruleFields, it => {
|
||||
if (it.incomeCategoryId === selectedKey) {
|
||||
return {
|
||||
...it,
|
||||
addUpRules: _.map(it.addUpRules, child => {
|
||||
if (child.id === recordRuleId) {
|
||||
return { ...child, visible: false, salaryItem };
|
||||
}
|
||||
return { ...child, visible: false };
|
||||
})
|
||||
};
|
||||
}
|
||||
return { ...it };
|
||||
})
|
||||
}, () => this.props.onSetAdduprule(this.state.addupruleFields, this.state.selectedKey));
|
||||
};
|
||||
|
||||
render() {
|
||||
const { editId, saveSalarySobId } = this.props;
|
||||
const { selectedKey, tabs, addupruleFields } = this.state;
|
||||
const dataSource = _.takeWhile(addupruleFields, it => it.incomeCategoryId === selectedKey);
|
||||
return (
|
||||
<WeaSearchGroup
|
||||
className="incomeWrapper" showGroup needTigger={false}
|
||||
title={
|
||||
<div className="incomeTitleContail">
|
||||
<WeaTab
|
||||
datas={tabs} keyParam="viewcondition" selectedKey={selectedKey}
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
<LedgerFieldsTable
|
||||
columns={[
|
||||
{
|
||||
title: getLabel(111, "往期累计情况字段"),
|
||||
width: "50%",
|
||||
dataIndex: "addUpColumnName"
|
||||
},
|
||||
{
|
||||
title: getLabel(111, "对应本账套薪资项目"),
|
||||
width: "50%",
|
||||
dataIndex: "salaryItem",
|
||||
render: (_, record) => (
|
||||
<LedgerFieldsItemPopver salarySobId={editId || saveSalarySobId} record={record}
|
||||
onChangeSwitch={this.handleChangeSwitch}
|
||||
onChange={this.handleChangeAddupruleFieldsItem}
|
||||
/>
|
||||
)
|
||||
}
|
||||
]}
|
||||
dataSource={dataSource}
|
||||
/>
|
||||
</WeaSearchGroup>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default CumulativeFields;
|
||||
|
|
@ -0,0 +1,139 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 个税申报字段对应
|
||||
* Description:
|
||||
* Date: 2023/2/16
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaHelpfulTip, WeaLocaleProvider, WeaSearchGroup, WeaTab } from "ecCom";
|
||||
import LedgerFieldsItemPopver from "./ledgerFieldsItemPopver";
|
||||
import { taxreportruleGetForm } from "../../../apis/ledger";
|
||||
import LedgerFieldsTable from "./ledgerFieldsTable";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
class IncomeTaxFields extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
selectedKey: "", tabs: [],
|
||||
incomeTaxFields: [], keywords: ""
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.taxreportruleGetForm();
|
||||
}
|
||||
|
||||
taxreportruleGetForm = () => {
|
||||
const { editId, saveSalarySobId } = this.props;
|
||||
taxreportruleGetForm({ id: editId || saveSalarySobId }).then(({ status, data }) => {
|
||||
if (status && !_.isEmpty(data)) {
|
||||
this.setState({
|
||||
tabs: _.map(data, it => ({ viewcondition: it.incomeCategoryId, title: it.incomeCategoryName })),
|
||||
selectedKey: _.take(data)[0].incomeCategoryId,
|
||||
incomeTaxFields: data
|
||||
}, () => this.props.onSetTaxreportrule(this.state.incomeTaxFields, this.state.selectedKey));
|
||||
}
|
||||
});
|
||||
};
|
||||
handleChangeSwitch = (visible, id) => {
|
||||
const { incomeTaxFields, selectedKey } = this.state;
|
||||
this.setState({
|
||||
incomeTaxFields: _.map(incomeTaxFields, it => {
|
||||
if (it.incomeCategoryId === selectedKey) {
|
||||
return {
|
||||
...it,
|
||||
taxReportRules: _.map(it.taxReportRules, child => {
|
||||
if (child.id === id) {
|
||||
return { ...child, visible };
|
||||
}
|
||||
return { ...child, visible: false };
|
||||
})
|
||||
};
|
||||
}
|
||||
return { ...it };
|
||||
})
|
||||
}, () => this.props.onSetTaxreportrule(this.state.incomeTaxFields, this.state.selectedKey));
|
||||
};
|
||||
handleChangeIncomeFieldsItem = (salaryItem, recordRuleId) => {
|
||||
const { incomeTaxFields, selectedKey } = this.state;
|
||||
this.setState({
|
||||
incomeTaxFields: _.map(incomeTaxFields, it => {
|
||||
if (it.incomeCategoryId === selectedKey) {
|
||||
return {
|
||||
...it,
|
||||
taxReportRules: _.map(it.taxReportRules, child => {
|
||||
if (child.id === recordRuleId) {
|
||||
return { ...child, visible: false, salaryItem };
|
||||
}
|
||||
return { ...child, visible: false };
|
||||
})
|
||||
};
|
||||
}
|
||||
return { ...it };
|
||||
})
|
||||
}, () => {
|
||||
this.props.onSetTaxreportrule(this.state.incomeTaxFields, this.state.selectedKey);
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { editId, saveSalarySobId } = this.props;
|
||||
const { selectedKey, tabs, incomeTaxFields, keywords } = this.state;
|
||||
const list = _.map(incomeTaxFields, it => {
|
||||
if (it.incomeCategoryId === selectedKey) {
|
||||
return {
|
||||
...it,
|
||||
taxReportRules: _.filter(it.taxReportRules, item => item.reportColumnName.indexOf(keywords) !== -1)
|
||||
};
|
||||
}
|
||||
return { ...it };
|
||||
});
|
||||
const dataSource = _.takeWhile(list, it => it.incomeCategoryId === selectedKey);
|
||||
return (
|
||||
<WeaSearchGroup
|
||||
className="incomeWrapper" showGroup needTigger={false}
|
||||
title={
|
||||
<div className="incomeTitleContail">
|
||||
<WeaTab
|
||||
datas={tabs} keyParam="viewcondition" selectedKey={selectedKey}
|
||||
searchType={["base"]} searchsBasePlaceHolder={getLabel(111, "请输入对象")}
|
||||
onSearch={val => this.setState({ keywords: val })}
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
<LedgerFieldsTable
|
||||
columns={[
|
||||
{
|
||||
title: <span>
|
||||
<span style={{ marginRight: 8 }}>{getLabel(111, "个税申报表字段")}</span>
|
||||
<WeaHelpfulTip
|
||||
title={getLabel(111, "若【个税申报表字段】与【对应本账套薪资项目】对应,则申报表内数据为当前账套核算数据,若【个税申报表字段】未与【对应本账套薪资项目】对应,则申报表内数据默认显示为0")}
|
||||
placement="top" width={250}
|
||||
/>
|
||||
</span>,
|
||||
width: "50%",
|
||||
dataIndex: "reportColumnName"
|
||||
},
|
||||
{
|
||||
title: getLabel(111, "对应本账套薪资项目"),
|
||||
width: "50%",
|
||||
dataIndex: "salaryItem",
|
||||
render: (_, record) => (
|
||||
<LedgerFieldsItemPopver salarySobId={editId || saveSalarySobId} record={record}
|
||||
onChangeSwitch={this.handleChangeSwitch}
|
||||
onChange={this.handleChangeIncomeFieldsItem}
|
||||
/>
|
||||
)
|
||||
}
|
||||
]}
|
||||
dataSource={dataSource}
|
||||
/>
|
||||
</WeaSearchGroup>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default IncomeTaxFields;
|
||||
|
|
@ -0,0 +1,148 @@
|
|||
/*
|
||||
*
|
||||
* 个税字段对应
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2024/6/17
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider, WeaSearchGroup, WeaTab } from "ecCom";
|
||||
import LedgerFieldsItemPopver from "./ledgerFieldsItemPopver";
|
||||
import { taxruleGetForm } from "../../../apis/ledger";
|
||||
import LedgerFieldsTable from "./ledgerFieldsTable";
|
||||
import uuidV4 from "uuid/v4";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
class IncomeTaxFields extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
selectedKey: "", tabs: [],
|
||||
incomeTaxFields: [], keywords: ""
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.taxruleGetForm();
|
||||
}
|
||||
|
||||
taxruleGetForm = () => {
|
||||
const { editId, saveSalarySobId } = this.props;
|
||||
taxruleGetForm({ id: editId || saveSalarySobId }).then(({ status, data }) => {
|
||||
if (status && !_.isEmpty(data)) {
|
||||
this.setState({
|
||||
tabs: _.map(data, it => ({ viewcondition: it.incomeCategoryId, title: it.incomeCategoryName })),
|
||||
selectedKey: _.take(data)[0].incomeCategoryId,
|
||||
incomeTaxFields: _.map(data, it => ({
|
||||
...it, taxReportRules: _.map(it.taxRules, o => ({
|
||||
...o, canEdit: o.canEdit, id: uuidV4(), reportColumnDataIndex: o.taxIndex, reportColumnName: o.name,
|
||||
salaryItem: [{ id: o.salaryItemId, name: o.salaryItemName }]
|
||||
}))
|
||||
}))
|
||||
}, () => this.props.onSetTaxreportrule(this.state.incomeTaxFields, this.state.selectedKey));
|
||||
}
|
||||
});
|
||||
};
|
||||
handleChangeSwitch = (visible, id) => {
|
||||
const { incomeTaxFields, selectedKey } = this.state;
|
||||
this.setState({
|
||||
incomeTaxFields: _.map(incomeTaxFields, it => {
|
||||
if (it.incomeCategoryId === selectedKey) {
|
||||
return {
|
||||
...it,
|
||||
taxReportRules: _.map(it.taxReportRules, child => {
|
||||
if (child.id === id) {
|
||||
return { ...child, visible };
|
||||
}
|
||||
return { ...child, visible: false };
|
||||
})
|
||||
};
|
||||
}
|
||||
return { ...it };
|
||||
})
|
||||
}, () => this.props.onSetTaxreportrule(this.state.incomeTaxFields, this.state.selectedKey));
|
||||
};
|
||||
handleChangeIncomeFieldsItem = (salaryItem, recordRuleId) => {
|
||||
const { incomeTaxFields, selectedKey } = this.state;
|
||||
this.setState({
|
||||
incomeTaxFields: _.map(incomeTaxFields, it => {
|
||||
if (it.incomeCategoryId === selectedKey) {
|
||||
return {
|
||||
...it,
|
||||
taxReportRules: _.map(it.taxReportRules, child => {
|
||||
if (child.id === recordRuleId) {
|
||||
return { ...child, visible: false, salaryItem };
|
||||
}
|
||||
return { ...child, visible: false };
|
||||
})
|
||||
};
|
||||
}
|
||||
return { ...it };
|
||||
})
|
||||
}, () => {
|
||||
this.props.onSetTaxreportrule(this.state.incomeTaxFields, this.state.selectedKey);
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { editId, saveSalarySobId } = this.props;
|
||||
const { selectedKey, tabs, incomeTaxFields, keywords } = this.state;
|
||||
const list = _.map(incomeTaxFields, it => {
|
||||
if (it.incomeCategoryId === selectedKey) {
|
||||
return {
|
||||
...it,
|
||||
taxReportRules: _.filter(it.taxReportRules, item => item.reportColumnName.indexOf(keywords) !== -1)
|
||||
};
|
||||
}
|
||||
return { ...it };
|
||||
});
|
||||
const dataSource = _.takeWhile(list, it => it.incomeCategoryId === selectedKey);
|
||||
return (
|
||||
<WeaSearchGroup
|
||||
className="incomeWrapper" showGroup needTigger={false}
|
||||
title={
|
||||
<div className="incomeTitleContail">
|
||||
<WeaTab
|
||||
datas={tabs} keyParam="viewcondition" selectedKey={selectedKey}
|
||||
searchType={["base"]} searchsBasePlaceHolder={getLabel(111, "请输入对象")}
|
||||
onSearch={val => this.setState({ keywords: val })}
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
<LedgerFieldsTable
|
||||
columns={[
|
||||
{
|
||||
title: <span>
|
||||
<span style={{ marginRight: 8 }}>{getLabel(111, "个税申报表字段")}</span>
|
||||
{/*<WeaHelpfulTip*/}
|
||||
{/* title={getLabel(111, "若【个税申报表字段】与【对应本账套薪资项目】对应,则申报表内数据为当前账套核算数据,若【个税申报表字段】未与【对应本账套薪资项目】对应,则申报表内数据默认显示为0")}*/}
|
||||
{/* placement="top" width={250}*/}
|
||||
{/*/>*/}
|
||||
</span>,
|
||||
width: "50%",
|
||||
dataIndex: "reportColumnName"
|
||||
},
|
||||
{
|
||||
title: getLabel(111, "对应本账套薪资项目"),
|
||||
width: "50%",
|
||||
dataIndex: "salaryItem",
|
||||
render: (_, record) => (
|
||||
<LedgerFieldsItemPopver salarySobId={editId || saveSalarySobId} record={record}
|
||||
onChangeSwitch={this.handleChangeSwitch}
|
||||
onChange={this.handleChangeIncomeFieldsItem}
|
||||
/>
|
||||
)
|
||||
}
|
||||
]}
|
||||
dataSource={dataSource}
|
||||
/>
|
||||
</WeaSearchGroup>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default IncomeTaxFields;
|
||||
|
|
@ -252,7 +252,6 @@
|
|||
color: #55a1f8;
|
||||
}
|
||||
|
||||
|
||||
.moveModalWrapper {
|
||||
.ant-radio-group {
|
||||
display: grid;
|
||||
|
|
@ -280,3 +279,94 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
//个税申报字段对应
|
||||
.incomeWrapper {
|
||||
padding: 0;
|
||||
|
||||
.wea-content {
|
||||
padding: 10px 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.income_pop_wrapper .ant-popover-inner-content {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.income_pop_wrapper {
|
||||
width: 180px !important;
|
||||
}
|
||||
|
||||
.income_result_wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 80px;
|
||||
max-height: 250px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.income_result_wrapper li {
|
||||
line-height: 30px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.income_result_wrapper li:not(.emptyLi):hover {
|
||||
background: #e9f7ff;
|
||||
}
|
||||
|
||||
.income_result_wrapper li.emptyLi {
|
||||
text-align: center;
|
||||
|
||||
.anticon-inbox {
|
||||
color: #5d9cec;
|
||||
font-size: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.incomeSearchGroup {
|
||||
input {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
button {
|
||||
border-left: none;
|
||||
border-radius: 0;
|
||||
height: 28px;
|
||||
line-height: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
.incomeDialog {
|
||||
.incomeDialogTitle {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.incomeDialogTitle-left {
|
||||
text-align: left;
|
||||
|
||||
.title {
|
||||
color: #111;
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
|
||||
.incomeDialogTitle-right {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
.incomeDialogContent {
|
||||
height: 100%;
|
||||
padding: 8px 16px;
|
||||
background: #f6f6f6;
|
||||
|
||||
.wea-input-focus {
|
||||
margin-bottom: 2px!important;
|
||||
margin-top: 0!important;
|
||||
}
|
||||
|
||||
.clearfix {
|
||||
background: #FFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,10 +5,11 @@
|
|||
* Date: 2022/12/9
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaCheckbox, WeaFormItem, WeaHelpfulTip, WeaInput, WeaSelect, WeaTextarea } from "ecCom";
|
||||
import { WeaCheckbox, WeaFormItem, WeaHelpfulTip, WeaInput, WeaLocaleProvider, WeaSelect, WeaTextarea } from "ecCom";
|
||||
import { Col, Row } from "antd";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { baseSettingFormItem } from "../config";
|
||||
import { getLedgerBasicForm } from "../../../apis/ledger";
|
||||
import { getIncomeCategoryList, getLedgerBasicForm } from "../../../apis/ledger";
|
||||
import {
|
||||
generateBasicInfo,
|
||||
getAddMonthYearMonth,
|
||||
|
|
@ -20,8 +21,13 @@ import {
|
|||
import { commonEnumList } from "../../../apis/ruleconfig";
|
||||
import { postFetch } from "../../../util/request";
|
||||
import moment from "moment";
|
||||
import cs from "classnames";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("taxAgentStore")
|
||||
@observer
|
||||
class LedgerBaseSetting extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
|
@ -79,7 +85,7 @@ class LedgerBaseSetting extends Component {
|
|||
description: "",
|
||||
canEdit: "true"
|
||||
}
|
||||
});
|
||||
}, () => this.props.onTaxableItemsChange(this.state.settingBaseInfo.taxableItems));
|
||||
};
|
||||
getLedgerBasicForm = (id) => {
|
||||
getLedgerBasicForm({ id }).then(({ status, data }) => {
|
||||
|
|
@ -101,6 +107,7 @@ class LedgerBaseSetting extends Component {
|
|||
}
|
||||
}, () => {
|
||||
this.props.onSaveParams(this.state.settingBaseInfo);
|
||||
this.props.onTaxableItemsChange(this.state.settingBaseInfo.taxableItems);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
@ -123,10 +130,7 @@ class LedgerBaseSetting extends Component {
|
|||
});
|
||||
};
|
||||
commonEenumList = () => {
|
||||
const payload = {
|
||||
enumClass: "com.engine.salary.enums.salarysob.IncomeCategoryEnum"
|
||||
};
|
||||
commonEnumList(payload).then(({ status, data }) => {
|
||||
getIncomeCategoryList().then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { baseForm } = this.state;
|
||||
this.setState({
|
||||
|
|
@ -134,7 +138,16 @@ class LedgerBaseSetting extends Component {
|
|||
if (it.key === "taxableItems") {
|
||||
return {
|
||||
...it,
|
||||
options: _.map(data, it => ({ key: it.value.toString(), showname: it.defaultLabel }))
|
||||
options: _.map(data, it => ({
|
||||
key: it.value.toString(),
|
||||
showname: <div className="reportTypeName-box">
|
||||
<span>{it.defaultLabel}</span>
|
||||
<span
|
||||
className={cs("reportTypeName", { "danger": it.reportTypeName === getLabel(111, "非居民所得") })}>
|
||||
{it.reportTypeName}
|
||||
</span>
|
||||
</div>
|
||||
}))
|
||||
};
|
||||
}
|
||||
return { ...it };
|
||||
|
|
@ -153,6 +166,7 @@ class LedgerBaseSetting extends Component {
|
|||
}
|
||||
}, () => {
|
||||
onSaveParams(this.state.settingBaseInfo);
|
||||
this.props.onTaxableItemsChange(this.state.settingBaseInfo.taxableItems);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,137 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 薪资账套-申报字段对应查询弹框
|
||||
* Description:
|
||||
* Date: 2023/8/16
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { Icon, Popover } from "antd";
|
||||
import { WeaInputSearch, WeaLocaleProvider } from "ecCom";
|
||||
import { commonBrowserData } from "../../../apis";
|
||||
import LedgerSalaryItemSelectDialog from "./ledgerSalaryItemSelectDialog";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
class LedgerFieldsItemPopver extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
dataList: [],
|
||||
keywords: "",
|
||||
salaryItemSelectDialog: {
|
||||
visible: false, salarySobId: ""
|
||||
}
|
||||
};
|
||||
this.handleDebounce = null;
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.record !== this.props.record && nextProps.record.visible) {
|
||||
this.commonBrowserData(nextProps);
|
||||
} else {
|
||||
const { record } = nextProps;
|
||||
const salaryItemName = record.salaryItem[0] ? record.salaryItem[0].name : "";
|
||||
this.setState({ dataList: [], keywords: salaryItemName });
|
||||
}
|
||||
}
|
||||
|
||||
handleFocusChange = (visible) => {
|
||||
const { keywords } = this.state;
|
||||
const { record, onChangeSwitch } = this.props;
|
||||
visible && onChangeSwitch(visible, record.id);
|
||||
if (visible && keywords) {
|
||||
this.setState({ keywords: "" });
|
||||
}
|
||||
};
|
||||
handleChange = (keywords) => {
|
||||
this.setState({ keywords }, () => this.handleSearch());
|
||||
!keywords && this.props.onChange([], this.props.record.id);
|
||||
};
|
||||
commonBrowserData = (props) => {
|
||||
const { salarySobId } = props;
|
||||
const { keywords } = this.state;
|
||||
const payload = {
|
||||
type: "salaryItemBrowser",
|
||||
jsonParam: JSON.stringify({ salarySobId, key: keywords })
|
||||
};
|
||||
commonBrowserData(payload).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { list: dataList } = data;
|
||||
this.setState({ dataList });
|
||||
}
|
||||
});
|
||||
};
|
||||
handleSearch = () => {
|
||||
if (!this.handleDebounce) {
|
||||
this.handleDebounce = _.debounce(() => {
|
||||
this.commonBrowserData(this.props);
|
||||
this.handleDebounce = null;
|
||||
}, 500);
|
||||
}
|
||||
this.handleDebounce();
|
||||
};
|
||||
handleClickItem = (item) => {
|
||||
this.setState({
|
||||
keywords: item.name
|
||||
}, () => this.props.onChange([item], this.props.record.id));
|
||||
};
|
||||
|
||||
render() {
|
||||
const { keywords, dataList, salaryItemSelectDialog } = this.state;
|
||||
const { record, onChangeSwitch, salarySobId } = this.props;
|
||||
return (
|
||||
<React.Fragment>
|
||||
<Popover content={
|
||||
<ul className="income_result_wrapper">
|
||||
{
|
||||
!_.isEmpty(dataList) ?
|
||||
_.map(dataList, it => (<li key={it.key} onClick={() => this.handleClickItem(it)}>{it.name}</li>)) :
|
||||
<li className="emptyLi">
|
||||
<Icon type="inbox"/>
|
||||
<p className="empty-title">{getLabel(83553, "暂无数据")}</p>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
} trigger="click" placement="right" overlayClassName="income_pop_wrapper"
|
||||
visible={record.visible}
|
||||
onVisibleChange={(visible) => onChangeSwitch(visible, record.id)}
|
||||
>
|
||||
<WeaInputSearch
|
||||
style={{ width: 200 }} placeholder={getLabel(18214, "请选择")}
|
||||
onFocusChange={this.handleFocusChange}
|
||||
value={keywords} onSearchChange={this.handleChange}
|
||||
onSearch={() => this.setState({
|
||||
salaryItemSelectDialog: {
|
||||
...salaryItemSelectDialog,
|
||||
visible: true,
|
||||
salarySobId
|
||||
}
|
||||
})}
|
||||
/>
|
||||
</Popover>
|
||||
<LedgerSalaryItemSelectDialog
|
||||
{...salaryItemSelectDialog}
|
||||
handleClickItem={this.handleClickItem}
|
||||
handleClearSalaryItem={() => {
|
||||
this.setState({
|
||||
salaryItemSelectDialog: {
|
||||
...salaryItemSelectDialog,
|
||||
visible: false,
|
||||
salarySobId: ""
|
||||
}
|
||||
}, () => this.props.onChange([], this.props.record.id));
|
||||
}}
|
||||
onCancel={() => this.setState({
|
||||
salaryItemSelectDialog: {
|
||||
...salaryItemSelectDialog,
|
||||
visible: false,
|
||||
salarySobId: ""
|
||||
}
|
||||
})}
|
||||
/>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default LedgerFieldsItemPopver;
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 个税申报-字段对应查看列表
|
||||
* Description:
|
||||
* Date: 2023/8/16
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaTable } from "ecCom";
|
||||
|
||||
class LedgerFieldsTable extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
dataSource: []
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.dataSource !== this.props.dataSource && !_.isEmpty(nextProps.dataSource)) {
|
||||
this.setState({
|
||||
dataSource: _.take(nextProps.dataSource)[0].taxReportRules || _.take(nextProps.dataSource)[0].addUpRules
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
const { columns } = this.props;
|
||||
const { dataSource } = this.state;
|
||||
return (
|
||||
<WeaTable dataSource={dataSource} columns={columns} pagination={false} bordered/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default LedgerFieldsTable;
|
||||
|
|
@ -0,0 +1,120 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 个税对应字段-薪资项目选择弹框
|
||||
* Description:
|
||||
* Date: 2023/8/17
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaDialog, WeaInputSearch, WeaLocaleProvider } from "ecCom";
|
||||
import { Button, Col, Row, Table } from "antd";
|
||||
import { commonBrowserData } from "../../../apis";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
class LedgerSalaryItemSelectDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
pageInfo: { current: 1, pageSize: 20, total: 0 },
|
||||
loading: false, columns: [], dataSource: [],
|
||||
keywords: ""
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.commonBrowserData(nextProps);
|
||||
}
|
||||
|
||||
commonBrowserData = (props) => {
|
||||
const { salarySobId } = props;
|
||||
const { keywords, pageInfo } = this.state;
|
||||
const payload = {
|
||||
type: "salaryItemBrowser",
|
||||
jsonParam: JSON.stringify({ salarySobId, key: keywords }),
|
||||
...pageInfo
|
||||
};
|
||||
this.setState({ loading: true });
|
||||
commonBrowserData(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { list: dataSource, columns, pageNum: current, pageSize, total } = data;
|
||||
this.setState({
|
||||
dataSource, columns,
|
||||
pageInfo: { ...pageInfo, current, pageSize, total }
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
handleRowClick = (record) => {
|
||||
this.props.onCancel();
|
||||
this.props.handleClickItem(record);
|
||||
};
|
||||
|
||||
render() {
|
||||
const { loading, columns, dataSource, pageInfo, keywords } = this.state;
|
||||
const pagination = {
|
||||
...pageInfo,
|
||||
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
pageSizeOptions: ["20", "50", "100"],
|
||||
onShowSizeChange: (current, pageSize) => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize }
|
||||
}, () => this.commonBrowserData(this.props));
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current }
|
||||
}, () => this.commonBrowserData(this.props));
|
||||
}
|
||||
};
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} hasScroll className="incomeDialog" initLoadCss ref={dom => this.incomeRef = dom}
|
||||
buttons={[
|
||||
<Button type="primary" onClick={this.props.handleClearSalaryItem}>{getLabel(111, "清除")}</Button>
|
||||
]}
|
||||
title={(<Row className="incomeDialogTitle" type="flex">
|
||||
<Col span={12} className="incomeDialogTitle-left">
|
||||
<span className="title">{getLabel(543598, "请选择薪资项目")}</span>
|
||||
</Col>
|
||||
<Col span={12} className="incomeDialogTitle-right">
|
||||
<Button type="ghost" icon="reload" title={getLabel(111, "刷新")} onClick={() => {
|
||||
this.setState({
|
||||
keywords: "",
|
||||
pageInfo: { ...pageInfo, current: 1 }
|
||||
}, () => this.commonBrowserData(this.props));
|
||||
}}/>
|
||||
</Col>
|
||||
</Row>)}
|
||||
style={{
|
||||
width: 850,
|
||||
height: 606.6,
|
||||
minHeight: 200,
|
||||
minWidth: 380,
|
||||
maxHeight: "90%",
|
||||
maxWidth: "90%",
|
||||
overflow: "hidden",
|
||||
transform: "translate(0px, 0px)"
|
||||
}}
|
||||
>
|
||||
<div className="incomeDialogContent">
|
||||
<WeaInputSearch
|
||||
style={{ width: "100%", margin: "6px 0" }} placeholder={getLabel(500351, "请输入关键字")}
|
||||
value={keywords} onChange={val => this.setState({ keywords: val })}
|
||||
onSearch={() => this.commonBrowserData(this.props)}
|
||||
/>
|
||||
<Table
|
||||
showHeader={false} dataSource={dataSource}
|
||||
loading={loading} pagination={pagination}
|
||||
columns={columns} onRowClick={this.handleRowClick}
|
||||
scroll={{ y: this.incomeRef ? this.incomeRef.state.height - 106 : 600 }}
|
||||
/>
|
||||
</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default LedgerSalaryItemSelectDialog;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue