<?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 $WLCMC) { goto uZZH4; eUBPj: $hUMbi->display('_total', '总积分')->value(MemberCreditUtil::getTotal($nlOSA))->addable(true); goto gl5_O; odvbN: return $WLCMC->pageTitle('积分变更')->body($hUMbi)->handleForm($hUMbi, function (Form $hUMbi) use($nlOSA) { AdminPermission::demoCheck(); $cwaKT = $hUMbi->dataForming(); ModelUtil::transactionBegin(); MemberCreditUtil::change($nlOSA, $cwaKT['change'], $cwaKT['remark']); ModelUtil::transactionCommit(); return Response::redirect(CRUDUtil::jsDialogCloseAndParentRefresh()); }); goto i2jVL; uZZH4: $nlOSA = InputPackage::buildFromInput()->getInteger('memberUserId'); goto uE9AI; uE9AI: $hUMbi = Form::make(''); goto eUBPj; gl5_O: $hUMbi->number('change', '积分变更')->help('负数表示减少')->required(); goto gOOEs; gOOEs: $hUMbi->text('remark', '说明')->defaultValue('系统变更')->required(); goto n5aYL; n5aYL: $hUMbi->showSubmit(false)->showReset(false); goto odvbN; i2jVL: } }