|
|
@ -12,7 +12,13 @@ |
|
|
|
<a-input v-decorator="['goodsNo']" class="goodsWidth" placeholder="请输入商品编码" /> |
|
|
|
<a-input v-decorator="['goodsNo']" class="goodsWidth" placeholder="请输入商品编码" /> |
|
|
|
</a-form-item> |
|
|
|
</a-form-item> |
|
|
|
<a-form-item label="商品分类"> |
|
|
|
<a-form-item label="商品分类"> |
|
|
|
<a-tree-select class="goodsWidth" :treeData="categoryListTree" :dropdownStyle="{ maxHeight: '500px', overflow: 'auto' }" allowClear v-decorator="['categoryId', { initialValue: 0 }]"></a-tree-select> |
|
|
|
<a-tree-select |
|
|
|
|
|
|
|
class="goodsWidth" |
|
|
|
|
|
|
|
:treeData="categoryListTree" |
|
|
|
|
|
|
|
:dropdownStyle="{ maxHeight: '500px', overflow: 'auto' }" |
|
|
|
|
|
|
|
allowClear |
|
|
|
|
|
|
|
v-decorator="['categoryId', { initialValue: 0 }]" |
|
|
|
|
|
|
|
></a-tree-select> |
|
|
|
</a-form-item> |
|
|
|
</a-form-item> |
|
|
|
<a-form-item label="规格类型"> |
|
|
|
<a-form-item label="规格类型"> |
|
|
|
<a-select @change="onchangeSpecs" placeholder="请选择"> |
|
|
|
<a-select @change="onchangeSpecs" placeholder="请选择"> |
|
|
@ -37,13 +43,17 @@ |
|
|
|
</a-form-item> |
|
|
|
</a-form-item> |
|
|
|
<a-form-item label="商品价格"> |
|
|
|
<a-form-item label="商品价格"> |
|
|
|
<div style="display: flex" class="goodsType"> |
|
|
|
<div style="display: flex" class="goodsType"> |
|
|
|
<a-input v-decorator="['goods_price_min']" placeholder="请输入" /><span style="padding: 0 3px 0 5px">-</span> |
|
|
|
<a-input v-decorator="['goods_price_min']" placeholder="请输入" /><span style="padding: 0 3px 0 5px" |
|
|
|
|
|
|
|
>-</span |
|
|
|
|
|
|
|
> |
|
|
|
<a-input style="margin-left: 5px" v-decorator="['goods_price_max']" placeholder="请输入" /> |
|
|
|
<a-input style="margin-left: 5px" v-decorator="['goods_price_max']" placeholder="请输入" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-form-item> |
|
|
|
</a-form-item> |
|
|
|
<a-form-item label="利润率"> |
|
|
|
<a-form-item label="利润率"> |
|
|
|
<div style="display: flex" class="goodsType"> |
|
|
|
<div style="display: flex" class="goodsType"> |
|
|
|
<a-input v-decorator="['profit_rate_min']" placeholder="请输入" /><span style="padding: 0 3px 0 5px">-</span> |
|
|
|
<a-input v-decorator="['profit_rate_min']" placeholder="请输入" /><span style="padding: 0 3px 0 5px" |
|
|
|
|
|
|
|
>-</span |
|
|
|
|
|
|
|
> |
|
|
|
<a-input style="margin-left: 5px" v-decorator="['profit_rate_max']" placeholder="请输入" /> |
|
|
|
<a-input style="margin-left: 5px" v-decorator="['profit_rate_max']" placeholder="请输入" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-form-item> |
|
|
|
</a-form-item> |
|
|
@ -66,14 +76,14 @@ |
|
|
|
<a-select-option :value="item.val" v-for="item in isYesNo" :key="item.val"> |
|
|
|
<a-select-option :value="item.val" v-for="item in isYesNo" :key="item.val"> |
|
|
|
{{ item.name }} |
|
|
|
{{ item.name }} |
|
|
|
</a-select-option> |
|
|
|
</a-select-option> |
|
|
|
</a-select> |
|
|
|
</a-select> </a-form-item |
|
|
|
</a-form-item><a-form-item label="是否店内"> |
|
|
|
><a-form-item label="是否店内"> |
|
|
|
<a-select @change="getGoodsStore" style="width: 120px" placeholder="请选择"> |
|
|
|
<a-select @change="getGoodsStore" style="width: 120px" placeholder="请选择"> |
|
|
|
<a-select-option :value="item.val" v-for="item in isYesNo" :key="item.val"> |
|
|
|
<a-select-option :value="item.val" v-for="item in isYesNo" :key="item.val"> |
|
|
|
{{ item.name }} |
|
|
|
{{ item.name }} |
|
|
|
</a-select-option> |
|
|
|
</a-select-option> |
|
|
|
</a-select> |
|
|
|
</a-select> </a-form-item |
|
|
|
</a-form-item><a-form-item label="是否排行榜"> |
|
|
|
><a-form-item label="是否排行榜"> |
|
|
|
<a-select @change="getGoodsRank" style="width: 120px" placeholder="请选择"> |
|
|
|
<a-select @change="getGoodsRank" style="width: 120px" placeholder="请选择"> |
|
|
|
<a-select-option :value="item.val" v-for="item in isYesNo" :key="item.val"> |
|
|
|
<a-select-option :value="item.val" v-for="item in isYesNo" :key="item.val"> |
|
|
|
{{ item.name }} |
|
|
|
{{ item.name }} |
|
|
@ -85,18 +95,62 @@ |
|
|
|
</a-form-item> |
|
|
|
</a-form-item> |
|
|
|
</a-form> |
|
|
|
</a-form> |
|
|
|
</a-row> |
|
|
|
</a-row> |
|
|
|
<a-modal v-model:visible="batchVisible" width="300px" :title="setupIndex==1?'设置是否大牌正品':setupIndex==2?'设置是否新品首发':setupIndex==3?'设置是否店内':'设置所属分类排行'" @ok="handleUpdateSetup(selectedRowKeys,setupIndex!=4?setupValue:paihang,setupIndex)"> |
|
|
|
<a-modal |
|
|
|
<a-select v-model="setupValue" v-if="setupIndex!=4" style="width: 250px;margin:10px 0" placeholder="请选择"> |
|
|
|
v-model:visible="batchVisible" |
|
|
|
|
|
|
|
width="300px" |
|
|
|
|
|
|
|
:title=" |
|
|
|
|
|
|
|
setupIndex == 1 |
|
|
|
|
|
|
|
? '设置是否大牌正品' |
|
|
|
|
|
|
|
: setupIndex == 2 |
|
|
|
|
|
|
|
? '设置是否新品首发' |
|
|
|
|
|
|
|
: setupIndex == 3 |
|
|
|
|
|
|
|
? '设置是否店内' |
|
|
|
|
|
|
|
: '设置所属分类排行' |
|
|
|
|
|
|
|
" |
|
|
|
|
|
|
|
@ok="handleUpdateSetup(selectedRowKeys, setupIndex != 4 ? setupValue : paihang, setupIndex)" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<a-select v-model="setupValue" v-if="setupIndex != 4" style="width: 250px; margin: 10px 0" placeholder="请选择"> |
|
|
|
<a-select-option :value="item.val" v-for="item in isYesNo" :key="item.val"> |
|
|
|
<a-select-option :value="item.val" v-for="item in isYesNo" :key="item.val"> |
|
|
|
{{ item.name }} |
|
|
|
{{ item.name }} |
|
|
|
</a-select-option> |
|
|
|
</a-select-option> |
|
|
|
</a-select> |
|
|
|
</a-select> |
|
|
|
<a-input v-model="paihang" v-else type="number" placeholder="请输入所属分类排行值" style="width: 250px;margin:10px 0" /> |
|
|
|
<a-input |
|
|
|
|
|
|
|
v-model="paihang" |
|
|
|
|
|
|
|
v-else |
|
|
|
|
|
|
|
type="number" |
|
|
|
|
|
|
|
placeholder="请输入所属分类排行值" |
|
|
|
|
|
|
|
style="width: 250px; margin: 10px 0" |
|
|
|
|
|
|
|
/> |
|
|
|
</a-modal> |
|
|
|
</a-modal> |
|
|
|
<!-- 操作板块 --> |
|
|
|
<!-- 操作板块 --> |
|
|
|
<a-modal v-model:visible="categoryVisible" width="450px" title="商品分类" @ok="handleUpdateClassify(selectedRowKeys, categoryIds)"> |
|
|
|
<a-modal |
|
|
|
<a-tree-select style="min-width: 400px" placeholder="请选择商品分类" :dropdownStyle="{ maxHeight: '500px', overflow: 'auto' }" :treeData="categoryListTree" treeCheckable treeCheckStrictly allowClear |
|
|
|
v-model:visible="categoryVisible" |
|
|
|
@change="onChangeCategory"></a-tree-select> |
|
|
|
width="450px" |
|
|
|
|
|
|
|
title="商品分类" |
|
|
|
|
|
|
|
@ok="handleUpdateClassify(selectedRowKeys, categoryIds)" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<a-tree-select |
|
|
|
|
|
|
|
style="min-width: 400px" |
|
|
|
|
|
|
|
placeholder="请选择商品分类" |
|
|
|
|
|
|
|
:dropdownStyle="{ maxHeight: '500px', overflow: 'auto' }" |
|
|
|
|
|
|
|
:treeData="categoryListTree" |
|
|
|
|
|
|
|
treeCheckable |
|
|
|
|
|
|
|
treeCheckStrictly |
|
|
|
|
|
|
|
allowClear |
|
|
|
|
|
|
|
@change="onChangeCategory" |
|
|
|
|
|
|
|
></a-tree-select> |
|
|
|
|
|
|
|
</a-modal> |
|
|
|
|
|
|
|
<a-modal |
|
|
|
|
|
|
|
v-model:visible="jingPinVisible" |
|
|
|
|
|
|
|
width="250px" |
|
|
|
|
|
|
|
title="精品数据" |
|
|
|
|
|
|
|
@ok="handleUpdateJingPin(selectedRowKeys, is_jingpin)" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<a-select @change="getJingPin" v-model="is_jingpin" style="width: 200px" placeholder="请选择"> |
|
|
|
|
|
|
|
<a-select-option :value="item.val" v-for="item in isYesNo" :key="item.val"> |
|
|
|
|
|
|
|
{{ item.name }} |
|
|
|
|
|
|
|
</a-select-option> |
|
|
|
|
|
|
|
</a-select> |
|
|
|
</a-modal> |
|
|
|
</a-modal> |
|
|
|
<!-- 操作板块 --> |
|
|
|
<!-- 操作板块 --> |
|
|
|
<div class="row-item-tab clearfix"> |
|
|
|
<div class="row-item-tab clearfix"> |
|
|
@ -110,29 +164,125 @@ |
|
|
|
<a-radio-button value="out_pool">未入池</a-radio-button> |
|
|
|
<a-radio-button value="out_pool">未入池</a-radio-button> |
|
|
|
</a-radio-group> |
|
|
|
</a-radio-group> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<a-button v-if="$auth('/goods/create') && (storeVersion === 0 || (storeVersion === 1 && isSuper === 0))" class="fl-l" type="primary" icon="plus" @click="handleCreate()">创建商品</a-button> |
|
|
|
<a-button |
|
|
|
<a-button v-if="$module('goods-import') && $auth('/goods/import/batch') && (storeVersion === 0 || (storeVersion === 1 && isSuper === 0))" class="fl-l" icon="arrow-up" @click="handleImport()">批量导入</a-button> |
|
|
|
v-if="$auth('/goods/create') && (storeVersion === 0 || (storeVersion === 1 && isSuper === 0))" |
|
|
|
<a-button style="background-color: #501212; color: #fff; border: none" @click="handleExport(selectedRowKeys)">导出</a-button> |
|
|
|
class="fl-l" |
|
|
|
<a-button v-if="storeVersion === 0 || (storeVersion === 1 && isSuper === 0)" class="fl-l" style="background-color: #f0baae; border: none" type="primary" @click="handleModify()">批量修改</a-button> |
|
|
|
type="primary" |
|
|
|
<a-button v-if="selectedRowKeys.length==0" style="background-color: green; color: #fff; border: none; border-radius: 2px" @click="handleSetupGoods(selectedRowKeys,1)">全部上架</a-button> |
|
|
|
icon="plus" |
|
|
|
<a-button v-if="selectedRowKeys.length==0" style="background-color: #FB322A; color: #fff; border: none; border-radius: 2px" @click="handleSetupGoods(selectedRowKeys,2)">全部下架</a-button> |
|
|
|
@click="handleCreate()" |
|
|
|
<a-button v-if="selectedRowKeys.length" style="background-color: #872658; color: #fff; border: none; border-radius: 2px" @click="categoryVisible = true">归类</a-button> |
|
|
|
>创建商品</a-button |
|
|
|
<a-button style="background-color: #9E7AFF; color: #fff; border: none" v-if="selectedRowKeys.length" @click="handleSetup(1)">设置大牌</a-button> |
|
|
|
> |
|
|
|
<a-button style="background-color: #0b1746; color: #fff; border: none" v-if="selectedRowKeys.length" @click="handleSetup(2)">设置新品</a-button> |
|
|
|
<a-button |
|
|
|
<a-button style="background-color: #1184D2; color: #fff; border: none" v-if="selectedRowKeys.length" @click="handleSetup(3)">设置店内</a-button> |
|
|
|
v-if=" |
|
|
|
<a-button style="background-color: #EEA507; color: #fff; border: none" v-if="selectedRowKeys.length" @click="handleSetup(4)">设置排行榜</a-button> |
|
|
|
$module('goods-import') && |
|
|
|
<div v-if="selectedRowKeys.length" class="button-group" style="margin-top:15px"> |
|
|
|
$auth('/goods/import/batch') && |
|
|
|
|
|
|
|
(storeVersion === 0 || (storeVersion === 1 && isSuper === 0)) |
|
|
|
|
|
|
|
" |
|
|
|
|
|
|
|
class="fl-l" |
|
|
|
|
|
|
|
icon="arrow-up" |
|
|
|
|
|
|
|
@click="handleImport()" |
|
|
|
|
|
|
|
>批量导入</a-button |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<a-button style="background-color: #501212; color: #fff; border: none" @click="handleExport(selectedRowKeys)" |
|
|
|
|
|
|
|
>导出</a-button |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<a-button |
|
|
|
|
|
|
|
v-if="storeVersion === 0 || (storeVersion === 1 && isSuper === 0)" |
|
|
|
|
|
|
|
class="fl-l" |
|
|
|
|
|
|
|
style="background-color: #f0baae; border: none" |
|
|
|
|
|
|
|
type="primary" |
|
|
|
|
|
|
|
@click="handleModify()" |
|
|
|
|
|
|
|
>批量修改</a-button |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<a-button |
|
|
|
|
|
|
|
v-if="selectedRowKeys.length == 0" |
|
|
|
|
|
|
|
style="background-color: green; color: #fff; border: none; border-radius: 2px" |
|
|
|
|
|
|
|
@click="handleSetupGoods(selectedRowKeys, 1)" |
|
|
|
|
|
|
|
>全部上架</a-button |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<a-button |
|
|
|
|
|
|
|
v-if="selectedRowKeys.length == 0" |
|
|
|
|
|
|
|
style="background-color: #fb322a; color: #fff; border: none; border-radius: 2px" |
|
|
|
|
|
|
|
@click="handleSetupGoods(selectedRowKeys, 2)" |
|
|
|
|
|
|
|
>全部下架</a-button |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<a-button |
|
|
|
|
|
|
|
v-if="selectedRowKeys.length" |
|
|
|
|
|
|
|
style="background-color: #872658; color: #fff; border: none; border-radius: 2px" |
|
|
|
|
|
|
|
@click="categoryVisible = true" |
|
|
|
|
|
|
|
>归类</a-button |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<a-button |
|
|
|
|
|
|
|
style="background-color: #0ac970; color: #fff; border: none" |
|
|
|
|
|
|
|
v-if="selectedRowKeys.length" |
|
|
|
|
|
|
|
@click="jingPinVisible = true" |
|
|
|
|
|
|
|
>精品数据</a-button |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<a-button |
|
|
|
|
|
|
|
style="background-color: #9e7aff; color: #fff; border: none" |
|
|
|
|
|
|
|
v-if="selectedRowKeys.length" |
|
|
|
|
|
|
|
@click="handleSetup(1)" |
|
|
|
|
|
|
|
>设置大牌</a-button |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<a-button |
|
|
|
|
|
|
|
style="background-color: #0b1746; color: #fff; border: none" |
|
|
|
|
|
|
|
v-if="selectedRowKeys.length" |
|
|
|
|
|
|
|
@click="handleSetup(2)" |
|
|
|
|
|
|
|
>设置新品</a-button |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<a-button |
|
|
|
|
|
|
|
style="background-color: #1184d2; color: #fff; border: none" |
|
|
|
|
|
|
|
v-if="selectedRowKeys.length" |
|
|
|
|
|
|
|
@click="handleSetup(3)" |
|
|
|
|
|
|
|
>设置店内</a-button |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<a-button |
|
|
|
|
|
|
|
style="background-color: #eea507; color: #fff; border: none" |
|
|
|
|
|
|
|
v-if="selectedRowKeys.length" |
|
|
|
|
|
|
|
@click="handleSetup(4)" |
|
|
|
|
|
|
|
>设置排行榜</a-button |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<div v-if="selectedRowKeys.length" class="button-group" style="margin-top: 15px"> |
|
|
|
<a-button-group class="ml-10"> |
|
|
|
<a-button-group class="ml-10"> |
|
|
|
<a-button v-action:status icon="arrow-up" @click="handleUpdateStatus(selectedRowKeys, true)">上架</a-button> |
|
|
|
<a-button v-action:status icon="arrow-up" @click="handleUpdateStatus(selectedRowKeys, true)">上架</a-button> |
|
|
|
<a-button v-action:status icon="arrow-down" @click="handleUpdateStatus(selectedRowKeys, false)">下架</a-button> |
|
|
|
<a-button v-action:status icon="arrow-down" @click="handleUpdateStatus(selectedRowKeys, false)" |
|
|
|
<a-button v-if="isSuper === 1" v-action:pool icon="arrow-up" @click="handleUpdatePool(selectedRowKeys, true)">入池</a-button> |
|
|
|
>下架</a-button |
|
|
|
<a-button v-if="isSuper === 1" v-action:pool icon="arrow-down" @click="handleUpdatePool(selectedRowKeys, false)">出池</a-button> |
|
|
|
> |
|
|
|
<a-button v-if="storeVersion === 0 || (storeVersion === 1 && isSuper === 0)" v-action:delete icon="delete" @click="handleDelete(selectedRowKeys)">删除</a-button> |
|
|
|
<a-button |
|
|
|
|
|
|
|
v-if="isSuper === 1" |
|
|
|
|
|
|
|
v-action:pool |
|
|
|
|
|
|
|
icon="arrow-up" |
|
|
|
|
|
|
|
@click="handleUpdatePool(selectedRowKeys, true)" |
|
|
|
|
|
|
|
>入池</a-button |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<a-button |
|
|
|
|
|
|
|
v-if="isSuper === 1" |
|
|
|
|
|
|
|
v-action:pool |
|
|
|
|
|
|
|
icon="arrow-down" |
|
|
|
|
|
|
|
@click="handleUpdatePool(selectedRowKeys, false)" |
|
|
|
|
|
|
|
>出池</a-button |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<a-button |
|
|
|
|
|
|
|
v-if="storeVersion === 0 || (storeVersion === 1 && isSuper === 0)" |
|
|
|
|
|
|
|
v-action:delete |
|
|
|
|
|
|
|
icon="delete" |
|
|
|
|
|
|
|
@click="handleDelete(selectedRowKeys)" |
|
|
|
|
|
|
|
>删除</a-button |
|
|
|
|
|
|
|
> |
|
|
|
</a-button-group> |
|
|
|
</a-button-group> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<s-table ref="table" rowKey="goods_id" :loading="isLoading" :columns="columns" :data="loadData" :rowSelection="rowSelection" :pagination="pagination" :scroll="{ x: 1450 }"> |
|
|
|
<s-table |
|
|
|
|
|
|
|
ref="table" |
|
|
|
|
|
|
|
rowKey="goods_id" |
|
|
|
|
|
|
|
:loading="isLoading" |
|
|
|
|
|
|
|
:columns="columns" |
|
|
|
|
|
|
|
:data="loadData" |
|
|
|
|
|
|
|
:rowSelection="rowSelection" |
|
|
|
|
|
|
|
:pagination="pagination" |
|
|
|
|
|
|
|
:scroll="{ x: 1450 }" |
|
|
|
|
|
|
|
> |
|
|
|
<!-- 商品图片 --> |
|
|
|
<!-- 商品图片 --> |
|
|
|
<span slot="goods_image" slot-scope="text"> |
|
|
|
<span slot="goods_image" slot-scope="text"> |
|
|
|
<a title="点击查看原图" :href="text" target="_blank"> |
|
|
|
<a title="点击查看原图" :href="text" target="_blank"> |
|
|
@ -159,7 +309,12 @@ |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
<!-- 商品状态 --> |
|
|
|
<!-- 商品状态 --> |
|
|
|
<span slot="status" slot-scope="text, item"> |
|
|
|
<span slot="status" slot-scope="text, item"> |
|
|
|
<a-tag class="cur-p" :color="text == 10 ? 'green' : 'red'" @click="handleUpdateStatus([item.goods_id], text != 10)">{{ text == 10 ? '上架' : '下架' }}</a-tag> |
|
|
|
<a-tag |
|
|
|
|
|
|
|
class="cur-p" |
|
|
|
|
|
|
|
:color="text == 10 ? 'green' : 'red'" |
|
|
|
|
|
|
|
@click="handleUpdateStatus([item.goods_id], text != 10)" |
|
|
|
|
|
|
|
>{{ text == 10 ? '上架' : '下架' }}</a-tag |
|
|
|
|
|
|
|
> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
<span slot="cate_status" slot-scope="text"> |
|
|
|
<span slot="cate_status" slot-scope="text"> |
|
|
|
<p class="twoline-hide" style="width: 40px" :style="{ color: text == 0 ? 'red' : 'green' }"> |
|
|
|
<p class="twoline-hide" style="width: 40px" :style="{ color: text == 0 ? 'red' : 'green' }"> |
|
|
@ -168,7 +323,7 @@ |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
<!-- 京东下架 --> |
|
|
|
<!-- 京东下架 --> |
|
|
|
<span slot="is_jd_remove" slot-scope="text"> |
|
|
|
<span slot="is_jd_remove" slot-scope="text"> |
|
|
|
<p style="width: 40px;text-align: center;" :style="{ color: text == 1 ? 'red' : 'green'}"> |
|
|
|
<p style="width: 40px; text-align: center" :style="{ color: text == 1 ? 'red' : 'green' }"> |
|
|
|
{{ text == 1 ? '是' : '否' }} |
|
|
|
{{ text == 1 ? '是' : '否' }} |
|
|
|
</p> |
|
|
|
</p> |
|
|
|
</span> |
|
|
|
</span> |
|
|
@ -186,7 +341,15 @@ |
|
|
|
>编辑</router-link |
|
|
|
>编辑</router-link |
|
|
|
> --> |
|
|
|
> --> |
|
|
|
<a @click="handleEdit(item.goods_id)">编辑</a> |
|
|
|
<a @click="handleEdit(item.goods_id)">编辑</a> |
|
|
|
<router-link v-if="$module('goods-copy') && $auth('/goods/copy') && (storeVersion === 0 || (storeVersion === 1 && isSuper === 0))" :to="{ path: '/goods/copy', query: { goodsId: item.goods_id } }">复制</router-link> |
|
|
|
<router-link |
|
|
|
|
|
|
|
v-if=" |
|
|
|
|
|
|
|
$module('goods-copy') && |
|
|
|
|
|
|
|
$auth('/goods/copy') && |
|
|
|
|
|
|
|
(storeVersion === 0 || (storeVersion === 1 && isSuper === 0)) |
|
|
|
|
|
|
|
" |
|
|
|
|
|
|
|
:to="{ path: '/goods/copy', query: { goodsId: item.goods_id } }" |
|
|
|
|
|
|
|
>复制</router-link |
|
|
|
|
|
|
|
> |
|
|
|
<!-- <a v-if="storeVersion === 0 || (storeVersion === 1 && isSuper === 0)" v-action:delete @click="handleDelete([item.goods_id])">删除</a> --> |
|
|
|
<!-- <a v-if="storeVersion === 0 || (storeVersion === 1 && isSuper === 0)" v-action:delete @click="handleDelete([item.goods_id])">删除</a> --> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</s-table> |
|
|
|
</s-table> |
|
|
@ -356,7 +519,7 @@ export default { |
|
|
|
is_brand: '', |
|
|
|
is_brand: '', |
|
|
|
is_new: '', |
|
|
|
is_new: '', |
|
|
|
is_in_store: '', |
|
|
|
is_in_store: '', |
|
|
|
is_paihang: '' |
|
|
|
is_paihang: '', |
|
|
|
}, |
|
|
|
}, |
|
|
|
setupIndex: 0, |
|
|
|
setupIndex: 0, |
|
|
|
setupValue: 1, |
|
|
|
setupValue: 1, |
|
|
@ -401,6 +564,8 @@ export default { |
|
|
|
merchantList: [], |
|
|
|
merchantList: [], |
|
|
|
batchVisible: false, |
|
|
|
batchVisible: false, |
|
|
|
categoryVisible: false, |
|
|
|
categoryVisible: false, |
|
|
|
|
|
|
|
jingPinVisible: false, |
|
|
|
|
|
|
|
is_jingpin: 1, |
|
|
|
categoryIds: [], |
|
|
|
categoryIds: [], |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
@ -425,8 +590,10 @@ export default { |
|
|
|
return window.localStorage.getItem('roles') ? JSON.parse(window.localStorage.getItem('roles')).isSuper : 0 |
|
|
|
return window.localStorage.getItem('roles') ? JSON.parse(window.localStorage.getItem('roles')).isSuper : 0 |
|
|
|
}, |
|
|
|
}, |
|
|
|
storeVersion() { |
|
|
|
storeVersion() { |
|
|
|
return window.localStorage.getItem('storeInfo') ? JSON.parse(window.localStorage.getItem('storeInfo')).store_version : 0 |
|
|
|
return window.localStorage.getItem('storeInfo') |
|
|
|
} |
|
|
|
? JSON.parse(window.localStorage.getItem('storeInfo')).store_version |
|
|
|
|
|
|
|
: 0 |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
getGoodsJingDong(val) { |
|
|
|
getGoodsJingDong(val) { |
|
|
@ -482,7 +649,8 @@ export default { |
|
|
|
if (type == 2) { |
|
|
|
if (type == 2) { |
|
|
|
url = GoodsApi.oneOffTheShelf() |
|
|
|
url = GoodsApi.oneOffTheShelf() |
|
|
|
} |
|
|
|
} |
|
|
|
url.then((result) => { |
|
|
|
url |
|
|
|
|
|
|
|
.then((result) => { |
|
|
|
this.isLoading = false |
|
|
|
this.isLoading = false |
|
|
|
this.$message.success(result.message, 1.5) |
|
|
|
this.$message.success(result.message, 1.5) |
|
|
|
this.handleRefresh() |
|
|
|
this.handleRefresh() |
|
|
@ -493,10 +661,10 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleSetup(type) { |
|
|
|
handleSetup(type) { |
|
|
|
this.setupValue = 1; |
|
|
|
this.setupValue = 1 |
|
|
|
this.paihang = ''; |
|
|
|
this.paihang = '' |
|
|
|
this.setupIndex = type; |
|
|
|
this.setupIndex = type |
|
|
|
this.batchVisible = true; |
|
|
|
this.batchVisible = true |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 停售 |
|
|
|
// 停售 |
|
|
|
handleUpdateSetup(goodsIds, val, type) { |
|
|
|
handleUpdateSetup(goodsIds, val, type) { |
|
|
@ -514,7 +682,8 @@ export default { |
|
|
|
if (type == 4) { |
|
|
|
if (type == 4) { |
|
|
|
url = GoodsApi.setRank({ goodsIds, paihang: Number(val) }) |
|
|
|
url = GoodsApi.setRank({ goodsIds, paihang: Number(val) }) |
|
|
|
} |
|
|
|
} |
|
|
|
url.then((result) => { |
|
|
|
url |
|
|
|
|
|
|
|
.then((result) => { |
|
|
|
this.batchVisible = false |
|
|
|
this.batchVisible = false |
|
|
|
this.isLoading = false |
|
|
|
this.isLoading = false |
|
|
|
this.$message.success(result.message, 1.5) |
|
|
|
this.$message.success(result.message, 1.5) |
|
|
@ -684,6 +853,23 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
getJingPin(val) { |
|
|
|
|
|
|
|
this.is_jingpin = val |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 精品 |
|
|
|
|
|
|
|
handleUpdateJingPin(goodsIds, is_jingpin) { |
|
|
|
|
|
|
|
this.isLoading = true |
|
|
|
|
|
|
|
GoodsApi.jingPin({ goodsIds, is_jingpin }) |
|
|
|
|
|
|
|
.then((result) => { |
|
|
|
|
|
|
|
// 显示成功 |
|
|
|
|
|
|
|
this.jingPinVisible = false |
|
|
|
|
|
|
|
this.$message.success(result.message, 1.5) |
|
|
|
|
|
|
|
this.handleRefresh() |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.finally((result) => { |
|
|
|
|
|
|
|
this.isLoading = false |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
// 编辑记录 |
|
|
|
// 编辑记录 |
|
|
|
async handleEdit(id) { |
|
|
|
async handleEdit(id) { |
|
|
|
// 显示对话框 |
|
|
|
// 显示对话框 |
|
|
|