|
|
@@ -46,22 +46,6 @@ class GoodsList extends \common\libs\dataList\DataList implements DataListInterf
|
|
|
'header' => \Yii::t('ctx', 'shopListProductsCode'), // 商品编号
|
|
|
'headerOther' => ['width' => '200'],
|
|
|
],
|
|
|
- 'SELL_DISCOUNT' => [
|
|
|
- 'header' => \Yii::t('ctx', 'shopListDiscountRate'), // 商品折扣
|
|
|
- 'value' => function($row) {
|
|
|
- $discount = 0;
|
|
|
- if ($row['TYPE'] == 1) {
|
|
|
- $discount = '0.5';
|
|
|
- } else if($row['TYPE'] == 2) {
|
|
|
- $discount = '0.6';
|
|
|
- } else {
|
|
|
- $discount = $row['SELL_DISCOUNT'];
|
|
|
- }
|
|
|
-
|
|
|
- return $discount;
|
|
|
- },
|
|
|
- 'headerOther' => ['width' => '150'],
|
|
|
- ],
|
|
|
'GIFT_TYPE' => [
|
|
|
'header' => \Yii::t('ctx', 'shopListProductsType'), // 商品类型
|
|
|
'value' => function($row){
|
|
|
@@ -76,27 +60,6 @@ class GoodsList extends \common\libs\dataList\DataList implements DataListInterf
|
|
|
},
|
|
|
'headerOther' => ['width' => '150'],
|
|
|
],
|
|
|
-// 'CATEGORY_TYPE' => [
|
|
|
-// 'header' => \Yii::t('ctx', 'shopListProductCategory'), // 商品分类
|
|
|
-// 'value' => function($row) {
|
|
|
-// $categoryType = array_column($this->getCategoryType(), NULL, 'id'); //array_column(ShopGoods::CATEGORY_TYPE, NULL, 'id');
|
|
|
-// return $categoryType[$row['CATEGORY_TYPE']]['name'] ?? '';
|
|
|
-// },
|
|
|
-// 'headerOther' => ['width' => '150'],
|
|
|
-// ],
|
|
|
-// 'SELL_TYPE' => [
|
|
|
-// 'header' => \Yii::t('ctx', 'shopListPaymentMode'), // 购买方式
|
|
|
-// 'value' => function($row){
|
|
|
-// $sellType = $this->getSaleType(); //ShopGoods::SALE_TYPE;
|
|
|
-// $sel = explode(',',$row['SELL_TYPE']);
|
|
|
-// $value = '';
|
|
|
-// foreach ($sel as $v){
|
|
|
-// $value.= $sellType[$v]['name'].',';
|
|
|
-// }
|
|
|
-// return $value;
|
|
|
-// },
|
|
|
-// 'headerOther' => ['width' => '150'],
|
|
|
-// ],
|
|
|
'SELL_PRICE_STANDARD' => [
|
|
|
'header' => \Yii::t('ctx', 'shopListPriceStandard'), // 标准价格($)
|
|
|
'headerOther' => [
|
|
|
@@ -132,22 +95,19 @@ class GoodsList extends \common\libs\dataList\DataList implements DataListInterf
|
|
|
],
|
|
|
],
|
|
|
'STATUS' => [
|
|
|
- 'header' => \Yii::t('ctx', 'shopListStatus'), // 状态
|
|
|
- 'value' => function($row) {
|
|
|
- return $row['STATUS'] == 1 ? \Yii::t('ctx', 'shopListOnSale') : \Yii::t('ctx', 'shopListSoldOut'); //已上架:已下架
|
|
|
- },
|
|
|
+ 'header' => \Yii::t('ctx', 'shopListStatus'), // 产品BV
|
|
|
'headerOther' => [
|
|
|
- 'width' => '110',
|
|
|
+ 'width' => '120',
|
|
|
],
|
|
|
- ],
|
|
|
- 'UPDATED_AT' => [
|
|
|
- 'header' => \Yii::t('ctx', 'shopListUpdatedAt'), // 更新时间
|
|
|
'value' => function ($row) {
|
|
|
- return (new DateTime([
|
|
|
- 'value' => $row['UPDATED_AT'],
|
|
|
- ]))->result();
|
|
|
+ return $row['STATUS'] == 1 ? \Yii::t('ctx', 'shopListOnSale') : \Yii::t('ctx', 'shopListSoldOut');
|
|
|
+ },
|
|
|
+ 'valueOther' => function ($row) {
|
|
|
+ $tag = ($row['STATUS'] == 1) ? 'success' : 'danger';
|
|
|
+ return [
|
|
|
+ 'tag' => ['type' => $tag, 'size' => 'small', 'class' => 'no-border']
|
|
|
+ ];
|
|
|
},
|
|
|
- 'headerOther' => ['width' => '190'],
|
|
|
],
|
|
|
];
|
|
|
}
|