function __construct()
 {
     parent::__construct();
     parent::_checkLogin();
     $this->steSetting = C('steward/setting');
     $this->setOrderStatus = array(3 => '已审核', 4 => '正在采购', 5 => '采购完成', 6 => '配送中', 7 => '已送达', 8 => '送货失败', 0 => '订单备注');
     $this->setOrderDealStatus = array(3 => '已审核', 6 => '配送中');
     $this->serviceData = parent::getServiceCache();
 }
 function __construct()
 {
     parent::__construct();
     parent::_checkLogin();
     $this->steSetting = C('steward/setting');
     $this->serviceData = parent::getServiceCache();
     $this->adminData = C('steward/admin');
     $this->steSetting['status'][1] = '<span class="red">是</span>';
 }
 function __construct()
 {
     parent::__construct();
     parent::_checkLogin();
     $this->steSetting = C('steward/setting');
     $this->setOrderStatus = array(3 => '已审核', 4 => '正在配货', 5 => '配货完成', 6 => '配送中', 7 => '已送达', 8 => '送货失败');
     $this->steSetting['order_status'][13] = '<span class="red">异常订单</span>';
     $this->steSetting['order_type'][0] = '<span class="red">当日预约</span>';
     $this->steSetting['order_type'][1] = '<span class="green">预约订单</span>';
     $this->serviceData = parent::getServiceCache();
 }
 function edit()
 {
     $id = $this->_getid('id', steadmin::$adminInfo['user_id']);
     if (!$id) {
         showError('参数丢失');
     }
     $rs = D('steadmin')->getUserInfoById($id, 'all');
     if (!$rs) {
         showError('帐号不存在');
     }
     if (steadmin::$adminInfo['groupid'] == 7 && $rs['build_uid'] !== steadmin::$adminInfo['user_id']) {
         //总店
         showError('没有编辑权限');
     }
     if (parent::_checkIsPresident() && $rs['service_id'] !== steadmin::$adminInfo['service_id']) {
         //社长
         showError('没有编辑权限');
     }
     $serviceData = parent::getServiceCache();
     $rs['stitle'] = $rs['service_id'] && isset($serviceData[$rs['service_id']]) ? $serviceData[$rs['service_id']]['stitle'] : '';
     $rs['isShowDetail'] = in_array($rs['groupid'], $this->hasWorkerInfo) ? true : false;
     $userGroup = $this->adminConfig['group'];
     if (steadmin::$adminInfo['groupid'] == 7) {
         //总店
         $group[8] = $userGroup[8];
         $where = array('status' => 1, 'user_id' => steadmin::$adminInfo['user_id']);
         $isAdmin = false;
     } elseif (parent::_checkIsPresident()) {
         //社长
         $group[3] = $userGroup[3];
         $group[4] = $userGroup[4];
         $group[9] = $userGroup[9];
         $where = array('status' => 1, 'service_id' => steadmin::$adminInfo['service_id']);
         $isAdmin = false;
     } else {
         //管理员
         $group = $userGroup;
         $where = array('status' => 1);
         $isAdmin = true;
     }
     $shop = M('ste_shop')->field('shop_id,shop_name,shop_alt_name')->where($where)->findAll();
     $this->assign(array('rs' => $rs, 'status' => $this->status, 'group' => $group, 'shop' => $shop, 'isAdmin' => $isAdmin));
     $this->display();
 }