public function doSearchOrderByPhone() { $ordersService = new OrdersService(); $messageService = new MessageService(); $ordersCondition = new OrdersValue(); $mobile = Request::get('num'); if ($mobile != '') { $ordersCondition->addMobileCondition("%{$mobile}%", Value::LIKE); } $orderListModel = '手机号(或者固定电话)为 ' . $mobile . ' 的派单'; $ordersVo = $ordersService->getByPrimary($ordersId); $messageVo = $messageService->getByOderid($ordersId); $userCondition = new UserValue(); $userService = new UserService(); $userlist = $userService->getlist($userCondition); $projectCondition = new ProjectValue(); $projectService = new ProjectService(); $projectlist = $projectService->getList($projectCondition); $areaService = new AreaService(); $arealist = $areaService->getList(new AreaValue()); $ordersList = $ordersService->getList($ordersCondition); if ($mobile != '') { $ordersCondition->addTelephoneCondition("%{$mobile}%", Value::LIKE); } $ordersList2 = $ordersService->getList($ordersCondition); if (is_array($ordersList) and is_array($ordersList2)) { $ordersList = array_merge($ordersList, $ordersList2); } elseif (is_array($ordersList2)) { $ordersList = $ordersList2; } if (count($ordersList) > 0) { echo '<table width="480"> <tr> <td>姓名</td> <td>顾客地址</td> <td>详细情况</td> <td>电话</td> <td>手机</td> <td>操作</td> </tr>'; foreach ($ordersList as $k => $v) { echo '<tr> <td>' . $v->customer_name . '</td> <td>' . $v->customer_address . '</td> <td>' . $v->telephone . '</td> <td>' . $v->mobile . '</td> <td>' . Validation::utf8_trim(substr($v->info, 0, 25)) . '</td> <td> <a id="show_order' . $v->order_id . '" onclick="showDetail(\'index.php?module=orders&action=AjaxView&view_orders_id=' . $v->order_id . '\')" class="clickevent" >查看</a> </td> </tr>'; } echo '</table>'; echo ' <script language="javascript"> $(".clickevent").click(function(e){ e.preventDefault(); }) function showDetail(url){ ymPrompt.close(); href=url; $.get(href,function(data){ ymPrompt.win({message:data, width:500,height: 700,title: "派单详情",allowSelect:true,allowRightMenu:true}); }) } </script>'; } else { echo '0'; } }