Commit d9b40e3e authored by 黄奎's avatar 黄奎

页面修改

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