mirror of
https://gitee.com/hzchunfen/erp.git
synced 2025-12-01 14:40:44 +00:00
commit
2d61692fec
103
app/Console/Commands/BusinessGoodsSkuToLocal.php
Normal file
103
app/Console/Commands/BusinessGoodsSkuToLocal.php
Normal file
@ -0,0 +1,103 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Models\BusinessGoodsSku;
|
||||
use App\Models\GoodsBrand;
|
||||
use App\Models\GoodsType;
|
||||
use App\Models\Goods;
|
||||
use App\Models\GoodsSku;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class BusinessGoodsSkuToLocal extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'goods_sku:to_local';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = '将已下载的 花富贵儿 的商品保存到本地商品列表(注意: 先在店铺列表页面下载商品)';
|
||||
|
||||
/**
|
||||
* Create a new command instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$num = 0;
|
||||
BusinessGoodsSku::chunk(100, function ($businessGoodsSkus) use ($num) {
|
||||
foreach ($businessGoodsSkus as $businessGoodsSku) {
|
||||
if (empty($businessGoodsSku['goods_name']) || empty($businessGoodsSku['external_sku_id'])) {
|
||||
continue;
|
||||
}
|
||||
$businessGoodsName = explode(' ', $businessGoodsSku['goods_name']);
|
||||
$count = count($businessGoodsName);
|
||||
if (1 === $count) {
|
||||
continue;
|
||||
} elseif (2 === $count) {
|
||||
// 商品名称 规格名称
|
||||
$brand = 0;
|
||||
$type = '未分类';
|
||||
$goodsName = $businessGoodsName[0];
|
||||
$skuName = $businessGoodsName[1];
|
||||
} elseif (3 === $count) {
|
||||
// 种类 商品名称 规格名称
|
||||
$brand = 0;
|
||||
$type = $businessGoodsName[0];
|
||||
$goodsName = $businessGoodsName[1];
|
||||
$skuName = $businessGoodsName[2];
|
||||
} else {
|
||||
// 品牌 种类 商品名称 规格名称
|
||||
$brand = $businessGoodsName[0];
|
||||
$type = $businessGoodsName[1];
|
||||
$goodsName = $businessGoodsName[2];
|
||||
$skuName = $businessGoodsName[3];
|
||||
foreach ($businessGoodsName as $k => $v) {
|
||||
if ($k > 3) {
|
||||
$skuName .= $v;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($brand) {
|
||||
$goodsBrand = GoodsBrand::firstOrCreate(['name' => $brand]);
|
||||
$brand = $goodsBrand->id;
|
||||
}
|
||||
$goodsType = GoodsType::firstOrCreate(['name' => $type]);
|
||||
[$goodsCode, $skuCode] = explode('_', $businessGoodsSku['external_sku_id']);
|
||||
$goods = [
|
||||
'title' => $goodsName,
|
||||
'type_id' => $goodsType->id,
|
||||
'brand_id' => $brand,
|
||||
'goods_code' => $goodsCode,
|
||||
];
|
||||
$goods = Goods::firstOrCreate($goods);
|
||||
$goodsSku = [
|
||||
'goods_id' => $goods->id,
|
||||
'title' => $skuName,
|
||||
'sku_code' => $skuCode,
|
||||
];
|
||||
GoodsSku::firstOrCreate($goodsSku);
|
||||
++$num;
|
||||
}
|
||||
});
|
||||
$this->info('导入成功: ' . $num);
|
||||
}
|
||||
}
|
||||
@ -22,7 +22,7 @@ class Inventory extends Command
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = '定时盘点';
|
||||
protected $description = '定时库存盘点';
|
||||
|
||||
/**
|
||||
* Create a new command instance.
|
||||
@ -70,7 +70,7 @@ class Inventory extends Command
|
||||
$log->message = '成功';
|
||||
DB::commit();
|
||||
} catch (\Exception $exception) {
|
||||
$log->message = '失败';
|
||||
$log->message = '失败' . $exception->getMessage();
|
||||
DB::rollBack();
|
||||
}
|
||||
$log->save();
|
||||
|
||||
45
app/Events/StockUpdateEvent.php
Normal file
45
app/Events/StockUpdateEvent.php
Normal file
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events;
|
||||
|
||||
use App\Models\GoodsSku;
|
||||
use Illuminate\Broadcasting\Channel;
|
||||
use Illuminate\Broadcasting\InteractsWithSockets;
|
||||
use Illuminate\Broadcasting\PresenceChannel;
|
||||
use Illuminate\Broadcasting\PrivateChannel;
|
||||
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
|
||||
use Illuminate\Foundation\Events\Dispatchable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class StockUpdateEvent
|
||||
{
|
||||
use Dispatchable, InteractsWithSockets, SerializesModels;
|
||||
|
||||
public $goodsSku;
|
||||
public $goodsSkus;
|
||||
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($data)
|
||||
{
|
||||
if (is_array($data)) {
|
||||
$this->goodsSkus = GoodsSku::query()->whereIn('id', $data)->with(['goods:id,goods_code'])->get();
|
||||
} else {
|
||||
$this->goodsSku = $data;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the channels the event should broadcast on.
|
||||
*
|
||||
* @return \Illuminate\Broadcasting\Channel|array
|
||||
*/
|
||||
public function broadcastOn()
|
||||
{
|
||||
return new PrivateChannel('channel-name');
|
||||
}
|
||||
}
|
||||
@ -13,6 +13,7 @@ class Controller extends BaseController
|
||||
|
||||
protected $res = [
|
||||
'httpCode' => 200,
|
||||
'message' => '操作成功',
|
||||
'errorCode' => 0,
|
||||
'errorMessage' => '',
|
||||
];
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Controllers\Goods;
|
||||
|
||||
use App\Events\StockUpdateEvent;
|
||||
use App\Exports\GoodsSkusExport;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\GoodsRequest;
|
||||
@ -173,6 +174,7 @@ class GoodsSkusController extends Controller
|
||||
$log = new LogModel();
|
||||
$log->batchInsert($logs);
|
||||
DB::commit();
|
||||
event(new StockUpdateEvent(array_column($request->skus, 'id')));
|
||||
} catch (\Exception $exception) {
|
||||
DB::rollBack();
|
||||
$this->res = [
|
||||
@ -241,9 +243,8 @@ class GoodsSkusController extends Controller
|
||||
]);
|
||||
$sku->two_days_ago_num = $update['two_days_ago_num'];
|
||||
$sku->yesterday_num = $update['yesterday_num'];
|
||||
$stock = $update['two_days_ago_num'] + $update['yesterday_num'] + $update['arrived_today_num'] - $sku->reserve - $record->loss_num;
|
||||
$sku->stock = $stock;
|
||||
$sku->num = $stock + $sku->reserve + $record->loss_num;
|
||||
$sku->num = $update['two_days_ago_num'] + $update['yesterday_num'] + $update['arrived_today_num'];
|
||||
$sku->stock += ($update['two_days_ago_num'] + $update['yesterday_num'] + $update['arrived_today_num'] - $record->arrived_today_num - $sku->two_days_ago_num - $sku->yesterday_num);
|
||||
$sku->save();
|
||||
$record->arrived_today_num = $update['arrived_today_num'];
|
||||
$record->save();
|
||||
@ -256,6 +257,7 @@ class GoodsSkusController extends Controller
|
||||
]);
|
||||
$this->addLog($sku->id, 'stock');
|
||||
DB::commit();
|
||||
event(new StockUpdateEvent($sku));
|
||||
} catch (\Exception $exception) {
|
||||
DB::rollBack();
|
||||
$this->res = [
|
||||
@ -330,6 +332,9 @@ class GoodsSkusController extends Controller
|
||||
$sku->stock += $changeNum;
|
||||
}
|
||||
$sku->save();
|
||||
if (in_array($updateField, ['reserve', 'loss_num'])) {
|
||||
event(new StockUpdateEvent($sku));
|
||||
}
|
||||
$this->setAfterUpdate($sku->$updateField);
|
||||
$this->addLog($id, $updateField);
|
||||
end:
|
||||
|
||||
@ -23,17 +23,21 @@ class PermissionsController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
public function index()
|
||||
public function index(Request $request)
|
||||
{
|
||||
$permissions = Permission::query()->get()->toArray();
|
||||
$permissions = $request->user()->getPermissionsViaRoles()->toArray();
|
||||
$permissions = ArrayUtils::index($permissions, 'name');
|
||||
$routes = include(resource_path('lang/zh-CN/permission.php'));
|
||||
foreach ($routes as $key => &$route) {
|
||||
$route['id'] = $permissions[$key]['id'];
|
||||
$allowedPermissions = [];
|
||||
foreach ($routes as $route => $conf) {
|
||||
if (isset($permissions[$route])) {
|
||||
$conf['id'] = $permissions[$route]['id'];
|
||||
$allowedPermissions[] = $conf;
|
||||
}
|
||||
$routes = FormatUtils::formatTreeData($routes, 0);
|
||||
}
|
||||
$allowedPermissions = FormatUtils::formatTreeData($allowedPermissions, 0);
|
||||
|
||||
return PermissionsResource::collection($routes);
|
||||
return PermissionsResource::collection($allowedPermissions);
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
|
||||
@ -4,6 +4,7 @@ namespace App\Http\Controllers\Role;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Log as LogModel;
|
||||
use App\Utils\ArrayUtils;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\Rule;
|
||||
@ -22,14 +23,19 @@ class RolesController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
public function index()
|
||||
public function index(Request $request)
|
||||
{
|
||||
$roles = Role::query()->with('permissions')->where('id', '<>', 1)->get()->toArray();
|
||||
$routes = include(resource_path('lang/zh-CN/permission.php'));
|
||||
$allPermissions = Permission::query()->get()->toArray();
|
||||
$allPermissions = ArrayUtils::index($allPermissions, 'name');
|
||||
foreach ($roles as &$role) {
|
||||
$permissions = [];
|
||||
foreach ($role['permissions'] as $item) {
|
||||
$permissions[] = $routes[$item['name']]['name'];
|
||||
$permissions[] = [
|
||||
'id' => $allPermissions[$item['name']]['id'],
|
||||
'name' => $routes[$item['name']]['name'],
|
||||
];
|
||||
}
|
||||
$role['permissions'] = $permissions;
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@ class ShopsController extends Controller
|
||||
$shops = Shop::query()->paginate();
|
||||
foreach ($shops as $shop) {
|
||||
$shop->authUrl = '';
|
||||
if ('妙选' !== $shop->plat_id && '未授权' === $shop->status) {
|
||||
if ('妙选' !== $shop->plat_id && ('未授权' === $shop->status || '重新授权' === $shop->status)) {
|
||||
$shop->authUrl = BusinessFactory::init()->make($shop->plat_id)->getAuthUrl($shop->id, $shop->getOriginal('plat_id'));
|
||||
}
|
||||
}
|
||||
@ -131,4 +131,14 @@ class ShopsController extends Controller
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function downloadGoods($id, Request $request)
|
||||
{
|
||||
$shop = Shop::query()->find($id);
|
||||
$business = BusinessFactory::init()->make($shop->plat_id);
|
||||
$business->setShop($shop);
|
||||
$business->downloadGoodsListAndBind();
|
||||
|
||||
return response($this->res, $this->res['httpCode']);
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,7 +6,6 @@ use App\Http\Controllers\Controller;
|
||||
use App\Models\Log as LogModel;
|
||||
use App\Models\User;
|
||||
use Illuminate\Http\Request;
|
||||
use Faker\Generator as Faker;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Support\Str;
|
||||
use App\Http\Resources\UsersResource;
|
||||
@ -30,7 +29,7 @@ class UsersController extends Controller
|
||||
return UsersResource::collection($users);
|
||||
}
|
||||
|
||||
public function store(Request $request, Faker $faker)
|
||||
public function store(Request $request)
|
||||
{
|
||||
$validator = Validator::make($request->all(), [
|
||||
'name' => 'required|string|max:191|unique:users,name',
|
||||
@ -45,7 +44,6 @@ class UsersController extends Controller
|
||||
}
|
||||
$user = new User();
|
||||
$user->name = $request->name;
|
||||
$user->email = \request('email', $faker->unique()->safeEmail);
|
||||
$user->password = $request->password;
|
||||
$user->api_token = Str::random(60);
|
||||
$user->save();
|
||||
|
||||
@ -38,7 +38,7 @@ class Kernel extends HttpKernel
|
||||
],
|
||||
|
||||
'api' => [
|
||||
'throttle:60,1',
|
||||
// 'throttle:60,1',
|
||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
],
|
||||
];
|
||||
|
||||
@ -31,7 +31,7 @@ class GoodsSkuRequest extends FormRequest
|
||||
'sku_code' => ['sometimes', 'required', 'distinct', 'alpha_dash', 'max:32'],
|
||||
'status' => ['sometimes', 'required', 'integer', Rule::in([0, 1, 2])],
|
||||
'num' => ['sometimes', 'required', 'integer'],
|
||||
'cost' => ['sometimes', 'required', 'numeric', 'gt:0'],
|
||||
'cost' => ['sometimes', 'required', 'numeric'],
|
||||
'reference_price' => [
|
||||
'sometimes',
|
||||
'numeric',
|
||||
|
||||
@ -2,8 +2,6 @@
|
||||
|
||||
namespace App\Jobs;
|
||||
|
||||
use App\Models\BusinessOrderItem;
|
||||
use App\Models\GoodsSku;
|
||||
use App\Services\Business\BusinessFactory;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
@ -18,19 +16,19 @@ class BusinessGoodsSkuIncrQuantity implements ShouldQueue
|
||||
public $shop;
|
||||
public $businessOrderItem;
|
||||
public $num;
|
||||
public $goodsSku;
|
||||
public $isIncremental = true;
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($shop, BusinessOrderItem $businessOrderItem, $num, GoodsSku $goodsSku)
|
||||
public function __construct($shop, $businessOrderItem, $num, $isIncremental)
|
||||
{
|
||||
$this->shop = $shop;
|
||||
$this->businessOrderItem = $businessOrderItem;
|
||||
$this->num = $num;
|
||||
$this->goodsSku = $goodsSku;
|
||||
$this->isIncremental = $isIncremental;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -40,6 +38,8 @@ class BusinessGoodsSkuIncrQuantity implements ShouldQueue
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
BusinessFactory::init()->make($this->shop['plat_id'])->setShopWithId($this->shop['id'])->incrQuantity($this->businessOrderItem, $this->num, true, $this->goodsSku);
|
||||
if ($this->businessOrderItem) {
|
||||
BusinessFactory::init()->make($this->shop['plat_id'])->setShopWithId($this->shop['id'])->incrQuantity($this->businessOrderItem, $this->num, $this->isIncremental);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,35 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Listeners;
|
||||
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use App\Events\BusinessOrdersUpdate;
|
||||
|
||||
class SendDatabaseNotification implements ShouldQueue
|
||||
{
|
||||
use InteractsWithQueue;
|
||||
|
||||
/**
|
||||
* Create the event listener.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @param BusinessOrdersUpdate $event
|
||||
* @return void
|
||||
*/
|
||||
public function handle(BusinessOrdersUpdate $event)
|
||||
{
|
||||
if (5 >= $event->goodsSku->stock) {
|
||||
// 发送通知给管理员
|
||||
}
|
||||
}
|
||||
}
|
||||
51
app/Listeners/StockUpdateListener.php
Normal file
51
app/Listeners/StockUpdateListener.php
Normal file
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
namespace App\Listeners;
|
||||
|
||||
use App\Events\StockUpdateEvent;
|
||||
use App\Jobs\BusinessGoodsSkuIncrQuantity;
|
||||
use App\Models\BusinessGoodsSku;
|
||||
use App\Models\Shop;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
|
||||
class StockUpdateListener
|
||||
{
|
||||
/**
|
||||
* Create the event listener.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @param StockUpdateEvent $event
|
||||
* @return void
|
||||
*/
|
||||
public function handle(StockUpdateEvent $event)
|
||||
{
|
||||
$shops = Shop::query()->where('status', 1)->get(['id', 'plat_id']);
|
||||
if (empty($shops)) {
|
||||
return;
|
||||
}
|
||||
foreach ($shops as $shop) {
|
||||
if (isset($event->goodsSku)) {
|
||||
$num = $event->goodsSku->stock;
|
||||
$businessGoodsSku = BusinessGoodsSku::query()->where('shop_id', $shop->id)->where('external_sku_id', $event->goodsSku->goods->goods_code . '_' . $event->goodsSku->sku_code)->first();
|
||||
BusinessGoodsSkuIncrQuantity::dispatch($shop, $businessGoodsSku, $num, false);
|
||||
}
|
||||
if (isset($event->goodsSkus)) {
|
||||
foreach ($event->goodsSkus as $goodsSku) {
|
||||
$num = $goodsSku->stock;
|
||||
$businessGoodsSku = BusinessGoodsSku::query()->where('shop_id', $shop->id)->where('external_sku_id', $goodsSku->goods->goods_code . '_' . $goodsSku->sku_code)->first();
|
||||
BusinessGoodsSkuIncrQuantity::dispatch($shop, $businessGoodsSku, $num, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
43
app/Listeners/StockWarning.php
Normal file
43
app/Listeners/StockWarning.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Listeners;
|
||||
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use App\Events\BusinessOrdersUpdate;
|
||||
|
||||
class StockWarning implements ShouldQueue
|
||||
{
|
||||
use InteractsWithQueue;
|
||||
|
||||
/**
|
||||
* Create the event listener.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
public function handle($event)
|
||||
{
|
||||
if (isset($event->goodsSku->stock) && 5 >= $event->goodsSku->stock) {
|
||||
// 修改状态为预警,发送通知给管理员
|
||||
$event->goodsSku->status = 2;
|
||||
$event->goodsSku->save();
|
||||
}
|
||||
if (isset($event->goodsSkus)) {
|
||||
$data = [];
|
||||
foreach ($event->goodsSkus as $goodsSku) {
|
||||
$data[] = [
|
||||
'id' => $goodsSku->id,
|
||||
'status' => 2
|
||||
];
|
||||
}
|
||||
if ($data) {
|
||||
$event->goodsSkus->update($data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -42,6 +42,7 @@ class UpdateBusinessGoodsStock implements ShouldQueue
|
||||
$log->user_id = $event->businessOrderItem->shop_id;
|
||||
$log->message = ($event->businessOrderItem->external_sku_id ?: '商品') . '未找到';
|
||||
$log->save();
|
||||
|
||||
return;
|
||||
}
|
||||
$shops = Shop::query()->where('id', '<>', $event->businessOrderItem->shop_id)->where('status', 1)->get(['id', 'plat_id']);
|
||||
@ -50,7 +51,13 @@ class UpdateBusinessGoodsStock implements ShouldQueue
|
||||
}
|
||||
|
||||
foreach ($shops as $shop) {
|
||||
BusinessGoodsSkuIncrQuantity::dispatch($shop, $event->businessOrderItem, $event->num, $event->goodsSku);
|
||||
$num = $event->num;
|
||||
$isIncremental = true;
|
||||
if ('妙选' === $shop->plat_id) {
|
||||
$num = $event->goodsSku->stock;
|
||||
$isIncremental = false;
|
||||
}
|
||||
BusinessGoodsSkuIncrQuantity::dispatch($shop, $event->businessOrderItem, $num, $isIncremental);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,6 +4,18 @@ namespace App\Models;
|
||||
|
||||
class BusinessGoodsSku extends Model
|
||||
{
|
||||
/**
|
||||
* @var mixed
|
||||
*/
|
||||
public $goods_id;
|
||||
/**
|
||||
* @var mixed
|
||||
*/
|
||||
public $sku_id;
|
||||
/**
|
||||
* @var mixed
|
||||
*/
|
||||
public $external_sku_id;
|
||||
/**
|
||||
* 不可批量赋值的属性。为空则所有熟悉都可以批量赋值
|
||||
*
|
||||
|
||||
@ -4,6 +4,14 @@ namespace App\Models;
|
||||
|
||||
class BusinessOrderItem extends Model
|
||||
{
|
||||
/**
|
||||
* @var mixed
|
||||
*/
|
||||
public $shop_id;
|
||||
/**
|
||||
* @var mixed
|
||||
*/
|
||||
public $external_sku_id;
|
||||
/**
|
||||
* 不可批量赋值的属性。为空则所有熟悉都可以批量赋值
|
||||
*
|
||||
|
||||
@ -23,6 +23,15 @@ class Goods extends Model
|
||||
'goods_code',
|
||||
];
|
||||
|
||||
public function getImgUrlAttribute($value)
|
||||
{
|
||||
if (false !== strpos($value, 'ju8hn6/erp/shop')) {
|
||||
$value = config('filesystems.disks.aliyun.url') . $value;
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 多规格
|
||||
*/
|
||||
|
||||
@ -2,10 +2,13 @@
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Listeners\SendDatabaseNotification;
|
||||
use App\Listeners\StockWarning;
|
||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use App\Listeners\UpdateBusinessGoodsStock;
|
||||
use App\Events\BusinessOrdersUpdate;
|
||||
use App\Events\StockUpdateEvent;
|
||||
use App\Listeners\StockUpdateListener;
|
||||
|
||||
class EventServiceProvider extends ServiceProvider
|
||||
{
|
||||
@ -15,9 +18,13 @@ class EventServiceProvider extends ServiceProvider
|
||||
* @var array
|
||||
*/
|
||||
protected $listen = [
|
||||
'App\Events\BusinessOrdersUpdate' => [
|
||||
BusinessOrdersUpdate::class => [
|
||||
UpdateBusinessGoodsStock::class,
|
||||
SendDatabaseNotification::class,
|
||||
StockWarning::class,
|
||||
],
|
||||
StockUpdateEvent::class => [
|
||||
StockUpdateListener::class,
|
||||
StockWarning::class,
|
||||
],
|
||||
];
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ abstract class BusinessClient
|
||||
|
||||
abstract public function bindGoods($goods);
|
||||
|
||||
abstract public function incrQuantity(BusinessGoodsSku $businessGoodsSku, $num, $incremental, GoodsSku $goodsSku);
|
||||
abstract public function incrQuantity($businessGoodsSku, $num, $incremental);
|
||||
|
||||
abstract public function downloadOrdersAndSave($beginTime, $endTime, $downloadType = 'default', $page = 1);
|
||||
|
||||
|
||||
@ -51,7 +51,7 @@ class Goods
|
||||
return [$type, $appendParams];
|
||||
}
|
||||
|
||||
public static function incrQuantity($goodsId, $quantity, $skuId, $modifyType = 2)
|
||||
public static function incrQuantity($goodsId, $skuId, $quantity, $modifyType = 2)
|
||||
{
|
||||
$type = 'pdd.ktt.goods.incr.quantity';
|
||||
$appendParams = [
|
||||
|
||||
@ -5,7 +5,6 @@ namespace App\Services\Business\KuaiTuanTuan;
|
||||
use App\Models\BusinessGoodsSku;
|
||||
use App\Models\GoodsSku;
|
||||
use App\Services\Business\BusinessClient;
|
||||
use App\Models\Log;
|
||||
|
||||
class KuaiTuanTuan extends BusinessClient
|
||||
{
|
||||
@ -46,7 +45,7 @@ class KuaiTuanTuan extends BusinessClient
|
||||
$this->bindGoods($goods);
|
||||
$pageNum = ceil($res['ktt_goods_query_list_response']['total'] / $appendParams['size']);
|
||||
if ($pageNum > $page && 10 >= $page) {
|
||||
$this->downloadGoods($page + 1);
|
||||
$this->downloadGoodsListAndBind($page + 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -55,9 +54,9 @@ class KuaiTuanTuan extends BusinessClient
|
||||
Goods::bindGoods($goods, $this->shop->id);
|
||||
}
|
||||
|
||||
public function incrQuantity($businessGoodsSku, $num, $incremental, GoodsSku $goodsSku)
|
||||
public function incrQuantity($businessGoodsSku, $num, $incremental)
|
||||
{
|
||||
[$type, $appendParams] = Goods::incrQuantity($businessGoodsSku->goods_id, $num, $businessGoodsSku->sku_id, $incremental ? 1 : 2);
|
||||
[$type, $appendParams] = Goods::incrQuantity($businessGoodsSku->goods_id, $businessGoodsSku->sku_id, $num, $incremental ? 1 : 2);
|
||||
$this->doRequest($type, $appendParams);
|
||||
}
|
||||
|
||||
|
||||
@ -16,15 +16,15 @@ class Goods
|
||||
}
|
||||
}
|
||||
|
||||
public static function incrQuantity($shopId, $quantity, $businessGoods)
|
||||
public static function incrQuantity($shopId, $quantity, BusinessGoodsSku $businessGoods)
|
||||
{
|
||||
return [
|
||||
'data' => [
|
||||
'stock' => $quantity,
|
||||
'business_sku_id' => $businessGoods['sku_id'],
|
||||
'business_goods_id' => $businessGoods['goods_id'],
|
||||
'business_sku_id' => $businessGoods->sku_id,
|
||||
'business_goods_id' => $businessGoods->goods_id,
|
||||
'erp_shop_id' => $shopId,
|
||||
'erp_sku_id' => $businessGoods['external_sku_id'],
|
||||
'erp_sku_id' => $businessGoods->external_sku_id,
|
||||
],
|
||||
'type' => '更新库存',
|
||||
];
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Services\Business\MiaoXuan;
|
||||
|
||||
use App\Models\GoodsSku;
|
||||
use App\Models\BusinessGoodsSku;
|
||||
use App\Services\Business\BusinessClient;
|
||||
|
||||
class MiaoXuan extends BusinessClient
|
||||
@ -22,9 +22,9 @@ class MiaoXuan extends BusinessClient
|
||||
Goods::bindGoods($goods, $this->shop->id);
|
||||
}
|
||||
|
||||
public function incrQuantity($businessGoodsSku, $num, $incremental, GoodsSku $goodsSku)
|
||||
public function incrQuantity($businessGoodsSku, $num, $incremental)
|
||||
{
|
||||
$appendParams = Goods::incrQuantity($this->shop->id, $goodsSku->stock, $businessGoodsSku);
|
||||
$appendParams = Goods::incrQuantity($this->shop->id, $num, $businessGoodsSku);
|
||||
$url = 'http://shop.chutang66.com/miaoxuan/stock';
|
||||
$this->formDataPostRequest($url, $appendParams);
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'timezone' => 'PRC',
|
||||
'timezone' => 'Asia/Shanghai',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
@ -17,7 +17,7 @@ class CreateUsersTable extends Migration
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('name');
|
||||
$table->string('email')->unique();
|
||||
$table->string('email')->nullable()->unique();
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->string('password');
|
||||
$table->string('api_token', 80)->unique()->nullable(false);
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Spatie\Permission\Models\Permission;
|
||||
|
||||
class PermissionsTableSeeder extends Seeder
|
||||
{
|
||||
@ -13,10 +14,9 @@ class PermissionsTableSeeder extends Seeder
|
||||
public function run()
|
||||
{
|
||||
$routes = include(resource_path('lang/zh-CN/permission.php'));
|
||||
$data = [];
|
||||
foreach ($routes as $key => $route) {
|
||||
$data[] = ['name' => $key, 'guard_name' => 'api'];
|
||||
}
|
||||
DB::table('permissions')->insert($data);
|
||||
$data = ['id' => $route['id'], 'name' => $key, 'guard_name' => 'api'];
|
||||
Permission::firstOrCreate($data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,7 +12,7 @@ class RolesTableSeeder extends Seeder
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('roles')->insert([
|
||||
DB::table('roles')->insertOrIgnore([
|
||||
['name' => '超级管理员', 'guard_name' => 'api'],
|
||||
]);
|
||||
}
|
||||
|
||||
1
public/dist/css/app.62fa08a2.css
vendored
Normal file
1
public/dist/css/app.62fa08a2.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
*{padding:0 0;margin:0 0}body,html{width:100%;height:100%;overflow-y:hidden}ul{list-style:none}
|
||||
1
public/dist/css/chunk-37d81871.8c2ae35d.css
vendored
Normal file
1
public/dist/css/chunk-37d81871.8c2ae35d.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.el-upload--picture-card[data-v-140f5156]{width:50px;height:50px}.el-form-item[data-v-140f5156]{margin-left:60px}.addto[data-v-140f5156]{display:inline-block;width:30px;height:30px;background-color:#00f;color:#fff;font-size:25px;text-align:center;line-height:30px;border-radius:5px;margin-top:4px}.avatar-uploader .el-upload[data-v-140f5156]{border:1px dashed #d9d9d9;border-radius:6px;cursor:pointer;position:relative;overflow:hidden}.avatar-uploader .el-upload[data-v-140f5156]:hover{border-color:#409eff}.avatar-uploader-icon[data-v-140f5156]{font-size:28px;color:#8c939d;width:148px;height:148px;line-height:148px;text-align:center}.avatar[data-v-140f5156]{width:178px;height:178px;display:block}
|
||||
1
public/dist/css/chunk-4a36a8d0.e437602b.css
vendored
Normal file
1
public/dist/css/chunk-4a36a8d0.e437602b.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.block{margin-top:30px}
|
||||
1
public/dist/css/chunk-4d75363c.f04ac99e.css
vendored
Normal file
1
public/dist/css/chunk-4d75363c.f04ac99e.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a[data-v-7d43bb54]{text-decoration:none;color:#fff}.conent[data-v-7d43bb54]{width:100%;min-height:calc(100vh - 200px);position:relative}.btn[data-v-7d43bb54]{height:104px;border-radius:5px;display:flex;align-items:center}.btn .el-button[data-v-7d43bb54]{width:114px;height:44px;border-radius:3px}.table[data-v-7d43bb54]{margin-top:20px}.block[data-v-7d43bb54]{margin-top:30px}
|
||||
1
public/dist/css/chunk-59f3bcab.f15bb106.css
vendored
Normal file
1
public/dist/css/chunk-59f3bcab.f15bb106.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.block{margin-top:30px}
|
||||
1
public/dist/css/chunk-5ed10db2.12c276ba.css
vendored
Normal file
1
public/dist/css/chunk-5ed10db2.12c276ba.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.backimg[data-v-4d3b70b5]{width:100%;height:1080px;background-image:url(../img/组\ 32.1fba730a.png);background-repeat:no-repeat;background-size:100%;position:relative}.sign[data-v-4d3b70b5]{width:400px;height:500px;position:absolute;top:270px;right:300px}.sign input[data-v-4d3b70b5]{width:400px;height:51px;border:2px solid #bcbcbc;opacity:1;border-radius:5px;margin-bottom:25px}.sign .title[data-v-4d3b70b5]{width:125px;height:23px;font-size:22px;font-family:BigruixianBlackGBV1\.0;font-weight:400;line-height:23px;color:#2b53ec;opacity:1}.sign .manage[data-v-4d3b70b5]{margin-top:19px;margin-bottom:50px}.sign .manage img[data-v-4d3b70b5]{margin-right:20px}.sign .manage span[data-v-4d3b70b5]{width:340px;height:57px;font-size:54px;font-family:BigruixianBlackGBV1\.0;font-weight:400;line-height:57px;color:#2b53ec;opacity:1}.sign .title-1[data-v-4d3b70b5]{width:70px;height:35px;font-size:35px;font-family:Source Han Sans CN;font-weight:500;line-height:60px;color:#393939;opacity:1;margin-bottom:35px}.sign .el-button[data-v-4d3b70b5]{width:400px;height:58px;background:#2b53ec;border-radius:5px;margin-top:40px}.sign .el-checkbox[data-v-4d3b70b5]{color:#2b53ec}
|
||||
1
public/dist/css/chunk-61dfd850.94d448e7.css
vendored
Normal file
1
public/dist/css/chunk-61dfd850.94d448e7.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.table[data-v-604626ee]{background-color:#fff}.table ul[data-v-604626ee]{display:flex}.table ul li[data-v-604626ee]{padding:20px 10px}.table ul li .Navigation[data-v-604626ee]{display:flex}.table ul li .Navigation span[data-v-604626ee]{padding:5px 30px;border:1px solid #dcdfe6;font-size:14px;font-weight:500;color:#303133;border-radius:4px;cursor:pointer;margin-right:10px}.table ul li .Navigation .tab[data-v-604626ee]{margin-right:10px;flex-shrink:0}.table ul li .Navigation .red[data-v-604626ee]{color:#5470c6;border:1px solid #5470c6}.table ul li .Navigation .closure[data-v-604626ee]{display:inline-block;text-align:center;cursor:pointer;width:15px;height:15px;line-height:15px;background-color:#ddd;color:#000;border-radius:50%;font-size:12px}.table ul li .Navigation .red_1[data-v-604626ee]{background-color:#5470c6;color:#fff}.table ul li[data-v-604626ee]:nth-child(2){overflow-x:auto}.width[data-v-604626ee]{transition:all .3s;opacity:0;width:0!important}.width1[data-v-604626ee]{transition:all .3s;opacity:1;width:300px!important}.el-container[data-v-604626ee]{height:100vh}.el-header[data-v-604626ee]{background-color:#b3c0d1;color:#333;text-align:center}.el-aside[data-v-604626ee]{background-color:#d3dce6;color:#333;text-align:center;overflow-x:hidden}.el-aside[data-v-604626ee]::-webkit-scrollbar{width:8px}.el-aside[data-v-604626ee]::-webkit-scrollbar-thumb{background-color:rgba(144,147,153,.3);border-radius:20px}.el-main[data-v-604626ee]{background-color:#f0f2f5;color:#333;padding:0 0!important}.el-main[data-v-604626ee]::-webkit-scrollbar{width:10px}.el-main[data-v-604626ee]::-webkit-scrollbar-thumb{background-color:rgba(144,147,153,.3)}.box-card[data-v-604626ee]{background-color:#fff;min-height:calc(100vh - 200px);margin:10px;padding:20px}.add[data-v-604626ee]{cursor:pointer;font-size:25px;color:#606266}.head[data-v-604626ee]{padding:10px;background-color:#fff;border-bottom:1px solid #f6f6f6;box-shadow:0 1px 4px rgba(0,21,41,.08)}.head ul[data-v-604626ee]{display:flex;justify-content:space-between}.head ul li[data-v-604626ee]{display:flex;align-items:center}.head ul li .right[data-v-604626ee]{margin-left:20px}.head ul li .token[data-v-604626ee]{cursor:pointer}.el-aside[data-v-604626ee]{background:#282c34;box-shadow:2px 0 6px rgba(0,21,41,.35)}[data-v-604626ee] .el-menu{border:none}.el-menu-item[data-v-604626ee]{margin:0 20px 10px}.el-menu-item[data-v-604626ee]:hover{outline:0!important;background:#5470c6!important;border-radius:5px!important}.el-menu-item.is-active[data-v-604626ee]{color:#fff!important;background:#5470c6!important;border-radius:5px!important}.el-menu-item-group__title[data-v-604626ee]{padding:0 0!important}
|
||||
1
public/dist/css/chunk-62101cb8.67947a26.css
vendored
Normal file
1
public/dist/css/chunk-62101cb8.67947a26.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.conent[data-v-4b3dc420]{width:100%;min-height:calc(100vh - 200px)}.btn[data-v-4b3dc420]{height:104px;border-radius:5px;display:flex;align-items:center}.btn .el-button[data-v-4b3dc420]{width:114px;height:44px;border-radius:3px}.table[data-v-4b3dc420]{margin-top:20px}.from-btn[data-v-4b3dc420]{display:flex;justify-content:space-around;align-content:center}
|
||||
1
public/dist/css/chunk-7136ffb6.9ae72c1b.css
vendored
Normal file
1
public/dist/css/chunk-7136ffb6.9ae72c1b.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.conent[data-v-0f49394c]{width:100%;min-height:calc(100vh - 200px);position:relative}.btn[data-v-0f49394c]{height:104px;border-radius:5px;display:flex;align-items:center}.btn .el-button[data-v-0f49394c]{width:114px;height:44px;border-radius:3px}.table[data-v-0f49394c]{margin-top:20px}.block[data-v-0f49394c]{margin-top:30px}
|
||||
1
public/dist/css/chunk-744a6ffe.fec807f1.css
vendored
Normal file
1
public/dist/css/chunk-744a6ffe.fec807f1.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.loss[data-v-7ad4e002]{position:relative}.table[data-v-7ad4e002]{margin-top:40px}.btn[data-v-7ad4e002]{float:right}[data-v-7ad4e002] .cell{display:flex;align-items:center}.commodityimg[data-v-7ad4e002]{width:59px;height:59px;background:hsla(0,0%,89%,.39);opacity:1;display:block;margin-right:12px}.confirmbtn[data-v-7ad4e002]{width:114px;height:44px;border-radius:3px;margin-top:21px;margin-bottom:8px}.import-right[data-v-7ad4e002]{margin-top:30px}.import-right a[data-v-7ad4e002]{text-decoration:none;color:#000}[data-v-7ad4e002] .btn11{padding:0;width:14px;height:14px}.page[data-v-7ad4e002]{margin-top:20px}
|
||||
1
public/dist/css/chunk-8eb4b592.9e793ba8.css
vendored
Normal file
1
public/dist/css/chunk-8eb4b592.9e793ba8.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.conent[data-v-d0756c04]{width:100%;min-height:calc(100vh - 200px);position:relative}.btn[data-v-d0756c04]{height:104px;border-radius:5px;display:flex;align-items:center}.btn .el-button[data-v-d0756c04]{width:114px;height:44px;border-radius:3px}.table[data-v-d0756c04]{margin-top:20px}.block[data-v-d0756c04]{margin-top:30px}
|
||||
1
public/dist/css/chunk-959f9a24.ed76f224.css
vendored
Normal file
1
public/dist/css/chunk-959f9a24.ed76f224.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.conent[data-v-07117b7c]{width:100%;min-height:calc(100vh - 200px);position:relative}.btn[data-v-07117b7c]{height:104px;border-radius:5px;display:flex;align-items:center}.btn .el-button[data-v-07117b7c]{width:114px;height:44px;border-radius:3px}.table[data-v-07117b7c]{margin-top:20px}.from-btn[data-v-07117b7c]{display:flex;justify-content:space-around;align-content:center}.block[data-v-07117b7c]{margin-top:30px}
|
||||
1
public/dist/css/chunk-vendors.a6a7f90c.css
vendored
Normal file
1
public/dist/css/chunk-vendors.a6a7f90c.css
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
public/dist/favicon.ico
vendored
Normal file
BIN
public/dist/favicon.ico
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
BIN
public/dist/fonts/element-icons.535877f5.woff
vendored
Normal file
BIN
public/dist/fonts/element-icons.535877f5.woff
vendored
Normal file
Binary file not shown.
BIN
public/dist/fonts/element-icons.732389de.ttf
vendored
Normal file
BIN
public/dist/fonts/element-icons.732389de.ttf
vendored
Normal file
Binary file not shown.
BIN
public/dist/img/组 32.1fba730a.png
vendored
Normal file
BIN
public/dist/img/组 32.1fba730a.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 198 KiB |
1
public/dist/index.html
vendored
Normal file
1
public/dist/index.html
vendored
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>hello-world</title><link href="css/chunk-37d81871.8c2ae35d.css" rel="prefetch"><link href="css/chunk-4a36a8d0.e437602b.css" rel="prefetch"><link href="css/chunk-4d75363c.f04ac99e.css" rel="prefetch"><link href="css/chunk-59f3bcab.f15bb106.css" rel="prefetch"><link href="css/chunk-5ed10db2.12c276ba.css" rel="prefetch"><link href="css/chunk-61dfd850.94d448e7.css" rel="prefetch"><link href="css/chunk-62101cb8.67947a26.css" rel="prefetch"><link href="css/chunk-7136ffb6.9ae72c1b.css" rel="prefetch"><link href="css/chunk-744a6ffe.fec807f1.css" rel="prefetch"><link href="css/chunk-8eb4b592.9e793ba8.css" rel="prefetch"><link href="css/chunk-959f9a24.ed76f224.css" rel="prefetch"><link href="js/chunk-2d23156c.0622f885.js" rel="prefetch"><link href="js/chunk-37d81871.da518dd8.js" rel="prefetch"><link href="js/chunk-4a36a8d0.9136f98d.js" rel="prefetch"><link href="js/chunk-4d75363c.a68f2dc8.js" rel="prefetch"><link href="js/chunk-59f3bcab.45013db3.js" rel="prefetch"><link href="js/chunk-5ed10db2.c024642d.js" rel="prefetch"><link href="js/chunk-61dfd850.65d633aa.js" rel="prefetch"><link href="js/chunk-62101cb8.0d2ed3f5.js" rel="prefetch"><link href="js/chunk-7136ffb6.3fc0cbd6.js" rel="prefetch"><link href="js/chunk-744a6ffe.85ecc07f.js" rel="prefetch"><link href="js/chunk-8eb4b592.a7ab2ed3.js" rel="prefetch"><link href="js/chunk-959f9a24.49c53be2.js" rel="prefetch"><link href="css/app.62fa08a2.css" rel="preload" as="style"><link href="css/chunk-vendors.a6a7f90c.css" rel="preload" as="style"><link href="js/app.f221151c.js" rel="preload" as="script"><link href="js/chunk-vendors.dc4080e5.js" rel="preload" as="script"><link href="css/chunk-vendors.a6a7f90c.css" rel="stylesheet"><link href="css/app.62fa08a2.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but hello-world doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.dc4080e5.js"></script><script src="js/app.f221151c.js"></script></body></html>
|
||||
2
public/dist/js/app.f221151c.js
vendored
Normal file
2
public/dist/js/app.f221151c.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/dist/js/app.f221151c.js.map
vendored
Normal file
1
public/dist/js/app.f221151c.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
public/dist/js/chunk-2d23156c.0622f885.js
vendored
Normal file
2
public/dist/js/chunk-2d23156c.0622f885.js
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d23156c"],{efb7:function(t,n,e){"use strict";e.r(n);var u=function(){var t=this,n=t._self._c;return n("div",[t._v("权限管理(已废弃)")])},c=[],o={name:"GlxtAuthority",data(){return{}},mounted(){},methods:{}},r=o,a=e("0b56"),s=Object(a["a"])(r,u,c,!1,null,"9c10bb16",null);n["default"]=s.exports}}]);
|
||||
//# sourceMappingURL=chunk-2d23156c.0622f885.js.map
|
||||
1
public/dist/js/chunk-2d23156c.0622f885.js.map
vendored
Normal file
1
public/dist/js/chunk-2d23156c.0622f885.js.map
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["webpack:///./src/views/system/authority.vue","webpack:///src/views/system/authority.vue","webpack:///./src/views/system/authority.vue?38b8","webpack:///./src/views/system/authority.vue?8135"],"names":["render","_vm","this","_c","_self","_v","staticRenderFns","name","data","mounted","methods","component"],"mappings":"uHAAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACF,EAAII,GAAG,gBAEhFC,EAAkB,GCGP,GACfC,qBAEAC,OACA,UAGAC,YAEAC,YCduc,I,YCOncC,EAAY,eACd,EACAX,EACAM,GACA,EACA,KACA,WACA,MAIa,aAAAK,E","file":"js/chunk-2d23156c.0622f885.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',[_vm._v(\"权限管理(已废弃)\")])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n <div>权限管理(已废弃)</div>\r\n</template>\r\n\r\n<script>\r\nexport default {\r\n name: \"GlxtAuthority\",\r\n\r\n data() {\r\n return {};\r\n },\r\n\r\n mounted() {},\r\n\r\n methods: {},\r\n};\r\n</script>\r\n\r\n<style lang=\"scss\" scoped></style>\r\n","import mod from \"-!../../../node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/_thread-loader@2.1.3@thread-loader/dist/cjs.js!../../../node_modules/_babel-loader@8.2.5@babel-loader/lib/index.js!../../../node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/_vue-loader@15.10.0@vue-loader/lib/index.js??vue-loader-options!./authority.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/_thread-loader@2.1.3@thread-loader/dist/cjs.js!../../../node_modules/_babel-loader@8.2.5@babel-loader/lib/index.js!../../../node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/_vue-loader@15.10.0@vue-loader/lib/index.js??vue-loader-options!./authority.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./authority.vue?vue&type=template&id=9c10bb16&scoped=true&\"\nimport script from \"./authority.vue?vue&type=script&lang=js&\"\nexport * from \"./authority.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/_vue-loader@15.10.0@vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"9c10bb16\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}
|
||||
4
public/dist/js/chunk-37d81871.da518dd8.js
vendored
Normal file
4
public/dist/js/chunk-37d81871.da518dd8.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/dist/js/chunk-37d81871.da518dd8.js.map
vendored
Normal file
1
public/dist/js/chunk-37d81871.da518dd8.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
4
public/dist/js/chunk-4a36a8d0.9136f98d.js
vendored
Normal file
4
public/dist/js/chunk-4a36a8d0.9136f98d.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/dist/js/chunk-4a36a8d0.9136f98d.js.map
vendored
Normal file
1
public/dist/js/chunk-4a36a8d0.9136f98d.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
4
public/dist/js/chunk-4d75363c.a68f2dc8.js
vendored
Normal file
4
public/dist/js/chunk-4d75363c.a68f2dc8.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/dist/js/chunk-4d75363c.a68f2dc8.js.map
vendored
Normal file
1
public/dist/js/chunk-4d75363c.a68f2dc8.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
public/dist/js/chunk-59f3bcab.45013db3.js
vendored
Normal file
2
public/dist/js/chunk-59f3bcab.45013db3.js
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-59f3bcab"],{"054a":function(e,a,t){"use strict";t.r(a);var l=function(){var e=this,a=e._self._c;return a("div",[a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"goods",staticStyle:{margin:"20px"}},[a("el-form",{ref:"form",attrs:{inline:!0,model:e.form}},[a("el-form-item",{attrs:{label:"查询类别:"}},[a("el-select",{attrs:{placeholder:"全部"},model:{value:e.form.name1,callback:function(a){e.$set(e.form,"name1",a)},expression:"form.name1"}},e._l(e.options,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),a("el-form-item",{attrs:{label:"操作用户"}},[a("el-select",{attrs:{placeholder:"输入操作用户"},model:{value:e.form.name2,callback:function(a){e.$set(e.form,"name2",a)},expression:"form.name2"}},e._l(e.options,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),a("el-form-item",{attrs:{label:"操作时间:"}},[a("el-date-picker",{attrs:{type:"datetimerange","range-separator":"至","start-placeholder":"起","end-placeholder":"止"},model:{value:e.value1,callback:function(a){e.value1=a},expression:"value1"}})],1),a("el-form-item",[a("el-button",{attrs:{type:"primary"}},[e._v("查询")])],1)],1)],1)]),a("el-card",{staticClass:"box-card",staticStyle:{"margin-top":"30px"}},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData}},[a("el-table-column",{attrs:{prop:"id",label:"序号"}}),a("el-table-column",{attrs:{prop:"created_at",label:"时间"}}),a("el-table-column",{attrs:{prop:"target_field",label:"类别"}}),a("el-table-column",{attrs:{prop:"before_update",label:"操作前"}}),a("el-table-column",{attrs:{prop:"after_update",label:"操作后"}}),a("el-table-column",{attrs:{prop:"user.name",label:"操作人"}})],1)],1),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{"current-page":e.current_page,"page-sizes":[15,50,100],"page-size":e.per_page,layout:"total, sizes, prev, pager, next, jumper",total:e.Paginationdata.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)],1)},r=[],n=t("4ff3"),o=t.n(n),s={data(){return{options:[{value:"选项1",label:"黄金糕"},{value:"选项2",label:"双皮奶"},{value:"选项3",label:"蚵仔煎"},{value:"选项4",label:"龙须面"},{value:"选项5",label:"北京烤鸭"}],form:{name1:"",name2:"",name3:"",name4:"",name5:"",name6:""},input:"",value1:"",tableData:[],Paginationdata:{},current_page:1,per_page:15}},methods:{getList(){let e=localStorage.getItem("token");this.current_page,this.per_page;o.a.get("/api/logs",{headers:{Authorization:"Bearer "+e}}).then(e=>{console.log(e),this.tableData=e.data.data,this.Paginationdata=e.data.meta})},handleSizeChange(e){this.per_page=e,this.getList()},handleCurrentChange(e){this.current_page=e,this.getList()}},mounted(){this.getList()}},i=s,u=(t("5bf6"),t("0b56")),c=Object(u["a"])(i,l,r,!1,null,null,null);a["default"]=c.exports},"5bf6":function(e,a,t){"use strict";t("9c14")},"9c14":function(e,a,t){}}]);
|
||||
//# sourceMappingURL=chunk-59f3bcab.45013db3.js.map
|
||||
1
public/dist/js/chunk-59f3bcab.45013db3.js.map
vendored
Normal file
1
public/dist/js/chunk-59f3bcab.45013db3.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
public/dist/js/chunk-5ed10db2.c024642d.js
vendored
Normal file
2
public/dist/js/chunk-5ed10db2.c024642d.js
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5ed10db2"],{"067e":function(e,t,o){},6920:function(e,t,o){"use strict";o("067e")},a55b:function(e,t,o){"use strict";o.r(t);var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"backimg"},[t("div",{staticClass:"sign"},[t("span",{staticClass:"title"},[e._v("Hi 欢迎使用")]),e._m(0),t("p",{staticClass:"title-1"},[e._v("登录")]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.form.name,expression:"form.name"}],attrs:{type:"text",placeholder:"请输入用户名"},domProps:{value:e.form.name},on:{input:function(t){t.target.composing||e.$set(e.form,"name",t.target.value)}}}),t("br"),t("input",{directives:[{name:"model",rawName:"v-model",value:e.form.password,expression:"form.password"}],attrs:{type:"password",placeholder:"请输入密码"},domProps:{value:e.form.password},on:{input:function(t){t.target.composing||e.$set(e.form,"password",t.target.value)}}}),t("br"),t("el-checkbox",{model:{value:e.checked,callback:function(t){e.checked=t},expression:"checked"}},[e._v("记住密码")]),t("br"),t("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.Login()}}},[e._v("登录")])],1)])},a=[function(){var e=this,t=e._self._c;return t("p",{staticClass:"manage"},[t("img",{attrs:{src:o("c663"),alt:""}}),t("span",[e._v("ERP管理系统")])])}],r=o("4ff3"),i=o.n(r),n={data(){return{checked:!1,form:{name:"",password:""}}},mounted(){this.getCookie()},methods:{Login(){!0===this.checked?this.setCookie(this.form.name,this.form.password,!0,7):this.clearCookie(),""===this.form.name||""===this.form.password?this.$message({message:"账号或密码不能为空",type:"error"}):i.a.post("/api/auth/login",this.form).then(e=>{let t=e.data;console.log(t),t.error&&(this.$message({message:"账号或密码错误,请重新输入",type:"error"}),this.form.name="",this.form.password="",this.checked=!1),t.token&&(this.form={},localStorage.setItem("token",t.token),this.$message({message:"成功登录,欢迎来到后台管理系统",type:"success"}),this.$router.push("/GOODS_LIST"))})},setCookie(e,t,o,s){const a=new Date;a.setTime(a.getTime()+864e5*s),window.document.cookie="name="+e+";path=/;expires="+a.toGMTString(),window.document.cookie="password="+t+";path=/;expires="+a.toGMTString(),window.document.cookie="state="+o+";path=/;expires="+a.toGMTString()},getCookie(){if(document.cookie.length>0){const e=document.cookie.split("; ");for(let t=0;t<e.length;t++){const o=e[t].split("=");"name"===o[0]?this.form.name=o[1]:"password"===o[0]?this.form.password=o[1]:"state"===o[0]&&(this.checked=Boolean(o[1]))}}},clearCookie:function(){this.setCookie("","",!1,-1)}}},c=n,m=(o("6920"),o("0b56")),p=Object(m["a"])(c,s,a,!1,null,"4d3b70b5",null);t["default"]=p.exports},c663:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADkAAAA5CAIAAAADehTSAAAAAXNSR0IArs4c6QAABYhJREFUaN7tmv1PW1UYx/svAKIx8SUx+stM9FfdjIkJi/EHMzUzcbpf1LHNiUaX6UwBF8jI3Aiii04jExoGGmCLYhV5GWXjRbpSBCzv671toS29fbl9oW/33nNan0u7An2jve1Fm3DypGkPbe/nfs/3PM85p0jChdMke6x7rHuse6x5/K5Qsvb/YgUghrQ7Lw+vHW1befYr3WPndQ/V6B6vM5ZdsVf3BBcs+SKW5KhiYMpoPtxCllYRxZUQ5JaIviytpk50cNb13IklwkkxphuGyPurI5Tpw/BUfe4CSwSjOmr7yO1CposiqWHfBdbozIVWIgg07B1YJEoqs2DlQ2p+XQajIRZr0umMETK+8E2WoFEHB9QrorBGp86rP4IvMcvF+oOzZgGgkaAvDorFaj39K4wduM36wY0QjgrsblVBjzBWe+UfYrHaPpPHLuNuV0dYHef7iSKButo//1MsVk+7Oiah/ok6zuaFfntlDymU1fn1sFhzizO5IM/HJjLUIbgBuvGWQA8UVXr7F0XMA2tHWjdVfPAc5Mj1bo1A1geqkdMvYn7lU2lxlIwokoLhmLu27JMrHyvPNMIEFZEVY2w8+F3serpHaznbun7fFwJY195qS1VmoRv+5GW5v20uhcm24PTAdePenFHd8o+SRElVrFrSl29TJzuzN6sUElZSVuik/IEGjbasZ3y/fJSP30Yb/tEKYeUT7Zlu4p5HDU/XO+oGsi5aRZVumSoRFVzRu0q92KsEvijoRjz/+9j6lgKUBSv2s+bXmsG4G+smaSZrq/gokgYmVhIN1rSoPyDfRpkTa6QhT8B06KrQ6irVPVwD3xC31mhZMuxPBgoavzM8hQV4YFMGP2t592dQSIColvKOrf6D5916c1JFN1hHftGZQ7mw8lJwyHFpMLYRyDRKq2DFs3nPoVAXaXouFah89JUBlW+7AQSvX0O+oWXDkxdjeTeazh6phYxGFksTy5W9tjd077N+DtXPaA+kBoUYMtvyty8IhziHFxZfxH2bAlPHOxi9A7ZfWxSVwuhTJ7tgSRlZB09Y6TeHJtNQglMbNUTS1Ja1BzDCyO1nTTS7audsHr9SxxfhEp6YrldEchCUOuAzHvzecvSa5/o07AWgKSn64/HZuMSUCHphehklVIEs9gWc3eNTzLl+GLSf67JWyKjyJupYU/SxQhZQE+wK7RtcRt5gZM8Y203AM4s/0LK0ckQxuUE5kgoRHst6/rpOmlKB7rQmRDg4racvyakTV63lycNe1YkDTMwYiLYF7yhwkM9NhNv7yZ05SJPphYQp/1Kv8ksNQfkCQtYDcGfsmtNRLwfxUlFCUO81szrr1k9x5GJQNQRGgZcuhpUb1ho12rOq+eMj028oJg/1q17eiMM3J96+PfWpau7bOXLM4ghwKJPtuCT5OYrWYv3oGgxxalDeAN6bmriUyc4oWWI+3alRYmcu6yxEe22n29LIySt6rAnsG7eBDrFscLQPOe27d/bm6RxPq+iGTWtuxGy65SatjOpWLicAWbPS9fJ0ipY32c60c1Z3kg2PfpnVzuf3bHAHVm/fDJ+MkknLT7UKGUNSiUC8y6eVWDQDpJhbGAemdM4rA9T7LfGsp1qC88akymGOY9Qj4hkgXc7iJ7WRpk41byr6oSw4t5pqhJHTwd6dE88AO58PuFuHI36AnM8YbClR4MbIBeSi/7MzeCBDHr/7pzHvgAYH2DSaQTFlZtWiGiCT9UA4k4SN/T5Wt1QAv23wpdWow+vuwmBliQVRZ1X+WFmWM+oLgBUIOasZ+70F8Fscz2pZ3QVR88GKELKaw7vScmVFHhdmggXACiOPXI7wbrUcWUNI/LSaH1bMMiHEFQArv6VmgruTAfLAmvf/EBC9bu1a+xedeSGU5Z1AjAAAAABJRU5ErkJggg=="}}]);
|
||||
//# sourceMappingURL=chunk-5ed10db2.c024642d.js.map
|
||||
1
public/dist/js/chunk-5ed10db2.c024642d.js.map
vendored
Normal file
1
public/dist/js/chunk-5ed10db2.c024642d.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
4
public/dist/js/chunk-61dfd850.65d633aa.js
vendored
Normal file
4
public/dist/js/chunk-61dfd850.65d633aa.js
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-61dfd850"],{"0a5a":function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return s}));const r="admin_token";function i(){return localStorage.getItem("token")}function s(){return localStorage.removeItem(r)}},"13cd":function(e,t,n){"use strict";n("28b1")},"1e4b":function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e._self._c;return t("div",[t("el-container",[t("el-container",[t("el-aside",{class:e.show?"width":"width1"},[t("el-menu",{attrs:{router:"","background-color":"#282c34","text-color":"#fff","default-active":e.$route.path}},e._l(e.menu,(function(n){return t("div",{key:n.id},[n.children?t("el-submenu",{attrs:{index:n.code}},[t("template",{slot:"title"},[t("span",[e._v(e._s(n.name))])]),e._l(n.children,(function(n){return t("el-menu-item",{key:n.id,attrs:{index:n.code}},[e._v(e._s(n.name))])}))],2):t("el-menu-item",{attrs:{index:n.code}},[t("span",[e._v(e._s(n.name))])])],1)})),0)],1),t("el-main",[t("div",{staticClass:"head"},[t("ul",[t("li",[t("div",{staticClass:"add",on:{click:e.add}},[e.show?t("i",{staticClass:"el-icon-s-unfold"}):t("i",{staticClass:"el-icon-s-fold"})]),t("div",{staticClass:"right"},[t("el-breadcrumb",{attrs:{"separator-class":"el-icon-arrow-right"}},e._l(e.titie,(function(n,r){return t("el-breadcrumb-item",{key:r},[e._v(e._s(n.name))])})),1)],1)]),t("li",[t("div",{staticClass:"token",on:{click:e.hanleLogout}},[e._v("退出")])])])]),t("div",{staticClass:"box-card"},[t("router-view")],1)])],1)],1)],1)},i=[],s=n("0a5a"),a=n("adb5");function o(){return Object(a["a"])({url:"/api/menus",method:"get"})}var u={mounted(){o().then(e=>{this.menu=e.data.data})},data(){return{menu:[],show:!1,levelData:[],titie:[],head:"",onindex:0,openeds:["1"]}},watch:{$route:{handler:function(e){this.titie=e.matched,this.head=e.name,this.levelData.push({name:e.name,path:e.path});const t=[],n={};for(var r=0;r<this.levelData.length;r++)n[this.levelData[r].name]||(t.push(this.levelData[r]),n[this.levelData[r].name]=!0);this.levelData=t},deep:!0,immediate:!0}},methods:{next(){this.hanletop()},hanletop(){document.getElementById("bottom").scrollIntoView({behavior:"smooth"})},hanlebottom(){document.getElementById("top").scrollIntoView({behavior:"smooth"})},hanleLogout(){Object(s["b"])(),this.$router.push({path:"/Login"})},handlerclick(e){this.$route.path!==e&&this.$router.push({path:e})},add(){this.show=!this.show},hanblDelete(e,t){var n=this.levelData[e].name;if(this.onindex=e,this.levelData.splice(this.onindex,1),t===this.head){var r,i;for(let e=0;e<this.levelData.length;e++)r=this.levelData[e].path,i=this.levelData[e].name;this.levelData.length&&i!==n&&this.$router.push({path:r})}}}},c=u,l=(n("13cd"),n("0b56")),d=Object(l["a"])(c,r,i,!1,null,"604626ee",null);t["default"]=d.exports},"28b1":function(e,t,n){},"38bc":function(e,t,n){var r,i;
|
||||
/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
|
||||
* @license MIT */(function(s,a){r=a,i="function"===typeof r?r.call(t,n,t,e):r,void 0===i||(e.exports=i)})(0,(function(){var e={version:"0.2.0"},t=e.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};function n(e,t,n){return e<t?t:e>n?n:e}function r(e){return 100*(-1+e)}function i(e,n,i){var s;return s="translate3d"===t.positionUsing?{transform:"translate3d("+r(e)+"%,0,0)"}:"translate"===t.positionUsing?{transform:"translate("+r(e)+"%,0)"}:{"margin-left":r(e)+"%"},s.transition="all "+n+"ms "+i,s}e.configure=function(e){var n,r;for(n in e)r=e[n],void 0!==r&&e.hasOwnProperty(n)&&(t[n]=r);return this},e.status=null,e.set=function(r){var o=e.isStarted();r=n(r,t.minimum,1),e.status=1===r?null:r;var u=e.render(!o),c=u.querySelector(t.barSelector),l=t.speed,d=t.easing;return u.offsetWidth,s((function(n){""===t.positionUsing&&(t.positionUsing=e.getPositioningCSS()),a(c,i(r,l,d)),1===r?(a(u,{transition:"none",opacity:1}),u.offsetWidth,setTimeout((function(){a(u,{transition:"all "+l+"ms linear",opacity:0}),setTimeout((function(){e.remove(),n()}),l)}),l)):setTimeout(n,l)})),this},e.isStarted=function(){return"number"===typeof e.status},e.start=function(){e.status||e.set(0);var n=function(){setTimeout((function(){e.status&&(e.trickle(),n())}),t.trickleSpeed)};return t.trickle&&n(),this},e.done=function(t){return t||e.status?e.inc(.3+.5*Math.random()).set(1):this},e.inc=function(t){var r=e.status;return r?("number"!==typeof t&&(t=(1-r)*n(Math.random()*r,.1,.95)),r=n(r+t,0,.994),e.set(r)):e.start()},e.trickle=function(){return e.inc(Math.random()*t.trickleRate)},function(){var t=0,n=0;e.promise=function(r){return r&&"resolved"!==r.state()?(0===n&&e.start(),t++,n++,r.always((function(){n--,0===n?(t=0,e.done()):e.set((t-n)/t)})),this):this}}(),e.render=function(n){if(e.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var i=document.createElement("div");i.id="nprogress",i.innerHTML=t.template;var s,o=i.querySelector(t.barSelector),c=n?"-100":r(e.status||0),l=document.querySelector(t.parent);return a(o,{transition:"all 0 linear",transform:"translate3d("+c+"%,0,0)"}),t.showSpinner||(s=i.querySelector(t.spinnerSelector),s&&d(s)),l!=document.body&&u(l,"nprogress-custom-parent"),l.appendChild(i),i},e.remove=function(){c(document.documentElement,"nprogress-busy"),c(document.querySelector(t.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&d(e)},e.isRendered=function(){return!!document.getElementById("nprogress")},e.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var s=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),a=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;var r,i=e.length,s=t.charAt(0).toUpperCase()+t.slice(1);while(i--)if(r=e[i]+s,r in n)return r;return t}function i(e){return e=n(e),t[e]||(t[e]=r(e))}function s(e,t,n){t=i(t),e.style[t]=n}return function(e,t){var n,r,i=arguments;if(2==i.length)for(n in t)r=t[n],void 0!==r&&t.hasOwnProperty(n)&&s(e,n,r);else s(e,i[1],i[2])}}();function o(e,t){var n="string"==typeof e?e:l(e);return n.indexOf(" "+t+" ")>=0}function u(e,t){var n=l(e),r=n+t;o(n,t)||(e.className=r.substring(1))}function c(e,t){var n,r=l(e);o(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function l(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function d(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return e}))},"70e7":function(e,t,n){},adb5:function(e,t,n){"use strict";var r=n("4ff3"),i=n.n(r),s=n("0a5a"),a=n("38bc"),o=n.n(a),u=(n("70e7"),n("5422")),c=(n("a18c"),i.a.create({timeout:1e4}));c.interceptors.request.use(e=>(e.headers.Authorization="Bearer "+Object(s["a"])(),o.a.start(),e),e=>(console.log(e,"222222"),Promise.reject(e))),c.interceptors.response.use(e=>{o.a.done();const t=e.status;if(200===t||201===t)return e;Object(u["Message"])({message:"Error",type:"error"})},e=>(Object(u["Message"])({message:e,type:"error"}),console.log(e,"44444"),Promise.reject(e))),t["a"]=c}}]);
|
||||
//# sourceMappingURL=chunk-61dfd850.65d633aa.js.map
|
||||
1
public/dist/js/chunk-61dfd850.65d633aa.js.map
vendored
Normal file
1
public/dist/js/chunk-61dfd850.65d633aa.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
4
public/dist/js/chunk-62101cb8.0d2ed3f5.js
vendored
Normal file
4
public/dist/js/chunk-62101cb8.0d2ed3f5.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/dist/js/chunk-62101cb8.0d2ed3f5.js.map
vendored
Normal file
1
public/dist/js/chunk-62101cb8.0d2ed3f5.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
4
public/dist/js/chunk-7136ffb6.3fc0cbd6.js
vendored
Normal file
4
public/dist/js/chunk-7136ffb6.3fc0cbd6.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/dist/js/chunk-7136ffb6.3fc0cbd6.js.map
vendored
Normal file
1
public/dist/js/chunk-7136ffb6.3fc0cbd6.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
4
public/dist/js/chunk-744a6ffe.85ecc07f.js
vendored
Normal file
4
public/dist/js/chunk-744a6ffe.85ecc07f.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/dist/js/chunk-744a6ffe.85ecc07f.js.map
vendored
Normal file
1
public/dist/js/chunk-744a6ffe.85ecc07f.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
4
public/dist/js/chunk-8eb4b592.a7ab2ed3.js
vendored
Normal file
4
public/dist/js/chunk-8eb4b592.a7ab2ed3.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/dist/js/chunk-8eb4b592.a7ab2ed3.js.map
vendored
Normal file
1
public/dist/js/chunk-8eb4b592.a7ab2ed3.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
4
public/dist/js/chunk-959f9a24.49c53be2.js
vendored
Normal file
4
public/dist/js/chunk-959f9a24.49c53be2.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/dist/js/chunk-959f9a24.49c53be2.js.map
vendored
Normal file
1
public/dist/js/chunk-959f9a24.49c53be2.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
34
public/dist/js/chunk-vendors.dc4080e5.js
vendored
Normal file
34
public/dist/js/chunk-vendors.dc4080e5.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/dist/js/chunk-vendors.dc4080e5.js.map
vendored
Normal file
1
public/dist/js/chunk-vendors.dc4080e5.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -148,6 +148,11 @@ return [
|
||||
'name' => '删除',
|
||||
'parent_id' => 5,
|
||||
],
|
||||
'business.goods_sku.download' => [
|
||||
'id' => 55,
|
||||
'name' => '商品下载',
|
||||
'parent_id' => 5,
|
||||
],
|
||||
// 用户管理
|
||||
'USER_MANAGE' => [
|
||||
'id' => 6,
|
||||
@ -225,6 +230,11 @@ return [
|
||||
'name' => '列表',
|
||||
'parent_id' => 9,
|
||||
],
|
||||
'upload.file' => [
|
||||
'id' => 11,
|
||||
'name' => '文件上传',
|
||||
'parent_id' => 7,
|
||||
],
|
||||
// 系统日志
|
||||
'SYSTEM_LOG' => [
|
||||
'id' => 10,
|
||||
|
||||
0
resources/templates/goods_skus_import.xlsx
Executable file → Normal file
0
resources/templates/goods_skus_import.xlsx
Executable file → Normal file
@ -34,6 +34,7 @@ Route::middleware(['auth:api', 'check.permissions'])->group(function () {
|
||||
// 店铺
|
||||
Route::resource('shops', 'Shop\ShopsController', ['only' => ['index', 'store', 'show', 'update', 'destroy']]);
|
||||
Route::get('count/orders/num', [ShopsController::class, 'countOrdersNumWithSkuCode'])->name('goods_sku.orders_num');
|
||||
Route::get('download/{id}/goods', [ShopsController::class, 'downloadGoods'])->name('business.goods_sku.download');
|
||||
// 角色
|
||||
Route::resource('roles', 'Role\RolesController', ['only' => ['index', 'store', 'show', 'update']]);
|
||||
Route::post('roles/{id}/permissions', [RolesController::class, 'addPermissions'])->name('roles.permission');
|
||||
|
||||
@ -16,21 +16,9 @@ use App\Http\Controllers\Shop\ShopsController;
|
||||
*/
|
||||
|
||||
Route::get('/', function () {
|
||||
return view('welcome');
|
||||
header('Location: ' . url()->current() . "/dist");
|
||||
});
|
||||
|
||||
Route::get('/home', function () {
|
||||
return view('home');
|
||||
})->name('home');
|
||||
|
||||
Route::get('/login', function () {
|
||||
return view('welcome');
|
||||
})->name('login');
|
||||
|
||||
Route::get('/register', function () {
|
||||
return view('welcome');
|
||||
})->name('register');
|
||||
|
||||
Route::get('goods_skus/export', [GoodsSkusController::class, 'export'])->name('goods_skus.export')->middleware('check.permissions');
|
||||
|
||||
Route::get('goods/import/template', [GoodsController::class, 'download'])->name('download.goods_import.template');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user