<?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 $JcqUq) { goto vI1Q7; vI1Q7: $KJqKC = InputPackage::buildFromInput()->getInteger('memberUserId'); goto ZhMWh; Kaz6u: return $JcqUq->pageTitle('积分变更')->body($yZTO2)->handleForm($yZTO2, function (Form $yZTO2) use($KJqKC) { AdminPermission::demoCheck(); $U8wjN = $yZTO2->dataForming(); ModelUtil::transactionBegin(); MemberCreditUtil::change($KJqKC, $U8wjN['change'], $U8wjN['remark']); ModelUtil::transactionCommit(); return Response::redirect(CRUDUtil::jsDialogCloseAndParentRefresh()); }); goto JI0zv; TW66_: $yZTO2->showSubmit(false)->showReset(false); goto Kaz6u; k1Yj0: $yZTO2->text('remark', '说明')->defaultValue('系统变更')->required(); goto TW66_; ZhMWh: $yZTO2 = Form::make(''); goto Qpcn1; Qpcn1: $yZTO2->display('_total', '总积分')->value(MemberCreditUtil::getTotal($KJqKC))->addable(true); goto WyKXG; WyKXG: $yZTO2->number('change', '积分变更')->help('负数表示减少')->required(); goto k1Yj0; JI0zv: } }