Эх сурвалжийг харах

添加一次分配相关功能&禁用项添加提示

code4eat 2 жил өмнө
parent
commit
c5edda505e

+ 4 - 7
src/app.tsx

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2022-12-14 14:14:32
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-02-16 19:29:37
+ * @LastEditTime: 2023-02-20 15:42:53
  * @FilePath: /BudgetManaSystem/src/app.ts
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -69,7 +69,7 @@ export const request: RequestConfig = {
     errorThrower: (res: ResponseStructure) => {
       const { success, data, errorCode, errorMessage, showType } = res;
 
-      console.log({success, data, errorCode, errorMessage, showType});
+      //console.log({success, data, errorCode, errorMessage, showType});
 
       if (!success) {
         const error: any = new Error(errorMessage);
@@ -144,8 +144,6 @@ export const request: RequestConfig = {
       // 拦截响应数据,进行个性化处理
       const { status, data: { success, status:code,errorMessage,data:respData }, config: { method } } = response;
 
-      console.log({response});
-      
       try {
 
         if (status == 200) {
@@ -162,7 +160,7 @@ export const request: RequestConfig = {
             }else{
               notification.error({
                  
-                 message:'出现错误!',
+                 message:'',
                  description:errorMessage,
                  placement:'topRight',
                  icon:<></>
@@ -179,8 +177,7 @@ export const request: RequestConfig = {
               }else{
                 
                 notification.error({
-                   
-                  message:'出现错误!',
+                  message:'',
                   description:errorMessage,
                   placement:'topRight',
                   icon:<></>

+ 2 - 2
src/components/BMSTable/index.tsx

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2022-12-20 15:24:11
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-02-07 17:59:02
+ * @LastEditTime: 2023-02-20 15:51:33
  * @FilePath: /BudgetManaSystem/src/components/BMSTable/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -24,7 +24,7 @@ export const BMSTable = (props: BMSTablePropsType<any, any, any>) => {
             toolBarRender={false}
             options={false}
             pagination={{
-                pageSize:10
+                defaultPageSize:10
             }}
             bordered={false}
             search={false}

+ 14 - 6
src/components/BMSUpload/index.tsx

@@ -2,17 +2,17 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2023-02-15 16:48:56
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-02-16 16:26:35
+ * @LastEditTime: 2023-02-23 15:37:20
  * @FilePath: /BudgetManaSystem/src/components/BMSUpload/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
 
 
 
-import React from 'react';
+import React, { useState } from 'react';
 import { InboxOutlined } from '@ant-design/icons';
-import type { UploadProps } from 'antd';
-import { message, Upload } from 'antd';
+import type { UploadFile, UploadProps } from 'antd';
+import { Upload } from 'antd';
 
 const { Dragger } = Upload;
 
@@ -21,13 +21,21 @@ type BMSUploadPropsType = {
 }|UploadProps
 
 const BMSUpload = (props:BMSUploadPropsType) => {
-
+    const [fileList, setFileList] = useState<UploadFile[]>([]);
     const {onChange} = props;
 
     const config:UploadProps  = {
+        action:()=>Promise.resolve(''),
         name: 'file',
         multiple: false,
-        onChange:onChange?onChange:()=>{},
+        beforeUpload: (file) => {
+            setFileList([...fileList, file]);
+            return false;
+        },
+        //onChange:onChange?onChange:()=>{},
+        onChange:(fileInfo)=>{
+            onChange&&onChange(fileInfo);
+        },
         onDrop(e) {
             console.log('Dropped files', e.dataTransfer.files);
         },

+ 4 - 0
src/global.less

@@ -252,6 +252,10 @@ textarea {
 .bms-ant-picker-disabled {
     background: #F0F2F5 !important;
     border: 1px solid #DADEE6 !important;
+
+    .anticon-swap-right,.anticon-calendar {
+        color:#7A8599 !important ;
+    }
 }
 
 

+ 2 - 2
src/pages/Home/style.less

@@ -219,7 +219,7 @@
           display: box;
           -webkit-box-orient: vertical;
           -webkit-line-clamp: 2;
-
+          
           /* 这里是超出几行省略 */
           overflow: hidden;
 
@@ -256,7 +256,7 @@
     background-position: center;
 
     &>img {
-    
+        
     }
   }
 }

+ 553 - 512
src/pages/budgetMana/monthlyDataCheck/index.tsx

@@ -4,7 +4,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2022-12-16 09:42:52
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-02-17 11:24:35
+ * @LastEditTime: 2023-03-01 16:35:45
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlySet/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -16,7 +16,7 @@ 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 } from 'antd';
+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';
@@ -36,6 +36,9 @@ 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({
@@ -54,6 +57,7 @@ const MonthlyDataCheck: React.FC = () => {
 
     const [treeData, set_treeData] = useState<getTreeDataRespType[]>([]);
 
+    const [ifShowTip, set_ifShowTip] = useState(false);
 
     const [expandedKeys, setExpandedKeys] = useState<React.Key[]>([]);
     const [searchValue, setSearchValue] = useState('');
@@ -74,6 +78,8 @@ const MonthlyDataCheck: React.FC = () => {
 
     const [editModalVisible, set_editModalVisible] = useState(false);
 
+    const [loading, set_loading] = useState(false);
+
     const [currentEditRecord, set_currentEditRecord] = useState<undefined | any>(undefined);
 
     const [inputSalaryNum, set_inputSalaryNum] = useState(0);  //固定工资金额
@@ -82,6 +88,8 @@ const MonthlyDataCheck: React.FC = () => {
 
     const [isTableEdit, set_isTableEdit] = useState(false);
 
+    const [totalNum, set_totalNum] = 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 }>();
 
@@ -205,7 +213,7 @@ const MonthlyDataCheck: React.FC = () => {
             dataIndex: 'itemTypeName',
             key: 'itemTypeName',
             align: 'center',
-            
+
         },
         {
             title: '点值',
@@ -215,8 +223,6 @@ const MonthlyDataCheck: React.FC = () => {
         },
     ];
 
-
-
     const tableColumnFive = [
         {
             title: '年度',
@@ -238,45 +244,41 @@ const MonthlyDataCheck: React.FC = () => {
         },
         {
             title: '项目类型',
-            dataIndex: 'itemType',
-            key: 'itemType',
+            dataIndex: 'itemTypeName',
+            key: 'itemTypeName',
             align: 'center'
         },
         {
             title: '金额',
-            dataIndex: 'income',
-            key: 'income',
-            align: 'center'
-        },
-        {
-            title: '操作人',
-            dataIndex: 'unitType',
-            key: 'unitType',
-            align: 'center'
-        },
-        {
-            title: '操作时间',
-            dataIndex: 'unitType',
-            key: 'unitType',
+            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);
-       
-        
-    
+
     };
 
 
@@ -288,13 +290,13 @@ const MonthlyDataCheck: React.FC = () => {
 
     //固定金额编辑金额
     const editHandle = async (record: any) => {
-        const { id, deptCode, salaryType, unitCode,userId } = record;
+        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,
@@ -484,7 +486,7 @@ const MonthlyDataCheck: React.FC = () => {
                     if (resp) {
                         const columns = resp.title.map((item: any) => (item.children ? {
                             title: () => {
-                                return <div>{item.name} <span style={{ fontSize: 14, fontFamily: 'SourceHanSansCN-Medium, SourceHanSansCN', fontWeight: 500, color: item.arrow == 'up' ? '#00BF8F' : '#FF4060' }}>{item.arrow == 'up'?'↑':'↓'}</span></div>
+                                return <div>{item.name} <span style={{ fontSize: 14, fontFamily: 'SourceHanSansCN-Medium, SourceHanSansCN', fontWeight: 500, color: item.arrow == 'up' ? '#00BF8F' : '#FF4060' }}>{item.arrow == 'up' ? '↑' : '↓'}</span></div>
                             },
                             key: item.code,
                             dataIndex: item.name,
@@ -561,12 +563,13 @@ const MonthlyDataCheck: React.FC = () => {
                     ...params
                 });
                 if (resp) {
+                    set_totalNum(resp.sum);
                     return {
-                        data: resp.list,
+                        data: resp.pageList.list,
                         success: true,
-                        total: resp.totalCount,
-                        pageSize: resp.pageSize,
-                        totalPage: resp.totalPage,
+                        total: resp.pageList.totalCount,
+                        pageSize: resp.pageList.pageSize,
+                        totalPage: resp.pageList.totalPage,
                     }
                 }
             }
@@ -576,12 +579,13 @@ const MonthlyDataCheck: React.FC = () => {
                     ...params
                 });
                 if (resp) {
+                    set_totalNum(resp.sum);
                     return {
-                        data: resp.list,
+                        data: resp.pageList.list,
                         success: true,
-                        total: resp.totalCount,
-                        pageSize: resp.pageSize,
-                        totalPage: resp.totalPage,
+                        total: resp.pageList.totalCount,
+                        pageSize: resp.pageList.pageSize,
+                        totalPage: resp.pageList.totalPage,
                     }
                 }
             }
@@ -668,16 +672,6 @@ const MonthlyDataCheck: React.FC = () => {
         )
     }
 
-    const addPersonFunc = () => {
-        Modal.confirm({
-            title: '注意',
-            width: 800,
-            content: <TransferNode></TransferNode>,
-            onOk: () => {
-
-            }
-        })
-    }
 
     //获取核算单元树结构
     const getCheckUnitTreeDataFunc = async (computeDate: string) => {
@@ -689,6 +683,7 @@ const MonthlyDataCheck: React.FC = () => {
 
 
 
+
     const dataList: any[] = [];
 
     const generateList = (data: getTreeDataRespType[]) => {
@@ -745,6 +740,9 @@ const MonthlyDataCheck: React.FC = () => {
                 computeDate: currentComputeDate as string,
                 unitCode: others ? currentSelectedTreeNode.code : ''
             });
+
+            set_loading(false);
+
             if (resp) {
                 tableRef.current?.reload();
             }
@@ -763,7 +761,7 @@ const MonthlyDataCheck: React.FC = () => {
                 cancelText: '',
                 closable: true,
                 content: others ? '获取单个操作会覆盖上次获取的该核算单元的数据,确定要继续操作?' : '获取所有操作会覆盖所有已获取的数据,确定要继续操作?',
-                onOk: () => { confirmGenerateHandle(index, others ? others : false) }
+                onOk: () => { set_loading(true); confirmGenerateHandle(index, others ? others : false) }
             })
         }
 
@@ -902,28 +900,44 @@ const MonthlyDataCheck: React.FC = () => {
     }
 
     const importData = (index: number, name: string) => {
-    
+
         return (
             <ModalForm
                 title={`导入${name}数据`}
                 trigger={
                     <span key="3">导入</span>
                 }
+                submitter={{
+                    render: (props, defaultDoms) => {
+                        const needBtn = defaultDoms.filter((b) => {
+                            return b.key != 'rest'
+                        })
+                        return [
+                            <Button
+                                key="ok"
+                                onClick={auditType == '0' ? () => downloadTemplate(index) : () => { }}
+                            >
+                                下载模板
+                            </Button>,
+                            ...needBtn,
+                        ];
+                    },
+                }}
                 onFinish={async (values) => {
-                
-                    const {importFile:{file:{originFileObj}}} = values;
+                    // console.log({values});
+                    const { importFile: { fileList } } = values;
 
                     let formData = new FormData();
-                    formData.append('file', originFileObj);
+                    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 resp = await importMonthlyperformanceRelaFiles(index, formData);
+
+                    if (resp) {
+                        tableRef.current?.reload();
+                        return true;
                     }
-                
+
                 }}
             >
                 <FormItem name={'importFile'}>
@@ -961,10 +975,10 @@ const MonthlyDataCheck: React.FC = () => {
         }
     }
 
-    const downloadTemplate = async (index:number,id?:number)=>{
-    
-          const resp  = await downloadTemplateReq(index,id);
-          
+    const downloadTemplate = async (index: number, id?: number) => {
+
+        await downloadTemplateReq(index, id);
+
     }
 
 
@@ -977,7 +991,7 @@ const MonthlyDataCheck: React.FC = () => {
     }, [currentSelectedManaGroup])
 
     useEffect(() => {
-        tableRef.current?.reloadAndRest&&tableRef.current?.reloadAndRest();
+        tableRef.current?.reloadAndRest && tableRef.current?.reloadAndRest();
     }, [currentSelectedTreeNode]);
 
     useEffect(() => {
@@ -999,14 +1013,6 @@ const MonthlyDataCheck: React.FC = () => {
         }
         if (currentSelectedTabKey == '4') {
             getManaIndiGroupRequest();   //获取分组
-            // set_tableColumn([{
-            //     title: '核算单元',
-            //     dataIndex: 'unitName',
-            //     key: 'unitName',
-            //     align: 'center',
-            //     width: 120,
-            //     fixed: 'left',
-            // }]);
         }
         if (currentSelectedTabKey == '5') {
             set_tableColumn(tableColumnFive as ProColumns[]);
@@ -1024,8 +1030,9 @@ const MonthlyDataCheck: React.FC = () => {
         if (treeData?.length > 0) {
 
             if (treeData[0].child && treeData[0].child.length > 0) {
-                set_currentSelectedTreeNode(treeData[0].child[0]);
-                setExpandedKeys([treeData[0].code]);
+                const [node, nodeParent] = getDeepestTreeData(treeData[0], 'child');
+                set_currentSelectedTreeNode(node);
+                setExpandedKeys([nodeParent.code]);
             }
         }
     }, [treeData]);
@@ -1090,7 +1097,7 @@ const MonthlyDataCheck: React.FC = () => {
                                                 return []
                                             }}
                                             fieldProps={{
-
+                                                showSearch: true,
                                                 onChange: (value) => {
                                                     formRef.current?.setFieldValue('unitCode', '');
                                                 }
@@ -1123,7 +1130,7 @@ const MonthlyDataCheck: React.FC = () => {
                                                                 return []
                                                             }}
                                                             fieldProps={{
-
+                                                                showSearch: true,
                                                                 onChange: (value) => {
 
                                                                     formRef.current?.setFieldValue('targetValue', '');
@@ -1174,18 +1181,21 @@ const MonthlyDataCheck: React.FC = () => {
                                     </ProForm.Group>
                                     <ProForm.Group>
                                         <ProFormDigit label="数值" name="value" colProps={{ span: 12 }} min={-1000000000000000} />
-                                        <ProFormDependency name={['unitCode','distributionTypeName']}>
+                                        <ProFormDependency name={['unitCode', 'distributionTypeName']}>
                                             {
-                                                ({ unitCode,distributionTypeName }) => {
-                                                
-                                                    return  (
+                                                ({ unitCode, distributionTypeName }) => {
+
+                                                    return (
                                                         <ProFormSelect
                                                             name="userId"
                                                             label="人员姓名"
                                                             colProps={{ span: 12 }}
                                                             placeholder="请选择"
-                                                            rules={[{ required:distributionTypeName != '占比'?true:false }]}
+                                                            rules={[{ required: distributionTypeName != '占比' ? true : false }]}
                                                             params={unitCode}
+                                                            fieldProps={{
+                                                                showSearch: true,
+                                                            }}
                                                             request={async () => {
                                                                 if (unitCode) {
                                                                     const resp = await getEmps(unitCode);
@@ -1222,460 +1232,491 @@ const MonthlyDataCheck: React.FC = () => {
 
             }
 
-            <div className='rightContent'>
-                <BMSPagecontainer title={`核算年月:${currentComputeDate}`} ghost>
-                    <div className='checkBtn' onClick={() => checkHandle(`${auditType}`)}>{auditType == '0' ? '审核' : '取消审核'}</div>
-                    {/* <div className='midLine'>
-                        <span>点击检查</span>
-                        是否有未对照的人员信息、未对照的科室信息及未设置的收费项目信息
-                    </div> */}
-                    <Tabs
-                        defaultActiveKey="1"
-                        onChange={onTabChange}
-                        items={[
-                            {
-                                label: `固定工资`,
-                                key: '1',
-                            },
-                            {
-                                label: `非考核项目`,
-                                key: '2',
-                            },
-                            {
-                                label: `考核项目`,
-                                key: '3',
-                            },
-                            {
-                                label: `管理指标`,
-                                key: '4',
-                            },
-                            {
-                                label: `收入数据`,
-                                key: '5',
-                            },
-                            {
-                                label: `成本数据`,
-                                key: '6',
-                            },
-                        ]}
-                    />
-
-                    {
-                        currentSelectedTabKey == '1' && (
-                            <div className='tabContent'>
-                                <div className='tableToolbar'>
-                                    <div className='filter'>
-                                        <div className='search'>
-                                            <span>科室名称:</span><Input className='searchInput' allowClear placeholder="请输入" onChange={(e) => {
-                                                set_tableDataSearchKeywords(e.target.value);
-                                                if (e.target.value.length == 0) {
-                                                    set_tableDataFilterParams({
-                                                        ...tableDataFilterParams,
-                                                        deptName: ''
-                                                    });
-                                                }
-                                            }} suffix={
-                                                <IconFont type="iconsousuo" onClick={() => tableDataSearchHandle('deptName')} />
-                                            } />
-                                        </div>
-                                    </div>
-                                    <div className={auditType == '1' ? 'btnGroup disabled' : 'btnGroup'}>
-                                        {/* <span key="1">调整</span> */}
-                                        {/* <span key="2" onClick={() => generateFunc()}>获取</span> */}
-                                        <span key="download" onClick={auditType == '0'?() =>downloadTemplate(1):()=>{}}>下载模板</span>
-                                        {importData(1, '固定工资')}
-                                    </div>
-                                </div>
-                                {currentComputeDate && <BMSTable actionRef={tableRef} params={tableDataFilterParams} rowKey='id'
-                                    columns={auditType == '0' ? [...tableColumn, {
-                                        title: '金额',
-                                        dataIndex: 'salary',
-                                        key: 'salary',
-                                        align: 'center',
-                                        width: '10%',
-                                        render: (text: any, record: any) => {
-
-                                            return (
-                                                <div style={{ display: 'flex', flexDirection: 'row', width: '100%', justifyContent: 'center', alignItems: 'center' }}>
-
-                                                    <div style={{ width: '80px', height: 16, display: 'flex', flexDirection: 'row', justifyContent: 'center', alignItems: 'center' }}>
-                                                        {
-                                                            editTableCellId == record.id ? <Input size='small' defaultValue={record.salary} placeholder='请输入' onChange={(e) => { set_inputSalaryNum(Number(e.target.value)) }} style={{ width: '80px' }} /> : <span>{text}</span>
-                                                        }
+            <>
+                {
+                    (
+                        <div className='rightContent'>
+                            <BMSPagecontainer title={`核算年月:${currentComputeDate}`} ghost>
+                                <div className='checkBtn' onClick={() => checkHandle(`${auditType}`)}>{auditType == '0' ? '审核' : '取消审核'}</div>
+                                {/* <div className='midLine'>
+                            <span>点击检查</span>
+                            是否有未对照的人员信息、未对照的科室信息及未设置的收费项目信息
+                        </div> */}
+                                <Tabs
+                                    defaultActiveKey="1"
+                                    onChange={onTabChange}
+                                    items={[
+                                        {
+                                            label: `固定工资`,
+                                            key: '1',
+                                        },
+                                        {
+                                            label: `非考核项目`,
+                                            key: '2',
+                                        },
+                                        {
+                                            label: `考核项目`,
+                                            key: '3',
+                                        },
+                                        {
+                                            label: `管理指标`,
+                                            key: '4',
+                                        },
+                                        {
+                                            label: `收入数据`,
+                                            key: '5',
+                                        },
+                                        {
+                                            label: `成本数据`,
+                                            key: '6',
+                                        },
+                                    ]}
+                                />
+
+                                {
+                                    currentSelectedTabKey == '1' && (
+                                        <div className='tabContent'>
+                                            <div className='tableToolbar'>
+                                                <div className='filter'>
+                                                    <div className='search'>
+                                                        <span>科室名称:</span><Input className='searchInput' allowClear placeholder="请输入" onChange={(e) => {
+                                                            set_tableDataSearchKeywords(e.target.value);
+                                                            if (e.target.value.length == 0) {
+                                                                set_tableDataFilterParams({
+                                                                    ...tableDataFilterParams,
+                                                                    deptName: ''
+                                                                });
+                                                            }
+                                                        }} suffix={
+                                                            <IconFont type="iconsousuo" onClick={() => tableDataSearchHandle('deptName')} />
+                                                        } />
                                                     </div>
-                                                    {auditType == '0' && <img onClick={() => editHandle(record)} style={{ width: 16, height: 16, cursor: 'pointer', marginLeft: 8 }} src={editTableCellId == record.id ? conformIcon : editIcon} alt="" />}
                                                 </div>
-                                            )
-                                        }
-                                    },
-
-                                    {
-                                        title: '操作',
-                                        key: 'option',
-                                        valueType: 'option',
-                                        render: (_: any, record) => [
-                                            <Popconfirm
-                                                key={'del'}
-                                                title="是否确认删除?"
-                                                onConfirm={() => delActionHandle(record, 1)}
-                                                // onCancel={()=>{}}
-                                                okText="是"
-                                                cancelText="否"
-                                            >
-                                                <a >删除</a>
-                                            </Popconfirm>
-                                        ],
-                                    },] : [
-
-                                        ...tableColumn, {
-                                            title: '金额',
-                                            dataIndex: 'salary',
-                                            key: 'salary',
-                                            align: 'center',
-                                            width: '10%',
-                                            // shouldCellUpdate:(record:any, prevRecord:any) => true,
-                                            render: (text: any, record: any) => {
-
-                                                return (
-                                                    <div style={{ display: 'flex', flexDirection: 'row', width: '100%', justifyContent: 'center', alignItems: 'center' }}>
-
-                                                        <div style={{ width: '80px', height: 16, display: 'flex', flexDirection: 'row', justifyContent: 'center', alignItems: 'center' }}>
-                                                            {
-                                                                editTableCellId == record.id ? <Input size='small' defaultValue={record.salary} placeholder='请输入' onChange={(e) => { set_inputSalaryNum(Number(e.target.value)) }} style={{ width: '80px' }} /> : <span>{text}</span>
-                                                            }
-                                                        </div>
-                                                        {auditType == '0' && <img onClick={() => editHandle(record)} style={{ width: 16, height: 16, cursor: 'pointer', marginLeft: 8 }} src={editTableCellId == record.id ? conformIcon : editIcon} alt="" />}
+                                                <Popover open={ifShowTip} content={'当前处于审核中,无法操作!'} placement='topRight'>
+                                                    <div className={auditType == '1' ? 'btnGroup disabled' : 'btnGroup'}
+                                                        onMouseEnter={() => auditType == '0' ? set_ifShowTip(false) : set_ifShowTip(true)}
+                                                        onMouseLeave={() => set_ifShowTip(false)}
+                                                    >
+                                                        {/* <span key="1">调整</span> */}
+                                                        {/* <span key="2" onClick={() => generateFunc()}>获取</span> */}
+                                                        {importData(1, '固定工资')}
                                                     </div>
-                                                )
-                                            }
-                                        },
-
-                                    ]} request={(params, sort, filter) => getTableData('1', params, sort, filter)} />}
-                            </div>
-                        )
-                    }
-
+                                                </Popover>
+                                            </div>
+                                            {currentComputeDate && <BMSTable actionRef={tableRef} params={tableDataFilterParams} rowKey='id'
+                                                columns={auditType == '0' ? [...tableColumn, {
+                                                    title: '金额',
+                                                    dataIndex: 'salary',
+                                                    key: 'salary',
+                                                    align: 'center',
+                                                    width: '10%',
+                                                    render: (text: any, record: any) => {
+
+                                                        return (
+                                                            <div style={{ display: 'flex', flexDirection: 'row', width: '100%', justifyContent: 'center', alignItems: 'center' }}>
+
+                                                                <div style={{ width: '80px', height: 16, display: 'flex', flexDirection: 'row', justifyContent: 'center', alignItems: 'center' }}>
+                                                                    {
+                                                                        editTableCellId == record.id ? <Input size='small' defaultValue={record.salary} placeholder='请输入' onChange={(e) => { set_inputSalaryNum(Number(e.target.value)) }} style={{ width: '80px' }} /> : <span>{text}</span>
+                                                                    }
+                                                                </div>
+                                                                {auditType == '0' && <img onClick={() => editHandle(record)} style={{ width: 16, height: 16, cursor: 'pointer', marginLeft: 8 }} src={editTableCellId == record.id ? conformIcon : editIcon} alt="" />}
+                                                            </div>
+                                                        )
+                                                    }
+                                                },
+
+                                                {
+                                                    title: '操作',
+                                                    key: 'option',
+                                                    valueType: 'option',
+                                                    render: (_: any, record) => [
+                                                        <Popconfirm
+                                                            key={'del'}
+                                                            title="是否确认删除?"
+                                                            onConfirm={() => delActionHandle(record, 1)}
+                                                            // onCancel={()=>{}}
+                                                            okText="是"
+                                                            cancelText="否"
+                                                        >
+                                                            <a >删除</a>
+                                                        </Popconfirm>
+                                                    ],
+                                                },] : [
+
+                                                    ...tableColumn, {
+                                                        title: '金额',
+                                                        dataIndex: 'salary',
+                                                        key: 'salary',
+                                                        align: 'center',
+                                                        width: '10%',
+                                                        // shouldCellUpdate:(record:any, prevRecord:any) => true,
+                                                        render: (text: any, record: any) => {
+
+                                                            return (
+                                                                <div style={{ display: 'flex', flexDirection: 'row', width: '100%', justifyContent: 'center', alignItems: 'center' }}>
+
+                                                                    <div style={{ width: '80px', height: 16, display: 'flex', flexDirection: 'row', justifyContent: 'center', alignItems: 'center' }}>
+                                                                        {
+                                                                            editTableCellId == record.id ? <Input size='small' defaultValue={record.salary} placeholder='请输入' onChange={(e) => { set_inputSalaryNum(Number(e.target.value)) }} style={{ width: '80px' }} /> : <span>{text}</span>
+                                                                        }
+                                                                    </div>
+                                                                    {auditType == '0' && <img onClick={() => editHandle(record)} style={{ width: 16, height: 16, cursor: 'pointer', marginLeft: 8 }} src={editTableCellId == record.id ? conformIcon : editIcon} alt="" />}
+                                                                </div>
+                                                            )
+                                                        }
+                                                    },
 
-                    {
-                        currentSelectedTabKey == '2' && (
-                            <div className='tabContent'>
-                                <div className='tableToolbar'>
-                                    <div className='filter'>
-                                        <div className='search'>
-                                            <span>科室名称:</span><Input className='searchInput' allowClear placeholder="请输入" onChange={(e) => {
-                                                set_tableDataSearchKeywords(e.target.value);
-                                                if (e.target.value.length == 0) {
-                                                    set_tableDataFilterParams({
-                                                        ...tableDataFilterParams,
-                                                        deptName: ''
-                                                    });
-                                                }
-                                            }} suffix={
-                                                <IconFont type="iconsousuo" onClick={() => tableDataSearchHandle('deptName')} />
-                                            } />
+                                                ]} request={(params, sort, filter) => getTableData('1', params, sort, filter)} />}
                                         </div>
-                                    </div>
-                                    <div className={auditType == '1' ? 'btnGroup disabled' : 'btnGroup'} >
-                                        {/* <span key="1" onClick={() => generateFunc(2)} >获取</span>
-                                        <span key="2" >导入</span> */}
-                                        <span key="download" onClick={auditType == '0'?() =>downloadTemplate(2):()=>{}}>下载模板</span>
-                                        {importData(2, '非考核项目')}
-                                        <span key="3" onClick={auditType == '0' ? () => tableDataAddHandle() : () => { }}>添加</span>
-                                    </div>
-                                </div>
-                                {currentComputeDate && <BMSTable scroll={{ x: 120 * 10, y: 500 }} actionRef={tableRef} rowKey='id' params={tableDataFilterParams}
-                                    columns={auditType == '0' ? [...tableColumn, {
-                                        title: '操作',
-                                        fixed: 'right',
-                                        key: 'option',
-                                        align: 'center',
-                                        width: 130,
-                                        valueType: 'option',
-                                        render: (_: any, record: any) => [
-                                            <a key={'edit'} onClick={() => tableEditActHandle(record)}>编辑</a>,
-                                            <Divider type='vertical' key='line' />,
-                                            <Popconfirm
-                                                key={'del'}
-                                                title="是否确认删除?"
-                                                onConfirm={() => delActionHandle(record, 2)}
-                                                // onCancel={()=>{}}
-                                                okText="是"
-                                                cancelText="否"
-                                            >
-                                                <a >删除</a>
-                                            </Popconfirm>
-                                        ],
-                                    }] : [...tableColumn]} request={(params, sort, filter) => getTableData('2', params, sort, filter)} />}
-                            </div>
-                        )
-                    }
+                                    )
+                                }
 
-                    {
-                        currentSelectedTabKey == '3' && (
-                            <div className='tabContent'>
 
-                                <div className='tabContentInner'>
-                                    <div className='leftTree'>
-                                        <div className='search'>
-                                            <Input className='searchInput' allowClear onChange={onTreeSearchKeyChange} placeholder="请输入类目名称" suffix={
-                                                <IconFont type="iconsousuo" />
-                                            } />
-                                        </div>
-                                        <div className='treeWrap'>
-                                            {
-                                                treeData && treeData.length > 0 && (
-                                                    <DirectoryTree
-                                                        fieldNames={{ title: 'name', key: 'code', children: 'child' }}
-                                                        rootStyle={{ height: '100%', paddingBottom: 50, overflowY: 'scroll', overflowX: 'hidden' }}
-                                                        onSelect={onSelectHandle}
-                                                        onExpand={onExpand}
-                                                        expandedKeys={expandedKeys}
-                                                        autoExpandParent={autoExpandParent}
-                                                        blockNode={true}
-                                                        icon={() => 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 ? (
-                                                                        <span>
-                                                                            {beforeStr}
-                                                                            <span className="site-tree-search-value" style={{ color: 'red', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{searchValue}</span>
-                                                                            {afterStr}
-                                                                        </span>
-                                                                    ) : (
-                                                                        <span className='strTitle'>{strTitle}</span>
-                                                                    );
-                                                                return <div style={{
-                                                                    display: 'flex', flexDirection: 'row',
-                                                                    width: '100%',
-                                                                    justifyContent: 'flex-start', alignItems: 'center', height: 32,
-                                                                    borderRadius: '4px',
-                                                                    overflow: 'hidden',
-                                                                    color: '#17181A',
-                                                                    textOverflow: 'ellipsis',
-                                                                    whiteSpace: 'nowrap'
-
-                                                                }}>{title}</div>
+                                {
+                                    currentSelectedTabKey == '2' && (
+                                        <div className='tabContent'>
+                                            <div className='tableToolbar'>
+                                                <div className='filter'>
+                                                    <div className='search'>
+                                                        <span>科室名称:</span><Input className='searchInput' allowClear placeholder="请输入" onChange={(e) => {
+                                                            set_tableDataSearchKeywords(e.target.value);
+                                                            if (e.target.value.length == 0) {
+                                                                set_tableDataFilterParams({
+                                                                    ...tableDataFilterParams,
+                                                                    deptName: ''
+                                                                });
                                                             }
-                                                        }
-                                                        defaultSelectedKeys={[treeData[0].child[0].code]}
-                                                        treeData={treeData as unknown as DataNode[]}
-                                                        // treeData={treeDataNew}
-                                                        switcherIcon={(props: any) => {
-                                                            const { expanded } = props;
-                                                            return !expanded ? <img style={{ width: 20, height: 20, position: 'relative', top: 5 }} src={expandedIcon} /> : <img style={{ width: 20, height: 20, position: 'relative', top: 5 }} src={closeIcon} />
-                                                        }}
-                                                    />
-                                                )
-                                            }
-                                        </div>
-                                    </div>
-                                    <div className='rightTable'>
-                                        <div className='tableToolbar'>
-                                            <div className='filter'>
-                                                {/* <div className='search' style={{ marginRight: 24 }}>
-                                                    <span>类型:</span><Input className='searchInput' allowClear placeholder="请输入" onChange={(e) => {
-                                                        set_tableDataSearchKeywords(e.target.value);
-                                                        if (e.target.value.length == 0) {
-                                                            set_tableDataFilterParams({
-                                                                ...tableDataFilterParams,
-                                                                itemType: ''
-                                                            });
-                                                        }
-                                                    }} suffix={
-                                                        <IconFont type="iconsousuo" onClick={() => tableDataSearchHandle('itemType')} />
-                                                    } />
-                                                </div> */}
-                                                <div className='search'>
-                                                    <span>项目名称:</span><Input className='searchInput' allowClear placeholder="请输入" onChange={(e) => {
-                                                        set_tableDataSearchKeywords(e.target.value);
-                                                        if (e.target.value.length == 0) {
-                                                            set_tableDataFilterParams({
-                                                                ...tableDataFilterParams,
-                                                                itemName: ''
-                                                            });
-                                                        }
-                                                    }} suffix={
-                                                        <IconFont type="iconsousuo" onClick={() => tableDataSearchHandle('itemName')} />
-                                                    } />
+                                                        }} suffix={
+                                                            <IconFont type="iconsousuo" onClick={() => tableDataSearchHandle('deptName')} />
+                                                        } />
+                                                    </div>
                                                 </div>
+                                                <Popover open={ifShowTip} content={'当前处于审核中,无法操作!'} >
+                                                    <div className={auditType == '1' ? 'btnGroup disabled' : 'btnGroup'}
+                                                        onMouseEnter={() => auditType == '0' ? set_ifShowTip(false) : set_ifShowTip(true)}
+                                                        onMouseLeave={() => set_ifShowTip(false)}
+                                                    >
+                                                        {/* <span key="1" onClick={() => generateFunc(2)} >获取</span>
+                                            <span key="2" >导入</span> */}
+                                                        {importData(2, '非考核项目')}
+                                                        <span key="3" onClick={auditType == '0' ? () => tableDataAddHandle() : () => { }}>添加</span>
+                                                    </div>
+                                                </Popover>
                                             </div>
-
-                                            <div className={auditType == '1' ? 'btnGroup disabled' : 'btnGroup'}>
-                                                <span key="1" onClick={auditType == '0' ? () => generateFunc(3, true) : () => { }}>获取单个</span>
-                                                <span key="2" onClick={auditType == '0' ? () => generateFunc(3) : () => { }}>获取所有</span>
-                                            </div>
+                                            {currentComputeDate && <BMSTable scroll={{ x: 120 * 10, y: 500 }} actionRef={tableRef} rowKey='id' params={tableDataFilterParams}
+                                                columns={auditType == '0' ? [...tableColumn, {
+                                                    title: '操作',
+                                                    fixed: 'right',
+                                                    key: 'option',
+                                                    align: 'center',
+                                                    width: 130,
+                                                    valueType: 'option',
+                                                    render: (_: any, record: any) => [
+                                                        <a key={'edit'} onClick={() => tableEditActHandle(record)}>编辑</a>,
+                                                        <Divider type='vertical' key='line' />,
+                                                        <Popconfirm
+                                                            key={'del'}
+                                                            title="是否确认删除?"
+                                                            onConfirm={() => delActionHandle(record, 2)}
+                                                            // onCancel={()=>{}}
+                                                            okText="是"
+                                                            cancelText="否"
+                                                        >
+                                                            <a >删除</a>
+                                                        </Popconfirm>
+                                                    ],
+                                                }] : [...tableColumn]} request={(params, sort, filter) => getTableData('2', params, sort, filter)} />}
                                         </div>
-                                        {currentComputeDate && <BMSTable actionRef={tableRef} rowKey='id' params={tableDataFilterParams} columns={auditType == '0' ? [...tableColumn, {
-                                            title: '数值',
-                                            dataIndex: 'value',
-                                            key: 'value',
-                                            align: 'center',
-                                            render: (text: any, record: any) => {
-
-                                                return (
-                                                    <div key={'editCheckitem'} style={{ display: 'flex', flexDirection: 'row', width: '100%', justifyContent: 'center', alignItems: 'center' }}>
-
-                                                        <div style={{ width: '80px', height: 16, display: 'flex', flexDirection: 'row', justifyContent: 'center', alignItems: 'center' }}>
-                                                            {
-                                                                editTableCellId == record.id ? <Input size='small' defaultValue={record.value} placeholder='请输入' onChange={(e) => { set_checkItemvalNum(Number(e.target.value)) }} style={{ width: '80px' }} /> : <span>{text}</span>
+                                    )
+                                }
+
+                                {
+                                    currentSelectedTabKey == '3' && (
+                                        <div className='tabContent'>
+
+                                            <div className='tabContentInner'>
+                                                <div className='leftTree'>
+                                                    <div className='search'>
+                                                        <Input className='searchInput' allowClear onChange={onTreeSearchKeyChange} placeholder="请输入类目名称" suffix={
+                                                            <IconFont type="iconsousuo" />
+                                                        } />
+                                                    </div>
+                                                    <div className='treeWrap'>
+                                                        {
+                                                            treeData && treeData.length > 0 && currentSelectedTreeNode && (
+                                                                <DirectoryTree
+                                                                    fieldNames={{ title: 'name', key: 'code', children: 'child' }}
+                                                                    rootStyle={{ height: '100%', paddingBottom: 50, overflowY: 'scroll', overflowX: 'hidden' }}
+                                                                    onSelect={onSelectHandle}
+                                                                    onExpand={onExpand}
+                                                                    expandedKeys={expandedKeys}
+                                                                    autoExpandParent={autoExpandParent}
+                                                                    selectedKeys={[currentSelectedTreeNode.code]}
+                                                                    blockNode={true}
+                                                                    icon={() => 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 ? (
+                                                                                    <span>
+                                                                                        {beforeStr}
+                                                                                        <span className="site-tree-search-value" style={{ color: 'red', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{searchValue}</span>
+                                                                                        {afterStr}
+                                                                                    </span>
+                                                                                ) : (
+                                                                                    <span className='strTitle'>{strTitle}</span>
+                                                                                );
+                                                                            return <div style={{
+                                                                                display: 'flex', flexDirection: 'row',
+                                                                                width: '100%',
+                                                                                justifyContent: 'flex-start', alignItems: 'center', height: 32,
+                                                                                borderRadius: '4px',
+                                                                                overflow: 'hidden',
+                                                                                color: '#17181A',
+                                                                                textOverflow: 'ellipsis',
+                                                                                whiteSpace: 'nowrap'
+
+                                                                            }}>{title}</div>
+                                                                        }
+                                                                    }
+                                                                    defaultSelectedKeys={[treeData[0].child[0].code]}
+                                                                    treeData={treeData as unknown as DataNode[]}
+                                                                    // treeData={treeDataNew}
+                                                                    switcherIcon={(props: any) => {
+                                                                        const { expanded } = props;
+                                                                        return !expanded ? <img style={{ width: 20, height: 20, position: 'relative', top: 5 }} src={expandedIcon} /> : <img style={{ width: 20, height: 20, position: 'relative', top: 5 }} src={closeIcon} />
+                                                                    }}
+                                                                />
+                                                            )
+                                                        }
+                                                    </div>
+                                                </div>
+                                                <div className='rightTable'>
+                                                    <div className='tableToolbar'>
+                                                        <div className='filter'>
+                                                            {/* <div className='search' style={{ marginRight: 24 }}>
+                                                        <span>类型:</span><Input className='searchInput' allowClear placeholder="请输入" onChange={(e) => {
+                                                            set_tableDataSearchKeywords(e.target.value);
+                                                            if (e.target.value.length == 0) {
+                                                                set_tableDataFilterParams({
+                                                                    ...tableDataFilterParams,
+                                                                    itemType: ''
+                                                                });
                                                             }
+                                                        }} suffix={
+                                                            <IconFont type="iconsousuo" onClick={() => tableDataSearchHandle('itemType')} />
+                                                        } />
+                                                    </div> */}
+                                                            <div className='search'>
+                                                                <span>项目名称:</span><Input className='searchInput' allowClear placeholder="请输入" onChange={(e) => {
+                                                                    set_tableDataSearchKeywords(e.target.value);
+                                                                    if (e.target.value.length == 0) {
+                                                                        set_tableDataFilterParams({
+                                                                            ...tableDataFilterParams,
+                                                                            itemName: ''
+                                                                        });
+                                                                    }
+                                                                }} suffix={
+                                                                    <IconFont type="iconsousuo" onClick={() => tableDataSearchHandle('itemName')} />
+                                                                } />
+                                                            </div>
                                                         </div>
-                                                        <img onClick={() => editCheckItemValHandle(record)} style={{ width: 16, height: 16, cursor: 'pointer', marginLeft: 8 }} src={editTableCellId == record.id ? conformIcon : editIcon} alt="" />
+                                                        <Popover open={ifShowTip} content={'当前处于审核中,无法操作!'} >
+                                                            <div className={auditType == '1' ? 'btnGroup disabled' : 'btnGroup'}
+                                                                onMouseEnter={() => auditType == '0' ? set_ifShowTip(false) : set_ifShowTip(true)}
+                                                                onMouseLeave={() => set_ifShowTip(false)}
+                                                            >
+                                                                <span key="1" onClick={auditType == '0' ? () => generateFunc(3, true) : () => { }}>获取单个</span>
+                                                                <span key="2" onClick={auditType == '0' ? () => generateFunc(3) : () => { }}>获取所有</span>
+                                                            </div>
+                                                        </Popover>
                                                     </div>
-                                                )
-                                            }
-                                        },
-                                        {
-                                            title: '操作',
-                                            key: 'option',
-                                            valueType: 'option',
-                                            render: (_: any, record: any) => [
-                                                <Popconfirm
-                                                    key={'del'}
-                                                    title="是否确认删除?"
-                                                    onConfirm={() => delActionHandle(record, 3)}
-                                                    // onCancel={()=>{}}
-                                                    okText="是"
-                                                    cancelText="否"
-                                                >
-                                                    <a >删除</a>
-                                                </Popconfirm>
-                                            ],
-                                        }] : [
-                                            ...tableColumn, {
-                                                title: '数值',
-                                                dataIndex: 'value',
-                                                key: 'value',
-                                                align: 'center'
-                                            }
-                                        ]} request={(params, sort, filter) => getTableData('3', params, sort, filter)} />}
-                                    </div>
-
-                                </div>
+                                                    {currentComputeDate && <BMSTable actionRef={tableRef} loading={{ spinning: loading, tip: '正在计算数据...' }} rowKey='id' params={tableDataFilterParams} columns={auditType == '0' ? [...tableColumn, {
+                                                        title: '数值',
+                                                        dataIndex: 'value',
+                                                        key: 'value',
+                                                        align: 'center',
+                                                        render: (text: any, record: any) => {
+
+                                                            return (
+                                                                <div key={'editCheckitem'} style={{ display: 'flex', flexDirection: 'row', width: '100%', justifyContent: 'center', alignItems: 'center' }}>
+
+                                                                    <div style={{ width: '80px', height: 16, display: 'flex', flexDirection: 'row', justifyContent: 'center', alignItems: 'center' }}>
+                                                                        {
+                                                                            editTableCellId == record.id ? <Input size='small' defaultValue={record.value} placeholder='请输入' onChange={(e) => { set_checkItemvalNum(Number(e.target.value)) }} style={{ width: '80px' }} /> : <span>{text}</span>
+                                                                        }
+                                                                    </div>
+                                                                    <img onClick={() => editCheckItemValHandle(record)} style={{ width: 16, height: 16, cursor: 'pointer', marginLeft: 8 }} src={editTableCellId == record.id ? conformIcon : editIcon} alt="" />
+                                                                </div>
+                                                            )
+                                                        }
+                                                    },
+                                                    {
+                                                        title: '操作',
+                                                        key: 'option',
+                                                        valueType: 'option',
+                                                        render: (_: any, record: any) => [
+                                                            <Popconfirm
+                                                                key={'del'}
+                                                                title="是否确认删除?"
+                                                                onConfirm={() => delActionHandle(record, 3)}
+                                                                // onCancel={()=>{}}
+                                                                okText="是"
+                                                                cancelText="否"
+                                                            >
+                                                                <a >删除</a>
+                                                            </Popconfirm>
+                                                        ],
+                                                    }] : [
+                                                        ...tableColumn, {
+                                                            title: '数值',
+                                                            dataIndex: 'value',
+                                                            key: 'value',
+                                                            align: 'center'
+                                                        }
+                                                    ]} request={(params, sort, filter) => getTableData('3', params, sort, filter)} />}
+                                                </div>
 
-                            </div>
-                        )
-                    }
-                    {
-                        currentSelectedTabKey == '4' && (
-                            <div className='tabContent'>
-                                <div className='tableToolbar'>
-                                    <div className='filter'>
-                                        <div className='tabs'>
-                                            {
-                                                manaIndexGroups.map((item, index) => {
-                                                    return (
-                                                        <div key={index} className={currentSelectedManaGroup?.id == item.id ? 'tab on' : 'tab'} onClick={() => onManaIndexGroupClick(item)}>{item.groupName}</div>
-                                                    )
-                                                })
-                                            }
+                                            </div>
 
                                         </div>
-                                        <div className='search'>
-                                            {/* <span>核算单元名称:</span><Input className='searchInput' allowClear placeholder="请输入" onChange={(e) => {
-                                                set_tableDataSearchKeywords(e.target.value);
-                                                if (e.target.value.length == 0) {
-                                                    set_tableDataFilterParams({
-                                                        ...tableDataFilterParams,
-                                                        unitName: ''
-                                                    });
-                                                }
-                                            }} suffix={
-                                                <IconFont type="iconsousuo" onClick={() => tableDataSearchHandle()} />
-                                            } /> */}
+                                    )
+                                }
+                                {
+                                    currentSelectedTabKey == '4' && (
+                                        <div className='tabContent'>
+                                            <div className='tableToolbar'>
+                                                <div className='filter'>
+                                                    <div className='tabs'>
+                                                        {
+                                                            manaIndexGroups.map((item, index) => {
+                                                                return (
+                                                                    <div key={index} className={currentSelectedManaGroup?.id == item.id ? 'tab on' : 'tab'} onClick={() => onManaIndexGroupClick(item)}>{item.groupName}</div>
+                                                                )
+                                                            })
+                                                        }
+
+                                                    </div>
+                                                    <div className='search'>
+                                                        {/* <span>核算单元名称:</span><Input className='searchInput' allowClear placeholder="请输入" onChange={(e) => {
+                                                    set_tableDataSearchKeywords(e.target.value);
+                                                    if (e.target.value.length == 0) {
+                                                        set_tableDataFilterParams({
+                                                            ...tableDataFilterParams,
+                                                            unitName: ''
+                                                        });
+                                                    }
+                                                }} suffix={
+                                                    <IconFont type="iconsousuo" onClick={() => tableDataSearchHandle()} />
+                                                } /> */}
+                                                    </div>
+                                                </div>
+                                                <Popover open={ifShowTip} content={'当前处于审核中,无法操作!'} placement='topRight'>
+                                                    <div className={auditType == '1' ? 'btnGroup disabled' : 'btnGroup'}
+                                                        onMouseEnter={() => auditType == '0' ? set_ifShowTip(false) : set_ifShowTip(true)}
+                                                        onMouseLeave={() => set_ifShowTip(false)}
+                                                    >
+                                                        {/* <span key="1">获取</span> */}
+                                                        {importData(4, '管理指标')}
+                                                    </div>
+                                                </Popover>
+                                            </div>
+                                            {currentComputeDate && tableColumn && <BMSTable className='BMS-ManaIndextable' rowClassName={() => 'BMS-ManaIndextable-row'} bordered actionRef={tableRef} scroll={{ x: (100 * (tableColumn.length - 2)) + 120 + 100, y: 500 }} rowKey='unitCode' columns={auditType == '0' ? [...tableColumn,
+                                            {
+                                                title: '操作',
+                                                key: 'option',
+                                                valueType: 'option',
+                                                width: 100,
+                                                align: 'center',
+                                                fixed: 'right',
+                                                render: (_: any, record: any) => [
+                                                    <EditManaIndexTableRow record={record} key={'edit'} />
+                                                ],
+                                            }] : [...tableColumn]} pagination={false} params={tableDataFilterParams} request={(params, sort, filter) => getTableData('4', params, sort, filter)} />}
                                         </div>
-                                    </div>
-                                    <div className={auditType == '1' ? 'btnGroup disabled' : 'btnGroup'}>
-                                        {/* <span key="1">获取</span> */}
-                                        <span key="download" onClick={auditType == '0'?() =>downloadTemplate(4,currentSelectedManaGroup?.id):()=>{}}>下载模板</span>
-                                        {importData(4, '管理指标')}
-                                        {/* <span key="2" onClick={() => generateFunc(4)}>导入</span> */}
-                                        {/* <span key="3" onClick={() => generateFunc(4)}>添加</span> */}
-                                    </div>
-                                </div>
-                                {currentComputeDate && tableColumn && <BMSTable className='BMS-ManaIndextable' rowClassName={() => 'BMS-ManaIndextable-row'} bordered actionRef={tableRef} scroll={{ x: (100 * (tableColumn.length - 2)) + 120 + 100, y: 500 }} rowKey='unitCode' columns={auditType == '0' ? [...tableColumn,
+                                    )
+                                }
                                 {
-                                    title: '操作',
-                                    key: 'option',
-                                    valueType: 'option',
-                                    width: 100,
-                                    align: 'center',
-                                    fixed: 'right',
-                                    render: (_: any, record: any) => [
-                                        <EditManaIndexTableRow record={record} key={'edit'} />
-                                    ],
-                                }] : [...tableColumn]} pagination={false} params={tableDataFilterParams} request={(params, sort, filter) => getTableData('4', params, sort, filter)} />}
-                            </div>
-                        )
-                    }
-                    {
-                        currentSelectedTabKey == '5' && (
-                            <div className='tabContent' style={{ paddingBottom: 30 }}>
-                                <div className='tableToolbar'>
-                                    <div className='filter'>
-                                        <div className='search'>
-                                            <span>项目名称:</span><Input className='searchInput' allowClear placeholder="请输入" onChange={(e) => {
-                                                set_tableDataSearchKeywords(e.target.value);
-                                                if (e.target.value.length == 0) {
-                                                    set_tableDataFilterParams({
-                                                        ...tableDataFilterParams,
-                                                        itemName: ''
-                                                    });
-                                                }
-                                            }} suffix={
-                                                <IconFont type="iconsousuo" onClick={() => tableDataSearchHandle('itemName')} />
-                                            } />
+                                    currentSelectedTabKey == '5' && (
+                                        <div className='tabContent' >
+                                            <div className='tableToolbar'>
+                                                <div className='filter'>
+                                                    <div className='search'>
+                                                        <span>项目名称:</span><Input className='searchInput' allowClear placeholder="请输入" onChange={(e) => {
+                                                            set_tableDataSearchKeywords(e.target.value);
+                                                            if (e.target.value.length == 0) {
+                                                                set_tableDataFilterParams({
+                                                                    ...tableDataFilterParams,
+                                                                    itemName: ''
+                                                                });
+                                                            }
+                                                        }} suffix={
+                                                            <IconFont type="iconsousuo" onClick={() => tableDataSearchHandle('itemName')} />
+                                                        } />
+                                                    </div>
+                                                </div>
+                                                <Popover open={ifShowTip} content={'当前处于审核中,无法操作!'} placement='topRight'>
+                                                    <div className={auditType == '1' ? 'btnGroup disabled' : 'btnGroup'}
+                                                        onMouseEnter={() => auditType == '0' ? set_ifShowTip(false) : set_ifShowTip(true)}
+                                                        onMouseLeave={() => set_ifShowTip(false)}
+                                                    >
+                                                        {/* <span key="1">获取</span> */}
+                                                        {importData(5, '收入')}
+                                                    </div>
+                                                </Popover>
+                                            </div>
+                                            {currentComputeDate && <BMSTable actionRef={tableRef} rowKey='id' params={tableDataFilterParams} columns={tableColumn} request={(params, sort, filter) => getTableData('5', params, sort, filter)} />}
+                                            <div className='totalCount'>合计:{totalNum}</div>
                                         </div>
-                                    </div>
-
-                                    <div className={auditType == '1' ? 'btnGroup disabled' : 'btnGroup'}>
-                                        {/* <span key="1">获取</span> */}
-                                        <span key="2" onClick={() => generateFunc(5)}>导入</span>
-                                    </div>
-                                </div>
-                                {currentComputeDate && <BMSTable actionRef={tableRef} rowKey='id' columns={tableColumn} request={(params, sort, filter) => getTableData('5', params, sort, filter)} />}
-                                <div className='totalCount'>合计:151065.34</div>
-                            </div>
-                        )
-                    }
-                    {
-                        currentSelectedTabKey == '6' && (
-                            <div className='tabContent'>
-                                <div className='tableToolbar'>
-                                    <div className='filter'>
-                                        <div className='search'>
-                                            <span>项目名称:</span><Input className='searchInput' allowClear placeholder="请输入" onChange={(e) => {
-                                                set_tableDataSearchKeywords(e.target.value);
-                                                if (e.target.value.length == 0) {
-                                                    set_tableDataFilterParams({
-                                                        ...tableDataFilterParams,
-                                                        itemName: ''
-                                                    });
-                                                }
-                                            }} suffix={
-                                                <IconFont type="iconsousuo" onClick={() => tableDataSearchHandle('itemName')} />
-                                            } />
+                                    )
+                                }
+                                {
+                                    currentSelectedTabKey == '6' && (
+                                        <div className='tabContent'>
+                                            <div className='tableToolbar'>
+                                                <div className='filter'>
+                                                    <div className='search'>
+                                                        <span>项目名称:</span><Input className='searchInput' allowClear placeholder="请输入" onChange={(e) => {
+                                                            set_tableDataSearchKeywords(e.target.value);
+                                                            if (e.target.value.length == 0) {
+                                                                set_tableDataFilterParams({
+                                                                    ...tableDataFilterParams,
+                                                                    itemName: ''
+                                                                });
+                                                            }
+                                                        }} suffix={
+                                                            <IconFont type="iconsousuo" onClick={() => tableDataSearchHandle('itemName')} />
+                                                        } />
+                                                    </div>
+                                                </div>
+                                                <Popover open={ifShowTip} content={'当前处于审核中,无法操作!'} placement='topRight'>
+                                                    <div className={auditType == '1' ? 'btnGroup disabled' : 'btnGroup'}
+                                                        onMouseEnter={() => auditType == '0' ? set_ifShowTip(false) : set_ifShowTip(true)}
+                                                        onMouseLeave={() => set_ifShowTip(false)}
+                                                    >
+                                                        {/* <span key="1">获取</span> */}
+                                                        {importData(6, '成本')}
+                                                    </div>
+                                                </Popover>
+                                            </div>
+                                            {currentComputeDate && <BMSTable actionRef={tableRef} rowKey='id' params={tableDataFilterParams} columns={tableColumn} request={(params, sort, filter) => getTableData('6', params, sort, filter)} />}
+                                            <div className='totalCount'>合计:{totalNum}</div>
                                         </div>
-                                    </div>
-
-                                    <div className={auditType == '1' ? 'btnGroup disabled' : 'btnGroup'}>
-                                        {/* <span key="1">获取</span> */}
-                                        <span key="2" onClick={() => generateFunc(6)}>导入</span>
-                                    </div>
-                                </div>
-                                {currentComputeDate && <BMSTable actionRef={tableRef} rowKey='id' columns={tableColumn} request={(params, sort, filter) => getTableData('5', params, sort, filter)} />}
-                            </div>
-                        )
-                    }
+                                    )
+                                }
 
 
-                </BMSPagecontainer>
-            </div>
+                            </BMSPagecontainer>
+                        </div>
+                    )
+                }
+            </>
+
         </div>
     );
 

+ 19 - 1
src/pages/budgetMana/monthlyDataCheck/service.ts

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2022-12-21 11:13:51
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-02-16 21:59:05
+ * @LastEditTime: 2023-02-21 10:39:04
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlyInfoCheck/service.ts
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -462,6 +462,18 @@ export const importMonthlyperformanceRelaFiles = (index: number, data: any) => {
             data
         })
     }
+    if (index == 5) {
+        return request('/performance/kpi/importIncome', {
+            method: 'POST',
+            data
+        })
+    }
+    if (index == 6) {
+        return request('/performance/kpi/importCost', {
+            method: 'POST',
+            data
+        })
+    }
 
 
 }
@@ -481,6 +493,12 @@ export const downloadTemplateReq = (index: number,id?:number) => {
     if(index == 4){
         path = `/gateway/performance/kpi/exportManager?groupId=${id}`
     }
+    if(index == 5){
+        path = `/gateway/performance/kpi/exportIncome`
+    }
+    if(index == 6){
+        path = `/gateway/performance/kpi/exportCost`
+    }
 
     const userData = localStorage.getItem('userData');
     const { token = '' } = JSON.parse(userData as any);

+ 16 - 4
src/pages/budgetMana/monthlyDataCheck/style.less

@@ -1,11 +1,22 @@
 .MonthlyDataCheck {
+    position: relative;
     display: flex;
     flex-direction: row;
-    // height: 100%;
+    min-height: calc(100vh - 80px);
     border-radius: 4px;
     overflow: hidden;
     background-color: #FFF;
 
+    .maskCover {
+        position: absolute;
+        top:0;
+        left: 0;
+        width:100%;
+        height:100%;
+        z-index: 9;
+        background: rgba(0,0,0,0.2);
+    }
+
     .ManaIndextable {
         .bms-ant-table-thead {
             background-color: #37F !important;
@@ -83,8 +94,9 @@
 
             .totalCount {
                 position: absolute;
-                bottom:0;
-                left: 6px;
+                bottom:16px;
+                left: 16px;
+                z-index: 9;
                 height: 16px;
                 font-size: 16px;
                 font-family: SourceHanSansCN-Medium, SourceHanSansCN;
@@ -228,7 +240,7 @@
 
                     .treeWrap {
                         width: 220px;
-                        height: calc(100vh - 270px);
+                        height: calc(100vh - 245px);
                         background: #FFF;
                         border-radius: 4px;
                         padding: 16px;

+ 43 - 22
src/pages/budgetMana/monthlyInfoCheck/index.tsx

@@ -4,7 +4,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2022-12-16 09:42:52
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-02-17 10:56:16
+ * @LastEditTime: 2023-03-01 16:26:50
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlySet/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -16,7 +16,7 @@ import BMSPagecontainer from '@/components/BMSPageContainer';
 import { useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
 import './style.less';
 
-import { Tree, TreeProps, Tabs, Input, Modal, Transfer, Popconfirm, message } from 'antd';
+import { Tree, TreeProps, Tabs, Input, Modal, Transfer, Popconfirm, message, Popover } from 'antd';
 import { DataNode } from 'antd/es/tree';
 
 import expandedIcon from '../../../../static/treenode_open.png';
@@ -34,6 +34,7 @@ import locale from 'antd/es/date-picker/locale/zh_CN';
 import { getCurrentCheckStatus } from '@/services/auth';
 import React from 'react';
 import DirectoryTree from 'antd/es/tree/DirectoryTree';
+import { getDeepestTreeData } from '@/utils/tooljs';
 
 
 
@@ -120,6 +121,7 @@ const MonthlyInfoCheck: React.FC = () => {
     const [currentSelectedTabKey, set_currentSelectedTabKey] = useState<string>('1');
     const [currentComputeDate, set_currentComputeDate] = useState<string | undefined>();
 
+    const [ifShowTip, set_ifShowTip] = useState(false);
 
     const [auditType, set_auditType] = useState('0');
 
@@ -398,7 +400,7 @@ const MonthlyInfoCheck: React.FC = () => {
         Modal.confirm({
             title: '注意',
             content: '生成操作会根据基础设定的单元人员对照信息重新生成数据,手动调整的人员信息将会丢失,确定继续生成操作?',
-            onOk:()=>confirmGenerateHandle(type)
+            onOk: () => confirmGenerateHandle(type)
 
         })
     }
@@ -539,8 +541,10 @@ const MonthlyInfoCheck: React.FC = () => {
         if (treeData?.length > 0) {
 
             if (treeData[0].child && treeData[0].child.length > 0) {
-                set_currentSelectedTreeNode(treeData[0].child[0]);
-                setExpandedKeys([treeData[0].code]);
+                const [node, nodeParent] = getDeepestTreeData(treeData[0], 'child');
+
+                set_currentSelectedTreeNode(node);
+                setExpandedKeys([nodeParent.code]);
             }
         }
     }, [treeData]);
@@ -573,7 +577,7 @@ const MonthlyInfoCheck: React.FC = () => {
                     />
                 </div>
                 {
-                    treeData && treeData.length > 0 && (
+                    treeData && treeData.length > 0 && currentSelectedTreeNode && (
                         <DirectoryTree
                             fieldNames={{ title: 'name', key: 'code', children: 'child' }}
                             rootStyle={{ height: '100%', paddingBottom: 50, overflowY: 'scroll', overflowX: 'hidden' }}
@@ -581,6 +585,7 @@ const MonthlyInfoCheck: React.FC = () => {
                             onExpand={onExpand}
                             expandedKeys={expandedKeys}
                             autoExpandParent={autoExpandParent}
+                            selectedKeys={[currentSelectedTreeNode.code]}
                             blockNode={true}
                             icon={() => null}
                             titleRender={
@@ -668,13 +673,19 @@ const MonthlyInfoCheck: React.FC = () => {
                                             <IconFont type="iconsousuo" onClick={() => searchEmpHandle()} />
                                         } />
                                     </div>
-                                    <div className={auditType != '0' ? 'btnGroup disabled' : 'btnGroup'}>
-                                        {/* <span key="1">调整</span> */}
-                                        <span key="2" onClick={auditType == '0' ? () => generateFunc(1) : () => { }}>生成</span>
-                                        <span key="3" onClick={auditType == '0' ? () => addPersonFunc() : () => { }}>添加</span>
-                                    </div>
+                                    <Popover open={ifShowTip} content={'当前处于审核中,无法操作!'} >
+                                        <div className={auditType != '0' ? 'btnGroup disabled' : 'btnGroup'}
+                                            onMouseEnter={() => auditType == '0' ? set_ifShowTip(false) : set_ifShowTip(true)}
+                                            onMouseLeave={() => set_ifShowTip(false)}
+                                        >
+                                            {/* <span key="1">调整</span> */}
+                                            <span key="2" onClick={auditType == '0' ? () => generateFunc(1) : () => { }}>生成</span>
+                                            <span key="3" onClick={auditType == '0' ? () => addPersonFunc() : () => { }}>添加</span>
+                                        </div>
+                                    </Popover>
+
                                 </div>
-                                {currentSelectedTreeNode && <BMSTable params={empFilterParams} actionRef={tableRef} rowKey='empNo' columns={auditType == '0'?[...tableColumn, {
+                                {currentSelectedTreeNode && <BMSTable params={empFilterParams} actionRef={tableRef} rowKey='empNo' columns={auditType == '0' ? [...tableColumn, {
                                     title: '操作',
                                     key: 'option',
                                     valueType: 'option',
@@ -684,7 +695,7 @@ const MonthlyInfoCheck: React.FC = () => {
                                             <a key={'del'}>删除</a>
                                         </Popconfirm>
                                     ],
-                                },]:[...tableColumn]} request={(params, sort, filter) => getTableData('PERSON', params, sort, filter)} />}
+                                },] : [...tableColumn]} request={(params, sort, filter) => getTableData('PERSON', params, sort, filter)} />}
                             </div>
                         )
                     }
@@ -707,10 +718,15 @@ const MonthlyInfoCheck: React.FC = () => {
                                             <IconFont type="iconsousuo" onClick={() => searchDepHandle()} />
                                         } />
                                     </div>
-                                    <div className={auditType != '0' ? 'btnGroup disabled' : 'btnGroup'}>
-                                        {/* <span key="1">调整</span> */}
-                                        <span key="2" onClick={auditType == '0' ? () => generateFunc(2) : () => { }}>生成</span>
-                                    </div>
+                                    <Popover open={ifShowTip} content={'当前处于审核中,无法操作!'} >
+                                        <div className={auditType != '0' ? 'btnGroup disabled' : 'btnGroup'}
+                                            onMouseEnter={() => auditType == '0' ? set_ifShowTip(false) : set_ifShowTip(true)}
+                                            onMouseLeave={() => set_ifShowTip(false)}
+                                        >
+                                            {/* <span key="1">调整</span> */}
+                                            <span key="2" onClick={auditType == '0' ? () => generateFunc(2) : () => { }}>生成</span>
+                                        </div>
+                                    </Popover>
                                 </div>
                                 {currentSelectedTreeNode && <BMSTable actionRef={tableRef} params={depFilterParams} rowKey='deptCode' columns={tableColumn} request={(params, sort, filter) => getTableData('DEP', params, sort, filter)} />}
                             </div>
@@ -734,12 +750,17 @@ const MonthlyInfoCheck: React.FC = () => {
                                             <IconFont type="iconsousuo" onClick={() => searchItemHandle()} />
                                         } />
                                     </div>
-                                    <div className={auditType != '0' ? 'btnGroup disabled' : 'btnGroup'} >
-                                        {/* <span key="1">调整</span> */}
-                                        <span key="2" onClick={auditType == '0' ? () => generateFunc(3) : () => { }}>生成</span>
-                                    </div>
+                                    <Popover open={ifShowTip} content={'当前处于审核中,无法操作!'} >
+                                        <div className={auditType != '0' ? 'btnGroup disabled' : 'btnGroup'}
+                                            onMouseEnter={() => auditType == '0' ? set_ifShowTip(false) : set_ifShowTip(true)}
+                                            onMouseLeave={() => set_ifShowTip(false)}
+                                        >
+                                            {/* <span key="1">调整</span> */}
+                                            <span key="2" onClick={auditType == '0' ? () => generateFunc(3) : () => { }}>生成</span>
+                                        </div>
+                                    </Popover>
                                 </div>
-                                {currentSelectedTreeNode && <BMSTable actionRef={tableRef} params={itemFilterParams} rowKey='empNo' columns={tableColumn} request={(params, sort, filter) => getTableData('CHARGE', params, sort, filter)} />}
+                                {currentSelectedTreeNode && <BMSTable actionRef={tableRef} params={itemFilterParams} rowKey='id' columns={tableColumn} request={(params, sort, filter) => getTableData('CHARGE', params, sort, filter)} />}
                             </div>
                         )
                     }

+ 10 - 20
src/pages/budgetMana/monthlySet/index.tsx

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2022-12-16 09:42:52
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-02-06 11:37:06
+ * @LastEditTime: 2023-02-23 14:27:51
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlySet/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -32,13 +32,8 @@ import { getComputeDate } from '@/pages/Home/service';
 
 const MonthlySet: React.FC = () => {
 
-
-
-    
-
     const dateFormat = 'YYYY-MM-DD';
 
-
     const [data, set_data] = useState<getMonthlyDataRespType>();
     const [currentComputeDate, set_currentComputeDate] = useState('');
     const [ifEdit, set_ifEdit] = useState(false);
@@ -46,7 +41,6 @@ const MonthlySet: React.FC = () => {
 
     const formRef = useRef<ProFormInstance>();
     
-
     const getCurrentComputeDate =async () => {
         const resp = await getComputeDate();
         set_currentComputeDate(resp);    
@@ -62,19 +56,18 @@ const MonthlySet: React.FC = () => {
             },1000)
         }else{
             set_data(resp);
-        }
-
-        
+        } 
     }
 
     const editClickHandle = ()=>{
         set_ifEdit(true);
     }
-
+    
     const saveHandle = async (prevData:any) => {
           const f = formRef.current?.getFieldFormatValueObject;
           const value = f?f():undefined;
           const {dateRange,personalRate,seniority} = value;
+          
           const resp = await editSave({
                computeDate:currentComputeDate,
                ...prevData,
@@ -86,9 +79,7 @@ const MonthlySet: React.FC = () => {
 
           if(resp){
                set_ifEdit(false);  //获取最新数据
-          }
-
-          
+          }     
     }
 
     const jiezhuanHandle = (data:any) => {
@@ -187,7 +178,7 @@ const MonthlySet: React.FC = () => {
 
                                 <ProFormDigit
                                     disabled
-                                    label="人事成本比例:"
+                                    label="人事成本比例系数:"
                                     name="personalRate"
                                     colProps={{span:8}}
                                     width='lg'
@@ -235,7 +226,7 @@ const MonthlySet: React.FC = () => {
                         data && (
                             <ProForm submitter={false} layout='vertical' grid={true}
                                 initialValues={{
-                                    personalRate: data.currentCarry.seniority,
+                                    personalRate: data.currentCarry.personalRate,
                                     seniority: data.currentCarry.seniority,
                                     dateRange:[dayjs(data.currentCarry.beginDate?data.currentCarry.beginDate:'1997-01-01', dateFormat), dayjs(data.currentCarry.endDate?data.currentCarry.endDate:'1997-01-01', dateFormat)],
                                 }}
@@ -249,7 +240,7 @@ const MonthlySet: React.FC = () => {
 
                                     <ProFormDigit
                                         disabled={!ifEdit}
-                                        label="人事成本比例:"
+                                        label="人事成本比例系数:"
                                         name="personalRate"
                                         min={0}
                                         colProps={{span:8}}
@@ -284,7 +275,7 @@ const MonthlySet: React.FC = () => {
                         data && (
                             <ProForm submitter={false} layout='vertical' grid={true}
                                 initialValues={{
-                                    personalRate: data.preCarry.seniority,
+                                    personalRate: data.preCarry.personalRate,
                                     seniority: data.preCarry.seniority,
                                     dateRange:[dayjs(data.preCarry.beginDate?data.preCarry.beginDate:'1997-01-01', dateFormat), dayjs(data.preCarry.endDate?data.preCarry.endDate:'1997-01-01', dateFormat)],
                                 }}
@@ -296,7 +287,7 @@ const MonthlySet: React.FC = () => {
 
                                     <ProFormDigit
                                         disabled
-                                        label="人事成本比例:"
+                                        label="人事成本比例系数:"
                                         name="personalRate"
                                         min={0}
                                         colProps={{span:8}}
@@ -319,7 +310,6 @@ const MonthlySet: React.FC = () => {
                             </ProForm>
                         )
                     }
-
                 </div>
             </div>
         </BMSPagecontainer>

+ 165 - 187
src/pages/budgetMana/oneBatch/index.tsx

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2023-01-04 14:12:31
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-02-07 11:02:19
+ * @LastEditTime: 2023-03-01 16:19:27
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/oneBatch/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -10,9 +10,11 @@
 
 import BMSPagecontainer from '@/components/BMSPageContainer'
 import { BMSTable } from '@/components/BMSTable';
-import { ProColumns } from '@ant-design/pro-components';
-import { Table, Tabs } from 'antd';
-import { useEffect, useState } from 'react';
+import { getComputeDate } from '@/pages/Home/service';
+import { ActionType, ProColumns } from '@ant-design/pro-components';
+import { message, Modal, Popover, Table, Tabs } from 'antd';
+import { useEffect, useRef, useState } from 'react';
+import { caculate, checkRequest, getData } from './service';
 
 
 import './style.less';
@@ -20,169 +22,163 @@ import './style.less';
 const OneBatch = () => {
 
 
-  const columnData = [
-    {
-      title: '核算单元',
-      dataIndex: 'unitType',
-      key: 'unitType',
-      align: 'center',
-      fixed: 'left',
-      width:'120px',
-    },
-    {
-      title: '门诊诊查',
-      dataIndex: 'unitType',
-      key: 'unitType',
-      align: 'center',
-      width:'120px',
-    },
-    {
-      title: '门诊诊查点值',
-      dataIndex: 'unitType',
-      key: 'unitType',
-      align: 'center',
-      width:'120px',
-    },
-    {
-      title: '住院诊查',
-      dataIndex: 'unitType',
-      key: 'unitType',
-      align: 'center',
-      width:'120px',
-    },
-    {
-      title: '住院诊查点值',
-      dataIndex: 'unitType',
-      key: 'unitType',
-      align: 'center',
-      width:'120px',
-    },
-    {
-      title: '出院人次',
-      dataIndex: 'unitType',
-      key: 'unitType',
-      align: 'center',
-      width:'120px',
-    },
-    {
-      title: '出院人次点值',
-      dataIndex: 'unitType',
-      key: 'unitType',
-      align: 'center',
-      width:'120px',
-      
-    },
-    {
-      title: '出院人次奖金',
-      dataIndex: 'unitType',
-      key: 'unitType',
-      align: 'center',
-      width:'120px',
-    },
-    {
-      title: 'DRG点数',
-      dataIndex: 'unitType',
-      key: 'unitType',
-      align: 'center',
-      width:'120px',
-    },
-    {
-      title: '总奖金1',
-      dataIndex: 'unitType',
-      key: 'unitType',
-      align: 'center',
-      width:'120px',
-    },
-    {
-      title: '总奖金2',
-      dataIndex: 'unitType',
-      key: 'unitType',
-      align: 'center',
-      width:'120px',
-    },
-    {
-      title: '总奖金3',
-      dataIndex: 'unitType',
-      key: 'unitType',
-      align: 'center',
-      width:'120px',
-      fixed:'right',
-    },
-  ]
+  const [tableColumn, set_tableColumn] = useState<ProColumns[] | any[]>([]);
 
+  const [currentComputeDate, set_currentComputeDate] = useState<string | undefined>();
 
-  const [tableColumn, set_tableColumn] = useState<ProColumns[] | any[]>([]);
+  const [currentTabKey, set_currentTabKey] = useState('1');
+
+  const [tableDataFilterParams, set_tableDataFilterParams] = useState<any | undefined>({ reportCode: undefined });
+
+  const [auditType, set_auditType] = useState('0');
+
+  const [ifShowTip,set_ifShowTip] = useState(false);
 
+  const tableRef = useRef<ActionType>();
 
-  const onTabChange = () => {
 
+  const onTabChange = (activeKey: string) => {
+    set_currentTabKey(activeKey);
+    set_tableDataFilterParams({
+      ...tableDataFilterParams,
+      reportCode: activeKey
+    })
   }
 
-  const getTableData = async () => {
+  const getTableData = async (params: any, sort: any, filter: any) => {
+
+    const { reportCode = 1 } = params;
+
+    const resp: any = await getData(
+      currentComputeDate as string,
+      reportCode
+    );
+
+    if (resp) {
+
+      const { title, assignmentData } = resp;
+      const columns = title.map((item: any) => {
+        return {
+          title: item.name,
+          dataIndex: `${item.code}`,
+          key: `${item.code}`,
+          width: 100,
+          align: 'center',
+        }
+      });
+      set_tableColumn([{
+        title: '核算单元',
+        dataIndex: 'unitName',
+        key: 'unitName',
+        width: 100,
+        fixed: 'left',
+        align: 'center',
+      }, ...columns, {
+        title: '总奖金',
+        dataIndex: 'totalScore',
+        key: 'totalScore',
+        width: 100,
+        fixed: 'right',
+        align: 'center',
+      }]);
+
+      const data = assignmentData.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[`${item.value[index].code}`] = item.value[index].value
+            }
+          }
+        }
+
+        return { ...item, ...rowData, id: item.id, columns }
+      });
 
-    if (true) {
       return {
-        data: [
-          {
-            unitType: '123',
-            key:1
-          },
-          {
-            unitType: '123',
-            key:2
-          },
-          {
-            unitType: '123',
-            key:3
-          },
-          {
-            unitType: '123',
-            key:4
-          },
-          {
-            unitType: '123',
-            key:5
-          },
-          {
-            unitType: '123',
-            key:6
-          },
-          {
-            unitType: '123',
-            key:7
-          },
-          {
-            unitType: '123',
-            key:8
-          },
-          {
-            unitType: '123',
-            key:9
-          },
-          {
-            unitType: '123',
-            key:10
-          }
-        ],
+        data,
         success: true
       }
+
     }
+    return []
+  }
 
 
-    return []
+
+  const checkHandle = async (type: string) => {
+
+    const resp = await checkRequest({
+      computeDate: currentComputeDate as string,
+      auditType: 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 getCurrentComputeDate = async () => {
+    const resp = await getComputeDate();
+    set_currentComputeDate(resp);
+  }
+
+
+  const confirmCaculateHandle = async () => {
+        const resp = await caculate(currentComputeDate as string);
+        if(resp){
+          tableRef.current?.reload();
+        }
+  }
+
+  const generateFunc = () => {
+
+    Modal.confirm({
+      title: '注意',
+      cancelText: '',
+      closable: true,
+      content: '计算会覆盖原有数据,确定要继续计算操作?',
+      onOk: () => confirmCaculateHandle()
+    })
   }
 
 
   useEffect(() => {
-    set_tableColumn(columnData);
+    if (currentComputeDate) {
+
+    }
+  }, [currentComputeDate]);
+
+
+  useEffect(() => {
+    getCurrentComputeDate();
   }, [])
 
 
   return (
-    <BMSPagecontainer className='OneBatch' title='核算年月:2022年9月'>
+    <BMSPagecontainer className='OneBatch' title={`核算年月:${currentComputeDate}`}>
+      <div className='btnGroup'>
+      <Popover open={ifShowTip}  content={'当前处于审核中,无法操作!'} >
+        <div className={auditType == '0'?'caculateBtn':'caculateBtn disabled'} 
+        onMouseEnter={()=>auditType == '0'?set_ifShowTip(false):set_ifShowTip(true)} 
+        onMouseLeave={()=>set_ifShowTip(false)}
+        onClick={() => auditType == '0' ? generateFunc() : () => { }}>计算</div>
+      </Popover>
+        <div className='checkBtn' onClick={() => checkHandle(`${auditType}`)}>{auditType == '0' ? '审核' : '取消审核'}</div>
+      </div>
       <div className='content'>
         <Tabs
-          defaultActiveKey="1"
+          defaultActiveKey='1'
           onChange={onTabChange}
           items={[
             {
@@ -204,62 +200,44 @@ const OneBatch = () => {
           ]}
         />
         <div className='tabContent'>
-          <BMSTable rowKey='key' pagination={false} columns={tableColumn as ProColumns[]}
+          {currentComputeDate && <BMSTable actionRef={tableRef} rowKey='unitCode' pagination={false} columns={tableColumn as ProColumns[]}
+            params={tableDataFilterParams}
+            scroll={{ x: 120 * 10, y: 500 }}
+            request={(params, sort, filter) => getTableData(params, sort, filter)}
 
-            scroll={{ x:120*10, y: 500 }}
-            request={() => getTableData()}
             summary={(pageData) => {
-              let totalBorrow = 0;
-              let totalRepayment = 0;
+              const Caculate = ({ colData }: { colData: any }) => {
+
+                const { dataIndex } = colData;
+
+                const total = pageData.reduce((prev, cur) => {
+                  return prev + cur[`${dataIndex}`]
+                }, 0);
+
+                return (
+                  <span>{typeof total == 'number' ? total : '合计'}</span>
+                )
+              }
 
-              pageData.forEach(({ borrow, repayment }) => {
-                totalBorrow += borrow;
-                totalRepayment += repayment;
-              });
 
               return (
                 <Table.Summary fixed>
                   <Table.Summary.Row>
-                    <Table.Summary.Cell index={0} align='center'>合计</Table.Summary.Cell>
-                    <Table.Summary.Cell index={1} align='center'>
-                      <span>{1}</span>
-                    </Table.Summary.Cell >
-                    <Table.Summary.Cell index={2} align='center'>
-                      <span>{1}</span>
-                    </Table.Summary.Cell>
-                    <Table.Summary.Cell index={3} align='center'>
-                      <span>{1}</span>
-                    </Table.Summary.Cell>
-                    <Table.Summary.Cell index={4} align='center'>
-                      <span>{1}</span>
-                    </Table.Summary.Cell>
-                    <Table.Summary.Cell index={5} align='center'>
-                      <span>{1}</span>
-                    </Table.Summary.Cell>
-                    <Table.Summary.Cell index={6} align='center'>
-                      <span>{1}</span>
-                    </Table.Summary.Cell>
-                    <Table.Summary.Cell index={7} align='center'>
-                      <span>{1}</span>
-                    </Table.Summary.Cell>
-                    <Table.Summary.Cell index={8} align='center'>
-                      <span>{1}</span>
-                    </Table.Summary.Cell>
-                    <Table.Summary.Cell index={9} align='center'>
-                      <span>{1}</span>
-                    </Table.Summary.Cell>
-                    <Table.Summary.Cell index={10} align='center'>
-                      <span>{1}</span>
-                    </Table.Summary.Cell>
-                    <Table.Summary.Cell index={11} align='center'>
-                      <span>{1}</span>
-                    </Table.Summary.Cell>
+                    {
+                      tableColumn.map((item, index) => {
+                        return (
+                          <Table.Summary.Cell key={index} index={index} align='center' rowSpan={1} >
+                            <Caculate colData={item} />
+                          </Table.Summary.Cell >
+                        )
+                      })
+                    }
                   </Table.Summary.Row>
                 </Table.Summary>
               );
             }}
 
-          />
+          />}
         </div>
       </div>
 

+ 76 - 0
src/pages/budgetMana/oneBatch/service.ts

@@ -0,0 +1,76 @@
+/*
+ * @Author: code4eat awesomedema@gmail.com
+ * @Date: 2023-01-04 13:59:26
+ * @LastEditors: code4eat awesomedema@gmail.com
+ * @LastEditTime: 2023-03-01 15:50:03
+ * @FilePath: /BudgetManaSystem/src/pages/budgetMana/personnelSalaryBudget/service.ts
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ */
+
+
+
+
+
+import { request } from '@@/plugin-request';
+
+
+
+
+//获取薪酬预算表格数据
+
+export type getDataRespType = {
+    income:number,
+    cost:number,
+    rate:number,
+    personalCost:number,
+    detail:[
+        unitType:string,
+        unitTypeName:string,
+        percent:string,
+        cost:string,
+        salary:string,
+        subsidies:string,
+        variableCompensation:string,
+        staffRate:string,
+        averageSalary:number
+    ]
+
+}
+
+export const getData = (computeDate:string,reportCode:number)=>{
+
+    return request<getDataRespType>('/performance/first/getList', {
+         method:'GET',
+         params:{computeDate,reportCode}
+    })
+}
+
+
+//获取审核状态
+export const getCurrentCheckStatus = (computeDate:string)=>{
+    return request('/performance/first/getStatus', {
+        method:'GET',
+        params:{computeDate}
+   })
+}
+
+//审核
+export const checkRequest = (data:{computeDate:string,auditType:string})=>{
+    return request('/performance/first/audit', {
+        method:'POST',
+        params:data
+   })
+}
+
+
+
+//计算
+export const caculate = (computeDate:string)=>{
+    return request('/performance/first/compute', {
+        method:'POST',
+        params:{computeDate}
+   })
+}
+
+
+

+ 50 - 4
src/pages/budgetMana/oneBatch/style.less

@@ -1,13 +1,59 @@
-
-
-
-
 .OneBatch {
+    position: relative;
     padding: 16px;
     // height: 100%;
     background: #fff;
 
+    .btnGroup {
+        position: absolute;
+        top: 16px;
+        right: 16px;
+        display: flex;
+        flex-direction: row;
+        justify-content: center;
+        align-items: center;
+
+        .checkBtn {
+
+            cursor: pointer;
+            padding: 0 14px;
+            height: 24px;
+            line-height: 24px;
+            background: #3376FE;
+            border-radius: 4px;
+            text-align: center;
+            font-size: 14px;
+            font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+            font-weight: 400;
+            color: #FFF;
+            margin-left: 8px;
+        }
+
+        .caculateBtn {
+            cursor: pointer;
+            padding: 0 14px;
+            height: 24px;
+            line-height: 24px;
+            background: #FAFCFF;
+            border-radius: 4px;
+            text-align: center;
+            font-size: 14px;
+            font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+            font-weight: 400;
+            color: #17181A;
+            border: 1px solid #DAE2F2;
+
+            &.disabled {
+                cursor: not-allowed;
+                color: rgba(0, 0, 0, 0.5);
+                background-color: #f0f2f5;
+            }
+        }
+    }
+
+
     .content {
+        position: relative;
         padding-top: 0;
 
         .bms-ant-tabs-nav {

+ 170 - 43
src/pages/budgetMana/personnelSalaryBudget/index.tsx

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2023-01-03 14:20:22
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-01-04 14:07:36
+ * @LastEditTime: 2023-02-23 14:57:45
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/personnelSalaryBudget/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -10,25 +10,43 @@
 
 import BMSPagecontainer from '@/components/BMSPageContainer'
 import { BMSTable } from '@/components/BMSTable';
-import { ProColumns } from '@ant-design/pro-components';
-import { Input } from 'antd';
-import React from 'react'
+import { getComputeDate } from '@/pages/Home/service';
+import { createFromIconfontCN } from '@ant-design/icons';
+import { ActionType, ProColumns } from '@ant-design/pro-components';
+import { Input, InputNumber, message, Modal } from 'antd';
+import React, { useEffect, useRef, useState } from 'react'
+import { caculate, checkRequest, generate, getCurrentCheckStatus, getData } from './service';
 
 import './style.less';
 
+const IconFont = createFromIconfontCN({
+    scriptUrl: '//at.alicdn.com/t/c/font_1927152_gfxzp431jpt.js',
+  });
+
 const PersonnelSalaryBudget = () => {
 
+
+    const [auditType, set_auditType] = useState('0');
+    const [currentComputeDate, set_currentComputeDate] = useState<string | undefined>();
+    const [pageData,set_pageData] = useState({
+        rate:0,income:0,personalCost:0,cost:0
+    });
+
+    const tableRef = useRef<ActionType>();
+    
+    const [loading,set_loading] = useState(false);
+
     const tableColumn = [
         {
             title: '职类',
-            dataIndex: 'unitType',
-            key: 'unitType',
+            dataIndex: 'unitTypeName',
+            key: 'unitTypeName',
             align: 'center'
         },
         {
-            title: '护理编制比例',
-            dataIndex: 'rate',
-            key: 'rate',
+            title: '理编制比例',
+            dataIndex: 'staffRate',
+            key: 'staffRate',
             align: 'center'
         },
         {
@@ -45,8 +63,8 @@ const PersonnelSalaryBudget = () => {
         },
         {
             title: '人事成本',
-            dataIndex: 'personalCost',
-            key: 'personalCost',
+            dataIndex: 'cost',
+            key: 'cost',
             align: 'center'
         },
         {
@@ -69,51 +87,160 @@ const PersonnelSalaryBudget = () => {
         },
     ]
 
-    const getTableData = async () => {
+    const getPageData = async (currentComputeDate:string, params: any, sort: any, filter: any) => {
+        const resp = await getData(currentComputeDate);
+        if(resp){
+            
+            set_pageData({
+                rate:resp.rate,
+                income:resp.income,
+                personalCost:resp.personalCost,
+                cost:resp.cost
+            });
+            return {
+                data: resp.detail,
+                success: true,
+            }
+        }
+        return []
+    }
 
+    const checkHandle = async (type: string) => {
 
-        // const resp = await getData({
-        //     computeDate:'2022-11',
-        // });
-        if (true) {
-            return {
-                data: [],
-                success: true
+        const resp = await checkRequest({
+            computeDate: currentComputeDate as string,
+            auditType: type == '0' ? '1' : '0',   //审核类型  1审核 0取消审核
+        });
+
+        if (resp) {
+            if (type == '0') {
+                message.success('审核提交成功!');
+                set_auditType('1');
+            }
+            if (type == '1') {
+                message.success('取消审核提交成功!');
+                set_auditType('0');
             }
         }
+    }
 
 
-        return []
+    const getCurrentComputeDate = async () => {
+        const resp = await getComputeDate();
+        set_currentComputeDate(resp);
+    }
+
+    const getCheckStatus = async (computeDate: string) => {
+        const resp = await getCurrentCheckStatus(computeDate);
+        if (resp) {
+            set_auditType(`${resp}`);  //0 未审核 1 已审核
+        }
+    }
+
+    // const generateFunc =async (computeDate:string) => {
+    //     const resp = await generate(computeDate);
+        
+    // }
+
+    const confirmGenerateHandle = async (index:number)=>{
+            if(index == 1){
+                const resp = await generate(currentComputeDate as string);
+                if(resp){
+                    message.success('生成完成!');
+                    tableRef.current?.reload();
+                }
+            }
+            if(index == 2){
+                const resp = await caculate({
+                    computeDate:currentComputeDate as string,
+                    ...pageData
+                });
+                if(resp){
+                    message.success('计算完成!');
+                    tableRef.current?.reload();
+                }
+            }
     }
 
 
+    const generateFunc = (index: number) => {
+        /**
+         * index == 1 生成 2 计算
+         * 
+         */
+
+        if(auditType == '1'){
+            Modal.confirm({
+                title: '注意',
+                cancelText: '',
+                closable: true,
+                content: '当前处于审核状态无法操作!',
+            });
+            return;
+        }
+
+        Modal.confirm({
+            title: '注意',
+            cancelText: '',
+            closable: true,
+            content: index == 1 ? '生成后需重新计算数据,确定要进行生成操作?' : '计算会覆盖原有数据,确定要继续计算操作?',
+            onOk: () => {set_loading(true); confirmGenerateHandle(index) }
+        });
+
+
+    }
+
+
+    useEffect(()=>{
+        currentComputeDate&&getCheckStatus(currentComputeDate);
+    },[currentComputeDate]);
+
+
+    useEffect(() => {
+
+        getCurrentComputeDate();
+
+    }, []);
+
+
     return (
-        <BMSPagecontainer className='PersonnelSalaryBudget' title={'核算年月:2022年9月'} ghost>
-            <div className='cardWrap'>
-                <div className='card'>
-                    <span>收入</span>
-                    <div className='count'>20,000,000.00</div>
-                </div>
-                <div className='card'>
-                    <span>成本</span>
-                    <div className='count'>20,000,000.00</div>
+        <BMSPagecontainer className='PersonnelSalaryBudget' title={`核算年月:${currentComputeDate}`} ghost>
+            <div className='checkBtn' onClick={() => checkHandle(`${auditType}`)}>{auditType == '0' ? '审核' : '取消审核'}</div>
+            <div className='paramsWrap'>
+
+                <div className='cardWrap'>
+                    <div className='card'>
+                        <span>收入</span>
+                        <div className='count'>{pageData.income}</div>
+                    </div>
+                    <div className='card'>
+                        <span>成本</span>
+                        <div className='count'>{pageData.cost}</div>
+                    </div>
+                    <div className='card'>
+                        <span>合理人事成本比例系数</span>
+                        <div className='count'>{pageData.rate}</div>
+                    </div>
                 </div>
-                <div className='card'>
-                    <span>合理人事成本比例</span>
-                    <div className='count'>20,000,000.00</div>
+
+                <div className='func'>
+                    <div className='title'>
+                        <span className='a'>全院人事成本(D=(A-B)*C)</span>
+                        <span className='btn' onClick={()=>generateFunc(1)}> <IconFont  type='iconzhongxin' /> 重新生成</span>
+                    </div>
+                    <InputNumber className='input' size='large' min={-10000000} value={pageData.personalCost} placeholder='请输入' 
+                    disabled={auditType == '1'}
+                    onChange={(value)=>set_pageData({...pageData,personalCost:value as number})} />
                 </div>
+                {/* <div className='midLine'>
+                    <span>手动计算</span>
+                    根据手动填写的全院人事成本计算出各职系的
+                </div> */}
+
             </div>
-            <div className='countBtn'>计算</div>
-            <div className='subTitle'>计算结果</div>
-            <div className='func'>
-                <span>全院人事成本(D=(A-B)*C)</span>
-                <Input className='input' placeholder='请输入' />
-            </div>
-            <div className='midLine'>
-                <span>手动计算</span>
-                根据手动填写的全院人事成本计算出各职系的
-            </div>
-            <BMSTable rowKey='empNo' columns={tableColumn as ProColumns[]} request={() => getTableData()} />
+            <div className='countBtn' onClick={()=>generateFunc(2)}>计算</div>
+            <div className='b'>计算结果</div>
+            {currentComputeDate&&<BMSTable actionRef={tableRef} pagination={false} rowKey='unitType' columns={tableColumn as ProColumns[]} request={(params, sort, filter) => getPageData(currentComputeDate,params, sort, filter)} />}
         </BMSPagecontainer>
     )
 }

+ 38 - 2
src/pages/budgetMana/personnelSalaryBudget/service.ts

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2023-01-04 13:59:26
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-01-04 14:07:20
+ * @LastEditTime: 2023-02-23 14:00:23
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/personnelSalaryBudget/service.ts
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -41,6 +41,42 @@ export const getData = (computeDate:string)=>{
 
     return request<getDataRespType>('/performance/bonus/getTotal', {
          method:'GET',
-         params:computeDate
+         params:{computeDate}
     })
 }
+
+
+//获取审核状态
+export const getCurrentCheckStatus = (computeDate:string)=>{
+    return request('/performance/bonus/getStatus', {
+        method:'GET',
+        params:{computeDate}
+   })
+}
+
+//审核
+export const checkRequest = (data:{computeDate:string,auditType:string})=>{
+    return request('/performance/bonus/audit', {
+        method:'POST',
+        params:data
+   })
+}
+
+//生成
+export const generate = (computeDate:string)=>{
+    return request('/performance/bonus/generate', {
+        method:'POST',
+        params:{computeDate}
+   })
+}
+
+//计算
+export const caculate = (data:any)=>{
+    return request('/performance/bonus/compute', {
+        method:'POST',
+        data
+   })
+}
+
+
+

+ 196 - 141
src/pages/budgetMana/personnelSalaryBudget/style.less

@@ -1,110 +1,215 @@
 .PersonnelSalaryBudget {
-    height: 97vh;
+    position: relative;
     padding: 16px;
     background: #fff;
 
-    .cardWrap {
-        display: flex;
-        flex-direction: row;
-        justify-content: space-between;
-        align-items: center;
-        // margin-top: 16px;
+    .checkBtn {
+        position: absolute;
+        cursor: pointer;
+        top: 15px;
+        right: 16px;
+        padding: 0 14px;
+        height: 23px;
+        line-height: 23px;
+        background: #3376FE;
+        border-radius: 4px;
+        text-align: center;
+        font-size: 14px;
+        font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+        font-weight: 400;
+        color: #FFF;
+    }
+
+    .paramsWrap {
+        border-radius: 4px;
+        padding: 16px;
+        padding-bottom: 24px;
         margin-bottom: 16px;
+        border: 1px solid #DAE2F2;
 
-        .card {
-            width: 32.5%;
-            height: 100px;
-            padding: 24px;
-            border-radius: 4px;
+        .cardWrap {
+            display: flex;
+            flex-direction: row;
+            justify-content: space-between;
+            align-items: center;
+            // margin-top: 16px;
+            margin-bottom: 32px;
 
-            &>span {
-                position: relative;
-                z-index: 9;
-                display: inline-block;
-                height: 15px;
-                font-size: 14px;
-                font-family: SourceHanSansCN-Normal, SourceHanSansCN;
-                font-weight: 400;
-                color: #7A8599;
-                line-height: 15px;
-                margin-bottom: 10px;
-            }
+            .card {
+                width: 100%;
+                height: 100px;
+                padding: 24px;
+                border-radius: 4px;
+
+                &>span {
+                    position: relative;
+                    z-index: 9;
+                    display: inline-block;
+                    height: 15px;
+                    font-size: 14px;
+                    font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+                    font-weight: 400;
+                    color: #7A8599;
+                    line-height: 15px;
+                    margin-bottom: 10px;
+                }
 
-            .count {
-                position: relative;
-                z-index: 9;
-                height: 30px;
-                font-size: 28px;
-                font-family: SourceHanSansCN-Medium, SourceHanSansCN;
-                font-weight: 500;
-                color: #527ACC;
-                line-height: 30px;
-            }
+                .count {
+                    position: relative;
+                    z-index: 9;
+                    height: 30px;
+                    font-size: 28px;
+                    font-family: SourceHanSansCN-Medium, SourceHanSansCN;
+                    font-weight: 500;
+                    color: #527ACC;
+                    line-height: 30px;
+                }
 
-            &:nth-child(1) {
-                position: relative;
-                height: 100px;
-                background: linear-gradient(270deg, #D9E5FF 0%, #F2F7FF 100%);
-
-                &::after {
-                    position: absolute;
-                    top: 0;
-                    z-index: 1;
-                    right: 8px;
-                    display: block;
-                    content: '';
-                    width: 130px;
+                &:nth-child(1) {
+                    position: relative;
                     height: 100px;
-                    background: url('../../../../static/A@2x.png');
-                    background-size: cover;
+                    background: linear-gradient(270deg, #D9E5FF 0%, #F2F7FF 100%);
+
+                    &::after {
+                        position: absolute;
+                        top: 0;
+                        z-index: 1;
+                        right: 8px;
+                        display: block;
+                        content: '';
+                        width: 130px;
+                        height: 100px;
+                        background: url('../../../../static/A@2x.png');
+                        background-size: cover;
+                    }
                 }
-            }
 
-            &:nth-child(2) {
-                position: relative;
-                height: 100px;
-                background: linear-gradient(270deg, #D4F4FA 0%, #E8F9FC 100%);
-
-                .count {
-                    color: #52B8CC;
+                &:nth-child(2) {
+                    position: relative;
+                    height: 100px;
+                    margin: 0 16px;
+                    background: linear-gradient(270deg, #D4F4FA 0%, #E8F9FC 100%);
+
+                    .count {
+                        color: #52B8CC;
+                    }
+
+                    &::after {
+                        position: absolute;
+                        top: 0;
+                        z-index: 1;
+                        right: 8px;
+                        display: block;
+                        content: '';
+                        width: 130px;
+                        height: 100px;
+                        background: url('../../../../static/B@2x.png');
+                        background-size: cover;
+                    }
                 }
 
-                &::after {
-                    position: absolute;
-                    top: 0;
-                    z-index: 1;
-                    right: 8px;
-                    display: block;
-                    content: '';
-                    width: 130px;
+                &:nth-child(3) {
+                    position: relative;
                     height: 100px;
-                    background: url('../../../../static/B@2x.png');
-                    background-size: cover;
+                    background: linear-gradient(270deg, #D9F2FF 0%, #EBF8FF 100%);
+
+                    .count {
+                        color: #51A3CC;
+                    }
+
+                    &::after {
+                        position: absolute;
+                        top: 0;
+                        z-index: 1;
+                        right: 8px;
+                        display: block;
+                        content: '';
+                        width: 130px;
+                        height: 100px;
+                        background: url('../../../../static/C@2x.png');
+                        background-size: cover;
+                    }
                 }
             }
+        }
 
-            &:nth-child(3) {
-                position: relative;
-                height: 100px;
-                background: linear-gradient(270deg, #D9F2FF 0%, #EBF8FF 100%);
+        .subTitle {
+            height: 17px;
+            font-size: 16px;
+            font-family: SourceHanSansCN-Medium, SourceHanSansCN;
+            font-weight: 500;
+            color: #17181A;
+            line-height: 17px;
+            margin-bottom: 24px;
+        }
 
-                .count {
-                    color: #51A3CC;
+        .func {
+            display: flex;
+            flex-direction: column;
+            justify-content: center;
+            align-items: center;
+
+            .title {
+                display: flex;
+                width: 346px;
+                flex-direction: row;
+                justify-content: space-between;
+                align-items: center;
+                margin-bottom: 16px;
+
+                &>span {
+                    display: inline-block;
+                    height: 15px;
+                    font-size: 14px;
+                    font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+                    font-weight: 400;
+                    color: #7A8599;
+                    line-height: 15px;
                 }
 
-                &::after {
-                    position: absolute;
-                    top: 0;
-                    z-index: 1;
-                    right: 8px;
-                    display: block;
-                    content: '';
-                    width: 130px;
-                    height: 100px;
-                    background: url('../../../../static/C@2x.png');
-                    background-size: cover;
+                .btn {
+                    color: #3376FE;
+                    cursor: pointer;
                 }
             }
+
+            .input {
+                display: flex;
+                flex-direction: row;
+                justify-content:flex-start;
+                align-items: center;
+                width: 346px;
+                height: 40px;
+                background: #FFF;
+                border-radius: 4px;
+                border: 2px solid #DAE2F2;
+            }
+        }
+
+        .midLine {
+            display: flex;
+            flex-direction: row;
+            justify-content: center;
+            align-items: center;
+            height: 24px;
+            line-height: 24px;
+            background: #F0FCFC;
+            font-size: 12px;
+            color: #515866;
+            font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+            font-weight: 400;
+            margin-top: 24px;
+            margin-bottom: 15px;
+
+            &>span {
+                cursor: pointer;
+                font-size: 12px;
+                font-family: SourceHanSansCN-Medium, SourceHanSansCN;
+                font-weight: 500;
+                color: #00B3B3;
+                padding-right: 4px;
+            }
+
         }
     }
 
@@ -113,75 +218,25 @@
         text-align: center;
         height: 40px;
         line-height: 40px;
-        background: #FAFCFF;
+        background: linear-gradient(90deg, #3366FF 0%, #66A6FF 100%);
         border-radius: 4px;
         border: 1px solid #DAE2F2;
         font-size: 14px;
         font-family: SourceHanSansCN-Normal, SourceHanSansCN;
         font-weight: 400;
-        color: #17181A;
-        margin-bottom: 32px;
+        color: #fff;
+        margin-bottom: 24px;
     }
 
-    .subTitle {
-        height: 17px;
+    .b {
+        height: 16px;
         font-size: 16px;
         font-family: SourceHanSansCN-Medium, SourceHanSansCN;
         font-weight: 500;
         color: #17181A;
-        line-height: 17px;
-        margin-bottom: 24px;
-    }
-
-    .func {
-        display: flex;
-        flex-direction: column;
-        justify-content: center;
-        align-items: center;
-
-        &>span {
-            display: inline-block;
-            height: 15px;
-            font-size: 14px;
-            font-family: SourceHanSansCN-Normal, SourceHanSansCN;
-            font-weight: 400;
-            color: #17181A;
-            line-height: 15px;
-            margin-bottom: 16px;
-        }
-
-        .input {
-            width: 240px;
-            height: 40px;
-            background: #FFF;
-            border-radius: 4px;
-            border: 1px solid #CFD7E6;
-        }
+        line-height: 16px;
+        margin-bottom: 16px;
     }
 
-    .midLine {
-        display: flex;
-        flex-direction: row;
-        justify-content: center;
-        align-items: center;
-        height: 24px;
-        line-height: 24px;
-        background: #F0FCFC;
-        font-size: 12px;
-        color: #515866;
-        font-family: SourceHanSansCN-Normal, SourceHanSansCN;
-        font-weight: 400;
-        margin-top: 24px;
-        margin-bottom: 15px;
-
-        &>span {
-            cursor: pointer;
-            font-size: 12px;
-            font-family: SourceHanSansCN-Medium, SourceHanSansCN;
-            font-weight: 500;
-            color: #00B3B3;
-            padding-right: 4px;
-        }
 
-    }
 }

+ 21 - 0
src/utils/tooljs.ts

@@ -0,0 +1,21 @@
+/*
+ * @Author: code4eat awesomedema@gmail.com
+ * @Date: 2023-02-20 14:31:06
+ * @LastEditors: code4eat awesomedema@gmail.com
+ * @LastEditTime: 2023-02-20 15:04:36
+ * @FilePath: /BudgetManaSystem/src/utils/tooljs.js
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ */
+
+
+let parent:any = undefined;
+
+export const getDeepestTreeData:any= (tree:any,childrenName:string)=>{
+     
+      if(tree[`${childrenName}`]&&tree[`${childrenName}`].length>0){
+           parent = tree;
+           return getDeepestTreeData(tree[`${childrenName}`][0],childrenName)    
+      }
+
+      return  [tree,parent] 
+}