|
|
|
@ -34,13 +34,6 @@ |
|
|
|
|
</a-select-option> |
|
|
|
|
</a-select> |
|
|
|
|
</a-form-item> |
|
|
|
|
<a-form-item label="商户"> |
|
|
|
|
<a-select @change="changeMerchant" placeholder="请选择"> |
|
|
|
|
<a-select-option :value="item.merchant_id" v-for="item in merchantList" :key="item.merchant_id"> |
|
|
|
|
{{ item.name }} |
|
|
|
|
</a-select-option> |
|
|
|
|
</a-select> |
|
|
|
|
</a-form-item> |
|
|
|
|
<a-form-item label="商品价格"> |
|
|
|
|
<div style="display: flex" class="goodsType"> |
|
|
|
|
<a-input v-decorator="['goods_price_min']" placeholder="请输入" /><span style="padding: 0 3px 0 5px">-</span> |
|
|
|
@ -66,8 +59,6 @@ |
|
|
|
|
<a-radio-button value="on_sale">出售中</a-radio-button> |
|
|
|
|
<a-radio-button value="off_sale">已下架</a-radio-button> |
|
|
|
|
<a-radio-button value="sold_out">已售罄</a-radio-button> |
|
|
|
|
<a-radio-button value="in_pool">已入池</a-radio-button> |
|
|
|
|
<a-radio-button value="out_pool">未入池</a-radio-button> |
|
|
|
|
</a-radio-group> |
|
|
|
|
</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> |
|
|
|
@ -151,7 +142,6 @@ |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import * as GoodsApi from '@/api/goods' |
|
|
|
|
import * as ShopApi from '@/api/shop' |
|
|
|
|
import { ContentHeader, STable } from '@/components' |
|
|
|
|
import CategoryModel from '@/common/model/Category' |
|
|
|
|
import store from '../../store' |
|
|
|
@ -213,13 +203,13 @@ const columns = [ |
|
|
|
|
sorter: true, |
|
|
|
|
scopedSlots: { customRender: 'profit_rate' }, |
|
|
|
|
}, |
|
|
|
|
// { |
|
|
|
|
// title: '加价率', |
|
|
|
|
// width: '90px', |
|
|
|
|
// dataIndex: 'markup_rate', |
|
|
|
|
// sorter: true, |
|
|
|
|
// scopedSlots: { customRender: 'markup_rate' }, |
|
|
|
|
// }, |
|
|
|
|
{ |
|
|
|
|
title: '加价率', |
|
|
|
|
width: '90px', |
|
|
|
|
dataIndex: 'markup_rate', |
|
|
|
|
sorter: true, |
|
|
|
|
scopedSlots: { customRender: 'markup_rate' }, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: '总销量', |
|
|
|
|
width: '80px', |
|
|
|
@ -281,7 +271,6 @@ export default { |
|
|
|
|
listType: 'all', |
|
|
|
|
spec_type: '', |
|
|
|
|
channel: '', |
|
|
|
|
merchant_id: '' |
|
|
|
|
}, |
|
|
|
|
// 正在加载 |
|
|
|
|
isLoading: false, |
|
|
|
@ -316,7 +305,6 @@ export default { |
|
|
|
|
{ name: '多规格', val: 20 }, |
|
|
|
|
], |
|
|
|
|
checkList: [], |
|
|
|
|
merchantList: [] |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
created() { |
|
|
|
@ -327,7 +315,6 @@ export default { |
|
|
|
|
// 获取商品分类列表 |
|
|
|
|
this.getCategoryList() |
|
|
|
|
this.getDataList() // 渠道 |
|
|
|
|
this.getShopList() // 商户 |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
|
rowSelection() { |
|
|
|
@ -370,8 +357,6 @@ export default { |
|
|
|
|
(this.queryParam.categoryId || '') + |
|
|
|
|
'&channel=' + |
|
|
|
|
this.queryParam.channel + |
|
|
|
|
'&merchant_id=' + |
|
|
|
|
this.queryParam.merchant_id + |
|
|
|
|
'&goodsIds=' + |
|
|
|
|
goodsIds + |
|
|
|
|
'&Access-Token=' + |
|
|
|
@ -382,23 +367,6 @@ export default { |
|
|
|
|
getChannel(val) { |
|
|
|
|
this.queryParam.channel = val |
|
|
|
|
}, |
|
|
|
|
changeMerchant(val) { |
|
|
|
|
this.queryParam.merchant_id = val |
|
|
|
|
}, |
|
|
|
|
// 获取商户列表 |
|
|
|
|
getShopList() { |
|
|
|
|
this.isLoading = true |
|
|
|
|
ShopApi.shopList({ page: 1, pageSize: 10000 }) |
|
|
|
|
.then((result) => { |
|
|
|
|
const data = result.data.data |
|
|
|
|
for (const shop of data) { |
|
|
|
|
shop.name = shop.shop_name |
|
|
|
|
} |
|
|
|
|
this.merchantList = data |
|
|
|
|
this.isLoading = false |
|
|
|
|
}) |
|
|
|
|
.finally(() => (this.isLoading = false)) |
|
|
|
|
}, |
|
|
|
|
getDataList() { |
|
|
|
|
return GoodsApi.getDataList().then((result) => { |
|
|
|
|
const obj = result.data |
|
|
|
|