50 changed files with 8090 additions and 167 deletions
-
39app/Admin/Actions/Grid/GoodsCopy.php
-
80app/Admin/Controllers/CouponSettingController.php
-
8app/Admin/Controllers/CouponTieController.php
-
4app/Admin/Controllers/v3/CategoryController.php
-
250app/Admin/Controllers/v3/CouponController.php
-
86app/Admin/Controllers/v3/CouponSettingController.php
-
29app/Admin/Controllers/v3/GoodsActivityController.php
-
97app/Admin/Controllers/v3/GoodsCategoryController.php
-
53app/Admin/Controllers/v3/GoodsController.php
-
67app/Admin/Controllers/v3/StoreController.php
-
105app/Admin/Forms/GoodsCopyForm.php
-
60app/Admin/Repositories/v3/Coupon.php
-
4app/Admin/Repositories/v3/CouponSetting.php
-
16app/Admin/Repositories/v3/GoodsCategory.php
-
22app/Admin/bootstrap.php
-
8app/Admin/routes.php
-
71app/Console/Commands/setStoreUsers.php
-
16app/Models/CouponSetting.php
-
22app/Models/v3/Category.php
-
158app/Models/v3/Coupon.php
-
33app/Models/v3/CouponReceiveType.php
-
60app/Models/v3/CouponSetting.php
-
14app/Models/v3/CouponUse.php
-
2app/Models/v3/Goods.php
-
51app/Models/v3/GoodsCategory.php
-
24app/Models/v3/Market.php
-
9app/Models/v3/Store.php
-
43app/Models/v3/StoreUsers.php
-
10config/admin.php
-
6config/filesystems.php
-
12config/label.php
-
36database/migrations/2020_09_08_145454_create_lanzu_goods_category_table.php
-
13dcat_admin_ide_helper.php
-
2public/vendors/dcat-admin/dcat/extra/select-table.js
-
1public/vendors/dcat-admin/dcat/extra/select-table.js.map
-
399public/vendors/dcat-admin/dcat/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.css
-
1public/vendors/dcat-admin/dcat/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.css.map
-
10public/vendors/dcat-admin/dcat/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css
-
1public/vendors/dcat-admin/dcat/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map
-
6252public/vendors/dcat-admin/dcat/plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.js
-
1public/vendors/dcat-admin/dcat/plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.js.map
-
10public/vendors/dcat-admin/dcat/plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js
-
1public/vendors/dcat-admin/dcat/plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js.map
-
BINpublic/vendors/dcat-admin/images/pages/login/bg.jpg
-
BINpublic/vendors/dcat-admin/images/waves.png
-
3resources/lang/zh-CN/coupon-setting.php
-
47resources/lang/zh-CN/coupon.php
-
2resources/lang/zh-CN/goods-activity.php
-
16resources/lang/zh-CN/goods-category.php
-
3resources/lang/zh-CN/goods.php
@ -0,0 +1,39 @@ |
|||
<?php |
|||
|
|||
namespace App\Admin\Actions\Grid; |
|||
|
|||
use Dcat\Admin\Grid\RowAction; |
|||
use Dcat\Admin\Widgets\Modal; |
|||
use App\Models\v3\Store as StoreModel; |
|||
use Dcat\Admin\Form; |
|||
use App\Models\v3\Goods as GoodsModel; |
|||
use App\Admin\Forms\GoodsCopyForm; |
|||
|
|||
class GoodsCopy extends RowAction |
|||
{ |
|||
/** |
|||
* @return string |
|||
*/ |
|||
protected $title = '复制'; |
|||
|
|||
public function render() |
|||
{ |
|||
$id = $this->getKey(); |
|||
|
|||
$modal = Modal::make() |
|||
->xl() |
|||
->title($this->title) |
|||
->body(GoodsCopyForm::make()->setKey($id)) |
|||
->button($this->title); |
|||
|
|||
return $modal; |
|||
} |
|||
|
|||
public function parameters() |
|||
{ |
|||
|
|||
return [ |
|||
|
|||
]; |
|||
} |
|||
} |
|||
@ -1,80 +0,0 @@ |
|||
<?php |
|||
|
|||
namespace App\Admin\Controllers; |
|||
|
|||
use App\Admin\Repositories\CouponSetting; |
|||
use Dcat\Admin\Form; |
|||
use Dcat\Admin\Grid; |
|||
use Dcat\Admin\Show; |
|||
use Dcat\Admin\Controllers\AdminController; |
|||
|
|||
class CouponSettingController extends AdminController |
|||
{ |
|||
/** |
|||
* Make a grid builder. |
|||
* |
|||
* @return Grid |
|||
*/ |
|||
protected function grid() |
|||
{ |
|||
return Grid::make(new CouponSetting(), function (Grid $grid) { |
|||
$grid->id->sortable(); |
|||
$grid->name; |
|||
$grid->category; |
|||
$grid->value; |
|||
$grid->desc; |
|||
$grid->sort; |
|||
$grid->status; |
|||
$grid->created_at; |
|||
$grid->updated_at->sortable(); |
|||
|
|||
$grid->filter(function (Grid\Filter $filter) { |
|||
$filter->equal('id'); |
|||
|
|||
}); |
|||
}); |
|||
} |
|||
|
|||
/** |
|||
* Make a show builder. |
|||
* |
|||
* @param mixed $id |
|||
* |
|||
* @return Show |
|||
*/ |
|||
protected function detail($id) |
|||
{ |
|||
return Show::make($id, new CouponSetting(), function (Show $show) { |
|||
$show->id; |
|||
$show->name; |
|||
$show->category; |
|||
$show->value; |
|||
$show->desc; |
|||
$show->sort; |
|||
$show->status; |
|||
$show->created_at; |
|||
$show->updated_at; |
|||
}); |
|||
} |
|||
|
|||
/** |
|||
* Make a form builder. |
|||
* |
|||
* @return Form |
|||
*/ |
|||
protected function form() |
|||
{ |
|||
return Form::make(new CouponSetting(), function (Form $form) { |
|||
$form->display('id'); |
|||
$form->text('name'); |
|||
$form->text('category'); |
|||
$form->text('value'); |
|||
$form->text('desc'); |
|||
$form->text('sort'); |
|||
$form->text('status'); |
|||
|
|||
$form->display('created_at'); |
|||
$form->display('updated_at'); |
|||
}); |
|||
} |
|||
} |
|||
@ -0,0 +1,250 @@ |
|||
<?php |
|||
|
|||
namespace App\Admin\Controllers\v3; |
|||
|
|||
use App\Admin\Repositories\v3\Coupon; |
|||
use Dcat\Admin\Form; |
|||
use Dcat\Admin\Grid; |
|||
use Dcat\Admin\Show; |
|||
use Dcat\Admin\Controllers\AdminController; |
|||
use App\Models\v3\CouponReceiveType as ReceiveTypeModel; |
|||
use App\Models\v3\CouponSetting as SettingModel; |
|||
use App\Models\v3\Coupon as CouponModel; |
|||
use App\Models\v3\Market as MarketModel; |
|||
use App\Models\v3\Category as CategoryModel; |
|||
use Dcat\Admin\Form\NestedForm; |
|||
|
|||
use function GuzzleHttp\json_decode; |
|||
|
|||
class CouponController extends AdminController |
|||
{ |
|||
protected $receive_type = 0; |
|||
/** |
|||
* Make a grid builder. |
|||
* |
|||
* @return Grid |
|||
*/ |
|||
protected function grid() |
|||
{ |
|||
// $model = new CouponModel();
|
|||
// $list = $model->setAppends([])->select('id','title')->get();
|
|||
// dd($list->toArray());
|
|||
return Grid::make(new Coupon(), function (Grid $grid) { |
|||
$grid->id->sortable(); |
|||
$grid->title; |
|||
$grid->start_time_text; |
|||
$grid->end_time_text; |
|||
|
|||
$grid->full_amount; |
|||
$grid->discounts; |
|||
$grid->discount_type_text; |
|||
|
|||
$grid->inventory; |
|||
$grid->inventory_use; |
|||
$grid->use_number; |
|||
$grid->active_type_text; |
|||
$grid->status |
|||
->using( |
|||
CouponModel::$_STATUS |
|||
) |
|||
->label( |
|||
config('label.status_label') |
|||
); |
|||
|
|||
$grid->model()->orderBy('id','desc'); |
|||
$grid->filter(function (Grid\Filter $filter) { |
|||
$filter->like('title','标题'); |
|||
$filter->equal('discount_type')->select(config('coupon.discount_type')); |
|||
$filter->equal('active_type')->select(config('coupon.active_type')); |
|||
$status = config('coupon.status'); |
|||
unset($status[-1]);/* 去掉删除状态 */ |
|||
$filter->in('status')->multipleSelect($status); |
|||
}); |
|||
|
|||
$grid->disableBatchDelete(); |
|||
}); |
|||
} |
|||
|
|||
/** |
|||
* Make a show builder. |
|||
* |
|||
* @param mixed $id |
|||
* |
|||
* @return Show |
|||
*/ |
|||
protected function detail($id) |
|||
{ |
|||
return Show::make($id, new Coupon(), function (Show $show) use($id){ |
|||
// $show->id;
|
|||
$show->title; |
|||
$show->introduce; |
|||
$show->full_amount; |
|||
$show->discounts; |
|||
$show->discount_type_text; |
|||
$show->inventory; |
|||
$show->inventory_use; |
|||
|
|||
$show->start_time_text; |
|||
$show->end_time_text; |
|||
$show->usable_start_time_text; |
|||
$show->usable_end_time_text; |
|||
|
|||
$show->active_type_text; |
|||
$show->receive_type_text; |
|||
$show->type_text; |
|||
$show->category_text; |
|||
$show->market_id->as(function($marketId){ |
|||
$text = '全部市场'; |
|||
if($marketId > 0){ |
|||
$market = marketModel::select('name')->find($marketId)->toArray(); |
|||
$text = $market ? $market['name'] : $text ; |
|||
} |
|||
return $text; |
|||
}); |
|||
$show->storetype_id->as(function($storeTypeId){ |
|||
$text = '全部店铺类型'; |
|||
if($storeTypeId > 0){ |
|||
$storeType = storeTypeModel::select('type_name')->find($storeTypeId)->toArray(); |
|||
$text = $storeType ? $storeType['type_name'] : $text ; |
|||
} |
|||
return $text; |
|||
}); |
|||
$show->is_new_user_text; |
|||
|
|||
$show->usable_number; |
|||
$show->weigh; |
|||
$show->remark; |
|||
$show->status_text; |
|||
$show->created_at_text; |
|||
$show->updated_at_text; |
|||
}); |
|||
} |
|||
|
|||
/** |
|||
* Make a form builder. |
|||
* |
|||
* @return Form |
|||
*/ |
|||
protected function form() |
|||
{ |
|||
$builder = CouponModel::with('receiveType'); |
|||
return Form::make($builder, function (Form $form) { |
|||
$receiveTypeId = 0; |
|||
$startTime = null; |
|||
$endTime = null; |
|||
$usableStartTime = null; |
|||
$usableEndTime = null; |
|||
|
|||
if($form->isEditing()){ |
|||
$id = $form->getKey(); |
|||
// 查询已选择的领取方式
|
|||
$receiveType = ReceiveTypeModel::getReceiveTypeOne([['coupon_id','=',$id]],'receive_type'); |
|||
$receiveTypeId = $receiveType ? $receiveType->receive_type : $this->receive_type ; |
|||
$startTime = date('Y-m-d H:i:s',$form->model()->start_time); |
|||
$endTime = date('Y-m-d H:i:s',$form->model()->end_time); |
|||
$usableStartTime = date('Y-m-d H:i:s',$form->model()->usable_start_time); |
|||
$usableEndTime = date('YmdHis',$form->model()->usable_end_time); |
|||
// dd($usableEndTime);
|
|||
} |
|||
|
|||
$form->column(6,function(Form $form){ |
|||
$form->text('title')->required()->maxLength(255,'最多只能输入500个字'); |
|||
$form->textarea('introduce')->required(); |
|||
$form->currency('full_amount')->required()->floatTwo()->symbol('¥'); |
|||
$form->currency('discounts')->required()->floatTwo()->symbol('¥'); |
|||
$form->radio('discount_type')->options(CouponModel::$_DISCOUNTTYPE)->default(1); |
|||
$form->number('inventory')->required()->type('number')->attribute('min', 1)->default(1); |
|||
$form->number('weigh')->type('number')->attribute('min', 0)->default(0); |
|||
$form->radio('is_new_user')->options(CouponModel::$_ISNEWUSER)->default(2)->disable(); |
|||
|
|||
}); |
|||
|
|||
$form->column(6,function(Form $form) use($receiveTypeId){ |
|||
$form->select('active_type')->required()->options(CouponModel::$_ACTIVETYPE)->default(1); |
|||
/* 领取方式 */ |
|||
$receives = SettingModel::getSettingArray([['category','=',1]]); |
|||
$form->select('receive_type.receive_type','领取方式')->required()->options($receives)->value($receiveTypeId)->default($receiveTypeId); |
|||
// $form->hasMany('receive_type',function(NestedForm $form){
|
|||
// $form->select('receive_type')->options($receives);
|
|||
// });
|
|||
// $receive = SettingModel::select('id','name')->where('category',1)->get()->keyBy('id')->toArray();
|
|||
// $receive = $this->keyToValue($receive,'id','name');
|
|||
// $form->select('receive_type')->options($receive)->value($receiveTypeId > 0? $receiveTypeId : 2);
|
|||
|
|||
$form->datetimeRange('start_time','end_time','活动时间')->required(); |
|||
// ->rules('after:now',[
|
|||
// 'after' => '只能选择今天和之后的时间'
|
|||
// ]);
|
|||
$form->datetimeRange('usable_start_time','usable_end_time','可用时间')->required()->rules('after:start_time',[ |
|||
'after' => '可用时间必须比活动开始时间晚' |
|||
]); |
|||
|
|||
// $form->select('type')->options(CouponModel::$_TYPE)->default(1)->disable();
|
|||
// $form->select('category')->options(CouponModel::$_CATEGORY)->default(1)->disable();
|
|||
/* 默认全平台的市场 */ |
|||
$marketList = MarketModel::getMarketArray(); |
|||
$form->multipleSelect('market_ids')->options($marketList)->help('不选默认所有市场可用'); |
|||
/* 目前默认全平台的分类 */ |
|||
$categoryList = CategoryModel::getArray(); |
|||
$form->multipleSelect('category_ids')->options($categoryList)->help('不选默认所有类型可用'); |
|||
|
|||
}); |
|||
|
|||
$form->column(12,function(Form $form){ |
|||
$form->tags('activity_available','可用活动')->options(CouponModel::$_ACTIVITY_AVAILABLE); |
|||
$form->tags('tags','标签')->options(['新人专享','满39减10','满19减5']); |
|||
$form->text('remark')->maxLength(500,'最多只能输入500个字'); |
|||
}); |
|||
|
|||
/* 页面按钮 */ |
|||
$form->disableResetButton(); |
|||
$form->disableViewCheck(); |
|||
$form->disableEditingCheck(); |
|||
$form->disableCreatingCheck(); |
|||
|
|||
/* 不显示字段 */ |
|||
$form->hidden('id'); |
|||
|
|||
// $form->text('usable_number')->width(2)->default(1)->disable();
|
|||
|
|||
$form->saving(function (Form $form){ |
|||
// var_dump($form->usable_start_time);
|
|||
// dd($form->receive_type);
|
|||
if( $form->discount_type == 2 && ($form->discounts <= 0 || $form->discounts >= 10)){ |
|||
return $form->error('优惠金额请输入1~10之间的数字'); |
|||
} |
|||
|
|||
// $this->receive_type = $form->receive_type;
|
|||
$form->deleteInput('receive_type'); |
|||
}); |
|||
$form->saved(function (Form $form, $result){ |
|||
|
|||
$id = $form->getKey(); |
|||
$receiveTypeId = $form->input('receive_type'); |
|||
// 判断是否是新增操作
|
|||
if ($form->isCreating()) { |
|||
$id = $result; |
|||
|
|||
if (! $result) { |
|||
return $form->error('数据保存失败'); |
|||
} |
|||
} |
|||
if($form->isEditing()){ |
|||
// 删除领取方式
|
|||
ReceiveTypeModel::where('coupon_id',$id)->delete(); |
|||
} |
|||
|
|||
// 添加领取方式
|
|||
$receiveModel = new ReceiveTypeModel(); |
|||
$receiveModel->coupon_id = $id; |
|||
$receiveModel->receive_type = $receiveTypeId; |
|||
// 获取一次可领取数量
|
|||
$receiveNumber = SettingModel::getSettingInfo($receiveTypeId,'value'); |
|||
$receiveModel->one_receive_number = empty($receiveNumber) ? 1 : $receiveNumber->value; |
|||
$receiveModel->save(); |
|||
}); |
|||
|
|||
}); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,86 @@ |
|||
<?php |
|||
|
|||
namespace App\Admin\Controllers\v3; |
|||
|
|||
use App\Admin\Repositories\v3\CouponSetting; |
|||
use Dcat\Admin\Form; |
|||
use Dcat\Admin\Grid; |
|||
use Dcat\Admin\Show; |
|||
use Dcat\Admin\Controllers\AdminController; |
|||
use App\Models\v3\CouponSetting as SettingModel; |
|||
|
|||
class CouponSettingController extends AdminController |
|||
{ |
|||
/** |
|||
* Make a grid builder. |
|||
* |
|||
* @return Grid |
|||
*/ |
|||
protected function grid() |
|||
{ |
|||
return Grid::make(new CouponSetting(), function (Grid $grid) { |
|||
$grid->id->sortable(); |
|||
|
|||
$grid->category_text; |
|||
$grid->name; |
|||
$grid->value; |
|||
$grid->sort; |
|||
$grid->status->switch(); |
|||
|
|||
$grid->model()->orderBy('id','desc'); |
|||
$grid->filter(function (Grid\Filter $filter) { |
|||
$filter->like('name'); |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
/** |
|||
* Make a show builder. |
|||
* |
|||
* @param mixed $id |
|||
* |
|||
* @return Show |
|||
*/ |
|||
protected function detail($id) |
|||
{ |
|||
return Show::make($id, new CouponSetting(), function (Show $show) { |
|||
$show->row(function (Show\Row $show) { |
|||
$show->width(6)->id; |
|||
$show->width(6)->category_text; |
|||
$show->width(6)->name; |
|||
$show->width(6)->value; |
|||
}); |
|||
$show->row(function (Show\Row $show) { |
|||
$show->width(6)->sort; |
|||
$show->width(6)->status_text; |
|||
$show->width(6)->created_at; |
|||
$show->width(6)->updated_at; |
|||
}); |
|||
|
|||
// $show->desc;
|
|||
}); |
|||
} |
|||
|
|||
/** |
|||
* Make a form builder. |
|||
* |
|||
* @return Form |
|||
*/ |
|||
protected function form() |
|||
{ |
|||
return Form::make(new CouponSetting(), function (Form $form) { |
|||
$form->hidden('id'); |
|||
$form->select('category')->width(6)->options(SettingModel::$_CATEGORY); |
|||
$form->text('name')->width(6)->required()->maxLength(50); |
|||
|
|||
$form->number('value')->required()->rules('min:1')->default(1); |
|||
// $form->text('desc')->maxLength(500);
|
|||
$form->number('sort')->rules('min:0'); |
|||
|
|||
$form->disableResetButton(); |
|||
$form->disableViewCheck(); |
|||
$form->disableEditingCheck(); |
|||
$form->disableCreatingCheck(); |
|||
}); |
|||
} |
|||
} |
|||
@ -0,0 +1,97 @@ |
|||
<?php |
|||
|
|||
namespace App\Admin\Controllers\v3; |
|||
|
|||
use App\Admin\Repositories\v3\GoodsCategory; |
|||
use Dcat\Admin\Form; |
|||
use Dcat\Admin\Grid; |
|||
use Dcat\Admin\Show; |
|||
use Dcat\Admin\Controllers\AdminController; |
|||
use App\Models\v3\Category as CategoryModel; |
|||
use Symfony\Component\HttpFoundation\Request; |
|||
use Illuminate\Support\Facades\DB; |
|||
use App\Models\v3\GoodsCategory as GoodsCategoryModel; |
|||
class GoodsCategoryController extends AdminController |
|||
{ |
|||
/** |
|||
* Make a grid builder. |
|||
* |
|||
* @return Grid |
|||
*/ |
|||
protected function grid() |
|||
{ |
|||
return Grid::make(new GoodsCategory(), function (Grid $grid) { |
|||
$grid->column('id')->sortable(); |
|||
$grid->column('category_id')->display(function($categoryId){ |
|||
$item = CategoryModel::getInfo($categoryId,'title'); |
|||
return empty($item) ? '' : $item->title; |
|||
}); |
|||
$grid->column('title'); |
|||
$grid->column('cover_img')->image('',50); |
|||
$grid->column('sort'); |
|||
|
|||
$grid->model()->orderBy('id','desc'); |
|||
|
|||
$grid->filter(function (Grid\Filter $filter) { |
|||
$filter->equal('id'); |
|||
|
|||
}); |
|||
$grid->disableBatchDelete(); |
|||
}); |
|||
} |
|||
|
|||
/** |
|||
* Make a show builder. |
|||
* |
|||
* @param mixed $id |
|||
* |
|||
* @return Show |
|||
*/ |
|||
protected function detail($id) |
|||
{ |
|||
return Show::make($id, new GoodsCategory(), function (Show $show) { |
|||
$show->field('id'); |
|||
$show->field('category_id')->as(function($categoryId){ |
|||
$item = CategoryModel::getInfo($categoryId,'title'); |
|||
return empty($item) ? '' : $item->title; |
|||
}); |
|||
$show->field('title'); |
|||
$show->field('cover_img')->image('',50); |
|||
$show->field('sort'); |
|||
$show->field('created_at'); |
|||
$show->field('updated_at'); |
|||
}); |
|||
} |
|||
|
|||
/** |
|||
* Make a form builder. |
|||
* |
|||
* @return Form |
|||
*/ |
|||
protected function form() |
|||
{ |
|||
return Form::make(new GoodsCategory(), function (Form $form) { |
|||
$form->hidden('id'); |
|||
$category = CategoryModel::getArray([['parent_id','>',0]]); |
|||
$form->select('category_id')->width(4)->required()->options($category); |
|||
$form->text('title')->width(4)->required(); |
|||
$form->image('cover_img')->width(2); |
|||
$form->number('sort'); |
|||
|
|||
$form->disableResetButton(); |
|||
$form->disableViewCheck(); |
|||
$form->disableEditingCheck(); |
|||
$form->disableCreatingCheck(); |
|||
}); |
|||
} |
|||
|
|||
/** |
|||
* 获取商品类目列表 |
|||
*/ |
|||
public function getList(Request $request) |
|||
{ |
|||
$categoryId = $request->get('q'); |
|||
$list = GoodsCategoryModel::where('category_id',$categoryId)->get(['id',DB::raw('title as text')]); |
|||
return $list; |
|||
} |
|||
} |
|||
@ -0,0 +1,105 @@ |
|||
<?php |
|||
|
|||
namespace App\Admin\Forms; |
|||
|
|||
use Dcat\Admin\Widgets\Form; |
|||
use Symfony\Component\HttpFoundation\Response; |
|||
use App\Models\v3\Store as StoreModel; |
|||
use App\Models\v3\Goods as GoodsModel; |
|||
use App\Models\v3\GoodsBanners as GoodsBannerModel; |
|||
use Illuminate\Support\Facades\DB; |
|||
|
|||
class GoodsCopyForm extends Form |
|||
{ |
|||
|
|||
/** |
|||
* Handle the form request. |
|||
* |
|||
* @param array $input |
|||
* |
|||
* @return Response |
|||
*/ |
|||
public function handle(array $input) |
|||
{ |
|||
// 获取外部传递参数
|
|||
$goodsId = $input['goods_id']; |
|||
$storeIds= $input['store_ids']; |
|||
|
|||
$goods = GoodsModel::find($goodsId); |
|||
$goodsBanners = GoodsBannerModel::where('goods_id',$goodsId)->get(); |
|||
$markets = StoreModel::whereIn('id',$storeIds)->pluck('market_id','id'); |
|||
foreach($storeIds as $key =>$value){ |
|||
$storeId = $value; |
|||
$model = new GoodsModel(); |
|||
|
|||
$model->store_id = $storeId; |
|||
$model->market_id = $markets[$storeId]; |
|||
$model->category_id = $goods->category_id; |
|||
|
|||
$model->name = $goods->name; |
|||
$model->cover_img = $goods->cover_img; |
|||
$model->goods_unit = $goods->goods_unit; |
|||
|
|||
$model->tags = $goods->tags; |
|||
$model->spec = $goods->spec; |
|||
$model->details_imgs = $goods->details_imgs; |
|||
$model->content = $goods->content; |
|||
$model->details = $goods->details; |
|||
|
|||
$model->price = $goods->price; |
|||
$model->original_price = $goods->original_price; |
|||
$model->vip_price = $goods->vip_price; |
|||
|
|||
$model->start_num = $goods->start_num; |
|||
$model->restrict_num = $goods->restrict_num; |
|||
$model->is_infinite = $goods->is_infinite; |
|||
$model->inventory = $goods->inventory; |
|||
|
|||
$model->on_sale = $goods->on_sale; |
|||
$model->sort = $goods->sort; |
|||
$model->remark = $goods->remark; |
|||
|
|||
if($model->save() && !empty($goodsBanners)){ |
|||
$goodsId = $model->getKey(); |
|||
$banners = []; |
|||
foreach($goodsBanners as $kb => $vb){ |
|||
$banners[] = [ |
|||
'goods_id' => $goodsId, |
|||
'type' => $vb->type, |
|||
'path' => $vb->path, |
|||
'sort' => $vb->sort, |
|||
'created_at' => time(), |
|||
'updated_at' => time(), |
|||
]; |
|||
GoodsBannerModel::insert($banners); |
|||
} |
|||
}; |
|||
} |
|||
|
|||
return $this->success('修改成功', '/goods'); |
|||
} |
|||
|
|||
/** |
|||
* Build a form here. |
|||
*/ |
|||
public function form() |
|||
{ |
|||
$id = $this->getKey(); |
|||
$goods = GoodsModel::select('name')->find($id); |
|||
$this->hidden('goods_id')->value($id); |
|||
$this->display('name')->value($goods->name); |
|||
$stores = StoreModel::getStoreArray(); |
|||
$this->multipleSelect('store_ids','选择店铺')->required()->options($stores)->help('选择店铺,将当前商品复制到所选店铺。注意选择重复店铺问题!!!'); |
|||
} |
|||
|
|||
/** |
|||
* The data of the form. |
|||
* |
|||
* @return array |
|||
*/ |
|||
public function default() |
|||
{ |
|||
return []; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,60 @@ |
|||
<?php |
|||
|
|||
namespace App\Admin\Repositories\v3; |
|||
|
|||
use App\Models\v3\Coupon as Model; |
|||
use Dcat\Admin\Grid\Model as GridModel; |
|||
use Dcat\Admin\Repositories\EloquentRepository; |
|||
use App\Models\v3\CouponUse as CouponUseModel; |
|||
use Illuminate\Support\Facades\DB; |
|||
|
|||
class Coupon extends EloquentRepository |
|||
{ |
|||
/** |
|||
* Model. |
|||
* |
|||
* @var string |
|||
*/ |
|||
protected $eloquentClass = Model::class; |
|||
|
|||
/** |
|||
* 查询Grid表格数据. |
|||
* |
|||
* @param Grid\Model $model |
|||
* |
|||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator|Collection|array |
|||
*/ |
|||
public function get(GridModel $model) |
|||
{ |
|||
$this->setSort($model); |
|||
$this->setPaginate($model); |
|||
|
|||
$query = $this->newQuery(); |
|||
|
|||
if ($this->relations) { |
|||
$query->with($this->relations); |
|||
} |
|||
|
|||
$model->getQueries()->unique()->each(function ($value) use (&$query) { |
|||
if ($value['method'] == 'paginate') { |
|||
$value['arguments'][1] = $this->getGridColumns(); |
|||
} elseif ($value['method'] == 'get') { |
|||
$value['arguments'] = [$this->getGridColumns()]; |
|||
} |
|||
|
|||
$query = call_user_func_array([$query, $value['method']], $value['arguments'] ?? []); |
|||
}); |
|||
|
|||
// dd(CouponUseModel::where('system_coupon_id',16)->sum('number'));
|
|||
// $u = DB::table('ims_system_coupon_user_use')->where('system_coupon_id',16)->count('number');
|
|||
// dd($u);
|
|||
// $list = $query->toArray();
|
|||
// foreach($list as &$value){
|
|||
// // 查询使用数量
|
|||
// $value['use_total'] = CouponUseModel::where('system_coupon_id',16)->count('number');
|
|||
// dd( $value['use_total'] );
|
|||
// }
|
|||
|
|||
return $query; |
|||
} |
|||
} |
|||
@ -1,8 +1,8 @@ |
|||
<?php |
|||
|
|||
namespace App\Admin\Repositories; |
|||
namespace App\Admin\Repositories\v3; |
|||
|
|||
use App\Models\CouponSetting as Model; |
|||
use App\Models\v3\CouponSetting as Model; |
|||
use Dcat\Admin\Repositories\EloquentRepository; |
|||
|
|||
class CouponSetting extends EloquentRepository |
|||
@ -0,0 +1,16 @@ |
|||
<?php |
|||
|
|||
namespace App\Admin\Repositories\v3; |
|||
|
|||
use App\Models\v3\GoodsCategory as Model; |
|||
use Dcat\Admin\Repositories\EloquentRepository; |
|||
|
|||
class GoodsCategory extends EloquentRepository |
|||
{ |
|||
/** |
|||
* Model. |
|||
* |
|||
* @var string |
|||
*/ |
|||
protected $eloquentClass = Model::class; |
|||
} |
|||
@ -0,0 +1,71 @@ |
|||
<?php |
|||
|
|||
namespace App\Console\Commands; |
|||
|
|||
use Illuminate\Console\Command; |
|||
use Illuminate\Database\Schema\Blueprint; |
|||
use Illuminate\Support\Facades\DB; |
|||
use Illuminate\Support\Facades\Schema; |
|||
|
|||
class setStoreUsers extends Command |
|||
{ |
|||
/** |
|||
* The name and signature of the console command. |
|||
* |
|||
* @var string |
|||
*/ |
|||
protected $signature = 'migrateData:setStoreUsers'; |
|||
|
|||
/** |
|||
* The console command description. |
|||
* |
|||
* @var string |
|||
*/ |
|||
protected $description = 'Command 店铺的账号表整理'; |
|||
|
|||
/** |
|||
* Create a new command instance. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function __construct() |
|||
{ |
|||
parent::__construct(); |
|||
} |
|||
|
|||
/** |
|||
* Execute the console command. |
|||
* 店铺的登录账号,店长、店员 |
|||
* 将旧账号表的关联的店铺id和角色洗到新的店铺账号表 |
|||
* @return int |
|||
*/ |
|||
public function handle() |
|||
{ |
|||
// 如果表不存在则创建
|
|||
if(!Schema::hasTable('lanzu_store_users')){ |
|||
Schema::create('lanzu_store_users',function (Blueprint $table){ |
|||
$table->id(); |
|||
}); |
|||
} |
|||
$account = DB::table('ims_cjdc_account')->get(); |
|||
$bar = $this->output->createProgressBar(count($account)); |
|||
$bar->start(); |
|||
|
|||
foreach ($account as $ka => $va){ |
|||
$data = []; |
|||
$storeUsers = DB::table('lanzu_store_users')->find($va->uid); |
|||
if(!empty($storeUsers)){ |
|||
$data =[ |
|||
'user_category'=>$va->role, |
|||
'store_id'=>$va->storeid |
|||
]; |
|||
DB::table('lanzu_store_users')->where('id',$va->uid)->update($data); |
|||
} |
|||
$bar->advance(); |
|||
} |
|||
|
|||
$bar->finish(); |
|||
|
|||
return 0; |
|||
} |
|||
} |
|||
@ -1,16 +0,0 @@ |
|||
<?php |
|||
|
|||
namespace App\Models; |
|||
|
|||
use Dcat\Admin\Traits\HasDateTimeFormatter; |
|||
use Illuminate\Database\Eloquent\SoftDeletes; |
|||
use Illuminate\Database\Eloquent\Model; |
|||
|
|||
class CouponSetting extends Model |
|||
{ |
|||
use HasDateTimeFormatter; |
|||
// use SoftDeletes;
|
|||
|
|||
protected $table = 'ims_system_coupon_setting'; |
|||
|
|||
} |
|||
@ -0,0 +1,158 @@ |
|||
<?php |
|||
|
|||
namespace App\Models\v3; |
|||
|
|||
use Dcat\Admin\Traits\HasDateTimeFormatter; |
|||
use Illuminate\Database\Eloquent\SoftDeletes; |
|||
use Illuminate\Database\Eloquent\Model; |
|||
use App\Models\v3\CouponSetting as SettingModel; |
|||
use App\Models\v3\CouponReceiveType as ReceiveTypeModel; |
|||
|
|||
class Coupon extends Model |
|||
{ |
|||
use HasDateTimeFormatter; |
|||
use SoftDeletes; |
|||
|
|||
protected $dateFormat = 'U'; |
|||
|
|||
protected $table = 'lanzu_coupon'; |
|||
/* 查询记录数 limit */ |
|||
protected $perPage = 10; |
|||
|
|||
public static $_ACTIVITY_AVAILABLE = ['flash_sale'=>'秒杀','group_buy'=>'团购','new_product'=>'新品']; |
|||
public static $_CATEGORY = [1=>'订单']; |
|||
public static $_TYPE = [1=>'全平台',2=>'线上', 3=>'线下']; |
|||
public static $_ISNEWUSER = [1=>'是',2=>'否']; |
|||
public static $_DISCOUNTTYPE = [1=>'金额',2=>'打折(%)']; |
|||
public static $_ACTIVETYPE = [1=>'领取活动',2=>'转发活动',3=>'返券专用']; |
|||
public static $_STATUS = [ -1=> '已删除', 0=>'草稿', 1=>'正常',2=>'已领完',3=>'禁用']; |
|||
|
|||
/* 添加转换字段 */ |
|||
protected $appends = [ |
|||
'status_text', |
|||
'type_text', |
|||
'category_text', |
|||
'is_new_user_text', |
|||
'discount_type_text', |
|||
'active_type_text', |
|||
'start_time_text', |
|||
'end_time_text', |
|||
'usable_start_time_text', |
|||
'usable_end_time_text', |
|||
// 'receive_type_text',
|
|||
'created_at_text', |
|||
'updated_at_text', |
|||
'activity_available_text' |
|||
]; |
|||
protected $casts = [ |
|||
'market_ids'=>'array', |
|||
'category_ids'=>'array', |
|||
'tags'=>'array', |
|||
'activity_available'=>'array' |
|||
]; |
|||
|
|||
public function getStatusTextAttribute() |
|||
{ |
|||
$value = $this->status; |
|||
return isset(self::$_STATUS[$value])?self::$_STATUS[$value]:''; |
|||
} |
|||
public function getTypeTextAttribute() |
|||
{ |
|||
$value = $this->type; |
|||
return isset(self::$_TYPE[$value])?self::$_TYPE[$value]:''; |
|||
} |
|||
public function getCategoryTextAttribute() |
|||
{ |
|||
$value = $this->category; |
|||
return isset(self::$_CATEGORY[$value])?self::$_CATEGORY[$value]:''; |
|||
} |
|||
public function getIsNewUserTextAttribute() |
|||
{ |
|||
$value = $this->is_new_user; |
|||
return isset(self::$_ISNEWUSER[$value])?self::$_ISNEWUSER[$value]:''; |
|||
} |
|||
public function getDiscountTypeTextAttribute() |
|||
{ |
|||
$value = $this->discount_type; |
|||
return isset(self::$_DISCOUNTTYPE[$value])?self::$_DISCOUNTTYPE[$value]:''; |
|||
} |
|||
public function getActiveTypeTextAttribute() |
|||
{ |
|||
$value = $this->active_type; |
|||
return isset(self::$_ACTIVETYPE[$value])?self::$_ACTIVETYPE[$value]:''; |
|||
} |
|||
public function getActivityAvailableTextAttribute() |
|||
{ |
|||
$value = $this->activity_available; |
|||
// return isset(self::$_ACTIVITY_AVAILABLE[$value])?self::$_ACTIVITY_AVAILABLE[$value]:'';
|
|||
return ''; |
|||
} |
|||
public function getStartTimeTextAttribute() |
|||
{ |
|||
$value = $this->start_time; |
|||
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value; |
|||
} |
|||
|
|||
public function getEndTimeTextAttribute() |
|||
{ |
|||
$value = $this->usable_start_time; |
|||
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value; |
|||
} |
|||
public function getUsableStartTimeTextAttribute() |
|||
{ |
|||
$value = $this->start_time; |
|||
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value; |
|||
} |
|||
public function getUsableEndTimeTextAttribute() |
|||
{ |
|||
$value = $this->usable_end_time; |
|||
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value; |
|||
} |
|||
public function getCreatedAtTextAttribute() |
|||
{ |
|||
$value = $this->created_at; |
|||
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value; |
|||
} |
|||
public function getUpdatedAtTextAttribute() |
|||
{ |
|||
$value = $this->updated_at; |
|||
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value; |
|||
} |
|||
|
|||
public function getReceiveTypeTextAttribute() |
|||
{ |
|||
$id = $this->getKey(); |
|||
$receive = SettingModel::where('receive_type.system_coupon_user_id',$id) |
|||
->join('ims_system_coupon_user_receivetype as receive_type','receive_type.receive_type','ims_system_coupon_setting.id','inner') |
|||
->first('name'); |
|||
|
|||
return $receive ? $receive['name'] : ''; |
|||
} |
|||
|
|||
//关联领取方式表
|
|||
public function receiveType() |
|||
{ |
|||
return $this->hasOne(ReceiveTypeModel::class,'coupon_id','id'); |
|||
} |
|||
|
|||
// 设置
|
|||
protected function setStartTimeAttribute($value) |
|||
{ |
|||
$this->attributes['start_time'] = strtotime($value); |
|||
} |
|||
|
|||
protected function setEndTimeAttribute($value) |
|||
{ |
|||
$this->attributes['end_time'] = strtotime($value); |
|||
} |
|||
|
|||
protected function setUsableStarttimeAttribute($value) |
|||
{ |
|||
$this->attributes['usable_start_time'] = strtotime($value); |
|||
} |
|||
|
|||
protected function setUsableEndTimeAttribute($value) |
|||
{ |
|||
$this->attributes['usable_end_time'] = strtotime($value); |
|||
} |
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
<?php |
|||
|
|||
namespace App\Models\v3; |
|||
|
|||
use Dcat\Admin\Traits\HasDateTimeFormatter; |
|||
use App\Models\v3\CouponSetting as SettingModel; |
|||
use Illuminate\Database\Eloquent\Model; |
|||
|
|||
class CouponReceiveType extends Model |
|||
{ |
|||
use HasDateTimeFormatter; |
|||
protected $table = 'lanzu_coupon_receive_type'; |
|||
protected $dateFormat = 'U'; |
|||
|
|||
public function setting(){ |
|||
return $this->belongsTo(SettingModel::class,'receive_type','id','inner'); |
|||
} |
|||
|
|||
/** |
|||
* 根据where获取单条数据 |
|||
*/ |
|||
public static function getReceiveTypeOne($where,$field = '*') |
|||
{ |
|||
return self::select($field)->where($where)->first(); |
|||
} |
|||
/** |
|||
* 根据id获取单条数据 |
|||
*/ |
|||
public static function getReceiveTypeInfo($id,$field = '*') |
|||
{ |
|||
return self::select($field)->find($id); |
|||
} |
|||
} |
|||
@ -0,0 +1,60 @@ |
|||
<?php |
|||
|
|||
namespace App\Models\v3; |
|||
|
|||
use Dcat\Admin\Traits\HasDateTimeFormatter; |
|||
use Illuminate\Database\Eloquent\Model; |
|||
|
|||
class CouponSetting extends Model |
|||
{ |
|||
use HasDateTimeFormatter; |
|||
protected $table = 'lanzu_coupon_setting'; |
|||
protected $dateFormat = 'U'; |
|||
|
|||
public static $_CATEGORY = [1=>'领取方式']; |
|||
public static $_STATUS = ['禁用','正常']; |
|||
|
|||
protected $appends = [ |
|||
'category_text', |
|||
'status_text' |
|||
]; |
|||
|
|||
public function getCategoryTextAttribute($value) |
|||
{ |
|||
$value = $value ? $value : $this->category; |
|||
return isset(self::$_CATEGORY[$value]) ? self::$_CATEGORY[$value] : ''; |
|||
} |
|||
public function getStatusTextAttribute($value) |
|||
{ |
|||
$value = $value ? $value : $this->status; |
|||
return isset(self::$_STATUS[$value]) ? self::$_STATUS[$value] : ''; |
|||
} |
|||
|
|||
/** |
|||
* 获取数组 |
|||
*/ |
|||
public static function getSettingArray($where = [],$options = []) |
|||
{ |
|||
$model = self::where('status',1) |
|||
->whereNull('deleted_at'); |
|||
|
|||
if(!empty($where)){ |
|||
$model->where($where); |
|||
} |
|||
$list = $model->pluck('name','id')->toArray(); |
|||
if(!empty($options)){ |
|||
return array_merge($options,$list); |
|||
}else{ |
|||
return $list; |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 根据id获取单条数据 |
|||
*/ |
|||
public static function getSettingInfo($id,$field = '*') |
|||
{ |
|||
// return self::select($field)->find($id);
|
|||
return self::select($field)->where('id',$id)->first(); |
|||
} |
|||
} |
|||
@ -0,0 +1,14 @@ |
|||
<?php |
|||
|
|||
namespace App\Models\v3; |
|||
|
|||
use Dcat\Admin\Traits\HasDateTimeFormatter; |
|||
|
|||
use Illuminate\Database\Eloquent\Model; |
|||
|
|||
class CouponUse extends Model |
|||
{ |
|||
use HasDateTimeFormatter; |
|||
protected $table = 'lanzu_coupon_use'; |
|||
|
|||
} |
|||
@ -0,0 +1,51 @@ |
|||
<?php |
|||
|
|||
namespace App\Models\v3; |
|||
|
|||
use Dcat\Admin\Traits\HasDateTimeFormatter; |
|||
use Illuminate\Database\Eloquent\SoftDeletes; |
|||
use Illuminate\Database\Eloquent\Model; |
|||
|
|||
class GoodsCategory extends Model |
|||
{ |
|||
use HasDateTimeFormatter; |
|||
use SoftDeletes; |
|||
|
|||
protected $table = 'lanzu_goods_category'; |
|||
protected $dateFormat = 'U'; |
|||
/* 查询记录数 limit */ |
|||
protected $perPage = 10; |
|||
|
|||
/** |
|||
* 获取单个信息 |
|||
* @param int $id |
|||
* @param string $field |
|||
* @return string |
|||
*/ |
|||
public static function getInfo($id,$field = '*') |
|||
{ |
|||
return self::select($field)->find($id); |
|||
} |
|||
|
|||
/** |
|||
* 获取二级分类数组 |
|||
* id为键,title为值 |
|||
* @return array |
|||
*/ |
|||
public static function getArray($where = [],$options = []) |
|||
{ |
|||
$model = self::where('status',1) |
|||
->whereNull('deleted_at'); |
|||
|
|||
if(count($where) > 0){ |
|||
$model->where($where); |
|||
} |
|||
$list = $model->pluck('title','id')->toArray(); |
|||
if(!empty($options)){ |
|||
return array_merge($options,$list); |
|||
}else{ |
|||
return $list; |
|||
} |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,43 @@ |
|||
<?php |
|||
|
|||
namespace App\Models\v3; |
|||
|
|||
use Illuminate\Database\Eloquent\Model; |
|||
|
|||
class StoreUsers extends Model |
|||
{ |
|||
protected $table = 'lanzu_store_users'; |
|||
protected $dateFormat = 'U'; |
|||
|
|||
/** |
|||
* 获取单个用户信息 |
|||
* @param int $id |
|||
* @param string $field |
|||
* @return object |
|||
*/ |
|||
public static function getInfo($id,$field = '*') |
|||
{ |
|||
return self::select($field)->find($id); |
|||
} |
|||
|
|||
/** |
|||
* 获取用户数组 |
|||
* id为键,name为值 |
|||
* @return array |
|||
*/ |
|||
public static function getArray() |
|||
{ |
|||
$list = self::select('id','username') |
|||
->where('status',2) |
|||
->whereNull('deleted_at') |
|||
->get(); |
|||
$array = []; |
|||
if(count($list) > 0){ |
|||
foreach ($list as $value) { |
|||
$array[$value->id] = $value->username; |
|||
} |
|||
} |
|||
|
|||
return $array; |
|||
} |
|||
} |
|||
@ -0,0 +1,12 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
'status_label'=>[ |
|||
'default' => 'primary', |
|||
0 => 'info', |
|||
1 => 'success', |
|||
2 => 'warning', |
|||
3 => 'danger', |
|||
-1=> 'danger' |
|||
] |
|||
]; |
|||
@ -0,0 +1,36 @@ |
|||
<?php |
|||
|
|||
use Illuminate\Support\Facades\Schema; |
|||
use Illuminate\Database\Schema\Blueprint; |
|||
use Illuminate\Database\Migrations\Migration; |
|||
|
|||
class CreateLanzuGoodsCategoryTable extends Migration |
|||
{ |
|||
/** |
|||
* Run the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function up() |
|||
{ |
|||
Schema::create('lanzu_goods_category', function (Blueprint $table) { |
|||
$table->increments('id'); |
|||
$table->integer('category_id')->default('0')->nullable()->comment('分类'); |
|||
$table->string('title')->default('')->comment('分类名称'); |
|||
$table->string('cover_img')->nullable()->comment('封面图'); |
|||
$table->integer('sort')->default('0')->nullable()->comment('排序'); |
|||
$table->timestamps(); |
|||
$table->softDeletes(); |
|||
}); |
|||
} |
|||
|
|||
/** |
|||
* Reverse the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function down() |
|||
{ |
|||
Schema::dropIfExists('lanzu_goods_category'); |
|||
} |
|||
} |
|||
@ -0,0 +1,2 @@ |
|||
!function(e){var t={};function n(i){if(t[i])return t[i].exports;var l=t[i]={i:i,l:!1,exports:{}};return e[i].call(l.exports,l,l.exports,n),l.l=!0,l.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)n.d(i,l,function(t){return e[t]}.bind(null,l));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=12)}({12:function(e,t,n){e.exports=n(13)},13:function(e,t){!function(e){function t(e){e=$.extend({dialog:null,container:null,input:null,button:".submit-btn",cancel:".cancel-btn",table:".async-table",multiple:!1,max:0,values:[],lang:{exceed_max_item:Dcat.lang.exceed_max_item||"已超出最大可选择的数量"}},e);this.options=e,this.$input=$(e.input),this.init()}t.prototype={init:function(){var e=this,t=e.options,n=t.values;for(var i in e.labels={},n)e.labels[n[i].id]=n[i].label;e.resetSelected(),$(document).on("dialog:shown",t.dialog,(function(){e.$dialog=$(t.dialog),e.$button=e.$dialog.find(t.button),e.$cancel=e.$dialog.find(t.cancel),e.$button.on("click",(function(){var t=e.getSelectedRows();e.setKeys(t[1]),e.render(t[0]),e.$dialog.trigger("dialog:close")})),e.$cancel.on("click",(function(){e.$dialog.trigger("dialog:close")})),e.bind()})),e.render(n)},bind:function(){var e=this,t=e.options;e.$dialog.find(t.table).on("table:loaded",(function(){var n=e.getCheckbox();t.multiple||$(this).find(".checkbox-grid-header").remove(),e.resetSelected(),n.on("change",(function(){var i=$(this).data("id"),l=$(this).data("label");if(this.checked){if(t.multiple||(e.selected={}),e.selected[i]={id:i,label:l},t.max&&e.getSelectedRows()[0].length>t.max)return $(this).prop("checked",!1),delete e.selected[i],Dcat.warning(e.options.lang.exceed_max_item)}else delete e.selected[i];t.multiple||this.checked&&n.each((function(){$(this).data("id")!=i&&($(this).prop("checked",!1),$(this).parents("tr").css("background-color",""))}))})),n.each((function(){var t=$(this),n=t.data("id");for(var i in e.labels[n]=t.data("label"),e.selected)n!=i||t.prop("checked",!0).trigger("change");t.trigger("change")}))}))},resetSelected:function(){var e=this.getKeys();for(var t in this.selected=[],e)this.selected[e[t]]={id:e[t],label:this.labels[e[t]]}},getCheckbox:function(){return this.$dialog.find('.checkbox-grid-column input[type="checkbox"]')},getSelectedRows:function(){var e=[],t=[];for(var n in this.selected)this.selected[n]&&(t.push(n),e.push(this.selected[n]));return[e,t]},render:function(e){var t=this.options,n=$(t.container),i=n.find(".default-text"),l=n.find(".option");return e&&e.length?(i.addClass("d-none"),l.removeClass("d-none"),t.multiple?function(e,t,n){var i=[],l=$(n.container),o=l.find(".default-text"),a=l.find(".option");l.hasClass("select2")||l.addClass("select2 select2-container select2-container--default select2-container--below");for(var c in l.removeClass("form-control"),e)i.push('<li class="select2-selection__choice" >\n '.concat(e[c].label,' <span data-id="').concat(e[c].id,'" class="select2-selection__choice__remove remove " role="presentation"> ×</span>\n</li>'));i.unshift('<span class="select2-selection__clear remove-all">×</span>'),i='<span class="select2-selection select2-selection--multiple">\n <ul class="select2-selection__rendered">'.concat(i.join(""),"</ul>\n </span>");var s=$(i);function r(){a.html(""),o.removeClass("d-none"),a.addClass("d-none"),l.addClass("form-control"),t.setKeys([])}a.html(s),s.find(".remove").on("click",(function(){var e=$(this);t.deleteKey(e.data("id")),e.parent().remove(),t.getKeys().length||r()})),s.find(".remove-all").on("click",r)}(e,this,t):function(e,t,n){var i=$(n.container),l=i.find(".default-text"),o=i.find(".option"),a=$("<div class='pull-right ' style='font-weight:bold;cursor:pointer'>×</div>");o.text(e[0].label),o.append(a),a.on("click",(function(){t.setKeys([]),l.removeClass("d-none"),o.addClass("d-none")}))}(e,this,t)):(i.removeClass("d-none"),l.addClass("d-none"),void(t.multiple&&n.addClass("form-control")))},setKeys:function(e){this.$input.val(e.length?e.join(","):"")},deleteKey:function(e){var t=this.getKeys(),n=[];for(var i in t)t[i]!=e&&n.push(t[i]);this.setKeys(n)},getKeys:function(){var e=this.$input.val();return e?String(e).split(","):[]}},Dcat.grid.SelectTable=function(e){return new t(e)}}(window)}}); |
|||
//# sourceMappingURL=select-table.js.map
|
|||
1
public/vendors/dcat-admin/dcat/extra/select-table.js.map
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,399 @@ |
|||
/*! |
|||
* Bootstrap Colorpicker - Bootstrap Colorpicker is a modular color picker plugin for Bootstrap 4. |
|||
* @package bootstrap-colorpicker |
|||
* @version v3.2.0 |
|||
* @license MIT |
|||
* @link https://itsjavi.com/bootstrap-colorpicker/ |
|||
* @link https://github.com/itsjavi/bootstrap-colorpicker.git |
|||
*/ |
|||
.colorpicker { |
|||
position: relative; |
|||
display: none; |
|||
font-size: inherit; |
|||
color: inherit; |
|||
text-align: left; |
|||
list-style: none; |
|||
background-color: #ffffff; |
|||
background-clip: padding-box; |
|||
border: 1px solid rgba(0, 0, 0, 0.2); |
|||
padding: .75rem .75rem; |
|||
width: 148px; |
|||
border-radius: 4px; |
|||
-webkit-box-sizing: content-box; |
|||
box-sizing: content-box; } |
|||
|
|||
.colorpicker.colorpicker-disabled, |
|||
.colorpicker.colorpicker-disabled * { |
|||
cursor: default !important; } |
|||
|
|||
.colorpicker div { |
|||
position: relative; } |
|||
|
|||
.colorpicker-popup { |
|||
position: absolute; |
|||
top: 100%; |
|||
left: 0; |
|||
float: left; |
|||
margin-top: 1px; |
|||
z-index: 1060; } |
|||
|
|||
.colorpicker-popup.colorpicker-bs-popover-content { |
|||
position: relative; |
|||
top: auto; |
|||
left: auto; |
|||
float: none; |
|||
margin: 0; |
|||
z-index: initial; |
|||
border: none; |
|||
padding: 0.25rem 0; |
|||
border-radius: 0; |
|||
background: none; |
|||
-webkit-box-shadow: none; |
|||
box-shadow: none; } |
|||
|
|||
.colorpicker:before, |
|||
.colorpicker:after { |
|||
content: ""; |
|||
display: table; |
|||
clear: both; |
|||
line-height: 0; } |
|||
|
|||
.colorpicker-clear { |
|||
clear: both; |
|||
display: block; } |
|||
|
|||
.colorpicker:before { |
|||
content: ''; |
|||
display: inline-block; |
|||
border-left: 7px solid transparent; |
|||
border-right: 7px solid transparent; |
|||
border-bottom: 7px solid #ccc; |
|||
border-bottom-color: rgba(0, 0, 0, 0.2); |
|||
position: absolute; |
|||
top: -7px; |
|||
left: auto; |
|||
right: 6px; } |
|||
|
|||
.colorpicker:after { |
|||
content: ''; |
|||
display: inline-block; |
|||
border-left: 6px solid transparent; |
|||
border-right: 6px solid transparent; |
|||
border-bottom: 6px solid #ffffff; |
|||
position: absolute; |
|||
top: -6px; |
|||
left: auto; |
|||
right: 7px; } |
|||
|
|||
.colorpicker.colorpicker-with-alpha { |
|||
width: 170px; } |
|||
|
|||
.colorpicker.colorpicker-with-alpha .colorpicker-alpha { |
|||
display: block; } |
|||
|
|||
.colorpicker-saturation { |
|||
position: relative; |
|||
width: 126px; |
|||
height: 126px; |
|||
/* FF3.6+ */ |
|||
/* Chrome,Safari4+ */ |
|||
/* Chrome10+,Safari5.1+ */ |
|||
/* Opera 11.10+ */ |
|||
/* IE10+ */ |
|||
background: -webkit-gradient(linear, left top, left bottom, from(transparent), to(black)), -webkit-gradient(linear, left top, right top, from(white), to(rgba(255, 255, 255, 0))); |
|||
background: linear-gradient(to bottom, transparent 0%, black 100%), linear-gradient(to right, white 0%, rgba(255, 255, 255, 0) 100%); |
|||
/* W3C */ |
|||
cursor: crosshair; |
|||
float: left; |
|||
-webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); |
|||
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); |
|||
margin-bottom: 6px; } |
|||
.colorpicker-saturation .colorpicker-guide { |
|||
display: block; |
|||
height: 6px; |
|||
width: 6px; |
|||
border-radius: 6px; |
|||
border: 1px solid #000; |
|||
-webkit-box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8); |
|||
box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8); |
|||
position: absolute; |
|||
top: 0; |
|||
left: 0; |
|||
margin: -3px 0 0 -3px; } |
|||
|
|||
.colorpicker-hue, |
|||
.colorpicker-alpha { |
|||
position: relative; |
|||
width: 16px; |
|||
height: 126px; |
|||
float: left; |
|||
cursor: row-resize; |
|||
margin-left: 6px; |
|||
margin-bottom: 6px; } |
|||
|
|||
.colorpicker-alpha-color { |
|||
position: absolute; |
|||
top: 0; |
|||
left: 0; |
|||
width: 100%; |
|||
height: 100%; } |
|||
|
|||
.colorpicker-hue, |
|||
.colorpicker-alpha-color { |
|||
-webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); |
|||
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); } |
|||
|
|||
.colorpicker-hue .colorpicker-guide, |
|||
.colorpicker-alpha .colorpicker-guide { |
|||
display: block; |
|||
height: 4px; |
|||
background: rgba(255, 255, 255, 0.8); |
|||
border: 1px solid rgba(0, 0, 0, 0.4); |
|||
position: absolute; |
|||
top: 0; |
|||
left: 0; |
|||
margin-left: -2px; |
|||
margin-top: -2px; |
|||
right: -2px; |
|||
z-index: 1; } |
|||
|
|||
.colorpicker-hue { |
|||
/* FF3.6+ */ |
|||
/* Chrome,Safari4+ */ |
|||
/* Chrome10+,Safari5.1+ */ |
|||
/* Opera 11.10+ */ |
|||
/* IE10+ */ |
|||
background: -webkit-gradient(linear, left bottom, left top, from(red), color-stop(8%, #ff8000), color-stop(17%, yellow), color-stop(25%, #80ff00), color-stop(33%, lime), color-stop(42%, #00ff80), color-stop(50%, cyan), color-stop(58%, #0080ff), color-stop(67%, blue), color-stop(75%, #8000ff), color-stop(83%, magenta), color-stop(92%, #ff0080), to(red)); |
|||
background: linear-gradient(to top, red 0%, #ff8000 8%, yellow 17%, #80ff00 25%, lime 33%, #00ff80 42%, cyan 50%, #0080ff 58%, blue 67%, #8000ff 75%, magenta 83%, #ff0080 92%, red 100%); |
|||
/* W3C */ } |
|||
|
|||
.colorpicker-alpha { |
|||
background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white; |
|||
background-size: 10px 10px; |
|||
background-position: 0 0, 5px 5px; |
|||
display: none; } |
|||
|
|||
.colorpicker-bar { |
|||
min-height: 16px; |
|||
margin: 6px 0 0 0; |
|||
clear: both; |
|||
text-align: center; |
|||
font-size: 10px; |
|||
line-height: normal; |
|||
max-width: 100%; |
|||
-webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); |
|||
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); } |
|||
.colorpicker-bar:before { |
|||
content: ""; |
|||
display: table; |
|||
clear: both; } |
|||
|
|||
.colorpicker-bar.colorpicker-bar-horizontal { |
|||
height: 126px; |
|||
width: 16px; |
|||
margin: 0 0 6px 0; |
|||
float: left; } |
|||
|
|||
.colorpicker-input-addon { |
|||
position: relative; } |
|||
|
|||
.colorpicker-input-addon i { |
|||
display: inline-block; |
|||
cursor: pointer; |
|||
vertical-align: text-top; |
|||
height: 16px; |
|||
width: 16px; |
|||
position: relative; } |
|||
|
|||
.colorpicker-input-addon:before { |
|||
content: ""; |
|||
position: absolute; |
|||
width: 16px; |
|||
height: 16px; |
|||
display: inline-block; |
|||
vertical-align: text-top; |
|||
background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white; |
|||
background-size: 10px 10px; |
|||
background-position: 0 0, 5px 5px; } |
|||
|
|||
.colorpicker.colorpicker-inline { |
|||
position: relative; |
|||
display: inline-block; |
|||
float: none; |
|||
z-index: auto; |
|||
vertical-align: text-bottom; } |
|||
|
|||
.colorpicker.colorpicker-horizontal { |
|||
width: 126px; |
|||
height: auto; } |
|||
|
|||
.colorpicker.colorpicker-horizontal .colorpicker-bar { |
|||
width: 126px; } |
|||
|
|||
.colorpicker.colorpicker-horizontal .colorpicker-saturation { |
|||
float: none; |
|||
margin-bottom: 0; } |
|||
|
|||
.colorpicker.colorpicker-horizontal .colorpicker-hue, |
|||
.colorpicker.colorpicker-horizontal .colorpicker-alpha { |
|||
float: none; |
|||
width: 126px; |
|||
height: 16px; |
|||
cursor: col-resize; |
|||
margin-left: 0; |
|||
margin-top: 6px; |
|||
margin-bottom: 0; } |
|||
|
|||
.colorpicker.colorpicker-horizontal .colorpicker-hue .colorpicker-guide, |
|||
.colorpicker.colorpicker-horizontal .colorpicker-alpha .colorpicker-guide { |
|||
position: absolute; |
|||
display: block; |
|||
bottom: -2px; |
|||
left: 0; |
|||
right: auto; |
|||
height: auto; |
|||
width: 4px; } |
|||
|
|||
.colorpicker.colorpicker-horizontal .colorpicker-hue { |
|||
/* FF3.6+ */ |
|||
/* Chrome,Safari4+ */ |
|||
/* Chrome10+,Safari5.1+ */ |
|||
/* Opera 11.10+ */ |
|||
/* IE10+ */ |
|||
background: -webkit-gradient(linear, right top, left top, from(red), color-stop(8%, #ff8000), color-stop(17%, yellow), color-stop(25%, #80ff00), color-stop(33%, lime), color-stop(42%, #00ff80), color-stop(50%, cyan), color-stop(58%, #0080ff), color-stop(67%, blue), color-stop(75%, #8000ff), color-stop(83%, magenta), color-stop(92%, #ff0080), to(red)); |
|||
background: linear-gradient(to left, red 0%, #ff8000 8%, yellow 17%, #80ff00 25%, lime 33%, #00ff80 42%, cyan 50%, #0080ff 58%, blue 67%, #8000ff 75%, magenta 83%, #ff0080 92%, red 100%); |
|||
/* W3C */ } |
|||
|
|||
.colorpicker.colorpicker-horizontal .colorpicker-alpha { |
|||
background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white; |
|||
background-size: 10px 10px; |
|||
background-position: 0 0, 5px 5px; } |
|||
|
|||
.colorpicker-inline:before, |
|||
.colorpicker-no-arrow:before, |
|||
.colorpicker-popup.colorpicker-bs-popover-content:before { |
|||
content: none; |
|||
display: none; } |
|||
|
|||
.colorpicker-inline:after, |
|||
.colorpicker-no-arrow:after, |
|||
.colorpicker-popup.colorpicker-bs-popover-content:after { |
|||
content: none; |
|||
display: none; } |
|||
|
|||
.colorpicker-alpha, |
|||
.colorpicker-saturation, |
|||
.colorpicker-hue { |
|||
-webkit-user-select: none; |
|||
-moz-user-select: none; |
|||
-ms-user-select: none; |
|||
user-select: none; } |
|||
|
|||
.colorpicker.colorpicker-visible, |
|||
.colorpicker-alpha.colorpicker-visible, |
|||
.colorpicker-saturation.colorpicker-visible, |
|||
.colorpicker-hue.colorpicker-visible, |
|||
.colorpicker-bar.colorpicker-visible { |
|||
display: block; } |
|||
|
|||
.colorpicker.colorpicker-hidden, |
|||
.colorpicker-alpha.colorpicker-hidden, |
|||
.colorpicker-saturation.colorpicker-hidden, |
|||
.colorpicker-hue.colorpicker-hidden, |
|||
.colorpicker-bar.colorpicker-hidden { |
|||
display: none; } |
|||
|
|||
.colorpicker-inline.colorpicker-visible { |
|||
display: inline-block; } |
|||
|
|||
.colorpicker.colorpicker-disabled:after { |
|||
border: none; |
|||
content: ''; |
|||
display: block; |
|||
width: 100%; |
|||
height: 100%; |
|||
background: rgba(233, 236, 239, 0.33); |
|||
top: 0; |
|||
left: 0; |
|||
right: auto; |
|||
z-index: 2; |
|||
position: absolute; } |
|||
|
|||
.colorpicker.colorpicker-disabled .colorpicker-guide { |
|||
display: none; } |
|||
|
|||
/** EXTENSIONS **/ |
|||
.colorpicker-preview { |
|||
background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white; |
|||
background-size: 10px 10px; |
|||
background-position: 0 0, 5px 5px; } |
|||
|
|||
.colorpicker-preview > div { |
|||
position: absolute; |
|||
left: 0; |
|||
top: 0; |
|||
width: 100%; |
|||
height: 100%; } |
|||
|
|||
.colorpicker-bar.colorpicker-swatches { |
|||
-webkit-box-shadow: none; |
|||
box-shadow: none; |
|||
height: auto; } |
|||
|
|||
.colorpicker-swatches--inner { |
|||
clear: both; |
|||
margin-top: -6px; } |
|||
|
|||
.colorpicker-swatch { |
|||
position: relative; |
|||
cursor: pointer; |
|||
float: left; |
|||
height: 16px; |
|||
width: 16px; |
|||
margin-right: 6px; |
|||
margin-top: 6px; |
|||
margin-left: 0; |
|||
display: block; |
|||
-webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); |
|||
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); |
|||
background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white; |
|||
background-size: 10px 10px; |
|||
background-position: 0 0, 5px 5px; } |
|||
|
|||
.colorpicker-swatch--inner { |
|||
position: absolute; |
|||
top: 0; |
|||
left: 0; |
|||
width: 100%; |
|||
height: 100%; } |
|||
|
|||
.colorpicker-swatch:nth-of-type(7n+0) { |
|||
margin-right: 0; } |
|||
|
|||
.colorpicker-with-alpha .colorpicker-swatch:nth-of-type(7n+0) { |
|||
margin-right: 6px; } |
|||
|
|||
.colorpicker-with-alpha .colorpicker-swatch:nth-of-type(8n+0) { |
|||
margin-right: 0; } |
|||
|
|||
.colorpicker-horizontal .colorpicker-swatch:nth-of-type(6n+0) { |
|||
margin-right: 0; } |
|||
|
|||
.colorpicker-horizontal .colorpicker-swatch:nth-of-type(7n+0) { |
|||
margin-right: 6px; } |
|||
|
|||
.colorpicker-horizontal .colorpicker-swatch:nth-of-type(8n+0) { |
|||
margin-right: 6px; } |
|||
|
|||
.colorpicker-swatch:last-of-type:after { |
|||
content: ""; |
|||
display: table; |
|||
clear: both; } |
|||
|
|||
*[dir='rtl'] .colorpicker-element input, |
|||
.colorpicker-element[dir='rtl'] input, |
|||
.colorpicker-element input[dir='rtl'] { |
|||
direction: ltr; |
|||
text-align: right; } |
|||
|
|||
/*# sourceMappingURL=bootstrap-colorpicker.css.map */ |
|||
1
public/vendors/dcat-admin/dcat/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.css.map
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
10
public/vendors/dcat-admin/dcat/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
1
public/vendors/dcat-admin/dcat/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
6252
public/vendors/dcat-admin/dcat/plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.js
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
1
public/vendors/dcat-admin/dcat/plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.js.map
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
10
public/vendors/dcat-admin/dcat/plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
1
public/vendors/dcat-admin/dcat/plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js.map
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
|
After Width: 1681 | Height: 945 | Size: 111 KiB |
|
After Width: 300 | Height: 70 | Size: 12 KiB |
@ -0,0 +1,47 @@ |
|||
<?php |
|||
return [ |
|||
'labels' => [ |
|||
'Coupon' => '优惠券管理', |
|||
'coupon' => '优惠券管理', |
|||
], |
|||
'fields' => [ |
|||
'title' => '标题', |
|||
'introduce' => '介绍', |
|||
'start_time' => '活动开始时间', |
|||
'end_time' => '活动结束时间', |
|||
'start_time_text' => '活动开始时间', |
|||
'end_time_text' => '活动结束时间', |
|||
'full_amount' => '满金额', |
|||
'discounts' => '优惠金额', |
|||
'is_new_user' => '要求新用户', |
|||
'is_new_user_text' => '要求新用户', |
|||
'inventory' => '发放数量', |
|||
'inventory_use' => '已领取数量', |
|||
'type' => '类型', |
|||
'type_text' => '类型', |
|||
'market_ids' => '市场', |
|||
'category_ids' => '店铺类型', |
|||
'category' => '分类', |
|||
'category_text' => '分类', |
|||
'active_type' => '活动类型', |
|||
'active_type_text' => '活动类型', |
|||
'status' => '状态', |
|||
'status_text' => '状态', |
|||
'remark' => '备注', |
|||
'weigh' => '排序', |
|||
'usable_number' => '用户一次可使用数量', |
|||
'usable_start_time' => '可用开始时间', |
|||
'usable_end_time' => '可用结束时间', |
|||
'discount_type' => '优惠类型', |
|||
'usable_start_time_text' => '可用开始时间', |
|||
'usable_end_time_text' => '可用结束时间', |
|||
'discount_type_text' => '优惠类型', |
|||
'receive_type' => '领取方式', |
|||
'receive_type_text' => '领取方式', |
|||
'created_at_text' => '创建时间', |
|||
'updated_at_text' => '更新时间', |
|||
'use_number' => '已使用数量' |
|||
], |
|||
'options' => [ |
|||
], |
|||
]; |
|||
@ -0,0 +1,16 @@ |
|||
<?php |
|||
return [ |
|||
'labels' => [ |
|||
'GoodsCategory' => '商品类目', |
|||
'goodsCategory' => '商品类目', |
|||
'goods_category' => '商品类目', |
|||
], |
|||
'fields' => [ |
|||
'category_id' => '分类', |
|||
'title' => '名称', |
|||
'cover_img' => '封面图', |
|||
'sort' => '排序', |
|||
], |
|||
'options' => [ |
|||
], |
|||
]; |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue