[积分商城]兑换订单-优化
This commit is contained in:
@@ -52,7 +52,9 @@ class RedemptionOrder extends Backend
|
||||
*/
|
||||
list($where, $alias, $limit, $order) = $this->queryBuilder();
|
||||
$res = $this->model
|
||||
->withJoin($this->withJoinTable, $this->withJoinType)
|
||||
->with(['mallUser' => function ($query) {
|
||||
$query->field('id,username');
|
||||
}])
|
||||
->visible(['mallUser' => ['username'], 'mallItem' => ['title']])
|
||||
->alias($alias)
|
||||
->where($where)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace app\common\model;
|
||||
|
||||
use app\common\model\traits\TimestampInteger;
|
||||
use support\think\Model;
|
||||
|
||||
/**
|
||||
@@ -9,6 +10,8 @@ use support\think\Model;
|
||||
*/
|
||||
class MallRedemptionOrder extends Model
|
||||
{
|
||||
use TimestampInteger;
|
||||
|
||||
// 表名
|
||||
protected $name = 'mall_redemption_order';
|
||||
|
||||
|
||||
@@ -59,6 +59,7 @@ const baTable = new baTableClass(
|
||||
label: t('mall.redemptionOrder.malluser__username'),
|
||||
prop: 'mallUser.username',
|
||||
align: 'center',
|
||||
minWidth: 120,
|
||||
operatorPlaceholder: t('Fuzzy query'),
|
||||
render: 'tags',
|
||||
operator: 'LIKE',
|
||||
@@ -68,9 +69,10 @@ const baTable = new baTableClass(
|
||||
label: t('mall.redemptionOrder.status'),
|
||||
prop: 'status',
|
||||
align: 'center',
|
||||
custom: { 0: 'info', 1: 'primary' },
|
||||
operator: 'eq',
|
||||
sortable: false,
|
||||
render: 'switch',
|
||||
render: 'tag',
|
||||
replaceValue: { '0': t('mall.redemptionOrder.status 0'), '1': t('mall.redemptionOrder.status 1') },
|
||||
},
|
||||
{
|
||||
@@ -102,6 +104,8 @@ const baTable = new baTableClass(
|
||||
label: t('mall.redemptionOrder.type'),
|
||||
prop: 'type',
|
||||
align: 'center',
|
||||
effect: 'dark',
|
||||
custom: { 1: 'success', 2: 'primary', 3: 'info' },
|
||||
operator: 'eq',
|
||||
sortable: false,
|
||||
render: 'tag',
|
||||
|
||||
Reference in New Issue
Block a user