Пример #1
0
        </div>
        <div class="clear"></div>
     
        <div class="box-left">
            <!--Order Information-->
            <div class="entry-edit">
                <div class="entry-edit-head">
                    <h4 class="icon-head head-account">运费</h4>
                </div>
               
                <div class="grid fieldset">
                    <table cellspacing="0" cellpadding="0" class="table space">
					<tbody>
                 <?php 
echo "<tr>";
echo CHtml::activeDropDownList($carrier, 'carrier_ID', carrier_entity::items(), array('class' => 'required-entry required-entry input-select', 'id' => 'carrier', 'name' => 'carrier_ID'));
echo "</tr>";
echo ' <tr class="headings">
						<th style="padding:4px 6px;">区域 / 范围</th>';
foreach ($carrier->weight as $row) {
    $l1 = floatval($row->delimiter1);
    $l2 = floatval($row->delimiter2);
    echo "<th style='font-size: 11px; padding:4px 6px;'>{$l1}kg to {$l2}kg</th>";
}
echo '</tr>';
foreach ($carrier->zones as $row) {
    echo "<tr class='filter'><th style='height: 30px; padding:4px 6px;'>{$row->name}</th>";
    foreach ($carrier->weight as $item) {
        $delivery = delivery::model()->findByAttributes(array('carrier_ID' => $carrier->carrier_ID, 'zone_ID' => $row->zone_ID, 'weight_range_ID' => $item->weight_ID));
        if ($delivery) {
            $fee = $delivery->price;
Пример #2
0
<div id="weightGrid">
        <?php 
$this->widget('TradeGrid', array('dataProvider' => $model->search(), 'filter' => $model, 'htmlOptions' => array('class' => 'hor-scroll'), 'columns' => array(array('header' => '编号', 'name' => 'weight_ID', 'type' => 'raw'), array('header' => '货运渠道', 'name' => 'carrier_ID', 'value' => 'carrier_entity::model()->findByPk($data->carrier_ID)->carrier_name', 'filter' => carrier_entity::items(), 'type' => 'raw'), array('header' => '下限', 'name' => 'delimiter1', 'value' => '"KG" . $data->delimiter1', 'type' => 'raw'), array('header' => '上限', 'name' => 'delimiter2', 'value' => '"KG" . $data->delimiter2', 'type' => 'raw'), array('class' => 'CButtonColumn', 'template' => '{update} {delete}'))));
?>
</div>