ソースを参照

添加2023-06-30的周部分任务

code4eat 2 年 前
コミット
6cd7938593

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

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2022-12-20 15:24:11
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-05-09 15:25:48
+ * @LastEditTime: 2023-06-25 10:23:18
  * @FilePath: /BudgetManaSystem/src/components/BMSTable/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -44,7 +44,8 @@ export const BMSTable = (props: BMSTablePropsType<any, any, any>) => {
             toolBarRender={false}
             options={options}
             pagination={{
-                   ...BMSTablePageDefaultConfig  
+                   showSizeChanger:true,
+                   ...BMSTablePageDefaultConfig
             }}
             //locale={{emptyText:'暂无数据'}}
             params={{...params}}

+ 126 - 86
src/components/BMSTable/style.less

@@ -1,17 +1,17 @@
-
-
-
 .bms-ant-table-wrapper {
     border-radius: 4px !important;
+
     table {
         border-radius: 4px !important;
     }
+
     .bms-ant-table-container {
-        border-start-start-radius:4px !important;
-        border-start-end-radius:4px !important;
+        border-start-start-radius: 4px !important;
+        border-start-end-radius: 4px !important;
     }
+
     .bms-ant-table-row-indent+.bms-ant-table-row-expand-icon {
-        margin-top: -2px !important;
+        //margin-top: -2px !important;
     }
 }
 
@@ -19,135 +19,175 @@
     border-radius: 4px !important;
 }
 
-.bms-ant-table-wrapper .bms-ant-table-tbody >tr >td {
+.bms-ant-table-wrapper .bms-ant-table-tbody>tr>td {
+    //padding: 8px 8px !important;
     border-top: 1px solid rgb(218 226 242) !important;
 }
 
 .bms-ant-table-wrapper .bms-ant-table-pagination.bms-ant-pagination {
-  
-     padding-right: 16px;
+
+    padding-right: 16px;
 }
 
-.bms-ant-table-wrapper .bms-ant-table.bms-ant-table-bordered >.bms-ant-table-container >.bms-ant-table-body >table >tbody>tr>td {
+.bms-ant-table-wrapper .bms-ant-table.bms-ant-table-bordered>.bms-ant-table-container>.bms-ant-table-body>table>tbody>tr>td {
     //#dae2f2
     border-inline-end: 1px solid #dae2f2 !important;
 }
 
-.bms-ant-table-wrapper .bms-ant-table.bms-ant-table-bordered >.bms-ant-table-container >.bms-ant-table-header >table >thead>tr {
+.bms-ant-table-wrapper .bms-ant-table.bms-ant-table-bordered>.bms-ant-table-container>.bms-ant-table-header>table>thead>tr {
+
     &:last-child {
-        &>th{
-            border-top:1px solid #dae2f2 !important;
+        &>th {
+            border-top: 1px solid #dae2f2 !important;
         }
     }
 }
 
 .BMSTable {
+    .bms-ant-table {
+        .bms-ant-space-align-center {
+            gap: 0 !important;
+        }
 
-    .bms-ant-space-align-center {
-        gap:0 !important;
-    }
-    
-    .bms-ant-table-thead {
-        .bms-ant-table-cell {
-            border-bottom: none !important;
-            padding: 9px 16px !important;
-            //border-top:1px solid #dae2f2 !important ;
-            background: rgb(238 243 250 / 100%) !important;
-            border-right: 1px solid  #dae2f2 !important;
-
-            .bms-ant-table-selection {
-                  .bms-ant-table-selection-extra {
-                      top:5px;
-                  }
-            }
+        .bms-ant-table-thead {
+            .bms-ant-table-cell {
+                border-bottom: none !important;
+                padding: 9px 8px !important;
+                //border-top:1px solid #dae2f2 !important ;
+                background: rgb(238 243 250 / 100%) !important;
+                //border-right: 1px solid  #dae2f2 !important;
 
-            &::before {
-                display: none;
-            }
+                .bms-ant-table-selection {
+                    .bms-ant-table-selection-extra {
+                        top: 5px;
+                    }
+                }
 
-            &:hover {
-                background: rgb(238 243 250 / 100%) !important;
-            }
 
-            &:last-child {
-                border-right: none;
-            }
-        }
 
-        .bms-ant-table-cell-fix-right {
-            &:last-child {
-                right: 0 !important;
-            }  
-        }
-    }
-    .bms-ant-table-tbody {
-        &>tr {
-            .bms-ant-table-cell {
-                height: 15px;
-                line-height: 15px;
-                font-size: 14px;
-                font-family: SourceHanSansCN-Medium, SourceHanSansCN;
-                // font-weight: 500;
-                
-                color: #17181A;
-                //padding: 13px 16px !important; 
-                border-bottom: none !important;
-        
+                &::before {
+                    display: none;
+                }
+
                 &:hover {
-                    border-radius: 0 !important;
-                    background: #FAFBFC !important;
-                   
+                    background: rgb(238 243 250 / 100%) !important;
+                }
+
+                &:last-child {
+                    border-right: none;
                 }
             }
-            &.bms-ant-table-row-selected {
-                  .bms-ant-table-cell {
-                    border-radius: 0 !important;
+
+            .bms-ant-table-cell-fix-right {
+                &:last-child {
+                    right: 0 !important;
+                }
+            }
+        }
+
+        .bms-ant-table-tbody {
+            &>tr {
+                .bms-ant-table-cell {
+                    // display: inline-flex;
+                    // flex-direction: row;
+                    // justify-content: flex-start;
+                    // align-items: center;
+                    // height: 40px;
+                    // line-height: 40px;
+                    font-size: 14px;
+                    font-family: SourceHanSansCN-Medium, SourceHanSansCN;
+                    // font-weight: 500;
+
+                    color: #17181A;
+                    padding: 9px 8px !important; 
+                    border-bottom: none !important;
+
+                    &>.bms-ant-typography {
+                        line-height:unset;
+                    }
+
+                    &.bms-ant-table-cell-with-append {
+                        .bms-ant-table-row-expand-icon {
+                             
+                        }
+                    }
+
                     &:hover {
-                        background:#bae0ff !important;   
+                        border-radius: 0 !important;
+                        background: #FAFBFC !important;
+
                     }
-                  }
-            }
+                }
+
+                &.bms-ant-table-row-selected {
+                    .bms-ant-table-cell {
+                        border-radius: 0 !important;
+
+                        &:hover {
+                            background: #bae0ff !important;
+                        }
+                    }
+                }
 
-            &:last-child > td {
-                 border-bottom: none !important;
+                &:last-child>td {
+                    border-bottom: none !important;
+                }
             }
         }
-    }
-   
-    .bms-ant-table-summary {
-        &>tr>td {
-            text-align: left !important;
-            padding: 13px 16px !important;
-            border-top: 1px solid #dae2f2 !important;
+
+        .bms-ant-table-summary {
+            &>tr>td {
+                text-align: left !important;
+                padding: 12px 8px !important;
+                border-top: 1px solid #dae2f2 !important;
+            }
         }
-    } 
-   
-    
 
-    
+       
+
+        &.bms-ant-table-bordered {
+            .bms-ant-table-container {
+                .bms-ant-table-thead {
+                    &>tr {
+                        &>th {
+                            border-right: 1px solid #dae2f2 !important;
+                        }
+
+                        &:last-child {
+                            &>th {
+                                border-top: 1px solid #dae2f2 !important;
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
     .bms-ant-pagination {
         padding: 7px 0;
-        margin:0 !important;
+        margin: 0 !important;
         border-top: 1px solid #dae2f2 !important;
+
         .bms-ant-pagination-item-active {
             font-weight: 600;
             background-color: #37F !important;
             border-color: #37F !important;
         }
-    } 
+    }
 
     .bms-ant-pagination .bms-ant-pagination-item-active a {
         color: #fff !important;
     }
-   
+
+
 }
 
 .bms-ant-table-wrapper .bms-ant-table-container table>thead>tr:first-child th:first-child {
-    border-start-start-radius:4px !important;
+    border-start-start-radius: 4px !important;
 }
 
 .bms-ant-table-wrapper .bms-ant-table-container table>thead>tr:first-child th:last-child {
-    border-start-end-radius:4px !important;
+    border-start-end-radius: 4px !important;
 }
 
 .bms-ant-empty-normal {

+ 3 - 0
src/global.less

@@ -43,6 +43,9 @@ textarea {
 
 
 
+
+
+
 //Modal
 
 .bms-ant-modal {

+ 1 - 1
src/pages/Table/components/UpdateForm.tsx

@@ -36,7 +36,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => (
           bodyStyle={{ padding: '32px 40px 48px' }}
           destroyOnClose
           title="规则配置"
-          visible={props.updateModalVisible}
+          open={props.updateModalVisible}
           footer={submitter}
           onCancel={() => props.onCancel()}
         >

+ 1 - 1
src/pages/Table/index.tsx

@@ -243,7 +243,7 @@ const TableList: React.FC<unknown> = () => {
 
       <Drawer
         width={600}
-        visible={!!row}
+        open={!!row}
         onClose={() => {
           setRow(undefined);
         }}

+ 113 - 96
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-06-12 16:08:41
+ * @LastEditTime: 2023-06-27 15:35:49
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlySet/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -16,7 +16,7 @@ import BMSPagecontainer from '@/components/BMSPageContainer';
 import { useEffect, useRef, useState } from 'react';
 import './style.less';
 
-import { Tree, TreeProps, Tabs, Input, Modal, Transfer, Divider, Select, Popconfirm, message, Button, Skeleton, Popover } from 'antd';
+import { Tree, TreeProps, Tabs, Input, Modal, Transfer, Divider, Select, Popconfirm, message, Button, Skeleton, Popover, Tooltip } from 'antd';
 import { DataNode } from 'antd/es/tree';
 
 import expandedIcon from '../../../../static/treenode_open.png';
@@ -24,7 +24,7 @@ import closeIcon from '../../../../static/treenode_collapse.png';
 import { BMSTable } from '@/components/BMSTable';
 import { ActionType, ModalForm, ProColumns, ProColumnType, ProForm, ProFormDependency, ProFormDigit, ProFormInstance, ProFormSelect, ProFormText, ProFormTextArea } from '@ant-design/pro-components';
 import { createFromIconfontCN } from '@ant-design/icons';
-import { addTableData, checkMonthlyReq, delTableDataRequest, downloadTemplateReq, editCheckProject, editManaIndexTableData, editTableData, editTableSalaryRequest, generateCheckProjectTableData, getCheckItemCalcStatus, getCheckProjectTableData, getCostData, getDepLists, getEmps, getHesuanUnits, getIncomeData, getManaIndexGroup, getManaIndexTableData, getNoCheckTableData, getPageCheckStatus, getProjects, getSalaryInfoTableData, importMonthlyperformanceRelaFiles } from './service';
+import { addTableData, checkMonthlyReq, delTableDataRequest, downloadTemplateReq, editCheckProject, editManaIndexTableData, editTableData, editTableSalaryRequest, generateCheckProjectTableData, getCheckItemCalcStatus, getCheckProjectTableData, getCostData, getDepLists, getEmps, getHesuanUnits, getIncomeData, getManaIndexGroup, getManaIndexTableData, getManaIndicatorJiangchengCoefficient, getNoCheckTableData, getPageCheckStatus, getProjects, getSalaryInfoTableData, importMonthlyperformanceRelaFiles } from './service';
 
 
 import editIcon from '../../../../static/editIcon.png';
@@ -90,51 +90,54 @@ const MonthlyDataCheck: React.FC = () => {
 
     const [totalNum, set_totalNum] = useState(0);  //收入和成本数据的总和数值
 
-    const [tableH,set_tableH] = useState(0);
+    const [tableH, set_tableH] = useState(0);
 
-    const [manaIndexGroups, set_manaIndexGroups] = useState<{ id: number, groupCode: string, groupName: string, hospId: number }[]>([]); //管理指标分组
+    const [computeMethod, set_computeMethod] = useState('1'); //1按考核分级 2按总分
+
+    const [manaIndexGroups, set_manaIndexGroups] = useState<{
+        depiction: any; id: number, groupCode: string, groupName: string, hospId: number 
+}[]>([]); //管理指标分组
     const [currentSelectedManaGroup, set_currentSelectedManaGroup] = useState<{ id: number, groupCode: string, groupName: string, hospId: number }>();
 
     const formRef = useRef<ProFormInstance>();
 
     const tableRef = useRef<ActionType>();
 
-    const tableColumnOne = [
+    const tableColumnOne:ProColumns[] = [
         {
             title: '职类',
             dataIndex: 'unitTypeName',
             key: 'unitTypeName',
-     
         },
         {
             title: '核算单元名称',
             dataIndex: 'unitName',
             key: 'unitName',
-          
+
         },
         {
             title: '科室',
             dataIndex: 'deptName',
             key: 'deptName',
-           
+
         },
         {
             title: '工号',
             dataIndex: 'empNo',
             key: 'empNo',
-            
+
         },
         {
             title: '姓名',
             dataIndex: 'empName',
             key: 'empName',
-            
+
         },
         {
             title: '工资类型',
             dataIndex: 'salaryType',
             key: 'salaryType',
-           
+
         },
 
     ]
@@ -144,31 +147,31 @@ const MonthlyDataCheck: React.FC = () => {
             title: '职类',
             dataIndex: 'unitTypeName',
             key: 'unitTypeName',
-           
+
         },
         {
             title: '核算单元名称',
             dataIndex: 'unitName',
             key: 'unitName',
-         
+
         },
         {
             title: '科室',
             dataIndex: 'deptName',
             key: 'deptName',
-           
+
         },
         {
             title: '项目名称',
             dataIndex: 'assessmentName',
             key: 'assessmentName',
-            
+
         },
         {
             title: '分配方式',
             dataIndex: 'distributionType',
             key: 'distributionType',
-          
+
             render: (record: any) => {
 
                 if (record == 1) return '占比'
@@ -180,25 +183,25 @@ const MonthlyDataCheck: React.FC = () => {
             title: '数值',
             dataIndex: 'value',
             key: 'value',
-         
+
         },
         {
             title: '工号',
             dataIndex: 'targetValue',
             key: 'targetValue',
-          
+
         },
         {
             title: '姓名',
             dataIndex: 'targetValueName',
             key: 'targetValueName',
-          
+
         },
         {
             title: '说明',
             dataIndex: 'description',
             key: 'description',
-          
+
         }
 
     ];
@@ -208,20 +211,20 @@ const MonthlyDataCheck: React.FC = () => {
             title: '项目名称',
             dataIndex: 'itemName',
             key: 'itemName',
-        
+
         },
         {
             title: '类型',
             dataIndex: 'itemTypeName',
             key: 'itemTypeName',
-          
+
 
         },
         {
             title: '点值',
             dataIndex: 'orderPointValue',
             key: 'orderPointValue',
-         
+
         },
     ];
 
@@ -230,31 +233,31 @@ const MonthlyDataCheck: React.FC = () => {
             title: '年度',
             dataIndex: 'year',
             key: 'year',
-           
+
         },
         {
             title: '月份',
             dataIndex: 'month',
             key: 'month',
-           
+
         },
         {
             title: '项目名称',
             dataIndex: 'itemName',
             key: 'itemName',
-        
+
         },
         {
             title: '项目类型',
             dataIndex: 'itemTypeName',
             key: 'itemTypeName',
-         
+
         },
         {
             title: '金额',
             dataIndex: 'cost',
             key: 'cost',
-          
+
         },
         // {
         //     title: '操作人',
@@ -442,25 +445,25 @@ const MonthlyDataCheck: React.FC = () => {
     }
 
 
-    const getCalcStatus =async () => {
-        const resp = await getCheckItemCalcStatus(currentComputeDate as string,'ASSESSMENT');
-        if(resp){
-           if(resp.calculating){
-            //继续计算
-            set_loading(true);
-            return false
-           }else{
-            //计算已完成
-            set_loading(false);
+    const getCalcStatus = async () => {
+        const resp = await getCheckItemCalcStatus(currentComputeDate as string, 'ASSESSMENT');
+        if (resp) {
+            if (resp.calculating) {
+                //继续计算
+                set_loading(true);
+                return false
+            } else {
+                //计算已完成
+                set_loading(false);
+                return true
+            }
+        } else {
+            tableRef.current?.reload();
             return true
-           }
-        }else{
-           tableRef.current?.reload();
-           return true
         }
-   }
+    }
 
-   const func = (str:string)=>str&&str.replace(/(?:\.0*|(\.\d+?)0+)$/,'$1')+'%';
+    const func = (str: string) => str && str.replace(/(?:\.0*|(\.\d+?)0+)$/, '$1') + '%';
 
     const getTableData = async (type: '1' | '2' | '3' | '4' | '5' | '6', params: any, sort: any, filter: any) => {
 
@@ -497,9 +500,9 @@ const MonthlyDataCheck: React.FC = () => {
             }
             if (type == '3') {
 
-                
 
-                if(!loading){
+
+                if (!loading) {
                     //计算完和未计算
 
                     const resp = await getCheckProjectTableData({
@@ -520,18 +523,18 @@ const MonthlyDataCheck: React.FC = () => {
             }
             if (type == '4') {
                 if (currentSelectedManaGroup) {
-                    
+
                     const resp = await getManaIndexTableData({ ...params, computeDate: currentComputeDate, groupId: currentSelectedManaGroup.id });
                     if (resp) {
-                        const columns = resp.title.map((item: any,titleIndex:number) =>{
-                            
-                              return (item.children ? {
+                        const columns = resp.title.map((item: any, titleIndex: number) => {
+
+                            return (item.children ? {
                                 title: () => {
                                     return <div>{item.name} <span style={{ fontSize: 14, fontFamily: 'SourceHanSansCN-Medium, SourceHanSansCN', fontWeight: 500, color: item.arrow == 'up' ? '#00BF8F' : '#FF4060' }}>{item.arrow == 'up' ? '↑' : '↓'}</span></div>
                                 },
                                 key: item.code,
                                 dataIndex: item.name,
-                                children: item.children.map((a: any,aindex:number) => {
+                                children: item.children.map((a: any, aindex: number) => {
                                     return {
                                         title: a.name,
                                         dataIndex: `${a.code}${item.code}`,
@@ -540,10 +543,10 @@ const MonthlyDataCheck: React.FC = () => {
                                         align: 'center',
                                         renderText(num: any, record: any, index: any, action: any) {
                                             //console.log({record,a,titleIndex})
-                                            return (item.dataType == 1||a.name == '得分')?a.name == '得分'?<span style={{color:record[`veto${titleIndex+1}`]?'#FF8C19':'#17181A'}}>{num}</span>:num:num?func((num*100).toFixed(2)):'-'
+                                            return (item.dataType == 1 || a.name == '得分') ? a.name == '得分' ? <span style={{ color: record[`veto${titleIndex + 1}`] ? '#FF8C19' : '#17181A' }}>{num}</span> : num : num ? func((num * 100).toFixed(2)) : '-'
                                         },
                                     }
-    
+
                                 })
                             } : {
                                 title: item.name,
@@ -552,7 +555,7 @@ const MonthlyDataCheck: React.FC = () => {
                                 width: 100,
                                 align: 'center',
                                 renderText(num: any, record: any, index: any, action: any) {
-                                    return (item.dataType == 1)?num:num?func((num*100).toFixed(2)+'%'):'-'
+                                    return (item.dataType == 1) ? num : num ? func((num * 100).toFixed(2) + '%') : '-'
                                 },
                             })
                         });
@@ -564,7 +567,7 @@ const MonthlyDataCheck: React.FC = () => {
                             title: '核算单元',
                             dataIndex: 'unitName',
                             key: 'unitName',
-                          
+
                             width: 120,
                             fixed: 'left',
                         }, ...columns,
@@ -572,7 +575,7 @@ const MonthlyDataCheck: React.FC = () => {
                             title: '总得分',
                             dataIndex: 'totalScore',
                             key: 'totalScore',
-                          
+
                             width: 100,
                             fixed: 'right',
                         },
@@ -582,12 +585,13 @@ const MonthlyDataCheck: React.FC = () => {
                             key: 'level',
                             width: 100,
                             fixed: 'right',
+                            hideInTable:computeMethod == '2'?true:false
                         },
                         {
                             title: '系数',
                             dataIndex: 'kpi',
                             key: 'kpi',
-                          
+
                             width: 100,
                             fixed: 'right',
                         },
@@ -599,10 +603,10 @@ const MonthlyDataCheck: React.FC = () => {
 
                             for (let index = 0; index < item.value.length; index++) {
                                 for (const key in item.value[index]) {
-                                    if(key == 'veto'){
+                                    if (key == 'veto') {
                                         //${key}${item.value[index].code}-${index} 中的index用于指定是该列的哪一格
                                         rowData[`${key}${item.value[index].code}`] = item.value[index][`${key}`]
-                                    }else{
+                                    } else {
                                         rowData[`${key}${item.value[index].code}`] = item.value[index][`${key}`]
                                     }
                                 }
@@ -750,7 +754,7 @@ const MonthlyDataCheck: React.FC = () => {
                 tableRef.current?.reload();
             }
             return Promise.resolve(true);
-            
+
         }
     }
 
@@ -759,14 +763,14 @@ const MonthlyDataCheck: React.FC = () => {
          * index 获取的表格类型下标
          */
 
-        if (index == 3&&!loading) {
+        if (index == 3 && !loading) {
             Modal.confirm({
                 title: '注意',
                 cancelText: '',
-                okText:'确定',
+                okText: '确定',
                 closable: true,
                 content: others ? '获取单个操作会覆盖上次获取的该核算单元的数据,确定要继续操作?' : '获取所有操作会覆盖所有已获取的数据,确定要继续操作?',
-                onOk: () => { set_loading(true);confirmGenerateHandle(index,others) }
+                onOk: () => { set_loading(true); confirmGenerateHandle(index, others) }
             })
         }
 
@@ -793,7 +797,7 @@ const MonthlyDataCheck: React.FC = () => {
                 unitCode: formData.unitCode,
                 deptCode: formData.deptCode,
                 nonAssessmentCode: typeof formData.assessmentCode == 'number' ? formData.assessmentCode : formData.assessmentCode.value,
-                targetValue: `${formData.userId?formData.userId:''}`,
+                targetValue: `${formData.userId ? formData.userId : ''}`,
                 value: `${formData.value}`,
                 description: formData.description
             }
@@ -813,7 +817,7 @@ const MonthlyDataCheck: React.FC = () => {
                 unitCode: formData.unitCode,
                 deptCode: formData.deptCode,
                 nonAssessmentCode: formData.assessmentCode.value,
-                targetValue: `${formData.userId?formData.userId:''}`,
+                targetValue: `${formData.userId ? formData.userId : ''}`,
                 value: `${formData.value}`,
                 description: formData.description
 
@@ -945,7 +949,7 @@ const MonthlyDataCheck: React.FC = () => {
                 }}
             >
                 <FormItem name={'importFile'}>
-                    <BMSUpload downloadTemplateFile={auditType == '0' ? () => index == 4?downloadTemplate(index,currentSelectedManaGroup?.id):downloadTemplate(index) : () => { }} />
+                    <BMSUpload downloadTemplateFile={auditType == '0' ? () => index == 4 ? downloadTemplate(index, currentSelectedManaGroup?.id) : downloadTemplate(index) : () => { }} />
                 </FormItem>
 
             </ModalForm>
@@ -987,38 +991,48 @@ const MonthlyDataCheck: React.FC = () => {
         //       //管理指标
         //       await downloadTemplateReq(index,currentSelectedManaGroup?.groupCode);
         // }else{
-            
+
         // }
 
     }
 
-    
-    const handleResize = (e:any)=>{
+    const getComputeMethod = async () => {
+        const resp = await getManaIndicatorJiangchengCoefficient();
+        if(resp){
+            const need = resp.list.filter((a:any)=>(a.code == '1670618922728169472'));
+            if(need.length>0){
+                 set_computeMethod(need[0].value);
+            }
+        }
+    }
+
+
+    const handleResize = (e: any) => {
         const wH = e.target.innerHeight;
         const tableHeight = wH - 320;
         set_tableH(tableHeight);
     }
 
-    function doResize(){
+    function doResize() {
         setTimeout(() => {
             const ev: any = new Event('resize');
             window.dispatchEvent(ev);
-        },0)
+        }, 0)
     }
 
 
-    useEffect(()=>{
-         if(loading){
-            inervalhander = setInterval(()=>{
-                   getCalcStatus();
-               },60000)
-         }
-    },[loading])
+    useEffect(() => {
+        if (loading) {
+            inervalhander = setInterval(() => {
+                getCalcStatus();
+            }, 60000)
+        }
+    }, [loading])
 
 
 
     useEffect(() => {
-        console.log({currentSelectedManaGroup});
+        console.log({ currentSelectedManaGroup });
         set_tableDataFilterParams({
             ...tableDataFilterParams,
             id: currentSelectedManaGroup?.id,
@@ -1090,11 +1104,12 @@ const MonthlyDataCheck: React.FC = () => {
 
         getCurrentComputeDate();
         set_tableColumn(tableColumnOne as ProColumns[]);
+        getComputeMethod();
 
-        window.addEventListener('resize',(e)=>handleResize(e)) //监听窗口大小改变
+        window.addEventListener('resize', (e) => handleResize(e)) //监听窗口大小改变
         doResize();
-        return ()=>{
-            window.removeEventListener('resize',(e)=>handleResize(e));
+        return () => {
+            window.removeEventListener('resize', (e) => handleResize(e));
         }
 
     }, [])
@@ -1331,7 +1346,7 @@ const MonthlyDataCheck: React.FC = () => {
                                                                 });
                                                             }
                                                         }} suffix={
-                                                            <IconFont type="iconsousuo" style={{color:'#99A6BF'}} onClick={() => tableDataSearchHandle('deptName')} />
+                                                            <IconFont type="iconsousuo" style={{ color: '#99A6BF' }} onClick={() => tableDataSearchHandle('deptName')} />
                                                         } />
                                                     </div>
                                                 </div>
@@ -1391,7 +1406,7 @@ const MonthlyDataCheck: React.FC = () => {
                                                         title: '金额',
                                                         dataIndex: 'salary',
                                                         key: 'salary',
-                                                  
+
                                                         width: '10%',
                                                         // shouldCellUpdate:(record:any, prevRecord:any) => true,
                                                         render: (text: any, record: any) => {
@@ -1451,7 +1466,7 @@ const MonthlyDataCheck: React.FC = () => {
                                                     title: '操作',
                                                     fixed: 'right',
                                                     key: 'option',
-                                                 
+
                                                     width: 130,
                                                     valueType: 'option',
                                                     render: (_: any, record: any) => [
@@ -1569,24 +1584,24 @@ const MonthlyDataCheck: React.FC = () => {
                                                             </div>
                                                         </div>
                                                         <Popover open={ifShowTip} content={'当前处于审核中,无法操作!'} >
-                                                            <div className={auditType == '1'||loading ? 'btnGroup disabled' : 'btnGroup'}
+                                                            <div className={auditType == '1' || loading ? 'btnGroup disabled' : 'btnGroup'}
                                                                 onMouseEnter={() => auditType == '0' ? set_ifShowTip(false) : set_ifShowTip(true)}
                                                                 onMouseLeave={() => set_ifShowTip(false)}
                                                             >
-                                                                <span key="1" onClick={auditType == '0'? () => generateFunc(3, true) : () => { }}>获取单个</span>
-                                                                <span key="2" onClick={auditType == '0'? () => generateFunc(3) : () => { }}>获取所有</span>
+                                                                <span key="1" onClick={auditType == '0' ? () => generateFunc(3, true) : () => { }}>获取单个</span>
+                                                                <span key="2" onClick={auditType == '0' ? () => generateFunc(3) : () => { }}>获取所有</span>
                                                             </div>
                                                         </Popover>
                                                     </div>
-                                                    {currentComputeDate && <BMSTable actionRef={tableRef} loading={{ spinning: loading, tip: '正在计算数据...' }}   rowKey='id' params={tableDataFilterParams} columns={auditType == '0' ? [...tableColumn, {
+                                                    {currentComputeDate && <BMSTable actionRef={tableRef} loading={{ spinning: loading, tip: '正在计算数据...' }} rowKey='id' params={tableDataFilterParams} columns={auditType == '0' ? [...tableColumn, {
                                                         title: '数值',
                                                         dataIndex: 'value',
                                                         key: 'value',
-                                                   
+
                                                         render: (text: any, record: any) => {
 
                                                             return (
-                                                                <div key={'editCheckitem'} style={{ display: 'flex', flexDirection: 'row', width: '100%', justifyContent: 'center', alignItems: 'center' }}>
+                                                                <div key={'editCheckitem'} style={{ display: 'flex', flexDirection: 'row', width: '100%', justifyContent: 'flex-start', alignItems: 'center' }}>
 
                                                                     <div style={{ width: '80px', height: 16, display: 'flex', flexDirection: 'row', justifyContent: 'center', alignItems: 'center' }}>
                                                                         {
@@ -1619,7 +1634,7 @@ const MonthlyDataCheck: React.FC = () => {
                                                             title: '数值',
                                                             dataIndex: 'value',
                                                             key: 'value',
-                                                          
+
                                                         }
                                                     ]} request={(params, sort, filter) => getTableData('3', params, sort, filter)} />}
                                                 </div>
@@ -1638,7 +1653,9 @@ const MonthlyDataCheck: React.FC = () => {
                                                         {
                                                             manaIndexGroups.map((item, index) => {
                                                                 return (
-                                                                    <div key={index} className={currentSelectedManaGroup?.id == item.id ? 'tab on' : 'tab'} onClick={() => onManaIndexGroupClick(item)}>{item.groupName}</div>
+                                                                    <Tooltip placement="top" title={item.depiction?item.depiction:item.groupName}>
+                                                                        <div key={index} className={currentSelectedManaGroup?.id == item.id ? 'tab on' : 'tab'} onClick={() => onManaIndexGroupClick(item)}>{item.groupName}</div>
+                                                                    </Tooltip>
                                                                 )
                                                             })
                                                         }
@@ -1668,13 +1685,13 @@ const MonthlyDataCheck: React.FC = () => {
                                                     </div>
                                                 </Popover>
                                             </div>
-                                            {currentComputeDate && tableColumn && <BMSTable className='BMS-ManaIndextable' rowClassName={() => 'BMS-ManaIndextable-row'} bordered actionRef={tableRef} scroll={{ x: (100 * (tableColumn.length - 2)) + 120 + 300,y:tableH}} rowKey='unitCode' columns={auditType == '0' ? [...tableColumn,
+                                            {currentComputeDate && tableColumn && <BMSTable className='BMS-ManaIndextable' rowClassName={() => 'BMS-ManaIndextable-row'} bordered actionRef={tableRef} scroll={{ x: (100 * (tableColumn.length - 2)) + 120 + 300, y: tableH }} rowKey='unitCode' columns={auditType == '0' ? [...tableColumn,
                                             {
                                                 title: '操作',
                                                 key: 'option',
                                                 valueType: 'option',
                                                 width: 100,
-                                               
+
                                                 fixed: 'right',
                                                 render: (_: any, record: any) => [
                                                     <EditManaIndexTableRow record={record} key={'edit'} />

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

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2022-12-21 11:13:51
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-04-19 15:26:40
+ * @LastEditTime: 2023-06-27 13:36:28
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlyInfoCheck/service.ts
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -543,4 +543,13 @@ export const downloadTemplateReq = (index: number,id?:number|string) => {
 
 }
 
+//获取管理指标的奖惩系数计算方式
+export const getManaIndicatorJiangchengCoefficient = () => {
+    return request('/performance/parameter/getList?current=1&pageSize=500', {
+        method: 'GET',
+    })
+
+}
+
+
 

+ 3 - 3
src/pages/budgetMana/monthlyDataCheck/style.less

@@ -2,9 +2,8 @@
     position: relative;
     display: flex;
     flex-direction: row;
-    // min-height: calc(100vh - 80px);
     border-radius: 4px;
-    overflow: hidden;
+    // overflow: hidden;
     background-color: #FFF;
 
     .maskCover {
@@ -131,8 +130,9 @@
                         .tab {
                             text-align: center;
                             line-height: 24px;
-                            width: 48px;
+                            min-width:48px;
                             height: 24px;
+                            padding: 0 8px;
                             color: #525866;
                             font-size: 14px;
                             cursor: pointer;

+ 10 - 2
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-06-12 17:03:28
+ * @LastEditTime: 2023-06-25 10:19:04
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlySet/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -111,7 +111,7 @@ const SecondaryDitriComputed: React.FC = () => {
         // },
         {
             title: '姓名',
-            width: 120,
+            width: 140,
             fixed: 'left',
             dataIndex: 'name',
             renderText(text, record, index, action) {
@@ -576,6 +576,13 @@ const SecondaryDitriComputed: React.FC = () => {
         }, 0)
     }
 
+    const computeHandle = ()=>{
+        Modal.confirm({
+            title:'注意',
+            content:'重新计算会覆盖原有数据,确定要继续计算操作?'
+        })
+    }
+
     const saveHandle = async () => {
 
         const resp = await save(needSaveData);
@@ -820,6 +827,7 @@ const SecondaryDitriComputed: React.FC = () => {
                                                     onMouseEnter={() => auditType == '0' ? commitStatus == '1' ? set_ifShowTip(true) : set_ifShowTip(false) : set_ifShowTip(true)}
                                                     onMouseLeave={() => set_ifShowTip(false)}
                                                 >
+                                                    {!ifEditMode && <span  className='compute cancel' onClick={commitStatus == '0' && auditType != '1' ? () => computeHandle() : () => { }}>计算</span>}
                                                     {!ifEditMode && <span  className='cancel' onClick={commitStatus == '0' && auditType != '1' ? () => set_ifEditMode(true) : () => { }}>编辑</span>}
                                                     {ifEditMode && <span  className='cancel' onClick={commitStatus == '0' ? () => set_ifEditMode(false) : () => { }}>取消</span>}
                                                     {ifEditMode && <span  className='editBtn' onClick={commitStatus == '0' && auditType != '1' ? () => saveHandle() : () => { }}>保存</span>}

+ 5 - 1
src/pages/setting/checkUnitSet/checkUnitMana/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-06-08 13:55:50
+ * @LastEditTime: 2023-06-27 10:00:04
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlySet/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -370,6 +370,10 @@ const CheckUnitMana: React.FC = () => {
                 set_currentSelectedTreeNode(node);
                 setExpandedKeys([nodeParent.code]);
             }
+            // else{
+            //     set_currentSelectedTreeNode(treeData[0]);
+            //     setExpandedKeys([treeData[0].code]);
+            // }
         }
     }, [treeData]);
 

+ 20 - 2
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-06-15 17:59:25
+ * @LastEditTime: 2023-06-27 10:14:22
  * @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
  */
@@ -14,7 +14,7 @@ import BMSPagecontainer from '@/components/BMSPageContainer';
 import { BMSTable } from '@/components/BMSTable';
 import { createFromIconfontCN } from '@ant-design/icons';
 
-import { ActionType, ProFormDigit, ProFormInstance, ProFormSelect } from '@ant-design/pro-components';
+import { ActionType, ProForm, ProFormDigit, ProFormInstance, ProFormSelect } from '@ant-design/pro-components';
 import { ModalForm, ProFormText, ProFormTextArea } from '@ant-design/pro-form'
 import { ProColumns } from '@ant-design/pro-table';
 import { Form, Input, InputNumber, message, Modal, Popconfirm, Table, Transfer } from 'antd';
@@ -100,6 +100,16 @@ export default function IndicGroupWeightSet() {
 
             }
         },
+        {
+            title: '总分上限',
+            dataIndex: 'ceiling',
+            width: 80
+        },
+        {
+            title: '说明',
+            dataIndex: 'depiction',
+            ellipsis: true,
+        },
         {
             title: '操作',
             key: 'option',
@@ -517,8 +527,16 @@ export default function IndicGroupWeightSet() {
                                 name="groupName"
                                 label="分组名称:"
                                 placeholder="请输入"
+                                fieldProps={{maxLength:8,showCount:true}}
                                 rules={[{ required: true, message: '名称不能为空!' }]}
                             />
+                            <div style={{display:'flex',flexDirection:'row',width:'320px',justifyContent:'space-between'}}>
+                                <span>总分上下限:</span>
+                                <ProFormDigit name='floor' width={100} placeholder='总分下限'  />
+                                <span>-</span>
+                                <ProFormDigit name='ceiling' width={100} placeholder='总分上限'  /> 
+                            </div>
+
                             <ProFormTextArea name={'depiction'} label='说明:' />
                         </>
                     )

+ 330 - 109
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-06-15 17:57:19
+ * @LastEditTime: 2023-06-29 15:56:47
  * @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 } from './service';
+import { delRequest, getIndicTableData, getBillingItemTableData, getTreeDataRespType, getTreeData, getAllCheckUnit, saveCopyRequest, getAllCheckUnitProjectData, addBillingItemData, editBillingItemData, addIndicItemData, editIndicItemData, getNonCheckTableData, addNonCheckItemData, getCostItemsTableData, addCostItemData, editCostItemData } from './service';
 import { TransferItem, TransferProps } from 'antd/es/transfer';
 import { getComputeDate } from '@/pages/Home/service';
 
@@ -42,6 +42,7 @@ import { getNonCheckProjectTableData } from '../nonAssessmentProjectMana/service
 
 
 import '../../../../utils/zhongtaiB';
+import { getCostProjectTable } from '../costIncomeProjectSet/service';
 
 const IconFont = createFromIconfontCN({
     scriptUrl: '',
@@ -83,7 +84,9 @@ const CheckUnitProjectSet: React.FC = () => {
 
     const ref = React.createRef<{ save: any; getSelectedKeys: any }>();
 
-    const [currentEditCoreFlag,set_currentEditCoreFlag] = useState(0);
+    const [currentEditCoreFlag, set_currentEditCoreFlag] = useState(0);
+    const [tableSelecterColumn, set_tableSelecterColumn] = useState<ProColumns[]>([]);
+    const [isCopy, set_isCopy] = useState(false);
 
 
 
@@ -97,24 +100,24 @@ const CheckUnitProjectSet: React.FC = () => {
             renderText(text, record, index, action) {
                 return <span style={{ display: 'inline-block', height: '26px', lineHeight: '26px' }}>{text}</span>
             },
-            ellipsis:true
+            ellipsis: true
         },
         {
             title: '项目名称',
             dataIndex: 'itemName',
-            ellipsis:true
+            ellipsis: true
         },
         {
             title: '项目类别',
             dataIndex: 'itemType',
-            ellipsis:true
+            ellipsis: true
         },
         {
             title: '点值',
             width: 120,
-            ellipsis:true,
+            ellipsis: true,
             dataIndex: 'orderPointValue',
-            renderText:(text, record, index, action)=>{
+            renderText: (text, record, index, action) => {
                 if (ifEdit && currentEditRow?.id == record.id) {
                     return <ProFormDigit noStyle fieldProps={{
                         defaultValue: text, onChange(value) {
@@ -132,17 +135,17 @@ const CheckUnitProjectSet: React.FC = () => {
         {
             title: '类型',
             width: 120,
-            ellipsis:true,
+            ellipsis: true,
             dataIndex: 'coreFlagName',
-            renderText:(text, record, index, action)=>{
+            renderText: (text, record, index, action) => {
                 if (ifEdit && currentEditRow && currentEditRow?.id == record.id) {
-                    return <Select defaultValue={record.coreFlag} style={{width:'100%'}} options={
+                    return <Select defaultValue={record.coreFlag} style={{ width: '100%' }} options={
                         [
-                            { label: '核心', value: 1 }, { label: '非核心', value: 0 },{ label: '不计', value:2 }
+                            { label: '核心', value: 1 }, { label: '非核心', value: 0 }, { label: '不计', value: 2 }
                         ]
-                    } onChange={(a, b) => { set_currentEditCoreFlag(a)}} />
+                    } onChange={(a, b) => { set_currentEditCoreFlag(a) }} />
                 } else {
-                    return <span style={{ display: 'inline-block', width:120}}>{text}</span>
+                    return <span style={{ display: 'inline-block', width: 120 }}>{text}</span>
                 }
             },
         }
@@ -152,30 +155,30 @@ const CheckUnitProjectSet: React.FC = () => {
         {
             title: '项目代码',
             dataIndex: 'indicatorCode',
-            ellipsis:true,
+            ellipsis: true,
             renderText(text, record, index, action) {
                 return <span style={{ display: 'inline-block', height: '26px', lineHeight: '26px' }}>{text}</span>
             },
         },
         {
             title: '项目名称',
-            ellipsis:true,
+            ellipsis: true,
             dataIndex: 'indicatorName',
         },
         {
             title: '类型',
-            ellipsis:true,
+            ellipsis: true,
             dataIndex: 'indicatorTypeName',
         },
         {
             title: '定义',
-            ellipsis:true,
+            ellipsis: true,
             dataIndex: 'indicatorDefinition',
         },
         {
             title: '点值',
             width: 120,
-            ellipsis:true,
+            ellipsis: true,
             dataIndex: 'orderPointValue',
             renderText(text, record, index, action) {
                 if (ifEdit && currentEditRow?.id == record.id) {
@@ -196,7 +199,7 @@ const CheckUnitProjectSet: React.FC = () => {
     const nonCheckTableColumn: ProColumns[] = [
         {
             title: '项目名称',
-            ellipsis:true,
+            ellipsis: true,
             dataIndex: 'nonAssessmentName',
             renderText(text, record, index, action) {
                 return <span style={{ display: 'inline-block', height: '26px', lineHeight: '26px' }}>{text}</span>
@@ -204,34 +207,66 @@ const CheckUnitProjectSet: React.FC = () => {
         },
         {
             title: '分配方式',
-            ellipsis:true,
+            ellipsis: true,
             dataIndex: 'distributionTypeName',
         },
         {
             title: '分配对象',
-            ellipsis:true,
+            ellipsis: true,
             dataIndex: 'distributionTargetName',
         },
         {
             title: '上限值',
-            ellipsis:true,
+            ellipsis: true,
             dataIndex: 'ceiling',
         },
         {
             title: '评分项',
             width: 260,
             dataIndex: 'orderPointValue',
-            ellipsis:true,
+            ellipsis: true,
             renderText(text, record) {
-                return record.secondItem?record.secondItem.reduce((prev: any,cur: any)=>`${prev.length>0?prev+'|':prev}${cur.secondItemName}`,''):''
+                return record.secondItem ? record.secondItem.reduce((prev: any, cur: any) => `${prev.length > 0 ? prev + '|' : prev}${cur.secondItemName}`, '') : ''
             },
         }
     ];
+    const costTableColumn: ProColumns[] = [
+        {
+            title: '项目名称',
+            ellipsis: true,
+            dataIndex: 'name',
+            // renderText(text, record, index, action) {
+            //     return <span style={{ display: 'inline-block', height: '26px', lineHeight: '26px' }}>{text}</span>
+            // },
+        },
+        {
+            title: '类型',
+            ellipsis: true,
+            dataIndex: 'itemTypeName',
+        },
+        {
+            title: '可控',
+            ellipsis: true,
+            dataIndex: 'ctrlFlag',
+            renderText(text, record, index, action) {
+                return ifEdit ? <ProFormSelect noStyle fieldProps={{
+                    defaultValue: text, onChange(value, option) {
+                        set_currentEditRow({ ...currentEditRow, ctrlFlag: value })
+                    },
+                }} options={[{ label: '是', value: 1 }, { label: '否', value: 0 }]} /> : text == 1 ? '是' : '否'
+            },
+        },
+        {
+            title: '序号',
+            ellipsis: true,
+            dataIndex: 'seqNo',
+        },
+    ];
 
 
     const delHandle = async (record: any) => {
-        const {  id  } = record;
-        const resp = await delRequest({id: id},currentSelectedTabKey);
+        const { id } = record;
+        const resp = await delRequest({ id: id }, currentSelectedTabKey);
         if (resp) {
             message.success('操作成功');
             tableRef.current?.reload();
@@ -240,10 +275,10 @@ const CheckUnitProjectSet: React.FC = () => {
 
 
 
-    const onSelect: TreeProps['onSelect'] = (selectedKeys, info:any) => {
+    const onSelect: TreeProps['onSelect'] = (selectedKeys, info: any) => {
         // console.log('selected', selectedKeys, info);
-        const { node} = info;
-        if(!node.child)set_currentSelectedTreeNode(node);
+        const { node } = info;
+        if (!node.child) set_currentSelectedTreeNode(node);
     };
 
 
@@ -260,7 +295,7 @@ const CheckUnitProjectSet: React.FC = () => {
 
 
 
-    const getTableData = async (type: 'BILL' | 'INDIC' | 'NONCHECK', params: any, sort: any, filter: any) => {
+    const getTableData = async (type: 'BILL' | 'INDIC' | 'NONCHECK' | 'COST', params: any, sort: any, filter: any) => {
         // console.log({ currentSelectedTreeNode });
         // console.log({ params, sort, filter });
 
@@ -323,6 +358,23 @@ const CheckUnitProjectSet: React.FC = () => {
                     success: true
                 }
             }
+            if (type == 'COST') {
+                const resp = await getCostItemsTableData({
+                    unitCode: currentSelectedTreeNode.code,
+                    ...params
+                });
+                if (resp) {
+
+                    return {
+                        data: resp,
+                        success: true,
+                    }
+                }
+                return {
+                    data: [],
+                    success: true
+                }
+            }
         }
 
         return []
@@ -349,7 +401,7 @@ const CheckUnitProjectSet: React.FC = () => {
         },
     ];
 
-    const tableSelecterColumn = [
+    const checkUnitColumns = [
         {
             title: '核算单元名称',
             dataIndex: 'unitName',
@@ -359,6 +411,12 @@ const CheckUnitProjectSet: React.FC = () => {
             dataIndex: 'unitTypeName',
 
         },
+    ];
+    const costItemColumns = [
+        {
+            title: '项目名称',
+            dataIndex: 'name',
+        }
     ]
 
 
@@ -366,6 +424,7 @@ const CheckUnitProjectSet: React.FC = () => {
     const openCopyHandleModal = () => {
 
         set_ifShowModal(true);
+        set_isCopy(true);
     }
 
     const openTransfer = () => {
@@ -374,7 +433,7 @@ const CheckUnitProjectSet: React.FC = () => {
             title: '添加',
             icon: <></>,
             width: 800,
-            centered:true,
+            centered: true,
             okText: '确定',
             cancelText: '取消',
             content: <TableTransfer
@@ -397,39 +456,81 @@ const CheckUnitProjectSet: React.FC = () => {
 
         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 getFuncList = async () => {
-            const resp = await getAllCheckUnit();
-            if (resp) {
-                const filteredData = resp.filter((a:any)=>a.code != currentSelectedTreeNode.code);
-                set_datasource(filteredData);
-                set_showList(filteredData);
+            if (isCopy) {
+                const resp = await getAllCheckUnit();
+                if (resp) {
+                    const filteredData = resp.filter((a: any) => a.code != currentSelectedTreeNode.code);
+                    set_datasource(filteredData);
+                    set_showList(filteredData);
+                }
+            } else {
+                //成本项目添加
+                const resp = await getCostProjectTable();
+                if (resp) {
+                    //const filteredData = resp.filter((a:any)=>a.code != currentSelectedTreeNode.code);
+                    set_datasource(resp);
+                    set_showList(resp);
+                }
+
             }
+
         }
 
 
-        const onSelectChange = (newSelectedRowKeys: React.Key[]) => {
+        const onSelectChange = (newSelectedRowKeys: React.Key[], selectedRows: any) => {
             setSelectedKeys([...newSelectedRowKeys]);
+            set_selectedRows(selectedRows);
 
         };
 
         const save = async () => {
+            if (!isCopy && currentSelectedTabKey == '4') {
+                //console.log({selectedKeys,selectedRows});
+                const result = {
+                    itemList: selectedRows.map((a: any) => ({
+                        code: a.code,
+                        ctrlFlag: a.ctrlFlag,
+                        itemType: a.itemType,
+                        name: a.name,
+                        parentCode: a.parentCode,
+                        seqNo: a.seqNo,
+                        statFlag: a.statFlag,
+                        summaryFlag: a.summaryFlag
+                    })),
+                    unitCode: currentSelectedTreeNode.code
+                };
+
+                const resp = await addCostItemData(result);
+
+                if (resp) {
+                    message.success('操作成功!');
+                    set_ifShowModal(false);
+                    tableRef.current?.reload();
+                }
 
-            const result = {
-                unitCodeList: selectedKeys,
-                unitCode: currentSelectedTreeNode.code
-            };
+            } else {
+                const result = {
+                    unitCodeList: selectedKeys,
+                    unitCode: currentSelectedTreeNode.code
+                };
 
-            const resp = await saveCopyRequest(result, currentSelectedTabKey);
+                const resp = await saveCopyRequest(result, currentSelectedTabKey);
 
-            if (resp) {
-                message.success('复制成功!');
-                set_ifShowModal(false);
-                tableRef.current?.reload();
+                if (resp) {
+                    message.success('复制成功!');
+                    set_ifShowModal(false);
+                    tableRef.current?.reload();
+                }
             }
 
+
         }
 
         useEffect(() => {
@@ -440,19 +541,53 @@ const CheckUnitProjectSet: React.FC = () => {
             <div className='TableSelecter'>
                 <Input placeholder={'请输入'} allowClear
                     suffix={
-                        <IconFont type="iconsousuo" />
+                        <IconFont type="iconsousuo" onClick={() => {
+                            //console.log('iconsousuo', currentSelectedTabKey, keywords);
+                            if (isCopy) {
+                                set_tableParams({ ...tableParams, name: keywords })
+                            }
+                        }} />
                     }
                     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);
+                        if (currentSelectedTabKey != '4') {
+                            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);
+                            }
+                        }
+                        if (currentSelectedTabKey == '4') {
+                            //set_keywords(e.target.value);
+                            const search: any = (data: any, name: string) => {
+                                let result = [];
+
+                                for (let i = 0; i < data.length; i++) {
+                                    const item = data[i];
+                                    if (item.name.indexOf(name) != -1) {
+                                      result.push(item);
+                                    }
+                                    if (item.children) {
+                                      result.push(...search(item.children, name));
+                                    }
+                                  }
+
+                                return result;
+                            }
+
+                            if(e.target.value.length>0){
+                                const foundItem = search(datasource,e.target.value);
+                                set_showList(foundItem);
+                            }else{
+                                set_showList(datasource);
+                            }
+                            
                         }
 
                     }}
 
+
                 />
                 <BMSTable columns={tableSelecterColumn}
                     options={{
@@ -461,12 +596,14 @@ const CheckUnitProjectSet: React.FC = () => {
                             listsHeight: 100,
                         },
                     }}
+                    params={tableParams}
                     rowKey='code'
                     tableAlertRender={false}
                     rowSelection={{
                         // 自定义选择项参考: https://ant.design/components/table-cn/#components-table-demo-row-selection-custom
                         // 注释该行则默认不显示下拉选项
                         onChange: onSelectChange,
+                        checkStrictly: false
                     }}
                     pagination={{ showSizeChanger: false, pageSize: 10, simple: true, showTitle: false }}
                     dataSource={showList}
@@ -486,8 +623,8 @@ const CheckUnitProjectSet: React.FC = () => {
         const [targetKeys, setTargetKeys] = useState<string[]>([]);
         const [datasource, set_datasource] = useState<any[]>([]);
         const [selectedKeys, setSelectedKeys] = useState<string[]>([]);
-        const [targetData,set_targetData] = useState<any[]>([]);
-        const [loading,set_loading] = useState(true);
+        const [targetData, set_targetData] = useState<any[]>([]);
+        const [loading, set_loading] = useState(true);
 
 
         //获取单元
@@ -505,7 +642,7 @@ const CheckUnitProjectSet: React.FC = () => {
                     if (resp1) {
                         let allData = resp;
                         set_targetData(resp1.list);
-                        const defaultSelctedkeys = (resp1.list).map((a:any) => a.itemPointCode);
+                        const defaultSelctedkeys = (resp1.list).map((a: any) => a.itemPointCode);
                         set_datasource(allData);
                         setTargetKeys(defaultSelctedkeys);
                     }
@@ -570,29 +707,29 @@ const CheckUnitProjectSet: React.FC = () => {
                     const items = datasource.filter(a => targetKeys.includes(a.code));
                     //拿到当前的表格数据覆盖全量表格数据
                     //console.log({items,targetKeys});
-                    const uodatedData = items.map(a=>{
-                        if(targetData.length>0){
-                             const result = targetData.filter(b=>b.itemPointCode == a.code);
-                             if(result.length>0){
-                                  return {
-                                      ...a,
-                                      orderPointValue:result[0].orderPointValue,
-                                      coreFlag:result[0].coreFlag,
-                                  }
-                             }else{
-                                 return a
-                             }
-                        }else{
-                          return a
+                    const uodatedData = items.map(a => {
+                        if (targetData.length > 0) {
+                            const result = targetData.filter(b => b.itemPointCode == a.code);
+                            if (result.length > 0) {
+                                return {
+                                    ...a,
+                                    orderPointValue: result[0].orderPointValue,
+                                    coreFlag: result[0].coreFlag,
+                                }
+                            } else {
+                                return a
+                            }
+                        } else {
+                            return a
                         }
-                  })
+                    })
                     const result = {
                         unitCode: currentSelectedTreeNode.code,
-                        item: uodatedData.map(a=>({
-                            itemPointCode:a.itemCode,
-                            itemName:a.itemName,
-                            orderPointValue:a.orderPointValue,
-                            coreFlag:a.coreFlag
+                        item: uodatedData.map(a => ({
+                            itemPointCode: a.itemCode,
+                            itemName: a.itemName,
+                            orderPointValue: a.orderPointValue,
+                            coreFlag: a.coreFlag
                         }))
                     }
                     const resp = await addBillingItemData(result);
@@ -604,22 +741,22 @@ const CheckUnitProjectSet: React.FC = () => {
                     const items = datasource.filter(a => targetKeys.includes(a.code));
 
                     //拿到当前的表格数据覆盖全量表格数据
-                    const uodatedData = items.map(a=>{
-                          if(targetData.length>0){
-                               const result = targetData.filter(b=>b.indicatorCode == a.code);
-                               if(result.length>0){
-                                    return {
-                                        ...a,
-                                        orderPointValue:result[0].orderPointValue
-                                    }
-                               }else{
-                                   return a
-                               }
-                          }else{
+                    const uodatedData = items.map(a => {
+                        if (targetData.length > 0) {
+                            const result = targetData.filter(b => b.indicatorCode == a.code);
+                            if (result.length > 0) {
+                                return {
+                                    ...a,
+                                    orderPointValue: result[0].orderPointValue
+                                }
+                            } else {
+                                return a
+                            }
+                        } else {
                             return a
-                          }
+                        }
                     })
-                    const commitData = uodatedData.map((a:any) => ({
+                    const commitData = uodatedData.map((a: any) => ({
                         indicatorCode: a.code,
                         indicatorName: a.indicatorName,
                         orderPointValue: a.orderPointValue,
@@ -638,8 +775,8 @@ const CheckUnitProjectSet: React.FC = () => {
                 if (currentSelectedTabKey == '3') {
                     const items = datasource.filter(a => targetKeys.includes(a.code));
                     const commitData = items.map(a => ({
-                        code:a.code,
-                        name:a.name
+                        code: a.code,
+                        name: a.name
                     }))
                     const result = {
                         unitCode: currentSelectedTreeNode.code,
@@ -672,7 +809,7 @@ const CheckUnitProjectSet: React.FC = () => {
                     searchPlaceholder: '请输入',
                 }}
                 // oneWay={true}
-            
+
                 onChange={onChange}
                 onSelectChange={onSelectChange}
                 dataSource={datasource}
@@ -680,8 +817,8 @@ const CheckUnitProjectSet: React.FC = () => {
                 targetKeys={targetKeys}
                 selectedKeys={selectedKeys}
                 filterOption={(inputValue, item) => {
-                    if(item.itemName!.indexOf(inputValue) !== -1){
-                         console.log({item});
+                    if (item.itemName!.indexOf(inputValue) !== -1) {
+                        console.log({ item });
                     }
                     return item.itemName!.indexOf(inputValue) !== -1
 
@@ -709,7 +846,7 @@ const CheckUnitProjectSet: React.FC = () => {
                             onItemSelectAll(diffKeys as string[], selected);
                         },
                         onSelect({ code }, selected) {
-                            console.log({code,selected})
+                            console.log({ code, selected })
                             onItemSelect(code as string, selected);
                         },
                         selectedRowKeys: listSelectedKeys,
@@ -724,7 +861,7 @@ const CheckUnitProjectSet: React.FC = () => {
                             loading={loading}
                             bordered={false}
                             rowKey={'code'}
-                            pagination={{ showTitle: false, pageSize:9, showLessItems: false, simple: true,showTotal:()=>false }}
+                            pagination={{ showTitle: false, pageSize: 9, showLessItems: false, simple: true, showTotal: () => false }}
                             tableAlertRender={false}
                             style={{ pointerEvents: listDisabled ? 'none' : undefined }}
                             onRow={({ code, disabled: itemDisabled }) => ({
@@ -738,7 +875,14 @@ const CheckUnitProjectSet: React.FC = () => {
                 }}
             </Transfer>
         )
-    })
+    });
+
+
+    //成本项目添加
+    const addCostProject = () => {
+        set_isCopy(false);
+        set_ifShowModal(true);
+    }
 
 
 
@@ -751,17 +895,17 @@ const CheckUnitProjectSet: React.FC = () => {
     //编辑按钮操作
     const editBtnHandle = async () => {
         let flag = false;
-  
+
         if (ifEdit) {
             //保存操作
             if (currentSelectedTabKey == '1' && currentEditRow) {
                 //收费项目
-                console.log({currentEditRow});
+                console.log({ currentEditRow });
                 const result = {
                     id: currentEditRow.id,
                     unitCode: currentSelectedTreeNode.code,
                     orderPointValue: `${currentEditRow.orderPointValue}`,
-                    coreFlag:currentEditCoreFlag
+                    coreFlag: currentEditCoreFlag
                 }
                 const resp = await editBillingItemData(result);
                 if (resp) flag = true;
@@ -779,6 +923,18 @@ const CheckUnitProjectSet: React.FC = () => {
                 const resp = await editIndicItemData(result);
                 if (resp) flag = true;
             }
+            if (currentSelectedTabKey == '4' && currentEditRow) {
+                //成本项目
+                //console.log({ currentEditRow });
+                const result = {
+                    id: currentEditRow.id,
+                    ctrlFlag: currentEditRow.ctrlFlag
+                }
+                const resp = await editCostItemData(result);
+                if (resp) flag = true;
+
+
+            }
         } else {
             //开启编辑模式
             set_ifEdit(true);
@@ -862,6 +1018,9 @@ const CheckUnitProjectSet: React.FC = () => {
         if (currentSelectedTabKey == '3') {
             set_tableColumn(nonCheckTableColumn);
         }
+        if (currentSelectedTabKey == '4') {
+            set_tableColumn(costTableColumn);
+        }
     }
 
     useEffect(() => {
@@ -884,6 +1043,15 @@ const CheckUnitProjectSet: React.FC = () => {
         setTableColumn();
     }, [currentSelectedTabKey]);
 
+    useEffect(() => {
+        if (!isCopy) {
+            set_tableSelecterColumn(costItemColumns);
+        } else {
+            set_tableSelecterColumn(checkUnitColumns);
+        }
+    }, [isCopy])
+
+
 
     useEffect(() => {
         //初始化左侧树结构数据后
@@ -912,7 +1080,7 @@ const CheckUnitProjectSet: React.FC = () => {
     return (
         <div className='CheckUnitProjectSet'>
 
-            <ModalForm title={`复制(${currentSelectedTreeNode?currentSelectedTreeNode.name:''})`} width={400} submitter={{
+            <ModalForm title={isCopy ? `复制(${currentSelectedTreeNode ? currentSelectedTreeNode.name : ''})` : `添加成本项目(${currentSelectedTreeNode ? currentSelectedTreeNode.name : ''})`} width={400} submitter={{
                 render: (props, defaultDoms) => []
             }} open={ifShowModal} modalProps={{
                 closable: false,
@@ -1011,6 +1179,10 @@ const CheckUnitProjectSet: React.FC = () => {
                                 label: `非考核项目`,
                                 key: '3',
                             },
+                            {
+                                label: `成本项目`,
+                                key: '4',
+                            },
                         ]}
                     />
 
@@ -1053,8 +1225,8 @@ const CheckUnitProjectSet: React.FC = () => {
                                                 editBtnHandle();
                                             }
 
-                                        }}>{(ifEdit&&currentEditRow?.id == record.id )? '保存' : '编辑'}</a>,
-                                        <Fragment key={'cancel'}>{(ifEdit&&currentEditRow?.id == record.id ) && <a onClick={() => set_ifEdit(false)}>取消</a>}</Fragment>,
+                                        }}>{(ifEdit && currentEditRow?.id == record.id) ? '保存' : '编辑'}</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>}
                                         </Popconfirm>
@@ -1104,8 +1276,8 @@ const CheckUnitProjectSet: React.FC = () => {
                                                 editBtnHandle();
                                             }
 
-                                        }}>{(ifEdit&&currentEditRow?.id == record.id ) ? '保存' : '编辑'}</a>,
-                                        <Fragment key={'cancel'}>{(ifEdit&&currentEditRow?.id == record.id ) && <a onClick={() => set_ifEdit(false)}>取消</a>}</Fragment>,
+                                        }}>{(ifEdit && currentEditRow?.id == record.id) ? '保存' : '编辑'}</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>}
                                         </Popconfirm>
@@ -1139,19 +1311,68 @@ const CheckUnitProjectSet: React.FC = () => {
 
                                     </div>
                                 </div>
-                                {currentSelectedTreeNode && <BMSTable actionRef={tableRef} params={searchParams} rowKey='id' columns={[...tableColumn,{
+                                {currentSelectedTreeNode && <BMSTable actionRef={tableRef} params={searchParams} rowKey='id' columns={[...tableColumn, {
                                     title: '操作',
                                     key: 'option',
                                     valueType: 'option',
                                     render: (text, record: any) => [
                                         <Popconfirm key="popconfirm" title={`确认删除吗?`} okText="是" cancelText="否" onConfirm={() => delHandle(record)}>
-                                            { <a key={'del'}>删除</a>}
+                                            {<a key={'del'}>删除</a>}
                                         </Popconfirm>
                                     ],
                                 }]} request={(params, sort, filter) => getTableData('NONCHECK', params, sort, filter)} />}
                             </div>
                         )
                     }
+                    {
+                        currentSelectedTabKey == '4' && (
+                            <div className='tabContent'>
+                                <div className='tableToolbar'>
+                                    <div className='search'>
+                                        <span>检索:</span><Input className='searchInput' allowClear placeholder="请输入项目名称" onChange={(e) => {
+                                            set_searchKeywords(e.target.value);
+
+                                            if (e.target.value.length == 0) {
+                                                set_searchParams({
+                                                    ...searchParams,
+                                                    name: ''
+                                                });
+                                            }
+                                        }} suffix={
+                                            <IconFont type="iconsousuo" onClick={() => tableSearchHandle()} />
+                                        } />
+                                    </div>
+                                    <div className={'btnGroup'}>
+                                        <span key="2" onClick={() => openCopyHandleModal()}>复制</span>
+                                        <span key="3" onClick={() => addCostProject()}>添加</span>
+
+                                    </div>
+                                </div>
+                                {currentSelectedTreeNode && <BMSTable actionRef={tableRef} pagination={false} params={searchParams} rowKey='id' columns={[...tableColumn, {
+                                    title: '操作',
+                                    key: 'option',
+                                    width: 140,
+                                    valueType: 'option',
+                                    render: (text, record: any) => [
+                                        <a key={'edit'} onClick={() => {
+                                            if (!ifEdit) {
+                                                set_ifEdit(true);
+                                                set_currentEditRow(record)
+                                            }
+                                            if (ifEdit) {
+                                                editBtnHandle();
+                                            }
+
+                                        }}>{(ifEdit && currentEditRow?.id == record.id) ? '保存' : '编辑'}</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>}
+                                        </Popconfirm>
+                                    ],
+                                }]} request={(params, sort, filter) => getTableData('COST', params, sort, filter)} />}
+                            </div>
+                        )
+                    }
 
                 </BMSPagecontainer>
             </div>

+ 66 - 1
src/pages/setting/projectSetting/checkUnitProjectSet/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-05-17 17:06:08
+ * @LastEditTime: 2023-06-28 18:19:21
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlyInfoCheck/service.ts
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -259,6 +259,12 @@ export const delRequest = (params:any,tabKey:string) => {
             params: params
         })
     }
+    if(tabKey == '4'){
+        return request('/performance/item/deleteUnitCostList', {
+            method: 'POST',
+            params: params
+        })
+    }
 }
 
 
@@ -286,5 +292,64 @@ export const saveCopyRequest = (data: any,tabKey:string) => {
             data: data
         })
     }
+    if(tabKey == '4'){
+        return request('/performance/item/copyUnitCostList', {
+            method: 'POST',
+            data: data
+        })
+    }
+
+}
+
+
+
+//获取成本项目表格数据
+
+export type getCostItemsTableDataParamsType = {
+    current?: number,
+    pageSize?: number,
+    unitCode: string,
+    name?: string,
+}
+
+export type CostItemsTableItemDataType = {
+
+}
+
+
+
+export const getCostItemsTableData = (params: getCostItemsTableDataParamsType) => {
+
+    return request('/performance/item/getUnitCostList', {
+        method: 'GET',
+        params: params
+    })
+
+}
+
+
+//成本项目添加
+export const addCostItemData = (data: {
+    unitCode: string,
+    itemList: any[]
+}) => {
+
+    return request('/performance/item/addUnitCostList', {
+        method: 'POST',
+        data: { ...data }
+    })
+
+}
+
+//成本项目编辑
+export const editCostItemData = (data: {
+    id:number,
+    ctrlFlag:string
+}) => {
+
+    return request('/performance/item/editUnitCostList', {
+        method: 'POST',
+        params: { ...data }
+    })
 
 }

+ 13 - 2
src/pages/setting/reportSet/reportListMana/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-05-30 11:26:06
+ * @LastEditTime: 2023-06-28 16:08:20
  * @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
  */
@@ -68,6 +68,17 @@ export default function ReportListMana() {
                 if (record.indicatorCodeName) return record.indicatorCodeName
             }
         },
+        {
+            title: '子列',
+            width: 300,
+            ellipsis: true,
+            dataIndex: 'sql',
+            render: (_: any, record: any) => {
+
+                if (record.sql) return record.sql;
+                if (record.indicatorCodeName) return record.indicatorCodeName
+            }
+        },
         {
             title: '操作',
             key: 'option',
@@ -113,7 +124,7 @@ export default function ReportListMana() {
         }
     }
 
-    const updateTable = async (formVal: any, type: 'EDIT' | "ADD") => {
+    const updateTable = async (formVal: any, type: 'EDIT' | "ADD"|'EDIT_CHILD') => {
 
         if (type == 'ADD') {
             if (formVal.dataSource == 1) {