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