| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291 | @extends('admin/layout')<style>    .btn-danger, .btn-primary, .btn-info {        background: #2a94e0 !important;        border-color: #2a94e0 !important;    }    .table-striped > tbody > tr:nth-of-type(odd) {        background: #f8f8f8 !important;    }    .table-striped > tbody > tr .btn {        background: none !important;    }    .table-striped > tbody > tr td {        font-size: 14px !important;    }    .table-striped > tbody > tr:hover {        background: #ffebd8 !important;    }    .table-striped > tbody > tr:hover .btn {        background: #2a94e0 !important;        color: #fff !important;    }    .table-striped > tbody > tr:hover .btn .glyphicon {        color: #fff !important;    }</style>@section('content')    <body class="gray-bg">    <div class="wrapper wrapper-content animated fadeInRight">        <div class="row">            <div class="col-sm-12">                <div class="ibox float-e-margins">                    <div class="ibox-content">                        <form class="row" id="searchForm" onsubmit="units.search();return false;">                            <div class="col-md-6 pull-right">                                <div class="input-group">                                    <select name="status" id="status" title="" class="form-control"                                            style="width: 150px;float: right" onchange="tips.selectPage();">                                        <option value="">请选择项目状态</option>                                        @foreach(\App\Http\Models\Site::STATUS_MAP as $key=>$item)                                            <option value="{{$key}}">{{$item}}</option>                                        @endforeach                                    </select>                                    <select name="traffic_number" id="traffic_number" title="" class="form-control"                                            style="width: 150px;float: right" onchange="tips.selectPage();">                                        <option value="">请选择流量范围</option>                                            <option value="0,100">100以下</option>                                            <option value="100,200">100-200</option>                                            <option value="200,500">200-500</option>                                            <option value="500,1000">500-1000</option>                                            <option value="1000,1000000">1000以上</option>                                    </select>                                    <select name="inquire_number" id="inquire_number" title="" class="form-control"                                            style="width: 150px;float: right" onchange="tips.selectPage();">                                        <option value="">请选择询盘范围</option>                                        <option value="0,10">10以下</option>                                        <option value="10,20">10-20</option>                                        <option value="20,50">20-50</option>                                        <option value="50,100">50-100</option>                                        <option value="100,1000000">100以上</option>                                    </select>                                    <input type="text" placeholder="请输入域名或项目名称" class="input-md form-control"                                           name="keyword"                                           id="keyword" style="width: 300px;float: right">                                    <span class="input-group-btn">                                    <button type="button" class="btn btn-md btn-primary"                                            onclick="units.search()"> 搜索</button>                                    <button type="button" class="btn btn-md btn-primary" style="margin-left: 10px"                                            name="btnReset"> 重置</button> </span>                                </div>                            </div>                            {{--<div class="col-sm-2 pull-right" style="text-align: right">--}}                            {{--<button type="button" class="btn btn-md btn-primary" id="addBtn"> 添加</button>--}}                            {{--</div>--}}                        </form>                        <hr>                        <div class="table-responsive">                            <table id="table" class="table table-condensed" data-mobile-responsive="true"></table>                        </div>                    </div>                </div>            </div>        </div>    </div>    </body>@endsection@section('footer')    <script>        var units = {            search: function () {                tips.selectPage();                // var obj = {                //     pageNumber: 1,                //     size: 1,                //     query: {pageNumber: 1, size: 5}                // };                // $('#table').bootstrapTable('refresh');                // $('#table').bootstrapTable('selectPage', 1);            },            getIdsBySelections: function () {                var selections = $("#table").bootstrapTable('getSelections');                var ids = [];                $.each(selections, function (inx, val) {                    ids.push(val.id);                });                return ids;            },            edit: function (id) {                var title = '添加';                if (id > 0) {                    title = '编辑';                }                layer.open({                    type: 2,                    content: ['/admin/sites/' + id],                    area: ['100%', '100%'],                    title: title                });            },            // detail: function (id, title) {            //            //     layer.open({            //         type: 2,            //         content: ['/admin/sites/' + id + '/overview'],            //         area: ['100%', '100%'],            //         title: '<span style="font-weight: bold;font-size: 16px">' + title + '</span>',            //         closeBtn: 1            //     });            // },            openDetail: function (id, title) {                // parent.layerLoad();                tips.page('/admin/htPlant/' + id + '/overview', title);            },            payment: function (id) {                layer.open({                    type: 2,                    content: ['/admin/site/payment/' + id],                    area: ['80%', '100%'],                    title: '款项节点'                });            },            customer: function (id) {                layer.open({                    type: 2,                    content: ['/admin/site/' + id + '/customer'],                    area: ['100%', '100%'],                    title: '客户'                });            },            process: function (id) {                layer.open({                    type: 2,                    content: ['/admin/process/' + id],                    area: ['90%', '100%'],                    title: '流程'                });            },            webmaster: function () {                window.open('http://rank.yinqingli.cn/admincp/webmaster/oauth');            },            report: function (identify) {                window.open('http://rank.yinqingli.cn/webmaster/report?projectId=' + identify);            },            afresh: function (identify) {                window.open('http://rank.yinqingli.cn/webmaster/report?projectId=' + identify);            }        };        // 月流量 月询盘 月排名 月软文 项目经理 项目进度        var config = {};        config.url = '/admin/htPlant/index';        config.pageSize = 500;        config.columns = [ //字段            // {checkbox: true},            {                title: '序号', align: 'center', formatter: function (value, item, index) {                    return index + 1;                },                width: '10px'            },            {title: '项目状态', field: 'statusTitle', align: 'center', sortable: true, width: '30px'},            {title: '项目名称', field: 'cn_title', align: 'center',width:'200px'},            {title: '域名', field: 'domain', align: 'center'},            {title: '月流量', field: 'traffic', align: 'center', sortable: true},            {title: '询盘总数', field: 'inquire', align: 'center', sortable: true},            {title: '月排名', field: 'top10', align: 'center', sortable: true},            {title: '软文总数', field: 'articles_count', align: 'center'},            {title: '外链条目总数', field: 'link_details_count', align: 'center'},            {title: '外链域总数', field: 'link_details_num', align: 'center'},            {title: '项目经理', field: 'managers_title', align: 'center'},            {title: '下单时间', field: 'order_at', align: 'center', sortable: true},            {title: '上线时间', field: 'online_date', align: 'center'},            {title: '优化时长', field: 'seo_time', align: 'center'},            {title: '达标时长', field: 'reach_time', align: 'center'},            {title: '行业', field: 'business.title', align: 'center'},            {title: '关键词总数', field: 'keyword_num', align: 'center'},            {title: '页面数', field: 'web_count', align: 'center'},            {title: '站内锚文本总数', field: '', align: 'center'},            // {            //     title: '操作', field: 'id', align: 'center',            //     formatter: function (value, row) {            //            //            //         var str = '<button onclick="units.openDetail(' + value + ',\'' + row.cn_title + '\')" class="btn btn-xs"><span class="glyphicon glyphicon-menu-hamburger"></span>详情</button><br>';            //            //         if (row.is_google_bid) {            //             if (row.bid_status) {            //                 str += '<span class="glyphicon glyphicon-fire" style="color:red">PPC</span>'            //             } else {            //                 str += '<span class="glyphicon glyphicon-fire" style="color:#C0C0C0">PPC</span>'            //             }            //         }            //            //         return str;            //            //     }            // }        ];        tips.bootstrapTable(config);        $(document).on('click', '#allotStaff', function () {            var ids = units.getIdsBySelections();            if (ids.length === 0) {                layer.alert('请先选择您所要操作的对象', {icon: 0});                return;            }            var siteIds = '?';            $.each(ids, function (inx, val) {                siteIds += 'siteIds[]=' + val + '&';            });            layer.open({                type: 2,                content: ['/admin/site/allot' + siteIds],                area: ['50%', '50%'],                title: '修改'            });        });        /**         * 批量删除         */        $(document).on('click', '#batchDelete', function () {            var ids = units.getIdsBySelections();            if (ids.length === 0) {                layer.alert('请先选择您所要操作的对象', {icon: 0});                return;            }            layer.confirm('您确定要删除吗?', {icon: 3, title: '删除信息'}, function (index, layero) {                layer.close(index);                tips.ajax({                    url: '/admin/sites',                    type: 'delete',                    data: {ids: ids},                    tableRefresh: '#table'                });            });        });    </script>@endsection
 |