/* * @Author: code4eat awesomedema@gmail.com * @Date: 2022-12-16 09:42:52 * @LastEditors: code4eat awesomedema@gmail.com * @LastEditTime: 2023-03-07 19:16:36 * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlySet/index.tsx * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ import BMSPagecontainer from '@/components/BMSPageContainer'; import { useEffect, useRef, useState } from 'react'; import './style.less'; import { Tree, TreeProps, Tabs, Input, Modal, Transfer, Divider, Select, Popconfirm, message, Button, Skeleton, Popover } from 'antd'; import { DataNode } from 'antd/es/tree'; import expandedIcon from '../../../../static/treenode_open.png'; import closeIcon from '../../../../static/treenode_collapse.png'; import { BMSTable } from '@/components/BMSTable'; import { ActionType, ModalForm, ProColumns, ProColumnType, ProForm, ProFormDependency, ProFormDigit, ProFormInstance, ProFormSelect, ProFormText, ProFormTextArea } from '@ant-design/pro-components'; import { createFromIconfontCN } from '@ant-design/icons'; import { addTableData, checkMonthlyReq, delTableDataRequest, downloadTemplateReq, editCheckProject, editManaIndexTableData, editTableData, editTableSalaryRequest, generateCheckProjectTableData, getCheckItemCalcStatus, getCheckProjectTableData, getCostData, getDepLists, getEmps, getHesuanUnits, getIncomeData, getManaIndexGroup, getManaIndexTableData, getNoCheckTableData, getPageCheckStatus, getProjects, getSalaryInfoTableData, importMonthlyperformanceRelaFiles } from './service'; import { TransferDirection } from 'antd/es/transfer'; import editIcon from '../../../../static/editIcon.png'; import conformIcon from '../../../../static/confirmIcon.png'; import { getComputeDate } from '@/pages/Home/service'; import BMSModalForm from '@/components/BMSModalForm'; import { DefaultOptionType } from 'antd/es/select'; import { getTreeData, getTreeDataRespType } from '../monthlyInfoCheck/service'; import DirectoryTree from 'antd/es/tree/DirectoryTree'; import BMSUpload from '@/components/BMSUpload'; import FormItem from 'antd/es/form/FormItem'; import { getDeepestTreeData } from '@/utils/tooljs'; const IconFont = createFromIconfontCN({ scriptUrl: '//at.alicdn.com/t/c/font_1927152_4nm5kxbv4m3.js', }); export type TableListItem = { key: number; name: string; }; const MonthlyDataCheck: React.FC = () => { const [treeData, set_treeData] = useState([]); const [ifShowTip, set_ifShowTip] = useState(false); const [expandedKeys, setExpandedKeys] = useState([]); const [searchValue, setSearchValue] = useState(''); const [autoExpandParent, setAutoExpandParent] = useState(true); const [auditType, set_auditType] = useState('0'); const [tableColumn, set_tableColumn] = useState([]); const [currentSelectedTreeNode, set_currentSelectedTreeNode] = useState(); const [currentSelectedTabKey, set_currentSelectedTabKey] = useState('1'); const [currentComputeDate, set_currentComputeDate] = useState(undefined); const [editTableCellId, set_editTableCellId] = useState(undefined); const [tableDataSearchKeywords, set_tableDataSearchKeywords] = useState(''); const [tableDataFilterParams, set_tableDataFilterParams] = useState(undefined); const [editModalVisible, set_editModalVisible] = useState(false); const [loading, set_loading] = useState(false); const [currentEditRecord, set_currentEditRecord] = useState(undefined); const [inputSalaryNum, set_inputSalaryNum] = useState(0); //固定工资金额 const [checkItemvalNum, set_checkItemvalNum] = useState(0); //考核项目数值 const [isTableEdit, set_isTableEdit] = useState(false); const [totalNum, set_totalNum] = useState(0); //收入和成本数据的总和数值 const [tableH,set_tableH] = useState(0); const [manaIndexGroups, set_manaIndexGroups] = useState<{ id: number, groupCode: string, groupName: string, hospId: number }[]>([]); //管理指标分组 const [currentSelectedManaGroup, set_currentSelectedManaGroup] = useState<{ id: number, groupCode: string, groupName: string, hospId: number }>(); const formRef = useRef(); const tableRef = useRef(); const tableColumnOne = [ { title: '职类', dataIndex: 'unitTypeName', key: 'unitTypeName', align: 'center' }, { title: '核算单元名称', dataIndex: 'unitName', key: 'unitName', align: 'center' }, { title: '科室', dataIndex: 'deptName', key: 'deptName', align: 'center' }, { title: '工号', dataIndex: 'empNo', key: 'empNo', align: 'center' }, { title: '姓名', dataIndex: 'empName', key: 'empName', align: 'center' }, { title: '工资类型', dataIndex: 'salaryType', key: 'salaryType', align: 'center' }, ] const tableColumnTwo = [ { title: '职类', dataIndex: 'unitTypeName', key: 'unitTypeName', align: 'center' }, { title: '核算单元名称', dataIndex: 'unitName', key: 'unitName', align: 'center' }, { title: '科室', dataIndex: 'deptName', key: 'deptName', align: 'center' }, { title: '项目名称', dataIndex: 'assessmentName', key: 'assessmentName', align: 'center' }, { title: '分配方式', dataIndex: 'distributionType', key: 'distributionType', align: 'center', render: (record: any) => { if (record == 1) return '占比' if (record == 2) return '绝对数' if (record == 3) return '自动计算' } }, { title: '数值', dataIndex: 'value', key: 'value', align: 'center' }, { title: '工号', dataIndex: 'targetValue', key: 'targetValue', align: 'center' }, { title: '姓名', dataIndex: 'targetValueName', key: 'targetValueName', align: 'center' }, { title: '说明', dataIndex: 'description', key: 'description', align: 'center' } ]; const tableColumnThree = [ { title: '项目名称', dataIndex: 'itemName', key: 'itemName', align: 'center' }, { title: '类型', dataIndex: 'itemTypeName', key: 'itemTypeName', align: 'center', }, { title: '点值', dataIndex: 'orderPointValue', key: 'orderPointValue', align: 'center' }, ]; const tableColumnFive = [ { title: '年度', dataIndex: 'year', key: 'year', align: 'center' }, { title: '月份', dataIndex: 'month', key: 'month', align: 'center' }, { title: '项目名称', dataIndex: 'itemName', key: 'itemName', align: 'center' }, { title: '项目类型', dataIndex: 'itemTypeName', key: 'itemTypeName', align: 'center' }, { title: '金额', dataIndex: 'cost', key: 'cost', align: 'center' }, // { // title: '操作人', // dataIndex: 'unitType', // key: 'unitType', // align: 'center' // }, // { // title: '操作时间', // dataIndex: 'unitType', // key: 'unitType', // align: 'center' // }, ] const getCurrentComputeDate = async () => { const resp = await getComputeDate(); set_currentComputeDate(resp); } const onSelectHandle: TreeProps['onSelect'] = (selectedKeys, info) => { const { node } = info; //set_tableDataFilterParams({...tableDataFilterParams,current:1}) set_currentSelectedTreeNode(node); }; const onExpand = (newExpandedKeys: React.Key[]) => { setExpandedKeys(newExpandedKeys); setAutoExpandParent(false); }; //固定金额编辑金额 const editHandle = async (record: any) => { const { id, deptCode, salaryType, unitCode, userId } = record; if (id == editTableCellId) { //保存 // console.log({ inputSalaryNum,currentSelectedTreeNode }); if (inputSalaryNum) { const resp = await editTableSalaryRequest({ computeDate: currentComputeDate as string, unitCode, deptCode, salaryType, salary: inputSalaryNum, userId: `${userId}`, id }); if (resp) { tableRef.current?.reload(); } } set_editTableCellId(undefined); } else { //编辑 set_editTableCellId(id); } } //考核项目编辑数值 const editCheckItemValHandle = async (record: any) => { const { id, itemCode, itemName, itemType, orderPointValue, executePointValue, hospId, unitCode } = record; if (id == editTableCellId) { //保存 if (checkItemvalNum) { const resp = await editCheckProject({ computeDate: currentComputeDate as string, itemCode, itemName, itemType, orderPointValue, value: checkItemvalNum, executePointValue, hospId, unitCode, id }); if (resp) { tableRef.current?.reload(); } } set_editTableCellId(undefined); } else { //编辑 set_editTableCellId(id); } } const checkProjectEditHandle = (record: any) => { // console.log({record}); const { props: { record: _record } } = record; set_currentEditRecord(_record); set_editModalVisible(true); } const tableDataAddHandle = () => { set_editModalVisible(true); } //表格行编辑 const tableEditActHandle = (record: any) => { //console.log({'edit':record}); set_isTableEdit(true); set_currentEditRecord(record); set_editModalVisible(true); } //管理指标row编辑 const EditManaIndexTableRow = ({ record }: { record: any }) => { const { value, columns, unitName, id, unitCode, totalScore, computeDate, groupId } = record; return ( 编辑 } initialValues={record} onFinish={async (values) => { const editResult = value.map((a: any) => { return { ...a, value: values[`value${a.code}`] } }) const data = { id, unitCode, unitName, totalScore, computeDate, groupId, value: editResult } const resp = await editManaIndexTableData(data); if (resp) { tableRef.current?.reload(); } return true }} > { value.map((item: any, index: any) => { const findTitle = columns.filter((a: any) => a.key == item.code); return ( findTitle.length > 0 ? : null ) }) } ) } const onTabChange = (activeKey: string) => { set_currentSelectedTabKey(activeKey); } //获取核算单元树结构 const getCheckUnitTreeDataFunc = async (computeDate: string) => { const resp = await getTreeData(computeDate); if (resp) { set_treeData(resp); } } const getCalcStatus =async () => { const resp = await getCheckItemCalcStatus(currentComputeDate as string,'ASSESSMENT'); if(resp){ if(resp.calculating){ //继续计算 set_loading(true); return false }else{ //计算已完成 set_loading(false); return true } }else{ tableRef.current?.reload(); return true } } const getTableData = async (type: '1' | '2' | '3' | '4' | '5' | '6', params: any, sort: any, filter: any) => { if (currentComputeDate) { if (type == '1') { const resp = await getSalaryInfoTableData({ computeDate: currentComputeDate, ...params }); if (resp) { return { data: resp.list, total: resp.totalCount, pageSize: resp.pageSize, totalPage: resp.totalPage, success: true } } } if (type == '2') { const resp = await getNoCheckTableData({ computeDate: currentComputeDate, ...params }); if (resp) { return { data: resp.list, total: resp.totalCount, pageSize: resp.pageSize, totalPage: resp.totalPage, success: true } } } if (type == '3') { if(!loading){ //计算完和未计算 const resp = await getCheckProjectTableData({ computeDate: currentComputeDate, unitCode: currentSelectedTreeNode.code, ...params }); if (resp) { return { data: resp.list, success: true, total: resp.totalCount, pageSize: resp.pageSize, totalPage: resp.totalPage, } } } } if (type == '4') { if (currentSelectedManaGroup) { const resp = await getManaIndexTableData({ ...params, computeDate: currentComputeDate, groupId: currentSelectedManaGroup.groupCode }); if (resp) { const columns = resp.title.map((item: any) => (item.children ? { title: () => { return
{item.name} {item.arrow == 'up' ? '↑' : '↓'}
}, key: item.code, dataIndex: item.name, children: item.children.map((a: any) => { return { title: a.name, dataIndex: `${a.code}${item.code}`, key: `${a.code}${item.code}`, width: 100, align: 'center', } }) } : { title: item.name, dataIndex: item.code, key: item.code, width: 100, align: 'center', })); set_tableColumn([{ title: '核算单元', dataIndex: 'unitName', key: 'unitName', align: 'center', width: 120, fixed: 'left', }, ...columns, { title: '总得分', dataIndex: 'totalScore', key: 'totalScore', align: 'center', width: 100, fixed: 'right', }, ]); const data = resp.managerData.map((item: any) => { let rowData: { [key: string]: any } = {}; for (let index = 0; index < item.value.length; index++) { for (const key in item.value[index]) { if (key != 'code') { rowData[`${key}${item.value[index].code}`] = item.value[index][`${key}`] } } } return { ...item, ...rowData, id: item.id, columns } }); return { data: data, success: true, total: resp.totalCount, pageSize: resp.pageSize, totalPage: resp.totalPage, } } } } if (type == '5') { const resp = await getIncomeData({ computeDate: currentComputeDate, ...params }); if (resp) { set_totalNum(resp.sum); return { data: resp.pageList.list, success: true, total: resp.pageList.totalCount, pageSize: resp.pageList.pageSize, totalPage: resp.pageList.totalPage, } } } if (type == '6') { const resp = await getCostData({ computeDate: currentComputeDate, ...params }); if (resp) { set_totalNum(resp.sum); return { data: resp.pageList.list, success: true, total: resp.pageList.totalCount, pageSize: resp.pageList.pageSize, totalPage: resp.pageList.totalPage, } } } } return [] } const tableDataSearchHandle = (paramName: string) => { set_tableDataFilterParams({ ...tableDataFilterParams, [`${paramName}`]: tableDataSearchKeywords }) } //表格删除确认 const delActionHandle = async (record: any, index: number) => { const { id } = record; const resp = await delTableDataRequest({ computeDate: currentComputeDate as string, id, index }); if (resp) { tableRef.current?.reload(); message.success('删除成功!') } }; interface RecordType { key: string; title: string; description: string; } const mockData: RecordType[] = Array.from({ length: 20 }).map((_, i) => ({ key: i.toString(), title: `content${i + 1}`, description: `description of content${i + 1}`, })); const initialTargetKeys = mockData.filter((item) => Number(item.key) > 10).map((item) => item.key); const TransferNode = () => { const [targetKeys, setTargetKeys] = useState(initialTargetKeys); const [selectedKeys, setSelectedKeys] = useState([]); const onChange = (nextTargetKeys: string[], direction: TransferDirection, moveKeys: string[]) => { console.log('targetKeys:', nextTargetKeys); console.log('direction:', direction); console.log('moveKeys:', moveKeys); setTargetKeys(nextTargetKeys); }; const onSelectChange = (sourceSelectedKeys: string[], targetSelectedKeys: string[]) => { console.log('sourceSelectedKeys:', sourceSelectedKeys); console.log('targetSelectedKeys:', targetSelectedKeys); setSelectedKeys([...sourceSelectedKeys, ...targetSelectedKeys]); }; return ( item.title} /> ) } const dataList: any[] = []; const generateList = (data: getTreeDataRespType[]) => { for (let i = 0; i < data.length; i++) { const node = data[i]; const { code, name } = node; dataList.push({ code: code, name: name }); if (node.child) { generateList(node.child); } } }; generateList(treeData as any); const getParentKey = (key: React.Key, tree: any[]): React.Key => { let parentKey: React.Key; for (let i = 0; i < tree.length; i++) { const node = tree[i]; if (node.child) { if (node.child.some((item: { code: React.Key; }) => item.code === key)) { parentKey = node.code; } else if (getParentKey(key, node.child)) { parentKey = getParentKey(key, node.child); } } } return parentKey!; }; //考核项目树结构搜索 const onTreeSearchKeyChange = (e: React.ChangeEvent) => { const { value } = e.target; const newExpandedKeys = dataList .map((item) => { if (item.name.indexOf(value) > -1) { return getParentKey(item.code, treeData); } return null; }); const b = newExpandedKeys.filter((item, i, self) => item && self.indexOf(item) === i); setExpandedKeys(newExpandedKeys as React.Key[]); setSearchValue(value); setAutoExpandParent(true); } //获取数据 const confirmGenerateHandle: any = async (index: number, others?: any) => { if (index == 3) { const resp = await generateCheckProjectTableData({ computeDate: currentComputeDate as string, unitCode: others ? currentSelectedTreeNode.code : '' }); set_loading(false); if (resp) { tableRef.current?.reload(); } return Promise.resolve(true); } } const generateFunc = (index: number, others?: any) => { /** * index 获取的表格类型下标 */ if (index == 3&&!loading) { Modal.confirm({ title: '注意', cancelText: '', closable: true, content: others ? '获取单个操作会覆盖上次获取的该核算单元的数据,确定要继续操作?' : '获取所有操作会覆盖所有已获取的数据,确定要继续操作?', onOk: () => { set_loading(true);confirmGenerateHandle(index,others) } }) } } const onVisibleChangeHandle = (bool: boolean) => { set_editModalVisible(bool); if (!bool) { set_isTableEdit(false); } } const onManaIndexGroupClick = (manaIndexGroup: any) => { set_currentSelectedManaGroup(manaIndexGroup); } const tableFormCommit = async (formData: any, type: 'edit' | 'add') => { if (type == 'edit') { //编辑 const body = { id: currentEditRecord.id, computeDate: currentComputeDate as string, unitCode: formData.unitCode, deptCode: formData.deptCode, nonAssessmentCode: typeof formData.assessmentCode == 'number' ? formData.assessmentCode : formData.assessmentCode.value, targetValue: `${formData.userId}`, value: `${formData.value}`, description: formData.description } const resp = await editTableData(body); if (resp) { tableRef.current?.reload(); } set_isTableEdit(false); } else if (type == 'add') { //新增 const body = { computeDate: currentComputeDate as string, unitCode: formData.unitCode, deptCode: formData.deptCode, nonAssessmentCode: formData.assessmentCode.value, targetValue: `${formData.userId}`, value: `${formData.value}`, description: formData.description } const resp = await addTableData(body); if (resp) { tableRef.current?.reload(); } } // set_editModalVisible(false); set_currentEditRecord(undefined); return true; } //获取管理指标分组 const getManaIndiGroupRequest = async () => { const resp = await getManaIndexGroup(); if (resp) { set_manaIndexGroups(resp); if (resp.length > 0) { // const titleResp = await getManaIndexTableData({ computeDate: currentComputeDate as string, groupId: resp[0].groupCode }); // if (titleResp) { // const columns = titleResp.title.map((item: any) => (item.children ? { // title: () => { // return
{item.name}
// }, // key: item.code, // dataIndex: item.name, // children: item.children.map((a: any) => { // return { // title: a.name, // dataIndex: `${a.code}${item.code}`, // key: `${a.code}${item.code}`, // width: 100, // align: 'center', // } // }) // } : { // title: item.name, // dataIndex: item.code, // key: item.code, // width: 100, // align: 'center', // })); // set_tableColumn([{ // title: '核算单元', // dataIndex: 'unitName', // key: 'unitName', // align: 'center', // width: 120, // fixed: 'left', // }, ...columns, // { // title: '总得分', // dataIndex: 'totalScore', // key: 'totalScore', // align: 'center', // width: 100, // fixed:'right', // }, // { // title: '操作', // key: 'option', // valueType: 'option', // width: 100, // align: 'center', // fixed: 'right', // render: (_: any, record: any) => [ // // ], // }]); // } set_currentSelectedManaGroup(resp[0]) } } } const importData = (index: number, name: string) => { return ( 导入 } submitter={{ render: (props, defaultDoms) => { const needBtn = defaultDoms.filter((b) => { return b.key != 'rest' }) return [ , ...needBtn, ]; }, }} onFinish={async (values) => { // console.log({values}); const { importFile: { fileList } } = values; let formData = new FormData(); formData.append('file', fileList[0].originFileObj); formData.append('computeDate', currentComputeDate as string); const resp = await importMonthlyperformanceRelaFiles(index, formData); if (resp) { tableRef.current?.reload(); return true; } }} > ) } const checkHandle = async (type: string) => { const resp = await checkMonthlyReq( currentComputeDate as string, type == '0' ? '1' : '0', //审核类型 1审核 0取消审核 ); if (resp) { if (type == '0') { message.success('审核提交成功!'); set_auditType('1'); } if (type == '1') { message.success('取消审核提交成功!'); set_auditType('0'); } } } const pageCheckStatusFunc = async (time: string) => { const resp = await getPageCheckStatus(time); if (resp) { set_auditType(`${resp}`); //0 未审核 1 已审核 } } const downloadTemplate = async (index: number, id?: number) => { await downloadTemplateReq(index, id); } const handleResize = (e:any)=>{ const wH = e.target.innerHeight; const tableHeight = wH - 320; set_tableH(tableHeight); } function doResize(){ setTimeout(() => { const ev: any = new Event('resize'); window.dispatchEvent(ev); },0) } useEffect(()=>{ if(loading){ setInterval(()=>{ getCalcStatus(); },60000) } },[loading]) useEffect(() => { set_tableDataFilterParams({ ...tableDataFilterParams, groupId: currentSelectedManaGroup?.groupCode, }); }, [currentSelectedManaGroup]); useEffect(() => { tableRef.current?.reloadAndRest && tableRef.current?.reloadAndRest(); }, [currentSelectedTreeNode]); useEffect(() => { //清空表格筛选项 set_tableDataFilterParams(undefined); set_currentSelectedTreeNode(undefined); if (currentSelectedTabKey == '1') { set_tableColumn(tableColumnOne as ProColumns[]); } if (currentSelectedTabKey == '2') { set_tableColumn(tableColumnTwo as ProColumns[]); } if (currentSelectedTabKey == '3') { if (currentComputeDate) { getCheckUnitTreeDataFunc(currentComputeDate as string); } set_tableColumn(tableColumnThree as ProColumns[]); } if (currentSelectedTabKey == '4') { getManaIndiGroupRequest(); //获取分组 } if (currentSelectedTabKey == '5') { set_tableColumn(tableColumnFive as ProColumns[]); } if (currentSelectedTabKey == '6') { set_tableColumn(tableColumnFive as ProColumns[]); } }, [currentSelectedTabKey]); useEffect(() => { //初始化左侧树结构数据后 if (treeData?.length > 0) { if (treeData[0].child && treeData[0].child.length > 0) { const [node, nodeParent] = getDeepestTreeData(treeData[0], 'child'); set_currentSelectedTreeNode(node); setExpandedKeys([nodeParent.code]); } } }, [treeData]); useEffect(() => { if (currentComputeDate) { pageCheckStatusFunc(currentComputeDate); //获取页面查核状态 getCalcStatus(); } }, [currentComputeDate]); useEffect(() => { getCurrentComputeDate(); set_tableColumn(tableColumnOne as ProColumns[]); window.addEventListener('resize',(e)=>handleResize(e)) //监听窗口大小改变 doResize(); return ()=>{ window.removeEventListener('resize',(e)=>handleResize(e)); } }, []) return (
{ true && ( tableFormCommit(val, isTableEdit ? 'edit' : 'add')} > { currentSelectedTabKey == '1' && ( <> ) } { currentSelectedTabKey == '2' && ( <> { const resp = await getDepLists(); if (resp) { return resp.map((a: any) => ({ label: a.deptName, value: a.deptCode, d: a })) } return [] }} fieldProps={{ showSearch: true, onChange: (value) => { formRef.current?.setFieldValue('unitCode', ''); } }} /> { ({ deptCode }) => { // console.log({deptCode}); return ( { if (deptCode) { const resp = await getHesuanUnits(deptCode); if (resp) { return resp.map((a: any) => ({ label: a.unitName, value: a.unitCode, d: a })) } } return [] }} fieldProps={{ showSearch: true, onChange: (value) => { formRef.current?.setFieldValue('targetValue', ''); } }} /> ) } } { const resp = await getProjects(); if (resp) { return resp.map((a: any) => ({ label: a.name, value: a.code, d: a })) } return [] }} fieldProps={{ labelInValue: true, onChange: (value) => { const { d: { distributionTypeName } } = value; formRef.current?.setFieldValue('distributionTypeName', distributionTypeName); } }} /> { ({ assessmentCode }) => { return ( ) } } { ({ unitCode, distributionTypeName }) => { return ( { if (unitCode) { const resp = await getEmps(unitCode); if (resp) { return resp.map((a: any) => ({ label: a.name, value: a.userId, d: a })) } } return [] }} /> ) } } ) } ) } <> { (
checkHandle(`${auditType}`)}>{auditType == '0' ? '审核' : '取消审核'}
{/*
点击检查 是否有未对照的人员信息、未对照的科室信息及未设置的收费项目信息
*/} { currentSelectedTabKey == '1' && (
科室名称: { set_tableDataSearchKeywords(e.target.value); if (e.target.value.length == 0) { set_tableDataFilterParams({ ...tableDataFilterParams, deptName: '' }); } }} suffix={ tableDataSearchHandle('deptName')} /> } />
auditType == '0' ? set_ifShowTip(false) : set_ifShowTip(true)} onMouseLeave={() => set_ifShowTip(false)} > {/* 调整 */} {/* generateFunc()}>获取 */} {importData(1, '固定工资')}
{currentComputeDate && { return (
{ editTableCellId == record.id ? { set_inputSalaryNum(Number(e.target.value)) }} style={{ width: '80px' }} /> : {text} }
{auditType == '0' && editHandle(record)} style={{ width: 16, height: 16, cursor: 'pointer', marginLeft: 8 }} src={editTableCellId == record.id ? conformIcon : editIcon} alt="" />}
) } }, { title: '操作', key: 'option', valueType: 'option', render: (_: any, record) => [ delActionHandle(record, 1)} // onCancel={()=>{}} okText="是" cancelText="否" > 删除 ], },] : [ ...tableColumn, { title: '金额', dataIndex: 'salary', key: 'salary', align: 'center', width: '10%', // shouldCellUpdate:(record:any, prevRecord:any) => true, render: (text: any, record: any) => { return (
{ editTableCellId == record.id ? { set_inputSalaryNum(Number(e.target.value)) }} style={{ width: '80px' }} /> : {text} }
{auditType == '0' && editHandle(record)} style={{ width: 16, height: 16, cursor: 'pointer', marginLeft: 8 }} src={editTableCellId == record.id ? conformIcon : editIcon} alt="" />}
) } }, ]} request={(params, sort, filter) => getTableData('1', params, sort, filter)} />}
) } { currentSelectedTabKey == '2' && (
科室名称: { set_tableDataSearchKeywords(e.target.value); if (e.target.value.length == 0) { set_tableDataFilterParams({ ...tableDataFilterParams, deptName: '' }); } }} suffix={ tableDataSearchHandle('deptName')} /> } />
auditType == '0' ? set_ifShowTip(false) : set_ifShowTip(true)} onMouseLeave={() => set_ifShowTip(false)} > {/* generateFunc(2)} >获取 导入 */} {importData(2, '非考核项目')} tableDataAddHandle() : () => { }}>添加
{currentComputeDate && [ tableEditActHandle(record)}>编辑, , delActionHandle(record, 2)} // onCancel={()=>{}} okText="是" cancelText="否" > 删除 ], }] : [...tableColumn]} request={(params, sort, filter) => getTableData('2', params, sort, filter)} />}
) } { currentSelectedTabKey == '3' && (
} />
{ treeData && treeData.length > 0 && currentSelectedTreeNode && ( null} titleRender={ (nodeData: any) => { const strTitle = nodeData.name as string; const index = strTitle.indexOf(searchValue); const beforeStr = strTitle.substring(0, index); const afterStr = strTitle.slice(index + searchValue.length); const title = index > -1 ? ( {beforeStr} {searchValue} {afterStr} ) : ( {strTitle} ); return
{title}
} } defaultSelectedKeys={[treeData[0].child[0].code]} treeData={treeData as unknown as DataNode[]} // treeData={treeDataNew} switcherIcon={(props: any) => { const { expanded } = props; return !expanded ? : }} /> ) }
{/*
类型: { set_tableDataSearchKeywords(e.target.value); if (e.target.value.length == 0) { set_tableDataFilterParams({ ...tableDataFilterParams, itemType: '' }); } }} suffix={ tableDataSearchHandle('itemType')} /> } />
*/}
项目名称: { set_tableDataSearchKeywords(e.target.value); if (e.target.value.length == 0) { set_tableDataFilterParams({ ...tableDataFilterParams, itemName: '' }); } }} suffix={ tableDataSearchHandle('itemName')} /> } />
auditType == '0' ? set_ifShowTip(false) : set_ifShowTip(true)} onMouseLeave={() => set_ifShowTip(false)} > generateFunc(3, true) : () => { }}>获取单个 generateFunc(3) : () => { }}>获取所有
{currentComputeDate && { return (
{ editTableCellId == record.id ? { set_checkItemvalNum(Number(e.target.value)) }} style={{ width: '80px' }} /> : {text} }
editCheckItemValHandle(record)} style={{ width: 16, height: 16, cursor: 'pointer', marginLeft: 8 }} src={editTableCellId == record.id ? conformIcon : editIcon} alt="" />
) } }, { title: '操作', key: 'option', valueType: 'option', render: (_: any, record: any) => [ delActionHandle(record, 3)} // onCancel={()=>{}} okText="是" cancelText="否" > 删除 ], }] : [ ...tableColumn, { title: '数值', dataIndex: 'value', key: 'value', align: 'center' } ]} request={(params, sort, filter) => getTableData('3', params, sort, filter)} />}
) } { currentSelectedTabKey == '4' && (
{ manaIndexGroups.map((item, index) => { return (
onManaIndexGroupClick(item)}>{item.groupName}
) }) }
{/* 核算单元名称: { set_tableDataSearchKeywords(e.target.value); if (e.target.value.length == 0) { set_tableDataFilterParams({ ...tableDataFilterParams, unitName: '' }); } }} suffix={ tableDataSearchHandle()} /> } /> */}
auditType == '0' ? set_ifShowTip(false) : set_ifShowTip(true)} onMouseLeave={() => set_ifShowTip(false)} > {/* 获取 */} {importData(4, '管理指标')}
{currentComputeDate && tableColumn && 'BMS-ManaIndextable-row'} bordered actionRef={tableRef} scroll={{ x: (100 * (tableColumn.length - 2)) + 120 + 100,y:tableH}} rowKey='unitCode' columns={auditType == '0' ? [...tableColumn, { title: '操作', key: 'option', valueType: 'option', width: 100, align: 'center', fixed: 'right', render: (_: any, record: any) => [ ], }] : [...tableColumn]} pagination={false} params={tableDataFilterParams} request={(params, sort, filter) => getTableData('4', params, sort, filter)} />}
) } { currentSelectedTabKey == '5' && (
项目名称: { set_tableDataSearchKeywords(e.target.value); if (e.target.value.length == 0) { set_tableDataFilterParams({ ...tableDataFilterParams, itemName: '' }); } }} suffix={ tableDataSearchHandle('itemName')} /> } />
auditType == '0' ? set_ifShowTip(false) : set_ifShowTip(true)} onMouseLeave={() => set_ifShowTip(false)} > {/* 获取 */} {importData(5, '收入')}
{currentComputeDate && getTableData('5', params, sort, filter)} />}
合计:{totalNum}
) } { currentSelectedTabKey == '6' && (
项目名称: { set_tableDataSearchKeywords(e.target.value); if (e.target.value.length == 0) { set_tableDataFilterParams({ ...tableDataFilterParams, itemName: '' }); } }} suffix={ tableDataSearchHandle('itemName')} /> } />
auditType == '0' ? set_ifShowTip(false) : set_ifShowTip(true)} onMouseLeave={() => set_ifShowTip(false)} > {/* 获取 */} {importData(6, '成本')}
{currentComputeDate && getTableData('6', params, sort, filter)} />}
合计:{totalNum}
) }
) }
); }; export default MonthlyDataCheck;