|
@@ -4,7 +4,7 @@
|
|
|
* @Author: code4eat awesomedema@gmail.com
|
|
|
* @Date: 2022-12-16 09:42:52
|
|
|
* @LastEditors: code4eat awesomedema@gmail.com
|
|
|
- * @LastEditTime: 2023-06-27 15:35:49
|
|
|
+ * @LastEditTime: 2023-06-30 19:40:58
|
|
|
* @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlySet/index.tsx
|
|
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
|
*/
|
|
@@ -16,7 +16,7 @@ import BMSPagecontainer from '@/components/BMSPageContainer';
|
|
|
import { useEffect, useRef, useState } from 'react';
|
|
|
import './style.less';
|
|
|
|
|
|
-import { Tree, TreeProps, Tabs, Input, Modal, Transfer, Divider, Select, Popconfirm, message, Button, Skeleton, Popover, Tooltip } from 'antd';
|
|
|
+import { Tree, TreeProps, Tabs, Input, Modal, Transfer, Divider, Select, Popconfirm, message, Button, Skeleton, Popover, Tooltip, InputNumber } from 'antd';
|
|
|
import { DataNode } from 'antd/es/tree';
|
|
|
|
|
|
import expandedIcon from '../../../../static/treenode_open.png';
|
|
@@ -24,7 +24,7 @@ import closeIcon from '../../../../static/treenode_collapse.png';
|
|
|
import { BMSTable } from '@/components/BMSTable';
|
|
|
import { ActionType, ModalForm, ProColumns, ProColumnType, ProForm, ProFormDependency, ProFormDigit, ProFormInstance, ProFormSelect, ProFormText, ProFormTextArea } from '@ant-design/pro-components';
|
|
|
import { createFromIconfontCN } from '@ant-design/icons';
|
|
|
-import { addTableData, checkMonthlyReq, delTableDataRequest, downloadTemplateReq, editCheckProject, editManaIndexTableData, editTableData, editTableSalaryRequest, generateCheckProjectTableData, getCheckItemCalcStatus, getCheckProjectTableData, getCostData, getDepLists, getEmps, getHesuanUnits, getIncomeData, getManaIndexGroup, getManaIndexTableData, getManaIndicatorJiangchengCoefficient, getNoCheckTableData, getPageCheckStatus, getProjects, getSalaryInfoTableData, importMonthlyperformanceRelaFiles } from './service';
|
|
|
+import { addTableData, checkMonthlyReq, delTableDataRequest, downloadTemplateReq, editCheckProject, editManaIndexTableData, editTableData, editTableSalaryRequest, editUnitCostTableData, generateCheckProjectTableData, generateUnitCostTableData, getCheckItemCalcStatus, getCheckProjectTableData, getCostData, getDepLists, getEmps, getHesuanUnits, getIncomeData, getManaIndexGroup, getManaIndexTableData, getManaIndicatorJiangchengCoefficient, getNoCheckTableData, getPageCheckStatus, getProjects, getSalaryInfoTableData, getUnitCostTableData, importMonthlyperformanceRelaFiles } from './service';
|
|
|
|
|
|
|
|
|
import editIcon from '../../../../static/editIcon.png';
|
|
@@ -40,6 +40,7 @@ import { getDeepestTreeData } from '@/utils/tooljs';
|
|
|
|
|
|
|
|
|
import '../../../utils/zhongtaiA'
|
|
|
+import { formatMoneyNumber } from '@/utils/format';
|
|
|
|
|
|
const IconFont = createFromIconfontCN({
|
|
|
scriptUrl: '',
|
|
@@ -82,7 +83,7 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
|
|
|
const [currentEditRecord, set_currentEditRecord] = useState<undefined | any>(undefined);
|
|
|
|
|
|
- const [inputSalaryNum, set_inputSalaryNum] = useState(0); //固定工资金额
|
|
|
+ const [inputSalaryNum, set_inputSalaryNum] = useState<undefined|number>(undefined); //固定工资金额
|
|
|
|
|
|
const [checkItemvalNum, set_checkItemvalNum] = useState(0); //考核项目数值
|
|
|
|
|
@@ -94,16 +95,18 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
|
|
|
const [computeMethod, set_computeMethod] = useState('1'); //1按考核分级 2按总分
|
|
|
|
|
|
+ const [unitCostComputeData,set_unitCostComputeData] = useState({unitCostTotal:0,unitCostCtrlTotal:0})
|
|
|
+
|
|
|
const [manaIndexGroups, set_manaIndexGroups] = useState<{
|
|
|
- depiction: any; id: number, groupCode: string, groupName: string, hospId: number
|
|
|
-}[]>([]); //管理指标分组
|
|
|
+ depiction: any; id: number, groupCode: string, groupName: string, hospId: number
|
|
|
+ }[]>([]); //管理指标分组
|
|
|
const [currentSelectedManaGroup, set_currentSelectedManaGroup] = useState<{ id: number, groupCode: string, groupName: string, hospId: number }>();
|
|
|
|
|
|
const formRef = useRef<ProFormInstance>();
|
|
|
|
|
|
const tableRef = useRef<ActionType>();
|
|
|
|
|
|
- const tableColumnOne:ProColumns[] = [
|
|
|
+ const tableColumnOne: ProColumns[] = [
|
|
|
{
|
|
|
title: '职类',
|
|
|
dataIndex: 'unitTypeName',
|
|
@@ -272,6 +275,56 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
// align: 'center'
|
|
|
// },
|
|
|
]
|
|
|
+ const tableColumnSeven = [
|
|
|
+ {
|
|
|
+ title: '项目名称',
|
|
|
+ dataIndex: 'name',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '项目类型',
|
|
|
+ dataIndex: 'costType',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '金额',
|
|
|
+ dataIndex: 'amount',
|
|
|
+ width: 200,
|
|
|
+ render: (text: any, record: any) => {
|
|
|
+
|
|
|
+ return (
|
|
|
+ <div style={{ display: 'flex', flexDirection: 'row', width: '100%', justifyContent: 'flex-start', alignItems: 'center' }}>
|
|
|
+
|
|
|
+ <div style={{ width: '80px', height: 16, display: 'flex', flexDirection: 'row', justifyContent: 'flex-start', alignItems: 'center' }}>
|
|
|
+ {
|
|
|
+ (currentEditRecord ? currentEditRecord.id : -1) == record.id ? <InputNumber size='small' defaultValue={record.amount} placeholder='请输入' onChange={(value) => { console.log({value}); set_currentEditRecord({...currentEditRecord,amount:value})}} style={{ width: '80px' }} /> : <span>{formatMoneyNumber(text)}</span>
|
|
|
+ }
|
|
|
+ </div>
|
|
|
+ {(auditType == '0'&&record.summaryFlag == 0) && <img onClick={() => editHandle(record, '7')} style={{ width: 16, height: 16, cursor: 'pointer', marginLeft: 8 }} src={(currentEditRecord ? currentEditRecord.id : -1) == record.id ? conformIcon : editIcon} alt="" />}
|
|
|
+ </div>
|
|
|
+ )
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '汇总',
|
|
|
+ dataIndex: 'summaryFlag',
|
|
|
+ render: (num: any, record: any) => {
|
|
|
+ return record.summaryFlag == 0 ?'否':'是'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '统计',
|
|
|
+ dataIndex: 'statFlag',
|
|
|
+ render: (num: any, record: any) => {
|
|
|
+ return num == 0 ?'否':'是'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '可控',
|
|
|
+ dataIndex: 'ctrlFlag',
|
|
|
+ render: (num: any, record: any) => {
|
|
|
+ return num == 0 ?'否':'是'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
|
|
|
let inervalhander = undefined;
|
|
|
|
|
@@ -283,9 +336,9 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
const onSelectHandle: TreeProps['onSelect'] = (selectedKeys, info) => {
|
|
|
|
|
|
const { node } = info;
|
|
|
- //set_tableDataFilterParams({...tableDataFilterParams,current:1})
|
|
|
- set_currentSelectedTreeNode(node);
|
|
|
-
|
|
|
+ if(!node.children){
|
|
|
+ set_currentSelectedTreeNode(node);
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
|
|
@@ -296,20 +349,33 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
|
|
|
|
|
|
//固定金额编辑金额
|
|
|
- const editHandle = async (record: any) => {
|
|
|
+ const editHandle = async (record: any, curTabKey: string) => {
|
|
|
const { id, deptCode, salaryType, unitCode, userId } = record;
|
|
|
if (id == editTableCellId) {
|
|
|
//保存
|
|
|
- // console.log({ inputSalaryNum,currentSelectedTreeNode });
|
|
|
+ //console.log({currentEditRecord,curTabKey });
|
|
|
+
|
|
|
+ if (inputSalaryNum != undefined) {
|
|
|
|
|
|
- if (inputSalaryNum) {
|
|
|
+ if (curTabKey == '1') {
|
|
|
+ const resp = await editTableSalaryRequest({
|
|
|
+ computeDate: currentComputeDate as string,
|
|
|
+ unitCode,
|
|
|
+ deptCode, salaryType,
|
|
|
+ salary: inputSalaryNum,
|
|
|
+ userId: `${userId}`,
|
|
|
+ id
|
|
|
|
|
|
- const resp = await editTableSalaryRequest({
|
|
|
- computeDate: currentComputeDate as string,
|
|
|
- unitCode,
|
|
|
- deptCode, salaryType,
|
|
|
- salary: inputSalaryNum,
|
|
|
- userId: `${userId}`,
|
|
|
+ });
|
|
|
+ if (resp) {
|
|
|
+ tableRef.current?.reload();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (curTabKey == '7') {
|
|
|
+ const resp = await editUnitCostTableData({
|
|
|
+ amount: currentEditRecord.amount,
|
|
|
id
|
|
|
|
|
|
});
|
|
@@ -319,9 +385,11 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
}
|
|
|
|
|
|
set_editTableCellId(undefined);
|
|
|
+ set_currentEditRecord(undefined);
|
|
|
} else {
|
|
|
//编辑
|
|
|
set_editTableCellId(id);
|
|
|
+ set_currentEditRecord(record);
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -465,7 +533,7 @@ 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) => {
|
|
|
+ const getTableData = async (type: '1' | '2' | '3' | '4' | '5' | '6' | '7', params: any, sort: any, filter: any) => {
|
|
|
|
|
|
if (currentComputeDate) {
|
|
|
if (type == '1') {
|
|
@@ -585,7 +653,7 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
key: 'level',
|
|
|
width: 100,
|
|
|
fixed: 'right',
|
|
|
- hideInTable:computeMethod == '2'?true:false
|
|
|
+ hideInTable: computeMethod == '2' ? true : false
|
|
|
},
|
|
|
{
|
|
|
title: '系数',
|
|
@@ -659,6 +727,52 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if (type == '7'&¤tSelectedTreeNode) {
|
|
|
+ const resp = await getUnitCostTableData({
|
|
|
+ unitCode: currentSelectedTreeNode.code,
|
|
|
+ ...params
|
|
|
+ });
|
|
|
+
|
|
|
+ let unitCostTotal = 0;
|
|
|
+ let unitCostCtrlTotal = 0;
|
|
|
+
|
|
|
+ const traverseTree = (node:any) => {
|
|
|
+ if(node == null) return;
|
|
|
+
|
|
|
+ if(!node.summaryFlag){
|
|
|
+ //summaryFlag 汇总
|
|
|
+ unitCostTotal = unitCostTotal + node.amount
|
|
|
+ if(node.ctrlFlag){
|
|
|
+ unitCostCtrlTotal = unitCostCtrlTotal + node.amount
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(node.children) {
|
|
|
+ node.children.forEach(traverseTree);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ resp.forEach((a:any) => {
|
|
|
+ traverseTree(a);
|
|
|
+ });
|
|
|
+
|
|
|
+ set_unitCostComputeData({
|
|
|
+ unitCostTotal,unitCostCtrlTotal
|
|
|
+ })
|
|
|
+
|
|
|
+ if (resp) {
|
|
|
+
|
|
|
+ return {
|
|
|
+ data: resp,
|
|
|
+ success: true,
|
|
|
+ total:0,
|
|
|
+ pageSize:10,
|
|
|
+ totalPage:0,
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
return []
|
|
@@ -756,6 +870,20 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
return Promise.resolve(true);
|
|
|
|
|
|
}
|
|
|
+ if (index == 7) {
|
|
|
+ const resp = await generateUnitCostTableData(
|
|
|
+ currentComputeDate as string,
|
|
|
+ currentSelectedTreeNode.code
|
|
|
+ );
|
|
|
+
|
|
|
+ set_loading(false);
|
|
|
+
|
|
|
+ if (resp) {
|
|
|
+ tableRef.current?.reload();
|
|
|
+ }
|
|
|
+ return Promise.resolve(true);
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
const generateFunc = (index: number, others?: any) => {
|
|
@@ -763,17 +891,16 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
* index 获取的表格类型下标
|
|
|
*/
|
|
|
|
|
|
- if (index == 3 && !loading) {
|
|
|
+ if ((index == 3||index == 7) && !loading) {
|
|
|
Modal.confirm({
|
|
|
title: '注意',
|
|
|
cancelText: '',
|
|
|
okText: '确定',
|
|
|
closable: true,
|
|
|
- content: others ? '获取单个操作会覆盖上次获取的该核算单元的数据,确定要继续操作?' : '获取所有操作会覆盖所有已获取的数据,确定要继续操作?',
|
|
|
+ content: others ? '获取单个操作会覆盖上次获取的该核算单元的数据,确定要继续操作?' : `${index == 7?'获取':'获取所有'}操作会覆盖所有已获取的数据,确定要继续操作?`,
|
|
|
onOk: () => { set_loading(true); confirmGenerateHandle(index, others) }
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
const onVisibleChangeHandle = (bool: boolean) => {
|
|
@@ -935,9 +1062,16 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
const { importFile: { fileList } } = values;
|
|
|
|
|
|
let formData = new FormData();
|
|
|
- formData.append('file', fileList[0].originFileObj);
|
|
|
- formData.append('computeDate', currentComputeDate as string);
|
|
|
- formData.append('groupId', currentSelectedManaGroup?.id as any);
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
const resp = await importMonthlyperformanceRelaFiles(index, formData);
|
|
|
|
|
@@ -949,7 +1083,7 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
}}
|
|
|
>
|
|
|
<FormItem name={'importFile'}>
|
|
|
- <BMSUpload downloadTemplateFile={auditType == '0' ? () => index == 4 ? downloadTemplate(index, currentSelectedManaGroup?.id) : downloadTemplate(index) : () => { }} />
|
|
|
+ <BMSUpload downloadTemplateFile={auditType == '0' ? () => index == 4 || index == 7 ? downloadTemplate(index, index == 7 ? currentSelectedTreeNode.code : currentSelectedManaGroup?.id) : downloadTemplate(index) : () => { }} />
|
|
|
</FormItem>
|
|
|
|
|
|
</ModalForm>
|
|
@@ -998,10 +1132,10 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
|
|
|
const getComputeMethod = async () => {
|
|
|
const resp = await getManaIndicatorJiangchengCoefficient();
|
|
|
- if(resp){
|
|
|
- const need = resp.list.filter((a:any)=>(a.code == '1670618922728169472'));
|
|
|
- if(need.length>0){
|
|
|
- set_computeMethod(need[0].value);
|
|
|
+ if (resp) {
|
|
|
+ const need = resp.list.filter((a: any) => (a.code == '1670618922728169472'));
|
|
|
+ if (need.length > 0) {
|
|
|
+ set_computeMethod(need[0].value);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1032,7 +1166,7 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
- console.log({ currentSelectedManaGroup });
|
|
|
+
|
|
|
set_tableDataFilterParams({
|
|
|
...tableDataFilterParams,
|
|
|
id: currentSelectedManaGroup?.id,
|
|
@@ -1069,9 +1203,25 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
if (currentSelectedTabKey == '6') {
|
|
|
set_tableColumn(tableColumnFive as ProColumns[]);
|
|
|
}
|
|
|
+ if (currentSelectedTabKey == '7') {
|
|
|
+ if (currentComputeDate) {
|
|
|
+ getCheckUnitTreeDataFunc(currentComputeDate as string);
|
|
|
+ }
|
|
|
+ set_tableColumn(tableColumnSeven as ProColumns[]);
|
|
|
+ }
|
|
|
|
|
|
}, [currentSelectedTabKey]);
|
|
|
|
|
|
+ useEffect(()=>{
|
|
|
+ if (currentSelectedTabKey == '7') {
|
|
|
+ if (currentComputeDate) {
|
|
|
+ getCheckUnitTreeDataFunc(currentComputeDate as string);
|
|
|
+ }
|
|
|
+ set_tableColumn(tableColumnSeven as ProColumns[]);
|
|
|
+ }
|
|
|
+
|
|
|
+ },[currentEditRecord,auditType])
|
|
|
+
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
@@ -1308,6 +1458,10 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
label: `固定工资`,
|
|
|
key: '1',
|
|
|
},
|
|
|
+ {
|
|
|
+ label: `单元成本数据`,
|
|
|
+ key: '7',
|
|
|
+ },
|
|
|
{
|
|
|
label: `非考核项目`,
|
|
|
key: '2',
|
|
@@ -1378,7 +1532,7 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
editTableCellId == record.id ? <Input size='small' defaultValue={record.salary} placeholder='请输入' onChange={(e) => { set_inputSalaryNum(Number(e.target.value)) }} style={{ width: '80px' }} /> : <span>{text}</span>
|
|
|
}
|
|
|
</div>
|
|
|
- {auditType == '0' && <img onClick={() => editHandle(record)} style={{ width: 16, height: 16, cursor: 'pointer', marginLeft: 8 }} src={editTableCellId == record.id ? conformIcon : editIcon} alt="" />}
|
|
|
+ {auditType == '0' && <img onClick={() => editHandle(record, '1')} style={{ width: 16, height: 16, cursor: 'pointer', marginLeft: 8 }} src={editTableCellId == record.id ? conformIcon : editIcon} alt="" />}
|
|
|
</div>
|
|
|
)
|
|
|
}
|
|
@@ -1419,7 +1573,7 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
editTableCellId == record.id ? <Input size='small' defaultValue={record.salary} placeholder='请输入' onChange={(e) => { set_inputSalaryNum(Number(e.target.value)) }} style={{ width: '80px' }} /> : <span>{text}</span>
|
|
|
}
|
|
|
</div>
|
|
|
- {auditType == '0' && <img onClick={() => editHandle(record)} style={{ width: 16, height: 16, cursor: 'pointer', marginLeft: 8 }} src={editTableCellId == record.id ? conformIcon : editIcon} alt="" />}
|
|
|
+ {auditType == '0' && <img onClick={() => editHandle(record, '1')} style={{ width: 16, height: 16, cursor: 'pointer', marginLeft: 8 }} src={editTableCellId == record.id ? conformIcon : editIcon} alt="" />}
|
|
|
</div>
|
|
|
)
|
|
|
}
|
|
@@ -1653,7 +1807,7 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
{
|
|
|
manaIndexGroups.map((item, index) => {
|
|
|
return (
|
|
|
- <Tooltip placement="top" title={item.depiction?item.depiction:item.groupName}>
|
|
|
+ <Tooltip placement="top" title={item.depiction ? item.depiction : item.groupName}>
|
|
|
<div key={index} className={currentSelectedManaGroup?.id == item.id ? 'tab on' : 'tab'} onClick={() => onManaIndexGroupClick(item)}>{item.groupName}</div>
|
|
|
</Tooltip>
|
|
|
)
|
|
@@ -1768,6 +1922,125 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
</div>
|
|
|
)
|
|
|
}
|
|
|
+ {
|
|
|
+ currentSelectedTabKey == '7' && (
|
|
|
+ <div className='tabContent'>
|
|
|
+
|
|
|
+ <div className='tabContentInner'>
|
|
|
+ <div className='leftTree'>
|
|
|
+ <div className='search'>
|
|
|
+ <Input className='searchInput' allowClear onChange={onTreeSearchKeyChange} placeholder="请输入名称" suffix={
|
|
|
+ <IconFont type="iconsousuo" />
|
|
|
+ } />
|
|
|
+ </div>
|
|
|
+ <div className='treeWrap'>
|
|
|
+ {
|
|
|
+ treeData && treeData.length > 0 && currentSelectedTreeNode && (
|
|
|
+ <DirectoryTree
|
|
|
+ fieldNames={{ title: 'name', key: 'code', children: 'child' }}
|
|
|
+ rootStyle={{ height: '100%', paddingBottom: 50, overflowY: 'scroll', overflowX: 'hidden' }}
|
|
|
+ onSelect={onSelectHandle}
|
|
|
+ onExpand={onExpand}
|
|
|
+ expandedKeys={expandedKeys}
|
|
|
+ autoExpandParent={autoExpandParent}
|
|
|
+ selectedKeys={[currentSelectedTreeNode.code]}
|
|
|
+ blockNode={true}
|
|
|
+ icon={() => null}
|
|
|
+ titleRender={
|
|
|
+ (nodeData: any) => {
|
|
|
+ const strTitle = nodeData.name as string;
|
|
|
+ const index = strTitle.indexOf(searchValue);
|
|
|
+ const beforeStr = strTitle.substring(0, index);
|
|
|
+ const afterStr = strTitle.slice(index + searchValue.length);
|
|
|
+ const title =
|
|
|
+ index > -1 ? (
|
|
|
+ <span>
|
|
|
+ {beforeStr}
|
|
|
+ <span className="site-tree-search-value" style={{ color: 'red', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{searchValue}</span>
|
|
|
+ {afterStr}
|
|
|
+ </span>
|
|
|
+ ) : (
|
|
|
+ <span className='strTitle'>{strTitle}</span>
|
|
|
+ );
|
|
|
+ return <div style={{
|
|
|
+ display: 'flex', flexDirection: 'row',
|
|
|
+ width: '100%',
|
|
|
+ justifyContent: 'flex-start', alignItems: 'center', height: 32,
|
|
|
+ borderRadius: '4px',
|
|
|
+ overflow: 'hidden',
|
|
|
+ color: '#17181A',
|
|
|
+ textOverflow: 'ellipsis',
|
|
|
+ whiteSpace: 'nowrap'
|
|
|
+
|
|
|
+ }}>{title}</div>
|
|
|
+ }
|
|
|
+ }
|
|
|
+ defaultSelectedKeys={[treeData[0].child[0].code]}
|
|
|
+ treeData={treeData as unknown as DataNode[]}
|
|
|
+ // treeData={treeDataNew}
|
|
|
+ switcherIcon={(props: any) => {
|
|
|
+ const { expanded } = props;
|
|
|
+ return !expanded ? <img style={{ width: 20, height: 20, position: 'relative', top: 5 }} src={expandedIcon} /> : <img style={{ width: 20, height: 20, position: 'relative', top: 5 }} src={closeIcon} />
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ )
|
|
|
+ }
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div className='rightTable'>
|
|
|
+ <div className='tableToolbar'>
|
|
|
+ <div className='filter'>
|
|
|
+ {/* <div className='search' style={{ marginRight: 24 }}>
|
|
|
+ <span>类型:</span><Input className='searchInput' allowClear placeholder="请输入" onChange={(e) => {
|
|
|
+ set_tableDataSearchKeywords(e.target.value);
|
|
|
+ if (e.target.value.length == 0) {
|
|
|
+ set_tableDataFilterParams({
|
|
|
+ ...tableDataFilterParams,
|
|
|
+ itemType: ''
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }} suffix={
|
|
|
+ <IconFont type="iconsousuo" onClick={() => tableDataSearchHandle('itemType')} />
|
|
|
+ } />
|
|
|
+ </div> */}
|
|
|
+ <div className='search'>
|
|
|
+ <span>项目名称:</span><Input className='searchInput' allowClear placeholder="请输入" onChange={(e) => {
|
|
|
+ set_tableDataSearchKeywords(e.target.value);
|
|
|
+ if (e.target.value.length == 0) {
|
|
|
+ set_tableDataFilterParams({
|
|
|
+ ...tableDataFilterParams,
|
|
|
+ itemName: ''
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }} suffix={
|
|
|
+ <IconFont type="iconsousuo" onClick={() => tableDataSearchHandle('itemName')} />
|
|
|
+ } />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <>
|
|
|
+ {/* <span className='compelted'>已分配总额: <i>{pageData.completedTotal}</i></span>
|
|
|
+ <span className='left'>剩余分配总额: <i>{pageData.leftTotal}</i></span> */}
|
|
|
+ <div className='count'><span className='compelted' style={{display:'inline-block',marginRight:20}}>总成本:<i>{unitCostComputeData.unitCostTotal}</i></span><span className='left'>可控成本:<i>{unitCostComputeData.unitCostCtrlTotal}</i></span></div>
|
|
|
+ <Popover open={ifShowTip} content={'当前处于审核中,无法操作!'} >
|
|
|
+ <div className={auditType == '1' || loading ? 'btnGroup disabled' : 'btnGroup'}
|
|
|
+ onMouseEnter={() => auditType == '0' ? set_ifShowTip(false) : set_ifShowTip(true)}
|
|
|
+ onMouseLeave={() => set_ifShowTip(false)}
|
|
|
+ >
|
|
|
+ <span key="1" onClick={auditType == '0' ? () => generateFunc(7,false) : () => { }}>获取</span>
|
|
|
+ <>{importData(7, '成本')}</>
|
|
|
+ </div>
|
|
|
+ </Popover>
|
|
|
+ </>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ {currentComputeDate && <BMSTable actionRef={tableRef} loading={{ spinning: loading, tip: '正在获取数据...' }} rowKey='id' params={tableDataFilterParams} columns={[...tableColumn]} pagination={false} request={(params, sort, filter) => getTableData('7', params, sort, filter)} />}
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ )
|
|
|
+ }
|
|
|
|
|
|
|
|
|
</BMSPagecontainer>
|