Commit a1a7d8ab authored by zhengke's avatar zhengke

修改

parent 02dadd7b
...@@ -32,20 +32,20 @@ ...@@ -32,20 +32,20 @@
<el-tag type="danger">{{item.People_Num}}人团</el-tag> <el-tag type="danger">{{item.People_Num}}人团</el-tag>
</div> </div>
<label style="margin-bottom:0;padding:18px 10px;">批量设置</label> <label style="margin-bottom:0;padding:18px 10px;">批量设置</label>
<el-select placeholder="请选择层级" v-model="fxVal" style="width:130px;" size="small"> <el-select placeholder="请选择层级" v-model="item.Leavel" style="width:130px;" size="small">
<el-option v-for="(item, index) in butorTier" :label="`${index + 1}级分销`" :value="index + 1" <el-option v-for="(item, index) in butorTier" :label="`${index + 1}级分销`" :value="index + 1"
:key="index+'12'"> :key="index+'12'">
</el-option> </el-option>
</el-select> </el-select>
<el-input type="text" size="small" style="width:150px;margin-top:5px;"> <el-input type="text" size="small" v-model="item.number" style="width:150px;margin-top:5px;">
<el-button slot="append"> <el-button slot="append">
<span v-if="addMsg.SeparateDistributionMoneyType == 2"></span> <span v-if="addMsg.SeparateDistributionMoneyType == 2"></span>
<span v-if="addMsg.SeparateDistributionMoneyType == 1">%</span> <span v-if="addMsg.SeparateDistributionMoneyType == 1">%</span>
</el-button> </el-button>
</el-input> </el-input>
<el-button size="small" type="primary">设置</el-button> <el-button size="small" type="primary" @click="setInfo(item,index)">设置</el-button>
</div> </div>
<el-table ref="multipleTable" :data="item.DistributioncommissionList" tooltip-effect="dark" <el-table :ref="'multipleTable'+index" :data="item.DistributioncommissionList" 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>
...@@ -60,19 +60,22 @@ ...@@ -60,19 +60,22 @@
<el-table-column :key="index+'10'" :label="item.Name"> <el-table-column :key="index+'10'" :label="item.Name">
<template slot-scope="scope"> <template slot-scope="scope">
<span> <span>
<el-input v-model="scope.row.OneCommission" v-if="index == 0" size="small"> <el-input v-model="scope.row.OneCommission"
@keyup.native="checkPrice(scope.row,'OneCommission')" v-if="index == 0" size="small">
<el-button slot="append"> <el-button slot="append">
<span v-if="addMsg.SeparateDistributionMoneyType == 2"></span> <span v-if="addMsg.SeparateDistributionMoneyType == 2"></span>
<span v-if="addMsg.SeparateDistributionMoneyType == 1">%</span> <span v-if="addMsg.SeparateDistributionMoneyType == 1">%</span>
</el-button> </el-button>
</el-input> </el-input>
<el-input v-model="scope.row.TwoCommission" v-if="index == 1" size="small"> <el-input v-model="scope.row.TwoCommission"
@keyup.native="checkPrice(scope.row,'TwoCommission')" v-if="index == 1" size="small">
<el-button slot="append"> <el-button slot="append">
<span v-if="addMsg.SeparateDistributionMoneyType == 2"></span> <span v-if="addMsg.SeparateDistributionMoneyType == 2"></span>
<span v-if="addMsg.SeparateDistributionMoneyType == 1">%</span> <span v-if="addMsg.SeparateDistributionMoneyType == 1">%</span>
</el-button> </el-button>
</el-input> </el-input>
<el-input v-model="scope.row.ThreeCommission" v-if="index==2" size="small"> <el-input v-model="scope.row.ThreeCommission"
@keyup.native="checkPrice(scope.row,'ThreeCommission')" v-if="index==2" size="small">
<el-button slot="append"> <el-button slot="append">
<span v-if="addMsg.SeparateDistributionMoneyType == 2"></span> <span v-if="addMsg.SeparateDistributionMoneyType == 2"></span>
<span v-if="addMsg.SeparateDistributionMoneyType == 1">%</span> <span v-if="addMsg.SeparateDistributionMoneyType == 1">%</span>
...@@ -130,7 +133,9 @@ ...@@ -130,7 +133,9 @@
<el-table-column width="100" v-if="butorTier > 0" label="一级分销"> <el-table-column width="100" v-if="butorTier > 0" label="一级分销">
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="scope.row.GradeCommissionList"> <template v-if="scope.row.GradeCommissionList">
<el-input v-model="scope.row.GradeCommissionList[index3].OneCommission" size="small"> <el-input v-model="scope.row.GradeCommissionList[index3].OneCommission"
@keyup.native="checkPrice(scope.row.GradeCommissionList[index3],'OneCommission')"
size="small">
</el-input> </el-input>
</template> </template>
</template> </template>
...@@ -138,7 +143,9 @@ ...@@ -138,7 +143,9 @@
<el-table-column width="100" v-if="butorTier > 1" label="二级分销"> <el-table-column width="100" v-if="butorTier > 1" label="二级分销">
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="scope.row.GradeCommissionList"> <template v-if="scope.row.GradeCommissionList">
<el-input v-model="scope.row.GradeCommissionList[index3].TwoCommission" size="small"> <el-input v-model="scope.row.GradeCommissionList[index3].TwoCommission"
@keyup.native="checkPrice(scope.row.GradeCommissionList[index3],'TwoCommission')"
size="small">
</el-input> </el-input>
</template> </template>
</template> </template>
...@@ -146,7 +153,9 @@ ...@@ -146,7 +153,9 @@
<el-table-column width="100" v-if="butorTier > 2" label="三级分销"> <el-table-column width="100" v-if="butorTier > 2" label="三级分销">
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="scope.row.GradeCommissionList"> <template v-if="scope.row.GradeCommissionList">
<el-input v-model="scope.row.GradeCommissionList[index3].ThreeCommission" size="small"> <el-input v-model="scope.row.GradeCommissionList[index3].ThreeCommission"
@keyup.native="checkPrice(scope.row.GradeCommissionList[index3],'ThreeCommission')"
size="small">
</el-input> </el-input>
</template> </template>
</template> </template>
...@@ -177,6 +186,9 @@ ...@@ -177,6 +186,9 @@
DistributioncommissionList: [], DistributioncommissionList: [],
//普通设置数组 //普通设置数组
tempGeneralArray: [], tempGeneralArray: [],
//多选数组
selectList: [],
}; };
}, },
watch: { watch: {
...@@ -193,6 +205,8 @@ ...@@ -193,6 +205,8 @@
var obj = { var obj = {
People_Num: item.People_Num, People_Num: item.People_Num,
DistributioncommissionList: item.DistributioncommissionList, DistributioncommissionList: item.DistributioncommissionList,
Leavel: '', //层级
Number: '' //设置->金额/百分比
}; };
this.DistributioncommissionList.push(obj); this.DistributioncommissionList.push(obj);
}) })
...@@ -202,9 +216,12 @@ ...@@ -202,9 +216,12 @@
this.SpecificationPriceList.forEach(item => { this.SpecificationPriceList.forEach(item => {
var obj = { var obj = {
People_Num: item.People_Num, People_Num: item.People_Num,
DistributionCommissionTreeList: item.DistributionCommissionTreeList, DistributioncommissionList: item.DistributionCommissionTreeList,
Leavel: '', //层级
Number: '' //设置->金额/百分比
}; };
this.DistributioncommissionList.push(obj); this.DistributioncommissionList.push(obj);
console.log(this.DistributioncommissionList, 'this.DistributioncommissionList');
}) })
this.$forceUpdate(); this.$forceUpdate();
} else { } else {
...@@ -271,8 +288,8 @@ ...@@ -271,8 +288,8 @@
}) })
} }
}, },
handleSelectionChange() { handleSelectionChange(val) {
this.selectList = val;
}, },
//获取分销层级 //获取分销层级
getDistributor() { getDistributor() {
...@@ -320,6 +337,55 @@ ...@@ -320,6 +337,55 @@
}); });
}); });
}, },
//普通设置=>批量设置
// setInfo(item) {
// //普通
// if (this.addMsg.SeparateDistributionType == 1) {
// if (!this.selectList || this.selectList.length === 0) {
// this.Error('请勾选分销商等级');
// return;
// }
// if (this.selectData === '') {
// this.Error('请选择分销层级');
// return;
// }
// this.ruleForm.shareLevelList.forEach((item, index) => {
// let sign = false;
// this.selectList.map((item1) => {
// if (JSON.stringify(item1) === JSON.stringify(item)) {
// sign = true;
// }
// });
// if (sign) {
// item[this.selectData] = this.batchShareLevel
// }
// })
// } else {
// if (!this.selectList || this.selectList.length === 0) {
// this.$message.warning('请勾选商品规格');
// return;
// }
// if (this.selectLevel === '') {
// this.$message.warning('请选择分销商等级');
// return;
// }
// if (this.selectData === '') {
// this.$message.warning('请选择分销层级');
// return;
// }
// this.ruleForm.attr.forEach((item, index) => {
// let sign = false;
// this.selectList.map((item1) => {
// if (JSON.stringify(item1.attr_list) === JSON.stringify(item.attr_list)) {
// sign = true;
// }
// });
// if (sign) {
// item.shareLevelList[this.selectLevel][this.selectData] = this.batchShareLevel
// }
// })
// }
// }
}, },
mounted() { mounted() {
this.getDistributor(); this.getDistributor();
......
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