Browse Source

Squashed commit of the following:
mearge
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

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

Renxy 2 years ago
parent
commit
b323d412f3

+ 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,

+ 1 - 1
src/app.tsx

@@ -32,7 +32,7 @@ export const layout: RunTimeLayoutConfig = (initialState) => {
   return {
     navTheme: 'light',
     layout: 'mix',
-    title: '金科环境数字化管理平台',
+    title: '',
     token: {
       header: {
         colorBgHeader: '#292f33',

BIN
src/assets/UnityMenu/Bom.png


BIN
src/assets/UnityMenu/Manufacturer.png


BIN
src/assets/UnityMenu/OA.png


BIN
src/assets/UnityMenu/agreement.png


BIN
src/assets/UnityMenu/newBackground.jpg


BIN
src/assets/UnityMenu/newBackground.png


BIN
src/assets/UnityMenu/project.png


BIN
src/assets/UnityMenu/time.png


BIN
src/assets/UnityMenu/transfer.png


BIN
src/assets/UnityMenu/userCenter.png


BIN
src/assets/UserDropdown/LineBottom.png


BIN
src/assets/UserDropdown/dropdownBg.png


BIN
src/assets/UserDropdown/userBg.png


BIN
src/assets/UserDropdown/userIcon.png


BIN
src/assets/floor.png


BIN
src/assets/header.png


BIN
src/assets/logo.png


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

@@ -5,14 +5,21 @@ 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(() => {
     run();
   }, []);
+  useEffect(() => {
+    if (user && userList) onChange(String(user.ID));
+  }, [user, userList]);
   return (
     <Select
       showSearch
+      value={user.ID}
       defaultValue={value ? Number(value) : undefined}
       onChange={(value) => {
         onChange(String(value));
@@ -22,7 +29,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}>

+ 1 - 1
src/components/PageContent/index.js

@@ -22,7 +22,7 @@ export default (props) => {
           margin: '20px 0',
         }}
       >
-        Copyright © 2021-2031 by 金科环境股份有限公司
+        Copyright   2021-2031 by GreenTech. All Rights Reserved.
       </div>
     </div>
   );

+ 56 - 11
src/components/UserDropdown/index.less

@@ -1,17 +1,62 @@
 /* 自定义样式 */
 .action {
-  color: #1890ff;
+  background-image: url(@/assets/UserDropdown/userBg.png);
+  background-size: contain;
+  background-repeat: no-repeat;
+  width: 128px;
+  height: 36px;
   cursor: pointer;
   display: inline-block;
-  margin-left: 16px;
-
-  &:hover {
-    color: #1890ff;
-  }
+  margin-right: 48px;
+  display: flex;
+  align-items: center;
+  justify-content: flex-start;
+}
+.userIcon {
+  background-image: url(@/assets/UserDropdown/userIcon.png);
+  background-size: contain;
+  background-repeat: no-repeat;
+  width: 14px;
+  height: 16px;
+  margin-left: 10px;
+  margin-right: 15px;
 }
-
 .name {
-  margin-left: 8px;
-  margin-right: 30px;
-  color: #fff;
-}
+  // margin-left: 8px;
+  // margin-right: 30px;
+  font-size: 15px;
+  font-weight: 350;
+  color: #e8f7fc;
+  line-height: 17px;
+  letter-spacing: 1px;
+  width: 66px;
+  text-align: right;
+  margin-left: 10px;
+}
+.dropdown {
+  display: flex;
+  flex-direction: column;
+  background: rgba(235, 235, 235, 0.9);
+  background-repeat: no-repeat;
+  margin-top: 20px;
+  a {
+    height: 40px;
+    width: 90%;
+    font-size: 14px;
+    font-weight: 400;
+    color: #5c7288;
+    line-height: 40px;
+    letter-spacing: 1px;
+    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
+    text-align: center;
+    margin-left: 5%;
+  }
+  .root {
+    :global {
+      .ant-dropdown {
+        padding-left: 14px;
+        min-width: 102px;
+      }
+    }
+  }
+}

+ 21 - 14
src/components/UserDropdown/index.tsx

@@ -6,22 +6,29 @@ import { LogoutOutlined, UserOutlined } from '@ant-design/icons';
 import styles from './index.less';
 import { useModel } from '@umijs/max';
 
-const items: MenuProps['items'] = [
-  {
-    key: '1',
-    label: <a href="/login">退出登录</a>,
-    icon: <LogoutOutlined />,
-  },
-];
+const RenderDropDown = (menu: any) => {
+  console.log(menu);
+  return <div className={styles.dropdown}>
+    <a key='1'>
+      修改密码
+    </a>
+
+    <a key='2' href='/login'>
+      退出登录
+    </a>
+  </div>
+}
 
 export default function UserDropdown(props: any) {
-  const { initialState: { user }  } = useModel('@@initialState');
+  const { initialState: { user } } = useModel('@@initialState');
   return (
-    <Dropdown placement="top" menu={{ items }}>
-      <a className={styles.action} onClick={(e) => e.preventDefault()}>
-        <Avatar icon={<UserOutlined />} />
-        <span className={styles.name}>{user?.CName}</span>
-      </a>
-    </Dropdown>
+    <div className={styles.root}>
+      <Dropdown placement="top" dropdownRender={(menu) => RenderDropDown(menu)}>
+        <a className={styles.action} onClick={(e) => e.preventDefault()}>
+          <span className={styles.name}>{user?.CName}</span>
+          <div className={styles.userIcon}></div>
+        </a>
+      </Dropdown>
+    </div>
   );
 }

+ 23 - 3
src/global.less

@@ -95,9 +95,29 @@ input[type='reset'] {
 }
 #pg-photo-container {
   width: 100% !important;
-    height: unset !important;
+  height: unset !important;
 }
-#pg-photo-container > img{
+#pg-photo-container > img {
   width: 100% !important;
   height: unset !important;
-}
+}
+.ant-pro-global-header {
+  background: transparent;
+  background-image: url(@/assets/header.png);
+  background-size: cover;
+  background-repeat: no-repeat;
+  margin-inline: 0;
+  height: 79px;
+}
+.ant-pro-layout .ant-layout-header.ant-pro-layout-header {
+  background-color: transparent;
+  height: 79px;
+}
+.ant-layout .ant-layout-header {
+  height: 79px;
+  line-height: 79px;
+}
+.ant-pro-global-header-logo-mix {
+  margin-left: 62px;
+}
+

+ 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]);

+ 22 - 30
src/pages/Home/index.less

@@ -1,5 +1,5 @@
 .background {
-  background-image: url(@/assets/UnityMenu/newBackground.jpg);
+  background-image: url(@/assets/UnityMenu/newBackground.png);
   width: 100%;
   height: calc(100vh - 56px);
   overflow-y: auto;
@@ -14,7 +14,6 @@
   align-items: center;
   background-color: #122c63;
 
-
   // align-items: flex-start;
   :global {
     .ant-popover-inner {
@@ -24,8 +23,8 @@
 }
 
 .menu {
-  width: 152px;
-  height: 152px;
+  width: 130px;
+  height: 130px;
   // background: linear-gradient(0deg, #285098, #1d3969);
   // box-shadow: 0px 3px 0.16rem 2px rgba(0, 0, 0, 0.3), 0px 5px 0.39rem 0.1rem rgba(0, 0, 0, 0.1);
   // border-radius: 50%;
@@ -37,57 +36,50 @@
 
 .menuContent {
   height: 100%;
-  width: 1480px;
+  width: 1486px;
   max-height: 100vh;
   overflow-y: hidden;
-  padding-top: 40px;
+  padding-top: 166px;
 }
 
 .menuFriName {
-  font-size: 24px;
   font-family: 'Microsoft YaHei UI';
-  /* Microsoft YaHei UI;*/
-  // font-weight: 400;
-  color: #bae3ff;
-  // line-height: 0.45rem;
-  // text-shadow: 0px 5px 14px rgba(0, 0, 0, 0.35), 0px 3px 12px rgba(0, 0, 0, 0.19);
   cursor: pointer;
   user-select: none;
-  letter-spacing: 2px;
   text-align: center;
   word-break: keep-all;
+  font-size: 16px;
+  font-weight: 400;
+  color: #caf0ff;
+  line-height: 18px;
+  letter-spacing: 1px;
 }
 
 .wrap {
   display: flex;
-  flex-wrap: wrap;
-  justify-content: center;
   align-items: center;
-  background: url("@/assets/floor.png") no-repeat bottom center;
+  background: url('@/assets/floor.png') no-repeat bottom center;
   background-size: contain;
-  margin-bottom: 100px;
-  padding: 0 170px;
-
-  .empty {
-    width: 25%;
-    height: 0;
-    visibility: hidden;
-  }
+  margin-bottom: 106px;
+  padding: 0 68px;
+  display: flex;
+  width: 100%;
 }
 
 .item {
   display: flex;
   flex-direction: column;
   align-items: center;
-  width: 25%;
-  height: 220px;
-  margin-bottom: 10px;
+  width: 130px;
+  height: 186px;
+  margin-bottom: 78px;
   user-select: none;
+  margin-left: 170px;
 }
 
 .pic {
-  width: 152px;
-  height: 152px;
+  width: 100%;
+  height: 100%;
   background-size: cover;
   background-repeat: no-repeat;
-}
+}

+ 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;
 };