Commit c32e5dfb authored by lihui's avatar lihui

feat: merge

parents 6c39447d 12ba2c1a
...@@ -399,7 +399,7 @@ export default { ...@@ -399,7 +399,7 @@ export default {
async pindanGoodsMet(otaID, goodsName) { async pindanGoodsMet(otaID, goodsName) {
let params = { ota_id: otaID, goods_name: goodsName }; let params = { ota_id: otaID, goods_name: goodsName };
const res = await pindanGoods(params); const res = await pindanGoods(params);
this.comLibTableData = res.list; this.comLibTableData = res.result.list;
}, },
// 添加修改商品 // 添加修改商品
...@@ -503,7 +503,7 @@ export default { ...@@ -503,7 +503,7 @@ export default {
this.comTableData = this.addProduc; this.comTableData = this.addProduc;
}, },
}, },
created() { created() {
this.getBusinessListMet(); this.getBusinessListMet();
this.marketingInfoMet(); this.marketingInfoMet();
......
...@@ -62,6 +62,8 @@ export default { ...@@ -62,6 +62,8 @@ export default {
picUrlList: [] // 图片回显列表 picUrlList: [] // 图片回显列表
}, },
propData: {},
isShowPopver: false, // 是否展示图片框 isShowPopver: false, // 是否展示图片框
uploadUrl: `${GOODS_URI}/ksy/ks3apiunencrypt/ks3api_upload` // 金山云上传地址 uploadUrl: `${GOODS_URI}/ksy/ks3apiunencrypt/ks3api_upload` // 金山云上传地址
}; };
...@@ -85,20 +87,35 @@ export default { ...@@ -85,20 +87,35 @@ export default {
this.infoEditForm.picUploadList.splice(i, 1); this.infoEditForm.picUploadList.splice(i, 1);
} }
} }
},
// 获取营销活动详情
marketingInfoMet() {
console.log();
this.propData = JSON.parse(localStorage.getItem("propData"));
this.infoEditForm.title = this.propData.marketing_name;
this.infoEditForm.desc = this.propData.pindan_desc;
for (var i in this.propData.pindan_pic_url) {
this.infoEditForm.picUrlList.push({
url: this.propData.pindan_pic_url[i]
});
}
} }
}, },
watch: { watch: {
editInfo: function(newVal) { editInfo: function(newVal) {
this.infoEditForm.title = newVal.marketing_name; let marketingId = this.$route.query.marketing_id;
this.infoEditForm.desc = newVal.pindan_desc; if (marketingId == undefined) {
for (var i in newVal.pindan_pic_url) { return;
this.infoEditForm.picUrlList.push({
url: newVal.pindan_pic_url[i]
});
} }
localStorage.setItem("propData", JSON.stringify(newVal));
} }
}, },
created() {}
created() {
this.marketingInfoMet();
}
}; };
</script> </script>
......
...@@ -21,12 +21,13 @@ ...@@ -21,12 +21,13 @@
<addProduc <addProduc
ref="addProduc" ref="addProduc"
v-show="active === 2" v-show="active === 2"
:editInfo="testData" :editInfo="infoEditArr"
:addProduc="addProducArr" :addProduc="addProducArr"
/> />
<spellOrderSet <spellOrderSet
:spellOrderSetArr="spellOrderSetArr" ref="spellOrderSet"
v-show="active === 3" v-show="active === 3"
:spellOrderSet="spellOrderSetArr"
/> />
</div> </div>
<div class="stepsBtn"> <div class="stepsBtn">
...@@ -93,17 +94,18 @@ export default { ...@@ -93,17 +94,18 @@ export default {
"," ","
) )
}; };
this.active = 2;
} else if (this.active === 2) { } else if (this.active === 2) {
if (this.$refs.addProduc.comTableData.length == 0) { if (this.$refs.addProduc.comTableData.length == 0) {
ElMessage.error("请至少选择一个商品"); ElMessage.error("请至少选择一个商品");
return; return;
} }
this.addProducArr = this.$refs.addProduc; this.addProducArr = this.$refs.addProduc.comTableData;
this.active = 3;
} else { } else {
this.startDate = this.$refs.spellOrderSet.startDate; console.log();
this.endDate = this.$refs.spellOrderSet.endDate;
} }
this.active++; // this.active++;
}, },
// 获取营销活动详情 // 获取营销活动详情
...@@ -119,7 +121,7 @@ export default { ...@@ -119,7 +121,7 @@ export default {
const res = await marketingInfo(params); const res = await marketingInfo(params);
this.infoEditArr = res.result.marketing_info; this.infoEditArr = res.result.marketing_info;
this.addProducArr = res.result.goods_list; this.addProducArr = res.result.goods_list;
this.spellOrderSetArr = res.result.take_place; this.spellOrderSetArr = res.result.marketing_info;
}, },
// 取消 // 取消
...@@ -128,9 +130,11 @@ export default { ...@@ -128,9 +130,11 @@ export default {
}, },
// 确认发布 // 确认发布
async confirmRelease() { async confirmRelease() {
for (var i in this.addProducArr.comTableData) { for (var i in this.addProducArr) {
this.goodsSkuIDArr.push(this.addProducArr.comTableData[i].goods_sku_id); this.goodsSkuIDArr.push(this.addProducArr[i].goods_sku_id);
} }
this.startDate = this.$refs.spellOrderSet.startDate;
this.endDate = this.$refs.spellOrderSet.endDate;
let params = { let params = {
marketing_id: marketing_id:
this.$route.query.marketing_id == undefined this.$route.query.marketing_id == undefined
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment