Commit f917b4bc authored by zhangjianguo's avatar zhangjianguo

1

parent a5e344d2
......@@ -1818,6 +1818,7 @@
},
data() {
return {
ComTreeList:[],
thisType:0,
tableData: [],
SpecificationList: [],
......@@ -2057,7 +2058,7 @@
})
}
this.addMsg.CostPrice=this.addMsg.SellingPrice-this.addMsg.SellingPrice*(parseFloat(maxratio)/100.00)
// this.addMsg.CostPrice=this.addMsg.SellingPrice-this.addMsg.SellingPrice*(parseFloat(maxratio)/100.00)
if(this.shareSettings.length>0){
this.shareSettings.forEach(x=>{
x.cb=parseFloat(this.addMsg.CostPrice)/(1.00-(parseFloat(x.CommissionRatio)/100.00))
......@@ -2380,18 +2381,28 @@
},
calcdis(dislist) {
let memberList2 = JSON.parse(JSON.stringify(dislist));
let ComTreeList=JSON.parse(JSON.stringify(this.ComTreeList));
this.ComTreeList=[];
dislist.forEach(item => {
item.GradeCommissionList = [];
for (let i = 0; i < this.DropdownList.length; i++) {
let obj = {
SpecificationSort:item.SpecificationSort,
DistributorGrade: this.DropdownList[i].Id,
OneCommission: 0,
TwoCommission: 0,
ThreeCommission: 0,
Name: item.Name
};
item.GradeCommissionList.push(obj);
ComTreeList.forEach(val=>{
let obj = {
SpecificationSort:item.SpecificationSort,
DistributorGrade: this.DropdownList[i].Id,
OneCommission: 0,
TwoCommission: 0,
ThreeCommission: 0,
Name: item.Name
};
item.GradeCommissionList.push(obj);
if(val.SpecificationSort==item.SpecificationSort){
item.GradeCommissionList=[];
item.GradeCommissionList=val.GradeCommissionList;
}
})
}
});
memberList2.forEach(item => {
......@@ -2405,6 +2416,7 @@
}
});
this.disList2 = JSON.parse(JSON.stringify(dislist));
console.log("this.disList2 ",this.disList2 )
this.memberList2 = JSON.parse(JSON.stringify(memberList2));
},
addggModeule() {
......@@ -2430,8 +2442,15 @@
if (this.SpecificationList.length > 0) {
this.addMsg.IsCustomSpecification = 1;
}
if (this.addMsg.SeparateDistributionType == 1) {
this.addMsg.DistributionCommissionList = this.disList1;
this.disList1=[
{
SpecificationSort: "",
GradeCommissionList: this.GradeCommissionList
}
],
this.addMsg.DistributionCommissionList = this.disList1;
} else {
this.addMsg.DistributionCommissionList = this.disList2;
}
......@@ -2668,6 +2687,7 @@
}
this.initShareSettings();
this.SpecificationPriceList = this.addMsg.SpecificationPriceList;
this.ComTreeList= this.addMsg.DistributionCommissionTreeList;
// console.log(this.SpecificationPriceList)
this.SpecificationList = this.addMsg.SpecificationList;
if (this.addMsg.SeparateDistributionType == 1) {
......@@ -2679,8 +2699,8 @@
if (this.addMsg.SeparateDistributionType == 2) {
// this.disList2 = this.addMsg.DistributionCommissionTreeList;
this.getDistributor();
this.thisType=1;
}
this.thisType=1;
this.disList1 = [];
let objNew = {
......@@ -2819,13 +2839,23 @@
this.GradeCommissionList = JSON.parse(
JSON.stringify(this.GradeCommissionList)
);
this.disList1 = [];
this.disList2 = [];
let objNew = {
SpecificationSort: "",
GradeCommissionList: this.GradeCommissionList
};
this.disList1.push(objNew);
if(this.$route.query.GoodsId){
if (this.addMsg.SeparateDistributionType == 1) {
this.disList1 = this.addMsg.DistributionCommissionTreeList;
if (this.addMsg.DistributionCommissionTreeList.length > 0) {
this.GradeCommissionList = this.addMsg.DistributionCommissionTreeList[0].GradeCommissionList;
}
}
}else{
this.disList1 = [];
let objNew = {
SpecificationSort: "",
GradeCommissionList: this.GradeCommissionList
};
this.disList1.push(objNew);
}
console.log("this.disList1",this.disList1)
this.skuList = [];
this.getSkuData([], 0, this.SpecificationList);
}
......
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