Merge branch 'master' into feature/2.9.42310.01-薪资项目拓扑图

# Conflicts:
#	public/css/iconfont/demo_index.html
#	public/css/iconfont/iconfont.css
#	public/css/iconfont/iconfont.js
#	public/css/iconfont/iconfont.json
#	public/css/iconfont/iconfont.ttf
#	public/css/iconfont/iconfont.woff
#	public/css/iconfont/iconfont.woff2
#	src/pages/atdTable/components/index.less
#	src/pages/calcTable/calcExplainFooter.tsx
#	src/pages/calcTable/customTableTitle.tsx
release/2.19.1.2503.01-业务线个税
黎永顺 2 years ago
commit 03d0e23191

@ -54,6 +54,42 @@
<div class="content unicode" style="display: block;"> <div class="content unicode" style="display: block;">
<ul class="icon_lists dib-box"> <ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont">&#xe696;</span>
<div class="name">批量更新</div>
<div class="code-name">&amp;#xe696;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe603;</span>
<div class="name">全部</div>
<div class="code-name">&amp;#xe603;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe649;</span>
<div class="name">批量导出</div>
<div class="code-name">&amp;#xe649;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe622;</span>
<div class="name">批量删除</div>
<div class="code-name">&amp;#xe622;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe645;</span>
<div class="name">批量操作</div>
<div class="code-name">&amp;#xe645;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe636;</span>
<div class="name">导出</div>
<div class="code-name">&amp;#xe636;</div>
</li>
<li class="dib"> <li class="dib">
<span class="icon iconfont">&#xe619;</span> <span class="icon iconfont">&#xe619;</span>
<div class="name">批量分配</div> <div class="name">批量分配</div>
@ -108,9 +144,9 @@
<pre><code class="language-css" <pre><code class="language-css"
>@font-face { >@font-face {
font-family: 'iconfont'; font-family: 'iconfont';
src: url('iconfont.woff2?t=1698312705146') format('woff2'), src: url('iconfont.woff2?t=1701833672416') format('woff2'),
url('iconfont.woff?t=1698312705146') format('woff'), url('iconfont.woff?t=1701833672416') format('woff'),
url('iconfont.ttf?t=1698312705146') format('truetype'); url('iconfont.ttf?t=1701833672416') format('truetype');
} }
</code></pre> </code></pre>
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3> <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@ -136,6 +172,60 @@
<div class="content font-class"> <div class="content font-class">
<ul class="icon_lists dib-box"> <ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont icon-pilianggengxin"></span>
<div class="name">
批量更新
</div>
<div class="code-name">.icon-pilianggengxin
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-quanbu"></span>
<div class="name">
全部
</div>
<div class="code-name">.icon-quanbu
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-piliangdaochu"></span>
<div class="name">
批量导出
</div>
<div class="code-name">.icon-piliangdaochu
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-piliangshanchu"></span>
<div class="name">
批量删除
</div>
<div class="code-name">.icon-piliangshanchu
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-piliangcaozuo"></span>
<div class="name">
批量操作
</div>
<div class="code-name">.icon-piliangcaozuo
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-daochu"></span>
<div class="name">
导出
</div>
<div class="code-name">.icon-daochu
</div>
</li>
<li class="dib"> <li class="dib">
<span class="icon iconfont icon-piliangfenpei"></span> <span class="icon iconfont icon-piliangfenpei"></span>
<div class="name"> <div class="name">
@ -217,6 +307,54 @@
<div class="content symbol"> <div class="content symbol">
<ul class="icon_lists dib-box"> <ul class="icon_lists dib-box">
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-pilianggengxin"></use>
</svg>
<div class="name">批量更新</div>
<div class="code-name">#icon-pilianggengxin</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-quanbu"></use>
</svg>
<div class="name">全部</div>
<div class="code-name">#icon-quanbu</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-piliangdaochu"></use>
</svg>
<div class="name">批量导出</div>
<div class="code-name">#icon-piliangdaochu</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-piliangshanchu"></use>
</svg>
<div class="name">批量删除</div>
<div class="code-name">#icon-piliangshanchu</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-piliangcaozuo"></use>
</svg>
<div class="name">批量操作</div>
<div class="code-name">#icon-piliangcaozuo</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-daochu"></use>
</svg>
<div class="name">导出</div>
<div class="code-name">#icon-daochu</div>
</li>
<li class="dib"> <li class="dib">
<svg class="icon svg-icon" aria-hidden="true"> <svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-piliangfenpei"></use> <use xlink:href="#icon-piliangfenpei"></use>

@ -1,8 +1,8 @@
@font-face { @font-face {
font-family: "iconfont"; /* Project id 4257468 */ font-family: "iconfont"; /* Project id 4257468 */
src: url('iconfont.woff2?t=1698312705146') format('woff2'), src: url('iconfont.woff2?t=1701833672416') format('woff2'),
url('iconfont.woff?t=1698312705146') format('woff'), url('iconfont.woff?t=1701833672416') format('woff'),
url('iconfont.ttf?t=1698312705146') format('truetype'); url('iconfont.ttf?t=1701833672416') format('truetype');
} }
.iconfont { .iconfont {
@ -13,6 +13,30 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-pilianggengxin:before {
content: "\e696";
}
.icon-quanbu:before {
content: "\e603";
}
.icon-piliangdaochu:before {
content: "\e649";
}
.icon-piliangshanchu:before {
content: "\e622";
}
.icon-piliangcaozuo:before {
content: "\e645";
}
.icon-daochu:before {
content: "\e636";
}
.icon-piliangfenpei:before { .icon-piliangfenpei:before {
content: "\e619"; content: "\e619";
} }

File diff suppressed because one or more lines are too long

@ -5,6 +5,48 @@
"css_prefix_text": "icon-", "css_prefix_text": "icon-",
"description": "", "description": "",
"glyphs": [ "glyphs": [
{
"icon_id": "2442443",
"name": "批量更新",
"font_class": "pilianggengxin",
"unicode": "e696",
"unicode_decimal": 59030
},
{
"icon_id": "5925304",
"name": "全部",
"font_class": "quanbu",
"unicode": "e603",
"unicode_decimal": 58883
},
{
"icon_id": "6447192",
"name": "批量导出",
"font_class": "piliangdaochu",
"unicode": "e649",
"unicode_decimal": 58953
},
{
"icon_id": "20422590",
"name": "批量删除",
"font_class": "piliangshanchu",
"unicode": "e622",
"unicode_decimal": 58914
},
{
"icon_id": "22378766",
"name": "批量操作",
"font_class": "piliangcaozuo",
"unicode": "e645",
"unicode_decimal": 58949
},
{
"icon_id": "24848378",
"name": "导出",
"font_class": "daochu",
"unicode": "e636",
"unicode_decimal": 58934
},
{ {
"icon_id": "35054680", "icon_id": "35054680",
"name": "批量分配", "name": "批量分配",

Binary file not shown.

Binary file not shown.

@ -19,6 +19,7 @@ module.exports = {
"/welfareLedgerTable.*": "blank", "/welfareLedgerTable.*": "blank",
"/payrollFilesTable.*": "blank", "/payrollFilesTable.*": "blank",
"/employeeDeclareTable.*": "blank", "/employeeDeclareTable.*": "blank",
"/taxDeclareTable.*": "blank",
"/welfareArchiveTable.*": "blank", "/welfareArchiveTable.*": "blank",
"/OCTable.*": "blank", "/OCTable.*": "blank",
"/manage.*": "manage", "/manage.*": "manage",

@ -91,7 +91,7 @@
.expand-th:hover { .expand-th:hover {
.toogle-lock-tool { .toogle-lock-tool {
width: 37%; display: flex;
} }
} }
@ -107,17 +107,15 @@
height: 100%; height: 100%;
.title-text { .title-text {
width: 90%; flex: 1;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
flex: 1 1;
cursor: pointer; cursor: pointer;
} }
.toogle-lock-tool { .toogle-lock-tool {
display: flex; display: none;
width: 0;
overflow: hidden; overflow: hidden;
height: 100%; height: 100%;
justify-content: center; justify-content: center;
@ -170,6 +168,12 @@
} }
} }
tr:hover .editable-cell {
padding: 4px 11px;
border: 1px solid #d9d9d9;
border-radius: 2px;
}
:global { :global {
.ant-btn-link { .ant-btn-link {
height: inherit !important; height: inherit !important;
@ -265,7 +269,15 @@
} }
th, td { th, td {
font-size: 12px font-size: 12px;
.ant-form-item {
margin-bottom: 0;
.ant-input-number {
width: 100%;
}
}
} }
} }
} }

@ -33,6 +33,10 @@ const CalcExplainFooter: FunctionComponent<Props> = (props) => {
<Icon type="icon-piliangfenpei"/> <Icon type="icon-piliangfenpei"/>
<span>{i18n["查看拓扑图"]}</span> <span>{i18n["查看拓扑图"]}</span>
</div> </div>
<div className={styles["icon-item"]}>
<Icon type="icon-pilianggengxin"/>
<span>{i18n["批量更新"]}</span>
</div>
</div> </div>
); );
}; };

@ -49,7 +49,7 @@ const calcFixedTotal: FunctionComponent<Props> = (props) => {
return (<> return (<>
{ {
_.map(columns, (item: any, index) => { _.map(columns, (item: any, index) => {
return <Table.Summary.Cell index={index + 1} key={index + 1}> return <Table.Summary.Cell index={index + 1} key={index + 1} align="center">
{ {
loading ? <Spin spinning={loading} size="small"></Spin> : loading ? <Spin spinning={loading} size="small"></Spin> :
<Text type="danger">{sumRow[item.dataIndex] || "-"}</Text> <Text type="danger">{sumRow[item.dataIndex] || "-"}</Text>

@ -13,20 +13,23 @@ interface OwnProps {
dataIndex?: string; dataIndex?: string;
title?: string; title?: string;
lockStatus?: string; lockStatus?: string;
dataType?: string;
onHandleFormulatd?: any; onHandleFormulatd?: any;
i18n?: any; i18n?: any;
pattern?: number;
calcDetail?: boolean; //查看详情页面
} }
type Props = OwnProps; type Props = OwnProps;
const customTableTitle: FunctionComponent<Props> = (props) => { const customTableTitle: FunctionComponent<Props> = (props) => {
const { dataIndex, title, lockStatus, onHandleFormulatd, i18n = {} } = props; const { dataIndex, title, lockStatus, onHandleFormulatd, i18n = {}, pattern, dataType, calcDetail } = props;
const handleToggleSalaryItemVal = (salaryItemId: string, type: string) => { const handleToggleSalaryItemVal = (salaryItemId: string, type: string, updateParams: any = {}) => {
window.parent.postMessage( window.parent.postMessage(
{ {
type: "turn", type: "turn",
payload: { id: "LOCKING", params: { lockType: type, salaryItemId } } payload: { id: "LOCKING", params: { lockType: type, salaryItemId, ...updateParams } }
}, },
"*" "*"
); );
@ -36,7 +39,7 @@ const customTableTitle: FunctionComponent<Props> = (props) => {
<div className={classnames(styles["expand-th"])}> <div className={classnames(styles["expand-th"])}>
<div className={styles["title-text"]} title={title} onClick={() => onHandleFormulatd(dataIndex)}>{title}</div> <div className={styles["title-text"]} title={title} onClick={() => onHandleFormulatd(dataIndex)}>{title}</div>
{ {
!!lockStatus && !!lockStatus && !calcDetail &&
<div className={styles["toogle-lock-tool"]}> <div className={styles["toogle-lock-tool"]}>
<Icon type="icon-piliangsuoding" title={i18n["点击锁定所有解锁的项目值"]} <Icon type="icon-piliangsuoding" title={i18n["点击锁定所有解锁的项目值"]}
onClick={() => handleToggleSalaryItemVal(dataIndex as string, "LOCK")}/> onClick={() => handleToggleSalaryItemVal(dataIndex as string, "LOCK")}/>
@ -44,6 +47,10 @@ const customTableTitle: FunctionComponent<Props> = (props) => {
onClick={() => handleToggleSalaryItemVal(dataIndex as string, "UNLOCK")}/> onClick={() => handleToggleSalaryItemVal(dataIndex as string, "UNLOCK")}/>
<Icon type="icon-piliangfenpei" title={i18n["查看拓扑图"]} <Icon type="icon-piliangfenpei" title={i18n["查看拓扑图"]}
onClick={() => handleToggleSalaryItemVal(dataIndex as string, "DIAGRAM")}/> onClick={() => handleToggleSalaryItemVal(dataIndex as string, "DIAGRAM")}/>
<Icon type="icon-pilianggengxin" title={i18n["批量更新"]}
onClick={() => handleToggleSalaryItemVal(dataIndex as string, "BATCHUPDATE", {
pattern, salaryItemName: title, dataType
})}/>
</div> </div>
} }
</div> </div>

@ -21,6 +21,7 @@ interface OwnProps {
} }
type Props = OwnProps; type Props = OwnProps;
type fixedProps = boolean | "top" | "bottom";
const { Text } = Typography; const { Text } = Typography;
const index: FunctionComponent<Props> = (props) => { const index: FunctionComponent<Props> = (props) => {
@ -30,8 +31,10 @@ const index: FunctionComponent<Props> = (props) => {
const [pageInfo, setPageInfo] = useState<Partial<PaginationData>>({}); const [pageInfo, setPageInfo] = useState<Partial<PaginationData>>({});
const [i18n, setI18n] = useState<any>({}); const [i18n, setI18n] = useState<any>({});
const [showTotalCell, setShowTotalCell] = useState<boolean>(false); const [showTotalCell, setShowTotalCell] = useState<boolean>(false);
const [isDetailTable, setIsDetailTable] = useState<boolean>(false);
const [sumRowlistUrl, setSumRowlistUrl] = useState<string>(""); const [sumRowlistUrl, setSumRowlistUrl] = useState<string>("");
const [payload, setPayload] = useState<string>(""); const [payload, setPayload] = useState<string>("");
const [fixed, setFixed] = useState<fixedProps>(true);
useEffect(() => { useEffect(() => {
window.parent.postMessage({ type: "init" }, "*"); window.parent.postMessage({ type: "init" }, "*");
@ -45,12 +48,15 @@ const index: FunctionComponent<Props> = (props) => {
if (!_.isEmpty(data)) { if (!_.isEmpty(data)) {
const { const {
columns, dataSource, pageInfo, selectedRowKeys, i18n: i18nRes = {}, columns, dataSource, pageInfo, selectedRowKeys, i18n: i18nRes = {},
showTotalCell = false, sumRowlistUrl = "", payload = {} showTotalCell = false, sumRowlistUrl = "", payload = {}, calcDetail,
fixed = true
} = data; } = data;
setSumRowlistUrl(sumRowlistUrl); setSumRowlistUrl(sumRowlistUrl);
setShowTotalCell(showTotalCell); setShowTotalCell(showTotalCell);
setIsDetailTable(calcDetail);
setI18n(i18nRes); setI18n(i18nRes);
setPayload(payload); setPayload(payload);
setFixed(fixed);
setPageInfo(pageInfo); setPageInfo(pageInfo);
setDataSource(dataSource); setDataSource(dataSource);
setSelectedRowKeys(selectedRowKeys); setSelectedRowKeys(selectedRowKeys);
@ -141,16 +147,17 @@ const index: FunctionComponent<Props> = (props) => {
}; };
return (<Table return (<Table
rowKey="id" size="small" bordered className={styles.tableWrapper} rowKey="id" size="small" bordered className={styles.tableWrapper}
columns={columns} dataSource={dataSource} rowSelection={rowSelection} dataSource={dataSource} rowSelection={rowSelection}
scroll={{ x: 1200, y: `calc(100vh - ${!showTotalCell ? 165 : 200}px)` }} scroll={{ x: 1200, y: `calc(100vh - ${!showTotalCell ? 165 : 200}px)` }}
footer={() => <CalcExplainFooter i18n={i18n}/>} columns={!isDetailTable ? columns : _.filter(columns, o => o.dataIndex !== "operate")}
footer={() => !isDetailTable ? <CalcExplainFooter i18n={i18n}/> : null}
pagination={{ pagination={{
...paginationFun(pageInfo, sizeChange, onChange, i18n), ...paginationFun(pageInfo, sizeChange, onChange, i18n),
size: "default" size: "default"
}} }}
summary={() => ( summary={() => (
!showTotalCell ? <></> : !showTotalCell ? <></> :
<Table.Summary fixed> <Table.Summary fixed={fixed}>
<Table.Summary.Row> <Table.Summary.Row>
<Table.Summary.Cell index={0} align="center"><Text type="danger">{i18n["总计"]}</Text></Table.Summary.Cell> <Table.Summary.Cell index={0} align="center"><Text type="danger">{i18n["总计"]}</Text></Table.Summary.Cell>
<CaclFixedTotal columns={columns} dataSourceUrl={sumRowlistUrl} payload={payload}/> <CaclFixedTotal columns={columns} dataSourceUrl={sumRowlistUrl} payload={payload}/>

@ -26,15 +26,15 @@ const ReportTable: FC = (props) => {
setSumRow(countResult); setSumRow(countResult);
setColumns(_.map(columns, (item, index: number) => { setColumns(_.map(columns, (item, index: number) => {
if (index === 0) { if (index === 0) {
return { ...item, fixed: "left" }; return { ...item, fixed: "left", ellipsis: true };
} }
return { return {
...item, ...item,
children: _.map(item.children, child => { children: _.map(item.children, child => {
return { return {
...child, ...child, ellipsis: true,
render: (text: string, record: any) => { render: (text: string, record: any) => {
return <Button type="link" onClick={() => { return <Button type="link" block onClick={() => {
window.parent.postMessage( window.parent.postMessage(
{ {
type: "turn", type: "turn",

@ -0,0 +1,80 @@
/*
* Author:
* name: -
* Description:
* Date: 2023/12/27
*/
import React, { FC, useEffect, useState } from "react";
import { Button, Space, Table } from "antd";
import { exceptStr, paginationAction } from "@/utils/common";
import styles from "@/pages/atdTable/components/index.less";
import { PaginationData } from "rc-pagination";
const TaxDeclareTable: FC = (props) => {
const [pageInfo, setPageInfo] = useState<Partial<PaginationData>>({});
const [columns, setColumns] = useState<Array<any>>([]);
const [dataSource, setDataSource] = useState<Array<any>>([]);
const [i18n, setI18n] = useState<Partial<{}>>({});
useEffect(() => {
window.parent.postMessage({ type: "init" }, "*");
window.addEventListener("message", receiveMessageFromIndex, false);
return () => {
window.removeEventListener("message", receiveMessageFromIndex, false);
};
}, []);
const receiveMessageFromIndex = (event: any) => {
const data: any = exceptStr(event.data);
if (!_.isEmpty(data)) {
const { columns, dataSource, pageInfo, i18n, declareStatus } = data;
setDataSource(dataSource);
setI18n(i18n);
setPageInfo(pageInfo);
setColumns(["NOT_DECLARE", "DECLARE_FAIL"].includes(declareStatus) ? [
...columns,
{
title: i18n["操作"],
dataIndex: "operate",
fixed: "right",
width: 120,
render: (_: any, record: any) => (
<Space>
<Button type="link" onClick={() => handleEdit(record)}>{i18n["编辑"]}</Button>
{/*<Button type="link" onClick={() => handleDelete(record)}>{i18n["删除"]}</Button>*/}
</Space>
)
}
] : columns);
}
};
const handleEdit = (record: any) => {
window.parent.postMessage({ type: "turn", payload: { id: "EDIT", params: { ...record } } }, "*");
};
const handleDelete = (record: any) => {
window.parent.postMessage({ type: "turn", payload: { id: "DELETE", params: { ...record } } }, "*");
};
const onChange = (current: number, pageSize: number) => {
setPageInfo((prevState) => {
const { pageSize: size } = prevState;
window.parent.postMessage(
{
type: "turn",
payload: { id: "PAGEINFO", params: { ...pageInfo, current: size === pageSize ? current : 1, pageSize } }
},
"*"
);
return { ...pageInfo, current: size === pageSize ? current : 1, pageSize };
});
};
return <Table
rowKey="id" className={styles.tableWrapper} size="small"
columns={columns} dataSource={dataSource} bordered
scroll={{ x: 1200, y: `calc(100vh - 100px)` }}
pagination={{
...paginationAction(pageInfo, i18n, onChange),
size: "default"
}}
/>;
};
export default TaxDeclareTable;

@ -110,3 +110,16 @@ export const paginationAction = (pageInfo = {}, i18n = {}, onChange, onShowSizeC
showSizeChanger: true showSizeChanger: true
}; };
}; };
/*
* Author: 黎永顺
* Description:
* Params: 格式化钱
* Date: 2023/12/6
*/
export const toDecimal_n = (num, decimalPlaces) => {
if (num === null || !isFinite(num)) return null
if (decimalPlaces < 0) return null;
const multiplier = Math.pow(10, decimalPlaces);
const roundedNum = Math.round(num * multiplier) / multiplier;
return roundedNum.toFixed(decimalPlaces);
};

Loading…
Cancel
Save