Commit d9b40e3e authored by 黄奎's avatar 黄奎

页面修改

parent fc199717
......@@ -13,8 +13,8 @@
<el-button @click="CommonJump('setMember')" size="small" type="danger">如需设置请先添加会员</el-button>
</el-form-item>
<el-form-item v-if="addMsg.SeparateSetMember== 1&&SpecificationPriceList.length>0" label="会员价设置">
<template v-for="(rootItem,rootIndex) in memberList">
<el-form-item v-if="addMsg.SeparateSetMember== 1&&addMsg.SpecificationPriceList.length>0" label="会员价设置">
<template v-for="(rootItem,rootIndex) in addMsg.GroupList">
<div class="app-attr" :key="rootIndex">
<div class="box">
<div style="display:inline-block;">
......@@ -32,11 +32,11 @@
</el-input>
</el-form-item>
</div>
<el-table ref="table" border style="width: 100%" :data="rootItem.GradeMemberList"
<el-table ref="table" border style="width: 100%" :data="rootItem.MemberpriceList"
@selection-change="TbaleSelectionChange">
<el-table-column type="selection" width="55">
</el-table-column>
<template v-for="(item, index) in SpecList">
<template v-for="(item, index) in addMsg.SpecificationList">
<el-table-column :key="index+'16'" :label="item.Name" width="100">
<template slot-scope="scope">
<span v-if="index == index2" v-for="(item2, index2) in scope.row.AttrList" :key="index2+'17'">
......@@ -79,16 +79,16 @@
immediate: true,
handler: function (val, oldval) {
if (val != oldval) {
this.memberList = [];
if (this.SpecificationPriceList && this.SpecificationPriceList.length > 0) {
if (this.SpecificationPriceList[0].MemberpriceList && this.SpecificationPriceList[0]
if (this.addMsg.SpecificationPriceList && this.addMsg.SpecificationPriceList.length > 0) {
if (this.addMsg.SpecificationPriceList[0].MemberpriceList && this.addMsg.SpecificationPriceList[0]
.MemberpriceList.length > 0) {
this.SpecificationPriceList.forEach(item => {
this.addMsg.SpecificationPriceList.forEach(item => {
var obj = {
People_Num: item.People_Num,
GradeMemberList: item.MemberpriceList,
};
this.memberList.push(obj);
this.addMsg.MemberpriceList.push(obj);
})
} else {
......@@ -98,30 +98,19 @@
}
}
},
"memberList": {
handler: function (val, oldval) {
this.$emit('getMemberList', this.memberList);
},
deep: true
},
},
methods: {
//数据改变
memberChange() {
this.memberList = [];
if (this.addMsg.SeparateSetMember == 1) {
this.SpecificationPriceList.forEach(rootItem => {
var obj = {
People_Num: rootItem.People_Num,
GradeMemberList: [],
}
this.addMsg.GroupList.forEach((rootItem, rootIndex) => {
rootItem.MemberpriceList = [];
rootItem.StepPriceList.forEach(subItem => {
var tempObj = JSON.parse(JSON.stringify(subItem));
var memObj = {
AttrList: tempObj.AttrList,
AttrList: JSON.parse(JSON.stringify(subItem.AttrList)),
Id: 0,
Name: 0,
SpecificationSort: tempObj.SpecificationSort,
SpecificationSort: JSON.parse(JSON.stringify(subItem.SpecificationSort)),
GradeMemberPriceList: [],
};
this.configMemberList.forEach(childItem => {
......@@ -130,10 +119,14 @@
MemberPrice: 0
});
});
obj.GradeMemberList.push(memObj);
});
this.memberList.push(obj);
rootItem.MemberpriceList.push(memObj)
})
});
console.log("this.addMsg.GroupList",this.addMsg.GroupList);
this.$forceUpdate();
} else {
}
},
//获取系统配置的会员列表
......
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