| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404 |
- <?php
- /* @var $this \yii\web\View */
- /* @var $content string */
- use yii\helpers\Html;
- use yii\helpers\Url;
- ?>
- <div class="row wrapper border-bottom white-bg page-heading">
- <div class="col-lg-12">
- <h2>入金管理</h2>
- <ol class="breadcrumb">
- <li>
- <a href="/admin/dashboard">管理首页</a>
- </li>
- <li class="active">
- <strong>入金管理</strong>
- </li>
- </ol>
- </div>
- </div>
- <div class="wrapper wrapper-content animated fadeInRight">
- <!--
- <div class="row">
- <div class="col-lg-6">
- <div class="widget style1 red-bg">
- <div class="row">
- <div class="col-xs-4">
- <i class="fa fa-cny fa-5x"></i>
- </div>
- <div class="col-xs-8 text-right">
- <span> 待入金 </span>
- <h2 class="font-bold">${sum0?string(",##0.00#")}</h2>
- </div>
- </div>
- </div>
- </div>
- <div class="col-lg-6">
- <div class="widget style1 navy-bg">
- <div class="row">
- <div class="col-xs-4">
- <i class="fa fa-cny fa-5x"></i>
- </div>
- <div class="col-xs-8 text-right">
- <span> 成功入金 </span>
- <h2 class="font-bold">${sum1?string(",##0.00#")}</h2>
- </div>
- </div>
- </div>
- </div>
- </div>
- -->
- <form>
- <input type="hidden" name="type" value="<?= $type ?>">
- <div class="ibox-content m-b-sm border-bottom">
- <div class="row">
- <div class="col-sm-3">
- <div class="form-group">
- <label class="control-label">客户姓名</label>
- <input type="text" id="name" name="name" value="<?= Yii::$app->getRequest()->get('name') ?>" placeholder="客户姓名" class="form-control">
- </div>
- </div>
- <div class="col-sm-3">
- <div class="form-group">
- <label class="control-label" for="price">开始时间</label>
- <input readonly="readonly" type="text" id="sTime" name="sTime" value="<?= Yii::$app->getRequest()->get('sTime') ?>" placeholder="开始时间" class="datetime form-control">
- </div>
- </div>
- <div class="col-sm-3">
- <div class="form-group">
- <label class="control-label" for="quantity">结束时间</label>
- <input readonly="readonly" type="text" id="eTime" name="eTime" value="<?= Yii::$app->getRequest()->get('eTime') ?>" placeholder="结束时间" class="datetime form-control">
- </div>
- </div>
- <div class="col-sm-3">
- <div class="form-group">
- <label class="control-label" for="quantity">操作</label>
- <input type="submit" class="btn btn-primary form-control" value="搜索">
- </div>
- </div>
- </div>
- </div>
- </form>
- <div class="row">
- <div class="col-lg-12">
- <div class="ibox float-e-margins">
- <div class="ibox-title">
- <h5 style="line-height:30px;">
- <?php if ($type == 0) : ?>待入金<?php elseif ($type == 1): ?>成功入金<?php endif; ?>明细
- </h5>
- <?php if($type == 0) :?>
- <div class="btn-group pull-right">
- <button id="patchIntoGold" class="btn btn-primary">补单</button>
- </div>
- <?php endif;?>
- <?php if ($type == 1): ?>
- <div class="btn-group pull-right" style="margin-right: 10px;">
- <button id="RevokeIntoGold" class="btn btn-primary">撤销入金</button>
- </div>
- <?php endif; ?>
- <div class="clearfix"></div>
- </div>
- <div class="ibox-content">
- <div class="table-responsive">
- <table id="datatables" class="table table-striped table-bordered table-hover">
- <thead>
- <tr>
- <th>编号</th>
- <th>状态</th>
- <th>代理商</th>
- <th>账户</th>
- <th>姓名</th>
- <th>手机</th>
- <th>金额</th>
- <th>人民币</th>
- <th>港币</th>
- <th>汇率</th>
- <th>入金方式</th>
- <th>MT4入金状态</th>
- <th>支付单号</th>
- <th>入金时间</th>
- <th>操作人</th>
- <th>MT4订单号码</th>
- </tr>
- </thead>
- <tfoot>
- <tr>
- <th>编号</th>
- <th>状态</th>
- <th>代理商</th>
- <th>账户</th>
- <th>姓名</th>
- <th>手机</th>
- <th>金额</th>
- <th>人民币</th>
- <th>港币</th>
- <th>汇率</th>
- <th>入金方式</th>
- <th>MT4入金状态</th>
- <th>支付单号</th>
- <th>入金时间</th>
- <th>操作人</th>
- <th>MT4订单号码</th>
- </tr>
- </tfoot>
- </table>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <?php $this->beginBlock('footer_script');?>
- <script>
- KindEditor.ready(function (K) {
- });
- </script>
- <!-- Page-Level Scripts -->
- <script>
- var table;
- $(document).ready(function () {
- table = $('#datatables').DataTable({
- "aLengthMenu": [[20, 50, 100, 500, 999999999], [20, 50, 100, 500, "ALL"]],
- language: {
- "sProcessing": "处理中...",
- "sLengthMenu": "显示 _MENU_ 项结果",
- "sZeroRecords": "没有匹配结果",
- "sInfo": "显示第 _START_ 至 _END_ 项结果,共 _TOTAL_ 项",
- "sInfoEmpty": "显示第 0 至 0 项结果,共 0 项",
- "sInfoFiltered": "(由 _MAX_ 项结果过滤)",
- "sInfoPostFix": "",
- "sSearch": "搜索:",
- "sUrl": "",
- "sEmptyTable": "表中数据为空",
- "sLoadingRecords": "载入中...",
- "sInfoThousands": ",",
- "oPaginate": {
- "sFirst": "首页",
- "sPrevious": "上页",
- "sNext": "下页",
- "sLast": "末页"
- },
- "oAria": {
- "sSortAscending": ": 以升序排列此列",
- "sSortDescending": ": 以降序排列此列"
- }
- },
- "processing": true,
- "serverSide": true,
- "ajax": '<?= Url::to(['ajax', 'type' => $type, 'name'=>Yii::$app->getRequest()->get('name'), 'sTime' => Yii::$app->getRequest()->get('sTime'), 'eTime' => Yii::$app->getRequest()->get('eTime')]) ?>',
- "order": [[0, "desc"]],
- "columns": [{
- "data": "id"
- }, {
- "data": "type"
- }, {
- "data": "IBNAME"
- }, {
- "data": "login"
- }, {
- "data": "name"
- }, {
- "data": "mobile"
- }, {
- "data": "amount"
- }, {
- "data": "rmb"
- }, {
- "data": "rmb"
- }, {
- "data": "rate"
- }, {
- "data": "pay_name"
- }, {
- "data": "mt4_status"
- }, {
- "data": "order_sn"
- }, {
- "data": "in_time"
- }, {
- "data": "admin_name"
- },{
- "data": "mt4_order_id"
- }],
- columnDefs: [{
- targets: 1,
- render: function (data, type, row, meta) {
- if (data == 0) {
- return '<span class="label label-danger">等待</span>';
- } else if (data == 1) {
- return '<span class="label label-primary">成功</span>';
- }else if(data==2){
- return '<span class="label label-warning">创建中</span>'
- }
- },
- "orderable": true
- }, {
- targets: 7,
- render: function (data, type, row, meta) {
- if(row.pay_name=="银联支付A" || row.pay_name=="银联支付B" || row.pay_name=="银联支付C" || row.pay_name=="捷登支付A" || row.pay_name=="JD通道A" ){
- return 0.00
- }else{
- return data;
- }
- },
- "orderable": true
- },
- {
- targets: 8,
- render: function (data, type, row, meta) {
- if(row.pay_name=="银联支付A" || row.pay_name=="银联支付B" || row.pay_name=="银联支付C" || row.pay_name=="捷登支付A" || row.pay_name=="JD通道A"){
- return data;
- }else{
- return 0.00;
- }
- },
- "orderable": true
- },
- {
- targets: 13,
- render: function (data, type, row, meta) {
- return timeStamp2String(data);
- },
- "orderable": true
- }, {
- targets: 11,
- render: function (data, type, row, meta) {
- if (data == 0) {
- return '<span class="label label-danger">未入金</span>';
- } else if (data == 1) {
- return '<span class="label label-primary">已入金</span>';
- }
- },
- "orderable": true
- }],
- "sPaginationType": "full_numbers",
- dom: '<"html5buttons"B>lTfgitp',
- buttons: [{
- extend: 'copy'
- },
- {
- extend: 'csv'
- },
- {
- extend: 'excel'
- },
- {
- extend: 'pdf'
- },
- {
- extend: 'print',
- customize: function (win) {
- $(win.document.body).addClass('white-bg');
- $(win.document.body).css('font-size', '10px');
- $(win.document.body).find('table').addClass('compact').css('font-size', 'inherit');
- }
- }]
- });
- $('#datatables tbody').on('click', 'tr',
- function () {
- if ($(this).hasClass('selected')) {
- $(this).removeClass('selected');
- } else {
- table.$('tr.selected').removeClass('selected');
- $(this).addClass('selected');
- }
- });
- $("#modal").on("hidden.bs.modal", function () {
- $(this).removeData("bs.modal");
- KindEditor.remove('#kindeditor');
- });
- $('.data').datepicker({
- startView: 1,
- todayBtn: "linked",
- keyboardNavigation: true,
- forceParse: false,
- autoclose: true,
- format: "yyyy-mm-dd"
- });
- });
- $('#patchIntoGold').click(function () {
- var data = table.row('.selected').data();
- if (data != undefined) {
- swal({
- title: "您确定吗?",
- text: "请确定已收到客户款项!",
- type: "warning",
- showCancelButton: true,
- confirmButtonColor: "#DD6B55",
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- closeOnConfirm: true
- }, function (isConfirm) {
- if (isConfirm) {
- $.ajax({
- type: "POST",
- url: "<?= Url::to(['patch-into-gold']) ?>",
- data: {
- id: data.id
- },
- dataType: "json",
- beforeSend: function () {
- },
- success: function (data) {
- if (data.isSuccess) {
- table.ajax.reload();
- } else {
- toastr.error(data.msg, "提示");
- }
- },
- complete: function (XMLHttpRequest, textStatus) {
- },
- error: function () {
- }
- });
- }
- });
- }
- });
- // 撤销入金的操作
- $('#RevokeIntoGold').click(function () {
- var data = table.row('.selected').data();
- if (data != undefined) {
- swal({
- title: "您确定吗?",
- text: "确定撤销此订单",
- type: "warning",
- showCancelButton: true,
- confirmButtonColor: "#DD6B55",
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- closeOnConfirm: true
- }, function (isConfirm) {
- if (isConfirm) {
- $.ajax({
- type: "POST",
- url: "<?= Url::to(['revokegold']) ?>",
- data: {
- id: data.id,
- mt4_order_id:data.mt4_order_id
- },
- dataType: "json",
- beforeSend: function () {
- },
- success: function (data) {
- if (data.isSuccess) {
- toastr.success(data.msg,'提示');
- table.ajax.reload();
- } else {
- toastr.error(data.msg, "提示");
- }
- },
- complete: function (XMLHttpRequest, textStatus) {
- },
- error: function () {
- }
- });
- }
- });
- }
- });
- </script>
- <?php $this->endBlock();?>
|