|
@@ -4,7 +4,7 @@
|
|
|
* @Author: code4eat awesomedema@gmail.com
|
|
|
* @Date: 2022-12-16 09:42:52
|
|
|
* @LastEditors: code4eat awesomedema@gmail.com
|
|
|
- * @LastEditTime: 2023-06-16 13:36:05
|
|
|
+ * @LastEditTime: 2023-07-24 09:30:42
|
|
|
* @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlySet/index.tsx
|
|
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
|
*/
|
|
@@ -24,7 +24,7 @@ import closeIcon from '../../../../static/treenode_collapse.png';
|
|
|
import { BMSTable } from '@/components/BMSTable';
|
|
|
import { ActionType, ProColumns, ProColumnType } from '@ant-design/pro-components';
|
|
|
import { createFromIconfontCN } from '@ant-design/icons';
|
|
|
-import { checkRequest, delPersonRequest, generateDataRequest, getDepInfoTableData, getPersonInfoTableData, getProjectInfoTableData, getTotalEmps, getTreeData, getTreeDataRespType, jixiaoDataImport, PersonInfoTableDataType, saveEmpsRequest } from './service';
|
|
|
+import { checkRequest, delPersonRequest, generateDataRequest, getDepInfoTableData, getPersonInfoTableData, getProjectInfoTableData, getTotalEmps, getTransactionInfo, getTreeData, getTreeDataRespType, jixiaoDataImport, PersonInfoTableDataType, saveEmpsRequest } from './service';
|
|
|
import { TransferDirection, TransferItem, TransferProps } from 'antd/es/transfer';
|
|
|
import { getComputeDate } from '@/pages/Home/service';
|
|
|
|
|
@@ -39,6 +39,7 @@ import { ColumnsType, TableRowSelection } from 'antd/es/table/interface';
|
|
|
import { difference } from 'lodash';
|
|
|
|
|
|
import '../../../../src/utils/zhongtaiA'
|
|
|
+import { getJiezhuanStatus } from '../monthlySet/service';
|
|
|
|
|
|
|
|
|
const IconFont = createFromIconfontCN({
|
|
@@ -55,19 +56,19 @@ const depInfoTableColumn = [
|
|
|
title: '科室代码',
|
|
|
dataIndex: 'deptCode',
|
|
|
key: 'deptCode',
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
{
|
|
|
title: '科室名称',
|
|
|
dataIndex: 'deptName',
|
|
|
key: 'deptName',
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
{
|
|
|
title: '类型',
|
|
|
dataIndex: 'deptTypeName',
|
|
|
key: 'deptTypeName',
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
]
|
|
|
|
|
@@ -76,31 +77,31 @@ const chargeInfoTableColumn = [
|
|
|
title: '项目代码',
|
|
|
dataIndex: 'itemCode',
|
|
|
key: 'itemCode',
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
{
|
|
|
title: '项目名称',
|
|
|
dataIndex: 'itemName',
|
|
|
key: 'itemName',
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
{
|
|
|
title: '类型',
|
|
|
dataIndex: 'itemType',
|
|
|
key: 'itemType',
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
{
|
|
|
title: '点值',
|
|
|
dataIndex: 'itemPoint',
|
|
|
key: 'itemPoint',
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
{
|
|
|
title: '核心',
|
|
|
dataIndex: 'coreFlag',
|
|
|
key: 'coreFlag',
|
|
|
-
|
|
|
+
|
|
|
render: (_: any) => {
|
|
|
return _ == 1 ? '是' : '否'
|
|
|
}
|
|
@@ -144,6 +145,8 @@ const MonthlyInfoCheck: React.FC = () => {
|
|
|
const [searchValue, setSearchValue] = useState('');
|
|
|
const [autoExpandParent, setAutoExpandParent] = useState(true);
|
|
|
|
|
|
+ const [ifBanAllAction, set_ifBanAllAction] = useState(true); //是否掩藏所有操作
|
|
|
+
|
|
|
|
|
|
|
|
|
const tableRef = useRef<ActionType>();
|
|
@@ -154,37 +157,37 @@ const MonthlyInfoCheck: React.FC = () => {
|
|
|
title: '工号',
|
|
|
dataIndex: 'empNo',
|
|
|
key: 'empNo',
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
{
|
|
|
title: '姓名',
|
|
|
dataIndex: 'empName',
|
|
|
key: 'empName',
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
{
|
|
|
title: '岗位层级',
|
|
|
dataIndex: 'positionLevelName',
|
|
|
key: 'positionLevelName',
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
{
|
|
|
title: '职务',
|
|
|
dataIndex: 'jobTitleName',
|
|
|
key: 'jobTitleName',
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
{
|
|
|
title: '岗位系数',
|
|
|
dataIndex: 'positionRate',
|
|
|
key: 'positionRate',
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
{
|
|
|
title: '年资',
|
|
|
dataIndex: 'seniority',
|
|
|
key: 'seniority',
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
];
|
|
|
|
|
@@ -224,7 +227,14 @@ const MonthlyInfoCheck: React.FC = () => {
|
|
|
set_currentSelectedTabKey(activeKey);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ const getJiezhuanStatusHandle =async () => {
|
|
|
+ const resp = await getJiezhuanStatus(currentComputeDate as string);
|
|
|
+ if(resp == 2){
|
|
|
+ set_ifBanAllAction(true);
|
|
|
+ }else{
|
|
|
+ set_ifBanAllAction(false);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
|
|
|
const getTableData = async (type: 'PERSON' | 'DEP' | 'CHARGE', params: any, sort: any, filter: any) => {
|
|
@@ -324,13 +334,13 @@ const MonthlyInfoCheck: React.FC = () => {
|
|
|
icon: <></>,
|
|
|
width: 640,
|
|
|
okText: '确定',
|
|
|
- centered:true,
|
|
|
+ centered: true,
|
|
|
cancelText: '取消',
|
|
|
- content:<TableTransfer
|
|
|
- ref={ref}
|
|
|
- leftColumns={transferTableColumn}
|
|
|
- rightColumns={transferTableColumn}
|
|
|
- ></TableTransfer>,
|
|
|
+ content: <TableTransfer
|
|
|
+ ref={ref}
|
|
|
+ leftColumns={transferTableColumn}
|
|
|
+ rightColumns={transferTableColumn}
|
|
|
+ ></TableTransfer>,
|
|
|
onOk: () => {
|
|
|
return ref.current && ref.current.save();
|
|
|
}
|
|
@@ -438,7 +448,7 @@ const MonthlyInfoCheck: React.FC = () => {
|
|
|
size="small"
|
|
|
bordered={false}
|
|
|
rowKey={'empNo'}
|
|
|
- pagination={{showTitle:false,pageSize:9,showLessItems:false,simple:true,showTotal:()=>false}}
|
|
|
+ pagination={{ showTitle: false, pageSize: 9, showLessItems: false, simple: true, showTotal: () => false }}
|
|
|
tableAlertRender={false}
|
|
|
style={{ pointerEvents: listDisabled ? 'none' : undefined }}
|
|
|
onRow={({ empNo, disabled: itemDisabled }) => ({
|
|
@@ -454,7 +464,7 @@ const MonthlyInfoCheck: React.FC = () => {
|
|
|
)
|
|
|
})
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
const confirmGenerateHandle = async (type: number) => {
|
|
|
const resp = await generateDataRequest({
|
|
@@ -473,9 +483,9 @@ const MonthlyInfoCheck: React.FC = () => {
|
|
|
|
|
|
let msg = '';
|
|
|
|
|
|
- if(type == 1)msg = '生成操作会根据基础设定的单元人员对照信息重新生成数据,手动调整的人员信息将会丢失,确定继续生成操作?';
|
|
|
- if(type == 2)msg = '生成操作会覆盖现有的科室数据,确定继续生成操作?';
|
|
|
- if(type == 3)msg = '生成操作会覆盖现有的收费项目数据,确定继续生成操作?';
|
|
|
+ if (type == 1) msg = '生成操作会根据基础设定的单元人员对照信息重新生成数据,手动调整的人员信息将会丢失,确定继续生成操作?';
|
|
|
+ if (type == 2) msg = '生成操作会覆盖现有的科室数据,确定继续生成操作?';
|
|
|
+ if (type == 3) msg = '生成操作会覆盖现有的收费项目数据,确定继续生成操作?';
|
|
|
|
|
|
|
|
|
Modal.confirm({
|
|
@@ -593,12 +603,55 @@ const MonthlyInfoCheck: React.FC = () => {
|
|
|
set_treeData(resp);
|
|
|
}
|
|
|
|
|
|
- const importHandle = async ()=>{
|
|
|
- const resp = await jixiaoDataImport(currentComputeDate as string );
|
|
|
- if(resp){
|
|
|
+ const importHandle = async () => {
|
|
|
+ const resp = await jixiaoDataImport(currentComputeDate as string);
|
|
|
+ if (resp) {
|
|
|
message.success('操作成功!');
|
|
|
tableRef.current?.reload();
|
|
|
- }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ const checkBtnHandle = () => {
|
|
|
+ //点击检查按钮事件
|
|
|
+ const _tableColumns: ProColumns[] = [
|
|
|
+ {
|
|
|
+ title: '异动类型',
|
|
|
+ width: 120,
|
|
|
+ dataIndex: 'messageType'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '异动信息',
|
|
|
+ dataIndex: 'message',
|
|
|
+ ellipsis: true
|
|
|
+ }
|
|
|
+ ];
|
|
|
+
|
|
|
+ const getInfo = async () => {
|
|
|
+ const resp = await getTransactionInfo(currentComputeDate as string);
|
|
|
+ if (resp) {
|
|
|
+ return {
|
|
|
+ data: resp,
|
|
|
+ success: true,
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return []
|
|
|
+ }
|
|
|
+
|
|
|
+ Modal.info({
|
|
|
+ title: '异动详情',
|
|
|
+ icon: <></>,
|
|
|
+ width: 640,
|
|
|
+ okText: '知道了',
|
|
|
+ centered: true,
|
|
|
+ cancelText: '',
|
|
|
+ content: (
|
|
|
+ <BMSTable columns={[..._tableColumns]} request={async () => getInfo()} />
|
|
|
+ ),
|
|
|
+ onOk: () => {
|
|
|
+ // return ref.current && ref.current.save();
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
}
|
|
|
|
|
|
useEffect(() => {
|
|
@@ -606,6 +659,7 @@ const MonthlyInfoCheck: React.FC = () => {
|
|
|
if (currentComputeDate) {
|
|
|
getTreeReqFunc(currentComputeDate);
|
|
|
getCheckStatus(currentComputeDate);
|
|
|
+ getJiezhuanStatusHandle();
|
|
|
}
|
|
|
}, [currentComputeDate]);
|
|
|
|
|
@@ -722,12 +776,21 @@ const MonthlyInfoCheck: React.FC = () => {
|
|
|
{/* <div style={{width:16,height:'92vh',background:'#F5F7FA'}}></div> */}
|
|
|
<div className='rightContent'>
|
|
|
<BMSPagecontainer title={`核算年月:${currentComputeDate}`} ghost>
|
|
|
- <div className={auditType == '0' ? 'importBtn disabled' : 'importBtn '} onClick={()=>importHandle()} style={{right:auditType == '0'?'64px':'93px'}}>绩效数据导入</div>
|
|
|
- <div className='checkBtn' onClick={() => checkHandle(`${auditType}`)}>{auditType == '0' ? '审核' : '取消审核'}</div>
|
|
|
- {/* <div className='midLine'>
|
|
|
- <span>点击检查</span>
|
|
|
- 是否有未对照的人员信息、未对照的科室信息及未设置的收费项目信息
|
|
|
- </div> */}
|
|
|
+ {
|
|
|
+ !ifBanAllAction && (
|
|
|
+ <>
|
|
|
+ <div className={auditType == '0' ? 'importBtn disabled' : 'importBtn '} onClick={() => importHandle()} style={{ right: auditType == '0' ? '64px' : '93px' }}>绩效数据导入</div>
|
|
|
+ <div className='checkBtn' onClick={() => checkHandle(`${auditType}`)}>{auditType == '0' ? '审核' : '取消审核'}</div>
|
|
|
+ {!ifBanAllAction&&(
|
|
|
+ <div className='midLine'>
|
|
|
+ <span onClick={() => checkBtnHandle()}>点击检查</span>
|
|
|
+ 是否有未对照的人员信息、未对照的科室信息及未设置的收费项目信息
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
+ </>
|
|
|
+ )
|
|
|
+ }
|
|
|
+
|
|
|
<Tabs
|
|
|
defaultActiveKey="1"
|
|
|
onChange={onTabChange}
|
|
@@ -765,19 +828,24 @@ const MonthlyInfoCheck: React.FC = () => {
|
|
|
<IconFont type="iconsousuo" onClick={() => searchEmpHandle()} />
|
|
|
} />
|
|
|
</div>
|
|
|
- <Popover open={ifShowTip} content={'当前处于审核中,无法操作!'} >
|
|
|
- <div className={auditType != '0' ? 'btnGroup disabled' : 'btnGroup'}
|
|
|
- onMouseEnter={() => auditType == '0' ? set_ifShowTip(false) : set_ifShowTip(true)}
|
|
|
- onMouseLeave={() => set_ifShowTip(false)}
|
|
|
- >
|
|
|
- {/* <span key="1">调整</span> */}
|
|
|
- <span key="2" onClick={auditType == '0' ? () => generateFunc(1) : () => { }}>生成</span>
|
|
|
- <span key="3" onClick={auditType == '0' ? () => addPersonFunc() : () => { }}>添加</span>
|
|
|
- </div>
|
|
|
- </Popover>
|
|
|
+ {
|
|
|
+ !ifBanAllAction && (
|
|
|
+ <Popover open={ifShowTip} content={'当前处于审核中,无法操作!'} >
|
|
|
+ <div className={auditType != '0' ? 'btnGroup disabled' : 'btnGroup'}
|
|
|
+ onMouseEnter={() => auditType == '0' ? set_ifShowTip(false) : set_ifShowTip(true)}
|
|
|
+ onMouseLeave={() => set_ifShowTip(false)}
|
|
|
+ >
|
|
|
+ {/* <span key="1">调整</span> */}
|
|
|
+ <span key="2" onClick={auditType == '0' ? () => generateFunc(1) : () => { }}>生成</span>
|
|
|
+ <span key="3" onClick={auditType == '0' ? () => addPersonFunc() : () => { }}>添加</span>
|
|
|
+ </div>
|
|
|
+ </Popover>
|
|
|
+ )
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
</div>
|
|
|
- {currentSelectedTreeNode && <BMSTable params={empFilterParams} actionRef={tableRef} rowKey='empNo' columns={auditType == '0' ? [...tableColumn, {
|
|
|
+ {currentSelectedTreeNode && <BMSTable params={empFilterParams} actionRef={tableRef} rowKey='empNo' columns={(auditType == '0' && !ifBanAllAction) ? [...tableColumn, {
|
|
|
title: '操作',
|
|
|
key: 'option',
|
|
|
valueType: 'option',
|
|
@@ -810,15 +878,22 @@ const MonthlyInfoCheck: React.FC = () => {
|
|
|
<IconFont type="iconsousuo" onClick={() => searchDepHandle()} />
|
|
|
} />
|
|
|
</div>
|
|
|
- <Popover open={ifShowTip} content={'当前处于审核中,无法操作!'} >
|
|
|
- <div className={auditType != '0' ? 'btnGroup disabled' : 'btnGroup'}
|
|
|
- onMouseEnter={() => auditType == '0' ? set_ifShowTip(false) : set_ifShowTip(true)}
|
|
|
- onMouseLeave={() => set_ifShowTip(false)}
|
|
|
- >
|
|
|
- {/* <span key="1">调整</span> */}
|
|
|
- <span key="2" onClick={auditType == '0' ? () => generateFunc(2) : () => { }}>生成</span>
|
|
|
- </div>
|
|
|
- </Popover>
|
|
|
+ {
|
|
|
+ !ifBanAllAction && (
|
|
|
+ <>
|
|
|
+ <Popover open={ifShowTip} content={'当前处于审核中,无法操作!'} >
|
|
|
+ <div className={auditType != '0' ? 'btnGroup disabled' : 'btnGroup'}
|
|
|
+ onMouseEnter={() => auditType == '0' ? set_ifShowTip(false) : set_ifShowTip(true)}
|
|
|
+ onMouseLeave={() => set_ifShowTip(false)}
|
|
|
+ >
|
|
|
+ {/* <span key="1">调整</span> */}
|
|
|
+ <span key="2" onClick={auditType == '0' ? () => generateFunc(2) : () => { }}>生成</span>
|
|
|
+ </div>
|
|
|
+ </Popover>
|
|
|
+ </>
|
|
|
+ )
|
|
|
+ }
|
|
|
+
|
|
|
</div>
|
|
|
{currentSelectedTreeNode && <BMSTable actionRef={tableRef} params={depFilterParams} rowKey='deptCode' columns={tableColumn} request={(params, sort, filter) => getTableData('DEP', params, sort, filter)} />}
|
|
|
</div>
|
|
@@ -842,15 +917,20 @@ const MonthlyInfoCheck: React.FC = () => {
|
|
|
<IconFont type="iconsousuo" onClick={() => searchItemHandle()} />
|
|
|
} />
|
|
|
</div>
|
|
|
- <Popover open={ifShowTip} content={'当前处于审核中,无法操作!'} >
|
|
|
- <div className={auditType != '0' ? 'btnGroup disabled' : 'btnGroup'}
|
|
|
- onMouseEnter={() => auditType == '0' ? set_ifShowTip(false) : set_ifShowTip(true)}
|
|
|
- onMouseLeave={() => set_ifShowTip(false)}
|
|
|
- >
|
|
|
- {/* <span key="1">调整</span> */}
|
|
|
- <span key="2" onClick={auditType == '0' ? () => generateFunc(3) : () => { }}>生成</span>
|
|
|
- </div>
|
|
|
- </Popover>
|
|
|
+ {
|
|
|
+ !ifBanAllAction && (
|
|
|
+ <Popover open={ifShowTip} content={'当前处于审核中,无法操作!'} >
|
|
|
+ <div className={auditType != '0' ? 'btnGroup disabled' : 'btnGroup'}
|
|
|
+ onMouseEnter={() => auditType == '0' ? set_ifShowTip(false) : set_ifShowTip(true)}
|
|
|
+ onMouseLeave={() => set_ifShowTip(false)}
|
|
|
+ >
|
|
|
+ {/* <span key="1">调整</span> */}
|
|
|
+ <span key="2" onClick={auditType == '0' ? () => generateFunc(3) : () => { }}>生成</span>
|
|
|
+ </div>
|
|
|
+ </Popover>
|
|
|
+ )
|
|
|
+ }
|
|
|
+
|
|
|
</div>
|
|
|
{currentSelectedTreeNode && <BMSTable actionRef={tableRef} params={itemFilterParams} rowKey='id' columns={tableColumn} request={(params, sort, filter) => getTableData('CHARGE', params, sort, filter)} />}
|
|
|
</div>
|