当前位置: 首页>>代码示例>>PHP>>正文


PHP Order::getPaymentList方法代码示例

本文整理汇总了PHP中common\models\Order::getPaymentList方法的典型用法代码示例。如果您正苦于以下问题:PHP Order::getPaymentList方法的具体用法?PHP Order::getPaymentList怎么用?PHP Order::getPaymentList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在common\models\Order的用法示例。


在下文中一共展示了Order::getPaymentList方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: function

        case Order::STATUS_SHIPPED:
            $class = 'success';
            break;
        case Order::STATUS_CANCELLED:
            $class = 'warning';
            break;
        case Order::STATUS_DELETED:
            $class = 'purple';
            break;
        default:
            break;
    }
    return ['class' => $class];
}, 'columns' => [['class' => 'yii\\grid\\SerialColumn', 'headerOptions' => ['class' => 'col-md-1']], ['attribute' => 'order_sn', 'headerOptions' => ['class' => 'col-md-2'], 'filterInputOptions' => ['class' => 'form-control input-sm']], ['attribute' => 'user_id', 'headerOptions' => ['class' => 'col-md-2'], 'filterInputOptions' => ['class' => 'form-control input-sm'], 'value' => function ($model, $key, $index, $column) {
    return $model->user->mobile;
}, 'filter' => Select2::widget(['model' => $searchModel, 'initValueText' => ($user = User::findOne($searchModel->user_id)) ? $user->mobile : '', 'attribute' => 'user_id', 'size' => Select2::SMALL, 'theme' => Select2::THEME_KRAJEE, 'options' => ['placeholder' => '搜索用户手机...'], 'pluginOptions' => ['allowClear' => true, 'minimumInputLength' => 3, 'ajax' => ['url' => Url::to(['/order/user-mobile-filter']), 'dataType' => 'json', 'data' => new JsExpression('function(params) { return {q:params.term}; }')], 'escapeMarkup' => new JsExpression('function (markup) { return markup; }'), 'templateResult' => new JsExpression('function (user) { return user.text; }'), 'templateSelection' => new JsExpression('function (user) { return user.text; }')]])], ['attribute' => 'payment', 'filter' => Order::getPaymentList(), 'filterInputOptions' => ['class' => 'form-control input-sm'], 'headerOptions' => ['class' => 'col-md-1'], 'value' => function ($model, $key, $index, $column) {
    return $model->paymentMsg;
}], ['attribute' => 'real_fee', 'headerOptions' => ['class' => 'col-md-1'], 'filterInputOptions' => ['class' => 'form-control input-sm', 'title' => '支持运算符']], ['attribute' => 'status', 'filter' => Order::getStatusList(), 'filterInputOptions' => ['class' => 'form-control input-sm'], 'headerOptions' => ['class' => 'col-md-2'], 'value' => function ($model, $key, $index, $column) {
    return $model->statusMsg;
}], ['attribute' => 'created_at', 'format' => ['date', 'php:Y-m-d H:i'], 'filter' => DatePicker::widget(['model' => $searchModel, 'type' => DatePicker::TYPE_COMPONENT_APPEND, 'attribute' => 'date', 'options' => ['class' => 'input-sm'], 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]), 'headerOptions' => ['class' => 'col-md-2']], ['class' => 'yii\\grid\\ActionColumn', 'header' => '操作', 'headerOptions' => ['class' => 'col-md-1'], 'template' => '{view}']]]);
?>
        <?php 
Pjax::end();
?>
    </div>
</div>
<?php 
$script = <<<SCRIPT
\$('.btn-status').click(function() {
    \$('[name="OrderSearch[status]"]').val(\$(this).val()).change();
});
开发者ID:daixianceng,项目名称:xiaoego.com,代码行数:31,代码来源:index.php


注:本文中的common\models\Order::getPaymentList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。