From ce7871581ad440a9869118a49746f66e850f502e Mon Sep 17 00:00:00 2001
From: dminyi <1301963064@qq.com>
Date: Tue, 03 Sep 2024 17:07:40 +0800
Subject: [PATCH] 预览当事人类型组件化
---
gz-customerSystem/src/views/register/visit/component/applyDialog.jsx | 21 ++++++++++++++++++---
1 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/gz-customerSystem/src/views/register/visit/component/applyDialog.jsx b/gz-customerSystem/src/views/register/visit/component/applyDialog.jsx
index 4e4be9f..a801a02 100644
--- a/gz-customerSystem/src/views/register/visit/component/applyDialog.jsx
+++ b/gz-customerSystem/src/views/register/visit/component/applyDialog.jsx
@@ -28,6 +28,10 @@
return $$.ax.request({ url: `caseUtils/getNewTimeId`, type: 'get', service: 'utils' });
}
+function delFile(id) {
+ return $$.ax.request({ url: `fileInfo/deleteFileById`, type: 'get', service: 'sys', data: { id } });
+}
+
export default function ApplyDialog(props) {
const formRef = useRef();
const [perClass, setPerClass] = useState('09_01001-1');
@@ -79,13 +83,21 @@
}
}
+ //删除文件
+ const handleDelFile = async (id) => {
+ const res = await delFile(id)
+ if (res.type) {
+ $$.infoSuccess({ content: '删除成功!' });
+ }
+ }
+
//页面返回
const formType = (type) => {
if (type === '09_01001-1') {
//自然人
return (
<>
- <Col span={24}>
+ <Col span={24} className="doubleFile">
<ArcoUpload
params={{
action: `${appUrl.fileUrl}/${appUrl.sys}/api/web/fileInfo/upload?mainId=${props.mainId}&ownerId=${id}&ownerType=22_00018-202`,
@@ -94,6 +106,7 @@
handleChangeFile={handleChangeFile}
label='身份证明材料'
editData={props.editData}
+ handleDelFile={handleDelFile}
/>
</Col>
<Col span={12}>
@@ -221,7 +234,7 @@
let isLegal = type === '09_01001-2'
return (
<>
- <Col span={24}>
+ <Col span={24} className="doubleFile">
<ArcoUpload
params={{
action: `${appUrl.fileUrl}/${appUrl.sys}/api/web/fileInfo/upload?mainId=${props.mainId}&ownerId=${id}&ownerType=22_00018-202`,
@@ -229,9 +242,10 @@
field='file'
label={isLegal ? '企业登记材料' : '机构登记材料'}
editData={props.editData}
+ handleDelFile={handleDelFile}
/>
</Col>
- <Col span={24}>
+ <Col span={24} className="doubleFile">
<ArcoUpload
params={{
action: `${appUrl.fileUrl}/${appUrl.sys}/api/web/fileInfo/upload?mainId=${props.mainId}&ownerId=${id}&ownerType=22_00018-202`,
@@ -239,6 +253,7 @@
field='file1'
label={isLegal ? '法定代表人身份证明材料' : '机构代表人身份证明材料'}
editData={props.editData}
+ handleDelFile={handleDelFile}
/>
</Col>
<Col span={12}>
--
Gitblit v1.8.0