Quellcode durchsuchen

Merge branch 'dev' of http://192.168.1.41:3000/lanjianrong/financial_audit_console into dev

outaozhen vor 3 Jahren
Ursprung
Commit
a48492dd5d

+ 3 - 2
src/pages/Institutions/Company/List/index.tsx

@@ -126,7 +126,9 @@ const CompanyList = () => {
         }}
         toolbar={{
           search: {
-            onSearch: val => setState({ ...state, params: { ...state.params, search: val } })
+            onSearch: val => setState({ ...state, params: { ...state.params, search: val } }),
+            style: { width: '250px' },
+            placeholder: '请输入企事业单位名称'
           },
           actions: [
             <Button
@@ -148,7 +150,6 @@ const CompanyList = () => {
         <CompanyDrawer
           type={state.currentModalType}
           defaultFormData={state.defaultFormData}
-          // pTypeList={pTypeList}
           reload={() => tRef.current?.reload()}
           setVisible={(visible: boolean) => setState({ ...state, visible })}
         />

+ 3 - 60
src/pages/Institutions/Staff/index.tsx

@@ -76,17 +76,6 @@ const CompanyList: React.FC<ListProps> = () => {
         false: { text: '禁用', status: 'Error' }
       }
     },
-    // {
-    //   dataIndex: 'gender',
-    //   key: 'gender',
-    //   title: '性别',
-    //   width: 56,
-    //   align: 'center',
-    //   onHeaderCell: () => ({ style: { textAlign: 'center' } }),
-    //   render: (_, { gender }) => {
-    //     return <span>{genderEum[gender]}</span>
-    //   }
-    // },
     {
       dataIndex: 'organizationalStructureID',
       key: 'organizationalStructureID',
@@ -121,23 +110,6 @@ const CompanyList: React.FC<ListProps> = () => {
       onHeaderCell: () => ({ style: { textAlign: 'center' } }),
       renderText: (_, record) => record?.created?.name
     },
-    // {
-    //   dataIndex: 'accountType',
-    //   key: 'accountType',
-    //   title: '账号类型',
-    //   width: 96,
-    //   align: 'center',
-    //   filters: true,
-    //   filterMultiple: false,
-    //   onHeaderCell: () => ({ style: { textAlign: 'center' } }),
-    //   valueEnum: accountTypeList.reduce((prev, curr) => {
-    //     const items = { ...prev }
-    //     items[curr.value] = {
-    //       text: curr.label
-    //     }
-    //     return items
-    //   }, {})
-    // },
     {
       title: '操作',
       dataIndex: 'operation',
@@ -160,16 +132,6 @@ const CompanyList: React.FC<ListProps> = () => {
             }}>
             编辑
           </div>
-          {/* <Popconfirm
-            title="确定删除吗?"
-            okText="确定"
-            cancelText="取消"
-            onConfirm={() => tryDelProject({ id: record.id })}
-          >
-            <div className="pl-2 text-hex-fd3995 cursor-pointer hover:text-hex-e7026e">
-              <DeleteOutlined />
-            </div>
-          </Popconfirm> */}
         </div>
       )
     }
@@ -197,29 +159,10 @@ const CompanyList: React.FC<ListProps> = () => {
         }}
         toolbar={{
           search: {
-            onSearch: val => setState({ ...state, params: { ...state.params, search: val } })
+            onSearch: val => setState({ ...state, params: { ...state.params, search: val } }),
+            style: { width: '250px' },
+            placeholder: '请输入账号、姓名、企事业单位'
           }
-          // actions: [
-          //   <Button
-          //     type="primary"
-          //     onClick={() =>
-          //       setState({
-          //         ...state,
-          //         visible: true,
-          //         currentModalType: ModalType.ADD,
-          //         title: '',
-          //         defaultFormData: {
-          //           ...state.defaultFormData,
-          //           dataID: null,
-          //           institutionID: null,
-          //           institutionDisable: false,
-          //           hiddenOrganization: true
-          //         }
-          //       })
-          //     }>
-          //     新建账号
-          //   </Button>
-          // ]
         }}
         search={false}
       />

+ 2 - 1
src/pages/Project/Created/index.tsx

@@ -5,7 +5,7 @@ import type { ActionType } from '@ant-design/pro-table'
 import { ModalForm } from '@ant-design/pro-form'
 import type { ProFormInstance } from '@ant-design/pro-form'
 import type { ProFormColumnsType } from '@ant-design/pro-form'
-import { DeleteOutlined } from '@ant-design/icons'
+import { DeleteOutlined, PlusOutlined } from '@ant-design/icons'
 import { queryAccountList } from '@/services/api/institution'
 import consts from '@/utils/consts'
 import { Button, Form, message, Table } from 'antd'
@@ -130,6 +130,7 @@ const Created = () => {
             <Button
               key="add_created_btn"
               type="primary"
+              icon={<PlusOutlined />}
               onClick={() =>
                 setState({ ...state, modalVisible: true, modalType: CreatedModalType.ADD })
               }>

+ 3 - 40
src/pages/Project/Management/List/index.tsx

@@ -22,11 +22,6 @@ type ListProps = ConnectProps & {
 const List: React.FC<ListProps> = ({ schema, dispatch, pTypeList }) => {
   const tRef = useRef<ActionType>(null)
   useEffect(() => {
-    // if (!pTypeList.length) {
-    //   dispatch({
-    //     type: 'project/queryProjectTypeList'
-    //   })
-    // }
     if (!schema) {
       dispatch({
         type: 'schemaBase/querySchema',
@@ -52,7 +47,6 @@ const List: React.FC<ListProps> = ({ schema, dispatch, pTypeList }) => {
   })
 
   const goToDetail = params => {
-    // return history.push(`/institutions/company/companyname`)
     return history.push({
       pathname: '/project/management/detail',
       state: params
@@ -70,13 +64,6 @@ const List: React.FC<ListProps> = ({ schema, dispatch, pTypeList }) => {
           className="text-primary cursor-pointer hover:text-hex-967bbd"
           onClick={() => {
             goToDetail({ dataID: record.ID })
-            // setState({
-            //   ...state,
-            //   visible: true,
-            //   currentModalType: ModalType.PREVIEW,
-            //   title: record.name,
-            //   defaultFormData: record
-            // })
           }}>
           {text}
         </span>
@@ -90,22 +77,6 @@ const List: React.FC<ListProps> = ({ schema, dispatch, pTypeList }) => {
       onHeaderCell: () => ({ style: { textAlign: 'center' } }),
       renderText: text => dayjs(text).format('YYYY-MM-DD')
     },
-    // {
-    //   dataIndex: 'projectTypeID',
-    //   title: '项目类型',
-    //   width: 126,
-    //   align: 'center',
-    //   filters: true,
-    //   filterMultiple: false,
-    //   onHeaderCell: () => ({ style: { textAlign: 'center' } }),
-    //   valueEnum: pTypeList.reduce((prev, curr) => {
-    //     const items = { ...prev }
-    //     items[curr.value] = {
-    //       text: curr.label
-    //     }
-    //     return items
-    //   }, {})
-    // },
     {
       dataIndex: 'createdID',
       key: 'createdID',
@@ -131,12 +102,6 @@ const List: React.FC<ListProps> = ({ schema, dispatch, pTypeList }) => {
         </div>
       )
     },
-    // {
-    //   dataIndex: 'approval',
-    //   key: 'approval',
-    //   title: '审批流程',
-    //   renderText: (_, record) => record.approval?.name
-    // },
     {
       title: '操作',
       dataIndex: 'operation',
@@ -180,7 +145,6 @@ const List: React.FC<ListProps> = ({ schema, dispatch, pTypeList }) => {
         params={state.params}
         actionRef={tRef}
         scroll={{ y: document.body.clientHeight - 291 }}
-        // columns={generateColumns(columns, schema)}
         columns={columns}
         request={async (params, filter, sorter) => {
           const { code = -1, data: { items = [], total = 0 } = {} } = await getProjectList({
@@ -196,10 +160,11 @@ const List: React.FC<ListProps> = ({ schema, dispatch, pTypeList }) => {
         }}
         toolbar={{
           search: {
-            onSearch: val => setState({ ...state, params: { ...state.params, search: val } })
+            onSearch: val => setState({ ...state, params: { ...state.params, search: val } }),
+            style: { width: '250px' },
+            placeholder: '请输入项目名称'
           },
           actions: [
-            // <Button onClick={() => history.push('/project/management/add')}>新建项目</Button>
             <Button
               key="add"
               type="primary"
@@ -209,7 +174,6 @@ const List: React.FC<ListProps> = ({ schema, dispatch, pTypeList }) => {
                   visible: true,
                   currentModalType: ModalType.ADD,
                   title: null
-                  // defaultFormData: transformToSchemaData(record, BaseMenuEnum.PROJECT, schema)
                 })
               }>
               新建项目
@@ -243,6 +207,5 @@ const List: React.FC<ListProps> = ({ schema, dispatch, pTypeList }) => {
 }
 
 export default connect(({ schemaBase }: { schemaBase: SchemaBaseModelState }) => ({
-  // pTypeList: project.projectTypeList.map(item => ({ label: item.name, value: item.ID })),
   schema: schemaBase.base[BaseMenuEnum.PROJECT]
 }))(List)

+ 25 - 6
src/pages/Project/Verification/index.tsx

@@ -77,6 +77,7 @@ const FlowList = () => {
               visible: true,
               current: { dataID: record.ID, name: record.name, readPretty: true }
             })
+            tRef
           }}>
           {record.stickyTop ? (
             <span className="w-30px text-center rounded-md border border-hex-0089ff bg-hex-e9f5ff px-1">
@@ -118,6 +119,9 @@ const FlowList = () => {
                 modalVisible: true,
                 current: { dataID: record.ID, name: record.name }
               })
+              setTimeout(() => {
+                formRef.current?.setFieldsValue({ name: record.name })
+              }, 80)
             }}>
             编辑名称
           </span>
@@ -172,14 +176,20 @@ const FlowList = () => {
         search={false}
         toolbar={{
           search: {
-            onSearch: value => setState({ ...state, params: { ...state.params, search: value } })
+            onSearch: value => setState({ ...state, params: { ...state.params, search: value } }),
+            style: { width: '250px' },
+            placeholder: '请输入流程名称'
           },
           actions: [
             <Button
               type="primary"
-              onClick={() =>
-                setState({ ...state, modalType: ApprovalModalType.ADD, modalVisible: true })
-              }
+              onClick={() => {
+                setState({
+                  ...state,
+                  modalType: ApprovalModalType.ADD,
+                  modalVisible: true
+                })
+              }}
               key="add_flow_btn">
               新建流程
             </Button>
@@ -202,7 +212,12 @@ const FlowList = () => {
         modalProps={{
           width: '30%'
         }}
-        onVisibleChange={visible => setState({ ...state, modalVisible: visible })}
+        onVisibleChange={visible => {
+          setState({ ...state, modalVisible: visible })
+          setTimeout(() => {
+            if (!visible) formRef.current?.resetFields()
+          }, 80)
+        }}
         title={`${state.modalType === ApprovalModalType.ADD ? '新建' : '编辑'}审批流程`}
         formRef={formRef}
         onFinish={async values => {
@@ -220,7 +235,11 @@ const FlowList = () => {
             return false
           }
         }}>
-        <ProFormText name="name" label="名称" rules={[{ required: true }]} />
+        <ProFormText
+          name="name"
+          label="名称"
+          rules={[{ required: true, message: '请输入流程名称' }]}
+        />
       </ModalForm>
     </PageContainer>
   )