From 06f19c74db6b0180cfc6ef633b308c1d5d455ed9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Wed, 27 Sep 2023 09:13:02 +0800 Subject: [PATCH] =?UTF-8?q?feature/2.9.42310.01-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E5=8F=91=E6=94=BE=E5=AF=BC=E5=87=BAPDF=2020230926?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/index.js | 5 +- .../calcOc/components/salaryCalcOcList.js | 87 +++++++++++++++++++ .../hrmSalary/pages/calculate/calcOc/index.js | 65 ++++++++++++++ .../pages/calculate/calcOc/index.less | 71 +++++++++++++++ .../hrmSalary/pages/calculate/doCalc/index.js | 2 +- 5 files changed, 228 insertions(+), 2 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/calculate/calcOc/components/salaryCalcOcList.js create mode 100644 pc4mobx/hrmSalary/pages/calculate/calcOc/index.js create mode 100644 pc4mobx/hrmSalary/pages/calculate/calcOc/index.less diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index 7f0f110d..cbaf1ff0 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -26,6 +26,7 @@ import CalculateDetail from "./pages/calculateDetail"; import PlaceOnFileDetail from "./pages/calculateDetail/placeOnFileDetail"; import CompareDetail from "./pages/calculateDetail/compareDetail"; import DoCalcDetail from "./pages/calculate/doCalc"; +import OfflineCompare from "./pages/calculate/calcOc"; import GenerateDeclarationDetail from "./pages/declare/generateDeclarationDetail"; import TemplatePreview from "./pages/payroll/templatePreview"; import MobilePayroll from "./pages/mobilePayroll"; @@ -74,7 +75,8 @@ const DataAcquisition = (props) => props.children; // ledger 薪资账套 // calculate 薪资核算 // calculateDetail 核算详情 -// DoCalcDetail 新核算详情页面 +// DoCalcDetail 核算详情页面-新 +// OfflineCompare 薪资核算线下对比-新 // placeOnFileDetail 核算归档详情 // compareDetail 线下线上对比 // payroll 工资单发放 @@ -133,6 +135,7 @@ const Routes = ( + diff --git a/pc4mobx/hrmSalary/pages/calculate/calcOc/components/salaryCalcOcList.js b/pc4mobx/hrmSalary/pages/calculate/calcOc/components/salaryCalcOcList.js new file mode 100644 index 00000000..380b16bb --- /dev/null +++ b/pc4mobx/hrmSalary/pages/calculate/calcOc/components/salaryCalcOcList.js @@ -0,0 +1,87 @@ +/* + * Author: 黎永顺 + * name: 薪资核算-线下对比列表 + * Description: + * Date: 2023/9/26 + */ +import React, { Component } from "react"; +import { WeaLocaleProvider, WeaTable } from "ecCom"; +import { comparisonResultList } from "../../../../apis/calculate"; + +const getLabel = WeaLocaleProvider.getLabel; + +class SalaryCalcOcList extends Component { + constructor(props) { + super(props); + this.state = { + loading: false, pageInfo: { current: 1, pageSize: 10, total: 0 }, + columns: [], dataSource: [] + }; + } + + componentDidMount() { + this.comparisonResultList(this.props); + } + + componentWillReceiveProps(nextProps, nextContext) { + if ( + (nextProps.form.onlyDiffEmployee !== this.props.form.onlyDiffEmployee) || + (nextProps.form.onlyDiffSalaryItem !== this.props.form.onlyDiffSalaryItem) || + (nextProps.searchBool !== this.props.searchBool) + ) { + this.comparisonResultList(nextProps); + } + } + + comparisonResultList = (props) => { + const { form, routeParams: { salaryAcctRecordId } } = props; + const { pageInfo } = this.state; + this.setState({ loading: true }); + const payload = { ...pageInfo, ...form, salaryAcctRecordId }; + comparisonResultList(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 })); + }; + + render() { + const { dataSource, loading, columns, 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.comparisonResultList(this.props)); + }, + onChange: current => { + this.setState({ + pageInfo: { ...pageInfo, current } + }, () => this.comparisonResultList(this.props)); + } + }; + return ( + { + if (i > 1) { + return { ...o, width: 180 }; + } + return { ...o, width: 150, fixed: "left" }; + })} + /> + ); + } +} + +export default SalaryCalcOcList; diff --git a/pc4mobx/hrmSalary/pages/calculate/calcOc/index.js b/pc4mobx/hrmSalary/pages/calculate/calcOc/index.js new file mode 100644 index 00000000..aaadd0a2 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/calculate/calcOc/index.js @@ -0,0 +1,65 @@ +/* + * Author: 黎永顺 + * name: 薪资核算-线下对比 + * Description: + * Date: 2023/9/26 + */ +import React, { Component } from "react"; +import { Button } from "antd"; +import { WeaCheckbox, WeaInputSearch, WeaLocaleProvider } from "ecCom"; +import SalaryCalcOcList from "./components/salaryCalcOcList"; +import Layout from "../doCalc/layout"; +import "./index.less"; + +const getLabel = WeaLocaleProvider.getLabel; + +class Index extends Component { + constructor(props) { + super(props); + this.state = { + form: { + onlyDiffEmployee: true, onlyDiffSalaryItem: true, + employeeName: "" + }, searchBool: false + }; + } + + handleFiledChange = (key, value) => { + const { form } = this.state; + this.setState({ + form: { ...form, [key]: value } + }); + }; + + render() { + const { form, searchBool } = this.state; + return ( + +
+
+
+ this.handleFiledChange("onlyDiffEmployee", v === "1")}/> + this.handleFiledChange("onlyDiffSalaryItem", v === "1")}/> +
+
+ + + this.handleFiledChange("employeeName", v)} + onSearch={() => this.setState({ searchBool: !searchBool })}/> +
+
+
+ +
+
+
+ ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/calculate/calcOc/index.less b/pc4mobx/hrmSalary/pages/calculate/calcOc/index.less new file mode 100644 index 00000000..917def7a --- /dev/null +++ b/pc4mobx/hrmSalary/pages/calculate/calcOc/index.less @@ -0,0 +1,71 @@ +.salary-calc-oc { + width: 100%; + height: 100%; + overflow: hidden; + background: #f6f6f6; + display: flex; + flex-direction: column; + + .compare-header { + padding-left: 16px; + display: flex; + justify-content: space-between; + align-items: center; + + .left-search { + display: flex; + align-items: center; + } + + .weapp-salary-btn-flex { + display: flex; + align-items: center; + justify-content: flex-end; + cursor: auto; + + & > button { + margin-right: 10px; + } + + .wea-input-focus { + background: #f6f6f6; + margin-top: -4px; + + .ant-input { + background: #f6f6f6; + } + } + } + + .header { + height: 48px; + padding: 0 16px; + font-size: 12px; + color: #111; + } + } + + .header-border-bottom { + border-bottom: 1px solid #e5e5e5; + } + + .salary-calc-oc-body { + flex: 1; + padding: 16px; + overflow-y: hidden; + + .wea-new-table { + background: #FFF; + height: 100%; + + .ant-table-tbody { + td { + width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + } + } + } +} diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js index 03267120..5b248d93 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js @@ -123,7 +123,7 @@ class Index extends Component { }); break; case "offlineCompare": - window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/compareDetail?id=${salaryAcctRecordId}`, "_blank"); + window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/calcOc/${salaryAcctRecordId}`, "_blank"); break; default: break;