<?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\MemberCreditUtil; class MemberCreditController extends Controller { public static $PermitMethodMap = array('*' => '\\Module\\Member\\Admin\\Controller\\MemberController@index'); public function charge(AdminDialogPage $j13Tr) { goto pI9YE; B4h95: $s4jIj = Form::make(''); goto IlP6I; anYlH: $s4jIj->number('change', '积分变更')->help('负数表示减少')->required(); goto Ysm1P; Ysm1P: $s4jIj->text('remark', '说明')->defaultValue('系统变更')->required(); goto gbFDl; DGtHT: return $j13Tr->pageTitle('积分变更')->body($s4jIj)->handleForm($s4jIj, function (Form $s4jIj) use($d4RRw) { AdminPermission::demoCheck(); $Pg57y = $s4jIj->dataForming(); ModelUtil::transactionBegin(); MemberCreditUtil::change($d4RRw, $Pg57y['change'], $Pg57y['remark']); ModelUtil::transactionCommit(); return Response::redirect(CRUDUtil::jsDialogCloseAndParentRefresh()); }); goto QOqBe; gbFDl: $s4jIj->showSubmit(false)->showReset(false); goto DGtHT; pI9YE: $d4RRw = InputPackage::buildFromInput()->getInteger('memberUserId'); goto B4h95; IlP6I: $s4jIj->display('_total', '总积分')->value(MemberCreditUtil::getTotal($d4RRw))->addable(true); goto anYlH; QOqBe: } }