/** * 获得数据列表 */ public function doDefault(ZOL_Request $input, ZOL_Response $output) { $wArr = array(); #搜索字段 $whereSql = ""; $page = (int) $input->get('page') < 1 ? 1 : (int) $input->get('page'); $output->sername = $wArr['name'] = $input->get('name'); $output->sercateId = $wArr['cateId'] = $input->get('cateId'); if (!empty($wArr)) { foreach ($wArr as $k => $v) { if (gettype($v) == 'string') { $whereSql .= !empty($v) ? ' AND ' . $k . ' like binary "%' . $v . '%" ' : ''; } else { $whereSql .= !empty($v) ? ' AND ' . $k . '=' . $v : ''; } } } $pageUrl = "?c={$output->ctlName}&a={$output->actName}&page={$page}&name={$wArr['name']}&cateId={$wArr['cateId']}"; $pageSize = 30; $orderSql = "order by id desc"; $data = Helper_Dao::getList(array('dbName' => "Db_AndyouYun", 'tblName' => "staff", 'cols' => "*", 'pageSize' => $pageSize, 'page' => $page, 'pageUrl' => $pageUrl, 'whereSql' => $whereSql, 'orderSql' => $orderSql, 'iswrite' => true, 'pageTpl' => 9)); if ($data) { $output->pageBar = $data['pageBar']; $output->allCnt = $data['allCnt']; $output->data = $data['data']; $output->pageUrl = $pageUrl; } $output->staffCate = Helper_Yun_Staff::getStaffCatePairs(); $output->setTemplate('Staff'); }
/** * 获得数据列表 */ public function doDefault(ZOL_Request $input, ZOL_Response $output) { $wArr = array(); #搜索字段 $output->isAddUser = (int) $input->get("isAddUser"); $whereSql = ""; $page = (int) $input->get('page') < 1 ? 1 : (int) $input->get('page'); $output->serbno = $wArr['bno'] = $input->get('bno'); $output->serstaffid = $wArr['staffid'] = $input->get('staffid'); $output->sermemberId = $wArr['memberId'] = $input->get('memberId'); $output->sermemberPhone = $input->get('memberPhone'); $output->isBuyScore = $input->get('isBuyScore'); $output->hasChangePrice = (int) $input->get("hasChangePrice"); //销售员修改过的订单 //如果传入了会员电话 if ($output->sermemberPhone) { $wArr['phone'] = $output->sermemberPhone; } if ($output->isBuyScore == 1) { $whereSql .= " and isBuyScore = 1"; } if ($output->isBuyScore == 2) { $whereSql .= " and isBuyScore = 0"; } //销售员修改了价格 if ($output->hasChangePrice) { $whereSql .= " and priceTrue > 0 "; } if (!empty($wArr)) { foreach ($wArr as $k => $v) { if (gettype($v) == 'string') { if ($k == "phone") { $whereSql .= !empty($v) ? ' AND ' . $k . '=' . $v : ''; } else { $whereSql .= !empty($v) ? ' AND ' . $k . ' like binary "%' . $v . '%" ' : ''; } } else { $whereSql .= !empty($v) ? ' AND ' . $k . '=' . $v : ''; } } } if ($output->isAddUser) { $whereSql .= " AND memberId = 0 "; } $pageUrl = "?c={$output->ctlName}&a={$output->actName}&page={$page}&bno={$wArr['bno']}&isAddUser={$output->isAddUser}&staffid={$wArr['staffid']}&memberPhone={$output->sermemberPhone}&hasChangePrice={$output->hasChangePrice}"; $pageSize = 30; $orderSql = "order by id desc"; $data = Helper_Dao::getList(array('dbName' => "Db_AndyouYun", 'tblName' => "bills", 'cols' => "*", 'pageSize' => $pageSize, 'page' => $page, 'pageUrl' => $pageUrl, 'whereSql' => $whereSql, 'orderSql' => $orderSql, 'iswrite' => true, 'pageTpl' => 9)); if ($data) { $output->pageBar = $data['pageBar']; $output->allCnt = $data['allCnt']; $output->data = $data['data']; $output->pageUrl = $pageUrl; } $output->staffInfo = Helper_Yun_Staff::getSiteStaffPairs(); $output->setTemplate('Bills'); }