|
|
@@ -38,15 +38,15 @@ class GoodsList extends \common\libs\dataList\DataList implements DataListInterf
|
|
|
$this->columns = [
|
|
|
'ID' => null,
|
|
|
'GOODS_NAME' => [
|
|
|
- 'header' => 'Product Name', // 商品名称
|
|
|
+ 'header' => \Yii::t('ctx', 'shopListProductName'), // 商品名称
|
|
|
'headerOther' => ['width' => '200'],
|
|
|
],
|
|
|
'GOODS_NO' => [
|
|
|
- 'header' => 'Products Code', // 商品编号
|
|
|
+ 'header' => \Yii::t('ctx', 'shopListProductsCode'), // 商品编号
|
|
|
'headerOther' => ['width' => '200'],
|
|
|
],
|
|
|
'SELL_DISCOUNT' => [
|
|
|
- 'header' => 'Discount Rate', // 商品折扣
|
|
|
+ 'header' => \Yii::t('ctx', 'shopListDiscountRate'), // 商品折扣
|
|
|
'value' => function($row) {
|
|
|
$discount = 0;
|
|
|
if ($row['TYPE'] == 1) {
|
|
|
@@ -62,7 +62,7 @@ class GoodsList extends \common\libs\dataList\DataList implements DataListInterf
|
|
|
'headerOther' => ['width' => '150'],
|
|
|
],
|
|
|
'GIFT_TYPE' => [
|
|
|
- 'header' => 'Products Type', // 商品类型
|
|
|
+ 'header' => \Yii::t('ctx', 'shopListProductsType'), // 商品类型
|
|
|
'value' => function($row){
|
|
|
$giftType = ShopGoods::GIFT_TYPE;
|
|
|
$gift = explode(',',$row['GIFT_TYPE']);
|
|
|
@@ -76,7 +76,7 @@ class GoodsList extends \common\libs\dataList\DataList implements DataListInterf
|
|
|
'headerOther' => ['width' => '150'],
|
|
|
],
|
|
|
'CATEGORY_TYPE' => [
|
|
|
- 'header' => 'Product Category', // 商品分类
|
|
|
+ 'header' => \Yii::t('ctx', 'shopListProductCategory'), // 商品分类
|
|
|
'value' => function($row) {
|
|
|
$categoryType = array_column(ShopGoods::CATEGORY_TYPE, NULL, 'id');
|
|
|
return $categoryType[$row['CATEGORY_TYPE']]['name'] ?? '';
|
|
|
@@ -84,7 +84,7 @@ class GoodsList extends \common\libs\dataList\DataList implements DataListInterf
|
|
|
'headerOther' => ['width' => '150'],
|
|
|
],
|
|
|
'SELL_TYPE' => [
|
|
|
- 'header' => 'Payment Mode', // 购买方式
|
|
|
+ 'header' => \Yii::t('ctx', 'shopListPaymentMode'), // 购买方式
|
|
|
'value' => function($row){
|
|
|
$sellType = ShopGoods::SALE_TYPE;
|
|
|
$sel = explode(',',$row['SELL_TYPE']);
|
|
|
@@ -97,7 +97,7 @@ class GoodsList extends \common\libs\dataList\DataList implements DataListInterf
|
|
|
'headerOther' => ['width' => '150'],
|
|
|
],
|
|
|
'SELL_PRICE_STANDARD' => [
|
|
|
- 'header' => 'US Price($)', // 标准价格($)
|
|
|
+ 'header' => \Yii::t('ctx', 'shopListPriceStandard'), // 标准价格($)
|
|
|
'headerOther' => [
|
|
|
'width' => '150',
|
|
|
],
|
|
|
@@ -111,7 +111,7 @@ class GoodsList extends \common\libs\dataList\DataList implements DataListInterf
|
|
|
},
|
|
|
],
|
|
|
'SELL_PRICE' => [
|
|
|
- 'header' => 'Sales Price(₦)', // 商品价格
|
|
|
+ 'header' => \Yii::t('ctx', 'shopListSellPrice'), // 商品价格
|
|
|
'headerOther' => [
|
|
|
'width' => '150',
|
|
|
],
|
|
|
@@ -125,7 +125,7 @@ class GoodsList extends \common\libs\dataList\DataList implements DataListInterf
|
|
|
},
|
|
|
],
|
|
|
'PRICE_PV' => [
|
|
|
- 'header' => 'Products BV', // 产品BV
|
|
|
+ 'header' => \Yii::t('ctx', 'shopListProductsBv'), // 产品BV
|
|
|
'headerOther' => [
|
|
|
'width' => '150',
|
|
|
],
|
|
|
@@ -139,7 +139,7 @@ class GoodsList extends \common\libs\dataList\DataList implements DataListInterf
|
|
|
},
|
|
|
],
|
|
|
'TAX_RATE' => [
|
|
|
- 'header' => 'Tax Rate(%)', // 税率
|
|
|
+ 'header' => \Yii::t('ctx', 'shopListTaxRate'), // 税率
|
|
|
'headerOther' => [
|
|
|
'width' => '150',
|
|
|
],
|
|
|
@@ -153,7 +153,7 @@ class GoodsList extends \common\libs\dataList\DataList implements DataListInterf
|
|
|
},
|
|
|
],
|
|
|
'TAX' => [
|
|
|
- 'header' => 'Tax(₦)', // 税额
|
|
|
+ 'header' => \Yii::t('ctx', 'shopListTax'), // 税额
|
|
|
'headerOther' => [
|
|
|
'width' => '150',
|
|
|
],
|
|
|
@@ -167,22 +167,22 @@ class GoodsList extends \common\libs\dataList\DataList implements DataListInterf
|
|
|
},
|
|
|
],
|
|
|
'STORE_NUMS' => [
|
|
|
- 'header' => 'Inventory', // 库存
|
|
|
+ 'header' => \Yii::t('ctx', 'shopListInventory'), // 库存
|
|
|
'headerOther' => [
|
|
|
'width' => '110',
|
|
|
],
|
|
|
],
|
|
|
'STATUS' => [
|
|
|
- 'header' => 'Status', // 状态
|
|
|
+ 'header' => \Yii::t('ctx', 'shopListStatus'), // 状态
|
|
|
'value' => function($row) {
|
|
|
- return $row['STATUS'] == 1 ? 'On sale' : 'Sold out'; //已上架:已下架
|
|
|
+ return $row['STATUS'] == 1 ? \Yii::t('ctx', 'shopListOnSale') : \Yii::t('ctx', 'shopListSoldOut'); //已上架:已下架
|
|
|
},
|
|
|
'headerOther' => [
|
|
|
'width' => '110',
|
|
|
],
|
|
|
],
|
|
|
'UPDATED_AT' => [
|
|
|
- 'header' => 'Update Time', // 更新时间
|
|
|
+ 'header' => \Yii::t('ctx', 'shopListUpdatedAt'), // 更新时间
|
|
|
'value' => function ($row) {
|
|
|
return (new DateTime([
|
|
|
'value' => $row['UPDATED_AT'],
|
|
|
@@ -203,13 +203,33 @@ class GoodsList extends \common\libs\dataList\DataList implements DataListInterf
|
|
|
{
|
|
|
if(!$this->filterTypes){
|
|
|
$this->filterTypes = [
|
|
|
- 'GIFT_TYPE' => ['isUserTable' => false, 'name' => 'Products Type', 'other' => 'select', 'selectData' => [['id' => 1, 'name' => 'Entry area'], ['id' => 2, 'name' => 'Reselling area'], ['id' => 3, 'name' => 'Office Entry area'], ['id' => 4, 'name' => 'Office Reselling area']]],
|
|
|
- 'STATUS'=> ['name'=> 'Status', 'other'=> 'select', 'selectData'=> [['id'=> 0, 'name'=> 'Sold out'],['id'=> 1, 'name'=> 'On sale']]], // 状态,已下架,已上架
|
|
|
- 'GOODS_NAME'=> ['name'=> 'Product Name'], // 商品名称
|
|
|
- 'GOODS_NO'=> ['name'=> 'Products Code'], // 商品编号
|
|
|
- 'SELL_PRICE'=> ['name'=> 'Products Price'], // 销售价格
|
|
|
- 'PRICE_PV'=> ['name'=> 'Products BV'], // 销售PV
|
|
|
- 'CATEGORY_TYPE' => ['name' => 'Product Category', 'other'=> 'select', 'selectData'=> ShopGoods::CATEGORY_TYPE], // 商品分类
|
|
|
+ 'GIFT_TYPE' => [
|
|
|
+ 'isUserTable' => false,
|
|
|
+ 'name' => \Yii::t('ctx', 'shopListProductsType'),
|
|
|
+ 'other' => 'select',
|
|
|
+ 'selectData' => [
|
|
|
+ ['id' => 1, 'name' => \Yii::t('ctx', 'shopList1stPurchase')],
|
|
|
+ ['id' => 2, 'name' => \Yii::t('ctx', 'shopListRepeatPurchase')],
|
|
|
+ ['id' => 3, 'name' => \Yii::t('ctx', 'shopListEntryArea')],
|
|
|
+ ['id' => 4, 'name' => \Yii::t('ctx', 'shopListResellingArea')]
|
|
|
+ ]
|
|
|
+ ],
|
|
|
+ 'STATUS'=> [
|
|
|
+ 'name'=> \Yii::t('ctx', 'shopListStatus'), 'other'=> 'select',
|
|
|
+ 'selectData'=> [
|
|
|
+ ['id'=> 0, 'name'=> \Yii::t('ctx', 'shopListSoldOut')],
|
|
|
+ ['id'=> 1, 'name'=> \Yii::t('ctx', 'shopListOnSale')]
|
|
|
+ ]
|
|
|
+ ], // 状态,已下架,已上架
|
|
|
+ 'GOODS_NAME'=> ['name'=> \Yii::t('ctx', 'shopListProductName')], // 商品名称
|
|
|
+ 'GOODS_NO'=> ['name'=> \Yii::t('ctx', 'shopListProductsCode')], // 商品编号
|
|
|
+ 'SELL_PRICE'=> ['name'=> \Yii::t('ctx', 'shopListSellPrice')], // 销售价格
|
|
|
+ 'PRICE_PV'=> ['name'=> \Yii::t('ctx', 'shopListProductsBv')], // 销售PV
|
|
|
+ 'CATEGORY_TYPE' => [
|
|
|
+ 'name' => \Yii::t('ctx', 'shopListProductCategory'),
|
|
|
+ 'other'=> 'select',
|
|
|
+ 'selectData'=> ShopGoods::CATEGORY_TYPE
|
|
|
+ ], // 商品分类
|
|
|
];
|
|
|
}
|
|
|
return $this->filterTypes;
|