Commit 3e6fdc47 authored by lihui's avatar lihui

feat:node-01

parent fc37866c
...@@ -263,7 +263,6 @@ export default { ...@@ -263,7 +263,6 @@ export default {
addCommodityPopup: false, // 添加商品弹窗状态 addCommodityPopup: false, // 添加商品弹窗状态
addCommodityTitle: "", // 标题 addCommodityTitle: "", // 标题
commodityForm: { commodityForm: {
picUrlList: [],
goods_name: "", goods_name: "",
price: "", price: "",
original_price: "", original_price: "",
...@@ -272,6 +271,7 @@ export default { ...@@ -272,6 +271,7 @@ export default {
business1: "", business1: "",
}, },
picUrlList: [],
picUploadList: [], // 上传详情图片列表 picUploadList: [], // 上传详情图片列表
isShowPopver: false, // 是否展示图片框 isShowPopver: false, // 是否展示图片框
uploadUrl: `${GOODS_URI}/ksy/ks3apiunencrypt/ks3api_upload`, // 金山云上传地址 uploadUrl: `${GOODS_URI}/ksy/ks3apiunencrypt/ks3api_upload`, // 金山云上传地址
...@@ -357,12 +357,13 @@ export default { ...@@ -357,12 +357,13 @@ export default {
// 查看商品详情 // 查看商品详情
async markGoodsInfoMet(goodSkuID) { async markGoodsInfoMet(goodSkuID) {
this.picUrlList = [];
let params = { goods_sku_id: goodSkuID, marketing_type: "4" }; let params = { goods_sku_id: goodSkuID, marketing_type: "4" };
const res = await markGoodsInfo(params); const res = await markGoodsInfo(params);
this.commodityForm = res.result.goods_info; this.commodityForm = res.result.goods_info;
this.commodityForm.business1 = res.result.goods_info.ota_id; this.commodityForm.business1 = res.result.goods_info.ota_id;
for (var i in res.result.goods_info.desc_pic_url_list) { for (var i in res.result.goods_info.desc_pic_url_list) {
this.commodityForm.picUrlList.push({ this.picUrlList.push({
url: res.result.goods_info.desc_pic_url_list[i], url: res.result.goods_info.desc_pic_url_list[i],
}); });
} }
...@@ -407,6 +408,7 @@ export default { ...@@ -407,6 +408,7 @@ export default {
this.addCommodityPopup = true; this.addCommodityPopup = true;
this.commodityForm = {}; this.commodityForm = {};
if (type == "add") { if (type == "add") {
console.log(this.editInfo);
this.commodityForm.total_amount_order = 0; this.commodityForm.total_amount_order = 0;
this.addCommodityTitle = "商品添加"; this.addCommodityTitle = "商品添加";
} else { } else {
...@@ -494,19 +496,19 @@ export default { ...@@ -494,19 +496,19 @@ export default {
} }
} }
}, },
// 获取营销活动详情 },
marketingInfoMet() {
watch: {
addProduc: function (newVal) {
let marketingId = this.$route.query.marketing_id; let marketingId = this.$route.query.marketing_id;
if (marketingId == undefined) { if (marketingId == undefined) {
return; return;
} }
this.comTableData = this.addProduc; this.comTableData = newVal;
}, },
}, },
created() { created() {
this.getBusinessListMet(); this.getBusinessListMet();
this.marketingInfoMet();
}, },
}; };
</script> </script>
......
...@@ -50,7 +50,7 @@ export default { ...@@ -50,7 +50,7 @@ export default {
props: { props: {
editInfo: { editInfo: {
type: Object, type: Object,
default: () => {} required: () => {}
} }
}, },
data() { data() {
...@@ -97,40 +97,27 @@ export default { ...@@ -97,40 +97,27 @@ export default {
return; return;
} }
this.propData = JSON.parse(localStorage.getItem("propData")); this.propData = JSON.parse(localStorage.getItem("propData"));
this.infoEditForm.title = this.editInfo.marketing_name; this.infoEditForm.title = this.propData.marketing_name;
this.infoEditForm.desc = this.editInfo.pindan_desc; this.infoEditForm.desc = this.propData.pindan_desc;
// for (var i in this.propData.pindan_pic_url) { for (var i in this.propData.pindan_pic_url) {
// this.infoEditForm.picUrlList.push({ this.infoEditForm.picUrlList.push({
// url: this.propData.pindan_pic_url[i] url: this.propData.pindan_pic_url[i]
// }); });
// } }
} }
}, },
watch: { watch: {
// editInfo: function(newVal) { editInfo: function(newVal) {
// let marketingId = this.$route.query.marketing_id; let marketingId = this.$route.query.marketing_id;
// if (marketingId == undefined) { if (marketingId == undefined) {
// return; return;
// } }
// localStorage.setItem("propData", JSON.stringify(newVal)); localStorage.setItem("propData", JSON.stringify(newVal));
// }
editInfo: {
// 监听props属性 展示自提点列表
handler: function() {
// TO DO
// console.log("watch");
// console.log("newVal:", newVal);
// console.log("oldVal:", oldVal);
this.marketingInfoMet();
},
deep: true
// immediate: true
} }
}, },
created() { created() {
// this.marketingInfoMet(); this.marketingInfoMet();
} }
}; };
</script> </script>
......
...@@ -71,7 +71,8 @@ export default { ...@@ -71,7 +71,8 @@ export default {
goodsSkuIDArr: [], // 接收goods_sku_id goodsSkuIDArr: [], // 接收goods_sku_id
spellOrderSetArr: [], spellOrderSetArr: [],
startDate: "", // 开始时间 startDate: "", // 开始时间
endDate: "" // 结束时间 endDate: "", // 结束时间
takePlaceIDArr: []
}; };
}, },
...@@ -88,13 +89,7 @@ export default { ...@@ -88,13 +89,7 @@ export default {
ElMessage.error("请填写商品标题"); ElMessage.error("请填写商品标题");
return; return;
} }
// this.infoEditArr = { this.infoEditArr.title = this.$refs.infoEdit.infoEditForm.title;
// title: this.$refs.infoEdit.infoEditForm.title,
// desc: this.$refs.infoEdit.infoEditForm.desc,
// picUploadList: this.$refs.infoEdit.infoEditForm.picUploadList.join(
// ","
// )
// };
this.active = 2; 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) {
...@@ -129,6 +124,7 @@ export default { ...@@ -129,6 +124,7 @@ export default {
cancel() { cancel() {
this.$router.go(-1); this.$router.go(-1);
}, },
// 确认发布 // 确认发布
async confirmRelease() { async confirmRelease() {
for (var i in this.addProducArr) { for (var i in this.addProducArr) {
...@@ -142,13 +138,14 @@ export default { ...@@ -142,13 +138,14 @@ export default {
? "" ? ""
: this.$route.query.marketing_id, : this.$route.query.marketing_id,
goods_sku_id: this.goodsSkuIDArr.join(","), goods_sku_id: this.goodsSkuIDArr.join(","),
marketing_name: this.infoEditArr.title, marketing_name: this.$refs.infoEdit.infoEditForm.title,
marketing_type: "4", marketing_type: "4",
op_cur_user: store.state.userInfo.email, op_cur_user: store.state.userInfo.email,
start_time: this.startDate, start_time: this.startDate,
end_time: this.endDate, end_time: this.endDate,
pindan_pic: this.infoEditArr.picUploadList, pindan_pic: this.$refs.infoEdit.infoEditForm.picUploadList.join(","),
pindan_desc: this.infoEditArr.desc pindan_desc: this.$refs.infoEdit.infoEditForm.desc,
take_place_ids: this.takePlaceIDArr
}; };
if (this.$route.query.marketing_id == undefined) { if (this.$route.query.marketing_id == undefined) {
const res = await addMarketing(params); const res = await addMarketing(params);
...@@ -175,7 +172,7 @@ export default { ...@@ -175,7 +172,7 @@ export default {
} }
}, },
getTakeTakePlaceListFromChild(val) { getTakeTakePlaceListFromChild(val) {
console.log(val); this.takePlaceIDArr = val;
} }
}, },
created() { created() {
......
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