diff --git a/pc4mobx/hrmSalary/pages/declareDetail/components/leftTab.js b/pc4mobx/hrmSalary/pages/declareDetail/components/leftTab.js index 1370d4e1..55c936cf 100644 --- a/pc4mobx/hrmSalary/pages/declareDetail/components/leftTab.js +++ b/pc4mobx/hrmSalary/pages/declareDetail/components/leftTab.js @@ -40,6 +40,12 @@ class LeftTab extends Component { 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 (
{ const { reportType, id } = item; - return {reportType}; + return {reportTypeNameMap[reportType]}; }) } diff --git a/pc4mobx/hrmSalary/pages/declareDetail/index.js b/pc4mobx/hrmSalary/pages/declareDetail/index.js index 505a2c16..0ef69be9 100644 --- a/pc4mobx/hrmSalary/pages/declareDetail/index.js +++ b/pc4mobx/hrmSalary/pages/declareDetail/index.js @@ -105,11 +105,11 @@ class Index extends Component { }; getTaxDeclarationTab = () => { const { reportType } = this.state; - return getTaxDeclarationTab({ id: getQueryString("id"), reportType }); + return getTaxDeclarationTab({ taxDeclareRecordId: getQueryString("id"), reportType }); }; getDeclareInfo = () => { const { reportType } = this.state; - return getDeclareInfo({ id: getQueryString("id"), reportType }); + return getDeclareInfo({ taxDeclareRecordId: getQueryString("id"), reportType }); }; apiflowBillingConfigStatus = () => { return apiflowBillingConfigStatus(); @@ -188,7 +188,7 @@ class Index extends Component { } }).catch(() => this.setState({ loading: { ...loading, query: false } })); }; - handleOperateDeclare = (type) => { + handleOperateDeclare = (type, params = {}) => { const loadingTxt = { refresh: getLabel(111, "刷新中..."), //刷新数据 declare: getLabel(111, "申报中..."), //在线申报 @@ -212,7 +212,7 @@ class Index extends Component { cancelFeedback: getLabel(111, "作废反馈失败!")//作废反馈 }; this.setState({ loading: { ...this.state.loading, [type]: true } }); - APIFox[type]({ taxDeclareRecordId: getQueryString("id") }) + APIFox[type]({ taxDeclareRecordId: getQueryString("id"), ...params }) .then(async ({ status, data, errormsg }) => { if (status) { message.destroy(); @@ -343,12 +343,13 @@ class Index extends Component { render() { const { tabs, selectedKey, loading, declareInfo, intelCalcSalaryStatus, taxDecPersonSlide, - editTabVisible + editTabVisible, reportType } = this.state; const [__, taxDeclarationId] = selectedKey.split("%%"); let btns = [ , - , @@ -360,30 +361,30 @@ class Index extends Component { //申报状态:申报中 declareInfo.declareStatus === "DECLARING" && (btns.splice(1, 2, )); + onClick={() => this.handleOperateDeclare("feedback", { reportType })}>{getLabel(111, "申报反馈")})); //申报状态:缴款中 declareInfo.declareStatus === "DECLARE_SUCCESS_PAYING" && (btns.splice(1, 2)); //申报状态:已缴款 declareInfo.declareStatus === "DECLARE_SUCCESS_PAID" && (btns.splice(1, 2, )); + onClick={() => confirmDialog("correct", () => this.handleOperateDeclare("correct", { reportType }))}>{getLabel(111, "更正申报")})); //申报状态:申报成功,无需缴款 declareInfo.declareStatus === "DECLARE_SUCCESS_NO_PAY" && (btns.splice(1, 2, , + onClick={() => confirmDialog("correct", () => this.handleOperateDeclare("correct", { reportType }))}>{getLabel(111, "更正申报")}, + onClick={() => confirmDialog("cancel", () => this.handleOperateDeclare("cancel", { reportType }))}>{getLabel(111, "作废申报")} )); //申报状态:申报成功,未缴款 declareInfo.declareStatus === "DECLARE_SUCCESS_UNPAID" && (btns.splice(1, 2, , + onClick={() => confirmDialog("correct", () => this.handleOperateDeclare("correct", { reportType }))}>{getLabel(111, "更正申报")}, , + onClick={() => confirmDialog("cancel", () => this.handleOperateDeclare("cancel", { reportType }))}>{getLabel(111, "作废申报")},