Commit 8db363d7 authored by zhengke's avatar zhengke

修改

parent 29c2b379
...@@ -410,25 +410,33 @@ ...@@ -410,25 +410,33 @@
}, },
//删除规格模板 //删除规格模板
DeleteggModule(item, index) { DeleteggModule(item, index) {
this.ComTreeList = []; let that = this;
this.memberList2 = []; that.Confirm("是否确认删除?", function () {
this.SpecificationList.splice(index, 1); that.getDeleteSpec(item.Id);
if (this.SpecificationList.length == 0) { that.ComTreeList = [];
this.SeparateDistributionType = 1; that.memberList2 = [];
} that.SpecificationList.splice(index, 1);
this.$forceUpdate(); if (that.SpecificationList.length == 0) {
this.skuList = []; that.SeparateDistributionType = 1;
this.getSkuData([], 0, this.SpecificationList); }
that.$forceUpdate();
that.skuList = [];
that.getSkuData([], 0, that.SpecificationList);
});
}, },
//删除规格值 //删除规格值
Deleteggz(item, index, index2) { Deleteggz(item, index, index2) {
this.SpecificationList[index].SpecificationValueList.splice(index2, 1); let that = this;
this.$forceUpdate(); that.Confirm("是否确认删除?", function () {
if (this.SpecificationList[index].SpecificationValueList.length == 0) { that.getDeleteSpecValue(item.Id);
this.SpecificationList.splice(index, 1); that.SpecificationList[index].SpecificationValueList.splice(index2, 1);
} that.$forceUpdate();
this.skuList = []; if (that.SpecificationList[index].SpecificationValueList.length == 0) {
this.getSkuData([], 0, this.SpecificationList); that.SpecificationList.splice(index, 1);
}
that.skuList = [];
that.getSkuData([], 0, that.SpecificationList);
});
}, },
openggImg(item, index, item2, index2) { openggImg(item, index, item2, index2) {
this.changeState = true; this.changeState = true;
...@@ -604,6 +612,34 @@ ...@@ -604,6 +612,34 @@
} }
}); });
}, },
//删除规格后调用
getDeleteSpec(Id){
let msg={
Id:Id
}
this.apipost("/api/GroupBuy/DeleteSpec", msg, res => {
console.log(res,'删除了')
if(res.data.resultCode==1){
}else{
this.Error(res.data.message);
}
})
},
//删除规格值过后调用
getDeleteSpecValue(Id){
let msg={
Id:Id
}
this.apipost("/api/GroupBuy/DeleteSpecValue", msg, res => {
console.log(res,'删除了')
if(res.data.resultCode==1){
}else{
this.Error(res.data.message);
}
})
}
}, },
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