forked from gzzfw/frontEnd/gzDyh

dminyi
2024-08-09 a2a5220469a3e1f8bc216f47c887ca4c941920b0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/*
 * @Company: hugeInfo
 * @Author: xzx
 * @Date: 2022-03-17 16:37:09
 * @LastEditors: ldh
 * @LastEditTime: 2022-07-29 09:15:46
 * @Version: 1.0.0
 * @Description: 协助调解反馈 and 协助司法确认反馈
 */
import React, { useState } from 'react';
import PropTypes from 'prop-types';
import { Row, Col, Input, Button, Space } from 'antd';
import { ScheduleOutlined } from '@ant-design/icons';
import MyUpload from '../../../components/MyUpload';
import MyModal from '../../../components/MyModal';
import * as $$ from '../../../utils/utility';
 
const { TextArea } = Input;
 
/**
 * handleType, // mediation:调解;judicial:司法确认
 */
const FeedBack = ({ handleType }) => {
    const str = handleType === 'mediation' ? '调解' : '司法确认';
 
    const [modalVisible, setModalVisible] = useState(false);
 
    // 提交结果
    function handleSubmit() {}
 
    // 退出协助
    function handleSignOut() {
        $$.modalInfo({
            title: `协助${str}退出确认`,
            content: `退出后您将无法在“我的${str}-我协助的“案件列表中查看到案件的相关信息与进展,确定退出吗?`,
            cancelText: '暂不退出',
            okText: '确定退出',
            onOk: async () => {
                $$.infoSuccess({ content: `您已从本案的协助${str}工作成功退出` });
            },
        });
    }
 
    return (
        <>
            <div className="caseDetail-card feedback">
                <div className="caseDetail-cardTitle">
                    <Space size="small">
                        <div className="caseDetail-cardTitle-icon caseDetail-cardTitle-iconBlue">
                            <ScheduleOutlined />
                        </div>
                        <h5>{str}反馈</h5>
                    </Space>
                </div>
                <div className="caseDetail-cardMain">
                    <Row gutter={[16, 16]}>
                        <Col span={24}>
                            <h5>{str}总结</h5>
                            <TextArea rows={2} placeholder={`简要总结协助${str}工作开展的情况`} />
                        </Col>
                        <Col span={24}>
                            <h5>上传附件</h5>
                            <MyUpload fileId="" fileType="" />
                        </Col>
                    </Row>
                </div>
                <div>
                    <Button type="primary" className="public-buttonMargin" onClick={handleSubmit}>
                        提交结果
                    </Button>
                    <Button className="public-mainBtn" onClick={() => setModalVisible(true)}>
                        退出协助
                    </Button>
                </div>
            </div>
            <MyModal
                visible={modalVisible}
                width={558}
                okText="确定退出"
                cancelText="暂不退出"
                onCancel={() => setModalVisible(false)}
                onOk={handleSignOut}
            >
                <h4 style={{ marginBottom: '16px' }}>退出协助理由</h4>
                <h5>理由</h5>
                <TextArea rows={6} placeholder={`输入退出本案协助${str}工作的理由`} />
            </MyModal>
        </>
    );
};
 
FeedBack.propTypes = {
    handleType: PropTypes.string,
};
 
export default FeedBack;