| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215 |
- /*
- * @Author: your name
- * @Date: 2022-02-21 09:40:09
- * @LastEditTime: 2022-02-21 11:42:38
- * @LastEditors: Please set LastEditors
- * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
- * @FilePath: /MedicalQualificationMana/src/pages/qualificationReview/index.tsx
- */
- import { useEffect, useState } from 'react'
- import KCTable from "@/components/kcTable";
- import MQPageContainer from "@/components/MQPageContainer";
- import { getMineQualifiApplyList, QualificationDataType } from "@/service/qualification";
- import { ProColumns } from "@ant-design/pro-table";
- import { ProFormRadio, ProFormCheckbox, ProFormDependency, ProFormTextArea,ProFormDigit } from '@ant-design/pro-form';
- import { Button, Form } from 'antd';
- import KCModal from '@/components/KCModal';
- import './style.less';
- export default () => {
- const columns: ProColumns<QualificationDataType>[] = [
- {
- title: 'id',
- dataIndex: 'id',
- hideInTable: true
- },
- {
- title: '资质类目',
- dataIndex: 'qualificationClass',
- hideInSearch: false,
- valueType: 'cascader'
- },
- {
- title: '资质编号',
- dataIndex: 'qualificationNum',
- },
- {
- title: '资质名称',
- dataIndex: 'qualificationName',
- hideInSearch: false
- },
- {
- title: '被授予人',
- dataIndex: '',
- hideInSearch: false
- },
- {
- title: '佐证材料',
- dataIndex: 'supportMaterial',
- },
- {
- title: '授权依据',
- dataIndex: 'authorBasis',
- },
- {
- title: '科审',
- dataIndex: '1',
- },
- {
- title: '医务审',
- dataIndex: '2',
- },
- {
- title: '院审',
- dataIndex: '3',
- },
- {
- title: '申请日期',
- dataIndex: 'applyDate',
- hideInSearch: false,
- valueType: 'dateRange'
- }
- ]
- const [modalVisible, setModalVisible] = useState(false);
- const [modalActType, setModalActType] = useState<'review' | 'authorize' | undefined>(undefined);
- const getTableData = async (params: any) => {
- const resp = await getMineQualifiApplyList({ params });
- if (resp) {
- const { list = [], current, totalCount } = resp;
- return {
- data: list,
- success: true,
- total: totalCount,
- }
- }
- return {
- data: [],
- success: false
- }
- }
- const onVisibleChangeHandle = (bool: boolean) => {
- setModalVisible(bool);
- }
- const showModalHandle = (type: 'review' | 'authorize') => {
- setModalVisible(true);
- setModalActType(type)
- }
- useEffect(() => {
- }, [])
- return (
- <MQPageContainer className="QualificationApplication">
- <KCModal className='QualificationApplicationModal' visible={modalVisible} onVisibleChange={onVisibleChangeHandle} width={600}
- title={modalActType == 'authorize' ? '临时授权' : '审核操作'} layout='horizontal'>
- {
- modalActType == 'review' ? (
- //审核操作
- <>
- <ProFormRadio.Group
- name="radio-group"
- label="选择操作"
- options={[
- {
- label: '通过',
- value: 'a',
- },
- {
- label: '驳回',
- value: 'b',
- },
- ]}
- />
- <ProFormDependency name={['name']}>
- {
- ({ name }) => {
- return (
- <>
- <ProFormCheckbox.Group
- name="checkbox"
- label="驳回原因"
- options={['农业', '制造业', '互联网']}
- />
- <ProFormTextArea
- name="text"
- label="其他驳回原因"
- placeholder="请输入"
- fieldProps={{}}
- />
- </>
- )
- }
- }
- </ProFormDependency>
- </>
- ) : (
- <>
- <ProFormRadio.Group
- name="radio-group"
- label="选择操作"
- options={[
- {
- label: '三个月',
- value: 'a',
- },
- {
- label: '自定义',
- value: 'b',
- },
- ]}
- />
- <ProFormDependency name={['name']}>
- {
- ({ name }) => {
- return (
- <Form.Item wrapperCol={{span:12}}>
- <ProFormDigit
- label="自定义天数"
- name="input-number"
- min={1}
- max={360}
- placeholder='请输入数字'
- fieldProps={{
- precision: 0,
- addonAfter:'天'
- }}
- />
- </Form.Item>
- )
- }
- }
- </ProFormDependency>
- <div className='bottomTip' dangerouslySetInnerHTML={{__html:'* 确定要给予选择的 <span>16个</span> 资质临时授,起止时间为<span>16个</span>到<span>16个</span>'}}></div>
- </>
- )
- }
- </KCModal>
- <KCTable
- columns={columns}
- request={(params) => getTableData(params)}
- rowKey='id'
- toolbar={{
- actions: [
- <Button key="primary" onClick={() => showModalHandle('authorize')}>临时授权</Button>,
- <Button key="primary" type="primary" onClick={() => showModalHandle('review')}>院审批</Button>,
- ]
- }}
- />
- </MQPageContainer>
- );
- }
|