|
@@ -4,7 +4,7 @@
|
|
|
* @Author: code4eat awesomedema@gmail.com
|
|
|
* @Date: 2022-12-16 09:42:52
|
|
|
* @LastEditors: code4eat awesomedema@gmail.com
|
|
|
- * @LastEditTime: 2023-08-15 10:22:08
|
|
|
+ * @LastEditTime: 2023-09-26 10:03:20
|
|
|
* @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlySet/index.tsx
|
|
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
|
*/
|
|
@@ -22,7 +22,7 @@ import { DataNode } from 'antd/es/tree';
|
|
|
import expandedIcon from '../../../../static/treenode_open.png';
|
|
|
import closeIcon from '../../../../static/treenode_collapse.png';
|
|
|
import { BMSTable } from '@/components/BMSTable';
|
|
|
-import { ActionType, ModalForm, ProColumns, ProColumnType, ProForm, ProFormDependency, ProFormDigit, ProFormInstance, ProFormSelect, ProFormText, ProFormTextArea } from '@ant-design/pro-components';
|
|
|
+import { ActionType, ModalForm, ProColumns, ProColumnType, ProForm, ProFormDependency, ProFormDigit, ProFormInstance, ProFormSelect, ProFormText, ProFormTextArea, ProFormTreeSelect } from '@ant-design/pro-components';
|
|
|
import { createFromIconfontCN } from '@ant-design/icons';
|
|
|
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';
|
|
|
|
|
@@ -36,7 +36,7 @@ import { getTreeData, getTreeDataRespType } from '../monthlyInfoCheck/service';
|
|
|
import DirectoryTree from 'antd/es/tree/DirectoryTree';
|
|
|
import BMSUpload from '@/components/BMSUpload';
|
|
|
import FormItem from 'antd/es/form/FormItem';
|
|
|
-import { getDeepestTreeData } from '@/utils/tooljs';
|
|
|
+import { getDeepestTreeData, searchLeaves } from '@/utils/tooljs';
|
|
|
|
|
|
|
|
|
import '../../../utils/zhongtaiA'
|
|
@@ -57,31 +57,31 @@ export type TableListItem = {
|
|
|
const tabData = [
|
|
|
{
|
|
|
label: `固定工资`,
|
|
|
- key: '1',
|
|
|
+ key: 'kpi_salary',
|
|
|
},
|
|
|
{
|
|
|
label: `单元成本数据`,
|
|
|
- key: '7',
|
|
|
+ key: 'kpi_unit_cost',
|
|
|
},
|
|
|
{
|
|
|
label: `非考核项目`,
|
|
|
- key: '2',
|
|
|
+ key: 'kpi_non_assessment',
|
|
|
},
|
|
|
{
|
|
|
label: `考核项目`,
|
|
|
- key: '3',
|
|
|
+ key: 'kpi_assessment',
|
|
|
},
|
|
|
{
|
|
|
label: `管理指标`,
|
|
|
- key: '4',
|
|
|
+ key: 'kpi_manage_indicator',
|
|
|
},
|
|
|
{
|
|
|
label: `收入数据`,
|
|
|
- key: '5',
|
|
|
+ key: 'kpi_income',
|
|
|
},
|
|
|
{
|
|
|
label: `成本数据`,
|
|
|
- key: '6',
|
|
|
+ key: 'kpi_cost',
|
|
|
},
|
|
|
]
|
|
|
|
|
@@ -92,7 +92,7 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
const [treeData, set_treeData] = useState<getTreeDataRespType[]>([]);
|
|
|
|
|
|
const [ifShowTip, set_ifShowTip] = useState(false);
|
|
|
-
|
|
|
+ const [unitSearchKeywords, set_unitSearchKeywords] = useState<string | undefined>(undefined); //核算单元搜素关键词
|
|
|
const [expandedKeys, setExpandedKeys] = useState<React.Key[]>([]);
|
|
|
const [searchValue, setSearchValue] = useState('');
|
|
|
const [autoExpandParent, setAutoExpandParent] = useState(true);
|
|
@@ -100,7 +100,7 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
|
|
|
const [tableColumn, set_tableColumn] = useState<ProColumns & { [key: string]: any }[]>([]);
|
|
|
const [currentSelectedTreeNode, set_currentSelectedTreeNode] = useState<any | undefined>();
|
|
|
- const [currentSelectedTabKey, set_currentSelectedTabKey] = useState<string>('1');
|
|
|
+ const [currentSelectedTabKey, set_currentSelectedTabKey] = useState<string>('');
|
|
|
|
|
|
const [currentComputeDate, set_currentComputeDate] = useState<string | undefined>(undefined);
|
|
|
|
|
@@ -128,7 +128,7 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
|
|
|
const access = useAccess();
|
|
|
|
|
|
- const [tabs,set_tabs] = useState<any[]>([]);
|
|
|
+ const [tabs, set_tabs] = useState<any[]>([]);
|
|
|
|
|
|
const [ifBanAllAction, set_ifBanAllAction] = useState(true); //是否掩藏所有操作
|
|
|
|
|
@@ -328,7 +328,7 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
width: 200,
|
|
|
render: (text: any, record: any) => {
|
|
|
|
|
|
- if(ifBanAllAction)return formatMoneyNumber(text);
|
|
|
+ if (ifBanAllAction) return formatMoneyNumber(text);
|
|
|
|
|
|
return (
|
|
|
<div style={{ display: 'flex', flexDirection: 'row', width: '100%', justifyContent: 'flex-start', alignItems: 'center' }}>
|
|
@@ -414,7 +414,7 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
|
|
|
if (inputSalaryNum != undefined) {
|
|
|
|
|
|
- if (curTabKey == '1') {
|
|
|
+ if (curTabKey == 'kpi_salary') {
|
|
|
const resp = await editTableSalaryRequest({
|
|
|
computeDate: currentComputeDate as string,
|
|
|
unitCode,
|
|
@@ -470,13 +470,6 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
|
|
|
}
|
|
|
|
|
|
- const checkProjectEditHandle = (record: any) => {
|
|
|
- // console.log({record});
|
|
|
- const { props: { record: _record } } = record;
|
|
|
- set_currentEditRecord(_record);
|
|
|
- set_editModalVisible(true);
|
|
|
-
|
|
|
- }
|
|
|
|
|
|
const tableDataAddHandle = () => {
|
|
|
set_editModalVisible(true);
|
|
@@ -490,12 +483,12 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
set_editModalVisible(true);
|
|
|
}
|
|
|
|
|
|
- const getJiezhuanStatusHandle =async () => {
|
|
|
+ const getJiezhuanStatusHandle = async () => {
|
|
|
const resp = await getJiezhuanStatus(currentComputeDate as string);
|
|
|
- if(resp == 2){
|
|
|
- set_ifBanAllAction(true);
|
|
|
- }else{
|
|
|
- set_ifBanAllAction(false);
|
|
|
+ if (resp == 2) {
|
|
|
+ set_ifBanAllAction(true);
|
|
|
+ } else {
|
|
|
+ set_ifBanAllAction(false);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -585,10 +578,10 @@ 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' | '7', params: any, sort: any, filter: any) => {
|
|
|
+ const getTableData = async (type: string, params: any, sort: any, filter: any) => {
|
|
|
|
|
|
if (currentComputeDate) {
|
|
|
- if (type == '1') {
|
|
|
+ if (type == 'kpi_salary') {
|
|
|
const resp = await getSalaryInfoTableData({
|
|
|
computeDate: currentComputeDate,
|
|
|
...params
|
|
@@ -603,7 +596,7 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if (type == '2') {
|
|
|
+ if (type == 'kpi_non_assessment') {
|
|
|
const resp = await getNoCheckTableData({
|
|
|
computeDate: currentComputeDate,
|
|
|
...params
|
|
@@ -618,7 +611,7 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if (type == '3') {
|
|
|
+ if (type == 'kpi_assessment') {
|
|
|
|
|
|
|
|
|
|
|
@@ -641,7 +634,7 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if (type == '4') {
|
|
|
+ if (type == 'kpi_manage_indicator') {
|
|
|
if (currentSelectedManaGroup) {
|
|
|
|
|
|
const resp = await getManaIndexTableData({ ...params, computeDate: currentComputeDate, groupId: currentSelectedManaGroup.id });
|
|
@@ -747,7 +740,7 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
|
|
|
}
|
|
|
|
|
|
- if (type == '5') {
|
|
|
+ if (type == 'kpi_income') {
|
|
|
const resp = await getIncomeData({
|
|
|
computeDate: currentComputeDate,
|
|
|
...params
|
|
@@ -763,7 +756,7 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if (type == '6') {
|
|
|
+ if (type == 'kpi_cost') {
|
|
|
const resp = await getCostData({
|
|
|
computeDate: currentComputeDate,
|
|
|
...params
|
|
@@ -779,7 +772,7 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if (type == '7' && currentSelectedTreeNode) {
|
|
|
+ if (type == 'kpi_unit_cost' && currentSelectedTreeNode) {
|
|
|
const resp = await getUnitCostTableData({
|
|
|
unitCode: currentSelectedTreeNode.code,
|
|
|
...params
|
|
@@ -905,10 +898,10 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
|
|
|
|
|
|
//获取数据
|
|
|
- const confirmGenerateHandle: any = async (index: number, others?: any) => {
|
|
|
+ const confirmGenerateHandle: any = async (code: string, others?: any) => {
|
|
|
|
|
|
|
|
|
- if (index == 3) {
|
|
|
+ if (code == 'kpi_assessment') {
|
|
|
const resp = await generateCheckProjectTableData({
|
|
|
computeDate: currentComputeDate as string,
|
|
|
unitCode: others ? currentSelectedTreeNode.code : ''
|
|
@@ -922,7 +915,7 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
return Promise.resolve(true);
|
|
|
|
|
|
}
|
|
|
- if (index == 7) {
|
|
|
+ if (code == 'kpi_cost') {
|
|
|
const resp = await generateUnitCostTableData(
|
|
|
currentComputeDate as string,
|
|
|
currentSelectedTreeNode.code
|
|
@@ -938,19 +931,19 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- const generateFunc = (index: number, others?: any) => {
|
|
|
+ const generateFunc = (code: string, others?: any) => {
|
|
|
/**
|
|
|
* index 获取的表格类型下标
|
|
|
*/
|
|
|
|
|
|
- if ((index == 3 || index == 7) && !loading) {
|
|
|
+ if ((code == 'kpi_assessment' || code == 'kpi_cost') && !loading) {
|
|
|
Modal.confirm({
|
|
|
title: '注意',
|
|
|
cancelText: '',
|
|
|
okText: '确定',
|
|
|
closable: true,
|
|
|
- content: others ? '获取单个操作会覆盖上次获取的该核算单元的数据,确定要继续操作?' : `${index == 7 ? '获取' : '获取所有'}操作会覆盖所有已获取的数据,确定要继续操作?`,
|
|
|
- onOk: () => { set_loading(true); confirmGenerateHandle(index, others) }
|
|
|
+ content: others ? '获取单个操作会覆盖上次获取的该核算单元的数据,确定要继续操作?' : `${code == 'kpi_cost' ? '获取' : '获取所有'}操作会覆盖所有已获取的数据,确定要继续操作?`,
|
|
|
+ onOk: () => { set_loading(true); confirmGenerateHandle(code, others) }
|
|
|
})
|
|
|
}
|
|
|
}
|
|
@@ -1025,7 +1018,7 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- const importData = (index: number, name: string) => {
|
|
|
+ const importData = (code: string, name: string) => {
|
|
|
if (ifBanAllAction) return;
|
|
|
return (
|
|
|
<ModalForm
|
|
@@ -1055,7 +1048,7 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
const { importFile: { fileList } } = values;
|
|
|
|
|
|
let formData = new FormData();
|
|
|
- if (index == 7) {
|
|
|
+ if (code == 'kpi_unit_cost') {
|
|
|
formData.append('file', fileList[0].originFileObj);
|
|
|
formData.append('computeDate', currentComputeDate as string);
|
|
|
formData.append('unitCode', currentSelectedTreeNode.code);
|
|
@@ -1066,7 +1059,7 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
}
|
|
|
|
|
|
|
|
|
- const resp = await importMonthlyperformanceRelaFiles(index, formData);
|
|
|
+ const resp = await importMonthlyperformanceRelaFiles(code, formData);
|
|
|
|
|
|
if (resp) {
|
|
|
tableRef.current?.reload();
|
|
@@ -1076,7 +1069,7 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
}}
|
|
|
>
|
|
|
<FormItem name={'importFile'}>
|
|
|
- <BMSUpload downloadTemplateFile={auditType == '0' ? () => index == 4 || index == 7 ? downloadTemplate(index, index == 7 ? currentSelectedTreeNode.code : currentSelectedManaGroup?.id) : downloadTemplate(index) : () => { }} />
|
|
|
+ <BMSUpload downloadTemplateFile={auditType == '0' ? () => code == 'kpi_assessment' || code == 'kpi_unit_cost' ? downloadTemplate(code, code == 'kpi_unit_cost' ? currentSelectedTreeNode.code : currentSelectedManaGroup?.id) : downloadTemplate(code) : () => { }} />
|
|
|
</FormItem>
|
|
|
|
|
|
</ModalForm>
|
|
@@ -1110,8 +1103,8 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- const downloadTemplate = async (index: number, id?: number) => {
|
|
|
- await downloadTemplateReq(index, id);
|
|
|
+ const downloadTemplate = async (code: string, id?: number) => {
|
|
|
+ await downloadTemplateReq(code, id);
|
|
|
|
|
|
|
|
|
// if(index == 4){
|
|
@@ -1172,31 +1165,32 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
|
|
|
useEffect(() => {
|
|
|
//清空表格筛选项
|
|
|
+
|
|
|
set_tableDataFilterParams(undefined);
|
|
|
set_currentSelectedTreeNode(undefined);
|
|
|
|
|
|
- if (currentSelectedTabKey == '1') {
|
|
|
+ if (currentSelectedTabKey == 'kpi_salary') {
|
|
|
set_tableColumn(tableColumnOne as ProColumns[]);
|
|
|
}
|
|
|
- if (currentSelectedTabKey == '2') {
|
|
|
+ if (currentSelectedTabKey == 'kpi_non_assessment') {
|
|
|
set_tableColumn(tableColumnTwo as ProColumns[]);
|
|
|
}
|
|
|
- if (currentSelectedTabKey == '3') {
|
|
|
+ if (currentSelectedTabKey == 'kpi_assessment') {
|
|
|
if (currentComputeDate) {
|
|
|
getCheckUnitTreeDataFunc(currentComputeDate as string);
|
|
|
}
|
|
|
set_tableColumn(tableColumnThree as ProColumns[]);
|
|
|
}
|
|
|
- if (currentSelectedTabKey == '4') {
|
|
|
+ if (currentSelectedTabKey == 'kpi_manage_indicator') {
|
|
|
getManaIndiGroupRequest(); //获取分组
|
|
|
}
|
|
|
- if (currentSelectedTabKey == '5') {
|
|
|
+ if (currentSelectedTabKey == 'kpi_income') {
|
|
|
set_tableColumn(tableColumnFive as ProColumns[]);
|
|
|
}
|
|
|
- if (currentSelectedTabKey == '6') {
|
|
|
+ if (currentSelectedTabKey == 'kpi_cost') {
|
|
|
set_tableColumn(tableColumnFive as ProColumns[]);
|
|
|
}
|
|
|
- if (currentSelectedTabKey == '7') {
|
|
|
+ if (currentSelectedTabKey == 'kpi_unit_cost') {
|
|
|
if (currentComputeDate) {
|
|
|
getCheckUnitTreeDataFunc(currentComputeDate as string);
|
|
|
}
|
|
@@ -1206,7 +1200,7 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
}, [currentSelectedTabKey]);
|
|
|
|
|
|
useEffect(() => {
|
|
|
- if (currentSelectedTabKey == '7') {
|
|
|
+ if (currentSelectedTabKey == 'kpi_cost') {
|
|
|
// if (currentComputeDate) {
|
|
|
// getCheckUnitTreeDataFunc(currentComputeDate as string);
|
|
|
// }
|
|
@@ -1251,9 +1245,11 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
getComputeMethod();
|
|
|
|
|
|
const tabs = access.whatCanIDoInThisPage(location.pathname.replace('/budgetManaSystem', ''));
|
|
|
- const tabsNameArr = tabs.map((a:any)=>a.name);
|
|
|
- const needShowTabs = tabData.filter(a=>tabsNameArr.includes(a.label));
|
|
|
+ const tabsNameArr = tabs.map((a: any) => a.code);
|
|
|
+ const needShowTabs = tabData.filter(a => tabsNameArr.includes(a.key));
|
|
|
+
|
|
|
set_tabs(needShowTabs);
|
|
|
+ needShowTabs.length > 0 && set_currentSelectedTabKey(needShowTabs[0].key);
|
|
|
window.addEventListener('resize', (e) => handleResize(e)) //监听窗口大小改变
|
|
|
doResize();
|
|
|
return () => {
|
|
@@ -1266,7 +1262,7 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
<div className='MonthlyDataCheck'>
|
|
|
{
|
|
|
true && (
|
|
|
- <BMSModalForm formRef={formRef} open={editModalVisible} initialValues={isTableEdit ? { ...currentEditRecord } : {}} title={isTableEdit ? '编辑' : '新增'}
|
|
|
+ <BMSModalForm formRef={formRef} open={editModalVisible} initialValues={isTableEdit ? { ...currentEditRecord } : { unitCode: 'A010101' }} title={isTableEdit ? '编辑' : '新增'}
|
|
|
size="middle" width={737} onOpenChange={onVisibleChangeHandle}
|
|
|
modalProps={{
|
|
|
destroyOnClose: true
|
|
@@ -1274,7 +1270,7 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
onFinish={(val: any) => tableFormCommit(val, isTableEdit ? 'edit' : 'add')}
|
|
|
>
|
|
|
{
|
|
|
- currentSelectedTabKey == '1' && (
|
|
|
+ currentSelectedTabKey == 'kpi_salary' && (
|
|
|
<>
|
|
|
<ProFormText width="md" name="itemName" label="项目名" disabled />
|
|
|
<ProFormText width="md" name="itemTypeName" label="类型" disabled />
|
|
@@ -1284,52 +1280,69 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
)
|
|
|
}
|
|
|
{
|
|
|
- currentSelectedTabKey == '2' && (
|
|
|
+ currentSelectedTabKey == 'kpi_non_assessment' && (
|
|
|
<>
|
|
|
<ProForm.Group >
|
|
|
- <ProFormSelect
|
|
|
- name="deptCode"
|
|
|
- label="科室名称"
|
|
|
+ <ProFormTreeSelect
|
|
|
+ name="unitCode"
|
|
|
+ label="核算单元"
|
|
|
placeholder="请选择"
|
|
|
colProps={{ span: 12 }}
|
|
|
rules={[{ required: true }]}
|
|
|
request={async () => {
|
|
|
- const resp = await getDepLists();
|
|
|
+ const resp = await getHesuanUnits(currentComputeDate as string);
|
|
|
if (resp) {
|
|
|
-
|
|
|
- return resp.map((a: any) => ({
|
|
|
- label: a.deptName, value: a.deptCode, d: a
|
|
|
- }))
|
|
|
+ return resp
|
|
|
}
|
|
|
return []
|
|
|
}}
|
|
|
fieldProps={{
|
|
|
showSearch: true,
|
|
|
+ treeDefaultExpandedKeys: ['A010101'],
|
|
|
+ filterTreeNode(inputValue, treeNode) {
|
|
|
+ const match = `${treeNode.name}`.indexOf(inputValue) != -1;
|
|
|
+
|
|
|
+ if (match && !treeNode.isLeaf && !treeNode.children) {
|
|
|
+ // Do some loading logic
|
|
|
+ }
|
|
|
+
|
|
|
+ return match;
|
|
|
+ },
|
|
|
+ fieldNames: {
|
|
|
+ label: 'name',
|
|
|
+ value: 'code',
|
|
|
+ children: 'child'
|
|
|
+ },
|
|
|
+ treeExpandAction: false,
|
|
|
+ switcherIcon: (props: any) => {
|
|
|
+ const { expanded } = props;
|
|
|
+ return !expanded ? <img style={{ width: 20, height: 20, position: 'relative', top: 2 }} src={expandedIcon} /> : <img style={{ width: 20, height: 20, position: 'relative', top: 2 }} src={closeIcon} />
|
|
|
+ },
|
|
|
onChange: (value) => {
|
|
|
- formRef.current?.setFieldValue('unitCode', '');
|
|
|
+ formRef.current?.setFieldValue('deptCode', '');
|
|
|
}
|
|
|
}}
|
|
|
/>
|
|
|
|
|
|
- <ProFormDependency name={['deptCode']}>
|
|
|
+ <ProFormDependency name={['unitCode']}>
|
|
|
{
|
|
|
- ({ deptCode }) => {
|
|
|
+ ({ unitCode }) => {
|
|
|
// console.log({deptCode});
|
|
|
return (
|
|
|
<ProFormSelect
|
|
|
- disabled={deptCode ? false : true}
|
|
|
- name="unitCode"
|
|
|
- label="核算单元"
|
|
|
+ name="deptCode"
|
|
|
+ label="科室名称"
|
|
|
colProps={{ span: 12 }}
|
|
|
placeholder="请选择"
|
|
|
- rules={[{ required: true }]}
|
|
|
- params={deptCode}
|
|
|
+ // rules={[{ required: true }]}
|
|
|
+ params={unitCode}
|
|
|
request={async () => {
|
|
|
- if (deptCode) {
|
|
|
- const resp = await getHesuanUnits(deptCode);
|
|
|
+ if (unitCode) {
|
|
|
+
|
|
|
+ const resp = await getDepLists(unitCode);
|
|
|
if (resp) {
|
|
|
- return resp.map((a: any) => ({
|
|
|
- label: a.unitName, value: a.unitCode, d: a
|
|
|
+ return resp.list.map((a: any) => ({
|
|
|
+ label: a.deptName, value: a.deptCode, d: a
|
|
|
}))
|
|
|
}
|
|
|
}
|
|
@@ -1338,7 +1351,6 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
fieldProps={{
|
|
|
showSearch: true,
|
|
|
onChange: (value) => {
|
|
|
-
|
|
|
formRef.current?.setFieldValue('targetValue', '');
|
|
|
}
|
|
|
}}
|
|
@@ -1368,7 +1380,6 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
fieldProps={{
|
|
|
labelInValue: true,
|
|
|
onChange: (value) => {
|
|
|
-
|
|
|
const { d: { distributionTypeName } } = value;
|
|
|
formRef.current?.setFieldValue('distributionTypeName', distributionTypeName);
|
|
|
}
|
|
@@ -1408,7 +1419,7 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
|
|
|
if (resp) {
|
|
|
return resp.map((a: any) => ({
|
|
|
- label: a.name, value: a.userId, d: a
|
|
|
+ label:`${a.name}-${a.userId}`, value: a.userId, d: a
|
|
|
}))
|
|
|
}
|
|
|
}
|
|
@@ -1451,19 +1462,21 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
<span>点击检查</span>
|
|
|
是否有未对照的人员信息、未对照的科室信息及未设置的收费项目信息
|
|
|
</div> */}
|
|
|
- <Tabs
|
|
|
- defaultActiveKey="1"
|
|
|
- onChange={onTabChange}
|
|
|
- items={tabs}
|
|
|
- />
|
|
|
+ {
|
|
|
+ tabs.length > 0 && <Tabs
|
|
|
+ defaultActiveKey={tabs[0].key}
|
|
|
+ onChange={onTabChange}
|
|
|
+ items={tabs}
|
|
|
+ />
|
|
|
+ }
|
|
|
|
|
|
{
|
|
|
- currentSelectedTabKey == '1' && (
|
|
|
+ currentSelectedTabKey == 'kpi_salary' && (
|
|
|
<div className='tabContent'>
|
|
|
<div className='tableToolbar'>
|
|
|
<div className='filter'>
|
|
|
<div className='search'>
|
|
|
- <span>科室名称:</span><Input className='searchInput' allowClear placeholder="请输入" onChange={(e) => {
|
|
|
+ <span>核算单元名称:</span><Input className='searchInput' allowClear placeholder="请输入" onChange={(e) => {
|
|
|
set_tableDataSearchKeywords(e.target.value);
|
|
|
if (e.target.value.length == 0) {
|
|
|
set_tableDataFilterParams({
|
|
@@ -1472,8 +1485,9 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
});
|
|
|
}
|
|
|
}} suffix={
|
|
|
- <IconFont type="iconsousuo" style={{ color: '#99A6BF' }} onClick={() => tableDataSearchHandle('deptName')} />
|
|
|
+ <IconFont type="iconsousuo" onClick={() => tableDataSearchHandle('deptName')} />
|
|
|
} />
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
<Popover open={ifShowTip} content={'当前处于审核中,无法操作!'} placement='topRight'>
|
|
@@ -1483,7 +1497,7 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
>
|
|
|
{/* <span key="1">调整</span> */}
|
|
|
{/* <span key="2" onClick={() => generateFunc()}>获取</span> */}
|
|
|
- {importData(1, '固定工资')}
|
|
|
+ {importData('kpi_salary', '固定工资')}
|
|
|
</div>
|
|
|
</Popover>
|
|
|
</div>
|
|
@@ -1551,18 +1565,18 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- ]} request={(params, sort, filter) => getTableData('1', params, sort, filter)} />}
|
|
|
+ ]} request={(params, sort, filter) => getTableData('kpi_salary', params, sort, filter)} />}
|
|
|
</div>
|
|
|
)
|
|
|
}
|
|
|
|
|
|
{
|
|
|
- currentSelectedTabKey == '2' && (
|
|
|
+ currentSelectedTabKey == 'kpi_non_assessment' && (
|
|
|
<div className='tabContent'>
|
|
|
<div className='tableToolbar'>
|
|
|
<div className='filter'>
|
|
|
<div className='search'>
|
|
|
- <span>科室名称:</span><Input className='searchInput' allowClear placeholder="请输入" onChange={(e) => {
|
|
|
+ <span>核算单元名称:</span><Input className='searchInput' allowClear placeholder="请输入" onChange={(e) => {
|
|
|
set_tableDataSearchKeywords(e.target.value);
|
|
|
if (e.target.value.length == 0) {
|
|
|
set_tableDataFilterParams({
|
|
@@ -1582,7 +1596,7 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
>
|
|
|
{/* <span key="1" onClick={() => generateFunc(2)} >获取</span>
|
|
|
<span key="2" >导入</span> */}
|
|
|
- {importData(2, '非考核项目')}
|
|
|
+ {importData('kpi_non_assessment', '非考核项目')}
|
|
|
{!ifBanAllAction && <span key="3" onClick={auditType == '0' ? () => tableDataAddHandle() : () => { }}>添加</span>}
|
|
|
</div>
|
|
|
</Popover>
|
|
@@ -1609,13 +1623,13 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
<a >删除</a>
|
|
|
</Popconfirm>
|
|
|
],
|
|
|
- }] : [...tableColumn]} request={(params, sort, filter) => getTableData('2', params, sort, filter)} />}
|
|
|
+ }] : [...tableColumn]} request={(params, sort, filter) => getTableData('kpi_non_assessment', params, sort, filter)} />}
|
|
|
</div>
|
|
|
)
|
|
|
}
|
|
|
|
|
|
{
|
|
|
- currentSelectedTabKey == '3' && (
|
|
|
+ currentSelectedTabKey == 'kpi_assessment' && (
|
|
|
<div className='tabContent'>
|
|
|
|
|
|
<div className='tabContentInner'>
|
|
@@ -1716,8 +1730,8 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
onMouseEnter={() => auditType == '0' ? set_ifShowTip(false) : set_ifShowTip(true)}
|
|
|
onMouseLeave={() => set_ifShowTip(false)}
|
|
|
>
|
|
|
- <span key="1" onClick={auditType == '0' ? () => generateFunc(3, true) : () => { }}>获取单个</span>
|
|
|
- <span key="2" onClick={auditType == '0' ? () => generateFunc(3) : () => { }}>获取所有</span>
|
|
|
+ <span key="1" onClick={auditType == '0' ? () => generateFunc('kpi_assessment', true) : () => { }}>获取单个</span>
|
|
|
+ <span key="2" onClick={auditType == '0' ? () => generateFunc('kpi_assessment') : () => { }}>获取所有</span>
|
|
|
</div>
|
|
|
</Popover>
|
|
|
)
|
|
@@ -1767,7 +1781,7 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
key: 'value',
|
|
|
|
|
|
}
|
|
|
- ]} request={(params, sort, filter) => getTableData('3', params, sort, filter)} />}
|
|
|
+ ]} request={(params, sort, filter) => getTableData('kpi_assessment', params, sort, filter)} />}
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
@@ -1776,7 +1790,7 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
)
|
|
|
}
|
|
|
{
|
|
|
- currentSelectedTabKey == '4' && (
|
|
|
+ currentSelectedTabKey == 'kpi_manage_indicator' && (
|
|
|
<div className='tabContent'>
|
|
|
<div className='tableToolbar'>
|
|
|
<div className='filter'>
|
|
@@ -1812,7 +1826,7 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
onMouseLeave={() => set_ifShowTip(false)}
|
|
|
>
|
|
|
{/* <span key="1">获取</span> */}
|
|
|
- {importData(4, '管理指标')}
|
|
|
+ {importData('kpi_manage_indicator', '管理指标')}
|
|
|
</div>
|
|
|
</Popover>
|
|
|
</div>
|
|
@@ -1827,12 +1841,12 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
render: (_: any, record: any) => [
|
|
|
<EditManaIndexTableRow record={record} key={'edit'} />
|
|
|
],
|
|
|
- }] : [...tableColumn]} pagination={false} params={tableDataFilterParams} request={(params, sort, filter) => getTableData('4', params, sort, filter)} />}
|
|
|
+ }] : [...tableColumn]} pagination={false} params={tableDataFilterParams} request={(params, sort, filter) => getTableData('kpi_manage_indicator', params, sort, filter)} />}
|
|
|
</div>
|
|
|
)
|
|
|
}
|
|
|
{
|
|
|
- currentSelectedTabKey == '5' && (
|
|
|
+ currentSelectedTabKey == 'kpi_income' && (
|
|
|
<div className='tabContent' >
|
|
|
<div className='tableToolbar'>
|
|
|
<div className='filter'>
|
|
@@ -1856,17 +1870,17 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
onMouseLeave={() => set_ifShowTip(false)}
|
|
|
>
|
|
|
{/* <span key="1">获取</span> */}
|
|
|
- {importData(5, '收入')}
|
|
|
+ {importData('kpi_income', '收入')}
|
|
|
</div>
|
|
|
</Popover>
|
|
|
</div>
|
|
|
- {currentComputeDate && <BMSTable actionRef={tableRef} rowKey='id' params={tableDataFilterParams} columns={tableColumn} request={(params, sort, filter) => getTableData('5', params, sort, filter)} />}
|
|
|
+ {currentComputeDate && <BMSTable actionRef={tableRef} rowKey='id' params={tableDataFilterParams} columns={tableColumn} request={(params, sort, filter) => getTableData('kpi_income', params, sort, filter)} />}
|
|
|
<div className='totalCount'>合计:{totalNum}</div>
|
|
|
</div>
|
|
|
)
|
|
|
}
|
|
|
{
|
|
|
- currentSelectedTabKey == '6' && (
|
|
|
+ currentSelectedTabKey == 'kpi_cost' && (
|
|
|
<div className='tabContent'>
|
|
|
<div className='tableToolbar'>
|
|
|
<div className='filter'>
|
|
@@ -1890,17 +1904,17 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
onMouseLeave={() => set_ifShowTip(false)}
|
|
|
>
|
|
|
{/* <span key="1">获取</span> */}
|
|
|
- {importData(6, '成本')}
|
|
|
+ {importData('kpi_cost', '成本')}
|
|
|
</div>
|
|
|
</Popover>
|
|
|
</div>
|
|
|
- {currentComputeDate && <BMSTable actionRef={tableRef} rowKey='id' params={tableDataFilterParams} columns={tableColumn} request={(params, sort, filter) => getTableData('6', params, sort, filter)} />}
|
|
|
+ {currentComputeDate && <BMSTable actionRef={tableRef} rowKey='id' params={tableDataFilterParams} columns={tableColumn} request={(params, sort, filter) => getTableData('kpi_cost', params, sort, filter)} />}
|
|
|
<div className='totalCount'>合计:{totalNum}</div>
|
|
|
</div>
|
|
|
)
|
|
|
}
|
|
|
{
|
|
|
- currentSelectedTabKey == '7' && (
|
|
|
+ currentSelectedTabKey == 'kpi_unit_cost' && (
|
|
|
<div className='tabContent'>
|
|
|
|
|
|
<div className='tabContentInner'>
|
|
@@ -2005,8 +2019,8 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
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, '成本')}</>
|
|
|
+ <span key="1" onClick={auditType == '0' ? () => generateFunc('kpi_unit_cost', false) : () => { }}>获取</span>
|
|
|
+ <>{importData('kpi_unit_cost', '单元成本')}</>
|
|
|
</div>
|
|
|
</Popover>
|
|
|
)
|
|
@@ -2015,7 +2029,7 @@ const MonthlyDataCheck: React.FC = () => {
|
|
|
</>
|
|
|
|
|
|
</div>
|
|
|
- {currentComputeDate && <BMSTable actionRef={tableRef} scroll={{ y: 666 }} loading={{ spinning: loading, tip: '正在获取数据...' }} rowKey='id' params={tableDataFilterParams} columns={[...tableColumn]} pagination={false} request={(params, sort, filter) => getTableData('7', params, sort, filter)} />}
|
|
|
+ {currentComputeDate && <BMSTable actionRef={tableRef} scroll={{ y: 666 }} loading={{ spinning: loading, tip: '正在获取数据...' }} rowKey='id' params={tableDataFilterParams} columns={[...tableColumn]} pagination={false} request={(params, sort, filter) => getTableData('kpi_unit_cost', params, sort, filter)} />}
|
|
|
</div>
|
|
|
|
|
|
</div>
|