|
@@ -102,6 +102,11 @@ const ContractModal = (props) => {
|
|
},
|
|
},
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ const isSuper = useMemo(() => {
|
|
|
|
+ if (user?.Permission['menu-001-audit']) return true;
|
|
|
|
+ return false;
|
|
|
|
+ }, [user]);
|
|
|
|
+
|
|
console.log('======================', data);
|
|
console.log('======================', data);
|
|
|
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
@@ -189,7 +194,7 @@ const ContractModal = (props) => {
|
|
cancel_desc: values.cancel_desc,
|
|
cancel_desc: values.cancel_desc,
|
|
};
|
|
};
|
|
handleOk(result);
|
|
handleOk(result);
|
|
- } else if (type == Type.check && data?.status == Status.Checking) {
|
|
|
|
|
|
+ } else if (data?.status == Status.Checking) {
|
|
let result = {
|
|
let result = {
|
|
id: data?.id,
|
|
id: data?.id,
|
|
check_by: user?.CName,
|
|
check_by: user?.CName,
|
|
@@ -198,6 +203,15 @@ const ContractModal = (props) => {
|
|
check_desc: values?.check_desc,
|
|
check_desc: values?.check_desc,
|
|
};
|
|
};
|
|
handleOk(result);
|
|
handleOk(result);
|
|
|
|
+ } else if (data?.status == Status.CalChecking) {
|
|
|
|
+ let result = {
|
|
|
|
+ id: data?.id,
|
|
|
|
+ cancel_check_by: user?.CName,
|
|
|
|
+ cancel_check_result: values.cancel_check_result,
|
|
|
|
+ is_pass: values.is_pass,
|
|
|
|
+ // check_desc: values?.check_desc,
|
|
|
|
+ };
|
|
|
|
+ handleOk(result);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
};
|
|
};
|
|
@@ -226,7 +240,7 @@ const ContractModal = (props) => {
|
|
cancelText="返回"
|
|
cancelText="返回"
|
|
onOk={handleSubmit}
|
|
onOk={handleSubmit}
|
|
onCancel={handleCancel}
|
|
onCancel={handleCancel}
|
|
- okButtonProps={type == Type.detail ? { disabled: true } : null}
|
|
|
|
|
|
+ // okButtonProps={type == Type.detail ? { disabled: true } : null}
|
|
destroyOnClose
|
|
destroyOnClose
|
|
>
|
|
>
|
|
<Divider />
|
|
<Divider />
|
|
@@ -256,6 +270,7 @@ const ContractModal = (props) => {
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
showSearch
|
|
showSearch
|
|
allowClear
|
|
allowClear
|
|
|
|
+ treeDefaultExpandAll
|
|
fieldNames={{
|
|
fieldNames={{
|
|
label: 'Name',
|
|
label: 'Name',
|
|
value: 'ID',
|
|
value: 'ID',
|
|
@@ -414,6 +429,7 @@ const ContractModal = (props) => {
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
showSearch
|
|
showSearch
|
|
allowClear
|
|
allowClear
|
|
|
|
+ treeDefaultExpandAll
|
|
fieldNames={{
|
|
fieldNames={{
|
|
label: 'Name',
|
|
label: 'Name',
|
|
value: 'ID',
|
|
value: 'ID',
|
|
@@ -494,9 +510,15 @@ const ContractModal = (props) => {
|
|
]}
|
|
]}
|
|
>
|
|
>
|
|
<Select
|
|
<Select
|
|
|
|
+ showSearch
|
|
style={{ width: '100%' }}
|
|
style={{ width: '100%' }}
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
disabled={dealDisable || disableds.contract}
|
|
disabled={dealDisable || disableds.contract}
|
|
|
|
+ filterOption={(input, option) =>
|
|
|
|
+ (option?.label ?? '')
|
|
|
|
+ .toLowerCase()
|
|
|
|
+ .includes(input.toLowerCase())
|
|
|
|
+ }
|
|
options={userList?.map((item) => {
|
|
options={userList?.map((item) => {
|
|
return {
|
|
return {
|
|
value: item.CName,
|
|
value: item.CName,
|
|
@@ -553,60 +575,7 @@ const ContractModal = (props) => {
|
|
</Form.Item>
|
|
</Form.Item>
|
|
</Col>
|
|
</Col>
|
|
</Row>
|
|
</Row>
|
|
- {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
|
|
|
|
- name="check_desc"
|
|
|
|
- label="拒绝原因:"
|
|
|
|
- labelCol={{ span: 4 }}
|
|
|
|
- >
|
|
|
|
- <Input.TextArea />
|
|
|
|
- </Form.Item>
|
|
|
|
- )}
|
|
|
|
- </>
|
|
|
|
- )}
|
|
|
|
|
|
+
|
|
{type != Type.add && (
|
|
{type != Type.add && (
|
|
<>
|
|
<>
|
|
<ModuleTitle title="归档流程" />
|
|
<ModuleTitle title="归档流程" />
|
|
@@ -662,6 +631,58 @@ const ContractModal = (props) => {
|
|
</div>
|
|
</div>
|
|
</>
|
|
</>
|
|
)}
|
|
)}
|
|
|
|
+ {isSuper && data.status == Status.Checking && (
|
|
|
|
+ <>
|
|
|
|
+ <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.cancel || data?.status >= Status.CalChecking) && (
|
|
{(type == Type.cancel || data?.status >= Status.CalChecking) && (
|
|
<>
|
|
<>
|
|
<ModuleTitle title="作废信息" />
|
|
<ModuleTitle title="作废信息" />
|
|
@@ -671,7 +692,7 @@ const ContractModal = (props) => {
|
|
initialValue={data?.cancel_desc}
|
|
initialValue={data?.cancel_desc}
|
|
labelCol={{ span: 4 }}
|
|
labelCol={{ span: 4 }}
|
|
>
|
|
>
|
|
- <Input />
|
|
|
|
|
|
+ <Input disabled={type != Type.cancel} />
|
|
</Form.Item>
|
|
</Form.Item>
|
|
</>
|
|
</>
|
|
)}
|
|
)}
|
|
@@ -694,7 +715,7 @@ const ContractModal = (props) => {
|
|
</span>
|
|
</span>
|
|
</Form.Item>
|
|
</Form.Item>
|
|
)}
|
|
)}
|
|
- {type == Type.detail && data?.status >= Status.CalChecking && (
|
|
|
|
|
|
+ {data?.status >= Status.CalChecking && (
|
|
<>
|
|
<>
|
|
<ModuleTitle title="作废流程" />
|
|
<ModuleTitle title="作废流程" />
|
|
<div className={styles.modelItem}>
|
|
<div className={styles.modelItem}>
|
|
@@ -738,6 +759,58 @@ const ContractModal = (props) => {
|
|
</div>
|
|
</div>
|
|
</>
|
|
</>
|
|
)}
|
|
)}
|
|
|
|
+ {isSuper && data.status == Status.CalChecking && (
|
|
|
|
+ <>
|
|
|
|
+ <ModuleTitle title="审核情况" />
|
|
|
|
+ <Row>
|
|
|
|
+ <Col span={10} offset={1}>
|
|
|
|
+ <Form.Item
|
|
|
|
+ name="cancel_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="cancel_check_result"
|
|
|
|
+ label="拒绝原因:"
|
|
|
|
+ labelCol={{ span: 4 }}
|
|
|
|
+ >
|
|
|
|
+ <Input.TextArea />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ )}
|
|
|
|
+ </>
|
|
|
|
+ )}
|
|
</Form>
|
|
</Form>
|
|
<Divider />
|
|
<Divider />
|
|
</Modal>
|
|
</Modal>
|