|
@@ -2,7 +2,7 @@
|
|
|
* @Author: code4eat awesomedema@gmail.com
|
|
|
* @Date: 2023-01-04 14:12:31
|
|
|
* @LastEditors: code4eat awesomedema@gmail.com
|
|
|
- * @LastEditTime: 2023-03-02 16:06:48
|
|
|
+ * @LastEditTime: 2023-03-02 17:09:55
|
|
|
* @FilePath: /BudgetManaSystem/src/pages/budgetMana/oneBatch/index.tsx
|
|
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
|
*/
|
|
@@ -14,7 +14,7 @@ import { getComputeDate } from '@/pages/Home/service';
|
|
|
import { ActionType, ProColumns } from '@ant-design/pro-components';
|
|
|
import { message, Modal, Popover, Table, Tabs } from 'antd';
|
|
|
import { useEffect, useRef, useState } from 'react';
|
|
|
-import { caculate, checkRequest, getData } from './service';
|
|
|
+import { caculate, checkRequest, getCurrentCheckStatus, getData } from './service';
|
|
|
|
|
|
|
|
|
import './style.less';
|
|
@@ -76,7 +76,7 @@ const OneBatch = () => {
|
|
|
title: item.name,
|
|
|
dataIndex: `${item.code}`,
|
|
|
key: `${item.code}`,
|
|
|
- width: 100,
|
|
|
+ width: 140,
|
|
|
align: 'center',
|
|
|
}
|
|
|
});
|
|
@@ -84,14 +84,14 @@ const OneBatch = () => {
|
|
|
title: '核算单元',
|
|
|
dataIndex: 'unitName',
|
|
|
key: 'unitName',
|
|
|
- width: 100,
|
|
|
+ width: 140,
|
|
|
fixed: 'left',
|
|
|
align: 'center',
|
|
|
}, ...columns, {
|
|
|
title: '总奖金',
|
|
|
dataIndex: 'totalScore',
|
|
|
key: 'totalScore',
|
|
|
- width: 100,
|
|
|
+ width: 140,
|
|
|
fixed: 'right',
|
|
|
align: 'center',
|
|
|
}]);
|
|
@@ -155,6 +155,14 @@ const OneBatch = () => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ const getCheckStatus = async (computeDate: string) => {
|
|
|
+ const resp = await getCurrentCheckStatus(computeDate);
|
|
|
+ if (resp) {
|
|
|
+ set_auditType(`${resp}`); //0 未审核 1 已审核
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
const generateFunc = () => {
|
|
|
|
|
|
Modal.confirm({
|
|
@@ -168,7 +176,7 @@ const OneBatch = () => {
|
|
|
|
|
|
const handleResize = (e: any) => {
|
|
|
const wH = e.target.innerHeight;
|
|
|
- const tableHeight = wH - 320;
|
|
|
+ const tableHeight = wH - 290;
|
|
|
set_tableH(tableHeight);
|
|
|
}
|
|
|
|
|
@@ -182,7 +190,7 @@ const OneBatch = () => {
|
|
|
|
|
|
useEffect(() => {
|
|
|
if (currentComputeDate) {
|
|
|
-
|
|
|
+ getCheckStatus(currentComputeDate);
|
|
|
}
|
|
|
}, [currentComputeDate]);
|
|
|
|
|
@@ -191,6 +199,10 @@ const OneBatch = () => {
|
|
|
getCurrentComputeDate();
|
|
|
window.addEventListener('resize',(e)=>handleResize(e)) //监听窗口大小改变
|
|
|
doResize();
|
|
|
+
|
|
|
+ return ()=>{
|
|
|
+ window.removeEventListener('resize',(e)=>handleResize(e))
|
|
|
+ }
|
|
|
}, [])
|
|
|
|
|
|
|
|
@@ -231,7 +243,7 @@ const OneBatch = () => {
|
|
|
<div className='tabContent'>
|
|
|
{currentComputeDate && <BMSTable actionRef={tableRef} rowKey='unitCode' pagination={false} columns={tableColumn as ProColumns[]}
|
|
|
params={tableDataFilterParams}
|
|
|
- scroll={{ x: 120 * 10, y:tableH }}
|
|
|
+ scroll={{ x: 140 * 10, y:tableH }}
|
|
|
request={(params, sort, filter) => getTableData(params, sort, filter)}
|
|
|
|
|
|
summary={(pageData) => {
|