@@ -2,7 +2,7 @@
* @Author: code4eat awesomedema@gmail.com
* @Date: 2023-08-02 11:28:57
* @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2024-11-18 16:40:00
+ * @LastEditTime: 2024-12-03 15:44:40
* @FilePath: /MediResourceManaSys/.umirc.ts
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
@@ -18,6 +18,7 @@ const path = require('path');
export default defineConfig({
+ hash:true,
antd: {
configProvider: {
prefixCls: 'mrms-ant',
@@ -63,7 +64,7 @@ export default defineConfig({
manifest: {
basePath: '/',
},
- publicPath: REACT_APP_ENV == 'dev' ? '/' : '/qualification/',
+ publicPath: REACT_APP_ENV == 'dev' ? '/' : '/medical/',
proxy: {
'/gateway': {
target: 'http://120.27.235.181:5000/gateway',//开发
@@ -78,7 +79,6 @@ export default defineConfig({
path: '/',
redirect: '/home',
- { path: '*', component: '@/pages/404' },
{
path: '/noAccess',
component: './noAccess',
@@ -87,6 +87,50 @@ export default defineConfig({
path: '/home',
component: './Home/index',
+ {
+ path:'/personalCenter',
+ name:'个人中心',
+ routes:[
+ // {
+ // name:'我的资质',
+ // path: '/personalCenter/qualificationClassfiMana',
+ // component: './qualificationMana/qualificationClassfiMana/index',
+ // },
+ name:'我的申请',
+ path: '/personalCenter/myApplication',
+ component: './personalCenter/myApplication/index',
+ },
+ ]
+ path:'/qualificationMana',
+ name:'资质管理',
+ name:'资质授权',
+ path: '/qualificationMana/qualificationAuth',
+ component: './qualificationMana/qualificationAuth/index',
+ name:'资质分类管理',
+ path: '/qualificationMana/qualificationClassfiMana',
+ component: './qualificationMana/qualificationClassfiMana/index',
+ name:'资质字典管理',
+ path: '/qualificationMana/qualifiDicMana',
+ component: './qualificationMana/qualifiDicMana/index',
+ name:'资质审批',
+ path: '/qualificationMana/qualificationApproval/:type',
+ component: './qualificationMana/qualificationApproval/index',
+ { path: '*', component: '@/pages/404' },
+
@@ -145,15 +145,15 @@ export async function getInitialState(): Promise<{
// 默认的计算日期
let computeDate = `${new Date().getFullYear()}-${(new Date().getMonth() + 1).toString().padStart(2, '0')}`;
- try {
- // 获取最新计算日期的请求
- const resp = await getLastComputeDate();
- if (resp) {
- computeDate = resp; // 更新计算日期
- }
- } catch (error) {
- console.error('获取计算日期失败:', error); // 捕获和处理错误
+ // try {
+ // // 获取最新计算日期的请求
+ // const resp = await getLastComputeDate();
+ // if (resp) {
+ // computeDate = resp; // 更新计算日期
+ // }
+ // } catch (error) {
+ // console.error('获取计算日期失败:', error); // 捕获和处理错误
// 返回状态
return {
@@ -216,17 +216,24 @@ export const request: RequestConfig = {
responseInterceptors: [
(response: AxiosResponse) => {
// 拦截响应数据,进行个性化处理
- const { status, data: { status: code, errorMessage, msg }, config: { method } } = response;
+ const { status, data: { status: code, errorMessage, msg,errorCode }, config: { method } } = response;
try {
if (status == 200) {
// 网络请求成功
- if (errorMessage && errorMessage.indexOf('Token') != -1) {
- console.log({ response, errorMessage });
- localStorage.removeItem('tokenExpired');
-
- return false;
+ if (errorCode == 401) {
+ Modal.confirm({
+ title: '抱歉,你的登录已过期,请重新登录!',
+ okText: '确定',
+ cancelText: '取消',
+ maskClosable: false,
+ // cancelButtonProps:
+ onOk: () => {
+ localStorage.removeItem('tokenExpired');
+ });
+ return false
}
@@ -310,7 +317,7 @@ const mappingIcon = (menuData: menuDataItemType[]) => {
const mappingMenu: menuDataItemType[] = menuData.map(item => ({
...item,
- icon: item.icon && iconEnum[item.icon],
+ icon: item.icon && iconEnum[item.icon as keyof typeof iconEnum],
children: item.children ? mappingIcon(item.children) : [],
}));
return mappingMenu;
@@ -516,25 +523,13 @@ export const layout = ({ initialState, setInitialState }: { initialState: any, s
if (node.path == '/home') {
node.icon = <Icon component={imgNode} />;
- if (node.path == '/baseSetting') {
+ if (node.path == '/qualificationMana') {
node.icon = <Icon component={setting} />;
- if (node.path == '/monthlyInfoSearch') {
+ if (node.path == '/personalCenter') {
node.icon = <Icon component={() => <IconFont type='icon-yueduxinxicaiji' />} />;
- if (node.path == '/costAccounting') {
- node.icon = <Icon component={() => <IconFont type='icon-jixiaoguanli' />} />;
- if (node.path == '/reportExport') {
- if (node.path == '/costLibraryManagement') {
- node.icon = <Icon component={() => <IconFont type='icon-chengbenkuguanli' />} />;
- if (node.path == '/static') {
- node.icon = <Icon component={() => <IconFont type='icon-baobiaochaxun' />} />;
if (node.children) {
node.children.forEach((child: any) => addIconToPath(child, paths));
@@ -542,7 +537,7 @@ export const layout = ({ initialState, setInitialState }: { initialState: any, s
_menu.forEach((item: any) => {
- addIconToPath(item, ['/home', '/baseInfoMana', '/costAccounting', '/monthlyInfoSearch', '/static', '/reportExport', '/costLibraryManagement', '/baseSetting']);
+ addIconToPath(item, ['/home', '/qualificationMana', '/personalCenter']);
});
const { newTree, firstLeafNode, firstLeafNodePath } = transformTree(_menu);
@@ -1,272 +1,250 @@
import { createFromIconfontCN } from '@ant-design/icons';
-import Dropdown from '@ant-design/pro-table/es/components/Dropdown';
-import { Input, Tooltip, TreeProps, Empty } from 'antd'
+import { Input, Tooltip, TreeProps, Empty } from 'antd';
import { Key, useEffect, useState } from 'react';
import DirectoryTree from 'antd/es/tree/DirectoryTree';
import { DataNode } from 'antd/es/tree';
import './style.less';
-import expandedIcon from '../../../static/treenode_open.png';
-import closeIcon from '../../../static/treenode_collapse.png';
const IconFont = createFromIconfontCN({
- scriptUrl: '',
+ scriptUrl: '',
interface ListItem {
- name: string,
- subText: string,
- [key: string]: any
+ name: string;
+ subText: string;
+ [key: string]: any;
interface TreeNodeItem {
export interface KCIMLeftListProps {
- dataSource?: any[],
- searchKey: string,
- placeholder?: string,
- listType?: 'list' | 'tree',
- icon?: string,
- contentH?: number|string,
- rowKey?: string,
- fieldNames?: { title?: string, key?: string, children?: string },
- onChange?: (selectedItem: ListItem) => void
+ dataSource: any[];
+ searchKey: string;
+ placeholder?: string;
+ listType?: 'list' | 'tree';
+ icon?: string;
+ contentH?: number | string;
+ rowKey?: string;
+ fieldNames?: { title?: string; key?: string; children?: string };
+ defaultSelectType?: 'leaf' | 'node'; // 新增属性
+ onChange?: (selectedItem: ListItem) => void;
-function searchTreeAndKeepHierarchy(tree: any[], keyword: string, searchKey: string, children: string) {
- function search(node: any) {
- // 深度复制节点,避免修改原始树
- let newNode = { ...node };
- if (node[`${searchKey}`].includes(keyword)) {
- // 如果节点名称包含关键字,返回整个节点及其子节点
- return newNode;
- } else if (node[`${children}`] && node[`${children}`].length > 0) {
- // 如果当前节点不匹配但有子节点,递归搜索子节点
- let filteredChildren = node[`${children}`].map(search).filter((child: any) => child !== null); // 递归并过滤掉null
- if (filteredChildren.length > 0) {
- // 如果有子节点匹配,只返回匹配的子节点
- newNode[`${children}`] = filteredChildren;
- // 如果节点和其子节点都不匹配,返回null
- return null;
+function searchTreeAndKeepHierarchy(
+ tree: any[],
+ keyword: string,
+ searchKey: string,
+ children: string,
+) {
+ function search(node: any) {
+ let newNode = { ...node };
+ if (node[`${searchKey}`].includes(keyword)) {
+ return newNode;
+ } else if (node[`${children}`] && node[`${children}`].length > 0) {
+ let filteredChildren = node[`${children}`]
+ .map(search)
+ .filter((child: any) => child !== null);
+ if (filteredChildren.length > 0) {
+ newNode[`${children}`] = filteredChildren;
+ }
- // 对树的每个根节点进行搜索,并过滤掉不匹配的节点
- return tree.map(search).filter(node => node !== null);
+ return null;
+ return tree.map(search).filter((node) => node !== null);
const findFirstLeafNodeWithParents: any = (node: any, children: string) => {
- // 定义一个内部递归函数来处理节点和跟踪父节点
- const findNode: any = (currentNode: any, parents: any[]) => {
- // 打印当前节点信息,用于调试
- // console.log({ currentNode });
- // 检查当前节点是否为叶子节点(无子节点或子节点为空数组)
- if (!currentNode[children] || currentNode[children].length === 0) {
- return { leafNode: currentNode, parents };
- // 添加当前节点到父节点列表
- parents.push(currentNode);
- // 递归查找第一个子节点的第一个叶子节点
- return findNode(currentNode[children][0], parents);
- };
- // 调用内部函数,初始父节点列表为空
- return findNode(node, []);
-}
+ const findNode: any = (currentNode: any, parents: any[]) => {
+ if (!currentNode[children] || currentNode[children].length === 0) {
+ return { leafNode: currentNode, parents };
+ parents.push(currentNode);
+ return findNode(currentNode[children][0], parents);
+ };
+ return findNode(node, []);
+};
export const KCIMLeftList = (props: KCIMLeftListProps) => {
- const { searchKey, placeholder = '请输入', onChange, listType = 'list', dataSource: data = [], icon, contentH = 500, rowKey = 'id', fieldNames = { title: 'title', key: 'key', children: 'children' } } = props;
- const [dataSource, set_dataSource] = useState<ListItem[] | TreeNodeItem[]>([]);
- const [showList, set_showList] = useState<ListItem[] | TreeNodeItem[]>([]);
- const [currentSelected, set_currentSelected] = useState<undefined | any>(undefined);
- const [expandedKeys, setExpandedKeys] = useState<React.Key[]>([]);
- const [autoExpandParent, setAutoExpandParent] = useState(true);
- const [defaultSelectedKeys, set_defaultSelectedKeys] = useState<Key[]>([]);
- const onSelect: TreeProps['onSelect'] = (selectedKeys, info) => {
- // console.log('selected', selectedKeys, info);
- const { node } = info;
- if (!node[fieldNames.children as keyof typeof node] || (node[fieldNames.children as keyof typeof node] as any[]).length === 0) {
- set_currentSelected(node);
- const onExpand = (newExpandedKeys: React.Key[]) => {
- setExpandedKeys(newExpandedKeys);
- setAutoExpandParent(false);
+ const {
+ searchKey,
+ placeholder = '请输入',
+ onChange,
+ listType = 'list',
+ dataSource: data = [],
+ icon,
+ contentH = 500,
+ rowKey = 'id',
+ fieldNames = { title: 'title', key: 'key', children: 'children' },
+ defaultSelectType = 'leaf', // 新增属性,默认选中叶子节点
+ } = props;
+ const [dataSource, set_dataSource] = useState<ListItem[] | TreeNodeItem[]>([]);
+ const [showList, set_showList] = useState<ListItem[] | TreeNodeItem[]>([]);
+ const [currentSelected, set_currentSelected] = useState<undefined | any>(
+ undefined,
+ );
+ const [expandedKeys, setExpandedKeys] = useState<React.Key[]>([]);
+ const [autoExpandParent, setAutoExpandParent] = useState(true);
+ const [defaultSelectedKeys, set_defaultSelectedKeys] = useState<Key[]>([]);
+ const onSelect: TreeProps['onSelect'] = (selectedKeys, info) => {
+ const { node } = info;
+ if (
+ !node[fieldNames.children as keyof typeof node] ||
+ (node[fieldNames.children as keyof typeof node] as any[]).length === 0
+ ) {
+ set_currentSelected(node);
+ const onExpand = (newExpandedKeys: React.Key[]) => {
+ setExpandedKeys(newExpandedKeys);
+ setAutoExpandParent(false);
+ const getFirstNodeOrLeaf = (node: any) => {
+ if (defaultSelectType === 'leaf') {
+ const result = findFirstLeafNodeWithParents(
+ node,
+ fieldNames.children ? fieldNames.children : 'children',
+ return {
+ node: result.leafNode,
+ expandedKeys: result.parents.map(
+ (parent: any) => parent[fieldNames.key as string],
+ ),
+ node: node,
+ expandedKeys: [node[`${fieldNames.key}`]],
};
- useEffect(() => {
- onChange && onChange(currentSelected);
- }, [currentSelected])
- if (showList.length > 0) {
- if (listType == 'list') {
- set_currentSelected(showList[0]);
+ useEffect(() => {
+ onChange && onChange(currentSelected);
+ }, [currentSelected]);
+ if (showList.length > 0) {
+ if (listType === 'list') {
+ set_currentSelected(showList[0]);
+ } else if (listType === 'tree') {
+ const { node, expandedKeys } = getFirstNodeOrLeaf(showList[0]);
+ setExpandedKeys([...expandedKeys]);
+ set_defaultSelectedKeys([node[fieldNames.key!]]);
+ } else {
+ set_currentSelected(undefined);
+ }, [showList]);
+ set_dataSource([...data]);
+ set_showList([...data]);
+ }, [data]);
+ return (
+ <div className="KCIMLeftList">
+ <div className="toolbar">
+ <Input
+ placeholder={placeholder}
+ allowClear
+ autoComplete="off"
+ suffix={<IconFont style={{ color: '#99A6BF' }} type="iconsousuo" />}
+ onChange={(e) => {
+ const result = dataSource.filter((item) =>
+ item[`${searchKey}`].includes(e.target.value),
+ set_showList(result);
- if (listType == 'tree') {
- const result = findFirstLeafNodeWithParents(showList[0], fieldNames.children ? fieldNames.children : 'children');
- // console.log({ result });
- setExpandedKeys([...(result.parents.map((parent:any) => parent[fieldNames.key as string]))]);
- set_currentSelected(result.leafNode);
- set_defaultSelectedKeys([result.leafNode[`${fieldNames.key}`]]);
+ if (listType === 'tree') {
+ const result = searchTreeAndKeepHierarchy(
+ dataSource,
+ e.target.value,
- } else {
- set_currentSelected(undefined);
- }, [showList]);
- set_dataSource([...data]);
- set_showList([...data]);
- }, [data]);
- return (
- <div className="KCIMLeftList">
- <div className='toolbar'>
- <Input placeholder={placeholder} allowClear autoComplete='off'
- suffix={
- <IconFont style={{ color: '#99A6BF' }} type="iconsousuo" />
- // style={{ width: 156 }}
- onChange={(e) => {
- const result = dataSource.filter(item => item[`${searchKey}`].indexOf(e.target.value) != -1);
- set_showList(result);
- const result = searchTreeAndKeepHierarchy(dataSource, e.target.value, searchKey, fieldNames.children as string);
- }}
- />
- {/* <UpDataActBtn key={'act'} record={undefined} type='ADD_LEFTDATA' /> */}
- </div>
- <div className='wrap' style={{ height: contentH, overflowY: 'scroll' }}>
- {
- listType == 'list' && showList.map((item, index) => {
- <div className={currentSelected ? currentSelected[`${rowKey}`] == item[`${rowKey}`] ? 'list on' : 'list' : 'list'}
- key={index}
- onClick={() => {
- set_currentSelected(item);
- // _currentSelectedType = item;
- >
- <img className='icon' src={icon ? icon : require('../../../static/departmentIcon.png')} alt="" />
- <div className='content'>
- <Tooltip title={item.subText} >
- <div className='name'>{item.name}</div>
- <div className='sub'>{item.subText}</div>
- </Tooltip>
- {/* <Dropdown menu={{ items: moreItems }} placement="bottom" onOpenChange={(bool) => { bool && set_currentEditLeftData(item) }}>
- <div className='more'>
- <img src={require('../../../../../static/more_point_gray.png')} alt="" />
- </Dropdown> */}
- )
- })
- (!showList || showList.length == 0) && (
- <div><Empty image={Empty.PRESENTED_IMAGE_SIMPLE} /></div>
- listType == 'tree' && dataSource.length > 0 && currentSelected && defaultSelectedKeys.length > 0 && (
- <DirectoryTree
- className='KC-DirectoryTree'
- fieldNames={fieldNames}
- rootStyle={{ height: '100%', paddingBottom: 50, overflowY: 'scroll', overflowX: 'hidden' }}
- onSelect={onSelect}
- onExpand={onExpand}
- expandedKeys={expandedKeys}
- autoExpandParent={autoExpandParent}
- selectedKeys={[currentSelected[`${fieldNames.key}`]]}
- blockNode={true}
- icon={() => null}
- // titleRender={
- // (nodeData: any) => {
- // const strTitle = nodeData.name as string;
- // const index = strTitle.indexOf(searchValue);
- // const beforeStr = strTitle.substring(0, index);
- // const afterStr = strTitle.slice(index + searchValue.length);
- // const title =
- // index > -1 ? (
- // <span>
- // {beforeStr}
- // <span className="site-tree-search-value" style={{ color: 'red', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{searchValue}</span>
- // {afterStr}
- // </span>
- // ) : (
- // <span className='strTitle'>{strTitle}</span>
- // );
- // return <div style={{
- // display: 'flex', flexDirection: 'row',
- // width: '100%',
- // justifyContent: 'flex-start', alignItems: 'center', height: 32,
- // borderRadius: '4px',
- // overflow: 'hidden',
- // color: '#17181A',
- // textOverflow: 'ellipsis',
- // whiteSpace: 'nowrap'
- // }}>{title}</div>
- // }
- // defaultSelectedKeys={['B0100']}
- treeData={showList as unknown as DataNode[]}
- // treeData={treeDataNew}
- switcherIcon={(props: any) => {
- const { expanded } = props;
- return <IconFont style={{fontSize:16,position:'relative',top:2}} type={expanded?'icon-shouqi1':'icon-zhankai1'} />
+ }}
+ />
+ </div>
+ <div className="wrap" style={{ height: contentH, overflowY: 'scroll' }}>
+ {listType === 'list' &&
+ showList.map((item, index) => (
+ <div
+ className={
+ currentSelected
+ ? currentSelected[`${rowKey}`] === item[`${rowKey}`]
+ ? 'list on'
+ : 'list'
+ key={index}
+ onClick={() => {
+ set_currentSelected(item);
+ >
+ <img
+ className="icon"
+ src={icon ? icon : require('../../../static/departmentIcon.png')}
+ alt=""
+ <div className="content">
+ <Tooltip title={item.subText}>
+ <div className="name">{item.name}</div>
+ <div className="sub">{item.subText}</div>
+ </Tooltip>
</div>
+ ))}
+ {(!showList || showList.length === 0) && (
+ <div>
+ <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />
+ )}
+ {listType === 'tree' &&
+ dataSource.length > 0 &&
+ currentSelected &&
+ defaultSelectedKeys.length > 0 && (
+ <DirectoryTree
+ className="KC-DirectoryTree"
+ fieldNames={fieldNames}
+ rootStyle={{
+ height: '100%',
+ paddingBottom: 50,
+ overflowY: 'scroll',
+ overflowX: 'hidden',
+ onSelect={onSelect}
+ onExpand={onExpand}
+ expandedKeys={expandedKeys}
+ autoExpandParent={autoExpandParent}
+ selectedKeys={[currentSelected[`${fieldNames.key}`]]}
+ blockNode={true}
+ showIcon={false}
+ treeData={showList as unknown as DataNode[]}
+ switcherIcon={(props: any) => {
+ const { expanded } = props;
+ <IconFont
+ style={{ fontSize: 16, position: 'relative', top: 2 }}
+ type={expanded ? 'icon-shouqi1' : 'icon-zhankai1'}
@@ -36,6 +36,21 @@
.wrap {
margin-top: 12px;
+ .mrms-ant-tree.mrms-ant-tree-directory .mrms-ant-tree-treenode {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ .mrms-ant-tree-node-content-wrapper {
+ display: flex;
+ .mrms-ant-tree-title {
+ // width: calc(100% - 20px);
+ // overflow: hidden;
+ // text-overflow: ellipsis;
+ // white-space: nowrap;
.mrms-ant-tree.mrms-ant-tree-directory .mrms-ant-tree-treenode-selected:hover::before,
.mrms-ant-tree.mrms-ant-tree-directory .mrms-ant-tree-treenode-selected::before {
border-radius: 4px;
@@ -48,19 +63,30 @@
.KC-DirectoryTree {
padding: 0 16px;
- // .mrms-ant-tree-treenode-selected {
- // .mrms-ant-tree-title {
- // color:#17181A !important;
- // font-weight: 500 !important;
+ .mrms-ant-tree-treenode {
+ flex-direction: row;
+ justify-content: flex-start;
+ align-items: center;
+ height: 32px;
+ .mrms-ant-tree-indent {
+ .mrms-ant-tree-indent-unit {
+ width:12px !important;
+ .mrms-ant-tree-switcher {
+ line-height: 30px !important;
.mrms-ant-tree.mrms-ant-tree-directory .mrms-ant-tree-treenode .mrms-ant-tree-node-content-wrapper.mrms-ant-tree-node-selected {
color:#17181A !important;
font-weight: 500 !important;
.list {
@@ -98,45 +98,43 @@
- &.mrms-ant-table-row {
- .mrms-ant-table-cell {
+ .mrms-ant-table-cell {
- font-size: 14px;
- font-family: SourceHanSansCN-Medium, SourceHanSansCN;
- justify-content: flex-start !important;
- color: #17181A;
- padding: 8px 8px !important;
- border-bottom: none !important;
- border-top: 1px solid rgb(218 226 242) !important;
- &.mrms-ant-table-cell-with-append {
- .mrms-ant-table-row-expand-icon {
- border-radius: 4px !important;
- border: 1px solid #DAE2F2 !important;
- &:hover {
- color: #3377ff;
- border: 1px solid #3377ff !important;
- &>.mrms-ant-typography {
- line-height:unset;
+ font-size: 14px;
+ font-family: SourceHanSansCN-Medium, SourceHanSansCN;
+ justify-content: flex-start !important;
+ color: #17181A;
+ padding: 8px 8px !important;
+ border-bottom: none !important;
+ border-top: 1px solid rgb(218 226 242) !important;
+ &.mrms-ant-table-cell-with-append {
+ .mrms-ant-table-row-expand-icon {
+ border-radius: 4px !important;
+ border: 1px solid #DAE2F2 !important;
+ &:hover {
+ color: #3377ff;
+ border: 1px solid #3377ff !important;
+ &>.mrms-ant-typography {
+ line-height:unset;
- // &:hover {
- // border-radius: 0 !important;
- // background: #FAFBFC !important;
+ // &:hover {
+ // border-radius: 0 !important;
+ // background: #FAFBFC !important;
* @Date: 2024-01-12 13:34:17
- * @LastEditTime: 2024-01-18 20:24:20
+ * @LastEditTime: 2024-12-06 13:54:19
* @FilePath: /CostAccountingSys/src/constant.ts
@@ -17,4 +17,8 @@ export const tableColumnsWidObj = {
year:'5%',
month:'5%',
shareLevel:'5%'
+}
+export const authTimeType = [
+ {label:'长期授权',value:1},{label:'临期授权',value:2},{label:'单次授权',value:3}
+]
@@ -36,7 +36,7 @@ select:-webkit-autofill {
-.cost-ant-space-item {
+.mrms-ant-space-item {
&>a {
color: #3377FF !important;
@@ -49,22 +49,22 @@ textarea {
border: 1px solid #CFD7E6 !important;
-.cost-ant-btn-primary {
+.mrms-ant-btn-primary {
background: #3377FF;
-.cost-ant-btn-primary[disabled]{
+.mrms-ant-btn-primary[disabled]{
background:#f5f5f5 ;
-.cost-ant-checkbox {
- &.cost-ant-checkbox-checked {
- .cost-ant-checkbox-inner {
+.mrms-ant-checkbox {
+ &.mrms-ant-checkbox-checked {
+ .mrms-ant-checkbox-inner {
background-color:#3377FF;
- // &.cost-ant-checkbox-indeterminate {
- // &.cost-ant-checkbox-inner {
+ // &.mrms-ant-checkbox-indeterminate {
+ // &.mrms-ant-checkbox-inner {
// &::after {
// background-color:#3377FF !important;
// }
@@ -72,15 +72,15 @@ textarea {
-.cost-ant-checkbox-indeterminate .cost-ant-checkbox-inner::after {
+.mrms-ant-checkbox-indeterminate .mrms-ant-checkbox-inner::after {
-.cost-ant-input-affix-wrapper {
+.mrms-ant-input-affix-wrapper {
border-radius: 4px !important;
-.cost-ant-input {
+.mrms-ant-input {
// border: 1px solid #CFD7E6 !important;
&::placeholder {
@@ -88,13 +88,13 @@ textarea {
-.cost-ant-table-cell {
+.mrms-ant-table-cell {
a {
color: #3376FE !important;
-.cost-ant-input-number {
+.mrms-ant-input-number {
@@ -105,29 +105,29 @@ textarea {
//Modal
-.cost-ant-modal {
- .cost-ant-modal-content {
+.mrms-ant-modal {
+ .mrms-ant-modal-content {
padding: 16px !important;
- .cost-ant-modal-header {
+ .mrms-ant-modal-header {
padding: 0 ;
margin-bottom: 16px;
border-bottom: none;
- .cost-ant-modal-body {
+ .mrms-ant-modal-body {
max-height: 570px;
// overflow-y: scroll;
// overflow-x: hidden;
padding: 0;
- .cost-ant-modal-confirm-body-wrapper {
- .cost-ant-modal-confirm-body {
- .cost-ant-modal-confirm-title {
+ .mrms-ant-modal-confirm-body-wrapper {
+ .mrms-ant-modal-confirm-body {
+ .mrms-ant-modal-confirm-title {
font-size: 16px;
height:18px;
- .cost-ant-modal-confirm-content {
+ .mrms-ant-modal-confirm-content {
max-width: 100% !important;
max-height: 498px;
overflow-y: scroll;
@@ -135,7 +135,7 @@ textarea {
margin-block-start:16px;
.TableTransfer {
- .cost-ant-transfer-operation {
+ .mrms-ant-transfer-operation {
// align-self: self-end;
// margin-bottom: 30px;
@@ -149,11 +149,11 @@ textarea {
- .cost-ant-transfer-list {
+ .mrms-ant-transfer-list {
overflow: hidden;
border: 1px solid #DAE2F2;
- .cost-ant-transfer-list-header {
+ .mrms-ant-transfer-list-header {
height: 32px;
font-size: 12px;
border-bottom: 1px solid #DAE2F2;
@@ -162,24 +162,24 @@ textarea {
color: #99A6BF;
- .cost-ant-transfer-list-header-selected {
+ .mrms-ant-transfer-list-header-selected {
color: #515866;
- .cost-ant-transfer-list-body {
- .cost-ant-transfer-list-body-search-wrapper {
+ .mrms-ant-transfer-list-body {
+ .mrms-ant-transfer-list-body-search-wrapper {
padding: 8px;
- .cost-ant-input-prefix {
+ .mrms-ant-input-prefix {
.anticon-search {
- .cost-ant-transfer-list-body-customize-wrapper {
- .costTable {
+ .mrms-ant-transfer-list-body-customize-wrapper {
+ .mrmsTable {
border: none !important;
border-radius: 0 !important;
@@ -189,10 +189,10 @@ textarea {
- .cost-ant-table {
- .cost-ant-table-container {
- .cost-ant-table-content {
- .cost-ant-table-thead {
+ .mrms-ant-table {
+ .mrms-ant-table-container {
+ .mrms-ant-table-content {
+ .mrms-ant-table-thead {
&>tr>th {
font-size: 14px;
@@ -207,7 +207,7 @@ textarea {
- .cost-ant-table-tbody {
+ .mrms-ant-table-tbody {
&>tr>td {
padding-left: 8px !important;
padding-right: 8px !important;
@@ -220,7 +220,7 @@ textarea {
- .cost-ant-modal-confirm-btns {
+ .mrms-ant-modal-confirm-btns {
display: flex;
flex-direction: row;
align-items: center;
@@ -235,23 +235,23 @@ textarea {
height: 24px;
- &.cost-ant-btn-default {
+ &.mrms-ant-btn-default {
background-color: #FAFCFF;
- &.cost-ant-btn-primary {
+ &.mrms-ant-btn-primary {
background-color: #3376FE;
- .cost-ant-modal-footer {
+ .mrms-ant-modal-footer {
border-top: none;
margin-top: 16px;
- .cost-ant-btn {
+ .mrms-ant-btn {
height: 24px !important;
padding: 0 14px !important;
@@ -259,10 +259,10 @@ textarea {
margin-top: 0;
- .cost-ant-space-item {
+ .mrms-ant-space-item {
&>button {
justify-content: center;
@@ -274,12 +274,12 @@ textarea {
&>span {}
@@ -291,9 +291,9 @@ textarea {
//message
-.cost-ant-message {
+.mrms-ant-message {
.ant-message-notice-success {
- .cost-ant-message-notice-content {
+ .mrms-ant-message-notice-content {
.anticon-check-circle {
&>svg {
color: #52c41a;
@@ -305,19 +305,19 @@ textarea {
//Form
-.cost-ant-form {
- &.cost-ant-form-vertical {
- .cost-ant-form-item {
+.mrms-ant-form {
+ &.mrms-ant-form-vertical {
+ .mrms-ant-form-item {
- .cost-ant-form-item-label {
+ .mrms-ant-form-item-label {
padding: 0 !important;
height: 15px;
margin-bottom: 8px;
line-height: 15px;
- .cost-ant-form-item-control-input {
+ .mrms-ant-form-item-control-input {
min-height: 24px;
@@ -327,20 +327,20 @@ textarea {
-// .cost-ant-form-item-label {
+// .mrms-ant-form-item-label {
// padding: 0;
// //height: 15px;
// line-height: 15px;
// margin-bottom: 5px;
-// .cost-ant-form-item-required {
+// .mrms-ant-form-item-required {
// &::before {
// margin-right: 0 !important;
padding: 0px 8px !important;
@@ -355,48 +355,48 @@ textarea {
-.cost-ant-input-disabled {
+.mrms-ant-input-disabled {
color: #7A8599 !important;
-.cost-ant-input-affix-wrapper-disabled {
+.mrms-ant-input-affix-wrapper-disabled {
background: #F0F2F5 !important;
// //proContsiner 标题样式覆盖
-// .cost-ant-page-header .cost-ant-page-header-heading-title {
+// .mrms-ant-page-header .mrms-ant-page-header-heading-title {
// height: 17px !important;
// font-size: 16px !important;
// line-height: 17px !important;
-.cost-ant-page-header {
- .cost-ant-page-header-heading-title {
+.mrms-ant-page-header {
+ .mrms-ant-page-header-heading-title {
font-size: 16px !important;
-.cost-ant-page-header .cost-ant-page-header-heading-left {
+.mrms-ant-page-header .mrms-ant-page-header-heading-left {
margin-block: 0 !important;
-.cost-ant-pro .cost-ant-pro-layout .cost-ant-pro-sider-fixed {
+.mrms-ant-pro .mrms-ant-pro-layout .mrms-ant-pro-sider-fixed {
position: absolute !important;
// min-width:230px !important;
// width: 230px !important;
//避免logo区域的层级过高,影响父容器
height: calc(100vh - 48px) !important;
z-index: 0 !important;
-.cost-ant-pro .cost-ant-pro-layout .cost-ant-pro-sider-menu {
+.mrms-ant-pro .mrms-ant-pro-layout .mrms-ant-pro-sider-menu {
height: calc(100vh - 200px) !important;
overflow-y: scroll !important;
overflow-x: hidden;
@@ -404,21 +404,21 @@ textarea {
-.cost-ant-menu .cost-ant-menu-root .cost-ant-menu-inline .cost-ant-menu-light .cost-ant-pro-sider-menu .cost-ant-pro-base-menu{
+.mrms-ant-menu .mrms-ant-menu-root .mrms-ant-menu-inline .mrms-ant-menu-light .mrms-ant-pro-sider-menu .mrms-ant-pro-base-menu{
height: calc(100vh - 90px) !important;
-.cost-ant-pro-base-menu .cost-ant-pro-base-menu-submenu-has-icon >.cost-ant-menu-sub {
+.mrms-ant-pro-base-menu .mrms-ant-pro-base-menu-submenu-has-icon >.mrms-ant-menu-sub {
padding-inline-start:0 !important;
-.cost-ant-menu-submenu {
- &.cost-ant-menu-submenu-selected {
+.mrms-ant-menu-submenu {
+ &.mrms-ant-menu-submenu-selected {
-.cost-ant-menu-item-selected {
+.mrms-ant-menu-item-selected {
background-color:#F2F6FF !important;
// margin:8px !important;
@@ -426,31 +426,31 @@ textarea {
-.cost-ant-menu-light:not(.cost-ant-menu-horizontal) .cost-ant-menu-item:not(.cost-ant-menu-item-selected):hover {
+.mrms-ant-menu-light:not(.mrms-ant-menu-horizontal) .mrms-ant-menu-item:not(.mrms-ant-menu-item-selected):hover {
background-color: #f0f2f5 !important;
-.cost-ant-menu-light:not(.cost-ant-menu-horizontal) .cost-ant-menu-submenu-title:hover {
+.mrms-ant-menu-light:not(.mrms-ant-menu-horizontal) .mrms-ant-menu-submenu-title:hover {
-.cost-ant-tree.cost-ant-tree-directory .cost-ant-tree-treenode:hover::before {
+.mrms-ant-tree.mrms-ant-tree-directory .mrms-ant-tree-treenode:hover::before {
background: #f0f2f5 !important;
-.cost-EditableProTable {
- .cost-ant-pro-card-body {
+.mrms-EditableProTable {
+ .mrms-ant-pro-card-body {
padding-inline: 0 !important;
padding-block: 0 !important;
@@ -470,9 +470,9 @@ textarea {
- .cost-ant-table-row {
- .cost-ant-table-cell {
+ .mrms-ant-table-row {
@@ -498,16 +498,16 @@ textarea {
-.cost-ant-table-wrapper {
- .cost-ant-table:not(.cost-ant-table-bordered) .cost-ant-table-tbody>tr.cost-ant-table-row.cost-ant-table-row-selected>td:first-child {
+.mrms-ant-table-wrapper {
+ .mrms-ant-table:not(.mrms-ant-table-bordered) .mrms-ant-table-tbody>tr.mrms-ant-table-row.mrms-ant-table-row-selected>td:first-child {
tr {
&:last-child {
// border-top: 1px solid #dae2f2;
@@ -516,31 +516,31 @@ textarea {
-.cost-ant-table-wrapper .cost-ant-table:not(.cost-ant-table-bordered) .cost-ant-table-tbody>tr.cost-ant-table-row:hover>td:first-child {
+.mrms-ant-table-wrapper .mrms-ant-table:not(.mrms-ant-table-bordered) .mrms-ant-table-tbody>tr.mrms-ant-table-row:hover>td:first-child {
border-start-start-radius: 0 !important;
border-end-start-radius: 0 !important;
-.cost-ant-table-wrapper .cost-ant-table:not(.cost-ant-table-bordered) .cost-ant-table-tbody>tr.cost-ant-table-row:last-child:hover>td {
+.mrms-ant-table-wrapper .mrms-ant-table:not(.mrms-ant-table-bordered) .mrms-ant-table-tbody>tr.mrms-ant-table-row:last-child:hover>td {
border-bottom-color: #dae2f2 !important;
-.cost-ant-table-wrapper .cost-ant-table:not(.cost-ant-table-bordered) .cost-ant-table-tbody>tr.cost-ant-table-row:last-child>td {
+.mrms-ant-table-wrapper .mrms-ant-table:not(.mrms-ant-table-bordered) .mrms-ant-table-tbody>tr.mrms-ant-table-row:last-child>td {
-.cost-ant-table-wrapper .cost-ant-table:not(.cost-ant-table-bordered) .cost-ant-table-tbody>tr.cost-ant-table-row:hover>td:last-child {
+.mrms-ant-table-wrapper .mrms-ant-table:not(.mrms-ant-table-bordered) .mrms-ant-table-tbody>tr.mrms-ant-table-row:hover>td:last-child {
border-end-end-radius: 0 !important;
border-start-end-radius: 0 !important;
-.cost-ant-pro .cost-ant-pro-layout .cost-ant-pro-layout-bg-list {
+.mrms-ant-pro .mrms-ant-pro-layout .mrms-ant-pro-layout-bg-list {
background: #F7F9FC !important;
-// .cost-ant-message-notice .cost-ant-message-success .anticon {
+// .mrms-ant-message-notice .mrms-ant-message-success .anticon {
// color: #52c41a !important;
.ant-message-success {
@@ -553,22 +553,22 @@ textarea {
/**
Select
**/
-.cost-ant-select {
- .cost-ant-select-selector {
+.mrms-ant-select {
+ .mrms-ant-select-selector {
padding: 0 8px !important;
- .cost-ant-select-selection-item {
+ .mrms-ant-select-selection-item {
line-height: 24px !important;
- .cost-ant-select-selection-search-input {
+ .mrms-ant-select-selection-search-input {
- .cost-ant-select-selection-placeholder {
+ .mrms-ant-select-selection-placeholder {
line-height: 22px !important;
font-family: SourceHanSansCN-Normal, SourceHanSansCN;
@@ -576,9 +576,9 @@ textarea {
- .cost-ant-select-selection-overflow {
- .cost-ant-select-selection-overflow-item {
+ .mrms-ant-select-selection-overflow {
+ .mrms-ant-select-selection-overflow-item {
height: 22px !important;
margin-top: 0 !important;
@@ -588,20 +588,20 @@ textarea {
- .cost-ant-select-arrow {
+ .mrms-ant-select-arrow {
color: #CFD7E6;
- &.cost-ant-select-disabled {
+ &.mrms-ant-select-disabled {
border: 1px solid #DADEE6 !important;
color: #7A8599;
@@ -611,12 +611,12 @@ textarea {
-.cost-ant-tabs {
- .cost-ant-tabs-tab {
+.mrms-ant-tabs {
+ .mrms-ant-tabs-tab {
padding: 5px 0 !important;
padding-top: 12px !important;
- .cost-ant-tabs-nav {
+ .mrms-ant-tabs-nav {
&::before {
border-bottom: none !important;
@@ -626,59 +626,59 @@ textarea {
-.cost-ant-pro-layout .cost-ant-pro-layout-container {
+.mrms-ant-pro-layout .mrms-ant-pro-layout-container {
flex: 1;
//页面全局底色
background: rgb(247 249 252 / 100%);
-.cost-ant-pro-page-container-children-content {
+.mrms-ant-pro-page-container-children-content {
-.cost-ant-pro-sider-actions {
+.mrms-ant-pro-sider-actions {
display: none !important;
-.cost-ant-pro-sider-collapsed-button {
+.mrms-ant-pro-sider-collapsed-button {
top: 95% !important;
right: 17px !important;
-.cost-ant-menu .cost-ant-menu-submenu-title .anticon {
+.mrms-ant-menu .mrms-ant-menu-submenu-title .anticon {
transition: none !important;
-.cost-ant-menu .cost-ant-menu-item .anticon+span {
+.mrms-ant-menu .mrms-ant-menu-item .anticon+span {
-.cost-ant-menu .cost-ant-menu-item .anticon {
+.mrms-ant-menu .mrms-ant-menu-item .anticon {
-.cost-ant-menu .cost-ant-menu-item {
+.mrms-ant-menu .mrms-ant-menu-item {
-.cost-ant-menu .cost-ant-menu-submenu-title .anticon+span {
+.mrms-ant-menu .mrms-ant-menu-submenu-title .anticon+span {
-.cost-ant-tabs .cost-ant-tabs-tab+.cost-ant-tabs-tab {
+.mrms-ant-tabs .mrms-ant-tabs-tab+.mrms-ant-tabs-tab {
margin: 0 0 0 24px !important;
@@ -690,13 +690,13 @@ textarea {
-.cost-ant-layout-sider {
+.mrms-ant-layout-sider {
min-width: unset !important;
width: 100% !important;
-.cost-ant-pro .cost-ant-pro-layout .cost-ant-pro-sider .cost-ant-layout-sider-children {
+.mrms-ant-pro .mrms-ant-pro-layout .mrms-ant-pro-sider .mrms-ant-layout-sider-children {
&>div {
&>ul {
@@ -706,99 +706,99 @@ textarea {
-.cost-ant-pro-form>div:not(.cost-ant-pro-form-light-filter) .pro-field-lg {
+.mrms-ant-pro-form>div:not(.mrms-ant-pro-form-light-filter) .pro-field-lg {
// color: #99A6BF !important;
color: #99A6BF !important;
-.cost-ant-input-number-input {
+.mrms-ant-input-number-input {
-.cost-ant-select-disabled {
+.mrms-ant-select-disabled {
box-shadow: none !important;
- .cost-ant-input-number-input {
+ .mrms-ant-input-number-input {
-.cost-ant-input-number-disabled {
+.mrms-ant-input-number-disabled {
-.cost-ant-picker {
+.mrms-ant-picker {
- .cost-ant-picker-input {
+ .mrms-ant-picker-input {
&>input {
color:#99A6BF !important;
- .cost-ant-picker-suffix {
+ .mrms-ant-picker-suffix {
-.cost-ant-picker-panel-container {
- .cost-ant-picker-panel {
- .cost-ant-picker-month-panel {
- .cost-ant-picker-body {
- .cost-ant-picker-content {
+.mrms-ant-picker-panel-container {
+ .mrms-ant-picker-panel {
+ .mrms-ant-picker-month-panel {
+ .mrms-ant-picker-body {
+ .mrms-ant-picker-content {
td {
- &.cost-ant-picker-cell-selected {
- .cost-ant-picker-cell-inner {
+ &.mrms-ant-picker-cell-selected {
+ .mrms-ant-picker-cell-inner {
background:#3377FF;
@@ -810,11 +810,11 @@ textarea {
-.cost-ant-picker-input>input[disabled] {
+.mrms-ant-picker-input>input[disabled] {
-.cost-ant-picker-disabled {
+.mrms-ant-picker-disabled {
@@ -1,261 +0,0 @@
-/*
- * @Author: code4eat awesomedema@gmail.com
- * @Date: 2023-03-03 11:30:33
- * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2024-09-09 10:57:09
- * @FilePath: /KC-MiddlePlatform/src/pages/platform/setting/pubDicTypeMana/index.tsx
- * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
- */
-import { createFromIconfontCN } from '@ant-design/icons';
-import { ActionType, DrawerForm, EditableFormInstance, EditableProTable, ProFormInstance, ProFormSelect } from '@ant-design/pro-components';
-import { ModalForm, ProFormDigit, ProFormText, ProFormTextArea } from '@ant-design/pro-form'
-import { ProColumns } from '@ant-design/pro-table';
-import { Input, message, Popconfirm } from 'antd';
-import { useEffect, useRef, useState } from 'react'
-import { addData, delData, editData, getChackGroupData } from './service';
-import './style.less';
-import KCIMPagecontainer from '@/components/KCIMPageContainer';
-import { KCIMTable } from '@/components/KCIMTable';
-import KCIMDrawerForm from '@/components/KCIMDrawerForm';
-const IconFont = createFromIconfontCN({
-});
-type TableDataResponse = {
- data: any[];
- success: boolean;
- total: number;
- pageSize: number;
- totalPage: number;
-};
-export default function FenyeTemplate() {
- const [tableDataFilterParams, set_tableDataFilterParams] = useState<any | undefined>();
- const [tableDataSearchKeywords, set_tableDataSearchKeywords] = useState<string>('');
- const tableRef = useRef<ActionType>();
- const columns: ProColumns[] = [
- title: 'ID',
- dataIndex: 'id',
- },
- title: '查核组名称',
- dataIndex: 'name',
- title: '组长',
- dataIndex: 'groupManagerName',
- title: '备注',
- dataIndex: 'createUserName',
- title: '操作',
- key: 'option',
- width:150,
- valueType: 'option',
- render: (_: any, record: any) => {
- return [
- <UpDataActBtn key={'act'} record={record} type='EDIT' />,
- <a key='emp'>人员</a>,
- // <a key=''>查核要点</a>
- ]
- const getTableData = async (params: any):Promise<TableDataResponse|any[]> => {
- const resp = await getChackGroupData(params);
- if(resp.totalCount == 0 && resp.currPage != 1){
- return getTableData({...params,current:resp.currPage - 1});
- }else{
- return {
- data: resp.list,
- success: true,
- total: resp.totalCount,
- pageSize: resp.pageSize,
- totalPage: resp.totalPage,
- return []
- const delTableData = async (record: any) => {
- const resp = await delData(record.id);
- message.success('操作成功!');
- tableRef.current?.reload();
- // message.success('操作成功!');
- const updateTable = async (formVal: any, type: 'EDIT' | "ADD") => {
- const content = formVal.table.map((a: any) => ({
- }))
- if (type == 'ADD') {
- const result = {
- name: formVal.name,
- content: JSON.stringify(formVal.table),
- remark: formVal.remark
- const resp = await addData({ ...result });
- if (type == 'EDIT') {
- id: formVal.id,
- const resp = await editData({ ...result });
- return true;
- const UpDataActBtn = ({ record, type }: { record: any, type: 'EDIT' | 'ADD' }) => {
- const formRef = useRef<ProFormInstance<any>>();
- <ModalForm
- title={`${type == 'EDIT' ? '编辑' : '新增'}查核组`}
- width={400}
- initialValues={type == 'EDIT' ? { ...record, filedType: 'Text' } : { filedType: 'Text' }}
- trigger={
- type == 'EDIT' ? <a key="edit" >编辑</a> : <span className='add'>新增</span>
- onFinish={(val: any) => {
- return updateTable(type == 'EDIT' ? { ...record, ...val } : { ...val }, type);
- formRef={formRef}
- modalProps={{ destroyOnClose: true }}
- colProps={{ span: 24 }}
- grid
- <ProFormText
- name="name"
- label="查核组名称:"
- placeholder="请输入"
- rules={[{ required: true, message: '名称不能为空!' }]}
- <ProFormTextArea
- name="remark"
- label="备注:"
- </ModalForm>
- const tableDataSearchHandle = (paramName: string) => {
- set_tableDataFilterParams({
- ...tableDataFilterParams,
- [`${paramName}`]: tableDataSearchKeywords
- }, [])
- <KCIMPagecontainer className='checkGroupMana' title={false}>
- <div className='toolBar'>
- <div className='filter'>
- <div className='filterItem' style={{ marginRight: 16, width: 205 }}>
- <span className='label' style={{ whiteSpace: 'nowrap' }}> 检索:</span>
- <Input placeholder={'请输入查核组名称'} allowClear autoComplete='off'
- <IconFont type="iconsousuo" style={{ color: '#99A6BF' }} onClick={() => tableDataSearchHandle('filter')} />
- set_tableDataSearchKeywords(e.target.value);
- if (e.target.value.length == 0) {
- groupName: ''
- });
- onPressEnter={(e) => {
- groupName: (e.target as HTMLInputElement).value
- <div className='filterItem' style={{ marginRight: 16, width: 220 }}>
- <span className='label' style={{ whiteSpace: 'nowrap' }}> 组长名称:</span>
- <Input placeholder={'请输入'} allowClear autoComplete='off'
- groupManagerName: ''
- groupManagerName: (e.target as HTMLInputElement).value
- {/* <div className='btnGroup'>
- <UpDataActBtn record type='ADD' />
- </div> */}
- <div style={{ marginTop: 16 }}>
- <KCIMTable columns={columns as ProColumns[]} actionRef={tableRef} rowKey='id' params={tableDataFilterParams} request={(params) => getTableData(params)} />
- </KCIMPagecontainer>
@@ -1,96 +0,0 @@
- * @Date: 2023-03-03 16:31:27
- * @LastEditTime: 2023-10-12 18:16:15
- * @FilePath: /KC-MiddlePlatform/src/pages/platform/setting/pubDicTypeMana/service.ts
-import { request } from 'umi';
-//获取table列表数据
-export type FenyeTemplateItemType = {
- id:number;
- hiId:number;
- name:string;
- content:string;
- remark:string;
- createUserId:number;
- createUserName:string;
- date:string
-export const getChackGroupData = (params?:any) => {
- return request<{
- currPage: number;
- current:number;
- list:any[];
- pageSize:number;
- totalCount:number;
- totalPage:number;
- }>('/manager/CheckGroup/getCheckGroupList', {
- method: 'GET',
- params:{...params}
-//获取查核组字典
-export const getCheckData = (params?:any) => {
- }>('/manager/CheckGroup/getCheckGroup', {
-//新增表格数据
-export type AddTableDataType = {
-export const addData = (data:AddTableDataType) => {
- return request('/manager/setting/addPageTemplate', {
- method: 'POST',
- data
-//编辑表格数据
-export const editData = (data:{id:number}&AddTableDataType) => {
- return request('/manager/setting/editPageTemplate', {
-//删除表格操作
-export const delData = (id:string) => {
- return request('/manager/setting/deletePageTemplate', {
- params:{id}
@@ -1,43 +0,0 @@
-.checkGroupMana {
- padding: 16px;
- background: #FFFFFF;
- border-radius: 4px;
- .toolBar {
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- align-items: center;
- .filter {
- justify-content: flex-start;
- .filterItem {
- justify-content: center;
- .btnGroup {
- .add {
- cursor: pointer;
- display: inline-block;
- font-family: SourceHanSansCN-Normal, SourceHanSansCN;
- font-weight: 400;
- color: #FFFFFF;
- line-height: 24px;
- padding: 0 14px;
- background: #3377FF;
@@ -1,120 +0,0 @@
-import React, { useEffect, useState } from "react";
-import {Input} from 'antd'
-import { KCIMTable } from "@/components/KCIMTable";
-import { createFromIconfontCN } from "@ant-design/icons";
-import { getCheckData } from "../checkGroupMana/service";
-import { getData } from "@/pages/setting/qualitativeOptionsMana/service";
-import { ModalForm } from "@ant-design/pro-components";
-// import './style.less';
-interface TableSelecterProps {
- tableSelecterColumn: any[];
- record: any
-const TableSelecter = ({tableSelecterColumn, record,open,title,onVisibleChange,rowKey='id',request,onFinish }:{
- tableSelecterColumn:any[],record:any,open:boolean,title:string,onVisibleChange:(bool:boolean)=>void,
- rowKey?:string,request?:(params:any)=>Promise<any>,onFinish?:(selectedKeys:React.Key[],selectedRows:any[])=>void
-})=>{
- const Table = React.forwardRef(({ }: TableSelecterProps, ref) => {
- const [datasource, set_datasource] = useState<any[]>([]);
- const [selectedKeys, setSelectedKeys] = useState<React.Key[]>([]);
- const [selectedRows,set_selectedRows] = useState<any[]>([]);
- const [showList, set_showList] = useState<any[]>([]);
- const onSelectChange = (newSelectedRowKeys: React.Key[],selectedRows:any) => {
- setSelectedKeys([...newSelectedRowKeys]);
- const saveHandle = async () => {
- onFinish&&onFinish(selectedKeys,selectedRows);
- <div >
- <Input placeholder={'请输入项目名称'} allowClear autoComplete='off'
- style={{ marginBottom: 8 }}
- if (e.target.value.length != 0) {
- const result = datasource.filter(item => item.indicatorName.indexOf(e.target.value) != -1);
- set_showList(datasource);
- <KCIMTable columns={tableSelecterColumn}
- options={{
- density: true,
- setting: {
- listsHeight: 100,
- rowKey={rowKey}
- scroll={{ y: 400 }}
- tableAlertRender={false}
- rowSelection={{
- // 自定义选择项参考: https://ant.design/components/table-cn/#components-table-demo-row-selection-custom
- // 注释该行则默认不显示下拉选项
- // selections: [Table.SELECTION_ALL, Table.SELECTION_INVERT],
- onChange: onSelectChange,
- pagination={{ showTitle: false, showSizeChanger: true }}
- //dataSource={showList}
- request={request?async (params)=>request(params):undefined}
- <div className='footer'>
- <span className='cancel' onClick={() => close()}>取消</span>
- <span className='ok' onClick={() => saveHandle()}>{`确认(${selectedKeys.length > 0 && selectedKeys.length})`}</span>
- const close = ()=>{
- onVisibleChange&&onVisibleChange(false);
- <ModalForm className="TableSelecter" title={title} width={600} submitter={{
- render:false
- }} open={open} modalProps={{
- closable: false,
- }}>
- <Table
- // ref={tableSelecterRef}
- record={undefined}
- tableSelecterColumn={tableSelecterColumn}
- ></Table>
-export default TableSelecter
@@ -1,319 +0,0 @@
- * @LastEditTime: 2024-09-09 10:56:43
-import { ActionType, DrawerForm, EditableFormInstance, EditableProTable, ProFormCheckbox, ProFormInstance, ProFormSelect } from '@ant-design/pro-components';
-import { Input, message, Switch } from 'antd';
-import { createRef, useEffect, useRef, useState } from 'react'
-import { addData, bindCheckGroupReq, bindUnitReq, delData, editData, getData } from './service';
-import TableTransfer from './transform';
-import TableSelecter from './tableSelector';
-import { getCheckData } from '../checkGroupMana/service';
-import { debounce } from 'lodash';
- const [tableSelecterVisible, set_tableSelecterVisible] = useState(false);
- const [tableSelecterType, set_tableSelecterType] = useState<'UNIT' | 'CHECKGROUP'>('UNIT'); //穿梭框类型
- const [currentEdit, set_currentEdit] = useState<any | undefined>(undefined);
- // {
- // title: '工号',
- // dataIndex: 'employeeId',
- // },
- title: '用户名',
- dataIndex: 'account',
- title: '姓名',
- title: '查核组',
- dataIndex: 'groupList',
- ellipsis:true,
- renderText(groupList, record, index, action) {
- if (groupList) {
- return groupList.reduce((prev: string, next: any) => `${prev.length > 0 ? prev + ',' : prev}${next.name}`, '')
- title: '单位名',
- dataIndex: 'departList',
- ellipsis: true,
- renderText(departList, record, index, action) {
- if (departList) {
- return departList.reduce((prev: string, next: any) => `${prev.length > 0 ? prev + ',' : prev}${next.name}`, '')
- width: 160,
- <a key='unit' onClick={() => { openTransformModal(record); set_tableSelecterType('UNIT'); }}>单位</a>,
- <a key='checkGroup' onClick={() => { openTransformModal(record); set_tableSelecterType('CHECKGROUP'); }}>查核组</a>
- const getTableData = async (params: any) => {
- const resp = await getData(params);
- total: resp.totalCount
- employeeId: formVal.employeeId,
- account: formVal.account,
- permission: formVal.permission.join(',')
- title={`${type == 'EDIT' ? '编辑' : '新增'}权限`}
- width={600}
- initialValues={type == 'EDIT' ? { ...record, permission: record.roleList ? record.roleList.split(',') : [] } : {}}
- type == 'EDIT' ? <a key="edit" >编辑权限</a> : <span className='add'>新增</span>
- <ProFormCheckbox.Group
- name="permission"
- layout='horizontal'
- label="行业分布"
- options={[
- { label: '管理员', value: '1' },
- { label: '查核组长', value: '2' },
- { label: '查核组员', value: '3' },
- { label: '单位负责人', value: '4' },
- { label: '改善人', value: '5' },
- { label: '职能科室负责人', value: '6' },
- { label: '职能科室普通人员', value: '7' },
- { label: '自查人', value: '8' },
- ]}
- const openTransformModal = (record: any) => {
- set_currentEdit(record);
- set_tableSelecterVisible(true);
- const tableSelecterCommit = async (keys: React.Key[], rows: any[]) => {
- if (tableSelecterType == 'CHECKGROUP') {
- employeeId: currentEdit.employeeId,
- employeeName: currentEdit.name,
- groupList: rows.map((a: any) => ({
- code: a.code,
- name: a.name,
- isManager: a.flag ? 1 : 0
- const resp = await bindCheckGroupReq(result);
- set_tableSelecterVisible(false);
- if (tableSelecterType == 'UNIT') {
- departmentList: rows.map((a: any) => ({
- isManager: a.flag ? 1 : 0,
- isFunction: 0
- const resp = await bindUnitReq(result);
- const debouncedFetch = debounce(async (keyWords, callback) => {
- const resp = await getCheckData({ pageSize: 20, current: 1, filter: keyWords });
- callback(resp.list.map((a: any) => ({
- label: a.name,
- value: a.code,
- })));
- callback([]);
- }, 300);
- <KCIMPagecontainer className='empMana' title={false}>
- <TableSelecter
- onVisibleChange={(bool) => set_tableSelecterVisible(bool)}
- title='关联'
- rowKey={tableSelecterType == 'UNIT' ? 'code' : 'id'}
- tableSelecterType={tableSelecterType}
- record={currentEdit}
- open={tableSelecterVisible}
- onFinish={(keys, rows) => tableSelecterCommit(keys, rows)}
- <Input placeholder={'请输入姓名/工号'} allowClear autoComplete='off'
- filter: ''
- filter: (e.target as HTMLInputElement).value
@@ -1,106 +0,0 @@
- * @LastEditTime: 2023-10-12 15:56:04
-export const getData = (params?:any) => {
- return request('/manager/Employee/getEmployee', {
-//编辑权限
-export const editData = (data:{id:number,account:string,name:string,employeeId:number,permission:string}) => {
- return request('/manager/Employee/editEmployeePermission', {
-//关联单位
-export const bindUnitReq = (data:{
- employeeId:string,
- employeeName:string,
- departmentList:{
- code:string,
- name:string,
- isManager:number,
- isFunction:number
- }[]
-}) => {
- return request('/manager/Employee/editDepartment', {
-//关联查核组
-export const bindCheckGroupReq = (data:{
- groupList:{
- return request('/manager/Employee/editCheckGroup', {
@@ -1,80 +0,0 @@
-.TableSelecter {
- .pfm-ant-modal-footer {
- display: none !important;
- .footer {
- flex-direction:row;
- justify-content: flex-end;
- margin-top: 15px;
- span {
- width: 56px;
- height: 24px;
- line-height: 23px;
- text-align: center;
- &.ok {
- background:#3377FF;
- margin-left: 8px;
- &.cancel {
- border: 1px solid #DAE2F2;
-.empMana {
@@ -1,250 +0,0 @@
-import { Input, Switch } from 'antd'
-import { getChackGroupData, getCheckData } from "../checkGroupMana/service";
-import { ModalForm, ProColumns } from "@ant-design/pro-components";
-import { getData } from "../unitMana/service";
-import { set } from "lodash";
-const TableSelecter = ({ tableSelecterType, record, open, title, onVisibleChange, rowKey = 'id', request, onFinish }: {
- record: any, open: boolean, title: string, onVisibleChange: (bool: boolean) => void,
- tableSelecterType: 'UNIT' | 'CHECKGROUP',
- rowKey?: string, request?: (params: any) => Promise<any>, onFinish?: (selectedKeys: React.Key[], selectedRows: any[]) => void
- const [selectedRows, set_selectedRows] = useState<any[]>([]);
- const unitColumns: ProColumns[] = [
- title: 'Code',
- dataIndex: 'code',
- title: '是否单位管理人',
- dataIndex: 'flag',
- renderText(flag, record, index, action) {
- return <Switch size='small' checked={flag} onChange={(bool) => onSwitchChange(bool, record)} />
- ];
- const checkGroupColumns: ProColumns[] = [
- title: '查核组名',
- title: '是否查核组长',
- const onSwitchChange = (bool: boolean, record: any) => {
- const newData = datasource.map((item) => {
- if (item.code == record.code) {
- ...item,
- flag: bool
- return item
- const newShowList = showList.map((item) => {
- set_datasource([...newData]);
- set_showList([...newShowList]);
- const onSelectChange = (newSelectedRowKeys: React.Key[], selectedRows: any) => {
- set_selectedRows([...selectedRows]);
- const selectedRowCodes = selectedRows.map((a)=>a.code);
- const rows = datasource.filter((a)=>selectedRowCodes.includes(a.code));
- onFinish && onFinish(selectedKeys, rows);
- const getTableData = async () => {
- if(tableSelecterType == 'UNIT'){
- const resp = await getData();
- const checkedUnitCodes = record.departList?record.departList.map((a:any)=>a.code):[];
- let selectedCodes:string[] = [];
- let selectedRows:any[] = [];
- const data = resp.map((a:any)=>{
- if(checkedUnitCodes.includes(a.code)){
- selectedCodes.push(a.code);
- selectedRows.push(a);
- const needItem = record.departList.filter((b:any)=>a.code == b.code);
- ...a,
- flag:needItem[0].isManager?true:false
- return a
- set_showList(data);
- setSelectedKeys([...selectedCodes]);
- set_datasource([...datasource, ...data]);
- if(tableSelecterType == 'CHECKGROUP'){
- const resp = await getCheckData({pageSize:500,current:1});
- const checkedUnitCodes = record.groupList?record.groupList.map((a:any)=>a.code):[];
- const data = resp.list.map((a:any)=>{
- const needItem = record.groupList.filter((b:any)=>a.code == b.code);
- return Promise.resolve([]);
- getTableData()
- <Input placeholder={tableSelecterType == 'UNIT'?'请输入单位名称':'请输入查核组名称'} allowClear autoComplete='off'
- const result = datasource.filter(item => item.name.indexOf(e.target.value) != -1);
- <KCIMTable columns={tableSelecterType == 'UNIT' ? unitColumns : checkGroupColumns}
- selectedRowKeys:selectedKeys,
- dataSource={showList}
- const close = () => {
- onVisibleChange && onVisibleChange(false);
- <ModalForm className="TableSelecter" title={title} width={500} submitter={{
- render: false
@@ -1,134 +0,0 @@
-import React, { useEffect, useImperativeHandle, useState } from "react";
-import {Transfer} from 'antd'
-import { TransferItem, TransferProps } from 'antd/es/transfer';
-import { ColumnsType } from 'antd/es/table';
-import { difference } from "lodash";
-import { TableRowSelection } from 'antd/es/table/interface';
-interface TableTransferProps extends TransferProps<TransferItem> {
- leftColumns: ColumnsType<any>;
- rightColumns: ColumnsType<any>;
-const TableTransfer = React.forwardRef(({ leftColumns, rightColumns, ...restProps }: TableTransferProps, ref) => {
- const [_data, _set_data] = useState<any>();
- const [targetKeys, setTargetKeys] = useState<string[]>([]);
- const [selectedKeys, setSelectedKeys] = useState<string[]>([]);
- //获取单元
- const getFuncList = async () => {
- // const resp = await getTotalEmps({
- // computeDate: currentComputeDate as string,
- // unitCode: currentSelectedTreeNode.code
- // });
- // if (resp) {
- // //_set_data(resp);
- // const allData = resp.allEmployees.concat(resp.checkEmployees);
- // set_datasource(allData);
- // const defaultSelctedkeys = resp.checkEmployees.map((item: any) => item.empNo);
- // setTargetKeys(defaultSelctedkeys);
- const onChange = (nextTargetKeys: string[]) => {
- setTargetKeys(nextTargetKeys);
- const onSelectChange = (sourceSelectedKeys: string[], targetSelectedKeys: string[]) => {
- //console.log('sourceSelectedKeys:', sourceSelectedKeys,'targetSelectedKeys:',targetSelectedKeys);
- setSelectedKeys([...sourceSelectedKeys, ...targetSelectedKeys]);
- useImperativeHandle(ref, () => ({
- save: async () => {
- // const items = datasource.filter(a => targetKeys.includes(a.empNo));
- // const resp = await saveEmpsRequest(items);
- // tableRef.current?.reload();
- }));
- getFuncList();
- <Transfer className='TableTransfer' showSearch
- titles={['待选项', '已选项']}
- locale={{
- itemUnit: '项',
- itemsUnit: '项',
- searchPlaceholder: '请输入',
- oneWay={true}
- onChange={onChange}
- onSelectChange={onSelectChange}
- dataSource={datasource}
- rowKey={record => record.empNo}
- targetKeys={targetKeys}
- selectedKeys={selectedKeys}
- filterOption={(inputValue, item) => {
- return item.name!.indexOf(inputValue) !== -1
- {({
- direction,
- filteredItems,
- onItemSelectAll,
- onItemSelect,
- selectedKeys: listSelectedKeys,
- disabled: listDisabled,
- }) => {
- // console.log({ filteredItems, listSelectedKeys,direction });
- const columns = direction === 'left' ? leftColumns : rightColumns;
- const rowSelection: TableRowSelection<TransferItem> = {
- getCheckboxProps: (item) => ({ disabled: listDisabled || item.disabled }),
- onSelectAll(selected, selectedRows) {
- const treeSelectedKeys = selectedRows.map(({ empNo }) => empNo);
- const diffKeys = selected
- ? difference(treeSelectedKeys, listSelectedKeys)
- : difference(listSelectedKeys, treeSelectedKeys);
- onItemSelectAll(diffKeys as string[], selected);
- onSelect({ empNo }, selected) {
- onItemSelect(empNo as string, selected);
- selectedRowKeys: listSelectedKeys,
- <KCIMTable
- rowSelection={rowSelection}
- columns={columns as TransferItem[]}
- dataSource={filteredItems}
- size="small"
- bordered={false}
- rowKey={'empNo'}
- pagination={{ showTitle: false, pageSize: 9, showLessItems: false, simple: true, showTotal: () => false }}
- style={{ pointerEvents: listDisabled ? 'none' : undefined }}
- onRow={({ empNo, disabled: itemDisabled }) => ({
- onClick: () => {
- if (itemDisabled || listDisabled) return;
- onItemSelect(empNo as string, !listSelectedKeys.includes(empNo as string));
- })}
- );
- </Transfer>
-export default TableTransfer
@@ -1,270 +0,0 @@
- * @LastEditTime: 2024-09-09 10:56:09
-import React, { useEffect, useRef, useState } from 'react'
-import { addData, delData, editData, getData } from './service';
- const [tableSelecterType, set_tableSelecterType] = useState<'EMP' | 'CHECKGROUP'>('EMP'); //穿梭框类型
- const [currentEdit,set_currentEdit] = useState<any|undefined>(undefined);
- title: '展示排序',
- dataIndex: 'sort',
- title: '职能科室',
- title: '单位负责人',
- dataIndex: 'manager',
- renderText(list, record, index, action) {
- if(list){
- return list.reduce((prev:string,cur:any)=>`${prev.length>0?prev+',':''}${cur.name}`,'')
- dataIndex: 'remark',
- title: '是否作废',
- width: 140,
- <a key={'emp'} onClick={() => { openTransformModal(record);set_tableSelecterType('EMP');}} >人员</a>,
- // <a key={'theme'}>主题</a>,
- // <a key={'checkPoint'}>查核要点</a>
- data: resp,
- const openTransformModal = (record:any) => {
- title={`${type == 'EDIT' ? '编辑' : '新增'}单位`}
- label="单位名称:"
- <ProFormDigit name="sort" label='展示排序' />
- const tableSelecterCommit = async (keys:React.Key[],rows:any[]) => {
- <KCIMPagecontainer className='unitMana' title={false}>
- rowKey='id'
- onFinish={(keys,rows)=>tableSelecterCommit(keys,rows)}
- <div className='filterItem' style={{ marginRight: 16, width: 250 }}>
- <Input placeholder={'请输入单位/负责人'} allowClear autoComplete='off'
@@ -1,62 +0,0 @@
- * @LastEditTime: 2023-10-12 17:11:48
- return request('/manager/Department/getDepartmentList', {
@@ -1,78 +0,0 @@
-.unitMana {
@@ -1,198 +0,0 @@
-import { getData } from "../empMana/service";
- tableSelecterType:string,
- const empColumns: ProColumns[] = [
- return <Switch size='small' checked={flag == '1'} onChange={(bool) => onSwitchChange(bool, record)} />
- if (item.id == record.id) {
- // console.log({newData,newShowList});
- onFinish && onFinish(selectedKeys, selectedRows);
- const resp = await getData({
- current: 1,
- pageSize: 500
- set_showList(resp.list);
- set_datasource([...datasource, ...resp.list]);
- useEffect(()=>{
- console.log({record});
- },[record]);
- <Input placeholder={'请输入名称'} allowClear autoComplete='off'
- <KCIMTable columns={tableSelecterType == 'EMP' ? empColumns : checkGroupColumns}
@@ -1,481 +0,0 @@
- * @LastEditTime: 2024-10-12 10:38:26
-import { ActionType, ProFormDependency, ProFormInstance, ProFormText, ProFormSelect, ProFormRadio } from '@ant-design/pro-components';
-import { ModalForm } from '@ant-design/pro-form'
-import { Input, message, Popconfirm, Tag, Tabs } from 'antd';
-import { Key, useEffect, useRef, useState } from 'react';
-import 'moment/locale/zh-cn';
-import locale from 'antd/es/date-picker/locale/zh_CN';
-import { addData, delData, editData, getAccountingSubjectList, getAccountTypeDictReq } from './service';
-import { renameChildListToChildren } from '@/utils/tooljs';
-let currentRow: any = undefined;
- export const searchTree = (tree:any[], searchTerm:string) => {
- const searchTermLower = searchTerm.toLowerCase();
- function searchNode(node:any) {
- const matchedChildren: any[] = [];
- if (node.children && node.children.length > 0) {
- node.children.forEach((child: any) => {
- const matchedChild = searchNode(child);
- if (matchedChild) {
- matchedChildren.push(matchedChild);
- if (node.accountingName.toLowerCase().includes(searchTermLower) || node.accountingCode.toLowerCase().includes(searchTermLower)) {
- ...node,
- children: matchedChildren.length > 0 ? matchedChildren : node.children
- } else if (matchedChildren.length > 0) {
- children: matchedChildren
- return tree.map(rootNode => searchNode(rootNode)).filter(node => node !== null);
- function sortTreeByCode(tree:any[], codeKey = 'accountingCode', childrenKey = 'children') {
- // 首先对当前层级的节点按照 codeKey 进行排序
- tree.sort((a, b) => {
- return Number(a[codeKey]) - Number(b[codeKey]); // 按照 code 从小到大排序
- // 然后对于每个节点的子节点,不进行排序,只递归下去
- tree.forEach(node => {
- if (node[childrenKey] && node[childrenKey].length > 0) {
- sortTreeByCode(node[childrenKey], codeKey, childrenKey); // 递归处理子节点
- return tree; // 返回排序后的树
-export default function AccountingSubMana() {
- const [tableDataFilterParams, set_tableDataFilterParams] = useState<any | undefined>({ accountType: 1 });
- const formRef = useRef<ProFormInstance>();
- const [selectableLevelList, setSelectableLevelList] = useState([]);//可选的分摊层级列表
- const [tabs, set_tabs] = useState<any[]>([]);
- const [accountType, set_accountType] = useState<Key>(1);
- title: '会计科目名称',
- width: 400,
- fixed: 'left',
- dataIndex: 'accountingName',
- title: '会计科目编码',
- dataIndex: 'accountingCode',
- title: '会计科目类别',
- dataIndex: 'typeName',
- title: '成本类别',
- hideInTable: accountType == 1,
- dataIndex: 'costType',
- renderText(type) {
- return type == 1 ? '医疗成本' : type == 2 ? '医疗全成本' : '医院全成本'
- title: '成本属性',
- dataIndex: 'isBaseCost',
- return type == 1 ? '固定成本' : '变动成本'
- title: '可控类型',
- dataIndex: 'controlType',
- return type == 1 ? '不可控' : '可控'
- title: '诊别',
- dataIndex: 'medicalType',
- return type == 0 ? '全院' : type == 1 ? '门诊' : '住院'
- width: 120,
- fixed: 'right',
- <UpDataActBtn record={record} type='ADDCHILD' />,
- <Popconfirm
- title="是否确认删除?"
- key="del"
- onConfirm={() => delTableData(record)}
- <a>删除</a>
- </Popconfirm>,
- const {filter} = params;
- const resp = await getAccountingSubjectList({ ...params, accountType,pageSize:500 });
- let data = [];
- if(filter){
- data = searchTree(renameChildListToChildren(resp.list, 'child'),filter)
- data = renameChildListToChildren(resp.list, 'child')
- data:sortTreeByCode(data),
- const updateTable = async (formVal: any, type: 'EDIT' | "ADD" | "ADDCHILD") => {
- if (type == 'ADD' || type == 'ADDCHILD') {
- let id = 0;
- (type == 'ADDCHILD') && (id = formVal.id);
- const result = accountType == 1 ? { ...formVal, accountingType: accountType, id: id } : { ...formVal, accountingType: accountType, id: id, };
- const resp = await addData(result);
- currentRow = undefined;
- const resp = await editData({ ...formVal, isIncomeGroutSetSelect: false, isShareParamSelect: false, accountType });
- console.log({ error });
- const UpDataActBtn = ({ record, type }: { record: any, type: 'EDIT' | 'ADD' | 'ADDCHILD' }) => {
- title={`${type == 'EDIT' ? '编辑' : '新增'}会计科目`}
- width={350}
- initialValues={type == 'EDIT' ? {
- ...record
- } : { controlType: 1, medicalType: 0 }}
- type == 'EDIT' ? <a key="edit" >编辑</a> : type == 'ADDCHILD' ? <a className='add'>添加</a> : <span className='add'>新增</span>
- onFinish={(val) => {
- return updateTable(type == 'EDIT' ? { ...record, ...val } : type == 'ADDCHILD' ? { ...val, id: record.id } : { ...val }, type);
- <ProFormText name='typeName' hidden />
- label="会计科目编码"
- disabled={type == 'EDIT'}
- rules={[
- required: true,
- message: '会计科目编码是必填项',
- name="accountingCode"
- label="会计科目名"
- message: '会计科目名是必填项',
- name="accountingName"
- <ProFormDependency name={['accountingCode']}>
- ({ accountingCode }) => {
- return accountType == 2 ? (
- <>
- <ProFormSelect
- message: '',
- value: 0,
- label: '不是',
- value: 1,
- label: '是',
- name="isBaseCost"
- label="是否固定成本"
- <ProFormRadio.Group
- name="costType"
- label="成本类别"
- message: '成本类别是必填项',
- label: '医疗成本',
- label: '医疗全成本',
- value: 2,
- label: '医院全成本',
- value: 3,
- </>
- ) : <></>
- </ProFormDependency>
- message: '请选择会计科目类别',
- request={async () => {
- const resp = await getAccountTypeDictReq(accountType as number);
- return resp.map((a: any) => ({ label: a.name, value: a.code }))
- fieldProps={{
- onChange(value, option: any) {
- const { label } = option;
- formRef.current?.setFieldValue('typeName', label);
- name="type"
- label="会计科目类别"
- name="controlType"
- label="可控类型"
- message: '可控类型是必填项',
- label: '不可控',
- label: '可控',
- name="medicalType"
- label="就诊类别"
- message: '就诊类别是必填项',
- label: '全院',
- label: '门诊',
- label: '住院',
- const onTabChanged = (key: Key) => {
- set_accountType(key);
- set_tabs([
- label: '收入',
- key: 1,
- label: '支出',
- key: 2,
- ])
- <KCIMPagecontainer className='AccountingSubMana' title={false}>
- <div className='toolBar' >
- <Tabs
- defaultActiveKey={tabs.length > 0 ? tabs[0].key : undefined}
- items={tabs}
- key={'key'}
- onChange={(key) => onTabChanged(key)}
- <div className='filter' style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center',marginBottom:16 }}>
- <div className='filterItem'>
- <Input placeholder={'会计科目编码/名称'} allowClear autoComplete='off'
- <div className='btnGroup'>
- <div>
- <KCIMTable pagination={false} columns={columns as ProColumns[]} scroll={{ y: 'calc(100vh - 270px)' }} actionRef={tableRef} rowKey='id' params={tableDataFilterParams} request={(params) => getTableData(params)} />
@@ -1,42 +0,0 @@
-.AccountingSubMana {
- padding-top: 0;
- // display: flex;
- // flex-direction: row;
- // justify-content: space-between;
- // align-items: center;
@@ -1,310 +0,0 @@
- * @LastEditTime: 2024-10-12 16:04:21
-import { ActionType, ProFormDependency, ProFormInstance, ProFormText, ProFormSelect } from '@ant-design/pro-components';
-import { getAccountProductConnectableList, getAccountProductConnectList, saveAccountProductConnected } from './service';
-import TableSelecter from '@/components/KCIMTableSelector';
-import { searchTree } from '../accountingSubMana';
-const tableSelectorColumns = [
- title: 'Id',
- width:60,
- // title: '会计科目编码',
- // width:300,
- // dataIndex: 'accountingCode',
- title: '成本收入项目',
-];
-function sortTreeByCode(tree:any[], codeKey = 'accountingCode', childrenKey = 'children') {
-let currentRow:any = undefined;
-export default function AccountingSubMap() {
- const [tableSelecterVisible,set_tableSelecterVisible] = useState(false);
- width:300,
- title: '收入项目',
- dataIndex: 'productVOs',
- renderText(productVOs, record) {
- if (Array.isArray(productVOs)) {
- return productVOs.map((item, index) => { return <Tag key={index}>{item.productName}</Tag> })
- return <></>
- width: 80,
- const { isParent } = record;
- return !isParent ? [
- <a
- key="config"
- currentRow = record;
- 设置对应
- </a>,
- ] : []
- const columnsTwo: ProColumns[] = [
- title: '成本项目',
- const resp = await getAccountProductConnectList({ ...params, accountType,pageSize:500 });
- data: sortTreeByCode(data),
-//productCode,productName
- const getTableSelectorData = async () => {
- const {responsibilityId,productVOs = []} = currentRow;
- const defaultRows = productVOs?productVOs.map((a:any)=>({id:a.id,name:`${a.productName}[${a.productCode}]`})):[];
- const resp = await getAccountProductConnectableList({responsibilityId,pageSize:500,current:1});
- if(resp){
- return [...resp,...defaultRows]
- const tableSelecterCommit = async (keys:Key[],rows:any[]) => {
- const {id} = currentRow;
- const resp = await saveAccountProductConnected({id,products:keys});
- set_tableSelecterVisible(false)
- <KCIMPagecontainer className='AccountingSubMap' title={false}>
- columns={[...tableSelectorColumns]}
- title='关联成本收入项目'
- rowKey={'id'}
- request={getTableSelectorData}
- defaultSelectedKeys={(currentRow&¤tRow.productVOs)?[...(currentRow.productVOs).map((a:any)=>a.id)]:[]}
- record={currentRow}
- <div className='filter' style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center'}}>
- <KCIMTable pagination={false} columns={(accountType == 1?columns:columnsTwo) as ProColumns[]} scroll={{ y: 'calc(100vh - 230px)' }} actionRef={tableRef} rowKey='id' params={tableDataFilterParams} request={(params) => getTableData(params)} />
@@ -1,54 +0,0 @@
- * @LastEditTime: 2023-12-07 15:01:32
-export const getAccountProductConnectList = (params:any) => {
- return request('/costAccount/accountProduct/list', {
- params:{...params},
-//获取责任中心对应可绑定科室列表
-export const getAccountProductConnectableList = (params:any) => {
- return request('/costAccount/product/getProducts', {
-//保存绑定信息
-export const saveAccountProductConnected = (body:any) => {
- return request('/costAccount/accountProduct/save', {
- data:{...body},
-.AccountingSubMap {
@@ -1,451 +0,0 @@
- * @LastEditTime: 2024-09-09 10:55:13
-import { ActionType } from '@ant-design/pro-components';
-import { ModalForm, ProFormSelect, ProFormText, ProFormTextArea } from '@ant-design/pro-form';
-import { Dropdown, Input, MenuProps, message, Tooltip, Popconfirm, TreeProps } from 'antd';
-import { Key } from 'react';
-import { useEffect, useRef, useState } from 'react';
-import DirectoryTree from 'antd/es/tree/DirectoryTree';
-import { DataNode } from 'antd/es/tree';
-import { getAccountingItemMap, addTableData, delData, getAccountingList, batchDelTableData } from './service';
-import expandedIcon from '../../../../../static/treenode_open.png';
-import closeIcon from '../../../../../static/treenode_collapse.png';
-import '../../../../utils/zhongtaiB'
-import { getTargetDic } from '@/services/auth';
-import { getDeepestTreeData } from '@/utils/tooljs';
-let _currentSelectedType: any = undefined;
-const ChargeItemMap = () => {
- const [currentSelectedType, set_currentSelectedType] = useState<any | undefined>(undefined);
- const [treeData, set_treeData] = useState<any[]>([]);
- const [currentSelectedTreeNode, set_currentSelectedTreeNode] = useState<null | any>(null);
- const [expandedKeys, set_expandedKeys] = useState<Key[]>([]);
- const [autoExpandParent, set_autoExpandParent] = useState(true);
- const [searchValue, set_searchValue] = useState('');
- const [currentTreeDataFilter, set_currentTreeDataFilter] = useState({ name: '全部', code: 0 });
- const [treeFilterVisible, set_treeFilterVisible] = useState(false);
- const [selectedRowKeys,set_selectedRowKeys] = useState<Key[]>([]);
- const [treeDataDefault, set_treeDataDefault] = useState<any[]>([]);
- const [leftDataSearchKeyVal, set_leftDataSearchKeyVal] = useState<undefined | string>(undefined);
- const column: ProColumns[] = [
- title: '收费项目代码',
- dataIndex: 'itemCode',
- title: '收费项目名称',
- dataIndex: 'itemName',
- title: '收费项目类别',
- width: 100,
- width: 60,
- onConfirm={() => delTableData(record.id)}
- </Popconfirm>
- const resp = await getAccountingItemMap({ ...params });
- //获取左侧列表
- const getPageLeftData = async () => {
- const resp = await getAccountingList('', currentTreeDataFilter.code);
- set_treeData(resp);
- set_treeDataDefault(resp);
- set_currentSelectedTreeNode(null);
- const delTableData = async (id: number) => {
- const resp = await delData(id);
- const tableSelecterCommit = async (keys: Key[], rows: any[]) => {
- const arr = rows.map((a, index) => ({
- itemCode: a.itemCode,
- itemName: a.itemName,
- type: a.itemType,
- accountingCode: currentSelectedTreeNode.accountingCode,
- accountingName: currentSelectedTreeNode.accountingName,
- itemMaps: arr
- const resp = await addTableData(result);
- message.success('操作成功');
- const batchDelHandle = async () => {
- const resp = await batchDelTableData(selectedRowKeys);
- set_selectedRowKeys([]);
- const onSelect: TreeProps['onSelect'] = (selectedKeys, info: any) => {
- if (!node.children || node.children.length == 0) {
- set_currentSelectedTreeNode(node);
- // setExpandedKeys(newExpandedKeys);
- // setAutoExpandParent(false);
- set_expandedKeys(newExpandedKeys);
- set_autoExpandParent(false);
- const dataList: any[] = [];
- const getParentKey = (key: React.Key, tree: any[]): React.Key => {
- let parentKey: React.Key;
- for (let i = 0; i < tree.length; i++) {
- const node = tree[i];
- if (node.children) {
- if (node.children.some((item: { accountingCode: React.Key; }) => item.accountingCode === key)) {
- parentKey = node.accountingCode;
- } else if (getParentKey(key, node.children)) {
- parentKey = getParentKey(key, node.children);
- return parentKey!;
- const generateList = (data: any[]) => {
- for (let i = 0; i < data.length; i++) {
- const node = data[i];
- dataList.push(node);
- generateList(node.children);
- generateList(treeData as any);
- const onTreeSearchKeyChange = (e: React.ChangeEvent<HTMLInputElement>) => {
- const { value } = e.target;
- const newExpandedKeys = dataList
- .map((item) => {
- if (item.accountingName.indexOf(value) > -1) {
- return getParentKey(item.accountingCode, treeData);
- set_expandedKeys(newExpandedKeys as React.Key[]);
- set_searchValue(value);
- set_autoExpandParent(true);
- //左侧树结构筛选
- const changeTreeDataFilter = (obj: any) => {
- set_currentTreeDataFilter(obj);
- set_treeFilterVisible(false);
- if (currentSelectedTreeNode) {
- set_tableDataFilterParams({ ...tableDataFilterParams, accountingCode: currentSelectedTreeNode.accountingCode });
- }, [currentSelectedTreeNode])
- //初始化左侧树结构数据后
- if (treeData?.length > 0) {
- if (!currentSelectedTreeNode) {
- if (treeData[0].children && treeData[0].children.length > 0) {
- const [node, nodeParent] = getDeepestTreeData(treeData[0], 'children');
- set_expandedKeys([nodeParent.accountingCode]);
- set_currentSelectedTreeNode(treeData[0]);
- set_expandedKeys([treeData[0].accountingCode]);
- }, [treeData]);
- getPageLeftData();
- }, [currentTreeDataFilter])
- <KCIMPagecontainer title={false} className='ChargeItemMap'>
- title='添加'
- rowKey={'itemCode'}
- defaultSelectedKeys={[]}
- record={_currentSelectedType}
- {selectedRowKeys.length > 0 && (
- <div className='bottomBar'>
- <span>已选择<a>{selectedRowKeys.length}</a>项</span>
- <a onClick={() => batchDelHandle()}>批量删除</a>
- )}
- treeFilterVisible && (
- <div className='selecterList'>
- <div onClick={() => changeTreeDataFilter({ name: '全部', code: 0 })} className={currentTreeDataFilter.code == 0 ? 'list on' : 'list'}>全部</div>
- <div onClick={() => changeTreeDataFilter({ name: '已对照', code: 1 })} className={currentTreeDataFilter.code == 1 ? 'list on' : 'list'}>{'已对照'}</div>
- <div onClick={() => changeTreeDataFilter({ name: '未对照', code: 3 })} className={currentTreeDataFilter.code == 3 ? 'list on' : 'list'}>{'未对照'}</div>
- <div className='left'>
- <Input placeholder={'会计科目名称'} allowClear autoComplete='off'
- <IconFont type="iconsousuo" style={{ color: '#99A6BF' }} />
- value={leftDataSearchKeyVal}
- style={{ width: 156 }}
- onChange={onTreeSearchKeyChange}
- <Tooltip placement="top" title={currentTreeDataFilter.name}>
- <div className={currentTreeDataFilter.code == 0 ? 'filter' : currentTreeDataFilter.code == 1 ? 'filter blue' : 'filter orange'} onClick={() => set_treeFilterVisible(true)}></div>
- <div className='wrap'>
- treeData && treeData.length > 0 && currentSelectedTreeNode && (
- fieldNames={{ title: 'accountingName', key: 'accountingCode' }}
- rootStyle={{ height: '100%', paddingBottom: 50, padding: '0 16px' }}
- selectedKeys={[currentSelectedTreeNode.accountingCode]}
- titleRender={
- (nodeData: any) => {
- const strTitle = nodeData.accountingName as string;
- const index = strTitle.indexOf(searchValue);
- const beforeStr = strTitle.substring(0, index);
- const afterStr = strTitle.slice(index + searchValue.length);
- const title =
- index > -1 ? (
- <span>
- {beforeStr}
- <span className="site-tree-search-value" style={{ color: '#3377ff', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{searchValue}</span>
- {afterStr}
- </span>
- ) : (
- <span className='strTitle'>{strTitle}</span>
- return <div style={{
- display: 'flex', flexDirection: 'row',
- width: '100%',
- justifyContent: 'space-between', alignItems: 'center', height: 32,
- borderRadius: '4px',
- overflow: 'hidden',
- color: '#17181A',
- textOverflow: 'ellipsis',
- whiteSpace: 'nowrap'
- {title}
- {!nodeData.map && <span className={nodeData.unitType ? 'point lastChild' : 'point'}></span>}
- defaultSelectedKeys={[currentSelectedTreeNode.accountingCode]}
- treeData={treeData as unknown as DataNode[]}
- return !expanded ? <img style={{ width: 20, height: 20, position: 'relative', top: 5 }} src={expandedIcon} /> : <img style={{ width: 20, height: 20, position: 'relative', top: 5 }} src={closeIcon} />
- <div className='right'>
- <Input placeholder={'收费项目名称'} allowClear autoComplete='off'
- <IconFont type="iconsousuo" style={{ color: '#99A6BF' }} onClick={() => tableDataSearchHandle('itemName')} />
- itemName: ''
- itemName: (e.target as HTMLInputElement).value
- <span className='add' onClick={() => set_tableSelecterVisible(true)}>添加</span>
- {currentSelectedTreeNode && <KCIMTable actionRef={tableRef} columns={column}
- scroll={{ y: 500 }}
- params={tableDataFilterParams}
- request={(params) => getTableData(params)}
- onChange(selectedRowKeys, selectedRows, info) {
- set_selectedRowKeys(selectedRowKeys);
- />}
-export default ChargeItemMap;
-function getParentKey(code: any, treeData: any[]) {
- throw new Error('Function not implemented.');
@@ -1,76 +0,0 @@
- * @Date: 2023-03-07 11:12:10
- * @LastEditTime: 2023-11-30 10:34:32
- * @FilePath: /KC-MiddlePlatform/src/pages/platform/setting/pubDicMana/service.ts
-import { string } from 'mathjs';
-//获取左侧数据
-export const getAccountingList = (accountingName:string,type:number) => {
- return request('/costAccount/setting/getAccountingList', {
- params:{accountingName,type}
-//获取右侧表格数据
-export const getAccountingItemMap = (params:{accountingCode:string,itemName?:string,pageSize:number,current:number}) => {
- return request('/costAccount/setting/getAccountingItemMap', {
-//获取可添加列表
-export const getAddableTableData = (type:number,name?:string) => {
- return request('/costAccount/setting/getAccountingItemDictList', {
- params:{type,name}
-export const addTableData = (data:any) => {
- return request('/costAccount/setting/addAccountingItemMap', {
-export const delData = (id:number) => {
- return request('/costAccount/setting/deleteAccountingItemMap', {
-//批量删除表格数据
-export const batchDelTableData = (ids:Key[]) => {
- return request('/costAccount/setting/batchDeleteAccountingItemMap', {
- data:[...ids]
@@ -1,260 +0,0 @@
-.row-dragging {
- width: 130px;
-.ChargeItemMap {
- width: 100%;
- height: calc(100vh - 48px);
- position: relative;
- .bottomBar {
- position: absolute;
- bottom: -16px;
- left: -16px;
- width: 102.5%;
- height: 48px;
- padding: 0 16px;
- box-shadow: 0px -8px 16px 0px rgba(64, 85, 128, 0.1);
- &>span {
- &>a {
- width: 80px;
- .selecterList {
- z-index: 99;
- top: 44px;
- left: 180px;
- width: 120px;
- height: 104px;
- box-shadow: 0px 8px 16px 0px rgba(64, 85, 128, 0.1);
- padding: 4px;
- .list {
- height: 32px;
- line-height: 16px;
- border-radius: 2px;
- padding: 8px;
- &.on {
- font-weight: 500;
- background: rgba(51, 119, 255, 0.08);
- &::after {
- right: 8px;
- content: '';
- width: 16px;
- height: 16px;
- background: url('../../../../../static/gou_blue.png');
- background-size: contain;
- .left {
- float: left;
- width: 220px;
- height: calc(100vh - 80px);
- overflow: hidden;
- margin-right: 16px;
- padding: 16px 0px;
- .toolbar {
- width: 24px;
- background: #FAFCFF;
- background: url('../../../../../static/filter.png');
- background-size: 16px 16px;
- background-position: center;
- background-repeat: no-repeat;
- &.orange {
- z-index: 9;
- top: 1px;
- right: 1px;
- width: 4px;
- height: 4px;
- border-radius: 50%;
- background: #FF9832;
- &.blue {
- .wrap {
- margin-top: 16px;
- height: calc((100vh - 80px) - 75px);
- overflow-y: scroll;
- // border: 1px solid red;
- .cos-ant-tree.cos-ant-tree-directory .cos-ant-tree-treenode-selected:hover::before,
- .cos-ant-tree.cos-ant-tree-directory .cos-ant-tree-treenode-selected::before {
- background: rgb(240 242 245 / 100%);
- .cos-ant-tree.cos-ant-tree-directory .cos-ant-tree-treenode .cos-ant-tree-node-content-wrapper.cos-ant-tree-node-selected {
- font-weight: bold;
- .cost-ant-tree.cost-ant-tree-directory .cost-ant-tree-treenode-selected::before {
- .right {
- width: calc(100% - 236px);
@@ -1,201 +0,0 @@
-import React, { Key, useEffect, useState } from "react";
-import { Input, Select } from 'antd'
-import { ModalForm, ProColumns, ProFormSelect, ProFormText } from "@ant-design/pro-components";
-import { getAddableTableData } from "./service";
-const TableSelecter = ({ record, open, title, onVisibleChange, rowKey = 'id', request, onFinish, defaultSelectedKeys }: {
- record: any, open: boolean, title: string, onVisibleChange: (bool: boolean) => void, defaultSelectedKeys: Key[],
- const [type, set_type] = useState<number>(3);
- const [keyword, set_keyword] = useState<string | undefined>(undefined);
- const selectedRowCodes = selectedRows.map((a) => a[`${rowKey}`]);
- const rows = datasource.filter((a) => selectedRowCodes.includes(a[`${rowKey}`]));
- const resp = await getAddableTableData(type);
- let selectedCodes: string[] = [];
- let selectedRows: any[] = [];
- const data = resp.map((a: any) => {
- if (defaultSelectedKeys.includes(a[`${rowKey}`])) {
- selectedCodes.push(a[`${rowKey}`]);
- const needItem = record.departList.filter((b: any) => a[`${rowKey}`] == b[`${rowKey}`]);
- flag: needItem[0].isManager ? true : false
- // console.log({code, keyword});
- const result = datasource.filter((a) => {
- return a.itemName.indexOf(keyword) != -1
- set_showList([...result]);
- }, [keyword]);
- },[type]);
- <div className="filter" style={{marginBottom:8,display:'flex',flexDirection:'row',alignItems:'center'}}>
- noStyle
- style={{marginRight:8}}
- {label:'药品',value:1},
- {label:'材料',value:2},
- {label:'项目',value:3}
- defaultValue:3,
- onChange(value, option) {
- set_type(value);
- set_keyword('');
- <ProFormText noStyle placeholder={'项目名称'}
- value:keyword,
- suffix: <IconFont style={{ color: '#99A6BF' }} type="iconsousuo" />,
- onChange: (e) => {
- set_keyword(e.target.value);
- <KCIMTable columns={columns}
- selectedRowKeys: selectedKeys,
- pagination={{ showTitle: false, showSizeChanger: true,simple:true }}
- <ModalForm className="TableSelecter" title={title} width={400} submitter={{
@@ -1,292 +0,0 @@
- * @LastEditTime: 2024-07-29 15:47:04
-import FormItem from 'antd/es/form/FormItem';
-import { ActionType, ProFormInstance, ProFormText } from '@ant-design/pro-components';
-import { Input, message, Popconfirm, Tag } from 'antd';
-import { delData, editData, addCostProject, getCostProjecttList, importDataPost } from './service';
-import KCIMUpload from '@/components/KCIMUpload';
-import { downloadTemplateReq } from '@/utils/tooljs';
-export default function CostIncomeProjectMana() {
- title: '成本编号',
- dataIndex: 'productCode',
- title: '成本项目名称',
- dataIndex: 'productName',
- const resp = await getCostProjecttList({ ...params });
- const result = { ...formVal };
- const resp = await addCostProject(result);
- const { responsibilityLevel = 0, selectedSharelevel = [], shareId } = formVal;
- let body = {};
- if (selectedSharelevel.length == 0) {
- //没有修改分摊层级
- body = { ...formVal }
- if (Object.prototype.toString.call(selectedSharelevel) == '[object Object]') {
- //修改了分摊层级
- // console.log('修改了分摊层级');
- body = { ...formVal, shareId: selectedSharelevel.id, shareName: selectedSharelevel.shareName, shareLevel: selectedSharelevel.leverSort }
- const resp = await editData({ ...body });
- title={`${type == 'EDIT' ? '编辑' : '新增'}成本项目`}
- ...record,
- } : {}}
- label="成本项目编码"
- message: '成本项目编码是必填项',
- name="productCode"
- label="成本项目名"
- message: '成本项目名是必填项',
- name="productName"
- const downloadTemplate = async () => {
- await downloadTemplateReq('/costAccount/excel/getImportProductTemplate');
- const importData = () => {
- width={360}
- title={`导入数据`}
- <a className="import" key="3">
- 导入
- </a>
- submitter={{
- render: (props, defaultDoms) => {
- const needBtn = defaultDoms.filter((b) => {
- return b.key != 'rest';
- ...needBtn,
- onFinish={async (values) => {
- const {
- importFile: { fileList },
- } = values;
- let formData = new FormData();
- formData.append('file', fileList[0].originFileObj);
- const resp = await importDataPost(formData);
- <FormItem name={'importFile'}>
- <KCIMUpload downloadTemplateFile={() => downloadTemplate()} />
- </FormItem>
- <KCIMPagecontainer className='CostIncomeProjectMana' title={false}>
- <div className='filterItem' style={{ marginLeft: 16, width: 205 }}>
- <Input placeholder={'成本项目名称'} allowClear autoComplete='off'
- filter: ((e.target) as HTMLInputElement).value
- {importData()}
- <KCIMTable scroll={{y:`calc(100vh - 235px)`}} columns={columns as ProColumns[]} actionRef={tableRef} rowKey='id' params={tableDataFilterParams} request={(params) => getTableData(params)} />
- * @LastEditTime: 2023-11-13 16:04:14
-export const getCostProjecttList = (params:any) => {
- return request('/costAccount/product/list', {
-//新增
- productCode:string,
- productName:string
-export async function addCostProject(body:AddTableDataType) {
- return request('/costAccount/product/save', {
-//导入
-export const importDataPost = (data:any) => {
- return request('/costAccount/excel/importProduct', {
-export type TableRowEditType = {
-}&AddTableDataType
-export const editData = (data:any) => {
- return request('/costAccount/product/edit', {
- return request('/costAccount/product/delete', {
- data:[id]
- * @LastEditTime: 2024-09-09 10:54:49
-import { ActionType, ProFormDependency, ProFormInstance, ProFormText, ProFormSelect, ProFormDigit } from '@ant-design/pro-components';
-import { Input, message, Popconfirm, Form, Select } from 'antd';
-import { addData, delData, editData, getApportionmentLevelList } from './service';
-export default function AllocationLevelSet() {
- const [currentRow, setCurrentRow] = useState<any | undefined>(undefined);
- const [selectableLevelList, setSelectableLevelList] = useState<any[]>([]);//可选的分摊层级列表
- title: '分摊层级名',
- dataIndex: 'shareName',
- title: '分摊层级序号',
- dataIndex: 'leverSort',
- title: '目标层级',
- dataIndex: 'targetLevel',
- title: '计算方式',
- dataIndex: 'calcType',
- renderText(text, record) {
- return <>{text == 0 ? '合并计算' : '分开计算'}</>
- width: 90,
- const resp = await getApportionmentLevelList({ ...params });
- const tempArr = resp.list&&resp.list.map((item:any) => ({ label: item.shareName, value: item.leverSort }))
- setSelectableLevelList(tempArr);
- const resp = await delData([record.id]);
- console.log({formVal});
- const {targetLevel} = formVal;
- const result = { ...formVal,targetLevel:(targetLevel.map((a:any) => a.value)).join(',') };
- const resp = await editData({ ...formVal,targetLevel:(targetLevel.map((a:any) => a.value?a.value:a)).join(',') });
- setCurrentRow(record);
- title={`${type == 'EDIT' ? '编辑' : '新增'}分摊层级`}
- targetLevel:record.targetLevel?record.targetLevel.split(',').map((a:string)=>Number(a)):[]
- } : {targetLevel:[]}}
- <ProFormDigit
- label="分摊层级序号"
- message: '分摊层级序号是必填项',
- name="leverSort"
- min={1} max={100}
- label="分摊层级名"
- message: '分摊层级名是必填项',
- name="shareName"
- message: '请选择计算方式',
- label: '合并计算',
- label: '分开计算',
- name="calcType"
- label="计算方式"
- <ProFormDependency name={['leverSort']}>
- ({ leverSort }) => {
- const filteredArr = selectableLevelList.filter(item => item.value >= leverSort);
- if (filteredArr.length == 0) {
- //当大于最大可选分摊层级
- //formRef?.current?.setFieldsValue({ targetLevel: [{ value: `${leverSort}` }] });
- formRef?.current?.setFieldValue('targetLevel',[{ value: `${leverSort}` }]);
- return <ProFormText name='targetLevel' hidden />
- if(type == 'ADD'){
- formRef?.current?.setFieldValue('targetLevel',[]);
- if(type == 'EDIT'){
- formRef?.current?.setFieldValue('targetLevel',record.targetLevel?record.targetLevel.split(',').map((a:string)=>Number(a)):[]);
- return filteredArr.length > 0 && (
- <Form.Item name='targetLevel' label="目标层级" shouldUpdate style={{width:320}} required >
- <Select
- mode="multiple"
- labelInValue={true}
- placeholder='请选择'
- maxTagCount={2}
- {filteredArr.map((item, index) => (
- <Select.Option key={index} value={item.value}>
- {`${item.label}层级${item.value}`}
- </Select.Option>
- ))}
- </Select>
- </Form.Item>
- console.log({ error })
- <KCIMPagecontainer className='AllocationLevelSet' title={false}>
- <Input placeholder={'分摊层级名称'} allowClear autoComplete='off'
- <IconFont type="iconsousuo" style={{color:'#99A6BF'}} onClick={() => tableDataSearchHandle('name')} />
- name: ''
- name: (e.target as HTMLInputElement).value
- <KCIMTable scroll={{y:`calc(100vh - 234px)`}} columns={columns as ProColumns[]} actionRef={tableRef} rowKey='id' params={tableDataFilterParams} request={(params) => getTableData(params)} />
@@ -1,75 +0,0 @@
- * @LastEditTime: 2023-11-14 15:03:54
-export const getApportionmentLevelList = (params:any) => {
- return request('/costAccount/costsharelevel/list', {
- leverSort:number,
- shareName:string,
- calcType:number,
- targetLevel:any
- return request('/costAccount/costsharelevel/save', {
- data:{...data}
- return request('/costAccount/costsharelevel/update', {
-export const delData = (ids:Key[]) => {
- return request('/costAccount/costsharelevel/delete', {
-.AllocationLevelSet {
- margin-bottom: 16px;
@@ -1,200 +0,0 @@
-import { EditableProTable, ModalForm, ProColumns, ProFormSelect, ProFormText } from "@ant-design/pro-components";
-import { getHasSetParamsList, getParamsSelectableList } from "./service";
-import { RecordKey } from "@ant-design/pro-utils/es/useEditableArray";
-const EditTableModal = ({ record, open, title, onVisibleChange, rowKey = 'id', onFinish }: {
- rowKey?: string, onFinish?: (selectedRows: any[]) => void
- let currentSelectedRow:undefined|any = undefined;
- title: '分摊参数',
- dataIndex: 'shareParamCode',
- valueType:'select',
- request:async ()=>{
- const resp = await getParamsSelectableList({pageSize:500,current:1,id:record.id});
- return resp.list.map((a:any)=>({label: a.shareParamName,value: a.shareParamCode,id:a.id}))
- fieldProps:{
- showSearch:true,
- style: {
- width: '280px', // 设置你想要的宽度
- onSelect:(a: any,b: any,c:any)=>{
- currentSelectedRow = b;
- title: '分摊比例',
- width:90,
- dataIndex: 'shareParamPopout',
- valueType:'digit',
- style:{
- width:'70px'
- width:130,
- gap:'2px !important'
- render: (text, record, _, action) => [
- key="editable"
- action?.startEditable?.(record.id);
- 编辑
- key="delete"
- set_datasource(datasource.filter((item) => item.id !== record.id));
- 删除
- ],
- onFinish && onFinish(datasource);
- const resp = await getHasSetParamsList(record.id);
- set_datasource(resp);
- <EditableProTable columns={columns}
- className='EditableProTable'
- options={false}
- recordCreatorProps={
- record: () => ({ id: (Math.random() * 1000000).toFixed(0) }),
- editable={{
- onSave: async (rowKey, data, row) => {
- // console.log({rowKey, data, row,currentSelectedRow,datasource});
- const {index} = data;
- if(index > datasource.length - 1){
- //新增
- const {id,label} = currentSelectedRow;
- set_datasource([...datasource,{
- shareParamName:label,
- shareParamCode:data.shareParamCode,
- shareParamPopout:data.shareParamPopout,
- id:id
- }]);
- }else {
- //编辑
- const newData = [...datasource];
- newData[index] = {
- shareParamName:currentSelectedRow?currentSelectedRow.label:data.shareParamName,
- id:currentSelectedRow?currentSelectedRow.id:data.id
- currentSelectedRow = undefined;
- value={datasource}
- <span className='ok' onClick={() => saveHandle()}>{`确认`}</span>
- <ModalForm className="TableSelecter" title={title} width={550} submitter={{
-export default EditTableModal
@@ -1,446 +0,0 @@
- * @LastEditTime: 2024-08-12 10:56:07
-import { ActionType, ProFormDependency, ProFormInstance, ProFormText, ProFormSelect, ProFormTextArea, ProFormTreeSelect } from '@ant-design/pro-components';
-import { addData, copyParamsList, delData, editData, getCostshareparamConnectList, getResponsibilityCenterSelecterList, saveParamsList } from './service';
-import { getAccountingSubjectList } from '../../accountingAccountSet/accountingSubMana/service';
-import { getChilds } from '@/utils/tooljs';
-import EditTableModal from './editTableModal';
-export default function AllocationParamsMap() {
- const [tableDataFilterParams, set_tableDataFilterParams] = useState<any | undefined>(undefined);
- const [selectedResponsibilityId, setSelectedResponsibilityId] = useState(null);
- const [selectedResponsibility, setSelectedResponsibility] = useState(null);
- const [editTableVisible, set_editTableVisible] = useState(false);
- title: '分摊级别',
- width:80,
- dataIndex: 'shareLevel',
- title: '责任中心编码',
- width:120,
- dataIndex: 'responsibilityCode',
- title: '责任中心名',
- dataIndex: 'responsibilityName',
- dataIndex: 'shareParamMap',
- dataIndex: 'accountingNames',
- dataIndex: 'accountingCodes',
- title: '别名',
- width:100,
- dataIndex: 'alias',
- width:200,
- dataIndex: 'costNode',
- width: 200,
- fixed:'right',
- <a key='copy' onClick={() => { set_tableSelecterVisible(true); setCurrentRow(record); }}>复制</a>,
- <a key='share' onClick={() => { set_editTableVisible(true); setCurrentRow(record) }}>分摊参数</a>
- const resp = await getCostshareparamConnectList({ ...params });
- responsibilityId: formVal.responsibilityId,
- accountingIds: formVal.accountingIds.join(','),
- isShareCost: formVal.isShareCost,
- alias: formVal.alias,
- costNode: formVal.costNode,
- responsibilityName: formVal.responsibility?formVal.responsibility.responsibilityName:formVal.responsibilityName,
- shareLevel: formVal.responsibility?formVal.responsibility.shareLevel:formVal.shareLevel,
- responsibilityCode: formVal.responsibility?formVal.responsibility.responsibilityCode:formVal.responsibilityCode
- const resp = await editData({...result,id:formVal.id});
- const [ifDisable, setIfDisable] = useState(false);
- let needDisableIds: any[] = [];
- let accountingIds: Key[] = record.accountingIdList?record.accountingIdList.map((a:string)=>Number(a)):[];
- title={`${type == 'EDIT' ? '编辑' : '新增'}成本分摊参数对应`}
- accountings:record.accountingIdList?record.accountingIdList.map((a:string)=>Number(a)):[],
- return updateTable(type == 'EDIT' ? { ...record, ...val, accountingIds } : { ...val, accountingIds }, type);
- <ProFormText name="responsibility" hidden />
- message: '请选择责任中心',
- onChange: async (val, option: any) => {
- const { } = option;
- const resp = await getResponsibilityCenterSelecterList();
- const selected = resp.filter((item: any) => item.id == val);
- if (selected[0]) {
- formRef.current?.setFieldValue('responsibility', selected[0]);
- if (needDisableIds.includes(val)) {
- setIfDisable(false);
- setIfDisable(true);
- // const resp = [
- // calcType: 1,
- // id: 401,
- // responsibilityCode: "B0100",
- // responsibilityId: 401,
- // responsibilityName: "公共费用",
- // shareId: 59,
- // shareLevel: 1,
- // shareName: "公共费用",
- // ]
- return resp.map((item: any) => {
- if (item.calcType == 1) {
- needDisableIds.push(item.id);
- return ({
- label: item.responsibilityName,
- value: item.id,
- name="responsibilityId"
- label="请选择责任中心"
- <ProFormTreeSelect
- disabled={ifDisable}
- allowClear
- required: ifDisable ? false : true,
- message: '请选择会计科目',
- const resp = await getAccountingSubjectList({ accountType:2, pageSize: 500, current: 1 });
- return resp.list
- showSearch: true,
- multiple: true,
- maxTagCount:3,
- maxTagPlaceholder:'...',
- treeCheckable: true,
- treeNodeFilterProp: 'accountingName',
- showCheckedStrategy: 'SHOW_CHILD',
- fieldNames: {
- label: 'accountingName',
- value: 'id'
- onChange(value, labelList, extra) {
- // console.log({value,labelList,extra});
- accountingIds = value;
- // onSelect: (value, opt) => {
- // console.log({ value, opt });
- // // console.log(getChilds(opt,'children'));
- // if (opt.children && opt.children.length > 0) {
- // const childs = getChilds(opt, 'children');
- // const ids = childs.map((a) => a.id);
- // accountingIds = ids;
- name="accountings"
- label="选择会计科目"
- message: '请选择',
- request={async () => [
- { label: '不包含分摊成本', value: 0 },
- { label: '包含分摊成本', value: 1 }
- name="isShareCost"
- label="是否包含分摊成本"
- name="alias"
- label="别名"
- name="costNode"
- label="备注"
- placeholder="请输入备注"
- const shareParamsSetCommit = async (rows: any[]) => {
- const resp = await saveParamsList({ id: currentRow.id, shareParamProportionVOList: rows });
- set_editTableVisible(false);
- const tableSelecterCommit = async (keys: Key[], rows: any) => {
- const { id } = currentRow;
- const resp = await copyParamsList({ id, responsibilityIds: keys });
- <KCIMPagecontainer className='AllocationParamsMap' title={false}>
- <EditTableModal
- onVisibleChange={(bool) => set_editTableVisible(bool)}
- title='分摊参数设置'
- open={editTableVisible}
- onFinish={(rows) => shareParamsSetCommit(rows)}
- title='选择复制目标'
- <Input placeholder={'责任中心名称'} allowClear autoComplete='off'
- <IconFont type="iconsousuo" style={{ color: '#99A6BF' }} onClick={() => tableDataSearchHandle('name')} />
- <KCIMTable scroll={{x:2000,y:`calc(100vh - 234px)`}} columns={columns as ProColumns[]} actionRef={tableRef} rowKey='id' params={tableDataFilterParams} request={(params) => getTableData(params)} />
@@ -1,135 +0,0 @@
- * @LastEditTime: 2023-12-07 20:53:36
-export const getCostshareparamConnectList = (params:any) => {
- return request('/costAccount/costaccountshare/list', {
-//获取当前成本已用本的分摊参数列表
-export const getHasSetParamsList = (id:number)=>{
- return request(`/costAccount/costaccountshare/getShareParamById`, {
- params:{
-//获取可选复制目标列表
-export async function getCopyableToList(params:any) {
- return request(`/costAccount/costaccountshare/getResponsibilityCalType`, {
-//获取添加分摊参数时可选列表
-export async function getParamsSelectableList(params:any) {
- return request(`/costAccount/costaccountshare/getAllShareParamStatusById`, {
- ...params
-export type AddTableDataType = any
- return request('/costAccount/costaccountshare/save', {
- return request('/costAccount/costaccountshare/update', {
-//保存成本分摊参数
-export const saveParamsList = (data:any) => {
- return request(`/costAccount/costaccountshare/updateShareParam`, {
- console.log({ids});
- return request('/costAccount/costaccountshare/delete', {
- data:ids
-//获取责任中心选择列表
-export const getResponsibilityCenterSelecterList = ()=> {
- // const {shareParamName,current,pageSize} = params;
- return request('/costAccount/responsibility/getLevelTwo', {
- method: 'GET'
-//复制数据
-export const copyParamsList = (body:any) => {
- return request(`/costAccount/costaccountshare/copyAccountShareData`, {
- data:body,
@@ -1,90 +0,0 @@
-.EditableProTable {
- &>div {
- justify-content: left !important;
-.AllocationParamsMap {
@@ -1,186 +0,0 @@
-import { getCopyableToList } from "./service";
- const [filter, set_filter] = useState<undefined | any>(undefined);
- const [code, set_code] = useState<undefined | any>(undefined);
- title: '责任中心Id',
- const selectedRowkeys = selectedRows.map((a) => a[`${rowKey}`]);
- const rows = datasource.filter((a) => selectedRowkeys.includes(a[`${rowKey}`]));
- // const resp = await getAddableTableData(record.costTypeCode);
- const {id:accountShareId} = record;
- const resp = await getCopyableToList({accountShareId});
- let selectedKeys: string[] = [];
- selectedKeys.push(a[`${rowKey}`]);
- setSelectedKeys([...selectedKeys]);
- return a.responsibilityName?a.responsibilityName.indexOf(keyword) != -1:false
- }, [keyword])
- <div className="filter" style={{ display: 'flex', flexDirection: 'row', marginBottom: 8 }}>
- <ProFormText noStyle placeholder={'请输入'}
- pagination={{ showTitle: false, showSizeChanger: false,simple:true }}
@@ -1,441 +0,0 @@
- * @LastEditTime: 2024-10-16 11:26:19
-import { ActionType, ProFormInstance, ProFormText, ProFormSelect, ProFormCascader, ProFormDigit, ProFormDatePicker } from '@ant-design/pro-components';
-import { Input, message, Popconfirm, Dropdown } from 'antd';
-import type { MenuProps } from 'antd';
-import { addData, calculateMonthCostShareData, copyMonthCostShareData, delData, editData, getMonthCostShareDataList } from './service';
-import moment from 'moment';
-import { getCostshareparamList } from '../costAllocationParamsSet/service';
-import { getResponsibilityCenterList } from '../../responsibilityCenterSet/responsibilityCenter/service';
-import { tableColumnsWidObj } from '@/constant';
-const currentData = `${new Date().getFullYear()}-${(new Date().getMonth() + 1).toString().padStart(2, '0')}`;
-export default function CostAllocationParamsDeal(
- { date, ifShowGetBtn, ifShowCancelBtn,responsibilityCode,
- cancelHandle,getHandle
- }: { date: string, ifShowGetBtn: boolean, ifShowCancelBtn: boolean,responsibilityCode:string,
- cancelHandle: () => Promise<boolean>,
- getHandle:() => Promise<boolean>,
-) {
- const [tableDataFilterParams, set_tableDataFilterParams] = useState<any | undefined>({ computeDate: currentData });
- const [computeDate, set_computeDate] = useState(currentData);
- const [currentEditRow, set_currentEditRow] = useState<undefined | any>(undefined);
- dataIndex: 'shareParamName',
- renderText(text, record, index, action) {
- const {shareParamCode,shareParamName} = record;
- return `[${shareParamCode}]${shareParamName}`
- title: '数值',
- align:'center',
- dataIndex: 'valueNum',
- renderText(num, record, index, action) {
- <div style={{ display: 'flex', flexDirection: 'row', alignItems: 'center',justifyContent:'flex-end',paddingRight:'30%' }}>
- (currentEditRow && currentEditRow.id == record.id) && (
- width={80}
- value: num,
- onChange(value) {
- set_currentEditRow({ ...record, valueNum: value ? value : 0 });
- <img onClick={() => updateTable({ ...record, ...currentEditRow }, 'EDIT')} style={{ width: 16, height: 16, display: 'inline-block', marginLeft: 8, cursor: 'pointer' }} src={require('../../../../../static/confirmIcon.png')} />
- (!currentEditRow || (currentEditRow && currentEditRow.id != record.id)) && (
- <div>{num.toFixed(2)}</div>
- <img onClick={() => set_currentEditRow(record)} style={{ width: 16, height: 16, display: 'inline-block', marginLeft: 8, cursor: 'pointer' }} src={require('../../../../../static/editIcon.png')} />
- title: '责任中心',
- const {responsibilityCode,responsibilityName} = record;
- return `[${responsibilityCode}]${responsibilityName}`
- const items: MenuProps['items'] = [
- key: '1',
- label: (
- <a onClick={()=>cancelHandle().then((isok)=>{
- if(isok)tableRef.current?.reload();
- })} style={{ display: ifShowCancelBtn ? 'inline-block' : 'none' }}>
- 撤销
- ),
- key: '2',
- <a onClick={()=>getHandle().then((isok)=>{
- if(isok){
- tableRef.current?.reload()
- })} style={{ display: ifShowGetBtn ? 'inline-block' : 'none' }}>
- 获取
- const {computeDate,responsibilityCode} = params;
- if(computeDate&&responsibilityCode){
- const resp = await getMonthCostShareDataList({ ...params });
- const updateTable = async (formVal: any, type: 'EDIT' | "ADD" | "COPY") => {
- date: computeDate.replace('-', ''),
- shareParamCode: formVal.shareParamCode,
- valueNum: formVal.valueNum,
- const resp = await addData({ ...result, responsibilityCode: formVal.responsibilityCode[formVal.responsibilityCode.length - 1] });
- const resp = await editData({ ...result, id: formVal.id, responsibilityCode: typeof formVal.responsibilityCode == 'string' ? formVal.responsibilityCode : formVal.responsibilityCode[formVal.responsibilityCode.length - 1] });
- if (type == 'COPY') {
- const { dataSourceType, toDate, date: fromDate } = formVal;
- const resp = await copyMonthCostShareData({ dataSourceType, toDate: moment(toDate).format('yyyyMM'), fromDate: moment(fromDate).format('yyyyMM') });
- const calculateHandle = async () => {
- const resp = await calculateMonthCostShareData({ date: computeDate.replace('-', '') });
- message.success('计算成功!');
- tableRef?.current?.reload();
- if (date&&responsibilityCode) {
- set_computeDate(date);
- computeDate: date,
- responsibilityCode:responsibilityCode
- }, [date,responsibilityCode])
- const UpDataActBtn = ({ record, type }: { record: any, type: 'EDIT' | 'ADD' | 'COPY' }) => {
- title={`${type == 'EDIT' ? '编辑' : '新增'}成本分摊参数处理`}
- type == 'EDIT' ? <a key="edit" >编辑</a> : type == 'COPY' ? <span>复制</span> : <span>新增</span>
- type == 'COPY' && (
- <ProFormDatePicker
- name="date"
- width={318}
- message: '复制时间是必填项!',
- label="复制数据年月"
- fieldProps={{ picker: 'month', locale: locale, format: 'YYYY-MM',autoComplete:'off' }}
- name="toDate"
- label="目标年月"
- message: '目标时间是必填项!',
- label: '手动输入',
- label: '文件导入',
- label: '全部',
- message: '数据类型是必填项!',
- name="dataSourceType"
- label="数据类型"
- type != 'COPY' && (
- name="shareParamCode"
- label="选择分摊参数"
- request={async (params) => {
- const resp = await getCostshareparamList({ ...params, pageSize: 500 });
- return resp.list.map((item: any) => ({ label: item.shareParamName, value: item.shareParamCode }))
- placeholder="请选择"
- rules={[{ required: true, message: '分摊参数是必选项!' }]}
- <ProFormCascader
- label='责任中心'
- name='responsibilityCode'
- const resp = await getResponsibilityCenterList({ pageSize: 500 });
- return [];
- fieldNames: { label: 'responsibilityName', value: 'responsibilityCode', children: 'child', },
- label="数值"
- name="valueNum"
- message: '必选项!',
- <KCIMPagecontainer className='CostAllocationParamsDeal' title={false}>
- <Input placeholder={'分摊参数代码/名称'} allowClear autoComplete='off'
- <IconFont type="iconsousuo" style={{ color: '#99A6BF' }} onClick={() => tableDataSearchHandle('shareParamCode')} />
- shareParamCode: ''
- shareParamCode: (e.target as HTMLInputElement).value
- <UpDataActBtn record type='COPY' />
- <span onClick={() => calculateHandle()}>计算</span>
- (ifShowCancelBtn && ifShowGetBtn) && (
- <Dropdown menu={{ items }} placement="bottomRight">
- <IconFont type="icongengduochuizhi" />
- </Dropdown>
- <KCIMTable scroll={{y:`calc(100vh - 343px)`}} columns={columns as ProColumns[]} actionRef={tableRef} rowKey='id' params={tableDataFilterParams} request={(params) => getTableData(params)} />
@@ -1,92 +0,0 @@
- * @LastEditTime: 2023-12-05 15:03:16
-//获月成本分摊参数值处理列表
-export const getMonthCostShareDataList = (params:any) => {
- return request('/costAccount/shareParamValue/list', {
- params: {...params,date:params.computeDate.replace('-',''),computeDate:null},
- date:string,
- shareParamCode:string,
- responsibilityCode:string,
- valueNum:number
- return request('/costAccount/shareParamValue/addData', {
- return request('/costAccount/shareParamValue/edit', {
- return request('/costAccount/shareParamValue/delete', {
-//计算数据
-export const calculateMonthCostShareData = (params:any) => {
- return request('/costAccount/shareParamValue/calcData', {
- params: {...params},
-export const copyMonthCostShareData = (body:any) => {
- return request('/costAccount/shareParamValue/copyData', {
- data: {...body},
@@ -1,65 +0,0 @@
-.CostAllocationParamsDeal {
- // padding: 16px;
- margin-right: 8px;
- &:last-child {
- top:-2px;
- padding: 0 4px;
- margin-right: 0;
@@ -1,330 +0,0 @@
- * @LastEditTime: 2024-09-11 15:24:17
-import { Input, message, Popconfirm, Modal,Switch,Tooltip } from 'antd';
-import { addData, delData, editData, getCostshareparamList, setAccountingSub } from './service';
-import React from 'react';
-import { getNodesWithChildren } from '@/utils/tooljs';
-const transferTableColumn = [
-]
-export default function CostAllocationParamsSet() {
- const [tableDataFilterParams, set_tableDataFilterParams] = useState<any | undefined>({});
- title: '成本分摊参数名',
- title: '成本分摊参数编号',
- width:160,
- sorter: (a, b) => {
- // 比较字符串数字部分大小
- const codeA = parseInt(a.shareParamCode.slice(1), 10);
- const codeB = parseInt(b.shareParamCode.slice(1), 10);
- return codeA - codeB;
- return text == 1 ? '手动填写' : '按对应会计科目计算'
- title:()=><>启动<Tooltip title="停用的分摊参数在成本分摊报表里不显示"><IconFont style={{paddingLeft:6,fontSize:16,position:'relative',top:1}} type='iconshuoming' /></Tooltip></>,
- dataIndex: 'status',
- renderText(number, record) {
- return <Switch checked={number} size='small' onChange={(bool)=>{
- updateTable({...record,status:bool?1:0},'EDIT');
- }} />
- const {calcType} = record;
- return calcType != 1?[
- <a key={'bind'} onClick={() => {oprnTableTransform(record)}}>会计科目</a>
- ]:[
- const resp = await getCostshareparamList({ ...params });
- const resp = await editData({ ...formVal });
- title={`${type == 'EDIT' ? '编辑' : '新增'}成本分摊参数`}
- label="成本分摊参数名"
- message: '成本分摊参数名是必填项',
- name="shareParamName"
- label="成本分摊参数编号"
- message: '成本分摊参数编号是必填项',
- label: '手动填写',
- label: '按对应会计科目计算',
- const onSaveHandle = async (keys:Key[],rows:any[],record:any) => {
- const {id} = record;
- const resp = await setAccountingSub({costShareParamId:id,accountIds:keys});
- const oprnTableTransform = (record: any) => {
- const ref = React.createRef<{ save: any; }>();
- Modal.confirm({
- title: `选择会计科目`,
- icon: <></>,
- width: 750,
- centered: true,
- okText: '确定',
- cancelText: '取消',
- content: <TableTransfer
- ref={ref}
- keyName="id"
- record={record}
- onSave={(keys,rows)=>onSaveHandle(keys,rows,record)}
- leftColumns={transferTableColumn}
- rightColumns={transferTableColumn} dataSource={[]}
- ></TableTransfer>,
- onOk: () => {
- return ref.current && ref.current.save();
- <KCIMPagecontainer className='CostAllocationParamsSet' title={false}>
- <Input placeholder={'成本分摊参数名称'} allowClear autoComplete='off'
@@ -1,87 +0,0 @@
- * @LastEditTime: 2023-11-14 17:21:24
-export const getCostshareparamList = (params:any) => {
- return request('/costAccount/costshareparam/list', {
- shareParamName:string,
- calcType:number
- return request('/costAccount/costshareparam/save', {
- return request('/costAccount/costshareparam/update', {
- return request('/costAccount/costshareparam/delete', {
-//为成本分摊设置会计科目
-type SetAccountingSubBody = {
- costShareParamId:number,
- accountIds:Key[]
-export const setAccountingSub = (body:SetAccountingSubBody) => {
- return request('/costAccount/costshareparam/updateCostShareParamByAccountId', {
- data:{...body}
-.CostAllocationParamsSet {
@@ -1,281 +0,0 @@
-import React, { Key, useEffect, useImperativeHandle, useState } from "react";
-import { Transfer } from 'antd';
-import { ProColumns } from "@ant-design/pro-components";
-import { Tabs } from 'antd';
-import { getAccountingSubjectList } from "../../accountingAccountSet/accountingSubMana/service";
-function flatten(list: any[]) {
- let result: any[] = [];
- list.forEach(item => {
- result.push(item);
- if (item.children) {
- result = result.concat(flatten(item.children));
- return result;
-function getUniqueSubsetsByProperty(treeData: any[], uniqueProperty: string) {
- const result: any[] = [];
- const uniqueSet = new Set();
- function traverse(node: { [x: string]: any; children: string | any[]; }, isRoot = true) {
- if (!node) return;
- // 获取节点的唯一属性值
- const uniqueValue = node[uniqueProperty];
- // 如果节点是根节点,不添加到结果集,但处理它的子节点
- if (!isRoot && !uniqueSet.has(uniqueValue)) {
- result.push(node);
- uniqueSet.add(uniqueValue);
- // 递归处理子节点
- for (let child of node.children) {
- traverse(child, false); // 子节点传递 isRoot = false
- for (let rootNode of treeData) {
- traverse(rootNode);
-function removeSelectedKeys(nodes: any[], keysToRemove: string[]): any[] {
- const result = nodes
- .map(node => {
- // 检查 id 是否存在
- if (!node || node.id === undefined || node.id === null) {
- return node; // 或者返回 null, 取决于你的业务逻辑
- if (keysToRemove.includes(node.id)) {
- node.children = removeSelectedKeys(node.children, keysToRemove);
- if (node.children.length === 0) {
- return node;
- .filter(node => node !== null);
- leftColumns: ProColumns[];
- rightColumns: ProColumns[];
- record: any,
- keyName: string,
- onSave: (selectedKeys: Key[], selectedRowKeys: any[]) => void;
-const TableTransfer = React.forwardRef(({ leftColumns, rightColumns, keyName, record, onSave, ...restProps }: TableTransferProps, ref) => {
- const [targetKeys, setTargetKeys] = useState<string[]>(record.accountingIds ? [...(record.accountingIds.map((a: string) => Number(a)))] : []);
- const [filteredDataSource, setFilteredDataSource] = useState<any[]>([]);
- const [selectedKeys, setSelectedKeys] = useState<string[]>(record.accountingIds ? [...(record.accountingIds.map((a: string) => Number(a)))] : []);
- const [accountType, set_accountType] = useState(1);
- const resp = await getAccountingSubjectList({ accountType: 1, pageSize: 500, current: 1 });
- set_datasource(resp.list);
- _set_data(resp.list);
- const clonedDataSource = JSON.parse(JSON.stringify(datasource));
- const filteredData = removeSelectedKeys(clonedDataSource, nextTargetKeys);
- setFilteredDataSource(filteredData);
- // 过滤出左侧的待选项数据
- const filtered = removeSelectedKeys(clonedDataSource, targetKeys);
- setFilteredDataSource(filtered);
- }, [datasource, targetKeys]);
- const items = flatten(datasource).filter(a => targetKeys.includes(a[`${keyName}`]));
- onSave(targetKeys,getUniqueSubsetsByProperty(items,`${keyName}`));
- const onTabChanged = (key: string) => {
- set_accountType(Number(key));
- const handleTreeItemSelect = (key: string, selected: boolean) => {
- let newSelectedKeys = [...selectedKeys];
- const updateSelection = (node: TransferItem, isSelected: boolean) => {
- const keyIndex = newSelectedKeys.indexOf(node[keyName]);
- if (isSelected && keyIndex === -1) {
- newSelectedKeys.push(node[keyName]);
- } else if (!isSelected && keyIndex > -1) {
- newSelectedKeys.splice(keyIndex, 1);
- node.children.forEach((child: any) => updateSelection(child, isSelected));
- const node = flatten(datasource).find(item => item[keyName] === key);
- if (node) {
- updateSelection(node, selected);
- // 确保没有重复项
- newSelectedKeys = Array.from(new Set(newSelectedKeys));
- setSelectedKeys(newSelectedKeys);
- }, [accountType]);
- { label: '收入', key: 1 },
- { label: '支出', key: 2 },
- ]);
- }, []);
- <Transfer
- className='TableTransfer'
- showSearch
- oneWay={false}
- dataSource={flatten(datasource)}
- rowKey={record => record[`${keyName}`]}
- filterOption={(inputValue, item) => item.accountingName.indexOf(inputValue) !== -1}
- const treeSelectedKeys = selectedRows.map(a => a[`${keyName}`]);
- onSelect(item, selected) {
- onItemSelect(item[`${keyName}`], selected);
- handleTreeItemSelect(item[`${keyName}`], selected);
- // 使用 filteredDataSource 作为数据源,确保左侧表格正确显示未选中的数据
- const flattenAndFilter = (list: any[], targetKeys: string | any[]) => {
- list.forEach((item: { [x: string]: any; children: any; }) => {
- if (targetKeys.includes(item[keyName])) {
- // 如果父节点已经选中,不再单独加入子节点
- } else if (item.children) {
- const filteredChildren = flattenAndFilter(item.children, targetKeys);
- result = result.concat(filteredChildren);
- const dataSourceToUse = direction === 'left'
- ? filteredDataSource // 左侧的未选中项
- : flattenAndFilter(datasource, targetKeys); // 右侧的已选中项
- dataSource={dataSourceToUse}
- rowKey={keyName}
- scroll={{ y: 280 }}
- onRow={(row) => ({
- const selected = !listSelectedKeys.includes(row[`${keyName}`]);
- onItemSelect(row[`${keyName}`], selected);
- handleTreeItemSelect(row[`${keyName}`], selected);
-export default TableTransfer;
@@ -1,416 +0,0 @@
- * @LastEditTime: 2024-09-09 10:54:09
-import { ModalForm, ProFormCascader } from '@ant-design/pro-form'
-import { addData, delData, editData, getAccountList, getIdleCostTableList, getIdleResponsibleList, getShareParamList } from './service';
-function filterTree(trees: any[]) {
- // 递归筛选函数
- function filterNode(node: any) {
- // 如果是叶子节点,直接根据条件返回节点或null
- if (!node.children || node.children.length === 0) {
- return node.isBaseCost === 1 ? { ...node } : null;
- // 对于非叶子节点,先递归筛选子节点
- const filteredChildren = node.children.map(filterNode).filter((child: any) => child !== null);
- // 如果子节点中有被保留的,或者当前节点自身满足条件,保留当前节点
- // 注意这里的改变:我们不再检查非叶子节点是否直接满足条件,而是基于其子节点是否被保留
- return { ...node, children: filteredChildren };
- // 如果没有子节点被保留,且当前节点不满足条件,返回null
- // 遍历树结构集合并应用筛选函数
- return trees.map(filterNode).filter(root => root !== null);
-export default function IdleCostSetting() {
- title: '闲置成本项目',
- dataIndex: 'freeAccountName',
- title: '设备成本项目',
- dataIndex: 'accountName',
- title: '可检查时间参数',
- dataIndex: 'canParamName',
- title: '实际检查时间参数',
- dataIndex: 'actualParamName',
- title: '归属责任中心',
- dataIndex: 'freeResponsibilityName',
- const resp = await getIdleCostTableList({ ...params });
- // total: resp.totalCount,
- // pageSize: resp.pageSize,
- // totalPage: resp.totalPage,
- const { freeAccount = [], account, canParam, actualParam,freeResponsibility } = formVal;
- freeAccountCode: freeAccount.accountingCode,
- freeAccountName: freeAccount.accountingName,
- accountCode: account.accountingCode,
- accountName: account.accountingName,
- canParamCode: canParam.shareParamCode,
- canParamName: canParam.shareParamName,
- actualParamCode: actualParam.shareParamCode,
- actualParamName: actualParam.shareParamName,
- freeResponsibilityName:freeResponsibility.responsibilityName,
- freeResponsibilityCode:freeResponsibility.responsibilityCode,
- const { id } = formVal;
- const resp = await editData({ ...result,id});
- title={`${type == 'EDIT' ? '编辑' : '新增'}闲置成本对应`}
- freeAccount:record.freeAccountCode,
- account:record.accountCode,
- canParam: record.canParamCode,
- actualParam: record.actualParamCode,
- freeResponsibility:record.freeResponsibilityCode
- {/* <ProFormText name='freeAccount' hidden />
- <ProFormText name='account' hidden /> */}
- {/* <ProFormCascader
- message: '请选择闲置成本项目',
- request={async ()=>{
- const resp = await getAccountList({accountType: 2,pageSize:500,current:1});
- return filterTree(resp.list)
- // searchValue:'accountingName',
- fieldNames:{label:'accountingName',value:'accountingCode',children:'children'},
- onChange:(value:any, selectedOptions:any)=>{
- formRef.current?.setFieldValue('freeAccount',selectedOptions)
- name='freeCostItem'
- label="闲置成本项目"
- message: '请选择设备成本项目',
- const resp = await getAccountingSubjectList({accountType: 2,pageSize:500,current:1});
- formRef.current?.setFieldValue('account',selectedOptions)
- name='equipmentCostItem'
- label="设备成本项目"
- /> */}
- const resp = await getAccountList({ pageSize: 500, current: 1 });
- return resp
- labelInValue: true,
- fieldNames: { label: 'accountingName', value: 'accountingCode' },
- name="freeAccount"
- name="account"
- message: '请选择可检查时间参数',
- const resp = await getShareParamList({ pageSize: 500, current: 1 });
- fieldNames: { label: 'shareParamName', value: 'shareParamCode' },
- name="canParam"
- label="可检查时间参数"
- message: '请选择实际检查时间参数',
- name="actualParam"
- label="实际检查时间参数"
- message: '请选择归属责任中心',
- const resp = await getIdleResponsibleList({ pageSize: 500, current: 1 });
- fieldNames: { label: 'responsibilityName', value: 'responsibilityCode' },
- name="freeResponsibility"
- label="归属责任中心"
- <KCIMPagecontainer className='IdleCostSetting' title={false}>
- <Input placeholder={'闲置成本项目编码/名称'} allowClear autoComplete='off'
@@ -1,104 +0,0 @@
- * @LastEditTime: 2024-04-26 11:31:11
-export const getIdleCostTableList = (params:any) => {
- return request('/costAccount/freeCost/getList', {
-//获取会计科目
-export const getAccountList = (params:any) => {
- return request('/costAccount/freeCost/getAccountList', {
-//获取分摊参数
-export const getShareParamList = (params:any) => {
- return request('/costAccount/freeCost/getShareParamList', {
-//获取闲置责任中心
-export const getIdleResponsibleList = (params:any) => {
- return request('/costAccount/freeCost/getResponsibilityList', {
- "freeAccountCode":string, //闲置成本代码
- "freeAccountName":string, //闲置成本名称
- "accountCode":string, //成本代码
- "accountName": string, //成本名称
- "canParamCode": string, //可检查时间参数代码
- "canParamName":string, //可检查时间参数名称
- "actualParamCode": string, //实际检查时间参数代码
- "actualParamName": string //实际检查时间参数名称
- return request('/costAccount/freeCost/addFreeCost', {
- return request('/costAccount/freeCost/editFreeCost', {
- return request('/costAccount/freeCost/deleteFreeCost', {
-.IdleCostSetting {
@@ -1,371 +0,0 @@
- * @LastEditTime: 2024-10-15 15:28:19
-import { ActionType, ProFormDependency, ProFormInstance, ProFormSelect, ProFormDigit } from '@ant-design/pro-components';
-import { message, Popconfirm, Modal } from 'antd';
-import { addData, delData, editData, getIncomeCollectionList, incomeCollectionListConnectAccountingSubject } from './service';
- title: '会计科目名',
- title: '收入归集Id',
- title: '开单科室状态',
- dataIndex: 'openDepartmentStatus',
- renderText(num) {
- return num == 1 ? '收益中心' : '成本中心'
- title: '开单科室分配比例',
- align:'right',
- dataIndex: 'openDepartmentProportion',
- title: '执行科室',
- dataIndex: 'startDepartmentStatus',
- title: '执行科室比例',
- dataIndex: 'startDepartmentProportion',
- title: '归集到其他责任中心',
- const { accountStatus } = record;
- return accountStatus == 0 ? [
- <UpDataActBtn key={'edit'} record={record} type='EDIT' />,
- ] : [
- <a key='ather' onClick={() => { oprnTableTransform(record); }}>排除会计科目</a>
- const resp = await getIncomeCollectionList(params);
- title: `排除会计科目`,
- keyName="accountingCode"
- onSave={(keys, rows) => onSaveHandle(keys, rows, record)}
- const onSaveHandle = async (keys: Key[], rows: any[], record: any) => {
- const { id } = record;
- const resp = await incomeCollectionListConnectAccountingSubject({ id, accountCodes: keys });
- const { openDepartmentProportion, startDepartmentProportion } = formVal;
- ...formVal,
- responsibilityCodes: formVal.responsibilityCodes ? formVal.responsibilityCodes.join('/') : null,
- startDepartmentProportion: startDepartmentProportion ? startDepartmentProportion : 0,
- openDepartmentProportion: openDepartmentProportion ? openDepartmentProportion : 0
- const resp = await editData(result);
- title={`${type == 'EDIT' ? '编辑' : '新增'}收入归集设置`}
- ...record, responsibilityCodes: record.responsibilityCodes ? record.responsibilityCodes.split('/') : []
- name="openDepartmentStatus"
- label="开单科室状态"
- { label: '收益中心', value: 1 },
- { label: '成本中心', value: 2 }
- placeholder="请选择状态"
- rules={[{ required: true, message: '请选择开单科室状态!' }]}
- <ProFormDependency name={['openDepartmentStatus']}>
- ({ openDepartmentStatus }) => {
- return openDepartmentStatus == 2 ? (
- disabled
- label="开单科室比例"
- initialValue={0}
- required: false,
- message: '开单科室比例是必填项!',
- name="openDepartmentProportion"
- name="startDepartmentStatus"
- label="执行科室状态"
- rules={[{ required: true, message: '请选择执行科室状态!' }]}
- <ProFormDependency name={['startDepartmentStatus']}>
- ({ startDepartmentStatus }) => {
- return startDepartmentStatus == 2 ? (
- label="执行科室比例"
- message: '执行科室比例是必填项!',
- name="startDepartmentProportion"
- <ProFormDependency name={['openDepartmentStatus', 'startDepartmentStatus']}>
- {({ openDepartmentStatus, startDepartmentStatus }) => {
- return (openDepartmentStatus == 2 && startDepartmentStatus == 2) ? (
- placeholder={'请选择'}
- label='选择责任中心:'
- name='responsibilityCodes'
- fieldNames: { label: 'responsibilityName', value: 'responsibilityCode', children: 'child' },
- onChange: (val: any) => {
- const resp = await getResponsibilityCenterList({ pageSize: 50, current: 1 });
- <div className='toolBar' style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}>
- <div className='title'>收入归集设置</div>
- <KCIMTable scroll={{y:`calc(100vh - 234px)`}} columns={columns as ProColumns[]} actionRef={tableRef} rowKey='id' request={(params) => getTableData(params)} />
- * @LastEditTime: 2023-11-20 17:36:02
-//获收入归集列表
-export async function getIncomeCollectionList(params:any) {
- return request('/costAccount/costincomegroupset/list', {
-//获指定收入归集设置对应的会计科目
-export const getIncomeCollectionListHasConnected = (params:any) => {
- return request('/costAccount/costincomegroupset/getIncomeAccountStatus', {
- openDepartmentStatus:number,
- responsibilityCodes:string,
- startDepartmentProportion:number,
- startDepartmentStatus:number
- return request('/costAccount/costincomegroupset/addCostIncomeGroupSet', {
- data: {...data},
- return request('/costAccount/costincomegroupset/update', {
- return request(`/costAccount/costincomegroupset/delete`, {
- data:ids,
-//收入归集设置添加会计科目
-export const incomeCollectionListConnectAccountingSubject = (data:any) => {
- return request(`/costAccount/costincomegroupset/addIncomeAccount`, {
- data:data,
@@ -1,35 +0,0 @@
- padding: 16px 0;
- .title {
- font-size: 16px;
@@ -1,155 +0,0 @@
-import { Transfer } from 'antd'
-import { Tabs} from 'antd';
-import { log } from "mathjs";
-import { getIncomeCollectionListHasConnected } from "./service";
- //获取列表
- const {id } = record;
- const resp = await getAccountingSubjectList({ accountType:1, shareParamId: id, pageSize: 500, current: 1 });
- // setTargetKeys(accountingIds);
- const setInit = async ()=>{
- const resp = await getIncomeCollectionListHasConnected({id});
- const tempArr = resp?resp.map((item:any)=>item.accountingCode):[];
- setTargetKeys([...tempArr]);
- const items = datasource.filter(a => targetKeys.includes(a[`${keyName}`]));
- onSave(targetKeys, items);
- setInit();
- const treeSelectedKeys = selectedRows.map((a) => a[`${keyName}`]);
- rowKey={`${keyName}`}
- tableStyle={{border:'none'}}
- if (row.itemDisabled || listDisabled) return;
- onItemSelect(row[`${keyName}`], !listSelectedKeys.includes(row[`${keyName}`]));
@@ -1,820 +0,0 @@
- * @LastEditTime: 2024-10-29 14:55:48
-import { ActionType, ProFormInstance } from '@ant-design/pro-components';
-import { Modal, message, Drawer, Tabs, Input, DatePicker, Popover, Alert, Skeleton } from 'antd';
-import * as XLSX from 'xlsx';
-import { saveAs } from 'file-saver';
-import { addData, computeProfitReq, getReportDataReq, getReportProjectSettingList, getResponsibleCenters, saveReportRelation } from './service';
-import { getDicDataBySysId, getParamsDataBySysId } from '@/services/getDic';
-import { KCIMLeftList } from '@/components/KCIMLeftList';
-import { formatMoneyNumber } from '@/utils/format';
-import { useModel } from '@umijs/max';
-function findAllParents(tree: any[]) {
- let parents: any[] = [];
- // 递归函数来遍历树并找到所有父节点
- function traverse(nodes: any[]) {
- for (const node of nodes) {
- // 检查节点是否有子节点
- parents.push(node); // 添加到父节点列表
- traverse(node.children); // 递归遍历子节点
- traverse(tree); // 开始遍历树
- return parents; // 返回所有父节点的数组
-function countLeafNodes(trees: any[]) {
- let leafCount = 0;
- // 遍历集合中的每棵树
- for (let i = 0; i < trees.length; i++) {
- leafCount += countLeafNodesRecursive(trees[i]);
- return leafCount;
-function countLeafNodesRecursive(node: any) {
- // 如果当前节点没有子节点,说明它是一个叶子节点
- return 1;
- // 递归计算每个子节点的叶子节点数
- for (let i = 0; i < node.children.length; i++) {
- leafCount += countLeafNodesRecursive(node.children[i]);
-function searchTree(tree: any[], searchTerm: string) {
- // 定义结果数组
- let results = [];
- // 定义递归函数来搜索匹配的节点
- function searchNode(node: any) {
- // 创建一个变量来标记当前节点或其子节点是否匹配
- let isMatch = false;
- // 检查当前节点的 name 或 code 是否包含搜索词
- if (node.reportName.includes(searchTerm)) {
- isMatch = true;
- // 复制当前节点,避免修改原始数据
- let newNode = { ...node, children: [] };
- // 如果有子节点,递归搜索每个子节点
- let childMatch = searchNode(child);
- // 如果子节点或其子树匹配,添加到新节点的子节点数组中
- if (childMatch) {
- newNode.children.push(childMatch);
- // 如果当前节点或其任何子节点匹配,返回新节点
- // 如果children为空,则不包含children属性
- if (isMatch) {
- if (newNode.children.length === 0) {
- delete newNode.children;
- // 遍历树的每个顶级节点
- for (let node of tree) {
- let result = searchNode(node);
- if (result) {
- results.push(result);
- return results;
-function processTree(originalData: any[]) {
- return originalData.map(node => {
- // 深复制当前节点
- const newNode = JSON.parse(JSON.stringify(node));
- // 如果当前节点有profitList,处理它
- if (newNode.profitList && Array.isArray(newNode.profitList)) {
- newNode.profitList.forEach((profit: any) => {
- // 添加新的键值对到新节点
- newNode[`${profit.reportId}`] = formatMoneyNumber(profit.value);
- // 如果不需要保留profitList,可以删除
- // delete newNode.profitList;
- // 如果节点有子节点,递归处理子节点
- if (node.child && Array.isArray(node.child)) {
- newNode.children = processTree(node.child);
-// 递归函数,用于处理多层级标题
-function generateColumns(item: any, titleIndex = 0, title: string, hideRatioColumns = false) {
- // 检查是否需要隐藏"占比"列,如果title包含"占比",且hideRatioColumns为true,则返回null
- if (hideRatioColumns && item[`${title}`].includes('占比')) {
- const column: any = title == 'responsibilityName' ? {
- title: item[`${title}`],
- dataIndex: `${item.responsibilityCode}`,
- key: `${item.responsibilityCode}`,
- align: (item.responsibilityCode.indexOf('amount') != -1) ? 'right' : 'right',
- renderText(num: number, record: any) {
- if (item.responsibilityCode.indexOf('amount') != -1) {
- return formatMoneyNumber(num);
- return num;
- } : {
- dataIndex: `${item[`reportId`]}`,
- key: `${item[`reportId`]}`,
- align: 'right',
- // 递归处理子列
- if (item.childTitle && Array.isArray(item.childTitle) && item.childTitle.length > 0) {
- column.children = item.childTitle
- .map((a: any, aindex: number) => generateColumns(a, titleIndex + 1, title, hideRatioColumns))
- .filter((col: any) => col !== null); // 过滤掉null项
- if (item.child && Array.isArray(item.child) && item.child.length > 0) {
- column.children = item.child
- return column;
-function transformTreeData(tree: any[]) {
- // 遍历整个树
- return tree.map(node => {
- // 解构出data中的字段并添加到当前节点
- if (Array.isArray(node.data)) {
- node.data.forEach((item: any) => {
- // 将data数组中的每个对象转换成当前节点的属性
- if (item.code && item.value !== undefined) {
- node[item.code] = item.value;
- // 递归处理子节点,如果存在子节点
- node.children = transformTreeData(node.children);
- // 返回处理后的节点
-const getNextUnexpandedKeys = (data: any[], expandedKeys: any[] = []) => {
- let keys: any[] = [];
- const traverse = (nodes: any) => {
- // 如果当前节点还没有展开,就把它加入 keys
- if (!expandedKeys.includes(node.id)) {
- keys.push(node.id);
- // 如果当前节点已经展开,继续遍历子节点
- if (node.children && expandedKeys.includes(node.id)) {
- traverse(node.children);
- traverse(data);
- return keys;
-export default function DepartmentCostCalc() {
- const [tableDataFilterParams, set_tableDataFilterParams] = useState<any | undefined>({ reportType: 0 });
- const { initialState, setInitialState } = useModel('@@initialState');
- const [computeDate, set_computeDate] = useState<string>(initialState ? initialState.computeDate : '');
- const [responsibleCenters, set_responsibleCenters] = useState<any[]>([]);
- const [currentTabKey, set_currentTabKey] = useState<any | undefined>(undefined);
- const [currentTab, set_currentTab] = useState<any | undefined>(undefined);
- const [currentSelectedRespon, set_currentSelectedRespon] = useState<any | undefined>(undefined);
- const [tableDataSearchKeywords, set_tableDataSearchKeywords] = useState('');
- const [allParentsKeys, set_allParentsKeys] = useState<Key[]>([]);
- const [drawerTableVisible, set_drawerTableVisible] = useState(false);
- const [dataSource, set_dataSource] = useState<any[]>([]);
- const [tableColumns, set_tableColumns] = useState<any[]>([]);
- const [calcResultText, set_calcResultText] = useState<undefined | string>(undefined);
- const [loadingtransform, set_loadingtransform] = useState(false);
- const [ifShowPercent, set_ifShowPercent] = useState(true);
- title: '报表项目名称',
- dataIndex: 'reportName',
- width: '50%',
- const { description } = record;
- return description ? <Popover content={() => <div dangerouslySetInnerHTML={{ __html: description }} />}><span style={{ cursor: 'pointer' }}>{text}</span><IconFont className="hover-icon" style={{ fontSize: 16, color: '#17181a', paddingLeft: 4, position: 'relative', top: 1 }} type={'iconshuoming'} /></Popover> : text
- title: '金额(元)',
- dataIndex: 'amount',
- renderText(num, record) {
- const { calcType } = record;
- if (record.children && calcType == '0') {
- return <React.Fragment></React.Fragment>
- title: '占比',
- hideInTable: !ifShowPercent,
- dataIndex: 'percent',
- return num != null ? `${((num * 100).toFixed(2))}%` : num
- // 主函数,生成表格列
- const generateTableColumns = (title: any[], titleKeyName: string) => {
- return title.map((item: any, titleIndex: number) => generateColumns(item, titleIndex, titleKeyName, !ifShowPercent));
- const { responsibilityCode, filter = undefined } = params;
- if (!responsibilityCode) return []
- const resp = await getReportProjectSettingList({ ...params });
- if (filter) {
- const filterData = searchTree(resp, filter);
- const allParents = findAllParents(filterData);
- set_allParentsKeys([...(allParents.map((a: any) => a.id))]);
- set_dataSource([...filterData]);
- data: filterData,
- if (currentTab.value == '1') {
- const allParents = findAllParents(resp);
- set_dataSource([...resp]);
- const getIfshowPercent = async () => {
- const { systemId } = JSON.parse(localStorage.getItem('currentSelectedTab') as string)
- const resp = await getParamsDataBySysId(systemId, '1851077044079824896');
- set_ifShowPercent(resp.value == '1' ? true : false);
- set_currentTabKey(key);
- const needItem = tabs.filter((a) => a.key == key);
- if (needItem.length > 0) set_currentTab(needItem[0])
- const getTabs = async () => {
- const { systemId } = JSON.parse((localStorage.getItem('currentSelectedTab')) as string)
- const resp = await getDicDataBySysId(systemId, 'PROFIT_REPORT_TYPE');
- const { dataVoList } = resp;
- const tempArr = dataVoList.map((a: any) => ({ label: a.name, key: Number(a.code), value: a.value }));
- const arr = (tempArr.filter((a: any) => a.value != '2'));
- set_tabs([...arr]);
- set_currentTabKey(arr[0].key);
- set_currentTab(arr[0]);
- const getResponsibleCenterList = async (reportType: string) => {
- const resp = await getResponsibleCenters(reportType);
- set_responsibleCenters(resp);
- const onLeftChange = (currentSelected: any) => {
- set_currentSelectedRespon(currentSelected);
- const onekeyComputeProfitHandle = async () => {
- title: '注意',
- content: '一键计算操作会覆盖当月已计算的数据,是否继续操作?',
- onOk: async () => {
- const promises = tabs.map(tab => computeProfitReq(computeDate, tab.key)); // 对每个tab创建一个请求
- const results = await Promise.all(promises); // 等待所有请求完成
- const allSuccess = results.every(resp => resp); // 检查所有请求是否都成功
- if (allSuccess) {
- set_calcResultText('一键计算成功!');
- set_calcResultText('一键计算部分失败!');
- tableRef.current?.reload(); // 重新加载表格数据
- message.error('操作失败,请重试!');
- set_calcResultText('一键计算失败!');
- const computeProfitHandle = async () => {
- content: '计算操作会覆盖当月已计算的数据,是否继续操作?',
- onOk: async (...args) => {
- const resp = await computeProfitReq(computeDate, currentTabKey);
- set_calcResultText('计算成功!');
- set_calcResultText('计算失败!');
- const openTableDataDrawer = async () => {
- set_drawerTableVisible(true);
- set_loadingtransform(true);
- if (currentTab.value == '3') {
- const resp = await getReportDataReq(currentTabKey, computeDate, '3');
- const { title = [], data = [] } = resp;
- const defaultColumns: ProColumns[] = [
- key: 'reportName',
- width: 220,
- fixed: 'left'
- const tableColumns = generateTableColumns(title, 'responsibilityName');
- const dataSource = transformTreeData(data);
- set_tableColumns([...defaultColumns, ...tableColumns]);
- set_dataSource(dataSource);
- set_loadingtransform(false);
- // console.log({ columns: [...defaultColumns, ...tableColumns], dataSource })
- const resp = await getReportDataReq(currentTabKey, computeDate, currentTab.value);
- const defaultColumns = [{
- title: '科室名称',
- key: 'responsibilityName',
- }];
- const tableColumns = generateTableColumns(title, 'reportName');
- const dataSource = processTree(data);
- const getHeaderRows = (columns: any[], level = 0, headerRows: any[] = [], maxLevel = 0) => {
- headerRows[level] = headerRows[level] || [];
- columns.forEach((col: { title: any; children: any; }) => {
- const colSpan = getColSpan(col);
- headerRows[level].push({ title: col.title, colSpan, rowSpan: col.children ? 1 : maxLevel - level });
- if (col.children) {
- getHeaderRows(col.children, level + 1, headerRows, maxLevel);
- // 填充空白单元格
- for (let i = level + 1; i < maxLevel; i++) {
- headerRows[i] = headerRows[i] || [];
- headerRows[i].push({ title: '', colSpan: 1, rowSpan: 1 });
- return headerRows;
- const getColSpan: any = (col: { children: any[]; }) => {
- if (!col.children) return 1;
- return col.children.reduce((sum, child) => sum + getColSpan(child), 0);
- const getMaxLevel = (col: any) => {
- return 1 + Math.max(...col.children.map(getMaxLevel));
- const extractLeafColumns = (columns: any[]) => {
- let leafColumns: any[] = [];
- columns.forEach(col => {
- leafColumns = leafColumns.concat(extractLeafColumns(col.children));
- leafColumns.push(col);
- return leafColumns;
- const addRowWithIndentation = (record: any, level: number, leafColumns: any[], worksheetData: any[]) => {
- const row = leafColumns.map(col => {
- let value = record[col.dataIndex] ?? '';
- // 应用 renderText 函数来格式化导出数据,保持与表格渲染时一致
- if (col.renderText) {
- value = col.renderText(value, record);
- return value;
- // 在第一列前添加缩进空格以表示层级
- row[0] = ' '.repeat(level * 4) + row[0]; // 每一级增加 4 个空格作为缩进
- worksheetData.push(row);
- if (record.children) {
- record.children.forEach((child: any) => addRowWithIndentation(child, level + 1, leafColumns, worksheetData));
- const handleExport = () => {
- const workbook = XLSX.utils.book_new();
- const worksheetData: any[] = [];
- // 获取最大层级
- const maxLevel = tableColumns.reduce((max, col) => Math.max(max, getMaxLevel(col)), 0);
- // 生成多层级表头
- const headerRows = getHeaderRows(tableColumns, 0, [], maxLevel);
- // 构建表头行
- headerRows.forEach((row: any, rowIndex) => {
- const rowData: string[] = [];
- row.forEach((cell: { title: any; colSpan: number; rowSpan: number; }) => {
- rowData.push(cell.title);
- for (let i = 1; i < cell.colSpan; i++) {
- rowData.push('');
- worksheetData.push(rowData);
- // 填充单层表头的空白行
- if (maxLevel > 1) {
- const numColumns = headerRows[0].reduce((sum: any, cell: { colSpan: any; }) => sum + cell.colSpan, 0);
- for (let i = 1; i < maxLevel; i++) {
- while (worksheetData[i].length < numColumns) {
- worksheetData[i].push('');
- // 提取最内层表头列
- const leafColumns = extractLeafColumns(tableColumns);
- // 添加数据并处理树结构
- dataSource.forEach(record => addRowWithIndentation(record, 0, leafColumns, worksheetData));
- const worksheet = XLSX.utils.aoa_to_sheet(worksheetData);
- // 初始化合并单元格数组
- worksheet['!merges'] = worksheet['!merges'] || [];
- // 合并单元格
- let colIndex = 0;
- row.forEach((cell: { colSpan: number; rowSpan: number; }) => {
- if (cell.colSpan > 1 || cell.rowSpan > 1) {
- worksheet['!merges']!.push({ // 使用非空断言 '!'
- s: { r: rowIndex, c: colIndex },
- e: { r: rowIndex + cell.rowSpan - 1, c: colIndex + cell.colSpan - 1 }
- colIndex += cell.colSpan;
- // 设置单元格对齐方式
- Object.keys(worksheet).forEach(cell => {
- if (cell[0] !== '!') {
- worksheet[cell].s = {
- alignment: { vertical: 'center', horizontal: 'center' }
- XLSX.utils.book_append_sheet(workbook, worksheet, 'Sheet1');
- const wbout = XLSX.write(workbook, { bookType: 'xlsx', type: 'binary' });
- const s2ab = (s: string) => {
- const buf = new ArrayBuffer(s.length);
- const view = new Uint8Array(buf);
- for (let i = 0; i < s.length; i++) view[i] = s.charCodeAt(i) & 0xFF;
- return buf;
- saveAs(new Blob([s2ab(wbout)], { type: 'application/octet-stream' }), currentTab ? `${currentTab.label}.xlsx` : 'table_data.xlsx');
- console.error('Export failed:', error);
- const handleExpandNext = () => {
- // 当前所有未展开的节点,第一层优先展开
- const keysToExpand = getNextUnexpandedKeys(dataSource, allParentsKeys);
- set_allParentsKeys((prev) => Array.from(new Set([...prev, ...keysToExpand])));
- const handleCollapseAll = () => {
- set_allParentsKeys([]);
- if (computeDate && currentTabKey != undefined) {
- getResponsibleCenterList(currentTabKey);
- set_dataSource([]);
- }, [computeDate, currentTabKey]);
- if (currentSelectedRespon) {
- responsibilityCode: currentSelectedRespon.responsibilityCode,
- reportType: currentTabKey,
- computeDate: computeDate
- }, [currentSelectedRespon])
- getTabs();
- getIfshowPercent();
- <KCIMPagecontainer className='DepartmentCostCalc' title={false}>
- <Drawer className='drawerTable' contentWrapperStyle={{}} bodyStyle={{ padding: 16 }} title={false} open={drawerTableVisible} width={1000} headerStyle={{ display: 'none' }}>
- <div className='header'>
- <div className='title'>{currentTab ? currentTab.label : ''}(单位:元)</div>
- <div className='btns'>
- <span onClick={() => set_drawerTableVisible(false)}>关闭</span>
- <span className='close' onClick={() => handleExport()}>导出</span>
- {/* {loadingtransform && <Skeleton />} */}
- <KCIMTable loading={loadingtransform} expandable={{ defaultExpandAllRows: true }} className='departmentCostCalcReportTable'
- dataSource={dataSource} bordered pagination={false}
- scroll={{ x: countLeafNodes(tableColumns) * 200, y: `calc(100vh - ${84 + ((tableColumns.reduce((max, col) => Math.max(max, getMaxLevel(col)), 0)) * 38)}px)` }}
- columns={tableColumns as ProColumns[]} rowKey='id' />
- </Drawer>
- <div className="search">
- <span>核算年月:</span>
- <DatePicker
- onChange={(data, dateString) => {
- set_computeDate(dateString);
- setInitialState((s: any) => ({ ...s, computeDate: dateString, }))
- computeDate: dateString,
- picker="month"
- locale={locale}
- defaultValue={moment(computeDate, 'YYYY-MM')}
- format="YYYY-MM"
- autoComplete="off"
- placeholder="选择年月"
- <div className='btnGoup'>
- <span className='onekeyCalcBtn' onClick={() => onekeyComputeProfitHandle()}>一键计算</span>
- {calcResultText && <Alert showIcon onClose={() => set_calcResultText(undefined)} icon={<IconFont type={(calcResultText.indexOf('失败') != -1) ? 'icon-cuowutishi' : 'icon-chenggongtishi'} />} closable style={{ padding: '4px 12px', marginBottom: 16, borderRadius: 4, border: (calcResultText.indexOf('失败') != -1) ? '1px solid #73E6BF' : '', background: (calcResultText.indexOf('失败') != -1) ? '#FFF1F3' : '#EBFFF8' }} message={calcResultText} type={calcResultText.indexOf('失败') != -1 ? 'error' : 'success'} />}
- <div className='inner'>
- <KCIMLeftList
- fieldNames={{ title: 'responsibilityName', key: 'responsibilityCode', children: 'children' }}
- rowKey={'responsibilityCode'}
- dataSource={responsibleCenters} searchKey={'responsibilityName'}
- onChange={onLeftChange}
- contentH={`100%`}
- // placeholder={leftListSearchPlaceHolder}
- listType={'tree'}
- <div className='filterItem' style={{ width: 228 }}>
- <Input placeholder={'报表项目代码/名称'} allowClear autoComplete='off'
- <span className='btn' onClick={() => handleCollapseAll()}>全部折叠</span>
- <span className='btn' style={{ marginRight: 16 }} onClick={() => handleExpandNext()}>展开下一层</span>
- <span className='btn' onClick={() => openTableDataDrawer()}>报表数据</span>
- <span className='calc' onClick={() => computeProfitHandle()}>计算</span>
- <KCIMTable pagination={false}
- rowClassName={(record) => (record.children ? 'has-children hover-row' : 'hover-row')}
- expandable={{
- expandedRowKeys: allParentsKeys,
- onExpand(expanded, record) {
- if (!expanded) {
- const expandedKeys = allParentsKeys.filter(a => a != id);
- set_allParentsKeys([...expandedKeys]);
- set_allParentsKeys([...allParentsKeys, id]);
- }} columns={columns as ProColumns[]} scroll={{ y: `calc(100vh - 302px)` }} actionRef={tableRef} rowKey='id' params={tableDataFilterParams} request={(params) => getTableData(params)} />
@@ -1,130 +0,0 @@
- * @LastEditTime: 2024-09-20 10:39:17
-export const getReportProjectSettingList = (params:any) => {
- return request('/costAccount/costdepartmentprofit/getComputeProfitList', {
- calcFormula?:string,
- calcType?:number,
- isLoss?:number,
- parentId?:number,
- reportName?:string,
- reportType?:number,
- sort?:number
- return request('/costAccount/reportForm/save', {
- return request('/costAccount/reportForm/edit', {
- return request('/costAccount/reportForm/delete', {
-//根据关系类型,获取已绑定的关系数据
-export const getHasSetReportRelation = (params:any) => {
- return request('/costAccount/reportForm/getRelationList', {
-//保存对应设置
-export const saveReportRelation = (body:any) => {
- return request('/costAccount/reportForm/saveReportRelation', {
-export const copyDataToSelectedType = (body:any) => {
- return request('/costAccount/reportForm/copyReport', {
-//获取执行责任中心
-export const getResponsibleCenters = (reportType:string) => {
- return request('/costAccount/costdepartmentprofit/getProfitResponsibility', {
- params:{reportType}
-//获取报表数据
-export const getReportDataReq = (reportType:string,computeDate:string,tabkey:string) => {
- return request(tabkey == '3'?'/costAccount/costdepartmentprofit/getComputeProfitCollect':'/costAccount/costdepartmentprofit/computeProfitReport', {
- params:{reportType,computeDate}
-//损益计算
-export const computeProfitReq = (computeDate:string,reportType:string) => {
- return request('/costAccount/costdepartmentprofit/computeProfit', {
- params: {computeDate,reportType},
@@ -1,168 +0,0 @@
-.drawerTable {
- .header {
- .btns {
- &.close {
- color: #fff;
-.DepartmentCostCalc {
- background-color: #fff;
- border-bottom: 16px solid #F7F9FC;
- .btnGoup {
- &.onekeyCalcBtn {
- .content {
- .inner {
- align-items: flex-start;
- height: calc(100vh - 223px);
- padding-top: 8px;
- margin-bottom: 12px;
- &.calc {
- .KCIMTable {
- .hover-row {
- .hover-icon {
- visibility: hidden;
- visibility: visible;
- .cost-ant-table-header {
- .cost-ant-table-body {
- &.has-children {
- .cost-ant-table-cell-with-append {
@@ -1,301 +0,0 @@
-import { Tabs,Tree } from 'antd';
-import { getApportionmentLevelList } from "../../costAllocationSet/allocationLevelSet/service";
-import { getResponsibilityCenterList } from "../../responsibilityCenterSet/responsibilityCenter/service";
-import { findAllParents, renameChildListToChildren, searchLeaves } from "@/utils/tooljs";
-import { getHasSetReportRelation } from "./service";
- settingType: number,
- onSave: (selectedKeys: Key[], selectedRowKeys: any[], settingType: number) => void;
-const flattenTreeData = (treeData:any[], childKey = 'children', parentKey = 'parentId') => {
- let result:any[] = [];
- function flatten(node:any, parentId = null) {
- // 创建一个新对象,包含原始节点的所有属性,除了 children,并添加 parentId
- const { [childKey]: _, ...flatNode } = node;
- result.push({ ...flatNode, [parentKey]: parentId });
- // 如果节点有子节点,递归扁平化这些子节点
- if (node[childKey] && node[childKey].length > 0) {
- node[childKey].forEach((childNode:any) => flatten(childNode, node.id));
- // 遍历每个根级节点
- treeData.forEach(node => flatten(node));
-function buildTree(flatData:any[], rootParentId = null, idKey = 'id', parentKey = 'parentId', childrenKey = 'children') {
- const nodeMap = new Map();
- // 首先,将所有节点存储到一个 Map 中,以便快速访问
- flatData.forEach(node => nodeMap.set(node[idKey], { ...node }));
- const tree:any[] = [];
- flatData.forEach(node => {
- const parentNode = nodeMap.get(node[parentKey]);
- if (parentNode) {
- // 检查父节点是否已经有了 children 属性
- if (!parentNode[childrenKey]) {
- parentNode[childrenKey] = [];
- // 将当前节点添加到父节点的 children 数组中
- parentNode[childrenKey].push(nodeMap.get(node[idKey]));
- } else if (node[parentKey] === rootParentId) {
- // 如果没有父节点且 parentId 与根 parentId 匹配,则为根节点
- tree.push(nodeMap.get(node[idKey]));
- // 清除那些 children 长度为 0 的节点的 children 属性
- function clearEmptyChildren(node:any) {
- if (node[childrenKey] && node[childrenKey].length === 0) {
- delete node[childrenKey];
- } else if (node[childrenKey]) {
- node[childrenKey].forEach(clearEmptyChildren);
- tree.forEach(clearEmptyChildren);
- return tree;
-const TableTransfer = React.forwardRef(({ leftColumns, rightColumns, keyName, record, settingType, onSave, ...restProps }: TableTransferProps, ref) => {
- const [targetKeys, setTargetKeys] = useState<string[]>(record.accountingIds ? [...((record.accountingIds).map((a: string) => Number(a)))] : []);
- const [selectedKeys, setSelectedKeys] = useState<string[]>(record.accountingIds ? [...((record.accountingIds).map((a: string) => Number(a)))] : []);
- if (settingType == 1) {
- const resp = await getAccountingSubjectList({ pageSize: 500, current: 1, accountType });
- const initData = await getHasSetReportRelation({ reportId: record.id, relation: settingType });
- if (initData) {
- const hasSelectedKeys = initData.map((a: any) => a.code);
- const hasSelectedRows = flattenTreeData(resp.list).filter((a: any) => hasSelectedKeys.includes(a.accountingCode));
- const selectedKeys = hasSelectedRows.map((a: any) => a.id)
- // setSelectedKeys(selectedKeys);
- setTargetKeys(selectedKeys);
- if (settingType == 2) {
- const resp = await getApportionmentLevelList({ pageSize: 500, current: 1 });
- const hasSelectedKeys = initData.map((a: any) => Number(a.id));
- const hasSelectedRows = resp.list.filter((a: any) => hasSelectedKeys.includes(a.id));
- if (settingType == 3) {
- const resp = await getResponsibilityCenterList({ pageSize: 500, current: 1 });
- //const opendedArr = renameChildListToChildren(resp.list, 'child');
- const hasSelectedRows = resp.list.filter((a: any) => hasSelectedKeys.includes(a.responsibilityCode));
- set_datasource(renameChildListToChildren(resp.list, 'child'));
- _set_data(renameChildListToChildren(resp.list, 'child'));
- // console.log({ nextTargetKeys });
- // console.log('sourceSelectedKeys:', sourceSelectedKeys, 'targetSelectedKeys:', targetSelectedKeys);
- if(settingType == 1||settingType == 3){
- const items = flattenTreeData(datasource).filter(a => targetKeys.includes(a[`${keyName}`]));
- onSave(targetKeys, items, settingType);
- {settingType == 1 && (
- dataSource={settingType == 2?datasource:flattenTreeData(datasource)}
- if(settingType == 1){
- return item['accountingName']!.indexOf(inputValue) !== -1
- if(settingType == 2){
- return item['shareName']!.indexOf(inputValue) !== -1
- if(settingType == 3){
- return item['responsibilityName']!.indexOf(inputValue) !== -1
- return false
- dataSource={settingType == 2?filteredItems:direction == 'left'?buildTree(filteredItems):filteredItems}
- scroll={{ y:`calc(100vh - )` }}
@@ -1,430 +0,0 @@
- * @LastEditTime: 2024-09-09 10:53:22
-import SQLEditor from '@/components/SQLEditor';
-import { ActionType, arrayMoveImmutable, ProFormText, ProFormTextArea, useRefFunction } from '@ant-design/pro-components';
-import { ModalForm, ProFormDependency, ProFormDigit, ProFormSelect } from '@ant-design/pro-form'
-import { Input, message, Popconfirm, Switch } from 'antd';
-import { SortableContainer, SortableElement, SortableHandle } from 'react-sortable-hoc';
-import { addData, delData, editData, getSqlListTableData, getSqlTypeList, updateTableSort } from './service';
-export default function DiySqlMana() {
- const SortableItem = SortableElement((props: any) => <tr {...props} />);
- const SortContainer = SortableContainer((props: any) => <tbody {...props} />);
- const [typeList, set_typeList] = useState<any[]>([]);
- const [showTypeListArr, set_showTypeListArr] = useState<any[]>([]);
- const DragHandle = SortableHandle(() => <img width={16} style={{ cursor: 'pointer' }} src={require('../../../../../static/tuozhuai_icon.png')} alt="" />);
- width: 50,
- className: 'drag-visible',
- render: () => <DragHandle />
- title: 'SQL代码',
- width: 150,
- dataIndex: 'sqlCode',
- title: 'SQL语句',
- dataIndex: 'sql',
- title: 'SQL说明',
- dataIndex: 'sqlDefinition',
- // render:(_:any)=>_ == 1?'指标':'自定义SQL'
- title: '启用',
- renderText: (_: any, record: any) => {
- return <Switch size='small' checked={_ ? true : false} onChange={(bool) => switchChangeHandle(bool, record, 'status')} />
- <UpDataActBtn key={'act'} record={record} type='ADD_NEXT' />,
- const resp = await getSqlListTableData(params);
- set_dataSource(resp);
- set_showList(resp);
- getTableData({ sqlType: currentSelectedType.code });
- const switchChangeHandle = (checked: boolean, record: any, key: string) => {
- const newData = dataSource.map((a: any) => {
- if (a.id == record.id) {
- return { ...a, [`${key}`]: checked ? 1 : 0 }
- set_dataSource([...newData]);
- updateTable({ ...record, [`${key}`]: checked ? 1 : 0 }, 'EDIT')
- const updateTable = async (formVal: any, type: 'EDIT' | 'ADD' | 'ADD_NEXT') => {
- const resp = await addData({
- sqlCode: formVal.sqlCode,
- sql: formVal.sql,
- sqlDefinition: formVal.sqlDefinition,
- sqlType: currentSelectedType.code,
- sort: dataSource.length + 1,
- status: 1
- if (type == 'ADD_NEXT') {
- const { sort } = formVal;
- const temp = [...dataSource];
- const index = temp.findIndex(a => a.sort == sort);
- const objectToInsert = {
- temp.splice(index + 1, 0, objectToInsert);
- const arr = temp.map((a, index) => ({ ...a, sort: index + 1 }));
- updateTableSortHandle(arr);
- const resp = await editData({
- sqlType: formVal.sqlType,
- sort: formVal.sort,
- status: formVal.status
- const formRef = useRef();
- const UpDataActBtn = ({ record, type }: { record: any, type: 'EDIT' | 'ADD' | 'ADD_NEXT' }) => {
- title={`${type == 'EDIT' ? '编辑' : type == 'ADD_NEXT' ? '插入' : '新增'}自定义SQL`}
- width={1200}
- initialValues={type == 'EDIT' ? { ...record } : {}}
- type == 'EDIT' ? <a key="edit" >编辑</a> : type == 'ADD_NEXT' ? <a>插入</a> : <span className='add'>新增</span>
- return updateTable(type == 'EDIT' ? { ...record, ...val } : type == 'ADD_NEXT' ? { ...record, ...val } : { ...val }, type);
- <div className='formContent' style={{ display: 'flex', width: '100%', flexDirection: 'row', alignContent: 'flex-start', overflow: 'hidden' }}>
- <div className='left' style={{ width: 240, minWidth: 240, marginRight: 16 ,marginBottom:'-15px'}}>
- name="sqlCode"
- label="SQL代码:"
- rules={[{ required: true, message: 'SQL代码不能为空!' }]}
- <ProFormTextArea fieldProps={{rows:18}} placeholder="请输入" name={'sqlDefinition'} label='SQL说明:' rules={[{ required: true, message: '说明不能为空!' }]} />
- <div className='right' style={{ width: 'calc(1200px - 288px)', marginBottom: '-15px' }}>
- {/* <ProFormTextArea placeholder="请输入" name={'sql'} label='SQL语句:' rules={[{ required: true, message: 'SQL不能为空!' }]} /> */}
- <SQLEditor
- name="sql"
- label="SQL语句:"
- rules={[{ required: true, message: 'SQL不能为空!' }]}
- form={formRef}
- height={'435px'}
- const tableDataSearchHandle = (key: string) => {
- const result = dataSource.filter((a) => a.sqlDefinition.indexOf(tableDataSearchKeywords) != -1);
- const getSqlTypeRequest = async () => {
- const resp = await getSqlTypeList();
- set_typeList(resp);
- set_showTypeListArr(resp);
- const updateTableSortHandle = async (data: any[]) => {
- const resp = await updateTableSort(data);
- const onSortEnd = useRefFunction(
- ({ oldIndex, newIndex }: { oldIndex: number; newIndex: number }) => {
- if (oldIndex !== newIndex) {
- const newData = arrayMoveImmutable({
- array: [...dataSource],
- fromIndex: oldIndex,
- toIndex: newIndex,
- }).filter((el) => !!el);
- const updatedSortArr = newData.map((item: any, index: number) => ({ ...item, sort: index + 1 }))
- set_dataSource([...updatedSortArr]);
- updateTableSortHandle(updatedSortArr);
- const DraggableContainer = (props: any) => (
- <SortContainer
- useDragHandle
- disableAutoscroll
- helperClass="row-dragging"
- onSortEnd={onSortEnd}
- {...props}
- const DraggableBodyRow = (props: any) => {
- const { className, style, ...restProps } = props;
- // function findIndex base on Table rowKey props and should always be a right array index
- const index = dataSource.findIndex((x) => x.id === restProps['data-row-key']);
- return <SortableItem index={index} {...restProps} />;
- if (showTypeListArr.length > 0) {
- set_currentSelectedType(showTypeListArr[0]);
- }, [showTypeListArr]);
- if (currentSelectedType) {
- }, [currentSelectedType]);
- getSqlTypeRequest();
- <KCIMPagecontainer className='DiySqlMana' title={false}>
- {/* <div className='toolBar'>
- <span className='label'>检索:</span>
- placeholder="请选择类型"
- style={{ width: 160, marginRight: 16 }}
- return resp.list.map((a: any) => ({ label: a.name, value: a.code }))
- set_tableDataFilterParams({ ...tableDataFilterParams, sqlType: value })
- <BMSTable columns={columns as ProColumns[]} actionRef={tableRef} rowKey='id' params={tableDataFilterParams} request={(params) => getTableData(params)} />
- <Input placeholder={'请输入类目名称'} allowClear autoComplete='off'
- const result = typeList.filter(item => item.name.indexOf(e.target.value) != -1);
- set_showTypeListArr(result);
- showTypeListArr.map((item, index) => {
- <div className={currentSelectedType ? currentSelectedType.code == item.code ? 'type on' : 'type' : 'type'}
- onClick={() => set_currentSelectedType(item)}
- >{item.name}</div>
- <Input placeholder={'sql说明'} style={{ width: 160 }} allowClear autoComplete='off'
- <IconFont style={{ color: '#99A6BF' }} type="iconsousuo" onClick={() => tableDataSearchHandle('sqlDefinition')} />
- set_tableDataSearchKeywords('');
- tableDataSearchHandle('sqlDefinition')
- {currentSelectedType && <KCIMTable scroll={{ y: `calc(100vh - 230px)` }}
- actionRef={tableRef} columns={columns as ProColumns[]} rowKey='id'
- // params={tableDataFilterParams}
- // request={(params) => getTableData(params)}
- components={{
- body: {
- wrapper: DraggableContainer,
- row: DraggableBodyRow,
@@ -1,109 +0,0 @@
- * @LastEditTime: 2024-03-21 10:23:18
-export type SQLTableDataType = {
- id:number,
- hospId:number,
- code:number,
- sqlCode:string,
- sql:string,
- sqlDefinition:string,
- sqlType:string,
- sqlTypeName:string,
- sort:number
-export const getSqlListTableData = (params?:any) => {
- return request<any[]>('/costAccount/report/getSql', {
-//新增报表
-export type AddSqlTableDataType = {
- sort:number,
- status:number
-export const addData = (data:AddSqlTableDataType) => {
- return request('/costAccount/report/addSql', {
-export type EditSqlTableDataType = {
- status:number,
- [key:string]:any
-export const editData = (data:EditSqlTableDataType) => {
- return request('/costAccount/report/editSql', {
-export const updateTableSort = (data:EditSqlTableDataType[]) => {
- return request('/costAccount/report/sortSql', {
- return request('/costAccount/report/deleteSql', {
-//获取sql类型
-export const getSqlTypeList = (params?:any) => {
- return request('/costAccount/report/getSqlType?current=1&pageSize=1000&typeCode=10', {
@@ -1,95 +0,0 @@
-.DiySqlMana {
- height:calc(100vh - 80px);
- overflow: scroll;
- .type {
- line-height: 32px;
- padding-left: 8px;
- margin-bottom: 4px;
- background: #F0F2F5;
- margin-bottom: 0;
@@ -1,619 +0,0 @@
- * @LastEditTime: 2024-11-08 11:54:36
-import { ModalForm, ProFormTextArea } from '@ant-design/pro-form'
-import { Modal, message, Popconfirm, Form, Tabs, Switch } from 'antd';
-import { addData, copyDataToSelectedType, delData, editData, getReportProjectSettingList, saveReportRelation } from './service';
-import { cleanTree } from '@/utils/tooljs';
-import { getDicDataBySysId } from '@/services/getDic';
-const accountingSubjectColumn = [
-const shareParamsColumn = [
- title: '分摊层级Id',
-const responsibilityColumn = [
-const openRule = () => {
- Modal.info({
- title: '报表项目填写注意事项!',
- width: 800,
- content: (
- <h4>计算类型说明 </h4>
- <span>不设置:</span>
- 一般用于第一层。 对应成本科目:对应的是成本科目,如工资,收入类等
- <div></div>
- <span>对应责任中心:</span>
- 对应的是分摊的责任中心,放射科,功能科等
- <span>对应分摊层级:</span>
- 对应的是分摊的层级,如“护理”分摊层级,“医技”分摊层级。
- <span>小计:</span>
- 是对第一层下的所有项目的合计计算。
- <span>计算公式:</span>
- 是按编号对报表项目的项目进行计算结果,支持加/减法。
- <div style={{ marginBottom: 20 }}></div>
- <h4>报表项目顺序注意事项</h4>
- 计算类型是小计报表项目需要维护在对应层级的其他项目之后
- 计算类型是计算公式的报表项目需要维护在公式里包含的其他项目之后
-export default function ReportItemSet() {
- const [reportType, set_reportType] = useState<Key | undefined>(undefined);
- const [calcTypes, setCalcTypes] = useState<any[]>([]);
- title: '报表项目名',
- width: 200
- width: 80
- title: '编号',
- dataIndex: 'num',
- renderText:(num, record) => {
- const temp = calcTypes.filter((a)=>a.code == num);
- return temp.length>0?temp[0].name:''
- // title: '报表类型',
- // dataIndex: 'reportType',
- // renderText(num) {
- // switch (num) {
- // case 0:
- // return <>损益表</>;
- // case 1:
- // return <>完全成本法表</>;
- // case 2:
- // return <>变动成本表</>;
- // case 3:
- // return <>全院损益表</>;
- // case 4:
- // return <>全成本报表</>;
- title: '计算公式',
- width: 300,
- dataIndex: 'calcFormula',
- title: '项目类型',
- switch (num) {
- case 1:
- return <>收入</>;
- case 2:
- return <>成本</>;
- title: '占比计算类型',
- dataIndex: 'fraction',
- return <>分子</>;
- return <>分母</>;
- case 3:
- return <>不计算</>;
- title: '排序',
- title: '说明',
- dataIndex: 'description',
- ellipsis: true
- title: '显示',
- dataIndex: 'hide',
- return <Switch size='small' checked={_ == 1} onChange={(bool) => updateTable({...record,hide:bool?1:0},'EDIT')} />
- const { showAddRelation, parentId, calcType } = record;
- const btnGroup = true ? [
- <UpDataActBtn key={'addChild'} record={record} type='ADDCHILD' />,
- return showAddRelation ? [
- ...btnGroup,
- <a key="config3" onClick={() => {
- if (showAddRelation == 1) oprnTableTransform(record, accountingSubjectColumn, 1);
- if (showAddRelation == 2) oprnTableTransform(record, shareParamsColumn, 2);
- if (showAddRelation == 3) oprnTableTransform(record, responsibilityColumn, 3);
- {showAddRelation == 1
- ? '会计科目'
- : showAddRelation == 2
- ? '分摊层级'
- : showAddRelation == 3 && '责任中心'}
- ] : btnGroup
- const { reportType } = params;
- if (reportType == undefined) return []
- data: cleanTree(resp.list),
- const onSaveHandle = async (keys: Key[], rows: any[], record: any, settingType: number) => {
- let selectedRowKeysToStr: string[] = [];
- keys
- ? keys.map((item: any) => selectedRowKeysToStr.push(`${item}`))
- : [];
- let selectedRowKeys: Key[] = [];
- selectedRowKeys = rows.map((a: any) => a.accountingCode)
- selectedRowKeys = keys.map((a: any) => `${a}`)
- selectedRowKeys = rows.map((a: any) => a.responsibilityCode)
- const { id: reportId } = record;
- const resp = await saveReportRelation({
- reportId,
- reportType,
- relation: settingType,
- relationCodes: selectedRowKeys,
- message.success('对照成功!');
- const oprnTableTransform = (record: any, transferTableColumn: ProColumns[], settingType: number) => {
- title: settingType == 1 ? `选择会计科目` : settingType == 2 ? '选择分摊层级' : '选择责任中心',
- width: 1000,
- keyName={settingType == 1 ? `accountingCode` : settingType == 2 ? 'id' : 'responsibilityCode'}
- settingType={settingType}
- onSave={(keys, rows, settingType) => onSaveHandle(keys, rows, record, settingType)}
- rightColumns={transferTableColumn}
- const updateTable = async (formVal: any, type: 'EDIT' | "ADD" | "ADDCHILD" | 'COPY') => {
- let parentId = 0;
- const { calcType = 0, calcFormula = '' } = formVal;
- (type == 'ADDCHILD') && (parentId = formVal.id);
- calcType,
- calcFormula,
- isLoss: formVal.isLoss ? 1 : 0,
- reportType: Number(reportType),
- parentId
- const { reportName, sort, calcType = 0, calcFormula = '', isLoss, parentId, id, fraction, costType, description,hide } = formVal;
- id,
- parentId,
- reportName,
- sort,
- fraction,
- costType,
- isLoss: isLoss ? 1 : 0,
- description,
- hide
- //复制数据
- const { toReportType } = formVal;
- const resp = await copyDataToSelectedType({
- fromReportType: Number(reportType),
- toReportType,
- message.success('复制成功!');
- const UpDataActBtn = ({ record, type }: { record: any, type: 'EDIT' | 'ADD' | 'ADDCHILD' | 'COPY' }) => {
- const reportType = type == 'EDIT' || type == 'ADDCHILD' ? record.reportType : undefined
- title={type == 'COPY' ? '复制' : `${type == 'EDIT' ? '编辑' : '新增'}报表`}
- type == 'EDIT' ? <a key="edit" >编辑</a> : type == 'ADDCHILD' ? <a className='add'>添加</a> : type == 'COPY' ? <span className='copy' style={{ marginRight: 8 }}>复制</span> : <span className='add'>新增</span>
- label="报表名"
- message: '报表名是必填项!',
- name="reportName"
- label="排序"
- message: '排序必填项!',
- name="sort"
- {(
- //新增顶级不展示
- label="计算类型"
- ...(calcTypes.map((a)=>({label:a.name,value:Number(a.code)})))
- rules={[{ required: true, message: '请选择计算类型!' }]}
- <ProFormDependency name={['calcType']}>
- {({ calcType }) => {
- // const resp = await getResponsibilityCenterList({pageSize:100,current:1});
- return calcType == 4 ? (
- label="计算公式"
- message: '计算公式是必填项!',
- placeholder="例如:[1] + [2]"
- name="calcFormula"
- <></>
- return calcType == 4 && reportType == 3 ? (
- <Form.Item
- name="isLoss"
- label="损益标志"
- valuePropName="checked"
- <Switch />
- label="报表项目类型"
- { label: '收入', value: 1 },
- { label: '成本', value: 2 },
- rules={[{ required: true, message: '请选择报表项目类型!' }]}
- name="fraction"
- label="占比计算类型"
- { label: '分子', value: 1 },
- { label: '分母', value: 2 },
- { label: '不计算', value: 3 },
- rules={[{ required: true, message: '请选择占比计算类型!' }]}
- label="说明"
- placeholder='请输入'
- name="description"
- name="toReportType"
- label="复制到"
- width="sm"
- options={tabs.map((a) => ({ label: a.label, value: a.key }))}
- rules={[{ required: true, message: '请选择复制到目标!' }]}
- set_reportType(key);
- set_tableDataFilterParams({ ...tableDataFilterParams, reportType: key })
- set_tabs(dataVoList.map((a: any) => ({ label: a.name, key: Number(a.code) })));
- set_tableDataFilterParams({ ...tableDataFilterParams, reportType: dataVoList.length > 0 ? dataVoList[0].code : undefined });
- set_reportType(dataVoList.length > 0 ? dataVoList[0].code : undefined);
- const fetchData = async () => {
- const { systemId } = JSON.parse(localStorage.getItem('currentSelectedTab') as string);
- const resp = await getDicDataBySysId(systemId, 'REPORT_ITEM_CALC_TYPE');
- setCalcTypes(resp?.dataVoList??[]); // 假设 resp 返回的是一个键值对
- fetchData();
- <KCIMPagecontainer className='ReportItemSet' title={false}>
- <div className='pageTitle'>报表项目设置</div>
- <span style={{ marginRight: 8, cursor: 'pointer' }} onClick={() => openRule()}><img style={{ width: 16, marginRight: 4, marginTop: -1 }} src={require('../../../../../static/tip.png')} />说明</span>
- <UpDataActBtn record={undefined} type='COPY' />
- <UpDataActBtn record={undefined} type='ADD' />
- <KCIMTable pagination={false} scroll={{ x: 1700, y: `calc(100vh - 191px)` }} columns={columns as ProColumns[]} actionRef={tableRef} rowKey='id' params={tableDataFilterParams} request={(params) => getTableData(params)} />
@@ -1,103 +0,0 @@
- * @LastEditTime: 2023-12-14 16:27:30
- return request('/costAccount/reportForm/list', {
@@ -1,68 +0,0 @@
-.ReportItemSet {
- padding-top: 16px;
- .pageTitle {
- .add,
- .copy {
@@ -1,302 +0,0 @@
- // console.log(flattenTreeData(resp.list));
- const hasSelectedRows = flattenTreeData(resp.list,'children').filter((a: any) => hasSelectedKeys.includes(a.accountingCode));
- const selectedKeys = hasSelectedRows.map((a: any) => a.accountingCode);
- // console.log({hasSelectedRows,hasSelectedKeys,a:flattenTreeData(resp.list,'children')});
- const hasSelectedRows = flattenTreeData(resp.list,'child').filter((a: any) => hasSelectedKeys.includes(a.responsibilityCode));
- const selectedKeys = hasSelectedRows.map((a: any) => a.responsibilityCode)
@@ -1,316 +0,0 @@
- * @LastEditTime: 2023-10-30 14:04:24
-import { ModalForm, ProFormText } from '@ant-design/pro-form';
-import { Tabs, Popconfirm } from 'antd';
-import { addData, delData, editData, getData, getTabs } from './service';
-import { ProFormDependency, ProFormDigit, ProFormInstance, ProFormRadio, ProFormSelect } from '@ant-design/pro-components';
-export default function reportItemSet() {
- const tableRef = useRef();
- const [currentEdit, set_currentEdit] = useState<any|undefined>(undefined);
- const [tableData, set_tableData] = useState<any[]>([]);
- const [currentTab, set_currentTab] = useState<any|undefined>(undefined);
- const columns = [
- dataIndex: 'columnName',
- title: '报表项目代码',
- dataIndex: 'columnCode',
- dataIndex: 'computeTypeName',
- title: '计算来源',
- dataIndex: 'computeSourceName',
- title: '序号',
- title: '下钻界面',
- dataIndex: 'redirectName',
- dataIndex: 'option',
- width: '15%',
- render: (_: any, record: { parentColumnCode: any,id:any }) => {
- const { parentColumnCode } = record;
- const delBtn = () => (
- key={3}
- title="是否确定删除?"
- okText="确定"
- cancelText="取消"
- <a key={3}>删除</a>
- return parentColumnCode == '0'
- ? [
- <UpDataActBtn key={1} record={record} type={'ADD'} />,
- <UpDataActBtn key={2} record={record} type={'EDIT'} />,
- delBtn()
- : [<a key={1}>编辑</a>, delBtn()];
- const getTableData = async (key: any) => {
- const resp = await getData(key);
- set_tableData(resp.map((a:any) => ({ ...a, children: a.childColumns })));
- //const columns = convertToColumnsFunc(title, true);
- const delTableData = async (id: any) => {
- const { status } = resp;
- if (status == 200) {
- getTableData(currentTab.key);
- const updateTable = async (formVal: { columnName: any; computeType: number; computeSource: any; parentColumnCode: any; sort: any; dataType: any; redirect: any; redirectParameter: any[]; id: any; }, type: string) => {
- reportCode: currentTab.key,
- columnName: formVal.columnName,
- computeType: formVal.computeType,
- computeSource: formVal.computeType != 3 ? formVal.computeSource : 3,
- parentColumnCode: formVal.computeType == 1 ? formVal.parentColumnCode : '',
- dataType: formVal.dataType,
- redirect: formVal.redirect,
- redirectParameter: formVal.redirectParameter?(formVal.redirectParameter instanceof Array)?formVal.redirectParameter.join(','):formVal.redirectParameter:'',
- const resp = await editData({ ...result, id: formVal.id });
- } catch (e) {
- console.log({ e });
- const UpDataActBtn = ({ record, type}:{record:any, type:'ADD'|'EDIT'}) => {
- title={`${type == 'EDIT' ? '编辑' :record?'添加':'新增'}报表`}
- initialValues={type == 'EDIT' ? { ...record,redirectParameter:record.redirectParameter?record.redirectParameter.split(','):[]} : {computeType:1,dataType:1 }}
- trigger={type == 'EDIT' ? <a key="edit">编辑</a> : <a className="add" >{record?'添加':'新增'}</a>}
- set_currentEdit(undefined);
- return updateTable(type == 'EDIT' ? { ...record, ...val,id:record.id } : { ...val,parentColumnCode:record?record.columnCode:'0' }, type);
- name="columnName"
- label="报表项目名称:"
- name="computeType"
- label="计算方式:"
- { label: '对应成本项', value: 1 },
- { label: '计算公式', value: 2 },
- { label: '合计', value: 3 },
- rules={[{ required: true, message: '计算方式不能为空!' }]}
- <ProFormDependency name={['computeType']}>
- {({ computeType }) => {
- if (computeType == 1) {
- name="computeSource"
- label="报表项目类别:"
- const resp = await getTargetDic('REPORT_ITEM_TYPE');
- return dataVoList.map((a:any) => {
- if(a.defaultValue&&type == 'ADD'){
- formRef.current?.setFieldValue('computeSource',a.code);
- return { label: a.name, value: a.code }
- rules={[{ required: true, message: '报表项目类别不能为空!' }]}
- if (computeType == 2) {
- label="计算公式:"
- label="序号:"
- rules={[{ required: true, message: '序号不能为空!' }]}
- name="dataType"
- label="数据格式:"
- { label: '数值', value: 1 },
- { label: '百分比', value: 2 },
- rules={[{ required: true }]}
- name="redirect"
- label="下钻界面:"
- const resp = await getTargetDic('REPORT_REDIRECT_PATH');
- formRef.current?.setFieldValue('redirect',a.code);
- rules={[{ required: true, message: '下钻界面不能为空!' }]}
- <ProFormDependency name={['redirect']}>
- ({redirect})=>{
- return redirect != '0'?(
- name="redirectParameter"
- label="下钻参数:"
- fieldProps={{mode:'multiple'}}
- const resp = await getTargetDic('REPORT_REDIRECT_PARAM');
- formRef.current?.setFieldValue('redirectParameter',a.value?a.value.split(','):[]);
- return { label: a.name, value: a.value }
- rules={[{ required: true, message: '下钻参数不能为空!' }]}
- ):null
- const getTabsReq = async () => {
- const resp = await getTabs();
- set_tabs(resp.map((a: { code: any; name: any; }) => ({ key: a.code, label: a.name })));
- set_currentTab({key:resp[0].code,label:resp[0].name});
- getTableData(resp[0].code);
- const onTabChanged = (key: any) => {
- const needitem = tabs.filter((a: { key: any; }) => a.key == key);
- set_currentTab(needitem[0]);
- getTableData(key);
- getTabsReq();
- <KCIMPagecontainer className="reportItemSet" title={false}>
- <div className="toolBar">
- <div className="filter"></div>
- <div className="btnGroup">
- {/* <a className='copy'>复制</a> */}
- <UpDataActBtn record={undefined} type="ADD" />
- <KCIMTable columns={columns} actionRef={tableRef} rowKey="id" dataSource={tableData} />
@@ -1,69 +0,0 @@
- * @LastEditTime: 2023-10-19 16:43:53
-export const getData = (key) => {
- return request('/costAccount/setting/getReportColumn', {
- params:{reportCode:key}
-//获取Tabs
-export const getTabs = () => {
- return request('/costAccount/setting/getReport', {
-export const addData = (data) => {
- return request('/costAccount/setting/addReportColumn', {
-//编辑权
-export const editData = (data) => {
- return request('/costAccount/setting/editReportColumn', {
-export const delData = (id) => {
- return request('/costAccount/setting/deleteReportColumn', {
-.reportItemSet {
- position:absolute;
- right:16px;
- top:16px;
- .add ,.copy{
- * @LastEditTime: 2023-11-21 19:20:27
-//获取诊次/床日成本设置列表
-export const getVisitsAndBedDayCostSettingList = (params:any) => {
- const {incomeFileName:name,current,pageSize} = params;
- return request('/costAccount/costnumberbedset/list', {
- params:{current,pageSize,name},
-.VisitsAndBedDayCostSetting {
@@ -1,208 +0,0 @@
- * @LastEditTime: 2024-08-23 10:22:11
-import { message, Popconfirm, Form, Select } from 'antd';
-import { addData, delData, editData, getWholeHospCostList } from './service';
-export default function WholeHospCostAndIncomeSet() {
- title: '收支类型',
- dataIndex: 'paymentsType',
- return num == 1?'收入':'支出'
- title: '收支名称',
- dataIndex: 'paymentsName',
- const resp = await getWholeHospCostList({ ...params });
- paymentsType:formVal.paymentsType,
- paymentsName:formVal.paymentsName
- targetLevel: record.targetLevel ? record.targetLevel.split(',').map((a: string) => Number(a)) : []
- } : { targetLevel: [] }}
- message: '请选择收支类型',
- name="paymentsType"
- label="选择收支类型"
- message: '请填写收支名称',
- name="paymentsName"
- label="收支名称"
- <KCIMPagecontainer className='WholeHospCostAndIncomeSet' title={false}>
- <div className='title'>全院其他收支设置</div>
- <KCIMTable scroll={{ y: `calc(100vh - 191px)`}} columns={columns as ProColumns[]} actionRef={tableRef} rowKey='id' params={tableDataFilterParams} request={(params) => getTableData(params)} />
@@ -1,73 +0,0 @@
- * @LastEditTime: 2023-11-21 11:08:53
-//获取 全院其他收支设置列表
-export const getWholeHospCostList = (params:any)=> {
- return request('/costAccount/costotherpayments/list', {
- paymentsType:number,
- paymentsName:string,
- return request('/costAccount/costotherpayments/save', {
- data:{...data},
- return request('/costAccount/costotherpayments/update', {
- return request('/costAccount/costotherpayments/delete', {
@@ -1,34 +0,0 @@
-.WholeHospCostAndIncomeSet {
@@ -1,566 +0,0 @@
- * @LastEditTime: 2024-09-14 11:32:17
-import { ModalForm, ProFormDigit } from '@ant-design/pro-form'
-import { Input, message, Popconfirm,Popover,Switch,Tooltip } from 'antd';
-import { addData, delData, editData, getApportionmentLevelListNoPage, getResponsibilityCenterList, getResponsibilityTypeReq, getStandardShareLevelReq } from './service';
-import {renameChildListToChildren } from '@/utils/tooljs';
-let selectableLevelList: any[] = [];
-export const searchTree = (tree: any[], searchTerm: string) => {
- if (node.responsibilityName.toLowerCase().includes(searchTermLower) || (node.responsibilityCode && node.responsibilityCode.toLowerCase().includes(searchTermLower))) {
-export default function ResponsibilityCenter() {
- title: '责任中心名称',
- fixed:'left',
- renderText(_, record) {
- const { isDefault, responsibilityName,isGatherCenter } = record;
- // return isDefault == 1 ? <Tag>{`${responsibilityName}(是)`}</Tag> : responsibilityName
- return (isDefault == 1||isGatherCenter == 1)?isGatherCenter == 1?<Popover content='汇总中心'>
- {responsibilityName} <img style={{width:14,height:14,position:'relative',left:6}} src={require('../../../../../static/huizong.png')} />
- </Popover>:<>{responsibilityName}<img style={{width:14,height:14,position:'relative',top:-1,left:6}} src={require('../../../../../static/moren.png')} /></>:responsibilityName
- // title: '是否汇总中心',
- // dataIndex: 'isGatherCenter',
- // renderText(_, record) {
- // return <>{_ == 1 ? '是' : '否'}</>
- title: '责任类型',
- dataIndex: 'responsibilityType',
- if (record.isGatherCenter != 1) {
- return num == 1 ? '收益中心' : num == 2 ? '成本(费用)中心' : '半收益中心'
- return '-'
- return num
- title: '分摊级别名称',
- renderText(name, record) {
- return name
- title: '标准分级',
- dataIndex: 'standardShareLevelName',
- title: '责任中心类型',
- title:()=><>启用<Tooltip title="停用的责任中心在科室损益计算界面及科室损益报表里不显示"><IconFont style={{paddingLeft:6,fontSize:16,position:'relative',top:1}} type='iconshuoming' /></Tooltip></>,
- const {isGatherCenter} = record;
- return isGatherCenter != 1?<Switch checked={number} size='small' onChange={(bool)=>{
- }} />:<></>
- const { isGatherCenter } = record;
- return isGatherCenter == 1 ? [
- <UpDataActBtn key={'act'} record={record} type='ADDCHILD' />,
- <UpDataActBtn key={'act1'} record={record} type='EDIT' />,
- <UpDataActBtn key={'act2'} record={record} type='EDIT' />,
- const { filter } = params;
- const resp = await getResponsibilityCenterList({ ...params });
- const result = searchTree(renameChildListToChildren(resp.list, 'child'), filter);
- data = result
- data: data,
- type == 'ADDCHILD' && (id = formVal.id);
- const { isDefault = 0, selectedSharelevel } = formVal;
- const result = {responsibilityType:1,...formVal, shareName: selectedSharelevel ? selectedSharelevel.shareName : '', shareId: selectedSharelevel ? selectedSharelevel.id : 0, shareLevel: selectedSharelevel ? selectedSharelevel.leverSort : 0, isDefault, id, selectedSharelevel: null };
- const { responsibilityLevel = 0, selectedSharelevel, shareId } = formVal;
- if (!selectedSharelevel) {
- body = {responsibilityType:1, ...formVal }
- body = {responsibilityType:1, ...formVal, shareId: selectedSharelevel.id, shareName: selectedSharelevel.shareName, shareLevel: selectedSharelevel.leverSort, selectedSharelevel: null }
- title={`${type == 'EDIT' ? '编辑' : '新增'}责任中心`}
- } : { selectedSharelevel: 0,sort:0 }}
- <ProFormText name='selectedSharelevel' hidden />
- message: '请选择是否为汇总中心',
- label: '否',
- name="isGatherCenter"
- label="是否汇总中心"
- label="责任中心名"
- message: '责任中心名是必填项',
- name="responsibilityName"
- label="责任中心编码"
- message: '责任中心编码是必填项',
- name="responsibilityCode"
- <ProFormDependency name={['isGatherCenter']}>
- ({ isGatherCenter }) => {
- return isGatherCenter == 2 ? (
- message: '请选择是否默认责任中心',
- name="isDefault"
- label="是否默认责任中心"
- return isGatherCenter != 1 && (
- message: '请选择责任类别',
- label: '收益中心',
- label: '成本(费用)中心',
- label: '半收益中心',
- name="responsibilityType"
- label="选择责任类别"
- message: '请选择分摊级别',
- onChange: (val) => {
- const needItem = selectableLevelList.filter((item: any) => item.leverSort == val);
- console.log({needItem});
- if (formRef.current) {
- formRef.current.setFieldsValue({ selectedSharelevel: needItem[0] })
- const resp = await getApportionmentLevelListNoPage();
- selectableLevelList = resp.list;
- return resp.list.map((item: any) => ({ label: `级别${item.leverSort}-${item.shareName}`, value: item.leverSort }))
- name='shareLevel'
- label="选择分摊级别"
- message: '请选择标准分级',
- const resp = await getStandardShareLevelReq();
- name="standardShareLevel"
- label="标准分级"
- message: '请选择责任中心类型',
- const resp = await getResponsibilityTypeReq();
- label="责任中心类型"
- label="顺序号"
- message: '顺序号是必填项',
- <KCIMPagecontainer className='ResponsibilityCenter' title={false}>
- <Input placeholder={'责任中心编码/名称'} allowClear autoComplete='off'
- <KCIMTable columns={columns as ProColumns[]} scroll={{x:1500, y: 'calc(100vh - 232px)' }} actionRef={tableRef} rowKey='responsibilityCode' params={tableDataFilterParams} request={(params) => getTableData(params)} />
@@ -1,97 +0,0 @@
- * @LastEditTime: 2024-05-17 13:57:28
-export const getResponsibilityCenterList = (params?:any) => {
- return request('/costAccount/responsibility/list', {
-//获取分摊层级列表无分页
-export const getApportionmentLevelListNoPage = () => {
-//获取标准分摊层级
-export const getStandardShareLevelReq = () => {
- return request('/costAccount/responsibility/getStandardShareLevel', {
-//获取责任中心类型
-export const getResponsibilityTypeReq = () => {
- return request('/costAccount/responsibility/getResponsibilityType', {
- description:string
- return request('/costAccount/responsibility/save', {
- return request('/costAccount/responsibility/edit', {
- return request('/costAccount/responsibility/delete', {
@@ -1,56 +0,0 @@
-.ResponsibilityCenter {
- .import,.export {
@@ -1,235 +0,0 @@
- * @LastEditTime: 2024-09-09 10:52:35
-import { Input, message, Modal, Tag } from 'antd';
-import { getResponsibilityCenterConnectList, saveResponsibilityCenterConnected } from './service';
-import { downloadTemplateReq, renameChildListToChildren } from '@/utils/tooljs';
-import { searchTree } from '../responsibilityCenter';
-const transferTableColumn:ProColumns[] = [
- dataIndex: 'departmentName',
- return record.departmentCode?`${text}(${record.departmentCode})`:text
-export default function ResponsibilityCenterConnect() {
- renderText(_,record) {
- const { isDefault, responsibilityName } = record;
- return isDefault == 1 ? <Tag>{`${responsibilityName}(是)`}</Tag> : responsibilityName
- dataIndex: 'responsibilityId',
- title: '部门列表',
- dataIndex: 'departments',
- if (Array.isArray(_)) {
- return _.map((item, index) => { return <Tag key={index}>{item.departmentName}</Tag> })
- return ''
- const {isGatherCenter } = record;
- return isGatherCenter==2 ? [
- key="1"
- addConnectDepartments(record);
- 绑定科室
- ]:[]
- const resp = await getResponsibilityCenterConnectList({...params});
- const result = searchTree(renameChildListToChildren(resp.list, 'child'),filter);
- const onSaveHandle = async (keys:Key[],rows:any[]) => {
- const {responsibilityId} = currentRow;
- const resp = await saveResponsibilityCenterConnected({responsibilityId,departmentIds:keys});
- const addConnectDepartments = (record: any) => {
- title: `选择科室`,
- onSave={onSaveHandle}
- <KCIMPagecontainer className='ResponsibilityCenterConnect' title={false}>
- <div className='toolBar' style={{marginBottom:16}}>
- <div style={{ }}>
- <KCIMTable columns={columns as ProColumns[]} scroll={{y:'calc(100vh - 232px)'}} actionRef={tableRef} rowKey='responsibilityId' params={tableDataFilterParams} request={(params) => getTableData(params)} />
@@ -1,39 +0,0 @@
- * @LastEditTime: 2023-12-07 14:50:05
-export const getResponsibilityCenterConnectList = (params?:any) => {
- return request('/costAccount/centerDepartment/list', {
-export const getResponsibilityCenterConnectableList = (params:any) => {
- return request('/costAccount/costresponsibilitydepartment/getById', {
-export const saveResponsibilityCenterConnected = (body:any) => {
- return request('/costAccount/centerDepartment/save', {
-.ResponsibilityCenterConnect {
@@ -1,1069 +0,0 @@
-import { tableColumnsWidObj } from "@/constant";
-import { formatMoneyNumber, formatToPercentage } from "@/utils/format";
-import { Popover } from 'antd'
-import React from "react";
-export const unitPersonnelCostCalc: ProColumns[] = [
- title: '人事分类名称',
- title: '实际编制人数',
- dataIndex: 'empNum',
- title: '实际总工时',
- dataIndex: 'actualHour',
- title: '预计总工时',
- dataIndex: 'expectHour',
- title: '总成本',
- dataIndex: 'totalCost',
- title: '人均成本',
- dataIndex: 'avgCost',
- title: '每分钟成本',
- dataIndex: 'minuteCost',
-export const chargeItemCostCalc: ProColumns[] = [
- title: '收费项目编码',
- width: '20%'
- title: '项目类别',
- dataIndex: 'itemType',
- title: '药品收入',
- dataIndex: 'drugIncome',
- title: '材料收入',
- dataIndex: 'materialIncome',
- title: '项目收入',
- dataIndex: 'itemIncome',
- title: '药品成本',
- dataIndex: 'drugCost',
- title: '材料成本',
- dataIndex: 'materialCost',
- title: '项目成本',
- dataIndex: 'itemCost',
- title: '人力成本',
- dataIndex: 'empCost',
- title: '设备成本',
- dataIndex: 'equipmentCost',
- title: '空间成本',
- dataIndex: 'spaceCost',
-export const patientCostCalc: ProColumns[] = [
- title: '住院号/门诊号',
- dataIndex: 'visitNo',
- title: '病人ID',
- dataIndex: 'patientNo',
- title: '患者姓名',
- title: '科室代码',
- dataIndex: 'departmentCode',
-export const diseaseCostCalculation: ProColumns[] = [
- title: '病种代码',
- title: '病种名称',
-export const DRG_DIPCostCalc: ProColumns[] = [
- title: '分组代码',
- title: '分组名称',
- width: '18%',
-export const clinicalPathway: ProColumns[] = [
- title: '路径代码',
- title: '路径名称',
- width: '20%',
-export const medicalOrderItem: ProColumns[] = [
- title: '医嘱项目编码',
- title: '医嘱项目名称',
- width: '18%'
-export const medicalMaterialCostCalc: ProColumns[] = [
- title: '责任中心代码',
- width: '10%'
- width: '30%'
-export const beforeCollectionSearch: ProColumns[] = [
- dataIndex: 'productCodeName',
- title: '会计科目',
- dataIndex: 'accountCodeName',
- width: 130,
- return <div style={{paddingRight:30,textAlign:'right'}}>{formatMoneyNumber(num)}</div>
- title: '开单科室',
- dataIndex: 'openDepartmentCodeName',
- title: '开单责任中心',
- dataIndex: 'openResponsibilityCodeName',
- dataIndex: 'startDepartmentCodeName',
- title: '执行责任中心',
- dataIndex: 'startResponsibilityCodeName',
-export const incomeCollection: ProColumns[] = [
- title: '年份',
- dataIndex: 'year',
- title: '月份',
- dataIndex: 'month',
- title: '金额',
-export const afterCollectionSearch: ProColumns[] = [
- width: tableColumnsWidObj.year
- width: tableColumnsWidObj.month
- title: '科室编码',
- width: tableColumnsWidObj.departmentName,
- width: tableColumnsWidObj.responsibilityCenterCode,
- width: tableColumnsWidObj.responsibilityCenter,
- title: '成本项目编码',
- title: '成本项目名',
-export const beforeCostShareSearch: ProColumns[] = [
- const { productCode, productName } = record;
- return `[${productCode}]${productName}`
- const { accountCode, accountName } = record;
- return `[${accountCode}]${accountName}`
- return <div style={{textAlign:'right',paddingRight:'30%'}}>{formatMoneyNumber(num)}</div>
- dataIndex: 'departName',
- const { departCode, departName } = record;
- return `[${departCode}]${departName}`
- const { responsibilityCode, responsibilityName } = record;
-export const costShare: ProColumns[] = [
- align:'left',
- return <div style={{textAlign:'right'}}>{formatMoneyNumber(num)}</div>
- title: '是否分摊',
- dataIndex: 'isAllocation',
- render: bool => bool ? '已分摊' : '未分摊'
-export const afterCostShareSearch: ProColumns[] = [
- // title: '年份',
- // dataIndex: 'dateYear',
- // width: tableColumnsWidObj.year
- // title: '月份',
- // dataIndex: 'dateMonth',
- // width: tableColumnsWidObj.month
- title: '分摊层级',
- dataIndex: 'levelSort',
- dataIndex: 'levelName',
- width:220,
-export const departmentCostCalculate: ProColumns[] = [
- title: '报表项目编码',
- width: '10%',
- dataIndex: 'reportNum',
- dataIndex: 'percentName',
-export const wholeHospCostCalculate: ProColumns[] = [
- title: '报表项目',
- return description ? <Popover content={()=><div dangerouslySetInnerHTML={{__html:description}} />}><span style={{ cursor: 'pointer' }}>{text}</span><IconFont className="hover-icon" style={{ fontSize: 16, color: '#17181a', paddingLeft: 4, position: 'relative', top: 1 }} type={'iconshuoming'} /></Popover> : text
- const { children,calcType } = record;
- // 有 children 时返回 null,否则格式化金额
- return (children && children.length > 0 && calcType == '0' )? <React.Fragment></React.Fragment> : formatMoneyNumber(num);
- // 有 children 时返回 null,否则格式化百分比
- return (children && children.length > 0 && calcType == '0') ? <React.Fragment></React.Fragment> : formatToPercentage(num);
- // title: '说明',
- // dataIndex: 'description',
- // renderText(text,record) {
- // const {children} = record;
- // return (children&&children.length>0)?<React.Fragment></React.Fragment>:text;
-export const costShareReportTable: ProColumns[] = [
- title: '分摊报表名称',
- dataIndex: 'shareReportName',
- title: '分摊时间',
- dataIndex: 'shareTime',
-export const departmentOperatingReport: ProColumns[] = [
- dataIndex: 'dateYear',
- dataIndex: 'dateMonth',
- title: '报表类型',
- dataIndex: 'fileType',
- title: '报表名称',
- dataIndex: 'fileName',
- title: '更新时间',
- width: 180,
- dataIndex: 'updateTime',
-export const wholeHospOperatingReport: ProColumns[] = [
-export const projectShareParamsCalc: ProColumns[] = [];
-// export const projectCostCalc: ProColumns[] = [
-// {
-// title: '责任中心编码',
-// dataIndex: 'responsibilityCode',
-// width:tableColumnsWidObj.responsibilityCenterCode
-// },
-// title: '责任中心名称',
-// dataIndex: 'responsibilityName',
-// width:tableColumnsWidObj.responsibilityCenter
-// title: '收费项目编码',
-// dataIndex: 'code',
-// title: '收费项目名称',
-// dataIndex: 'name',
-// title: '项目分类',
-// dataIndex: 'itemTypeName',
-// title: '项目成本',
-// dataIndex: 'itemCost',
-// title: '人事成本',
-// dataIndex: 'empCost',
-// title: '设备成本',
-// dataIndex: 'equipmentCost',
-// title: '空间成本',
-// dataIndex: 'spaceCost',
-// title: '公共费用分摊',
-// dataIndex: 'publicShareCost',
-// title: '管理费用分摊',
-// dataIndex: 'managerShareCost',
-// }
-// ];
@@ -1,408 +0,0 @@
- * @Date: 2023-11-01 11:13:38
- * @LastEditTime: 2024-06-28 14:29:20
- * @FilePath: /CostAccountingSys/src/pages/costAccounting/calcPageTemplate/config.ts
-import { KcimCenterSysId } from "@/constant";
-import { getAccountingSubjectList } from "@/pages/baseSetting/accountingAccountSet/accountingSubMana/service";
-import { getResponsibilityCenterList } from "@/pages/baseSetting/responsibilityCenterSet/responsibilityCenter/service";
-import { getTargetDic } from "@/services/auth";
-import { getDicDataBySysId } from "@/services/getDic";
-import { getCostProjecttList } from "./service";
-export const unitPersonnelCostCalcFilterConf = [
- type:'input',
- label:'检索:',
- placeholder:'人事分类',
- key:'filter'
-export const patientCostCalcFilterConf = [
- label:'科室名称:',
- placeholder:'请输入',
- key:'departmentName'
- label:'患者姓名:',
- key:'patientName'
-export const chargeItemCostCalcFilterConf = [
- type:'select',
- label:'项目类别:',
- key:'itemType',
- const resp = await getTargetDic('CHARGE_ITEM_TYPE');
- return dataVoList.map((a:any) => ({ label: a.name, value: a.code }));
- placeholder:'请输入收费项目名称',
- key:'itemName'
-export const diseaseCostCalculationFilterConf = [
- label:'病种名称:',
- key:'diseaseName'
-export const DRG_DIPCostCalcFilterConf = [
- label:'分组名称:',
- key:'groupName'
-export const clinicalPathwayFilterConf = [
- label:'路径名称:',
- key:'clinicalName'
-export const medicalOrderItemFilterConf = [
- label:'医嘱项目名称:',
- key:'orderName'
-export const beforeCollectionSearchFilterConf = [
- type:'cascader',
- label:'执行责任中心:',
- placeholder:'请选择',
- key:'responsibilityCode',
- const resp = await await getResponsibilityCenterList({pageSize:500});
- label:'成本项目:',
- key:'productCode',
- const resp = await getCostProjecttList({pageSize:500});
- return resp.list.map((a:any) => ({ label: a.productName, value: a.productCode }));
-export const afterCollectionSearchFilterConf = [
- label:'责任中心:',
-export const beforeCostShareSearchFilterConf = [
- label:'会计科目(支出):',
- key:'accountCode',
- const resp = await getAccountingSubjectList({pageSize:500,current:1,accountType:2});
- return resp.list.map((a:any) => ({ label: a.accountingName, value: a.accountingCode }));
-export const afterCostShareSearchFilterConf = [
-export const departmentCostCalculateFilterConf = [
-export const medicalMaterialCostCalcFilterConf = [
- placeholder:'项目代码/名称',
-export const projectShareParamsCalcFilterConf = [
- label:'项目分类:',
- const resp = await getDicDataBySysId(KcimCenterSysId,'MED_SERVICE_ITEM_TYPE');
- return resp.dataVoList.map((a:any) => ({ label: a.name, value: a.code }));
- key:'responsibility',
- key:'itemFilter'
-export const projectCostCalcFilterConf = [
-export const PatientItemCalcFilterConf = [
- key:'departmentFilter'
- label:'患者名称:',
- key:'patientFilter'
-export const standardItemCostCalcFilterConf = [
- label:'收费项目:',
- placeholder:'收费项目代码/名称',
-export const patientStandItemCostCalcFilterConf = [
-export const standItemShareCostCalcFilterConf = [
@@ -1,942 +0,0 @@
- * @LastEditTime: 2024-10-29 14:29:21
-import { DatePicker, Input, Modal, message, Table, Button, Popconfirm } from 'antd';
-import { calculateReq, cancelAllocation, cancelIncomeCollection, downloadTemplateReq, generateReportHandle, getAfterCostShareSearchTableData, getAfterIncomeCollectionTableData, getCalcPageTableData, startAllocation, startIncomeCollection } from './service';
-import { ActionType, ProColumns, ProFormCascader, ProFormSelect } from '@ant-design/pro-components';
-import { formatMoneyNumber, formatToPercentage } from '@/utils/format';
-import { afterCollectionSearch, afterCostShareSearch, beforeCollectionSearch, beforeCostShareSearch, chargeItemCostCalc, clinicalPathway, costShare, costShareReportTable, departmentCostCalculate, departmentOperatingReport, diseaseCostCalculation, DRG_DIPCostCalc, incomeCollection, medicalMaterialCostCalc, medicalOrderItem, patientCostCalc, projectShareParamsCalc, unitPersonnelCostCalc, wholeHospCostCalculate, wholeHospOperatingReport } from './columns';
-import { afterCollectionSearchFilterConf, afterCostShareSearchFilterConf, beforeCollectionSearchFilterConf, beforeCostShareSearchFilterConf, chargeItemCostCalcFilterConf, clinicalPathwayFilterConf, departmentCostCalculateFilterConf, diseaseCostCalculationFilterConf, DRG_DIPCostCalcFilterConf, medicalMaterialCostCalcFilterConf, medicalOrderItemFilterConf, patientCostCalcFilterConf, PatientItemCalcFilterConf, patientStandItemCostCalcFilterConf, projectCostCalcFilterConf, projectShareParamsCalcFilterConf, standardItemCostCalcFilterConf, standItemShareCostCalcFilterConf, unitPersonnelCostCalcFilterConf } from './config';
-import ProgressModal from '@/components/ProgressModal';
-import ExportProgressModal from '@/pages/reportExport/report/ExportProgressModal';
-import exportTableToExcel from '@/utils/tableToExcel';
-import { useAccess, useParams } from '@umijs/max'
-import { getParamsDataBySysId } from '@/services/getDic';
-const calTypeStr = `ITEM_COST_CALCULATE${(new Date()).getTime()}`;
-let currentPage = 0;
-let totalTableData: any[] = [];
-function transformChildToChildren(data: any[]) {
- return data.map(item => {
- let newItem = { ...item };
- // 如果有子项,将 'child' 属性改为 'children'
- if (newItem.child) {
- newItem.children = transformChildToChildren(newItem.child);
- delete newItem.child; // 删除原始的 'child' 属性
- return newItem;
-export default function calcPageTemplate() {
- const [tableDataFilterParams, set_tableDataFilterParams] = useState<any>({ computeDate });
- const [loading, set_loading] = useState(false);
- const params = useParams();
- const [columns, set_columns] = useState<ProColumns[]>([]);
- const [filterConf, set_filterConf] = useState<any[]>([]);
- const [scrollX, set_scrollX] = useState(500);
- const [ifShowCalcBtn, set_ifShowCalcBtn] = useState(true);
- const [totalCount, set_totalCount] = useState<undefined | number>(undefined);
- const [inputValues, setInputValues] = useState<{ [key: string]: any }>({});
- const [btnAccessStr, set_btnAccessStr] = useState<undefined | string>(undefined);
- const access = useAccess();
- const [isModalVisible, setIsModalVisible] = useState(false);
- const [openProcessModal, set_openProcessModal] = useState(false);
- const [allParentsKeys, set_allParentsKeys] = useState<any[]>([]);
- const resp = await getCalcPageTableData({ ...params, ...tableDataFilterParams });
- if (params.calcPageKey == 'projectShareParamsCalc' || params.calcPageKey == 'projectCostCalc' || params.calcPageKey == 'patientItemCalc' || params.calcPageKey == 'standardItemCostCalc' || params.calcPageKey == 'patientStandItemCostCalc' || params.calcPageKey == 'standItemShareCostCalc') {
- const { pageData: { list = [], pageSize, totalCount, totalPage }, title } = resp;
- const columns: ProColumns[] = title.map((item: any, index: number) => {
- title: item.name,
- dataIndex: `${item.code}`,
- key: `${item.code}`,
- // width: getStringWidth(item.name, '14px'),
- fixed: item.freeze ? true : false,
- hideInTable: item.hide,
- align: item.dataType == 3 ? 'right' : 'left',
- sorter: item.sortStatus ? (a: any, b: any) => {
- if (item.dataType == 3) {
- //数值
- return b[`${item.code}`] - (a[`${item.code}`]);
- return b[`${item.code}`]?.localeCompare(a[`${item.code}`]);
- } : undefined,
- set_columns([...columns]);
- const data = list.map((item: any) => {
- let rowData: { [key: string]: any } = {};
- item.forEach((b: any) => {
- const needTitle = title.filter((a: any) => a.code == b.code);
- if (needTitle.length > 0) {
- rowData[`${needTitle[0].code}`] = b.value
- return { ...item, ...rowData, id: Math.random(), columns }
- total: totalCount,
- pageSize: pageSize,
- totalPage: totalPage,
- let data = (resp.list && resp.list != null) ? resp.list : (Array.isArray(resp) ? resp : []);
- if (params.calcPageKey == 'unitPersonnelCostCalc') {
- data = data ? data.map((a: any) => ({ ...a, children: a.childList })) : []
- if (params.calcPageKey == 'wholeHospCostCalculate') {
- data = data ? transformChildToChildren(data) : [];
- set_dataSource(data);
- if (params.calcPageKey == 'beforeCollectionSearch' || params.calcPageKey == 'beforeCostShareSearch' || params.calcPageKey == 'afterCostShareSearch' || params.calcPageKey == 'afterCollectionSearch') {
- const { totalAmount = 0 } = resp;
- set_totalCount(totalAmount);
- set_totalCount(undefined);
- data,
- } catch (err) {
- console.log({ err })
- [`${paramName}`]: inputValues[`${paramName}`]
- const calcFunc = () => {
- if (params.calcPageKey != 'chargeItemCostCalc') {
- set_loading(true);
- const resp = await calculateReq(computeDate, params.calcPageKey);
- set_loading(false);
- if (params.calcPageKey == 'chargeItemCostCalc') {
- a();
- const a = async () => {
- setIsModalVisible(true);
- const resp = await calculateReq(computeDate, params.calcPageKey, calTypeStr);
- setIsModalVisible(false);
- const generateFilterItems = (configs: any[]) => {
- const nodes = configs.map((item: any) => {
- const { type, key, label, placeholder, request } = item;
- if (type == 'input') {
- <span className='label' style={{ whiteSpace: 'nowrap' }}>{label}</span>
- <Input placeholder={`${placeholder}`} allowClear autoComplete='off'
- <IconFont type="iconsousuo" style={{ color: '#99A6BF' }} onClick={() => tableDataSearchHandle(`${key}`)} />
- value={inputValues[`${key}`] || ''}
- setInputValues(prevValues => ({
- ...prevValues,
- [key]: e.target.value
- [`${key}`]: ''
- [`${key}`]: ((e.target) as HTMLInputElement).value
- if (type == 'select') {
- <div className='filterItem' style={{ marginLeft: 16 }}>
- <span className='label'>{label}</span>
- const arr = await request();
- if (arr) return arr
- set_tableDataFilterParams({ ...tableDataFilterParams, [`${key}`]: value })
- if (type == 'cascader') {
- const resp = await request();
- onChange(value: any, option: any) {
- set_tableDataFilterParams({ ...tableDataFilterParams, [`${key}`]: value ? value[value.length - 1] : null })
- return nodes;
- const optionBtnGroupshandle = async (isCollection: boolean, record: any) => {
- if (params.calcPageKey == 'incomeCollection') {
- const { year, month } = record;
- if (isCollection) {
- const resp = await cancelIncomeCollection({ year, month });
- content: '收入归集操作会覆盖已有的归集后数据,确定要继续操作?',
- const resp = await startIncomeCollection({ year, month });
- if (params.calcPageKey == 'costShare') {
- if (!isCollection) {
- //开始分摊
- content: '成本分摊操作会覆盖已有的分摊后数据,确定要继续操作?',
- const resp = await startAllocation({ year, month });
- //撤销分摊
- const resp = await cancelAllocation({ year, month });
- if (resp) message.success('操作成功!');
- const openDataTable = async () => {
- const { responsibilityCode = null } = tableDataFilterParams;
- let resp: any = undefined;
- if (params.calcPageKey == 'afterCostShareSearch') {
- resp = await getAfterCostShareSearchTableData(
- { year: `${computeDate}-01`, responsibilityCode }
- if (params.calcPageKey == 'afterCollectionSearch') {
- resp = await getAfterIncomeCollectionTableData(
- { ...params, date: `${computeDate.replace(/-/g, '')}` }
- const { titleMap = {}, realData = [], totalMap = {} } = resp;
- const titleMapToArr = Object.entries(titleMap);
- const totalMapToArr = Object.entries(totalMap);
- const columns = [...titleMapToArr].map((item, index) => {
- if (index == 0 || index == [...titleMapToArr].length - 1) {
- title: item[1],
- key: item[0],
- dataIndex: item[0],
- fixed: index == 0 ? 'left' : 'right',
- title: '报表数据',
- icon: '',
- scroll={{ x: (columns.length) * 150, y: 450 }}
- columns={columns as ProColumns[]}
- dataSource={[...realData]}
- pagination={false}
- summary={() => (
- <Table.Summary fixed >
- <Table.Summary.Row className="rowCell">
- {/* <Table.Summary.Cell className="firstCell" index={0}>合计</Table.Summary.Cell> */}
- totalMapToArr.map((item, index) => {
- <Table.Summary.Cell key={index} className={index == totalMapToArr.length - 1 ? 'ant-table-cell ant-table-cell-fix-right ant-table-cell-fix-right-last' : 'cell'} index={index}>{item[1] as any}</Table.Summary.Cell>
- </Table.Summary.Row>
- </Table.Summary>
- console.log({ err });
- const generateReport = async () => {
- // {date:computeDate,reportType:0}
- if (params.calcPageKey == 'departmentOperatingReport') {
- const resp = await generateReportHandle({ date: `${computeDate}-01`, reportType: 0 }, '/costAccount/costdepartmentprofit/getDepartProfitReport');
- if (params.calcPageKey == 'wholeHospOperatingReport') {
- const resp = await generateReportHandle({ date: `${computeDate}-01`, reportType: 0 }, '/costAccount/hospProfitAndLoss/report');
- if (params.calcPageKey == 'costShareReportTable') {
- const handleCompletion = () => {
- const handleExportCompletion = () => {
- currentPage = 0;
- set_openProcessModal(false);
- exportHandle(params.calcPageKey == 'wholeHospCostCalculate' ? 'reportName' : undefined);
- const exportHandle = (indentColumn?: string) => { // 将 indentColumn 设置为可选参数
- let headers: { [key: string]: any } = {};
- let data: any[] = [];
- // 生成表头
- columns.forEach(a => {
- headers[`${a.dataIndex}`] = a.title;
- // 递归处理数据,支持嵌套的 children,并为指定列添加缩进
- const processData = (items: any[], level: number = 0) => {
- items.forEach(item => {
- let _temp: { [key: string]: any } = {};
- Object.keys(headers).forEach(key => {
- if (indentColumn && key === indentColumn) { // 检查是否需要缩进
- // 使用 Unicode 不可见空格来缩进
- _temp[`${key}`] = `${'\u00A0'.repeat(level * 4)}${item[`${key}`]}`; // 使用4个不可见空格字符缩进
- } else if (item.children && item.children.length > 0 && (params.calcPageKey != 'wholeHospCostCalculate')) {
- // 如果有 children,返回空字符串来保持 Excel 也为空
- _temp[`${key}`] = '';
- if (key == 'amount') {
- _temp[`${key}`] = (item[`${key}`] != undefined||item[`${key}`] != null) ? formatMoneyNumber(item[`${key}`]) : item[`${key}`];
- if (key == 'percent') {
- _temp[`${key}`] = (item[`${key}`] != undefined||item[`${key}`] != null) ? formatToPercentage(item[`${key}`]) : item[`${key}`];
- _temp[`${key}`] = item[`${key}`];
- data.push(_temp);
- // 递归处理子项,增加缩进层级
- if (item.children && item.children.length > 0) {
- processData(item.children, level + 1);
- // 开始处理数据
- processData(totalTableData);
- // 导出数据到 Excel
- exportTableToExcel(data, columns as any[], params.calcPageKey == 'wholeHospCostCalculate' ? '全院损益报表' : '项目成本计算');
- // 清空当前页和总数据
- totalTableData = [];
- const fetchExportData = async () => {
- currentPage = currentPage + 1;
- const resp: any = await getTableData({ ...tableDataFilterParams, current: currentPage, pageSize: 100 });
- const { total = 0, data } = resp;
- totalTableData = [...totalTableData, ...data];
- currentCount: totalTableData.length,
- totalCount: total,
- return { currentCount: 0, totalCount: 0 };
- const getIfshowPercent = async ()=>{
- const {systemId} = JSON.parse(localStorage.getItem('currentSelectedTab') as string)
- const resp = await getParamsDataBySysId(systemId,'1851077044079824896');
- return resp.value == '1'?true:false
- setInputValues({});
- const { calcPageKey } = params;
- if (calcPageKey == "chargeItemCostCalc") {
- set_columns(chargeItemCostCalc);
- set_filterConf(chargeItemCostCalcFilterConf);
- set_ifShowCalcBtn(true);
- set_scrollX(1500);
- if (calcPageKey == "standardItemCostCalc") {
- set_filterConf(standardItemCostCalcFilterConf);
- if (calcPageKey == "patientStandItemCostCalc") {
- set_filterConf(patientStandItemCostCalcFilterConf);
- if (calcPageKey == "standItemShareCostCalc") {
- set_filterConf(standItemShareCostCalcFilterConf);
- if (calcPageKey == "patientItemCalc") {
- set_filterConf(PatientItemCalcFilterConf);
- if (calcPageKey == "patientCostCalc") {
- set_columns(patientCostCalc);
- set_filterConf(patientCostCalcFilterConf);
- if (calcPageKey == "unitPersonnelCostCalc") {
- set_columns(unitPersonnelCostCalc);
- set_scrollX(1000);
- set_filterConf(unitPersonnelCostCalcFilterConf);
- if (calcPageKey == "diseaseCostCalculation") {
- set_columns(diseaseCostCalculation);
- set_filterConf(diseaseCostCalculationFilterConf);
- if (calcPageKey == "DRG_DIPCostCalc") {
- set_columns(DRG_DIPCostCalc);
- set_filterConf(DRG_DIPCostCalcFilterConf);
- if (calcPageKey == "clinicalPathway") {
- set_columns(clinicalPathway);
- set_filterConf(clinicalPathwayFilterConf);
- if (calcPageKey == "medicalOrderItem") {
- set_columns(medicalOrderItem);
- set_filterConf(medicalOrderItemFilterConf);
- if (calcPageKey == "beforeCollectionSearch") {
- set_columns(beforeCollectionSearch);
- set_filterConf(beforeCollectionSearchFilterConf);
- set_ifShowCalcBtn(false);
- if (calcPageKey == "incomeCollection") {
- set_columns([...incomeCollection, {
- const { isCollection } = record;
- return <a style={{ fontSize: 14 }} onClick={() => {
- optionBtnGroupshandle(isCollection, record);
- }}>{isCollection ? '撤销归集' : '开始归集'}</a>
- set_filterConf([]);
- set_scrollX(600);
- if (calcPageKey == "afterCollectionSearch") {
- set_columns([...afterCollectionSearch]);
- set_filterConf(afterCollectionSearchFilterConf);
- set_scrollX(1300);
- if (calcPageKey == "beforeCostShareSearch") {
- set_columns([...beforeCostShareSearch]);
- set_filterConf(beforeCostShareSearchFilterConf);
- if (calcPageKey == "costShare") {
- set_columns([...costShare, {
- render: (_, record) => {
- const { isAllocation: isCollection } = record;
- return !isCollection?
- <a style={{ fontSize: 14 }} onClick={() => optionBtnGroupshandle(isCollection, record)}>{isCollection ? '撤销' : '分摊'}</a>
- :[
- title={`是否确认撤销?`}
- onConfirm={() => optionBtnGroupshandle(isCollection, record)}
- <a style={{ fontSize: 14 }}>{isCollection ? '撤销' : '分摊'}</a>
- if (calcPageKey == "afterCostShareSearch") {
- set_columns([...afterCostShareSearch]);
- set_filterConf(afterCostShareSearchFilterConf);
- if (calcPageKey == "medicalMaterialCostCalc") {
- set_columns([...medicalMaterialCostCalc]);
- set_filterConf(medicalMaterialCostCalcFilterConf);
- set_scrollX(1200);
- if (calcPageKey == "departmentCostCalculate") {
- set_columns([...departmentCostCalculate]);
- set_filterConf(departmentCostCalculateFilterConf);
- if (calcPageKey == "wholeHospCostCalculate") {
- getIfshowPercent().then((resp)=>{
- set_columns(resp?[...wholeHospCostCalculate]:[...(wholeHospCostCalculate.filter(a=>a.title != '占比'))]);
- const tabs = access.whatCanIDoInThisPage(location.pathname.replace('/CostAccountingSys', ''));
- const a = tabs.reduce((prev: any, cur: any) => `${prev},${cur.code}`, '');
- set_btnAccessStr(a);
- if (calcPageKey == "costShareReportTable") {
- set_columns([...costShareReportTable, {
- const { year, month, shareLevel, shareLevelId } = record;
- <a style={{ fontSize: 14 }} onClick={async () => {
- downloadTemplateReq('/costAccount/excel/getShareReportTemplate', { year, month, levelSort: shareLevel, shareLevelId });
- //const resp = await downloadReportHandle({ year, month, levelSort:shareLevel, shareLevelId });
- }}>下载</a>
- if (calcPageKey == "departmentOperatingReport") {
- set_columns([...departmentOperatingReport, {
- const { fileUrl = '' } = record;
- <a style={{ fontSize: 14 }} onClick={async () => window.open(fileUrl)}>下载</a>
- if (calcPageKey == "wholeHospOperatingReport") {
- set_columns([...wholeHospOperatingReport, {
- const { fileUrl } = record;
- window.open(fileUrl);
- if (calcPageKey == "projectShareParamsCalc") {
- set_filterConf([...projectShareParamsCalcFilterConf]);
- set_scrollX(1600);
- if (calcPageKey == "projectCostCalc") {
- set_filterConf([...projectCostCalcFilterConf]);
- set_ifShowCalcBtn(a.indexOf('calculate') != -1);
- set_tableDataFilterParams({ ...tableDataFilterParams, computeDate, calcPageKey, reportType: calcPageKey == 'wholeHospCostCalculate' ? 3 : tableDataFilterParams.reportType });
- }, [params]);
- <KCIMPagecontainer className="calcPageTemplate" title={false}>
- <ProgressModal
- title='计算进度'
- type={calTypeStr}
- onComplete={handleCompletion}
- visible={isModalVisible}
- <ExportProgressModal
- visible={openProcessModal}
- onCancel={() => set_openProcessModal(false)}
- fetchData={fetchExportData}
- onCompletion={handleExportCompletion}
- <div className="filter">
- <div className="filterItem">
- setInitialState((s: any) => ({ ...s, computeDate: dateString }));
- autoComplete='off'
- {generateFilterItems(filterConf)}
- {params.calcPageKey == 'wholeHospCostCalculate' && (
- {((params.calcPageKey == 'projectCostCalc' || params.calcPageKey == 'wholeHospCostCalculate') && btnAccessStr ? (btnAccessStr.indexOf('export') != -1) : false) && <a className='export' onClick={() => set_openProcessModal(true)}>导出</a>}
- {ifShowCalcBtn && <a className='calc' onClick={() => calcFunc()}>计算</a>}
- {(params.calcPageKey == 'afterCostShareSearch' || params.calcPageKey == 'afterCollectionSearch') && (<Button loading={loading} size='small' className='reportDataBtn' onClick={() => openDataTable()}>报表数据</Button>)}
- {(params.calcPageKey == 'departmentOperatingReport' || params.calcPageKey == 'wholeHospOperatingReport') && (<span className='reportDataBtn' onClick={() => generateReport()}>生成报表</span>)}
- columns={columns}
- actionRef={tableRef}
- rowKey="id"
- expandable={params.calcPageKey == 'wholeHospCostCalculate' ? {
- defaultExpandAllRows: true, expandedRowKeys: allParentsKeys,
- } : undefined}
- rowClassName={params.calcPageKey == 'wholeHospCostCalculate' ? ((record) => (record.children ? 'has-children hover-row' : 'hover-row')) : ''}
- scroll={{ x: scrollX, y: params.calcPageKey == 'afterCostShareSearch' ? `calc(100vh - 270px)` : `calc(100vh - 233px)` }}
- pagination={params.calcPageKey == 'wholeHospCostCalculate' ? false : undefined}
- totalCount != undefined && <a style={{ marginTop: 16, display: 'inline-block' }}>{`合计:${formatMoneyNumber(totalCount)}`}</a>
@@ -1,401 +0,0 @@
- * @LastEditTime: 2024-09-05 15:53:30
-import axios from 'axios';
-export const getCalcPageTableData = (params: any) => {
- const {calcPageKey,...next} = params;
- if(calcPageKey == 'unitPersonnelCostCalc'){
- return request('/costAccount/calculate/empCostCalculateList', {
- params:{...next}
- if(calcPageKey == 'patientCostCalc'){
- return request('/costAccount/calculate/patientCostCalculateList', {
- if(calcPageKey == 'chargeItemCostCalc'){
- return request('/costAccount/calculate/itemCostCalculateList', {
- if(calcPageKey == 'diseaseCostCalculation'){
- return request('/costAccount/calculate/diseaseCostCalculateList', {
- if(calcPageKey == 'DRG_DIPCostCalc'){
- return request('/costAccount/calculate/groupCostCalculateList', {
- if(calcPageKey == 'clinicalPathway'){
- return request('/costAccount/calculate/clinicalPathwayCostCalculateList', {
- if(calcPageKey == 'medicalOrderItem'){
- return request('/costAccount/calculate/orderCostCalculateList', {
- if(calcPageKey == 'beforeCollectionSearch'){
- return request('/costAccount/costincomegroup/list', {
- params:{...next,dateTime:next.computeDate,computeDate:null}
- if(calcPageKey == 'incomeCollection'){
- return request('/costAccount/incomeCollection/getCollections', {
- params:{...next,date:(next.computeDate).replace('-', ''),computeDate:null}
- if(calcPageKey == 'afterCollectionSearch'){
- return request('/costAccount/incomeCollection/collectList', {
- if(calcPageKey == 'beforeCostShareSearch'){
- return request('/costAccount/costcostinggroup/queryStartAllocation', {
- params:{...next,date:next.computeDate,computeDate:null}
- if(calcPageKey == 'costShare'){
- return request('/costAccount/costcostinggroup/allocationList', {
- params:{...next,date:`${next.computeDate}-01`,computeDate:null}
- if(calcPageKey == 'afterCostShareSearch'){
- return request('/costAccount/costcostinggroup/queryAfterAllocation', {
- params:{...next,year:`${next.computeDate}-01`,computeDate:null}
- if(calcPageKey == 'departmentCostCalculate'){
- return request('/costAccount/costdepartmentprofit/list', {
- if(calcPageKey == 'wholeHospCostCalculate'){
- return request('/costAccount/hospProfitAndLoss/getHospProfitList', {
- params:{...next,computeDate:`${next.computeDate}-01`}
- if(calcPageKey == 'costShareReportTable'){
- return request('/costAccount/costcostinggroup/afterAllocationFormList', {
- if(calcPageKey == 'wholeHospOperatingReport'){
- return request('/costAccount/hospProfitAndLoss/hospReports', {
- if(calcPageKey == 'departmentOperatingReport'){
- return request('/costAccount/departmentprofitfile/list', {
- if(calcPageKey == 'medicalMaterialCostCalc'){
- return request('/costAccount/calculate/drugMaterialCostCalculateList', {
- if(calcPageKey == 'projectShareParamsCalc'){
- return request('/costAccount/calculate/getShareParamCostList', {
- if(calcPageKey == 'projectCostCalc'){
- return request('/costAccount/calculate/getItemCostList', {
- if(calcPageKey == 'patientItemCalc'){
- return request('/costAccount/calculate/getPatientItemCostList', {
- if(calcPageKey == 'standardItemCostCalc'){
- return request('/costAccount/calculate/getStandItemCostList', {
- if(calcPageKey == 'patientStandItemCostCalc'){
- return request('/costAccount/calculate/getPatientStandItemCostList', {
- if(calcPageKey == 'standItemShareCostCalc'){
- return request('/costAccount/calculate/getStandShareParamCostList', {
-//计算
-export const calculateReq = (computeDate: string,calcPageKey: string | undefined,type?:string) => {
- return request('/costAccount/calculate/empCostCalculate', {
- params:{computeDate}
- return request('/costAccount/calculate/patientCostCalculate', {
- return request('/costAccount/calculate/computePatientItemCost', {
- return request('/costAccount/calculate/itemCostCalculate', {
- params:{computeDate,type}
- return request('/costAccount/calculate/diseaseCostCalculate', {
- return request('/costAccount/calculate/groupCostCalculate', {
- return request('/costAccount/calculate/clinicalPathwayCostCalculate', {
- return request('/costAccount/calculate/orderCostCalculate', {
- return request('/costAccount/costdepartmentprofit/setDepartmentProfit', {
- params:{date:`${computeDate}-01`}
- return request('/costAccount/hospProfitAndLoss/calc', {
- return request('/costAccount/calculate/drugMaterialCostCalculate', {
- return request('/costAccount/calculate/computeShareParamCost', {
- return request('/costAccount/calculate/computeItemCost', {
- return request('/costAccount/calculate/computeStandItemCost', {
- return request('/costAccount/calculate/computeStandPatientItemCost', {
- return request('/costAccount/calculate/computeStandShareParamCost', {
-//获取科室列表
- const {productName,current,pageSize} = params;
- name:productName,
- current,
- pageSize
-//开始归集
-export const startIncomeCollection = (params:any) => {
- const {year,month} = params;
- return request('/costAccount/incomeCollection/collect', {
- params:{year,month},
-//撤销归集
-export const cancelIncomeCollection = (body:any) => {
- const {year,month} = body;
- return request('/costAccount/incomeCollection/cancelCollect', {
- params:{year,month}
-//开始分摊
-export const startAllocation = (body:any) => {
- return request('/costAccount/costcostinggroup/startAllocation', {
-//撤销分摊
-export const cancelAllocation = (body:any) => {
- return request('/costAccount/costcostinggroup/cancelAllocation', {
- params:body,
-//获取报表数据列表
-export const getAfterCostShareSearchTableData = (params:any) => {
- return request('/costAccount/costcostinggroup/queryAfterAllocationForm', {
-//获取收入归集后报表数据列表
-export const getAfterIncomeCollectionTableData = (params:any)=> {
- return request('/costAccount/incomeCollection/collectDataForm', {
-//下载报表
-export const downloadReportHandle = (params:any) => {
- return request('/costAccount/excel/getShareReportTemplate', {
-//生成报表数据
-export const generateReportHandle = (params:any,path:string) => {
- return request(path, {
-//下载excel
-export const downloadTemplateReq = (pathStr: string,data:any) => {
- let path = `/gateway${pathStr}`;
- const userData = localStorage.getItem('userData');
- const { token = '' } = JSON.parse(userData as string);
- axios({
- method: 'get',
- url: path,
- responseType: 'blob',
- headers: { token },
- params:data
- .then(function (response) {
- //console.log({ 'chunk': response });
- const filename = decodeURI(response.headers["content-disposition"]);
- const objectUrl = URL.createObjectURL(
- new Blob([response.data], {
- type: 'application/vnd.ms-excel',
- const link = document.createElement('a')
- // 设置导出的文件名称
- link.download = `${filename}` + '.xls'
- link.style.display = 'none'
- link.href = objectUrl
- link.click()
- document.body.appendChild(link)
@@ -1,93 +0,0 @@
-.calcPageTemplate {
- .calc,
- .reportDataBtn,
- .export {
- .cost-ant-table-cell {}
@@ -1,369 +0,0 @@
- * @LastEditTime: 2024-10-15 15:29:44
-import { ActionType, ProFormDatePicker, ProFormDateTimePicker, ProFormInstance, ProFormText } from '@ant-design/pro-components';
-import { ModalForm, ProFormDependency, ProFormDigit, ProFormRadio, ProFormSelect, ProFormSwitch } from '@ant-design/pro-form'
-import { Input, message, Popconfirm, Form } from 'antd';
-import { Fragment, useEffect, useRef, useState } from 'react';
-import { addData, delData, editData, getDrugTableData, getDrugTypeReq, importDataPost } from './service';
-export default function DrugCostManagement() {
- const [stopStat,set_stopStat] = useState(0);
- title: '项目代码',
- width:100
- title: '项目名称',
- width:350,
- width:90
- title: '单价',
- dataIndex: 'price',
- return formatMoneyNumber(num)
- title: '成本',
- dataIndex: 'cost',
- title: '停用',
- renderText(stat) {
- return stat ? '是' : '否'
- const resp = await getDrugTableData({...params,stop:stopStat});
- ...formVal
- const resp = await editData({...result});
- title={`${type == 'EDIT' ? '编辑' : '新增'}药品`}
- } : {status:0}}
- name="code"
- label="项目代码:"
- rules={[{ required: true, message: '项目代码不能为空!' }]}
- label="项目名称:"
- rules={[{ required: true, message: '项目名称不能为空!' }]}
- label="项目类型:"
- const resp = await getDrugTypeReq();
- return resp.map((a:any)=>({label:a.name,value:a.code}))
- rules={[{ required: true, message: '项目类型不能为空!' }]}
- name="price"
- label="单价:"
- rules={[{ required: true, message: '单价不能为空!' }]}
- name="cost"
- label="成本:"
- rules={[{ required: true, message: '成本不能为空!' }]}
- <Form.Item style={{ width: 322 }} label={<span style={{}}><i style={{ fontSize: 14, color: '#FF4060', fontWeight: 400, position: 'relative', paddingRight: 4, paddingLeft: 4 }}>*</i>停用:</span>}>
- <div style={{ display: 'flex', flex: 1, flexDirection: 'row', justifyContent: 'space-between' }}>
- name="status"
- colProps={{ span: 10 }}
- value: 0
- value: 1
- {/* style={{position:'relative',left:-10}} */}
- <ProFormDependency name={['status']}>
- ({ status }) => {
- // console.log({report});
- status ? <ProFormDateTimePicker fieldProps={{locale}} name="stopTime" placeholder="请选择停用时间" rules={[{ required: true, message: '时间不能为空!' }]} colProps={{ span: 14 }} noStyle />:null
- await downloadTemplateReq('/costAccount/setting/exportDrug');
- // <Button
- // key="ok"
- // onClick={auditType == '0' ? () => downloadTemplate(index) : () => { }}
- // >
- // 下载模板
- // </Button>,
- <KCIMPagecontainer className='DrugCostManagement' title={false}>
- <span className='label' style={{ whiteSpace: 'nowrap' }}> 项目名称:</span>
- <span style={{paddingRight:16}}><ProFormSwitch noStyle fieldProps={{size:'small',onChange:(bool)=>{
- set_stopStat(bool ? 1 : 0);
- }}} /> 显示停用项目</span>
- <KCIMTable columns={columns as ProColumns[]} scroll={{y:`calc(100vh - 235px)`}} actionRef={tableRef} rowKey='id' params={tableDataFilterParams} request={(params) => getTableData(params)} />
@@ -1,110 +0,0 @@
- * @LastEditTime: 2023-11-08 16:17:15
-export type DrugTableDataType = {
- type:string,
- price:number,
- cost:number,
- stopTime:string
-export const getDrugTableData = (params?:any) => {
- list:DrugTableDataType[];
- }>('/costAccount/setting/getDrugList', {
-//获取药品类型
-export const getDrugTypeReq = () => {
- return request('/costAccount/setting/getDrugType', {
- return request('/costAccount/setting/addDrug', {
-//导入数据
- return request('/costAccount/setting/importDrug', {
- return request('/costAccount/setting/editDrug', {
- return request('/costAccount/setting/deleteDrug', {
@@ -1,55 +0,0 @@
-.DrugCostManagement {
- .import {
@@ -1,366 +0,0 @@
- * @LastEditTime: 2024-10-15 15:31:31
-import { ActionType, ProFormDateTimePicker, ProFormInstance, ProFormText } from '@ant-design/pro-components';
-import { addData, delData, editData, getEquipTableData, importDataPost } from './service';
-export default function EquipmentCostManagement() {
- title: '设备编码',
- title: '设备型号',
- dataIndex: 'type',
- title: '折旧年限',
- dataIndex: 'depreciationYear',
- title: '采购价格(元)',
- title: '每年折旧',
- dataIndex: 'costPerYear',
- dataIndex: 'costPerMinute',
- return num?'是':'否'
- const resp = await getEquipTableData({...params,stop:stopStat});
- title={`${type == 'EDIT' ? '编辑' : '新增'}设备`}
- label="设备编号:"
- rules={[{ required: true, message: '设备编号不能为空!' }]}
- label="设备名称:"
- rules={[{ required: true, message: '设备名称不能为空!' }]}
- label="设备型号:"
- label="购入价格:"
- rules={[{ required: true, message: '购入价格不能为空!' }]}
- name="depreciationYear"
- label="折旧年限:"
- rules={[{ required: true, message: '折旧年限不能为空!' }]}
- status ? <ProFormDateTimePicker fieldProps={{locale}} placeholder="请选择停用时间" name="stopTime" rules={[{ required: true, message: '时间不能为空!' }]} colProps={{ span: 14 }} noStyle />:null
- await downloadTemplateReq('/costAccount/setting/exportEquipment');
- <KCIMPagecontainer className='EquipmentCostManagement' title={false}>
- <span className='label' style={{ whiteSpace: 'nowrap' }}> 设备名称:</span>
- <KCIMTable scroll={{y:`calc(100vh - 233px)`}} columns={columns as ProColumns[]} actionRef={tableRef} rowKey='id' params={tableDataFilterParams} request={(params) => getTableData(params)} />
@@ -1,102 +0,0 @@
- * @LastEditTime: 2023-11-07 18:45:24
-export type EquipTableDataType = {
-export const getEquipTableData = (params?:any) => {
- list:EquipTableDataType[];
- }>('/costAccount/setting/getEquipmentList?', {
- return request('/costAccount/setting/addEquipment', {
- return request('/costAccount/setting/importEquipment', {
- return request('/costAccount/setting/editEquipment', {
- return request('/costAccount/setting/deleteEquipment', {
-.EquipmentCostManagement {
@@ -1,403 +0,0 @@
- * @LastEditTime: 2024-10-15 15:30:25
-import { addData, delData, editData, getDrugTableData, importDataPost } from './service';
-export default function MaterialCostManagement() {
- width:360
- } : { status: 0 }}
- label: '不计价材料',
- label: '高值材料',
- value: 2
- label: '低值材料',
- value: 3
- status ? <ProFormDateTimePicker fieldProps={{ locale }} name="stopTime" colProps={{ span: 14 }} placeholder="请选择停用时间" rules={[{ required: true, message: '时间不能为空!' }]} noStyle /> : null
- await downloadTemplateReq('/costAccount/setting/exportMaterial');
- console.log({tableDataFilterParams});
- }, [tableDataFilterParams])
- <KCIMPagecontainer className='MaterialCostManagement' title={false}>
- <div className='filterItem' style={{marginRight:16}} >
- <span className='label' style={{ whiteSpace: 'nowrap' }}> 项目类型:</span>
- <ProFormSelect noStyle placeholder={'请选择类型'}
- width={160}
- {label:'不计价材料',value:1},
- {label:'高值材料',value:2},
- {label:'低值材料',value:3}
- onChange:(value, option)=>{
- // set_tableDataFilterParams({
- // ...tableDataFilterParams,
- // itemType: value
- set_tableDataFilterParams((prevParams:any) => ({
- ...prevParams,
- itemType: value
- <span style={{ paddingRight: 16 }}><ProFormSwitch noStyle fieldProps={{ size: 'small', onChange: (bool) => {
- } }} /> 显示停用项目</span>
- * @LastEditTime: 2023-11-07 18:32:03
-export type MaterialTableDataType = {
- list:MaterialTableDataType[];
- }>('/costAccount/setting/getMaterialList', {
- return request('/costAccount/setting/addMaterial', {
- return request('/costAccount/setting/importMaterial', {
- return request('/costAccount/setting/editMaterial', {
- return request('/costAccount/setting/deleteMaterial', {
-.MaterialCostManagement {
@@ -1,590 +0,0 @@
- * @LastEditTime: 2024-08-16 10:29:24
-import { ActionType, arrayMoveImmutable, ProFormInstance, useRefFunction } from '@ant-design/pro-components';
-import { Dropdown, Input, MenuProps, message, Modal, Switch, Tooltip, Popconfirm } from 'antd';
-import { ColumnsType } from 'antd/es/table/interface';
-import { getLeftList, getClolumnTableData, addLeftList, editLeftList, editReportTbaleData, delLeftReportData, batchDelTableData, addReportTbaleData, delData, getEmpCostTypeDict, updateEmpInfo, importDataPost, generateTableData } from './service';
-var temp_dataSource: any[] = [];
-const PersonnelClassificationMana = () => {
- const [selectedRowKeys, set_selectedRowKeys] = useState<Key[]>([]);
- const [dataSource, setDataSource] = useState<any[]>([]);
- const [currentEditLeftData, set_currentEditLeftData] = useState<any | undefined>(undefined);
- const [ifEditTable, set_ifEditTable] = useState(true);
- title: '工号',
- title: '岗位',
- dataIndex: 'positionName',
- const [tableColumn, set_tableColumn] = useState<ProColumns[] | any[]>(column);
- const { costTypeCode } = params;
- if (costTypeCode) {
- const resp = await getClolumnTableData({ ...params });
- //获取左侧单元
- const getPageLeftReports = async () => {
- const resp = await getLeftList();
- const result = rows.map((a, index) => ({
- costTypeCode: _currentSelectedType.costTypeCode,
- userId: a.id,
- account: a.account,
- departmentCode: a.departmentCode,
- departmentName: a.departmentName,
- position: a.position,
- positionName: a.positionName
- const resp = await addReportTbaleData(result);
- const updateTable = async (formVal: any, type: 'EDIT' | "ADD" | 'ADD_LEFTDATA' | 'EDIT_LEFTDATA', data?: any[]) => {
- // console.log({formVal,type});
- if (type == 'ADD_LEFTDATA') {
- const resp = await addLeftList({
- //costTypeCode: formVal.costTypeCode,
- costTypeName: formVal.costTypeName,
- computeType: formVal.computeType.value,
- computeTypeName: formVal.computeType.label,
- description: formVal.description
- getPageLeftReports();
- if (type == 'EDIT_LEFTDATA') {
- const resp = await editLeftList({
- let newDataSource = data?.map((a: any, index: number) => {
- //更新排序
- return { ...a, sort: index + 1 }
- const resp = await editReportTbaleData(newDataSource);
- await downloadTemplateReq('/costAccount/setting/exportEmpType');
- const UpDataActBtn = ({ record, type }: { record: any, type: 'EDIT' | 'ADD' | 'ADD_LEFTDATA' | 'EDIT_LEFTDATA' }) => {
- const getTrriger = () => {
- return <span className='add'>新增</span>
- return <a key="edit" >编辑</a>
- <span className='add' >新增</span>
- title={type == 'ADD_LEFTDATA' ? `新增人事分类` : `编辑人事分类`}
- width={352}
- initialValues={type == 'EDIT_LEFTDATA' ? { ...record } : { computeTypeName: '' }}
- getTrriger()
- return updateTable(type == 'EDIT_LEFTDATA' ? { ...record, ...val } : val, type);
- label='人事分类名称:'
- name='costTypeName'
- rules={[{ required: true, message: '人事分类名称不能为空!' }]}
- {/* <ProFormText
- label='人事分类代码:'
- name='costTypeCode'
- rules={[{ required: true, message: '人事分类代码不能为空!' }]}
- label="子级类型:"
- const resp = await getEmpCostTypeDict();
- return resp.map((a: any) => ({ label: a.name, value: a.code }));
- // console.log({value,option})
- // const {label} = option;
- // console.log({label});
- // formRef.current?.setFieldValue('computeTypeName',label);
- rules={[{ required: true, message: '子集类型不能为空!' }]}
- label='说明:'
- name='description'
- const moreItems: MenuProps['items'] = [
- label: <UpDataActBtn key={'act'} record={currentEditLeftData} type='EDIT_LEFTDATA' />,
- <a onClick={async (e) => {
- e.preventDefault();
- const resp = await delLeftReportData(currentEditLeftData.id);
- const updatedSortArr = newData.map((item: any, index: number) => ({ ...item, sort: index }))
- // setDataSource([...updatedSortArr]);
- updateTable(undefined, 'EDIT', updatedSortArr)
- const updateEmpInfoHandle = async () => {
- const resp = await updateEmpInfo();
- message.success('更新成功!');
- const generateEmpHandle = ()=>{
- title:'注意',
- content:'生成操作会覆盖现有的人事分类及对应人员信息,确定要继续操作?',
- onOk:async (...args) => {
- const resp = await generateTableData();
- <UpDataActBtn key={'act'} record={undefined} type='ADD_LEFTDATA' />
- label: importData()
- set_tableDataFilterParams({ ...tableDataFilterParams, costTypeCode: currentSelectedType.costTypeCode });
- }, [currentSelectedType])
- _currentSelectedType = showTypeListArr[0];
- set_tableDataFilterParams({ ...tableDataFilterParams, costTypeCode: showTypeListArr[0].costTypeCode });
- if (ifEditTable) {
- set_tableColumn([...column])
- set_tableColumn(column);
- }, [ifEditTable]);
- <KCIMPagecontainer title={false} className='PersonnelClassificationMana'>
- title='添加单元人员信息'
- <Input placeholder={'人事分类'} allowClear autoComplete='off'
- <IconFont type="iconsousuo" />
- const result = typeList.filter(item => item.costTypeName.indexOf(e.target.value) != -1);
- <Dropdown menu={{ items }} placement="bottomLeft">
- <div className='add'>
- <img src={require('../../../../../static/addIcon_black.png')} alt="" />
- <div className={currentSelectedType ? currentSelectedType.id == item.id ? 'type on' : 'type' : 'type'}
- set_currentSelectedType(item)
- _currentSelectedType = item;
- <img className='icon' src={require('../../../../../static/reportIcon.png')} alt="" />
- <Tooltip title={item.costTypeName} >
- <div className='name'>{item.costTypeName}</div>
- <div className='sub'>{item.computeTypeName}</div>
- <Dropdown menu={{ items: moreItems }} placement="bottom" onOpenChange={(bool) => { bool && set_currentEditLeftData(item) }}>
- <Input placeholder={'输入工号,姓名'} allowClear autoComplete='off'
- <span className='update' onClick={() => generateEmpHandle()}>按人员类别生成</span>
- <span className='update' onClick={() => updateEmpInfoHandle()}>更新人员信息</span>
- {currentSelectedType && <KCIMTable actionRef={tableRef} columns={tableColumn}
- scroll={{y:`calc(100vh - 233px)`}}
-export default PersonnelClassificationMana;
@@ -1,148 +0,0 @@
- * @LastEditTime: 2024-03-21 11:16:06
-//获取左侧报表数据
-export const getLeftList = () => {
- return request('/costAccount/setting/getEmpCostType', {
-//获取人事分类计算类型
-export const getEmpCostTypeDict = () => {
- return request('/costAccount/setting/getEmpCostTypeDict', {
-//获取表格数据
-export type ClolumnTableDataType = {
-export const getClolumnTableData = (params:{costTypeCode:string}) => {
- return request('/costAccount/setting/getEmpCostMap', {
-export const getAddableTableData = (costType:string) => {
- return request('/costAccount/setting/getEmpInfo', {
- params:{costType}
-//新增左侧列表
-export const addLeftList = (data:any) => {
- return request('/costAccount/setting/addEmpCostType', {
-//编辑左侧列表
-export const editLeftList= (data:any) => {
- return request('/costAccount/setting/editEmpCostType', {
-export const addReportTbaleData = (data:any) => {
- return request('/costAccount/setting/addEmpCostMap', {
-//更新人员信息
-export const updateEmpInfo = () => {
- return request('/costAccount/setting/updateEmpMap', {
-export const editReportTbaleData = (data:any) => {
- return request('/costAccount/report/editReportColumn', {
- return request('/costAccount/setting/deleteEmpCostMap', {
-//删除左侧报表
-export const delLeftReportData = (id:number) => {
- return request('/costAccount/setting/deleteEmpCostType', {
- return request('/costAccount/setting/batchDeleteEmpCostMap', {
- return request('/costAccount//setting/importEmpType', {
-//按人员分类生成数据
-export const generateTableData = () => {
- return request('/costAccount//setting/generateEmpType', {
@@ -1,254 +0,0 @@
-.PersonnelClassificationMana {
- width:102.5%;
-box-shadow: 0px -8px 16px 0px rgba(64,85,128,0.1);
- overflow:hidden;
- padding: 16px 8px;
- padding: 0 8px;
- &>img {
- height: calc(100% - 30px);
- height: 56px;
- padding-right: 8px;
- .icon {
- width: 25px;
- height: 25px;
- width: 80%;
- padding-left: 7px;
- .name {
- height: 15px;
- line-height: 15px;
- margin-bottom: 8px;
- white-space: nowrap;
- text-overflow: ellipsis;
- .sub {
- height: 13px;
- font-size: 12px;
- color: #7A8599;
- line-height: 13px;
- .more {
- height: 100%;
- .update {
- &:first-child {
@@ -1,183 +0,0 @@
- const resp = await getAddableTableData(record.costTypeCode);
- return a.name?a.name.indexOf(keyword) != -1:false
@@ -1,395 +0,0 @@
- * @LastEditTime: 2024-10-15 15:32:31
-import { addData, delData, editData, getSpaceCostTableData, importDataPost } from './service';
-export default function SpaceCostManagement() {
- const [stopStat, set_stopStat] = useState(0);
- title: '空间名称',
- title: '空间编码',
- title: '建置成本(元)',
- title: '建置容积(㎡)',
- dataIndex: 'volume',
- return num ? '是' : '否'
- return record.type == 0 ?[
- <UpDataActBtn key={'act2'} record={record} type='ADDCHILD' />,
- let resp = await getSpaceCostTableData({ ...params,stop:stopStat });
- const data = renameChildListToChildren(resp, 'childList');
- if (type == 'ADD'||type == 'ADDCHILD') {
- type == 'EDIT' ? <a key="edit" >编辑</a> : <a className='add'>{type == 'ADD' ? '新增' : '添加'}</a>
- return updateTable(type == 'EDIT' ? { ...record, ...val } :type == 'ADDCHILD'?{...val,parentCode:record.code}:{ ...val,parentCode:0 }, type);
- label="空间编码:"
- rules={[{ required: true, message: '空间编码不能为空!' }]}
- label="空间名称:"
- rules={[{ required: true, message: '空间名称不能为空!' }]}
- label="分类:"
- { label: '否', value: 1 },
- { label: '是', value: 0 }
- rules={[{ required: true, message: '分类不能为空!' }]}
- <ProFormDependency name={['type']}>
- ({ type }) => {
- return type == 1 && (
- label="建置成本(元):"
- rules={[{ required: true, message: '建置成本不能为空!' }]}
- name="volume"
- label="建置容积(㎡)::"
- rules={[{ required: true, message: '建置容积不能为空!' }]}
- status ? <ProFormDateTimePicker fieldProps={{ locale }} name="stopTime" colProps={{ span: 14 }} noStyle /> : null
- await downloadTemplateReq('/costAccount/setting/exportSpaceCost');
- <KCIMPagecontainer className='SpaceCostManagement' title={false}>
- <span className='label' style={{ whiteSpace: 'nowrap' }}> 空间名称:</span>
- <span style={{ paddingRight: 16 }}><ProFormSwitch noStyle fieldProps={{
- size: 'small', onChange: (bool) => {
- }} /> 显示停用项目</span>
- <KCIMTable pagination={false} scroll={{y:`calc(100vh - 233px)`}} columns={columns as ProColumns[]} actionRef={tableRef} rowKey='id' params={tableDataFilterParams} request={(params) => getTableData(params)} />
-.SpaceCostManagement {
@@ -1,341 +0,0 @@
- * @LastEditTime: 2024-09-09 10:47:11
-import { ModalForm,ProFormSelect, ProFormSwitch } from '@ant-design/pro-form'
-import { Input, message, Popconfirm, Modal } from 'antd';
-import { addData, delData, editData, getDiseaseComparisonTableData, importDataPost, matchDiseaseTypeMap } from './service';
-import { getDiseaseTableData } from '../diseaseMana/service';
-export default function DiseaseDiagnosisComparison() {
- title: '诊断代码',
- dataIndex: 'diagCode',
- title: '诊断名称',
- dataIndex: 'diagName',
- title: '国家编码',
- dataIndex: 'icdCode',
- title: '病种编码',
- dataIndex: 'diseaseTypeCode',
- dataIndex: 'diseaseTypeCodeName',
- const resp = await getDiseaseComparisonTableData({ ...params,type:stopStat });
- diseaseTypeCode:formVal.diseaseTypeCode == -1?'':formVal.diseaseTypeCode
- ...result,
- diseaseTypeCodeName:formVal.diseaseTypeCode == -1?'':formVal.diseaseTypeCodeName
- const UpDataActBtn = ({ record, type }: { record: any, type: 'EDIT' | 'ADD'}) => {
- title={`${type == 'EDIT' ? '编辑' : '新增'}诊断`}
- diseaseTypeCode:record.diseaseTypeCode?record.diseaseTypeCode:-1
- } : {diseaseTypeCode:-1}}
- type == 'EDIT' ? <a key="edit" >编辑</a> : <a className='add'>新增</a>
- return updateTable(type == 'EDIT' ? { ...record, ...val } :{ ...val}, type);
- name="diagCode"
- label="诊断编码:"
- rules={[{ required: true, message: '诊断编码不能为空!' }]}
- name="diagName"
- label="诊断名称:"
- rules={[{ required: true, message: '诊断名称不能为空!' }]}
- name="icdCode"
- label="国家编码:"
- rules={[{ required: true, message: '国家编码不能为空!' }]}
- name="diseaseTypeCode"
- label="病种名称:"
- request={async()=>{
- const resp = await getDiseaseTableData({pageSize:500,current:1});
- const arr = resp.list.map((a:any)=>({label:`${a.name}(${a.code})`,value:a.code}));
- {label:'暂不选择',value:-1},
- ...arr
- console.log({value});
- if(!value){
- formRef.current?.setFieldValue('diseaseTypeCode',undefined);
- await downloadTemplateReq('/costAccount/setting/exportDiseaseTypeMap');
- const mapBtnHandle = () => {
- content: '对照操作只会自动匹配未对照的项目,是否继续操作?',
- okText:'确定',
- cancelText:'取消',
- const resp = await matchDiseaseTypeMap();
- <KCIMPagecontainer className='DiseaseDiagnosisComparison' title={false}>
- <Input placeholder={'诊断名称/国家编码'} allowClear autoComplete='off'
- }} /> 显示未对照项目</span>
- <span className='mapBtn' onClick={()=>mapBtnHandle()}>对照</span>