forked from nsjcy/frontEnd/nsjcy

liuwh
2020-06-09 5a887acf1924950715086633d329db045223b5c4
SunshineIns/src/page/ApplyFor.jsx
@@ -64,7 +64,7 @@
            formData: data,
        });
        this.setState({ loading: true })
        Fetch.entryQuery({ ...data,type:1 })
        Fetch.entryQuery({ ...data, type: 1 })
            .then(res => {
                console.log(res)
                for (var i = 0; i < res.rows.length; i++) {
@@ -79,7 +79,7 @@
    getData = () => {
        this.setState({ loading: true })
        Fetch.entryQuery({ ...this.state.formData,type:1 })
        Fetch.entryQuery({ ...this.state.formData, type: 1 })
            .then(res => {
                console.log(res)
                for (var i = 0; i < res.rows.length; i++) {
@@ -123,10 +123,9 @@
    }
    confirm = (e) => {
        console.log(e);
        this.setState({ loading: true })
        Fetch.socialDelete(e).then(res => {
            if (res.code == 0) {
        Fetch.entryDelete(e).then(res => {
            if (res.statuscode == 1) {
                console.log(res)
                this.setState({ loading: false })
                message.success('删除成功');
@@ -168,16 +167,21 @@
            render: (text, record) => (
                <span>
                    <a onClick={() => this.showModal(record.id)}>详情</a>
                    <Divider type="vertical" />
                    <Popconfirm
                        title="确认删除任务吗?"
                        id={record.id}
                        onConfirm={e => this.confirm(record.id)}
                        okText="确定"
                        cancelText="取消"
                    >
                        <a href="#">删除</a>
                    </Popconfirm>
                    {
                        record.status == 1 ?
                            <React.Fragment>
                                <Divider type="vertical" />
                                <Popconfirm
                                    title="确认删除申请吗?"
                                    id={record.id}
                                    onConfirm={e => this.confirm(record.id)}
                                    okText="确定"
                                    cancelText="取消"
                                >
                                    <a href="#">删除</a>
                                </Popconfirm>
                            </React.Fragment> : ''
                    }
                </span>
            ),
        }];