feat: #10000 团购优化
This commit is contained in:
parent
66f1d9726d
commit
203d977e71
@ -8,21 +8,13 @@ use App\Http\Requests\GroupsRequest;
|
|||||||
use App\Http\Resources\GoodsSkuResource;
|
use App\Http\Resources\GoodsSkuResource;
|
||||||
use App\Models\Goods;
|
use App\Models\Goods;
|
||||||
use App\Models\GoodsSku;
|
use App\Models\GoodsSku;
|
||||||
use App\Models\Log as LogModel;
|
|
||||||
use App\Models\Shop;
|
|
||||||
use App\Utils\ArrayUtils;
|
use App\Utils\ArrayUtils;
|
||||||
use App\Utils\DateTimeUtils;
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
use Illuminate\Support\Facades\Validator;
|
use Illuminate\Support\Facades\Validator;
|
||||||
use App\Models\Groups;
|
use App\Models\Groups;
|
||||||
use App\Http\Requests\GoodsRequest;
|
|
||||||
use Illuminate\Validation\Rule;
|
|
||||||
use Illuminate\Validation\ValidationException;
|
|
||||||
use App\Http\Resources\GroupsResource;
|
use App\Http\Resources\GroupsResource;
|
||||||
use App\Models\GroupGoods;
|
use App\Models\GroupGoods;
|
||||||
use App\Http\Resources\GroupGoodsResource;
|
|
||||||
use Illuminate\Support\Facades\Cache;
|
|
||||||
|
|
||||||
class GroupsController extends Controller
|
class GroupsController extends Controller
|
||||||
{
|
{
|
||||||
@ -34,8 +26,8 @@ class GroupsController extends Controller
|
|||||||
public function index(Request $request)
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
$groups = Groups::query()
|
$groups = Groups::query()
|
||||||
|
->where('parent_id', 0)
|
||||||
->filter()
|
->filter()
|
||||||
->with(['shop:id,name'])
|
|
||||||
->paginate($request->get('per_page'));
|
->paginate($request->get('per_page'));
|
||||||
|
|
||||||
return GroupsResource::collection($groups);
|
return GroupsResource::collection($groups);
|
||||||
@ -59,11 +51,9 @@ class GroupsController extends Controller
|
|||||||
->toArray();
|
->toArray();
|
||||||
$changeData = $request->change_data;
|
$changeData = $request->change_data;
|
||||||
$changeData = ArrayUtils::index($changeData, 'id');
|
$changeData = ArrayUtils::index($changeData, 'id');
|
||||||
$shop = Shop::query()->find($request->shop_id);
|
|
||||||
DB::beginTransaction();
|
DB::beginTransaction();
|
||||||
try {
|
try {
|
||||||
$group = new Groups();
|
$group = new Groups();
|
||||||
$group->shop_id = $request->shop_id;
|
|
||||||
$group->title = $request->title;
|
$group->title = $request->title;
|
||||||
$group->is_save_preview = $request->is_save_preview;
|
$group->is_save_preview = $request->is_save_preview;
|
||||||
$group->start_time = $request->datetimerange[0];
|
$group->start_time = $request->datetimerange[0];
|
||||||
@ -71,7 +61,7 @@ class GroupsController extends Controller
|
|||||||
$group->save();
|
$group->save();
|
||||||
$groupGoods = [];
|
$groupGoods = [];
|
||||||
foreach ($skus as $sku) {
|
foreach ($skus as $sku) {
|
||||||
$price = $shop['ratio'] * $sku['cost'] * 100;
|
$price = $sku['cost'] * 100;
|
||||||
$groupGoods[] = [
|
$groupGoods[] = [
|
||||||
'group_id' => $group->id,
|
'group_id' => $group->id,
|
||||||
'category_name' => $sku['goods']['type']['name'],
|
'category_name' => $sku['goods']['type']['name'],
|
||||||
@ -114,8 +104,6 @@ class GroupsController extends Controller
|
|||||||
|
|
||||||
return response($this->res, $this->res['httpCode']);
|
return response($this->res, $this->res['httpCode']);
|
||||||
}
|
}
|
||||||
$shop = Shop::query()->find($request->shop_id);
|
|
||||||
$shop['ratio'] = 1;
|
|
||||||
$deleteIds = $request->delete_ids;
|
$deleteIds = $request->delete_ids;
|
||||||
$ids = GroupGoods::query()
|
$ids = GroupGoods::query()
|
||||||
->where('group_id', $id)
|
->where('group_id', $id)
|
||||||
@ -138,7 +126,7 @@ class GroupsController extends Controller
|
|||||||
$group->save();
|
$group->save();
|
||||||
GroupGoods::where('group_id', $id)->whereIn('sku_id', $deleteIds)->delete();
|
GroupGoods::where('group_id', $id)->whereIn('sku_id', $deleteIds)->delete();
|
||||||
foreach ($skus as $sku) {
|
foreach ($skus as $sku) {
|
||||||
$price = $shop['ratio'] * $sku['cost'] * 100;
|
$price = $sku['cost'] * 100;
|
||||||
$groupGoods = [
|
$groupGoods = [
|
||||||
'category_name' => $sku['goods']['type']['name'],
|
'category_name' => $sku['goods']['type']['name'],
|
||||||
'type_id' => $sku['goods']['type']['id'],
|
'type_id' => $sku['goods']['type']['id'],
|
||||||
@ -174,8 +162,6 @@ class GroupsController extends Controller
|
|||||||
|
|
||||||
public function getGoods(Request $request)
|
public function getGoods(Request $request)
|
||||||
{
|
{
|
||||||
$shop = Shop::query()->find($request->get('shop_id'));
|
|
||||||
$shop['ratio'] = 1;
|
|
||||||
$deleteIds = $request->get('delete_ids') ?: [];
|
$deleteIds = $request->get('delete_ids') ?: [];
|
||||||
$groupId = $request->get('group_id');
|
$groupId = $request->get('group_id');
|
||||||
$groupGoods = GroupGoods::query()
|
$groupGoods = GroupGoods::query()
|
||||||
@ -240,7 +226,7 @@ class GroupsController extends Controller
|
|||||||
$goodsSku['sort'] = $groupGoods[$goodsSku['id']]['sort'];
|
$goodsSku['sort'] = $groupGoods[$goodsSku['id']]['sort'];
|
||||||
$goodsSku['limit_buy'] = $groupGoods[$goodsSku['id']]['limit_buy'];
|
$goodsSku['limit_buy'] = $groupGoods[$goodsSku['id']]['limit_buy'];
|
||||||
} else {
|
} else {
|
||||||
$goodsSku['price_in_fen'] = $shop['ratio'] * $goodsSku['cost'];
|
$goodsSku['price_in_fen'] = $goodsSku['cost'];
|
||||||
$goodsSku['sort'] = 500;
|
$goodsSku['sort'] = 500;
|
||||||
$goodsSku['limit_buy'] = 0;
|
$goodsSku['limit_buy'] = 0;
|
||||||
}
|
}
|
||||||
@ -254,8 +240,6 @@ class GroupsController extends Controller
|
|||||||
|
|
||||||
public function addGroupGoods(Request $request)
|
public function addGroupGoods(Request $request)
|
||||||
{
|
{
|
||||||
$shop = Shop::query()->find($request->get('shop_id'));
|
|
||||||
$shop['ratio'] = 1;
|
|
||||||
$ids = [];
|
$ids = [];
|
||||||
if ($newIds = $request->get('new_ids')) {
|
if ($newIds = $request->get('new_ids')) {
|
||||||
$ids = array_merge($ids, $newIds);
|
$ids = array_merge($ids, $newIds);
|
||||||
@ -271,7 +255,7 @@ class GroupsController extends Controller
|
|||||||
->orderBy('updated_at', 'desc')
|
->orderBy('updated_at', 'desc')
|
||||||
->paginate($request->get('per_page'));
|
->paginate($request->get('per_page'));
|
||||||
foreach ($goodsSkus as &$goodsSku) {
|
foreach ($goodsSkus as &$goodsSku) {
|
||||||
$goodsSku['price_in_fen'] = $shop['ratio'] * $goodsSku['cost'];
|
$goodsSku['price_in_fen'] = $goodsSku['cost'];
|
||||||
$goodsSku['sort'] = 500;
|
$goodsSku['sort'] = 500;
|
||||||
$goodsSku['limit_buy'] = 0;
|
$goodsSku['limit_buy'] = 0;
|
||||||
$goodsSku['goods_name'] = $goodsSku['goods']['title'] . ' ' . $goodsSku['title'];
|
$goodsSku['goods_name'] = $goodsSku['goods']['title'] . ' ' . $goodsSku['title'];
|
||||||
|
|||||||
@ -25,7 +25,6 @@ class GroupsRequest extends FormRequest
|
|||||||
public function rules()
|
public function rules()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'shop_id' => ['required', 'integer', 'exists:shops,id'],
|
|
||||||
'title' => ['required', 'string'],
|
'title' => ['required', 'string'],
|
||||||
'datetimerange' => ['required', 'array'],
|
'datetimerange' => ['required', 'array'],
|
||||||
'is_save_preview' => ['required', 'integer'],
|
'is_save_preview' => ['required', 'integer'],
|
||||||
|
|||||||
@ -30,7 +30,7 @@ class GroupGoods extends Model
|
|||||||
|
|
||||||
public function getPriceInFenAttribute($value)
|
public function getPriceInFenAttribute($value)
|
||||||
{
|
{
|
||||||
return round($value / 100, 2);
|
return $value / 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function goods()
|
public function goods()
|
||||||
|
|||||||
@ -50,6 +50,17 @@ class Groups extends Model
|
|||||||
return $map[$value];
|
return $map[$value];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getCreateStatusAttribute($value)
|
||||||
|
{
|
||||||
|
$map = [
|
||||||
|
1 => '创建成功',
|
||||||
|
2 => '创建失败',
|
||||||
|
3 => '创建中',
|
||||||
|
];
|
||||||
|
|
||||||
|
return $map[$value];
|
||||||
|
}
|
||||||
|
|
||||||
public function shop()
|
public function shop()
|
||||||
{
|
{
|
||||||
return $this->hasOne(Shop::class, 'id', 'shop_id');
|
return $this->hasOne(Shop::class, 'id', 'shop_id');
|
||||||
|
|||||||
@ -15,6 +15,7 @@ class Groups
|
|||||||
$groupGoods = GroupGoods::query()
|
$groupGoods = GroupGoods::query()
|
||||||
->where('group_id', $group->id)
|
->where('group_id', $group->id)
|
||||||
->with(['goodsSku:id,stock'])
|
->with(['goodsSku:id,stock'])
|
||||||
|
->orderBy('sort')
|
||||||
->get();
|
->get();
|
||||||
$goodsSkus = [];
|
$goodsSkus = [];
|
||||||
foreach ($groupGoods as $item) {
|
foreach ($groupGoods as $item) {
|
||||||
@ -26,7 +27,7 @@ class Groups
|
|||||||
'market_price' => $item['market_price'],
|
'market_price' => $item['market_price'],
|
||||||
'sku_list' => [[
|
'sku_list' => [[
|
||||||
'external_sku_id' => $item['external_sku_id'],
|
'external_sku_id' => $item['external_sku_id'],
|
||||||
'price_in_fen' => $item['price_in_fen'],
|
'price_in_fen' => $item['price_in_fen'] * 100,
|
||||||
'quantity_type' => 0,
|
'quantity_type' => 0,
|
||||||
'spec_id_list' => [],
|
'spec_id_list' => [],
|
||||||
'total_quantity' => $item['goodsSku']['stock'],
|
'total_quantity' => $item['goodsSku']['stock'],
|
||||||
@ -39,6 +40,7 @@ class Groups
|
|||||||
'is_save_preview' => $group['is_save_preview'],
|
'is_save_preview' => $group['is_save_preview'],
|
||||||
'start_time' => $group->getOriginal('start_time'),
|
'start_time' => $group->getOriginal('start_time'),
|
||||||
'title' => $group['title'],
|
'title' => $group['title'],
|
||||||
|
'isv_no' => $group['activity_no'] ?: '',
|
||||||
];
|
];
|
||||||
|
|
||||||
return [$type, $appendParams];
|
return [$type, $appendParams];
|
||||||
|
|||||||
@ -181,20 +181,24 @@ class KuaiTuanTuan extends BusinessClient
|
|||||||
$res = $this->doRequest($type, $appendParams);
|
$res = $this->doRequest($type, $appendParams);
|
||||||
if (isset($res['response'])) {
|
if (isset($res['response'])) {
|
||||||
$group = GroupsModel::query()->find($localGroupId);
|
$group = GroupsModel::query()->find($localGroupId);
|
||||||
$group->error_msg = $res['response']['error_msg'];
|
$group->create_status = $res['response']['status'];
|
||||||
|
if (1 === $res['response']['status']) {
|
||||||
$group->qr_code_url = $res['response']['qr_code_url'];
|
$group->qr_code_url = $res['response']['qr_code_url'];
|
||||||
$group->status = $res['response']['status'];
|
|
||||||
$group->save();
|
|
||||||
foreach ($res['response']['goods_list'] as $goods) {
|
foreach ($res['response']['goods_list'] as $goods) {
|
||||||
$groupGoods = GroupGoods::query()
|
$groupGoods = GroupGoods::query()
|
||||||
->where('group_id', $localGroupId)
|
->where('group_id', $localGroupId)
|
||||||
->where('external_sku_id', $goods['external_sku_id'])
|
->where('external_sku_id', $goods['sku_list'][0]['external_sku_id'])
|
||||||
->find();
|
->first();
|
||||||
$groupGoods->erp_goods_id = $goods['goods_id'];
|
$groupGoods->ktt_goods_id = $goods['goods_id'];
|
||||||
$groupGoods->erp_sku_id = $goods['sku_list'][0]['sku_id'];
|
$groupGoods->ktt_sku_id = $goods['sku_list'][0]['sku_id'];
|
||||||
$groupGoods->save();
|
$groupGoods->save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (2 === $res['response']['status']) {
|
||||||
|
$group->error_msg = $res['response']['error_msg'];
|
||||||
|
}
|
||||||
|
$group->save();
|
||||||
|
}
|
||||||
|
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
@ -202,7 +206,18 @@ class KuaiTuanTuan extends BusinessClient
|
|||||||
public function queryGroup()
|
public function queryGroup()
|
||||||
{
|
{
|
||||||
[$type, $appendParams] = Groups::queryGroup();
|
[$type, $appendParams] = Groups::queryGroup();
|
||||||
|
$res = $this->doRequest($type, $appendParams);
|
||||||
|
if (isset($res['ktt_group_query_list_response'])) {
|
||||||
|
foreach ($res['ktt_group_query_list_response']['activity_list'] as $activity) {
|
||||||
|
$group = GroupsModel::query()->where('activity_no', $activity['activity_no'])->first();
|
||||||
|
if ($group) {
|
||||||
|
$group->is_help_sell = $activity[''];
|
||||||
|
$group->status = $activity[''];
|
||||||
|
$group->save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $this->doRequest($type, $appendParams);
|
return $res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,6 +27,7 @@ class CreateGoodsSkusTable extends Migration
|
|||||||
$table->unsignedInteger('yesterday_num')->default(0)->comment('1天前库存');
|
$table->unsignedInteger('yesterday_num')->default(0)->comment('1天前库存');
|
||||||
$table->unsignedDecimal('reference_price')->default(0)->comment('参考售价');
|
$table->unsignedDecimal('reference_price')->default(0)->comment('参考售价');
|
||||||
$table->unsignedInteger('reserve')->default(0)->comment('预留量');
|
$table->unsignedInteger('reserve')->default(0)->comment('预留量');
|
||||||
|
$table->text('thumb_url')->nullable()->comment('sku图url');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
// 索引
|
// 索引
|
||||||
$table->unique(['goods_id', 'sku_code']);
|
$table->unique(['goods_id', 'sku_code']);
|
||||||
|
|||||||
@ -29,7 +29,7 @@ class CreateShopsTable extends Migration
|
|||||||
$table->text('scope')->nullable()->comment('接口列表');
|
$table->text('scope')->nullable()->comment('接口列表');
|
||||||
$table->text('pop_auth_token_create_response')->nullable()->comment('授权认证信息');
|
$table->text('pop_auth_token_create_response')->nullable()->comment('授权认证信息');
|
||||||
$table->unsignedTinyInteger('status')->index()->default(0)->comment('状态');
|
$table->unsignedTinyInteger('status')->index()->default(0)->comment('状态');
|
||||||
$table->decimal('ratio')->default(1)->comment('成本倍率');
|
$table->string('ratio')->default('*1')->comment('成本变动');
|
||||||
$table->softDeletes();
|
$table->softDeletes();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
//索引
|
//索引
|
||||||
|
|||||||
@ -16,7 +16,8 @@ class CreateGroupsTable extends Migration
|
|||||||
Schema::defaultStringLength(191);
|
Schema::defaultStringLength(191);
|
||||||
Schema::create('groups', function (Blueprint $table) {
|
Schema::create('groups', function (Blueprint $table) {
|
||||||
$table->bigIncrements('id');
|
$table->bigIncrements('id');
|
||||||
$table->unsignedInteger('shop_id');
|
$table->unsignedInteger('shop_id')->default(0);
|
||||||
|
$table->unsignedInteger('parent_id')->default(0);
|
||||||
$table->unsignedBigInteger('end_time');
|
$table->unsignedBigInteger('end_time');
|
||||||
$table->unsignedTinyInteger('is_save_preview')->comment('是否保存为预览团0-不为预览团,1-预览团');
|
$table->unsignedTinyInteger('is_save_preview')->comment('是否保存为预览团0-不为预览团,1-预览团');
|
||||||
$table->unsignedBigInteger('start_time');
|
$table->unsignedBigInteger('start_time');
|
||||||
|
|||||||
@ -22,12 +22,12 @@ class CreateGroupGoodsTable extends Migration
|
|||||||
$table->string('goods_desc')->nullable();
|
$table->string('goods_desc')->nullable();
|
||||||
$table->string('goods_name');
|
$table->string('goods_name');
|
||||||
$table->unsignedBigInteger('goods_id');
|
$table->unsignedBigInteger('goods_id');
|
||||||
$table->unsignedInteger('ktt_goods_id');
|
$table->unsignedBigInteger('ktt_goods_id')->nullable();
|
||||||
$table->unsignedInteger('limit_buy')->default(0);
|
$table->unsignedInteger('limit_buy')->default(0);
|
||||||
$table->unsignedBigInteger('market_price')->default(0);
|
$table->unsignedBigInteger('market_price')->default(0);
|
||||||
$table->text('pic_url_list')->nullable();
|
$table->text('pic_url_list')->nullable();
|
||||||
$table->unsignedBigInteger('sku_id');
|
$table->unsignedBigInteger('sku_id');
|
||||||
$table->unsignedInteger('ktt_sku_id');
|
$table->unsignedBigInteger('ktt_sku_id')->nullable();
|
||||||
$table->string('external_sku_id');
|
$table->string('external_sku_id');
|
||||||
$table->unsignedBigInteger('price_in_fen');
|
$table->unsignedBigInteger('price_in_fen');
|
||||||
$table->unsignedTinyInteger('quantity_type')->default(0)->comment('库存类型,0-普通 1-无限,无限库存时会无视total_quantity字段');
|
$table->unsignedTinyInteger('quantity_type')->default(0)->comment('库存类型,0-普通 1-无限,无限库存时会无视total_quantity字段');
|
||||||
|
|||||||
@ -1 +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-538fe600]{text-decoration:none;color:#fff}.block[data-v-538fe600]{margin-top:20px}
|
#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-1cc99200]{text-decoration:none;color:#fff}.block[data-v-1cc99200]{margin-top:20px}
|
||||||
2
public/dist/index.html
vendored
2
public/dist/index.html
vendored
@ -1 +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>erp</title><link href="css/chunk-0cbcaa56.e05858e7.css" rel="prefetch"><link href="css/chunk-10d9ee19.84a6683c.css" rel="prefetch"><link href="css/chunk-20c83087.d0b599f3.css" rel="prefetch"><link href="css/chunk-20ee929b.902ebb66.css" rel="prefetch"><link href="css/chunk-26daa808.62429343.css" rel="prefetch"><link href="css/chunk-35db73ce.1f9c10ff.css" rel="prefetch"><link href="css/chunk-38b35ffa.1005fa16.css" rel="prefetch"><link href="css/chunk-3ebcaff1.902ebb66.css" rel="prefetch"><link href="css/chunk-4caed774.ad94328f.css" rel="prefetch"><link href="css/chunk-4f15b41a.2cf53495.css" rel="prefetch"><link href="css/chunk-52fcdd7c.51e3ffbd.css" rel="prefetch"><link href="css/chunk-5782cef6.902ebb66.css" rel="prefetch"><link href="css/chunk-6995cb27.902ebb66.css" rel="prefetch"><link href="css/chunk-6ae0a0d3.84a02b23.css" rel="prefetch"><link href="css/chunk-75426f71.902ebb66.css" rel="prefetch"><link href="css/chunk-f35dfe36.ea52b615.css" rel="prefetch"><link href="js/chunk-0cbcaa56.46e3dd42.js" rel="prefetch"><link href="js/chunk-10d9ee19.6bc719ae.js" rel="prefetch"><link href="js/chunk-20c83087.a3787c22.js" rel="prefetch"><link href="js/chunk-20ee929b.97f64c98.js" rel="prefetch"><link href="js/chunk-26daa808.a340b60b.js" rel="prefetch"><link href="js/chunk-35db73ce.e1ffc5fa.js" rel="prefetch"><link href="js/chunk-38b35ffa.6daa44bc.js" rel="prefetch"><link href="js/chunk-3ebcaff1.b3f1815c.js" rel="prefetch"><link href="js/chunk-4caed774.92751344.js" rel="prefetch"><link href="js/chunk-4f15b41a.8943bdec.js" rel="prefetch"><link href="js/chunk-52fcdd7c.0f505f93.js" rel="prefetch"><link href="js/chunk-5782cef6.379f5198.js" rel="prefetch"><link href="js/chunk-63c1eac8.59f3df74.js" rel="prefetch"><link href="js/chunk-6995cb27.94c8f05b.js" rel="prefetch"><link href="js/chunk-6ae0a0d3.b08743d0.js" rel="prefetch"><link href="js/chunk-75426f71.1a12b5c7.js" rel="prefetch"><link href="js/chunk-f35dfe36.e7038b09.js" rel="prefetch"><link href="css/app.6c30acd7.css" rel="preload" as="style"><link href="css/chunk-vendors.9181e156.css" rel="preload" as="style"><link href="js/app.7287a242.js" rel="preload" as="script"><link href="js/chunk-vendors.13743003.js" rel="preload" as="script"><link href="css/chunk-vendors.9181e156.css" rel="stylesheet"><link href="css/app.6c30acd7.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but erp doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.13743003.js"></script><script src="js/app.7287a242.js"></script></body></html>
|
<!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>erp</title><link href="css/chunk-0cbcaa56.e05858e7.css" rel="prefetch"><link href="css/chunk-0f6f9608.b3153d73.css" rel="prefetch"><link href="css/chunk-10d9ee19.84a6683c.css" rel="prefetch"><link href="css/chunk-26daa808.62429343.css" rel="prefetch"><link href="css/chunk-3263e44c.902ebb66.css" rel="prefetch"><link href="css/chunk-35db73ce.1f9c10ff.css" rel="prefetch"><link href="css/chunk-38b35ffa.1005fa16.css" rel="prefetch"><link href="css/chunk-4caed774.ad94328f.css" rel="prefetch"><link href="css/chunk-4f15b41a.2cf53495.css" rel="prefetch"><link href="css/chunk-52fcdd7c.51e3ffbd.css" rel="prefetch"><link href="css/chunk-6ae0a0d3.84a02b23.css" rel="prefetch"><link href="css/chunk-75426f71.902ebb66.css" rel="prefetch"><link href="css/chunk-7e4f04a0.902ebb66.css" rel="prefetch"><link href="css/chunk-904e5abc.902ebb66.css" rel="prefetch"><link href="css/chunk-a3ddd952.902ebb66.css" rel="prefetch"><link href="css/chunk-f35dfe36.ea52b615.css" rel="prefetch"><link href="js/chunk-0cbcaa56.46e3dd42.js" rel="prefetch"><link href="js/chunk-0f6f9608.540fa080.js" rel="prefetch"><link href="js/chunk-10d9ee19.6bc719ae.js" rel="prefetch"><link href="js/chunk-26daa808.a340b60b.js" rel="prefetch"><link href="js/chunk-3263e44c.eebefad0.js" rel="prefetch"><link href="js/chunk-35db73ce.e1ffc5fa.js" rel="prefetch"><link href="js/chunk-38b35ffa.6daa44bc.js" rel="prefetch"><link href="js/chunk-4caed774.92751344.js" rel="prefetch"><link href="js/chunk-4f15b41a.8943bdec.js" rel="prefetch"><link href="js/chunk-52fcdd7c.0f505f93.js" rel="prefetch"><link href="js/chunk-63c1eac8.59f3df74.js" rel="prefetch"><link href="js/chunk-6ae0a0d3.b08743d0.js" rel="prefetch"><link href="js/chunk-75426f71.1a12b5c7.js" rel="prefetch"><link href="js/chunk-7e4f04a0.837edc19.js" rel="prefetch"><link href="js/chunk-904e5abc.57158e02.js" rel="prefetch"><link href="js/chunk-a3ddd952.dc1ed0be.js" rel="prefetch"><link href="js/chunk-f35dfe36.e7038b09.js" rel="prefetch"><link href="css/app.6c30acd7.css" rel="preload" as="style"><link href="css/chunk-vendors.9181e156.css" rel="preload" as="style"><link href="js/app.71d94a18.js" rel="preload" as="script"><link href="js/chunk-vendors.13743003.js" rel="preload" as="script"><link href="css/chunk-vendors.9181e156.css" rel="stylesheet"><link href="css/app.6c30acd7.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but erp doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.13743003.js"></script><script src="js/app.71d94a18.js"></script></body></html>
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
4
public/dist/js/chunk-20ee929b.97f64c98.js
vendored
4
public/dist/js/chunk-20ee929b.97f64c98.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
4
public/dist/js/chunk-3263e44c.eebefad0.js
vendored
Normal file
4
public/dist/js/chunk-3263e44c.eebefad0.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/dist/js/chunk-3263e44c.eebefad0.js.map
vendored
Normal file
1
public/dist/js/chunk-3263e44c.eebefad0.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
4
public/dist/js/chunk-3ebcaff1.b3f1815c.js
vendored
4
public/dist/js/chunk-3ebcaff1.b3f1815c.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
4
public/dist/js/chunk-5782cef6.379f5198.js
vendored
4
public/dist/js/chunk-5782cef6.379f5198.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
4
public/dist/js/chunk-7e4f04a0.837edc19.js
vendored
Normal file
4
public/dist/js/chunk-7e4f04a0.837edc19.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/dist/js/chunk-7e4f04a0.837edc19.js.map
vendored
Normal file
1
public/dist/js/chunk-7e4f04a0.837edc19.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
4
public/dist/js/chunk-904e5abc.57158e02.js
vendored
Normal file
4
public/dist/js/chunk-904e5abc.57158e02.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/dist/js/chunk-904e5abc.57158e02.js.map
vendored
Normal file
1
public/dist/js/chunk-904e5abc.57158e02.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -2,12 +2,6 @@
|
|||||||
<div>
|
<div>
|
||||||
<el-card style="margin-top: 10px" class="box-card">
|
<el-card style="margin-top: 10px" class="box-card">
|
||||||
<el-form ref="group" :rules="rules" :model="group" label-width="80px">
|
<el-form ref="group" :rules="rules" :model="group" label-width="80px">
|
||||||
<el-form-item label="店铺" prop="shop_id">
|
|
||||||
<el-select v-model="group.shop_id">
|
|
||||||
<el-option v-for="store in stores" :key="store.id" :label="store.name" :value="store.id">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="活动标题" prop="title">
|
<el-form-item label="活动标题" prop="title">
|
||||||
<el-input type="textarea" v-model="group.title" style="width: 500px;"></el-input>
|
<el-input type="textarea" v-model="group.title" style="width: 500px;"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -168,7 +162,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { storeList } from "../../api/shop";
|
|
||||||
import { addGroup, addGroupGoods } from "../../api/group";
|
import { addGroup, addGroupGoods } from "../../api/group";
|
||||||
import { goods_types, Brand_goods_types } from "../../api/rankingData";
|
import { goods_types, Brand_goods_types } from "../../api/rankingData";
|
||||||
import { getGoodsList } from "../../api/goods";
|
import { getGoodsList } from "../../api/goods";
|
||||||
@ -176,15 +169,11 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
group: {
|
group: {
|
||||||
shop_id: '',
|
|
||||||
title: "",
|
title: "",
|
||||||
is_save_preview: 1,
|
is_save_preview: 1,
|
||||||
datetimerange: [],
|
datetimerange: [],
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
shop_id: [
|
|
||||||
{ required: true, message: '请选择店铺' },
|
|
||||||
],
|
|
||||||
title: [
|
title: [
|
||||||
{ required: true, message: '请输入活动标题', trigger: 'blur' },
|
{ required: true, message: '请输入活动标题', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
@ -218,7 +207,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
centerDialogVisible: false,
|
centerDialogVisible: false,
|
||||||
stores: [],
|
|
||||||
types: [],
|
types: [],
|
||||||
brands: [],
|
brands: [],
|
||||||
goodsList: {
|
goodsList: {
|
||||||
@ -240,22 +228,11 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getStoreList();
|
|
||||||
this.getbrandType();
|
this.getbrandType();
|
||||||
this.getgoodsType();
|
this.getgoodsType();
|
||||||
this.goodsSearch();
|
this.goodsSearch();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getStoreList() {
|
|
||||||
let params = {
|
|
||||||
page: 0,
|
|
||||||
per_page: 999,
|
|
||||||
plat_id: 1
|
|
||||||
};
|
|
||||||
storeList(params).then((res) => {
|
|
||||||
this.stores = res.data.data;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
onAdd(is_save_preview) {
|
onAdd(is_save_preview) {
|
||||||
this.group.is_save_preview = is_save_preview;
|
this.group.is_save_preview = is_save_preview;
|
||||||
this.group.new_ids = this.goodsList.has_ids;
|
this.group.new_ids = this.goodsList.has_ids;
|
||||||
@ -288,7 +265,6 @@ export default {
|
|||||||
goods_keyword: this.groupGoodsSearch.external_sku_id,
|
goods_keyword: this.groupGoodsSearch.external_sku_id,
|
||||||
has_stock: this.groupGoodsSearch.has_stock,
|
has_stock: this.groupGoodsSearch.has_stock,
|
||||||
type_id: this.groupGoodsSearch.type_id,
|
type_id: this.groupGoodsSearch.type_id,
|
||||||
shop_id: this.group.shop_id,
|
|
||||||
has_ids: this.goodsList.has_ids,
|
has_ids: this.goodsList.has_ids,
|
||||||
};
|
};
|
||||||
addGroupGoods(params).then((res) => {
|
addGroupGoods(params).then((res) => {
|
||||||
@ -347,13 +323,9 @@ export default {
|
|||||||
},
|
},
|
||||||
// 从商品列表导入
|
// 从商品列表导入
|
||||||
importGoods() {
|
importGoods() {
|
||||||
if (this.group.shop_id) {
|
|
||||||
this.dialogTitle = "您的商品库中已有 " + this.groupGoods.meta.total + " 件商品";
|
this.dialogTitle = "您的商品库中已有 " + this.groupGoods.meta.total + " 件商品";
|
||||||
this.goodsSearch();
|
this.goodsSearch();
|
||||||
this.centerDialogVisible = true;
|
this.centerDialogVisible = true;
|
||||||
} else {
|
|
||||||
this.$message.error('请先选择店铺');
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
goodsSearch(page = 1) {
|
goodsSearch(page = 1) {
|
||||||
this.goodsList.page = page;
|
this.goodsList.page = page;
|
||||||
@ -429,7 +401,6 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
let params = {
|
let params = {
|
||||||
shop_id: this.group.shop_id,
|
|
||||||
has_ids: this.goodsList.has_ids,
|
has_ids: this.goodsList.has_ids,
|
||||||
new_ids: new_ids,
|
new_ids: new_ids,
|
||||||
per_page: this.groupGoods.meta.per_page
|
per_page: this.groupGoods.meta.per_page
|
||||||
|
|||||||
@ -2,12 +2,6 @@
|
|||||||
<div>
|
<div>
|
||||||
<el-card style="margin-top: 10px" class="box-card">
|
<el-card style="margin-top: 10px" class="box-card">
|
||||||
<el-form ref="group" :rules="rules" :model="group" label-width="80px">
|
<el-form ref="group" :rules="rules" :model="group" label-width="80px">
|
||||||
<el-form-item label="店铺" prop="shop_id">
|
|
||||||
<el-select v-model="group.shop_id" :disabled="true">
|
|
||||||
<el-option v-for="store in stores" :key="store.id" :label="store.name" :value="store.id">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="活动标题" prop="title">
|
<el-form-item label="活动标题" prop="title">
|
||||||
<el-input type="textarea" v-model="group.title" style="width: 500px;"></el-input>
|
<el-input type="textarea" v-model="group.title" style="width: 500px;"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -167,7 +161,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { storeList } from "../../api/shop";
|
|
||||||
import { showGroup, editGroup, getGroupGoods } from "../../api/group";
|
import { showGroup, editGroup, getGroupGoods } from "../../api/group";
|
||||||
import { goods_types, Brand_goods_types } from "../../api/rankingData";
|
import { goods_types, Brand_goods_types } from "../../api/rankingData";
|
||||||
import { getGoodsList } from "../../api/goods";
|
import { getGoodsList } from "../../api/goods";
|
||||||
@ -175,7 +168,6 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
group: {
|
group: {
|
||||||
shop_id: '',
|
|
||||||
title: "",
|
title: "",
|
||||||
is_save_preview: 1,
|
is_save_preview: 1,
|
||||||
datetimerange: [],
|
datetimerange: [],
|
||||||
@ -183,9 +175,6 @@ export default {
|
|||||||
end_time: ''
|
end_time: ''
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
shop_id: [
|
|
||||||
{ required: true, message: '请选择店铺' },
|
|
||||||
],
|
|
||||||
title: [
|
title: [
|
||||||
{ required: true, message: '请输入活动标题', trigger: 'blur' },
|
{ required: true, message: '请输入活动标题', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
@ -222,7 +211,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
centerDialogVisible: false,
|
centerDialogVisible: false,
|
||||||
stores: [],
|
|
||||||
types: [],
|
types: [],
|
||||||
brands: [],
|
brands: [],
|
||||||
goodsList: {
|
goodsList: {
|
||||||
@ -247,7 +235,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getStoreList();
|
|
||||||
this.groupGoodsSearch.group_id = parseInt(this.$route.query.id);
|
this.groupGoodsSearch.group_id = parseInt(this.$route.query.id);
|
||||||
this.getGoupInfo(this.$route.query.id);
|
this.getGoupInfo(this.$route.query.id);
|
||||||
this.getGroupGoodsList();
|
this.getGroupGoodsList();
|
||||||
@ -255,16 +242,6 @@ export default {
|
|||||||
this.getgoodsType();
|
this.getgoodsType();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getStoreList() {
|
|
||||||
let params = {
|
|
||||||
page: 0,
|
|
||||||
per_page: 999,
|
|
||||||
plat_id: 1
|
|
||||||
};
|
|
||||||
storeList(params).then((res) => {
|
|
||||||
this.stores = res.data.data;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
onEdit() {
|
onEdit() {
|
||||||
this.group.new_ids = this.goodsList.has_ids;
|
this.group.new_ids = this.goodsList.has_ids;
|
||||||
let changeData = [];
|
let changeData = [];
|
||||||
@ -357,13 +334,9 @@ export default {
|
|||||||
},
|
},
|
||||||
// 从商品列表导入
|
// 从商品列表导入
|
||||||
importGoods() {
|
importGoods() {
|
||||||
if (this.group.shop_id) {
|
|
||||||
this.dialogTitle = "您的商品库中已有 " + this.groupGoods.meta.total + " 件商品";
|
this.dialogTitle = "您的商品库中已有 " + this.groupGoods.meta.total + " 件商品";
|
||||||
this.goodsSearch();
|
this.goodsSearch();
|
||||||
this.centerDialogVisible = true;
|
this.centerDialogVisible = true;
|
||||||
} else {
|
|
||||||
this.$message.error('请先选择店铺');
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
goodsSearch(page = 1) {
|
goodsSearch(page = 1) {
|
||||||
this.goodsList.page = page;
|
this.goodsList.page = page;
|
||||||
|
|||||||
@ -2,12 +2,6 @@
|
|||||||
<div>
|
<div>
|
||||||
<el-card class="box-card" :body-style="{ padding: '20px 20px 0 20px' }">
|
<el-card class="box-card" :body-style="{ padding: '20px 20px 0 20px' }">
|
||||||
<el-form :inline="true" :model="formSearch" class="demo-form-inline">
|
<el-form :inline="true" :model="formSearch" class="demo-form-inline">
|
||||||
<el-form-item label="店铺">
|
|
||||||
<el-select v-model="formSearch.store_id" placeholder="全部">
|
|
||||||
<el-option v-for="store in stores" :key="store.id" :label="store.name" :value="store.id">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="团购状态">
|
<el-form-item label="团购状态">
|
||||||
<el-select v-model="formSearch.status" placeholder="团购状态">
|
<el-select v-model="formSearch.status" placeholder="团购状态">
|
||||||
<el-option label="未开始" value="-5"></el-option>
|
<el-option label="未开始" value="-5"></el-option>
|
||||||
@ -28,8 +22,6 @@
|
|||||||
|
|
||||||
<el-card style="margin-top: 10px" class="box-card">
|
<el-card style="margin-top: 10px" class="box-card">
|
||||||
<el-table v-loading="loading" :data="tableData" border style="width: 100%">
|
<el-table v-loading="loading" :data="tableData" border style="width: 100%">
|
||||||
<el-table-column prop="shop.name" label="店铺">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="title" label="活动标题">
|
<el-table-column prop="title" label="活动标题">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="status" label="团购状态">
|
<el-table-column prop="status" label="团购状态">
|
||||||
@ -46,6 +38,8 @@
|
|||||||
<el-image style="width: 100px; height: 100px" :src="scope.row.ercode"></el-image>
|
<el-image style="width: 100px; height: 100px" :src="scope.row.ercode"></el-image>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="create_status" label="创建结果">
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="options" label="操作">
|
<el-table-column prop="options" label="操作">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button @click="groupEdit(scope.row.id)" type="text" size="small">编辑</el-button>
|
<el-button @click="groupEdit(scope.row.id)" type="text" size="small">编辑</el-button>
|
||||||
@ -58,41 +52,28 @@
|
|||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { storeList } from "../../api/shop";
|
|
||||||
import { groupList } from "../../api/group";
|
import { groupList } from "../../api/group";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
formSearch: {
|
formSearch: {
|
||||||
store_id: "",
|
|
||||||
status: "",
|
status: "",
|
||||||
title: "",
|
title: "",
|
||||||
page: 1,
|
page: 1,
|
||||||
per_page: 20
|
per_page: 20
|
||||||
},
|
},
|
||||||
stores: [],
|
loading: true,
|
||||||
loading: false,
|
|
||||||
tableData: []
|
tableData: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getStoreList();
|
|
||||||
this.getGroupList();
|
this.getGroupList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getStoreList() {
|
|
||||||
let params = {
|
|
||||||
page: 0,
|
|
||||||
per_page: 999,
|
|
||||||
plat_id: 1
|
|
||||||
};
|
|
||||||
storeList(params).then((res) => {
|
|
||||||
this.stores = res.data.data;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getGroupList() {
|
getGroupList() {
|
||||||
groupList(this.formSearch).then((res) => {
|
groupList(this.formSearch).then((res) => {
|
||||||
this.tableData = res.data.data;
|
this.tableData = res.data.data;
|
||||||
|
this.loading = false;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
groupAdd() {
|
groupAdd() {
|
||||||
|
|||||||
@ -9,9 +9,9 @@
|
|||||||
<el-table-column prop="name" label="店铺名称">
|
<el-table-column prop="name" label="店铺名称">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="plat_id" label="所属平台"></el-table-column>
|
<el-table-column prop="plat_id" label="所属平台"></el-table-column>
|
||||||
<el-table-column label="成本倍率">
|
<el-table-column label="成本变动">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.ratio" placeholder="成本倍率" @change="handleCellChange(scope.row)">
|
<el-input v-model="scope.row.ratio" placeholder="成本变动" @change="handleCellChange(scope.row)">
|
||||||
</el-input>
|
</el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -64,8 +64,8 @@
|
|||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="成本倍率">
|
<el-form-item label="成本变动">
|
||||||
<el-input v-model="form.ratio" placeholder="成本倍率" style="width: 400px;"></el-input>
|
<el-input v-model="form.ratio" placeholder="成本变动" style="width: 400px;"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
@ -85,7 +85,7 @@ export default {
|
|||||||
form: {
|
form: {
|
||||||
name: "",
|
name: "",
|
||||||
plat_id: "",
|
plat_id: "",
|
||||||
ratio: 1,
|
ratio: "*1",
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
name: [
|
name: [
|
||||||
@ -95,7 +95,7 @@ export default {
|
|||||||
{ required: true, message: '请选择店铺平台', trigger: 'blur' },
|
{ required: true, message: '请选择店铺平台', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
ratio: [
|
ratio: [
|
||||||
{ required: true, message: '请输入成本倍率', trigger: 'blur', },
|
{ required: true, message: '请输入成本变动', trigger: 'blur', },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
storeId: [], // 店铺id
|
storeId: [], // 店铺id
|
||||||
@ -183,7 +183,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleCellChange(row) {
|
handleCellChange(row) {
|
||||||
this.$confirm('确认修改成本倍率吗?', '提示', {
|
this.$confirm('确认修改成本变动吗?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user