<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\PayCenter\Admin\Controller; use Illuminate\Routing\Controller; use Illuminate\Support\Facades\DB; use ModStart\Admin\Layout\AdminPage; use ModStart\Core\Input\InputPackage; use ModStart\Core\Util\ColorUtil; use ModStart\Core\Util\RandomUtil; use ModStart\Core\Util\RenderUtil; use ModStart\Core\Util\TimeUtil; use ModStart\Grid\Grid; use ModStart\Grid\GridFilter; use ModStart\Repository\Filter\RepositoryFilter; use ModStart\Widget\Chart\Line; use Module\PayCenter\Biz\PayCenterBiz; use Module\PayCenter\Type\PayOrderStatus; use Module\PayCenter\Type\PayType; use Module\PayCenter\Util\ReportUtil; class ReportController extends Controller { public function index(AdminPage $evgNV) { goto ZV_Sa; Qalli: $MP25l->gridFilter(function (GridFilter $cbHm3) { $cbHm3->eq('id', '结算ID'); $z0MKn = date('Y-m-d 00:00:00', time() - TimeUtil::PERIOD_MONTH); $cIuxb = date('Y-m-d 23:59:59', time()); $cbHm3->range('created_at', '时间')->datetime()->defaultValue(array('min' => $z0MKn, 'max' => $cIuxb))->field()->quickSelect(); $cbHm3->has('payType', '类型')->checkbox(PayType::class)->autoHide(true); }); goto tF5Yf; MwiL8: $MP25l->gridTableTopView('module::PayCenter.View.admin.report.panel'); goto sxOAW; vfGUV: return $evgNV->pageTitle('订单对账')->body($MP25l)->handleGrid($MP25l); goto RXxXu; rfArj: $MP25l->gridRequestScript(function (Grid $MP25l) { $Ylazq = InputPackage::buildFromInput(); $kn7gc = null; $BGxdu = null; foreach ($Ylazq->getArray('search') as $mFlJK) { if (empty($mFlJK)) { continue; } foreach ($mFlJK as $JdFJR => $PSYn9) { if ($JdFJR == 'created_at') { goto BH5Zh; uYj5y: break; goto cXIvv; Qbw17: $BGxdu = $PSYn9['range']['max']; goto uYj5y; BH5Zh: $kn7gc = $PSYn9['range']['min']; goto Qbw17; cXIvv: } } } $zMsot = ReportUtil::option($MP25l->executeQuery(), $kn7gc, $BGxdu); return RenderUtil::viewScript('module::PayCenter.View.admin.report.script', array('total' => sprintf('%.2f', $MP25l->executeQuery()->sum('feeTotal')), 'count' => number_format($MP25l->executeQuery()->count()), 'chartOption' => $zMsot)); }); goto MwiL8; eTlY_: $MP25l->display('updated_at', L('Updated At'))->listable(false); goto DgMAC; T_oou: $MP25l->text('body', '内容'); goto eTlY_; ukC45: $MP25l->currency('feeTotal', '金额'); goto T_oou; OLUs6: $MP25l->type('status', '状态')->type(PayOrderStatus::class); goto WLdax; sxOAW: $MP25l->canAdd(false)->disableItemOperate(); goto vfGUV; WLdax: $MP25l->type('payType', '支付类型')->type(PayType::class); goto ukC45; Fd0D6: $MP25l->id('id', '结算ID'); goto hHp0J; aF_wl: $MP25l->select('biz', '业务')->options(PayCenterBiz::allMap()); goto f9zMC; DgMAC: $MP25l->repositoryFilter(function (RepositoryFilter $cbHm3) { $cbHm3->where('status', PayOrderStatus::PAYED); }); goto Qalli; tF5Yf: $MP25l->gridBeforeRequestScriptView('module::PayCenter.View.admin.report.beforeScript'); goto rfArj; hHp0J: $MP25l->display('created_at', '时间'); goto aF_wl; ZV_Sa: $MP25l = Grid::make('pay_order'); goto Fd0D6; f9zMC: $MP25l->text('bizId', '业务订单ID'); goto OLUs6; RXxXu: } }