<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Member\Admin\Controller; use Illuminate\Routing\Controller; use ModStart\Admin\Auth\AdminPermission; use ModStart\Admin\Layout\AdminDialogPage; use ModStart\Core\Dao\ModelUtil; use ModStart\Core\Input\InputPackage; use ModStart\Core\Input\Response; use ModStart\Core\Util\CRUDUtil; use ModStart\Form\Form; use Module\Member\Util\MemberMoneyUtil; class MemberMoneyController extends Controller { public static $PermitMethodMap = array('*' => '\\Module\\Member\\Admin\\Controller\\MemberController@index'); public function charge(AdminDialogPage $j13Tr) { goto T1x7i; T1x7i: $d4RRw = InputPackage::buildFromInput()->getInteger('memberUserId'); goto RBrP1; iAkvU: return $j13Tr->pageTitle('积分变更')->body($s4jIj)->handleForm($s4jIj, function (Form $s4jIj) use($d4RRw) { AdminPermission::demoCheck(); $Pg57y = $s4jIj->dataForming(); ModelUtil::transactionBegin(); MemberMoneyUtil::change($d4RRw, $Pg57y['change'], $Pg57y['remark']); ModelUtil::transactionCommit(); return Response::redirect(CRUDUtil::jsDialogCloseAndParentRefresh()); }); goto bFxVU; p43Up: $s4jIj->showSubmit(false)->showReset(false); goto iAkvU; mL0dA: $s4jIj->decimal('change', '金额')->help('负数表示减少')->required(); goto ReohI; RBrP1: $s4jIj = Form::make(''); goto i5O6g; i5O6g: $s4jIj->display('_total', '余额')->value(MemberMoneyUtil::getTotal($d4RRw))->addable(true); goto mL0dA; ReohI: $s4jIj->text('remark', '说明')->defaultValue('系统变更')->required(); goto p43Up; bFxVU: } }