diff --git a/resources/beike/admin/views/pages/products/index.blade.php b/resources/beike/admin/views/pages/products/index.blade.php index d39255c1..b9ad1dc9 100644 --- a/resources/beike/admin/views/pages/products/index.blade.php +++ b/resources/beike/admin/views/pages/products/index.blade.php @@ -61,17 +61,23 @@
- - - + @if ($type != 'trashed') + + + + @else + + @endif + @if ($type != 'trashed')
+ @click="batchActive(true)">{{ __('admin/product.batch_active') }} + @click="batchActive(false)">{{ __('admin/product.batch_inactive') }}
+ @endif
-

无商品

+

+ +

@@ -289,6 +297,16 @@ location.reload(); }) }); + }, + + clearRestore() { + this.$confirm('确认要清空回收站吗?', '提示', { + type: 'warning' + }).then(() => { + $http.post('products/trashed/clear').then((res) => { + location.reload(); + }) + }); } } }); diff --git a/resources/lang/en/admin/product.php b/resources/lang/en/admin/product.php index 5d5f9953..3a19f1be 100644 --- a/resources/lang/en/admin/product.php +++ b/resources/lang/en/admin/product.php @@ -17,6 +17,7 @@ return [ 'products_delete' => 'Delete', 'products_trashed' => 'Trashed', 'products_restore' => 'restore', + 'clear_restore' => 'Empty Recycle Bin', 'batch_delete' => 'Batch Delete', 'batch_active' => 'Batch Active', diff --git a/resources/lang/zh_cn/admin/product.php b/resources/lang/zh_cn/admin/product.php index d776ba17..fe95da14 100644 --- a/resources/lang/zh_cn/admin/product.php +++ b/resources/lang/zh_cn/admin/product.php @@ -17,6 +17,7 @@ return [ 'products_delete' => '删除商品', 'products_trashed' => '回收站', 'products_restore' => '恢复回收站', + 'clear_restore' => '清空回收站', 'batch_delete' => '批量删除',