Commit 3e6fdc47 authored by lihui's avatar lihui

feat:node-01

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