From be826846222dea84a573478c00a797b613f1ab7d 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, 6 Dec 2023 11:16:44 +0800 Subject: [PATCH 1/5] master --- src/pages/atdTable/components/index.less | 16 +++++++++++++++- src/utils/common.js | 13 +++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/pages/atdTable/components/index.less b/src/pages/atdTable/components/index.less index 7577694..8aa9522 100644 --- a/src/pages/atdTable/components/index.less +++ b/src/pages/atdTable/components/index.less @@ -165,6 +165,12 @@ } } + tr:hover .editable-cell { + padding: 4px 11px; + border: 1px solid #d9d9d9; + border-radius: 2px; + } + :global { .ant-btn-link { height: inherit !important; @@ -260,7 +266,15 @@ } th, td { - font-size: 12px + font-size: 12px; + + .ant-form-item { + margin-bottom: 0; + + .ant-input-number { + width: 100%; + } + } } } } diff --git a/src/utils/common.js b/src/utils/common.js index 5fcaa49..5096b1a 100644 --- a/src/utils/common.js +++ b/src/utils/common.js @@ -110,3 +110,16 @@ export const paginationAction = (pageInfo = {}, i18n = {}, onChange, onShowSizeC 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); +}; From 0c00895f180eff282443e915e6e531b8f6e88503 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, 6 Dec 2023 11:42:12 +0800 Subject: [PATCH 2/5] =?UTF-8?q?custom/=E9=B2=81=E6=8E=A7=E6=95=B0=E5=AD=97?= =?UTF-8?q?-=E8=96=AA=E8=B5=84=E6=A0=B8=E7=AE=97=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=89=B9=E9=87=8F=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/iconfont/demo_index.html | 29 +++++++++++++++++++++++++--- public/css/iconfont/iconfont.css | 10 +++++++--- public/css/iconfont/iconfont.js | 2 +- public/css/iconfont/iconfont.json | 7 +++++++ public/css/iconfont/iconfont.ttf | Bin 5272 -> 5580 bytes public/css/iconfont/iconfont.woff | Bin 3240 -> 3428 bytes public/css/iconfont/iconfont.woff2 | Bin 2580 -> 2800 bytes 7 files changed, 41 insertions(+), 7 deletions(-) diff --git a/public/css/iconfont/demo_index.html b/public/css/iconfont/demo_index.html index 83eb5ca..aa55039 100644 --- a/public/css/iconfont/demo_index.html +++ b/public/css/iconfont/demo_index.html @@ -54,6 +54,12 @@
From 6c79742e755d9d164f0b74dfc7a38ce69856a299 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 7 Dec 2023 18:50:47 +0800 Subject: [PATCH 4/5] =?UTF-8?q?master-=E8=96=AA=E8=B5=84=E6=A0=B8=E7=AE=97?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E9=80=82=E9=85=8D=E8=AF=A6=E6=83=85=E9=A1=B5?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/calcTable/customTableTitle.tsx | 5 +++-- src/pages/calcTable/index.tsx | 9 ++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/pages/calcTable/customTableTitle.tsx b/src/pages/calcTable/customTableTitle.tsx index cdcad41..c88df83 100644 --- a/src/pages/calcTable/customTableTitle.tsx +++ b/src/pages/calcTable/customTableTitle.tsx @@ -17,12 +17,13 @@ interface OwnProps { onHandleFormulatd?: any; i18n?: any; pattern?: number; + calcDetail?: boolean; //查看详情页面 } type Props = OwnProps; const customTableTitle: FunctionComponent = (props) => { - const { dataIndex, title, lockStatus, onHandleFormulatd, i18n = {}, pattern, dataType } = props; + const { dataIndex, title, lockStatus, onHandleFormulatd, i18n = {}, pattern, dataType, calcDetail } = props; const handleToggleSalaryItemVal = (salaryItemId: string, type: string, updateParams: any = {}) => { window.parent.postMessage( @@ -38,7 +39,7 @@ const customTableTitle: FunctionComponent = (props) => {
onHandleFormulatd(dataIndex)}>{title}
{ - !!lockStatus && + !!lockStatus && !calcDetail &&
handleToggleSalaryItemVal(dataIndex as string, "LOCK")}/> diff --git a/src/pages/calcTable/index.tsx b/src/pages/calcTable/index.tsx index 8af2648..5a78abe 100644 --- a/src/pages/calcTable/index.tsx +++ b/src/pages/calcTable/index.tsx @@ -29,6 +29,7 @@ const index: FunctionComponent = (props) => { const [pageInfo, setPageInfo] = useState>({}); const [i18n, setI18n] = useState({}); const [showTotalCell, setShowTotalCell] = useState(false); + const [isDetailTable, setIsDetailTable] = useState(false); const [sumRowlistUrl, setSumRowlistUrl] = useState(""); const [payload, setPayload] = useState(""); @@ -44,10 +45,11 @@ const index: FunctionComponent = (props) => { if (!_.isEmpty(data)) { const { columns, dataSource, pageInfo, selectedRowKeys, i18n: i18nRes = {}, - showTotalCell = false, sumRowlistUrl = "", payload = {} + showTotalCell = false, sumRowlistUrl = "", payload = {}, calcDetail } = data; setSumRowlistUrl(sumRowlistUrl); setShowTotalCell(showTotalCell); + setIsDetailTable(calcDetail); setI18n(i18nRes); setPayload(payload); setPageInfo(pageInfo); @@ -128,9 +130,10 @@ const index: FunctionComponent = (props) => { }; return (} + columns={!isDetailTable ? columns : _.filter(columns, o => o.dataIndex !== "operate")} + footer={() => !isDetailTable ? : null} pagination={{ ...paginationFun(pageInfo, sizeChange, onChange, i18n), size: "default" From 104b36786c612a29b0eee9c63f82c7f89d40e262 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, 11 Dec 2023 14:45:15 +0800 Subject: [PATCH 5/5] master --- src/pages/reportTable/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/reportTable/index.tsx b/src/pages/reportTable/index.tsx index 61c14c0..61f1fef 100644 --- a/src/pages/reportTable/index.tsx +++ b/src/pages/reportTable/index.tsx @@ -26,15 +26,15 @@ const ReportTable: FC = (props) => { setSumRow(countResult); setColumns(_.map(columns, (item, index: number) => { if (index === 0) { - return { ...item, fixed: "left" }; + return { ...item, fixed: "left", ellipsis: true }; } return { ...item, children: _.map(item.children, child => { return { - ...child, + ...child, ellipsis: true, render: (text: string, record: any) => { - return