<template>
    <div class="conferencecost-all" v-loading.fullscreen.lock="conferencecostLoading">
        <el-dialog width="650px" title="设置查看权限" class="permissionsbox" :visible.sync="permissionSettingDialog"
            :close-on-click-modal="false">
            <el-checkbox-group v-model="viewUsers">
                <div style="display: flex;flex-wrap: wrap;">
                    <div style="width: 24%;margin: 3px;" v-for="item in viewUsersarr" :key="item.id">
                        <el-checkbox :label="item.id">{{ item.cnName }}</el-checkbox>
                    </div>
                </div>
            </el-checkbox-group>
            <div style="text-align: right;margin-top: 15px;">
                <el-button size="mini" @click="permissionSettingSet" type="primary">分配</el-button>
                <el-button size="mini" @click="permissionSettingDialog = false">取消</el-button>
            </div>
        </el-dialog>
        <div class="conferencecost-header">
            <div class="conferencecost-header-left">
                <div class="conferencecost-header-left-item">
                    <label style="width:40px;">会务: </label>
                    <el-select @change="conferenceidchange" size="small" v-model="conferenceid" filterable
                        placeholder="请选择">
                        <el-option v-for="item in conferenceidarr" :key="item.id" :label="item.teamName"
                            :value="item.id">
                        </el-option>
                    </el-select>
                </div>
                <div class="conferencecost-header-left-item">
                    <label style="width:80px;">服务地区: </label>
                    <el-input size="small" placeholder="请输入内容" v-model="conferenceAffairsCost.city" clearable>
                    </el-input>
                </div>
            </div>
            <div class="conferencecost-header-right">
                <el-button v-if="control.isGM && userId != 21" size="small" type="primary"
                    @click="permissionSettingDialog = true">权限分配</el-button>
                <el-select v-if="canSave" size="small" v-model="fileSelect" clearable placeholder="请选择"
                    style="width: 150px;margin-left: 10px;">
                    <el-option v-for="item in filetype" :key="item.id" :label="item.name" :value="item.id">
                    </el-option>
                </el-select>
                <el-button v-if="canSave" style="margin-left: 10px;" size="small" type="primary"
                    @click="FileDown">生成表格</el-button>
                <el-button v-if="control.isReview" size="small" @click="ConferenceAffairsAudit(1)"
                    type="primary">审核通过</el-button>
                <el-button v-if="canSave" size="small" @click="ConferenceAffairsSave(true)"
                    type="primary">保存</el-button>
            </div>
        </div>
        <div class="conferencecost-content">
            <el-table border ref="tableRef" :data="tableDatas" tooltip-effect="dark" style="width: 100%"
                @selection-change="handleSelectionChange">
                <el-table-column v-if="control.isReview" type="selection" width="55">
                </el-table-column>
                <el-table-column label="序号" prop="index" width="55">
                </el-table-column>
                <el-table-column prop="name" label="类型" width="150">
                    <template slot-scope="scope">
                        <el-select size="small" v-model="scope.row.priceType" clearable placeholder="请选择">
                            <el-option v-for="item in typearr" :key="item.id" :label="item.text" :value="item.id">
                            </el-option>
                        </el-select>
                    </template>
                </el-table-column>
                <el-table-column prop="name" label="单项内容" width="140">
                    <template slot-scope="scope">
                        <el-input type="textarea" :rows="3" placeholder="请输入内容"
                            v-model="scope.row.priceName"></el-input>
                    </template>
                </el-table-column>
                <el-table-column prop="name" label="成本单价" width="100">
                    <template slot-scope="scope">
                        <el-input-number @change="calculateQuotation(scope.row)" :precision="2" size="mini"
                            :controls="false" v-model="scope.row.costPrice"></el-input-number>
                    </template>
                </el-table-column>
                <el-table-column prop="name" label="数量" width="80">
                    <template slot-scope="scope">
                        <el-input-number @change="calculateQuotation(scope.row)" :precision="2" size="mini"
                            :controls="false" v-model="scope.row.count"></el-input-number>
                    </template>
                </el-table-column>
                <el-table-column prop="name" label="单位" width="100">
                    <template slot-scope="scope">
                        <el-select size="small" v-model="scope.row.unit" placeholder="" clearable>
                            <el-option v-for="item in units" :key="item.id" :label="item.text" :value="item.id">
                            </el-option>
                        </el-select>
                    </template>
                </el-table-column>
                <el-table-column prop="name" label="币种" width="100">
                    <template slot-scope="scope">
                        <el-select size="small" @change="currencychange(scope.row)" v-model="scope.row.currency"
                            clearable filterable placeholder="请选择币种">
                            <el-option v-for="item in options" :key="item.currencyId" :label="item.currencyCode"
                                :value="item.currencyId">
                            </el-option>
                        </el-select>
                    </template>
                </el-table-column>
                <el-table-column prop="name" label="当时汇率" width="100">
                    <template slot-scope="scope">
                        <el-input-number @change="calculateQuotation(scope.row)" :precision="4" size="mini"
                            :controls="false" v-model="scope.row.rate"></el-input-number>
                    </template>
                </el-table-column>

                <el-table-column prop="name" label="系数" width="100">
                    <template slot-scope="scope">
                        <el-input-number @change="calculateQuotation(scope.row)" :precision="2" size="mini"
                            :controls="false" v-model="scope.row.coefficient"></el-input-number>
                    </template>
                </el-table-column>
                <el-table-column prop="name" :label="`单项成本金额`" width="130">
                    <template slot-scope="scope">
                        {{ townum(scope.row.costPrice * scope.row.count) }}
                        <!-- <el-input-number :precision="2" size="mini" :controls="false" v-model="scope.row.baoJiaPrice"></el-input-number> -->
                    </template>
                </el-table-column>
                <el-table-column prop="name" label="单项报价金额" width="160">
                    <template slot-scope="scope">
                        {{ `${townum(scope.row.baoJiaPrice)} (CNY)` }}
                        <div v-if="scope.row.currency != 836">

                            {{ `${townum(scope.row.costPrice * scope.row.coefficient * scope.row.count)}
                            (${getCurrencyCode(scope.row)})`

                            }}

                        </div>
                        <!-- <el-input-number :precision="2" size="mini" :controls="false" v-model="scope.row.baoJiaPrice"></el-input-number> -->
                    </template>
                </el-table-column>

                <el-table-column prop="name" label="附加值" width="100">
                    <template slot-scope="scope">
                        <el-input-number :precision="2" :controls="false" placeholder="请输入内容" size="mini"
                            v-model="scope.row.addedValue"></el-input-number>
                    </template>
                </el-table-column>
                <el-table-column prop="name" label="明细">
                    <template slot-scope="scope">
                        <el-input type="textarea" :rows="3" placeholder="请输入内容" v-model="scope.row.details"></el-input>
                    </template>
                </el-table-column>
                <el-table-column prop="name" label="备注" width="150">
                    <template slot-scope="scope">
                        <el-input type="textarea" :rows="3" placeholder="请输入内容" v-model="scope.row.remark"></el-input>
                    </template>
                </el-table-column>
                <el-table-column prop="reviewStatus" label="审核状态" width="100">
                    <template slot-scope="scope">
                        {{ scope.row.reviewStatus === 0 ? '未审核' : scope.row.reviewStatus === 1 ? '已通过' : '已撤销' }}
                    </template>
                </el-table-column>
                <el-table-column label="操作" width="100px">
                    <template slot-scope="scope">
                        <div class="conferencecost-content-btn">
                            <el-button size="mini" @click="removeRow(scope.$index, scope.row)" type="danger">移
                                除</el-button>
                            <div v-if="control.isReview" style="margin-top: 5px;">
                                <el-button size="mini" @click="ConferenceAffairsAudits(1, scope.row.id)"
                                    type="primary">通
                                    过</el-button>
                                <el-button size="mini" @click="ConferenceAffairsAudits(-1, scope.row.id)"
                                    type="danger">撤
                                    销</el-button>
                            </div>
                        </div>
                    </template>
                </el-table-column>
            </el-table>
            <div class="Addline">
                <el-button v-if="canSave" size="small" @click="addlineclick" type="primary">添加一行</el-button>
            </div>
        </div>
        <div class="conferencecost-foot">
            <div class="conferencecost-foot-rateSummary">
                <div class="conferencecost-rateSummary-title">使用的币种及汇率：</div>
                <div class="rate-statistics">
                    <span v-for="(item, index) in rateStatistics" :key="index">
                        {{ item.currencyCode }} : {{ item.rate
                        }}{{ index < rateStatistics.length - 1 ? ' 、' : '' }} </span>
                </div>
            </div>
            <div class="conferencecost-foot-totalcost">
                成本总计：{{ conferenceAffairsCost.costAll }} <span style="color: red;">{{ danwei }}</span>
            </div>
            <div class="conferencecost-foot-totalquotations">
                报价总计：{{ conferenceAffairsCost.baoJiaAll }} <span style="color: red;">{{ danwei }}</span>
            </div>
        </div>
        <div class="conferencecost-allocation">
            <div class="conferencecost-allocation-select">
                注：其中
                <el-input-number style="width:120px;" :precision="2" size="mini" :controls="false"
                    v-model="conferenceAffairsCost.allocationAmount"></el-input-number>
                <el-select @change="allocationGroupIdchange" style="width:120px;" size="mini"
                    v-model="conferenceAffairsCost.allocationCurrency" clearable>
                    <el-option v-for="item in options" :key="item.currencyId" :label="item.currencyCode"
                        :value="item.currencyId">
                    </el-option>
                </el-select>
                ，会分摊到
                <el-select filterable style="width:200px;" size="mini" v-model="conferenceAffairsCost.allocationGroupId"
                    clearable>
                    <el-option v-for="item in conferenceidarr" :key="item.id" :label="item.teamName" :value="item.id">
                    </el-option>
                </el-select>
            </div>
            <div class="conferencecost-Interestrate" v-if="false">
                该会务利润率超过
                <el-input-number style="width:120px;" :precision="2" size="mini" :controls="false"
                    v-model="liom"></el-input-number>%
                需要增派
                <el-input-number style="width:120px;" size="mini" :controls="false" v-model="lioms"></el-input-number>
                人去现场执行
            </div>
        </div>
    </div>
</template>
<script>
import { debounce } from '../../store/statice'
export default {
    data() {
        return {
            a: [],
            liom: 0,
            lioms: 0,
            danwei: '',
            danweiId: 0,
            conferenceAffairsCost: {
                city: '',//服务地区
                diid: '',//团组Id
                allocationAmount: '',//分配金额
                allocationCurrency: '',//分配币种
                allocationRate: '',//分配时汇率
                allocationGroupId: '',//分配团组Id
                id: 0,
                remark: '',
                costAll: '',//成本总计
                baoJiaAll: '',//报价总计
                mostCurr: 0, //最终币种
            },
            units: [],
            typearr: [],
            tableDatas: [
                // {
                //     priceType:'',//费用类型
                //     priceName:'',//费用名称
                //     costPrice:0,//成本费用
                //     currency:'',//币种
                //     rate:0,//当时汇率
                //     count:0,//数量
                //     unit:'',//单位
                //     coefficient:0,//系数
                //     baoJiaPrice:0,//报价金额
                //     addedValue:'',//附加值
                //     details:'',//明细
                //     reviewStatus:'',//审核状态
                //     diid:'',//团组Id
                //     id:0,//主表Id
                //     remark:'',//备注
                // }

            ],
            conferenceid: 0,
            conferenceidarr: [],
            input: '',
            options: [],
            token: '',
            userId: '',
            restriction: true,
            rateStatistics: [],
            multipleSelection: [],

            conferenceAffairsCostChildids: [],
            conferencecostLoading: false,
            filetype: [],
            fileSelect: '',
            control: {
                isGM: false, //权限分配
                isReview: false, //复审
            },
            permissionSettingDialog: false,
            viewUsersarr: [],
            viewUsers: [],

        }
    },
    updated() {
        //console.log(1);
        if (this.restriction) {
            this.$emit('transfer', true)
            this.restriction = false;
        }
    },
    destroyed() {
        this.$emit('transfer', false)
    },
    watch: {
        tableDatas: {
            handler(val) {
                var _this = this
                _this.rateStatistics = [];
                var obj = {};
                _this.options.forEach(currency => {
                    val.forEach(item => {
                        if (item.currency === currency.currencyId && !obj[currency.currencyId]) {
                            obj[currency.currencyId] = true;
                            _this.rateStatistics.push(currency);
                        }
                    });
                });
                if (_this.rateStatistics.length > 1) {
                    _this.danwei = 'CNY';
                    _this.danweiId = 836;
                } else {
                    _this.danwei = _this.rateStatistics.length == 1 ? _this.rateStatistics[0].currencyCode : 'CNY';
                    _this.danweiId = _this.rateStatistics.length == 1 ? _this.rateStatistics[0].currencyId : 836;
                }
                _this.updateTotals();
                console.log("tableDatas");
            },
            deep: true
        }
    },
    computed: {
        canSave() {
            return this.control.isReview || this.control.isGM || this.viewUsers.includes(this.userId);
        }
    },
    methods: {
        //保留两位小数
        townum(val) {
            val = Number(val);
            return val.toFixed(2);
        },
        handleSelectionChange(val) {
            this.conferenceAffairsCostChildids = [];
            this.multipleSelection = val;
            console.log(this.multipleSelection);
            for (let i = 0; i < this.multipleSelection.length; i++) {
                this.conferenceAffairsCostChildids.push(this.multipleSelection[i].id);
            }
        },

        //币种切换
        currencychange(val) {
            var obj = this.options.find(function (i) {
                return i.currencyId === val.currency;
            });
            if (obj) {
                val.rate = obj.rate;
                this.calculateQuotation(val);
            }
        },
        //会务切换
        conferenceidchange(val) {
            //this.ConferenceAffairsInIts();
            this.ConferenceAffairsLoad();
        },
        //添加一行
        addlineclick() {
            this.tableDatas.push({
                index: this.tableDatas.length + 1,
                priceType: '',//费用类型
                priceName: '',//费用名称
                costPrice: 0,//成本费用
                currency: 836,//币种
                rate: 1,//当时汇率s
                count: 0,//数量333
                unit: '',//单位
                coefficient: 0,//系数
                baoJiaPrice: 0,//报价金额
                addedValue: 0,//附加值
                details: '',//明细
                reviewStatus: 0,//审核状态
                diid: this.conferenceid,//团组Id
                id: 0,//主表Id
                remark: '',//备注
            });
            this.updateTotals();
        },
        calculateQuotation(row) {
            // Ensure all values are numbers and not null/undefined
            const costPrice = Number(row.costPrice) || 0;
            const rate = Number(row.rate) || 0;
            const count = Number(row.count) || 0;
            const coefficient = Number(row.coefficient) || 0;

            row.baoJiaPrice = parseFloat((costPrice * rate * count * coefficient).toFixed(2));

            // Update totals
            this.updateTotals();
        },

        updateTotals() {
            // 计算成本总计
            this.conferenceAffairsCost.costAll = this.tableDatas.reduce((sum, item) => {
                console.log(item);
                console.log(sum);
                
                if (this.rateStatistics.length > 1) {
                    return sum + ((Number(item.costPrice) || 0) * (Number(item.count) || 0) * (Number(item.rate) || 0))+((Number(item.rate) || 0) * (Number(item.addedValue) || 0));
                } else {
                    return sum + ((Number(item.costPrice) || 0) * (Number(item.count) || 0))+(Number(item.addedValue) || 0);
                }
            }, 0).toFixed(2);

            // 计算报价总计
            this.conferenceAffairsCost.baoJiaAll = this.tableDatas.reduce((sum, item) => {
                if (this.rateStatistics.length > 1) {
                    return sum + ((Number(item.costPrice) || 0) * (Number(item.count) || 0) * (Number(item.rate) || 0) * (Number(item.coefficient) || 0))+((Number(item.rate) || 0) * (Number(item.addedValue) || 0));
                } else {
                    return sum + ((Number(item.costPrice) || 0) * (Number(item.count) || 0) * (Number(item.coefficient) || 0))+(Number(item.addedValue) || 0);
                }
 
            }, 0).toFixed(2);
        },
        //分配HUI率切换
        allocationGroupIdchange(val) {
            console.log(val);
            console.log(val);

            var obj = this.options.find(function (i) {
                return i.currencyId === val;
            });
            if (obj) {
                this.conferenceAffairsCost.allocationRate = obj.rate;
            }
        },
        //移除
        removeRow(index, row) {
            console.log(index, row.id);

            // this.tableDatas.splice(index, 1);
            //this.updateTotals();//jisuan总计
            var url = "/api/Groups/ConferenceAffairSinglesDelete"
            var that = this
            this.$axios({
                method: 'post',
                url: url,
                headers: {
                    Authorization: 'Bearer ' + that.token
                },
                data: {
                    userId: this.userId,
                    ids: [row.id],
                }
            }).then(function (res) {
                if (res.data.code == 200) {
                    that.$message({
                        type: 'success',
                        message: res.data.msg,
                    });
                    that.updateTotals()
                    that.ConferenceAffairsSave(false);
                    //that.ConferenceAffairsInIts();
                    that.ConferenceAffairsLoad();
                } else {
                    that.$message({
                        type: 'error',
                        message: res.data.msg
                    });
                }
            })
        },
        //单条审核api
        ConferenceAffairsAudits: debounce(function (reviewStatus, id) {
            var url = "/api/Groups/ConferenceAffairsAudit"
            var that = this
            this.$axios({
                method: 'post',
                url: url,
                headers: {
                    Authorization: 'Bearer ' + that.token
                },
                data: {
                    conferenceAffairsCostChildids: [id],
                    reviewStatus: reviewStatus,
                }
            }).then(function (res) {
                if (res.data.code == 200) {
                    that.$message({
                        type: 'success',
                        message: res.data.msg
                    });
                    //that.ConferenceAffairsInIts();
                    that.ConferenceAffairsLoad();
                } else {
                    that.$message({
                        type: 'error',
                        message: res.data.msg
                    });
                }
            })
        }, 1000, true),
        //多条审核api
        ConferenceAffairsAudit: debounce(function (reviewStatus) {
            if (this.conferenceAffairsCostChildids.length === 0) {
                this.$message({
                    type: 'warning',
                    message: '请至少选择一条记录进行审核！'
                });
                return;
            }
            var url = "/api/Groups/ConferenceAffairsAudit"
            var that = this
            this.$axios({
                method: 'post',
                url: url,
                headers: {
                    Authorization: 'Bearer ' + that.token
                },
                data: {
                    conferenceAffairsCostChildids: that.conferenceAffairsCostChildids,
                    reviewStatus: reviewStatus,
                }
            }).then(function (res) {
                if (res.data.code == 200) {
                    that.$message({
                        type: 'success',
                        message: '审核成功！'
                    });
                    //that.ConferenceAffairsInIts();
                    that.ConferenceAffairsLoad();
                } else {
                    that.$message({
                        type: 'error',
                        message: res.data.msg
                    });
                }
            })

        }, 1000, true),

        //保存api
        ConferenceAffairsSave: debounce(function (isShow) {
            this.conferenceAffairsCost.diid = this.conferenceid;
            this.conferenceAffairsCost.baoJiaAll = Number(this.conferenceAffairsCost.baoJiaAll);
            this.conferenceAffairsCost.costAll = Number(this.conferenceAffairsCost.costAll);
            this.conferenceAffairsCost.mostCurr = this.danweiId;
            var url = "/api/Groups/ConferenceAffairsSave"
            var that = this
            this.$axios({
                method: 'post',
                url: url,
                headers: {
                    Authorization: 'Bearer ' + that.token
                },
                data: {
                    conferenceAffairsCost: that.conferenceAffairsCost,
                    conferenceAffairsCostChild: that.tableDatas,
                    userId: that.userId,
                    groupId: that.conferenceid,
                }
            }).then(function (res) {
                if (res.data.code == 200) {
                    if (isShow) {
                        const { success, error } = res.data.data;
                        var appendStr = error > 0 ? `(${success}条保存成功,${error}条已审核不保存)` : '';
                        that.$message({
                            type: 'success',
                            message: res.data.msg + appendStr,
                        });
                        //that.ConferenceAffairsInIts();
                        that.ConferenceAffairsLoad();
                    }
                } else {
                    that.$message({
                        type: 'error',
                        message: res.data.msg
                    });
                }
            }).catch(function (error) {
                if (error.message == 'Request failed with status code 400') {
                    that.$message({
                        type: 'error',
                        message: '请将内容填写完整再保存！'
                    });

                } else {
                    that.$message({
                        type: 'error',
                        message: error.message
                    });
                }
            });
        }, 1000, true),
        //文件下载
        FileDown() {
            var url = "/api/Groups/ConferenceAffairsFileDown"
            var that = this
            this.$axios({
                method: 'post',
                url: url,
                headers: {
                    Authorization: 'Bearer ' + that.token
                },
                data: {
                    fileTypeId: that.fileSelect,
                    groupId: that.conferenceid,
                }
            }).then(function (res) {
                if (res.data.code == 200) {
                    //弹出成功提示
                    that.$message({
                        type: 'success',
                        message: '下载成功！'
                    });

                    // 创建一个隐藏的<a>元素用于下载文件
                    const link = document.createElement('a');
                    link.style.display = 'none';
                    link.href = res.data.data.filePath;
                    link.download = res.data.data.fileName;

                    // 将<a>元素添加到DOM中，点击它，然后移除它
                    document.body.appendChild(link);
                    link.click();
                    document.body.removeChild(link);
                } else {
                    that.$message({
                        type: 'error',
                        message: res.data.msg
                    });
                }
            })
        },
        // 获取每行数据的币种代码
        getCurrencyCode(row) {
            const currency = this.options.find(option => option.currencyId === row.currency);
            return currency ? currency.currencyCode : '';
        },
        // 合并为单一函数，移除冗余API调用
        ConferenceAffairsLoad() {
            this.conferencecostLoading = true;
            const url = '/api/Groups/ConferenceAffairsInIt';
            this.$axios({
                method: 'post',
                url,
                headers: { Authorization: 'Bearer ' + this.token },
                data: {
                    userId: this.userId, // 统一使用动态userId，移除硬编码
                    groupId: this.conferenceid
                }
            }).then(res => {
                const data = res.data.data;

                if (res.data.code == 201 || res.data.code == 200) {
                    // 原ConferenceAffairsInIt逻辑
                    this.conferenceidarr = data.groupList;
                    if (!this.conferenceid) {
                        this.conferenceid = this.conferenceidarr.length > 0 ? this.conferenceidarr[0].id : '';
                    }

                    // 原ConferenceAffairsInIts逻辑
                    this.options = data.currenyList.teamRates;
                    this.typearr = data.typeData;
                    this.units = data.units;
                    this.filetype = data.fileType;
                    this.fileSelect = this.filetype.length > 0 ? this.filetype[0].id : '';
                    this.control.isGM = data.isGM;
                    this.control.isReview = data.isReview;
                    this.viewUsersarr = data.userList;
                    this.viewUsers = data.operatorUser;


                    if (res.data.code == 200) {
                        this.conferenceAffairsCost = data.conferenceAffairsCost;
                        this.tableDatas = data.conferenceAffairsCostChi;
                        // 设置默认选中所有行
                        this.$nextTick(() => {
                            if (this.tableDatas.length > 0) {
                                this.tableDatas.forEach(row => {
                                    this.$refs.tableRef.toggleRowSelection(row, true);
                                });
                            }
                        });
                    }

                    if (res.data.code == 201) {

                        this.conferenceAffairsCost = {};
                        this.tableDatas = [];

                        //弹出暂无权限
                        this.$message({
                            type: 'warning',
                            message: '暂无权限！'
                        });
                    }
                }

                this.conferencecostLoading = false;
            });
        },
        permissionSettingSet() {

            const userids = this.viewUsers;

            if (userids.length == 0) {
                this.$message({
                    type: 'warning',
                    message: '请选择用户！'
                });
                return;
            }

            const url = '/api/Groups/PermissionSetting';
            this.$axios({
                method: 'post',
                url,
                headers: { Authorization: 'Bearer ' + this.token },
                data: {
                    UserIds: userids,
                    GroupId: this.conferenceid,
                    CreateUserId: this.userId,
                }
            }).then(res => {
                if (res.data.code == 200) {
                    this.$message({
                        type: 'success',
                        message: '权限分配成功！'
                    });
                    this.permissionSettingDialog = false;
                    this.ConferenceAffairsLoad();
                } else {
                    this.$message({
                        type: 'error',
                        message: res.data.msg
                    });
                }
            })
        }
    },
    mounted() {
        this.token = JSON.parse(localStorage.getItem('userinif')).token;
        this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
        //this.ConferenceAffairsInIt()
        this.ConferenceAffairsLoad();
    }
}
</script>
<style>
.conferencecost-all {
    background-color: #fff;
    padding: 10px;
    box-shadow: 0 0 5px #0005;
    border-radius: 10px;
    min-height: 830px;
}

.conferencecost-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.conferencecost-header-left {
    display: flex;
    flex-wrap: wrap;
}

.conferencecost-header-left-item {
    margin-right: 15px;
    margin-bottom: 15px;
}

.conferencecost-header-left-item {
    display: flex;
    align-items: center;
}

.conferencecost-content .el-input-number--mini {
    width: 100%;
}

.conferencecost-content-btn {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.conferencecost-content-btn .el-button+.el-button {
    margin-left: 0px;
    margin-top: 5px;
}

.Addline {
    margin-top: 10px;
    text-align: center;
}

.conferencecost-header-right>div,
button {
    margin-bottom: 15px;
}

.conferencecost-foot-rateSummary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.conferencecost-all .conferencecost-content .el-table__header-wrapper,
.el-table__body-wrapper {
    font-size: 12px
}

.conferencecost-allocation {
    margin-top: 15px;
}

.conferencecost-Interestrate {
    margin-top: 10px;
}

.conferencecost-foot,
.conferencecost-allocation {
    font-size: 14px;
    color: #909399;
    font-weight: 600;
}

.rate-statistics {
    color: #3cca54;
    /* Element UI 主题色 */
    font-weight: bold;
}
</style>
