From 6f5f11a93fc056b0fe77f91522245cc45a1fb4fa Mon Sep 17 00:00:00 2001 From: dminyi <1301963064@qq.com> Date: Wed, 04 Sep 2024 19:19:13 +0800 Subject: [PATCH] Merge branch 'master' of http://120.79.193.119:9090/r/gzzfw/frontEnd/gzDyh into master --- gz-customerSystem/src/views/register/visit/component/applyDialog.jsx | 26 +++++++++++++++++++++----- 1 files changed, 21 insertions(+), 5 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..1004661 100644 --- a/gz-customerSystem/src/views/register/visit/component/applyDialog.jsx +++ b/gz-customerSystem/src/views/register/visit/component/applyDialog.jsx @@ -16,6 +16,7 @@ import KeyVisits from "@/components/personCard/KeyVisits"; import SelectUnitDialog from "./selectUnitDialog"; import ArcoUpload from '@/components/ArcoUpload'; +import { Scrollbars } from "react-custom-scrollbars"; const FormItem = Form.Item; const Option = Select.Option; @@ -26,6 +27,10 @@ function getId() { 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) { @@ -79,13 +84,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 +107,7 @@ handleChangeFile={handleChangeFile} label='身份证明材料' editData={props.editData} + handleDelFile={handleDelFile} /> </Col> <Col span={12}> @@ -221,7 +235,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 +243,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 +254,7 @@ field='file1' label={isLegal ? '法定代表人身份证明材料' : '机构代表人身份证明材料'} editData={props.editData} + handleDelFile={handleDelFile} /> </Col> <Col span={12}> @@ -340,7 +356,7 @@ return ( <div className="applyDialog"> - <div style={{ height: '590px', overflowY: 'scroll' }}> + <Scrollbars style={{ height: '590px' }} autoHide> <div className="dialogTitle">当事人类型</div> <Row gutter={[16, 16]} style={{ margin: '0 2px 0 0' }}> {$$.options.personClass.map((x, t) => { @@ -380,7 +396,7 @@ <div style={{ width: 'calc(100% - 9px)', background: '#f2f3f5', marginBottom: '20px', padding: '12px' }}> <KeyVisits /> </div> - </div> + </Scrollbars> <div className='dialogFooter'> <Button type="primary" -- Gitblit v1.8.0