| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 | @extends('admin/layout')@section('content')    <style>        .btn-danger, .btn-primary, .btn-info {            background: #009688 !important;            border-color: #009688 !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: #009688 !important;            color: #fff !important;        }        .table-striped > tbody > tr:hover .btn .glyphicon {            color: #fff !important;        }    </style>    <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="form-inline" id="searchForm" onsubmit="units.search();return false;">                            <div class="form-group">                                <div class="input-group">                                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>                                    <input type="text" class="form-control lay-datetime" id="start_at" name="start_at" title="">                                </div>                            </div>                            <div class="form-group">                                <div class="input-group">                                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>                                    <input type="text" class="form-control lay-datetime" id="end_at" name="end_at" title="">                                </div>                            </div>                            <div class="form-group" style="margin-top: 5px;">                                <div class="input-group">                                    <input type="text" placeholder="用户名" class="input-md form-control" name="username"                                           id="username">                                    <span class="input-group-btn">                                        <button type="button" class="btn btn-md btn-primary"                                                onclick="units.search()"> 搜索</button>                                        <button type="reset" class="btn btn-md btn-primary" style="margin-left: 10px"                                                name="resetBtn"> 重置</button>                                       <button type="button" class="btn btn-md btn-warning" style="margin-left: 10px"                                               onclick="units.settle()">结算</button>                                    </span>                                </div>                            </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 src="{{asset('js/plugins/layDate-v5.0.9/laydate/laydate.js')}}"></script>    <script>        var units = {            search: function () {                tips.selectPage();            },            getTaskIdsBySelections: function () {                var selections = $("#table").bootstrapTable('getSelections');                var ids = [];                $.each(selections, function (inx, val) {                    ids = ids.concat(val.article_ids);                });                return ids;            },            settle: function () {                var ids = units.getTaskIdsBySelections();                if (ids.length === 0) {                    layer.alert('请先选择您所要操作的对象', {icon: 0});                    return;                }                layer.confirm('您确定要进行结算吗?', {icon: 3, title: '删除信息'}, function () {                    tips.ajax({url: '/admin/articles/calc/settle', type: 'put', data: {ids: ids}});                    tips.tableRefresh('#table');                });            }        };        var config = {};        config.url = '/admin/articles/calc';        config.columns = [ //字段            {checkbox: true},            {                title: '序号', align: 'center', formatter: function (value, item, index) {                    return index + 1;                }            },            {title: '翻译人员', field: 'username', align: 'center'},            {title: '质量平均分', field: 'avgScore', align: 'center'},            {title: '支付宝', field: 'translator_name', align: 'center'},            {title: '等级', field: 'site_title', align: 'center'},            {title: '已翻词数', field: 'totalWords', align: 'center'},            {title: '结算金额', field: 'amount', align: 'center'},            {                visible: false, field: 'article_ids'            }        ];        tips.bootstrapTable(config);        laydate.render({            elem: '#start_at', //指定元素            type: 'datetime'        });        laydate.render({            elem: '#end_at', //指定元素            type: 'datetime'        });    </script>@endsection
 |