Browse Source

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

hanxin 2 years ago
parent
commit
f727b8e78a

+ 1 - 1
.umirc.ts

@@ -16,7 +16,7 @@ export default defineConfig({
   publicPath: process.env.NODE_ENV == 'development' ? '/' : '/gt-dig/',
   proxy: {
     '/api': {
-      // target: 'http://47.96.12.136:8788/',
+      // target: 'http://47.96.12.136:8888/',
       // target: 'http://47.96.12.136:8895/',
       target: 'http://120.55.44.4:8902/',
       changeOrigin: true,

+ 5 - 1
src/components/DDComponents/InnerContactField/index.js

@@ -5,6 +5,9 @@ import { useEffect } from 'react';
 const { Option } = Select;
 
 function InnerContactField(props) {
+  const {
+    initialState: { user },
+  } = useModel('@@initialState');
   const { value, onChange, disabled = false } = props;
   const { userList, run, loading } = useModel('userList');
   useEffect(() => {
@@ -13,6 +16,7 @@ function InnerContactField(props) {
   return (
     <Select
       showSearch
+      value={user.ID}
       defaultValue={value ? Number(value) : undefined}
       onChange={(value) => {
         onChange(String(value));
@@ -22,7 +26,7 @@ function InnerContactField(props) {
       filterOption={(input, option) =>
         option.children.toLowerCase().includes(input.toLowerCase())
       }
-      disabled={disabled}
+      disabled={true}
     >
       {(userList || []).map((item) => (
         <Option key={item.ID} value={item.ID}>

+ 119 - 65
src/pages/ContractManager/component/Modal.jsx

@@ -18,7 +18,11 @@ import {
 } from 'antd';
 import ModuleTitle from '../../../components/ModuleTitle/moduleTitle';
 import { useEffect, useMemo, useState } from 'react';
-import { queryDepList, querySupplierList } from '@/services/contract';
+import {
+  queryCompany,
+  queryDepList,
+  querySupplierList,
+} from '@/services/contract';
 import { useModel, useRequest } from '@umijs/max';
 import { CloudUploadOutlined } from '@ant-design/icons';
 import styles from '../index.less';
@@ -52,7 +56,9 @@ export const Status = {
 
 const ContractModal = (props) => {
   const [form] = Form.useForm();
-  const { initialState: { user }  } = useModel('@@initialState');
+  const {
+    initialState: { user },
+  } = useModel('@@initialState');
   const { userList, run: userListRun } = useModel('userList');
   const { depList, run: depListRun } = useModel('depList');
   const FORMAT = 'YYYY-MM-DD';
@@ -82,9 +88,13 @@ const ContractModal = (props) => {
   const [fileList, setFileList] = useState([]);
   const [fileExtendList, setFileExtendList] = useState([]);
 
+  const { data: companyData, run: runCompany } = useRequest(queryCompany);
+  console.log('-=0000--------------', companyData);
+
   useEffect(() => {
     userListRun();
     depListRun();
+    runCompany();
   }, []);
 
   useEffect(() => {
@@ -113,14 +123,15 @@ const ContractModal = (props) => {
     return false;
   }, [user]);
 
-  console.log('======================', data, is_supplement);
-
   useEffect(() => {
-    if (company == 135) {
+    const item = companyData?.find((item) => item.ID == company);
+    if (item?.Flag == 1) {
       setDepDisable(false);
+      form.setFieldsValue({ dep_id: '', archives_dep: '' });
       // setDealDisable(false);
     } else {
       setDepDisable(true);
+      form.setFieldsValue({ dep_id: '综合管理部', archives_dep: '综合管理部' });
       // setDealDisable(true);
       // form.setFieldsValue({ deal_by: user?.CName });
     }
@@ -129,7 +140,11 @@ const ContractModal = (props) => {
     const project_code = projectList?.find(
       (item) => item.project_name == project_name,
     )?.project_full_code;
-    if (project_code) form.setFieldsValue({ project_code });
+    if (project_code) {
+      form.setFieldsValue({ project_code });
+    } else {
+      form.setFieldsValue({ project_code: '' });
+    }
   }, [project_name]);
 
   // useEffect(() => {
@@ -137,8 +152,8 @@ const ContractModal = (props) => {
   // }, [is_supplement]);
 
   const supplyList = useMemo(() => {
-    return depList ? [...depList, ...supplierList] : supplierList;
-  }, [depList, supplierList]);
+    return companyData ? [...companyData, ...supplierList] : supplierList;
+  }, [companyData, supplierList]);
 
   const disableds = useMemo(() => {
     if (!visible) {
@@ -166,6 +181,8 @@ const ContractModal = (props) => {
     onChange({ file, fileList }) {
       if (file.status !== 'uploading') {
         console.log(file, fileList);
+        const list = fileList.map((item) => item.response?.data?.attach);
+        form.setFieldsValue({ attach: list });
         setFileList(fileList.map((item) => item.response?.data?.attach));
       }
     },
@@ -191,25 +208,34 @@ const ContractModal = (props) => {
         if (parent_id) values.parent_id = parent_id;
         if (values.amount || values.amount == 0)
           values.amount = values.amount + '';
-        if (fileList.length > 0) values.attach = JSON.stringify(fileList);
-        if (values.party_c && values.party_c.length > 0)
-          values.party_c = values.party_c.join(',');
-        if (values.company_id == 135 && values.dep_id) {
+        if (values.attach) values.attach = JSON.stringify(values.attach);
+        if (fileExtendList.length > 0)
+          values.attach_extend = JSON.stringify(fileList);
+
+        // if (values.party_c && values.party_c.length > 0)
+        values.party_c = values.party_c?.join(',');
+
+        const companyItem = companyData?.find(
+          (item) => item.ID == values.company_id,
+        );
+        //所属公司为本部
+        if (companyItem.Flag == 1) {
           const item = getDepItemById(values.dep_id);
           if (item) {
             values.dep_name = item.Name;
             values.dep_code = item.Code;
           }
-          const companyItem = getDepItemById(values.company_id);
-          if (companyItem) values.company_name = companyItem.Name;
-        } else if (values.company_id) {
-          const item = getDepItemById(values.company_id);
-          if (item) {
-            values.company_name = item.Name;
-            values.company_code = item.Code;
-          }
+          values.company_name = companyItem.Name;
+        } else {
+          //为分子公司
+          values.company_name = companyItem.Name;
+          values.company_code = companyItem.Code;
+          values.dep_name = '综合管理部';
+          values.dep_code = '综合管理部';
+          values.dep_id = 0;
         }
         values.created_by = user?.ID;
+        console.log('-=-=-=-=-=-=-----values--------------', values);
         handleOk(values);
       } else if (type == Type.cancel) {
         let result = {
@@ -273,20 +299,20 @@ const ContractModal = (props) => {
         labelCol={{ span: 7 }}
         wrapperCol={{ span: 17 }}
       >
-        <ModuleTitle title="创建人信息" />
+        <ModuleTitle title="存档人信息" />
         <Row>
           <Col span={10} offset={1}>
             <Form.Item
               name="created_name"
               initialValue={data?.created_name || user?.CName}
-              label="创建人:"
+              label="存档人:"
             >
               <Input disabled />
             </Form.Item>
             <Form.Item
               name="company_id"
               label="所属公司:"
-              tooltip="所属公司"
+              tooltip="请选择该存档合同所属公司"
               initialValue={data?.company_id}
               rules={[
                 {
@@ -295,20 +321,22 @@ const ContractModal = (props) => {
                 },
               ]}
             >
-              <TreeSelect
+              <Select
+                showSearch
                 style={{ width: '100%' }}
                 placeholder="请选择"
-                showSearch
-                allowClear
-                treeDefaultExpandAll
-                fieldNames={{
-                  label: 'Name',
-                  value: 'ID',
-                  children: 'children',
-                }}
-                dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
-                treeData={depList}
                 disabled={disableds.contract}
+                filterOption={(input, option) =>
+                  (option?.label ?? '')
+                    .toLowerCase()
+                    .includes(input.toLowerCase())
+                }
+                options={companyData?.map((item) => {
+                  return {
+                    value: item.ID,
+                    label: item.Name,
+                  };
+                })}
               />
             </Form.Item>
           </Col>
@@ -316,7 +344,7 @@ const ContractModal = (props) => {
             <Form.Item
               name="created_on"
               initialValue={data?.created_on || dayjs().format(FORMAT)}
-              label="创建时间:"
+              label="存档时间:"
             >
               <Input disabled />
             </Form.Item>
@@ -330,7 +358,6 @@ const ContractModal = (props) => {
                 placeholder="请选择"
                 showSearch
                 allowClear
-                treeDefaultExpandAll
                 fieldNames={{
                   label: 'Name',
                   value: 'ID',
@@ -349,6 +376,7 @@ const ContractModal = (props) => {
             <Form.Item
               name="deal_by"
               label="经办人:"
+              tooltip="经办人应负责合同审批流程、签字盖章、合同原件存档和电子档案存档。母公司的经办人为OA审批提交人,也是存档人。子公司经办人由子公司合同专员填写,一般是合同审批时的提交人或者是合同实际执行的负责人"
               initialValue={data?.deal_by || user?.CName}
               rules={[
                 {
@@ -380,6 +408,7 @@ const ContractModal = (props) => {
             <Form.Item
               name="created_dep"
               label="签约承办部门:"
+              tooltip="请选择该存档合同的实际履行部门,一般为经办人所在部门"
               initialValue={data?.created_dep}
               rules={[
                 {
@@ -413,7 +442,7 @@ const ContractModal = (props) => {
               name="is_supplement"
               label="是否补充协议:"
               tooltip="合同名称"
-              initialValue={data?.name}
+              initialValue={0}
               rules={[
                 {
                   required: true,
@@ -429,7 +458,7 @@ const ContractModal = (props) => {
             <Form.Item
               name="name"
               label="合同名称:"
-              tooltip="合同名称"
+              tooltip="请与OA审批时填写的合同名称一致"
               initialValue={data?.name}
               rules={[
                 {
@@ -444,6 +473,7 @@ const ContractModal = (props) => {
               name="effect_on"
               label="合同签订日期:"
               initialValue={data?.effect_on}
+              tooltip="合同主体各方签字盖章完成之日,以最后签字盖章的为准"
               rules={[
                 {
                   required: true,
@@ -463,6 +493,7 @@ const ContractModal = (props) => {
             <Form.Item
               name="project_name"
               label="项目名称:"
+              tooltip="不涉及项目请填写“不涉及”"
               initialValue={data?.project_name}
               rules={[
                 {
@@ -537,12 +568,24 @@ const ContractModal = (props) => {
             >
               <Input placeholder="请填写" />
             </Form.Item>
-            <Form.Item name="code" initialValue={data?.code} label="合同编号:">
+            <Form.Item
+              name="code"
+              tooltip="请与OA审批时填写的合同编号一致。合同编号应按《合同管理办法》的合同编码规则编号"
+              initialValue={data?.code}
+              label="合同编号:"
+              rules={[
+                {
+                  required: true,
+                  message: '请填写合同编号',
+                },
+              ]}
+            >
               <Input placeholder="请填写" />
             </Form.Item>
             <Form.Item
               label="合同总价款:"
               name="amount"
+              tooltip="请与OA审批时填写的“合同金额”一致。不涉及金额填“0”"
               initialValue={data?.amount}
               rules={[
                 {
@@ -626,7 +669,17 @@ const ContractModal = (props) => {
         </Form.Item>
         <Row>
           <Col span={10} offset={1}>
-            <Form.Item label="合同及合同附件上传:">
+            <Form.Item
+              label="合同及合同附件上传:"
+              tooltip="请上传合同正式盖章文本的扫描件(含技术协议、质保承诺等附件),不得用照片、图片格式,不得遗漏附件"
+              name="attach"
+              rules={[
+                {
+                  required: true,
+                  message: '请上传合同及合同相关附件',
+                },
+              ]}
+            >
               {type == Type.add ? (
                 <Upload {...UploadProps}>
                   <Button icon={<CloudUploadOutlined />}>Upload</Button>
@@ -635,13 +688,7 @@ const ContractModal = (props) => {
                 <ul>
                   {data?.attach &&
                     JSON.parse(data?.attach)?.map((item, idx) => (
-                      <li key={`${idx}_${item.name}`}>
-                        {item.name}
-                        {/* <Space>
-                          {item.name} <span>预览</span>{' '}
-                          <a href={item.url}>下载</a>
-                        </Space> */}
-                      </li>
+                      <li key={`${idx}_${item.name}`}>{item.name}</li>
                     ))}
                 </ul>
               )}
@@ -650,28 +697,35 @@ const ContractModal = (props) => {
               name="archives_dep"
               initialValue={data?.archives_dep}
               label="合同原件存档部门:"
+              tooltip="母公司财务部和采购部门的合同请选择“财务部”,其他部门请选择“行政部”,子公司合同选择“综合管理部”"
             >
-              {company == 135 ? (
-                <Select
-                  style={{ width: '100%' }}
-                  options={[
-                    {
-                      value: '财务部',
-                      label: '财务部',
-                    },
-                    {
-                      value: '行政部',
-                      label: '行政部',
-                    },
-                  ]}
-                />
-              ) : (
-                <Input value={'综合管理部'} disabled={disableds.contract} />
-              )}
+              <Select
+                style={{ width: '100%' }}
+                options={[
+                  {
+                    value: '财务部',
+                    label: '财务部',
+                  },
+                  {
+                    value: '行政部',
+                    label: '行政部',
+                  },
+                ]}
+                disabled={disableds.contract || depDisable}
+              />
             </Form.Item>
           </Col>
           <Col span={10}>
-            <Form.Item label="合同相关资料上传:">
+            <Form.Item
+              label="合同相关资料上传:"
+              tooltip="依据《合同管理办法》,合同相关资料需要作为合同电子档案的一部分,包括:
+              1)合同会审纪要或投资决策通知书(如有);
+              2)合同相对方的营业执照等资质证的复印件(首次签约的须加盖公章)、个人身份证复印件(合同一方为自然人时提供);
+              3)合同相对方经办人员的授权委托书原件及其身份证复印件(如有);
+              4) 涉及房屋或场地租赁的,还应提供房屋及场地的权属证明资料,但如果续签租赁合同,且房屋所有权人没有发生变更的,在附具相关说明后可不再提供上述资料;
+              5)其他资料。
+              "
+            >
               {type == Type.add ? (
                 <Upload {...UploadPropsExtend}>
                   <Button icon={<CloudUploadOutlined />}>Upload</Button>

+ 9 - 6
src/pages/ContractManager/index.jsx

@@ -7,6 +7,7 @@ import { useRequest, useModel } from '@umijs/max';
 import { connect } from 'umi';
 import {
   queryApproval,
+  queryCompany,
   queryContract,
   queryContractCancel,
   queryContractCancelCheck,
@@ -29,7 +30,9 @@ const ConteactManager = (props) => {
     current: 1,
     name: '',
   });
-  const { initialState: { user }  } = useModel('@@initialState');
+  const {
+    initialState: { user },
+  } = useModel('@@initialState');
   const [visible, setVisible] = useState(false);
   const [detail, setDetail] = useState({});
   const [data, setData] = useState([]);
@@ -46,9 +49,9 @@ const ConteactManager = (props) => {
         if (user?.Permission['menu-001-audit'] || record.created_by == user.ID)
           bool = true;
         break;
-      case 'addOrCal':
-        if (record.created_by == user.ID) bool = true;
-        break;
+      // case 'addOrCal':
+      //   if (record.created_by == user.ID) bool = true;
+      //   break;
     }
     return bool;
   };
@@ -181,7 +184,7 @@ const ConteactManager = (props) => {
             {showBtn(record, 'download') && (
               <a onClick={() => handleUpload(record)}>下载</a>
             )}
-            {showBtn(record, 'addOrCal') && !record.parent_id && (
+            {/* {showBtn(record, 'addOrCal') && !record.parent_id && (
               <a
                 onClick={() => {
                   typeRef.current = Type.add;
@@ -192,7 +195,7 @@ const ConteactManager = (props) => {
               >
                 增补
               </a>
-            )}
+            )} */}
             <a
               onClick={() => {
                 typeRef.current = Type.cancel;

+ 3 - 0
src/pages/Flow/Audit.js

@@ -54,6 +54,9 @@ function Audit(props) {
     dispatch({
       type: 'user/fetch',
     });
+    dispatch({
+      type: 'user/fetchDepV2',
+    });
   }, []);
 
   const onChange = (values) => {

+ 2 - 2
src/pages/Flow/OaAuditDetail.js

@@ -50,7 +50,7 @@ function OaAuditDetail(props) {
   const btns = useMemo(() => {
     if (!user || !data) return;
     if (
-      user.ID == AuditorInfo.ID &&
+      user.ID == AuditorInfo?.ID &&
       // 0 待审核; 1  上级审批通过
       (audit_status === 0 || audit_status === 1)
     ) {
@@ -75,7 +75,7 @@ function OaAuditDetail(props) {
     <PageContent extra={btns} loading={loading}>
       <Steps
         style={{ marginBottom: 20 }}
-        current={audit_status == 3 ? OaAuditList.length : current_seq - 1}
+        current={audit_status == 3 ? OaAuditList?.length : current_seq - 1}
         status={audit_status == 2 ? 'error' : 'process'}
         items={OaAuditList?.map((item) => ({
           title: item.seq_name,

+ 22 - 19
src/pages/Flow/components/ApprovalProcess.tsx

@@ -27,25 +27,28 @@ const ApprovalProcess = (props: any) => {
   const { userList, run } = useModel('userList');
 
   const list = useMemo(() => {
-    approvalProcess?.forEach((item: any) => {
-      if (item.length > 1 && item[0].type == TYPE.USER) {
-        item.forEach((curUser: any) => {
-          curUser.name =
-            userList.find((user: any) => user.ID == curUser.value)?.CName ||
+    approvalProcess
+      ?.filter((item: any) => item)
+      .forEach((item: any) => {
+        if (item.length > 1 && item[0].type == TYPE.USER) {
+          item.forEach((curUser: any) => {
+            curUser.name =
+              userList?.find((user: any) => user.ID == curUser.value)?.CName ||
+              '-';
+          });
+        } else if (item.length == 1 && item[0].type == TYPE.USER) {
+          item[0].name =
+            userList?.find((user: any) => user.ID == item[0].value)?.CName ||
             '-';
-        });
-      } else if (item.length == 1 && item[0].type == TYPE.USER) {
-        item[0].name =
-          userList.find((user: any) => user.ID == item[0].value)?.CName || '-';
-      } else if (item.length == 1 && item[0].nowType == TYPE.USER) {
-        item[0].name =
-          userList.find((user: any) => user.ID == item[0].nowValue)?.CName ||
-          '-';
-      } else {
-        item[0].name = null;
-      }
-    });
-    return approvalProcess;
+        } else if (item.length == 1 && item[0].nowType == TYPE.USER) {
+          item[0].name =
+            userList?.find((user: any) => user.ID == item[0].nowValue)?.CName ||
+            '-';
+        } else {
+          item[0].name = null;
+        }
+      });
+    return approvalProcess?.filter((item: any) => item);
   }, [approvalProcess]);
 
   const onStepsChange = async (current: any, list: any) => {
@@ -60,7 +63,7 @@ const ApprovalProcess = (props: any) => {
 
   const selectedUserId = ({ target: { value } }: RadioChangeEvent) => {
     //userId
-    const name = userList.find((user: any) => user.ID == value)?.CName || '-';
+    const name = userList?.find((user: any) => user.ID == value)?.CName || '-';
     const data = { nowType: TYPE.USER, nowValue: Number(value), name }; //type: TYPE.USER, value: Number(value)
     list[curNodeIdx][0] = { ...list[curNodeIdx][0], ...data };
     console.log([...list]);

+ 30 - 20
src/pages/Profile/apply.js

@@ -30,7 +30,9 @@ const TYPE = {
   OA: 2,
 };
 function Apply(props) {
-  const { initialState: { user }  } = useModel('@@initialState');
+  const {
+    initialState: { user },
+  } = useModel('@@initialState');
   const [tabActive, setTabActive] = useState('1');
   const [detail, setDetail] = useState({});
   const [conVisible, setConVisible] = useState(false);
@@ -56,7 +58,7 @@ function Apply(props) {
         // key: `${TYPE.Contract}_${item.id}`,
       };
     });
-    return { data, pagination: res.data?.pagination }
+    return { data, pagination: res.data?.pagination };
   };
   //OA我的申请列表
   const {
@@ -72,11 +74,11 @@ function Apply(props) {
             ...item,
             CName: item.AuthorInfo.CName,
             table_desc: [item.table_desc],
-            table_name: item.name
+            table_name: item.name,
           };
         }),
-        pagination: res.data?.pagination
-      }
+        pagination: res.data?.pagination,
+      };
     },
   });
   //合同管理相关数据
@@ -85,21 +87,26 @@ function Apply(props) {
     data: conApplyData,
     run: conApplyRun,
     loading: conApplyLoading,
-  } = useRequest(queryGetContractList, {
-    // manual: true,
-    defaultParams: [{ created_by: user?.ID, pageSize: 10 }],
-    formatResult: contractResult,
-  });
+  } = useRequest(
+    (data) =>
+      queryGetContractList({ created_by: user?.ID, pageSize: 10, ...data }),
+    {
+      // 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];
+    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 });
+      conApplyRun({ current: 1 });
     }
     setTabActive(activeKey);
   };
@@ -119,7 +126,6 @@ function Apply(props) {
   const handleProfilePaginationChange = (pagination) => {
     conApplyRun({
       current: pagination.current,
-      page_size: pagination.pageSize,
     });
   };
   const columns = [
@@ -158,13 +164,17 @@ function Apply(props) {
       // dataIndex: 'status',
       render: (record) => {
         switch (record.audit_status) {
-          case 0: return '审核中'
-          case 1: return '通过'
-          case 2: return '拒绝'
-          case 3: return '终审通过'
+          case 0:
+            return '审核中';
+          case 1:
+            return '通过';
+          case 2:
+            return '拒绝';
+          case 3:
+            return '终审通过';
         }
       },
-      width: '20%'
+      width: '20%',
     },
     {
       title: '操作',
@@ -288,7 +298,7 @@ function Apply(props) {
             </div>
           </Form>
           <Table
-            rowKey='id'
+            rowKey="id"
             columns={columns}
             dataSource={applyData}
             loading={OAApplyLoading}
@@ -373,4 +383,4 @@ function Apply(props) {
     </PageContent>
   );
 }
-export default Apply;
+export default Apply;

+ 4 - 2
src/pages/Profile/approve.js

@@ -34,7 +34,9 @@ const TYPE = {
   OA: 2,
 };
 function Approve(props) {
-  const { initialState: { user }  } = useModel('@@initialState');
+  const {
+    initialState: { user },
+  } = useModel('@@initialState');
   const [tabActive, setTabActive] = useState('1');
   const [detail, setDetail] = useState({});
   const [conVisible, setConVisible] = useState(false);
@@ -45,7 +47,7 @@ function Approve(props) {
     let data = res.data?.list?.map((item) => {
       return {
         ...item,
-        table_name: `${user.CName}提交的合同审批`,
+        table_name: `${item.created_name}提交的合同审批`,
         table_desc: [
           `合同名称:${item.name}`,
           `合同编号:${item.code}`,

+ 0 - 2
src/pages/Profile/index.js

@@ -13,7 +13,6 @@ import {
   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';
@@ -27,7 +26,6 @@ import ContractModal, {
 import PageContent from '@/components/PageContent';
 
 function profile(props) {
-  const { submitting, params, dispatch } = props;
   const {
     initialState: { user },
   } = useModel('@@initialState');

+ 1 - 2
src/services/contract.js

@@ -70,8 +70,7 @@ export const queryApprovedList = async (data) => {
 
 //公司列表
 export const queryCompany = async (data) => {
-  const res = await request('/api/v2/company', {
+  return await request('/api/v2/company', {
     params: data,
   });
-  return res?.data;
 };