<template>
    <div class="container">
        <fullscreen :fullscreen.sync="fullscreen" class="container-box">
            <div class="titbox">
                <h2>手机客户信息详情</h2>
                <div>
                    <i class="el-icon-refresh" @click="iconCli(1)"></i>
                    <i class="el-icon-full-screen" @click="iconCli(2)"></i>
                    <!--                    <i class="el-icon-folder-opened"></i>-->
                    <!--                    <i class="el-icon-view"></i>-->
                    <!--                    <i class="el-icon-more"></i>-->
                </div>
            </div>
            <div class="search">
                <mySearch :searchList="searchList" @searchInfo="searchInfo"></mySearch>
            </div>
            <div class="tabbox">
                <el-table height="calc(100% - 40px)" v-loading="loading" class="com-table" ref="multipleTable"
                    :data="tableData" tooltip-effect="dark" size="small" border style="width: 100%">
                    <el-table-column align="center" prop="servNo" label="手机号">
                        <template slot-scope="scope">
                              <span>{{vague(scope.row.servNo)}}</span>
                        </template>
                    </el-table-column>
                    <el-table-column prop="cityName" label="地市归属" align="center"></el-table-column>
                    <el-table-column align="center" prop="countyName" label="区县归属">
                    </el-table-column>

                    <el-table-column align="center" prop="age" label="客户年龄">
                    </el-table-column>

                    <el-table-column align="center" prop="innetDate" label="入网时间">
                    </el-table-column>

                    <el-table-column align="center" prop="lcSort" label="区域属性">
                    </el-table-column>

                    <el-table-column align="center" prop="isGroupFlag" label="集团用户">
                    </el-table-column>
                    <el-table-column width="100" align="center" prop="isImpFlag" label="集团关键人">
                    </el-table-column>
                    <el-table-column align="center" prop="custStar" label="客户星级">
                    </el-table-column>
                    <el-table-column width="200" align="center" prop="isL3mInFlag" label="近三月是否营业厅办理过业务">
                    </el-table-column>
                    <el-table-column width="150" align="center" prop="inChnName" label="办理业务营业厅名称">
                    </el-table-column>
                    <el-table-column width="170" align="center" prop="all10086Cnt" label="近三个月拨打热线次数 ">
                    </el-table-column>
                    <el-table-column width="200" align="center" prop="isAppFlagL3m" label="是否三个月手机营业厅活跃客户">
                    </el-table-column>
                    <el-table-column width="200" align="center" prop="isWcFlag" label="是否三个月微信营业厅活跃客户">
                    </el-table-column>
                    <el-table-column width="180" align="center" prop="lastChangeTariffDate" label="最近变更套餐的时间">
                    </el-table-column>
                    <el-table-column width="160" align="center" prop="isL3mActFlag" label="近三个月是否参加过营销">
                    </el-table-column>
                    <el-table-column width="160" align="center" prop="actName" label="最近参加营销名称">
                    </el-table-column>
                    <el-table-column width="170" align="center" prop="isVolteFlag" label="截止当前是否开通volte业务">
                    </el-table-column>
                    <el-table-column width="180" align="center" prop="volteCallDur" label="近一个月volte通话时长(分钟)">
                    </el-table-column>
                    <el-table-column width="150" align="center" prop="last3Arpu" label="近三个月月均ARPU(元)">
                    </el-table-column>

                    <el-table-column width="160" align="center" prop="last3Mou" label="近三个月月均MOU(分钟)">
                    </el-table-column>
                    <el-table-column width="150" align="center" prop="last3Dou" label="近三个月月均DOU(M)">
                    </el-table-column>
                    <el-table-column width="170" align="center" prop="last3Gprs" label="前三个月上网流量（M）">
                    </el-table-column>
                    <el-table-column width="170" align="center" prop="last2Gprs" label="前2个月上网流量（M）">
                    </el-table-column>
                    <el-table-column width="140" align="center" prop="gprsFlux" label="前月上网流量（M）">
                    </el-table-column>
                    <el-table-column width="160" align="center" prop="last3RoamGprs" label="前三个月省外流量（M）">
                    </el-table-column>
                    <el-table-column width="160" align="center" prop="last2RoamGprs" label="前2个月省外流量（M）">
                    </el-table-column>
                    <el-table-column width="130" align="center" prop="roamGprs" label="前月省外流量（M）">
                    </el-table-column>
                    <el-table-column width="190" align="center" prop="last3OutmealGprsFee" label="前三个月套餐外流量费用（元）">
                    </el-table-column>
                    <el-table-column width="190" align="center" prop="last2OutmealGprsFee" label="前两个月套餐外流量费用（元）">
                    </el-table-column>
                    <el-table-column width="190" align="center" prop="outmealGprsFee" label="前月套餐外流量费用（元）">
                    </el-table-column>
                    <el-table-column width="200" align="center" prop="last3L7dGprs" label="前三个月最后7天使用流量（M）">
                    </el-table-column>

                    <el-table-column width="200" align="center" prop="last2L7dGprs" label="前两个月最后7天使用流量（M）">
                    </el-table-column>
                    <el-table-column width="170" align="center" prop="mL7dGprs" label="前月最后7天使用流量（M）">
                    </el-table-column>
                    <el-table-column width="120" align="center" prop="arcTime" label="最后一次投诉时间">
                    </el-table-column>
                    <el-table-column align="center" prop="serviceReqstType1" label="投诉类型">
                    </el-table-column>
                    <el-table-column width="100" align="center" prop="cmplntsPheDesc" label="投诉问题描述">
                    </el-table-column>
                    <el-table-column width="100" align="center" prop="isRepetCompn" label="是否重复投诉">
                    </el-table-column>
                    <el-table-column align="center" prop="respDeptNm" label="判责">
                    </el-table-column>
                    <el-table-column align="center" prop="compnSs" width="100" label="投诉解决时长">
                    </el-table-column>
                    <el-table-column align="center" prop="isCentrProces" label="是否派单">
                    </el-table-column>
                </el-table>
                <el-pagination class="pageBox" @current-change="currchange" layout="prev, pager, next" background
                    :total="total">
                </el-pagination>
            </div>
        </fullscreen>
    </div>
</template>
<script>
    import mySearch from "../../../components/search";

    export default {
        components: {
            mySearch,
        },
        data() {
            return {
                fullscreen: false,
                total: 0,
                pageSize: 1,
                tableData: [],
                searchList: [{
                    type: "input",
                    tit: "手机号",
                    value: "",
                    width: "100%",
                    options: [],
                }, ],
                params: {
                    servNo: "",
                },
                loading: false,
            };
        },
        methods: {
            vague(v){
                v = v.split("");
                v[3] = "*";
                v[4] = "*";
                v[5] = "*";
                v[6] = "*";
                let phone = '';
                for (let i = 0; i < v.length; i++) {
                    phone += v[i]
                }
                return phone
            },
            //搜索数据
            searchInfo(v) {
                this.params = {};
                v[0] ? (this.params.servNo = v[0]) : "";
                this.getList(this.params, this.pageSize);
            },
            //获取列表
            getList(v, n) {
                this.loading = true;
                this.pageSize = n;
                this.$http({
                    url: "/satisfy/customer/ydMobileUserInfo",
                    method: "post",
                    headers: {
                        "Content-Type": "application/json",
                        page: '{"pageNo":"' + n + '","pageSize":"10"}',
                    },
                    data: v,
                }).then((res) => {
                    this.loading = false;
                    this.tableData = res.data.data;
                    this.total = res.data.totalRecord;
                });
            },
            //功能栏
            iconCli(v) {
                if (v === 1) {
                    this.getList(this.params, this.pageSize);
                }
                if (v === 2) {
                    this.fullscreen = !this.fullscreen;
                }
            },
            // 分页
            currchange(v) {
                this.pageSize = v;
                this.getList(this.params, this.pageSize);
            },
        },
        mounted() {
            this.getList(this.params, this.pageSize);
        },
        created() {},
    };
</script>
<style>
    .el-input__suffix {
        cursor: pointer;
    }
</style>
<style scoped lang="scss">
    .titbox {
        div {
            float: right;

            i {
                font-size: 22px;
                margin-left: 20px;
                cursor: pointer;
            }
        }
    }

    .tabbox {
        margin-top: 15px;
    }

    .pageBox {
        text-align: right;
        margin-top: 10px;
    }
</style>
