Commit ad9310e0 authored by 黄媛媛's avatar 黄媛媛

根据编号获取详情没有分销数组bug

parent 15cb5448
......@@ -154,7 +154,7 @@
width="120"
>
<template slot="header" slot-scope="scope">
<template slot="header" >
已出售量
<el-tooltip effect="dark" content="已出售量=实际销量+虚拟销量,按实际销量排序" placement="top">
<i class="el-icon-info"></i>
......
......@@ -1857,51 +1857,57 @@
GoodsId: this.GoodsId
},
res => {
this.addMsg = res.data.data;
if (this.addMsg.SupplierId != 0) {
this.SupplierId = this.addMsg.SupplierId;
if(res.data.resultCode == 1){
this.addMsg = res.data.data;
if (this.addMsg.SupplierId != 0) {
this.SupplierId = this.addMsg.SupplierId;
}
if (!this.$route.query.GoodsId) {
this.addMsg.Id=0
}
if (this.addMsg.LimitBuyGoodsNum != -1) {
this.BuyGoodsNumState = false
}
if (this.addMsg.LimitBuyOrderNum != -1) {
this.BuyOrderNumState = false
}
this.initShareSettings();
this.SpecificationPriceList = this.addMsg.SpecificationPriceList;
this.ComTreeList = this.addMsg.DistributionCommissionTreeList;
this.SpecificationList = this.addMsg.SpecificationList;
if(this.SpecificationList.length>0){ //根据编码来的详情 重新调用这个方法 否则分销详情设置没有数据
this.getDistributor()
}
if (this.addMsg.SeparateDistributionType == 1) {
this.disList1 = this.addMsg.DistributionCommissionTreeList;
if (this.addMsg.DistributionCommissionTreeList.length > 0) {
this.GradeCommissionList = this.addMsg.DistributionCommissionTreeList[0].GradeCommissionList;
}
}
this.memberList2 = this.addMsg.MemberPriceTreeList;
this.thisType = 1;
this.disList1 = [];
let objNew = {
SpecificationSort: "",
GradeCommissionList: this.GradeCommissionList
};
this.disList1.push(objNew);
if (this.addMsg.GoodsDetails && this.addMsg.GoodsDetails != "") {
// this.$refs.ue.SetVal(this.addMsg.GoodsDetails);
this.defaultMsg=this.addMsg.GoodsDetails;
}
this.NewCategoryList = [];
this.addMsg.CategoryList.forEach(item => {
item.Name = item.CategoryName;
this.NewCategoryList.push(item.CategoryId);
});
if (this.hpState == 1) {
this.addMsg.SeparateDistribution = 0;
}
this.getSuggestPrice();
}
if (!this.$route.query.GoodsId) {
this.addMsg.Id=0
}
if (this.addMsg.LimitBuyGoodsNum != -1) {
this.BuyGoodsNumState = false
}
if (this.addMsg.LimitBuyOrderNum != -1) {
this.BuyOrderNumState = false
}
this.initShareSettings();
this.SpecificationPriceList = this.addMsg.SpecificationPriceList;
this.ComTreeList = this.addMsg.DistributionCommissionTreeList;
this.SpecificationList = this.addMsg.SpecificationList;
if (this.addMsg.SeparateDistributionType == 1) {
this.disList1 = this.addMsg.DistributionCommissionTreeList;
if (this.addMsg.DistributionCommissionTreeList.length > 0) {
this.GradeCommissionList = this.addMsg.DistributionCommissionTreeList[0].GradeCommissionList;
}
}
this.memberList2 = this.addMsg.MemberPriceTreeList;
this.thisType = 1;
this.disList1 = [];
let objNew = {
SpecificationSort: "",
GradeCommissionList: this.GradeCommissionList
};
this.disList1.push(objNew);
if (this.addMsg.GoodsDetails && this.addMsg.GoodsDetails != "") {
// this.$refs.ue.SetVal(this.addMsg.GoodsDetails);
this.defaultMsg=this.addMsg.GoodsDetails;
}
this.NewCategoryList = [];
this.addMsg.CategoryList.forEach(item => {
item.Name = item.CategoryName;
this.NewCategoryList.push(item.CategoryId);
});
if (this.hpState == 1) {
this.addMsg.SeparateDistribution = 0;
}
this.getSuggestPrice();
}
);
},
......
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