diff --git a/public/css/iconfont/demo_index.html b/public/css/iconfont/demo_index.html index 962184c..aa55039 100644 --- a/public/css/iconfont/demo_index.html +++ b/public/css/iconfont/demo_index.html @@ -38,7 +38,7 @@

- +

    - + +
  • + +
    批量更新
    +
    
    +
  • + +
  • + +
    全部
    +
    
    +
  • + +
  • + +
    批量导出
    +
    
    +
  • + +
  • + +
    批量删除
    +
    
    +
  • + +
  • + +
    批量操作
    +
    
    +
  • + +
  • + +
    导出
    +
    
    +
  • +
  • 批量分配
    
  • - +
  • 操作日志
    
  • - +
  • 警告
    
  • - +
  • 应急处理
    
  • - +
  • 批量解锁
    
  • - +
  • 批量锁定
    
  • - +

Unicode 引用

@@ -108,9 +144,9 @@
@font-face {
   font-family: 'iconfont';
-  src: url('iconfont.woff2?t=1698312705146') format('woff2'),
-       url('iconfont.woff?t=1698312705146') format('woff'),
-       url('iconfont.ttf?t=1698312705146') format('truetype');
+  src: url('iconfont.woff2?t=1701833672416') format('woff2'),
+       url('iconfont.woff?t=1701833672416') format('woff'),
+       url('iconfont.ttf?t=1701833672416') format('truetype');
 }
 

第二步:定义使用 iconfont 的样式

@@ -135,7 +171,61 @@
    - + +
  • + +
    + 批量更新 +
    +
    .icon-pilianggengxin +
    +
  • + +
  • + +
    + 全部 +
    +
    .icon-quanbu +
    +
  • + +
  • + +
    + 批量导出 +
    +
    .icon-piliangdaochu +
    +
  • + +
  • + +
    + 批量删除 +
    +
    .icon-piliangshanchu +
    +
  • + +
  • + +
    + 批量操作 +
    +
    .icon-piliangcaozuo +
    +
  • + +
  • + +
    + 导出 +
    +
    .icon-daochu +
    +
  • +
  • @@ -144,7 +234,7 @@
    .icon-piliangfenpei
  • - +
  • @@ -153,7 +243,7 @@
    .icon-caozuorizhi32
  • - +
  • @@ -162,7 +252,7 @@
    .icon-jinggao
  • - +
  • @@ -171,7 +261,7 @@
    .icon-yingjichuli
  • - +
  • @@ -180,7 +270,7 @@
    .icon-piliangjiesuo
  • - +
  • @@ -189,7 +279,7 @@
    .icon-piliangsuoding
  • - +

font-class 引用

@@ -216,7 +306,55 @@
    - + +
  • + +
    批量更新
    +
    #icon-pilianggengxin
    +
  • + +
  • + +
    全部
    +
    #icon-quanbu
    +
  • + +
  • + +
    批量导出
    +
    #icon-piliangdaochu
    +
  • + +
  • + +
    批量删除
    +
    #icon-piliangshanchu
    +
  • + +
  • + +
    批量操作
    +
    #icon-piliangcaozuo
    +
  • + +
  • + +
    导出
    +
    #icon-daochu
    +
  • +
  • 批量分配
    #icon-piliangfenpei
  • - +
  • 操作日志
    #icon-caozuorizhi32
  • - +
  • 警告
    #icon-jinggao
  • - +
  • 应急处理
    #icon-yingjichuli
  • - +
  • 批量解锁
    #icon-piliangjiesuo
  • - +
  • 批量锁定
    #icon-piliangsuoding
  • - +

Symbol 引用

diff --git a/public/css/iconfont/iconfont.css b/public/css/iconfont/iconfont.css index eff0dc6..fec50db 100644 --- a/public/css/iconfont/iconfont.css +++ b/public/css/iconfont/iconfont.css @@ -1,8 +1,8 @@ @font-face { font-family: "iconfont"; /* Project id 4257468 */ - src: url('iconfont.woff2?t=1698312705146') format('woff2'), - url('iconfont.woff?t=1698312705146') format('woff'), - url('iconfont.ttf?t=1698312705146') format('truetype'); + src: url('iconfont.woff2?t=1701833672416') format('woff2'), + url('iconfont.woff?t=1701833672416') format('woff'), + url('iconfont.ttf?t=1701833672416') format('truetype'); } .iconfont { @@ -13,6 +13,30 @@ -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 { content: "\e619"; } diff --git a/public/css/iconfont/iconfont.js b/public/css/iconfont/iconfont.js index 8b78202..dde0ede 100644 --- a/public/css/iconfont/iconfont.js +++ b/public/css/iconfont/iconfont.js @@ -1 +1 @@ -window._iconfont_svg_string_4257468='',function(e){var c=(c=document.getElementsByTagName("script"))[c.length-1],t=c.getAttribute("data-injectcss"),c=c.getAttribute("data-disable-injectsvg");if(!c){var h,i,n,o,a,l=function(c,t){t.parentNode.insertBefore(c,t)};if(t&&!e.__iconfont__svg__cssinject__){e.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}h=function(){var c,t=document.createElement("div");t.innerHTML=e._iconfont_svg_string_4257468,(t=t.getElementsByTagName("svg")[0])&&(t.setAttribute("aria-hidden","true"),t.style.position="absolute",t.style.width=0,t.style.height=0,t.style.overflow="hidden",t=t,(c=document.body).firstChild?l(t,c.firstChild):c.appendChild(t))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(h,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),h()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(n=h,o=e.document,a=!1,s(),o.onreadystatechange=function(){"complete"==o.readyState&&(o.onreadystatechange=null,d())})}function d(){a||(a=!0,n())}function s(){try{o.documentElement.doScroll("left")}catch(c){return void setTimeout(s,50)}d()}}(window); +window._iconfont_svg_string_4257468='',function(h){var c=(c=document.getElementsByTagName("script"))[c.length-1],t=c.getAttribute("data-injectcss"),c=c.getAttribute("data-disable-injectsvg");if(!c){var a,l,i,e,o,n=function(c,t){t.parentNode.insertBefore(c,t)};if(t&&!h.__iconfont__svg__cssinject__){h.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}a=function(){var c,t=document.createElement("div");t.innerHTML=h._iconfont_svg_string_4257468,(t=t.getElementsByTagName("svg")[0])&&(t.setAttribute("aria-hidden","true"),t.style.position="absolute",t.style.width=0,t.style.height=0,t.style.overflow="hidden",t=t,(c=document.body).firstChild?n(t,c.firstChild):c.appendChild(t))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(a,0):(l=function(){document.removeEventListener("DOMContentLoaded",l,!1),a()},document.addEventListener("DOMContentLoaded",l,!1)):document.attachEvent&&(i=a,e=h.document,o=!1,s(),e.onreadystatechange=function(){"complete"==e.readyState&&(e.onreadystatechange=null,v())})}function v(){o||(o=!0,i())}function s(){try{e.documentElement.doScroll("left")}catch(c){return void setTimeout(s,50)}v()}}(window); \ No newline at end of file diff --git a/public/css/iconfont/iconfont.json b/public/css/iconfont/iconfont.json index b63e0c5..2adbce8 100644 --- a/public/css/iconfont/iconfont.json +++ b/public/css/iconfont/iconfont.json @@ -5,6 +5,48 @@ "css_prefix_text": "icon-", "description": "", "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", "name": "批量分配", diff --git a/public/css/iconfont/iconfont.ttf b/public/css/iconfont/iconfont.ttf index af21457..4a11ed1 100644 Binary files a/public/css/iconfont/iconfont.ttf and b/public/css/iconfont/iconfont.ttf differ diff --git a/public/css/iconfont/iconfont.woff b/public/css/iconfont/iconfont.woff index e0c48e6..49e9a4b 100644 Binary files a/public/css/iconfont/iconfont.woff and b/public/css/iconfont/iconfont.woff differ diff --git a/public/css/iconfont/iconfont.woff2 b/public/css/iconfont/iconfont.woff2 index fe37407..2a278ab 100644 Binary files a/public/css/iconfont/iconfont.woff2 and b/public/css/iconfont/iconfont.woff2 differ diff --git a/src/layouts/config.js b/src/layouts/config.js index 2aa7204..7e96181 100644 --- a/src/layouts/config.js +++ b/src/layouts/config.js @@ -19,6 +19,7 @@ module.exports = { "/welfareLedgerTable.*": "blank", "/payrollFilesTable.*": "blank", "/employeeDeclareTable.*": "blank", + "/taxDeclareTable.*": "blank", "/welfareArchiveTable.*": "blank", "/OCTable.*": "blank", "/manage.*": "manage", diff --git a/src/pages/atdTable/components/index.less b/src/pages/atdTable/components/index.less index 5ae34f4..0a13326 100644 --- a/src/pages/atdTable/components/index.less +++ b/src/pages/atdTable/components/index.less @@ -91,7 +91,7 @@ .expand-th:hover { .toogle-lock-tool { - width: 37%; + display: flex; } } @@ -107,17 +107,15 @@ height: 100%; .title-text { - width: 90%; + flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; - flex: 1 1; cursor: pointer; } .toogle-lock-tool { - display: flex; - width: 0; + display: none; overflow: hidden; height: 100%; justify-content: center; @@ -170,6 +168,12 @@ } } + tr:hover .editable-cell { + padding: 4px 11px; + border: 1px solid #d9d9d9; + border-radius: 2px; + } + :global { .ant-btn-link { height: inherit !important; @@ -265,7 +269,15 @@ } th, td { - font-size: 12px + font-size: 12px; + + .ant-form-item { + margin-bottom: 0; + + .ant-input-number { + width: 100%; + } + } } } } diff --git a/src/pages/calcTable/calcExplainFooter.tsx b/src/pages/calcTable/calcExplainFooter.tsx index 6cc25ec..1f2f72b 100644 --- a/src/pages/calcTable/calcExplainFooter.tsx +++ b/src/pages/calcTable/calcExplainFooter.tsx @@ -33,6 +33,10 @@ const CalcExplainFooter: FunctionComponent = (props) => { {i18n["查看拓扑图"]}
+
+ + {i18n["批量更新"]} +
); }; diff --git a/src/pages/calcTable/calcFixedTotal.tsx b/src/pages/calcTable/calcFixedTotal.tsx index f6c50a1..b23504b 100644 --- a/src/pages/calcTable/calcFixedTotal.tsx +++ b/src/pages/calcTable/calcFixedTotal.tsx @@ -49,7 +49,7 @@ const calcFixedTotal: FunctionComponent = (props) => { return (<> { _.map(columns, (item: any, index) => { - return + return { loading ? : {sumRow[item.dataIndex] || "-"} diff --git a/src/pages/calcTable/customTableTitle.tsx b/src/pages/calcTable/customTableTitle.tsx index 3e1de2e..4b7c306 100644 --- a/src/pages/calcTable/customTableTitle.tsx +++ b/src/pages/calcTable/customTableTitle.tsx @@ -13,20 +13,23 @@ interface OwnProps { dataIndex?: string; title?: string; lockStatus?: string; + dataType?: string; onHandleFormulatd?: any; i18n?: any; + pattern?: number; + calcDetail?: boolean; //查看详情页面 } type Props = OwnProps; const customTableTitle: FunctionComponent = (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( { 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) => {
onHandleFormulatd(dataIndex)}>{title}
{ - !!lockStatus && + !!lockStatus && !calcDetail &&
handleToggleSalaryItemVal(dataIndex as string, "LOCK")}/> @@ -44,6 +47,10 @@ const customTableTitle: FunctionComponent = (props) => { onClick={() => handleToggleSalaryItemVal(dataIndex as string, "UNLOCK")}/> handleToggleSalaryItemVal(dataIndex as string, "DIAGRAM")}/> + handleToggleSalaryItemVal(dataIndex as string, "BATCHUPDATE", { + pattern, salaryItemName: title, dataType + })}/>
}
diff --git a/src/pages/calcTable/index.tsx b/src/pages/calcTable/index.tsx index 8e2c4c9..6440b92 100644 --- a/src/pages/calcTable/index.tsx +++ b/src/pages/calcTable/index.tsx @@ -21,6 +21,7 @@ interface OwnProps { } type Props = OwnProps; +type fixedProps = boolean | "top" | "bottom"; const { Text } = Typography; const index: FunctionComponent = (props) => { @@ -30,8 +31,10 @@ 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(""); + const [fixed, setFixed] = useState(true); useEffect(() => { window.parent.postMessage({ type: "init" }, "*"); @@ -45,12 +48,15 @@ const index: FunctionComponent = (props) => { if (!_.isEmpty(data)) { const { columns, dataSource, pageInfo, selectedRowKeys, i18n: i18nRes = {}, - showTotalCell = false, sumRowlistUrl = "", payload = {} + showTotalCell = false, sumRowlistUrl = "", payload = {}, calcDetail, + fixed = true } = data; setSumRowlistUrl(sumRowlistUrl); setShowTotalCell(showTotalCell); + setIsDetailTable(calcDetail); setI18n(i18nRes); setPayload(payload); + setFixed(fixed); setPageInfo(pageInfo); setDataSource(dataSource); setSelectedRowKeys(selectedRowKeys); @@ -141,16 +147,17 @@ 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" }} summary={() => ( !showTotalCell ? <> : - + {i18n["总计"]} 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 + {/**/} + + ) + } + ] : 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
; +}; + +export default TaxDeclareTable; 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); +};