Commit 2eda77b1 authored by zhangjianguo's avatar zhangjianguo

1

parent 25b852f9
......@@ -31,7 +31,7 @@
style="margin-right:10px;"
@close="exitCheck(item, index)"
v-for="(item, index) in addMsg.CategoryList"
:key="index"
:key="index+'1'"
closable
>{{ item.CategoryName }}</el-tag
>
......@@ -119,7 +119,7 @@
<div flex="dir:left">
<div
v-for="(item, index) in addMsg.CarouselImageList"
:key="index"
:key="index+'2'"
style="margin-right: 20px; position: relative; "
>
<div
......@@ -412,7 +412,7 @@
<div class="app-attr-group">
<div
v-for="(item, index) in SpecificationList"
:key="index"
:key="index+'3'"
style="margin-bottom:16px;"
>
<div flex="dir:left cross:center" class="bg">
......@@ -452,7 +452,7 @@
<div
v-for="(item2,
index2) in item.SpecificationValueList"
:key="index2"
:key="index2+'4'"
class="attr-list"
>
<el-input
......@@ -595,12 +595,12 @@
<el-table-column type="selection" width="55">
</el-table-column>
<template v-for="(item, index) in SpecificationList">
<el-table-column :key="index" :label="item.Name">
<el-table-column :key="index+'5'" :label="item.Name">
<template slot-scope="scope">
<span
v-if="index == index2"
v-for="(item2, index2) in scope.row.AttrList"
:key="index2"
:key="index2+'6'"
>
{{ scope.row.AttrList[index2].SVName }}
</span>
......@@ -687,7 +687,7 @@
style="margin-right:10px;"
@close="ServiceCheck(item, index)"
v-for="(item, index) in addMsg.ServiceList"
:key="index"
:key="index+'7'"
closable
>{{ item.Name }}</el-tag
>
......@@ -1067,7 +1067,7 @@
v-for="(item, index) in butorInt"
:label="`${index + 1}级分销`"
:value="index + 1"
:key="index"
:key="index+'8'"
></el-option>
</el-select>
<el-input
......@@ -1107,7 +1107,7 @@
<template slot-scope="scope">
<template v-for="(item2, index) in DropdownList">
<span
:key="index"
:key="index+'9'"
v-if="scope.row.DistributorGrade == item2.Id"
>{{ item2.Name }}</span
>
......@@ -1115,7 +1115,7 @@
</template>
</el-table-column>
<template v-for="(item, index) in butorIntList">
<el-table-column :key="index" :label="item.Name">
<el-table-column :key="index+'10'" :label="item.Name">
<template slot-scope="scope">
<span>
<el-input
......@@ -1205,7 +1205,7 @@
v-for="(item, index) in DropdownList"
:label="item.Name"
:value="item.Grade"
:key="index"
:key="index+'11'"
></el-option>
</el-select>
<el-select
......@@ -1217,7 +1217,7 @@
v-for="(item, index) in butorInt"
:label="`${index + 1}级分销`"
:value="index + 1"
:key="index"
:key="index+'12'"
></el-option>
</el-select>
<el-input
......@@ -1253,7 +1253,7 @@
>
<template v-for="(item, index) in SpecificationList">
<el-table-column
:key="index"
:key="index+'13'"
:label="item.Name"
width="100"
>
......@@ -1261,7 +1261,7 @@
<span
v-if="index == index2"
v-for="(item2, index2) in scope.row.AttrList"
:key="index2"
:key="index2+'14'"
>
{{ scope.row.AttrList[index2].SVName }}
</span>
......@@ -1391,7 +1391,7 @@
>
<div
v-for="(item, index) in memberList1[0].GradePriceList"
:key="index"
:key="index+'15'"
>
<el-input
style="width:700px"
......@@ -1453,7 +1453,7 @@
</el-table-column>
<template v-for="(item, index) in SpecificationList">
<el-table-column
:key="index"
:key="index+'16'"
:label="item.Name"
width="100"
>
......@@ -1461,7 +1461,7 @@
<span
v-if="index == index2"
v-for="(item2, index2) in scope.row.AttrList"
:key="index2"
:key="index2+'17'"
>
{{ scope.row.AttrList[index2].SVName }}
</span>
......@@ -1469,7 +1469,7 @@
</el-table-column>
</template>
<template v-for="(item, index) in huiyList">
<el-table-column :key="index" :label="item.Name">
<el-table-column :key="index+'18'" :label="item.Name">
<template slot-scope="scope">
<el-input
v-model="scope.row.GradePriceList[index].MemberPrice"
......@@ -1508,7 +1508,7 @@
>
<div
v-for="(item, index) in fenleiData"
:key="index"
:key="index+'19'"
flex="dir:left box:first"
class="cat-item"
>
......@@ -1540,7 +1540,7 @@
>
<div
v-for="(item, index) in childList2"
:key="index"
:key="index+'20'"
flex="dir:left box:first"
class="cat-item"
>
......@@ -1572,7 +1572,7 @@
>
<div
v-for="(item, index) in childList3"
:key="index"
:key="index+'21'"
flex="dir:left box:first"
class="cat-item"
>
......@@ -1592,7 +1592,7 @@
<el-tag
@close="exitCheck(item)"
v-for="(item, index) in addMsg.CategoryList"
:key="index"
:key="index+'22'"
type="warning"
closable
style="margin-right:5px"
......@@ -1690,7 +1690,7 @@
style="padding-bottom:10px"
class="yfradio"
v-for="(item, index) in ruleList"
:key="index"
:key="index+'23'"
:label="item"
>{{ item.RulesName }}</el-radio
>
......@@ -2040,7 +2040,6 @@
res => {
if (res.data.resultCode == 1) {
this.shareSettings=res.data.data.RatioList||[]
console.log(this.shareSettings)
this.calcCommission(0)
}
}
......@@ -2050,15 +2049,18 @@
if(t==0){
let maxratio=0
let minratio=100
if(this.shareSettings.length>0){
this.shareSettings.forEach(x=>{
if(x.CommissionRatio>maxratio){
maxratio=x.CommissionRatio
}
})
}
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))
// console.log(this.addMsg.CostPrice)
x.commission=(this.addMsg.SellingPrice-x.cb).toFixed(2)
x.cb=x.cb.toFixed(2)
if(x.CommissionRatio<minratio){
......@@ -2066,7 +2068,9 @@
minratio=x.CommissionRatio
}
})
console.log(this.shareSettings)
}
}
},
HpChange() {
......@@ -2336,6 +2340,8 @@
item.AttrList.push(obj);
});
});
list.forEach((item, i) => {
let obj={};
obj = {
......@@ -2360,6 +2366,7 @@
})
this.SpecificationPriceList.push(obj);
let obj1 = {
Id: i,
AttrList: item.AttrList,
......@@ -2372,7 +2379,6 @@
this.calcdis(JSON.parse(JSON.stringify(arrList)));
},
calcdis(dislist) {
console.log("dislist",dislist)
let memberList2 = JSON.parse(JSON.stringify(dislist));
dislist.forEach(item => {
item.GradeCommissionList = [];
......@@ -2399,9 +2405,7 @@
}
});
this.disList2 = JSON.parse(JSON.stringify(dislist));
console.log("disList2",this.disList2)
this.memberList2 = JSON.parse(JSON.stringify(memberList2));
console.log("memberList2",this.memberList2)
},
addggModeule() {
this.speciDig = true;
......@@ -2658,13 +2662,13 @@
},
res => {
this.addMsg = res.data.data;
console.log("this.addMsg",this.addMsg)
if(this.addMsg.SupplierId!=0){
this.SupplierId = this.addMsg.SupplierId;
}
this.initShareSettings();
this.SpecificationPriceList = this.addMsg.SpecificationPriceList;
// console.log(this.SpecificationPriceList)
this.SpecificationList = this.addMsg.SpecificationList;
if (this.addMsg.SeparateDistributionType == 1) {
this.disList1 = this.addMsg.DistributionCommissionTreeList;
......@@ -2822,9 +2826,7 @@
GradeCommissionList: this.GradeCommissionList
};
this.disList1.push(objNew);
console.log("this.disList1",this.disList1)
console.log("this.SpecificationList",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