<template>
    <div>
        <el-dialog title="批量文书签章" :visible="true" width="600px" append-to-body :close-on-click-modal="false" 
            @close="handleClose">
            <div class="dialog-content dialog-office-batch">
                <div class="pt-8">
                    <div class="flex-row align-items-center justify-content-between mb-16 case-batch-num">
                        <span>选中<a>{{eventTraDialog.caseids.length}}</a>个案件，系统将对您选择的案件中，符合签字条件（已经完成在线签字）的调解协议文书发起批量电子签章！</span>
                    </div>
                    <el-collapse-transition>
                        <el-row :gutter="56">
                            <el-col :span="24">
                                <div class="flex-row-center align-items-center height-40 mb-8">
                                    <span class="tabs__search-criteria-title flex-shrink-0 pr-16 f18">设置是否进行文书的自动送达</span>
                                </div>
                            </el-col>
                            <el-col :span="24">
                                <div class="mb-24 officelist">
                                    <el-radio-group v-model="ObjectInfo.autoServed">
                                        <el-radio :label="1" border>自动送达</el-radio>
                                        <el-radio :label="0" border>不自动送达（可单独发起送达）</el-radio>
                                    </el-radio-group>
                                </div>
                                    
                            </el-col>
                            
                            
                        </el-row>
                    </el-collapse-transition>
                </div>

            </div>
            <span slot="footer" class="dialog-footer">
                <el-button @click="handleClose()">取消</el-button>
                <el-button type="primary" @click="handleSubmit()">批量签章</el-button>
            </span>
        </el-dialog>
    </div>
</template>
<script>
import api from "@/services/caseManagement";
    export default {
        components: {
        },
        props: {
            eventTraDialog: {
                type: Object,
                default: () => {
                    return {}
                },
            },
        },
        data() {
            return {
                ObjectInfo:{
                    ids:this.eventTraDialog.caseids,
                    autoServed:0
                },
                tableData:[],
                total:0,

            };
        },
        mounted () {
            
        },
        methods: {
            handleSubmit(){
                api.traceSeal_launch(this.ObjectInfo).then((res) => {
                    this.$parent.getCaseInfoList(this.eventTraDialog.current)
                    this.handleClose()
                    this.$message.success("发起批量签章成功");
                });
            },

            handleClose() {
                this.$emit('update:eventTraDialog', null)
            },
        }
    };
</script>

<style scoped lang="scss">
.dialog-office-batch{
    padding: 16px 30px;
    max-height:500px;
    .tabs__search-criteria-title{
        width: 100%;
    }
    .case-batch-num{
        background-color: rgba(236, 238, 241, 0.8196078431);
        padding: 15px 20px;
        border-radius: 4px;
        a{font-size: 16px;font-weight: 500;color: #C66A5B;}
    }
    .officelist{
        background-color: rgba(236, 238, 241, 0.8196078431);
        padding: 20px 20px;
        .el-radio
        {
            width: 230px;
            margin: 10px;
        }
    }
    
}
</style>