| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 | @extends('admin/layout')@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-title">                        收款金额=合同总金额:<span id="sum_total">{{$sum_total??0}}</span>                    </div>                    <div class="ibox-content">                        <form class="form-inline" id="searchForm" onsubmit="units.search();return false;">                            <div class="form-group" style="margin-top: 5px;">                                <div class="input-group">                                    <input type="text" placeholder="请输入域名或项目名称" class="input-md form-control"                                           name="keyword"                                           id="keyword">                                    <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>                                    </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 = {            getIdsBySelections: function () {                var selections = $("#table").bootstrapTable('getSelections');                var ids = [];                $.each(selections, function (inx, val) {                    ids.push(val.id);                });                return ids;            },            save: function (id,type_status) {                layer.open({                    type: 2,                    content: ['/admin/finance/' + id + '/save'],                    area: ['90%', '80%'],                    title: '信息详情'                });            },            search: function () {                tips.selectPage();            },        };        var config = {};        config.url = '/admin/finances/finances_collection';        config.columns = [ //字段            {                title: '序号', align: 'center', formatter: function (value, item, index) {                    return index + 1;                }            },            {title: '项目ID', field: 'id', align: 'center'},            {title: '项目名称', field: 'cn_title', align: 'center'},            {title: '合同总金额', field: 'contract_total_fee', align: 'center'},            {title: '维基百科费用', field: 'wiki_fee', align: 'center'},            {title: '其他费用', field: 'other_fee', align: 'center'},            {title: '项目状态', field: 'status_title', align: 'center'},            {title: '创建时间', field: 'created_at', align: 'center'},            {                title: '操作', field: 'id', align: 'center',                formatter: function (value, row) {                    var str = '';                    // if (row.status === 1) {                    str += '<button onclick="units.save(' + value + ')" class="btn btn-xs"><span class="glyphicon glyphicon-edit"></span>查看详情</button>';                    // }                    return str;                }            },        ];        tips.bootstrapTable(config);        config.onLoadSuccess = function (data) {             $("#sum_total").text(data.sum_total);        };        laydate.render({            elem: '#start_at', //指定元素            type: 'datetime'        });        laydate.render({            elem: '#end_at', //指定元素            type: 'datetime'        });    </script>@endsection
 |