Forráskód Böngészése

修改合同管理

Renxy 2 éve
szülő
commit
34bcfe8237

+ 3 - 3
.umirc.ts

@@ -17,8 +17,8 @@ export default defineConfig({
   proxy: {
     '/api': {
       // target: 'http://47.96.12.136:8788/',
-      target: 'http://47.96.12.136:8895/',
-      // target: 'http://120.55.44.4:8902/',
+      // target: 'http://47.96.12.136:8895/',
+      target: 'http://120.55.44.4:8902/',
       changeOrigin: true,
     },
   },
@@ -39,7 +39,7 @@ export default defineConfig({
       name: '首页',
       path: '/home',
       component: './Home/index',
-      menuRender: false
+      menuRender: false,
     },
     {
       name: '审批流管理',

+ 48 - 27
src/components/Flow/components/judgeComponent/index.tsx

@@ -1,9 +1,9 @@
-import React, { useEffect, useMemo, useState } from "react";
-import { Checkbox, Select, TreeSelect } from "antd";
-import { DeleteOutlined } from "@ant-design/icons";
-import { ComponentName, FormItem } from "../../node/judgeNode/mapServe";
-import { InputNumberField } from "../../node/fields";
-import { connect } from "umi";
+import React, { useEffect, useMemo, useState } from 'react';
+import { Checkbox, Select, TreeSelect } from 'antd';
+import { DeleteOutlined } from '@ant-design/icons';
+import { ComponentName, FormItem } from '../../node/judgeNode/mapServe';
+import { InputNumberField } from '../../node/fields';
+import { connect } from 'umi';
 
 const { Option } = Select;
 
@@ -22,30 +22,31 @@ export interface JudgeType {
 }
 
 export const JudgeOptions = [
-  { label: "小于", value: 1 },
-  { label: "大于", value: 2 },
-  { label: "小于等于", value: 3 },
-  { label: "等于", value: 4 },
-  { label: "大于等于", value: 5 },
-  { label: "介于(两个数之间)", value: 6 },
+  { label: '小于', value: 1 },
+  { label: '大于', value: 2 },
+  { label: '小于等于', value: 3 },
+  { label: '等于', value: 4 },
+  { label: '大于等于', value: 5 },
+  { label: '介于(两个数之间)', value: 6 },
 ];
 export const SiginOptions = [
-  { label: "<", value: 1 },
-  { label: "≤", value: 3 },
+  { label: '<', value: 1 },
+  { label: '≤', value: 3 },
 ];
 export const SiginSmallOptions = [
-  { label: "<", value: 2 },
-  { label: "≤", value: 5 },
+  { label: '<', value: 2 },
+  { label: '≤', value: 5 },
 ];
 
 const RenderJudge = (props: any) => {
-  const { formItems = "", onChange, depUserTree } = props;
+  const { formItems = '', onChange, depUserTree } = props;
   let formData: FormItem[] = formItems ? JSON.parse(formItems) : [];
+  console.log('==========formData================', formData);
 
   const handleChange = (
     values: any[],
     item: FormItem,
-    condition?: Condition
+    condition?: Condition,
   ) => {
     const itemCur = formData.find((cur) => cur.props.id == item.props.id);
     let judge: JudgeType = {
@@ -105,10 +106,10 @@ const RenderJudge = (props: any) => {
 
   const handleTreeChange = (values: (string | number)[], item: FormItem) => {
     const newValues = values.map((cur) => {
-      if (typeof cur == "string" && cur.includes("||")) {
-        return { type: "user", value: Number(cur.split("||")[0]), origin: cur };
+      if (typeof cur == 'string' && cur.includes('||')) {
+        return { type: 'user', value: Number(cur.split('||')[0]), origin: cur };
       } else {
-        return { type: "dep", value: cur, origin: cur };
+        return { type: 'dep', value: cur, origin: cur };
       }
     });
     handleChange(newValues, item);
@@ -120,7 +121,7 @@ const RenderJudge = (props: any) => {
       case ComponentName.Inner:
         component = (
           <>
-            <div style={{ display: "flex", justifyContent: "space-between" }}>
+            <div style={{ display: 'flex', justifyContent: 'space-between' }}>
               <div>发起人</div>
               <DeleteOutlined onClick={() => handleDelete(item)} />
             </div>
@@ -129,7 +130,7 @@ const RenderJudge = (props: any) => {
               multiple
               allowClear
               defaultValue={item.judge?.values?.map((item) => item.origin)}
-              style={{ width: "100%" }}
+              style={{ width: '100%' }}
               placeholder="请选择部门"
               treeData={depUserTree}
               onChange={(values) => {
@@ -141,13 +142,33 @@ const RenderJudge = (props: any) => {
         );
         break;
       case ComponentName.Depart:
+        component = (
+          <>
+            <div style={{ display: 'flex', justifyContent: 'space-between' }}>
+              <div>{item.props.label}</div>
+              <DeleteOutlined onClick={() => handleDelete(item)} />
+            </div>
+            {/* <Checkbox.Group
+              defaultValue={item.judge?.values}
+              onChange={(values: any) => handleChange(values, item)}
+            >
+              {options.map((cur: any, idx: number) => {
+                return (
+                  <Checkbox key={`${cur}_${idx}`} value={cur}>
+                    {cur}
+                  </Checkbox>
+                );
+              })}
+            </Checkbox.Group> */}
+          </>
+        );
         break;
       case ComponentName.Money:
       case ComponentName.Number:
         const { judge, props } = item;
         component = (
           <>
-            <div style={{ display: "flex", justifyContent: "space-between" }}>
+            <div style={{ display: 'flex', justifyContent: 'space-between' }}>
               <div>{props.label}</div>
               <DeleteOutlined onClick={() => handleDelete(item)} />
             </div>
@@ -165,7 +186,7 @@ const RenderJudge = (props: any) => {
               }}
             />
             {judge?.values[0] == 6 ? (
-              <div style={{ display: "flex", justifyContent: "space-between" }}>
+              <div style={{ display: 'flex', justifyContent: 'space-between' }}>
                 <InputNumberField
                   value={judge?.condition?.smallValue}
                   onChange={(value) => {
@@ -230,7 +251,7 @@ const RenderJudge = (props: any) => {
         const options = item.props.options;
         component = (
           <>
-            <div style={{ display: "flex", justifyContent: "space-between" }}>
+            <div style={{ display: 'flex', justifyContent: 'space-between' }}>
               <div>{item.props.label}</div>
               <DeleteOutlined onClick={() => handleDelete(item)} />
             </div>
@@ -257,5 +278,5 @@ const RenderJudge = (props: any) => {
 };
 
 export default connect(({ user }) => ({ depUserTree: user.depUserTree }))(
-  RenderJudge
+  RenderJudge,
 );

+ 7 - 2
src/components/Flow/components/judgeModal/index.tsx

@@ -7,6 +7,7 @@ const AddCondition = (props: any) => {
   const { items = [], formItems = '', onOk } = props;
   const [visible, setVisible] = useState(false);
   const [values, setValues] = useState([]);
+  console.log(formItems, items);
 
   let formData = useMemo(() => {
     let formDat = formItems ? JSON.parse(formItems) : [];
@@ -18,7 +19,7 @@ const AddCondition = (props: any) => {
     .filter((item: FormItem) => {
       return (
         (item.componentName == ComponentName.Inner ||
-          // item.componentName == 'DepartmentField' ||
+          // item.componentName == ComponentName.Depart ||
           item.componentName == ComponentName.Select ||
           item.componentName == ComponentName.MultiSelect ||
           item.componentName == ComponentName.Number ||
@@ -67,7 +68,11 @@ const AddCondition = (props: any) => {
         onCancel={() => setVisible(false)}
       >
         <p>请选择用来区分审批流程的条件字段 ,已选{values.length}个</p>
-        <Checkbox.Group value={values} onChange={(values) => onChange(values)}>
+        <Checkbox.Group
+          style={{ display: 'block' }}
+          value={values}
+          onChange={(values) => onChange(values)}
+        >
           {data.map((item: FormItem) => (
             <Checkbox key={item.props.id} value={item.props.id}>
               {item.props.label}

+ 8 - 0
src/components/InputSelect/NoDataIcon.js

@@ -0,0 +1,8 @@
+const NoDataIcon = () => {
+  return (
+    <div className={styles.noData}>
+      <img className={styles.noDataImg} src={require('@/assets/newUI/nodata.png')} />
+      <div className={styles.noDataText}>暂无数据</div>
+    </div>
+  );
+};

+ 14 - 0
src/components/InputSelect/UpLoadImg.js

@@ -0,0 +1,14 @@
+const UpLoadImg = () => {
+  return (
+    <div>
+      <Icon
+        type="cloud-upload"
+        style={{ color: '#fff', fontSize: '36px' }}
+        onClick={() => {
+          document.getElementById('files')?.click();
+        }}
+      />
+      <Input id="files" type="file" name="files" style={{ display: 'none' }} multiple />
+    </div>
+  );
+};

+ 44 - 0
src/components/InputSelect/index.js

@@ -0,0 +1,44 @@
+import React, { useEffect, useState } from 'react';
+import { Dropdown, Input, Menu, Spin, Tooltip } from 'antd';
+import styles from './index.less';
+import { DownOutlined } from '@ant-design/icons';
+
+const InputSelect = (props) => {
+  const { value = '', onChange, list } = props;
+  const [show, setShow] = useState(false);
+  useEffect(() => {
+    setShow(false);
+  }, [value]);
+  return (
+    <div className={styles.main}>
+      <Input
+        value={value}
+        onChange={(e) => {
+          onChange(e.target.value);
+          setShow(false);
+        }}
+        // addonAfter={<DownOutlined />}
+        onFocus={() => setShow(true)}
+        allowClear
+      />
+      {show && list && list.length > 0 && (
+        <ul className={styles.downUl}>
+          {list.map((item) => (
+            <Tooltip title={item.value}>
+              <li
+                key={item.key}
+                onClick={(e) => {
+                  onChange(item.value);
+                }}
+              >
+                {item.value}
+              </li>
+            </Tooltip>
+          ))}
+        </ul>
+      )}
+    </div>
+  );
+};
+
+export default InputSelect;

+ 49 - 0
src/components/InputSelect/index.less

@@ -0,0 +1,49 @@
+.noData{
+  position: relative;
+  text-align: center;
+  color: #fff;
+  font-size: 24px;
+  .noDataText{
+    position: absolute;
+    left: 50%;
+    bottom: 15px;
+    transform: translateX(-50%);
+  }
+  .noDataImg{
+    display: block;
+    margin: auto;
+  }
+}
+.down{
+  :global {
+    .ant-input-group-addon{
+      padding: 0;
+      font-size: 18px;
+    }
+    
+  }
+}
+.main{
+  position: relative;
+  
+}
+.downUl{
+  width: 100%;
+  height: 300px;
+  overflow-y: scroll;
+  border-radius: 5px;
+  position: absolute;
+  top: 34px;
+  background-color: #fff;
+  z-index: 9999;
+  border: 1px solid #eee;
+  border-radius: 5px;
+  padding: 4px 0 4px 10px;
+  & >li{
+    cursor: pointer;
+    padding: 4px 0;
+  }
+  & >li:hover{
+    background-color: #eee;
+  }
+}

+ 254 - 137
src/pages/ContractManager/component/Modal.jsx

@@ -14,6 +14,7 @@ import {
   InputNumber,
   Upload,
   Space,
+  Radio,
 } from 'antd';
 import ModuleTitle from '../../../components/ModuleTitle/moduleTitle';
 import { useEffect, useMemo, useState } from 'react';
@@ -22,6 +23,7 @@ import { useModel, useRequest } from '@umijs/max';
 import { CloudUploadOutlined } from '@ant-design/icons';
 import styles from '../index.less';
 import dayjs from 'dayjs';
+import InputSelect from '../../../components/InputSelect';
 export const Type = {
   add: 0, //新增
   detail: 1, //详情
@@ -72,9 +74,13 @@ const ContractModal = (props) => {
   //项目名称选择后,自动填入对应的项目编号
   const project_name = Form.useWatch('project_name', form);
 
+  //是否补充协议,是的话需要填合同编号
+  const is_supplement = Form.useWatch('is_supplement', form);
+
   const [isPass, setIsPass] = useState(1);
 
   const [fileList, setFileList] = useState([]);
+  const [fileExtendList, setFileExtendList] = useState([]);
 
   useEffect(() => {
     userListRun();
@@ -107,7 +113,7 @@ const ContractModal = (props) => {
     return false;
   }, [user]);
 
-  console.log('======================', data);
+  console.log('======================', data, is_supplement);
 
   useEffect(() => {
     if (company == 135) {
@@ -126,6 +132,10 @@ const ContractModal = (props) => {
     if (project_code) form.setFieldsValue({ project_code });
   }, [project_name]);
 
+  // useEffect(() => {
+  //   console.log('==================', is_supplement);
+  // }, [is_supplement]);
+
   const supplyList = useMemo(() => {
     return depList ? [...depList, ...supplierList] : supplierList;
   }, [depList, supplierList]);
@@ -133,6 +143,7 @@ const ContractModal = (props) => {
   const disableds = useMemo(() => {
     if (!visible) {
       setFileList([]);
+      setFileExtendList([]);
       setIsPass(1);
       setDepDisable(false);
       setDealDisable(false);
@@ -159,6 +170,18 @@ const ContractModal = (props) => {
       }
     },
   };
+  const UploadPropsExtend = {
+    action: `/api/contract/v1/attach`,
+    headers: {
+      'JWT-TOKEN': localStorage.getItem('JWT-TOKEN'),
+    },
+    onChange({ file, fileList }) {
+      if (file.status !== 'uploading') {
+        console.log(file, fileList);
+        setFileExtendList(fileList.map((item) => item.response?.data?.attach));
+      }
+    },
+  };
 
   const handleSubmit = () => {
     form.validateFields().then((values) => {
@@ -244,15 +267,22 @@ const ContractModal = (props) => {
       destroyOnClose
     >
       <Divider />
-      <ModuleTitle title="合同信息" />
       <Form
         form={form}
         // initialValues={data}
         labelCol={{ span: 7 }}
         wrapperCol={{ span: 17 }}
       >
+        <ModuleTitle title="创建人信息" />
         <Row>
           <Col span={10} offset={1}>
+            <Form.Item
+              name="created_name"
+              initialValue={data?.created_name || user?.CName}
+              label="创建人:"
+            >
+              <Input disabled />
+            </Form.Item>
             <Form.Item
               name="company_id"
               label="所属公司:"
@@ -281,6 +311,121 @@ const ContractModal = (props) => {
                 disabled={disableds.contract}
               />
             </Form.Item>
+          </Col>
+          <Col span={10}>
+            <Form.Item
+              name="created_on"
+              initialValue={data?.created_on || dayjs().format(FORMAT)}
+              label="创建时间:"
+            >
+              <Input disabled />
+            </Form.Item>
+            <Form.Item
+              name="dep_id"
+              label="所属部门:"
+              initialValue={data?.dep_id}
+            >
+              <TreeSelect
+                style={{ width: '100%' }}
+                placeholder="请选择"
+                showSearch
+                allowClear
+                treeDefaultExpandAll
+                fieldNames={{
+                  label: 'Name',
+                  value: 'ID',
+                  children: 'children',
+                }}
+                disabled={disableds.contract || depDisable}
+                dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
+                treeData={depList?.find((item) => item.Code == 'GT')?.children}
+              />
+            </Form.Item>
+          </Col>
+        </Row>
+        <ModuleTitle title="经办人信息" />
+        <Row>
+          <Col span={10} offset={1}>
+            <Form.Item
+              name="deal_by"
+              label="经办人:"
+              initialValue={data?.deal_by || user?.CName}
+              rules={[
+                {
+                  required: true,
+                  message: '请选择经办人',
+                },
+              ]}
+            >
+              <Select
+                showSearch
+                style={{ width: '100%' }}
+                placeholder="请选择"
+                disabled
+                filterOption={(input, option) =>
+                  (option?.label ?? '')
+                    .toLowerCase()
+                    .includes(input.toLowerCase())
+                }
+                options={userList?.map((item) => {
+                  return {
+                    value: item.CName,
+                    label: item.CName,
+                  };
+                })}
+              />
+            </Form.Item>
+          </Col>
+          <Col span={10}>
+            <Form.Item
+              name="created_dep"
+              label="签约承办部门:"
+              initialValue={data?.created_dep}
+              rules={[
+                {
+                  required: true,
+                  message: '请选择签约承办部门',
+                },
+              ]}
+            >
+              <TreeSelect
+                style={{ width: '100%' }}
+                placeholder="请选择"
+                showSearch
+                allowClear
+                disabled={disableds.contract}
+                fieldNames={{
+                  label: 'Name',
+                  value: 'Name',
+                  children: 'children',
+                }}
+                dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
+                treeData={depList?.find((item) => item.Code == 'GT')?.children}
+              />
+            </Form.Item>
+          </Col>
+        </Row>
+        <ModuleTitle title="合同信息" />
+
+        <Row>
+          <Col span={10} offset={1}>
+            <Form.Item
+              name="is_supplement"
+              label="是否补充协议:"
+              tooltip="合同名称"
+              initialValue={data?.name}
+              rules={[
+                {
+                  required: true,
+                  message: '请填写合同名称',
+                },
+              ]}
+            >
+              <Radio.Group>
+                <Radio value={1}>是</Radio>
+                <Radio value={0}>否</Radio>
+              </Radio.Group>
+            </Form.Item>
             <Form.Item
               name="name"
               label="合同名称:"
@@ -297,7 +442,7 @@ const ContractModal = (props) => {
             </Form.Item>
             <Form.Item
               name="effect_on"
-              label="合同生效日期:"
+              label="合同签订日期:"
               initialValue={data?.effect_on}
               rules={[
                 {
@@ -326,7 +471,15 @@ const ContractModal = (props) => {
                 },
               ]}
             >
-              <Select
+              <InputSelect
+                list={projectList?.map((item) => {
+                  return {
+                    key: item.id,
+                    value: item.project_name,
+                  };
+                })}
+              />
+              {/* <Select
                 style={{ width: '100%' }}
                 placeholder="请选择"
                 options={projectList?.map((item) => {
@@ -336,7 +489,7 @@ const ContractModal = (props) => {
                   };
                 })}
                 disabled={disableds.contract}
-              />
+              /> */}
             </Form.Item>
             <Form.Item
               name="party_a"
@@ -364,88 +517,29 @@ const ContractModal = (props) => {
                 disabled={disableds.contract}
               />
             </Form.Item>
-            <Form.Item
-              name="party_c"
-              label="丙方(及其他):"
-              initialValue={data?.party_c ? data?.party_c.split(',') : []}
-              rules={[
-                {
-                  required: true,
-                  message: '请选择(支持多选)',
-                },
-              ]}
-            >
-              <TreeSelect
-                style={{ width: '100%' }}
-                placeholder="请选择"
-                showSearch
-                multiple
-                allowClear
-                fieldNames={{
-                  label: 'Name',
-                  value: 'Name',
-                  children: 'children',
-                }}
-                dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
-                treeData={supplyList}
-                disabled={disableds.contract}
-              />
-            </Form.Item>
-            <Form.Item
-              name="created_dep"
-              label="签约承办部门:"
-              initialValue={data?.created_dep}
-              rules={[
-                {
-                  required: true,
-                  message: '请选择签约承办部门',
-                },
-              ]}
-            >
-              <TreeSelect
-                style={{ width: '100%' }}
-                placeholder="请选择"
-                showSearch
-                allowClear
-                disabled={disableds.contract}
-                fieldNames={{
-                  label: 'Name',
-                  value: 'Name',
-                  children: 'children',
-                }}
-                dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
-                treeData={depList?.find((item) => item.Code == 'GT')?.children}
-              />
-            </Form.Item>
           </Col>
           <Col span={10}>
             <Form.Item
-              name="dep_id"
-              label="所属部门:"
-              initialValue={data?.dep_id}
+              style={{ opacity: is_supplement ? 1 : 0 }}
+              name="parent_code"
+              initialValue={data?.parent_code}
+              label="原合同编号:"
+              rules={
+                is_supplement
+                  ? [
+                      {
+                        required: true,
+                        message: '请填写原合同编号',
+                      },
+                    ]
+                  : []
+              }
             >
-              <TreeSelect
-                style={{ width: '100%' }}
-                placeholder="请选择"
-                showSearch
-                allowClear
-                treeDefaultExpandAll
-                fieldNames={{
-                  label: 'Name',
-                  value: 'ID',
-                  children: 'children',
-                }}
-                disabled={disableds.contract || depDisable}
-                dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
-                treeData={depList?.find((item) => item.Code == 'GT')?.children}
-              />
+              <Input placeholder="请填写" />
             </Form.Item>
-            {/* {type != Type.add && ( */}
             <Form.Item name="code" initialValue={data?.code} label="合同编号:">
-              <Input placeholder="提交后自动生成" disabled />
+              <Input placeholder="请填写" />
             </Form.Item>
-            {/* )} */}
-
             <Form.Item
               label="合同总价款:"
               name="amount"
@@ -498,37 +592,30 @@ const ContractModal = (props) => {
                 treeData={supplyList}
               />
             </Form.Item>
-            <Form.Item
-              name="deal_by"
-              label="经办人:"
-              initialValue={data?.deal_by || user?.CName}
-              rules={[
-                {
-                  required: true,
-                  message: '请选择经办人',
-                },
-              ]}
-            >
-              <Select
-                showSearch
-                style={{ width: '100%' }}
-                placeholder="请选择"
-                disabled
-                filterOption={(input, option) =>
-                  (option?.label ?? '')
-                    .toLowerCase()
-                    .includes(input.toLowerCase())
-                }
-                options={userList?.map((item) => {
-                  return {
-                    value: item.CName,
-                    label: item.CName,
-                  };
-                })}
-              />
-            </Form.Item>
           </Col>
         </Row>
+        <Form.Item
+          name="party_c"
+          label="丙方(及其他):"
+          initialValue={data?.party_c ? data?.party_c.split(',') : []}
+          labelCol={{ span: 4 }}
+        >
+          <TreeSelect
+            style={{ width: '100%' }}
+            placeholder="请选择"
+            showSearch
+            multiple
+            allowClear
+            fieldNames={{
+              label: 'Name',
+              value: 'Name',
+              children: 'children',
+            }}
+            dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
+            treeData={supplyList}
+            disabled={disableds.contract}
+          />
+        </Form.Item>
         <Form.Item
           name="perform"
           initialValue={data?.perform}
@@ -537,41 +624,71 @@ const ContractModal = (props) => {
         >
           <Input.TextArea disabled={disableds.contract} />
         </Form.Item>
-        <Form.Item label="合同上传:" labelCol={{ span: 4 }}>
-          {type == Type.add ? (
-            <Upload {...UploadProps}>
-              <Button icon={<CloudUploadOutlined />}>Upload</Button>
-            </Upload>
-          ) : (
-            <ul>
-              {data?.attach &&
-                JSON.parse(data?.attach)?.map((item, idx) => (
-                  <li key={`${idx}_${item.name}`}>
-                    <Space>
-                      {item.name} <span>预览</span> <a href={item.url}>下载</a>
-                    </Space>
-                  </li>
-                ))}
-            </ul>
-          )}
-        </Form.Item>
         <Row>
           <Col span={10} offset={1}>
+            <Form.Item label="合同及合同附件上传:">
+              {type == Type.add ? (
+                <Upload {...UploadProps}>
+                  <Button icon={<CloudUploadOutlined />}>Upload</Button>
+                </Upload>
+              ) : (
+                <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>
+                    ))}
+                </ul>
+              )}
+            </Form.Item>
             <Form.Item
-              name="created_name"
-              initialValue={data?.created_name || user?.CName}
-              label="创建人:"
+              name="archives_dep"
+              initialValue={data?.archives_dep}
+              label="合同原件存档部门:"
             >
-              <Input disabled />
+              {company == 135 ? (
+                <Select
+                  style={{ width: '100%' }}
+                  options={[
+                    {
+                      value: '财务部',
+                      label: '财务部',
+                    },
+                    {
+                      value: '行政部',
+                      label: '行政部',
+                    },
+                  ]}
+                />
+              ) : (
+                <Input value={'综合管理部'} disabled={disableds.contract} />
+              )}
             </Form.Item>
           </Col>
           <Col span={10}>
-            <Form.Item
-              name="created_on"
-              initialValue={data?.created_on || dayjs().format(FORMAT)}
-              label="创建时间:"
-            >
-              <Input disabled />
+            <Form.Item label="合同相关资料上传:">
+              {type == Type.add ? (
+                <Upload {...UploadPropsExtend}>
+                  <Button icon={<CloudUploadOutlined />}>Upload</Button>
+                </Upload>
+              ) : (
+                <ul>
+                  {data?.attach_extend &&
+                    JSON.parse(data?.attach_extend)?.map((item, idx) => (
+                      <li key={`${idx}_${item.name}`}>
+                        <Space>
+                          {item.name} <span>预览</span>{' '}
+                          <a href={item.url}>下载</a>
+                        </Space>
+                      </li>
+                    ))}
+                </ul>
+              )}
             </Form.Item>
           </Col>
         </Row>

+ 10 - 2
src/pages/ContractManager/index.jsx

@@ -62,7 +62,7 @@ const ConteactManager = (props) => {
       width: 160,
     },
     {
-      title: '合同生效时间',
+      title: '合同签订时间',
       dataIndex: 'effect_on',
       key: 'effect_on',
       align: 'center',
@@ -81,6 +81,13 @@ const ConteactManager = (props) => {
       align: 'center',
       render: (text) => <EllipsisText text={text} width={120} />,
     },
+    {
+      title: '乙方',
+      dataIndex: 'party_b',
+      key: 'party_b',
+      align: 'center',
+      render: (text) => <EllipsisText text={text} width={120} />,
+    },
     {
       title: '丙方',
       dataIndex: 'party_c',
@@ -316,7 +323,7 @@ const ConteactManager = (props) => {
     <PageContent>
       <div className={styles.searchContent}>
         <div className={styles.itemFlex}>
-          <div>合同生效日期:</div>
+          <div>合同签订日期:</div>
           <DatePicker
             onChange={(e) => {
               setSearchData({
@@ -368,6 +375,7 @@ const ConteactManager = (props) => {
           />
         </div>
         <Input
+          style={{ width: 150 }}
           className={styles.inputSty}
           placeholder="请输入合同名称/编号"
           allowClear

+ 1 - 1
src/pages/ContractManager/index.less

@@ -3,8 +3,8 @@
 .searchContent{
   display: flex;
   align-items: center;
-  position: relative;
   margin-bottom: 40px;
+  width: calc(100% - 55px);
   .itemFlex{
     display: flex;
     align-items: center;

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

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

+ 0 - 1
src/pages/Flow/index.js

@@ -71,7 +71,6 @@ function Audit(props) {
             process_simple_json: detailRef.current.process_simple_json,
           };
           saveAuditFlowInfo(param).then((res) => message.success('添加成功'));
-          // dispatch({ type: 'flow/saveAuditFlowInfo', payload: param });
         }
         changeVisible('audit', false);
       },

+ 8 - 0
src/services/contract.js

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