From bc92546f28ae3591735dfa540a11c572dc7d4ad9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Mon, 22 Jan 2024 17:29:23 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feature/2.10.1.2401.01-=E4=B8=AA=E7=A8=8E?= =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E5=AF=B9=E6=AF=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/declare.js | 4 + pc4mobx/hrmSalary/index.js | 2 + .../components/taxDeclarationInfo.js | 20 ++-- .../hrmSalary/pages/declareDetail/index.js | 4 + .../pages/declareOnlineComparison/index.js | 97 +++++++++++++++++++ .../pages/declareOnlineComparison/index.less | 11 +++ 6 files changed, 132 insertions(+), 6 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/declareOnlineComparison/index.js create mode 100644 pc4mobx/hrmSalary/pages/declareOnlineComparison/index.less diff --git a/pc4mobx/hrmSalary/apis/declare.js b/pc4mobx/hrmSalary/apis/declare.js index f6943db0..8ba0254f 100644 --- a/pc4mobx/hrmSalary/apis/declare.js +++ b/pc4mobx/hrmSalary/apis/declare.js @@ -260,3 +260,7 @@ export const addTaxDeclaration = (params) => { export const deleteTaxDeclaration = (params) => { return postFetch("/api/bs/hrmsalary/taxdeclaration/deleteTaxDeclaration", params); }; +//个税申报表-对比申报结果 +export const getTaxdeclarationContrastList = (params) => { + return postFetch("/api/bs/hrmsalary/taxdeclaration/contrast", params); +}; diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index c02e25dc..253d0b21 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -26,6 +26,7 @@ import PayrollGrant from "./pages/payroll/payrollGrant"; import PayrollDetail from "./pages/payroll/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"; @@ -175,6 +176,7 @@ const Routes = ( + diff --git a/pc4mobx/hrmSalary/pages/declareDetail/components/taxDeclarationInfo.js b/pc4mobx/hrmSalary/pages/declareDetail/components/taxDeclarationInfo.js index 2b0e58d3..bfc15a46 100644 --- a/pc4mobx/hrmSalary/pages/declareDetail/components/taxDeclarationInfo.js +++ b/pc4mobx/hrmSalary/pages/declareDetail/components/taxDeclarationInfo.js @@ -55,12 +55,20 @@ class TaxDeclarationInfo extends Component { ]; 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: , - content: getLabel(111, "下载申报内置算税结果"), - onClick: onOperate - }]); + dropMenuDatas = dropMenuDatas.concat([ + { + key: "exportGetDeclareTaxResultFeedback", + icon: , + content: getLabel(111, "下载申报内置算税结果"), + onClick: onOperate + }, + { + key: "onlineComparison", + icon: , + content: getLabel(111, "在线对比"), + onClick: onOperate + } + ]); } return (
diff --git a/pc4mobx/hrmSalary/pages/declareDetail/index.js b/pc4mobx/hrmSalary/pages/declareDetail/index.js index 736ec8bf..45e11953 100644 --- a/pc4mobx/hrmSalary/pages/declareDetail/index.js +++ b/pc4mobx/hrmSalary/pages/declareDetail/index.js @@ -291,6 +291,10 @@ class Index extends Component { 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}`, "_target"); + }; handleTabEdit = (tabKey, type) => { if (type === "remove") { const [__, taxDeclarationId] = tabKey.split("%%"); diff --git a/pc4mobx/hrmSalary/pages/declareOnlineComparison/index.js b/pc4mobx/hrmSalary/pages/declareOnlineComparison/index.js new file mode 100644 index 00000000..49082e64 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/declareOnlineComparison/index.js @@ -0,0 +1,97 @@ +/* + * Author: 黎永顺 + * name: 在线申报-在线对比 + * Description: + * Date: 2024/1/22 + */ +import React, { Component } from "react"; +import { WeaLocaleProvider, WeaTable, WeaTop } from "ecCom"; +import { getTaxdeclarationContrastList } from "../../apis/declare"; +import "./index.less"; + +const getLabel = WeaLocaleProvider.getLabel; + +class Index extends Component { + constructor(props) { + super(props); + this.state = { + loading: false, dataSource: [], columns: [], + pageInfo: { current: 1, pageSize: 10, total: 0 } + }; + } + + componentDidMount() { + this.getTaxdeclarationContrastList(); + } + + getTaxdeclarationContrastList = () => { + const { pageInfo } = this.state; + const { params: { taxDeclarationId } } = this.props; + this.setState({ loading: true }); + getTaxdeclarationContrastList({ taxDeclarationId, ...pageInfo }).then(({ status, data }) => { + this.setState({ loading: false }); + if (status) { + const { columns, pageInfo: result } = data; + const { list: dataSource, pageNum: current, pageSize, total } = result; + this.setState({ + dataSource, pageInfo: { ...pageInfo, current, pageSize, total }, + columns: _.map(columns, o => ({ + dataIndex: o, title: o, width: 150, + render: (__, record) => { + return
+
+ {getLabel(543280, "系统值")}: + {record[o].local} +
+
+ {getLabel(111, "线上值")}: + {record[o].online} +
+ { + !_.isNil(record[o].diff) && +
+ {getLabel(543282, "差值")}: + {record[o].diff} +
+ } +
; + } + })) + }); + } + }).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.getTaxdeclarationContrastList()); + }, + onChange: current => { + this.setState({ + pageInfo: { ...pageInfo, current } + }, () => this.getTaxdeclarationContrastList()); + } + }; + return ( + } + iconBgcolor="#F14A2D" buttons={[]} buttonSpace={10} showDropIcon={false} + > + + + ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/declareOnlineComparison/index.less b/pc4mobx/hrmSalary/pages/declareOnlineComparison/index.less new file mode 100644 index 00000000..71c295b1 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/declareOnlineComparison/index.less @@ -0,0 +1,11 @@ +.online-comparison-table { + .comparison-column-item-container { + .comparison-single-row { + margin: 4px 0; + } + + .danger { + color: #ff4d4f; + } + } +} From de094ef03ee8db90bbddb0d5d419bd84fdf2ab32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Tue, 23 Jan 2024 11:22:20 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feature/2.10.1.2401.01-=E4=B8=AA=E7=A8=8E?= =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E5=AF=B9=E6=AF=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/declareOnlineComparison/index.js | 89 +++++++++++-------- 1 file changed, 53 insertions(+), 36 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/declareOnlineComparison/index.js b/pc4mobx/hrmSalary/pages/declareOnlineComparison/index.js index 49082e64..a0006990 100644 --- a/pc4mobx/hrmSalary/pages/declareOnlineComparison/index.js +++ b/pc4mobx/hrmSalary/pages/declareOnlineComparison/index.js @@ -5,7 +5,7 @@ * Date: 2024/1/22 */ import React, { Component } from "react"; -import { WeaLocaleProvider, WeaTable, WeaTop } from "ecCom"; +import { WeaCheckbox, WeaLocaleProvider, WeaTable, WeaTop } from "ecCom"; import { getTaxdeclarationContrastList } from "../../apis/declare"; import "./index.less"; @@ -16,7 +16,8 @@ class Index extends Component { super(props); this.state = { loading: false, dataSource: [], columns: [], - pageInfo: { current: 1, pageSize: 10, total: 0 } + pageInfo: { current: 1, pageSize: 10, total: 0 }, + queryParams: { onlyShowDiffEmp: true, onlyShowDiffItem: true } }; } @@ -25,45 +26,53 @@ class Index extends Component { } getTaxdeclarationContrastList = () => { - const { pageInfo } = this.state; + const { pageInfo, queryParams } = this.state; const { params: { taxDeclarationId } } = this.props; this.setState({ loading: true }); - getTaxdeclarationContrastList({ taxDeclarationId, ...pageInfo }).then(({ status, data }) => { - this.setState({ loading: false }); - if (status) { - const { columns, pageInfo: result } = data; - const { list: dataSource, pageNum: current, pageSize, total } = result; - this.setState({ - dataSource, pageInfo: { ...pageInfo, current, pageSize, total }, - columns: _.map(columns, o => ({ - dataIndex: o, title: o, width: 150, - render: (__, record) => { - return
-
- {getLabel(543280, "系统值")}: - {record[o].local} -
-
- {getLabel(111, "线上值")}: - {record[o].online} -
- { - !_.isNil(record[o].diff) && -
- {getLabel(543282, "差值")}: - {record[o].diff} + getTaxdeclarationContrastList({ taxDeclarationId, ...pageInfo, ...queryParams }) + .then(({ status, data }) => { + this.setState({ loading: false }); + if (status) { + const { columns, pageInfo: result } = data; + const { list: dataSource, pageNum: current, pageSize, total } = result; + this.setState({ + dataSource, pageInfo: { ...pageInfo, current, pageSize, total }, + columns: _.map(columns, o => ({ + dataIndex: o, title: o, width: 150, + render: (__, record) => { + return
+
+ {getLabel(543280, "系统值")}: + {record[o].local}
- } -
; - } - })) - }); - } - }).catch(() => this.setState({ loading: false })); +
+ {getLabel(111, "线上值")}: + {record[o].online} +
+ { + !_.isNil(record[o].diff) && +
+ {getLabel(543282, "差值")}: + {record[o].diff} +
+ } +
; + } + })) + }); + } + }).catch(() => this.setState({ loading: false })); + }; + handleDiffChange = (key, value) => { + const { queryParams } = this.state; + this.setState({ + queryParams: { ...queryParams, [key]: value === "1" } + }, () => this.getTaxdeclarationContrastList()); }; render() { - const { loading, columns, dataSource, pageInfo } = this.state; + const { loading, columns, dataSource, pageInfo, queryParams } = this.state; + const { onlyShowDiffEmp, onlyShowDiffItem } = queryParams; const pagination = { ...pageInfo, showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`, @@ -83,7 +92,15 @@ class Index extends Component { }; return ( } - iconBgcolor="#F14A2D" buttons={[]} buttonSpace={10} showDropIcon={false} + iconBgcolor="#F14A2D" buttonSpace={10} showDropIcon={false} + buttons={[ + this.handleDiffChange("onlyShowDiffEmp", v)} + />, + this.handleDiffChange("onlyShowDiffItem", v)} + /> + ]} >