Commit 11895c97 authored by 黄媛媛's avatar 黄媛媛
parents b53f0116 e7add3e7
......@@ -546,7 +546,7 @@
formName: '',
imgDialog: false,
rules: {},
shareGroup_list:[]
shareGroup_list: []
};
},
created() {},
......@@ -583,6 +583,7 @@
this.apipost("/api/GroupBuy/SetGroupbuyActivity", this.addMsg, res => {
console.log("res", res);
if (res.data.resultCode == 1) {
this.CommonJump("/pintuanList", {});
this.Success(res.data.message);
} else {
this.Info(res.data.message);
......@@ -594,6 +595,7 @@
this.isShowGoods = false;
this.IsShowSpec = false;
var chooseGoods = this.$refs.choiceGood.getChoicedGoods();
console.log("chooseGoods", chooseGoods);
if (chooseGoods && chooseGoods.length > 0) {
this.addMsg.GoodId = chooseGoods[0].Id;
this.addMsg.name = chooseGoods[0].Name;
......@@ -604,7 +606,24 @@
this.addMsg.Goods_unit = chooseGoods[0].DefaultSpecificationName;
this.addMsg.Goods_no = chooseGoods[0].GoodsNumbers;
this.addMsg.Goods_weight = chooseGoods[0].GoodsWeight;
this.SpecificationList = chooseGoods[0].SpecificationList;
var tempSpecArray = chooseGoods[0].SpecificationList;
if (tempSpecArray && tempSpecArray.length > 0) {
tempSpecArray.forEach(item => {
item.Id = 0;
if (item.SpecificationValueList && item.SpecificationValueList.length > 0) {
item.SpecificationValueList.forEach(secondItem => {
secondItem.Id = 0;
})
}
})
}
this.SpecificationList = tempSpecArray;
var tempPriceArray = chooseGoods[0].SpecificationPriceList;
if (tempPriceArray && tempPriceArray.length > 0) {
tempPriceArray.forEach(item => {
item.Id = 0;
});
}
this.SpecificationPriceList = chooseGoods[0].SpecificationPriceList;
this.IsShowSpec = true;
}
......@@ -675,8 +694,8 @@
this.imgDialog = false;
},
//获取子组件group_list
getGroup(group_list){
this.shareGroup_list=group_list
getGroup(group_list) {
this.shareGroup_list = group_list
}
}
......
......@@ -138,8 +138,8 @@
class="el-icon-error close"></span>
<div v-if="item2.Image != ''" style="position: absolute;">
<div class="app-attachment">
<el-button @click="openggImg(item, index, item2, index2)" type="primary"
size="small">替换</el-button>
<el-button @click="openggImg(item, index, item2, index2)" type="primary" size="small">替换
</el-button>
</div>
</div>
</div>
......@@ -260,14 +260,14 @@
<script>
import ChooseImg from "@/components/global/ChooseImg.vue";
export default {
props: ['SpecList',"SpecPriceList"],
props: ['SpecList', "SpecPriceList"],
components: {
ChooseImg
},
data() {
return {
SpecificationList: [], //规格数组
SpecificationPriceList: [],
SpecificationPriceList: [],//规格+值 价格列表
ComTreeList: [],
memberList2: [],
skuList: [],
......@@ -288,9 +288,6 @@
SeparateDistributionType: 1, //待传递给父组件
EnjoyMember: 1, //待传父组件
};
},
created() {
},
watch: {
'SpecList': {
......@@ -298,7 +295,7 @@
this.SpecificationList = JSON.parse(JSON.stringify(val));
},
},
'SpecPriceList': {
'SpecPriceList': {
handler: function (val, oldval) {
this.SpecificationPriceList = JSON.parse(JSON.stringify(val));
},
......@@ -417,10 +414,9 @@
calcdis(dislist) {
let memberListarray = JSON.parse(JSON.stringify(dislist));
let ComTreeList = JSON.parse(JSON.stringify(this.ComTreeList));
// this.ComTreeList=[];//无法添加 报错 暂时注释掉
for (let i = 0; i < dislist.length; i++) {
if (this.SeparateDistributionType == 2 && this.ComTreeList.length >
0) { //this.ComTreeList.length为0 的时候 全部为空
0) {
if (i < ComTreeList.length) {
ComTreeList.forEach((val, z) => {
if (val.SpecificationSort == dislist[i].SpecificationSort) {
......@@ -681,10 +677,6 @@
}
});
},
CheckBox(val) {
console.log(val, 'valll');
},
},
mounted() {
this.getSpeciList();
......
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