Commit b388d7a5 authored by 黄奎's avatar 黄奎

页面修改

parent 5742b429
...@@ -392,8 +392,7 @@ ...@@ -392,8 +392,7 @@
</el-card> </el-card>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="阶梯团设置"> <el-tab-pane label="阶梯团设置">
<groupStep v-if="TempSpecList&&TempSpecList.length>0" :addMsg="addMsg" :SpecList="TempSpecList" <groupStep v-if="addMsg.SpecificationList&&addMsg.SpecificationList.length>0" :addMsg="addMsg" >
:SpecPriceList="TempSpecPriceList" :GroupPriceList="TempGroupPriceList" @setNewVal="setNewVal">
</groupStep> </groupStep>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="分销价设置"> <el-tab-pane label="分销价设置">
...@@ -629,16 +628,13 @@ ...@@ -629,16 +628,13 @@
if (Mydata.SpecificationList && Mydata.SpecificationList.length > 0) { if (Mydata.SpecificationList && Mydata.SpecificationList.length > 0) {
this.addMsg.SpecificationList = Mydata.SpecificationList; //规格赋值 this.addMsg.SpecificationList = Mydata.SpecificationList; //规格赋值
//this.TempSpecList = Mydata.SpecificationList;
} }
if (Mydata.SpecificationPriceList && Mydata.SpecificationPriceList.length > 0) { if (Mydata.SpecificationPriceList && Mydata.SpecificationPriceList.length > 0) {
this.addMsg.SpecificationPriceList = Mydata.SpecificationPriceList; //规格列表赋值 this.addMsg.SpecificationPriceList = Mydata.SpecificationPriceList; //规格列表赋值
this.TempSpecPriceList = JSON.parse(JSON.stringify(Mydata.SpecificationPriceList));
} }
if (Mydata.GroupList && Mydata.GroupList.length > 0) { if (Mydata.GroupList && Mydata.GroupList.length > 0) {
this.addMsg.GroupList = Mydata.GroupList; this.addMsg.GroupList = Mydata.GroupList;
this.TempGroupPriceList = Mydata.GroupList;
} }
this.addMsg.SeparateDistribution = Mydata.SeparateDistribution; this.addMsg.SeparateDistribution = Mydata.SeparateDistribution;
this.addMsg.SeparateDistributionType = Mydata.SeparateDistributionType; this.addMsg.SeparateDistributionType = Mydata.SeparateDistributionType;
......
...@@ -429,7 +429,7 @@ ...@@ -429,7 +429,7 @@
Sort: item.SpecificationValueList.length + 1 Sort: item.SpecificationValueList.length + 1
}; };
this.addMsg.SpecificationList[index].SpecificationValueList.push(obj); this.addMsg.SpecificationList[index].SpecificationValueList.push(obj);
this.ggzChange(true); this.ggzChange(true);
}, },
//添加规格 //添加规格
chooseSpec() { chooseSpec() {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<el-form> <el-form>
<el-form-item label-width="0"> <el-form-item label-width="0">
<div>阶梯团设置</div> <div>阶梯团设置</div>
<el-table style="margin-bottom: 15px;width: 100%" v-if="group_list.length > 0" :data="group_list" border> <el-table style="margin-bottom: 15px;width: 100%" v-if="addMsg.GroupList.length > 0" :data="addMsg.GroupList" border>
<el-table-column width="200"> <el-table-column width="200">
<template slot="header"> <template slot="header">
<div class="header-require">拼团人数</div> <div class="header-require">拼团人数</div>
...@@ -63,13 +63,13 @@ ...@@ -63,13 +63,13 @@
</el-button> </el-button>
</el-form-item> </el-form-item>
<el-card v-for="(item, index) in group_list" style="margin-top: 24px;" :key="index" shadow="never"> <el-card v-for="(item, index) in addMsg.GroupList" style="margin-top: 24px;" :key="index" shadow="never">
<div slot="header"> <div slot="header">
<el-tag type="danger">{{item.People_Num}}人团</el-tag> <el-tag type="danger">{{item.People_Num}}人团</el-tag>
</div> </div>
<el-form-item> <el-form-item>
<div>价格与库存</div> <div>价格与库存</div>
<groupPrice :attrGroups="new_attr_groups" :groupPriceList="item.StepPriceList"> <groupPrice :attrGroups="addMsg.SpecificationList" :groupPriceList="item.StepPriceList">
</groupPrice> </groupPrice>
</el-form-item> </el-form-item>
</el-card> </el-card>
...@@ -79,27 +79,16 @@ ...@@ -79,27 +79,16 @@
<script> <script>
import groupPrice from "@/components/pintuan/pintuanPlugin/groupPrice.vue" import groupPrice from "@/components/pintuan/pintuanPlugin/groupPrice.vue"
export default { export default {
props: ['SpecList', "GroupPriceList", "SpecPriceList"], props: ["addMsg"],
components: { components: {
groupPrice //拼团与库存组件 groupPrice //拼团与库存组件
}, },
data() { data() {
return { return {
group_list: this.GroupPriceList,
new_attr_groups:this.SpecList,
new_SpecPriceList: this.SpecPriceList,
}; };
}, },
watch: {
'group_list':{
handler: function (val, oldval) {
this.$emit('setNewVal', val); //params是传递的参数
},
deep:true
}
},
created() {},
methods: { methods: {
//表头提示样式 //表头提示样式
delegation(h, { delegation(h, {
...@@ -142,12 +131,12 @@ ...@@ -142,12 +131,12 @@
}, },
//新增阶梯团 //新增阶梯团
addPintuan() { addPintuan() {
if (!this.group_list) { if (!this.addMsg.GroupList) {
this.group_list = []; this.addMsg.GroupList = [];
} }
var attr = []; var attr = [];
if (this.new_SpecPriceList && this.new_SpecPriceList.length > 0) { if (this.addMsg.SpecificationPriceList && this.addMsg.SpecificationPriceList.length > 0) {
this.new_SpecPriceList.forEach((item,index) => { this.addMsg.SpecificationPriceList.forEach((item,index) => {
var obj = { var obj = {
AttrList: item.AttrList, AttrList: item.AttrList,
SpecificationSort: item.SpecificationSort, SpecificationSort: item.SpecificationSort,
...@@ -158,7 +147,7 @@ ...@@ -158,7 +147,7 @@
attr.push(obj); attr.push(obj);
}) })
} }
this.group_list.push({ this.addMsg.GroupList.push({
People_Num: 2, People_Num: 2,
Preferential_Price: 1, Preferential_Price: 1,
Pintuan_Time: 1, Pintuan_Time: 1,
...@@ -169,7 +158,7 @@ ...@@ -169,7 +158,7 @@
}, },
//删除拼团 //删除拼团
destroyPintuan(index) { destroyPintuan(index) {
this.group_list.splice(index, 1); this.addMsg.GroupList.splice(index, 1);
} }
}, },
mounted() { mounted() {
......
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