Commit 5b227c61 by zhangquan

剩列表

1 parent 7b1be410
...@@ -207,5 +207,18 @@ const getCouponconfig = params => { ...@@ -207,5 +207,18 @@ const getCouponconfig = params => {
}) })
} }
// 获取车系详情
const getCategoryByMerchant = params => {
params.method = 'scrm.api.shopmall.discover.channel.merchant.config.detail'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getCouponconfig, configCoupons, getDirectionalGiftListApi, deleteChannel, updownshelvesChannel, topshelvesChannel, goodsActivity, crowdfundingActivity, bulgeActivity, getTencentcloudmedialist, addChannelTopic, getTopicDetail, getChannelTopicList, getMerchantListApi, openSubscribe, selStoreConfig, getMerchantShare, configMerchant, getconfigMerchant } export default { getCouponconfig, configCoupons, getDirectionalGiftListApi, deleteChannel, updownshelvesChannel, topshelvesChannel, goodsActivity, crowdfundingActivity, bulgeActivity, getTencentcloudmedialist, addChannelTopic, getTopicDetail, getChannelTopicList, getMerchantListApi, openSubscribe, selStoreConfig, getMerchantShare, configMerchant, getconfigMerchant, getCategoryByMerchant }
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<el-button @click="handleCancel">取消</el-button> <el-button @click="handleCancel">取消</el-button>
<el-button type="primary" @click="handleSave">确定</el-button> <el-button type="primary" @click="handleSave">确定</el-button>
</GLFooter> </GLFooter>
<selectCarDialog v-if="carDialogVisible" @handleClose="handleCarSeriesClose" @handleConfirm="handleConfirm" :dialogVisible="carDialogVisible"></selectCarDialog> <selectCarDialog v-if="carDialogVisible" :echoData="vehicleSeriesRequestList" @handleClose="handleCarSeriesClose" @handleConfirm="handleConfirm" :dialogVisible="carDialogVisible"></selectCarDialog>
<selectGoods v-if="goodsVisible" :dialogVisible="goodsVisible" :goodsInfo="formObj" @handleGoodsConfirm="handleGoodsConfirm" @handleGoodsClose="handleGoodsClose"></selectGoods> <selectGoods v-if="goodsVisible" :dialogVisible="goodsVisible" :goodsInfo="formObj" @handleGoodsConfirm="handleGoodsConfirm" @handleGoodsClose="handleGoodsClose"></selectGoods>
<selectMerchantDialog @confirmDialog="confirmDialog" @closeDialog="closeDialog" :selectedList="merchantRequestList" v-if="merchantDialogVisible" :isVisible="merchantDialogVisible"></selectMerchantDialog> <selectMerchantDialog @confirmDialog="confirmDialog" @closeDialog="closeDialog" :selectedList="merchantRequestList" v-if="merchantDialogVisible" :isVisible="merchantDialogVisible"></selectMerchantDialog>
</div> </div>
......
...@@ -104,6 +104,7 @@ export default { ...@@ -104,6 +104,7 @@ export default {
if (this.merchantId) { if (this.merchantId) {
this.getconfigMerchant() this.getconfigMerchant()
this.getMerchantData() this.getMerchantData()
this.getCategoryDetail()
} }
}, },
methods: { methods: {
...@@ -118,6 +119,13 @@ export default { ...@@ -118,6 +119,13 @@ export default {
this.channelList = res.list this.channelList = res.list
}) })
}, },
getCategoryDetail(){
this.$apis.store.getCategoryByMerchant({merchantId: this.merchantId}).then(res => {
if(res?.vehicleSeriesList?.length){
this.editForm.vehicleSeriesRequests = res.vehicleSeriesList
}
})
},
getMerchantData() { getMerchantData() {
var params = { var params = {
merchantId: this.merchantId, merchantId: this.merchantId,
......
...@@ -63,14 +63,39 @@ ...@@ -63,14 +63,39 @@
singleChoice:{ singleChoice:{
type: Boolean, type: Boolean,
default: false default: false
} },
echoData: {
type: Array,
default: ()=>[]
},
},
created(){
this.echoDataFn()
}, },
mounted() { mounted() {
this.getCarSeriesData() this.getCarSeriesData()
}, },
methods:{ methods:{
echoDataFn(){
let obj = {}
this.echoData.forEach(item => {
let { brandId, brandName, childBrandId, childBrandName, vehicleSeriesId, vehicleSeriesName} = item
if(obj[brandId]){
if(obj[brandId][childBrandId]){
obj[brandId][childBrandId].push({rootId:brandId, rootName: brandName, parentId: vehicleSeriesId, parentName : childBrandName, id: vehicleSeriesId, name: vehicleSeriesName })
}else{
obj[brandId][childBrandId] = []
obj[brandId][childBrandId].push({rootId:brandId, rootName: brandName, parentId: vehicleSeriesId, parentName : childBrandName, id: vehicleSeriesId, name: vehicleSeriesName })
}
}else{
obj[brandId] = {}
obj[brandId][childBrandId] = []
obj[brandId][childBrandId].push({rootId:brandId, rootName: brandName, parentId: vehicleSeriesId, parentName : childBrandName, id: vehicleSeriesId, name: vehicleSeriesName })
}
})
this.selectdData = obj
},
changeBrandStatus(e, row, idx){ changeBrandStatus(e, row, idx){
const { id: rootId, name: rootName } = row const { id: rootId, name: rootName } = row
if(this.selectdData[rootId]){ if(this.selectdData[rootId]){
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!