Beispiel #1
0
<?php

$this->breadcrumbs = array(Yii::t('main', 'List Item') => array('admin'), Yii::t('main', 'Manage'));
$this->menu = array(array('label' => Yii::t('frontend', 'Create Item'), 'icon' => 'plus', 'url' => array('create')));
?>

<?php 
$form = $this->beginWidget('CActiveForm', array('id' => 'item-form', 'action' => 'bulk', 'htmlOptions' => array('enctype' => 'multipart/form-data'), 'enableAjaxValidation' => false));
$this->widget('bootstrap.widgets.TbGridView', array('id' => 'item-grid', 'type' => 'striped bordered condensed', 'dataProvider' => $model->search(), 'selectableRows' => 2, 'enableHistory' => 'true', 'columns' => array(array('class' => 'CCheckBoxColumn', 'name' => 'item_id', 'value' => '$data->item_id'), array('name' => 'category.name', 'header' => Yii::t('backend', 'Item Categories')), array('name' => 'title', 'header' => '商品名字'), array('name' => 'stock', 'header' => '库存'), array('name' => 'min_number', 'header' => '最小数量'), array('name' => 'price', 'header' => '价格'), array('name' => 'is_show', 'header' => '上架', 'value' => 'Tbfunction::showYesOrNo($data->is_show)', 'filter' => Tbfunction::ReturnYesOrNo()), array('name' => 'is_promote', 'header' => '热销', 'value' => 'Tbfunction::showYesOrNo($data->is_promote)', 'filter' => Tbfunction::ReturnYesOrNo()), array('name' => 'is_new', 'header' => '新品', 'value' => 'Tbfunction::showYesOrNo($data->is_new)', 'filter' => Tbfunction::ReturnYesOrNo()), array('name' => 'is_hot', 'header' => '热卖', 'value' => 'Tbfunction::showYesOrNo($data->is_hot)', 'filter' => Tbfunction::ReturnYesOrNo()), array('name' => 'is_best', 'header' => '精品', 'value' => 'Tbfunction::showYesOrNo($data->is_best)', 'filter' => Tbfunction::ReturnYesOrNo()), array('class' => 'bootstrap.widgets.TbButtonColumn'))));
?>
<div class="span12">
<div class="bulk-action span10">
    <?php 
echo CHtml::radioButtonList('act', '', array('delete' => '删除产品', 'is_show' => '上架', 'un_show' => '下架', 'is_promote' => '促销', 'un_promote' => '取消促销', 'is_new' => '新品', 'un_new' => '取消新品', 'hot' => '热卖', 'un_hot' => '取消热卖', 'best' => '精品', 'un_best' => '取消精品'), array('separator' => '&nbsp;'));
?>
</div>
<div class="bulk-action span2">
<?php 
echo CHtml::submitButton('提交', array('class' => 'btn btn-primary'));
?>
</div>
    </div>
<?php 
$this->endWidget();
Beispiel #2
0
/**
 * Created by JetBrains PhpStorm.
 * User: User
 * Date: 14-1-13
 * Time: 下午1:57
 * To change this template use File | Settings | File Templates.
 */
?>

<div class="input-group space">
    <?php 
echo $form->labelEx($model, 'user_id', array('class' => 'input-group-addon'));
?>
    <?php 
echo $form->dropdownlist($model, 'user_id', Tbfunction::showUser(), array('class' => 'form-control form-control1'));
?>
</div>

<div class="input-group space">
    <?php 
echo $form->labelEx($model, 'total_fee', array('class' => 'input-group-addon'));
?>
    <?php 
echo $form->textField($model, 'total_fee', array('size' => 10, 'maxlength' => 10, 'class' => 'form-control form-control1'));
?>
</div>

<div class="input-group space">
    <?php 
echo $form->labelEx($model, 'pay_status', array('class' => 'input-group-addon'));
Beispiel #3
0
<?php

$this->breadcrumbs = array(Yii::t('main', 'Shipping Methods') => array('index'), Yii::t('main', 'Manage'));
$this->menu = array(array('label' => Yii::t('main', 'List ShippingMethod'), 'icon' => 'list', 'url' => array('index')), array('label' => Yii::t('main', 'Create ShippingMethod'), 'icon' => 'plus', 'url' => array('create')));
?>



<h1><?php 
echo Yii::t('main', 'Manage ShippingMethod');
?>
</h1>

<p>
You may optionally enter a comparison operator (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b>
or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.
</p>


<?php 
$this->widget('bootstrap.widgets.TbGridView', array('id' => 'shipping-method-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array('shipping_method_id', 'code', 'name', 'desc', array('name' => 'enabled', 'value' => 'Tbfunction::showYesOrNo($data->enabled)', 'filter' => Tbfunction::ReturnYesOrNo()), array('name' => 'is_cod', 'value' => 'Tbfunction::showYesOrNo($data->is_cod)', 'filter' => Tbfunction::ReturnYesOrNo()), array('class' => 'bootstrap.widgets.TbButtonColumn'))));
Beispiel #4
0
            <?php 
echo Tbfunction::showPayStatus($Order->pay_status);
?>
        </dd></dl>
    <dl>
        <dt>发货状态:</dt>
        <dd>
            <?php 
echo Tbfunction::showShipStatus($Order->ship_status);
?>
        </dd>

        <dt>退款状态:</dt>
        <dd>
            <?php 
echo Tbfunction::showRefundStatus($Order->refund_status);
?>
        </dd>

        <dt>&nbsp;</dt>
        <dd>&nbsp;</dd>
    </dl>
    <div class="clearfix"></div>
</div>
<!-- 订单信息 -->
<table>
    <colgroup>
        <col class="item">
        <col class="sku">
        <!-- 宝贝 -->
Beispiel #5
0
<?php

$menu = Menu::model()->findByPk(4);
$descendants = $menu->children()->findAll();
/*
 * 单级菜单
 */
foreach ($descendants as $model) {
    $items[] = array('label' => strtoupper($model->name), 'url' => $model->url ? Yii::app()->request->baseUrl . '/' . $model->url : '#', 'active' => Tbfunction::mainMenu(Yii::app()->baseUrl . '/' . $model->url));
}
$this->widget('zii.widgets.CMenu', array('htmlOptions' => array('class' => 'nav_list'), 'activeCssClass' => 'current', 'items' => $items));
/*
 * 多级菜单
 */
//foreach ($descendants as $model) {
//
//    if ($model->getChildCount() > 0) {
//        $items[] = array('label' => F::t($model->name), 'url' => $model->url ? Yii::app()->request->baseUrl . '/' . $model->url : '#',
//            'items' => $model->getChildMenu(),
//            'itemOptions' => array('class' => 'dropdown'), 'submenuOptions' => array('class' => 'dropdown'));
//    } else {
//        $items[] = array('label' => F::t($model->name), 'url' => $model->url ? Yii::app()->request->baseUrl . '/' . $model->url : '#');
//    }
//}
//print_r($items);
//$this->widget('zii.widgets.CMenu', array(
//    'htmlOptions' => array('class' => 'nav_list'),
//    'activeCssClass'=>'active',
//    'activateParents'=>true,
//    'items' => $items,
//
Beispiel #6
0
                        <th>买家</th>
                        <th>宝贝名称</th>
                        <th>价格</th>
                        <th>购买数量</th>
                        <th>成交时间</th>
                        <th>状态</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php 
    foreach ($item->orderItems as $orderItem) {
        /** @var OrderItem $orderItem */
        ?>
                        <tr>
                            <td><?php 
        echo Tbfunction::getUser($orderItem->order->user_id);
        ?>
</td>
                            <td><?php 
        echo $orderItem->title;
        ?>
</td>
                            <td><?php 
        echo $orderItem->price;
        ?>
</td>
                            <td><?php 
        echo $orderItem->quantity;
        ?>
</td>
                            <td><?php 
Beispiel #7
0
</h1>

<p>You may optionally enter a comparison operator (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>
        &lt;&gt;</b>
    or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.
</p>
<?php 
echo CHtml::link('<div class="btn btn-primary">创建订单</div>', '#', array('class' => 'search-button'));
?>
<div class="search-form" style="display:none">
    <?php 
$this->renderPartial('select_user', array('users' => $users));
?>
</div>
<?php 
$this->widget('bootstrap.widgets.TbGridView', array('id' => 'order-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'enableHistory' => 'true', 'columns' => array('order_id', array('name' => 'user_id', 'header' => '会员账号', 'value' => 'Tbfunction::getUser($data->user_id)'), array('name' => 'pay_status', 'value' => 'Tbfunction::showPayStatus($data->pay_status)'), array('name' => 'refund_status', 'value' => 'Tbfunction::showRefundStatus($data->refund_status)', 'filter' => Tbfunction::ReturnRefundStatus()), array('name' => 'payment_method_id', 'value' => 'Tbfunction::showPayMethod($data->payment_method_id)', 'filter' => Tbfunction::ReturnPayMethod()), 'pay_fee', 'ship_fee', 'total_fee', array('name' => 'shipping_method_id', 'value' => 'Tbfunction::showShipMethod($data->shipping_method_id)', 'filter' => Tbfunction::ReturnShipMethod()), array('name' => 'create_time', 'value' => 'date("Y-m-d H:i:s",$data->create_time)'), array('name' => 'receiver_name'), array('name' => 'ship_status', 'value' => 'Tbfunction::showShipStatus($data->ship_status)', 'filter' => Tbfunction::ReturnShipStatus()), array('class' => 'bootstrap.widgets.TbButtonColumn', 'template' => '{deliver}', 'buttons' => array('deliver' => array('label' => '发货', 'url' => 'Yii::app()->createUrl("mall/order/deliver", array("id"=>$data->order_id))', 'options' => array('class' => 'btn btn-info btn-lg', 'data-target' => '#myModal', 'data-toggle' => 'modal', 'ajax' => array('type' => 'POST', 'url' => "js:\$(this).attr('href')", 'success' => 'function(data) { $("#myModal .modal-body").html(data); $("#myModal").modal(); }', 'error' => 'function(XHR) {$("#myModal .modal-body").html("未知错误"); $("#myModal").modal();}', 'data' => array('fid' => 'js:this.value', 'YII_CSRF_TOKEN' => Yii::app()->request->csrfToken)))))), array('class' => 'bootstrap.widgets.TbButtonColumn'))));
?>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">发货</h4>
            </div>
            <div class="modal-body">
                ...
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
Beispiel #8
0
<?php

/**
 * Created by PhpStorm.
 * author: shuai.du@jago-ag.cn
 * Date: 3/12/14
 * Time: 11:42 AM
 */
?>
        <?php 
$form = $this->beginWidget('CActiveForm', array('id' => 'deliver-form', 'enableAjaxValidation' => false));
$this->widget('bootstrap.widgets.TbDetailView', array('data' => $Order, 'id' => 'deliverForm', 'attributes' => array('order_id', array('name' => 'user_id', 'value' => Tbfunction::getUser($Order->user_id)), array('name' => 'pay_status', 'value' => Tbfunction::showPayStatus($Order->pay_status)), array('name' => 'pay_time', 'value' => date('Y-m-d H:i:s', $Order->create_time)), array('name' => 'refund_status', 'value' => Tbfunction::showRefundStatus($Order->refund_status)), array('name' => 'payment_method_id', 'value' => Tbfunction::showPayMethod($Order->payment_method_id)), 'pay_fee', 'ship_fee', array('name' => 'shipping_method_id', 'value' => Tbfunction::showShipMethod($Order->shipping_method_id)), array('name' => 'status', 'value' => Tbfunction::showStatus($Order->status)), 'memo', 'receiver_name', array('name' => '收货地址', 'value' => Tbfunction::showReceiveAddress($Order)), 'receiver_zip', 'receiver_mobile', 'receiver_phone', array('name' => 'create_time', 'value' => date('Y-m-d H:i:s', $Order->create_time)), array('name' => 'ship_status', 'value' => Tbfunction::showShipStatus($Order->ship_status)), 'order_ship_id', array('name' => 'ship_time', 'value' => date('Y-m-d H:i:s', $Order->ship_time)))));
?>
            <div>
                <?php 
echo $form->labelEx($Order, 'order_ship_id');
?>
                <?php 
echo $form->textField($Order, 'order_ship_id');
?>
                <?php 
echo $form->error($Order, 'order_ship_id');
?>
                <?php 
echo CHtml::hiddenField('backurl', Yii::app()->request->urlReferrer);
?>
            </div>
            <?php 
echo TbHtml::formActions(array(TbHtml::submitButton('Submit', array('color' => TbHtml::BUTTON_COLOR_PRIMARY))));
?>
        <?php 
Beispiel #9
0
<?php

$this->breadcrumbs = array('我的订单' => array('admin'), '管理');
?>

<div class="box" style="width:1050px;">
    <div class="box-title">管理订单</div>
    <div class="box-content clearfix">
      <?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'order-grid', 'dataProvider' => $model->MyOrderSearch(), 'filter' => $model, 'columns' => array('order_id', array('name' => 'status', 'value' => 'Tbfunction::showOrderStatus($data->status)', 'filter' => Tbfunction::ReturnOrderStatus()), 'total_fee', 'ship_fee', 'pay_fee', array('name' => 'create_time', 'value' => 'date("Y-m-d H:i:s", $data->create_time)'), array('name' => 'pay_status', 'value' => 'Tbfunction::showPayStatus($data->pay_status)', 'filter' => Tbfunction::ReturnPayStatus()), array('name' => 'ship_status', 'value' => 'Tbfunction::showShipStatus($data->ship_status)', 'filter' => Tbfunction::ReturnShipStatus()), array('name' => 'payment_method_id', 'value' => 'Tbfunction::showPayMethod($data->payment_method_id)', 'filter' => Tbfunction::ReturnPayMethod()), array('value' => 'Tbfunction::view_user($data->order_id)'))));
?>
    </div>
</div>