分类加价渠道

main
fanfan 2 weeks ago
parent 6c50ea5f12
commit f953c04c82
  1. 37
      src/views/dataCenter/goods/Index.vue

@ -164,9 +164,17 @@
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"
@ -182,7 +190,14 @@
<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
@ -345,12 +360,12 @@
<span slot="profit_rate" slot-scope="text, item">
<p>{{ text > 0 ? Number(text) + '%' : 0 }}</p>
</span>
<span slot="item_1" slot-scope="item">
<span slot="item_1" slot-scope="item">
<p class="twoline-hide" style="width: 40px">
{{ item.spec_type == 10 ? '单规格' : '多规格' }}
</p>
<p class="twoline-hide" style="width: 40px">
{{ item.spu_id>0? '已组合' : '未组合' }}
<p class="twoline-hide" style="width: 40px">
{{ item.spu_id > 0 ? '已组合' : '未组合' }}
</p>
</span>
<!-- 商品池 -->
@ -614,6 +629,7 @@ export default {
categoryIds: [],
categoryPriceIds: [],
rate: '',
channel:'',
batchRate: '',
pickerOptions: {
disabledDate(time) {
@ -874,6 +890,9 @@ export default {
})
})
},
getChannelRate(val) {
this.channel = val
},
getGoodsJingDong(val) {
this.queryParam.is_jd_remove = val
},
@ -968,7 +987,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
@ -978,7 +1001,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)

Loading…
Cancel
Save