public function info($get)
 {
     $ctrl = new SampleProduceOrderController();
     $r = Result::convert($ctrl->info($get));
     $view = new ViewBase($r);
     return $view->render('sampleproduceorder/info.php');
 }
Example #2
0
 public function index($search)
 {
     $result = Result::convert(parent::index($search));
     $result->addData(array('operation_link_list' => array(function (UserGroup $item) {
         return '<a href="' . Router::getUrl('UserGroup/updateUserGroupAccess', array('user_group_id' => $item->id)) . '">权限列表</a>';
     })));
     return $result;
 }
Example #3
0
 public function index($search)
 {
     $result = Result::convert(parent::index($search));
     $result->addData(array('operation_link_list' => array(function (User $item) {
         return '<a href="' . Router::getUrl('user/updatePassword', array('id' => $item->id)) . '" rel="popup">修改密码</a>';
     })));
     return $result;
 }
 /**
  * @param $get
  * @param $post
  * @return \Lite\Core\Result|void
  */
 public function update($get, $post)
 {
     $id = $get['id'];
     $business_order_id = $get['business_order_id'];
     $r = Result::convert(parent::update($get, $post));
     if ($post) {
         if ($r->isSuccess()) {
             if (!$id) {
                 $order = BusinessOrder::findOneByPk($business_order_id);
                 $order->setValue('state', BusinessOrder::STATE_CONFIRM);
                 $order->save();
             }
             $r->setJumpUrl($this->getBackUrl());
         }
     }
     return $r;
 }
Example #5
0
 public function update($get, $post)
 {
     $result = Result::convert(parent::update($get, $post));
     //接管提交成功后的处理
     if ($post && $result->isSuccess()) {
         $id = $result->getData()['id'];
         $sample_type = Sample::findOneByPk($id)->sample_type;
         if ($sample_type == GlobalConf::SAMPLE_TYPE_SINGLE) {
             $ext = SingleSample::find('sample_id=?', $id)->one() ?: new SingleSample(array('sample_id' => $id));
             unset($post['id']);
             $ext->setValues($post);
             $ext->save();
         }
         $result->setJumpUrl(Router::getUrl('Sample/info', array('id' => $id)));
     }
     return $result;
 }
 public function update($get, $post)
 {
     $r = Result::convert(parent::update($get, $post));
     if ($post && $r->isSuccess()) {
         $this->updateProduceOrderState($post['produce_order_id']);
     }
     return $r;
 }