index.tsx 102 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057
  1. /*
  2. * @Author: code4eat awesomedema@gmail.com
  3. * @Date: 2022-12-16 09:42:52
  4. * @LastEditors: code4eat awesomedema@gmail.com
  5. * @LastEditTime: 2023-07-06 15:32:34
  6. * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlySet/index.tsx
  7. * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  8. */
  9. import BMSPagecontainer from '@/components/BMSPageContainer';
  10. import { useEffect, useRef, useState } from 'react';
  11. import './style.less';
  12. import { Tree, TreeProps, Tabs, Input, Modal, Transfer, Divider, Select, Popconfirm, message, Button, Skeleton, Popover, Tooltip, InputNumber } from 'antd';
  13. import { DataNode } from 'antd/es/tree';
  14. import expandedIcon from '../../../../static/treenode_open.png';
  15. import closeIcon from '../../../../static/treenode_collapse.png';
  16. import { BMSTable } from '@/components/BMSTable';
  17. import { ActionType, ModalForm, ProColumns, ProColumnType, ProForm, ProFormDependency, ProFormDigit, ProFormInstance, ProFormSelect, ProFormText, ProFormTextArea } from '@ant-design/pro-components';
  18. import { createFromIconfontCN } from '@ant-design/icons';
  19. 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';
  20. import editIcon from '../../../../static/editIcon.png';
  21. import conformIcon from '../../../../static/confirmIcon.png';
  22. import { getComputeDate } from '@/pages/Home/service';
  23. import BMSModalForm from '@/components/BMSModalForm';
  24. import { DefaultOptionType } from 'antd/es/select';
  25. import { getTreeData, getTreeDataRespType } from '../monthlyInfoCheck/service';
  26. import DirectoryTree from 'antd/es/tree/DirectoryTree';
  27. import BMSUpload from '@/components/BMSUpload';
  28. import FormItem from 'antd/es/form/FormItem';
  29. import { getDeepestTreeData } from '@/utils/tooljs';
  30. import '../../../utils/zhongtaiA'
  31. import { formatMoneyNumber } from '@/utils/format';
  32. const IconFont = createFromIconfontCN({
  33. scriptUrl: '',
  34. });
  35. export type TableListItem = {
  36. key: number;
  37. name: string;
  38. };
  39. const MonthlyDataCheck: React.FC = () => {
  40. const [treeData, set_treeData] = useState<getTreeDataRespType[]>([]);
  41. const [ifShowTip, set_ifShowTip] = useState(false);
  42. const [expandedKeys, setExpandedKeys] = useState<React.Key[]>([]);
  43. const [searchValue, setSearchValue] = useState('');
  44. const [autoExpandParent, setAutoExpandParent] = useState(true);
  45. const [auditType, set_auditType] = useState('0');
  46. const [tableColumn, set_tableColumn] = useState<ProColumns & { [key: string]: any }[]>([]);
  47. const [currentSelectedTreeNode, set_currentSelectedTreeNode] = useState<any | undefined>();
  48. const [currentSelectedTabKey, set_currentSelectedTabKey] = useState<string>('1');
  49. const [currentComputeDate, set_currentComputeDate] = useState<string | undefined>(undefined);
  50. const [editTableCellId, set_editTableCellId] = useState<number | undefined>(undefined);
  51. const [tableDataSearchKeywords, set_tableDataSearchKeywords] = useState<string>('');
  52. const [tableDataFilterParams, set_tableDataFilterParams] = useState<any | undefined>(undefined);
  53. const [editModalVisible, set_editModalVisible] = useState(false);
  54. const [loading, set_loading] = useState(false);
  55. const [currentEditRecord, set_currentEditRecord] = useState<undefined | any>(undefined);
  56. const [inputSalaryNum, set_inputSalaryNum] = useState<undefined|number>(undefined); //固定工资金额
  57. const [checkItemvalNum, set_checkItemvalNum] = useState(0); //考核项目数值
  58. const [isTableEdit, set_isTableEdit] = useState(false);
  59. const [totalNum, set_totalNum] = useState(0); //收入和成本数据的总和数值
  60. const [tableH, set_tableH] = useState(0);
  61. const [computeMethod, set_computeMethod] = useState('1'); //1按考核分级 2按总分
  62. const [unitCostComputeData,set_unitCostComputeData] = useState({unitCostTotal:0,unitCostCtrlTotal:0})
  63. const [manaIndexGroups, set_manaIndexGroups] = useState<{
  64. depiction: any; id: number, groupCode: string, groupName: string, hospId: number
  65. }[]>([]); //管理指标分组
  66. const [currentSelectedManaGroup, set_currentSelectedManaGroup] = useState<{ id: number, groupCode: string, groupName: string, hospId: number }>();
  67. const formRef = useRef<ProFormInstance>();
  68. const tableRef = useRef<ActionType>();
  69. const tableColumnOne: ProColumns[] = [
  70. {
  71. title: '职类',
  72. dataIndex: 'unitTypeName',
  73. key: 'unitTypeName',
  74. },
  75. {
  76. title: '核算单元名称',
  77. dataIndex: 'unitName',
  78. key: 'unitName',
  79. },
  80. {
  81. title: '科室',
  82. dataIndex: 'deptName',
  83. key: 'deptName',
  84. },
  85. {
  86. title: '工号',
  87. dataIndex: 'empNo',
  88. key: 'empNo',
  89. },
  90. {
  91. title: '姓名',
  92. dataIndex: 'empName',
  93. key: 'empName',
  94. },
  95. {
  96. title: '工资类型',
  97. dataIndex: 'salaryType',
  98. key: 'salaryType',
  99. },
  100. ]
  101. const tableColumnTwo = [
  102. {
  103. title: '职类',
  104. dataIndex: 'unitTypeName',
  105. key: 'unitTypeName',
  106. },
  107. {
  108. title: '核算单元名称',
  109. dataIndex: 'unitName',
  110. key: 'unitName',
  111. },
  112. {
  113. title: '科室',
  114. dataIndex: 'deptName',
  115. key: 'deptName',
  116. },
  117. {
  118. title: '项目名称',
  119. dataIndex: 'assessmentName',
  120. key: 'assessmentName',
  121. },
  122. {
  123. title: '分配方式',
  124. dataIndex: 'distributionType',
  125. key: 'distributionType',
  126. render: (record: any) => {
  127. if (record == 1) return '占比'
  128. if (record == 2) return '绝对数'
  129. if (record == 3) return '自动计算'
  130. }
  131. },
  132. {
  133. title: '数值',
  134. dataIndex: 'value',
  135. key: 'value',
  136. },
  137. {
  138. title: '工号',
  139. dataIndex: 'targetValue',
  140. key: 'targetValue',
  141. },
  142. {
  143. title: '姓名',
  144. dataIndex: 'targetValueName',
  145. key: 'targetValueName',
  146. },
  147. {
  148. title: '说明',
  149. dataIndex: 'description',
  150. key: 'description',
  151. }
  152. ];
  153. const tableColumnThree = [
  154. {
  155. title: '项目名称',
  156. dataIndex: 'itemName',
  157. key: 'itemName',
  158. },
  159. {
  160. title: '类型',
  161. dataIndex: 'itemTypeName',
  162. key: 'itemTypeName',
  163. },
  164. {
  165. title: '点值',
  166. dataIndex: 'orderPointValue',
  167. key: 'orderPointValue',
  168. },
  169. ];
  170. const tableColumnFive = [
  171. {
  172. title: '年度',
  173. dataIndex: 'year',
  174. key: 'year',
  175. },
  176. {
  177. title: '月份',
  178. dataIndex: 'month',
  179. key: 'month',
  180. },
  181. {
  182. title: '项目名称',
  183. dataIndex: 'itemName',
  184. key: 'itemName',
  185. },
  186. {
  187. title: '项目类型',
  188. dataIndex: 'itemTypeName',
  189. key: 'itemTypeName',
  190. },
  191. {
  192. title: '金额',
  193. dataIndex: 'cost',
  194. key: 'cost',
  195. },
  196. // {
  197. // title: '操作人',
  198. // dataIndex: 'unitType',
  199. // key: 'unitType',
  200. // align: 'center'
  201. // },
  202. // {
  203. // title: '操作时间',
  204. // dataIndex: 'unitType',
  205. // key: 'unitType',
  206. // align: 'center'
  207. // },
  208. ]
  209. const tableColumnSeven = [
  210. {
  211. title: '项目名称',
  212. dataIndex: 'name',
  213. },
  214. {
  215. title: '项目类型',
  216. dataIndex: 'costType',
  217. },
  218. {
  219. title: '金额',
  220. dataIndex: 'amount',
  221. width: 200,
  222. render: (text: any, record: any) => {
  223. return (
  224. <div style={{ display: 'flex', flexDirection: 'row', width: '100%', justifyContent: 'flex-start', alignItems: 'center' }}>
  225. <div style={{ width: '80px', height: 16, display: 'flex', flexDirection: 'row', justifyContent: 'flex-start', alignItems: 'center' }}>
  226. {
  227. (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>
  228. }
  229. </div>
  230. {(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="" />}
  231. </div>
  232. )
  233. }
  234. },
  235. {
  236. title: '汇总',
  237. dataIndex: 'summaryFlag',
  238. render: (num: any, record: any) => {
  239. return record.summaryFlag == 0 ?'否':'是'
  240. }
  241. },
  242. {
  243. title: '统计',
  244. dataIndex: 'statFlag',
  245. render: (num: any, record: any) => {
  246. return num == 0 ?'否':'是'
  247. }
  248. },
  249. {
  250. title: '可控',
  251. dataIndex: 'ctrlFlag',
  252. render: (num: any, record: any) => {
  253. return num == 0 ?'否':'是'
  254. }
  255. }
  256. ]
  257. let inervalhander = undefined;
  258. const getCurrentComputeDate = async () => {
  259. const resp = await getComputeDate();
  260. set_currentComputeDate(resp);
  261. }
  262. const onSelectHandle: TreeProps['onSelect'] = (selectedKeys, info) => {
  263. const { node } = info;
  264. if(!node.children){
  265. set_currentSelectedTreeNode(node);
  266. }
  267. };
  268. const onExpand = (newExpandedKeys: React.Key[]) => {
  269. setExpandedKeys(newExpandedKeys);
  270. setAutoExpandParent(false);
  271. };
  272. //固定金额编辑金额
  273. const editHandle = async (record: any, curTabKey: string) => {
  274. const { id, deptCode, salaryType, unitCode, userId } = record;
  275. if (id == editTableCellId) {
  276. //保存
  277. //console.log({currentEditRecord,curTabKey });
  278. if (inputSalaryNum != undefined) {
  279. if (curTabKey == '1') {
  280. const resp = await editTableSalaryRequest({
  281. computeDate: currentComputeDate as string,
  282. unitCode,
  283. deptCode, salaryType,
  284. salary: inputSalaryNum,
  285. userId: `${userId}`,
  286. id
  287. });
  288. if (resp) {
  289. tableRef.current?.reload();
  290. }
  291. }
  292. }
  293. if (curTabKey == '7') {
  294. const resp = await editUnitCostTableData({
  295. amount: currentEditRecord.amount,
  296. id
  297. });
  298. if (resp) {
  299. tableRef.current?.reload();
  300. }
  301. }
  302. set_editTableCellId(undefined);
  303. set_currentEditRecord(undefined);
  304. } else {
  305. //编辑
  306. set_editTableCellId(id);
  307. set_currentEditRecord(record);
  308. }
  309. }
  310. //考核项目编辑数值
  311. const editCheckItemValHandle = async (record: any) => {
  312. const { id, itemCode, itemName, itemType, orderPointValue, executePointValue, hospId, unitCode } = record;
  313. if (id == editTableCellId) {
  314. //保存
  315. if (checkItemvalNum) {
  316. const resp = await editCheckProject({
  317. computeDate: currentComputeDate as string,
  318. itemCode,
  319. itemName,
  320. itemType,
  321. orderPointValue,
  322. value: checkItemvalNum,
  323. executePointValue,
  324. hospId,
  325. unitCode,
  326. id
  327. });
  328. if (resp) {
  329. tableRef.current?.reload();
  330. }
  331. }
  332. set_editTableCellId(undefined);
  333. } else {
  334. //编辑
  335. set_editTableCellId(id);
  336. }
  337. }
  338. const checkProjectEditHandle = (record: any) => {
  339. // console.log({record});
  340. const { props: { record: _record } } = record;
  341. set_currentEditRecord(_record);
  342. set_editModalVisible(true);
  343. }
  344. const tableDataAddHandle = () => {
  345. set_editModalVisible(true);
  346. }
  347. //表格行编辑
  348. const tableEditActHandle = (record: any) => {
  349. //console.log({'edit':record});
  350. set_isTableEdit(true);
  351. set_currentEditRecord(record);
  352. set_editModalVisible(true);
  353. }
  354. //管理指标row编辑
  355. const EditManaIndexTableRow = ({ record }: { record: any }) => {
  356. const { value, columns, unitName, id, unitCode, totalScore, computeDate, groupId } = record;
  357. return (
  358. <ModalForm
  359. title={`编辑${unitName}实际值`}
  360. width={500}
  361. // layout='inline'
  362. trigger={
  363. <a key={'1'} style={{ textAlign: 'center', width: '100%' }}>编辑</a>
  364. }
  365. initialValues={record}
  366. onFinish={async (values) => {
  367. const editResult = value.map((a: any) => {
  368. return {
  369. ...a,
  370. value: values[`value${a.code}`]
  371. }
  372. })
  373. const data = {
  374. id,
  375. unitCode,
  376. unitName,
  377. totalScore,
  378. computeDate,
  379. groupId,
  380. value: editResult
  381. }
  382. const resp = await editManaIndexTableData(data);
  383. if (resp) {
  384. tableRef.current?.reload();
  385. }
  386. return true
  387. }}
  388. >
  389. {
  390. columns.map((item: any, index: any) => {
  391. //const findTitle = columns.filter((a: any) => a.key == item.code);
  392. return (
  393. <ProFormDigit key={index} label={`${item.dataIndex}`} name={`value${item.key}`} />
  394. )
  395. })
  396. }
  397. </ModalForm>
  398. )
  399. }
  400. const onTabChange = (activeKey: string) => {
  401. set_currentSelectedTabKey(activeKey);
  402. }
  403. //获取核算单元树结构
  404. const getCheckUnitTreeDataFunc = async (computeDate: string) => {
  405. const resp = await getTreeData(computeDate);
  406. if (resp) {
  407. set_treeData(resp);
  408. }
  409. }
  410. const getCalcStatus = async () => {
  411. const resp = await getCheckItemCalcStatus(currentComputeDate as string, 'ASSESSMENT');
  412. if (resp) {
  413. if (resp.calculating) {
  414. //继续计算
  415. set_loading(true);
  416. return false
  417. } else {
  418. //计算已完成
  419. set_loading(false);
  420. return true
  421. }
  422. } else {
  423. tableRef.current?.reload();
  424. return true
  425. }
  426. }
  427. const func = (str: string) => str && str.replace(/(?:\.0*|(\.\d+?)0+)$/, '$1') + '%';
  428. const getTableData = async (type: '1' | '2' | '3' | '4' | '5' | '6' | '7', params: any, sort: any, filter: any) => {
  429. if (currentComputeDate) {
  430. if (type == '1') {
  431. const resp = await getSalaryInfoTableData({
  432. computeDate: currentComputeDate,
  433. ...params
  434. });
  435. if (resp) {
  436. return {
  437. data: resp.list,
  438. total: resp.totalCount,
  439. pageSize: resp.pageSize,
  440. totalPage: resp.totalPage,
  441. success: true
  442. }
  443. }
  444. }
  445. if (type == '2') {
  446. const resp = await getNoCheckTableData({
  447. computeDate: currentComputeDate,
  448. ...params
  449. });
  450. if (resp) {
  451. return {
  452. data: resp.list,
  453. total: resp.totalCount,
  454. pageSize: resp.pageSize,
  455. totalPage: resp.totalPage,
  456. success: true
  457. }
  458. }
  459. }
  460. if (type == '3') {
  461. if (!loading) {
  462. //计算完和未计算
  463. const resp = await getCheckProjectTableData({
  464. computeDate: currentComputeDate,
  465. unitCode: currentSelectedTreeNode.code,
  466. ...params
  467. });
  468. if (resp) {
  469. return {
  470. data: resp.list,
  471. success: true,
  472. total: resp.totalCount,
  473. pageSize: resp.pageSize,
  474. totalPage: resp.totalPage,
  475. }
  476. }
  477. }
  478. }
  479. if (type == '4') {
  480. if (currentSelectedManaGroup) {
  481. const resp = await getManaIndexTableData({ ...params, computeDate: currentComputeDate, groupId: currentSelectedManaGroup.id });
  482. if (resp) {
  483. const columns = resp.title.map((item: any, titleIndex: number) => {
  484. return (item.children ? {
  485. title: () => {
  486. 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>
  487. },
  488. key: item.code,
  489. dataIndex: item.name,
  490. children: item.children.map((a: any, aindex: number) => {
  491. return {
  492. title: a.name,
  493. dataIndex: `${a.code}${item.code}`,
  494. key: `${a.code}${item.code}`,
  495. width: 100,
  496. align: 'center',
  497. renderText(num: any, record: any, index: any, action: any) {
  498. //console.log({record,a,titleIndex})
  499. 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)) : '-'
  500. },
  501. }
  502. })
  503. } : {
  504. title: item.name,
  505. dataIndex: item.code,
  506. key: item.code,
  507. width: 100,
  508. align: 'center',
  509. renderText(num: any, record: any, index: any, action: any) {
  510. return (item.dataType == 1) ? num : num ? func((num * 100).toFixed(2) + '%') : '-'
  511. },
  512. })
  513. });
  514. set_tableColumn([{
  515. title: '核算单元',
  516. dataIndex: 'unitName',
  517. key: 'unitName',
  518. width: 120,
  519. fixed: 'left',
  520. }, ...columns,
  521. {
  522. title: '总得分',
  523. dataIndex: 'totalScore',
  524. key: 'totalScore',
  525. width: 100,
  526. fixed: 'right',
  527. },
  528. {
  529. title: '分级',
  530. dataIndex: 'level',
  531. key: 'level',
  532. width: 100,
  533. fixed: 'right',
  534. hideInTable: computeMethod == '2' ? true : false
  535. },
  536. {
  537. title: '系数',
  538. dataIndex: 'kpi',
  539. key: 'kpi',
  540. width: 100,
  541. fixed: 'right',
  542. },
  543. ]);
  544. const data = resp.managerData.map((item: any) => {
  545. let rowData: { [key: string]: any } = {};
  546. for (let index = 0; index < item.value.length; index++) {
  547. for (const key in item.value[index]) {
  548. if (key == 'veto') {
  549. //${key}${item.value[index].code}-${index} 中的index用于指定是该列的哪一格
  550. rowData[`${key}${item.value[index].code}`] = item.value[index][`${key}`]
  551. } else {
  552. rowData[`${key}${item.value[index].code}`] = item.value[index][`${key}`]
  553. }
  554. }
  555. }
  556. return { ...item, ...rowData, id: item.id, columns }
  557. });
  558. return {
  559. data: data,
  560. success: true,
  561. total: resp.totalCount,
  562. pageSize: resp.pageSize,
  563. totalPage: resp.totalPage,
  564. }
  565. }
  566. }
  567. }
  568. if (type == '5') {
  569. const resp = await getIncomeData({
  570. computeDate: currentComputeDate,
  571. ...params
  572. });
  573. if (resp) {
  574. set_totalNum(resp.sum);
  575. return {
  576. data: resp.pageList.list,
  577. success: true,
  578. total: resp.pageList.totalCount,
  579. pageSize: resp.pageList.pageSize,
  580. totalPage: resp.pageList.totalPage,
  581. }
  582. }
  583. }
  584. if (type == '6') {
  585. const resp = await getCostData({
  586. computeDate: currentComputeDate,
  587. ...params
  588. });
  589. if (resp) {
  590. set_totalNum(resp.sum);
  591. return {
  592. data: resp.pageList.list,
  593. success: true,
  594. total: resp.pageList.totalCount,
  595. pageSize: resp.pageList.pageSize,
  596. totalPage: resp.pageList.totalPage,
  597. }
  598. }
  599. }
  600. if (type == '7'&&currentSelectedTreeNode) {
  601. const resp = await getUnitCostTableData({
  602. unitCode: currentSelectedTreeNode.code,
  603. ...params
  604. });
  605. let unitCostTotal = 0;
  606. let unitCostCtrlTotal = 0;
  607. const traverseTree = (node:any) => {
  608. if(node == null) return;
  609. if(!node.summaryFlag){
  610. //summaryFlag 汇总
  611. unitCostTotal = unitCostTotal + node.amount
  612. if(node.ctrlFlag){
  613. unitCostCtrlTotal = unitCostCtrlTotal + node.amount
  614. }
  615. }
  616. if(node.children) {
  617. node.children.forEach(traverseTree);
  618. }
  619. }
  620. resp.forEach((a:any) => {
  621. traverseTree(a);
  622. });
  623. set_unitCostComputeData({
  624. unitCostTotal,unitCostCtrlTotal
  625. })
  626. if (resp) {
  627. return {
  628. data: resp,
  629. success: true,
  630. total:0,
  631. pageSize:10,
  632. totalPage:0,
  633. }
  634. }
  635. }
  636. }
  637. return []
  638. }
  639. const tableDataSearchHandle = (paramName: string) => {
  640. set_tableDataFilterParams({
  641. ...tableDataFilterParams,
  642. [`${paramName}`]: tableDataSearchKeywords
  643. })
  644. }
  645. //表格删除确认
  646. const delActionHandle = async (record: any, index: number) => {
  647. const { id } = record;
  648. const resp = await delTableDataRequest({
  649. computeDate: currentComputeDate as string,
  650. id,
  651. index
  652. });
  653. if (resp) {
  654. tableRef.current?.reload();
  655. message.success('删除成功!')
  656. }
  657. };
  658. const dataList: any[] = [];
  659. const generateList = (data: getTreeDataRespType[]) => {
  660. for (let i = 0; i < data.length; i++) {
  661. const node = data[i];
  662. const { code, name } = node;
  663. dataList.push({ code: code, name: name });
  664. if (node.child) {
  665. generateList(node.child);
  666. }
  667. }
  668. };
  669. generateList(treeData as any);
  670. const getParentKey = (key: React.Key, tree: any[]): React.Key => {
  671. let parentKey: React.Key;
  672. for (let i = 0; i < tree.length; i++) {
  673. const node = tree[i];
  674. if (node.child) {
  675. if (node.child.some((item: { code: React.Key; }) => item.code === key)) {
  676. parentKey = node.code;
  677. } else if (getParentKey(key, node.child)) {
  678. parentKey = getParentKey(key, node.child);
  679. }
  680. }
  681. }
  682. return parentKey!;
  683. };
  684. //考核项目树结构搜索
  685. const onTreeSearchKeyChange = (e: React.ChangeEvent<HTMLInputElement>) => {
  686. const { value } = e.target;
  687. const newExpandedKeys = dataList
  688. .map((item) => {
  689. if (item.name.indexOf(value) > -1) {
  690. return getParentKey(item.code, treeData);
  691. }
  692. return null;
  693. });
  694. const b = newExpandedKeys.filter((item, i, self) => item && self.indexOf(item) === i);
  695. setExpandedKeys(newExpandedKeys as React.Key[]);
  696. setSearchValue(value);
  697. setAutoExpandParent(true);
  698. }
  699. //获取数据
  700. const confirmGenerateHandle: any = async (index: number, others?: any) => {
  701. if (index == 3) {
  702. const resp = await generateCheckProjectTableData({
  703. computeDate: currentComputeDate as string,
  704. unitCode: others ? currentSelectedTreeNode.code : ''
  705. });
  706. set_loading(false);
  707. if (resp) {
  708. tableRef.current?.reload();
  709. }
  710. return Promise.resolve(true);
  711. }
  712. if (index == 7) {
  713. const resp = await generateUnitCostTableData(
  714. currentComputeDate as string,
  715. currentSelectedTreeNode.code
  716. );
  717. set_loading(false);
  718. if (resp) {
  719. tableRef.current?.reload();
  720. }
  721. return Promise.resolve(true);
  722. }
  723. }
  724. const generateFunc = (index: number, others?: any) => {
  725. /**
  726. * index 获取的表格类型下标
  727. */
  728. if ((index == 3||index == 7) && !loading) {
  729. Modal.confirm({
  730. title: '注意',
  731. cancelText: '',
  732. okText: '确定',
  733. closable: true,
  734. content: others ? '获取单个操作会覆盖上次获取的该核算单元的数据,确定要继续操作?' : `${index == 7?'获取':'获取所有'}操作会覆盖所有已获取的数据,确定要继续操作?`,
  735. onOk: () => { set_loading(true); confirmGenerateHandle(index, others) }
  736. })
  737. }
  738. }
  739. const onVisibleChangeHandle = (bool: boolean) => {
  740. set_editModalVisible(bool);
  741. if (!bool) {
  742. set_isTableEdit(false);
  743. }
  744. }
  745. const onManaIndexGroupClick = (manaIndexGroup: any) => {
  746. set_currentSelectedManaGroup(manaIndexGroup);
  747. }
  748. const tableFormCommit = async (formData: any, type: 'edit' | 'add') => {
  749. if (type == 'edit') {
  750. //编辑
  751. const body = {
  752. id: currentEditRecord.id,
  753. computeDate: currentComputeDate as string,
  754. unitCode: formData.unitCode,
  755. deptCode: formData.deptCode,
  756. nonAssessmentCode: typeof formData.assessmentCode == 'number' ? formData.assessmentCode : formData.assessmentCode.value,
  757. targetValue: `${formData.userId ? formData.userId : ''}`,
  758. value: `${formData.value}`,
  759. description: formData.description
  760. }
  761. const resp = await editTableData(body);
  762. if (resp) {
  763. tableRef.current?.reload();
  764. }
  765. set_isTableEdit(false);
  766. } else if (type == 'add') {
  767. //新增
  768. const body = {
  769. computeDate: currentComputeDate as string,
  770. unitCode: formData.unitCode,
  771. deptCode: formData.deptCode,
  772. nonAssessmentCode: formData.assessmentCode.value,
  773. targetValue: `${formData.userId ? formData.userId : ''}`,
  774. value: `${formData.value}`,
  775. description: formData.description
  776. }
  777. const resp = await addTableData(body);
  778. if (resp) {
  779. tableRef.current?.reload();
  780. }
  781. }
  782. // set_editModalVisible(false);
  783. set_currentEditRecord(undefined);
  784. return true;
  785. }
  786. //获取管理指标分组
  787. const getManaIndiGroupRequest = async () => {
  788. const resp = await getManaIndexGroup();
  789. if (resp) {
  790. set_manaIndexGroups(resp);
  791. if (resp.length > 0) {
  792. // const titleResp = await getManaIndexTableData({ computeDate: currentComputeDate as string, groupId: resp[0].groupCode });
  793. // if (titleResp) {
  794. // const columns = titleResp.title.map((item: any) => (item.children ? {
  795. // title: () => {
  796. // return <div>{item.name} <span style={{ fontSize: 14, fontFamily: 'SourceHanSansCN-Medium, SourceHanSansCN', fontWeight: 500, color: item.arrow == 'up' ? '#00BF8F' : '#FF4060' }}>↓</span></div>
  797. // },
  798. // key: item.code,
  799. // dataIndex: item.name,
  800. // children: item.children.map((a: any) => {
  801. // return {
  802. // title: a.name,
  803. // dataIndex: `${a.code}${item.code}`,
  804. // key: `${a.code}${item.code}`,
  805. // width: 100,
  806. // align: 'center',
  807. // }
  808. // })
  809. // } : {
  810. // title: item.name,
  811. // dataIndex: item.code,
  812. // key: item.code,
  813. // width: 100,
  814. // align: 'center',
  815. // }));
  816. // set_tableColumn([{
  817. // title: '核算单元',
  818. // dataIndex: 'unitName',
  819. // key: 'unitName',
  820. // align: 'center',
  821. // width: 120,
  822. // fixed: 'left',
  823. // }, ...columns,
  824. // {
  825. // title: '总得分',
  826. // dataIndex: 'totalScore',
  827. // key: 'totalScore',
  828. // align: 'center',
  829. // width: 100,
  830. // fixed:'right',
  831. // },
  832. // {
  833. // title: '操作',
  834. // key: 'option',
  835. // valueType: 'option',
  836. // width: 100,
  837. // align: 'center',
  838. // fixed: 'right',
  839. // render: (_: any, record: any) => [
  840. // <EditManaIndexTableRow record={record} key={'edit'} />
  841. // ],
  842. // }]);
  843. // }
  844. set_currentSelectedManaGroup(resp[0])
  845. }
  846. }
  847. }
  848. const importData = (index: number, name: string) => {
  849. return (
  850. <ModalForm
  851. width={360}
  852. title={`导入${name}数据`}
  853. trigger={
  854. <span key="3">导入</span>
  855. }
  856. submitter={{
  857. render: (props, defaultDoms) => {
  858. const needBtn = defaultDoms.filter((b) => {
  859. return b.key != 'rest'
  860. })
  861. return [
  862. // <Button
  863. // key="ok"
  864. // onClick={auditType == '0' ? () => downloadTemplate(index) : () => { }}
  865. // >
  866. // 下载模板
  867. // </Button>,
  868. ...needBtn,
  869. ];
  870. },
  871. }}
  872. onFinish={async (values) => {
  873. // console.log({values});
  874. const { importFile: { fileList } } = values;
  875. let formData = new FormData();
  876. if (index == 7) {
  877. formData.append('file', fileList[0].originFileObj);
  878. formData.append('computeDate', currentComputeDate as string);
  879. formData.append('unitCode', currentSelectedTreeNode.code);
  880. }else{
  881. formData.append('file', fileList[0].originFileObj);
  882. formData.append('computeDate', currentComputeDate as string);
  883. formData.append('groupId', currentSelectedManaGroup?.id as any);
  884. }
  885. const resp = await importMonthlyperformanceRelaFiles(index, formData);
  886. if (resp) {
  887. tableRef.current?.reload();
  888. return true;
  889. }
  890. }}
  891. >
  892. <FormItem name={'importFile'}>
  893. <BMSUpload downloadTemplateFile={auditType == '0' ? () => index == 4 || index == 7 ? downloadTemplate(index, index == 7 ? currentSelectedTreeNode.code : currentSelectedManaGroup?.id) : downloadTemplate(index) : () => { }} />
  894. </FormItem>
  895. </ModalForm>
  896. )
  897. }
  898. const checkHandle = async (type: string) => {
  899. const resp = await checkMonthlyReq(
  900. currentComputeDate as string,
  901. type == '0' ? '1' : '0', //审核类型 1审核 0取消审核
  902. );
  903. if (resp) {
  904. if (type == '0') {
  905. message.success('审核提交成功!');
  906. set_auditType('1');
  907. }
  908. if (type == '1') {
  909. message.success('取消审核提交成功!');
  910. set_auditType('0');
  911. }
  912. }
  913. }
  914. const pageCheckStatusFunc = async (time: string) => {
  915. const resp = await getPageCheckStatus(time);
  916. if (resp) {
  917. set_auditType(`${resp}`); //0 未审核 1 已审核
  918. }
  919. }
  920. const downloadTemplate = async (index: number, id?: number) => {
  921. await downloadTemplateReq(index, id);
  922. // if(index == 4){
  923. // //管理指标
  924. // await downloadTemplateReq(index,currentSelectedManaGroup?.groupCode);
  925. // }else{
  926. // }
  927. }
  928. const getComputeMethod = async () => {
  929. const resp = await getManaIndicatorJiangchengCoefficient();
  930. if (resp) {
  931. const need = resp.list.filter((a: any) => (a.code == '1670618922728169472'));
  932. if (need.length > 0) {
  933. set_computeMethod(need[0].value);
  934. }
  935. }
  936. }
  937. const handleResize = (e: any) => {
  938. const wH = e.target.innerHeight;
  939. const tableHeight = wH - 320;
  940. set_tableH(tableHeight);
  941. }
  942. function doResize() {
  943. setTimeout(() => {
  944. const ev: any = new Event('resize');
  945. window.dispatchEvent(ev);
  946. }, 0)
  947. }
  948. useEffect(() => {
  949. if (loading) {
  950. inervalhander = setInterval(() => {
  951. getCalcStatus();
  952. }, 60000)
  953. }
  954. }, [loading])
  955. useEffect(() => {
  956. set_tableDataFilterParams({
  957. ...tableDataFilterParams,
  958. id: currentSelectedManaGroup?.id,
  959. });
  960. }, [currentSelectedManaGroup]);
  961. useEffect(() => {
  962. tableRef.current?.reloadAndRest && tableRef.current?.reloadAndRest();
  963. }, [currentSelectedTreeNode]);
  964. useEffect(() => {
  965. //清空表格筛选项
  966. set_tableDataFilterParams(undefined);
  967. set_currentSelectedTreeNode(undefined);
  968. if (currentSelectedTabKey == '1') {
  969. set_tableColumn(tableColumnOne as ProColumns[]);
  970. }
  971. if (currentSelectedTabKey == '2') {
  972. set_tableColumn(tableColumnTwo as ProColumns[]);
  973. }
  974. if (currentSelectedTabKey == '3') {
  975. if (currentComputeDate) {
  976. getCheckUnitTreeDataFunc(currentComputeDate as string);
  977. }
  978. set_tableColumn(tableColumnThree as ProColumns[]);
  979. }
  980. if (currentSelectedTabKey == '4') {
  981. getManaIndiGroupRequest(); //获取分组
  982. }
  983. if (currentSelectedTabKey == '5') {
  984. set_tableColumn(tableColumnFive as ProColumns[]);
  985. }
  986. if (currentSelectedTabKey == '6') {
  987. set_tableColumn(tableColumnFive as ProColumns[]);
  988. }
  989. if (currentSelectedTabKey == '7') {
  990. if (currentComputeDate) {
  991. getCheckUnitTreeDataFunc(currentComputeDate as string);
  992. }
  993. set_tableColumn(tableColumnSeven as ProColumns[]);
  994. }
  995. }, [currentSelectedTabKey]);
  996. useEffect(()=>{
  997. if (currentSelectedTabKey == '7') {
  998. if (currentComputeDate) {
  999. getCheckUnitTreeDataFunc(currentComputeDate as string);
  1000. }
  1001. set_tableColumn(tableColumnSeven as ProColumns[]);
  1002. }
  1003. },[currentEditRecord,auditType])
  1004. useEffect(() => {
  1005. //初始化左侧树结构数据后
  1006. if (treeData?.length > 0) {
  1007. if (treeData[0].child && treeData[0].child.length > 0) {
  1008. const [node, nodeParent] = getDeepestTreeData(treeData[0], 'child');
  1009. set_currentSelectedTreeNode(node);
  1010. setExpandedKeys([nodeParent.code]);
  1011. }
  1012. }
  1013. }, [treeData]);
  1014. useEffect(() => {
  1015. if (currentComputeDate) {
  1016. pageCheckStatusFunc(currentComputeDate); //获取页面查核状态
  1017. getCalcStatus();
  1018. }
  1019. }, [currentComputeDate]);
  1020. useEffect(() => {
  1021. getCurrentComputeDate();
  1022. set_tableColumn(tableColumnOne as ProColumns[]);
  1023. getComputeMethod();
  1024. window.addEventListener('resize', (e) => handleResize(e)) //监听窗口大小改变
  1025. doResize();
  1026. return () => {
  1027. window.removeEventListener('resize', (e) => handleResize(e));
  1028. }
  1029. }, [])
  1030. return (
  1031. <div className='MonthlyDataCheck'>
  1032. {
  1033. true && (
  1034. <BMSModalForm formRef={formRef} open={editModalVisible} initialValues={isTableEdit ? { ...currentEditRecord } : {}} title={isTableEdit ? '编辑' : '新增'}
  1035. size="middle" width={737} onOpenChange={onVisibleChangeHandle}
  1036. modalProps={{
  1037. destroyOnClose: true
  1038. }}
  1039. onFinish={(val: any) => tableFormCommit(val, isTableEdit ? 'edit' : 'add')}
  1040. >
  1041. {
  1042. currentSelectedTabKey == '1' && (
  1043. <>
  1044. <ProFormText width="md" name="itemName" label="项目名" disabled />
  1045. <ProFormText width="md" name="itemTypeName" label="类型" disabled />
  1046. <ProFormDigit width="md" label="点值" name="pointValue" min={0} />
  1047. <ProFormText width="md" name="createUser" label="操作人" disabled />
  1048. </>
  1049. )
  1050. }
  1051. {
  1052. currentSelectedTabKey == '2' && (
  1053. <>
  1054. <ProForm.Group >
  1055. <ProFormSelect
  1056. name="deptCode"
  1057. label="科室名称"
  1058. placeholder="请选择"
  1059. colProps={{ span: 12 }}
  1060. rules={[{ required: true }]}
  1061. request={async () => {
  1062. const resp = await getDepLists();
  1063. if (resp) {
  1064. return resp.map((a: any) => ({
  1065. label: a.deptName, value: a.deptCode, d: a
  1066. }))
  1067. }
  1068. return []
  1069. }}
  1070. fieldProps={{
  1071. showSearch: true,
  1072. onChange: (value) => {
  1073. formRef.current?.setFieldValue('unitCode', '');
  1074. }
  1075. }}
  1076. />
  1077. <ProFormDependency name={['deptCode']}>
  1078. {
  1079. ({ deptCode }) => {
  1080. // console.log({deptCode});
  1081. return (
  1082. <ProFormSelect
  1083. disabled={deptCode ? false : true}
  1084. name="unitCode"
  1085. label="核算单元"
  1086. colProps={{ span: 12 }}
  1087. placeholder="请选择"
  1088. rules={[{ required: true }]}
  1089. params={deptCode}
  1090. request={async () => {
  1091. if (deptCode) {
  1092. const resp = await getHesuanUnits(deptCode);
  1093. if (resp) {
  1094. return resp.map((a: any) => ({
  1095. label: a.unitName, value: a.unitCode, d: a
  1096. }))
  1097. }
  1098. }
  1099. return []
  1100. }}
  1101. fieldProps={{
  1102. showSearch: true,
  1103. onChange: (value) => {
  1104. formRef.current?.setFieldValue('targetValue', '');
  1105. }
  1106. }}
  1107. />
  1108. )
  1109. }
  1110. }
  1111. </ProFormDependency>
  1112. </ProForm.Group>
  1113. <ProForm.Group>
  1114. <ProFormSelect
  1115. name="assessmentCode"
  1116. label="项目名称"
  1117. placeholder="请选择"
  1118. colProps={{ span: 12 }}
  1119. rules={[{ required: true }]}
  1120. request={async () => {
  1121. const resp = await getProjects();
  1122. if (resp) {
  1123. return resp.map((a: any) => ({
  1124. label: a.name, value: a.code, d: a
  1125. }))
  1126. }
  1127. return []
  1128. }}
  1129. fieldProps={{
  1130. labelInValue: true,
  1131. onChange: (value) => {
  1132. const { d: { distributionTypeName } } = value;
  1133. formRef.current?.setFieldValue('distributionTypeName', distributionTypeName);
  1134. }
  1135. }}
  1136. />
  1137. <ProFormDependency name={['assessmentCode']}>
  1138. {
  1139. ({ assessmentCode }) => {
  1140. return (
  1141. <ProFormText disabled name="distributionTypeName" label="分配方式" colProps={{ span: 12 }} />
  1142. )
  1143. }
  1144. }
  1145. </ProFormDependency>
  1146. </ProForm.Group>
  1147. <ProForm.Group>
  1148. <ProFormDigit label="数值" name="value" colProps={{ span: 12 }} min={-1000000000000000} />
  1149. <ProFormDependency name={['unitCode', 'distributionTypeName']}>
  1150. {
  1151. ({ unitCode, distributionTypeName }) => {
  1152. return (
  1153. <ProFormSelect
  1154. name="userId"
  1155. label="人员姓名"
  1156. colProps={{ span: 12 }}
  1157. placeholder="请选择"
  1158. rules={[{ required: distributionTypeName != '占比' ? true : false }]}
  1159. params={unitCode}
  1160. fieldProps={{
  1161. showSearch: true,
  1162. }}
  1163. request={async () => {
  1164. if (unitCode) {
  1165. const resp = await getEmps(unitCode);
  1166. if (resp) {
  1167. return resp.map((a: any) => ({
  1168. label: a.name, value: a.userId, d: a
  1169. }))
  1170. }
  1171. }
  1172. return []
  1173. }}
  1174. />
  1175. )
  1176. }
  1177. }
  1178. </ProFormDependency>
  1179. </ProForm.Group>
  1180. <ProForm.Group >
  1181. <ProFormTextArea
  1182. name="description"
  1183. label="说明"
  1184. colProps={{ span: 24 }}
  1185. placeholder="请输入"
  1186. />
  1187. </ProForm.Group>
  1188. </>
  1189. )
  1190. }
  1191. </BMSModalForm>
  1192. )
  1193. }
  1194. <>
  1195. {
  1196. (
  1197. <div className='rightContent'>
  1198. <BMSPagecontainer title={`核算年月:${currentComputeDate}`} ghost>
  1199. <div className='checkBtn' onClick={() => checkHandle(`${auditType}`)}>{auditType == '0' ? '审核' : '取消审核'}</div>
  1200. {/* <div className='midLine'>
  1201. <span>点击检查</span>
  1202. 是否有未对照的人员信息、未对照的科室信息及未设置的收费项目信息
  1203. </div> */}
  1204. <Tabs
  1205. defaultActiveKey="1"
  1206. onChange={onTabChange}
  1207. items={[
  1208. {
  1209. label: `固定工资`,
  1210. key: '1',
  1211. },
  1212. {
  1213. label: `单元成本数据`,
  1214. key: '7',
  1215. },
  1216. {
  1217. label: `非考核项目`,
  1218. key: '2',
  1219. },
  1220. {
  1221. label: `考核项目`,
  1222. key: '3',
  1223. },
  1224. {
  1225. label: `管理指标`,
  1226. key: '4',
  1227. },
  1228. {
  1229. label: `收入数据`,
  1230. key: '5',
  1231. },
  1232. {
  1233. label: `成本数据`,
  1234. key: '6',
  1235. },
  1236. ]}
  1237. />
  1238. {
  1239. currentSelectedTabKey == '1' && (
  1240. <div className='tabContent'>
  1241. <div className='tableToolbar'>
  1242. <div className='filter'>
  1243. <div className='search'>
  1244. <span>科室名称:</span><Input className='searchInput' allowClear placeholder="请输入" onChange={(e) => {
  1245. set_tableDataSearchKeywords(e.target.value);
  1246. if (e.target.value.length == 0) {
  1247. set_tableDataFilterParams({
  1248. ...tableDataFilterParams,
  1249. deptName: ''
  1250. });
  1251. }
  1252. }} suffix={
  1253. <IconFont type="iconsousuo" style={{ color: '#99A6BF' }} onClick={() => tableDataSearchHandle('deptName')} />
  1254. } />
  1255. </div>
  1256. </div>
  1257. <Popover open={ifShowTip} content={'当前处于审核中,无法操作!'} placement='topRight'>
  1258. <div className={auditType == '1' ? 'btnGroup disabled' : 'btnGroup'}
  1259. onMouseEnter={() => auditType == '0' ? set_ifShowTip(false) : set_ifShowTip(true)}
  1260. onMouseLeave={() => set_ifShowTip(false)}
  1261. >
  1262. {/* <span key="1">调整</span> */}
  1263. {/* <span key="2" onClick={() => generateFunc()}>获取</span> */}
  1264. {importData(1, '固定工资')}
  1265. </div>
  1266. </Popover>
  1267. </div>
  1268. {currentComputeDate && <BMSTable actionRef={tableRef} params={tableDataFilterParams} rowKey='id'
  1269. columns={auditType == '0' ? [...tableColumn, {
  1270. title: '金额',
  1271. dataIndex: 'salary',
  1272. key: 'salary',
  1273. align: 'center',
  1274. width: '10%',
  1275. render: (text: any, record: any) => {
  1276. return (
  1277. <div style={{ display: 'flex', flexDirection: 'row', width: '100%', justifyContent: 'center', alignItems: 'center' }}>
  1278. <div style={{ width: '80px', height: 16, display: 'flex', flexDirection: 'row', justifyContent: 'center', alignItems: 'center' }}>
  1279. {
  1280. editTableCellId == record.id ? <Input size='small' defaultValue={record.salary} placeholder='请输入' onChange={(e) => { set_inputSalaryNum(Number(e.target.value)) }} style={{ width: '80px' }} /> : <span>{text}</span>
  1281. }
  1282. </div>
  1283. {auditType == '0' && <img onClick={() => editHandle(record, '1')} style={{ width: 16, height: 16, cursor: 'pointer', marginLeft: 8 }} src={editTableCellId == record.id ? conformIcon : editIcon} alt="" />}
  1284. </div>
  1285. )
  1286. }
  1287. },
  1288. {
  1289. title: '操作',
  1290. key: 'option',
  1291. valueType: 'option',
  1292. render: (_: any, record) => [
  1293. <Popconfirm
  1294. key={'del'}
  1295. title="是否确认删除?"
  1296. onConfirm={() => delActionHandle(record, 1)}
  1297. // onCancel={()=>{}}
  1298. okText="是"
  1299. cancelText="否"
  1300. >
  1301. <a >删除</a>
  1302. </Popconfirm>
  1303. ],
  1304. },] : [
  1305. ...tableColumn, {
  1306. title: '金额',
  1307. dataIndex: 'salary',
  1308. key: 'salary',
  1309. width: '10%',
  1310. // shouldCellUpdate:(record:any, prevRecord:any) => true,
  1311. render: (text: any, record: any) => {
  1312. return (
  1313. <div style={{ display: 'flex', flexDirection: 'row', width: '100%', justifyContent: 'center', alignItems: 'center' }}>
  1314. <div style={{ width: '80px', height: 16, display: 'flex', flexDirection: 'row', justifyContent: 'center', alignItems: 'center' }}>
  1315. {
  1316. editTableCellId == record.id ? <Input size='small' defaultValue={record.salary} placeholder='请输入' onChange={(e) => { set_inputSalaryNum(Number(e.target.value)) }} style={{ width: '80px' }} /> : <span>{text}</span>
  1317. }
  1318. </div>
  1319. {auditType == '0' && <img onClick={() => editHandle(record, '1')} style={{ width: 16, height: 16, cursor: 'pointer', marginLeft: 8 }} src={editTableCellId == record.id ? conformIcon : editIcon} alt="" />}
  1320. </div>
  1321. )
  1322. }
  1323. },
  1324. ]} request={(params, sort, filter) => getTableData('1', params, sort, filter)} />}
  1325. </div>
  1326. )
  1327. }
  1328. {
  1329. currentSelectedTabKey == '2' && (
  1330. <div className='tabContent'>
  1331. <div className='tableToolbar'>
  1332. <div className='filter'>
  1333. <div className='search'>
  1334. <span>科室名称:</span><Input className='searchInput' allowClear placeholder="请输入" onChange={(e) => {
  1335. set_tableDataSearchKeywords(e.target.value);
  1336. if (e.target.value.length == 0) {
  1337. set_tableDataFilterParams({
  1338. ...tableDataFilterParams,
  1339. deptName: ''
  1340. });
  1341. }
  1342. }} suffix={
  1343. <IconFont type="iconsousuo" onClick={() => tableDataSearchHandle('deptName')} />
  1344. } />
  1345. </div>
  1346. </div>
  1347. <Popover open={ifShowTip} content={'当前处于审核中,无法操作!'} >
  1348. <div className={auditType == '1' ? 'btnGroup disabled' : 'btnGroup'}
  1349. onMouseEnter={() => auditType == '0' ? set_ifShowTip(false) : set_ifShowTip(true)}
  1350. onMouseLeave={() => set_ifShowTip(false)}
  1351. >
  1352. {/* <span key="1" onClick={() => generateFunc(2)} >获取</span>
  1353. <span key="2" >导入</span> */}
  1354. {importData(2, '非考核项目')}
  1355. <span key="3" onClick={auditType == '0' ? () => tableDataAddHandle() : () => { }}>添加</span>
  1356. </div>
  1357. </Popover>
  1358. </div>
  1359. {currentComputeDate && <BMSTable scroll={{ x: 120 * 10, y: 500 }} actionRef={tableRef} rowKey='id' params={tableDataFilterParams}
  1360. columns={auditType == '0' ? [...tableColumn, {
  1361. title: '操作',
  1362. fixed: 'right',
  1363. key: 'option',
  1364. width: 130,
  1365. valueType: 'option',
  1366. render: (_: any, record: any) => [
  1367. <a key={'edit'} onClick={() => tableEditActHandle(record)}>编辑</a>,
  1368. <Divider type='vertical' key='line' />,
  1369. <Popconfirm
  1370. key={'del'}
  1371. title="是否确认删除?"
  1372. onConfirm={() => delActionHandle(record, 2)}
  1373. // onCancel={()=>{}}
  1374. okText="是"
  1375. cancelText="否"
  1376. >
  1377. <a >删除</a>
  1378. </Popconfirm>
  1379. ],
  1380. }] : [...tableColumn]} request={(params, sort, filter) => getTableData('2', params, sort, filter)} />}
  1381. </div>
  1382. )
  1383. }
  1384. {
  1385. currentSelectedTabKey == '3' && (
  1386. <div className='tabContent'>
  1387. <div className='tabContentInner'>
  1388. <div className='leftTree'>
  1389. <div className='search'>
  1390. <Input className='searchInput' allowClear onChange={onTreeSearchKeyChange} placeholder="请输入名称" suffix={
  1391. <IconFont type="iconsousuo" />
  1392. } />
  1393. </div>
  1394. <div className='treeWrap'>
  1395. {
  1396. treeData && treeData.length > 0 && currentSelectedTreeNode && (
  1397. <DirectoryTree
  1398. fieldNames={{ title: 'name', key: 'code', children: 'child' }}
  1399. rootStyle={{ height: '100%', paddingBottom: 50, overflowY: 'scroll', overflowX: 'hidden' }}
  1400. onSelect={onSelectHandle}
  1401. onExpand={onExpand}
  1402. expandedKeys={expandedKeys}
  1403. autoExpandParent={autoExpandParent}
  1404. selectedKeys={[currentSelectedTreeNode.code]}
  1405. blockNode={true}
  1406. icon={() => null}
  1407. titleRender={
  1408. (nodeData: any) => {
  1409. const strTitle = nodeData.name as string;
  1410. const index = strTitle.indexOf(searchValue);
  1411. const beforeStr = strTitle.substring(0, index);
  1412. const afterStr = strTitle.slice(index + searchValue.length);
  1413. const title =
  1414. index > -1 ? (
  1415. <span>
  1416. {beforeStr}
  1417. <span className="site-tree-search-value" style={{ color: 'red', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{searchValue}</span>
  1418. {afterStr}
  1419. </span>
  1420. ) : (
  1421. <span className='strTitle'>{strTitle}</span>
  1422. );
  1423. return <div style={{
  1424. display: 'flex', flexDirection: 'row',
  1425. width: '100%',
  1426. justifyContent: 'flex-start', alignItems: 'center', height: 32,
  1427. borderRadius: '4px',
  1428. overflow: 'hidden',
  1429. color: '#17181A',
  1430. textOverflow: 'ellipsis',
  1431. whiteSpace: 'nowrap'
  1432. }}>{title}</div>
  1433. }
  1434. }
  1435. defaultSelectedKeys={[treeData[0].child[0].code]}
  1436. treeData={treeData as unknown as DataNode[]}
  1437. // treeData={treeDataNew}
  1438. switcherIcon={(props: any) => {
  1439. const { expanded } = props;
  1440. 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} />
  1441. }}
  1442. />
  1443. )
  1444. }
  1445. </div>
  1446. </div>
  1447. <div className='rightTable'>
  1448. <div className='tableToolbar'>
  1449. <div className='filter'>
  1450. {/* <div className='search' style={{ marginRight: 24 }}>
  1451. <span>类型:</span><Input className='searchInput' allowClear placeholder="请输入" onChange={(e) => {
  1452. set_tableDataSearchKeywords(e.target.value);
  1453. if (e.target.value.length == 0) {
  1454. set_tableDataFilterParams({
  1455. ...tableDataFilterParams,
  1456. itemType: ''
  1457. });
  1458. }
  1459. }} suffix={
  1460. <IconFont type="iconsousuo" onClick={() => tableDataSearchHandle('itemType')} />
  1461. } />
  1462. </div> */}
  1463. <div className='search'>
  1464. <span>项目名称:</span><Input className='searchInput' allowClear placeholder="请输入" onChange={(e) => {
  1465. set_tableDataSearchKeywords(e.target.value);
  1466. if (e.target.value.length == 0) {
  1467. set_tableDataFilterParams({
  1468. ...tableDataFilterParams,
  1469. itemName: ''
  1470. });
  1471. }
  1472. }} suffix={
  1473. <IconFont type="iconsousuo" onClick={() => tableDataSearchHandle('itemName')} />
  1474. } />
  1475. </div>
  1476. </div>
  1477. <Popover open={ifShowTip} content={'当前处于审核中,无法操作!'} >
  1478. <div className={auditType == '1' || loading ? 'btnGroup disabled' : 'btnGroup'}
  1479. onMouseEnter={() => auditType == '0' ? set_ifShowTip(false) : set_ifShowTip(true)}
  1480. onMouseLeave={() => set_ifShowTip(false)}
  1481. >
  1482. <span key="1" onClick={auditType == '0' ? () => generateFunc(3, true) : () => { }}>获取单个</span>
  1483. <span key="2" onClick={auditType == '0' ? () => generateFunc(3) : () => { }}>获取所有</span>
  1484. </div>
  1485. </Popover>
  1486. </div>
  1487. {currentComputeDate && <BMSTable actionRef={tableRef} loading={{ spinning: loading, tip: '正在计算数据...' }} rowKey='id' params={tableDataFilterParams} columns={auditType == '0' ? [...tableColumn, {
  1488. title: '数值',
  1489. dataIndex: 'value',
  1490. key: 'value',
  1491. render: (text: any, record: any) => {
  1492. return (
  1493. <div key={'editCheckitem'} style={{ display: 'flex', flexDirection: 'row', width: '100%', justifyContent: 'flex-start', alignItems: 'center' }}>
  1494. <div style={{ width: '80px', height: 16, display: 'flex', flexDirection: 'row', justifyContent: 'center', alignItems: 'center' }}>
  1495. {
  1496. editTableCellId == record.id ? <Input size='small' defaultValue={record.value} placeholder='请输入' onChange={(e) => { set_checkItemvalNum(Number(e.target.value)) }} style={{ width: '80px' }} /> : <span>{text}</span>
  1497. }
  1498. </div>
  1499. <img onClick={() => editCheckItemValHandle(record)} style={{ width: 16, height: 16, cursor: 'pointer', marginLeft: 8 }} src={editTableCellId == record.id ? conformIcon : editIcon} alt="" />
  1500. </div>
  1501. )
  1502. }
  1503. },
  1504. {
  1505. title: '操作',
  1506. key: 'option',
  1507. valueType: 'option',
  1508. render: (_: any, record: any) => [
  1509. <Popconfirm
  1510. key={'del'}
  1511. title="是否确认删除?"
  1512. onConfirm={() => delActionHandle(record, 3)}
  1513. // onCancel={()=>{}}
  1514. okText="是"
  1515. cancelText="否"
  1516. >
  1517. <a >删除</a>
  1518. </Popconfirm>
  1519. ],
  1520. }] : [
  1521. ...tableColumn, {
  1522. title: '数值',
  1523. dataIndex: 'value',
  1524. key: 'value',
  1525. }
  1526. ]} request={(params, sort, filter) => getTableData('3', params, sort, filter)} />}
  1527. </div>
  1528. </div>
  1529. </div>
  1530. )
  1531. }
  1532. {
  1533. currentSelectedTabKey == '4' && (
  1534. <div className='tabContent'>
  1535. <div className='tableToolbar'>
  1536. <div className='filter'>
  1537. <div className='tabs'>
  1538. {
  1539. manaIndexGroups.map((item, index) => {
  1540. return (
  1541. <Tooltip placement="top" title={item.depiction ? item.depiction : item.groupName}>
  1542. <div key={index} className={currentSelectedManaGroup?.id == item.id ? 'tab on' : 'tab'} onClick={() => onManaIndexGroupClick(item)}>{item.groupName}</div>
  1543. </Tooltip>
  1544. )
  1545. })
  1546. }
  1547. </div>
  1548. <div className='search'>
  1549. {/* <span>核算单元名称:</span><Input className='searchInput' allowClear placeholder="请输入" onChange={(e) => {
  1550. set_tableDataSearchKeywords(e.target.value);
  1551. if (e.target.value.length == 0) {
  1552. set_tableDataFilterParams({
  1553. ...tableDataFilterParams,
  1554. unitName: ''
  1555. });
  1556. }
  1557. }} suffix={
  1558. <IconFont type="iconsousuo" onClick={() => tableDataSearchHandle()} />
  1559. } /> */}
  1560. </div>
  1561. </div>
  1562. <Popover open={ifShowTip} content={'当前处于审核中,无法操作!'} placement='topRight'>
  1563. <div className={auditType == '1' ? 'btnGroup disabled' : 'btnGroup'}
  1564. onMouseEnter={() => auditType == '0' ? set_ifShowTip(false) : set_ifShowTip(true)}
  1565. onMouseLeave={() => set_ifShowTip(false)}
  1566. >
  1567. {/* <span key="1">获取</span> */}
  1568. {importData(4, '管理指标')}
  1569. </div>
  1570. </Popover>
  1571. </div>
  1572. {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,
  1573. {
  1574. title: '操作',
  1575. key: 'option',
  1576. valueType: 'option',
  1577. width: 100,
  1578. fixed: 'right',
  1579. render: (_: any, record: any) => [
  1580. <EditManaIndexTableRow record={record} key={'edit'} />
  1581. ],
  1582. }] : [...tableColumn]} pagination={false} params={tableDataFilterParams} request={(params, sort, filter) => getTableData('4', params, sort, filter)} />}
  1583. </div>
  1584. )
  1585. }
  1586. {
  1587. currentSelectedTabKey == '5' && (
  1588. <div className='tabContent' >
  1589. <div className='tableToolbar'>
  1590. <div className='filter'>
  1591. <div className='search'>
  1592. <span>项目名称:</span><Input className='searchInput' allowClear placeholder="请输入" onChange={(e) => {
  1593. set_tableDataSearchKeywords(e.target.value);
  1594. if (e.target.value.length == 0) {
  1595. set_tableDataFilterParams({
  1596. ...tableDataFilterParams,
  1597. itemName: ''
  1598. });
  1599. }
  1600. }} suffix={
  1601. <IconFont type="iconsousuo" onClick={() => tableDataSearchHandle('itemName')} />
  1602. } />
  1603. </div>
  1604. </div>
  1605. <Popover open={ifShowTip} content={'当前处于审核中,无法操作!'} placement='topRight'>
  1606. <div className={auditType == '1' ? 'btnGroup disabled' : 'btnGroup'}
  1607. onMouseEnter={() => auditType == '0' ? set_ifShowTip(false) : set_ifShowTip(true)}
  1608. onMouseLeave={() => set_ifShowTip(false)}
  1609. >
  1610. {/* <span key="1">获取</span> */}
  1611. {importData(5, '收入')}
  1612. </div>
  1613. </Popover>
  1614. </div>
  1615. {currentComputeDate && <BMSTable actionRef={tableRef} rowKey='id' params={tableDataFilterParams} columns={tableColumn} request={(params, sort, filter) => getTableData('5', params, sort, filter)} />}
  1616. <div className='totalCount'>合计:{totalNum}</div>
  1617. </div>
  1618. )
  1619. }
  1620. {
  1621. currentSelectedTabKey == '6' && (
  1622. <div className='tabContent'>
  1623. <div className='tableToolbar'>
  1624. <div className='filter'>
  1625. <div className='search'>
  1626. <span>项目名称:</span><Input className='searchInput' allowClear placeholder="请输入" onChange={(e) => {
  1627. set_tableDataSearchKeywords(e.target.value);
  1628. if (e.target.value.length == 0) {
  1629. set_tableDataFilterParams({
  1630. ...tableDataFilterParams,
  1631. itemName: ''
  1632. });
  1633. }
  1634. }} suffix={
  1635. <IconFont type="iconsousuo" onClick={() => tableDataSearchHandle('itemName')} />
  1636. } />
  1637. </div>
  1638. </div>
  1639. <Popover open={ifShowTip} content={'当前处于审核中,无法操作!'} placement='topRight'>
  1640. <div className={auditType == '1' ? 'btnGroup disabled' : 'btnGroup'}
  1641. onMouseEnter={() => auditType == '0' ? set_ifShowTip(false) : set_ifShowTip(true)}
  1642. onMouseLeave={() => set_ifShowTip(false)}
  1643. >
  1644. {/* <span key="1">获取</span> */}
  1645. {importData(6, '成本')}
  1646. </div>
  1647. </Popover>
  1648. </div>
  1649. {currentComputeDate && <BMSTable actionRef={tableRef} rowKey='id' params={tableDataFilterParams} columns={tableColumn} request={(params, sort, filter) => getTableData('6', params, sort, filter)} />}
  1650. <div className='totalCount'>合计:{totalNum}</div>
  1651. </div>
  1652. )
  1653. }
  1654. {
  1655. currentSelectedTabKey == '7' && (
  1656. <div className='tabContent'>
  1657. <div className='tabContentInner'>
  1658. <div className='leftTree'>
  1659. <div className='search'>
  1660. <Input className='searchInput' allowClear onChange={onTreeSearchKeyChange} placeholder="请输入名称" suffix={
  1661. <IconFont type="iconsousuo" />
  1662. } />
  1663. </div>
  1664. <div className='treeWrap'>
  1665. {
  1666. treeData && treeData.length > 0 && currentSelectedTreeNode && (
  1667. <DirectoryTree
  1668. fieldNames={{ title: 'name', key: 'code', children: 'child' }}
  1669. rootStyle={{ height: '100%', paddingBottom: 50, overflowY: 'scroll', overflowX: 'hidden' }}
  1670. onSelect={onSelectHandle}
  1671. onExpand={onExpand}
  1672. expandedKeys={expandedKeys}
  1673. autoExpandParent={autoExpandParent}
  1674. selectedKeys={[currentSelectedTreeNode.code]}
  1675. blockNode={true}
  1676. icon={() => null}
  1677. titleRender={
  1678. (nodeData: any) => {
  1679. const strTitle = nodeData.name as string;
  1680. const index = strTitle.indexOf(searchValue);
  1681. const beforeStr = strTitle.substring(0, index);
  1682. const afterStr = strTitle.slice(index + searchValue.length);
  1683. const title =
  1684. index > -1 ? (
  1685. <span>
  1686. {beforeStr}
  1687. <span className="site-tree-search-value" style={{ color: 'red', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{searchValue}</span>
  1688. {afterStr}
  1689. </span>
  1690. ) : (
  1691. <span className='strTitle'>{strTitle}</span>
  1692. );
  1693. return <div style={{
  1694. display: 'flex', flexDirection: 'row',
  1695. width: '100%',
  1696. justifyContent: 'flex-start', alignItems: 'center', height: 32,
  1697. borderRadius: '4px',
  1698. overflow: 'hidden',
  1699. color: '#17181A',
  1700. textOverflow: 'ellipsis',
  1701. whiteSpace: 'nowrap'
  1702. }}>{title}</div>
  1703. }
  1704. }
  1705. defaultSelectedKeys={[treeData[0].child[0].code]}
  1706. treeData={treeData as unknown as DataNode[]}
  1707. // treeData={treeDataNew}
  1708. switcherIcon={(props: any) => {
  1709. const { expanded } = props;
  1710. 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} />
  1711. }}
  1712. />
  1713. )
  1714. }
  1715. </div>
  1716. </div>
  1717. <div className='rightTable'>
  1718. <div className='tableToolbar'>
  1719. <div className='filter'>
  1720. {/* <div className='search' style={{ marginRight: 24 }}>
  1721. <span>类型:</span><Input className='searchInput' allowClear placeholder="请输入" onChange={(e) => {
  1722. set_tableDataSearchKeywords(e.target.value);
  1723. if (e.target.value.length == 0) {
  1724. set_tableDataFilterParams({
  1725. ...tableDataFilterParams,
  1726. itemType: ''
  1727. });
  1728. }
  1729. }} suffix={
  1730. <IconFont type="iconsousuo" onClick={() => tableDataSearchHandle('itemType')} />
  1731. } />
  1732. </div> */}
  1733. <div className='search'>
  1734. <span>项目名称:</span><Input className='searchInput' allowClear placeholder="请输入" onChange={(e) => {
  1735. set_tableDataSearchKeywords(e.target.value);
  1736. if (e.target.value.length == 0) {
  1737. set_tableDataFilterParams({
  1738. ...tableDataFilterParams,
  1739. itemName: ''
  1740. });
  1741. }
  1742. }} suffix={
  1743. <IconFont type="iconsousuo" onClick={() => tableDataSearchHandle('itemName')} />
  1744. } />
  1745. </div>
  1746. </div>
  1747. <>
  1748. {/* <span className='compelted'>已分配总额: <i>{pageData.completedTotal}</i></span>
  1749. <span className='left'>剩余分配总额: <i>{pageData.leftTotal}</i></span> */}
  1750. <div className='count'><span className='compelted' style={{display:'inline-block',marginRight:20}}>总成本:<i>{formatMoneyNumber(Number(unitCostComputeData.unitCostTotal.toFixed(2)))}</i></span><span className='left'>可控成本:<i>{formatMoneyNumber(Number(unitCostComputeData.unitCostCtrlTotal.toFixed(2)))}</i></span></div>
  1751. <Popover open={ifShowTip} content={'当前处于审核中,无法操作!'} >
  1752. <div className={auditType == '1' || loading ? 'btnGroup disabled' : 'btnGroup'}
  1753. onMouseEnter={() => auditType == '0' ? set_ifShowTip(false) : set_ifShowTip(true)}
  1754. onMouseLeave={() => set_ifShowTip(false)}
  1755. >
  1756. <span key="1" onClick={auditType == '0' ? () => generateFunc(7,false) : () => { }}>获取</span>
  1757. <>{importData(7, '成本')}</>
  1758. </div>
  1759. </Popover>
  1760. </>
  1761. </div>
  1762. {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)} />}
  1763. </div>
  1764. </div>
  1765. </div>
  1766. )
  1767. }
  1768. </BMSPagecontainer>
  1769. </div>
  1770. )
  1771. }
  1772. </>
  1773. </div>
  1774. );
  1775. };
  1776. export default MonthlyDataCheck;