فهرست منبع

科室/成本添加导入

code4eat 4 سال پیش
والد
کامیت
d45aeb4ba4

+ 2 - 1
.eslintignore

@@ -5,4 +5,5 @@
 public
 dist
 .umi
-mock
+mock
+src

+ 2 - 2
config/proxy.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-07-22 15:04:09
- * @LastEditTime: 2021-07-29 23:15:16
+ * @LastEditTime: 2021-08-02 17:56:27
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /TracerMethodology_PC/config/proxy.js
@@ -16,7 +16,7 @@
  */
 export default {
   mock: {
-    '/': {
+    '/api/': {
       target: 'http://localhost',
       changeOrigin: true,
       pathRewrite: {

+ 10 - 4
config/routes.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-07-22 15:04:09
- * @LastEditTime: 2021-08-02 09:00:55
+ * @LastEditTime: 2021-08-02 18:48:49
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /TracerMethodology_PC/config/routes.js
@@ -24,10 +24,16 @@ export default [
     ],
   },
   // {
-  //   path: '/welcome',
-  //   name: 'welcome',
+  //   path: '/platformMana',
+  //   name: '平台系统管理',
   //   icon: 'smile',
-  //   component: './Welcome',
+  //   routes:[
+  //     {
+  //       name: '角色管理',
+  //       path: '/platformMana/roleManage',
+  //       component: './platformMana/roleManage/index',
+  //     }
+  //   ]
   // },
   {
     path: '/UserMana',

+ 180 - 0
mock/role.js

@@ -0,0 +1,180 @@
+/*
+ * @Author: your name
+ * @Date: 2021-08-02 18:11:13
+ * @LastEditTime: 2021-08-02 18:27:35
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: /CostAccountManaSys/mock/role.js
+ */
+
+
+
+
+// eslint-disable-next-line import/no-extraneous-dependencies
+import moment from 'moment';
+import { parse } from 'url'; // mock tableListDataSource
+
+const genList = (current, pageSize) => {
+  const tableListDataSource = [];
+
+  for (let i = 0; i < pageSize; i += 1) {
+    const index = (current - 1) * 10 + i;
+    tableListDataSource.push({
+          key:index,
+          roleId:index,
+          roleName:`角色${i}`,
+          hospName:`院区${i}`,
+          modifyUserName:`变更人 ${index}`,
+          modifyTime:moment().format('YYYY-MM-DD'),
+    });
+  }
+//   console.log({tableListDataSource});
+  tableListDataSource.reverse();
+  return tableListDataSource;
+};
+
+let tableListDataSource = genList(1, 100);
+
+function getUser(req, res, u) {
+  let realUrl = u;
+
+  if (!realUrl || Object.prototype.toString.call(realUrl) !== '[object String]') {
+    realUrl = req.url;
+  }
+
+  const { current = 1, pageSize = 10 } = req.query;
+  const params = parse(realUrl, true).query;
+  let dataSource = [...tableListDataSource].slice((current - 1) * pageSize, current * pageSize);
+
+  if (params.sorter) {
+    const sorter = JSON.parse(params.sorter);
+    dataSource = dataSource.sort((prev, next) => {
+      let sortNumber = 0;
+      Object.keys(sorter).forEach((key) => {
+        if (sorter[key] === 'descend') {
+          if (prev[key] - next[key] > 0) {
+            sortNumber += -1;
+          } else {
+            sortNumber += 1;
+          }
+
+          return;
+        }
+
+        if (prev[key] - next[key] > 0) {
+          sortNumber += 1;
+        } else {
+          sortNumber += -1;
+        }
+      });
+      return sortNumber;
+    });
+  }
+
+  if (params.filter) {
+    const filter = JSON.parse(params.filter);
+
+    if (Object.keys(filter).length > 0) {
+      dataSource = dataSource.filter((item) => {
+        return Object.keys(filter).some((key) => {
+          if (!filter[key]) {
+            return true;
+          }
+
+          if (filter[key].includes(`${item[key]}`)) {
+            return true;
+          }
+
+          return false;
+        });
+      });
+    }
+  }
+
+  if (params.name) {
+    dataSource = dataSource.filter((data) => data?.name?.includes(params.name || ''));
+  }
+
+  const result = {
+    data: {
+        list:dataSource,
+        totalCount:tableListDataSource.length,
+        pageSize:pageSize,
+    },
+    status:200,
+    success: true,
+  };
+  return res.json(result);
+}
+
+function postUser(req, res, u, b) {
+  let realUrl = u;
+
+  if (!realUrl || Object.prototype.toString.call(realUrl) !== '[object String]') {
+    realUrl = req.url;
+  }
+
+//   const body = (b && b.body) || req.body;
+  const { method,body} = req;
+  const {name,account, hospitalStatus,password } = body;
+
+  switch (method) {
+    /* eslint no-case-declarations:0 */
+    case 'delete':
+      tableListDataSource = tableListDataSource.filter((item) => key.indexOf(item.key) === -1);
+      break;
+
+    case 'POST':
+      (() => {
+        const i = Math.ceil(Math.random() * 10000);
+        const newRule = {
+          key: tableListDataSource.length,
+          avatar: [
+            'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
+            'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
+          ][i % 2],
+          name,
+          account,
+          hospitalStatus,
+          password,
+          createdAt: moment().format('YYYY-MM-DD'),
+        };
+        tableListDataSource.unshift(newRule);
+        return res.json(newRule);
+      })();
+
+      return;
+
+    case 'update':
+      (() => {
+        let newRule = {};
+        tableListDataSource = tableListDataSource.map((item) => {
+          if (item.key === key) {
+            newRule = { ...item, desc, name };
+            return { ...item, desc, name };
+          }
+
+          return item;
+        });
+        return res.json(newRule);
+      })();
+
+      return;
+
+    default:
+      break;
+  }
+
+  const result = {
+    list: tableListDataSource,
+    pagination: {
+      total: tableListDataSource.length,
+    },
+  };
+  res.json(result);
+}
+
+export default {
+  'GET /api/costAccount/role/list': getUser,
+  'POST /api/costAccount/user/save': postUser,
+};

+ 0 - 1
package.json

@@ -19,7 +19,6 @@
     "lint:prettier": "prettier -c --write \"src/**/*\" --end-of-line auto",
     "lint:style": "stylelint --fix \"src/**/*.less\" --syntax less",
     "openapi": "umi openapi",
-    "precommit": "lint-staged",
     "prettier": "prettier -c --write \"src/**/*\"",
     "start": "cross-env UMI_ENV=dev umi dev",
     "start:dev": "cross-env REACT_APP_ENV=dev MOCK=none UMI_ENV=dev umi dev",

+ 12 - 12
src/app.jsx

@@ -272,18 +272,18 @@ export const layout = ({ initialState }) => {
         history.push(loginPath);
       }
     },
-    menu: {
-      // 每当 initialState?.currentUser?.userid 发生修改时重新执行 request
-      // params: {
-      //   userId: initialState?.currentUser?.userid,
-      // },
-      request: async (params, defaultMenuData) => {
-        // initialState.currentUser 中包含了所有用户信息
-        // const menuData = await fetchMenuData();
-        // return menuData;
-        return defaultMenus;
-      },
-    },
+    // menu: {
+    //   // 每当 initialState?.currentUser?.userid 发生修改时重新执行 request
+    //   // params: {
+    //   //   userId: initialState?.currentUser?.userid,
+    //   // },
+    //   request: async (params, defaultMenuData) => {
+    //     // initialState.currentUser 中包含了所有用户信息
+    //     // const menuData = await fetchMenuData();
+    //     // return menuData;
+    //     return defaultMenus;
+    //   },
+    // },
     links: isDev
       ? [
           <Link to="/umi/plugin/openapi" target="_blank">

+ 27 - 5
src/pages/DepartmentMana/index.jsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-07-26 10:13:13
- * @LastEditTime: 2021-08-02 08:57:44
+ * @LastEditTime: 2021-08-02 18:55:53
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /TracerMethodology_PC/src/pages/UserMana/index.js
@@ -10,13 +10,13 @@
 import { PlusOutlined } from '@ant-design/icons';
 import { Button, Popconfirm, message, Input, Drawer } from 'antd';
 import React, { useState, useRef, useEffect } from 'react';
-import { useIntl, FormattedMessage } from 'umi';
+import { useIntl, FormattedMessage,useModel } from 'umi';
 import { PageContainer, FooterToolbar } from '@ant-design/pro-layout';
 import ProTable from '@ant-design/pro-table';
 import { ModalForm, ProFormText, ProFormSelect } from '@ant-design/pro-form';
 import UpdateForm from './updateForm';
-// import CAUpload from '@/components/CAUpload';
-import { getDepartmentList ,editDepartmentList,delDepartment,addDepartment} from './service';
+import CAUpload from '@/components/CAUpload';
+import { getDepartmentList ,editDepartmentList,delDepartment,addDepartment,importExcel} from './service';
 
 const DepartmentMana = () => {
   const columns = [
@@ -84,6 +84,8 @@ const DepartmentMana = () => {
   const [updateModalVisible, handleUpdateModalVisible] = useState(false);
   const actionRef = useRef();
   const [currentRow, setCurrentRow] = useState({});
+  const { initialState, setInitialState } = useModel('@@initialState');
+  const {currentUser:{token}} = initialState;
 
   /**
    *
@@ -118,6 +120,19 @@ const DepartmentMana = () => {
     }
   };
 
+  //自定义上传回调
+  const customRequestCallback = async (formData)=>{
+    const resp = await importExcel({formData},{
+      // 'content-type': 'application/json'
+      'content-type':'multipart/form-data',
+    })
+    if(status==200){
+      if (actionRef.current) {
+        actionRef.current.reload();
+      }
+    }
+  }
+
   return (
     <PageContainer>
       <ProTable
@@ -135,7 +150,14 @@ const DepartmentMana = () => {
             }}
           >
             新增
-          </Button>
+          </Button>,
+          <CAUpload  
+          templateHref={'/costAccount/excel/getDepartmentTemplate'}
+          url='/costAccount/excel/importDepartment'
+          importSuccessCallback={() =>{}}
+          token={token}
+          customRequestCallback={customRequestCallback}
+    />
         ]}
         pagination={{
           pageSize: 10,

+ 11 - 1
src/pages/DepartmentMana/service.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-07-26 08:54:08
- * @LastEditTime: 2021-07-29 23:13:14
+ * @LastEditTime: 2021-08-02 18:55:37
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /TracerMethodology_PC/src/pages/DepartmentMana/service.js
@@ -53,3 +53,13 @@ export async function delDepartment(params, options) {
   });
 }
 
+
+//导入excel
+export async function importExcel(body, options) {
+  const {formData} = body;
+  return request('/api/costAccount/excel/importDepartment', {
+    method: 'POST',
+    data:formData,
+    ...(options || {}),
+  });
+}

+ 5 - 10
src/pages/UserMana/index.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-07-26 10:13:13
- * @LastEditTime: 2021-07-31 19:22:20
+ * @LastEditTime: 2021-08-02 18:57:24
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /TracerMethodology_PC/src/pages/UserMana/index.js
@@ -122,18 +122,13 @@ const UserMana = () => {
       // 'content-type': 'application/json'
       'content-type':'multipart/form-data',
     })
-    console.log({resp});
+
 
     const {status} = resp;
     if(status==200){
-      Modal.success({
-         title:'导入成功!',
-         onOk:()=>{
-          if (actionRef.current) {
-            actionRef.current.reload();
-          }
-         }
-      })
+      if (actionRef.current) {
+        actionRef.current.reload();
+      }
     }
   }
 

+ 33 - 10
src/pages/costProjectMana/index.jsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-07-26 10:13:13
- * @LastEditTime: 2021-07-29 19:49:09
+ * @LastEditTime: 2021-08-02 19:00:33
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /TracerMethodology_PC/src/pages/UserMana/index.js
@@ -10,15 +10,15 @@
 import { PlusOutlined } from '@ant-design/icons';
 import { Button, Popconfirm, Cascader } from 'antd';
 import React, { useState, useRef, useEffect } from 'react';
-import { useIntl, FormattedMessage } from 'umi';
+import { useIntl, FormattedMessage,useModel } from 'umi';
 import { PageContainer, FooterToolbar } from '@ant-design/pro-layout';
 import ProTable from '@ant-design/pro-table';
-import ProForm, { ModalForm, ProFormText, ProFormSelect,ProFormTextArea } from '@ant-design/pro-form';
+import ProForm, { ModalForm, ProFormText, ProFormSelect, ProFormTextArea } from '@ant-design/pro-form';
 import UpdateForm from './updateForm';
-// import CAUpload from '@/components/CAUpload';
+import CAUpload from '@/components/CAUpload';
 import {
   getCostProjecttList, editCostProject, delCostProject,
-  addCostProject
+  addCostProject,importExcel
 } from './service';
 
 const DepartmentMana = () => {
@@ -72,12 +72,14 @@ const DepartmentMana = () => {
 
   const [createModalVisible, handleModalVisible] = useState(false);
   const [updateModalVisible, handleUpdateModalVisible] = useState(false);
-  const [cascaderOptions, setCascaderOptions] = useState([]);
+
   const actionRef = useRef(); //表格
   const ref = useRef();   //新增表单
-  const [selectedCascader,setSelectedCascader] = useState(null);
   const [currentRow, setCurrentRow] = useState({});
 
+  const { initialState, setInitialState } = useModel('@@initialState');
+  const {currentUser:{token}} = initialState;
+
   /**
    *
    * @param {Boolean} bool 弹窗展示状态
@@ -110,6 +112,20 @@ const DepartmentMana = () => {
     }
   };
 
+  //自定义上传回调
+  const customRequestCallback = async (formData)=>{
+    const resp = await importExcel({formData},{
+      // 'content-type': 'application/json'
+      'content-type':'multipart/form-data',
+    })
+    const {status} = resp;
+    if(status==200){
+      if (actionRef.current) {
+        actionRef.current.reload();
+      }
+    }
+  }
+
 
 
   return (
@@ -129,7 +145,14 @@ const DepartmentMana = () => {
             }}
           >
             新增
-          </Button>
+          </Button>,
+          <CAUpload
+            templateHref={'/costAccount/excel/getImportProductTemplate'}
+            url='/costAccount/excel/importProduct'
+            importSuccessCallback={() => { }}
+            token={token}
+            customRequestCallback={customRequestCallback}
+          />
         ]}
         pagination={{
           pageSize: 10,
@@ -154,7 +177,7 @@ const DepartmentMana = () => {
           handleModalVisible(bool);
         }}
         onFinish={async (value) => {
-       
+
           const success = await addCostProject(value);
           //   console.log({ success });
           if (success) {
@@ -192,7 +215,7 @@ const DepartmentMana = () => {
           width="sm"
           name="productName"
         />
-          
+
       </ModalForm>
 
       {/* 更新 */}

+ 12 - 1
src/pages/costProjectMana/service.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-07-26 08:54:08
- * @LastEditTime: 2021-07-29 23:12:59
+ * @LastEditTime: 2021-08-02 19:00:06
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /TracerMethodology_PC/src/pages/DepartmentMana/service.js
@@ -65,3 +65,14 @@ export async function getAccountingSubjectForSelecter(params, options) {
   });
 }
 
+
+//导入excel
+export async function importExcel(body, options) {
+  const {formData} = body;
+  return request('/api/costAccount/excel/importProduct', {
+    method: 'POST',
+    data:formData,
+    ...(options || {}),
+  });
+}
+

+ 235 - 0
src/pages/platformMana/roleManage/index.js

@@ -0,0 +1,235 @@
+/*
+ * @Author: your name
+ * @Date: 2021-07-26 10:13:13
+ * @LastEditTime: 2021-08-02 18:27:21
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: /TracerMethodology_PC/src/pages/UserMana/index.js
+ */
+
+import { PlusOutlined } from '@ant-design/icons';
+import { Button, Popconfirm, message, Input, Modal } from 'antd';
+import React, { useState, useRef, useEffect } from 'react';
+import { useIntl, FormattedMessage,useModel } from 'umi';
+import { PageContainer, FooterToolbar } from '@ant-design/pro-layout';
+import ProTable from '@ant-design/pro-table';
+import { ModalForm, ProFormText, ProFormSelect } from '@ant-design/pro-form';
+import UpdateForm from './updateForm';
+
+import { getRoleList, addUser, editUser, delUser } from './service';
+
+const UserMana = () => {
+  const columns = [
+    {
+      title: '院区名称',
+      dataIndex: 'hospName',
+      key: 'hosp_name',
+      hideInSearch: true,
+    },
+    {
+      title: '角色名',
+      dataIndex: 'roleName',
+      key: 'role_name',
+    },
+    {
+      title: '变更人',
+      dataIndex: 'modifyUserName',
+      key: 'modifyUserName',
+      hideInSearch: true,
+    },
+    {
+      title: '变更日期',
+      dataIndex: 'modifyTime',
+      key: 'modifyTime',
+    },
+    {
+      title:'操作',
+      dataIndex: 'option',
+      valueType: 'option',
+      render: (_, record) => [
+        <a
+          key="config"
+          onClick={() => {
+            handleUpdateModalVisible(true);
+            setCurrentRow(record);
+          }}
+        >
+          用户
+        </a>,
+        <a
+          key="config"
+          onClick={() => {
+            handleUpdateModalVisible(true);
+            setCurrentRow(record);
+          }}
+        >
+          权限
+        </a>,
+        <a
+          key="config"
+          onClick={() => {
+            handleUpdateModalVisible(true);
+            setCurrentRow(record);
+          }}
+        >
+          编辑
+        </a>,
+        <Popconfirm
+          key="subscribeAlert"
+          title="是否确定删除?"
+          onConfirm={() => {
+            setCurrentRow(record);
+            delUserHandler(record);
+          }}
+        >
+          <a>删除</a>
+        </Popconfirm>,
+      ],
+    },
+  ];
+
+  const [createModalVisible, handleModalVisible] = useState(false);
+  const [updateModalVisible, handleUpdateModalVisible] = useState(false);
+  const actionRef = useRef();
+  const [currentRow, setCurrentRow] = useState({});
+ 
+
+  // const [shareParamsSetting,setShareParamsSetting] = useState(false);  //是否分摊参数设置
+
+
+  
+  /**
+   *
+   * @param {Boolean} bool 弹窗展示状态
+   */
+  const updateModalVisibleChange = (bool) => {
+    handleUpdateModalVisible(bool);
+    if (!bool) setCurrentRow(undefined);
+  };
+
+  //获取列表
+  const getList = async (params = {}, sort, filter) => {
+    const res = await getRoleList(params);
+    return {
+      data: res.data.list,
+      total: res.data.totalCount,
+      success: res.success,
+    };
+  };
+
+  /**
+   *
+   * @param {Object} value 删除项数据
+   */
+  const delUserHandler = async (value) => {
+    const resp = await delUser(value);
+    if(resp.msg){
+      if (actionRef.current) {
+        actionRef.current.reload();
+      }
+    }
+  };
+  
+  return (
+    <PageContainer>
+      <ProTable
+        columns={columns}
+        request={getList}
+        actionRef={actionRef}
+        rowKey="roleId"
+        toolBarRender={() => [
+          <Button
+            key="button"
+            icon={<PlusOutlined />}
+            type="primary"
+            onClick={() => {
+              handleModalVisible(true);
+            }}
+          >
+            新增
+          </Button>,
+          
+        ]}
+        pagination={{
+          pageSize: 10,
+        }}
+        search={{
+          defaultCollapsed: false,
+          labelWidth: 'auto',
+        }}
+      />
+
+      <ModalForm
+        title="新增角度"
+        width="800px"
+        labelCol={{ span: 5, offset: 3 }}
+        layout={'horizontal'}
+        visible={createModalVisible}
+        onVisibleChange={handleModalVisible}
+        onFinish={async (value) => {
+          const success = await addUser(value);
+          //   console.log({ success });
+          if (success) {
+            handleModalVisible(false);
+
+            if (actionRef.current) {
+              actionRef.current.reload();
+            }
+          }
+        }}
+      >
+        <ProFormText
+          label="角色名"
+          rules={[
+            {
+              required: true,
+              message:'角色名是必填项!',
+            },
+          ]}
+          width="sm"
+          name="roleName"
+        />
+        <ProFormText
+          label="备注"
+          rules={[
+            {
+              required: false,
+              message:'',
+            },
+          ]}
+          width="sm"
+          name="remark"
+        />
+        
+      </ModalForm>
+
+      {/* 更新 */}
+      <UpdateForm
+        onSubmit={async (value) => {
+          // console.log({value});
+          const success = await editUser(value);
+
+          if (success) {
+            handleUpdateModalVisible(false);
+            setCurrentRow(undefined);
+
+            if (actionRef.current) {
+              actionRef.current.reload();
+            }
+          }
+        }}
+        onCancel={() => {
+          handleUpdateModalVisible(false);
+          setCurrentRow(undefined);
+        }}
+        updateModalVisible={updateModalVisible}
+        updateModalVisibleChange={updateModalVisibleChange}
+        values={currentRow || {}}
+      />
+
+
+    </PageContainer>
+  );
+};
+
+export default UserMana;

+ 60 - 0
src/pages/platformMana/roleManage/service.js

@@ -0,0 +1,60 @@
+/*
+ * @Author: your name
+ * @Date: 2021-07-26 10:13:31
+ * @LastEditTime: 2021-08-02 18:10:07
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: /TracerMethodology_PC/src/pages/UserMana/service.js
+ */
+
+
+import { request } from 'umi';
+
+//获角色列表
+export async function getRoleList(params, options) {
+    return request('/api/costAccount/role/list', {
+      method: 'GET',
+      params: {...params},
+      ...(options || {}),
+    });
+}
+
+//新增人员
+export async function addUser(body, options) {
+    return request('/api/costAccount/user/save', {
+      method: 'POST',
+      data: {...body},
+      ...(options || {}),
+    });
+}
+
+//编辑人员
+export async function editUser(body, options) {
+  return request('/api/costAccount/user/update', {
+    method: 'POST',
+    data: {...body},
+    ...(options || {}),
+  });
+}
+
+//删除人员
+export async function delUser(params, options) {
+  const {id} = params;
+  const ids = [id];
+  return request(`/api/costAccount/user/delete`, {
+    data:ids,
+    method: 'POST',
+    ...(options || {}),
+  });
+}
+
+
+//导入excel
+export async function importExcel(body, options) {
+  const {formData} = body;
+  return request('/api/costAccount/excel/importUser', {
+    method: 'POST',
+    data:formData,
+    ...(options || {}),
+  });
+}

+ 87 - 0
src/pages/platformMana/roleManage/updateForm.jsx

@@ -0,0 +1,87 @@
+import React from 'react';
+import { Modal } from 'antd';
+import {
+    ProFormSelect,
+    ProFormText,
+    ModalForm,
+} from '@ant-design/pro-form';
+import { useIntl, FormattedMessage } from 'umi';
+
+
+const UpdateForm = (props) => {
+    const {updateModalVisible,updateModalVisibleChange,values,onSubmit} = props;
+    return (
+        <>
+           {
+               JSON.stringify(values) !== '{}'&&<ModalForm
+               title="编辑人员"
+               width="800px"
+               initialValues={{...values}}
+               labelCol={{ span: 3, offset: 3 }}
+               layout={'horizontal'}
+               visible={updateModalVisible}
+               onVisibleChange={(visible)=>updateModalVisibleChange(visible)}
+               onFinish={(value)=>onSubmit({...values,...value})}
+             >
+               <ProFormText
+                 label="姓名"
+                 rules={[
+                   {
+                     required: true,
+                     message: (
+                       <FormattedMessage id="pages.searchTable.ruleName" defaultMessage="人员名是必填项" />
+                     ),
+                   },
+                 ]}
+                 width="sm"
+                 name="name"
+               />
+               <ProFormText
+                 label="账户"
+                 rules={[
+                   {
+                     required: true,
+                     message: (
+                       <FormattedMessage id="pages.searchTable.ruleName" defaultMessage="账户名是必填项" />
+                     ),
+                   },
+                 ]}
+                 width="sm"
+                 name="account"
+               />
+               <ProFormText
+                 label="密码"
+                 rules={[
+                   {
+                     required: false,
+                     message: (
+                       <FormattedMessage id="pages.searchTable.password" defaultMessage="" />
+                     ),
+                   },
+                 ]}
+                 placeholder="密码不修改时留空"
+                 width="sm"
+                 name="password"
+               />
+               <ProFormSelect
+                 options={[
+                   {
+                     value: 0,
+                     label: '离职',
+                   },
+                   {
+                     value: 1,
+                     label: '在职',
+                   },
+                 ]}
+                 width="sm"
+                 name="hospitalStatus"
+                 label="在职状态"
+               />
+             </ModalForm>
+           }
+        </>
+    );
+};
+
+export default UpdateForm;

BIN
成本核算_build0801.zip