فهرست منبع

Squashed commit of the following:
merge
commit af9764065902735710923239294ae6efd21850af
Author: XuZinan <tony.xu121508b2@yahoo.com>
Date: Thu Apr 27 18:52:30 2023 +0800

组件修复

commit 0ecc6f6c2a2703738052b9d06ddc250e84f6697a
Author: XuZinan <tony.xu121508b2@yahoo.com>
Date: Thu Apr 27 18:52:19 2023 +0800

OA审批撤回

commit 380b590e36eb214a065bce764906646f22d0a029
Merge: 8cf5a5f bbb4e6b
Author: hanxin <32479996@qq.com>
Date: Thu Apr 27 16:47:03 2023 +0800

Merge branch 'master' of http://120.55.44.4:10080/xujunjie/GtDigManageWeb

commit 8cf5a5f72af20803c2c5ad82be2534c2469b4be2
Author: hanxin <32479996@qq.com>
Date: Thu Apr 27 16:47:00 2023 +0800

logo宽度修改

commit bbb4e6b793b99c01cda111866ef37c17e0cef98f
Author: XuZinan <tony.xu121508b2@yahoo.com>
Date: Thu Apr 27 16:44:44 2023 +0800

菜单样式

commit 39d70bf1786c8ca37a6aa88b4b8d08774bb25e29
Author: hanxin <32479996@qq.com>
Date: Thu Apr 27 16:15:35 2023 +0800

菜单上边距调整

commit 97205911bbc1467c4bfec7dfebef4460337e3cf9
Author: hanxin <32479996@qq.com>
Date: Thu Apr 27 16:12:33 2023 +0800

头上部边距修改

commit 08a77484ff225c79fcb26a1d92f9ff1ca56371f9
Author: hanxin <32479996@qq.com>
Date: Thu Apr 27 16:07:41 2023 +0800

首页上边距

commit dc92efe6ea47eeb8d16fe9695177b83f65655640
Author: hanxin <32479996@qq.com>
Date: Thu Apr 27 15:58:58 2023 +0800

背景高度修改

commit b18b31633a3822ec19a92ad465bf0ebb6edc6267
Author: XuZinan <tony.xu121508b2@yahoo.com>
Date: Thu Apr 27 15:50:17 2023 +0800

菜单样式

commit e0ab66c407ca87829e037ab28e67082c1b585434
Merge: 6558d5c ef00dee
Author: Renxy <18510891294@163.com>
Date: Wed Apr 26 18:39:23 2023 +0800

Merge branch 'master' of http://120.55.44.4:10080/xujunjie/GtDigManageWeb

commit 6558d5cea7b3af07350db3f8934a6ee9eb3907b4
Author: Renxy <18510891294@163.com>
Date: Wed Apr 26 18:39:16 2023 +0800

修改默认选中提交人

commit ef00deecc21d0de06f178fae3b725c87221d4fa8
Author: hanxin <32479996@qq.com>
Date: Wed Apr 26 18:36:20 2023 +0800

菜单首页样式调整及头部调整

commit f727b8e78a0d3f32f2c49086d420d1f09e323784
Merge: aa43e34 7053d97
Author: hanxin <32479996@qq.com>
Date: Wed Apr 26 17:35:42 2023 +0800

Merge branch 'master' of http://120.55.44.4:10080/xujunjie/GtDigManageWeb

commit aa43e347bef645babb24bfcff1ceec8659b34338
Author: hanxin <32479996@qq.com>
Date: Wed Apr 26 17:35:38 2023 +0800

头部样式调整

commit 7053d97b96e3e7e19f14e2b130adbf47d639006d
Author: Renxy <18510891294@163.com>
Date: Wed Apr 26 17:17:34 2023 +0800

修改提交审批表单报错

commit 56878d9edf5295f70db44f63101ac719cffd4476
Merge: 37acf16 56d0611
Author: Renxy <18510891294@163.com>
Date: Wed Apr 26 16:25:41 2023 +0800

Merge branch 'master' of http://120.55.44.4:10080/xujunjie/GtDigManageWeb

commit 37acf161dea7a2d381c013486c39cba00fe2a08c
Author: Renxy <18510891294@163.com>
Date: Wed Apr 26 16:25:34 2023 +0800

需改合同及审批流管理条件节点选择联系人选不了

# Conflicts:
# src/components/DDComponents/InnerContactField/index.js
# src/pages/Profile/apply.js

Renxy 2 سال پیش
والد
کامیت
d60847a589
3فایلهای تغییر یافته به همراه77 افزوده شده و 20 حذف شده
  1. 2 2
      src/components/DDComponents/InnerContactField/index.js
  2. 70 18
      src/pages/Profile/apply.js
  3. 5 0
      src/services/boom.js

+ 2 - 2
src/components/DDComponents/InnerContactField/index.js

@@ -14,7 +14,7 @@ function InnerContactField(props) {
     run();
   }, []);
   useEffect(() => {
-    if (user && userList) onChange(String(user.ID));
+    if (user && userList) onChange?.(String(user.ID));
   }, [user, userList]);
   return (
     <Select
@@ -22,7 +22,7 @@ function InnerContactField(props) {
       value={user.ID}
       defaultValue={value ? Number(value) : undefined}
       onChange={(value) => {
-        onChange(String(value));
+        onChange?.(String(value));
         // onChange(JSON.stringify([value]));
       }}
       loading={loading}

+ 70 - 18
src/pages/Profile/apply.js

@@ -12,11 +12,13 @@ import {
   Row,
   Col,
   Select,
+  Divider,
 } from 'antd';
+import { ExclamationCircleOutlined } from '@ant-design/icons';
 import { PageContainer } from '@ant-design/pro-components';
 const { RangePicker } = DatePicker;
 import { useRequest, useModel } from '@umijs/max';
-import { queryProfileList, queryApplyList } from '@/services/boom';
+import { queryProfileList, queryApplyList, applyRepeal } from '@/services/boom';
 import dayjs from 'dayjs';
 import { queryContractCheck, queryGetContractList } from '@/services/contract';
 import ContractModal, {
@@ -39,6 +41,7 @@ function Apply(props) {
   const approveFormRef = useRef();
   const [applyFormRef] = Form.useForm();
   let navigate = useNavigate();
+
   const contractResult = (res) => {
     let data = res.data?.list?.map((item) => {
       return {
@@ -60,6 +63,7 @@ function Apply(props) {
     });
     return { data, pagination: res.data?.pagination };
   };
+
   //OA我的申请列表
   const {
     data: OAApplyData,
@@ -81,6 +85,7 @@ function Apply(props) {
       };
     },
   });
+
   //合同管理相关数据
   //请求我的申请列表
   const {
@@ -96,12 +101,25 @@ function Apply(props) {
       formatResult: contractResult,
     },
   );
+
+  //撤回申请
+  const { run: runRepeal, loading: repealLoading } = useRequest(
+    (id) => applyRepeal({ id: id }),
+    {
+      manual: true,
+      onSuccess: () => {
+        OAApplyRun();
+      },
+    },
+  );
+
   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();
@@ -110,10 +128,25 @@ function Apply(props) {
     }
     setTabActive(activeKey);
   };
+
+  const onRepeal = (record) => {
+    Modal.confirm({
+      title: '撤回',
+      icon: <ExclamationCircleOutlined />,
+      content: `确定撤回申请`,
+      okText: '确认',
+      cancelText: '取消',
+      onOk: () => {
+        runRepeal(record.id);
+      },
+    });
+  };
+
   const handleApplySubmit = (values) => {
     console.log(values);
     OAApplyRun(values);
   };
+
   const handleApplyPaginationChange = (pagination) => {
     applyFormRef.validateFields().then((values) => {
       OAApplyRun({
@@ -123,11 +156,13 @@ function Apply(props) {
       });
     });
   };
+
   const handleProfilePaginationChange = (pagination) => {
     conApplyRun({
       current: pagination.current,
     });
   };
+
   const columns = [
     {
       title: '标题',
@@ -163,6 +198,7 @@ function Apply(props) {
       title: '流程状态',
       // dataIndex: 'status',
       render: (record) => {
+        if (record.is_repeal) return '已撤回';
         switch (record.audit_status) {
           case 0:
             return '审核中';
@@ -178,20 +214,35 @@ function Apply(props) {
     },
     {
       title: '操作',
-      render: (text, record) => (
-        <Fragment>
-          <>
-            <a
-              style={{ color: '#4096ff' }}
-              onClick={() => {
-                navigate(`/profile/${record.id}`);
-              }}
-            >
-              详情
-            </a>
-          </>
-        </Fragment>
-      ),
+      render: (text, record) => {
+        return (
+          !record.is_repeal && (
+            <Fragment>
+              <>
+                <a
+                  style={{ color: '#4096ff' }}
+                  onClick={() => {
+                    navigate(`/profile/${record.id}`);
+                  }}
+                >
+                  详情
+                </a>
+                {tabActive == '1' && record?.audit_status == 0 && (
+                  <>
+                    <Divider type="vertical" />
+                    <a
+                      style={{ color: '#4096ff' }}
+                      onClick={() => onRepeal(record)}
+                    >
+                      撤回
+                    </a>
+                  </>
+                )}
+              </>
+            </Fragment>
+          )
+        );
+      },
       width: '10%',
     },
   ];
@@ -247,10 +298,11 @@ function Apply(props) {
             <a
               style={{ color: '#4096ff' }}
               onClick={() => {
-                navigate(`/profile/${record.id}`);
+                setDetail(record);
+                setConVisible(true);
               }}
             >
-              申请
+              详情
             </a>
           </>
         </Fragment>
@@ -372,7 +424,7 @@ function Apply(props) {
       <div>{renderPage(tabActive)}</div>
       <ContractModal
         detail={detail}
-        type={Type.check}
+        type={Type.detail}
         // projectList={projectData?.list}
         visible={conVisible}
         handleOk={(data) =>

+ 5 - 0
src/services/boom.js

@@ -230,6 +230,11 @@ export async function queryLeader() {
   return request(`/api/v1/oa/get-leader/list`);
 }
 
+//撤回申请
+export async function applyRepeal(params) {
+  return request(`/api/v1/oa/repeal/${params.id}`);
+}
+
 // /**
 //   project_id
 //   version_id	大版本id