From 2c039088859e2416d46241f37a59e54597ae820e Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Fri, 3 Jan 2025 15:49:53 +0800 Subject: [PATCH] release/2.18.2.2412.02 --- .../declare/generateDeclarationDetail.js | 87 ++++++------------- pc4mobx/hrmSalary/pages/declare/index.less | 13 ++- .../pages/payroll/payrollGrant/index.js | 3 +- 3 files changed, 35 insertions(+), 68 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js b/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js index cdfe5a73..cd1b1996 100644 --- a/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js +++ b/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js @@ -1,23 +1,20 @@ import React from "react"; -import CustomTab from "../../components/customTab"; import { inject, observer } from "mobx-react"; +import { WeaLocaleProvider, WeaTable, WeaTop } from "ecCom"; import { getQueryString } from "../../util/url"; import * as API from "../../apis/declare"; import { Button } from "antd"; -import UnifiedTable from "../../components/UnifiedTable"; import "./index.less"; +const { getLabel } = WeaLocaleProvider; @inject("taxAgentStore") @observer export default class GenerateDeclarationDetail extends React.Component { constructor(props) { super(props); this.state = { - loading: false, - dataSource: [], - columns: [], - pageInfo: { current: 1, pageSize: 10, total: 0 }, - declareInfo: {} + loading: false, dataSource: [], columns: [], declareInfo: {}, + pageInfo: { current: 1, pageSize: 10, total: 0 } }; } @@ -37,31 +34,19 @@ export default class GenerateDeclarationDetail extends React.Component { if (status) { const { columns, list: dataSource, pageNum: current, pageSize, total } = data; this.setState({ - dataSource, - pageInfo: { - ...pageInfo, - current, pageSize, total - }, + dataSource, pageInfo: { ...pageInfo, current, pageSize, total }, columns: _.map(_.filter(columns, it => it.dataIndex !== "jobNum"), item => { if (item.dataIndex === "username") { return { - ...item, - render: (text, record) => { - return window.pointerXY(e)} - title={text} - > - {text} - ; - } + ...item, width: 180, + render: (text, record) => ( window.pointerXY(e)} + title={text}>{text}) }; } return { - ...item, - render: (text) => { - return {text}; - } + ...item, width: (item.dataIndex === "cardType" || item.dataIndex === "cardNum") ? 180 : 100, + render: (text) => ({text}) }; }) }); @@ -78,26 +63,19 @@ export default class GenerateDeclarationDetail extends React.Component { const url = `${window.location.origin}/api/bs/hrmsalary/taxdeclaration/export?taxDeclarationId=${getQueryString("id")}`; window.open(url, "_self"); }; + renderTitle = () => { + const { declareInfo } = this.state; + return ( + {getLabel(111, "薪资所属月")}:{declareInfo.salaryMonth} + {getLabel(111, "个税扣缴义务人")}:{declareInfo.taxAgentName} + ); + }; render() { - const { declareInfo, loading, pageInfo, columns, dataSource } = this.state; + const { loading, pageInfo, columns, dataSource } = this.state; const { taxAgentStore: { showOperateBtn } } = this.props; - - const renderRightOperation = () => { - return ( -
- -
- ); - }; - const renderLeftOperation = () => { - return ( -
- 薪资所属月:{declareInfo.salaryMonth} - 个税扣缴义务人:{declareInfo.taxAgentName} -
- ); - }; + const buttons = showOperateBtn ? [] : []; const pagination = { ...pageInfo, showTotal: (total) => `共 ${total} 条`, @@ -115,23 +93,12 @@ export default class GenerateDeclarationDetail extends React.Component { }, () => this.getDetailList()); } }; - return ( -
- -
- -
+ return (} iconBgcolor="#F14A2D" + buttons={buttons}> +
+
- ); +
); } } diff --git a/pc4mobx/hrmSalary/pages/declare/index.less b/pc4mobx/hrmSalary/pages/declare/index.less index 9e4ced1a..01b8fd58 100644 --- a/pc4mobx/hrmSalary/pages/declare/index.less +++ b/pc4mobx/hrmSalary/pages/declare/index.less @@ -1,11 +1,10 @@ -.generateDeclarationDetail { - .tabWrapper { - padding-left: 10px - } +.declare-detail-table-container { + height: 100%; + background: #f6f6f6; + padding: 8px 16px; - .tableWrapper { - height: calc(100vh - 48px); - overflow: auto; + .wea-new-table { + background: #FFF; } } diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js index 8cde7da5..f140ab79 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js @@ -599,6 +599,7 @@ export default class PayrollGrant extends React.Component { this.setState({ selectedKey: v }, () => { + this.pageInfo = { current: 1, pageSize: 10 }; getInfoList({ salarySendId: currentId, isGranted: v !== "0" }); })} searchsBasePlaceHolder="请输入姓名" showSearchAd={grantListShowSearchAd} buttonsAd={adBtn} @@ -652,7 +653,7 @@ export default class PayrollGrant extends React.Component { this.pageInfo = { current, pageSize }; this.handleShowSizeChange(this.pageInfo); }} - scroll={{ y: `calc(100vh - 236px)` }} + scroll={{ y: `calc(100vh - 255px)` }} /> : renderLoading() }