Commit cafdaa2a authored by zhengke's avatar zhengke

修改

parent 192fb6a7
...@@ -392,7 +392,7 @@ ...@@ -392,7 +392,7 @@
</el-card> </el-card>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="阶梯团设置"> <el-tab-pane label="阶梯团设置">
<groupStep @getGroup="getGroup" :SpecList="TempSpecList" :GroupPriceList="TempGroupPriceList" <groupStep @getGroup="getGroup" @setNewVal="setNewVal" :SpecList="TempSpecList" :GroupPriceList="TempGroupPriceList"
:SpecPriceList="TempSpecPriceList"></groupStep> :SpecPriceList="TempSpecPriceList"></groupStep>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="分销价设置"> <el-tab-pane label="分销价设置">
...@@ -753,7 +753,9 @@ ...@@ -753,7 +753,9 @@
getGroup(group_list) { getGroup(group_list) {
this.TempGroupPriceList = group_list; this.TempGroupPriceList = group_list;
this.addMsg.GroupList = group_list; this.addMsg.GroupList = group_list;
this.shareGroup_list = group_list; },
setNewVal(val){
this.shareGroup_list = val;
}, },
//获取子组件规格 //获取子组件规格
getSpecList(val) { getSpecList(val) {
......
...@@ -54,26 +54,56 @@ ...@@ -54,26 +54,56 @@
</el-input> </el-input>
<el-button size="small" type="primary">设置</el-button> <el-button size="small" type="primary">设置</el-button>
</div> </div>
<el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" <el-table ref="multipleTable" :data="GradeCommissionList" tooltip-effect="dark"
style="width: 100%;border:1px solid #E8EAEE" @selection-change="handleSelectionChange"> style="width: 100%;border:1px solid #E8EAEE" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"> <el-table-column type="selection" width="55">
</el-table-column> </el-table-column>
<el-table-column label="等级名称" prop="leval" width="100"> <el-table-column width="100" label="等级名称">
</el-table-column>
<el-table-column label="一级分销" width="576">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input type="text" size="small" v-model="scope.row.yiji"> <template v-for="(item2, index) in DropdownList">
<el-button slot="append"></el-button> <span :key="index+'9'" v-if="scope.row.DistributorGrade == item2.Id">{{ item2.Name }}</span>
</el-input> </template>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="二级分销" width="575">
<template v-for="(item, index) in butorIntList">
<el-table-column :key="index+'10'" :label="item.Name">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input type="text" size="small" v-model="scope.row.erji"> <span>
<el-button slot="append"></el-button> <el-input v-model="scope.row.OneCommission" v-if="index == 0" size="small">
<el-button slot="append">
<span v-if="
msg.SeparateDistributionMoneyType == 2
"></span>
<span v-if="
msg.SeparateDistributionMoneyType == 1
">%</span>
</el-button>
</el-input>
<el-input v-model="scope.row.TwoCommission" v-if="index == 1" size="small">
<el-button slot="append">
<span v-if="
msg.SeparateDistributionMoneyType == 2
"></span>
<span v-if="
msg.SeparateDistributionMoneyType == 1
">%</span>
</el-button>
</el-input> </el-input>
<el-input v-model="scope.row.ThreeCommission" v-if="index == 2" size="small">
<el-button slot="append">
<span v-if="
msg.SeparateDistributionMoneyType == 2
"></span>
<span v-if="
msg.SeparateDistributionMoneyType == 1
">%</span>
</el-button>
</el-input>
</span>
</template> </template>
</el-table-column> </el-table-column>
</template>
</el-table> </el-table>
</div> </div>
</el-card> </el-card>
...@@ -90,6 +120,9 @@ ...@@ -90,6 +120,9 @@
fxVal: '', fxVal: '',
butorInt: 0, butorInt: 0,
butorIntList: [],
GradeCommissionList:[],
DropdownList:[],
msg: { msg: {
SeparateDistribution: 0, //是否开启分销佣金 SeparateDistribution: 0, //是否开启分销佣金
SeparateDistributionType: 1, //分销类型 SeparateDistributionType: 1, //分销类型
...@@ -113,14 +146,73 @@ ...@@ -113,14 +146,73 @@
getDistributor() { getDistributor() {
this.apipost("/api/user/GetDistributorBasicsInfo", {}, res => { this.apipost("/api/user/GetDistributorBasicsInfo", {}, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
console.log(res,'resss'); console.log(res, 'resss');
this.butorInt = res.data.data.DistributorTier; this.butorInt = res.data.data.DistributorTier;
this.butorIntList = [];
for (let i = 0; i < this.butorInt; i++) {
let msg = {
Name: i + 1 + "级分销"
};
this.butorIntList.push(msg);
}
} }
}); });
}, },
GetDropdownList() {
let msg = {
Id: 0,
Grade: 0,
Name: "",
Enabled: 1
};
this.apipost("/api/user/GetDistributorGradeDropdownList", msg, res => {
this.DropdownList = JSON.parse(JSON.stringify(res.data.data));
let msg = {
Grade: 0,
GradeCommissionList: [],
Name: "默认等级",
SpecificationSort: "",
Id: 0
};
this.DropdownList.unshift(msg);
this.DropdownList.forEach(item => {
item.GradeCommissionList = [];
item.SpecificationSort = "";
for (let i = 0; i < this.butorInt; i++) {
let obj = {
DistributorGrade: item.Id,
OneCommission: 0,
TwoCommission: 0,
ThreeCommission: 0
};
item.GradeCommissionList.push(obj);
}
});
this.DropdownList = JSON.parse(JSON.stringify(this.DropdownList));
if (!this.$route.query.Id){
this.GradeCommissionList = [];
this.DropdownList.forEach(item => {
let obj2 = {
DistributorGrade: item.Id,
OneCommission: 0,
TwoCommission: 0,
ThreeCommission: 0,
Name: item.Name
};
this.GradeCommissionList.push(obj2);
});
this.GradeCommissionList = JSON.parse(
JSON.stringify(this.GradeCommissionList)
);
}
});
},
}, },
mounted() { mounted() {
this.getDistributor(); this.getDistributor();
this.GetDropdownList();
}, },
computed: { computed: {
......
...@@ -107,6 +107,13 @@ ...@@ -107,6 +107,13 @@
this.new_SpecPriceList = JSON.parse(JSON.stringify(val)); this.new_SpecPriceList = JSON.parse(JSON.stringify(val));
}, },
}, },
'group_list':{
handler: function (newVal) {
this.$emit('setNewVal', newVal); //params是传递的参数
},
deep:true
}
}, },
created() {}, created() {},
methods: { methods: {
...@@ -173,12 +180,10 @@ ...@@ -173,12 +180,10 @@
Group_Num:0, Group_Num:0,
StepPriceList: attr StepPriceList: attr
}); });
this.$emit('getGroup', this.group_list); //params是传递的参数
}, },
//删除拼团 //删除拼团
destroyPintuan(index) { destroyPintuan(index) {
this.group_list.splice(index, 1); this.group_list.splice(index, 1);
this.$emit('getGroup', this.group_list); //params是传递的参数
} }
}, },
mounted() { mounted() {
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
</div> </div>
<el-table ref="table" :data="memberList2" border style="width: 100%" <el-table ref="table" border style="width: 100%"
@selection-change="TbaleSelectionChange"> @selection-change="TbaleSelectionChange">
<el-table-column type="selection" width="55"> <el-table-column type="selection" width="55">
</el-table-column> </el-table-column>
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
} }
}); });
}, },
// HySet() { HySet() {
// this.memberList2.forEach(item => { // this.memberList2.forEach(item => {
// this.memberCheck.forEach(check => { // this.memberCheck.forEach(check => {
// if (item.Id == check.Id) { // if (item.Id == check.Id) {
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
// } // }
// }); // });
// }); // });
// }, },
TbaleSelectionChange(){ TbaleSelectionChange(){
} }
......
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