예제 #1
0
 public function doView()
 {
     $areaService = new AreaService();
     $areaId = intval(Request::get("view_area_id"));
     $areaVo = $areaService->getByPrimary($areaId);
     View::set("AreaViewValue", $areaVo);
     View::display("View");
 }
예제 #2
0
        </a>
        <a href="casa_list.php?deleted=1">
            <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>回收站
        </a>
    </div>
    <table class="table table-hover">
        <tr>
            <th>序号</th>
            <th>编码</th>
            <th>名称</th>
            <th>地区</th>
            <th>操作</th>
        </tr>
    <?php 
$casaDao = new CasaDao();
$areaService = new AreaService();
$query = $casaDao->getAll($_GET['deleted']);
$casas = array();
while ($row = mysql_fetch_array($query)) {
    array_push($casas, new Casa($row));
}
// The compareCasaByCode method is in common_tools.php
// TODO 需要修改成通用的方法。
usort($casas, 'compareCasaByCode');
$number = 1;
foreach ($casas as $casa) {
    ?>
        <tr>
            <td><?php 
    echo $number++;
    ?>
예제 #3
0
 public function doEdit()
 {
     $areaService = new AreaService();
     $areaList = $areaService->getList(new AreaValue());
     $userService = new UserService();
     $userId = $_SESSION['user_id'];
     $userVo = $userService->getByPrimary($userId);
     View::set("AreaList", $areaList);
     View::set("UserUpdateValue", $userVo);
     View::display("Edit");
 }
예제 #4
0
 public function doExport()
 {
     // create a simple 2-dimensional array
     if (Request::get('type') == 'time') {
         $ordersService = new OrdersService();
         $userCondition = new UserValue();
         $userService = new UserService();
         $ordersCondition = new OrdersValue();
         $userlist = $userService->getlist($userCondition);
         //get project
         $projectCondition = new ProjectValue();
         $projectService = new ProjectService();
         $projectlist = $projectService->getList($projectCondition);
         //按时间范围搜索
         $start = Request::get('start');
         $end = Request::get('end');
         $orderListModel = '所有派单';
         if ($start != '' and $end != '') {
             $ordersCondition->addAddtimeCondition($start, Value::GREATER_EQUAL);
             $ordersCondition->addAddtimeCondition($end, Value::LESS_EQUAL);
             $orderListModel = '从' . $start . ' 到 ' . $end . '的派单';
         } elseif ($end == '' and $start != '') {
             $ordersCondition->addAddtimeCondition($end, Value::LESS_EQUAL);
             $orderListModel = '从' . $start . ' 到 今天 的派单';
         }
         $ordersCondition->addCondition('1=1 ORDER BY `order_id` DESC');
         $ordersList = $ordersService->getList($ordersCondition, $listPageHelper);
         $areaService = new AreaService();
         $arealist = $areaService->getList(new AreaValue());
         $array_top = array();
         $array_top = array(Language::get("ORDERS.ADDTIME.LABEL"), Language::get("ORDERS.CUSTOMER_NAME.LABEL"), Language::get("ORDERS.CUSTOMER_ADDRESS.LABEL"), Language::get("ORDERS.PROJECT_ID.LABEL"), Language::get("ORDERS.HIS.LABEL"), Language::get("ORDERS.OPERATE_STATUS.LABEL"), Language::get("ORDERS.CONTACT_STATUS.LABEL"), Language::get("ORDERS.USER_ID.LABEL"), Language::get("ORDERS.INFO.LABEL"));
         $data[] = $array_top;
         if (count($ordersList) > 0) {
             foreach ($ordersList as $k => $v) {
                 if (count($projectlist) > 0) {
                     foreach ($projectlist as $project) {
                         if ($v->project_id == $project->project_id) {
                             $project = $project->project_name;
                             break;
                         }
                     }
                 }
                 switch ($v->operate_status) {
                     case Value::OPERATE_STATUS_NOT_OPERATE:
                         $operate_status = '未成交';
                         break;
                     case Value::OPERATE_STATUS_OPERATED:
                         $operate_status = '已成交';
                         break;
                 }
                 switch ($v->contact_status) {
                     case Value::CONTACT_STATUS_CANNOT_CONTACT:
                         $contact_status = '无法联系';
                         break;
                     case Value::CONTACT_STATUS_CONTACTED:
                         $contact_status = '已联系';
                         break;
                     case Value::CONTACT_STATUS_NOT_CONTACT:
                         $contact_status = '未联系';
                         break;
                 }
                 if (count($userlist) > 0) {
                     foreach ($userlist as $outUser) {
                         if ($v->user_id == $outUser->user_id) {
                             $user = $outUser->realname;
                             break;
                         }
                     }
                 }
                 $data[] = array($v->addtime, $v->customer_name, $v->customer_address, $project, $v->HIS, $operate_status, $contact_status, $user, $v->info);
             }
         }
         // generate file (constructor parameters are optional)
         $xls = new Excel_XML('UTF-8', false, $orderListModel);
         $xls->addArray($data);
         $xls->generateXML('paidan');
     } else {
         View::display('Export');
     }
 }
예제 #5
0
echo $selected_custom_str;
?>
" class="form-control" aria-describedby="sizing-addon3" />
        </div>
    </div>
    <div id="area_div" class="area">
        <input id="area" type="hidden" value="<?php 
echo $casa->area->id;
?>
"/>
        <h4>地区</h4>
        <?php 
include_once $_SERVER['DOCUMENT_ROOT'] . '/casarover/application/services/AreaService.php';
?>
        <?php 
$areaService = new AreaService();
if (isset($casa)) {
    echo '<span id="area_fullname" style="margin-left:15px;">' . $areaService->getLeafFullName($casa->area->id) . '</span>';
}
$areas = $areaService->getAreaHierarchy();
$areas_json = json_encode($areas);
echo '<input type="hidden" id="areas_json" value=\'' . $areas_json . '\'/>';
?>
        <div class="dropdown col-lg-12 vertical5">
            <div id="provinces" style="float: left; margin-right: 5px;">
                <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1"
                        data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
                    <span class="area_text">省</span> <span class="caret"></span>
                </button>
                <ul id="province_ul" class="dropdown-menu" aria-labelledby="dropdownMenu1">
                </ul>
예제 #6
0
"></script>
<script src="js/city_search.js?rand=<?php 
echo $rand;
?>
"></script>
</head>
<body>
<?php 
include '301.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/casarover/application/models/AreaDao.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/casarover/application/services/AreaService.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/casarover/application/services/TagService.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/casarover/application/services/CasaService.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/casarover/application/controllers/AreaController.php';
$area_id = $_GET['area_id'];
$areaService = new AreaService();
$picdir = 'http://casarover.oss-cn-hangzhou.aliyuncs.com/casa/';
$city_ids = $areaService->getCityIdsIncludeDirect();
if (!empty($area_id) && in_array($area_id, $city_ids)) {
    $areaDao = new AreaDao();
    $area = new Area($areaDao->getById($area_id));
} else {
    header('Location:error.php?info=无效城市!');
}
$tagService = new TagService();
$officialTags = $tagService->getOfficialTags();
$subAreas = $areaService->getSubAreas($area_id);
$casaService = new CasaService();
$casas = array();
// because there may be casa that has no tag,
// if one casa has no tag, it will never appear in the result of getForCitySearch(),
예제 #7
0
    <?php 
include 'navigator.php';
?>
    <input type="hidden" id="page" value="area"/>
    <table class="table table-hover">
        <tr>
            <th>序号</th>
            <th>ID</th>
            <th>名称</th>
            <th>操作</th>
        </tr>
        <?php 
include_once $_SERVER['DOCUMENT_ROOT'] . '/casarover/application/services/AreaService.php';
?>
    <?php 
$casaDao = new AreaService();
$result = $casaDao->getAllArea();
?>
    <?php 
$number = 1;
foreach ($result as $value) {
    if ($value['name'] != "其他") {
        ?>
        <tr>
            <td><?php 
        echo $number++;
        ?>
</td>
            <td><?php 
        echo $value['id'];
        ?>