Jelajahi Sumber

个人中心

hanxin 2 tahun lalu
induk
melakukan
7907cf1cae

+ 25 - 2
.umirc.ts

@@ -119,9 +119,32 @@ export default defineConfig({
     {
       name: '个人中心',
       path: '/profile',
-      component: './Profile/index',
-      hideInMenu: true,
+      routes:[
+        {
+          name:'我的申请',
+          path:'/profile/apply',
+          component:'./Profile/apply'
+        },
+        {
+          name:'我的审批',
+          path:'/profile/approve',
+          component:'./Profile/approve'
+        },
+        {
+          name:'已审核',
+          path:'/profile/approved',
+          component:'./Profile/approved'
+        }
+      ]
+      // component: './Profile/index',
+      // hideInMenu: true,
     },
+    // {
+    //   name: '个人中心',
+    //   path: '/profile',
+    //   component: './Profile/index',
+    //   hideInMenu: true,
+    // },
     {
       name: '审批详情',
       path: '/profile/:id',

+ 1 - 1
src/pages/ContractManager/component/Modal.jsx

@@ -537,7 +537,7 @@ const ContractModal = (props) => {
           <Col span={10} offset={1}>
             <Form.Item
               name="created_name"
-              initialValue={data?.created_name || user.CName}
+              initialValue={data?.created_name || user?.CName}
               label="创建人:"
             >
               <Input disabled />

+ 378 - 0
src/pages/Profile/apply.js

@@ -0,0 +1,378 @@
+import React, { Fragment, useState, useEffect, useMemo, useRef } from 'react';
+import { useNavigate } from 'umi';
+import {
+  Card,
+  Table,
+  Empty,
+  Button,
+  Modal,
+  message,
+  Form,
+  DatePicker,
+  Row,
+  Col,
+  Select,
+} from 'antd';
+import { PageContainer } from '@ant-design/pro-components';
+const { RangePicker } = DatePicker;
+import { useRequest, useModel } from '@umijs/max';
+import { queryProfileList, queryApplyList } from '@/services/boom';
+import dayjs from 'dayjs';
+import { queryContractCheck, queryGetContractList } from '@/services/contract';
+import ContractModal, {
+  Status,
+  StatusText,
+  Type,
+} from '../ContractManager/component/Modal';
+const TYPE = {
+  Contract: 1,
+  OA: 2,
+};
+function Apply(props) {
+  const { user } = useModel('userInfo');
+  const [tabActive, setTabActive] = useState('1');
+  const [detail, setDetail] = useState({});
+  const [conVisible, setConVisible] = useState(false);
+  const approveFormRef = useRef();
+  const [applyFormRef] = Form.useForm();
+  let navigate = useNavigate();
+  const contractResult = (res) => {
+    let data = res.data?.list?.map((item) => {
+      return {
+        ...item,
+        table_name: `${user.CName}提交的合同审批`,
+        table_desc: [
+          `合同名称:${item.name}`,
+          `合同编号:${item.code}`,
+          `合同金额:${item.amount}万元`,
+        ],
+        CName: user.CName,
+        create_time: item.cancel_on || item.created_on,
+        type: TYPE.Contract,
+        statusText: StatusText[item.status],
+        showBtn:
+          item.status == Status.Checking || item.status == Status.CalChecking,
+        // key: `${TYPE.Contract}_${item.id}`,
+      };
+    });
+    return { data, pagination: res.data?.pagination }
+  };
+  //OA我的申请列表
+  const {
+    data: OAApplyData,
+    run: OAApplyRun,
+    loading: OAApplyLoading,
+  } = useRequest(queryApplyList, {
+    // manual: true,
+    formatResult: (res) => {
+      return {
+        data: res.data?.list?.map((item) => {
+          return {
+            ...item,
+            CName: item.AuthorInfo.CName,
+            table_desc: [item.table_desc],
+            table_name: item.name
+          };
+        }),
+        pagination: res.data?.pagination
+      }
+    },
+  });
+  //合同管理相关数据
+  //请求我的申请列表
+  const {
+    data: conApplyData,
+    run: conApplyRun,
+    loading: conApplyLoading,
+  } = useRequest(queryGetContractList, {
+    manual: true,
+    defaultParams: [{ created_by: user?.ID, pageSize: 10 }],
+    formatResult: contractResult,
+  });
+  const applyData = useMemo(() => {
+    let result = [];
+    if (OAApplyData?.data && OAApplyData?.data.length > 0) result = [...OAApplyData?.data];
+    return result;
+  }, [OAApplyData]);
+  const onTabChange = (activeKey) => {
+    if (activeKey == '1') {
+      OAApplyRun();
+    } else {
+      conApplyRun({ current: 1, page_size: 10 });
+    }
+    setTabActive(activeKey);
+  };
+  const handleApplySubmit = (values) => {
+    console.log(values);
+    OAApplyRun(values);
+  };
+  const handleApplyPaginationChange = (pagination) => {
+    applyFormRef.validateFields().then((values) => {
+      OAApplyRun({
+        ...values,
+        currentPage: pagination.current,
+        pageSize: pagination.pageSize,
+      });
+    });
+  };
+  const handleProfilePaginationChange = (pagination) => {
+    conApplyRun({
+      current: pagination.current,
+      page_size: pagination.pageSize,
+    });
+  };
+  const columns = [
+    {
+      title: '标题',
+      dataIndex: 'table_name',
+      width: '30%',
+    },
+    // {
+    //   title: '摘要',
+    //   dataIndex: 'table_desc',
+    //   render: (descList) => {
+    //     return (
+    //       <ul>
+    //         {descList?.map((item) => (
+    //           <li>{item}</li>
+    //         ))}
+    //       </ul>
+    //     );
+    //   },
+    // },
+    {
+      title: '发起人',
+      dataIndex: 'CName',
+      width: '20%',
+    },
+    {
+      title: '发起时间',
+      render: (record) => {
+        return dayjs(record.create_time).format('YYYY-MM-DD HH:mm:ss');
+      },
+      width: '20%',
+    },
+    {
+      title: '流程状态',
+      // dataIndex: 'status',
+      render: (record) => {
+        switch (record.audit_status) {
+          case 0: return '审核中'
+          case 1: return '通过'
+          case 2: return '拒绝'
+          case 3: return '终审通过'
+        }
+      },
+      width: '20%'
+    },
+    {
+      title: '操作',
+      render: (text, record) => (
+        <Fragment>
+          <>
+            <a
+              style={{ color: '#4096ff' }}
+              onClick={() => {
+                navigate(`/profile/${record.id}`);
+              }}
+            >
+              申请
+            </a>
+          </>
+        </Fragment>
+      ),
+      width: '10%',
+    },
+  ];
+  const agreementColumns = [
+    {
+      title: '标题',
+      dataIndex: 'table_name',
+      width: '30%',
+    },
+    {
+      title: '摘要',
+      dataIndex: 'table_desc',
+      render: (descList) => {
+        return (
+          <ul>
+            {descList?.map((item) => (
+              <li>{item}</li>
+            ))}
+          </ul>
+        );
+      },
+    },
+    {
+      title: '发起人',
+      dataIndex: 'CName',
+      width: '20%',
+    },
+    {
+      title: '发起时间',
+      render: (record) => {
+        return dayjs(record.create_time).format('YYYY-MM-DD HH:mm:ss');
+      },
+      width: '20%',
+    },
+    {
+      title: '流程状态',
+      dataIndex: 'statusText',
+      // render: (record) => {
+      //   switch (record.audit_status) {
+      //     case 0: return '审核中'
+      //     case 1: return '通过'
+      //     case 2: return '拒绝'
+      //     case 3: return '终审通过'
+      //   }
+      // },
+      // width: '20%'
+    },
+    {
+      title: '操作',
+      render: (text, record) => (
+        <Fragment>
+          <>
+            <a
+              style={{ color: '#4096ff' }}
+              onClick={() => {
+                navigate(`/profile/${record.id}`);
+              }}
+            >
+              申请
+            </a>
+          </>
+        </Fragment>
+      ),
+      width: '10%',
+    },
+  ];
+  const renderPage = (activeKey) => {
+    if (activeKey == '1')
+      return (
+        <>
+          {' '}
+          <Form
+            name="basic"
+            // labelCol={{ span: 0 }}
+            // wrapperCol={{ span: 24 }}
+            onFinish={handleApplySubmit}
+            form={applyFormRef}
+          >
+            <div style={{ display: 'flex' }}>
+              {/* <Form.Item name="range-picker" label="申请时间:">
+                <RangePicker />
+              </Form.Item> */}
+              <Form.Item name="audit_status" label="状态:" initialValue="">
+                <Select
+                  style={{ width: 120 }}
+                  options={[
+                    { value: '', label: '全部' },
+                    { value: '0', label: '审核中' },
+                    { value: '1', label: '通过' },
+                    { value: '2', label: '拒绝' },
+                    { value: '3', label: '终审通过' },
+                  ]}
+                />
+              </Form.Item>
+              <Form.Item>
+                <Button
+                  type="primary"
+                  htmlType="submit"
+                  style={{ marginLeft: 10 }}
+                >
+                  查询
+                </Button>
+              </Form.Item>
+            </div>
+          </Form>
+          <Table
+            rowKey='id'
+            columns={columns}
+            dataSource={applyData}
+            loading={OAApplyLoading}
+            pagination={OAApplyData?.pagination}
+            onChange={handleApplyPaginationChange}
+          />
+        </>
+      );
+    else if (activeKey == '2')
+      return (
+        <>
+          {' '}
+          <Form
+            name="basic"
+            // labelCol={{ span: 0 }}
+            // wrapperCol={{ span: 24 }}
+            // onFinish={handleApproveSubmit}
+            ref={approveFormRef}
+          >
+            {/* <div style={{ display: 'flex' }}>
+              <Form.Item name="range-picker" label="审批时间:">
+                <RangePicker />
+              </Form.Item>
+              <Form.Item name="audit_status" label="状态:" initialValue="">
+                <Select
+                  style={{ width: 120 }}
+                  options={[
+                    { value: '', label: '全部' },
+                    { value: '0', label: '审核中' },
+                    { value: '1', label: '通过' },
+                    { value: '2', label: '拒绝' },
+                    { value: '3', label: '终审通过' },
+                  ]}
+                />
+              </Form.Item>
+              <Form.Item>
+                <Button
+                  type="primary"
+                  htmlType="submit"
+                  style={{ marginLeft: 10 }}
+                >
+                  查询
+                </Button>
+              </Form.Item>
+            </div> */}
+          </Form>
+          <Table
+            columns={agreementColumns}
+            dataSource={conApplyData?.data}
+            loading={conApplyLoading}
+            pagination={conApplyData?.pagination}
+            onChange={handleProfilePaginationChange}
+          />
+        </>
+      );
+  };
+  return (
+    <PageContainer
+      header={{
+        title: '我的申请',
+      }}
+      tabList={[
+        {
+          tab: 'OA审批',
+          key: '1',
+        },
+        {
+          tab: '合同管理',
+          key: '2',
+        },
+      ]}
+      onTabChange={onTabChange}
+    >
+      <div>{renderPage(tabActive)}</div>
+      <ContractModal
+        detail={detail}
+        type={Type.check}
+        // projectList={projectData?.list}
+        visible={conVisible}
+        handleOk={(data) =>
+          detail.status == Status.Checking ? runCheck(data) : null
+        }
+        handleCancel={() => setConVisible(false)}
+      />
+    </PageContainer>
+  );
+}
+export default Apply;

+ 353 - 0
src/pages/Profile/approve.js

@@ -0,0 +1,353 @@
+import React, { Fragment, useState, useEffect, useMemo, useRef } from 'react';
+import { useNavigate } from 'umi';
+import {
+  Card,
+  Table,
+  Empty,
+  Button,
+  Modal,
+  message,
+  Form,
+  DatePicker,
+  Row,
+  Col,
+  Select,
+} from 'antd';
+import { PageContainer } from '@ant-design/pro-components';
+const { RangePicker } = DatePicker;
+import { useRequest, useModel } from '@umijs/max';
+import { queryProfileList, queryApplyList } from '@/services/boom';
+import dayjs from 'dayjs';
+import { queryContractCheck, queryGetContractList } from '@/services/contract';
+import ContractModal, {
+  Status,
+  StatusText,
+  Type,
+} from '../ContractManager/component/Modal';
+const TYPE = {
+  Contract: 1,
+  OA: 2,
+};
+function Approve(props) {
+  const { user } = useModel('userInfo');
+  const [tabActive, setTabActive] = useState('1');
+  const [detail, setDetail] = useState({});
+  const [conVisible, setConVisible] = useState(false);
+  const approveFormRef = useRef();
+  const applyFormRef = useRef();
+  let navigate = useNavigate();
+  const contractResult = (res) => {
+    let data = res.data?.list?.map((item) => {
+      return {
+        ...item,
+        table_name: `${user.CName}提交的合同审批`,
+        table_desc: [
+          `合同名称:${item.name}`,
+          `合同编号:${item.code}`,
+          `合同金额:${item.amount}万元`,
+        ],
+        CName: user.CName,
+        create_time: item.cancel_on || item.created_on,
+        type: TYPE.Contract,
+        statusText: StatusText[item.status],
+        showBtn:
+          item.status == Status.Checking || item.status == Status.CalChecking,
+        // key: `${TYPE.Contract}_${item.id}`,
+      };
+    });
+    return { data, pagination: res.data?.pagination }
+  };
+  //OA我的审批和待审批列表
+  const {
+    data: OAAuditData,
+    run: OAAuditRun,
+    loading: OAAuditLoading,
+  } = useRequest(queryProfileList, {
+    formatResult: (res) => {
+      return {
+        data: res.data?.list?.map((item) => {
+          return {
+            ...item,
+            CName: item.AuthorInfo.CName,
+            table_desc: [item.table_desc],
+            statusText: item.status,
+            // key: `${TYPE.Contract}_${item.id}`,
+            showBtn: true,
+            type: TYPE.OA,
+          };
+        }),
+        pagination: res.data?.pagination
+      }
+    },
+  });
+  //合同 我的待审批列表
+  const {
+    data: conAuditData,
+    run: conAuditRun,
+    loading: conAduitLoading,
+  } = useRequest((data) => queryGetContractList(data), {
+    manual: true,
+    formatResult: contractResult,
+  });
+  const applyData = useMemo(() => {
+    let result = [];
+    if (OAAuditData?.data && OAAuditData?.data.length > 0) result = [...OAAuditData?.data];
+    return result;
+  }, [OAAuditData]);
+  const onTabChange = (activeKey) => {
+    if (activeKey == '1') {
+      OAAuditRun();
+    } else {
+      if (user?.Permission['menu-001-audit']) conAuditRun({ status: 1 });
+    }
+    setTabActive(activeKey);
+  };
+  const handleApplySubmit = (values) => {
+    console.log(values);
+    OAApplyRun(values);
+  };
+  const handleProfilePaginationChange = (pagination) => {
+    conApplyRun({
+      currentPage: pagination.current,
+      pageSize: 10,
+
+    });
+  };
+  const columns = [
+    {
+      title: '标题',
+      dataIndex: 'table_name',
+      width: '30%',
+    },
+    {
+      title: '摘要',
+      dataIndex: 'table_desc',
+      render: (descList) => {
+        return (
+          <ul>
+            {descList?.map((item) => (
+              <li>{item}</li>
+            ))}
+          </ul>
+        );
+      },
+    },
+    {
+      title: '发起人',
+      dataIndex: 'CName',
+      width: '20%',
+    },
+    {
+      title: '发起时间',
+      render: (record) => {
+        return dayjs(record.create_time).format('YYYY-MM-DD HH:mm:ss');
+      },
+      width: '20%',
+    },
+    {
+      title: '流程状态',
+      dataIndex: 'status',
+      // render: (record) => {
+      //   switch (record.audit_status) {
+      //     case 0: return '审核中'
+      //     case 1: return '通过'
+      //     case 2: return '拒绝'
+      //     case 3: return '终审通过'
+      //   }
+      // },
+      // width: '20%'
+    },
+    {
+      title: '操作',
+      render: (text, record) => (
+        <Fragment>
+          <>
+            <a
+              style={{ color: '#4096ff' }}
+              onClick={() => {
+                navigate(`/profile/${record.id}`);
+              }}
+            >
+              申请
+            </a>
+          </>
+        </Fragment>
+      ),
+      width: '10%',
+    },
+  ];
+  const agreementColumns = [
+    {
+      title: '标题',
+      dataIndex: 'table_name',
+    },
+    {
+      title: '摘要',
+      dataIndex: 'table_desc',
+      render: (descList) => {
+        return (
+          <ul>
+            {descList?.map((item) => (
+              <li>{item}</li>
+            ))}
+          </ul>
+        );
+      },
+    },
+    {
+      title: '发起人',
+      dataIndex: 'CName',
+    },
+    {
+      title: '发起时间',
+      render: (record) => {
+        return dayjs(record.create_time).format('YYYY-MM-DD HH:mm:ss');
+      },
+    },
+    {
+      title: '流程状态',
+      dataIndex: 'statusText',
+    },
+    {
+      title: '操作',
+      dataIndex: 'showBtn',
+      render: (text, record) => (
+        <>
+          {text ? (
+            <a
+              style={{ color: '#4096ff' }}
+              onClick={() => {
+                if (record.type == TYPE.Contract) {
+                  setDetail(record);
+                  setConVisible(true);
+                } else {
+                  navigate(`/oa/detail/${record.flow_id}/${record.id}`);
+                }
+              }}
+            >
+              审批
+            </a>
+          ) : (
+            <div>已审批</div>
+          )}
+        </>
+      ),
+    },
+  ];
+  const renderPage = (activeKey) => {
+    if (activeKey == '1')
+      return (
+        <>
+          {' '}
+          <Form
+            name="basic"
+            // labelCol={{ span: 0 }}
+            // wrapperCol={{ span: 24 }}
+            onFinish={handleApplySubmit}
+            ref={applyFormRef}
+          >
+            {/* <div style={{ display: 'flex' }}>
+              <Form.Item name="range-picker" label="申请时间:">
+                <RangePicker />
+              </Form.Item>
+              <Form.Item>
+                <Button
+                  type="primary"
+                  htmlType="submit"
+                  style={{ marginLeft: 10 }}
+                >
+                  查询
+                </Button>
+              </Form.Item>
+            </div> */}
+          </Form>
+          <Table
+            rowKey='id'
+            columns={columns}
+            dataSource={applyData}
+            loading={OAAuditLoading}
+          // pagination={queryApplyListRequest?.data?.pagination}
+          // onChange={handleApplyPaginationChange}
+          />
+        </>
+      );
+    else if (activeKey == '2')
+      return (
+        <>
+          {' '}
+          <Form
+            name="basic"
+            // labelCol={{ span: 0 }}
+            // wrapperCol={{ span: 24 }}
+            // onFinish={handleApproveSubmit}
+            ref={approveFormRef}
+          >
+            {/* <div style={{ display: 'flex' }}>
+              <Form.Item name="range-picker" label="审批时间:">
+                <RangePicker />
+              </Form.Item>
+              <Form.Item name="audit_status" label="状态:" initialValue="">
+                <Select
+                  style={{ width: 120 }}
+                  options={[
+                    { value: '', label: '全部' },
+                    { value: '0', label: '审核中' },
+                    { value: '1', label: '通过' },
+                    { value: '2', label: '拒绝' },
+                    { value: '3', label: '终审通过' },
+                  ]}
+                />
+              </Form.Item>
+              <Form.Item>
+                <Button
+                  type="primary"
+                  htmlType="submit"
+                  style={{ marginLeft: 10 }}
+                >
+                  查询
+                </Button>
+              </Form.Item>
+            </div> */}
+          </Form>
+          <Table
+            columns={agreementColumns}
+            dataSource={conAuditData?.data}
+            loading={conAduitLoading}
+            pagination={conAuditData?.pagination}
+          // onChange={handleProfilePaginationChange}
+          />
+        </>
+      );
+  };
+  return (
+    <PageContainer
+      header={{
+        title: '我的审批',
+      }}
+      tabList={[
+        {
+          tab: 'OA审批',
+          key: '1',
+        },
+        {
+          tab: '合同管理',
+          key: '2',
+        },
+      ]}
+      onTabChange={onTabChange}
+    >
+      <div>{renderPage(tabActive)}</div>
+      <ContractModal
+        detail={detail}
+        type={Type.check}
+        // projectList={projectData?.list}
+        visible={conVisible}
+        handleOk={(data) =>
+          detail.status == Status.Checking ? runCheck(data) : null
+        }
+        handleCancel={() => setConVisible(false)}
+      />
+    </PageContainer>
+  );
+}
+export default Approve;

+ 255 - 0
src/pages/Profile/approved.js

@@ -0,0 +1,255 @@
+import React, { Fragment, useState, useEffect, useMemo, useRef } from 'react';
+import { useNavigate } from 'umi';
+import {
+  Card,
+  Table,
+  Empty,
+  Button,
+  Modal,
+  message,
+  Form,
+  DatePicker,
+  Row,
+  Col,
+  Select,
+} from 'antd';
+import { PageContainer } from '@ant-design/pro-components';
+const { RangePicker } = DatePicker;
+import { useRequest, useModel } from '@umijs/max';
+import { queryProfileList, queryApplyList } from '@/services/boom';
+import dayjs from 'dayjs';
+import { queryApprovedList } from '@/services/contract';
+const TYPE = {
+  Contract: 1,
+  OA: 2,
+};
+function Approved(props) {
+  const { user } = useModel('userInfo');
+  // const [tabActive, setTabActive] = useState('1');
+  // const [detail, setDetail] = useState({});
+  const [conVisible, setConVisible] = useState(false);
+  const approveFormRef = useRef();
+  const applyFormRef = useRef();
+  let navigate = useNavigate();
+  const contractResult = (res) => {
+    let data = res.data?.list?.map((item) => {
+      return {
+        ...item,
+        table_name: `${user.CName}提交的合同审批`,
+        table_desc: [
+          `合同名称:${item.name}`,
+          `合同编号:${item.code}`,
+          `合同金额:${item.amount}万元`,
+        ],
+        CName: user.CName,
+        create_time: item.cancel_on || item.created_on,
+        type: TYPE.Contract,
+        statusText: StatusText[item.status],
+        showBtn:
+          item.status == Status.Checking || item.status == Status.CalChecking,
+        // key: `${TYPE.Contract}_${item.id}`,
+      };
+    });
+    return { data, pagination: res.data?.pagination }
+  };
+  //OA我审批过的列表
+  const {
+    data: conAuditedData,
+    run: conAuditedRun,
+    loading: conAduitedLoading,
+  } = useRequest((data) => queryApprovedList(data), {
+    // formatResult: contractResult,
+  });
+  // //合同 我审批过的列表
+  // const {
+  //   data: conAuditData,
+  //   run: conAuditRun,
+  //   loading: conAduitLoading,
+  // } = useRequest((data) => queryGetContractList(data), {
+  //   manual: true,
+  //   formatResult: contractResult,
+  // });
+  // const applyData = useMemo(() => {
+  //   let result = [];
+  //   if (conAuditedData?.data && conAuditedData?.data.length > 0) result = [...conAuditedData?.data];
+  //   return result;
+  // }, [conAuditedData]);
+  // const onTabChange = (activeKey) => {
+  //   if (activeKey == '1') {
+  //     conAuditedRun();
+  //   } else {
+
+  //   }
+  //   setTabActive(activeKey);
+  // };
+  const handleApplySubmit = (values) => {
+    console.log(values);
+    OAApplyRun(values);
+  };
+  const handleProfilePaginationChange = (pagination) => {
+    conApplyRun({
+      currentPage: pagination.current,
+      pageSize: 10,
+
+    });
+  };
+  const columns = [
+    {
+      title: '标题',
+      dataIndex: 'name',
+      width: '30%',
+    },
+    // {
+    //   title: '摘要',
+    //   dataIndex: 'table_desc',
+    //   render: (descList) => {
+    //     return (
+    //       <ul>
+    //         {descList?.map((item) => (
+    //           <li>{item}</li>
+    //         ))}
+    //       </ul>
+    //     );
+    //   },
+    // },
+    // {
+    //   title: '发起人',
+    //   dataIndex: 'CName',
+    //   width: '20%',
+    // },
+    {
+      title: '发起时间',
+      render: (record) => {
+        return dayjs(record.create_time).format('YYYY-MM-DD HH:mm:ss');
+      },
+      width: '20%',
+    },
+    {
+      title: '我审批的时间',
+      render: (record) => {
+        return dayjs(record.audit_time).format('YYYY-MM-DD HH:mm:ss');
+      },
+      width: '20%',
+    },
+    {
+      title: '状态',
+      // dataIndex: 'status',
+      render: (record) => {
+        switch (record.audit_status) {
+          case 0: return '审核中'
+          case 1: return '通过'
+          case 2: return '拒绝'
+          case 3: return '终审通过'
+        }
+      },
+      width: '20%'
+    },
+  ];
+
+  const renderPage = () => {
+    // if (activeKey == '1')
+    return (
+      <>
+        {' '}
+        <Form
+          name="basic"
+          // labelCol={{ span: 0 }}
+          // wrapperCol={{ span: 24 }}
+          onFinish={handleApplySubmit}
+          ref={applyFormRef}
+        >
+          {/* <div style={{ display: 'flex' }}>
+            <Form.Item name="range-picker" label="申请时间:">
+              <RangePicker />
+            </Form.Item>
+            <Form.Item>
+              <Button
+                type="primary"
+                htmlType="submit"
+                style={{ marginLeft: 10 }}
+              >
+                查询
+              </Button>
+            </Form.Item>
+          </div> */}
+        </Form>
+        <Table
+          rowKey='id'
+          columns={columns}
+          dataSource={conAuditedData?.list}
+          loading={conAduitedLoading}
+        // pagination={queryApplyListRequest?.data?.pagination}
+        // onChange={handleApplyPaginationChange}
+        />
+      </>
+    );
+    // else if (activeKey == '2')
+    //   return (
+    //     <>
+    //       {' '}
+    //       <Form
+    //         name="basic"
+    //         // labelCol={{ span: 0 }}
+    //         // wrapperCol={{ span: 24 }}
+    //         // onFinish={handleApproveSubmit}
+    //         ref={approveFormRef}
+    //       >
+    //         <div style={{ display: 'flex' }}>
+    //           <Form.Item name="range-picker" label="审批时间:">
+    //             <RangePicker />
+    //           </Form.Item>
+    //           <Form.Item name="audit_status" label="状态:" initialValue="">
+    //             <Select
+    //               style={{ width: 120 }}
+    //               options={[
+    //                 { value: '', label: '全部' },
+    //                 { value: '0', label: '审核中' },
+    //                 { value: '1', label: '通过' },
+    //                 { value: '2', label: '拒绝' },
+    //                 { value: '3', label: '终审通过' },
+    //               ]}
+    //             />
+    //           </Form.Item>
+    //           <Form.Item>
+    //             <Button
+    //               type="primary"
+    //               htmlType="submit"
+    //               style={{ marginLeft: 10 }}
+    //             >
+    //               查询
+    //             </Button>
+    //           </Form.Item>
+    //         </div>
+    //       </Form>
+    //       <Table
+    //         columns={agreementColumns}
+    //         dataSource={conAuditData?.data}
+    //         loading={conAduitLoading}
+    //         pagination={conAuditData?.pagination}
+    //       // onChange={handleProfilePaginationChange}
+    //       />
+    //     </>
+    //   );
+  };
+  return (
+    <PageContainer
+      header={{
+        title: '已审批',
+      }}
+    // tabList={[
+    //   {
+    //     tab: 'OA审批',
+    //     key: '1',
+    //   },
+    //   {
+    //     tab: '合同管理',
+    //     key: '2',
+    //   },
+    // ]}
+    // onTabChange={onTabChange}
+    >
+      <div>{renderPage()}</div>
+    </PageContainer>
+  );
+}
+export default Approved;

+ 1 - 0
src/services/boom.js

@@ -224,6 +224,7 @@ export async function queryProfileList() {
 export async function queryApplyList(params) {
   return request(`/api/v1/oa/audit/my/list`, { params });
 }
+
 // /**
 //   project_id
 //   version_id	大版本id

+ 7 - 0
src/services/contract.js

@@ -52,3 +52,10 @@ export const queryContractCancel = async (data) => {
     data,
   });
 };
+
+//OA已审核过的
+export const queryApprovedList = async (data) => {
+  return await request('/api/v1/oa/audited/my/list', {
+    params: data,
+  });
+};