Procházet zdrojové kódy

添加2023-08-04周功能

code4eat před 2 roky
rodič
revize
add868d9d3

+ 243 - 45
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-07-27 14:49:13
+ * @LastEditTime: 2023-08-03 17:38:34
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlySet/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -16,15 +16,15 @@ import BMSPagecontainer from '@/components/BMSPageContainer';
 import { useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
 import './style.less';
 
-import { Tree, TreeProps, Tabs, Input, Modal, Transfer, Popconfirm, message, Popover } from 'antd';
+import { Table, TreeProps, Tabs, Input, Modal, Transfer, Popconfirm, message, Popover } from 'antd';
 import { DataNode } from 'antd/es/tree';
 
 import expandedIcon from '../../../../static/treenode_open.png';
 import closeIcon from '../../../../static/treenode_collapse.png';
 import { BMSTable } from '@/components/BMSTable';
-import { ActionType, ProColumns, ProColumnType } from '@ant-design/pro-components';
+import { ActionType, ModalForm, ProColumns, ProColumnType, ProFormSelect } from '@ant-design/pro-components';
 import { createFromIconfontCN } from '@ant-design/icons';
-import { checkRequest, delPersonRequest, generateDataRequest, getDepInfoTableData, getPersonInfoTableData, getProjectInfoTableData, getTotalEmps, getTransactionInfo, getTreeData, getTreeDataRespType, jixiaoDataImport, PersonInfoTableDataType, saveEmpsRequest } from './service';
+import { checkRequest, delPersonRequest, fastMapDepAndEmp, generateDataRequest, getAllCheckUnit, getDepInfoTableData, getParams, getPersonInfoTableData, getProjectInfoTableData, getTotalEmps, getTransactionInfo, getTreeData, getTreeDataRespType, jixiaoDataImport, PersonInfoTableDataType, saveEmpsRequest } from './service';
 import { TransferDirection, TransferItem, TransferProps } from 'antd/es/transfer';
 import { getComputeDate } from '@/pages/Home/service';
 
@@ -40,7 +40,8 @@ import { difference } from 'lodash';
 
 import '../../../../src/utils/zhongtaiA'
 import { getJiezhuanStatus } from '../monthlySet/service';
-import { useAccess } from '@umijs/max';
+import { useAccess } from 'umi';
+
 
 
 const IconFont = createFromIconfontCN({
@@ -163,8 +164,21 @@ const MonthlyInfoCheck: React.FC = () => {
     const [searchValue, setSearchValue] = useState('');
     const [autoExpandParent, setAutoExpandParent] = useState(true);
 
+    const [ifMulti,set_ifMulti] = useState(false); //异动处理时,单元对照是否多选
+
     const [ifBanAllAction, set_ifBanAllAction] = useState(true);  //是否掩藏所有操作
-    const [tabs,set_tabs] = useState<any[]>([]);
+    const [tabs, set_tabs] = useState<any[]>([]);
+
+    const [ifShowModal,set_ifShowModal] = useState(false);
+
+    const ref = React.createRef<{ save: any; getSelectedKeys: any }>();
+    const ChangeTableRef = React.createRef<{ reload: any;}>();
+
+    const [openChangeTable,set_openChangeTable] = useState(false);
+
+    const [currentDeal,set_currentDeal] = useState<undefined|any>(undefined); //当前处理的异动项
+
+    const [reloadChangeTable,set_reloadChangeTable] = useState(false);
 
 
 
@@ -246,12 +260,12 @@ const MonthlyInfoCheck: React.FC = () => {
         set_currentSelectedTabKey(activeKey);
     }
 
-    const getJiezhuanStatusHandle =async () => {
+    const getJiezhuanStatusHandle = async () => {
         const resp = await getJiezhuanStatus(currentComputeDate as string);
-        if(resp == 2){
-              set_ifBanAllAction(true);
-        }else{
-              set_ifBanAllAction(false);
+        if (resp == 2) {
+            set_ifBanAllAction(true);
+        } else {
+            set_ifBanAllAction(false);
         }
     }
 
@@ -630,16 +644,11 @@ const MonthlyInfoCheck: React.FC = () => {
         }
     }
 
-    const checkBtnHandle = () => {
-        //点击检查按钮事件
-        if(auditType != '0'){
-            Modal.error({
-                title:'提示',
-                content:'当前处于审核状态无法操作!'
-            });
-            return '';
-        }
+    const ChangeTable = React.forwardRef(({reload}:{reload:boolean},ref) => {
 
+        const [changeTableDataTypes, set_changeTableDataTypes] = useState<{ label: string, value: any }[]>([]);
+        const [changeTableData, set_changeTableData] = useState<any[]>([]);
+        const [changeTableDataSource, set_changeTableDataSource] = useState<any[]>([]);
         const _tableColumns: ProColumns[] = [
             {
                 title: '异动类型',
@@ -650,37 +659,208 @@ const MonthlyInfoCheck: React.FC = () => {
                 title: '异动信息',
                 dataIndex: 'message',
                 ellipsis: true
+            },
+            {
+                title: '操作',
+                key: 'option',
+                width: 80,
+                valueType: 'option',
+                render: (_: any, record) => (record.messageType=='科室新增'||record.messageType=='人员对照')?[
+                    <a key={1} onClick={()=>{
+                        set_ifMulti(record.messageType == '科室新增'?true:false);
+                        set_currentDeal(record);
+                        set_ifShowModal(true);
+                        
+                    }}>处理</a>
+                ]:[],
             }
         ];
 
         const getInfo = async () => {
+
             const resp = await getTransactionInfo(currentComputeDate as string);
             if (resp) {
-                return {
-                    data: resp,
-                    success: true,
-                }
+                const types = resp.map((a:any)=>({label:a.messageType,value:a.messageType}));
+                let uniqueArr = Array.from(new Set(types.map((e: any) => JSON.stringify(e)))).map(e => JSON.parse(e as string));
+                set_changeTableDataTypes(uniqueArr);
+                set_changeTableData(resp);
+                set_changeTableDataSource(resp);
             }
-            return []
+            set_reloadChangeTable(false);
         }
 
-        Modal.info({
-            title: '异动详情',
-            icon: <></>,
-            width: 640,
-            okText: '知道了',
-            centered: true,
-            cancelText: '',
-            content: (
-                <BMSTable columns={[..._tableColumns]} request={async () => getInfo()} />
-            ),
-            onOk: () => {
-                // return ref.current && ref.current.save();
-            }
-        })
+        const onTypeChange = (type:string)=>{
+            const result = changeTableData.filter(a=>a.messageType == type);
+            set_changeTableDataSource(result);
+        }
+
+        useEffect(()=>{
+              console.log({reload});
+        },[reload])
+
+    
+        useEffect(() => {
+            getInfo();
+        }, [])
+
+        return (
+            <div>
+                <div className='search' style={{ marginBottom: 16 }}>
+                    <span>异动类型:</span>
+                    <ProFormSelect label='异动类型:' noStyle width={160} options={changeTableDataTypes} fieldProps={{
+                        onChange(value, option) {
+                            onTypeChange(value);
+                        },
+                    }} />
+                </div>
+                {changeTableDataSource && <BMSTable rowKey={'message'} columns={[..._tableColumns]} dataSource={changeTableDataSource}
+                    scroll={{ y: 300 }}
+                />}
+            </div>
+        )
+    })
+    
+    //检查按钮事件
+    const checkBtnHandle = () => {
+        //点击检查按钮事件
+        if (auditType != '0') {
+            Modal.error({
+                title: '提示',
+                content: '当前处于审核状态无法操作!'
+            });
+            return '';
+        }
+
+        set_openChangeTable(true);
+
+        // Modal.info({
+        //     title: '异动详情',
+        //     icon: <></>,
+        //     width: 640,
+        //     okText: '知道了',
+        //     centered: true,
+        //     cancelText: '',
+        //     content: (
+        //         <ChangeTable reload={reloadChangeTable} ref={ChangeTableRef}></ChangeTable>
+        //     ),
+        //     onOk: () => {
+        //         // return ref.current && ref.current.save();
+        //     }
+        // })
+
+    }
 
+    interface TableSelecterProps extends TransferProps<TransferItem> {
+        tableSelecterColumn: any[];
+        record: any
     }
 
+
+    const tableSelecterUnitColumn: any[] =  [
+        {
+            title: '核算单元名称',
+            dataIndex: 'unitName',
+        },
+        {
+            title: '职类',
+            dataIndex: 'unitTypeName',
+        },
+    ];
+
+
+    const TableSelecter = React.forwardRef(({ tableSelecterColumn, record }: TableSelecterProps, ref) => {
+
+        const [datasource, set_datasource] = useState<any[]>([]);
+        const [selectedKeys, setSelectedKeys] = useState<React.Key[]>([]);
+        const [selectedRows,set_selectedRows] = useState<any[]>([]);
+        const [showList, set_showList] = useState<any[]>([]);
+
+        //获取表格数据
+        const getFuncList = async () => {
+            const resp = await getAllCheckUnit();
+            if (resp) {
+                set_datasource(resp);
+                set_showList(resp);
+            }
+        }
+
+
+        const onSelectChange = (newSelectedRowKeys: React.Key[],selectedRows:any[]) => {
+            setSelectedKeys([...newSelectedRowKeys]);
+            set_selectedRows(selectedRows);
+
+        };
+
+        const save = async () => {
+            const result = {
+                mapType:ifMulti?2:1,
+                messageCode:currentDeal.messageCode,
+                messageName:currentDeal.messageName,
+                unitInfo: selectedRows.map((a:any)=>({unitCode:a.code,unitType:a.unitType}))
+            };
+
+            const resp = await fastMapDepAndEmp(result);
+
+            if (resp) {
+                message.success('操作成功!');
+                set_ifShowModal(false);
+                set_reloadChangeTable(true);
+                
+            }
+        }
+
+        useEffect(() => {
+            getFuncList();
+        }, [])
+
+        return (
+            <div className='TableSelecter'>
+                {/* <Input placeholder={'请输入'} allowClear
+                    suffix={
+                        <IconFont style={{ color: '#99A6BF' }} type="iconsousuo" />
+                    }
+                    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);
+                        }
+
+                    }}
+
+                /> */}
+                <BMSTable columns={tableSelecterColumn}
+                    options={{
+                        density: true,
+                        setting: {
+                            listsHeight: 100,
+                        },
+                    }}
+                    rowKey='code'
+                    // scroll={{y:300}}
+                    tableAlertRender={false}
+                    rowSelection={{
+                        // 自定义选择项参考: https://ant.design/components/table-cn/#components-table-demo-row-selection-custom
+                        // 注释该行则默认不显示下拉选项
+                        selections: [Table.SELECTION_ALL, Table.SELECTION_INVERT],
+                        onChange: onSelectChange,
+                        type:ifMulti?'checkbox':'radio'
+                    }}
+                    pagination={{ showSizeChanger: false, pageSize:9, simple: true, showTitle: false }}
+                    dataSource={showList}
+                />
+                <div className='footer'>
+                    <span className='cancel' onClick={() => set_ifShowModal(false)}>取消</span>
+                    <span className='ok' onClick={() => save()}>{`确认(${selectedKeys.length > 0 && selectedKeys.length})`}</span>
+                </div>
+            </div>
+
+        )
+    });
+
+
     useEffect(() => {
 
         if (currentComputeDate) {
@@ -729,8 +909,8 @@ const MonthlyInfoCheck: React.FC = () => {
         getCurrentComputeDate();
 
         const tabs = access.whatCanIDoInThisPage(location.pathname.replace('/budgetManaSystem', ''));
-        const tabsNameArr = tabs.map((a:any)=>a.name);
-        const needShowTabs = tabData.filter(a=>tabsNameArr.includes(a.label));
+        const tabsNameArr = tabs.map((a: any) => a.name);
+        const needShowTabs = tabData.filter(a => tabsNameArr.includes(a.label));
         set_tabs(needShowTabs);
 
     }, []);
@@ -738,6 +918,24 @@ const MonthlyInfoCheck: React.FC = () => {
 
     return (
         <div className='MonthlyInfoCheck'>
+            <ModalForm title={`选择对照核算单元(${currentDeal?.messageName})`} width={400} 
+            submitter={{
+                render: (props, defaultDoms) => []
+            }} 
+            open={ifShowModal} modalProps={{
+                closable: false,
+            }}>
+                <TableSelecter
+                    ref={ref}
+                    record={undefined}
+                    tableSelecterColumn={tableSelecterUnitColumn}
+                ></TableSelecter>
+            </ModalForm>
+
+            <Modal title="异动详情" okText='知道了' open={openChangeTable} closable onCancel={()=>set_openChangeTable(false)}>
+                <ChangeTable reload={reloadChangeTable} />
+            </Modal>
+
             <div className='leftTree'>
                 <div className='search'>
                     <Input
@@ -813,11 +1011,11 @@ const MonthlyInfoCheck: React.FC = () => {
                             <>
                                 <div className={auditType == '0' ? 'importBtn disabled' : 'importBtn '} onClick={() => importHandle()} style={{ right: auditType == '0' ? '64px' : '93px' }}>绩效数据导入</div>
                                 <div className='checkBtn' onClick={() => checkHandle(`${auditType}`)}>{auditType == '0' ? '审核' : '取消审核'}</div>
-                                {!ifBanAllAction&&(
+                                {!ifBanAllAction && (
                                     <div className='midLine'>
-                                    <span onClick={() => checkBtnHandle()}>点击检查</span>
-                                    是否有未对照的人员信息、未对照的科室信息及未设置的收费项目信息
-                                </div>
+                                        <span onClick={() => checkBtnHandle()}>点击检查</span>
+                                        是否有未对照的人员信息、未对照的科室信息及未设置的收费项目信息
+                                    </div>
                                 )}
                             </>
                         )

+ 35 - 1
src/pages/budgetMana/monthlyInfoCheck/service.ts

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2022-12-21 11:13:51
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-07-21 09:47:44
+ * @LastEditTime: 2023-08-03 16:43:04
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlyInfoCheck/service.ts
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -264,3 +264,37 @@ export const  getTransactionInfo = (compute_date:string) => {
 
 }
 
+//获取展示哪一种样式参数
+export const  getParams = () => {
+ 
+    return request('/performance/parameter/getList?current=1&pageSize=500', {
+        method: 'GET'
+    })
+
+}
+
+//获取所有核算单元
+export const  getAllCheckUnit = () => {
+ 
+    return request('/performance/kpi/getUnitList', {
+        method: 'GET'
+    })
+
+}
+
+//快捷对照人员科室
+export const  fastMapDepAndEmp = (data:{
+    unitInfo:any[],
+    mapType:number,
+    messageCode:string,
+    messageName:string
+}) => {
+ 
+    return request('/performance/check/fastMap', {
+        method: 'POST',
+        data
+    })
+
+}
+
+

+ 30 - 0
src/pages/budgetMana/monthlyInfoCheck/style.less

@@ -1,3 +1,33 @@
+
+.TableSelecter {
+    .footer {
+         display: flex;
+         flex-direction:row;
+         justify-content: flex-end;
+         margin-top: 15px;
+         span {
+             display: inline-block;
+             width: 56px;
+             height: 24px;  
+             font-size: 14px;
+             line-height: 23px;
+             text-align: center;
+             border-radius: 4px;
+             cursor: pointer;
+
+             &.ok {
+                 color: #FFFFFF;
+                 background:#3377FF;
+                 margin-left: 8px;
+             }
+             &.cancel {
+                 border: 1px solid #DAE2F2;
+             }
+         }
+
+    }
+}
+
 .MonthlyInfoCheck {
     display: flex;
     flex-direction: row;

+ 47 - 5
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-07-21 17:53:26
+ * @LastEditTime: 2023-08-03 10:02:42
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/personnelSalaryBudget/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -24,6 +24,7 @@ import './style.less';
 import '../../../utils/zhongtaiB'
 import { formatMoneyNumber } from '@/utils/format';
 import { getJiezhuanStatus } from '../monthlySet/service';
+import { getParams } from '../monthlyInfoCheck/service';
 
 const IconFont = createFromIconfontCN({
     scriptUrl: '',
@@ -48,6 +49,12 @@ const PersonnelSalaryBudget = () => {
 
     const [ifBanAllAction, set_ifBanAllAction] = useState(true);  //是否掩藏所有操作
 
+    const [ifEditTable,set_ifEditTable] = useState(true);
+
+    const [ifEditIncome,set_ifEditIncome] = useState(false);
+    const [ifEditCost,set_ifEditCost] = useState(false);
+    const [ifEditRate,set_ifEditRate] = useState(false);
+
     const tableColumn: ProColumns[] = [
         {
             title: '职类',
@@ -261,6 +268,22 @@ const PersonnelSalaryBudget = () => {
         }
     }
 
+   
+
+    const setPageType = async () => {
+        const resp = await getParams();
+        if(resp){
+            const needItems = resp.list.filter((a:any)=>a.code =='1686657454764597248' );
+            if(needItems.length>0){
+                  if(needItems[0].value == '2'){
+                       set_ifEditTable(true);
+                  }else{
+                    set_ifEditTable(false);
+                  }
+            }
+        }
+    }
+
 
     useEffect(() => {
         currentComputeDate && getCheckStatus(currentComputeDate);
@@ -271,6 +294,7 @@ const PersonnelSalaryBudget = () => {
     useEffect(() => {
 
         getCurrentComputeDate();
+        setPageType();
 
     }, []);
 
@@ -283,15 +307,33 @@ const PersonnelSalaryBudget = () => {
                 <div className='cardWrap'>
                     <div className='card'>
                         <span>收入</span>
-                        <div className='count'>{pageData.income}</div>
+                        <div className='count'>
+                            {!ifEditIncome&&pageData.income}
+                            {(ifEditIncome&&ifEditTable)&&<Input style={{width:160}} autoFocus defaultValue={pageData.income} onBlur={()=>{
+                                set_ifEditIncome(false);
+                            }} />}
+                            {(!ifEditIncome&&ifEditTable)&&<div className='editBtn' onClick={()=>set_ifEditIncome(true)}><img src={editIcon} alt="" /></div>}
+                        </div>
                     </div>
                     <div className='card'>
                         <span>成本</span>
-                        <div className='count'>{pageData.cost}</div>
+                        <div className='count'>
+                            {!ifEditCost&&pageData.cost}
+                            {(ifEditCost&&ifEditTable)&&<Input style={{width:160}} autoFocus defaultValue={pageData.cost} onBlur={()=>{
+                                set_ifEditCost(false);
+                            }} />}
+                            {(!ifEditCost&&ifEditTable)&&<div className='editBtn' onClick={()=>set_ifEditCost(true)}><img src={editIcon} alt="" /></div>}
+                        </div>
                     </div>
                     <div className='card'>
                         <span>合理人事成本比例系数</span>
-                        <div className='count'>{pageData.rate}</div>
+                        <div className='count'>
+                            {!ifEditRate&&pageData.rate}
+                            {(ifEditRate&&ifEditTable)&&<Input style={{width:160}} autoFocus defaultValue={pageData.rate} onBlur={()=>{
+                                set_ifEditRate(false);
+                            }} />}
+                            {(!ifEditRate&&ifEditTable)&&<div className='editBtn' onClick={()=>set_ifEditRate(true)}><img src={editIcon} alt="" /></div>}
+                        </div>
                     </div>
                 </div>
 
@@ -300,7 +342,7 @@ const PersonnelSalaryBudget = () => {
                         <span className='a'>全院人事成本(D=(A-B)*C)</span>
                         {!ifBanAllAction&&<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='请输入'
+                    <InputNumber className={ifEditTable?'input borderUpper':'input'} size='large' min={-10000000} value={pageData.personalCost} placeholder='请输入'
                         disabled={auditType == '1'}
                         onChange={(value) => set_pageData({ ...pageData, personalCost: value as number })} />
                 </div>

+ 29 - 1
src/pages/budgetMana/personnelSalaryBudget/style.less

@@ -64,6 +64,30 @@
                     font-weight: 500;
                     color: #527ACC;
                     line-height: 30px;
+
+                    .bms-ant-input {
+                        border-radius: 4px;
+                        border: 2px solid #3377FF;
+                    }
+
+                    .editBtn {
+                        position: relative;
+                        top: -2px;
+                        cursor: pointer;
+                        display: inline-flex;
+                        justify-content: center;
+                        align-items: center;
+                        width: 24px;
+                        height: 24px;
+                        background: #FFFFFF;
+                        border-radius: 4px;
+                        margin-left: 8px;
+
+                        &>img {
+                            width: 16px;
+                            height: 16px;
+                        }
+                    }
                 }
 
                 &:nth-child(1) {
@@ -177,13 +201,17 @@
             .input {
                 display: flex;
                 flex-direction: row;
-                justify-content:flex-start;
+                justify-content: flex-start;
                 align-items: center;
                 width: 346px;
                 height: 40px;
                 background: #FFF;
                 border-radius: 4px;
                 border: 2px solid #DAE2F2;
+
+                &.borderUpper {
+                    border: 2px solid #CFD6E6 !important;
+                }
             }
         }
 

+ 78 - 92
src/pages/secondaryDistribute/unitCheckProjectScore/index.tsx

@@ -4,7 +4,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2022-12-16 09:42:52
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-08-02 11:01:20
+ * @LastEditTime: 2023-08-03 15:36:29
  * @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, ProFormDatePicker, ProFormDigit, ProFormInstance, ProFormSelect, ProFormText } from '@ant-design/pro-components';
 import { createFromIconfontCN } from '@ant-design/icons';
-import { checkCurrentRequest, checkRequest, commitRequest, getCurrentCheckStatusReq, getCurrentCommitStatusReq, getCurrentUnitCheckStatusReq, getSecondaryDistriComputeTableData, getTreeData, getTreeDataRespType, save } from './service';
+import { checkCurrentRequest, checkRequest, commitRequest, downloadTemplateReq, getCurrentCheckStatusReq, getCurrentCommitStatusReq, getCurrentUnitCheckStatusReq, getData, getSecondaryDistriComputeTableData, getTreeData, getTreeDataRespType, importExcelData, save } from './service';
 import FormItem from 'antd/es/form/FormItem';
 
 import { getComputeDate } from '@/pages/Home/service';
@@ -62,6 +62,8 @@ export type TableListItem = {
     name: string;
 };
 
+let inputsRefKeys:string[] = [];
+
 
 const UnitCheckProjectScore: React.FC = () => {
     const location = useLocation();
@@ -95,7 +97,7 @@ const UnitCheckProjectScore: React.FC = () => {
 
     const [needSaveData, set_needSaveData] = useState<any | undefined>(undefined);
 
-    const [inputsRefKeys, set_inputsRefKeys] = useState<string[]>([]);
+    // const [inputsRefKeys, set_inputsRefKeys] = useState<string[]>([]);
 
     const inputsRef = useRef<{ [key: string]: any }>({});
 
@@ -113,13 +115,10 @@ const UnitCheckProjectScore: React.FC = () => {
 
     const column: ProColumns[] = [
         {
-            title: '姓名',
+            title: '人员',
             width: 140,
             fixed: 'left',
-            dataIndex: 'name',
-            renderText(text, record, index, action) {
-                return `${record.name}(${record.account})`
-            },
+            dataIndex: 'Employee',
         },
     ];
 
@@ -142,8 +141,8 @@ const UnitCheckProjectScore: React.FC = () => {
 
     };
 
-    const downloadTemplate = ()=>{
-
+    const downloadTemplate = () => {
+        downloadTemplateReq(currentComputeDate as string, currentSelectedTreeNode.code);
     }
 
     const importData = () => {
@@ -161,12 +160,6 @@ const UnitCheckProjectScore: React.FC = () => {
                             return b.key != 'rest'
                         })
                         return [
-                            // <Button
-                            //     key="ok"
-                            //     onClick={auditType == '0' ? () => downloadTemplate(index) : () => { }}
-                            // >
-                            //     下载模板
-                            // </Button>,
                             ...needBtn,
                         ];
                     },
@@ -176,28 +169,22 @@ const UnitCheckProjectScore: React.FC = () => {
                     const { importFile: { fileList } } = values;
 
                     let formData = new FormData();
-                    // if (index == 7) {
-                    //     formData.append('file', fileList[0].originFileObj);
-                    //     formData.append('computeDate', currentComputeDate as string);
-                    //     formData.append('unitCode', currentSelectedTreeNode.code);
-                    // } else {
-                    //     formData.append('file', fileList[0].originFileObj);
-                    //     formData.append('computeDate', currentComputeDate as string);
-                    //     formData.append('groupId', currentSelectedManaGroup?.id as any);
-                    // }
+                    formData.append('file', fileList[0].originFileObj);
+                    formData.append('computeDate', currentComputeDate as string);
+                    formData.append('unitCode', currentSelectedTreeNode.code);
 
 
-                    // const resp = await importMonthlyperformanceRelaFiles(index, formData);
+                    const resp = await importExcelData(formData);
 
-                    // if (resp) {
-                    //     tableRef.current?.reload();
-                    //     return true;
-                    // }
+                    if (resp) {
+                        tableRef.current?.reload();
+                        return true;
+                    }
 
                 }}
             >
                 <FormItem name={'importFile'}>
-                    <BMSUpload downloadTemplateFile={()=>auditType == '0' ? downloadTemplate() : () => { }} />
+                    <BMSUpload downloadTemplateFile={() => auditType == '0' ? downloadTemplate() : () => { }} />
                 </FormItem>
 
             </ModalForm>
@@ -236,7 +223,9 @@ const UnitCheckProjectScore: React.FC = () => {
 
     const gennerateColumns = (data: { title: any; userList: any; }, inputsRefKeys?: string[]) => {
         const { title } = data;
-        const _columns = title.map((item: any, index: number) => {
+        const _title = title.filter((a:any)=>a.code != 'Employee');
+        _title.sort((prev: any, next: any) => prev.sort - next.sort);
+        const _columns = _title.map((item: any, index: number) => {
             return {
                 title: item.name,
                 dataIndex: `${item.code}`,
@@ -246,37 +235,37 @@ const UnitCheckProjectScore: React.FC = () => {
 
                         let _val = _;
 
-                        if(true){
+                        if (item.evaluation == 2) {
 
-                            return <ProFormSelect 
-                                 request={async ()=>{
-                                      return []
-                                 }}
+                            return <ProFormSelect
+                                noStyle
+                                options={item.level}
                             />
                         }
 
                         return <ProFormDigit noStyle min={-1000000000} fieldProps={{
                             ref: ref => {
-                                inputsRef.current[`${record.account}-${item.code}`] = ref;
+                                inputsRef.current[`${record.empNo}-${item.code}`] = ref;
+                                inputsRefKeys?.push(`${record.empNo}-${item.code}`);
                                 //console.log({ref});
                             },
                             onBlur: () => {
-                                const updatedUserList = needSaveData.userList.map((a: any) => {
-                                    if (a.account == record.account) {
-                                        const arr = a.itemValue.map((b: any) => {
+                                const updatedList = needSaveData.secondValueVos.map((a: any) => {
+                                    if (a.empNo == record.empNo) {
+                                        const arr = a.value.map((b: any) => {
                                             if (b.code == item.code) {
                                                 return { ...b, value: _val ? _val : 0 } //value有为undefined的可能
                                             } else {
                                                 return b
                                             }
                                         });
-                                        return { ...a, itemValue: arr }
+                                        return { ...a, value: arr }
                                     } else {
                                         return a
                                     }
                                 });
 
-                                set_needSaveData({ ...needSaveData, userList: updatedUserList })
+                                set_needSaveData({ ...needSaveData, secondValueVos: updatedList })
                             },
                             onChange(value) {
                                 _val = value ? value : 0;
@@ -286,24 +275,24 @@ const UnitCheckProjectScore: React.FC = () => {
                                     event.preventDefault();
 
                                     const value = event.target.value ? Number(event.target.value) : 0;
-                                    const updatedUserList = needSaveData.userList.map((a: any) => {
-                                        if (a.account == record.account) {
-                                            const arr = a.itemValue.map((b: any) => {
+                                    const updatedList = needSaveData.secondValueVos.map((a: any) => {
+                                        if (a.empNo == record.empNo) {
+                                            const arr = a.value.map((b: any) => {
                                                 if (b.code == item.code) {
                                                     return { ...b, value: value ? value : 0 } //value有为undefined的可能
                                                 } else {
                                                     return b
                                                 }
                                             });
-                                            return { ...a, itemValue: arr }
+                                            return { ...a, value: arr }
                                         } else {
                                             return a
                                         }
                                     });
 
-                                    set_needSaveData({ ...needSaveData, userList: updatedUserList });
+                                    set_needSaveData({ ...needSaveData, secondValueVos: updatedList });
 
-                                    const index = inputsRefKeys ? inputsRefKeys.findIndex(a => a == `${record.account}-${item.code}`) : -1;
+                                    const index = inputsRefKeys ? inputsRefKeys.findIndex(a => a == `${record.empNo}-${item.code}`) : -1;
                                     //console.log({index,input:inputsRef.current,inputsRefKeys});
                                     const nextInput = inputsRefKeys ? inputsRef.current[inputsRefKeys[index + 1]] : null;
                                     if (nextInput) {
@@ -312,7 +301,7 @@ const UnitCheckProjectScore: React.FC = () => {
                                     }
                                 }
                             },
-                            onFocus: () => set_currentInputRefKeys(`${record.account}-${item.code}`),
+                            onFocus: () => set_currentInputRefKeys(`${record.empNo}-${item.code}`),
                             defaultValue: _,
 
                         }} width={80} />
@@ -322,23 +311,8 @@ const UnitCheckProjectScore: React.FC = () => {
                 },
             }
         });
-        set_tableColumn([...column, ..._columns, {
-            title: '总奖金',
-            dataIndex: 'totalScore',
-            width: 120,
-            fixed: 'right',
-        },
-            // {
-            //     title: '状态',
-            //     width:120,
-            //     dataIndex: 'submitName',
-            //     renderText(text, record, index, action) {
-            //         return record.submit == 1 ? text : <span style={{ color: '#FF8C19' }}>{text}</span>
-            //     },
-            // },
-        ]);
-
 
+        set_tableColumn([...column,..._columns]);
     }
 
     const getTableData = async (params: any) => {
@@ -361,13 +335,13 @@ const UnitCheckProjectScore: React.FC = () => {
 
 
     const buildTableData = (resp: any, inputsRefKeys?: string[]) => {
-        const { title, userList } = resp;
+        const { title, secondValueVos } = resp;
         const _columns = gennerateColumns(resp, inputsRefKeys);
-        const data = userList.map((item: any) => {
+        const data = secondValueVos.map((item: any) => {
             let total = 0;
             let rowData: { [key: string]: any } = {};
 
-            item.itemValue.forEach((b: any) => {
+            item.value.forEach((b: any) => {
                 const needTitle = title.filter((a: any) => a.code == b.code);
                 if (needTitle.length > 0) {
                     rowData[`${needTitle[0].code}`] = b.value
@@ -375,7 +349,7 @@ const UnitCheckProjectScore: React.FC = () => {
                 total = total + b.value;
             });
 
-            return { ...item, ...rowData, id: Math.random(), _columns, totalScore: Number(total.toFixed(2)) }
+            return { ...item, ...rowData, id: Math.random(), _columns,Employee:item.empName}
         });
 
         const compeltedTotal = data.reduce((prev: any, cur: any) => prev + cur.totalScore, 0);
@@ -640,6 +614,8 @@ const UnitCheckProjectScore: React.FC = () => {
     }
 
 
+
+
     const handleResize = (e: any) => {
         const wH = e.target.innerHeight;
         const tableHeight = wH - 290;
@@ -653,16 +629,23 @@ const UnitCheckProjectScore: React.FC = () => {
         }, 0)
     }
 
-    const computeHandle = () => {
-        Modal.confirm({
-            title: '注意',
-            content: '重新计算会覆盖原有数据,确定要继续计算操作?'
-        })
+    const getDataByBtn = async () => {  //获取按钮获取数据
+        const resp = await getData(currentComputeDate as string, currentSelectedTreeNode.code);
+        if (resp) {
+            message.success('数据获取成功!');
+            tableRef.current?.reload();
+        }
+
     }
 
     const saveHandle = async () => {
-
-        const resp = await save(needSaveData);
+   
+        const resp = await save({
+            computeDate:currentComputeDate,
+            unitCode:currentSelectedTreeNode.code,
+            unitName:currentSelectedTreeNode.name,
+            itemData:needSaveData.secondValueVos
+        });
         if (resp) {
             message.success('操作成功!');
             set_ifEditMode(false);
@@ -756,14 +739,16 @@ const UnitCheckProjectScore: React.FC = () => {
         let keys: string[] = [];
 
         if (ifEditMode && needSaveData) {
-            //获取所有输入框的ref key
-            const { userList } = needSaveData;
-            userList.forEach((a: any) => {
-                a.itemValue.forEach((b: any) => {
-                    keys.push(`${a.account}-${b.code}`)
-                })
-            });
-            set_inputsRefKeys(keys);
+            // //获取所有输入框的ref key
+            // const { secondValueVos } = needSaveData;
+            // secondValueVos.forEach((a: any) => {
+            //     a.value.forEach((b: any) => {
+            //         keys.push(`${a.empNo}-${b.code}`)
+            //     })
+            // });
+            // set_inputsRefKeys(keys);
+
+            console.log({inputsRefKeys});
 
         }
 
@@ -784,11 +769,12 @@ const UnitCheckProjectScore: React.FC = () => {
     }, [ifEditMode]);
 
     useEffect(() => {
-        if (ifEditMode && Object.keys(inputsRef.current).length > 0 && inputsRefKeys.length > 0) {
+        console.log({inputsRefKeys,inputsRef})
+        // if (ifEditMode && Object.keys(inputsRef.current).length > 0 && inputsRefKeys.length > 0) {
 
-            inputsRef.current[`${inputsRefKeys[0]}`].focus();
-            set_currentInputRefKeys(inputsRefKeys[0]);
-        }
+        //     inputsRef.current[`${inputsRefKeys[0]}`].focus();
+        //     set_currentInputRefKeys(inputsRefKeys[0]);
+        // }
     }, [inputsRef, inputsRefKeys])
 
     useEffect(() => {
@@ -902,7 +888,7 @@ const UnitCheckProjectScore: React.FC = () => {
                                         <IconFont style={{ color: '#99A6BF' }} type="iconsousuo" />
                                     }
                                     onChange={(e) => {
-                                        
+
                                     }}
 
                                 />
@@ -922,8 +908,8 @@ const UnitCheckProjectScore: 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>}
-                                                    {importData()}
+                                                    {!ifEditMode && <span className='compute cancel' onClick={commitStatus == '0' && auditType != '1' ? () => getDataByBtn() : () => { }}>获取</span>}
+                                                    {!ifEditMode && importData()}
                                                     {!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>}

+ 63 - 5
src/pages/secondaryDistribute/unitCheckProjectScore/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-08 15:53:48
+ * @LastEditTime: 2023-08-03 15:33:31
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlyInfoCheck/service.ts
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -11,6 +11,7 @@
 
 
 import { request } from '@@/plugin-request';
+import axios from 'axios';
 
 
 
@@ -28,7 +29,7 @@ export type getTreeDataRespType = {
 
 export const getTreeData = (computeDate: string,type:string) => {
 
-    return request<getTreeDataRespType[]>('/performance/second/getSecondUnitList', {
+    return request<getTreeDataRespType[]>('/performance/secondSetting/getSecondDataUnitList', {
         method: 'GET',
         params: { computeDate,type }
     })
@@ -36,7 +37,7 @@ export const getTreeData = (computeDate: string,type:string) => {
 
 
 
-//获取二次分配计算
+//获取人员数据核定
 
 export type GetSecondaryDistriComputeParams = {
     computeDate: string; //核算年月
@@ -47,7 +48,7 @@ export type GetSecondaryDistriComputeParams = {
 
 export const getSecondaryDistriComputeTableData = (params: GetSecondaryDistriComputeParams) => {
 
-    return request('/performance/second/getResult', {
+    return request('/performance/secondSetting/getSecondDataList', {
         method: 'GET',
         params: { ...params }
     })
@@ -57,7 +58,7 @@ export const getSecondaryDistriComputeTableData = (params: GetSecondaryDistriCom
 //保存编辑后结果
 
 export const save = (data:any) => {
-    return request('/performance/second/save', {
+    return request('/performance/secondSetting/saveSecondData', {
         method: 'POST',
         data
     })
@@ -163,4 +164,61 @@ export const checkCurrentRequest = (data:CheckCurrentRequestParamsType) => {
 
 }
 
+//获取数据
+
+export const getData = (computeDate:string,unitCode:string) => {
+ 
+    return request('/performance/secondSetting/getAutoSecondData', {
+        method: 'GET',
+        params:{computeDate,unitCode}
+    })
+
+}
+
+//导出excel模板
+export const downloadTemplateReq = (computeDate:string,unitCode:string) => {
+
+    let path = '/gateway/performance/secondSetting/exportSecondData';
+    const userData = localStorage.getItem('userData');
+    const { token = '' } = JSON.parse(userData as any);
+
+    axios({
+        method: 'get',
+        url: path,
+        responseType: 'blob',
+        headers: { token },
+        params:{computeDate,unitCode}
+    })
+        .then(function (response) {
+            //console.log({ 'chunk': response });
+            const filename = decodeURI(response.headers["content-disposition"]);
+            const objectUrl = URL.createObjectURL(
+                new Blob([response.data], {
+                    type: 'application/vnd.ms-excel',
+                })
+            )
+            const link = document.createElement('a')
+            // 设置导出的文件名称
+            link.download = `${filename}` + '.xls'
+            link.style.display = 'none'
+            link.href = objectUrl
+            link.click()
+            document.body.appendChild(link)
+
+        });
+
+
+
+}
+
+
+//导入数据
+
+export const importExcelData = (data:any) => {
+    return request('/performance/secondSetting/importSecondData', {
+        method: 'POST',
+        data:data
+    })
+}
+
 

+ 78 - 45
src/pages/setting/projectSetting/secondaryProjectDistribute/index.tsx

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2023-03-03 11:30:33
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-07-28 13:35:08
+ * @LastEditTime: 2023-08-03 17:58:30
  * @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
  */
@@ -19,7 +19,7 @@ import { createFromIconfontCN } from '@ant-design/icons';
 import { ActionType, ProForm, ProFormRadio } from '@ant-design/pro-components';
 import { ModalForm, ProFormCascader, ProFormDependency, ProFormDigit, ProFormSelect, ProFormText, ProFormTextArea } from '@ant-design/pro-form'
 import { ProColumns } from '@ant-design/pro-table';
-import { Input, message, Popconfirm,InputNumber,Form } from 'antd';
+import { Input, message, Popconfirm, InputNumber, Form } from 'antd';
 import { useEffect, useRef, useState } from 'react'
 
 import { addData, addLevelSets, delData, editData, gainData, getDefaultIndicator, getSecondaryProjectDistriData } from './service';
@@ -60,6 +60,22 @@ export default function BilingProjectMana() {
             title: '评价方式',
             dataIndex: 'evaluationName',
         },
+        {
+            title: '评级设定',
+            dataIndex: 'level',
+            width: 160,
+            ellipsis: true,
+            renderText(text, record, index, action) {
+                console.log({ record });
+                if (record.level) {
+                    return record.level.reduce((prev: string, cur: any) => {
+                        console.log({ prev, cur });
+                        return `${prev + cur.levelName}`
+                    }, '')
+                }
+                return '-'
+            },
+        },
         {
             title: '数据格式',
             dataIndex: 'dataTypeName',
@@ -71,10 +87,16 @@ export default function BilingProjectMana() {
         {
             title: 'SQL',
             dataIndex: 'sql',
-            width: 400,
+            width: 200,
             ellipsis: true
 
         },
+        {
+            title: '说明',
+            dataIndex: 'description',
+            width: 200,
+            ellipsis: true
+        },
         {
             title: '操作',
             key: 'option',
@@ -91,7 +113,7 @@ export default function BilingProjectMana() {
                     >
                         <a>删除</a>
                     </Popconfirm>
-                ]:[
+                ] : [
                     <UpDataActBtn key={'act'} record={record} type='EDIT' />,
                     <Popconfirm
                         title="是否确认删除?"
@@ -132,22 +154,24 @@ export default function BilingProjectMana() {
 
     const updateTable = async (formVal: any, type: 'EDIT' | "ADD" | 'SCORE') => {
 
-        console.log({formVal});
+        console.log({ formVal });
 
-        const result = formVal.evaluation == 1? {
+        const result = formVal.evaluation == 1 ? {
             name: formVal.name,
             evaluation: formVal.evaluation,
             dataType: formVal.dataType,
             source: formVal.source,
             sql: formVal.sql,
-            ceiling:formVal.ceiling,
-            floor:formVal.floor
-        }:{
+            ceiling: formVal.ceiling,
+            floor: formVal.floor,
+            description: formVal.description
+        } : {
             name: formVal.name,
             evaluation: formVal.evaluation,
             dataType: formVal.dataType,
             source: formVal.source,
-            sql: formVal.sql
+            sql: formVal.sql,
+            description: formVal.description
         }
 
         if (type == 'ADD') {
@@ -166,9 +190,9 @@ export default function BilingProjectMana() {
         }
 
         if (type == 'SCORE') {
-            const needData = formVal.secondItem.map((a:any)=>({levelName:a.levelName,levelRate:a.levelRate}))
+            const needData = formVal.secondItem.map((a: any) => ({ levelName: a.levelName, levelRate: a.levelRate }))
 
-            const resp = await addLevelSets(formVal.secondItemCode,needData);
+            const resp = await addLevelSets(formVal.secondItemCode, needData);
             if (resp) {
                 tableRef.current?.reload();
                 message.success('操作成功!');
@@ -220,7 +244,7 @@ export default function BilingProjectMana() {
 
         const getDefaultIndicatorHandle = async () => {
             const resp = await getDefaultIndicator(record.code);
-            if(resp){
+            if (resp) {
                 if (resp.length > 0) {
                     let defaultFormData: { [key: string]: any } = {};
                     const defaultVal = resp.map((a: any) => {
@@ -230,7 +254,7 @@ export default function BilingProjectMana() {
                     });
 
                     set_scoreInitList({ ...defaultFormData });
-            
+
                     set_scoreList([...defaultVal]);
                 } else {
                     set_scoreList([{}]);
@@ -238,33 +262,33 @@ export default function BilingProjectMana() {
             }
         }
 
-        
+
         useEffect(() => {
-        
+
             if (type == 'SCORE') {
                 getDefaultIndicatorHandle();
-                
+
             }
-        },[record]);
+        }, [record]);
 
         return (
             <ModalForm
                 className='SecondaryProjectDistriSet-ModalForm'
-                title={`${type == 'EDIT' ? '编辑' : '新增'}${type == 'SCORE'?'级别':'二次分配项目'}`}
+                title={`${type == 'EDIT' ? '编辑' : '新增'}${type == 'SCORE' ? '级别' : '二次分配项目'}`}
                 width={352}
-                initialValues={type == 'EDIT' ? { ...record } : type == 'SCORE'?{...scoreInitList}:{}}
+                initialValues={type == 'EDIT' ? { ...record } : type == 'SCORE' ? { ...scoreInitList } : {}}
                 trigger={
-                    type == 'EDIT' ? <a key="edit" >编辑</a> :type != 'SCORE'?<span className='add'>新增</span>:<a className='score'>评级设定</a>
+                    type == 'EDIT' ? <a key="edit" >编辑</a> : type != 'SCORE' ? <span className='add'>新增</span> : <a className='score'>评级设定</a>
                 }
                 onFinish={(val) => {
-                    return updateTable(type == 'EDIT' ? { ...record, ...val, sql: val.source == 2 ? val.sql : '-' } :type == 'SCORE'?{secondItem:scoreList,secondItemCode:record.code}:{ ...val }, type);
+                    return updateTable(type == 'EDIT' ? { ...record, ...val, sql: val.source == 2 ? val.sql : '-' } : type == 'SCORE' ? { secondItem: scoreList, secondItemCode: record.code } : { ...val }, type);
                 }}
                 modalProps={{ destroyOnClose: true }}
-                // colProps={{ span: 24 }}
-                // grid
+            // colProps={{ span: 24 }}
+            // grid
             >
 
-{
+                {
                     type == 'SCORE' && (
                         <div>
                             {
@@ -273,24 +297,24 @@ export default function BilingProjectMana() {
                                     return (
                                         <div className='item' key={index}>
                                             <ProFormText label='等级名称:'
-                                            name={`levelName${item.id}`}
-                                            fieldProps={{
-                                                
-                                                //   labelInValue:true,
-                                                onChange:(e)=>{
-                            
-                                                    const temp = [...scoreList];
-                                                    const newArr = temp.map((a: any) => {
-                                                        if (a.id == item.id) {
-                                                            return { ...a, levelName: e.target.value, }
-                                                        }
-                                                        return a
-                                                    });
-
-                                                    set_scoreList([...newArr]);
-                                                },
-                                            }}
-                                            width={160} />
+                                                name={`levelName${item.id}`}
+                                                fieldProps={{
+
+                                                    //   labelInValue:true,
+                                                    onChange: (e) => {
+
+                                                        const temp = [...scoreList];
+                                                        const newArr = temp.map((a: any) => {
+                                                            if (a.id == item.id) {
+                                                                return { ...a, levelName: e.target.value, }
+                                                            }
+                                                            return a
+                                                        });
+
+                                                        set_scoreList([...newArr]);
+                                                    },
+                                                }}
+                                                width={160} />
                                             <Form.Item name={`levelRate${item.id}`} label='系数:'>
                                                 <InputNumber
                                                     style={{ width: 120, height: 24, position: 'relative', top: 0 }}
@@ -308,7 +332,7 @@ export default function BilingProjectMana() {
                                                     }}
                                                 />
                                             </Form.Item>
-                                            <span className='delIcon' onClick={() => delGroupIndic(item, index)}><IconFont   type="iconshanchu" /></span>
+                                            <span className='delIcon' onClick={() => delGroupIndic(item, index)}><IconFont type="iconshanchu" /></span>
                                         </div>
                                     )
                                 })
@@ -392,6 +416,10 @@ export default function BilingProjectMana() {
                                     {
                                         label: '自动获取',
                                         value: 2,
+                                    },
+                                    {
+                                        label: '工作量',
+                                        value: 3,
                                     }
                                 ]}
                                 rules={[{ required: true, message: '数据来源不能为空!' }]}
@@ -408,6 +436,11 @@ export default function BilingProjectMana() {
                                     )
                                 }
                             </ProFormDependency>
+                            <ProFormTextArea
+                                name="description"
+                                label="说明:"
+                                placeholder="请输入"
+                            />
                         </>
                     )
                 }
@@ -476,7 +509,7 @@ export default function BilingProjectMana() {
                 </div>
             </div>
             <div style={{ marginTop: 16 }}>
-                <BMSTable columns={columns as ProColumns[]} actionRef={tableRef} rowKey='id' params={tableDataFilterParams} request={(params) => getTableData(params)} />
+                <BMSTable columns={columns as ProColumns[]} actionRef={tableRef} scroll={{x:500}} rowKey='id' params={tableDataFilterParams} request={(params) => getTableData(params)} />
             </div>
         </BMSPagecontainer>
     )