|
@@ -5,82 +5,192 @@ import {
|
|
Col,
|
|
Col,
|
|
Input,
|
|
Input,
|
|
DatePicker,
|
|
DatePicker,
|
|
- Upload,
|
|
|
|
|
|
+ Icon,
|
|
Button,
|
|
Button,
|
|
Divider,
|
|
Divider,
|
|
Steps,
|
|
Steps,
|
|
|
|
+ Select,
|
|
|
|
+ TreeSelect,
|
|
|
|
+ InputNumber,
|
|
|
|
+ Upload,
|
|
|
|
+ Space,
|
|
} from 'antd';
|
|
} from 'antd';
|
|
import ModuleTitle from '../../../components/ModuleTitle/moduleTitle';
|
|
import ModuleTitle from '../../../components/ModuleTitle/moduleTitle';
|
|
|
|
+import { useEffect, useMemo, useState } from 'react';
|
|
|
|
+import { queryDepList, querySupplierList } from '@/services/contract';
|
|
|
|
+import { useModel, useRequest } from '@umijs/max';
|
|
import { CloudUploadOutlined } from '@ant-design/icons';
|
|
import { CloudUploadOutlined } from '@ant-design/icons';
|
|
-import moment from 'moment';
|
|
|
|
|
|
+import styles from '../index.less';
|
|
|
|
+import dayjs from 'dayjs';
|
|
|
|
+export const Type = {
|
|
|
|
+ add: 0, //新增
|
|
|
|
+ detail: 1, //详情
|
|
|
|
+ cancel: 2, //作废
|
|
|
|
+ check: 3, //审核
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+export const StatusText = [
|
|
|
|
+ '',
|
|
|
|
+ '待审核',
|
|
|
|
+ '审核拒绝',
|
|
|
|
+ '已存档',
|
|
|
|
+ '作废待审核',
|
|
|
|
+ '作废拒绝',
|
|
|
|
+ '已作废',
|
|
|
|
+];
|
|
|
|
+export const Status = {
|
|
|
|
+ None: 0,
|
|
|
|
+ Checking: 1,
|
|
|
|
+ CheckReject: 2,
|
|
|
|
+ CheckSuccess: 3,
|
|
|
|
+ CalChecking: 4,
|
|
|
|
+ CalCheckReject: 5,
|
|
|
|
+ CalCheckSuccess: 6,
|
|
|
|
+};
|
|
|
|
|
|
const ContractModal = (props) => {
|
|
const ContractModal = (props) => {
|
|
- const Type = {
|
|
|
|
- add: 0, //新增
|
|
|
|
- detail: 1, //详情
|
|
|
|
- cancel: 2, //作废
|
|
|
|
- };
|
|
|
|
- const FORMAT = 'YYYY-MM-DD';
|
|
|
|
- const { title, type, visible, handleOk, handleCancel } = props;
|
|
|
|
const [form] = Form.useForm();
|
|
const [form] = Form.useForm();
|
|
|
|
+ const { user } = useModel('userInfo');
|
|
|
|
+ const { userList, run: userListRun } = useModel('userList');
|
|
|
|
+ const { depList, run: depListRun } = useModel('depList');
|
|
|
|
+ const FORMAT = 'YYYY-MM-DD';
|
|
|
|
+ const {
|
|
|
|
+ type,
|
|
|
|
+ visible,
|
|
|
|
+ projectList = [],
|
|
|
|
+ handleOk,
|
|
|
|
+ handleCancel,
|
|
|
|
+ parent_id,
|
|
|
|
+ } = props;
|
|
|
|
+ const title =
|
|
|
|
+ type == Type.add ? '新增' : type == Type.detail ? '详情' : '作废';
|
|
|
|
+ //所属公司为总部时才能选择部门,为子公司时,部门不能操作 所属部门为子公司的需要填经办人
|
|
|
|
+ const company = Form.useWatch('company_name', form);
|
|
|
|
+ const [depDisable, setDepDisable] = useState(false);
|
|
|
|
+ const [dealDisable, setDealDisable] = useState(false);
|
|
|
|
+ //项目名称选择后,自动填入对应的项目编号
|
|
|
|
+ const project_code = Form.useWatch('project_name', form);
|
|
|
|
+
|
|
|
|
+ const [isPass, setIsPass] = useState(1);
|
|
|
|
+
|
|
|
|
+ const [fileList, setFileList] = useState([]);
|
|
|
|
+
|
|
|
|
+ useEffect(() => {
|
|
|
|
+ userListRun();
|
|
|
|
+ depListRun();
|
|
|
|
+ }, []);
|
|
|
|
+
|
|
|
|
+ //供应商列表
|
|
|
|
+ const { data: supplierList = [], loading } = useRequest(querySupplierList, {
|
|
|
|
+ defaultParams: [
|
|
|
|
+ {
|
|
|
|
+ project_id: 1,
|
|
|
|
+ is_super: false,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ formatResult: (data) => {
|
|
|
|
+ return data?.list
|
|
|
|
+ ? data.list.map((item) => {
|
|
|
|
+ return { ...item, Name: item.name };
|
|
|
|
+ })
|
|
|
|
+ : [];
|
|
|
|
+ },
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ useEffect(() => {
|
|
|
|
+ if (company == 135) {
|
|
|
|
+ setDepDisable(false);
|
|
|
|
+ setDealDisable(false);
|
|
|
|
+ } else {
|
|
|
|
+ setDepDisable(true);
|
|
|
|
+ setDealDisable(true);
|
|
|
|
+ form.setFieldsValue({ deal_by: user?.CName });
|
|
|
|
+ }
|
|
|
|
+ }, [company]);
|
|
|
|
+ useEffect(() => {
|
|
|
|
+ form.setFieldsValue({ project_code });
|
|
|
|
+ }, [project_code]);
|
|
|
|
+
|
|
|
|
+ const supplyList = useMemo(() => {
|
|
|
|
+ return depList ? [...depList, ...supplierList] : supplierList;
|
|
|
|
+ }, [depList, supplierList]);
|
|
|
|
+
|
|
|
|
+ const disableds = useMemo(() => {
|
|
|
|
+ if (type == Type.add) {
|
|
|
|
+ return { contract: false, check: true };
|
|
|
|
+ } else if (type == Type.detail) {
|
|
|
|
+ return { contract: true, check: true };
|
|
|
|
+ } else if (type == Type.cancel) {
|
|
|
|
+ return { contract: true, check: true };
|
|
|
|
+ }
|
|
|
|
+ return { contract: true, check: false };
|
|
|
|
+ }, [type, visible]);
|
|
|
|
+
|
|
const data = {
|
|
const data = {
|
|
company_name: 'hdhdhdh',
|
|
company_name: 'hdhdhdh',
|
|
name: 'kkkk',
|
|
name: 'kkkk',
|
|
- effect_on: moment('2020-02-02'),
|
|
|
|
|
|
+ effect_on: dayjs('2020-02-02'),
|
|
party_a: 'aaaaa',
|
|
party_a: 'aaaaa',
|
|
party_b: 'bbbbbb',
|
|
party_b: 'bbbbbb',
|
|
party_c: 'ccccc',
|
|
party_c: 'ccccc',
|
|
created_dep: 'fffff',
|
|
created_dep: 'fffff',
|
|
dep_id: '1111',
|
|
dep_id: '1111',
|
|
|
|
+ status: 4,
|
|
code: '132456',
|
|
code: '132456',
|
|
amount: '1111111111777',
|
|
amount: '1111111111777',
|
|
|
|
+ project_name: 'hahahah',
|
|
project_code: '444444',
|
|
project_code: '444444',
|
|
deal_by: 'hhhhh',
|
|
deal_by: 'hhhhh',
|
|
perform: 'dnjfndjfnjdnfjd',
|
|
perform: 'dnjfndjfnjdnfjd',
|
|
created_by: '77777',
|
|
created_by: '77777',
|
|
- created_on: moment().format(FORMAT),
|
|
|
|
|
|
+ created_name: 'gggggg',
|
|
|
|
+ created_on: dayjs().format(FORMAT),
|
|
|
|
+ attach: [
|
|
|
|
+ { name: 'hhhhh', url: '99999' },
|
|
|
|
+ { name: '11111', url: '922229999' },
|
|
|
|
+ ],
|
|
};
|
|
};
|
|
|
|
|
|
const UploadProps = {
|
|
const UploadProps = {
|
|
- action: 'https://www.mocky.io/v2/5cc8019d300000980a055e76',
|
|
|
|
|
|
+ action: `/api/contract/v1/attach`,
|
|
onChange({ file, fileList }) {
|
|
onChange({ file, fileList }) {
|
|
if (file.status !== 'uploading') {
|
|
if (file.status !== 'uploading') {
|
|
console.log(file, fileList);
|
|
console.log(file, fileList);
|
|
|
|
+ setFileList(fileList);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- defaultFileList: [
|
|
|
|
- {
|
|
|
|
- uid: '1',
|
|
|
|
- name: 'xxx.png',
|
|
|
|
- status: 'uploading',
|
|
|
|
- url: 'http://www.baidu.com/xxx.png',
|
|
|
|
- percent: 33,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- uid: '2',
|
|
|
|
- name: 'yyy.png',
|
|
|
|
- status: 'done',
|
|
|
|
- url: 'http://www.baidu.com/yyy.png',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- uid: '3',
|
|
|
|
- name: 'zzz.png',
|
|
|
|
- status: 'error',
|
|
|
|
- response: 'Server Error 500',
|
|
|
|
- // custom error message to show
|
|
|
|
- url: 'http://www.baidu.com/zzz.png',
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
|
|
+ // defaultFileList: [
|
|
|
|
+ // {
|
|
|
|
+ // uid: '1',
|
|
|
|
+ // name: 'xxx.png',
|
|
|
|
+ // status: 'uploading',
|
|
|
|
+ // url: 'http://www.baidu.com/xxx.png',
|
|
|
|
+ // percent: 33,
|
|
|
|
+ // },
|
|
|
|
+ // {
|
|
|
|
+ // uid: '2',
|
|
|
|
+ // name: 'yyy.png',
|
|
|
|
+ // status: 'done',
|
|
|
|
+ // url: 'http://www.baidu.com/yyy.png',
|
|
|
|
+ // },
|
|
|
|
+ // {
|
|
|
|
+ // uid: '3',
|
|
|
|
+ // name: 'zzz.png',
|
|
|
|
+ // status: 'error',
|
|
|
|
+ // response: 'Server Error 500',
|
|
|
|
+ // // custom error message to show
|
|
|
|
+ // url: 'http://www.baidu.com/zzz.png',
|
|
|
|
+ // },
|
|
|
|
+ // ],
|
|
};
|
|
};
|
|
|
|
|
|
const handleSubmit = () => {
|
|
const handleSubmit = () => {
|
|
form.validateFields().then((values) => {
|
|
form.validateFields().then((values) => {
|
|
console.log(values);
|
|
console.log(values);
|
|
- let timeObj = {
|
|
|
|
- effect_on: moment(values.effect_on).format(FORMAT),
|
|
|
|
- created_on: values.created_on || moment().format(FORMAT),
|
|
|
|
- };
|
|
|
|
- handleOk({ ...values, ...timeObj });
|
|
|
|
|
|
+ values.effect_on = dayjs(values.effect_on, FORMAT);
|
|
|
|
+ values.created_on = values.created_on || dayjs().format(FORMAT);
|
|
|
|
+ if (parent_id) values.parent_id = parent_id;
|
|
|
|
+ handleOk(values);
|
|
});
|
|
});
|
|
};
|
|
};
|
|
|
|
|
|
@@ -105,7 +215,7 @@ const ContractModal = (props) => {
|
|
<Row>
|
|
<Row>
|
|
<Col span={10} offset={1}>
|
|
<Col span={10} offset={1}>
|
|
<Form.Item
|
|
<Form.Item
|
|
- name="company_name"
|
|
|
|
|
|
+ name="company_code"
|
|
label="所属公司:"
|
|
label="所属公司:"
|
|
tooltip="所属公司"
|
|
tooltip="所属公司"
|
|
rules={[
|
|
rules={[
|
|
@@ -115,7 +225,20 @@ const ContractModal = (props) => {
|
|
},
|
|
},
|
|
]}
|
|
]}
|
|
>
|
|
>
|
|
- <Input />
|
|
|
|
|
|
+ <TreeSelect
|
|
|
|
+ style={{ width: '100%' }}
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ showSearch
|
|
|
|
+ allowClear
|
|
|
|
+ fieldNames={{
|
|
|
|
+ label: 'Name',
|
|
|
|
+ value: 'ID',
|
|
|
|
+ children: 'children',
|
|
|
|
+ }}
|
|
|
|
+ dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
|
|
|
|
+ treeData={depList}
|
|
|
|
+ disabled={disableds.contract}
|
|
|
|
+ />
|
|
</Form.Item>
|
|
</Form.Item>
|
|
<Form.Item
|
|
<Form.Item
|
|
name="name"
|
|
name="name"
|
|
@@ -128,7 +251,7 @@ const ContractModal = (props) => {
|
|
},
|
|
},
|
|
]}
|
|
]}
|
|
>
|
|
>
|
|
- <Input />
|
|
|
|
|
|
+ <Input disabled={disableds.contract} />
|
|
</Form.Item>
|
|
</Form.Item>
|
|
<Form.Item
|
|
<Form.Item
|
|
name="effect_on"
|
|
name="effect_on"
|
|
@@ -140,7 +263,32 @@ const ContractModal = (props) => {
|
|
},
|
|
},
|
|
]}
|
|
]}
|
|
>
|
|
>
|
|
- <DatePicker />
|
|
|
|
|
|
+ <DatePicker
|
|
|
|
+ style={{ width: '100%' }}
|
|
|
|
+ disabled={disableds.contract}
|
|
|
|
+ />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ <Form.Item
|
|
|
|
+ name="project_name"
|
|
|
|
+ label="项目名称:"
|
|
|
|
+ rules={[
|
|
|
|
+ {
|
|
|
|
+ required: true,
|
|
|
|
+ message: '请填写项目名称',
|
|
|
|
+ },
|
|
|
|
+ ]}
|
|
|
|
+ >
|
|
|
|
+ <Select
|
|
|
|
+ style={{ width: '100%' }}
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ options={projectList?.map((item) => {
|
|
|
|
+ return {
|
|
|
|
+ value: item.project_full_code,
|
|
|
|
+ label: item.project_name,
|
|
|
|
+ };
|
|
|
|
+ })}
|
|
|
|
+ disabled={disableds.contract}
|
|
|
|
+ />
|
|
</Form.Item>
|
|
</Form.Item>
|
|
<Form.Item
|
|
<Form.Item
|
|
name="party_a"
|
|
name="party_a"
|
|
@@ -152,7 +300,20 @@ const ContractModal = (props) => {
|
|
},
|
|
},
|
|
]}
|
|
]}
|
|
>
|
|
>
|
|
- <Input />
|
|
|
|
|
|
+ <TreeSelect
|
|
|
|
+ style={{ width: '100%' }}
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ showSearch
|
|
|
|
+ allowClear
|
|
|
|
+ fieldNames={{
|
|
|
|
+ label: 'Name',
|
|
|
|
+ value: 'Name',
|
|
|
|
+ children: 'children',
|
|
|
|
+ }}
|
|
|
|
+ dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
|
|
|
|
+ treeData={supplyList}
|
|
|
|
+ disabled={disableds.contract}
|
|
|
|
+ />
|
|
</Form.Item>
|
|
</Form.Item>
|
|
<Form.Item
|
|
<Form.Item
|
|
name="party_c"
|
|
name="party_c"
|
|
@@ -164,7 +325,21 @@ const ContractModal = (props) => {
|
|
},
|
|
},
|
|
]}
|
|
]}
|
|
>
|
|
>
|
|
- <Input />
|
|
|
|
|
|
+ <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>
|
|
<Form.Item
|
|
<Form.Item
|
|
name="created_dep"
|
|
name="created_dep"
|
|
@@ -176,12 +351,25 @@ const ContractModal = (props) => {
|
|
},
|
|
},
|
|
]}
|
|
]}
|
|
>
|
|
>
|
|
- <Input />
|
|
|
|
|
|
+ <TreeSelect
|
|
|
|
+ style={{ width: '100%' }}
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ showSearch
|
|
|
|
+ allowClear
|
|
|
|
+ disabled={disableds.contract}
|
|
|
|
+ fieldNames={{
|
|
|
|
+ label: 'Name',
|
|
|
|
+ value: 'ID',
|
|
|
|
+ children: 'children',
|
|
|
|
+ }}
|
|
|
|
+ dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
|
|
|
|
+ treeData={depList?.find((item) => item.Code == 'GT')?.children}
|
|
|
|
+ />
|
|
</Form.Item>
|
|
</Form.Item>
|
|
</Col>
|
|
</Col>
|
|
<Col span={10}>
|
|
<Col span={10}>
|
|
<Form.Item
|
|
<Form.Item
|
|
- name="dep_id"
|
|
|
|
|
|
+ name="dep_code"
|
|
label="所属部门:"
|
|
label="所属部门:"
|
|
rules={[
|
|
rules={[
|
|
{
|
|
{
|
|
@@ -190,32 +378,43 @@ const ContractModal = (props) => {
|
|
},
|
|
},
|
|
]}
|
|
]}
|
|
>
|
|
>
|
|
- <Input />
|
|
|
|
- </Form.Item>
|
|
|
|
- <Form.Item name="code" label="合同编号:">
|
|
|
|
- <Input disabled />
|
|
|
|
|
|
+ <TreeSelect
|
|
|
|
+ style={{ width: '100%' }}
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ showSearch
|
|
|
|
+ allowClear
|
|
|
|
+ fieldNames={{
|
|
|
|
+ label: 'Name',
|
|
|
|
+ value: 'ID',
|
|
|
|
+ children: 'children',
|
|
|
|
+ }}
|
|
|
|
+ disabled={disableds.contract}
|
|
|
|
+ dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
|
|
|
|
+ treeData={depList?.find((item) => item.Code == 'GT')?.children}
|
|
|
|
+ />
|
|
</Form.Item>
|
|
</Form.Item>
|
|
|
|
+ {type != Type.add && (
|
|
|
|
+ <Form.Item name="code" label="合同编号:">
|
|
|
|
+ <Input disabled />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ )}
|
|
|
|
|
|
- <Form.Item label="合同总价款:">
|
|
|
|
- <Row gutter={8}>
|
|
|
|
- <Col span={12}>
|
|
|
|
- <Form.Item
|
|
|
|
- style={{ marginBottom: 0 }}
|
|
|
|
- name="amount"
|
|
|
|
- rules={[
|
|
|
|
- {
|
|
|
|
- required: true,
|
|
|
|
- message: '请输入合同总价款',
|
|
|
|
- },
|
|
|
|
- ]}
|
|
|
|
- >
|
|
|
|
- <Input />
|
|
|
|
- </Form.Item>
|
|
|
|
- </Col>
|
|
|
|
- <Col span={12}>
|
|
|
|
- <div style={{ lineHeight: '32px' }}>万元</div>
|
|
|
|
- </Col>
|
|
|
|
- </Row>
|
|
|
|
|
|
+ <Form.Item
|
|
|
|
+ label="合同总价款:"
|
|
|
|
+ name="amount"
|
|
|
|
+ rules={[
|
|
|
|
+ {
|
|
|
|
+ required: true,
|
|
|
|
+ message: '请输入合同总价款',
|
|
|
|
+ },
|
|
|
|
+ ]}
|
|
|
|
+ >
|
|
|
|
+ <InputNumber
|
|
|
|
+ style={{ width: '100%' }}
|
|
|
|
+ precision={2}
|
|
|
|
+ addonAfter="万元"
|
|
|
|
+ disabled={disableds.contract}
|
|
|
|
+ />
|
|
</Form.Item>
|
|
</Form.Item>
|
|
|
|
|
|
<Form.Item name="project_code" label="项目编号:">
|
|
<Form.Item name="project_code" label="项目编号:">
|
|
@@ -231,7 +430,20 @@ const ContractModal = (props) => {
|
|
},
|
|
},
|
|
]}
|
|
]}
|
|
>
|
|
>
|
|
- <Input />
|
|
|
|
|
|
+ <TreeSelect
|
|
|
|
+ style={{ width: '100%' }}
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ showSearch
|
|
|
|
+ allowClear
|
|
|
|
+ disabled={disableds.contract}
|
|
|
|
+ fieldNames={{
|
|
|
|
+ label: 'Name',
|
|
|
|
+ value: 'Name',
|
|
|
|
+ children: 'children',
|
|
|
|
+ }}
|
|
|
|
+ dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
|
|
|
|
+ treeData={supplyList}
|
|
|
|
+ />
|
|
</Form.Item>
|
|
</Form.Item>
|
|
<Form.Item
|
|
<Form.Item
|
|
name="deal_by"
|
|
name="deal_by"
|
|
@@ -243,21 +455,47 @@ const ContractModal = (props) => {
|
|
},
|
|
},
|
|
]}
|
|
]}
|
|
>
|
|
>
|
|
- <Input />
|
|
|
|
|
|
+ <Select
|
|
|
|
+ style={{ width: '100%' }}
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ disabled={dealDisable && disableds.contract}
|
|
|
|
+ options={userList?.map((item) => {
|
|
|
|
+ return {
|
|
|
|
+ value: item.CName,
|
|
|
|
+ label: item.CName,
|
|
|
|
+ };
|
|
|
|
+ })}
|
|
|
|
+ />
|
|
</Form.Item>
|
|
</Form.Item>
|
|
</Col>
|
|
</Col>
|
|
</Row>
|
|
</Row>
|
|
<Form.Item name="perform" label="合同履行情况:" labelCol={{ span: 4 }}>
|
|
<Form.Item name="perform" label="合同履行情况:" labelCol={{ span: 4 }}>
|
|
- <Input.TextArea />
|
|
|
|
|
|
+ <Input.TextArea disabled={disableds.contract} />
|
|
</Form.Item>
|
|
</Form.Item>
|
|
<Form.Item label="合同上传:" labelCol={{ span: 4 }}>
|
|
<Form.Item label="合同上传:" labelCol={{ span: 4 }}>
|
|
- <Upload {...UploadProps}>
|
|
|
|
- <Button icon={<CloudUploadOutlined />}>Upload</Button>
|
|
|
|
- </Upload>
|
|
|
|
|
|
+ {type == Type.add ? (
|
|
|
|
+ <Upload {...UploadProps}>
|
|
|
|
+ <Button icon={<CloudUploadOutlined />}>Upload</Button>
|
|
|
|
+ </Upload>
|
|
|
|
+ ) : (
|
|
|
|
+ <ul>
|
|
|
|
+ {data?.attach?.map((item) => (
|
|
|
|
+ <li>
|
|
|
|
+ <Space>
|
|
|
|
+ {item.name} <span>预览</span> <a href={item.url}>下载</a>
|
|
|
|
+ </Space>
|
|
|
|
+ </li>
|
|
|
|
+ ))}
|
|
|
|
+ </ul>
|
|
|
|
+ )}
|
|
</Form.Item>
|
|
</Form.Item>
|
|
<Row>
|
|
<Row>
|
|
<Col span={10} offset={1}>
|
|
<Col span={10} offset={1}>
|
|
- <Form.Item name="created_by" label="创建人:">
|
|
|
|
|
|
+ <Form.Item
|
|
|
|
+ name="created_name"
|
|
|
|
+ initialValue={data?.created_name || user.CName}
|
|
|
|
+ label="创建人:"
|
|
|
|
+ >
|
|
<Input disabled />
|
|
<Input disabled />
|
|
</Form.Item>
|
|
</Form.Item>
|
|
</Col>
|
|
</Col>
|
|
@@ -267,30 +505,98 @@ const ContractModal = (props) => {
|
|
</Form.Item>
|
|
</Form.Item>
|
|
</Col>
|
|
</Col>
|
|
</Row>
|
|
</Row>
|
|
- {type == Type.detail && (
|
|
|
|
|
|
+ {type == Type.check && (
|
|
|
|
+ <>
|
|
|
|
+ <ModuleTitle title="审核情况" />
|
|
|
|
+ <Row>
|
|
|
|
+ <Col span={10} offset={1}>
|
|
|
|
+ <Form.Item
|
|
|
|
+ name="check_by"
|
|
|
|
+ initialValue={user.CName}
|
|
|
|
+ label="审核人:"
|
|
|
|
+ >
|
|
|
|
+ <Input disabled />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ <Form.Item name="is_pass" initialValue={1} label="审核意见:">
|
|
|
|
+ <Select
|
|
|
|
+ onChange={(e) => {
|
|
|
|
+ setIsPass(e);
|
|
|
|
+ }}
|
|
|
|
+ style={{ width: '100%' }}
|
|
|
|
+ options={[
|
|
|
|
+ {
|
|
|
|
+ value: 1,
|
|
|
|
+ label: '同意',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ value: 0,
|
|
|
|
+ label: '拒绝',
|
|
|
|
+ },
|
|
|
|
+ ]}
|
|
|
|
+ />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ </Col>
|
|
|
|
+ <Col span={10}>
|
|
|
|
+ <Form.Item
|
|
|
|
+ name="check_date"
|
|
|
|
+ initialValue={dayjs().format(FORMAT)}
|
|
|
|
+ label="审核时间:"
|
|
|
|
+ >
|
|
|
|
+ <Input disabled />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ </Col>
|
|
|
|
+ </Row>
|
|
|
|
+ {!isPass && (
|
|
|
|
+ <Form.Item
|
|
|
|
+ name="check_desc"
|
|
|
|
+ label="拒绝原因:"
|
|
|
|
+ labelCol={{ span: 4 }}
|
|
|
|
+ >
|
|
|
|
+ <Input.TextArea />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ )}
|
|
|
|
+ </>
|
|
|
|
+ )}
|
|
|
|
+ {(type == Type.detail || type == Type.cancel) && (
|
|
<>
|
|
<>
|
|
<ModuleTitle title="归档流程" />
|
|
<ModuleTitle title="归档流程" />
|
|
- <Steps
|
|
|
|
- current={1}
|
|
|
|
- items={[
|
|
|
|
- {
|
|
|
|
- title: 'Finished',
|
|
|
|
- description,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: 'In Progress',
|
|
|
|
- description,
|
|
|
|
- subTitle: 'Left 00:00:08',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: 'Waiting',
|
|
|
|
- description,
|
|
|
|
- },
|
|
|
|
- ]}
|
|
|
|
- />
|
|
|
|
|
|
+ <div className={styles.modelItem}>
|
|
|
|
+ <Steps
|
|
|
|
+ current={data?.status == Status.Checking ? 1 : 2}
|
|
|
|
+ status={
|
|
|
|
+ data?.status == Status.CheckReject ? 'error' : 'process'
|
|
|
|
+ }
|
|
|
|
+ items={[
|
|
|
|
+ {
|
|
|
|
+ title: '发起',
|
|
|
|
+ description: (
|
|
|
|
+ <>
|
|
|
|
+ <div>{data?.created_by}</div>
|
|
|
|
+ <div>{data?.created_on}</div>
|
|
|
|
+ </>
|
|
|
|
+ ),
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '审核',
|
|
|
|
+ description: (
|
|
|
|
+ <>
|
|
|
|
+ <div>{data?.check_by}</div>
|
|
|
|
+ <div>{data?.check_on}</div>
|
|
|
|
+ </>
|
|
|
|
+ ),
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title:
|
|
|
|
+ data?.status >= Status.CheckSuccess
|
|
|
|
+ ? StatusText[Status.CheckSuccess]
|
|
|
|
+ : StatusText[data?.status],
|
|
|
|
+ },
|
|
|
|
+ ]}
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
</>
|
|
</>
|
|
)}
|
|
)}
|
|
- {type == Type.cancel && (
|
|
|
|
|
|
+ {(type == Type.detail || type == Type.cancel) && (
|
|
<>
|
|
<>
|
|
<ModuleTitle title="作废信息" />
|
|
<ModuleTitle title="作废信息" />
|
|
<Form.Item
|
|
<Form.Item
|
|
@@ -305,10 +611,54 @@ const ContractModal = (props) => {
|
|
label="创建时间:"
|
|
label="创建时间:"
|
|
labelCol={{ span: 4 }}
|
|
labelCol={{ span: 4 }}
|
|
>
|
|
>
|
|
- <Input defaultValue={moment(new Date()).format('YYYY-MM-DD')} />
|
|
|
|
|
|
+ <Input
|
|
|
|
+ style={{ width: '460px' }}
|
|
|
|
+ defaultValue={dayjs().format('YYYY-MM-DD')}
|
|
|
|
+ />
|
|
|
|
+ <span
|
|
|
|
+ style={{ color: 'red', fontSize: '24px', marginLeft: '40px' }}
|
|
|
|
+ >
|
|
|
|
+ 确认作废该合同,作废提交后无法撤回
|
|
|
|
+ </span>
|
|
</Form.Item>
|
|
</Form.Item>
|
|
</>
|
|
</>
|
|
)}
|
|
)}
|
|
|
|
+ {type == Type.detail && data?.status >= Status.CalChecking && (
|
|
|
|
+ <>
|
|
|
|
+ <ModuleTitle title="作废流程" />
|
|
|
|
+ <div className={styles.modelItem}>
|
|
|
|
+ <Steps
|
|
|
|
+ current={data?.status == Status.CalChecking ? 1 : 2}
|
|
|
|
+ status={
|
|
|
|
+ data?.status == Status.CalCheckReject ? 'error' : 'process'
|
|
|
|
+ }
|
|
|
|
+ items={[
|
|
|
|
+ {
|
|
|
|
+ title: '发起',
|
|
|
|
+ description: (
|
|
|
|
+ <>
|
|
|
|
+ <div>{data?.created_by}</div>
|
|
|
|
+ <div>{data?.created_on}</div>
|
|
|
|
+ </>
|
|
|
|
+ ),
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '审核',
|
|
|
|
+ description: (
|
|
|
|
+ <>
|
|
|
|
+ <div>{data?.cancel_check_by}</div>
|
|
|
|
+ <div>{data?.cancel_check_on}</div>
|
|
|
|
+ </>
|
|
|
|
+ ),
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: StatusText[data?.status],
|
|
|
|
+ },
|
|
|
|
+ ]}
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+ </>
|
|
|
|
+ )}
|
|
</Form>
|
|
</Form>
|
|
<Divider />
|
|
<Divider />
|
|
</Modal>
|
|
</Modal>
|