$(function(){
    //设置尺寸
    function setRem (){ // 绑定到窗口的这个事件中
        var whdef = 100/1920;// 表示1920的设计图,使用100PX的默认值
        var wH = window.innerHeight;// 当前窗口的高度
        var wW = window.innerWidth<=1920?1920:window.innerWidth;// 当前窗口的宽度
        var rem = wW * whdef;// 以默认比例值乘以当前窗口宽度,得到该宽度下的相应FONT-SIZE值
        $('html').css('font-size', rem + "px");
    }
    setRem ();
    $(window).resize(function(){
        setRem ();
        window.location.reload();
    });
    // 右上角时间显示
    $("#Timer").text(new Date().toLocaleString());
    setInterval(function(){
        $("#Timer").text(new Date().toLocaleString());
    },1000);
    var galleryThumbs = new Swiper('.gallery-thumbs', {
        spaceBetween: 0,
        slidesPerView: 8,
        loop: false,
        freeMode: true,
        loopedSlides: 8, //looped slides should be the same
        watchSlidesVisibility: true,
        watchSlidesProgress: true,
        on: {
            init: function(){
                //Swiper初始化了  第一页
                jiguanyeji();
                jiguanyejiRate();
            },
            //获取点击内容的索引
            click: function(){
                // this.active = this.realIndex;
                var tab = $('.swiper-slide-thumb-active').html();
                // alert(tab);
                if (tab=='集团业绩') {
                    jiguanyeji();
                    jiguanyejiRate();
                }else if (tab=='电商数据') {
                    // alert(tab);
                }else if (tab=='兰州婚纱' || tab=='兰州写真/儿童') {
                    // 兰州业绩
                    lanzhouyeji(tab);
                    lanzhouyejiRate(tab);

                    // 兰州平销
                    if(tab == '兰州写真/儿童'){
                        // 兰州订单
                        lanzhouXZdd(tab);
                        lanzhouXZddRate(tab);
                        // 兰州看样
                        lanzhouXZky(tab);
                        lanzhouXZkyRate(tab);
                        // 兰州平销
                        lanzhouXZyxpx(tab);
                        lanzhouXZexpx(tab);
                        // 兰州摄影
                        lanzhouXZsy(tab);
                        lanzhouXZsyRate(tab);
                    }else{
                        // 兰州订单
                        lanzhoudd(tab);
                        lanzhouddRate(tab);
                        // 兰州平销
                        lanzhouyxpx(tab);
                        lanzhouexpx(tab);
                        // 兰州看样
                        lanzhouky(tab);
                        lanzhoukyRate(tab);
                        // 兰州摄影
                        lanzhousy(tab);
                        lanzhousyRate(tab);
                    }
                }else if (tab=='直营大店' || tab=='直营小店') {
                    // 直营业绩
                    zhiyingyeji(tab);
                    zhiyingyejiRate(tab);
                    // 直营订单
                    zhiyingdd(tab);
                    zhiyingddRate(tab);
                    // 直营看样
                    zhiyingky(tab);
                    zhiyingkyRate(tab);
                    // 直营平销
                    zhiyingyxpx(tab);
                    zhiyingexpx(tab);
                    // 直营摄影
                    //zhiyingsy(tab);
                    //zhiyingsyRate(tab);
                }else if (tab=='直营礼服/化造') {
                    lifuguanyeji();
                    lifuguanyejiRate();
                }else if (tab=='拍摄三销') {
                    paishesanxiao();
                    paishesanxiaoRate();
                }else if (tab=='直营拍摄量') {
                    paisheDay(tab);
                    paisheMonth(tab);
                }else{
                    paisheDay(tab);
                    paisheMonth(tab);
                }
            },
        },
    });
    var galleryTop = new Swiper('.gallery-top', {
        spaceBetween: 10,
        loop: false,
        // direction: 'vertical',
        // effect : 'fade',
        speed: 1000,
        loopedSlides: 8, //looped slides should be the same
        thumbs: {
            swiper: galleryThumbs,
        },
    });
});
// ------------------------------------------  第一页  ------------------------------------------------------ //
// 第一页  当日集团营收
function jiguanyeji () {
    var bg_option = echarts.init(document.getElementById('loop1'));
    bg_option.clear();
    bg_option.setOption({
        grid: {
            left: '3%',
            right: '3%',
            top: '5%',
            bottom: '5%',
            containLabel: true
        },
        color: ['#85e6ff'],
        tooltip: {
            formatter:'{b}\n{c}'
        },
        xAxis: {
            data: [],
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            },
            axisLabel: {
                interval: 0,
                // rotate: 20,
                formatter:function(value)  {
                    var ret = "";//拼接加\n返回的类目项
                    var maxLength = 4;//每项显示文字个数
                    var valLength = value.length;//X轴类目项的文字个数
                    var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
                    if (rowN > 1) { //如果类目项的文字大于3,
                        for (var i = 0; i < rowN; i++) {
                            var temp = "";//每次截取的字符串
                            var start = i * maxLength;//开始截取的位置
                            var end = start + maxLength;//结束截取的位置
                            //这里也可以加一个是否是最后一行的判断，但是不加也没有影响，那就不加吧
                            temp = value.substring(start, end) + "\n";
                            ret += temp; //凭借最终的字符串
                        }
                        return ret;
                    }else {
                        return value;
                    }
                }
            }
        },
        yAxis: {
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        series: [{
            name: '当日营收',
            type: 'bar',
            data: [],
            itemStyle: {
                normal: {
                    label: {
                        show: true,
                        position: 'top',
                    }
                }
            },
        }]
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getJtDataDay',
        success: function(res){
            // console.log(res);
            bg_option.setOption({
                xAxis:[{
                    data:res.names
                }],
                series: [{
                    data:res.datas
                }]
            });
        }
    })
}
// 第一页  当月集团营收完成比
function jiguanyejiRate () {
    var bg_option = echarts.init(document.getElementById('loop2'));
    bg_option.clear();
    bg_option.setOption({
        grid: {
            left: '3%',
            right: '3%',
            top: '5%',
            bottom: '5%',
            containLabel: true
        },
        color: ['#65fbe3'],
        tooltip: {
            formatter:'{b}\n{c}%'　　　　//这是关键，在需要的地方加上就行了
        },
        xAxis: {
            data: [],
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            },
            axisLabel: {
                interval: 0,
                // rotate: 20,
                formatter:function(value)  {
                    var ret = "";//拼接加\n返回的类目项
                    var maxLength = 4;//每项显示文字个数
                    var valLength = value.length;//X轴类目项的文字个数
                    var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
                    if (rowN > 1) {//如果类目项的文字大于3,
                        for (var i = 0; i < rowN; i++) {
                            var temp = "";//每次截取的字符串
                            var start = i * maxLength;//开始截取的位置
                            var end = start + maxLength;//结束截取的位置
                            //这里也可以加一个是否是最后一行的判断，但是不加也没有影响，那就不加吧
                            temp = value.substring(start, end) + "\n";
                            ret += temp; //凭借最终的字符串
                        }
                        return ret;
                    }else {
                        return value;
                    }
                }
            }
        },
        yAxis: {
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }

        },
        series: [{
            name: '当月营收完成比',
            type: 'bar',
            data: [],
            itemStyle: {
                normal: {
                    label: {
                        show: true,
                        position: 'top',
                        formatter: '{c}%'　　　　//这是关键，在需要的地方加上就行了
                    }
                }
            },
        }],
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getJtDataMonth',
        success: function(res){
            // console.log(res);
            bg_option.setOption({
                xAxis:[{
                    data:res.names
                }],
                series: [{
                    data:res.datas
                }]
            });
        }
    })
}
// ------------------------------------------  第一页  ------------------------------------------------------ //
// ------------------------------------------  第二页  ------------------------------------------------------ //
// 第二页  当日礼服馆营收
function lifuguanyeji () {
    var bg_option = echarts.init(document.getElementById('loop3'));
    bg_option.clear();
    bg_option.setOption({
        grid: {
            left: '3%',
            right: '3%',
            top: '5%',
            bottom: '5%',
            containLabel: true
        },
        color: ['#85e6ff'],
        tooltip: {
            formatter:'{b}\n{c}%'
        },
        xAxis: {
            data: [],
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            },
            axisLabel: {
                interval: 0,
                // rotate: 20,
                formatter:function(value)  {
                    var ret = "";//拼接加\n返回的类目项
                    var maxLength = 4;//每项显示文字个数
                    var valLength = value.length;//X轴类目项的文字个数
                    var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
                    if (rowN > 1) { //如果类目项的文字大于3,
                        for (var i = 0; i < rowN; i++) {
                            var temp = "";//每次截取的字符串
                            var start = i * maxLength;//开始截取的位置
                            var end = start + maxLength;//结束截取的位置
                            //这里也可以加一个是否是最后一行的判断，但是不加也没有影响，那就不加吧
                            temp = value.substring(start, end) + "\n";
                            ret += temp; //凭借最终的字符串
                        }
                        return ret;
                    }else {
                        return value;
                    }
                }
            }
        },
        yAxis: {
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        series: [{
            name: '当日营收',
            type: 'bar',
            data: [],
            itemStyle: {
                normal: {
                    label: {
                        show: true,
                        position: 'top',
                    }
                }
            },
        }]
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getLfDataDay',
        success: function(res){
            // console.log(res);
            bg_option.setOption({
                xAxis:[{
                    data:res.names
                }],
                series: [{
                    data:res.datas
                }]
            });
        }
    })
}
// 第二页  当月礼服馆营收完成比
function lifuguanyejiRate () {
    var bg_option = echarts.init(document.getElementById('loop4'));
    bg_option.clear();
    bg_option.setOption({
        grid: {
            left: '3%',
            right: '3%',
            top: '5%',
            bottom: '5%',
            containLabel: true
        },
        color: ['#65fbe3'],
        tooltip: {
            formatter:'{b}\n{c}%'　　　　//这是关键，在需要的地方加上就行了
        },
        xAxis: {
            data: [],
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            },
            axisLabel: {
                interval: 0,
                // rotate: 20,
                formatter:function(value)  {
                    var ret = "";//拼接加\n返回的类目项
                    var maxLength = 4;//每项显示文字个数
                    var valLength = value.length;//X轴类目项的文字个数
                    var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
                    if (rowN > 1) {//如果类目项的文字大于3,
                        for (var i = 0; i < rowN; i++) {
                            var temp = "";//每次截取的字符串
                            var start = i * maxLength;//开始截取的位置
                            var end = start + maxLength;//结束截取的位置
                            //这里也可以加一个是否是最后一行的判断，但是不加也没有影响，那就不加吧
                            temp = value.substring(start, end) + "\n";
                            ret += temp; //凭借最终的字符串
                        }
                        return ret;
                    }else {
                        return value;
                    }
                }
            }
        },
        yAxis: {
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }

        },
        series: [{
            name: '当月营收完成比',
            type: 'bar',
            data: [],
            itemStyle: {
                normal: {
                    label: {
                        show: true,
                        position: 'top',
                        formatter: '{c}%'　　　　//这是关键，在需要的地方加上就行了
                    }
                }
            },
        }],
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getLfDataMonth',
        success: function(res){
            // console.log(res);
            bg_option.setOption({
                xAxis:[{
                    data:res.names
                }],
                series: [{
                    data:res.datas
                }]
            });
        }
    })
}
// ------------------------------------------  第二页  ------------------------------------------------------ //
// ------------------------------------------  基地三销  ------------------------------------------------------ //
// 第二页  当日拍摄三销营收
function paishesanxiao () {
    var bg_option = echarts.init(document.getElementById('sanxiao1'));
    bg_option.clear();
    bg_option.setOption({
        grid: {
            left: '3%',
            right: '3%',
            top: '5%',
            bottom: '5%',
            containLabel: true
        },
        color: ['#85e6ff'],
        tooltip: {
            formatter:'{b}\n{c}'
        },
        xAxis: {
            data: [],
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            },
            axisLabel: {
                interval: 0,
                // rotate: 20,
                formatter:function(value)  {
                    var ret = "";//拼接加\n返回的类目项
                    var maxLength = 4;//每项显示文字个数
                    var valLength = value.length;//X轴类目项的文字个数
                    var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
                    if (rowN > 1) { //如果类目项的文字大于3,
                        for (var i = 0; i < rowN; i++) {
                            var temp = "";//每次截取的字符串
                            var start = i * maxLength;//开始截取的位置
                            var end = start + maxLength;//结束截取的位置
                            //这里也可以加一个是否是最后一行的判断，但是不加也没有影响，那就不加吧
                            temp = value.substring(start, end) + "\n";
                            ret += temp; //凭借最终的字符串
                        }
                        return ret;
                    }else {
                        return value;
                    }
                }
            }
        },
        yAxis: {
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        series: [{
            name: '当日营收',
            type: 'bar',
            data: [],
            itemStyle: {
                normal: {
                    label: {
                        show: true,
                        position: 'top',
                    }
                }
            },
        }]
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getSxDataDay',
        success: function(res){
            // console.log(res);
            bg_option.setOption({
                xAxis:[{
                    data:res.names
                }],
                series: [{
                    data:res.datas
                }]
            });
        }
    })
}
// 第二页  当月拍摄三销营收完成比
function paishesanxiaoRate () {
    var bg_option = echarts.init(document.getElementById('sanxiao2'));
    bg_option.clear();
    bg_option.setOption({
        grid: {
            left: '3%',
            right: '3%',
            top: '5%',
            bottom: '5%',
            containLabel: true
        },
        color: ['#65fbe3'],
        tooltip: {
            formatter:'{b}\n{c}%'　　　　//这是关键，在需要的地方加上就行了
        },
        xAxis: {
            data: [],
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            },
            axisLabel: {
                interval: 0,
                // rotate: 20,
                formatter:function(value)  {
                    var ret = "";//拼接加\n返回的类目项
                    var maxLength = 4;//每项显示文字个数
                    var valLength = value.length;//X轴类目项的文字个数
                    var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
                    if (rowN > 1) {//如果类目项的文字大于3,
                        for (var i = 0; i < rowN; i++) {
                            var temp = "";//每次截取的字符串
                            var start = i * maxLength;//开始截取的位置
                            var end = start + maxLength;//结束截取的位置
                            //这里也可以加一个是否是最后一行的判断，但是不加也没有影响，那就不加吧
                            temp = value.substring(start, end) + "\n";
                            ret += temp; //凭借最终的字符串
                        }
                        return ret;
                    }else {
                        return value;
                    }
                }
            }
        },
        yAxis: {
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }

        },
        series: [{
            name: '当月营收完成比',
            type: 'bar',
            data: [],
            itemStyle: {
                normal: {
                    label: {
                        show: true,
                        position: 'top',
                        formatter: '{c}%'　　　　//这是关键，在需要的地方加上就行了
                    }
                }
            },
        }],
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getSxDataMonth',
        success: function(res){
            // console.log(res);
            bg_option.setOption({
                xAxis:[{
                    data:res.names
                }],
                series: [{
                    data:res.datas
                }]
            });
        }
    })
}
// ------------------------------------------  第二页  ------------------------------------------------------ //

// ------------------------------------------  第三（4/5）页  ------------------------------------------------------ //
// 第三、4/5页 兰州（婚纱lzhs1/写真lzxz1/儿童lzet1）业绩
function lanzhouyeji(tab){
    if (tab=='兰州婚纱') {
        var opid = 'lzhs1';
    }else if (tab=='兰州写真/儿童') {
        var opid = 'lzxz1';
    }
    var bg_option = echarts.init(document.getElementById(opid));
    bg_option.clear();
    bg_option.setOption({
        tooltip: {},
        legend: {
            data: ['一销营收', '二销营收'],
            itemWidth: 15,
            itemHeight: 10,
            itemGap: 20,
            textStyle: {
                fontSize: 14,
                color: '#fff'
            }
        },
        color: ['#fcdd7f','#65fbe3','#fcdd7f'],
        grid: {
            left: '3%',
            right: '3%',
            top: '13%',
            bottom: '5%',
            containLabel: true
        },
        dataset: {
            dimensions: ['product', '一销营收', '二销营收'],
            source: []
        },
        xAxis:  {
            type: 'category',
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        yAxis: {
            type: 'value',
            // max:800,
            min:0,
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        series: [
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
        ]
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getLzYsDataDay',
        data: {tab:tab},
        success: function(res){
            // console.log(res);
            bg_option.setOption({
                dataset:[{
                    source:res
                }]
            });
        }
    })
};
function lanzhouyejiRate(tab){
    if (tab=='兰州婚纱') {
        var opid = 'lzhs2';
    }else if (tab=='兰州写真/儿童') {
        var opid = 'lzxz2';
    }
    var bg_option = echarts.init(document.getElementById(opid));
    bg_option.clear();
    bg_option.setOption({
        tooltip: {},
        legend: {
            data: ['一销营收', '二销营收'],
            itemWidth: 15,
            itemHeight: 10,
            itemGap: 20,
            textStyle: {
                fontSize: 14,
                color: '#fff'
            }
        },
        color: ['#fcdd7f','#65fbe3','#fcdd7f'],
        grid: {
            left: '3%',
            right: '3%',
            top: '13%',
            bottom: '5%',
            containLabel: true
        },
        dataset: {
            dimensions: ['product', '一销营收', '二销营收'],
            source: []
        },
        xAxis:  {
            type: 'category',
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        yAxis: {
            type: 'value',
            // max:100,
            min:0,
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1,
                }
            }
        },

        series: [
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top',
                        formatter: '{@[1]}%'
                    }
                },
            },
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top',
                        formatter: '{@[2]}%'
                    }
                },
            },
        ]
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getLzYsDataMonth',
        data: {tab:tab},
        success: function(res){
            // console.log(res);
            bg_option.setOption({
                dataset:[{
                    source:res
                }]
            });
        }
    })
};
// 兰州订单
function lanzhoudd(tab){
    if (tab=='兰州婚纱') {
        var opid = 'lzhs3';
    }else if (tab=='兰州写真/儿童') {
        var opid = 'lzxz3';
    }
    var bg_option = echarts.init(document.getElementById(opid));
    bg_option.clear();
    bg_option.setOption({
        grid: {
            left: '3%',
            right: '3%',
            top: '6%',
            bottom: '5%',
            containLabel: true
        },
        color: ['#85e6ff'],

        tooltip: {
            formatter:'{b}\n{c}'　　　　//这是关键，在需要的地方加上就行了
        },
        xAxis: {
            data: [],
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            },
            axisLabel: {
                interval: 0,
                // rotate: 20,
                formatter:function(value) {
                    var ret = "";//拼接加\n返回的类目项
                    var maxLength = 4;//每项显示文字个数
                    var valLength = value.length;//X轴类目项的文字个数
                    var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
                    if (rowN > 1){ //如果类目项的文字大于3,
                        for (var i = 0; i < rowN; i++) {
                            var temp = "";//每次截取的字符串
                            var start = i * maxLength;//开始截取的位置
                            var end = start + maxLength;//结束截取的位置
                            //这里也可以加一个是否是最后一行的判断，但是不加也没有影响，那就不加吧
                            temp = value.substring(start, end) + "\n";
                            ret += temp; //凭借最终的字符串
                        }
                        return ret;
                    }else {
                        return value;
                    }
                }
            }
        },
        yAxis: {
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        series: [{
            name: '当日订单量',
            type: 'bar',
            data: [],
            itemStyle: {
                normal: {
                    label: {
                        show: true,
                        position: 'top',
                    }
                }
            },
        }],
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getLzDdDataDay',
        data: {tab:tab},
        success: function(res){
            // console.log(res);
            bg_option.setOption({
                xAxis:[{
                    data:res.names
                }],
                series: [{
                    data:res.datas
                }]
            });
        }
    })
};
function lanzhouXZdd(tab){
    if (tab=='兰州婚纱') {
        var opid = 'lzhs3';
    }else if (tab=='兰州写真/儿童') {
        var opid = 'lzxz3';
    }
    var bg_option = echarts.init(document.getElementById(opid));
    bg_option.clear();
    bg_option.setOption({
        tooltip: {},
        legend: {
            data: ['婚纱', '写真'],
            itemWidth: 15,
            itemHeight: 10,
            itemGap: 20,
            textStyle: {
                fontSize: 14,
                color: '#fff'
            }
        },
        color: ['#fcdd7f','#65fbe3','#fcdd7f'],
        grid: {
            left: '3%',
            right: '3%',
            top: '13%',
            bottom: '5%',
            containLabel: true
        },
        dataset: {
            dimensions: ['product', '婚纱', '写真'],
            source: []
        },
        xAxis:  {
            type: 'category',
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        yAxis: {
            type: 'value',
            // max:800,
            min:0,
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        series: [
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
        ]
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getLzXZDdDataDay',
        data: {tab:tab},
        success: function(res){
            // console.log(res);
            bg_option.setOption({
                dataset:[{
                    source:res
                }]
            });
        }
    })
};
function lanzhouddRate(tab){
    if (tab=='兰州婚纱') {
        var opid = 'lzhs4';
    }else if (tab=='兰州写真/儿童') {
        var opid = 'lzxz4';
    }
    var bg_option = echarts.init(document.getElementById(opid));
    bg_option.clear();
    bg_option.setOption({
        grid: {
            left: '3%',
            right: '3%',
            top: '6%',
            bottom: '5%',
            containLabel: true
        },
        color: ['#85e6ff'],

        tooltip: {
            formatter:'{b}\n{c}'　　　　//这是关键，在需要的地方加上就行了
        },
        xAxis: {
            data: [],
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            },
            axisLabel: {
                interval: 0,
                // rotate: 20,
                formatter:function(value) {
                    var ret = "";//拼接加\n返回的类目项
                    var maxLength = 4;//每项显示文字个数
                    var valLength = value.length;//X轴类目项的文字个数
                    var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
                    if (rowN > 1){ //如果类目项的文字大于3,
                        for (var i = 0; i < rowN; i++) {
                            var temp = "";//每次截取的字符串
                            var start = i * maxLength;//开始截取的位置
                            var end = start + maxLength;//结束截取的位置
                            //这里也可以加一个是否是最后一行的判断，但是不加也没有影响，那就不加吧
                            temp = value.substring(start, end) + "\n";
                            ret += temp; //凭借最终的字符串
                        }
                        return ret;
                    }else {
                        return value;
                    }
                }
            }
        },
        yAxis: {
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }

        },
        series: [{
            name: '当月订单量',
            type: 'bar',
            data: [],
            itemStyle: {
                normal: {
                    label: {
                        show: true,
                        position: 'top',
                        formatter: '{c}'　　　　//这是关键，在需要的地方加上就行了
                    }
                }
            },
        }],
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getLzDdDataMonth',
        data: {tab:tab},
        success: function(res){
            // console.log(res);
            bg_option.setOption({
                xAxis:[{
                    data:res.names
                }],
                series: [{
                    data:res.datas
                }]
            });
        }
    })
};
function lanzhouXZddRate(tab){
    if (tab=='兰州婚纱') {
        var opid = 'lzhs4';
    }else if (tab=='兰州写真/儿童') {
        var opid = 'lzxz4';
    }
    var bg_option = echarts.init(document.getElementById(opid));
    bg_option.clear();
    bg_option.setOption({
        tooltip: {},
        legend: {
            data: ['婚纱', '写真'],
            itemWidth: 15,
            itemHeight: 10,
            itemGap: 20,
            textStyle: {
                fontSize: 14,
                color: '#fff'
            }
        },
        color: ['#fcdd7f','#65fbe3','#fcdd7f'],
        grid: {
            left: '3%',
            right: '3%',
            top: '13%',
            bottom: '5%',
            containLabel: true
        },
        dataset: {
            dimensions: ['product', '婚纱', '写真'],
            source: []
        },
        xAxis:  {
            type: 'category',
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        yAxis: {
            type: 'value',
            // max:800,
            min:0,
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        series: [
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
        ]
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getLzXZDdDataMonth',
        data: {tab:tab},
        success: function(res){
            // console.log(res);
            bg_option.setOption({
                dataset:[{
                    source:res
                }]
            });
        }
    })
};
// 兰州看样
function lanzhouky(tab){
    if (tab=='兰州婚纱') {
        var opid = 'lzhs5';
    }else if (tab=='兰州写真/儿童') {
        var opid = 'lzxz5';
    }
    var bg_option = echarts.init(document.getElementById(opid));
    bg_option.clear();
    bg_option.setOption({
        grid: {
            left: '3%',
            right: '3%',
            top: '6%',
            bottom: '5%',
            containLabel: true
        },
        color: ['#85e6ff'],

        tooltip: {
            formatter:'{b}\n{c}'　　　　//这是关键，在需要的地方加上就行了
        },
        xAxis: {
            data: [],
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            },
            axisLabel: {
                interval: 0,
                // rotate: 20,
                formatter:function(value) {
                    var ret = "";//拼接加\n返回的类目项
                    var maxLength = 4;//每项显示文字个数
                    var valLength = value.length;//X轴类目项的文字个数
                    var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
                    if (rowN > 1){ //如果类目项的文字大于3,
                        for (var i = 0; i < rowN; i++) {
                            var temp = "";//每次截取的字符串
                            var start = i * maxLength;//开始截取的位置
                            var end = start + maxLength;//结束截取的位置
                            //这里也可以加一个是否是最后一行的判断，但是不加也没有影响，那就不加吧
                            temp = value.substring(start, end) + "\n";
                            ret += temp; //凭借最终的字符串
                        }
                        return ret;
                    }else {
                        return value;
                    }
                }
            }
        },
        yAxis: {
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        series: [{
            name: '当日看样量',
            type: 'bar',
            data: [],
            itemStyle: {
                normal: {
                    label: {
                        show: true,
                        position: 'top',
                    }
                }
            },
        }],
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getLzKyDataDay',
        data: {tab:tab},
        success: function(res){
            // console.log(res);
            bg_option.setOption({
                xAxis:[{
                    data:res.names
                }],
                series: [{
                    data:res.datas
                }]
            });
        }
    })
};
function lanzhouXZky(tab){
    if (tab=='兰州婚纱') {
        var opid = 'lzhs5';
    }else if (tab=='兰州写真/儿童') {
        var opid = 'lzxz5';
    }
    var bg_option = echarts.init(document.getElementById(opid));
    bg_option.clear();
    bg_option.setOption({
        tooltip: {},
        legend: {
            data: ['婚纱', '写真'],
            itemWidth: 15,
            itemHeight: 10,
            itemGap: 20,
            textStyle: {
                fontSize: 14,
                color: '#fff'
            }
        },
        color: ['#fcdd7f','#65fbe3','#fcdd7f'],
        grid: {
            left: '3%',
            right: '3%',
            top: '13%',
            bottom: '5%',
            containLabel: true
        },
        dataset: {
            dimensions: ['product', '婚纱', '写真'],
            source: []
        },
        xAxis:  {
            type: 'category',
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        yAxis: {
            type: 'value',
            // max:800,
            min:0,
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        series: [
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
        ]
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getLzXZKyDataDay',
        data: {tab:tab},
        success: function(res){
            // console.log(res);
            bg_option.setOption({
                dataset:[{
                    source:res
                }]
            });
        }
    })
};
function lanzhoukyRate(tab){
    if (tab=='兰州婚纱') {
        var opid = 'lzhs6';
    }else if (tab=='兰州写真/儿童') {
        var opid = 'lzxz6';
    }
    var bg_option = echarts.init(document.getElementById(opid));
    bg_option.clear();
    bg_option.setOption({
        grid: {
            left: '3%',
            right: '3%',
            top: '6%',
            bottom: '5%',
            containLabel: true
        },
        color: ['#85e6ff'],

        tooltip: {
            formatter:'{b}\n{c}'　　　　//这是关键，在需要的地方加上就行了
        },
        xAxis: {
            data: [],
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            },
            axisLabel: {
                interval: 0,
                // rotate: 20,
                formatter:function(value) {
                    var ret = "";//拼接加\n返回的类目项
                    var maxLength = 4;//每项显示文字个数
                    var valLength = value.length;//X轴类目项的文字个数
                    var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
                    if (rowN > 1){ //如果类目项的文字大于3,
                        for (var i = 0; i < rowN; i++) {
                            var temp = "";//每次截取的字符串
                            var start = i * maxLength;//开始截取的位置
                            var end = start + maxLength;//结束截取的位置
                            //这里也可以加一个是否是最后一行的判断，但是不加也没有影响，那就不加吧
                            temp = value.substring(start, end) + "\n";
                            ret += temp; //凭借最终的字符串
                        }
                        return ret;
                    }else {
                        return value;
                    }
                }
            }
        },
        yAxis: {
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }

        },
        series: [{
            name: '当月看样量',
            type: 'bar',
            data: [],
            itemStyle: {
                normal: {
                    label: {
                        show: true,
                        position: 'top',
                    }
                }
            },
        }],
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getLzKyDataMonth',
        data: {tab:tab},
        success: function(res){
            // console.log(res);
            bg_option.setOption({
                xAxis:[{
                    data:res.names
                }],
                series: [{
                    data:res.datas
                }]
            });
        }
    })
};
function lanzhouXZkyRate(tab){
    if (tab=='兰州婚纱') {
        var opid = 'lzhs6';
    }else if (tab=='兰州写真/儿童') {
        var opid = 'lzxz6';
    }
    var bg_option = echarts.init(document.getElementById(opid));
    bg_option.clear();
    bg_option.setOption({
        tooltip: {},
        legend: {
            data: ['婚纱', '写真'],
            itemWidth: 15,
            itemHeight: 10,
            itemGap: 20,
            textStyle: {
                fontSize: 14,
                color: '#fff'
            }
        },
        color: ['#fcdd7f','#65fbe3','#fcdd7f'],
        grid: {
            left: '3%',
            right: '3%',
            top: '13%',
            bottom: '5%',
            containLabel: true
        },
        dataset: {
            dimensions: ['product', '婚纱', '写真'],
            source: []
        },
        xAxis:  {
            type: 'category',
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        yAxis: {
            type: 'value',
            // max:800,
            min:0,
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        series: [
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
        ]
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getLzXZKyDataMonth',
        data: {tab:tab},
        success: function(res){
            // console.log(res);
            bg_option.setOption({
                dataset:[{
                    source:res
                }]
            });
        }
    })
};
// 兰州平销
function lanzhouyxpx(tab){
    if (tab=='兰州婚纱') {
        var opid = 'lzhs7';
    }else if (tab=='兰州写真/儿童') {
        var opid = 'lzxz7';
    }
    var bg_option = echarts.init(document.getElementById(opid));
    bg_option.clear();
    bg_option.setOption({
        grid: {
            left: '3%',
            right: '3%',
            top: '6%',
            bottom: '5%',
            containLabel: true
        },
        color: ['#85e6ff'],

        tooltip: {
            formatter:'{b}\n{c}'　　　　//这是关键，在需要的地方加上就行了
        },
        xAxis: {
            data: [],
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            },
            axisLabel: {
                interval: 0,
                // rotate: 20,
                formatter:function(value) {
                    var ret = "";//拼接加\n返回的类目项
                    var maxLength = 4;//每项显示文字个数
                    var valLength = value.length;//X轴类目项的文字个数
                    var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
                    if (rowN > 1){ //如果类目项的文字大于3,
                        for (var i = 0; i < rowN; i++) {
                            var temp = "";//每次截取的字符串
                            var start = i * maxLength;//开始截取的位置
                            var end = start + maxLength;//结束截取的位置
                            //这里也可以加一个是否是最后一行的判断，但是不加也没有影响，那就不加吧
                            temp = value.substring(start, end) + "\n";
                            ret += temp; //凭借最终的字符串
                        }
                        return ret;
                    }else {
                        return value;
                    }
                }
            }
        },
        yAxis: {
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }

        },
        series: [{
            name: '一销平销',
            type: 'bar',
            data: [],
            itemStyle: {
                normal: {
                    label: {
                        show: true,
                        position: 'top',
                    }
                }
            },
        }],
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getLzYxData',
        data: {tab:tab},
        success: function(res){
            // console.log(res);
            bg_option.setOption({
                xAxis:[{
                    data:res.names
                }],
                series: [{
                    data:res.datas
                }]
            });
        }
    })
};
function lanzhouexpx(tab){
    if (tab=='兰州婚纱') {
        var opid = 'lzhs8';
    }else if (tab=='兰州写真/儿童') {
        var opid = 'lzxz8';
    }
    var bg_option = echarts.init(document.getElementById(opid));
    bg_option.clear();
    bg_option.setOption({
        grid: {
            left: '3%',
            right: '3%',
            top: '6%',
            bottom: '5%',
            containLabel: true
        },
        color: ['#85e6ff'],
        tooltip: {
            formatter:'{b}\n{c}'　　　　//这是关键，在需要的地方加上就行了
        },
        xAxis: {
            data: [],
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            },
            axisLabel: {
                interval: 0,
                // rotate: 20,
                formatter:function(value) {
                    var ret = "";//拼接加\n返回的类目项
                    var maxLength = 4;//每项显示文字个数
                    var valLength = value.length;//X轴类目项的文字个数
                    var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
                    if (rowN > 1){ //如果类目项的文字大于3,
                        for (var i = 0; i < rowN; i++) {
                            var temp = "";//每次截取的字符串
                            var start = i * maxLength;//开始截取的位置
                            var end = start + maxLength;//结束截取的位置
                            //这里也可以加一个是否是最后一行的判断，但是不加也没有影响，那就不加吧
                            temp = value.substring(start, end) + "\n";
                            ret += temp; //凭借最终的字符串
                        }
                        return ret;
                    }else {
                        return value;
                    }
                }
            }
        },
        yAxis: {
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        series: [{
            name: '二销平销',
            type: 'bar',
            data: [],
            itemStyle: {
                normal: {
                    label: {
                        show: true,
                        position: 'top',
                    }
                }
            },
        }],
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getLzExData',
        data: {tab:tab},
        success: function(res){
            // console.log(res);
            bg_option.setOption({
                xAxis:[{
                    data:res.names
                }],
                series: [{
                    data:res.datas
                }]
            });
        }
    })
};
// 兰州平销
function lanzhouXZyxpx(tab){
    if (tab=='兰州婚纱') {
        var opid = 'lzhs7';
    }else if (tab=='兰州写真/儿童') {
        var opid = 'lzxz7';
    }
    var bg_option = echarts.init(document.getElementById(opid));
    bg_option.clear();
    bg_option.setOption({
        tooltip: {},
        legend: {
            data: ['婚纱', '写真'],
            itemWidth: 15,
            itemHeight: 10,
            itemGap: 20,
            textStyle: {
                fontSize: 14,
                color: '#fff'
            }
        },
        color: ['#fcdd7f','#65fbe3','#fcdd7f'],
        grid: {
            left: '3%',
            right: '3%',
            top: '13%',
            bottom: '5%',
            containLabel: true
        },
        dataset: {
            dimensions: ['product', '婚纱', '写真'],
            source: []
        },
        xAxis:  {
            type: 'category',
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        yAxis: {
            type: 'value',
            // max:800,
            min:0,
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        series: [
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
        ]
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getLzXZYxData',
        data: {tab:tab},
        success: function(res){
            // console.log(res);
            bg_option.setOption({
                dataset:[{
                    source:res
                }]
            });
        }
    })
};
function lanzhouXZexpx(tab){
    if (tab=='兰州婚纱') {
        var opid = 'lzhs8';
    }else if (tab=='兰州写真/儿童') {
        var opid = 'lzxz8';
    }
    var bg_option = echarts.init(document.getElementById(opid));
    bg_option.clear();
    bg_option.setOption({
        tooltip: {},
        legend: {
            data: ['婚纱', '写真'],
            itemWidth: 15,
            itemHeight: 10,
            itemGap: 20,
            textStyle: {
                fontSize: 14,
                color: '#fff'
            }
        },
        color: ['#85e6ff','#DFFAB9'],
        grid: {
            left: '3%',
            right: '3%',
            top: '13%',
            bottom: '5%',
            containLabel: true
        },
        dataset: {
            dimensions: ['product', '婚纱', '写真'],
            source: []
        },
        xAxis:  {
            type: 'category',
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        yAxis: {
            type: 'value',
            // max:800,
            min:0,
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        series: [
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
        ]
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getLzXZExData',
        data: {tab:tab},
        success: function(res){
            // console.log(res);
            bg_option.setOption({
                dataset:[{
                    source:res
                }]
            });
        }
    })
};
// 兰州摄影
function lanzhousy(tab){
    if (tab=='兰州婚纱') {
        var opid = 'lzhs9';
    }else if (tab=='兰州写真/儿童') {
        var opid = 'lzxz9';
    }
    var bg_option = echarts.init(document.getElementById(opid));
    bg_option.clear();
    bg_option.setOption({
        grid: {
            left: '3%',
            right: '3%',
            top: '6%',
            bottom: '5%',
            containLabel: true
        },
        color: ['#85e6ff'],
        tooltip: {
            formatter:'{b}\n{c}'　　　　//这是关键，在需要的地方加上就行了
        },
        xAxis: {
            data: [],
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            },
            axisLabel: {
                interval: 0,
                // rotate: 20,
                formatter:function(value) {
                    var ret = "";//拼接加\n返回的类目项
                    var maxLength = 4;//每项显示文字个数
                    var valLength = value.length;//X轴类目项的文字个数
                    var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
                    if (rowN > 1){ //如果类目项的文字大于3,
                        for (var i = 0; i < rowN; i++) {
                            var temp = "";//每次截取的字符串
                            var start = i * maxLength;//开始截取的位置
                            var end = start + maxLength;//结束截取的位置
                            //这里也可以加一个是否是最后一行的判断，但是不加也没有影响，那就不加吧
                            temp = value.substring(start, end) + "\n";
                            ret += temp; //凭借最终的字符串
                        }
                        return ret;
                    }else {
                        return value;
                    }
                }
            }
        },
        yAxis: {
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        series: [{
            name: '当日摄影量',
            type: 'bar',
            data: [],
            itemStyle: {
                normal: {
                    label: {
                        show: true,
                        position: 'top',
                    }
                }
            },
        }],
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getLzSyDataDay',
        data: {tab:tab},
        success: function(res){
            // console.log(res);
            bg_option.setOption({
                xAxis:[{
                    data:res.names
                }],
                series: [{
                    data:res.datas
                }]
            });
        }
    })
};
function lanzhousyRate(tab){
    if (tab=='兰州婚纱') {
        var opid = 'lzhs10';
    }else if (tab=='兰州写真/儿童') {
        var opid = 'lzxz10';
    }
    var bg_option = echarts.init(document.getElementById(opid));
    bg_option.clear();
    bg_option.setOption({
        grid: {
            left: '3%',
            right: '3%',
            top: '6%',
            bottom: '5%',
            containLabel: true
        },
        color: ['#85e6ff'],
        tooltip: {
            formatter:'{b}\n{c}'　　　　//这是关键，在需要的地方加上就行了
        },
        xAxis: {
            data: [],
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            },
            axisLabel: {
                interval: 0,
                // rotate: 20,
                formatter:function(value) {
                    var ret = "";//拼接加\n返回的类目项
                    var maxLength = 4;//每项显示文字个数
                    var valLength = value.length;//X轴类目项的文字个数
                    var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
                    if (rowN > 1){ //如果类目项的文字大于3,
                        for (var i = 0; i < rowN; i++) {
                            var temp = "";//每次截取的字符串
                            var start = i * maxLength;//开始截取的位置
                            var end = start + maxLength;//结束截取的位置
                            //这里也可以加一个是否是最后一行的判断，但是不加也没有影响，那就不加吧
                            temp = value.substring(start, end) + "\n";
                            ret += temp; //凭借最终的字符串
                        }
                        return ret;
                    }else {
                        return value;
                    }
                }
            }
        },
        yAxis: {
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        series: [{
            name: '当月摄影量',
            type: 'bar',
            data: [],
            itemStyle: {
                normal: {
                    label: {
                        show: true,
                        position: 'top',
                    }
                }
            },
        }],
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getLzSyDataMonth',
        data: {tab:tab},
        success: function(res){
            // console.log(res);
            bg_option.setOption({
                xAxis:[{
                    data:res.names
                }],
                series: [{
                    data:res.datas
                }]
            });
        }
    })
};
function lanzhouXZsy(tab){
    if (tab=='兰州婚纱') {
        var opid = 'lzhs9';
    }else if (tab=='兰州写真/儿童') {
        var opid = 'lzxz9';
    }
    var bg_option = echarts.init(document.getElementById(opid));
    bg_option.clear();
    bg_option.setOption({
        tooltip: {},
        legend: {
            data: ['婚纱', '写真'],
            itemWidth: 15,
            itemHeight: 10,
            itemGap: 20,
            textStyle: {
                fontSize: 14,
                color: '#fff'
            }
        },
        color: ['#fcdd7f','#65fbe3','#fcdd7f'],
        grid: {
            left: '3%',
            right: '3%',
            top: '13%',
            bottom: '5%',
            containLabel: true
        },
        dataset: {
            dimensions: ['product', '婚纱', '写真'],
            source: []
        },
        xAxis:  {
            type: 'category',
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        yAxis: {
            type: 'value',
            // max:800,
            min:0,
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        series: [
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
        ]
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getLzXZSyDataDay',
        data: {tab:tab},
        success: function(res){
            // console.log(res);
            bg_option.setOption({
                dataset:[{
                    source:res
                }]
            });
        }
    })
};
function lanzhouXZsyRate(tab){
    if (tab=='兰州婚纱') {
        var opid = 'lzhs10';
    }else if (tab=='兰州写真/儿童') {
        var opid = 'lzxz10';
    }
    var bg_option = echarts.init(document.getElementById(opid));
    bg_option.clear();
    bg_option.setOption({
        tooltip: {},
        legend: {
            data: ['婚纱', '写真'],
            itemWidth: 15,
            itemHeight: 10,
            itemGap: 20,
            textStyle: {
                fontSize: 14,
                color: '#fff'
            }
        },
        color: ['#fcdd7f','#65fbe3','#fcdd7f'],
        grid: {
            left: '3%',
            right: '3%',
            top: '13%',
            bottom: '5%',
            containLabel: true
        },
        dataset: {
            dimensions: ['product', '婚纱', '写真'],
            source: []
        },
        xAxis:  {
            type: 'category',
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        yAxis: {
            type: 'value',
            // max:800,
            min:0,
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        series: [
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
        ]
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getLzXZSyDataMonth',
        data: {tab:tab},
        success: function(res){
            // console.log(res);
            bg_option.setOption({
                dataset:[{
                    source:res
                }]
            });
        }
    })
};
// ------------------------------------------  第三（4/5）页  ------------------------------------------------------ //
// ------------------------------------------  第六（7）页  ------------------------------------------------------ //
// 第6/7页 直营（大/小）店 业绩
function zhiyingyeji(tab){
    if (tab=='直营大店') {
        var opid = 'zydd1';
    }else if (tab=='直营小店') {
        var opid = 'zyxd1';
    }
    var bg_option = echarts.init(document.getElementById(opid));
    bg_option.clear();
    bg_option.setOption({
        tooltip: {},
        legend: {
            data: ['一销营收', '二销营收'],
            itemWidth: 15,
            itemHeight: 10,
            itemGap: 20,
            textStyle: {
                fontSize: 14,
                color: '#fff'
            }
        },
        color: ['#fff1aa','#65fbe3','#fcdd7f'],
        grid: {
            left: '3%',
            right: '3%',
            top: '13%',
            bottom: '5%',
            containLabel: true
        },
        dataset: {
            dimensions: ['product', '一销营收', '二销营收'],
            source: []
        },
        xAxis:  {
            type: 'category',
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        yAxis: {
            type: 'value',
            // max:800,
            min:0,
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        series: [
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
        ]
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getZyYsDataDay',
        data: {tab:tab},
        success: function(res){
            bg_option.setOption({
                dataset:[{
                    source:res
                }]
            });
        }
    })
};
function zhiyingyejiRate(tab){
    if (tab=='直营大店') {
        var opid = 'zydd2';
    }else if (tab=='直营小店') {
        var opid = 'zyxd2';
    }
    var bg_option = echarts.init(document.getElementById(opid));
    bg_option.clear();
    bg_option.setOption({
        tooltip: {},
        legend: {
            data: ['一销营收', '二销营收'],
            itemWidth: 15,
            itemHeight: 10,
            itemGap: 20,
            textStyle: {
                fontSize: 14,
                color: '#fff'
            }
        },
        color: ['#fff1aa','#65fbe3','#fcdd7f'],
        grid: {
            left: '3%',
            right: '3%',
            top: '13%',
            bottom: '5%',
            containLabel: true
        },
        dataset: {
            dimensions: ['product', '一销营收', '二销营收'],
            source: []
        },
        xAxis:  {
            type: 'category',
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        yAxis: {
            type: 'value',
            // max:100,
            min:0,
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1,
                }
            }
        },

        series: [
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top',
                        formatter: '{@[1]}%'
                    }
                },
            },
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top',
                        formatter: '{@[2]}%'
                    }
                },
            },
        ]
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getZyYsDataMonth',
        data: {tab:tab},
        success: function(res){
            // console.log(res);
            bg_option.setOption({
                dataset:[{
                    source:res
                }]
            });
        }
    })
};
// 直营订单
function zhiyingdd(tab){
    if (tab=='直营大店') {
        var opid = 'zydd3';
    }else if (tab=='直营小店') {
        var opid = 'zyxd3';
    }
    var bg_option = echarts.init(document.getElementById(opid));
    bg_option.clear();
    bg_option.setOption({
        tooltip: {},
        legend: {
            data: ['婚纱', '写真','儿童'],
            itemWidth: 15,
            itemHeight: 10,
            itemGap: 20,
            textStyle: {
                fontSize: 14,
                color: '#fff'
            }
        },
        color: ['#85e6ff','#65fbe3','#fcdd7f'],
        grid: {
            left: '3%',
            right: '3%',
            top: '13%',
            bottom: '5%',
            containLabel: true
        },
        dataset: {
            dimensions: ['product', '婚纱', '写真', '儿童'],
            source: []
        },
        xAxis:  {
            type: 'category',
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        yAxis: {
            type: 'value',
            // max:800,
            min:0,
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        series: [
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            }
        ]
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getZyDdDataDay',
        data: {tab:tab},
        success: function(res){
            // console.log(res);
            bg_option.setOption({
                dataset:[{
                    source:res
                }]
            });
        }
    })
};
function zhiyingddRate(tab){
    if (tab=='直营大店') {
        var opid = 'zydd4';
    }else if (tab=='直营小店') {
        var opid = 'zyxd4';
    }
    var bg_option = echarts.init(document.getElementById(opid));
    bg_option.clear();
    bg_option.setOption({
        legend: {},
        tooltip: {},
        legend: {
            data: ['婚纱', '写真','儿童'],
            itemWidth: 15,
            itemHeight: 10,
            itemGap: 20,
            textStyle: {
                fontSize: 14,
                color: '#fff'
            }
        },
        color: ['#85e6ff','#65fbe3','#fcdd7f'],
        grid: {
            left: '3%',
            right: '3%',
            top: '13%',
            bottom: '5%',
            containLabel: true
        },
        dataset: {
            dimensions: ['product', '婚纱', '写真', '儿童'],
            source: []
        },
        xAxis:  {
            type: 'category',
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        yAxis: {
            type: 'value',
            // max:100,
            min:0,
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1,
                }
            }
        },

        series: [
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top',
                        formatter: '{@[1]}'
                    }
                },
            },
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top',
                        formatter: '{@[2]}'
                    }
                },
            },
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top',
                        formatter: '{@[3]}'
                    }
                },
            }
        ]
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getZyDdDataMonth',
        data: {tab:tab},
        success: function(res){
            // console.log(res);
            bg_option.setOption({
                dataset:[{
                    source:res
                }]
            });
        }
    })
};
// 直营看样
function zhiyingky(tab){
    if (tab=='直营大店') {
        var opid = 'zydd5';
    }else if (tab=='直营小店') {
        var opid = 'zyxd5';
    }
    var bg_option = echarts.init(document.getElementById(opid));
    bg_option.clear();
    bg_option.setOption({
        legend: {},
        tooltip: {},
        legend: {
            data: ['婚纱', '写真','儿童'],
            itemWidth: 15,
            itemHeight: 10,
            itemGap: 20,
            textStyle: {
                fontSize: 14,
                color: '#fff'
            }
        },
        color: ['#85e6ff','#65fbe3','#fcdd7f'],
        grid: {
            left: '3%',
            right: '3%',
            top: '13%',
            bottom: '5%',
            containLabel: true
        },
        dataset: {
            dimensions: ['product', '婚纱', '写真', '儿童'],
            source: []
        },
        xAxis:  {
            type: 'category',
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        yAxis: {
            type: 'value',
            // max:800,
            min:0,
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        series: [
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top',
                    }
                },
            },
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top',
                    }
                },
            },
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top',
                    }
                },
            }
        ]
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getZyKyDataDay',
        data: {tab:tab},
        success: function(res){
            // console.log(res);
            bg_option.setOption({
                dataset:[{
                    source:res
                }]
            });
        }
    })
};
function zhiyingkyRate(tab){
    if (tab=='直营大店') {
        var opid = 'zydd6';
    }else if (tab=='直营小店') {
        var opid = 'zyxd6';
    }
    var bg_option = echarts.init(document.getElementById(opid));
    bg_option.setOption({
        legend: {},
        tooltip: {},
        legend: {
            data: ['婚纱', '写真','儿童'],
            itemWidth: 15,
            itemHeight: 10,
            itemGap: 20,
            textStyle: {
                fontSize: 14,
                color: '#fff'
            }
        },
        color: ['#85e6ff','#65fbe3','#fcdd7f'],
        grid: {
            left: '3%',
            right: '3%',
            top: '13%',
            bottom: '5%',
            containLabel: true
        },
        dataset: {
            dimensions: ['product', '婚纱', '写真', '儿童'],
            source: []
        },
        xAxis:  {
            type: 'category',
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        yAxis: {
            type: 'value',
            // max:800,
            min:0,
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        series: [
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top',
                    }
                },
            }
        ]
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getZyKyDataMonth',
        data: {tab:tab},
        success: function(res){
            // console.log(res);
            bg_option.setOption({
                dataset:[{
                    source:res
                }]
            });
        }
    })
};
// 直营平销
function zhiyingyxpx(tab){
    if (tab=='直营大店') {
        var opid = 'zydd7';
    }else if (tab=='直营小店') {
        var opid = 'zyxd7';
    }
    var bg_option = echarts.init(document.getElementById(opid));
    bg_option.clear();
    bg_option.setOption({
        tooltip: {},
        legend: {
            data: ['婚纱', '写真','儿童'],
            itemWidth: 15,
            itemHeight: 10,
            itemGap: 20,
            textStyle: {
                fontSize: 14,
                color: '#fff'
            }
        },
        color: ['#85e6ff','#65fbe3','#fcdd7f'],
        grid: {
            left: '3%',
            right: '3%',
            top: '13%',
            bottom: '5%',
            containLabel: true
        },
        dataset: {
            dimensions: ['product', '婚纱', '写真', '儿童'],
            source: []
        },
        xAxis:  {
            type: 'category',
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        yAxis: {
            type: 'value',
            // max:800,
            min:0,
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        series: [
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top',
                    }
                },
            }
        ]
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getZyYxData',
        data: {tab:tab},
        success: function(res){
            // console.log(res);
            bg_option.setOption({
                dataset:[{
                    source:res
                }]
            });
        }
    })
};
function zhiyingexpx(tab){
    if (tab=='直营大店') {
        var opid = 'zydd8';
    }else if (tab=='直营小店') {
        var opid = 'zyxd8';
    }
    var bg_option = echarts.init(document.getElementById(opid));
    bg_option.clear();
    bg_option.setOption({
        tooltip: {},
        legend: {
            data: ['婚纱', '写真','儿童'],
            itemWidth: 15,
            itemHeight: 10,
            itemGap: 20,
            textStyle: {
                fontSize: 14,
                color: '#fff'
            }
        },
        color: ['#85e6ff','#65fbe3','#fcdd7f'],
        grid: {
            left: '3%',
            right: '3%',
            top: '13%',
            bottom: '5%',
            containLabel: true
        },
        dataset: {
            dimensions: ['product', '婚纱', '写真', '儿童'],
            source: []
        },
        xAxis:  {
            type: 'category',
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        yAxis: {
            type: 'value',
            // max:800,
            min:0,
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        series: [
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top',
                    }
                },
            }
        ]
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getZyExData',
        data: {tab:tab},
        success: function(res){
            // console.log(res);
            bg_option.setOption({
                dataset:[{
                    source:res
                }]
            });
        }
    })
};
// 直营摄影
function zhiyingsy(tab){
    if (tab=='直营大店') {
        var opid = 'zydd9';
    }else if (tab=='直营小店') {
        var opid = 'zyxd9';
    }
    var bg_option = echarts.init(document.getElementById(opid));
    bg_option.clear();
    bg_option.setOption({
        legend: {},
        tooltip: {},
        legend: {
            data: ['婚纱', '写真','儿童'],
            itemWidth: 15,
            itemHeight: 10,
            itemGap: 20,
            textStyle: {
                fontSize: 14,
                color: '#fff'
            }
        },
        color: ['#85e6ff','#65fbe3','#fcdd7f'],
        grid: {
            left: '3%',
            right: '3%',
            top: '13%',
            bottom: '5%',
            containLabel: true
        },
        dataset: {
            dimensions: ['product', '婚纱', '写真', '儿童'],
            source: []
        },
        xAxis:  {
            type: 'category',
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        yAxis: {
            type: 'value',
            // max:800,
            min:0,
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        series: [
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top',
                    }
                },
            }
        ]
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getZySyDataDay',
        data: {tab:tab},
        success: function(res){
            // console.log(res);
            bg_option.setOption({
                dataset:[{
                    source:res
                }]
            });
        }
    })
};
function zhiyingsyRate(tab){
    if (tab=='直营大店') {
        var opid = 'zydd10';
    }else if (tab=='直营小店') {
        var opid = 'zyxd10';
    }
    var bg_option = echarts.init(document.getElementById(opid));
    bg_option.clear();
    bg_option.setOption({
        legend: {},
        tooltip: {},
        legend: {
            data: ['婚纱', '写真','儿童'],
            itemWidth: 15,
            itemHeight: 10,
            itemGap: 20,
            textStyle: {
                fontSize: 14,
                color: '#fff'
            }
        },
        color: ['#85e6ff','#65fbe3','#fcdd7f'],
        grid: {
            left: '3%',
            right: '3%',
            top: '13%',
            bottom: '5%',
            containLabel: true
        },
        dataset: {
            dimensions: ['product', '婚纱', '写真', '儿童'],
            source: []
        },
        xAxis:  {
            type: 'category',
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        yAxis: {
            type: 'value',
            // max:800,
            min:0,
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        series: [
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top',
                    }
                },
            }
        ]
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getZySyDataMonth',
        data: {tab:tab},
        success: function(res){
            // console.log(res);
            bg_option.setOption({
                dataset:[{
                    source:res
                }]
            });
        }
    })
};
//当日拍摄
function paisheDay(tab){
    var opid = 'loop33';
    var bg_option = echarts.init(document.getElementById(opid));
    bg_option.clear();
    bg_option.setOption({
        legend: {},
        tooltip: {},
        legend: {
            data: ['婚纱', '写真','儿童'],
            itemWidth: 15,
            itemHeight: 10,
            itemGap: 20,
            textStyle: {
                fontSize: 14,
                color: '#fff'
            }
        },
        color: ['#85e6ff','#65fbe3','#fcdd7f'],
        grid: {
            left: '3%',
            right: '3%',
            top: '13%',
            bottom: '5%',
            containLabel: true
        },
        dataset: {
            dimensions: ['product', '婚纱', '写真', '儿童'],
            source: []
        },
        xAxis:  {
            type: 'category',
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        yAxis: {
            type: 'value',
            // max:800,
            min:0,
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        series: [
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top',
                    }
                },
            }
        ]
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getZySyDataDay',
        data: {tab:tab},
        success: function(res){
            bg_option.setOption({
                dataset:[{
                    source:res
                }]
            });
        }
    })
};
//当月拍摄
function paisheMonth(tab){
    var opid = 'loop44';
    var bg_option = echarts.init(document.getElementById(opid));
    bg_option.clear();
    bg_option.setOption({
        legend: {},
        tooltip: {},
        legend: {
            data: ['婚纱', '写真','儿童'],
            itemWidth: 15,
            itemHeight: 10,
            itemGap: 20,
            textStyle: {
                fontSize: 14,
                color: '#fff'
            }
        },
        color: ['#85e6ff','#65fbe3','#fcdd7f'],
        grid: {
            left: '3%',
            right: '3%',
            top: '13%',
            bottom: '5%',
            containLabel: true
        },
        dataset: {
            dimensions: ['product', '婚纱', '写真', '儿童'],
            source: []
        },
        xAxis:  {
            type: 'category',
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        yAxis: {
            type: 'value',
            // max:800,
            min:0,
            axisLine:{
                lineStyle:{
                    color:'#fff',
                    width:1
                }
            }
        },
        series: [
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top'
                    }
                },
            },
            {
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'top',
                    }
                },
            }
        ]
    })
    $.ajax({
        type: 'POST',
        url : '/crm/Lzl/getZySyDataMonth',
        data: {tab:tab},
        success: function(res){
            bg_option.setOption({
                dataset:[{
                    source:res
                }]
            });
        }
    })
};
// ------------------------------------------  第六（7）页  ------------------------------------------------------ //