|
@@ -55,6 +55,7 @@ const ContractModal = (props) => {
|
|
const { depList, run: depListRun } = useModel('depList');
|
|
const { depList, run: depListRun } = useModel('depList');
|
|
const FORMAT = 'YYYY-MM-DD';
|
|
const FORMAT = 'YYYY-MM-DD';
|
|
const {
|
|
const {
|
|
|
|
+ detail: data,
|
|
type,
|
|
type,
|
|
visible,
|
|
visible,
|
|
projectList = [],
|
|
projectList = [],
|
|
@@ -65,11 +66,11 @@ const ContractModal = (props) => {
|
|
const title =
|
|
const title =
|
|
type == Type.add ? '新增' : type == Type.detail ? '详情' : '作废';
|
|
type == Type.add ? '新增' : type == Type.detail ? '详情' : '作废';
|
|
//所属公司为总部时才能选择部门,为子公司时,部门不能操作 所属部门为子公司的需要填经办人
|
|
//所属公司为总部时才能选择部门,为子公司时,部门不能操作 所属部门为子公司的需要填经办人
|
|
- const company = Form.useWatch('company_name', form);
|
|
|
|
|
|
+ const company = Form.useWatch('company_id', form);
|
|
const [depDisable, setDepDisable] = useState(false);
|
|
const [depDisable, setDepDisable] = useState(false);
|
|
const [dealDisable, setDealDisable] = useState(false);
|
|
const [dealDisable, setDealDisable] = useState(false);
|
|
//项目名称选择后,自动填入对应的项目编号
|
|
//项目名称选择后,自动填入对应的项目编号
|
|
- const project_code = Form.useWatch('project_name', form);
|
|
|
|
|
|
+ const project_name = Form.useWatch('project_name', form);
|
|
|
|
|
|
const [isPass, setIsPass] = useState(1);
|
|
const [isPass, setIsPass] = useState(1);
|
|
|
|
|
|
@@ -80,6 +81,10 @@ const ContractModal = (props) => {
|
|
depListRun();
|
|
depListRun();
|
|
}, []);
|
|
}, []);
|
|
|
|
|
|
|
|
+ useEffect(() => {
|
|
|
|
+ form.resetFields();
|
|
|
|
+ }, [data]);
|
|
|
|
+
|
|
//供应商列表
|
|
//供应商列表
|
|
const { data: supplierList = [], loading } = useRequest(querySupplierList, {
|
|
const { data: supplierList = [], loading } = useRequest(querySupplierList, {
|
|
defaultParams: [
|
|
defaultParams: [
|
|
@@ -97,6 +102,8 @@ const ContractModal = (props) => {
|
|
},
|
|
},
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ console.log('======================', data);
|
|
|
|
+
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
if (company == 135) {
|
|
if (company == 135) {
|
|
setDepDisable(false);
|
|
setDepDisable(false);
|
|
@@ -108,14 +115,23 @@ const ContractModal = (props) => {
|
|
}
|
|
}
|
|
}, [company]);
|
|
}, [company]);
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
- form.setFieldsValue({ project_code });
|
|
|
|
- }, [project_code]);
|
|
|
|
|
|
+ const project_code = projectList?.find(
|
|
|
|
+ (item) => item.project_name == project_name,
|
|
|
|
+ )?.project_full_code;
|
|
|
|
+ if (project_code) form.setFieldsValue({ project_code });
|
|
|
|
+ }, [project_name]);
|
|
|
|
|
|
const supplyList = useMemo(() => {
|
|
const supplyList = useMemo(() => {
|
|
return depList ? [...depList, ...supplierList] : supplierList;
|
|
return depList ? [...depList, ...supplierList] : supplierList;
|
|
}, [depList, supplierList]);
|
|
}, [depList, supplierList]);
|
|
|
|
|
|
const disableds = useMemo(() => {
|
|
const disableds = useMemo(() => {
|
|
|
|
+ if (!visible) {
|
|
|
|
+ setFileList([]);
|
|
|
|
+ setIsPass(1);
|
|
|
|
+ setDepDisable(false);
|
|
|
|
+ setDealDisable(false);
|
|
|
|
+ }
|
|
if (type == Type.add) {
|
|
if (type == Type.add) {
|
|
return { contract: false, check: true };
|
|
return { contract: false, check: true };
|
|
} else if (type == Type.detail) {
|
|
} else if (type == Type.detail) {
|
|
@@ -126,74 +142,81 @@ const ContractModal = (props) => {
|
|
return { contract: true, check: false };
|
|
return { contract: true, check: false };
|
|
}, [type, visible]);
|
|
}, [type, visible]);
|
|
|
|
|
|
- const data = {
|
|
|
|
- company_name: 'hdhdhdh',
|
|
|
|
- name: 'kkkk',
|
|
|
|
- effect_on: dayjs('2020-02-02'),
|
|
|
|
- party_a: 'aaaaa',
|
|
|
|
- party_b: 'bbbbbb',
|
|
|
|
- party_c: 'ccccc',
|
|
|
|
- created_dep: 'fffff',
|
|
|
|
- dep_id: '1111',
|
|
|
|
- status: 4,
|
|
|
|
- code: '132456',
|
|
|
|
- amount: '1111111111777',
|
|
|
|
- project_name: 'hahahah',
|
|
|
|
- project_code: '444444',
|
|
|
|
- deal_by: 'hhhhh',
|
|
|
|
- perform: 'dnjfndjfnjdnfjd',
|
|
|
|
- created_by: '77777',
|
|
|
|
- created_name: 'gggggg',
|
|
|
|
- created_on: dayjs().format(FORMAT),
|
|
|
|
- attach: [
|
|
|
|
- { name: 'hhhhh', url: '99999' },
|
|
|
|
- { name: '11111', url: '922229999' },
|
|
|
|
- ],
|
|
|
|
- };
|
|
|
|
-
|
|
|
|
const UploadProps = {
|
|
const UploadProps = {
|
|
action: `/api/contract/v1/attach`,
|
|
action: `/api/contract/v1/attach`,
|
|
|
|
+ headers: {
|
|
|
|
+ 'JWT-TOKEN': localStorage.getItem('JWT-TOKEN'),
|
|
|
|
+ },
|
|
onChange({ file, fileList }) {
|
|
onChange({ file, fileList }) {
|
|
if (file.status !== 'uploading') {
|
|
if (file.status !== 'uploading') {
|
|
console.log(file, fileList);
|
|
console.log(file, fileList);
|
|
- setFileList(fileList);
|
|
|
|
|
|
+ setFileList(fileList.map((item) => item.response?.data?.attach));
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- // 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);
|
|
|
|
- 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);
|
|
|
|
|
|
+ if (type == Type.add) {
|
|
|
|
+ values.effect_on = dayjs(values.effect_on).format(FORMAT);
|
|
|
|
+ values.created_on = values.created_on || dayjs().format(FORMAT);
|
|
|
|
+ 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) {
|
|
|
|
+ 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.created_by = user?.ID;
|
|
|
|
+ handleOk(values);
|
|
|
|
+ } else if (type == Type.cancel) {
|
|
|
|
+ let result = {
|
|
|
|
+ id: data?.id,
|
|
|
|
+ cancel_desc: values.cancel_desc,
|
|
|
|
+ };
|
|
|
|
+ handleOk(result);
|
|
|
|
+ } else if (type == Type.check && data?.status == Status.Checking) {
|
|
|
|
+ let result = {
|
|
|
|
+ id: data?.id,
|
|
|
|
+ check_by: user.CName,
|
|
|
|
+ check_result: values.check_result,
|
|
|
|
+ is_pass: values.is_pass,
|
|
|
|
+ check_desc: values?.check_desc,
|
|
|
|
+ };
|
|
|
|
+ handleOk(result);
|
|
|
|
+ }
|
|
});
|
|
});
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+ const getDepItemById = (id) => {
|
|
|
|
+ const fun = (list) => {
|
|
|
|
+ for (let i = 0; i < list.length; i++) {
|
|
|
|
+ let item = list[i];
|
|
|
|
+ if (item.ID == id) {
|
|
|
|
+ return item;
|
|
|
|
+ } else if (item.children?.length > 0) {
|
|
|
|
+ let res = fun(item.children);
|
|
|
|
+ if (res) return res;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+ return fun(depList);
|
|
|
|
+ };
|
|
|
|
+
|
|
return (
|
|
return (
|
|
<Modal
|
|
<Modal
|
|
width={'85%'}
|
|
width={'85%'}
|
|
@@ -203,21 +226,24 @@ const ContractModal = (props) => {
|
|
cancelText="返回"
|
|
cancelText="返回"
|
|
onOk={handleSubmit}
|
|
onOk={handleSubmit}
|
|
onCancel={handleCancel}
|
|
onCancel={handleCancel}
|
|
|
|
+ okButtonProps={type == Type.detail ? { disabled: true } : null}
|
|
|
|
+ destroyOnClose
|
|
>
|
|
>
|
|
<Divider />
|
|
<Divider />
|
|
<ModuleTitle title="合同信息" />
|
|
<ModuleTitle title="合同信息" />
|
|
<Form
|
|
<Form
|
|
form={form}
|
|
form={form}
|
|
- initialValues={data}
|
|
|
|
|
|
+ // initialValues={data}
|
|
labelCol={{ span: 7 }}
|
|
labelCol={{ span: 7 }}
|
|
wrapperCol={{ span: 17 }}
|
|
wrapperCol={{ span: 17 }}
|
|
>
|
|
>
|
|
<Row>
|
|
<Row>
|
|
<Col span={10} offset={1}>
|
|
<Col span={10} offset={1}>
|
|
<Form.Item
|
|
<Form.Item
|
|
- name="company_code"
|
|
|
|
|
|
+ name="company_id"
|
|
label="所属公司:"
|
|
label="所属公司:"
|
|
tooltip="所属公司"
|
|
tooltip="所属公司"
|
|
|
|
+ initialValue={data?.company_id}
|
|
rules={[
|
|
rules={[
|
|
{
|
|
{
|
|
required: true,
|
|
required: true,
|
|
@@ -244,6 +270,7 @@ const ContractModal = (props) => {
|
|
name="name"
|
|
name="name"
|
|
label="合同名称:"
|
|
label="合同名称:"
|
|
tooltip="合同名称"
|
|
tooltip="合同名称"
|
|
|
|
+ initialValue={data?.name}
|
|
rules={[
|
|
rules={[
|
|
{
|
|
{
|
|
required: true,
|
|
required: true,
|
|
@@ -256,6 +283,7 @@ const ContractModal = (props) => {
|
|
<Form.Item
|
|
<Form.Item
|
|
name="effect_on"
|
|
name="effect_on"
|
|
label="合同生效日期:"
|
|
label="合同生效日期:"
|
|
|
|
+ initialValue={data?.effect_on}
|
|
rules={[
|
|
rules={[
|
|
{
|
|
{
|
|
required: true,
|
|
required: true,
|
|
@@ -263,14 +291,19 @@ const ContractModal = (props) => {
|
|
},
|
|
},
|
|
]}
|
|
]}
|
|
>
|
|
>
|
|
- <DatePicker
|
|
|
|
- style={{ width: '100%' }}
|
|
|
|
- disabled={disableds.contract}
|
|
|
|
- />
|
|
|
|
|
|
+ {type == Type.add ? (
|
|
|
|
+ <DatePicker
|
|
|
|
+ style={{ width: '100%' }}
|
|
|
|
+ disabled={disableds.contract}
|
|
|
|
+ />
|
|
|
|
+ ) : (
|
|
|
|
+ <Input disabled={disableds.contract} />
|
|
|
|
+ )}
|
|
</Form.Item>
|
|
</Form.Item>
|
|
<Form.Item
|
|
<Form.Item
|
|
name="project_name"
|
|
name="project_name"
|
|
label="项目名称:"
|
|
label="项目名称:"
|
|
|
|
+ initialValue={data?.project_name}
|
|
rules={[
|
|
rules={[
|
|
{
|
|
{
|
|
required: true,
|
|
required: true,
|
|
@@ -283,7 +316,7 @@ const ContractModal = (props) => {
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
options={projectList?.map((item) => {
|
|
options={projectList?.map((item) => {
|
|
return {
|
|
return {
|
|
- value: item.project_full_code,
|
|
|
|
|
|
+ value: item.project_name,
|
|
label: item.project_name,
|
|
label: item.project_name,
|
|
};
|
|
};
|
|
})}
|
|
})}
|
|
@@ -293,6 +326,7 @@ const ContractModal = (props) => {
|
|
<Form.Item
|
|
<Form.Item
|
|
name="party_a"
|
|
name="party_a"
|
|
label="甲方:"
|
|
label="甲方:"
|
|
|
|
+ initialValue={data?.party_a}
|
|
rules={[
|
|
rules={[
|
|
{
|
|
{
|
|
required: true,
|
|
required: true,
|
|
@@ -318,6 +352,7 @@ const ContractModal = (props) => {
|
|
<Form.Item
|
|
<Form.Item
|
|
name="party_c"
|
|
name="party_c"
|
|
label="丙方(及其他):"
|
|
label="丙方(及其他):"
|
|
|
|
+ initialValue={data?.party_c ? JSON.parse(data?.party_c) : []}
|
|
rules={[
|
|
rules={[
|
|
{
|
|
{
|
|
required: true,
|
|
required: true,
|
|
@@ -344,6 +379,7 @@ const ContractModal = (props) => {
|
|
<Form.Item
|
|
<Form.Item
|
|
name="created_dep"
|
|
name="created_dep"
|
|
label="签约承办部门:"
|
|
label="签约承办部门:"
|
|
|
|
+ initialValue={data?.created_dep}
|
|
rules={[
|
|
rules={[
|
|
{
|
|
{
|
|
required: true,
|
|
required: true,
|
|
@@ -359,7 +395,7 @@ const ContractModal = (props) => {
|
|
disabled={disableds.contract}
|
|
disabled={disableds.contract}
|
|
fieldNames={{
|
|
fieldNames={{
|
|
label: 'Name',
|
|
label: 'Name',
|
|
- value: 'ID',
|
|
|
|
|
|
+ value: 'Name',
|
|
children: 'children',
|
|
children: 'children',
|
|
}}
|
|
}}
|
|
dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
|
|
dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
|
|
@@ -369,14 +405,9 @@ const ContractModal = (props) => {
|
|
</Col>
|
|
</Col>
|
|
<Col span={10}>
|
|
<Col span={10}>
|
|
<Form.Item
|
|
<Form.Item
|
|
- name="dep_code"
|
|
|
|
|
|
+ name="dep_id"
|
|
label="所属部门:"
|
|
label="所属部门:"
|
|
- rules={[
|
|
|
|
- {
|
|
|
|
- required: true,
|
|
|
|
- message: '请选择所属部门',
|
|
|
|
- },
|
|
|
|
- ]}
|
|
|
|
|
|
+ initialValue={data?.dep_id}
|
|
>
|
|
>
|
|
<TreeSelect
|
|
<TreeSelect
|
|
style={{ width: '100%' }}
|
|
style={{ width: '100%' }}
|
|
@@ -388,20 +419,21 @@ const ContractModal = (props) => {
|
|
value: 'ID',
|
|
value: 'ID',
|
|
children: 'children',
|
|
children: 'children',
|
|
}}
|
|
}}
|
|
- disabled={disableds.contract}
|
|
|
|
|
|
+ disabled={disableds.contract || depDisable}
|
|
dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
|
|
dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
|
|
treeData={depList?.find((item) => item.Code == 'GT')?.children}
|
|
treeData={depList?.find((item) => item.Code == 'GT')?.children}
|
|
/>
|
|
/>
|
|
</Form.Item>
|
|
</Form.Item>
|
|
- {type != Type.add && (
|
|
|
|
- <Form.Item name="code" label="合同编号:">
|
|
|
|
- <Input disabled />
|
|
|
|
- </Form.Item>
|
|
|
|
- )}
|
|
|
|
|
|
+ {/* {type != Type.add && ( */}
|
|
|
|
+ <Form.Item name="code" initialValue={data?.code} label="合同编号:">
|
|
|
|
+ <Input placeholder="提交后自动生成" disabled />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ {/* )} */}
|
|
|
|
|
|
<Form.Item
|
|
<Form.Item
|
|
label="合同总价款:"
|
|
label="合同总价款:"
|
|
name="amount"
|
|
name="amount"
|
|
|
|
+ initialValue={data?.amount}
|
|
rules={[
|
|
rules={[
|
|
{
|
|
{
|
|
required: true,
|
|
required: true,
|
|
@@ -417,12 +449,17 @@ const ContractModal = (props) => {
|
|
/>
|
|
/>
|
|
</Form.Item>
|
|
</Form.Item>
|
|
|
|
|
|
- <Form.Item name="project_code" label="项目编号:">
|
|
|
|
|
|
+ <Form.Item
|
|
|
|
+ name="project_code"
|
|
|
|
+ initialValue={data?.project_code}
|
|
|
|
+ label="项目编号:"
|
|
|
|
+ >
|
|
<Input disabled />
|
|
<Input disabled />
|
|
</Form.Item>
|
|
</Form.Item>
|
|
<Form.Item
|
|
<Form.Item
|
|
name="party_b"
|
|
name="party_b"
|
|
label="乙方:"
|
|
label="乙方:"
|
|
|
|
+ initialValue={data?.party_b}
|
|
rules={[
|
|
rules={[
|
|
{
|
|
{
|
|
required: true,
|
|
required: true,
|
|
@@ -448,6 +485,7 @@ const ContractModal = (props) => {
|
|
<Form.Item
|
|
<Form.Item
|
|
name="deal_by"
|
|
name="deal_by"
|
|
label="经办人:"
|
|
label="经办人:"
|
|
|
|
+ initialValue={data?.deal_by}
|
|
rules={[
|
|
rules={[
|
|
{
|
|
{
|
|
required: true,
|
|
required: true,
|
|
@@ -458,7 +496,7 @@ const ContractModal = (props) => {
|
|
<Select
|
|
<Select
|
|
style={{ width: '100%' }}
|
|
style={{ width: '100%' }}
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
- disabled={dealDisable && disableds.contract}
|
|
|
|
|
|
+ disabled={dealDisable || disableds.contract}
|
|
options={userList?.map((item) => {
|
|
options={userList?.map((item) => {
|
|
return {
|
|
return {
|
|
value: item.CName,
|
|
value: item.CName,
|
|
@@ -469,7 +507,12 @@ const ContractModal = (props) => {
|
|
</Form.Item>
|
|
</Form.Item>
|
|
</Col>
|
|
</Col>
|
|
</Row>
|
|
</Row>
|
|
- <Form.Item name="perform" label="合同履行情况:" labelCol={{ span: 4 }}>
|
|
|
|
|
|
+ <Form.Item
|
|
|
|
+ name="perform"
|
|
|
|
+ initialValue={data?.perform}
|
|
|
|
+ label="合同履行情况:"
|
|
|
|
+ labelCol={{ span: 4 }}
|
|
|
|
+ >
|
|
<Input.TextArea disabled={disableds.contract} />
|
|
<Input.TextArea disabled={disableds.contract} />
|
|
</Form.Item>
|
|
</Form.Item>
|
|
<Form.Item label="合同上传:" labelCol={{ span: 4 }}>
|
|
<Form.Item label="合同上传:" labelCol={{ span: 4 }}>
|
|
@@ -479,13 +522,14 @@ const ContractModal = (props) => {
|
|
</Upload>
|
|
</Upload>
|
|
) : (
|
|
) : (
|
|
<ul>
|
|
<ul>
|
|
- {data?.attach?.map((item) => (
|
|
|
|
- <li>
|
|
|
|
- <Space>
|
|
|
|
- {item.name} <span>预览</span> <a href={item.url}>下载</a>
|
|
|
|
- </Space>
|
|
|
|
- </li>
|
|
|
|
- ))}
|
|
|
|
|
|
+ {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>
|
|
</ul>
|
|
)}
|
|
)}
|
|
</Form.Item>
|
|
</Form.Item>
|
|
@@ -500,64 +544,70 @@ const ContractModal = (props) => {
|
|
</Form.Item>
|
|
</Form.Item>
|
|
</Col>
|
|
</Col>
|
|
<Col span={10}>
|
|
<Col span={10}>
|
|
- <Form.Item name="created_on" label="创建时间:">
|
|
|
|
|
|
+ <Form.Item
|
|
|
|
+ name="created_on"
|
|
|
|
+ initialValue={data?.created_on || dayjs().format(FORMAT)}
|
|
|
|
+ label="创建时间:"
|
|
|
|
+ >
|
|
<Input disabled />
|
|
<Input disabled />
|
|
</Form.Item>
|
|
</Form.Item>
|
|
</Col>
|
|
</Col>
|
|
</Row>
|
|
</Row>
|
|
- {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}>
|
|
|
|
|
|
+ {type == Type.check &&
|
|
|
|
+ (data.status == Status.Checking ||
|
|
|
|
+ data.status == Status.CalChecking) && (
|
|
|
|
+ <>
|
|
|
|
+ <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
|
|
<Form.Item
|
|
- name="check_date"
|
|
|
|
- initialValue={dayjs().format(FORMAT)}
|
|
|
|
- label="审核时间:"
|
|
|
|
|
|
+ name="check_desc"
|
|
|
|
+ label="拒绝原因:"
|
|
|
|
+ labelCol={{ span: 4 }}
|
|
>
|
|
>
|
|
- <Input disabled />
|
|
|
|
|
|
+ <Input.TextArea />
|
|
</Form.Item>
|
|
</Form.Item>
|
|
- </Col>
|
|
|
|
- </Row>
|
|
|
|
- {!isPass && (
|
|
|
|
- <Form.Item
|
|
|
|
- name="check_desc"
|
|
|
|
- label="拒绝原因:"
|
|
|
|
- labelCol={{ span: 4 }}
|
|
|
|
- >
|
|
|
|
- <Input.TextArea />
|
|
|
|
- </Form.Item>
|
|
|
|
- )}
|
|
|
|
- </>
|
|
|
|
- )}
|
|
|
|
- {(type == Type.detail || type == Type.cancel) && (
|
|
|
|
|
|
+ )}
|
|
|
|
+ </>
|
|
|
|
+ )}
|
|
|
|
+ {type != Type.add && (
|
|
<>
|
|
<>
|
|
<ModuleTitle title="归档流程" />
|
|
<ModuleTitle title="归档流程" />
|
|
<div className={styles.modelItem}>
|
|
<div className={styles.modelItem}>
|
|
@@ -571,8 +621,12 @@ const ContractModal = (props) => {
|
|
title: '发起',
|
|
title: '发起',
|
|
description: (
|
|
description: (
|
|
<>
|
|
<>
|
|
- <div>{data?.created_by}</div>
|
|
|
|
- <div>{data?.created_on}</div>
|
|
|
|
|
|
+ <div className={styles.textNowarp}>
|
|
|
|
+ 发起人:{data?.created_name}
|
|
|
|
+ </div>
|
|
|
|
+ <div className={styles.textNowarp}>
|
|
|
|
+ 发起时间:{data?.created_on}
|
|
|
|
+ </div>
|
|
</>
|
|
</>
|
|
),
|
|
),
|
|
},
|
|
},
|
|
@@ -580,8 +634,20 @@ const ContractModal = (props) => {
|
|
title: '审核',
|
|
title: '审核',
|
|
description: (
|
|
description: (
|
|
<>
|
|
<>
|
|
- <div>{data?.check_by}</div>
|
|
|
|
- <div>{data?.check_on}</div>
|
|
|
|
|
|
+ <div className={styles.textNowarp}>
|
|
|
|
+ 审核人:{data?.check_by}
|
|
|
|
+ </div>
|
|
|
|
+ <div className={styles.textNowarp}>
|
|
|
|
+ 审核时间:{data?.check_on}
|
|
|
|
+ </div>
|
|
|
|
+ {data?.check_desc && (
|
|
|
|
+ <div
|
|
|
|
+ className={styles.textNowarp}
|
|
|
|
+ style={{ color: 'red' }}
|
|
|
|
+ >
|
|
|
|
+ 拒绝原因:{data?.check_desc}
|
|
|
|
+ </div>
|
|
|
|
+ )}
|
|
</>
|
|
</>
|
|
),
|
|
),
|
|
},
|
|
},
|
|
@@ -596,33 +662,38 @@ const ContractModal = (props) => {
|
|
</div>
|
|
</div>
|
|
</>
|
|
</>
|
|
)}
|
|
)}
|
|
- {(type == Type.detail || type == Type.cancel) && (
|
|
|
|
|
|
+ {(type == Type.cancel || data?.status >= Status.CalChecking) && (
|
|
<>
|
|
<>
|
|
<ModuleTitle title="作废信息" />
|
|
<ModuleTitle title="作废信息" />
|
|
<Form.Item
|
|
<Form.Item
|
|
name="cancel_desc"
|
|
name="cancel_desc"
|
|
label="作废原因:"
|
|
label="作废原因:"
|
|
|
|
+ initialValue={data?.cancel_desc}
|
|
labelCol={{ span: 4 }}
|
|
labelCol={{ span: 4 }}
|
|
>
|
|
>
|
|
<Input />
|
|
<Input />
|
|
</Form.Item>
|
|
</Form.Item>
|
|
- <Form.Item
|
|
|
|
- name="cancel_on"
|
|
|
|
- label="创建时间:"
|
|
|
|
- labelCol={{ span: 4 }}
|
|
|
|
- >
|
|
|
|
- <Input
|
|
|
|
- style={{ width: '460px' }}
|
|
|
|
- defaultValue={dayjs().format('YYYY-MM-DD')}
|
|
|
|
- />
|
|
|
|
- <span
|
|
|
|
- style={{ color: 'red', fontSize: '24px', marginLeft: '40px' }}
|
|
|
|
- >
|
|
|
|
- 确认作废该合同,作废提交后无法撤回
|
|
|
|
- </span>
|
|
|
|
- </Form.Item>
|
|
|
|
</>
|
|
</>
|
|
)}
|
|
)}
|
|
|
|
+ {type == Type.cancel && (
|
|
|
|
+ <Form.Item
|
|
|
|
+ name="cancel_on"
|
|
|
|
+ label="创建时间:"
|
|
|
|
+ initialValue={dayjs().format(FORMAT)}
|
|
|
|
+ labelCol={{ span: 4 }}
|
|
|
|
+ >
|
|
|
|
+ <Input
|
|
|
|
+ style={{ width: '460px' }}
|
|
|
|
+ defaultValue={dayjs().format('YYYY-MM-DD')}
|
|
|
|
+ disabled
|
|
|
|
+ />
|
|
|
|
+ <span
|
|
|
|
+ style={{ color: 'red', fontSize: '24px', marginLeft: '40px' }}
|
|
|
|
+ >
|
|
|
|
+ 确认作废该合同,作废提交后无法撤回
|
|
|
|
+ </span>
|
|
|
|
+ </Form.Item>
|
|
|
|
+ )}
|
|
{type == Type.detail && data?.status >= Status.CalChecking && (
|
|
{type == Type.detail && data?.status >= Status.CalChecking && (
|
|
<>
|
|
<>
|
|
<ModuleTitle title="作废流程" />
|
|
<ModuleTitle title="作废流程" />
|
|
@@ -637,8 +708,12 @@ const ContractModal = (props) => {
|
|
title: '发起',
|
|
title: '发起',
|
|
description: (
|
|
description: (
|
|
<>
|
|
<>
|
|
- <div>{data?.created_by}</div>
|
|
|
|
- <div>{data?.created_on}</div>
|
|
|
|
|
|
+ <div className={styles.textNowarp}>
|
|
|
|
+ 发起人:{data?.created_name}
|
|
|
|
+ </div>
|
|
|
|
+ <div className={styles.textNowarp}>
|
|
|
|
+ 发起时间:{data?.created_on}
|
|
|
|
+ </div>
|
|
</>
|
|
</>
|
|
),
|
|
),
|
|
},
|
|
},
|
|
@@ -646,8 +721,12 @@ const ContractModal = (props) => {
|
|
title: '审核',
|
|
title: '审核',
|
|
description: (
|
|
description: (
|
|
<>
|
|
<>
|
|
- <div>{data?.cancel_check_by}</div>
|
|
|
|
- <div>{data?.cancel_check_on}</div>
|
|
|
|
|
|
+ <div className={styles.textNowarp}>
|
|
|
|
+ 审核人:{data?.cancel_check_by}
|
|
|
|
+ </div>
|
|
|
|
+ <div className={styles.textNowarp}>
|
|
|
|
+ 审核时间:{data?.cancel_check_on}
|
|
|
|
+ </div>
|
|
</>
|
|
</>
|
|
),
|
|
),
|
|
},
|
|
},
|