From ed3e74621a0cc43d51b7a252eb318341adfe6433 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Fri, 25 Apr 2025 09:04:51 +0800 Subject: [PATCH 1/8] =?UTF-8?q?feature/=E4=B8=9A=E5=8A=A1=E7=BA=BF?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/unitTable/renderColsOpts.tsx | 48 +++++++------------------- 1 file changed, 13 insertions(+), 35 deletions(-) diff --git a/src/pages/unitTable/renderColsOpts.tsx b/src/pages/unitTable/renderColsOpts.tsx index 8a93515..48b8a1c 100644 --- a/src/pages/unitTable/renderColsOpts.tsx +++ b/src/pages/unitTable/renderColsOpts.tsx @@ -452,41 +452,19 @@ export function renderCols(initialState: any[], type: string, i18n?: AnyObject, case "operate": col = { ...col, - width: 176, - fixed: "right" // render: (__: string, record: any) => { - // let items: MenuProps["items"] = [ - // { - // key: "DeleteList", - // label: i18n?.["删除"], - // onClick: () => postMessageToParent("DEL", record) - // }, - // { - // key: "Log", - // label: i18n?.["操作日志"], - // onClick: () => postMessageToParent("log", record) - // } - // ]; - // isSpecial && items.shift(); - // return ( - // - // - // {isSpecial ? ( - // - // ) : ( - // - // )} - // - // + ))} + + ); + } }; break; default: From e2eb2f97a9c033cbbe396b8dda82312f91196e29 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Thu, 19 Jun 2025 09:10:07 +0800 Subject: [PATCH 2/8] =?UTF-8?q?feature/=E4=B8=9A=E5=8A=A1=E7=BA=BF?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/calcTable/index.tsx | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/src/pages/calcTable/index.tsx b/src/pages/calcTable/index.tsx index 52e4e4e..10ea310 100644 --- a/src/pages/calcTable/index.tsx +++ b/src/pages/calcTable/index.tsx @@ -5,8 +5,7 @@ * Date: 2023/9/14 */ import React, { FunctionComponent, useEffect, useState } from "react"; -import type { MenuProps } from "antd"; -import { Button, Dropdown, Space, Table, Tooltip, Typography } from "antd"; +import { Button, Checkbox, Dropdown, MenuProps, Space, Table, Tooltip, Typography } from "antd"; import { DeleteOutlined, LockOutlined, QuestionCircleOutlined, SettingOutlined, UnlockOutlined } from "@ant-design/icons"; import CustomTableTitle from "@/pages/calcTable/customTableTitle"; import CalcExplainFooter from "@/pages/calcTable/calcExplainFooter"; @@ -124,7 +123,17 @@ const index: FunctionComponent = (props) => { const convertColumns: any = (cols: any[]) => { return _.map(cols, (item) => { if (_.isNaN(parseInt(item.dataIndex))) { - return { ...item }; + // 医博肛肠二开 + if (item.dataIndex === "ybgc-custom") { + return { + ...item, + render: (text: string, record: any) => { + return handlePassed(record, e.target.checked)} />; + } + }; + } else { + return { ...item }; + } } else { return { ...item, @@ -231,6 +240,19 @@ const index: FunctionComponent = (props) => { const handleSetFeedback = (params: any) => { window.parent.postMessage({ type: "turn", payload: { id: "SETFEEDBACK", params } }, "*"); }; + // 医博二开 + const handlePassed = (params: any, calculateStatus: boolean) => { + setDataSource((pre) => { + pre = _.map(pre, (o) => { + if (o.id === params.id) { + return { ...o, calculateStatus: calculateStatus ? "1" : "0" }; + } + return o; + }); + return pre; + }); + window.parent.postMessage({ type: "turn", payload: { id: "CUSTPASSED", params: { ...params, calculateStatus: calculateStatus ? "1" : "0" } } }, "*"); + }; const sizeChange = (pageobj: IPage) => {}; const onChange = (pageobj: IPage) => { setPageInfo(() => { @@ -240,8 +262,8 @@ const index: FunctionComponent = (props) => { }; const rowSelection = { columnWidth: 50, - columnTitle: isDetailTable && _.isNil(showSee) ? "序号" : "", - renderCell: (value: boolean, record: any, index: number, originNode: React.ReactNode) => (isDetailTable && _.isNil(showSee) ? {index + 1} : originNode), + columnTitle: isDetailTable && !showSee ? "序号" : "", + renderCell: (value: boolean, record: any, index: number, originNode: React.ReactNode) => (isDetailTable && !showSee ? {index + 1} : originNode), selectedRowKeys, preserveSelectedRowKeys: true, onChange: (rowKeys: React.Key[]) => { From 2892f4c6ee32faff3e5b1a13f7e8f84296a419dc Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Thu, 19 Jun 2025 10:04:34 +0800 Subject: [PATCH 3/8] =?UTF-8?q?feature/=E4=B8=9A=E5=8A=A1=E7=BA=BF?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/calcTable/index.tsx | 41 +++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/src/pages/calcTable/index.tsx b/src/pages/calcTable/index.tsx index 10ea310..b3a8e1a 100644 --- a/src/pages/calcTable/index.tsx +++ b/src/pages/calcTable/index.tsx @@ -14,6 +14,7 @@ import type { ColumnType } from "antd/lib/table"; import type { PaginationData } from "rc-pagination"; import { exceptStr, paginationFun } from "@/utils/common"; import { IPage } from "@/common/types"; +import Icon from "../../lib/CustomIcon"; import styles from "@/pages/atdTable/components/index.less"; interface OwnProps {} @@ -204,6 +205,38 @@ const index: FunctionComponent = (props) => { }) } ]); + item.rightClickType && + item.rightClickType.includes("MARK") && + (items = [ + ...items, + { + label: item.i18n["标记"], + key: "MARK", + icon: , + onClick: () => + handleSetMark({ + lockStatus: "LOCK", + acctEmpId: record?.id, + salaryItemId: item?.dataIndex + }) + } + ]); + item.rightClickType && + item.rightClickType.includes("UNMARK") && + (items = [ + ...items, + { + label: item.i18n["取消标记"], + key: "UNMARK", + icon: , + onClick: () => + handleSetUnMark({ + lockStatus: "UNLOCK", + acctEmpId: record?.id, + salaryItemId: item?.dataIndex + }) + } + ]); return ( @@ -211,6 +244,7 @@ const index: FunctionComponent = (props) => { {text} {record.lockItems && record.lockItems.includes(item.dataIndex) ? : null} + {record.markItems && record.markItems.includes(item.dataIndex) ? : null} {!_.isEmpty(record[`${item.dataIndex}_feedback`]) ? ( @@ -240,6 +274,13 @@ const index: FunctionComponent = (props) => { const handleSetFeedback = (params: any) => { window.parent.postMessage({ type: "turn", payload: { id: "SETFEEDBACK", params } }, "*"); }; + // 安徽国元信托有限责任公司薪酬二开-薪资核算项添加右击添加标记和取消标记的操作 + const handleSetMark = (params: any) => { + window.parent.postMessage({ type: "turn", payload: { id: "MARK", params } }, "*"); + }; + const handleSetUnMark = (params: any) => { + window.parent.postMessage({ type: "turn", payload: { id: "UNMARK", params } }, "*"); + }; // 医博二开 const handlePassed = (params: any, calculateStatus: boolean) => { setDataSource((pre) => { From 62708e104ab5ddfd64d23dd013102bbc04834021 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Fri, 4 Jul 2025 14:59:32 +0800 Subject: [PATCH 4/8] =?UTF-8?q?feature/=E4=B8=9A=E5=8A=A1=E7=BA=BF?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/calcTable/customTableTitle.tsx | 7 +++++-- src/pages/calcTable/index.tsx | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/pages/calcTable/customTableTitle.tsx b/src/pages/calcTable/customTableTitle.tsx index 1985999..81f6d9a 100644 --- a/src/pages/calcTable/customTableTitle.tsx +++ b/src/pages/calcTable/customTableTitle.tsx @@ -17,13 +17,14 @@ interface OwnProps { i18n?: any; pattern?: number; calcDetail?: boolean; //查看详情页面 + mzgOptPermission?: boolean; //二开美之高操作权限 children?: any; } type Props = OwnProps; const customTableTitle: FunctionComponent = (props) => { - const { dataIndex, title, onHandleFormulatd, i18n = {}, pattern, dataType, calcDetail, children } = props; + const { dataIndex, title, onHandleFormulatd, i18n = {}, pattern, dataType, calcDetail, children, mzgOptPermission } = props; const handleToggleSalaryItemVal = (salaryItemId: string, type: string, updateParams: any = {}) => { window.parent.postMessage({ type: "turn", payload: { id: "LOCKING", params: { lockType: type, salaryItemId, ...updateParams } } }, "*"); }; @@ -37,7 +38,9 @@ const customTableTitle: FunctionComponent = (props) => {
handleToggleSalaryItemVal(dataIndex as string, "LOCK")} /> handleToggleSalaryItemVal(dataIndex as string, "UNLOCK")} /> - handleToggleSalaryItemVal(dataIndex as string, "BATCHUPDATE", { pattern, salaryItemName: title, dataType })} /> + {!mzgOptPermission && ( + handleToggleSalaryItemVal(dataIndex as string, "BATCHUPDATE", { pattern, salaryItemName: title, dataType })} /> + )}
)} diff --git a/src/pages/calcTable/index.tsx b/src/pages/calcTable/index.tsx index 20e52a6..15a6d1a 100644 --- a/src/pages/calcTable/index.tsx +++ b/src/pages/calcTable/index.tsx @@ -37,6 +37,7 @@ const index: FunctionComponent = (props) => { const [payload, setPayload] = useState(""); const [fixed, setFixed] = useState(true); const [sumRow, setSumRow] = useState>({}); //总计行数据 + const [mzgOptPermission, setMzgOptPermission] = useState(false); //美之高操作权限 false 默认可以编辑,true不可编辑 useEffect(() => { window.parent.postMessage({ type: "init" }, "*"); @@ -62,7 +63,8 @@ const index: FunctionComponent = (props) => { fixed = true, tableScrollHeight, sumRow, - optWidth + optWidth, + mzgOptPermission = false } = data; setSumRowlistUrl(sumRowlistUrl); setShowTotalCell(showTotalCell); @@ -76,6 +78,7 @@ const index: FunctionComponent = (props) => { setDataSource(dataSource); setSelectedRowKeys([...selectedRowKeys, ...rowKeys]); setTableScrollHeight(tableScrollHeight); + setMzgOptPermission(mzgOptPermission); setColumns([ ...convertColumns(_.map(columns, (o) => ({ ...o, i18n: i18nRes }))), { @@ -330,7 +333,7 @@ const index: FunctionComponent = (props) => { x: 1200, y: `calc(100vh - ${tableScrollHeight || (!showTotalCell ? 165 : 200)}px)` }} - columns={!isDetailTable || showSee ? columns : _.filter(columns, (o) => o.dataIndex !== "operate")} + columns={(!isDetailTable || showSee) && !mzgOptPermission ? columns : _.filter(columns, (o) => o.dataIndex !== "operate")} footer={() => (!isDetailTable ? : null)} pagination={ !_.isNil(pageInfo) From 88a419491aa4497e11882bc3c6a0baf97f660852 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Wed, 15 Oct 2025 17:45:04 +0800 Subject: [PATCH 5/8] =?UTF-8?q?feature/=E4=B8=9A=E5=8A=A1=E7=BA=BF?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/common.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/utils/common.js b/src/utils/common.js index 5096b1a..4b85ecc 100644 --- a/src/utils/common.js +++ b/src/utils/common.js @@ -71,6 +71,7 @@ export const exceptStr = (str) => { }; export const paginationFun = (tableListPageObj, sizeChange, onChange, i18n = {}) => { + const pageSizeOptions= tableListPageObj?.pageSizeOptions || ["10", "20", "50", "100"]; return { current: tableListPageObj.pageNum || tableListPageObj.current, pageSize: tableListPageObj.size || tableListPageObj.pageSize, @@ -78,7 +79,7 @@ export const paginationFun = (tableListPageObj, sizeChange, onChange, i18n = {}) showTotal: total => `${i18n["共"] ? i18n["共"] : "共"} ${total} ${i18n["条"] ? i18n["条"] : "条"}`, showQuickJumper: true, showSizeChanger: true, - pageSizeOptions: ["10", "20", "50", "100"], + pageSizeOptions, onShowSizeChange: (page, size) => { const { total } = tableListPageObj; sizeChange({ @@ -122,4 +123,4 @@ export const toDecimal_n = (num, decimalPlaces) => { const multiplier = Math.pow(10, decimalPlaces); const roundedNum = Math.round(num * multiplier) / multiplier; return roundedNum.toFixed(decimalPlaces); -}; +}; \ No newline at end of file From 23c659f04b4b96fe70359d1c43ef735b8a089a90 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Mon, 20 Oct 2025 10:45:39 +0800 Subject: [PATCH 6/8] =?UTF-8?q?feature/=E4=B8=9A=E5=8A=A1=E7=BA=BF?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/calcTable/index.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/calcTable/index.tsx b/src/pages/calcTable/index.tsx index 15a6d1a..535905c 100644 --- a/src/pages/calcTable/index.tsx +++ b/src/pages/calcTable/index.tsx @@ -307,7 +307,8 @@ const index: FunctionComponent = (props) => { const rowSelection = { columnWidth: 50, columnTitle: isDetailTable && !showSee ? "序号" : "", - renderCell: (value: boolean, record: any, index: number, originNode: React.ReactNode) => (isDetailTable && !showSee ? {index + 1} : originNode), + renderCell: (value: boolean, record: any, index: number, originNode: React.ReactNode) => + isDetailTable && !showSee ? {((pageInfo.current as number) - 1) * (pageInfo.pageSize as number) + index + 1} : originNode, selectedRowKeys, preserveSelectedRowKeys: true, onChange: (rowKeys: React.Key[]) => { @@ -361,4 +362,4 @@ const index: FunctionComponent = (props) => { ); }; -export default index; +export default index; \ No newline at end of file From fd0a3f2cb22526362a20a6277f8f9cce6d1f3ea9 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Wed, 22 Oct 2025 16:45:22 +0800 Subject: [PATCH 7/8] =?UTF-8?q?feature/=E4=B8=9A=E5=8A=A1=E7=BA=BF?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/calcTable/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/calcTable/index.tsx b/src/pages/calcTable/index.tsx index 535905c..1c6ab34 100644 --- a/src/pages/calcTable/index.tsx +++ b/src/pages/calcTable/index.tsx @@ -308,7 +308,7 @@ const index: FunctionComponent = (props) => { columnWidth: 50, columnTitle: isDetailTable && !showSee ? "序号" : "", renderCell: (value: boolean, record: any, index: number, originNode: React.ReactNode) => - isDetailTable && !showSee ? {((pageInfo.current as number) - 1) * (pageInfo.pageSize as number) + index + 1} : originNode, + isDetailTable && !showSee ? {!_.isEmpty(pageInfo) ? ((pageInfo.current as number) - 1) * (pageInfo.pageSize as number) + index + 1 : index + 1} : originNode, selectedRowKeys, preserveSelectedRowKeys: true, onChange: (rowKeys: React.Key[]) => { From 0e65d086dcf149589891cbc5daa72af83c2ff337 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Thu, 4 Dec 2025 15:30:21 +0800 Subject: [PATCH 8/8] =?UTF-8?q?feature/=E4=B8=9A=E5=8A=A1=E7=BA=BF?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/MPayroll/index.less | 136 ---------------------------------- src/pages/MPayroll/index.tsx | 119 ----------------------------- 2 files changed, 255 deletions(-) delete mode 100644 src/pages/MPayroll/index.less delete mode 100644 src/pages/MPayroll/index.tsx diff --git a/src/pages/MPayroll/index.less b/src/pages/MPayroll/index.less deleted file mode 100644 index 72de7f2..0000000 --- a/src/pages/MPayroll/index.less +++ /dev/null @@ -1,136 +0,0 @@ -.pbmc_body { - height: calc(100% - 50px); - background: #f6f6f6; - overflow: auto; - font-size: 12px; - - .weapp-salary-payroll-mobile-preview { - width: 100%; - height: 100%; - overflow-y: auto; - - .bill-container { - background: #f6f6f6; - - .space { - width: 100%; - display: flex; - align-items: center; - justify-content: flex-end; - margin-bottom: 16px; - - .ant-btn { - margin-right: 16px; - } - } - - .bill-info-header { - padding-top: 16px; - - .title { - padding: 0 16px; - font-size: 19px; - font-weight: 700; - margin-bottom: 12px; - text-align: center; - } - - .time { - padding: 0 16px; - font-size: 12px; - color: #999; - } - - .img { - margin-top: 20px; - width: 100%; - - img { - width: 100%; - } - } - } - - .top { - padding-bottom: 0; - } - - .footer { - padding-top: 8px; - } - - .corporate-culture-text { - text-align: left; - color: #111; - padding: 8px 16px; - white-space: pre-wrap; - word-break: break-all; - } - - .salary-detail-table-container { - padding-top: 8px; - - .salary-group { - border-top: 1px solid #f2f2f2; - margin-bottom: 16px; - - .group-title { - background: #fff; - display: flex; - align-items: center; - min-height: 45px; - padding: 0 16px; - border-bottom: 1px solid #f2f2f2; - font-weight: bolder; - font-size: 14px; - } - - .group-list { - .list-item { - display: flex; - min-height: 45px; - border-bottom: 1px solid #f2f2f2; - width: 100%; - background: #fff; - - .item-name { - padding: 8px 16px; - width: 50%; - display: flex; - align-items: center; - background: #fbfbfb; - border-right: 1px solid #f2f2f2; - flex-shrink: 0; - } - - .item-count { - display: flex; - align-items: center; - padding: 16px; - white-space: pre-wrap; - word-break: break-all; - } - } - } - } - } - } - } -} - -.pbmc_footer { - position: relative; - height: 50px; - - .pbmcf_indicator { - position: absolute; - bottom: 16px; - left: 50%; - -webkit-transform: translateX(-50%); - transform: translateX(-50%); - width: 110px; - height: 4px; - background-color: #ebebeb; - border-radius: 2px; - } -} \ No newline at end of file diff --git a/src/pages/MPayroll/index.tsx b/src/pages/MPayroll/index.tsx deleted file mode 100644 index 01e9291..0000000 --- a/src/pages/MPayroll/index.tsx +++ /dev/null @@ -1,119 +0,0 @@ -import React, { useCallback, useEffect, useMemo, useState } from "react"; -import styles from "./index.less"; -import { Util } from "@/utils"; -import cs from "classnames"; -import API from "@/api"; - -interface OwnProps {} - -type Props = OwnProps; - -const MPayroll: React.FC = (props) => { - const [mySalaryBillData, setMySalaryBillData] = useState({}); - useEffect(() => { - getMySalaryBill(); - return () => {}; - }, []); - const getMySalaryBill = useCallback(() => { - API.CalculateService.getMySalaryBill(Util.getUrlData("salaryInfoId")).then(({ data: res }) => { - const { data, status } = res || {}; - if (status) setMySalaryBillData(data); - }); - }, []); - const dealTemplate = (itemTypeList: any, type: string) => { - let cloneItemTypeList = _.cloneDeep(itemTypeList); - let showData: any = [], - onlyOneGrup = false; - cloneItemTypeList.forEach((group: any) => { - const { items, groupName, groupId } = group; - if (items.length !== 0) { - items.forEach((item: any) => { - item.salaryItemValue = !_.isNil(item.salaryItemValue) ? item.salaryItemValue : ""; - }); - if (items.length % 2 && type === "pc") items.push({}); - showData.push({ groupId, groupName, items }); - } - }); - if (cloneItemTypeList.length === 1) { - onlyOneGrup = true; - cloneItemTypeList[0].name = ""; - } - return { onlyOneGrup, showData }; - }; - const salaryTemplate = useMemo(() => { - return !_.isEmpty(mySalaryBillData) ? mySalaryBillData?.salaryTemplate : {}; - }, [mySalaryBillData]); - const itemTypeList = useMemo(() => { - return !_.isEmpty(mySalaryBillData) ? [mySalaryBillData?.employeeInformation, ...mySalaryBillData?.salaryGroups] : []; - }, [mySalaryBillData]); - const payrollData: any = useMemo(() => { - return !_.isEmpty(itemTypeList) - ? dealTemplate( - _.filter(itemTypeList, (o) => !!o), - "mobile" - ) - : {}; - }, [mySalaryBillData, itemTypeList]); - console.log(payrollData); - return ( - <> -
-
-
-
-
{salaryTemplate?.theme || ""}
-
- {!payrollData?.onlyOneGrup && salaryTemplate?.textContentPosition == 1 && salaryTemplate.textContent && ( -
- )} -
- {!_.isEmpty(payrollData?.showData) && - payrollData?.showData.map((groupItem: any, index: number) => { - if (!groupItem) return null; - const { groupId, groupName, items = [] } = groupItem; - return ( -
- {groupName ?
{groupName}
: null} -
- {payrollData?.onlyOneGrup && salaryTemplate?.textContentPosition == "1" && salaryTemplate.textContent && ( -
-
发放说明
-
{salaryTemplate.textContent}
-
- )} - {items.map((templatItem: any, index: number) => { - const { salaryItemValue, name, salaryItemShowName } = templatItem || {}; - return ( -
-
- {salaryItemShowName || name || ""} -
-
{salaryItemValue}
-
- ); - })} - {payrollData?.onlyOneGrup && salaryTemplate?.textContentPosition == "2" && salaryTemplate.textContent && ( -
-
发放说明
-
{salaryTemplate.textContent}
-
- )} -
-
- ); - })} -
- {!payrollData?.onlyOneGrup && salaryTemplate?.textContentPosition == 2 && salaryTemplate.textContent && ( -
- )} -
-
-
-
-
-
- - ); -}; - -export default MPayroll; \ No newline at end of file