Exemplo n.º 1
0
 /**
  * 获取适用车系
  */
 private function getcar($goodsID)
 {
     $showvehicles = DealerParts::model()->findAll('pgoods_id=' . $goodsID);
     if (!empty($showvehicles)) {
         foreach ($showvehicles as $showvehicle) {
             $car .= GoodsBrand::getName($showvehicle['maincate']) . '-' . GoodsBrand::getCar($showvehicle['subcate']) . ';';
         }
     }
     return $car;
 }
Exemplo n.º 2
0
        echo F::msubstr($product['normName']);
        ?>
</td>
									<td ><?php 
        echo $product['partsLevel'];
        ?>
</td>
									<td >
										 <?php 
        echo F::msubstr($product['OENO']);
        //
        ?>
									</td>
									<td >
										<?php 
        $vehicles = DealerParts::model()->findAll('pgoods_id=:pgoods_id', array('pgoods_id' => $product['id']));
        foreach ($vehicles as $vehicle) {
            $veh .= GoodsBrand::getName($vehicle['maincate']) . GoodsBrand::getCar($vehicle['subcate']) . '-';
        }
        echo F::msubstr($veh);
        $veh = '';
        ?>
									</td>
									
									<td><?php 
        echo F::msubstr($product['youhui'], 0, 8);
        //$product['youhui']
        ?>
</td>
								</tr>
								<?php 
Exemplo n.º 3
0
?>
		    <?php 
echo $form->dropDownList($model, 'car', array(), array('class' => 'width118 select', 'empty' => '请选择车系'));
?>
			<?php 
// echo $form->error($model,'businessCar');
?>
			<span id='addVehcle' class="btn" style="cursor:pointer">添加</span>
		</p>
		<p class="form-row" id="showVehicle"><!-- 显示车系车型 -->
		<label class=label></label>
                <?php 
if (isset($_GET['id'])) {
    ?>
                    <?php 
    $showvehicles = DealerParts::model()->findAll('pgoods_id=' . $_GET['id']);
    ?>
                    <?php 
    if (!empty($showvehicles)) {
        ?>
                    <?php 
        foreach ($showvehicles as $showvehicle) {
            ?>
                            <span class='checkbox-add bg-green tag-close catespan'><span><?php 
            GoodsBrand::showName($showvehicle['maincate']);
            ?>
</span>-<span name='model'><?php 
            GoodsBrand::showCar($showvehicle['subcate']);
            ?>
</span><span onclick='xxVehicle(this)' key="<?php 
            echo $showvehicle['id'];