6
0
Fork 0

修改商品价格处理,添加货运单管理

release
vine_liutk 2021-12-15 10:13:49 +08:00
parent 719e74876c
commit 05b202303c
18 changed files with 446 additions and 63 deletions

View File

@ -0,0 +1,94 @@
<?php
namespace App\Admin\Controllers;
use App\Admin\Repositories\OrderPackage;
use App\Models\Order;
use Dcat\Admin\Form;
use Dcat\Admin\Grid;
use Dcat\Admin\Http\Controllers\AdminController;
use Dcat\Admin\Show;
class OrderPackageController extends AdminController
{
/**
* Make a grid builder.
*
* @return Grid
*/
protected function grid()
{
$builder = OrderPackage::with('order');
return Grid::make($builder, function (Grid $grid) {
$grid->column('id')->sortable();
$grid->column('order.sn');
$grid->column('order.consignee_name');
$grid->column('order.consignee_telephone');
$grid->column('order.consignee_zone');
$grid->column('order.consignee_address');
$grid->column('packageProduct');
$grid->column('shipping_company');
$grid->column('shipping_number');
$grid->column('remarks');
$grid->column('created_at')->sortable();
// $grid->column('updated_at');
$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 OrderPackage(), function (Show $show) {
$show->field('id');
$show->field('order_id');
$show->field('consignee_name');
$show->field('consignee_telephone');
$show->field('consignee_zone');
$show->field('consignee_address');
$show->field('shipping_company');
$show->field('shipping_number');
$show->field('remarks');
$show->field('created_at');
$show->field('updated_at');
});
}
/**
* Make a form builder.
*
* @return Form
*/
protected function form()
{
return Form::make(new OrderPackage(), function (Form $form) {
$form->display('id');
$form->select('order_id')->options(function ($id) {
$order = Order::find($id);
if ($order) {
return [$order->id => $order->sn];
}
})->ajax(admin_route('api.orders'))->load('order_product_id', admin_route('api.order_products'));
$form->hasMany('pageProducts', function ($form) {
$form->select('order_product_id');
$form->number('quantity')->min(0)->default(1);
});
$form->text('shipping_company');
$form->text('shipping_number');
$form->text('remarks');
$form->display('created_at');
$form->display('updated_at');
});
}
}

View File

@ -94,20 +94,43 @@ class ProductSkuController extends AdminController
$form->number('weight')->min(0)->default(0);
$form->number('stock')->min(0)->default(0);
$form->divider();
$form->currency('sell_price')->symbol('¥')->default(0);
$form->currency('market_price')->symbol('¥')->default(0);
$form->currency('cost_price')->symbol('¥')->default(0);
$form->currency('vip_price')->symbol('¥');
$form->currency('sell_price')->symbol('¥')->default(0)->customFormat(function ($sellPrice) {
return bcdiv($sellPrice, 100, 2);
})->saving(function ($sellPrice) {
return bcmul($sellPrice, 100);
});
$form->currency('market_price')->symbol('¥')->default(0)->customFormat(function ($marketPrice) {
return bcdiv($marketPrice, 100, 2);
})->saving(function ($marketPrice) {
return bcmul($marketPrice, 100);
});
$form->currency('cost_price')->symbol('¥')->default(0)->customFormat(function ($costPrice) {
return bcdiv($costPrice, 100, 2);
})->saving(function ($costPrice) {
return bcmul($costPrice, 100);
});
$form->currency('vip_price')->symbol('¥')->customFormat(function ($vipPrice) {
if (is_null($vipPrice)) {
return null;
}
return bcdiv($vipPrice, 100, 2);
})->saving(function ($vipPrice) {
if (is_null($vipPrice)) {
return null;
}
return bcmul($vipPrice, 100);
});
$form->divider();
$form->select('attr_group')->options(ProductGroup::all()->pluck('name', 'id'));
$form->selectAttr('attrs')->listen('attr_group');
$form->hidden('verify_state');
$form->saving(function (Form $form) {
if (!(is_null($form->model()->release_at) || $form->model()->verify_state == 1)) {
return $form->response()->error('当前sku商品无法修改');
}
$form->verify_state = 0;
});
$form->ignore(['attr_group']);
$form->display('created_at');
$form->display('updated_at');

View File

@ -33,10 +33,21 @@ class ProductSpuController extends AdminController
$grid->column('name');
$grid->column('subtitle');
// $grid->column('cover')->image(80, 80);
$grid->column('sell_price')->prepend('¥');
$grid->column('market_price')->prepend('¥');
$grid->column('cost_price')->prepend('¥');
$grid->column('vip_price')->prepend('¥');
$grid->column('sell_price')->display(function ($value) {
return bcdiv($value, 100, 2);
})->prepend('¥');
$grid->column('market_price')->display(function ($value) {
return bcdiv($value, 100, 2);
})->prepend('¥');
$grid->column('cost_price')->display(function ($value) {
return bcdiv($value, 100, 2);
})->prepend('¥');
$grid->column('vip_price')->display(function ($value) {
if (is_null($value)) {
return '未设置';
}
return '¥'.bcdiv($value, 100, 2);
});
$grid->column('weight');
$grid->column('created_at')->sortable();
@ -146,10 +157,32 @@ class ProductSpuController extends AdminController
$form->select('shipping_template_id')->options(ShippingTemplate::all()->pluck('name', 'id'))->required();
$form->number('stock')->min(0)->default(0);
$form->divider();
$form->currency('sell_price')->symbol('¥')->default(0);
$form->currency('market_price')->symbol('¥')->default(0);
$form->currency('cost_price')->symbol('¥')->default(0);
$form->currency('vip_price')->symbol('¥');
$form->currency('sell_price')->symbol('¥')->default(0)->customFormat(function ($sellPrice) {
return bcdiv($sellPrice, 100, 2);
})->saving(function ($sellPrice) {
return bcmul($sellPrice, 100);
});
$form->currency('market_price')->symbol('¥')->default(0)->customFormat(function ($marketPrice) {
return bcdiv($marketPrice, 100, 2);
})->saving(function ($marketPrice) {
return bcmul($marketPrice, 100);
});
$form->currency('cost_price')->symbol('¥')->default(0)->customFormat(function ($costPrice) {
return bcdiv($costPrice, 100, 2);
})->saving(function ($costPrice) {
return bcmul($costPrice, 100);
});
$form->currency('vip_price')->symbol('¥')->customFormat(function ($vipPrice) {
if (is_null($vipPrice)) {
return null;
}
return bcdiv($vipPrice, 100, 2);
})->saving(function ($vipPrice) {
if (is_null($vipPrice)) {
return null;
}
return bcmul($vipPrice, 100);
});
$form->divider();
$form->select('attr_group')->options(ProductGroup::all()->pluck('name', 'id'));
$form->selectAttr('attrs')->listen('attr_group');

View File

@ -49,10 +49,21 @@ class ProductSkuTable extends Grid
$grid->column('subtitle');
$grid->column('category.name');
$grid->column('specs')->label();
$grid->column('sell_price')->prepend('¥');
$grid->column('market_price')->prepend('¥');
$grid->column('cost_price')->prepend('¥');
$grid->column('vip_price')->prepend('¥');
$grid->column('sell_price')->display(function ($value) {
return bcdiv($value, 100, 2);
})->prepend('¥');
$grid->column('market_price')->display(function ($value) {
return bcdiv($value, 100, 2);
})->prepend('¥');
$grid->column('cost_price')->display(function ($value) {
return bcdiv($value, 100, 2);
})->prepend('¥');
$grid->column('vip_price')->display(function ($value) {
if (is_null($value)) {
return '未设置';
}
return '¥'.bcdiv($value, 100, 2);
});
$grid->column('weight');
$grid->column('stock');
$grid->column('sales');

View File

@ -0,0 +1,16 @@
<?php
namespace App\Admin\Repositories;
use App\Models\OrderPackage as Model;
use Dcat\Admin\Repositories\EloquentRepository;
class OrderPackage extends EloquentRepository
{
/**
* Model.
*
* @var string
*/
protected $eloquentClass = Model::class;
}

View File

@ -91,6 +91,8 @@ Route::group([
'index', 'create', 'store', 'edit', 'update', 'destroy',
]);
$router->resource('order-packages', 'OrderPackageController')->names('order_packages');
/** api接口 **/
$router->get('api/product-categories', 'ProductCategoryController@categories')->name('api.product_categories');
$router->get('api/product-group-details', 'ProductGroupController@details')->name('api.product_group_details');

View File

@ -27,7 +27,7 @@ class Article extends Model
public function hasRead(User $user)
{
return ArticleLikesLog::where('user_id', $user->id)->where('article_id', $this->id)->whereDate('created_at', now())->exists();
return ArticlePointsLog::where('user_id', $user->id)->where('article_id', $this->id)->whereDate('created_at', now())->exists();
}
public function category()

View File

@ -0,0 +1,31 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class OrderPackage extends Model
{
use HasFactory;
/**
* 订单
*
* @return void
*/
public function order()
{
return $this->belongsTo(Order::class, 'order_id');
}
/**
* 货运单商品
*
* @return void
*/
public function packageProducts()
{
return $this->hasMany(OrderPackageProduct::class, 'order_package_id');
}
}

View File

@ -0,0 +1,21 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class OrderPackageProduct extends Model
{
use HasFactory;
/**
* 订单商品
*
* @return void
*/
public function orderProduct()
{
$this->belongsTo(OrderProduct::class, 'order_product_id');
}
}

View File

@ -45,4 +45,9 @@ class OrderProduct extends Model
{
return Numeric::trimZero(bcdiv($this->attributes['total_amount'], 100, 2));
}
public function packageProducts()
{
return $this->hasMany(OrderPackageProduct::class, 'order_product_id');
}
}

View File

@ -31,10 +31,10 @@ class ProductSku extends Model
*/
protected $casts = [
'images' => JsonArray::class,
'sell_price' => Price::class,
'market_price' => Price::class,
'cost_price' => Price::class,
'vip_price' => Price::class,
// 'sell_price' => Price::class,
// 'market_price' => Price::class,
// 'cost_price' => Price::class,
// 'vip_price' => Price::class,
'attrs' => JsonArray::class,
'specs' => 'json',
'release_at' => 'datetime',

View File

@ -25,10 +25,10 @@ class ProductSpu extends Model
*/
protected $casts = [
'images' => JsonArray::class,
'sell_price' => Price::class,
'market_price' => Price::class,
'cost_price' => Price::class,
'vip_price' => Price::class,
// 'sell_price' => Price::class,
// 'market_price' => Price::class,
// 'cost_price' => Price::class,
// 'vip_price' => Price::class,
'attrs' => JsonArray::class,
'release_at' => 'datetime',
];

View File

@ -27,9 +27,9 @@ trait SkuInfo
* @param integer $specPrice
* @return void
*/
protected static function createSellPrice(float $price, float $specPrice)
protected static function createSellPrice(int $price, $specPrice)
{
return bcadd($price, $specPrice, 2);
return bcadd($price, bcmul($specPrice, 100), 2);
}
/**
@ -39,7 +39,7 @@ trait SkuInfo
* @param float $specPrice
* @return void
*/
protected static function createMarketPrice(float $price, float $specPrice)
protected static function createMarketPrice(int $price, $specPrice)
{
return bcadd($price, 0, 2);
}
@ -51,7 +51,7 @@ trait SkuInfo
* @param float $specPrice
* @return void
*/
protected static function createCostPrice(float $price, float $specPrice)
protected static function createCostPrice(float $price, $specPrice)
{
return bcadd($price, 0, 2);
}
@ -63,9 +63,9 @@ trait SkuInfo
* @param float $specPrice
* @return void
*/
protected static function createVipPrice(?float $price, float $specPrice)
protected static function createVipPrice(?int $price, $specPrice)
{
return !is_null($price) ? bcadd($price, $specPrice, 2) : null;
return !is_null($price) ? bcadd($price, bcmul($specPrice, 100), 2) : null;
}
/**
@ -109,10 +109,10 @@ trait SkuInfo
'cover' => $spu->cover,
'images' => $spu->images,
'description' => $spu->description,
'sell_price' => static::createSellPrice((float) $spu->sell_price, (float) $skuSpec['price']),
'market_price' => static::createMarketPrice((float) $spu->market_price, (float) $skuSpec['price']),
'cost_price' => static::createCostPrice((float) $spu->cost_price, (float) $skuSpec['price']),
'vip_price' => static::createVipPrice($spu->vip_price, (float) $skuSpec['price']),
'sell_price' => static::createSellPrice($spu->sell_price, $skuSpec['price']),
'market_price' => static::createMarketPrice($spu->market_price, $skuSpec['price']),
'cost_price' => static::createCostPrice($spu->cost_price, $skuSpec['price']),
'vip_price' => static::createVipPrice($spu->vip_price, $skuSpec['price']),
'media' => $spu->media,
'weight' => $spu->weight,
'attrs' => $spu->attrs,
@ -140,12 +140,6 @@ trait SkuInfo
'price'=>$_price,
], $spu, 'create');
//批量插入时特殊单独处理数据
$_data['sell_price'] = (int) bcmul($_data['sell_price'], 100);
$_data['market_price'] = (int) bcmul($_data['market_price'], 100);
$_data['cost_price'] = (int) bcmul($_data['cost_price'], 100);
$_data['vip_price'] = !is_null($_data['vip_price']) ? (int) bcmul($_data['vip_price'], 100) : null;
$_data['images'] = json_encode($_data['images']);
$_data['attrs'] = json_encode($_data['attrs']);
$_data['specs'] = json_encode($_data['specs']);

View File

@ -0,0 +1,39 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateOrderPackagesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('order_packages', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('order_id')->comment('订单ID');
$table->string('consignee_name')->nullable()->comment('收货人姓名');
$table->string('consignee_telephone')->nullable()->comment('收货人联系方式');
$table->string('consignee_zone')->nullable()->comment('收货人所在地区');
$table->string('consignee_address')->nullable()->comment('收货人详细地址');
$table->string('shipping_company')->nullable()->comment('快递公司');
$table->string('shipping_number')->nullable()->comment('快递单号');
$table->string('remarks')->nullable()->comment('备注');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('order_packages');
}
}

View File

@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateOrderPackageProductsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('order_package_products', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('order_package_id')->comment('包裹ID');
$table->unsignedBigInteger('order_product_id')->comment('商品ID');
$table->unsignedInteger('quantity')->comment('商品数量');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('order_package_products');
}
}

View File

@ -146,6 +146,18 @@ class AdminMenuSeeder extends Seeder
],
],
],
[
'title' => '货运管理',
'icon' => 'fa fa-subway',
'uri' => '',
'children'=>[
[
'title'=>'货运单',
'icon' => '',
'uri' => 'order-packages',
],
],
],
[
'title' => '售后管理',
'icon' => 'fa fa-cubes',

View File

@ -64,11 +64,18 @@ namespace Dcat\Admin {
* @property Grid\Column|Collection is_recommend
* @property Grid\Column|Collection _lft
* @property Grid\Column|Collection _rgt
* @property Grid\Column|Collection article_id
* @property Grid\Column|Collection category_id
* @property Grid\Column|Collection author_name
* @property Grid\Column|Collection subtitle
* @property Grid\Column|Collection cover
* @property Grid\Column|Collection content
* @property Grid\Column|Collection points
* @property Grid\Column|Collection likes
* @property Grid\Column|Collection media_type
* @property Grid\Column|Collection media_content
* @property Grid\Column|Collection continue_click_times
* @property Grid\Column|Collection last_click_at
* @property Grid\Column|Collection coupon_id
* @property Grid\Column|Collection ranges
* @property Grid\Column|Collection status
@ -89,10 +96,17 @@ namespace Dcat\Admin {
* @property Grid\Column|Collection failed_at
* @property Grid\Column|Collection message_id
* @property Grid\Column|Collection ext
* @property Grid\Column|Collection order_package_id
* @property Grid\Column|Collection quantity
* @property Grid\Column|Collection consignee_name
* @property Grid\Column|Collection consignee_telephone
* @property Grid\Column|Collection consignee_zone
* @property Grid\Column|Collection consignee_address
* @property Grid\Column|Collection shipping_company
* @property Grid\Column|Collection shipping_number
* @property Grid\Column|Collection spu_id
* @property Grid\Column|Collection sku_id
* @property Grid\Column|Collection specs
* @property Grid\Column|Collection quantity
* @property Grid\Column|Collection weight
* @property Grid\Column|Collection sell_price
* @property Grid\Column|Collection vip_price
@ -108,16 +122,13 @@ namespace Dcat\Admin {
* @property Grid\Column|Collection pay_sn
* @property Grid\Column|Collection pay_way
* @property Grid\Column|Collection pay_at
* @property Grid\Column|Collection consignee_name
* @property Grid\Column|Collection consignee_telephone
* @property Grid\Column|Collection consignee_zone
* @property Grid\Column|Collection consignee_address
* @property Grid\Column|Collection completed_at
* @property Grid\Column|Collection tokenable_type
* @property Grid\Column|Collection tokenable_id
* @property Grid\Column|Collection token
* @property Grid\Column|Collection abilities
* @property Grid\Column|Collection last_used_at
* @property Grid\Column|Collection old_points
* @property Grid\Column|Collection gift_sku_id
* @property Grid\Column|Collection attrs
* @property Grid\Column|Collection part_id
@ -212,11 +223,18 @@ namespace Dcat\Admin {
* @method Grid\Column|Collection is_recommend(string $label = null)
* @method Grid\Column|Collection _lft(string $label = null)
* @method Grid\Column|Collection _rgt(string $label = null)
* @method Grid\Column|Collection article_id(string $label = null)
* @method Grid\Column|Collection category_id(string $label = null)
* @method Grid\Column|Collection author_name(string $label = null)
* @method Grid\Column|Collection subtitle(string $label = null)
* @method Grid\Column|Collection cover(string $label = null)
* @method Grid\Column|Collection content(string $label = null)
* @method Grid\Column|Collection points(string $label = null)
* @method Grid\Column|Collection likes(string $label = null)
* @method Grid\Column|Collection media_type(string $label = null)
* @method Grid\Column|Collection media_content(string $label = null)
* @method Grid\Column|Collection continue_click_times(string $label = null)
* @method Grid\Column|Collection last_click_at(string $label = null)
* @method Grid\Column|Collection coupon_id(string $label = null)
* @method Grid\Column|Collection ranges(string $label = null)
* @method Grid\Column|Collection status(string $label = null)
@ -237,10 +255,17 @@ namespace Dcat\Admin {
* @method Grid\Column|Collection failed_at(string $label = null)
* @method Grid\Column|Collection message_id(string $label = null)
* @method Grid\Column|Collection ext(string $label = null)
* @method Grid\Column|Collection order_package_id(string $label = null)
* @method Grid\Column|Collection quantity(string $label = null)
* @method Grid\Column|Collection consignee_name(string $label = null)
* @method Grid\Column|Collection consignee_telephone(string $label = null)
* @method Grid\Column|Collection consignee_zone(string $label = null)
* @method Grid\Column|Collection consignee_address(string $label = null)
* @method Grid\Column|Collection shipping_company(string $label = null)
* @method Grid\Column|Collection shipping_number(string $label = null)
* @method Grid\Column|Collection spu_id(string $label = null)
* @method Grid\Column|Collection sku_id(string $label = null)
* @method Grid\Column|Collection specs(string $label = null)
* @method Grid\Column|Collection quantity(string $label = null)
* @method Grid\Column|Collection weight(string $label = null)
* @method Grid\Column|Collection sell_price(string $label = null)
* @method Grid\Column|Collection vip_price(string $label = null)
@ -256,16 +281,13 @@ namespace Dcat\Admin {
* @method Grid\Column|Collection pay_sn(string $label = null)
* @method Grid\Column|Collection pay_way(string $label = null)
* @method Grid\Column|Collection pay_at(string $label = null)
* @method Grid\Column|Collection consignee_name(string $label = null)
* @method Grid\Column|Collection consignee_telephone(string $label = null)
* @method Grid\Column|Collection consignee_zone(string $label = null)
* @method Grid\Column|Collection consignee_address(string $label = null)
* @method Grid\Column|Collection completed_at(string $label = null)
* @method Grid\Column|Collection tokenable_type(string $label = null)
* @method Grid\Column|Collection tokenable_id(string $label = null)
* @method Grid\Column|Collection token(string $label = null)
* @method Grid\Column|Collection abilities(string $label = null)
* @method Grid\Column|Collection last_used_at(string $label = null)
* @method Grid\Column|Collection old_points(string $label = null)
* @method Grid\Column|Collection gift_sku_id(string $label = null)
* @method Grid\Column|Collection attrs(string $label = null)
* @method Grid\Column|Collection part_id(string $label = null)
@ -365,11 +387,18 @@ namespace Dcat\Admin {
* @property Show\Field|Collection is_recommend
* @property Show\Field|Collection _lft
* @property Show\Field|Collection _rgt
* @property Show\Field|Collection article_id
* @property Show\Field|Collection category_id
* @property Show\Field|Collection author_name
* @property Show\Field|Collection subtitle
* @property Show\Field|Collection cover
* @property Show\Field|Collection content
* @property Show\Field|Collection points
* @property Show\Field|Collection likes
* @property Show\Field|Collection media_type
* @property Show\Field|Collection media_content
* @property Show\Field|Collection continue_click_times
* @property Show\Field|Collection last_click_at
* @property Show\Field|Collection coupon_id
* @property Show\Field|Collection ranges
* @property Show\Field|Collection status
@ -390,10 +419,17 @@ namespace Dcat\Admin {
* @property Show\Field|Collection failed_at
* @property Show\Field|Collection message_id
* @property Show\Field|Collection ext
* @property Show\Field|Collection order_package_id
* @property Show\Field|Collection quantity
* @property Show\Field|Collection consignee_name
* @property Show\Field|Collection consignee_telephone
* @property Show\Field|Collection consignee_zone
* @property Show\Field|Collection consignee_address
* @property Show\Field|Collection shipping_company
* @property Show\Field|Collection shipping_number
* @property Show\Field|Collection spu_id
* @property Show\Field|Collection sku_id
* @property Show\Field|Collection specs
* @property Show\Field|Collection quantity
* @property Show\Field|Collection weight
* @property Show\Field|Collection sell_price
* @property Show\Field|Collection vip_price
@ -409,16 +445,13 @@ namespace Dcat\Admin {
* @property Show\Field|Collection pay_sn
* @property Show\Field|Collection pay_way
* @property Show\Field|Collection pay_at
* @property Show\Field|Collection consignee_name
* @property Show\Field|Collection consignee_telephone
* @property Show\Field|Collection consignee_zone
* @property Show\Field|Collection consignee_address
* @property Show\Field|Collection completed_at
* @property Show\Field|Collection tokenable_type
* @property Show\Field|Collection tokenable_id
* @property Show\Field|Collection token
* @property Show\Field|Collection abilities
* @property Show\Field|Collection last_used_at
* @property Show\Field|Collection old_points
* @property Show\Field|Collection gift_sku_id
* @property Show\Field|Collection attrs
* @property Show\Field|Collection part_id
@ -513,11 +546,18 @@ namespace Dcat\Admin {
* @method Show\Field|Collection is_recommend(string $label = null)
* @method Show\Field|Collection _lft(string $label = null)
* @method Show\Field|Collection _rgt(string $label = null)
* @method Show\Field|Collection article_id(string $label = null)
* @method Show\Field|Collection category_id(string $label = null)
* @method Show\Field|Collection author_name(string $label = null)
* @method Show\Field|Collection subtitle(string $label = null)
* @method Show\Field|Collection cover(string $label = null)
* @method Show\Field|Collection content(string $label = null)
* @method Show\Field|Collection points(string $label = null)
* @method Show\Field|Collection likes(string $label = null)
* @method Show\Field|Collection media_type(string $label = null)
* @method Show\Field|Collection media_content(string $label = null)
* @method Show\Field|Collection continue_click_times(string $label = null)
* @method Show\Field|Collection last_click_at(string $label = null)
* @method Show\Field|Collection coupon_id(string $label = null)
* @method Show\Field|Collection ranges(string $label = null)
* @method Show\Field|Collection status(string $label = null)
@ -538,10 +578,17 @@ namespace Dcat\Admin {
* @method Show\Field|Collection failed_at(string $label = null)
* @method Show\Field|Collection message_id(string $label = null)
* @method Show\Field|Collection ext(string $label = null)
* @method Show\Field|Collection order_package_id(string $label = null)
* @method Show\Field|Collection quantity(string $label = null)
* @method Show\Field|Collection consignee_name(string $label = null)
* @method Show\Field|Collection consignee_telephone(string $label = null)
* @method Show\Field|Collection consignee_zone(string $label = null)
* @method Show\Field|Collection consignee_address(string $label = null)
* @method Show\Field|Collection shipping_company(string $label = null)
* @method Show\Field|Collection shipping_number(string $label = null)
* @method Show\Field|Collection spu_id(string $label = null)
* @method Show\Field|Collection sku_id(string $label = null)
* @method Show\Field|Collection specs(string $label = null)
* @method Show\Field|Collection quantity(string $label = null)
* @method Show\Field|Collection weight(string $label = null)
* @method Show\Field|Collection sell_price(string $label = null)
* @method Show\Field|Collection vip_price(string $label = null)
@ -557,16 +604,13 @@ namespace Dcat\Admin {
* @method Show\Field|Collection pay_sn(string $label = null)
* @method Show\Field|Collection pay_way(string $label = null)
* @method Show\Field|Collection pay_at(string $label = null)
* @method Show\Field|Collection consignee_name(string $label = null)
* @method Show\Field|Collection consignee_telephone(string $label = null)
* @method Show\Field|Collection consignee_zone(string $label = null)
* @method Show\Field|Collection consignee_address(string $label = null)
* @method Show\Field|Collection completed_at(string $label = null)
* @method Show\Field|Collection tokenable_type(string $label = null)
* @method Show\Field|Collection tokenable_id(string $label = null)
* @method Show\Field|Collection token(string $label = null)
* @method Show\Field|Collection abilities(string $label = null)
* @method Show\Field|Collection last_used_at(string $label = null)
* @method Show\Field|Collection old_points(string $label = null)
* @method Show\Field|Collection gift_sku_id(string $label = null)
* @method Show\Field|Collection attrs(string $label = null)
* @method Show\Field|Collection part_id(string $label = null)

View File

@ -0,0 +1,24 @@
<?php
return [
'labels' => [
'OrderPackage' => '货运单',
'order-packages' => '货运单',
],
'fields' => [
'order_id' => '订单ID',
'order' => [
'sn'=>'订单编号',
'consignee_name' => '收货人',
'consignee_telephone' => '联系方式',
'consignee_zone' => '地区',
'consignee_address' => '详细地址',
],
'packageProduct'=>'包裹内容',
'shipping_company' => '快递公司',
'shipping_number' => '快递单号',
'remarks' => '备注',
],
'options' => [
],
];