Explorar el Código

调整分组权重设定的指标项

code4eat hace 2 años
padre
commit
3b6788565a
Se han modificado 30 ficheros con 487 adiciones y 243 borrados
  1. BIN
      .DS_Store
  2. 7 6
      .umirc.ts
  3. 4 1
      src/access.ts
  4. 63 34
      src/pages/budgetMana/monthlyDataCheck/index.tsx
  5. 6 3
      src/pages/budgetMana/monthlyInfoCheck/index.tsx
  6. 2 2
      src/pages/budgetMana/monthlyInfoCheck/style.less
  7. 5 1
      src/pages/budgetMana/monthlySet/index.tsx
  8. 6 3
      src/pages/budgetMana/oneBatch/index.tsx
  9. 120 57
      src/pages/budgetMana/personnelSalaryBudget/index.tsx
  10. 9 1
      src/pages/budgetMana/personnelSalaryBudget/service.ts
  11. 26 20
      src/pages/secondaryDistribute/nonCheckProjectApprove/index.tsx
  12. 84 46
      src/pages/secondaryDistribute/secondaryDitriComputed/index.tsx
  13. 8 6
      src/pages/secondaryDistribute/secondaryDitriComputed/service.ts
  14. 8 3
      src/pages/setting/baseSetting/positionLevelRateSet/index.tsx
  15. 5 2
      src/pages/setting/checkUnitSet/checkUnitClassMana/index.tsx
  16. 4 2
      src/pages/setting/checkUnitSet/checkUnitDepMap/index.tsx
  17. 6 2
      src/pages/setting/checkUnitSet/checkUnitEmpSet/index.tsx
  18. 5 3
      src/pages/setting/checkUnitSet/checkUnitMana/index.tsx
  19. 4 3
      src/pages/setting/checkUnitSet/viewUnitPermSet/index.tsx
  20. 17 11
      src/pages/setting/manaPerformanceSet/indicGroupWeightSet/index.tsx
  21. 3 3
      src/pages/setting/manaPerformanceSet/indicGroupWeightSet/service.ts
  22. 19 7
      src/pages/setting/manaPerformanceSet/manaIndicItemSet/index.tsx
  23. 8 4
      src/pages/setting/manaPerformanceSet/unitIndicTargetSet/index.tsx
  24. 6 3
      src/pages/setting/projectSetting/bilingProjectMana/index.tsx
  25. 2 2
      src/pages/setting/projectSetting/bilingProjectMana/service.ts
  26. 3 3
      src/pages/setting/projectSetting/checkUnitProjectSet/index.tsx
  27. 33 11
      src/pages/setting/projectSetting/indicProjectMana/index.tsx
  28. 6 2
      src/pages/setting/reportSet/reportSetting/index.tsx
  29. 16 0
      src/utils/format.ts
  30. 2 2
      src/utils/tableToExcel.ts

BIN
.DS_Store


+ 7 - 6
.umirc.ts

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2022-12-14 14:14:32
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-05-29 14:30:52
+ * @LastEditTime: 2023-06-12 13:51:51
  * @FilePath: /BudgetManaSystem/.umirc.ts
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -14,6 +14,7 @@ export default defineConfig({
   // history:{
   //   type:'hash'
   // },
+  hash:true,
   antd: {
     configProvider: {
       prefixCls: 'bms-ant',
@@ -67,11 +68,11 @@ export default defineConfig({
       path: '/home',
       component: './Home',
     },
-    {
-      name: '静态测试',
-      path: '/static',
-      component: './static',
-    },
+    // {
+    //   name: '静态测试',
+    //   path: '/static',
+    //   component: './static',
+    // },
     {
       name: '系统设置',
       path: '/setting',

+ 4 - 1
src/access.ts

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2022-12-14 14:14:32
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-05-25 15:44:52
+ * @LastEditTime: 2023-06-08 16:26:11
  * @FilePath: /BudgetManaSystem/src/access.ts
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -45,13 +45,16 @@ export default (initialState: { name: string;memuData:any[] }) => {
   );
 
   const whatCanIDoInThisPage = (pagePath:string)=>{
+       
         if(memuData){
           const thisPageData = findMenuItem(memuData,pagePath);
+          // console.log({pagePath,thisPageData});
           if(thisPageData){
             return thisPageData.function?thisPageData.function:[];
           }
           return [];
         }
+
   }
  
 

+ 63 - 34
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-05-30 10:40:11
+ * @LastEditTime: 2023-06-12 16:08:41
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlySet/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -25,7 +25,7 @@ import { BMSTable } from '@/components/BMSTable';
 import { ActionType, ModalForm, ProColumns, ProColumnType, ProForm, ProFormDependency, ProFormDigit, ProFormInstance, ProFormSelect, ProFormText, ProFormTextArea } from '@ant-design/pro-components';
 import { createFromIconfontCN } from '@ant-design/icons';
 import { addTableData, checkMonthlyReq, delTableDataRequest, downloadTemplateReq, editCheckProject, editManaIndexTableData, editTableData, editTableSalaryRequest, generateCheckProjectTableData, getCheckItemCalcStatus, getCheckProjectTableData, getCostData, getDepLists, getEmps, getHesuanUnits, getIncomeData, getManaIndexGroup, getManaIndexTableData, getNoCheckTableData, getPageCheckStatus, getProjects, getSalaryInfoTableData, importMonthlyperformanceRelaFiles } from './service';
-import { TransferDirection } from 'antd/es/transfer';
+
 
 import editIcon from '../../../../static/editIcon.png';
 import conformIcon from '../../../../static/confirmIcon.png';
@@ -381,7 +381,6 @@ const MonthlyDataCheck: React.FC = () => {
     const EditManaIndexTableRow = ({ record }: { record: any }) => {
 
         const { value, columns, unitName, id, unitCode, totalScore, computeDate, groupId } = record;
-
         return (
             <ModalForm
                 title={`编辑${unitName}实际值`}
@@ -418,10 +417,10 @@ const MonthlyDataCheck: React.FC = () => {
                 }}
             >
                 {
-                    value.map((item: any, index: any) => {
-                        const findTitle = columns.filter((a: any) => a.key == item.code);
+                    columns.map((item: any, index: any) => {
+                        //const findTitle = columns.filter((a: any) => a.key == item.code);
                         return (
-                            findTitle.length > 0 ? <ProFormDigit key={index} label={`${findTitle[0].dataIndex}`} name={`value${item.code}`} /> : null
+                            <ProFormDigit key={index} label={`${item.dataIndex}`} name={`value${item.key}`} />
                         )
                     })
                 }
@@ -461,6 +460,8 @@ 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', params: any, sort: any, filter: any) => {
 
         if (currentComputeDate) {
@@ -519,32 +520,42 @@ 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) => (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) => {
-                                return {
-                                    title: a.name,
-                                    dataIndex: `${a.code}${item.code}`,
-                                    key: `${a.code}${item.code}`,
-                                    width: 100,
-                                    align: 'center',
-                                }
-
+                        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) => {
+                                    return {
+                                        title: a.name,
+                                        dataIndex: `${a.code}${item.code}`,
+                                        key: `${a.code}${item.code}`,
+                                        width: 100,
+                                        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)):'-'
+                                        },
+                                    }
+    
+                                })
+                            } : {
+                                title: item.name,
+                                dataIndex: item.code,
+                                key: item.code,
+                                width: 100,
+                                align: 'center',
+                                renderText(num: any, record: any, index: any, action: any) {
+                                    return (item.dataType == 1)?num:num?func((num*100).toFixed(2)+'%'):'-'
+                                },
                             })
-                        } : {
-                            title: item.name,
-                            dataIndex: item.code,
-                            key: item.code,
-                            width: 100,
-                            align: 'center',
-                        }));
+                        });
 
 
 
@@ -565,6 +576,21 @@ const MonthlyDataCheck: React.FC = () => {
                             width: 100,
                             fixed: 'right',
                         },
+                        {
+                            title: '分级',
+                            dataIndex: 'level',
+                            key: 'level',
+                            width: 100,
+                            fixed: 'right',
+                        },
+                        {
+                            title: '系数',
+                            dataIndex: 'kpi',
+                            key: 'kpi',
+                          
+                            width: 100,
+                            fixed: 'right',
+                        },
                         ]);
 
                         const data = resp.managerData.map((item: any) => {
@@ -573,8 +599,10 @@ const MonthlyDataCheck: React.FC = () => {
 
                             for (let index = 0; index < item.value.length; index++) {
                                 for (const key in item.value[index]) {
-
-                                    if (key != 'code') {
+                                    if(key == 'veto'){
+                                        //${key}${item.value[index].code}-${index} 中的index用于指定是该列的哪一格
+                                        rowData[`${key}${item.value[index].code}`] = item.value[index][`${key}`]
+                                    }else{
                                         rowData[`${key}${item.value[index].code}`] = item.value[index][`${key}`]
                                     }
                                 }
@@ -735,6 +763,7 @@ const MonthlyDataCheck: React.FC = () => {
             Modal.confirm({
                 title: '注意',
                 cancelText: '',
+                okText:'确定',
                 closable: true,
                 content: others ? '获取单个操作会覆盖上次获取的该核算单元的数据,确定要继续操作?' : '获取所有操作会覆盖所有已获取的数据,确定要继续操作?',
                 onOk: () => { set_loading(true);confirmGenerateHandle(index,others) }
@@ -1074,8 +1103,8 @@ const MonthlyDataCheck: React.FC = () => {
         <div className='MonthlyDataCheck'>
             {
                 true && (
-                    <BMSModalForm formRef={formRef} visible={editModalVisible} initialValues={isTableEdit ? { ...currentEditRecord } : {}} title={isTableEdit ? '编辑' : '新增'}
-                        size="middle" width={737} onVisibleChange={onVisibleChangeHandle}
+                    <BMSModalForm formRef={formRef} open={editModalVisible} initialValues={isTableEdit ? { ...currentEditRecord } : {}} title={isTableEdit ? '编辑' : '新增'}
+                        size="middle" width={737} onOpenChange={onVisibleChangeHandle}
                         modalProps={{
                             destroyOnClose: true
                         }}
@@ -1639,7 +1668,7 @@ 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 + 100,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',

+ 6 - 3
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-06-06 14:59:41
+ * @LastEditTime: 2023-06-12 16:09:11
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlySet/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -323,7 +323,7 @@ const MonthlyInfoCheck: React.FC = () => {
             title: '添加人员',
             icon: <></>,
             width: 800,
-             okText: '确定',
+            okText: '确定',
             cancelText: '取消',
             content:<TableTransfer
             ref={ref}
@@ -480,6 +480,8 @@ const MonthlyInfoCheck: React.FC = () => {
         Modal.confirm({
             title: '注意',
             content: msg,
+            okText: '确定',
+            cancelText: '取消',
             onOk: () => confirmGenerateHandle(type)
 
         })
@@ -593,6 +595,7 @@ const MonthlyInfoCheck: React.FC = () => {
     const importHandle = async ()=>{
            const resp = await jixiaoDataImport(currentComputeDate as string );
            if(resp){
+            message.success('操作成功!');
             tableRef.current?.reload();
            }
     }
@@ -718,7 +721,7 @@ const MonthlyInfoCheck: React.FC = () => {
             {/* <div style={{width:16,height:'92vh',background:'#F5F7FA'}}></div> */}
             <div className='rightContent'>
                 <BMSPagecontainer title={`核算年月:${currentComputeDate}`} ghost>
-                    <div className={auditType != '0' ? 'importBtn disabled' : 'importBtn '} onClick={()=>importHandle()}>绩效数据导入</div>
+                    <div className={auditType == '0' ? 'importBtn disabled' : 'importBtn '} onClick={()=>importHandle()}>绩效数据导入</div>
                     <div className='checkBtn' onClick={() => checkHandle(`${auditType}`)}>{auditType == '0' ? '审核' : '取消审核'}</div>
                     {/* <div className='midLine'>
                         <span>点击检查</span>

+ 2 - 2
src/pages/budgetMana/monthlyInfoCheck/style.less

@@ -44,8 +44,8 @@
             position: absolute;
             text-align: center;
             z-index: 99;
-            right:0px;
-            top:42px;
+            right:93px;
+            top:0px;
             cursor: pointer;
             width: 110px;
             height: 24px;

+ 5 - 1
src/pages/budgetMana/monthlySet/index.tsx

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2022-12-16 09:42:52
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-03-02 15:52:51
+ * @LastEditTime: 2023-06-12 16:09:20
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlySet/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -86,6 +86,8 @@ const MonthlySet: React.FC = () => {
 
         Modal.confirm({
             title:'将对当前核算月份进行结转,结转后将进入下一个核算月份,请确认本月工作已经核算完成后进行结转',
+            okText: '确定',
+            cancelText: '取消',
             onOk:async (...args)=>{
                 if(!isSettlementting){
                     //非结转中才可以再次操作
@@ -107,6 +109,8 @@ const MonthlySet: React.FC = () => {
 
         Modal.confirm({
             title:'当前核算月份未结账,回退后所有已操作数据会作废,请确认是否要进行回退操作',
+            okText: '确定',
+            cancelText: '取消',
             onOk:async (...args)=>{
                 const resp = await jiezhuanGoBack(currentComputeDate);
                 if(resp){

+ 6 - 3
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-06-02 10:19:46
+ * @LastEditTime: 2023-06-12 16:09:45
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/oneBatch/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -52,6 +52,7 @@ const OneBatch = () => {
   const tableRef = useRef<ActionType>();
 
   const [tableH, set_tableH] = useState(0);
+  const [reportTitle,set_reportTitle] = useState('');
 
 
   const onTabChange = (activeKey: string) => {
@@ -73,7 +74,7 @@ const OneBatch = () => {
 
     if (resp) {
 
-      const { title, assignmentData } = resp;
+      const { title, assignmentData,reportName } = resp;
       const columns = title.map((item: any) => {
         return {
           title: item.name,
@@ -116,6 +117,7 @@ const OneBatch = () => {
       });
 
       set_tableData(data);
+      set_reportTitle(reportName);
 
       return {
         data,
@@ -172,6 +174,7 @@ const OneBatch = () => {
 
     Modal.confirm({
       title: '注意',
+      okText: '确定',
       cancelText: '',
       closable: true,
       content: '计算会覆盖原有数据,确定要继续计算操作?',
@@ -220,7 +223,7 @@ const OneBatch = () => {
       summary
     ];
 
-    exportTableToExcel(excelTableData,headers, 'my-data');
+    exportTableToExcel(excelTableData,headers,reportTitle);
   }
 
   const handleResize = (e: any) => {

+ 120 - 57
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-05-30 10:42:29
+ * @LastEditTime: 2023-06-12 16:10:13
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/personnelSalaryBudget/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -15,94 +15,120 @@ import { createFromIconfontCN } from '@ant-design/icons';
 import { ActionType, ProColumns } from '@ant-design/pro-components';
 import { Input, InputNumber, message, Modal } from 'antd';
 import React, { useEffect, useRef, useState } from 'react'
-import { caculate, checkRequest, generate, getCurrentCheckStatus, getData } from './service';
+import { caculate, checkRequest, editAssessmentBonus, generate, getCurrentCheckStatus, getData } from './service';
+
+import editIcon from '../../../../static/editIcon.png';
+import conformIcon from '../../../../static/confirmIcon.png';
 
 import './style.less';
 import '../../../utils/zhongtaiB'
+import { formatMoneyNumber } from '@/utils/format';
 
 const IconFont = createFromIconfontCN({
     scriptUrl: '',
-  });
+});
 
 const PersonnelSalaryBudget = () => {
 
 
     const [auditType, set_auditType] = useState('0');
     const [currentComputeDate, set_currentComputeDate] = useState<string | undefined>();
-    const [pageData,set_pageData] = useState({
-        rate:0,income:0,personalCost:0,cost:0
+    const [pageData, set_pageData] = useState({
+        rate: 0, income: 0, personalCost: 0, cost: 0
     });
 
+    const [editTableCellId, set_editTableCellId] = useState<number | undefined>(undefined);
+
+    const [inputSalaryNum, set_inputSalaryNum] = useState(0);
+
     const tableRef = useRef<ActionType>();
-    
-    const [loading,set_loading] = useState(false);
 
-    const tableColumn = [
+    const [loading, set_loading] = useState(false);
+
+    const tableColumn: ProColumns[] = [
         {
             title: '职类',
             dataIndex: 'unitTypeName',
             key: 'unitTypeName',
-         
+            fixed:'left'
+
         },
         {
             title: '合理编制比例',
             dataIndex: 'staffRate',
             key: 'staffRate',
-       
+
         },
         {
             title: '合理人均薪酬系数',
             dataIndex: 'averageSalary',
             key: 'averageSalary',
-          
+
         },
         {
             title: '人事成本占比',
             dataIndex: 'percent',
             key: 'percent',
-          
         },
         {
             title: '人事成本',
             dataIndex: 'cost',
             key: 'cost',
-           
+            renderText(num, record, index, action) {
+                return formatMoneyNumber(num)
+            },
         },
         {
             title: '固定工资',
             dataIndex: 'salary',
             key: 'salary',
-          
+            renderText(num, record, index, action) {
+                return formatMoneyNumber(num)
+            },
         },
         {
             title: '专项补助',
             dataIndex: 'subsidies',
             key: 'subsidies',
-          
+            renderText(num, record, index, action) {
+                return formatMoneyNumber(num)
+            },
         },
         {
             title: '变动薪酬',
             dataIndex: 'variableCompensation',
             key: 'variableCompensation',
-          
+            renderText(num, record, index, action) {
+                return formatMoneyNumber(num)
+            },
         },
         {
-            title: '考核奖金',
-            dataIndex: 'assessmentBonus',
-            key: 'assessmentBonus',
-            
+            title: '不参与考核奖金',
+            dataIndex: 'noAssessmentBonus',
+            key: 'noAssessmentBonus',
+            renderText(num, record, index, action) {
+                return formatMoneyNumber(num)
+            },
         },
+        {
+            title: '合理化考核奖金',
+            dataIndex: 'rationalizeBonus',
+            key: 'rationalizeBonus',
+            renderText(num, record, index, action) {
+                return formatMoneyNumber(num)
+            },
+        }
     ]
 
-    const getPageData = async (currentComputeDate:string, params: any, sort: any, filter: any) => {
+    const getPageData = async (currentComputeDate: string, params: any, sort: any, filter: any) => {
         const resp = await getData(currentComputeDate);
-        if(resp){
-            
+        if (resp) {
+
             set_pageData({
-                rate:resp.rate,
-                income:resp.income,
-                personalCost:resp.personalCost,
-                cost:resp.cost
+                rate: resp.rate,
+                income: resp.income,
+                personalCost: resp.personalCost,
+                cost: resp.cost
             });
             return {
                 data: resp.detail,
@@ -144,29 +170,45 @@ const PersonnelSalaryBudget = () => {
         }
     }
 
-    // const generateFunc =async (computeDate:string) => {
-    //     const resp = await generate(computeDate);
-        
-    // }
-
-    const confirmGenerateHandle = async (index:number)=>{
-            if(index == 1){
-                const resp = await generate(currentComputeDate as string);
-                if(resp){
-                    message.success('生成完成!');
-                    tableRef.current?.reload();
-                }
-            }
-            if(index == 2){
-                const resp = await caculate({
-                    computeDate:currentComputeDate as string,
-                    ...pageData
+    const editHandle = async (record: any) => {
+        const { id } = record;
+        if (id == editTableCellId) {
+            //保存
+            if (inputSalaryNum) {
+                const resp = await editAssessmentBonus({
+                    assessmentBonus: inputSalaryNum,
+                    id
                 });
-                if(resp){
-                    message.success('计算完成!');
+                if (resp) {
                     tableRef.current?.reload();
                 }
             }
+            set_editTableCellId(undefined);
+        } else {
+            //编辑
+            set_editTableCellId(id);
+        }
+
+    }
+
+    const confirmGenerateHandle = async (index: number) => {
+        if (index == 1) {
+            const resp = await generate(currentComputeDate as string);
+            if (resp) {
+                message.success('生成完成!');
+                tableRef.current?.reload();
+            }
+        }
+        if (index == 2) {
+            const resp = await caculate({
+                computeDate: currentComputeDate as string,
+                ...pageData
+            });
+            if (resp) {
+                message.success('计算完成!');
+                tableRef.current?.reload();
+            }
+        }
     }
 
 
@@ -176,9 +218,10 @@ const PersonnelSalaryBudget = () => {
          * 
          */
 
-        if(auditType == '1'){
+        if (auditType == '1') {
             Modal.confirm({
                 title: '注意',
+                okText: '确定',
                 cancelText: '',
                 closable: true,
                 content: '当前处于审核状态无法操作!',
@@ -188,19 +231,20 @@ const PersonnelSalaryBudget = () => {
 
         Modal.confirm({
             title: '注意',
+            okText: '确定',
             cancelText: '',
             closable: true,
             content: index == 1 ? '生成后需重新计算数据,确定要进行生成操作?' : '计算会覆盖原有数据,确定要继续计算操作?',
-            onOk: () => {set_loading(true); confirmGenerateHandle(index) }
+            onOk: () => { set_loading(true); confirmGenerateHandle(index) }
         });
 
 
     }
 
 
-    useEffect(()=>{
-        currentComputeDate&&getCheckStatus(currentComputeDate);
-    },[currentComputeDate]);
+    useEffect(() => {
+        currentComputeDate && getCheckStatus(currentComputeDate);
+    }, [currentComputeDate]);
 
 
     useEffect(() => {
@@ -233,11 +277,11 @@ const PersonnelSalaryBudget = () => {
                 <div className='func'>
                     <div className='title'>
                         <span className='a'>全院人事成本(D=(A-B)*C)</span>
-                        <span className='btn' onClick={()=>generateFunc(1)}> <IconFont style={{color:'#3376FE'}}  type='iconzhongxin' /> 重新生成</span>
+                        <span className='btn' onClick={() => generateFunc(1)}> <IconFont style={{ color: '#3376FE' }} type='iconzhongxin' /> 重新生成</span>
                     </div>
-                    <InputNumber className='input' size='large' min={-10000000} value={pageData.personalCost} placeholder='请输入' 
-                    disabled={auditType == '1'}
-                    onChange={(value)=>set_pageData({...pageData,personalCost:value as number})} />
+                    <InputNumber className='input' size='large' min={-10000000} value={pageData.personalCost} placeholder='请输入'
+                        disabled={auditType == '1'}
+                        onChange={(value) => set_pageData({ ...pageData, personalCost: value as number })} />
                 </div>
                 {/* <div className='midLine'>
                     <span>手动计算</span>
@@ -245,9 +289,28 @@ const PersonnelSalaryBudget = () => {
                 </div> */}
 
             </div>
-            <div className='countBtn' onClick={()=>generateFunc(2)}>计算</div>
+            <div className='countBtn' onClick={() => generateFunc(2)}>计算</div>
             <div className='b'>计算结果</div>
-            {currentComputeDate&&<BMSTable actionRef={tableRef} pagination={false} rowKey='unitType' columns={tableColumn as ProColumns[]} request={(params, sort, filter) => getPageData(currentComputeDate,params, sort, filter)} />}
+            {currentComputeDate && <BMSTable actionRef={tableRef} pagination={false} rowKey='unitType'  scroll={{ x: 140 * 11 }} columns={[...tableColumn, {
+                title: '可分配考核奖金',
+                dataIndex: 'assessmentBonus',
+                key: 'assessmentBonus',
+                fixed: 'right',
+                render: (text: any, record: any) => {
+
+                    return (
+                        <div style={{ display: 'flex', flexDirection: 'row', width: '100%', justifyContent:'flex-start', alignItems: 'center' }}>
+
+                            <div style={{ height: 16, display: 'flex', flexDirection: 'row', justifyContent: 'center', alignItems: 'center' }}>
+                                {
+                                    editTableCellId == record.id ? <Input size='small' defaultValue={record.assessmentBonus} width={80} placeholder='请输入' onChange={(e) => { set_inputSalaryNum(Number(e.target.value)) }} style={{ width: '80px' }} /> : <span>{formatMoneyNumber(text)}</span>
+                                }
+                            </div>
+                            {auditType == '0' && <img onClick={() => editHandle(record)} style={{ width: 16, height: 16, cursor: 'pointer', marginLeft: 8 }} src={editTableCellId == record.id ? conformIcon : editIcon} alt="" />}
+                        </div>
+                    )
+                }
+            },]} request={(params, sort, filter) => getPageData(currentComputeDate, params, sort, filter)} />}
         </BMSPagecontainer>
     )
 }

+ 9 - 1
src/pages/budgetMana/personnelSalaryBudget/service.ts

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2023-01-04 13:59:26
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-02-23 14:00:23
+ * @LastEditTime: 2023-06-08 10:40:40
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/personnelSalaryBudget/service.ts
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -78,5 +78,13 @@ export const caculate = (data:any)=>{
    })
 }
 
+//编辑
+
+export const editAssessmentBonus = (data:any)=>{
+    return request('/performance/bonus/editAssessmentBonus', {
+        method:'POST',
+        data
+   })
+}
 
 

+ 26 - 20
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-05-30 11:30:07
+ * @LastEditTime: 2023-06-09 09:56:32
  * @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, ProFormDependency, ProFormDigit, ProFormInstance, ProFormRadio, ProFormSelect, ProFormText, ProFormTextArea } from '@ant-design/pro-components';
 import { createFromIconfontCN } from '@ant-design/icons';
-import { commitRequest,delRequest, generateDataRequest, getCurrentCommitStatusReq, getNonCheckProjectTableData, getTreeData, getTreeDataRespType, addNonCheckProjectTableData, editNonCheckProjectTableData, getNonCheckProjectByUnitCode, getCurrentCheckStatus } from './service';
+import { commitRequest, delRequest, generateDataRequest, getCurrentCommitStatusReq, getNonCheckProjectTableData, getTreeData, getTreeDataRespType, addNonCheckProjectTableData, editNonCheckProjectTableData, getNonCheckProjectByUnitCode, getCurrentCheckStatus } from './service';
 
 import { getComputeDate } from '@/pages/Home/service';
 
@@ -36,8 +36,9 @@ import { getDeepestTreeData } from '@/utils/tooljs';
 
 
 import { getCheckUnitDepMapTableDataByUnitClass } from '@/pages/setting/checkUnitSet/checkUnitDepMap/service';
+import { getPersonInfoTableData } from '../employeeInfoCheck/service';
+
 
-import { getEmps } from '@/pages/budgetMana/monthlyDataCheck/service';
 
 
 
@@ -112,7 +113,7 @@ const NonCheckProjectApprove: React.FC = () => {
         {
             title: '说明',
             dataIndex: 'description',
-            ellipsis:true
+            ellipsis: true
         },
         {
             title: '状态',
@@ -126,7 +127,7 @@ const NonCheckProjectApprove: React.FC = () => {
 
     const delHandle = async (record: any) => {
 
-        const {  id } = record;
+        const { id } = record;
 
         const currentComputeDateResp = await getComputeDate();
         if (currentComputeDateResp) {
@@ -143,13 +144,13 @@ const NonCheckProjectApprove: 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){
+        if (!node.child) {
             set_currentSelectedTreeNode(node);
         }
-        
+
     };
 
 
@@ -159,7 +160,7 @@ const NonCheckProjectApprove: React.FC = () => {
     }
 
     const getCheckStatus = async (computeDate: string) => {
-        const resp = await getCurrentCheckStatus({computeDate:currentComputeDate as string});
+        const resp = await getCurrentCheckStatus({ computeDate: currentComputeDate as string });
         if (resp) {
             set_auditType(`${resp}`);  //0 未审核 1 已审核
         }
@@ -221,7 +222,7 @@ const NonCheckProjectApprove: React.FC = () => {
             }
         }
         if (type == 'EDIT') {
-            const resp = await editNonCheckProjectTableData({id:formVal.id,...result});
+            const resp = await editNonCheckProjectTableData({ id: formVal.id, ...result });
             if (resp) {
                 tableRef.current?.reload();
                 message.success('操作成功!');
@@ -239,13 +240,13 @@ const NonCheckProjectApprove: React.FC = () => {
             <ModalForm
                 title={`${type == 'EDIT' ? '编辑' : '新增'}非考核项目`}
                 width={352}
-                initialValues={type == 'EDIT' ? { ...record, nonAssessmentCode: { label: record.assessmentName, value: record.assessmentCode },targetValue:record.userId } : {}}
+                initialValues={type == 'EDIT' ? { ...record, nonAssessmentCode: { label: record.assessmentName, value: record.assessmentCode }, targetValue: record.userId } : {}}
                 trigger={
                     type == 'EDIT' ? <a key="edit" >编辑</a> : <span className='add'>添加</span>
                 }
                 formRef={formRef}
                 onFinish={(val) => {
-                    return updateTable(type == 'EDIT' ? { ...record, ...val} : { ...val }, type);
+                    return updateTable(type == 'EDIT' ? { ...record, ...val } : { ...val }, type);
                 }}
                 modalProps={{ destroyOnClose: true }}
                 colProps={{ span: 24 }}
@@ -273,7 +274,7 @@ const NonCheckProjectApprove: React.FC = () => {
                     placeholder="请选择"
                     rules={[{ required: true }]}
                     request={async () => {
-                        const resp = await getNonCheckProjectByUnitCode({unitCode:currentSelectedTreeNode.code});
+                        const resp = await getNonCheckProjectByUnitCode({ unitCode: currentSelectedTreeNode.code });
                         if (resp) {
                             return resp.list.map((a: any) => ({
                                 label: a.nonAssessmentName, value: a.nonAssessmentCode, d: a
@@ -315,11 +316,16 @@ const NonCheckProjectApprove: React.FC = () => {
                                         showSearch: true,
                                     }}
                                     request={async () => {
-                                        const resp = await getEmps(currentSelectedTreeNode.code);
+                                        const resp = await getPersonInfoTableData({
+                                            computeDate: currentComputeDate as string,
+                                            unitCode: currentSelectedTreeNode.code,
+                                            pageSize:500,
+                                            current:1
+                                        });
 
                                         if (resp) {
-                                            return resp.map((a: any) => ({
-                                                label: a.name, value: a.userId, d: a
+                                            return resp.list.map((a: any) => ({
+                                                label: a.empName, value: a.empNo, d: a
                                             }))
                                         }
                                         return []
@@ -611,8 +617,8 @@ const NonCheckProjectApprove: React.FC = () => {
                                         onMouseEnter={() => auditType == '0' ? commitStatus == '1' ? set_ifShowTip(true) : set_ifShowTip(false) : set_ifShowTip(true)}
                                         onMouseLeave={() => set_ifShowTip(false)}
                                     >
-                                        {(commitStatus == '1'||auditType == '1')&&<span key="2" >添加</span>}
-                                        {(commitStatus == '0'&&auditType != '1')&&<UpDataActBtn record type='ADD' />}
+                                        {(commitStatus == '1' || auditType == '1') && <span key="2" >添加</span>}
+                                        {(commitStatus == '0' && auditType != '1') && <UpDataActBtn record type='ADD' />}
                                     </div>
                                 </Popover>
                                 <div key="4" className={auditType == '1' ? 'commit disabled' : 'commit'} onClick={() => auditType == '0' ? commitBtnhandle() : () => { }}>{commitStatus == '1' ? '取消提交' : '提交'}</div>
@@ -622,9 +628,9 @@ const NonCheckProjectApprove: React.FC = () => {
                         {currentSelectedTreeNode && <BMSTable params={empFilterParams} actionRef={tableRef} rowKey='id' columns={commitStatus == '0' ? [...tableColumn, {
                             title: '操作',
                             key: 'option',
-                            width:120,
+                            width: 120,
                             valueType: 'option',
-                            renderText: (_,record: any) => [
+                            renderText: (_, record: any) => [
                                 <UpDataActBtn key={'edit'} record={record} type='EDIT' />,
                                 <Popconfirm key="popconfirm" title={`确认删除吗?`} okText="是" cancelText="否" onConfirm={() => delHandle(record)}>
                                     <a key={'del'}>删除</a>

+ 84 - 46
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-06 13:23:15
+ * @LastEditTime: 2023-06-12 17:03:28
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlySet/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -130,7 +130,8 @@ const SecondaryDitriComputed: React.FC = () => {
                 set_currentSelectedTreeNode(node);
             }
         } else {
-            Modal.confirm({ title: '提示', content: '当前存在编辑未保存,请先保存!' })
+            Modal.confirm({ title: '提示', content: '当前存在编辑未保存,请先保存!',okText: '确定',
+            cancelText: '取消', })
         }
 
 
@@ -150,8 +151,10 @@ const SecondaryDitriComputed: React.FC = () => {
     }
 
     const getCurrentUnitCheckStatus = async () => {
-        const resp = await getCurrentUnitCheckStatusReq(currentComputeDate as string,currentSelectedTreeNode.code);
-        set_currentUnitAuditType(`${resp}`);  //0 未审核 1 已审核
+        if(currentSelectedTreeNode){
+            const resp = await getCurrentUnitCheckStatusReq(currentComputeDate as string,currentSelectedTreeNode.code);
+            set_currentUnitAuditType(`${resp}`);  //0 未审核 1 已审核
+        }
     }
 
     const getCurrentCommitStatus = async () => {
@@ -307,38 +310,67 @@ const SecondaryDitriComputed: React.FC = () => {
     }
 
     const checkIfCommit = (type: number) => {
+        // type 1 当前 2 全部
         //检查当前单元是否提交
         if (type == 1) {
-            if (!currentSelectedTreeNode.map) {
-                  return false
-            }
-
+             //currentUnitAuditType == 1 时是取消操作无需校验
+            return currentUnitAuditType == '1'?true:currentSelectedTreeNode.map
         }
-        if (type == 2) {
-            if (!currentSelectedTreeNode.map) {
-        
+        if (type == 2&&auditType == '0') {
+            //auditType == 1 时是取消操作无需校验
+            interface Node {
+                map: boolean;
+                child?: Node[];
+            }
+    
+            function filterNodes(node: Node): Node | null {
+                if (node.map === false && (!node.child || node.child.length === 0)) {
+                    return node; // 如果节点map为false并且是叶子节点,返回该节点
+                }
+    
+                if (Array.isArray(node.child)) {
+                    // 对每个子节点递归执行此过程
+                    let child = node.child.map(filterNodes).filter((n): n is Node => n !== null);
+                    if (child.length > 0) {
+                        // 如果有任何子节点的map属性为false,返回包含这些子节点的新节点
+                        return { ...node, child: child };
+                    }
+                }
+    
+                // 如果节点map为true,或者所有子节点的map都为true,返回null
+                return null;
             }
 
+            const result = treeData.map(a => {
+                return filterNodes(a);
+            });
+            
+            return result.length == 0
+           
+        }else{
+            return true
         }
     }
 
     const commitBtnhandle = async (type?: number) => {
+        //console.log({type});
         /**
          * type 1 单个 2 全部
          * 提交界面不需要type
          */
 
-        const handle = async () => {
+        const handle = async (ifCheckCommit:string) => {
             if (type == 1) {
                 //审核单个
                 const resp = await checkCurrentRequest({
                     computeDate: currentComputeDate as string,
-                    auditType: auditType == '1' ? '0' : '1',  //1 审核 0 取消审核
-                    unitCode: currentSelectedTreeNode.code
+                    auditType: currentUnitAuditType == '1' ? '0' : '1',  //1 审核 0 取消审核
+                    unitCode: currentSelectedTreeNode.code,
+                    type:ifCheckCommit
                 });
                 if (resp) {
                     message.success('操作成功!');
-                    getTreeReqFunc(currentComputeDate as string);
+                    getTreeReqFunc(currentComputeDate as string,ifCheckPage?'1':'0');
                     getCurrentUnitCheckStatus();
                 }
             }
@@ -347,11 +379,11 @@ const SecondaryDitriComputed: React.FC = () => {
                 const resp = await checkRequest({
                     computeDate: currentComputeDate as string,
                     auditType: auditType == '1' ? '0' : '1',  //1 审核 0 取消审核
-
+                    type:ifCheckCommit
                 });
                 if (resp) {
                     message.success('操作成功!');
-                    getTreeReqFunc(currentComputeDate as string);
+                    getTreeReqFunc(currentComputeDate as string,ifCheckPage?'1':'0');
                     getCheckStatus(currentComputeDate as string);
                 }
             }
@@ -362,31 +394,33 @@ const SecondaryDitriComputed: React.FC = () => {
             if (checkCondition) {
                 const needParamsVal = checkCondition.list.filter(a => a.code == '1664510428258115584'); //判断未提交是否可以审核
                 if (needParamsVal.length > 0) {
-                    if (needParamsVal[0].value == '1') {
+                    if (needParamsVal[0].value == '0') {
                         //需要提交后才可以审核
-                        //console.log(checkIfCommit(type));
-                        if (checkIfCommit(type)) {
-                            handle();
-                        }else{
-                            Modal.confirm({
-                                title: '注意',
-                                okText: '确定',
-                                cancelText: '取消',
-                                content: '当前核算单元未提交,请提交后再审核?'
-                            })
-                        }
+                        // console.log(checkIfCommit(type));
+                        // if (checkIfCommit(type)) {
+                        //     handle(needParamsVal[0].value);
+                        // }else{
+                        //     Modal.confirm({
+                        //         title: '注意',
+                        //         okText: '确定',
+                        //         cancelText: '取消',
+                        //         content:type == 1 ? '当前核算单元未提交,请提交后再审核!':'当前存在核算单元未提交,请提交后再审核!'
+                        //     })
+                        // }
+                        handle(needParamsVal[0].value);
                     } else {
-                        if (checkIfCommit(type)) {
-                            handle();
-                        }else{
-                            Modal.confirm({
-                                title: '注意',
-                                okText: '确定',
-                                cancelText: '取消',
-                                content: '当前核算单元未提交,是否继续审核?',
-                                onOk:()=>handle()
-                            })
-                        }
+                        handle(needParamsVal[0].value);
+                        // if (checkIfCommit(type)) {
+                        //     handle(needParamsVal[0].value);
+                        // }else{
+                        //     Modal.confirm({
+                        //         title: '注意',
+                        //         okText: '确定',
+                        //         cancelText: '取消',
+                        //         content:type == 1 ? '当前核算单元未提交,是否继续审核?':'当前存在核算单元未提交,是否继续审核?',
+                        //         onOk:()=>handle(needParamsVal[0].value)
+                        //     })
+                        // }
                     }
                 }
             }
@@ -406,7 +440,7 @@ const SecondaryDitriComputed: React.FC = () => {
                         });
                         if (resp) {
                             message.success('提交成功!');
-                            getTreeReqFunc(currentComputeDate as string);
+                            getTreeReqFunc(currentComputeDate as string,ifCheckPage?'1':'0');
                             getCurrentCommitStatus();
                         }
                     }
@@ -522,8 +556,8 @@ const SecondaryDitriComputed: React.FC = () => {
     generateList(treeData as any);
 
 
-    const getTreeReqFunc = async (computeDate: string) => {
-        const resp = await getTreeData(computeDate);
+    const getTreeReqFunc = async (computeDate: string,type:string) => {
+        const resp = await getTreeData(computeDate,type);
         set_treeData(resp);
         set_treeDataDefault(resp);
     }
@@ -554,8 +588,9 @@ const SecondaryDitriComputed: React.FC = () => {
     useEffect(() => {
 
         if (currentComputeDate) {
-            getTreeReqFunc(currentComputeDate);
+            getTreeReqFunc(currentComputeDate,ifCheckPage?'1':'0');
             getCheckStatus(currentComputeDate);
+            
         }
     }, [currentComputeDate]);
 
@@ -567,6 +602,9 @@ const SecondaryDitriComputed: React.FC = () => {
             if (!ifCheckPage) {
                 getCurrentCommitStatus();
             }
+            if(ifCheckPage){
+                getCurrentUnitCheckStatus();
+            }
 
             getTableData({});
         }
@@ -677,8 +715,8 @@ const SecondaryDitriComputed: React.FC = () => {
                 treeFilterVisible && (
                     <div className='selecterList'>
                         <div onClick={() => changeTreeDataFilter({ name: '全部单元', code: 0 })} className={currentTreeDataFilter.code == 0 ? 'list on' : 'list'}>全部单元</div>
-                        <div onClick={() => changeTreeDataFilter({ name: '未提交', code: 1 })} className={currentTreeDataFilter.code == 1 ? 'list on' : 'list'}>未提交</div>
-                        <div onClick={() => changeTreeDataFilter({ name: '已提交', code: 2 })} className={currentTreeDataFilter.code == 2 ? 'list on' : 'list'}>已提交</div>
+                        <div onClick={() => changeTreeDataFilter({ name: ifCheckPage?'未审核':'未提交', code: 1 })} className={currentTreeDataFilter.code == 1 ? 'list on' : 'list'}>{ifCheckPage?'未审核':'未提交'}</div>
+                        <div onClick={() => changeTreeDataFilter({ name: ifCheckPage?'已审核':'已提交', code: 2 })} className={currentTreeDataFilter.code == 2 ? 'list on' : 'list'}>{ifCheckPage?'已审核':'已提交'}</div>
                     </div>
                 )
             }

+ 8 - 6
src/pages/secondaryDistribute/secondaryDitriComputed/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-06 11:25:38
+ * @LastEditTime: 2023-06-08 15:53:48
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlyInfoCheck/service.ts
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -26,11 +26,11 @@ export type getTreeDataRespType = {
     child: getTreeDataRespType[]
 }
 
-export const getTreeData = (computeDate: string) => {
+export const getTreeData = (computeDate: string,type:string) => {
 
     return request<getTreeDataRespType[]>('/performance/second/getSecondUnitList', {
         method: 'GET',
-        params: { computeDate }
+        params: { computeDate,type }
     })
 }
 
@@ -135,7 +135,8 @@ export const commitRequest = (data:CommitRequestParamsType) => {
 
 export type CheckRequestParamsType = {
     computeDate:string,
-    auditType:string
+    auditType:string,
+    type:string //是否跳过提交状态验证 1跳过提交状态 不验证是否已提交 0或不传 验证是否已提交
 }
 export const checkRequest = (data:CheckRequestParamsType) => {
  
@@ -150,11 +151,12 @@ export const checkRequest = (data:CheckRequestParamsType) => {
 export type CheckCurrentRequestParamsType = {
     computeDate:string,
     auditType:string,
-    unitCode:string
+    unitCode:string,
+    type:string //是否跳过提交状态验证 1跳过提交状态 不验证是否已提交 0或不传 验证是否已提交
 }
 export const checkCurrentRequest = (data:CheckCurrentRequestParamsType) => {
  
-    return request('/performance/second/audit', {
+    return request('/performance/second/auditUnit', {
         method: 'POST',
         params:data
     })

+ 8 - 3
src/pages/setting/baseSetting/positionLevelRateSet/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-04-14 11:39:11
+ * @LastEditTime: 2023-06-12 16:45:35
  * @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
  */
@@ -116,6 +116,8 @@ export default function PositionLevelRateSet() {
             title: `选择岗位`,
             icon: <></>,
             width: 750,
+            okText: '确定',
+            cancelText: '取消',
             content: <TableTransfer
                 ref={ref}
                 record={record}
@@ -224,16 +226,19 @@ export default function PositionLevelRateSet() {
                             onItemSelect(code as string, selected);
                         },
                         selectedRowKeys: listSelectedKeys,
+                        
                     };
 
                     return (
-                        <Table
+                        <BMSTable
                             rowSelection={rowSelection}
                             columns={columns as TransferItem[]}
                             dataSource={filteredItems}
                             size="small"
-                            pagination={{showSizeChanger:false}}
+                            pagination={{showSizeChanger:false,simple:true,pageSize:10}}
                             rowKey={'code'}
+                            tableAlertRender={false}
+                            
                             style={{ pointerEvents: listDisabled ? 'none' : undefined }}
                             onRow={({ code, disabled: itemDisabled }) => ({
                                 onClick: () => {

+ 5 - 2
src/pages/setting/checkUnitSet/checkUnitClassMana/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-06 13:29:26
+ * @LastEditTime: 2023-06-08 13:54:15
  * @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
  */
@@ -109,6 +109,7 @@ export default function CheckUnitClassficationMana() {
 
     const updateTable = async (formVal: any, type: 'EDIT' | "ADD" | 'ADDCHILD') => {
 
+        let flag = false;
 
         if (type == 'ADD' || type == 'ADDCHILD') {
             const resp = await addData({
@@ -116,6 +117,7 @@ export default function CheckUnitClassficationMana() {
                 parentClassCode: formVal.parentClassCode ? formVal.parentClassCode : '0'
             });
             if (resp) {
+                flag = true;
                 tableRef.current?.reload();
                 message.success('操作成功!');
             }
@@ -127,11 +129,12 @@ export default function CheckUnitClassficationMana() {
                 ...formVal
             });
             if (resp) {
+                flag = true;
                 tableRef.current?.reload();
                 message.success('操作成功!');
             }
         }
-        return true;
+        return flag;
 
     }
 

+ 4 - 2
src/pages/setting/checkUnitSet/checkUnitDepMap/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-05-30 11:01:02
+ * @LastEditTime: 2023-06-12 16:45:57
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlySet/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -314,12 +314,14 @@ const CheckUnitDepMap: React.FC = () => {
                     };
 
                     return (
-                        <Table
+                        <BMSTable
                             rowSelection={rowSelection}
                             columns={columns as TransferItem[]}
                             dataSource={filteredItems}
                             size="small"
                             rowKey={'deptCode'}
+                            tableAlertRender={false}
+                            pagination={{showLessItems:true,showSizeChanger:false,simple:true,pageSize:10}}
                             style={{ pointerEvents: listDisabled ? 'none' : undefined }}
                             onRow={({ deptCode, disabled: itemDisabled }) => ({
                                 onClick: () => {

+ 6 - 2
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-05-30 10:59:48
+ * @LastEditTime: 2023-06-12 16:46:28
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlySet/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -204,6 +204,8 @@ const CheckUnitDepMap: React.FC = () => {
             title: `添加单元对照科室(${currentSelectedTreeNode.name})`,
             icon: <></>,
             width: 750,
+            okText: '确定',
+            cancelText: '取消',
             centered: true,
             content: <TableTransfer
                 ref={ref}
@@ -320,12 +322,14 @@ const CheckUnitDepMap: React.FC = () => {
                     };
 
                     return (
-                        <Table
+                        <BMSTable
                             rowSelection={rowSelection}
                             columns={columns as TransferItem[]}
                             dataSource={filteredItems}
                             size="small"
                             rowKey={'userId'}
+                            tableAlertRender={false}
+                            pagination={{simple:true,pageSize:10}}
                             style={{ pointerEvents: listDisabled ? 'none' : undefined }}
                             onRow={({ userId, disabled: itemDisabled }) => ({
                                 onClick: () => {

+ 5 - 3
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-06 13:32:54
+ * @LastEditTime: 2023-06-08 13:55:50
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlySet/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -148,7 +148,7 @@ const CheckUnitMana: React.FC = () => {
 
     const updateTable = async (formVal: any, type: 'EDIT' | "ADD") => {
 
-
+        let flag = false;
         if (type == 'ADD') {
             const resp = await addCheckUnit({
                 ...formVal,
@@ -156,6 +156,7 @@ const CheckUnitMana: React.FC = () => {
                 unitType: currentSelectedTreeNode.unitType
             });
             if (resp) {
+                flag = true;
                 tableRef.current?.reload();
                 message.success('操作成功!');
             }
@@ -167,11 +168,12 @@ const CheckUnitMana: React.FC = () => {
                 ...formVal
             });
             if (resp) {
+                flag = true;
                 tableRef.current?.reload();
                 message.success('操作成功!');
             }
         }
-        return true;
+        return flag;
 
     }
 

+ 4 - 3
src/pages/setting/checkUnitSet/viewUnitPermSet/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:06:08
+ * @LastEditTime: 2023-06-12 16:34: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
  */
@@ -260,13 +260,14 @@ export default function ViewUnitPermSet() {
                     };
 
                     return (
-                        <Table
+                        <BMSTable
                             rowSelection={rowSelection}
                             columns={columns as TransferItem[]}
                             dataSource={filteredItems}
                             size="small"
-                            pagination={{ showSizeChanger: false }}
+                            pagination={{ showSizeChanger: false,pageSize:10,simple:true }}
                             rowKey={'code'}
+                            tableAlertRender={false}
                             style={{ pointerEvents: listDisabled ? 'none' : undefined }}
                             onRow={({ code, disabled: itemDisabled }) => ({
                                 onClick: () => {

+ 17 - 11
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-05-06 10:35:37
+ * @LastEditTime: 2023-06-13 10:36:40
  * @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
  */
@@ -233,7 +233,9 @@ export default function IndicGroupWeightSet() {
         Modal.confirm({
             title: `添加分组核算单元(${record.groupName})`,
             icon: <></>,
-            width: 672,
+            okText: '确定',
+            cancelText: '取消',
+            width: 688,
             content: <TableTransfer
                 ref={ref}
                 record={record}
@@ -258,15 +260,15 @@ export default function IndicGroupWeightSet() {
             const resp = await getAllUnit();
             if (resp) {
 
-                if (record && record.unitInfoVos) {
-
-                    const defaultSelctedkeys = record.unitInfoVos.map((item: any) => item.unitCode);
-
-                    set_datasource([...resp,...(record.unitInfoVos.map((a:any)=>({...a,code:a.unitCode})))]);
-
+                if (record ) {
+                    
+                    if(record.unitInfoVos){
+                        const defaultSelctedkeys = record.unitInfoVos.map((item: any) => item.unitCode);
+                        setTargetKeys(defaultSelctedkeys);
+                    }
                     
+                    set_datasource([...resp,...(record.unitInfoVos?record.unitInfoVos.map((a:any)=>({...a,code:a.unitCode})):[])]);
 
-                    setTargetKeys(defaultSelctedkeys);
                 }
 
             }
@@ -349,12 +351,15 @@ export default function IndicGroupWeightSet() {
                     };
 
                     return (
-                        <Table
+                        <BMSTable
                             rowSelection={rowSelection}
                             columns={columns as TransferItem[]}
                             dataSource={filteredItems}
                             size="small"
                             rowKey={'code'}
+                            tableAlertRender={false}
+                            pagination={{simple:true,pageSize:10}}
+                            locale={{ emptyText: '无数据' }}
                             style={{ pointerEvents: listDisabled ? 'none' : undefined }}
                             onRow={({ code, disabled: itemDisabled }) => ({
                                 onClick: () => {
@@ -528,7 +533,7 @@ export default function IndicGroupWeightSet() {
                                             <ProFormSelect label="管理指标:" width={160} 
                                              name={`indicatorCode${item.id}`}
                                              request={async () => {
-                                                const resp = await getManaIndicListData();
+                                                const resp = await getManaIndicListData({pageSize:500});
                                                 if (resp) {
                                                     return resp.list.map((a: any) => ({
                                                         label: a.name,
@@ -557,6 +562,7 @@ export default function IndicGroupWeightSet() {
                                             <Form.Item name={`weight${item.id}`} label='占比(请输入小数):'>
                                                  <InputNumber 
                                                      style={{width:120,height:24,position:'relative',top:0}}
+                                                     precision={4}
                                                      onChange={(value)=>{
                                                         //console.log({value,index,indicatorData});
                                                         const temp = [...indicatorData];

+ 3 - 3
src/pages/setting/manaPerformanceSet/indicGroupWeightSet/service.ts

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2023-03-03 16:31:27
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-04-21 10:45:59
+ * @LastEditTime: 2023-06-13 10:17:31
  * @FilePath: /KC-MiddlePlatform/src/pages/platform/setting/pubDicTypeMana/service.ts
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -80,10 +80,10 @@ export const addIndicGroup = (data:{id:number,indicatorWeights:[]}) => {
 
 //获取所有单元,除去以选中的
 
-export const getAllUnit = (unitCode?:string) => {
+export const getAllUnit = (groupId?:number) => {
   return request('/performance/managerIndicator/groupUnitList', {
     method: 'GET',
-    params:{unitCode}
+    params:{groupId}
   });
 };
 

+ 19 - 7
src/pages/setting/manaPerformanceSet/manaIndicItemSet/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:20:17
+ * @LastEditTime: 2023-06-08 11:11:50
  * @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
  */
@@ -40,7 +40,7 @@ export default function manaIndicItemSet() {
 
 
 
-    const columns = [
+    const columns: ProColumns[] = [
 
         {
             title: '管理指标名称',
@@ -53,10 +53,16 @@ export default function manaIndicItemSet() {
         {
             title: '得分下限',
             dataIndex: 'scoreFloor',
+            renderText(text, record, index, action) {
+                return text * 100 + '%'
+            },
         },
         {
             title: '得分上限',
             dataIndex: 'scoreCeiling',
+            renderText(text, record, index, action) {
+                return text * 100 + '%'
+            },
         },
         {
             title: '数据格式',
@@ -121,7 +127,7 @@ export default function manaIndicItemSet() {
             }
         }
         if (type == 'EDIT') {
-            const resp = await editData({ ...formVal});
+            const resp = await editData({ ...formVal });
             if (resp) {
                 tableRef.current?.reload();
                 message.success('操作成功!');
@@ -135,16 +141,16 @@ export default function manaIndicItemSet() {
 
         return (
             <ModalForm
-                title={`${type == 'EDIT' ? '编辑' : '新增'}管理指标项目${record.name?`(${record.name})`:''}`}
+                title={`${type == 'EDIT' ? '编辑' : '新增'}管理指标项目${record.name ? `(${record.name})` : ''}`}
                 width={352}
                 initialValues={type == 'EDIT' ? { ...record } : {}}
                 trigger={
                     type == 'EDIT' ? <a key="edit" >编辑</a> : <span className='add'>新增</span>
                 }
                 onFinish={(val) => {
-                    return updateTable(type == 'EDIT' ? { ...record, ...val,sql:val.sql?val.sql:'' } : { ...val }, type);
+                    return updateTable(type == 'EDIT' ? { ...record, ...val, sql: val.sql ? val.sql : '' } : { ...val }, type);
                 }}
-                modalProps={{destroyOnClose:true}}
+                modalProps={{ destroyOnClose: true }}
                 colProps={{ span: 24 }}
                 grid
             >
@@ -179,6 +185,13 @@ export default function manaIndicItemSet() {
                     min={0.01}
                     rules={[{ required: true, message: '得分上限不能为空!' }]}
                 />
+                <ProFormDigit
+                    name="sort"
+                    label="顺序号:"
+                    placeholder="请输入"
+                    min={0}
+                    rules={[{ required: true, message: '顺序号不能为空!' }]}
+                />
                 <ProFormRadio.Group
                     name="dataType"
                     label="数据格式:"
@@ -222,7 +235,6 @@ export default function manaIndicItemSet() {
                         )
                     }
                 </ProFormDependency>
-
             </ModalForm>
         )
     }

+ 8 - 4
src/pages/setting/manaPerformanceSet/unitIndicTargetSet/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:21:57
+ * @LastEditTime: 2023-06-13 10:17: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
  */
@@ -247,7 +247,9 @@ const UnitIndicTargetSet = () => {
         Modal.confirm({
             title: `复制单元考核目标设定信息(${record.unitName})`,
             icon: <></>,
-            width: 672,
+            width: 690,
+            okText: '确定',
+            cancelText: '取消',
             content: <TableTransfer
                 ref={ref}
                 record={record}
@@ -269,7 +271,7 @@ const UnitIndicTargetSet = () => {
 
         //获取单元
         const getFuncList = async () => {
-            const resp = await getAllUnit();
+            const resp = await getAllUnit(currentSelectedType.id);
             if (resp) {
 
                 set_datasource(resp);
@@ -364,12 +366,14 @@ const UnitIndicTargetSet = () => {
                     };
 
                     return (
-                        <Table
+                        <BMSTable
                             rowSelection={rowSelection}
                             columns={columns as TransferItem[]}
                             dataSource={filteredItems}
                             size="small"
                             rowKey={'code'}
+                            tableAlertRender={false}
+                            pagination={{simple:true,pageSize:10}}
                             style={{ pointerEvents: listDisabled ? 'none' : undefined }}
                             onRow={({ code, disabled: itemDisabled }) => ({
                                 onClick: () => {

+ 6 - 3
src/pages/setting/projectSetting/bilingProjectMana/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-06 15:12:08
+ * @LastEditTime: 2023-06-08 16:07:10
  * @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
  */
@@ -128,7 +128,8 @@ export default function BilingProjectMana() {
     }
 
     const updateTable = async (formVal: any, type: 'EDIT' | "ADD") => {
-
+        
+        let flag = false;
         const result = {
             itemCode: formVal.itemCode,
             itemName: formVal.itemName,
@@ -144,6 +145,7 @@ export default function BilingProjectMana() {
         if (type == 'ADD') {
             const resp = await addData({...result});
             if (resp) {
+                flag = true;
                 tableRef.current?.reload();
                 message.success('操作成功!');
             }
@@ -151,12 +153,13 @@ export default function BilingProjectMana() {
         if (type == 'EDIT') {
             const resp = await editData({id:formVal.id,...result});
             if (resp) {
+                flag = true;
                 tableRef.current?.reload();
                 message.success('操作成功!');
             }
         }
 
-        return true;
+        return flag;
     }
 
     const [dicData, set_dicData] = useState<any[]>([]);

+ 2 - 2
src/pages/setting/projectSetting/bilingProjectMana/service.ts

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2023-03-03 16:31:27
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-06-06 14:21:56
+ * @LastEditTime: 2023-06-06 18:00:24
  * @FilePath: /KC-MiddlePlatform/src/pages/platform/setting/pubDicTypeMana/service.ts
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -101,7 +101,7 @@ export const importBillingProjectRelaFiles = (data:any) => {
 //获取excel导入模板
 export const downloadTemplateReq = (compute_date:string) => {
 
-  let path = `/performance/item/exportItem?compute_date=${compute_date}`;
+  let path = `/gateway/performance/item/exportItem`;
 
   const userData = localStorage.getItem('userData');
   const { token = '' } = JSON.parse(userData as any);

+ 3 - 3
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-05-30 16:30:41
+ * @LastEditTime: 2023-06-12 17:09:49
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlySet/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -557,7 +557,7 @@ const CheckUnitProjectSet: React.FC = () => {
         };
 
         const onSelectChange = (sourceSelectedKeys: string[], targetSelectedKeys: string[]) => {
-            console.log('sourceSelectedKeys:', sourceSelectedKeys,'targetSelectedKeys:',targetSelectedKeys);
+            //console.log('sourceSelectedKeys:', sourceSelectedKeys,'targetSelectedKeys:',targetSelectedKeys);
             setSelectedKeys([...sourceSelectedKeys, ...targetSelectedKeys]);
         };
 
@@ -569,7 +569,7 @@ const CheckUnitProjectSet: React.FC = () => {
                 if (currentSelectedTabKey == '1') {
                     const items = datasource.filter(a => targetKeys.includes(a.code));
                     //拿到当前的表格数据覆盖全量表格数据
-                    console.log({items,targetKeys});
+                    //console.log({items,targetKeys});
                     const uodatedData = items.map(a=>{
                         if(targetData.length>0){
                              const result = targetData.filter(b=>b.itemPointCode == a.code);

+ 33 - 11
src/pages/setting/projectSetting/indicProjectMana/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:09:22
+ * @LastEditTime: 2023-06-08 11:12:15
  * @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
  */
@@ -42,7 +42,7 @@ export default function BilingProjectMana() {
 
 
 
-    const columns:ProColumns[] = [
+    const columns: ProColumns[] = [
 
         {
             title: '项目代码',
@@ -67,9 +67,9 @@ export default function BilingProjectMana() {
         {
             title: 'SQL',
             dataIndex: 'sql',
-            width:400,
-            ellipsis:true
-            
+            width: 400,
+            ellipsis: true
+
         },
         {
             title: '操作',
@@ -128,14 +128,14 @@ export default function BilingProjectMana() {
         }
 
         if (type == 'ADD') {
-            const resp = await addData({...result});
+            const resp = await addData({ ...result });
             if (resp) {
                 tableRef.current?.reload();
                 message.success('操作成功!');
             }
         }
         if (type == 'EDIT') {
-            const resp = await editData({id:formVal.id,...result});
+            const resp = await editData({ id: formVal.id, ...result });
             if (resp) {
                 tableRef.current?.reload();
                 message.success('操作成功!');
@@ -161,12 +161,12 @@ export default function BilingProjectMana() {
             <ModalForm
                 title={`${type == 'EDIT' ? '编辑' : '新增'}指标项目`}
                 width={352}
-                initialValues={type == 'EDIT' ? { ...record,itemType:{label:record.itemType,value:record.itemTypeCode} } : {coreFlag:1}}
+                initialValues={type == 'EDIT' ? { ...record, itemType: { label: record.itemType, value: record.itemTypeCode } } : { coreFlag: 1 }}
                 trigger={
                     type == 'EDIT' ? <a key="edit" >编辑</a> : <span className='add'>新增</span>
                 }
                 onFinish={(val) => {
-                    return updateTable(type == 'EDIT' ? { ...record, ...val,orderPointValue:val.orderPointValue?val.orderPointValue:undefined } : { ...val }, type);
+                    return updateTable(type == 'EDIT' ? { ...record, ...val, orderPointValue: val.orderPointValue ? val.orderPointValue : undefined } : { ...val }, type);
                 }}
                 modalProps={{ destroyOnClose: true }}
                 colProps={{ span: 24 }}
@@ -181,7 +181,7 @@ export default function BilingProjectMana() {
                 />
                 <ProFormSelect label="类型:"
                     name='indicatorType'
-                    options={[{label:'工作量指标',value:1},{label:'运营指标',value:2}]}
+                    options={[{ label: '工作量指标', value: 1 }, { label: '运营指标', value: 2 }]}
                     // fieldProps={{ labelInValue: true }}
                     rules={[{ required: true, message: '类型不能为空!' }]}
                 />
@@ -238,11 +238,33 @@ export default function BilingProjectMana() {
         <BMSPagecontainer className='BilingProjectMana' title={false}>
             <div className='toolBar'>
                 <div className='filter'>
+                    <div className='filterItem'>
+                        <span className='label'>类型:</span>
+                        <ProFormSelect
+                            noStyle
+                            allowClear
+                            placeholder="请选择类型"
+                            style={{ width: 160, marginRight: 16 }}
+                            options={[
+                                {
+                                    label: '工作量指标', value: 1
+                                },
+                                {
+                                    label: ' 运营指标', value: 2
+                                }
+                            ]}
+                            fieldProps={{
+                                onChange(value, option) {
+                                    set_tableDataFilterParams({ ...tableDataFilterParams, type: value })
+                                },
+                            }}
+                        />
+                    </div>
                     <div className='filterItem'>
                         <span className='label' style={{ whiteSpace: 'nowrap' }}> 检索:</span>
                         <Input placeholder={'请输入项目名称'} allowClear
                             suffix={
-                                <IconFont style={{color:'#99A6BF'}} type="iconsousuo" onClick={() => tableDataSearchHandle('name')} />
+                                <IconFont style={{ color: '#99A6BF' }} type="iconsousuo" onClick={() => tableDataSearchHandle('name')} />
                             }
                             onChange={(e) => {
                                 set_tableDataSearchKeywords(e.target.value);

+ 6 - 2
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-05-30 11:27:17
+ * @LastEditTime: 2023-06-12 16:44:04
  * @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
  */
@@ -292,6 +292,8 @@ const ReportSetting = () => {
             icon: <></>,
             width: 750,
             centered: true,
+            okText: '确定',
+            cancelText: '取消',
             content: <TableTransfer
                 ref={ref}
                 record={undefined}
@@ -411,12 +413,14 @@ const ReportSetting = () => {
                     };
 
                     return (
-                        <Table
+                        <BMSTable
                             rowSelection={rowSelection}
                             columns={columns as TransferItem[]}
                             dataSource={filteredItems}
                             size="small"
                             rowKey={'code'}
+                            tableAlertRender={false}
+                            pagination={{simple:true,pageSize:10}}
                             style={{ pointerEvents: listDisabled ? 'none' : undefined }}
                             onRow={({ code, disabled: itemDisabled }) => ({
                                 onClick: () => {

+ 16 - 0
src/utils/format.ts

@@ -1,4 +1,20 @@
+/*
+ * @Author: code4eat awesomedema@gmail.com
+ * @Date: 2022-12-14 14:14:32
+ * @LastEditors: code4eat awesomedema@gmail.com
+ * @LastEditTime: 2023-06-08 15:27:39
+ * @FilePath: /BudgetManaSystem/src/utils/format.ts
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ */
 // 示例方法,没有实际意义
 export function trim(str: string) {
   return str.trim();
 }
+
+//金额数字转换
+export function formatMoneyNumber(num:number) {
+  if (typeof num !== 'number' || isNaN(num)) {
+    return '-';
+  } 
+  return new Intl.NumberFormat('en-US', { minimumFractionDigits: 0, maximumFractionDigits: 2 }).format(num);
+}

+ 2 - 2
src/utils/tableToExcel.ts

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2023-05-31 11:18:30
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-06-01 14:42:06
+ * @LastEditTime: 2023-06-06 15:40:21
  * @FilePath: /BudgetManaSystem/src/utils/tableToExcel.ts
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -29,7 +29,7 @@ function exportTableToExcel(tableData: DataType[], headers: DataType, fileName =
     const blob = new Blob([wbout], { type: 'application/octet-stream' });
 
     // 使用file-saver保存文件
-    saveAs(blob, `${fileName}.xlsx`);
+    saveAs(blob, `${fileName}.xls`);
 }
 
 export default exportTableToExcel