當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。