Commit a298fd6a authored by 黄奎's avatar 黄奎

页面修改

parent 2ff203f2
......@@ -392,15 +392,17 @@
</el-card>
</el-tab-pane>
<el-tab-pane label="阶梯团设置">
<groupStep v-if="TempSpecList&&TempSpecList.length>0" @setNewVal="setNewVal" :SpecList="TempSpecList"
:GroupPriceList="TempGroupPriceList" :SpecPriceList="TempSpecPriceList"></groupStep>
<groupStep v-if="TempSpecList&&TempSpecList.length>0" :SpecList="TempSpecList"
:SpecPriceList="TempSpecPriceList" :GroupPriceList="TempGroupPriceList" @setNewVal="setNewVal">
</groupStep>
</el-tab-pane>
<el-tab-pane label="分销价设置">
<distributePrice v-if="TempSpecList&&TempSpecList.length>0" :addMsg="addMsg" :SpecList="TempSpecList"
:shareGroup_list="TempGroupPriceList" @getDisCommission="getDisCommission"></distributePrice>
:SpecificationPriceList="TempGroupPriceList" @getDisCommission="getDisCommission"></distributePrice>
</el-tab-pane>
<el-tab-pane label="会员价设置">
<memberPrice :SpecificationPriceList="TempSpecPriceList" :SpecificationList="TempSpecList"></memberPrice>
<memberPrice v-if="TempSpecList&&TempSpecList.length>0" :addMsg="addMsg" :SpecList="TempSpecList"
:SpecificationPriceList="TempGroupPriceList"></memberPrice>
</el-tab-pane>
</el-tabs>
</el-row>
......@@ -531,6 +533,8 @@
SeparateDistribution: 2, //是否开启单独分销 1是 2否
SeparateDistributionType: 1, //单独分销类型 1普通设置 2详细设置
SeparateDistributionMoneyType: 1, //分销佣金类型 2固定金额 1百分比
EnjoyMember: 2, // 是否享受会员功能 1是 2否
SeparateSetMember: 2, //是否单独设置会员价 1是 2否
},
IsShowSpec: false, //是否显示规格
TempSpecList: [], //规格列表
......@@ -567,7 +571,6 @@
trigger: "blur"
}]
},
};
},
created() {},
......@@ -646,6 +649,8 @@
if (this.addMsg.SeparateDistributionMoneyType == 0) {
this.addMsg.SeparateDistributionMoneyType = 2;
}
this.addMsg.EnjoyMember = Mydata.EnjoyMember;
this.addMsg.SeparateSetMember = Mydata.SeparateSetMember;
this.IsShowSpec = true;
} else {
this.Error(res.data.message);
......
......@@ -153,7 +153,7 @@
</template>
<script>
export default {
props: ["shareGroup_list", "addMsg", "SpecList"],
props: ["SpecificationPriceList", "addMsg", "SpecList"],
data() {
return {
fxVal: '',
......@@ -175,7 +175,7 @@
};
},
watch: {
'shareGroup_list': {
'SpecificationPriceList': {
handler: function (val, oldval) {
if (val != oldval) {
this.checkedChange()
......@@ -190,7 +190,7 @@
},
},
created() {
console.log("shareGroup_list", this.shareGroup_list);
console.log("SpecificationPriceList", this.SpecificationPriceList);
},
methods: {
//切换显示
......@@ -199,7 +199,7 @@
this.DistributioncommissionList = [];
//普通设置
if (this.addMsg.SeparateDistributionType == 1) {
this.shareGroup_list.forEach(item => {
this.SpecificationPriceList.forEach(item => {
var obj = {
People_Num: item.People_Num,
DistributioncommissionList: JSON.parse(JSON.stringify(this.tempGeneralArray)),
......@@ -209,7 +209,7 @@
}
//详细设置
else if (this.addMsg.SeparateDistributionType == 2) {
this.shareGroup_list.forEach(item => {
this.SpecificationPriceList.forEach(item => {
var obj = {
People_Num: item.People_Num,
DistributioncommissionList: [],
......
......@@ -2,128 +2,138 @@
<div>
<el-form label-width="180px">
<el-form-item label="是否享受会员功能" size="small">
<el-switch :active-value="1" :inactive-value="0" v-model="msg.EnjoyMember">
<el-switch :active-value="1" :inactive-value="2" v-model="addMsg.EnjoyMember" @change="checkChange">
</el-switch>
</el-form-item>
<el-form-item label="是否单独设置会员价" size="small">
<el-switch :active-value="1" :inactive-value="0" v-model="msg.SeparateSetMember">
<el-switch :active-value="1" :inactive-value="2" v-model="addMsg.SeparateSetMember" @change="checkChange">
</el-switch>
</el-form-item>
<el-form-item v-if="msg.SeparateSetMember == 1 && huiyList.length == 0" label="会员价设置">
<el-form-item v-if="addMsg.SeparateSetMember == 1 && configMemberList.length == 0" label="会员价设置">
<el-button @click="CommonJump('setMember')" size="small" type="danger">如需设置请先添加会员</el-button>
</el-form-item>
<el-form-item v-if="
msg.SeparateSetMember == 1 &&
SpecificationPriceList.length > 0
" label="会员价设置">
<div class="app-attr">
<div class="box">
<el-form-item style="display:inline-block">
<el-input style="width:500px;position:relative;top:5px" size="small" v-model="memberinput"
placeholder="请输入内容">
<el-select slot="prepend" style="width:130px" v-model="memberVal" size="small">
<el-option v-for="(item, index) in huiyList" :label="item.Name" :value="item.Grade" :key="index">
</el-option>
</el-select>
<el-button @click="HySet" slot="append">确定</el-button>
</el-input>
</el-form-item>
</div>
<el-table ref="table" border style="width: 100%"
@selection-change="TbaleSelectionChange">
<el-table-column type="selection" width="55">
</el-table-column>
<template v-for="(item, index) in 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'">
{{ scope.row.AttrList[index2].SVName }}
</span>
</template>
</el-table-column>
</template>
<template v-for="(item, index) in huiyList">
<el-table-column :key="index+'18'" :label="item.Name">
<template slot-scope="scope">
<el-input v-model="scope.row.GradePriceList[index].MemberPrice" size="small"></el-input>
</template>
<el-form-item v-if="addMsg.SeparateSetMember== 1&&SpecificationPriceList.length>0" label="会员价设置">
<template v-for="(rootItem,rootIndex) in memberList">
<div class="app-attr" :key="rootIndex">
<div class="box">
<div style="display:inline-block;">
<el-tag type="danger">{{rootItem.People_Num}}人团</el-tag>
</div>
<el-form-item style="display:inline-block">
<el-input style="width:500px;position:relative;top:5px" size="small" v-model="setMsg.memberinput"
placeholder="请输入内容">
<el-select slot="prepend" style="width:130px" v-model="setMsg.memberVal" size="small">
<el-option v-for="(item, index) in configMemberList" :label="item.Name" :value="item.Grade"
:key="index">
</el-option>
</el-select>
<el-button @click="HySet" slot="append">确定</el-button>
</el-input>
</el-form-item>
</div>
<el-table ref="table" border style="width: 100%" :data="rootItem.GradeMemberList"
@selection-change="TbaleSelectionChange">
<el-table-column type="selection" width="55">
</el-table-column>
</template>
</el-table>
</div>
<template v-for="(item, index) in SpecList">
<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'">
{{ scope.row.AttrList[index2].SVName }}
</span>
</template>
</el-table-column>
</template>
<template v-for="(item, index) in configMemberList">
<el-table-column :key="index+'18'" :label="item.Name">
<template slot-scope="scope">
<el-input v-model="scope.row.GradeMemberPriceList[index].MemberPrice" size="small"></el-input>
</template>
</el-table-column>
</template>
</el-table>
</div>
</template>
</el-form-item>
</el-form>
</div>
</template>
<script>
export default {
props: ['SpecificationPriceList', 'SpecificationList'],
props: ['SpecificationPriceList', 'SpecList', "addMsg"],
data() {
return {
huiyList: [], //会员数组
memberinput: "", //会员价设置输入
memberVal: '', //会员类型下拉
memberList2: [], //列表数据
msg: {
EnjoyMember: 1, //是否享受会员功能
SeparateSetMember: 0, //是否开启会员价
}
//会员配置数组
configMemberList: [],
//批量设置
setMsg: {
memberinput: "", //会员价设置输入
memberVal: '', //会员类型下拉
},
memberList: [], //列表数据
};
},
created() {
},
methods: {
gethuiyList() {
let msg = {
//数据改变
checkChange() {
this.memberList = [];
if (this.addMsg.SeparateSetMember == 1) {
this.SpecificationPriceList.forEach(rootItem => {
var obj = {
People_Num: rootItem.People_Num,
GradeMemberList: [],
}
rootItem.StepPriceList.forEach(subItem => {
var tempObj = JSON.parse(JSON.stringify(subItem));
var memObj = {
AttrList: tempObj.AttrList,
Id: 0,
Name: 0,
SpecificationSort: tempObj.SpecificationSort,
GradeMemberPriceList: [],
};
this.configMemberList.forEach(childItem => {
memObj.GradeMemberPriceList.push({
MemberGrade: childItem.Id,
MemberPrice: 0
});
});
obj.GradeMemberList.push(memObj);
});
this.memberList.push(obj);
});
}
},
//获取系统配置的会员列表
getConfigMemberList() {
let qMsg = {
Grade: 0,
Name: "",
Enabled: 1
};
this.apipost("/api/user/GetMemberGradeList", msg, res => {
this.loading = false;
this.apipost("/api/user/GetMemberGradeList", qMsg, res => {
if (res.data.resultCode == 1) {
let pageData = res.data.data;
this.huiyList = pageData;
// this.huiyList.forEach(item => {
// let obj = {
// Name: item.Name,
// MemberGrade: item.Grade,
// MemberPrice: 0
// };
// this.memberList1[0].GradePriceList.push(obj);
// });
this.configMemberList = res.data.data;
}
});
},
HySet() {
// this.memberList2.forEach(item => {
// this.memberCheck.forEach(check => {
// if (item.Id == check.Id) {
// item.GradePriceList.forEach(list1 => {
// if (list1.MemberGrade == this.memberVal) {
// list1.MemberPrice = this.memberinput;
// }
// });
// }
// });
// });
},
TbaleSelectionChange(){
TbaleSelectionChange() {
}
},
mounted() {
this.gethuiyList();
this.getConfigMemberList();
},
computed: {
},
};
</script>
</script>
\ No newline at end of file
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