|
|
|
@ -164,12 +164,20 @@ |
|
|
|
|
v-model:visible="priceVisible" |
|
|
|
|
width="450px" |
|
|
|
|
title="分类加价" |
|
|
|
|
@ok="handleUpdatePrice(selectedRowKeys, categoryPriceIds, rate)" |
|
|
|
|
@ok="handleUpdatePrice(selectedRowKeys, categoryPriceIds, rate,channel)" |
|
|
|
|
> |
|
|
|
|
<div style="display: flex" class="fen"> |
|
|
|
|
<span style="margin-right: 5px">选择渠道:</span> |
|
|
|
|
<a-select @change="getChannelRate" style="width: 326px" placeholder="请选择"> |
|
|
|
|
<a-select-option :value="item.id" v-for="item in checkList" :key="item.id"> |
|
|
|
|
{{ item.name }} |
|
|
|
|
</a-select-option> |
|
|
|
|
</a-select> |
|
|
|
|
</div> |
|
|
|
|
<div style="display: flex;margin-top:13px" class="fen"> |
|
|
|
|
<span style="margin-right: 5px">商品分类:</span |
|
|
|
|
><a-tree-select |
|
|
|
|
style="width: 326px" |
|
|
|
|
style="width: 326px;" |
|
|
|
|
placeholder="请选择商品分类" |
|
|
|
|
:dropdownStyle="{ maxHeight: '500px', overflow: 'auto' }" |
|
|
|
|
:treeData="categoryListTree" |
|
|
|
@ -182,7 +190,7 @@ |
|
|
|
|
|
|
|
|
|
<div class="fen"> |
|
|
|
|
<span style="margin-right: 5px">加价利润率:</span> |
|
|
|
|
<input placeholder="请输入加价利润率" @input="validateAmount" v-model="rate" class="input" type="text" /> |
|
|
|
|
<input placeholder="请输入加价利润率" style="width: 316px;" @input="validateAmount" v-model="rate" class="input" type="text" /> |
|
|
|
|
</div> |
|
|
|
|
</a-modal> |
|
|
|
|
<a-modal |
|
|
|
@ -620,6 +628,7 @@ export default { |
|
|
|
|
categoryIds: [], |
|
|
|
|
categoryPriceIds: [], |
|
|
|
|
rate: '', |
|
|
|
|
channel:'', |
|
|
|
|
batchRate: '', |
|
|
|
|
pickerOptions: { |
|
|
|
|
disabledDate(time) { |
|
|
|
@ -880,6 +889,9 @@ export default { |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
getChannelRate(val) { |
|
|
|
|
this.channel = val |
|
|
|
|
}, |
|
|
|
|
getGoodsJingDong(val) { |
|
|
|
|
this.queryParam.is_jd_remove = val |
|
|
|
|
}, |
|
|
|
@ -974,7 +986,11 @@ export default { |
|
|
|
|
this.categoryPriceIds.push(item.value) |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
handleUpdatePrice(goodsIds, categoryIds, rate) { |
|
|
|
|
handleUpdatePrice(goodsIds, categoryIds, rate,channel) { |
|
|
|
|
if (!channel) { |
|
|
|
|
this.$message.warn('请选择渠道', 1.5) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
if (categoryIds.length == 0) { |
|
|
|
|
this.$message.warn('请至少选择1个商品分类', 1.5) |
|
|
|
|
return |
|
|
|
@ -984,7 +1000,7 @@ export default { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
this.isLoading = true |
|
|
|
|
GoodsApi.addPrice({ categoryIds, rate }) |
|
|
|
|
GoodsApi.addPrice({ categoryIds, rate,channel }) |
|
|
|
|
.then((result) => { |
|
|
|
|
this.priceVisible = false |
|
|
|
|
this.$message.success(result.message, 1.5) |
|
|
|
@ -1200,6 +1216,7 @@ export default { |
|
|
|
|
span { |
|
|
|
|
color: #555; |
|
|
|
|
width: 80px; |
|
|
|
|
line-height: 32px; |
|
|
|
|
} |
|
|
|
|
.input { |
|
|
|
|
background-color: #fff; |
|
|
|
|