Exemplo n.º 1
0
echo CHtml::label('所在地区:', '', array('style' => 'margin-left:15px;'));
echo " " . CHtml::dropDownList('provice', $search['provice'], $state, array('class' => 'width118 select', 'empty' => '请选择省份', 'ajax' => array('type' => 'GET', 'url' => Yii::app()->request->baseUrl . '/common/dynamiccity', 'update' => '#city', 'data' => 'js:"province="+jQuery(this).val()')));
?>
                <?php 
if ($search['provice']) {
    $city_data = Area::model()->findAll("parent_id=:parent_id", array(":parent_id" => $search['provice']));
    $city = CHtml::listData($city_data, "id", "name");
}
$city_update = $search['provice'] ? $city : array();
?>
                <?php 
echo Chtml::dropDownList('city', $search['city'], $city_update, array('class' => 'width118 select', 'empty' => '请选择城市', 'ajax' => array('type' => 'GET', 'url' => Yii::app()->request->baseUrl . '/common/dynamiccity', 'update' => '#Dealer_area', 'data' => 'js:"city="+jQuery(this).val()')));
?>
                <label style="margin-left:30px;">适用车系:</label>
                <?php 
$make_data = GoodsBrand::getBrand();
$make = CHtml::listData($make_data, "id", "name");
?>
                <?php 
echo CHtml::dropDownList('make', $search['make'], $make, array('class' => 'width118 select', 'empty' => '请选择品牌', 'ajax' => array('type' => 'GET', 'url' => Yii::app()->request->baseUrl . '/common/getcarbyid', 'update' => '#car', 'data' => 'js:"make="+jQuery(this).val()')));
?>
                <?php 
if ($_GET['make']) {
    $brand = GoodsBrand::model()->find('id=' . $_GET['make']);
    $data = GoodsBrand::model()->findAll("name=:Make", array(":Make" => $brand['name']));
    $data = CHtml::listData($data, "id", "car");
    //  $vehicleModel_data=GoodsBrand::model()->find("id=:id",array(":id"=>$search['vehicleMake']));
}
?>
                <?php 
$vehicleModel_update = $_GET['make'] ? $data : array();
Exemplo n.º 2
0
<div class='width998 content'>
	<?php 
include 'tabs_active.php';
?>
	<?php 
//获取汽车品牌信息
//$brand_data=TransportMake::model()->findAll();
//$brand=CHtml::listData($brand_data,"Code","Make");
$brand_data = GoodsBrand::getBrand();
$brand = CHtml::listData($brand_data, "id", "name");
?>
	<div class="form-list">
		<form action="<?php 
echo Yii::app()->createUrl("dealer/makequery/servicersearch");
?>
" method="get" name="queryForm" >
			<p class='form-row'>
				<label class="label">关键词:&nbsp;&nbsp;</label>
				<input class="width248 input" type="text" name="keyWord" value="<?php 
if ($search['keyword']) {
    echo $search['keyword'];
} else {
    echo "机构名称或关键词";
}
?>
" onfocus="if (value =='机构名称或关键词'){this.style.color='#000'; value =''}" onblur="if (value ==''){this.style.color='#999'; value='机构名称或关键词'}">							
			</p>
			<p class='form-row'>
				<label class="label">地&nbsp;&nbsp;区:&nbsp;&nbsp;</label>
				<?php 
$state_data = Area::model()->findAll("grade=:grade", array(":grade" => 1));