<?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 $iXUoW) { goto L4GyV; vVdxX: $NX6uw->showSubmit(false)->showReset(false); goto jeJ0I; GB1ZN: $NX6uw->text('remark', '说明')->defaultValue('系统变更')->required(); goto vVdxX; L4GyV: $shbIl = InputPackage::buildFromInput()->getInteger('memberUserId'); goto WtBIu; jeJ0I: return $iXUoW->pageTitle('积分变更')->body($NX6uw)->handleForm($NX6uw, function (Form $NX6uw) use($shbIl) { AdminPermission::demoCheck(); $avcnU = $NX6uw->dataForming(); ModelUtil::transactionBegin(); MemberCreditUtil::change($shbIl, $avcnU['change'], $avcnU['remark']); ModelUtil::transactionCommit(); return Response::redirect(CRUDUtil::jsDialogCloseAndParentRefresh()); }); goto vlg_L; vWAZU: $NX6uw->display('_total', '总积分')->value(MemberCreditUtil::getTotal($shbIl))->addable(true); goto EundO; EundO: $NX6uw->number('change', '积分变更')->help('负数表示减少')->required(); goto GB1ZN; WtBIu: $NX6uw = Form::make(''); goto vWAZU; vlg_L: } }