Commit a1a7d8ab authored by zhengke's avatar zhengke

修改

parent 02dadd7b
......@@ -32,20 +32,20 @@
<el-tag type="danger">{{item.People_Num}}人团</el-tag>
</div>
<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"
:key="index+'12'">
</el-option>
</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">
<span v-if="addMsg.SeparateDistributionMoneyType == 2"></span>
<span v-if="addMsg.SeparateDistributionMoneyType == 1">%</span>
</el-button>
</el-input>
<el-button size="small" type="primary">设置</el-button>
<el-button size="small" type="primary" @click="setInfo(item,index)">设置</el-button>
</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">
<el-table-column type="selection" width="55">
</el-table-column>
......@@ -60,19 +60,22 @@
<el-table-column :key="index+'10'" :label="item.Name">
<template slot-scope="scope">
<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">
<span v-if="addMsg.SeparateDistributionMoneyType == 2"></span>
<span v-if="addMsg.SeparateDistributionMoneyType == 1">%</span>
</el-button>
</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">
<span v-if="addMsg.SeparateDistributionMoneyType == 2"></span>
<span v-if="addMsg.SeparateDistributionMoneyType == 1">%</span>
</el-button>
</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">
<span v-if="addMsg.SeparateDistributionMoneyType == 2"></span>
<span v-if="addMsg.SeparateDistributionMoneyType == 1">%</span>
......@@ -130,7 +133,9 @@
<el-table-column width="100" v-if="butorTier > 0" label="一级分销">
<template slot-scope="scope">
<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>
</template>
</template>
......@@ -138,7 +143,9 @@
<el-table-column width="100" v-if="butorTier > 1" label="二级分销">
<template slot-scope="scope">
<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>
</template>
</template>
......@@ -146,7 +153,9 @@
<el-table-column width="100" v-if="butorTier > 2" label="三级分销">
<template slot-scope="scope">
<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>
</template>
</template>
......@@ -177,6 +186,9 @@
DistributioncommissionList: [],
//普通设置数组
tempGeneralArray: [],
//多选数组
selectList: [],
};
},
watch: {
......@@ -193,18 +205,23 @@
var obj = {
People_Num: item.People_Num,
DistributioncommissionList: item.DistributioncommissionList,
Leavel: '', //层级
Number: '' //设置->金额/百分比
};
this.DistributioncommissionList.push(obj);
})
this.$forceUpdate();
} else if (this.SpecificationPriceList[0].DistributionCommissionTreeList && this.SpecificationPriceList[
0].DistributionCommissionTreeList.length > 0) {
this.SpecificationPriceList.forEach(item => {
this.SpecificationPriceList.forEach(item => {
var obj = {
People_Num: item.People_Num,
DistributionCommissionTreeList: item.DistributionCommissionTreeList,
DistributioncommissionList: item.DistributionCommissionTreeList,
Leavel: '', //层级
Number: '' //设置->金额/百分比
};
this.DistributioncommissionList.push(obj);
console.log(this.DistributioncommissionList, 'this.DistributioncommissionList');
})
this.$forceUpdate();
} else {
......@@ -271,8 +288,8 @@
})
}
},
handleSelectionChange() {
handleSelectionChange(val) {
this.selectList = val;
},
//获取分销层级
getDistributor() {
......@@ -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() {
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