code4eat преди 1 година
родител
ревизия
c1419976ce
променени са 28 файла, в които са добавени 1005 реда и са изтрити 561 реда
  1. BIN
      .DS_Store
  2. BIN
      performance_2023_09_22.zip
  3. 9 8
      src/components/BMSTable/style.less
  4. 5 0
      src/global.less
  5. 129 115
      src/pages/budgetMana/monthlyDataCheck/index.tsx
  6. 22 21
      src/pages/budgetMana/monthlyDataCheck/service.ts
  7. 19 10
      src/pages/budgetMana/monthlyInfoCheck/index.tsx
  8. 8 2
      src/pages/budgetMana/oneBatch/index.tsx
  9. 2 2
      src/pages/budgetMana/personnelSalaryBudget/index.tsx
  10. 4 0
      src/pages/budgetMana/personnelSalaryBudget/style.less
  11. 46 36
      src/pages/reportCheck/report/index.tsx
  12. 39 34
      src/pages/reportCheck/report/style.less
  13. 0 1
      src/pages/secondaryDistribute/employeeInfoCheck/index.tsx
  14. 1 1
      src/pages/secondaryDistribute/employeeInfoCheck/style.less
  15. 7 11
      src/pages/secondaryDistribute/nonCheckProjectApprove/index.tsx
  16. 11 8
      src/pages/secondaryDistribute/secondaryDitriComputed/index.tsx
  17. 396 138
      src/pages/setting/checkUnitSet/checkUnitEmpSet/index.tsx
  18. 26 1
      src/pages/setting/checkUnitSet/checkUnitEmpSet/service.ts
  19. 164 112
      src/pages/setting/checkUnitSet/checkUnitEmpSet/style.less
  20. 1 1
      src/pages/setting/checkUnitSet/medicalGroupSet/index.tsx
  21. 13 10
      src/pages/setting/manaPerformanceSet/classAssessAndGradeSet/index.tsx
  22. 6 5
      src/pages/setting/manaPerformanceSet/indicGroupWeightSet/index.tsx
  23. 43 19
      src/pages/setting/projectSetting/checkUnitProjectSet/index.tsx
  24. 18 1
      src/pages/setting/projectSetting/checkUnitProjectSet/service.ts
  25. 3 3
      src/pages/setting/projectSetting/secondaryProjectDistribute/index.tsx
  26. 14 20
      src/pages/setting/reportSet/reportSetting/index.tsx
  27. 1 1
      src/utils/tableToExcel.ts
  28. 18 1
      src/utils/tooljs.ts

BIN
.DS_Store


BIN
performance_2023_09_22.zip


+ 9 - 8
src/components/BMSTable/style.less

@@ -129,21 +129,22 @@
                             }
                         }
     
-                        &:hover {
-                            border-radius: 0 !important;
-                            background: #FAFBFC !important;
+                        // &:hover {
+                        //     border-radius: 0 !important;
+                        //     background: #FAFBFC !important;
     
-                        }
+                        // }
                     }
                 }
 
+
+
                 &.bms-ant-table-row-selected {
                     .bms-ant-table-cell {
                         border-radius: 0 !important;
-
-                        &:hover {
-                            background: #bae0ff !important;
-                        }
+                    }
+                    &:hover {
+                        background: #bae0ff !important;
                     }
                 }
 

+ 5 - 0
src/global.less

@@ -81,6 +81,9 @@ textarea {
 .bms-ant-table-cell {
     a {
         color: #3376FE !important;
+        &>span {
+            color: #3376FE !important;
+        }
     }
 }
 
@@ -391,6 +394,8 @@ textarea {
     padding-inline-start:0 !important;
 }
 
+
+
 .bms-ant-menu-item-selected {
     background-color:#F2F6FF !important;
 }

+ 129 - 115
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-08-15 10:22:08
+ * @LastEditTime: 2023-09-26 10:03:20
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlySet/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -22,7 +22,7 @@ import { DataNode } from 'antd/es/tree';
 import expandedIcon from '../../../../static/treenode_open.png';
 import closeIcon from '../../../../static/treenode_collapse.png';
 import { BMSTable } from '@/components/BMSTable';
-import { ActionType, ModalForm, ProColumns, ProColumnType, ProForm, ProFormDependency, ProFormDigit, ProFormInstance, ProFormSelect, ProFormText, ProFormTextArea } from '@ant-design/pro-components';
+import { ActionType, ModalForm, ProColumns, ProColumnType, ProForm, ProFormDependency, ProFormDigit, ProFormInstance, ProFormSelect, ProFormText, ProFormTextArea, ProFormTreeSelect } from '@ant-design/pro-components';
 import { createFromIconfontCN } from '@ant-design/icons';
 import { addTableData, checkMonthlyReq, delTableDataRequest, downloadTemplateReq, editCheckProject, editManaIndexTableData, editTableData, editTableSalaryRequest, editUnitCostTableData, generateCheckProjectTableData, generateUnitCostTableData, getCheckItemCalcStatus, getCheckProjectTableData, getCostData, getDepLists, getEmps, getHesuanUnits, getIncomeData, getManaIndexGroup, getManaIndexTableData, getManaIndicatorJiangchengCoefficient, getNoCheckTableData, getPageCheckStatus, getProjects, getSalaryInfoTableData, getUnitCostTableData, importMonthlyperformanceRelaFiles } from './service';
 
@@ -36,7 +36,7 @@ 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';
+import { getDeepestTreeData, searchLeaves } from '@/utils/tooljs';
 
 
 import '../../../utils/zhongtaiA'
@@ -57,31 +57,31 @@ export type TableListItem = {
 const tabData = [
     {
         label: `固定工资`,
-        key: '1',
+        key: 'kpi_salary',
     },
     {
         label: `单元成本数据`,
-        key: '7',
+        key: 'kpi_unit_cost',
     },
     {
         label: `非考核项目`,
-        key: '2',
+        key: 'kpi_non_assessment',
     },
     {
         label: `考核项目`,
-        key: '3',
+        key: 'kpi_assessment',
     },
     {
         label: `管理指标`,
-        key: '4',
+        key: 'kpi_manage_indicator',
     },
     {
         label: `收入数据`,
-        key: '5',
+        key: 'kpi_income',
     },
     {
         label: `成本数据`,
-        key: '6',
+        key: 'kpi_cost',
     },
 ]
 
@@ -92,7 +92,7 @@ const MonthlyDataCheck: React.FC = () => {
     const [treeData, set_treeData] = useState<getTreeDataRespType[]>([]);
 
     const [ifShowTip, set_ifShowTip] = useState(false);
-
+    const [unitSearchKeywords, set_unitSearchKeywords] = useState<string | undefined>(undefined); //核算单元搜素关键词
     const [expandedKeys, setExpandedKeys] = useState<React.Key[]>([]);
     const [searchValue, setSearchValue] = useState('');
     const [autoExpandParent, setAutoExpandParent] = useState(true);
@@ -100,7 +100,7 @@ const MonthlyDataCheck: React.FC = () => {
 
     const [tableColumn, set_tableColumn] = useState<ProColumns & { [key: string]: any }[]>([]);
     const [currentSelectedTreeNode, set_currentSelectedTreeNode] = useState<any | undefined>();
-    const [currentSelectedTabKey, set_currentSelectedTabKey] = useState<string>('1');
+    const [currentSelectedTabKey, set_currentSelectedTabKey] = useState<string>('');
 
     const [currentComputeDate, set_currentComputeDate] = useState<string | undefined>(undefined);
 
@@ -128,7 +128,7 @@ const MonthlyDataCheck: React.FC = () => {
 
     const access = useAccess();
 
-    const [tabs,set_tabs] = useState<any[]>([]);
+    const [tabs, set_tabs] = useState<any[]>([]);
 
     const [ifBanAllAction, set_ifBanAllAction] = useState(true);  //是否掩藏所有操作
 
@@ -328,7 +328,7 @@ const MonthlyDataCheck: React.FC = () => {
             width: 200,
             render: (text: any, record: any) => {
 
-                if(ifBanAllAction)return formatMoneyNumber(text);
+                if (ifBanAllAction) return formatMoneyNumber(text);
 
                 return (
                     <div style={{ display: 'flex', flexDirection: 'row', width: '100%', justifyContent: 'flex-start', alignItems: 'center' }}>
@@ -414,7 +414,7 @@ const MonthlyDataCheck: React.FC = () => {
 
             if (inputSalaryNum != undefined) {
 
-                if (curTabKey == '1') {
+                if (curTabKey == 'kpi_salary') {
                     const resp = await editTableSalaryRequest({
                         computeDate: currentComputeDate as string,
                         unitCode,
@@ -470,13 +470,6 @@ const MonthlyDataCheck: React.FC = () => {
 
     }
 
-    const checkProjectEditHandle = (record: any) => {
-        //   console.log({record});
-        const { props: { record: _record } } = record;
-        set_currentEditRecord(_record);
-        set_editModalVisible(true);
-
-    }
 
     const tableDataAddHandle = () => {
         set_editModalVisible(true);
@@ -490,12 +483,12 @@ const MonthlyDataCheck: React.FC = () => {
         set_editModalVisible(true);
     }
 
-    const getJiezhuanStatusHandle =async () => {
+    const getJiezhuanStatusHandle = async () => {
         const resp = await getJiezhuanStatus(currentComputeDate as string);
-        if(resp == 2){
-              set_ifBanAllAction(true);
-        }else{
-              set_ifBanAllAction(false);
+        if (resp == 2) {
+            set_ifBanAllAction(true);
+        } else {
+            set_ifBanAllAction(false);
         }
     }
 
@@ -585,10 +578,10 @@ const MonthlyDataCheck: React.FC = () => {
 
     const func = (str: string) => str && str.replace(/(?:\.0*|(\.\d+?)0+)$/, '$1') + '%';
 
-    const getTableData = async (type: '1' | '2' | '3' | '4' | '5' | '6' | '7', params: any, sort: any, filter: any) => {
+    const getTableData = async (type: string, params: any, sort: any, filter: any) => {
 
         if (currentComputeDate) {
-            if (type == '1') {
+            if (type == 'kpi_salary') {
                 const resp = await getSalaryInfoTableData({
                     computeDate: currentComputeDate,
                     ...params
@@ -603,7 +596,7 @@ const MonthlyDataCheck: React.FC = () => {
                     }
                 }
             }
-            if (type == '2') {
+            if (type == 'kpi_non_assessment') {
                 const resp = await getNoCheckTableData({
                     computeDate: currentComputeDate,
                     ...params
@@ -618,7 +611,7 @@ const MonthlyDataCheck: React.FC = () => {
                     }
                 }
             }
-            if (type == '3') {
+            if (type == 'kpi_assessment') {
 
 
 
@@ -641,7 +634,7 @@ const MonthlyDataCheck: React.FC = () => {
                     }
                 }
             }
-            if (type == '4') {
+            if (type == 'kpi_manage_indicator') {
                 if (currentSelectedManaGroup) {
 
                     const resp = await getManaIndexTableData({ ...params, computeDate: currentComputeDate, groupId: currentSelectedManaGroup.id });
@@ -747,7 +740,7 @@ const MonthlyDataCheck: React.FC = () => {
 
             }
 
-            if (type == '5') {
+            if (type == 'kpi_income') {
                 const resp = await getIncomeData({
                     computeDate: currentComputeDate,
                     ...params
@@ -763,7 +756,7 @@ const MonthlyDataCheck: React.FC = () => {
                     }
                 }
             }
-            if (type == '6') {
+            if (type == 'kpi_cost') {
                 const resp = await getCostData({
                     computeDate: currentComputeDate,
                     ...params
@@ -779,7 +772,7 @@ const MonthlyDataCheck: React.FC = () => {
                     }
                 }
             }
-            if (type == '7' && currentSelectedTreeNode) {
+            if (type == 'kpi_unit_cost' && currentSelectedTreeNode) {
                 const resp = await getUnitCostTableData({
                     unitCode: currentSelectedTreeNode.code,
                     ...params
@@ -905,10 +898,10 @@ const MonthlyDataCheck: React.FC = () => {
 
 
     //获取数据
-    const confirmGenerateHandle: any = async (index: number, others?: any) => {
+    const confirmGenerateHandle: any = async (code: string, others?: any) => {
 
 
-        if (index == 3) {
+        if (code == 'kpi_assessment') {
             const resp = await generateCheckProjectTableData({
                 computeDate: currentComputeDate as string,
                 unitCode: others ? currentSelectedTreeNode.code : ''
@@ -922,7 +915,7 @@ const MonthlyDataCheck: React.FC = () => {
             return Promise.resolve(true);
 
         }
-        if (index == 7) {
+        if (code == 'kpi_cost') {
             const resp = await generateUnitCostTableData(
                 currentComputeDate as string,
                 currentSelectedTreeNode.code
@@ -938,19 +931,19 @@ const MonthlyDataCheck: React.FC = () => {
         }
     }
 
-    const generateFunc = (index: number, others?: any) => {
+    const generateFunc = (code: string, others?: any) => {
         /**
          * index 获取的表格类型下标
          */
 
-        if ((index == 3 || index == 7) && !loading) {
+        if ((code == 'kpi_assessment' || code == 'kpi_cost') && !loading) {
             Modal.confirm({
                 title: '注意',
                 cancelText: '',
                 okText: '确定',
                 closable: true,
-                content: others ? '获取单个操作会覆盖上次获取的该核算单元的数据,确定要继续操作?' : `${index == 7 ? '获取' : '获取所有'}操作会覆盖所有已获取的数据,确定要继续操作?`,
-                onOk: () => { set_loading(true); confirmGenerateHandle(index, others) }
+                content: others ? '获取单个操作会覆盖上次获取的该核算单元的数据,确定要继续操作?' : `${code == 'kpi_cost' ? '获取' : '获取所有'}操作会覆盖所有已获取的数据,确定要继续操作?`,
+                onOk: () => { set_loading(true); confirmGenerateHandle(code, others) }
             })
         }
     }
@@ -1025,7 +1018,7 @@ const MonthlyDataCheck: React.FC = () => {
         }
     }
 
-    const importData = (index: number, name: string) => {
+    const importData = (code: string, name: string) => {
         if (ifBanAllAction) return;
         return (
             <ModalForm
@@ -1055,7 +1048,7 @@ const MonthlyDataCheck: React.FC = () => {
                     const { importFile: { fileList } } = values;
 
                     let formData = new FormData();
-                    if (index == 7) {
+                    if (code == 'kpi_unit_cost') {
                         formData.append('file', fileList[0].originFileObj);
                         formData.append('computeDate', currentComputeDate as string);
                         formData.append('unitCode', currentSelectedTreeNode.code);
@@ -1066,7 +1059,7 @@ const MonthlyDataCheck: React.FC = () => {
                     }
 
 
-                    const resp = await importMonthlyperformanceRelaFiles(index, formData);
+                    const resp = await importMonthlyperformanceRelaFiles(code, formData);
 
                     if (resp) {
                         tableRef.current?.reload();
@@ -1076,7 +1069,7 @@ const MonthlyDataCheck: React.FC = () => {
                 }}
             >
                 <FormItem name={'importFile'}>
-                    <BMSUpload downloadTemplateFile={auditType == '0' ? () => index == 4 || index == 7 ? downloadTemplate(index, index == 7 ? currentSelectedTreeNode.code : currentSelectedManaGroup?.id) : downloadTemplate(index) : () => { }} />
+                    <BMSUpload downloadTemplateFile={auditType == '0' ? () => code == 'kpi_assessment' || code == 'kpi_unit_cost' ? downloadTemplate(code, code == 'kpi_unit_cost' ? currentSelectedTreeNode.code : currentSelectedManaGroup?.id) : downloadTemplate(code) : () => { }} />
                 </FormItem>
 
             </ModalForm>
@@ -1110,8 +1103,8 @@ const MonthlyDataCheck: React.FC = () => {
         }
     }
 
-    const downloadTemplate = async (index: number, id?: number) => {
-        await downloadTemplateReq(index, id);
+    const downloadTemplate = async (code: string, id?: number) => {
+        await downloadTemplateReq(code, id);
 
 
         // if(index == 4){
@@ -1172,31 +1165,32 @@ const MonthlyDataCheck: React.FC = () => {
 
     useEffect(() => {
         //清空表格筛选项
+
         set_tableDataFilterParams(undefined);
         set_currentSelectedTreeNode(undefined);
 
-        if (currentSelectedTabKey == '1') {
+        if (currentSelectedTabKey == 'kpi_salary') {
             set_tableColumn(tableColumnOne as ProColumns[]);
         }
-        if (currentSelectedTabKey == '2') {
+        if (currentSelectedTabKey == 'kpi_non_assessment') {
             set_tableColumn(tableColumnTwo as ProColumns[]);
         }
-        if (currentSelectedTabKey == '3') {
+        if (currentSelectedTabKey == 'kpi_assessment') {
             if (currentComputeDate) {
                 getCheckUnitTreeDataFunc(currentComputeDate as string);
             }
             set_tableColumn(tableColumnThree as ProColumns[]);
         }
-        if (currentSelectedTabKey == '4') {
+        if (currentSelectedTabKey == 'kpi_manage_indicator') {
             getManaIndiGroupRequest();   //获取分组
         }
-        if (currentSelectedTabKey == '5') {
+        if (currentSelectedTabKey == 'kpi_income') {
             set_tableColumn(tableColumnFive as ProColumns[]);
         }
-        if (currentSelectedTabKey == '6') {
+        if (currentSelectedTabKey == 'kpi_cost') {
             set_tableColumn(tableColumnFive as ProColumns[]);
         }
-        if (currentSelectedTabKey == '7') {
+        if (currentSelectedTabKey == 'kpi_unit_cost') {
             if (currentComputeDate) {
                 getCheckUnitTreeDataFunc(currentComputeDate as string);
             }
@@ -1206,7 +1200,7 @@ const MonthlyDataCheck: React.FC = () => {
     }, [currentSelectedTabKey]);
 
     useEffect(() => {
-        if (currentSelectedTabKey == '7') {
+        if (currentSelectedTabKey == 'kpi_cost') {
             // if (currentComputeDate) {
             //     getCheckUnitTreeDataFunc(currentComputeDate as string);
             // }
@@ -1251,9 +1245,11 @@ const MonthlyDataCheck: React.FC = () => {
         getComputeMethod();
 
         const tabs = access.whatCanIDoInThisPage(location.pathname.replace('/budgetManaSystem', ''));
-        const tabsNameArr = tabs.map((a:any)=>a.name);
-        const needShowTabs = tabData.filter(a=>tabsNameArr.includes(a.label));
+        const tabsNameArr = tabs.map((a: any) => a.code);
+        const needShowTabs = tabData.filter(a => tabsNameArr.includes(a.key));
+
         set_tabs(needShowTabs);
+        needShowTabs.length > 0 && set_currentSelectedTabKey(needShowTabs[0].key);
         window.addEventListener('resize', (e) => handleResize(e)) //监听窗口大小改变
         doResize();
         return () => {
@@ -1266,7 +1262,7 @@ const MonthlyDataCheck: React.FC = () => {
         <div className='MonthlyDataCheck'>
             {
                 true && (
-                    <BMSModalForm formRef={formRef} open={editModalVisible} initialValues={isTableEdit ? { ...currentEditRecord } : {}} title={isTableEdit ? '编辑' : '新增'}
+                    <BMSModalForm formRef={formRef} open={editModalVisible} initialValues={isTableEdit ? { ...currentEditRecord } : { unitCode: 'A010101' }} title={isTableEdit ? '编辑' : '新增'}
                         size="middle" width={737} onOpenChange={onVisibleChangeHandle}
                         modalProps={{
                             destroyOnClose: true
@@ -1274,7 +1270,7 @@ const MonthlyDataCheck: React.FC = () => {
                         onFinish={(val: any) => tableFormCommit(val, isTableEdit ? 'edit' : 'add')}
                     >
                         {
-                            currentSelectedTabKey == '1' && (
+                            currentSelectedTabKey == 'kpi_salary' && (
                                 <>
                                     <ProFormText width="md" name="itemName" label="项目名" disabled />
                                     <ProFormText width="md" name="itemTypeName" label="类型" disabled />
@@ -1284,52 +1280,69 @@ const MonthlyDataCheck: React.FC = () => {
                             )
                         }
                         {
-                            currentSelectedTabKey == '2' && (
+                            currentSelectedTabKey == 'kpi_non_assessment' && (
                                 <>
                                     <ProForm.Group >
-                                        <ProFormSelect
-                                            name="deptCode"
-                                            label="科室名称"
+                                        <ProFormTreeSelect
+                                            name="unitCode"
+                                            label="核算单元"
                                             placeholder="请选择"
                                             colProps={{ span: 12 }}
                                             rules={[{ required: true }]}
                                             request={async () => {
-                                                const resp = await getDepLists();
+                                                const resp = await getHesuanUnits(currentComputeDate as string);
                                                 if (resp) {
-
-                                                    return resp.map((a: any) => ({
-                                                        label: a.deptName, value: a.deptCode, d: a
-                                                    }))
+                                                    return resp
                                                 }
                                                 return []
                                             }}
                                             fieldProps={{
                                                 showSearch: true,
+                                                treeDefaultExpandedKeys: ['A010101'],
+                                                filterTreeNode(inputValue, treeNode) {
+                                                    const match = `${treeNode.name}`.indexOf(inputValue) != -1;
+
+                                                    if (match && !treeNode.isLeaf && !treeNode.children) {
+                                                        // Do some loading logic
+                                                    }
+
+                                                    return match;
+                                                },
+                                                fieldNames: {
+                                                    label: 'name',
+                                                    value: 'code',
+                                                    children: 'child'
+                                                },
+                                                treeExpandAction: false,
+                                                switcherIcon: (props: any) => {
+                                                    const { expanded } = props;
+                                                    return !expanded ? <img style={{ width: 20, height: 20, position: 'relative', top: 2 }} src={expandedIcon} /> : <img style={{ width: 20, height: 20, position: 'relative', top: 2 }} src={closeIcon} />
+                                                },
                                                 onChange: (value) => {
-                                                    formRef.current?.setFieldValue('unitCode', '');
+                                                    formRef.current?.setFieldValue('deptCode', '');
                                                 }
                                             }}
                                         />
 
-                                        <ProFormDependency name={['deptCode']}>
+                                        <ProFormDependency name={['unitCode']}>
                                             {
-                                                ({ deptCode }) => {
+                                                ({ unitCode }) => {
                                                     // console.log({deptCode});
                                                     return (
                                                         <ProFormSelect
-                                                            disabled={deptCode ? false : true}
-                                                            name="unitCode"
-                                                            label="核算单元"
+                                                            name="deptCode"
+                                                            label="科室名称"
                                                             colProps={{ span: 12 }}
                                                             placeholder="请选择"
-                                                            rules={[{ required: true }]}
-                                                            params={deptCode}
+                                                            // rules={[{ required: true }]}
+                                                            params={unitCode}
                                                             request={async () => {
-                                                                if (deptCode) {
-                                                                    const resp = await getHesuanUnits(deptCode);
+                                                                if (unitCode) {
+
+                                                                    const resp = await getDepLists(unitCode);
                                                                     if (resp) {
-                                                                        return resp.map((a: any) => ({
-                                                                            label: a.unitName, value: a.unitCode, d: a
+                                                                        return resp.list.map((a: any) => ({
+                                                                            label: a.deptName, value: a.deptCode, d: a
                                                                         }))
                                                                     }
                                                                 }
@@ -1338,7 +1351,6 @@ const MonthlyDataCheck: React.FC = () => {
                                                             fieldProps={{
                                                                 showSearch: true,
                                                                 onChange: (value) => {
-
                                                                     formRef.current?.setFieldValue('targetValue', '');
                                                                 }
                                                             }}
@@ -1368,7 +1380,6 @@ const MonthlyDataCheck: React.FC = () => {
                                             fieldProps={{
                                                 labelInValue: true,
                                                 onChange: (value) => {
-
                                                     const { d: { distributionTypeName } } = value;
                                                     formRef.current?.setFieldValue('distributionTypeName', distributionTypeName);
                                                 }
@@ -1408,7 +1419,7 @@ const MonthlyDataCheck: React.FC = () => {
 
                                                                     if (resp) {
                                                                         return resp.map((a: any) => ({
-                                                                            label: a.name, value: a.userId, d: a
+                                                                            label:`${a.name}-${a.userId}`, value: a.userId, d: a
                                                                         }))
                                                                     }
                                                                 }
@@ -1451,19 +1462,21 @@ const MonthlyDataCheck: React.FC = () => {
                             <span>点击检查</span>
                             是否有未对照的人员信息、未对照的科室信息及未设置的收费项目信息
                         </div> */}
-                                <Tabs
-                                    defaultActiveKey="1"
-                                    onChange={onTabChange}
-                                    items={tabs}
-                                />
+                                {
+                                    tabs.length > 0 && <Tabs
+                                        defaultActiveKey={tabs[0].key}
+                                        onChange={onTabChange}
+                                        items={tabs}
+                                    />
+                                }
 
                                 {
-                                    currentSelectedTabKey == '1' && (
+                                    currentSelectedTabKey == 'kpi_salary' && (
                                         <div className='tabContent'>
                                             <div className='tableToolbar'>
                                                 <div className='filter'>
                                                     <div className='search'>
-                                                        <span>科室名称:</span><Input className='searchInput' allowClear placeholder="请输入" onChange={(e) => {
+                                                        <span>核算单元名称:</span><Input className='searchInput' allowClear placeholder="请输入" onChange={(e) => {
                                                             set_tableDataSearchKeywords(e.target.value);
                                                             if (e.target.value.length == 0) {
                                                                 set_tableDataFilterParams({
@@ -1472,8 +1485,9 @@ const MonthlyDataCheck: React.FC = () => {
                                                                 });
                                                             }
                                                         }} suffix={
-                                                            <IconFont type="iconsousuo" style={{ color: '#99A6BF' }} onClick={() => tableDataSearchHandle('deptName')} />
+                                                            <IconFont type="iconsousuo" onClick={() => tableDataSearchHandle('deptName')} />
                                                         } />
+
                                                     </div>
                                                 </div>
                                                 <Popover open={ifShowTip} content={'当前处于审核中,无法操作!'} placement='topRight'>
@@ -1483,7 +1497,7 @@ const MonthlyDataCheck: React.FC = () => {
                                                     >
                                                         {/* <span key="1">调整</span> */}
                                                         {/* <span key="2" onClick={() => generateFunc()}>获取</span> */}
-                                                        {importData(1, '固定工资')}
+                                                        {importData('kpi_salary', '固定工资')}
                                                     </div>
                                                 </Popover>
                                             </div>
@@ -1551,18 +1565,18 @@ const MonthlyDataCheck: React.FC = () => {
                                                         }
                                                     },
 
-                                                ]} request={(params, sort, filter) => getTableData('1', params, sort, filter)} />}
+                                                ]} request={(params, sort, filter) => getTableData('kpi_salary', params, sort, filter)} />}
                                         </div>
                                     )
                                 }
 
                                 {
-                                    currentSelectedTabKey == '2' && (
+                                    currentSelectedTabKey == 'kpi_non_assessment' && (
                                         <div className='tabContent'>
                                             <div className='tableToolbar'>
                                                 <div className='filter'>
                                                     <div className='search'>
-                                                        <span>科室名称:</span><Input className='searchInput' allowClear placeholder="请输入" onChange={(e) => {
+                                                        <span>核算单元名称:</span><Input className='searchInput' allowClear placeholder="请输入" onChange={(e) => {
                                                             set_tableDataSearchKeywords(e.target.value);
                                                             if (e.target.value.length == 0) {
                                                                 set_tableDataFilterParams({
@@ -1582,7 +1596,7 @@ const MonthlyDataCheck: React.FC = () => {
                                                     >
                                                         {/* <span key="1" onClick={() => generateFunc(2)} >获取</span>
                                             <span key="2" >导入</span> */}
-                                                        {importData(2, '非考核项目')}
+                                                        {importData('kpi_non_assessment', '非考核项目')}
                                                         {!ifBanAllAction && <span key="3" onClick={auditType == '0' ? () => tableDataAddHandle() : () => { }}>添加</span>}
                                                     </div>
                                                 </Popover>
@@ -1609,13 +1623,13 @@ const MonthlyDataCheck: React.FC = () => {
                                                             <a >删除</a>
                                                         </Popconfirm>
                                                     ],
-                                                }] : [...tableColumn]} request={(params, sort, filter) => getTableData('2', params, sort, filter)} />}
+                                                }] : [...tableColumn]} request={(params, sort, filter) => getTableData('kpi_non_assessment', params, sort, filter)} />}
                                         </div>
                                     )
                                 }
 
                                 {
-                                    currentSelectedTabKey == '3' && (
+                                    currentSelectedTabKey == 'kpi_assessment' && (
                                         <div className='tabContent'>
 
                                             <div className='tabContentInner'>
@@ -1716,8 +1730,8 @@ const MonthlyDataCheck: React.FC = () => {
                                                                         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>
+                                                                        <span key="1" onClick={auditType == '0' ? () => generateFunc('kpi_assessment', true) : () => { }}>获取单个</span>
+                                                                        <span key="2" onClick={auditType == '0' ? () => generateFunc('kpi_assessment') : () => { }}>获取所有</span>
                                                                     </div>
                                                                 </Popover>
                                                             )
@@ -1767,7 +1781,7 @@ const MonthlyDataCheck: React.FC = () => {
                                                             key: 'value',
 
                                                         }
-                                                    ]} request={(params, sort, filter) => getTableData('3', params, sort, filter)} />}
+                                                    ]} request={(params, sort, filter) => getTableData('kpi_assessment', params, sort, filter)} />}
                                                 </div>
 
                                             </div>
@@ -1776,7 +1790,7 @@ const MonthlyDataCheck: React.FC = () => {
                                     )
                                 }
                                 {
-                                    currentSelectedTabKey == '4' && (
+                                    currentSelectedTabKey == 'kpi_manage_indicator' && (
                                         <div className='tabContent'>
                                             <div className='tableToolbar'>
                                                 <div className='filter'>
@@ -1812,7 +1826,7 @@ const MonthlyDataCheck: React.FC = () => {
                                                         onMouseLeave={() => set_ifShowTip(false)}
                                                     >
                                                         {/* <span key="1">获取</span> */}
-                                                        {importData(4, '管理指标')}
+                                                        {importData('kpi_manage_indicator', '管理指标')}
                                                     </div>
                                                 </Popover>
                                             </div>
@@ -1827,12 +1841,12 @@ const MonthlyDataCheck: React.FC = () => {
                                                 render: (_: any, record: any) => [
                                                     <EditManaIndexTableRow record={record} key={'edit'} />
                                                 ],
-                                            }] : [...tableColumn]} pagination={false} params={tableDataFilterParams} request={(params, sort, filter) => getTableData('4', params, sort, filter)} />}
+                                            }] : [...tableColumn]} pagination={false} params={tableDataFilterParams} request={(params, sort, filter) => getTableData('kpi_manage_indicator', params, sort, filter)} />}
                                         </div>
                                     )
                                 }
                                 {
-                                    currentSelectedTabKey == '5' && (
+                                    currentSelectedTabKey == 'kpi_income' && (
                                         <div className='tabContent' >
                                             <div className='tableToolbar'>
                                                 <div className='filter'>
@@ -1856,17 +1870,17 @@ const MonthlyDataCheck: React.FC = () => {
                                                         onMouseLeave={() => set_ifShowTip(false)}
                                                     >
                                                         {/* <span key="1">获取</span> */}
-                                                        {importData(5, '收入')}
+                                                        {importData('kpi_income', '收入')}
                                                     </div>
                                                 </Popover>
                                             </div>
-                                            {currentComputeDate && <BMSTable actionRef={tableRef} rowKey='id' params={tableDataFilterParams} columns={tableColumn} request={(params, sort, filter) => getTableData('5', params, sort, filter)} />}
+                                            {currentComputeDate && <BMSTable actionRef={tableRef} rowKey='id' params={tableDataFilterParams} columns={tableColumn} request={(params, sort, filter) => getTableData('kpi_income', params, sort, filter)} />}
                                             <div className='totalCount'>合计:{totalNum}</div>
                                         </div>
                                     )
                                 }
                                 {
-                                    currentSelectedTabKey == '6' && (
+                                    currentSelectedTabKey == 'kpi_cost' && (
                                         <div className='tabContent'>
                                             <div className='tableToolbar'>
                                                 <div className='filter'>
@@ -1890,17 +1904,17 @@ const MonthlyDataCheck: React.FC = () => {
                                                         onMouseLeave={() => set_ifShowTip(false)}
                                                     >
                                                         {/* <span key="1">获取</span> */}
-                                                        {importData(6, '成本')}
+                                                        {importData('kpi_cost', '成本')}
                                                     </div>
                                                 </Popover>
                                             </div>
-                                            {currentComputeDate && <BMSTable actionRef={tableRef} rowKey='id' params={tableDataFilterParams} columns={tableColumn} request={(params, sort, filter) => getTableData('6', params, sort, filter)} />}
+                                            {currentComputeDate && <BMSTable actionRef={tableRef} rowKey='id' params={tableDataFilterParams} columns={tableColumn} request={(params, sort, filter) => getTableData('kpi_cost', params, sort, filter)} />}
                                             <div className='totalCount'>合计:{totalNum}</div>
                                         </div>
                                     )
                                 }
                                 {
-                                    currentSelectedTabKey == '7' && (
+                                    currentSelectedTabKey == 'kpi_unit_cost' && (
                                         <div className='tabContent'>
 
                                             <div className='tabContentInner'>
@@ -2005,8 +2019,8 @@ const MonthlyDataCheck: React.FC = () => {
                                                                             onMouseEnter={() => auditType == '0' ? set_ifShowTip(false) : set_ifShowTip(true)}
                                                                             onMouseLeave={() => set_ifShowTip(false)}
                                                                         >
-                                                                            <span key="1" onClick={auditType == '0' ? () => generateFunc(7, false) : () => { }}>获取</span>
-                                                                            <>{importData(7, '成本')}</>
+                                                                            <span key="1" onClick={auditType == '0' ? () => generateFunc('kpi_unit_cost', false) : () => { }}>获取</span>
+                                                                            <>{importData('kpi_unit_cost', '单元成本')}</>
                                                                         </div>
                                                                     </Popover>
                                                                 )
@@ -2015,7 +2029,7 @@ const MonthlyDataCheck: React.FC = () => {
                                                         </>
 
                                                     </div>
-                                                    {currentComputeDate && <BMSTable actionRef={tableRef} scroll={{ y: 666 }} loading={{ spinning: loading, tip: '正在获取数据...' }} rowKey='id' params={tableDataFilterParams} columns={[...tableColumn]} pagination={false} request={(params, sort, filter) => getTableData('7', params, sort, filter)} />}
+                                                    {currentComputeDate && <BMSTable actionRef={tableRef} scroll={{ y: 666 }} loading={{ spinning: loading, tip: '正在获取数据...' }} rowKey='id' params={tableDataFilterParams} columns={[...tableColumn]} pagination={false} request={(params, sort, filter) => getTableData('kpi_unit_cost', params, sort, filter)} />}
                                                 </div>
 
                                             </div>

+ 22 - 21
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-06-30 10:53:11
+ * @LastEditTime: 2023-09-21 13:44:47
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlyInfoCheck/service.ts
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -295,21 +295,22 @@ export const btnActGetData = (params: CheckProjectTableDataReqType) => {
 
 //获取科室
 
-export const getDepLists = () => {
+export const getDepLists = (unitCode:string) => {
 
-    return request('/performance/kpi/getNonAssessmentDept', {
-        method: 'GET'
+    return request('/performance/unit/getUnitDeptMap?pageSize=500&current=1', {
+        method: 'GET',
+        params:{unitCode:unitCode}
     })
 
 }
 
 //获取核算单元
 
-export const getHesuanUnits = (deptCode: string) => {
+export const getHesuanUnits = (computeDate: string) => {
 
-    return request('/performance/kpi/getNonAssessmentUnit', {
+    return request('/performance/secondSetting/getNonAssessmentUnitList', {
         method: 'GET',
-        params: { deptCode }
+        params: { computeDate }
     })
 
 }
@@ -492,43 +493,43 @@ export const checkMonthlyReq = (computeDate: string, auditType: string) => {
 
 
 
-export const importMonthlyperformanceRelaFiles = (index: number, data: any) => {
+export const importMonthlyperformanceRelaFiles = (code: string, data: any) => {
 
     /**
      * index : tab对应的表格顺序号
      */
 
-    if (index == 1) {
+    if (code == 'kpi_salary') {
         return request('/performance/kpi/importSalary', {
             method: 'POST',
             data
         })
     }
-    if (index == 2) {
+    if (code == 'kpi_non_assessment') {
         return request('/performance/kpi/importNonAssessment', {
             method: 'POST',
             data
         })
     }
-    if (index == 4) {
+    if (code == 'kpi_manage_indicator') {
         return request('/performance/kpi/importManager', {
             method: 'POST',
             data
         })
     }
-    if (index == 5) {
+    if (code == 'kpi_income') {
         return request('/performance/kpi/importIncome', {
             method: 'POST',
             data
         })
     }
-    if (index == 6) {
+    if (code == 'kpi_cost') {
         return request('/performance/kpi/importCost', {
             method: 'POST',
             data
         })
     }
-    if (index == 7) {
+    if (code == 'kpi_unit_cost') {
         return request('/performance/kpi/importUnitCost', {
             method: 'POST',
             data
@@ -540,27 +541,27 @@ export const importMonthlyperformanceRelaFiles = (index: number, data: any) => {
 
 //下载模板
 
-export const downloadTemplateReq = (index: number,id?:number|string) => {
+export const downloadTemplateReq = (code: string,id?:number|string) => {
 
 
     let path = '';
 
-    if (index == 1) {
+    if (code == 'kpi_salary') {
         path = '/gateway/performance/kpi/exportSalary'
     }
-    if (index == 2) {
+    if (code == 'kpi_non_assessment') {
         path = '/gateway/performance/kpi/exportNonAssessment'
     }
-    if(index == 4){
+    if(code == 'kpi_manage_indicator'){
         path = `/gateway/performance/kpi/exportManager?groupId=${id}`
     }
-    if(index == 5){
+    if(code == 'kpi_income'){
         path = `/gateway/performance/kpi/exportIncome`
     }
-    if(index == 6){
+    if(code == 'kpi_cost'){
         path = `/gateway/performance/kpi/exportCost`
     }
-    if(index == 7){
+    if(code == 'kpi_unit_cost'){
         path = `/gateway/performance/kpi/exportUnitCost?unitCode=${id}`
     }
 

+ 19 - 10
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-08-11 09:32:19
+ * @LastEditTime: 2023-09-08 09:52:31
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlySet/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -652,16 +652,25 @@ const MonthlyInfoCheck: React.FC = () => {
         set_treeData(resp);
     }
 
-    const importHandle = async () => {
+    const importHandle = () => {
 
         if(auditType == '0')return;
-        set_dataImportLoading(true);
-        const resp = await jixiaoDataImport(currentComputeDate as string);
-        if (resp) {
-            set_dataImportLoading(false);
-            message.success('操作成功!');
-            tableRef.current?.reload();
-        }
+        Modal.confirm({
+              title:'注意',
+              content:'绩效数据导入操作会覆盖当月已有的绩效数据,是否继续操作?',
+              onOk:async (...args)=>{
+                set_dataImportLoading(true);
+                const resp = await jixiaoDataImport(currentComputeDate as string);
+                if (resp) {
+                    set_dataImportLoading(false);
+                    message.success('操作成功!');
+                    tableRef.current?.reload();
+                }else{
+                    set_dataImportLoading(false);
+                }
+              },
+        })
+        
     }
 
     const ChangeTable = React.forwardRef(({reload}:{reload:boolean},ref) => {
@@ -1048,7 +1057,7 @@ const MonthlyInfoCheck: React.FC = () => {
                                 {!ifBanAllAction && (
                                     <div className='midLine'>
                                         <span onClick={() => checkBtnHandle()}>点击检查</span>
-                                        是否有未对照的人员信息、未对照的科室信息及未设置的收费项目信息
+                                        是否有异动的人员信息及科室信息
                                     </div>
                                 )}
                             </>

+ 8 - 2
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-08-15 10:47:59
+ * @LastEditTime: 2023-09-25 11:19:50
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/oneBatch/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -258,7 +258,13 @@ const OneBatch = () => {
         ellipsis: true,
         width: 200,
         renderText(text:any){
-             return formatMoneyNumber(text)
+          function formatMoney(num:number) {
+            if (typeof num !== 'number' || isNaN(num)) {
+              return '-';
+            } 
+            return new Intl.NumberFormat('en-US', { minimumFractionDigits: 0,maximumSignificantDigits:10}).format(num);
+          }
+          return formatMoney(text)
         }
       };
 

+ 2 - 2
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-08-25 17:55:28
+ * @LastEditTime: 2023-09-26 10:06:56
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/personnelSalaryBudget/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -372,7 +372,7 @@ const PersonnelSalaryBudget = () => {
             </div>
             {!ifBanAllAction&&<div className='countBtn' onClick={() => generateFunc(2)}>计算</div>}
             <div className='b'>计算结果</div>
-            {currentComputeDate && <BMSTable actionRef={tableRef} pagination={false} rowKey='unitType'  scroll={{ x: 160 * 11 }} columns={[...tableColumn, {
+            {currentComputeDate && <BMSTable actionRef={tableRef} pagination={false} rowKey='unitType'  scroll={{ x: 180 * 11 }} columns={[...tableColumn, {
                 title: '可分配考核奖金',
                 dataIndex: 'assessmentBonus',
                 key: 'assessmentBonus',

+ 4 - 0
src/pages/budgetMana/personnelSalaryBudget/style.less

@@ -9,6 +9,10 @@
         }
     }
 
+    a>.bms-ant-typography {
+        color: #3376FE !important;
+    }
+
     .checkBtn {
         position: absolute;
         cursor: pointer;

+ 46 - 36
src/pages/reportCheck/report/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-09-06 16:29:19
+ * @LastEditTime: 2023-09-26 14:12:12
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/oneBatch/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -125,15 +125,17 @@ const ReportTemplate = () => {
 
       const { title, data: assignmentData, reportName } = resp;
       set_reportName(reportName);
-      const columns:ProColumns[] = title.map((item: any, index: number) => {
+      const columns: ProColumns[] = title.map((item: any, index: number) => {
         return {
           title: item.name,
           dataIndex: `${item.columnName}`,
           key: `${item.columnName}`,
-          width: 100,
+          width: item.name.length * 25,
+          ellipsis: true,
+          fixed: item.freeze?true:false,
           hideInTable: item.hide,
           render: (_: any, record: any) => {
-
+            console.log({item});
             if (item.redirect) {
               if (item.redirectData && item.redirectData.length > 1) {
 
@@ -151,21 +153,22 @@ const ReportTemplate = () => {
                 return <Dropdown menu={{ items }}>
                   <a onClick={(e) => e.preventDefault()}>
                     <Space>
-                      {(item.dataType&&item.dataType == 2&&_)?formatMoneyNumber(Number(Number(_).toFixed(2))):_}
+                      {(item.dataType && item.dataType == 2 && _) ? formatMoneyNumber(Number(Number(_).toFixed(2))) : _}
                       <DownOutlined />
                     </Space>
                   </a>
                 </Dropdown>
               } else {
-                return <a className='active' onClick={() => reportJumphandle({ ...item.redirectData[0], ...record })}>{(item.dataType&&item.dataType == 2 && _)?formatMoneyNumber(Number(Number(_).toFixed(2))):_}</a>
+                return <a className='active' onClick={() => reportJumphandle({ ...item.redirectData[0], ...record })}>{(item.dataType && item.dataType == 2 && _) ? formatMoneyNumber(Number(Number(_).toFixed(2))) : _}</a>
               }
             }
 
-            return <span >{(item.dataType&&item.dataType == 2&& _)?formatMoneyNumber(Number(Number(_).toFixed(2))):_}</span>
+            return <span >{(item.dataType && item.dataType == 2 && _) ? formatMoneyNumber(Number(Number(_).toFixed(2))) : _}</span>
           }
 
         }
       });
+      console.log({columns});
       set_tableColumn([...columns]);
 
       const data = assignmentData.map((item: any) => {
@@ -280,36 +283,43 @@ const ReportTemplate = () => {
 
   return (
     <BMSPagecontainer className='ReportTemplate' title={false}>
-      {currentComputeDate && (<div className='search'>
-        <span>核算年月:</span>
-        <DatePicker
-          onChange={(data, dateString) => {
-            set_tableDataFilterParams({ ...tableDataFilterParams, parameter: { ...tableDataFilterParams.parameter, compute_date: dateString } });
-          }}
-          allowClear={false}
-          picker='month'
-          locale={locale}
-          defaultValue={moment(currentComputeDate, 'YYYY-MM')}
-          format='YYYY-MM' placeholder="请选择核算年月" />
-      </div>)}
-      <div className='export' onClick={() => exportHandle()}>导出</div>
-      <div className='breadcrumb'>
-        {
-          breadCrumbList.length > 1 && breadCrumbList.map((item: any, index: number) => {
-            return (
-              <span className={index != step ? 'tab' : 'tab actived'} key={index} onClick={() => { index != step && switchHandle(item) }}>{item.name}{index == breadCrumbList.length - 1 ? '' : ' / '}</span>
-            )
-          })
-        }
-      </div>
-      <div className='content'>
-        {currentComputeDate && <BMSTable actionRef={tableRef} rowKey='id' pagination={false} columns={tableColumn as ProColumns[]}
-          params={tableDataFilterParams}
-          scroll={{ x: 100 * tableColumn.length, y: tableH }}
-          request={(params, sort, filter) => getTableData(params, sort, filter)}
-        />}
-      </div>
 
+      {
+        breadCrumbList.length > 1 && <div className='breadcrumb'>
+          {
+            breadCrumbList.map((item: any, index: number) => {
+              return (
+                <>
+                  <span className={index != step ? 'tab' : 'tab actived'} key={index} onClick={() => { index != step && switchHandle(item) }}>{item.name}</span>{index == breadCrumbList.length - 1 ? '' : <span style={{ color: '#7A8599' }}> / </span>}
+                </>
+              )
+            })
+          }
+        </div>
+      }
+      <div className='contentWrap'>
+        {currentComputeDate && (<div className='search'>
+          <span>核算年月:</span>
+          <DatePicker
+            onChange={(data, dateString) => {
+              set_tableDataFilterParams({ ...tableDataFilterParams, parameter: { ...tableDataFilterParams.parameter, compute_date: dateString } });
+            }}
+            allowClear={false}
+            picker='month'
+            locale={locale}
+            defaultValue={moment(currentComputeDate, 'YYYY-MM')}
+            format='YYYY-MM' placeholder="请选择核算年月" />
+        </div>)}
+        <div className='export' onClick={() => exportHandle()}>导出</div>
+
+        <div className='content'>
+          {currentComputeDate && <BMSTable actionRef={tableRef} rowKey='id' pagination={false} columns={tableColumn as ProColumns[]}
+            params={tableDataFilterParams}
+            scroll={{ x: 100 * tableColumn.length, y: tableH }}
+            request={(params, sort, filter) => getTableData(params, sort, filter)}
+          />}
+        </div>
+      </div>
     </BMSPagecontainer>
   )
 }

+ 39 - 34
src/pages/reportCheck/report/style.less

@@ -1,59 +1,64 @@
 .ReportTemplate {
-    position: relative;
-    padding: 16px;
-    // height: 100%;
-    border-radius: 4px;
-    background: #fff;
-
-    .export {
-        position: absolute;
-        top: 16px;
-        right: 16px;
-        width: 56px;
-        height: 24px;
-        color: #fff;
-        text-align: center;
-        line-height: 24px;
-        cursor: pointer;
-        background: #3377FF;
-        border-radius: 4px;
-    }
-
     .breadcrumb {
         margin-top: 8px;
+        margin-bottom: 16px;
+        height: 14px;
 
         .tab {
-            font-size: 12px;
-            color: #2c323c;
+            font-size: 14px;
+            color: #7A8599;
             cursor: pointer;
-
+            padding: 4px;
             &:hover {
-                text-decoration: underline;
+                background: #E6EAF2;
+                border-radius: 4px;
             }
 
             &.actived {
-                color: #7A8599;
-
+                color: #17181A;
                 &:hover {
                     cursor: default;
+                    color: #17181A;
                     text-decoration: none;
+                    background: transparent;
                 }
             }
         }
     }
 
-    .content {
+    .contentWrap {
         position: relative;
-        padding-top: 8px;
+        padding: 16px;
+        border-radius: 4px;
+        background: #fff;
 
-        .bms-ant-tabs-nav {
-            &::before {
-                border-bottom: none !important;
-            }
+        .export {
+            position: absolute;
+            top: 16px;
+            right: 16px;
+            width: 56px;
+            height: 24px;
+            color: #fff;
+            text-align: center;
+            line-height: 24px;
+            cursor: pointer;
+            background: #3377FF;
+            border-radius: 4px;
         }
 
-        .bms-ant-table-body {
-            max-height: calc(100vh - 210px) !important;
+        .content {
+            position: relative;
+            padding-top: 8px;
+
+            .bms-ant-tabs-nav {
+                &::before {
+                    border-bottom: none !important;
+                }
+            }
+
+            .bms-ant-table-body {
+                max-height: calc(100vh - 210px) !important;
+            }
         }
     }
 }

+ 0 - 1
src/pages/secondaryDistribute/employeeInfoCheck/index.tsx

@@ -558,7 +558,6 @@ const EmployeeInfoCheck: React.FC = () => {
                         placeholder="请输入类目名称"
                         size='small'
                         allowClear
-
                         style={{ marginBottom: 16 }}
                         onChange={onTreeSearchKeyChange}
                         suffix={

+ 1 - 1
src/pages/secondaryDistribute/employeeInfoCheck/style.less

@@ -95,7 +95,7 @@
                 color: #00B3B3;
                 padding-right: 4px;
             }
-
+            
         }
 
         .bms-ant-tabs-nav {

+ 7 - 11
src/pages/secondaryDistribute/nonCheckProjectApprove/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-08-17 15:11:34
+ * @LastEditTime: 2023-09-25 15:23:03
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlySet/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -42,6 +42,7 @@ import moment from 'moment';
 import { getCheckUnitDepMapTableDataByUnitClass } from '@/pages/setting/checkUnitSet/checkUnitDepMap/service';
 import { getPersonInfoTableData } from '../employeeInfoCheck/service';
 import { getJiezhuanStatus } from '@/pages/budgetMana/monthlySet/service';
+import { getEmps } from '@/pages/budgetMana/monthlyDataCheck/service';
 
 
 
@@ -273,7 +274,7 @@ const NonCheckProjectApprove: React.FC = () => {
 
                         return []
                     }}
-                    rules={[{ required: true, message: '科室不能为空!' }]}
+          
                 />
                 <ProFormSelect
                     name="nonAssessmentCode"
@@ -308,7 +309,7 @@ const NonCheckProjectApprove: React.FC = () => {
                     }
                 </ProFormDependency>
                 <ProFormDigit label="数值" name="value" min={-1000000000000000} rules={[{ required: true }]} />
-                <ProFormDependency name={['distributionTypeName']}>
+                <ProFormDependency name={['distributionTypeName','deptCode']}>
                     {
                         ({ distributionTypeName }) => {
 
@@ -323,16 +324,11 @@ const NonCheckProjectApprove: React.FC = () => {
                                         showSearch: true,
                                     }}
                                     request={async () => {
-                                        const resp = await getPersonInfoTableData({
-                                            computeDate: currentComputeDate as string,
-                                            unitCode: currentSelectedTreeNode.code,
-                                            pageSize: 500,
-                                            current: 1
-                                        });
+                                        const resp = await getEmps(currentSelectedTreeNode.code);
 
                                         if (resp) {
-                                            return resp.list.map((a: any) => ({
-                                                label: a.empName, value: a.empNo, d: a
+                                            return resp.map((a: any) => ({
+                                                label:`${a.name}-${a.userId}`, value: a.userId, d: a
                                             }))
                                         }
                                         return []

+ 11 - 8
src/pages/secondaryDistribute/secondaryDitriComputed/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-08-18 10:52:47
+ * @LastEditTime: 2023-09-25 13:57:31
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlySet/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -285,8 +285,6 @@ const SecondaryDitriComputed: React.FC = () => {
         return []
     }
 
-
-
     const buildTableData = (resp: any, inputsRefKeys?: string[]) => {
         const { title, userList } = resp;
         const _columns = gennerateColumns(resp, inputsRefKeys);
@@ -309,7 +307,7 @@ const SecondaryDitriComputed: React.FC = () => {
         const leftTotal = resp.totalBonus - compeltedTotal;
         set_pageData({ ...pageData, total: resp.totalBonus?resp.totalBonus.toFixed(2):0, completedTotal: compeltedTotal.toFixed(2), leftTotal: Number(leftTotal.toFixed(2)) });
 
-        set_dataSource(data)
+        set_dataSource(data);
     }
 
 
@@ -438,7 +436,7 @@ const SecondaryDitriComputed: React.FC = () => {
         return parentKey!;
     };
 
-
+    
     const onTreeSearchKeyChange = (e: React.ChangeEvent<HTMLInputElement>) => {
 
         const { value } = e.target;
@@ -520,8 +518,9 @@ const SecondaryDitriComputed: React.FC = () => {
 
     const getTreeReqFunc = async (computeDate: string, type: string) => {
         const resp = await getTreeData(computeDate, type);
-        set_treeData(resp);
-        set_treeDataDefault(resp);
+        if(resp){
+            set_treeDataDefault(resp);
+        }
     }
 
 
@@ -686,7 +685,11 @@ const SecondaryDitriComputed: React.FC = () => {
             inputsRef.current[`${inputsRefKeys[0]}`].focus();
             set_currentInputRefKeys(inputsRefKeys[0]);
         }
-    }, [inputsRef, inputsRefKeys])
+    }, [inputsRef, inputsRefKeys]);
+
+    useEffect(()=>{
+         changeTreeDataFilter(currentTreeDataFilter);
+    },[treeDataDefault])
 
     useEffect(() => {
         set_tableColumn(column as ProColumns[]);

+ 396 - 138
src/pages/setting/checkUnitSet/checkUnitEmpSet/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-08-11 10:51:44
+ * @LastEditTime: 2023-09-25 15:24: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,15 +16,15 @@ import BMSPagecontainer from '@/components/BMSPageContainer';
 import { useEffect, useImperativeHandle, useRef, useState } from 'react';
 import './style.less';
 
-import { TreeProps, Input, Modal, Transfer, Popconfirm, Table, message } from 'antd';
+import { TreeProps, Input, Modal, Transfer, Popconfirm, Tabs, message,Switch } from 'antd';
 import { DataNode } from 'antd/es/tree';
 
 import expandedIcon from '../../../../../static/treenode_open.png';
 import closeIcon from '../../../../../static/treenode_collapse.png';
 import { BMSTable } from '@/components/BMSTable';
-import { ActionType, ProColumns} from '@ant-design/pro-components';
+import { ActionType, ModalForm, ProColumns } from '@ant-design/pro-components';
 import { createFromIconfontCN } from '@ant-design/icons';
-import { CheckUnitEmpMapTableDataType, delTableData,addMapEmp,getCheckUnitEmpMapTableDataByUnitClass,getMapEmpList, getTreeData, getTreeDataRespType, updateEmpInfoReq } from './service';
+import { CheckUnitEmpMapTableDataType, delTableData, addMapEmp, getCheckUnitEmpMapTableDataByUnitClass, getMapEmpList, getTreeData, getTreeDataRespType, updateEmpInfoReq, moveEmpToUnit, getEmpUnitMap } from './service';
 import { TransferItem, TransferProps } from 'antd/es/transfer';
 
 import difference from 'lodash/difference';
@@ -35,12 +35,13 @@ import 'dayjs/locale/zh-cn';
 
 import React from 'react';
 import DirectoryTree from 'antd/es/tree/DirectoryTree';
-import { getDeepestTreeData } from '@/utils/tooljs';
+import { findAllParents, findParentCodes, getDeepestTreeData } from '@/utils/tooljs';
 
 import { ColumnsType, TableRowSelection } from 'antd/es/table/interface';
 
 import '../../../../utils/zhongtaiB';
 import '../../../../utils/zhongtaiC';
+import { getAllCheckUnit } from '../../projectSetting/checkUnitProjectSet/service';
 
 const IconFont = createFromIconfontCN({
     scriptUrl: '',
@@ -64,19 +65,26 @@ const CheckUnitDepMap: React.FC = () => {
     const [treeData, set_treeData] = useState<getTreeDataRespType[]>([]);
     const [tableColumn, set_tableColumn] = useState<ProColumns[]>([]);
     const [currentSelectedTreeNode, set_currentSelectedTreeNode] = useState<any | undefined>();
+    const [currentTabKey, set_currentTabKey] = useState('1');
 
     const [tableDataFilterParams, set_tableDataFilterParams] = useState<any | undefined>(undefined);
-    const [tableDataSearchKeywords,set_tableDataSearchKeywords] = useState('');
+    const [tableDataSearchKeywords, set_tableDataSearchKeywords] = useState('');
 
-    const [tableData,set_tableData] = useState<CheckUnitEmpMapTableDataType[]>([]);
+    const [tableData, set_tableData] = useState<CheckUnitEmpMapTableDataType[]>([]);
+
+    const [currentSelectedEmp, set_currentSelectedEmp] = useState<undefined | any>(undefined); //当前操作的人员
 
     const [expandedKeys, setExpandedKeys] = useState<React.Key[]>([]);
     const [searchValue, setSearchValue] = useState('');
     const [autoExpandParent, setAutoExpandParent] = useState(true);
 
+    const [ifShowModal, set_ifShowModal] = useState(false);
+
+    const tableSelecterRef = React.createRef<{ save: any; getSelectedKeys: any }>();
+
     const tableRef = useRef<ActionType>();
 
-    const column = [
+    const column:ProColumns[] = [
         {
             title: '工号',
             dataIndex: 'account'
@@ -110,10 +118,18 @@ const CheckUnitDepMap: React.FC = () => {
             dataIndex: 'positionRate',
         },
         {
-            title: '学历',
-            dataIndex: 'degreeName',
+            title: '核算单元',
+            dataIndex: 'unitName',
+            hideInTable:currentTabKey == '1',
+            render: (_: any, record: any) => {
+                 return _
+            }
         },
         // {
+        //     title: '学历',
+        //     dataIndex: 'degreeName',
+        // },
+        // {
         //     title: '入职时间',
         //     dataIndex: 'entryTime',
         // },
@@ -125,8 +141,19 @@ const CheckUnitDepMap: React.FC = () => {
             title: '操作',
             key: 'option',
             valueType: 'option',
+            hideInTable:currentTabKey == '1',
+            render: (_: any, record: any) => {
+                  return <a onClick={() => { set_currentSelectedEmp(record); set_ifShowModal(true) }}>选择单元</a>
+            },
+        }, 
+        {
+            title: '操作',
+            key: 'option',
+            valueType: 'option',
+            hideInTable:currentTabKey == '2',
             render: (_: any, record: any) => {
                 return [
+                    <a onClick={() => { set_currentSelectedEmp(record); set_ifShowModal(true) }}>移动</a>,
                     <Popconfirm
                         title="是否确认删除?"
                         key="del"
@@ -139,6 +166,18 @@ const CheckUnitDepMap: React.FC = () => {
         },
     ];
 
+    const tableSelecterColumn = [
+        {
+            title: '核算单元名称',
+            dataIndex: 'unitName',
+        },
+        {
+            title: '职类',
+            dataIndex: 'unitTypeName',
+
+        },
+    ]
+
 
     const delTableDataHandle = async (record: any) => {
         const resp: any = await delTableData(record.id);
@@ -158,26 +197,42 @@ const CheckUnitDepMap: React.FC = () => {
 
 
 
-    const getTableData = async (type: 'PERSON' | 'DEP' | 'CHARGE', params: any, sort: any, filter: any) => {
+    const getTableData = async ( params: any, sort: any, filter: any) => {
         // console.log({ currentSelectedTreeNode });
         // console.log({ params, sort, filter });
 
         if (currentSelectedTreeNode) {
-            const resp = await getCheckUnitEmpMapTableDataByUnitClass({
-                ...params,
-                unitCode: currentSelectedTreeNode.code,
+            if(currentTabKey == '1'){
+                const resp = await getCheckUnitEmpMapTableDataByUnitClass({
+                    ...params,
+                    unitCode: currentSelectedTreeNode.code,
+    
+                });
+                if (resp) {
+                    set_tableData(resp.list);
+                    return {
+                        data: resp.list,
+                        success: true,
+                        total: resp.totalCount,
+                        pageSize: resp.pageSize,
+                        totalPage: resp.totalPage,
+                    }
+                }
+            }
 
-            });
-            if (resp) {
-                set_tableData(resp.list);
-                return {
-                    data: resp.list,
-                    success: true,
-                    total: resp.totalCount,
-                    pageSize: resp.pageSize,
-                    totalPage: resp.totalPage,
+            if(currentTabKey == '2'){
+                const resp = await getEmpUnitMap({
+                    ...params,
+                });
+                if (resp) {
+                    set_tableData(resp);
+                    return {
+                        data: resp,
+                        success: true,
+                    }
                 }
             }
+            
             return {
                 data: [],
                 success: true
@@ -189,6 +244,163 @@ const CheckUnitDepMap: React.FC = () => {
     }
 
 
+    const TableSelecter = React.forwardRef(({ tableSelecterColumn, record }: any, ref) => {
+
+        const [datasource, set_datasource] = useState<any[]>([]);
+        const [selectedKeys, setSelectedKeys] = useState<React.Key[]>([]);
+        const [selectedRows, set_selectedRows] = useState<any[]>([])
+        const [showList, set_showList] = useState<any[]>([]);
+        const [tableParams, set_tableParams] = useState<any>({});
+        const [keywords, set_keywords] = useState('');
+        const [allParentsNode, set_allParentsNode] = useState<any[]>([]);
+
+        //获取表格数据
+        const getFuncList = async () => {
+            const resp = await getAllCheckUnit();
+            if (resp) {
+                if(currentTabKey == '1'){
+                    const filteredData = resp.filter((a: any) => a.code != currentSelectedTreeNode.code);
+                    set_datasource(filteredData);
+                    set_showList(filteredData);
+                }
+                if(currentTabKey == '2'){
+                    const filteredData = resp.filter((a: any) => a.code != currentSelectedEmp.unitCode);
+                    set_datasource(filteredData);
+                    set_showList(filteredData);
+                }
+            }
+        }
+
+        const onSelectHandle = (record: any, selected: boolean, selectedRows: any[], nativeEvent: any) => {
+
+            // console.log({selectedRows});
+
+            if (selected) {
+                let data = [...datasource];
+                let parent = record.parentCode != 0 ? findAllParents([...data], `${record.parentCode}`) : undefined;
+
+                parent = parent ? parent.filter(obj => Object.keys(obj).length !== 0) : [];
+
+                set_allParentsNode([...allParentsNode, ...parent]);
+
+                let result = [...selectedRows, ...parent];
+
+                result = result.filter(obj => Object.keys(obj).length !== 0);
+
+                const _result = Array.from(new Set(result.map(obj => JSON.stringify(obj)))).map(str => JSON.parse(str));
+
+                setSelectedKeys([...selectedRows.map((a: { code: any; }) => a.code)]);
+                set_selectedRows([...selectedRows, ..._result]);
+            } else {
+                if (record.children) {
+                    const parentCodes = findParentCodes(record);
+
+                    //除去取消勾选的父级
+                    const _allParentsNode = allParentsNode.filter(a => !parentCodes.includes(a.code));
+                    set_allParentsNode([..._allParentsNode]);
+                    setSelectedKeys([...selectedRows.map((a: { code: any; }) => a.code)]);
+                    set_selectedRows([...selectedRows]);
+                } else {
+                    setSelectedKeys([...selectedRows.map((a: { code: any; }) => a.code)]);
+                    set_selectedRows([...selectedRows]);
+                }
+            }
+
+
+
+        };
+
+        const onSelectAllHandle = (selected: boolean, selectedRows: any[], changeRows: any[]) => {
+            if (selected) {
+                setSelectedKeys([...selectedRows.map((a: { code: any; }) => a.code)]);
+                set_selectedRows([...selectedRows]);
+            } else {
+                set_allParentsNode([]);
+                setSelectedKeys([]);
+                set_selectedRows([]);
+            }
+
+        }
+
+        const save = async () => {
+            if (selectedKeys.length == 0) {
+                set_ifShowModal(false);
+                return
+            }
+            const result = {
+                ...currentSelectedEmp,
+                unitCode: selectedKeys[0]
+            }
+            const resp = await moveEmpToUnit(result);
+            if (resp) {
+                message.success('操作成功!');
+                set_ifShowModal(false);
+                tableRef.current?.reload();
+            }
+        }
+
+        useEffect(() => {
+            getFuncList();
+        }, [])
+
+        return (
+            <div className='TableSelecter'>
+                <Input placeholder={'请输入'} allowClear
+                    suffix={
+                        <IconFont type="iconsousuo" onClick={() => {
+
+                        }} />
+                    }
+                    style={{ marginBottom: 8 }}
+                    onChange={(e) => {
+                        if (e.target.value.length != 0) {
+                            const result = datasource.filter(item => item.unitName.indexOf(e.target.value) != -1);
+                            set_showList(result);
+                        } else {
+                            set_showList(datasource);
+                        }
+
+                    }}
+
+
+                />
+                <div className='wrapper' style={{ maxHeight: '491px', overflowY: 'scroll' }}>
+                    <BMSTable columns={tableSelecterColumn}
+                        options={{
+                            density: true,
+                            setting: {
+                                listsHeight: 100,
+                            },
+                        }}
+                        params={tableParams}
+                        rowKey='code'
+                        tableAlertRender={false}
+                        rowSelection={{
+                            // 自定义选择项参考: https://ant.design/components/table-cn/#components-table-demo-row-selection-custom
+                            // 注释该行则默认不显示下拉选项
+                            selectedRowKeys: selectedKeys,
+                            onSelect: onSelectHandle,
+                            checkStrictly: false,
+                            type: 'radio',
+                            onSelectAll(selected, selectedRows, changeRows) {
+                                onSelectAllHandle(selected, selectedRows, changeRows);
+                            },
+                        }}
+                        pagination={false}
+                        dataSource={showList}
+                    />
+                </div>
+                <div className='footer'>
+                    <span className='cancel' onClick={() => set_ifShowModal(false)}>取消</span>
+                    <span className='ok' onClick={() => save()}>{`确认(${selectedKeys.length > 0 && selectedKeys.length})`}</span>
+                </div>
+            </div>
+
+        )
+    });
+
+
+
     const transferTableColumn: any[] = [
         {
             title: '工号',
@@ -227,7 +439,7 @@ const CheckUnitDepMap: React.FC = () => {
         })
     }
 
-    const TableTransfer = React.forwardRef(({ leftColumns, rightColumns, record }:any, ref) => {
+    const TableTransfer = React.forwardRef(({ leftColumns, rightColumns, record }: any, ref) => {
 
 
         const [targetKeys, setTargetKeys] = useState<string[]>([]);
@@ -238,23 +450,23 @@ const CheckUnitDepMap: React.FC = () => {
         const getFuncList = async () => {
             const resp = await getMapEmpList();
             if (resp) {
-                
-                let defaultSelctedkeys:string[] = [];
+
+                let defaultSelctedkeys: string[] = [];
 
                 if (currentSelectedTreeNode) {
                     const resp2 = await getCheckUnitEmpMapTableDataByUnitClass({
-                        pageSize:500,
-                        current:1,
-                        empName:'',
+                        pageSize: 500,
+                        current: 1,
+                        empName: '',
                         unitCode: currentSelectedTreeNode.code,
-        
+
                     });
-                    if(resp2){
+                    if (resp2) {
                         defaultSelctedkeys = resp2.list.map((item: any) => item.userId);
                         // console.log({defaultSelctedkeys,resp2});
                         setTargetKeys([...defaultSelctedkeys]);
-                        set_datasource([...resp,...resp2.list]);
-                        
+                        set_datasource([...resp, ...resp2.list]);
+
                     }
                 }
             }
@@ -275,9 +487,9 @@ const CheckUnitDepMap: React.FC = () => {
                 const needData = datasource.filter(item => targetKeys.includes(item.userId));
 
                 const result = {
-                    unitCode:record.code,
-                    unitType:record.unitType,
-                    employee:needData
+                    unitCode: record.code,
+                    unitType: record.unitType,
+                    employee: needData
                 };
 
                 const resp = await addMapEmp(result);
@@ -286,7 +498,7 @@ const CheckUnitDepMap: React.FC = () => {
                     message.success('添加成功!');
                     getTreeReqFunc();
                     tableRef.current?.reload();
-                   
+
                 }
             }
         }));
@@ -349,7 +561,7 @@ const CheckUnitDepMap: React.FC = () => {
                             size="small"
                             rowKey={'userId'}
                             tableAlertRender={false}
-                            pagination={{simple:true,pageSize:9,showTotal:()=>false}}
+                            pagination={{ simple: true, pageSize: 9, showTotal: () => false }}
                             style={{ pointerEvents: listDisabled ? 'none' : undefined }}
                             onRow={({ userId, disabled: itemDisabled }) => ({
                                 onClick: () => {
@@ -434,17 +646,21 @@ const CheckUnitDepMap: React.FC = () => {
 
     }
 
-    const updateEmpInfo =async () => {
+    const updateEmpInfo = async () => {
         const resp = await updateEmpInfoReq();
-        if(resp){
+        if (resp) {
             message.success('更新成功!');
             tableRef.current?.reload()
         }
     }
 
+    const onTabChange = (activeKey:string)=>{
+         set_currentTabKey(activeKey);
+    }
+
 
     useEffect(() => {
-        if(currentSelectedTreeNode&&currentSelectedTreeNode.unitType){
+        if (currentSelectedTreeNode && currentSelectedTreeNode.unitType) {
             tableRef.current?.reload();
         }
     }, [currentSelectedTreeNode]);
@@ -454,7 +670,7 @@ const CheckUnitDepMap: React.FC = () => {
 
     useEffect(() => {
         //初始化左侧树结构数据后
-        if(currentSelectedTreeNode) return;
+        if (currentSelectedTreeNode) return;
         if (treeData?.length > 0) {
 
             if (treeData[0].child && treeData[0].child.length > 0) {
@@ -467,7 +683,10 @@ const CheckUnitDepMap: React.FC = () => {
     }, [treeData]);
 
 
-
+    useEffect(()=>{
+        set_tableColumn(column as ProColumns[]);
+        tableRef.current?.reload();
+    },[currentTabKey])
 
     useEffect(() => {
         set_tableColumn(column as ProColumns[]);
@@ -479,112 +698,151 @@ const CheckUnitDepMap: React.FC = () => {
 
 
     return (
-        <div className='CheckUnitDepMap'>
-            <div className='leftTree'>
-                <div className='search'>
-                    <Input
-                        className='searchInput'
-                        placeholder="请输入类目名称"
-                        size='small'
-                        allowClear
-
-                        style={{ marginBottom: 16 }}
-                        onChange={onTreeSearchKeyChange}
-                        suffix={
-                            <SearchIcon type='iconsousuo' />
-                        }
-                    />
-                </div>
+        <div className='CheckUnitEmpSet'>
+            <ModalForm title={`选择目标核算单元(${currentSelectedEmp&&currentSelectedEmp.name})`} width={400} submitter={{
+                render: (props, defaultDoms) => []
+            }} open={ifShowModal} modalProps={{
+                closable: false,
+            }}>
+                <TableSelecter
+                    ref={tableSelecterRef}
+                    record={undefined}
+                    tableSelecterColumn={tableSelecterColumn}
+                ></TableSelecter>
+            </ModalForm>
+
+            <div className='tabWrap'>
+                <Tabs
+                    defaultActiveKey="1"
+                    onChange={onTabChange}
+                    items={[
+                        {
+                            label: `单元人员对照`,
+                            key: '1',
+                        },
+                        {
+                            label: `人员单元对照`,
+                            key: '2',
+                        },
+                    ]}
+                />
+                <span className='updateInfo' onClick={() => updateEmpInfo()}>更新人员信息</span>
+            </div>
+            <div className='contentWrap'>
                 {
-                    treeData && treeData.length > 0 && currentSelectedTreeNode && (
-                        <DirectoryTree
-                            fieldNames={{ title: 'name', key: 'code',children:'child' }}
-                            rootStyle={{ height: '100%', paddingBottom: 50, overflowY: 'scroll', overflowX: 'hidden' }}
-                            onSelect={onSelect}
-                            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 style={{display:'flex',flexDirection:'row',justifyContent:'center',alignItems:'center'}}>
-                                                {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:'space-between', alignItems: 'center', height: 32,
-                                        borderRadius: '4px',
-                                        overflow: 'hidden',
-                                        color: '#17181A',
-                                        textOverflow: 'ellipsis',
-                                        whiteSpace: 'nowrap'
-
-                                    }}>
-                                        {title}
-                                        {!nodeData.map&&<span className={nodeData.unitType?'point lastChild':'point'}></span>}
-                                    </div>
-                                }
+                    currentTabKey == '1' && (
+                        <div className='leftTree'>
+                            <div className='search'>
+                                <Input
+                                    className='searchInput'
+                                    placeholder="请输入类目名称"
+                                    size='small'
+                                    allowClear
+                                    style={{ marginBottom: 16 }}
+                                    onChange={onTreeSearchKeyChange}
+                                    suffix={
+                                        <SearchIcon type='iconsousuo' />
+                                    }
+                                />
+                            </div>
+                            {
+                                treeData && treeData.length > 0 && currentSelectedTreeNode && (
+                                    <DirectoryTree
+                                        fieldNames={{ title: 'name', key: 'code', children: 'child' }}
+                                        rootStyle={{ height: '100%', paddingBottom: 50, overflowY: 'scroll', overflowX: 'hidden' }}
+                                        onSelect={onSelect}
+                                        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 style={{ display: 'flex', flexDirection: 'row', justifyContent: 'center', alignItems: 'center' }}>
+                                                            {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: 'space-between', alignItems: 'center', height: 32,
+                                                    borderRadius: '4px',
+                                                    overflow: 'hidden',
+                                                    color: '#17181A',
+                                                    textOverflow: 'ellipsis',
+                                                    whiteSpace: 'nowrap'
+
+                                                }}>
+                                                    {title}
+                                                    {!nodeData.map && <span className={nodeData.unitType ? 'point lastChild' : 'point'}></span>}
+                                                </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} />
+                                        }}
+                                    />
+                                )
                             }
-                            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 style={{width:16,height:'92vh',background:'#F5F7FA'}}></div> */}
-            <div className='rightContent'>
-                <BMSPagecontainer title={false} ghost>
 
-                    <div className='content'>
-                        <div className='tableToolbar'>
-                            <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,empName:''});
+                {/* <div style={{width:16,height:'92vh',background:'#F5F7FA'}}></div> */}
+                <div className={currentTabKey == '1'?'rightContent':'rightContent expand'}>
+                    <BMSPagecontainer title={false} ghost>
+
+                        <div className='content'>
+                            <div className='tableToolbar'>
+                                <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, empName: '' });
+                                        }
+                                    }} suffix={
+                                        <IconFont type="iconsousuo" onClick={() => tableDataSearchHandle('empName')} />
                                     }
-                                }} suffix={
-                                    <IconFont type="iconsousuo" onClick={() => tableDataSearchHandle('empName')} />
-                                } 
-
-                                onPressEnter={(e) => {
 
-                                    set_tableDataFilterParams({
-                                        ...tableDataFilterParams,
-                                        empName: (e.target as HTMLInputElement).value
-                                    });
-                                }}
-                                />
-                            </div>
-                            <div className='btnGroup'>
-                                <span className='updateInfo' style={{marginRight:8}} onClick={()=>updateEmpInfo()}>更新人员信息</span>
-                                <span className='add' onClick={()=>addHandle()}>添加</span>
+                                        onPressEnter={(e) => {
+                                            set_tableDataFilterParams({
+                                                ...tableDataFilterParams,
+                                                empName: (e.target as HTMLInputElement).value
+                                            });
+                                        }}
+                                    />
+                                </div>
+                                <div className='btnGroup'>
+                                    {currentTabKey == '1'&&<span className='add' onClick={() => addHandle()}>添加</span>}
+                                    {currentTabKey == '2'&&<><Switch size='small' onChange={(bool)=>{
+                                          set_tableDataFilterParams({
+                                            ...tableDataFilterParams,
+                                            map:bool?2:0
+                                        });
+                                    }} /><span style={{position:'relative',marginLeft:8,top:1}}>显示未对照人员</span></>}
+                                </div>
                             </div>
+                            {currentSelectedTreeNode && <BMSTable actionRef={tableRef} params={tableDataFilterParams} rowKey='id' columns={tableColumn} request={(params, sort, filter) => getTableData( params, sort, filter)} />}
                         </div>
-                        {currentSelectedTreeNode && <BMSTable actionRef={tableRef} params={tableDataFilterParams} rowKey='id' columns={tableColumn} request={(params, sort, filter) => getTableData('CHARGE', params, sort, filter)} />}
-                    </div>
 
 
-                </BMSPagecontainer>
+                    </BMSPagecontainer>
+                </div>
             </div>
         </div>
     );

+ 26 - 1
src/pages/setting/checkUnitSet/checkUnitEmpSet/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-07-27 16:04:34
+ * @LastEditTime: 2023-09-20 14:52:57
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlyInfoCheck/service.ts
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -109,3 +109,28 @@ export const updateEmpInfoReq = () => {
     })
 }
 
+//移动人员
+export const moveEmpToUnit = (data:any) => {
+
+    return request('/performance/unit/addEmployeeUnitMap', {
+        method: 'POST',
+        data
+    })
+}
+
+//获取人员单元对照数据列表、
+export const getEmpUnitMap = (params:{
+    current:number,
+    pageSize:number,
+    unitCode:string,
+    empName:string
+}) => {
+
+    return request('/performance/unit/getEmployeeUnitMap', {
+        method: 'GET',
+        params
+    })
+}
+
+
+

+ 164 - 112
src/pages/setting/checkUnitSet/checkUnitEmpSet/style.less

@@ -1,132 +1,184 @@
-.CheckUnitDepMap {
-    display: flex;
-    flex-direction: row;
-    // height: 100%;
-    background: #F5F7FA;
+.TableSelecter {
+    .footer {
+         display: flex;
+         flex-direction:row;
+         justify-content: flex-end;
+        //  margin-bottom:-10px;
+         margin-top: 15px;
+         span {
+             display: inline-block;
+             width: 60px;
+             height: 24px;  
+             font-size: 14px;
+             line-height: 23px;
+             text-align: center;
+             border-radius: 4px;
+             cursor: pointer;
 
-    .leftTree {
-        position: fixed;
-        top: 64px;
-        width: 220px;
-        height: calc(100vh - 80px);
-        background: #FFF;
-        border-radius: 4px;
-        overflow: hidden;
-        padding-top: 16px;
-        padding-bottom: 16px;
-        margin-right: 16px;
-        // border-right:16px solid #F5F7FA;
-        .search {
-            margin: 0 16px;
-        }
-        .searchInput {
-            border: 1px solid #CFD7E6;
-        }
+             &.ok {
+                 color: #FFFFFF;
+                 background:#3377FF;
+                 margin-left: 8px;
+             }
+             &.cancel {
+                 border: 1px solid #DAE2F2;
+             }
+         }
 
-        .bms-ant-tree {
-            padding-left: 16px;
-            padding-right: 16px;
-        }
+    }
+}
+.CheckUnitEmpSet {
+    background: #fff;
+    border-radius: 4px;
+    height: calc(100vh - 48px);
 
-        .site-tree-search-value {
+    .tabWrap {
+          display: flex;
+          flex-direction: row;
+          justify-content: space-between;
+          align-items: center;
+          padding-left: 16px;
+          padding-right: 16px;
+          .updateInfo {
+            cursor: pointer;
             display: inline-block;
-            position: relative;
-        }
-
-        .point {
-            display: block;
-            content: '';
-            width: 6px;
-            height: 6px;
-            border-radius: 50%;
-            z-index:99;
-            background: #FF9832;
-
-            &.lastChild {
-                  background: #FF1966;
-            }
-        }
-
-        .bms-ant-tree.bms-ant-tree-directory .bms-ant-tree-treenode-selected:hover::before,
-        .bms-ant-tree.bms-ant-tree-directory .bms-ant-tree-treenode-selected::before {
+            font-size: 14px;
+            font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+            font-weight: 400;
+            color: #17181A;
+            line-height: 24px;
+            padding: 0 14px;
+            background: #FAFCFF;
+            border: 1px solid #DAE2F2;
             border-radius: 4px;
-            background: rgb(240 242 245 / 100%);
-        }
-
-        .bms-ant-tree.bms-ant-tree-directory .bms-ant-tree-treenode .bms-ant-tree-node-content-wrapper.bms-ant-tree-node-selected {
-            font-weight: bold;
         }
     }
-
-    .rightContent {
+    .contentWrap {
         position: relative;
-        border-radius: 4px;
-        width: calc(100% - 220px);
-        padding: 16px;
-        margin-left: 236px;
-        background: #FFF;
-
-        .content {
-            display: flex;
-            flex-direction: column;
-
-            .tableToolbar {
+        display: flex;
+        flex-direction: row;
+        padding: 0 16px;
+    
+        .leftTree {
+            position: absolute;
+            top:0px;
+            width: 220px;
+            height: calc(100vh - 154px);
+            background: #FFF;
+            border-radius: 4px;
+            overflow: hidden;
+            padding-bottom: 16px;
+            padding-top: 16px;
+            margin-right: 16px;
+            border:1px solid #CFD7E6;
+            .search {
+                margin: 0 16px;
+            }
+            .searchInput {
+                border: 1px solid #CFD7E6;
+            }
+    
+            .bms-ant-tree {
+                padding-left: 16px;
+                padding-right: 16px;
+            }
+    
+            .site-tree-search-value {
+                display: inline-block;
+                position: relative;
+            }
+    
+            .point {
+                display: block;
+                content: '';
+                width: 6px;
+                height: 6px;
+                border-radius: 50%;
+                z-index:99;
+                background: #FF9832;
+    
+                &.lastChild {
+                      background: #FF1966;
+                }
+            }
+    
+            .bms-ant-tree.bms-ant-tree-directory .bms-ant-tree-treenode-selected:hover::before,
+            .bms-ant-tree.bms-ant-tree-directory .bms-ant-tree-treenode-selected::before {
+                border-radius: 4px;
+                background: rgb(240 242 245 / 100%);
+            }
+    
+            .bms-ant-tree.bms-ant-tree-directory .bms-ant-tree-treenode .bms-ant-tree-node-content-wrapper.bms-ant-tree-node-selected {
+                font-weight: bold;
+            }
+        }
+    
+        .rightContent {
+            position: relative;
+            border-radius: 4px;
+            width: calc(100% - 220px);
+            padding: 16px;
+            padding-left:0px;
+            padding-right: 0;
+            padding-top: 0;
+            margin-left: 236px;
+            background: #FFF;
+    
+            .content {
                 display: flex;
-                flex-direction: row;
-                justify-content: space-between;
-                align-items: center;
-                margin-bottom: 16px;
-
-                .search {
+                flex-direction: column;
+    
+                .tableToolbar {
                     display: flex;
                     flex-direction: row;
-                    justify-content: flex-start;
+                    justify-content: space-between;
                     align-items: center;
-
-                    .searchInput {
-                        width: 167px;
-                        height: 24px;
-                        background: #FFF;
-                        border-radius: 4px;
-                        border: 1px solid #CFD7E6;
+                    margin-bottom: 16px;
+    
+                    .search {
+                        display: flex;
+                        flex-direction: row;
+                        justify-content: flex-start;
+                        align-items: center;
+    
+                        .searchInput {
+                            width: 167px;
+                            height: 24px;
+                            background: #FFF;
+                            border-radius: 4px;
+                            border: 1px solid #CFD7E6;
+                        }
+    
+                        &>span {
+                            font-size: 14px;
+                            font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+                            font-weight: 400;
+                            color: #17181A;
+                        }
                     }
-
-                    &>span {
-                        font-size: 14px;
-                        font-family: SourceHanSansCN-Normal, SourceHanSansCN;
-                        font-weight: 400;
-                        color: #17181A;
+    
+                    .btnGroup {
+                        .add {
+                            cursor: pointer;
+                            display: inline-block;
+                            font-size: 14px;
+                            font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+                            font-weight: 400;
+                            color: #FFFFFF;
+                            line-height: 24px;
+                            padding: 0 14px;
+                            background: #3377FF;
+                            border-radius: 4px;
+                        }
                     }
                 }
+            }
 
-                .btnGroup {
-                    .updateInfo {
-                        cursor: pointer;
-                        display: inline-block;
-                        font-size: 14px;
-                        font-family: SourceHanSansCN-Normal, SourceHanSansCN;
-                        font-weight: 400;
-                        color: #17181A;
-                        line-height: 24px;
-                        padding: 0 14px;
-                        background: #FAFCFF;
-                        border: 1px solid #DAE2F2;
-                        border-radius: 4px;
-                    }
-                    .add {
-                        cursor: pointer;
-                        display: inline-block;
-                        font-size: 14px;
-                        font-family: SourceHanSansCN-Normal, SourceHanSansCN;
-                        font-weight: 400;
-                        color: #FFFFFF;
-                        line-height: 24px;
-                        padding: 0 14px;
-                        background: #3377FF;
-                        border-radius: 4px;
-                    }
-                }
+            &.expand {
+                width:100%;
+                margin-left: 0;
             }
         }
     }
+    
 }

+ 1 - 1
src/pages/setting/checkUnitSet/medicalGroupSet/index.tsx

@@ -324,7 +324,7 @@ const MedicalGroupSet = () => {
                         },
                     }}
                     rowKey='userId'
-                  
+                    
                     tableAlertRender={false}
                     rowSelection={{
                         // 自定义选择项参考: https://ant.design/components/table-cn/#components-table-demo-row-selection-custom

+ 13 - 10
src/pages/setting/manaPerformanceSet/classAssessAndGradeSet/index.tsx

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2023-03-03 11:30:33
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-03-31 14:38:43
+ * @LastEditTime: 2023-09-27 16:38:25
  * @FilePath: /KC-MiddlePlatform/src/pages/platform/setting/pubDicTypeMana/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -87,17 +87,20 @@ export default function ClassAssessAndGradeSet() {
             const data = unitTypeData.map((item: any) => {
 
                 let rowData: { [key: string]: any } = {};
-
-                for (let index = 0; index < item.value.length; index++) {
-                    for (const key in item.value[index]) {
-                        if (key != 'code') {
-                            rowData[`${key}${item.value[index].code}`] = item.value[index][`${key}`]
+                if(item.value){
+                    for (let index = 0; index < item.value.length; index++) {
+                        for (const key in item.value[index]) {
+                            if (key != 'code') {
+                                rowData[`${key}${item.value[index].code}`] = item.value[index][`${key}`]
+                            }
                         }
                     }
                 }
-
+                
                 return { ...item, ...rowData, id: item.id, columns }
             });
+
+        
             return {
                 data,
                 success: true
@@ -141,8 +144,8 @@ export default function ClassAssessAndGradeSet() {
         const [formData,set_formData] = useState([]);
 
         useEffect(()=>{
-             if(record.columns.length != record.value.length){
-                const valueCodes = record.value.map((a:any)=>a.key);
+             if(record.columns.length != (record.value?record.value.length:0)){
+                const valueCodes = record.value?record.value.map((a:any)=>a.key):[];
                 const newData = record.columns.map((b:any)=>{
                        if(!valueCodes.includes(b.key)){
                             return {
@@ -152,7 +155,7 @@ export default function ClassAssessAndGradeSet() {
                                 rate:''
                             }
                        }
-                       const temp = record.value.filter((c:any)=>c.code == b.key);
+                       const temp = record.value?record.value.filter((c:any)=>c.code == b.key):[];
                        return temp[0]
                 });
 

+ 6 - 5
src/pages/setting/manaPerformanceSet/indicGroupWeightSet/index.tsx

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2023-03-03 11:30:33
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-07-07 14:42:01
+ * @LastEditTime: 2023-09-27 16:45:37
  * @FilePath: /KC-MiddlePlatform/src/pages/platform/setting/pubDicTypeMana/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -462,7 +462,8 @@ export default function IndicGroupWeightSet() {
             if (type == 'INDICATOR') {
                 let defaultFormData:{[key:string]:any} = {};
                 if(record.indicatorWeights&&record.indicatorWeights.length>0){
-                      const defaultVal = record.indicatorWeights.map((a:any)=>{
+                      const _indicatorWeights =  record.indicatorWeights.map((a:any)=>({...a,id:Math.random()}))
+                      const defaultVal = _indicatorWeights.map((a:any)=>{
                          defaultFormData[`indicatorCode${a.id}`] = a.indicatorCode;
                          defaultFormData[`weight${a.id}`] = a.weight;
                          return {...a,tempId:Math.random()}
@@ -535,6 +536,7 @@ export default function IndicGroupWeightSet() {
                 {
                     type == 'INDICATOR' && (
                         <div>
+                            <div style={{maxHeight:442,overflowY:'scroll'}}>
                             {
                                 indicatorData.map((item: any, index: number) => {
         
@@ -569,7 +571,7 @@ export default function IndicGroupWeightSet() {
                                                     },
                                                 }}
                                             />
-                                            <Form.Item name={`weight${item.id}`} label='占比(请输入小数):'>
+                                            <Form.Item name={`weight${item.id}`} label='权重(请输入小数):'>
                                                  <InputNumber 
                                                      style={{width:120,height:24,position:'relative',top:0}}
                                                      precision={4}
@@ -583,8 +585,6 @@ export default function IndicGroupWeightSet() {
                                                             return a
                                                         });
     
-                                                        console.log({newArr});
-                  
                                                         set_indicatorData([...newArr]);
                                                     }}
                                                  />
@@ -610,6 +610,7 @@ export default function IndicGroupWeightSet() {
                                     )
                                 })
                             }
+                            </div>
                             <div className='addBtn' onClick={() => addIndicator()}>
                                 <AddIconFont type="icon-zengjia" style={{ color: '#3376FE' }} /><span>增加一行</span>
                             </div>

+ 43 - 19
src/pages/setting/projectSetting/checkUnitProjectSet/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-07-27 18:00:00
+ * @LastEditTime: 2023-09-25 17:52:43
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlySet/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -24,7 +24,7 @@ import closeIcon from '../../../../../static/treenode_collapse.png';
 import { BMSTable } from '@/components/BMSTable';
 import { ActionType, ModalForm, ProColumns, ProColumnType, ProFormDigit, ProFormSelect } from '@ant-design/pro-components';
 import { createFromIconfontCN } from '@ant-design/icons';
-import { delRequest, getIndicTableData, getBillingItemTableData, getTreeDataRespType, getTreeData, getAllCheckUnit, saveCopyRequest, getAllCheckUnitProjectData, addBillingItemData, editBillingItemData, addIndicItemData, editIndicItemData, getNonCheckTableData, addNonCheckItemData, getCostItemsTableData, addCostItemData, editCostItemData } from './service';
+import { delRequest, getIndicTableData, getBillingItemTableData, getTreeDataRespType, getTreeData, getAllCheckUnit, saveCopyRequest, getAllCheckUnitProjectData, addBillingItemData, editBillingItemData, addIndicItemData, editIndicItemData, getNonCheckTableData, addNonCheckItemData, getCostItemsTableData, addCostItemData, editCostItemData, copySimpleRequest } from './service';
 import { TransferItem, TransferProps } from 'antd/es/transfer';
 import { getComputeDate } from '@/pages/Home/service';
 
@@ -110,6 +110,7 @@ const CheckUnitProjectSet: React.FC = () => {
     const [currentEditCoreFlag, set_currentEditCoreFlag] = useState(0);
     const [tableSelecterColumn, set_tableSelecterColumn] = useState<ProColumns[]>([]);
     const [isCopy, set_isCopy] = useState(false);
+    const [copyType,set_copyType] = useState<'ALL'|"SIMPLE">('ALL'); // ALL 复制全部 SIMPLE 单个复制
 
     const tableRef = useRef<ActionType>();
 
@@ -431,6 +432,7 @@ const CheckUnitProjectSet: React.FC = () => {
 
         },
     ];
+
     const costItemColumns = [
         {
             title: '项目名称',
@@ -439,11 +441,12 @@ const CheckUnitProjectSet: React.FC = () => {
     ]
 
 
-
-    const openCopyHandleModal = () => {
+    const openCopyHandleModal = (type:'SIMPLE'|'ALL') => {
 
         set_ifShowModal(true);
         set_isCopy(true);
+        set_copyType(type);
+
     }
 
     const openTransfer = () => {
@@ -597,17 +600,37 @@ const CheckUnitProjectSet: React.FC = () => {
                 }
 
             } else {
-                const result = {
-                    unitCodeList: selectedKeys,
-                    unitCode: currentSelectedTreeNode.code
-                };
 
-                const resp = await saveCopyRequest(result, currentSelectedTabKey);
+                console.log({copyType});
 
-                if (resp) {
-                    message.success('复制成功!');
-                    set_ifShowModal(false);
-                    tableRef.current?.reload();
+                if(copyType == 'ALL'){
+                    const result = {
+                        unitCodeList: selectedKeys,
+                        unitCode: currentSelectedTreeNode.code
+                    };
+    
+                    const resp = await saveCopyRequest(result, currentSelectedTabKey);
+    
+                    if (resp) {
+                        message.success('复制成功!');
+                        set_ifShowModal(false);
+                        tableRef.current?.reload();
+                    }
+                }
+                if(copyType == 'SIMPLE'){
+                    // console.log({currentEditRow});
+                    const result = {
+                        unitCodeList: selectedKeys,
+                        unitCode: currentSelectedTreeNode.code,
+                        itemPointCode:currentSelectedTabKey == '1'?currentEditRow.itemPointCode:currentEditRow.indicatorCode
+                    };
+
+                    const resp = await copySimpleRequest(result,currentSelectedTabKey);
+                    if (resp) {
+                        message.success('复制成功!');
+                        set_ifShowModal(false);
+                        tableRef.current?.reload();
+                    }
                 }
             }
 
@@ -964,7 +987,7 @@ const CheckUnitProjectSet: React.FC = () => {
         )
     });
 
-
+    
     //成本项目添加
     const addCostProject = () => {
         set_isCopy(false);
@@ -972,7 +995,6 @@ const CheckUnitProjectSet: React.FC = () => {
     }
 
 
-
     const tableSearchHandle = () => {
         set_searchParams({
             name: searchKeywords
@@ -1292,7 +1314,7 @@ const CheckUnitProjectSet: React.FC = () => {
                                         } />
                                     </div>
                                     <div className={'btnGroup'}>
-                                        <span key="2" onClick={() => openCopyHandleModal()}>复制</span>
+                                        <span key="2" onClick={() => openCopyHandleModal('ALL')}>复制</span>
                                         <span key="3" onClick={() => openTransfer()}>添加</span>
 
                                     </div>
@@ -1313,6 +1335,7 @@ const CheckUnitProjectSet: React.FC = () => {
                                             }
 
                                         }}>{(ifEdit && currentEditRow?.id == record.id) ? '保存' : '编辑'}</a>,
+                                        <a onClick={() => { openCopyHandleModal('SIMPLE');set_currentEditRow(record);}}>复制</a>,
                                         <Fragment key={'cancel'}>{(ifEdit && currentEditRow?.id == record.id) && <a onClick={() => set_ifEdit(false)}>取消</a>}</Fragment>,
                                         <Popconfirm key="popconfirm" title={`确认删除吗?`} okText="是" cancelText="否" onConfirm={() => delHandle(record)}>
                                             {(currentEditRow?.id != record.id || !ifEdit) && <a key={'del'}>删除</a>}
@@ -1342,7 +1365,7 @@ const CheckUnitProjectSet: React.FC = () => {
                                         } />
                                     </div>
                                     <div className={'btnGroup'}>
-                                        <span key="2" onClick={() => openCopyHandleModal()}>复制</span>
+                                        <span key="2" onClick={() => openCopyHandleModal('ALL')}>复制</span>
                                         <span key="3" onClick={() => openTransfer()}>添加</span>
 
                                     </div>
@@ -1365,6 +1388,7 @@ const CheckUnitProjectSet: React.FC = () => {
 
                                         }}>{(ifEdit && currentEditRow?.id == record.id) ? '保存' : '编辑'}</a>,
                                         <Fragment key={'cancel'}>{(ifEdit && currentEditRow?.id == record.id) && <a onClick={() => set_ifEdit(false)}>取消</a>}</Fragment>,
+                                        <a onClick={() => { openCopyHandleModal('SIMPLE');set_currentEditRow(record);}}>复制</a>,
                                         <Popconfirm key="popconfirm" title={`确认删除吗?`} okText="是" cancelText="否" onConfirm={() => delHandle(record)}>
                                             {(currentEditRow?.id != record.id || !ifEdit) && <a key={'del'}>删除</a>}
                                         </Popconfirm>
@@ -1393,7 +1417,7 @@ const CheckUnitProjectSet: React.FC = () => {
                                         } />
                                     </div>
                                     <div className={'btnGroup'}>
-                                        <span key="2" onClick={() => openCopyHandleModal()}>复制</span>
+                                        <span key="2" onClick={() => openCopyHandleModal('ALL')}>复制</span>
                                         <span key="3" onClick={() => openTransfer()}>添加</span>
 
                                     </div>
@@ -1430,7 +1454,7 @@ const CheckUnitProjectSet: React.FC = () => {
                                         } />
                                     </div>
                                     <div className={'btnGroup'}>
-                                        <span key="2" onClick={() => openCopyHandleModal()}>复制</span>
+                                        <span key="2" onClick={() => openCopyHandleModal('ALL')}>复制</span>
                                         <span key="3" onClick={() => addCostProject()}>添加</span>
 
                                     </div>

+ 18 - 1
src/pages/setting/projectSetting/checkUnitProjectSet/service.ts

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2023-05-15 13:20:27
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-07-05 14:26:02
+ * @LastEditTime: 2023-09-22 13:39:03
  * @FilePath: /BudgetManaSystem/src/pages/setting/projectSetting/checkUnitProjectSet/service.ts
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -313,6 +313,23 @@ export const saveCopyRequest = (data: any,tabKey:string) => {
 
 }
 
+
+//单个项目复制
+export const copySimpleRequest = async (data: any,tabKey:string) => {
+    if(tabKey == '1'){
+        return request('/performance/item/copyUnitItem', {
+            method: 'POST',
+            data: data
+        })
+    }
+    if(tabKey == '2'){
+        return request('/performance/item/copyUnitIndicator', {
+            method: 'POST',
+            data: data
+        })
+    }
+}
+
 //获取成本项目表格数据
 
 export type getCostItemsTableDataParamsType = {

+ 3 - 3
src/pages/setting/projectSetting/secondaryProjectDistribute/index.tsx

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2023-03-03 11:30:33
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-08-18 10:25:27
+ * @LastEditTime: 2023-09-27 16:13:51
  * @FilePath: /KC-MiddlePlatform/src/pages/platform/setting/pubDicTypeMana/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -381,8 +381,8 @@ export default function BilingProjectMana() {
                                 {
                                     ({ evaluation }) => evaluation == 1 && (
                                         <div style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between' }}>
-                                            <ProFormDigit name="floor" label="评分下限:" width={155} rules={[{ required: true, message: '评价下限不能为空!' }]} />
-                                            <ProFormDigit name="ceiling" label="评分上限:" width={155} rules={[{ required: true, message: '评价上限不能为空!' }]} />
+                                            <ProFormDigit name="floor" label="评分下限:" width={155} rules={[{ required: false, message: '评价下限不能为空!' }]} />
+                                            <ProFormDigit name="ceiling" label="评分上限:" width={155} rules={[{ required: false, message: '评价上限不能为空!' }]} />
                                         </div>
                                     )
                                 }

+ 14 - 20
src/pages/setting/reportSet/reportSetting/index.tsx

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2023-03-03 11:30:33
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-07-07 13:46:13
+ * @LastEditTime: 2023-09-22 13:43:52
  * @FilePath: /KC-MiddlePlatform/src/pages/platform/setting/pubDicTypeMana/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -17,7 +17,7 @@ import { createFromIconfontCN } from '@ant-design/icons';
 import { ActionType, arrayMoveImmutable, useRefFunction } from '@ant-design/pro-components';
 import { ModalForm, ProFormSelect, ProFormText } from '@ant-design/pro-form';
 import { ProColumns } from '@ant-design/pro-table';
-import { Dropdown, Input, MenuProps, message, Modal, Switch, Table } from 'antd';
+import { Dropdown, Input, MenuProps, message, Modal, Switch,Tooltip } from 'antd';
 import { ColumnsType, TableRowSelection } from 'antd/es/table/interface';
 import Transfer, { TransferItem, TransferProps } from 'antd/es/transfer';
 import React from 'react';
@@ -64,7 +64,7 @@ const ReportSetting = () => {
 
     const DragHandle = SortableHandle(() => <img width={16} style={{ cursor: 'pointer' }} src={require('../../../../../static/tuozhuai_icon.png')} alt="" />);
 
-    const column = [
+    const column:ProColumns[] = [
 
         {
             title: '列名称',
@@ -95,6 +95,14 @@ const ReportSetting = () => {
                 return <Switch disabled={!ifEditTable} size='small' checked={_} onChange={(bool) => switchChangeHandle(bool, record, 'hide')} />
             }
         },
+        {
+            title: '固定',
+            width: 120,
+            dataIndex: 'freeze',
+            render: (_: any, record: any) => {
+                return <Switch disabled={!ifEditTable} size='small' checked={_ == '1'} onChange={(bool) => switchChangeHandle(bool, record, 'freeze')} />
+            }
+        },
     ]
 
     const [tableColumn, set_tableColumn] = useState<ProColumns[] | any[]>(column);
@@ -350,6 +358,7 @@ const ReportSetting = () => {
                         sort: hasEditedInfo.length>0?hasEditedInfo[0].sort:dataSource.length+1,
                         primaryKey:hasEditedInfo.length>0?hasEditedInfo[0].primaryKey:0,
                         hide:hasEditedInfo.length>0?hasEditedInfo[0].hide:0,
+                        freeze:hasEditedInfo.length>0?hasEditedInfo[0].freeze:0,
                     }
                 });
 
@@ -543,23 +552,6 @@ const ReportSetting = () => {
                 className: 'drag-visible',
                 render: () => <DragHandle />
             }, ...column,
-                // {
-                //     title: '操作',
-                //     key: 'option',
-                //     width: 120,
-                //     valueType: 'option',
-                //     render: (_: any, record: any) => {
-                //         return [
-                //             <Popconfirm
-                //                 title="是否确认移除?"
-                //                 key="del"
-                //                 onConfirm={() => { delData(record.id); getTableData({ reportCode: currentSelectedType.code }); }}
-                //             >
-                //                 <a>移除</a>
-                //             </Popconfirm>
-                //         ]
-                //     },
-                // }
             ])
         } else {
             set_tableColumn(column);
@@ -621,8 +613,10 @@ const ReportSetting = () => {
                                 >
                                     <img className='icon' src={require('../../../../../static/reportIcon.png')} alt="" />
                                     <div className='content'>
+                                    <Tooltip title={item.reportName} >
                                         <div className='name'>{item.reportName}</div>
                                         <div className='sub'>{item.reportTypeName}</div>
+                                    </Tooltip>
                                     </div>
 
                                     <Dropdown menu={{ items: moreItems }} placement="bottom" onOpenChange={(bool) => { bool && set_currentEditLeftData(item) }}>

+ 1 - 1
src/utils/tableToExcel.ts

@@ -66,7 +66,7 @@ function exportTableToExcel(tableData: DataType[], columns: Column[], fileName =
 
   // 将数据转化为工作表
   const ws = XLSX.utils.aoa_to_sheet(allData);
-
+  
   // 设置合并项
   ws['!merges'] = merges;
 

+ 18 - 1
src/utils/tooljs.ts

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2023-02-20 14:31:06
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-07-11 13:50:30
+ * @LastEditTime: 2023-09-21 14:38:08
  * @FilePath: /BudgetManaSystem/src/utils/tooljs.js
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -93,6 +93,7 @@ export const findAllParents = (data: Node[], parentCode:string): Node[] => {
 
 interface TreeNode {
   code: string;
+  [key:string]:any,
   children?: TreeNode[];
 }
 
@@ -171,6 +172,22 @@ export const  convertToColumns = (json: JsonStructure[]): Column[] => {
 }
 
 
+//搜索树结构中叶子节点的某一个属性,并返回所有匹配的集合
+
+export const searchLeaves = (nodes:any[], keywords:string|undefined, keyName: string, childrenKey: string, results: any[] = []): any[] => {
+  for (const node of nodes) {
+      if (!Array.isArray(node[childrenKey])) {
+          if (node[keyName].indexOf(keywords) != -1) {
+              results.push(node);
+          }
+      } else if (Array.isArray(node[childrenKey])) {
+          searchLeaves(node[childrenKey], keywords, keyName, childrenKey, results);
+      }
+  }
+  return results;
+}
+
+