Commit 8db363d7 authored by zhengke's avatar zhengke

修改

parent 29c2b379
......@@ -410,25 +410,33 @@
},
//删除规格模板
DeleteggModule(item, index) {
this.ComTreeList = [];
this.memberList2 = [];
this.SpecificationList.splice(index, 1);
if (this.SpecificationList.length == 0) {
this.SeparateDistributionType = 1;
}
this.$forceUpdate();
this.skuList = [];
this.getSkuData([], 0, this.SpecificationList);
let that = this;
that.Confirm("是否确认删除?", function () {
that.getDeleteSpec(item.Id);
that.ComTreeList = [];
that.memberList2 = [];
that.SpecificationList.splice(index, 1);
if (that.SpecificationList.length == 0) {
that.SeparateDistributionType = 1;
}
that.$forceUpdate();
that.skuList = [];
that.getSkuData([], 0, that.SpecificationList);
});
},
//删除规格值
Deleteggz(item, index, index2) {
this.SpecificationList[index].SpecificationValueList.splice(index2, 1);
this.$forceUpdate();
if (this.SpecificationList[index].SpecificationValueList.length == 0) {
this.SpecificationList.splice(index, 1);
}
this.skuList = [];
this.getSkuData([], 0, this.SpecificationList);
let that = this;
that.Confirm("是否确认删除?", function () {
that.getDeleteSpecValue(item.Id);
that.SpecificationList[index].SpecificationValueList.splice(index2, 1);
that.$forceUpdate();
if (that.SpecificationList[index].SpecificationValueList.length == 0) {
that.SpecificationList.splice(index, 1);
}
that.skuList = [];
that.getSkuData([], 0, that.SpecificationList);
});
},
openggImg(item, index, item2, index2) {
this.changeState = true;
......@@ -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() {
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