Commit f43559bc authored by 黄奎's avatar 黄奎

页面修改

parent f23148f4
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
.pintuanActive .box-grow-0 { .pintuanActive .box-grow-0 {
flex-grow: 0; flex-grow: 0;
min-width: 0; min-width: 0;
flex-shrink:0; flex-shrink: 0;
display:inline-block; display: inline-block;
} }
.pintuanActive .bottom-div { .pintuanActive .bottom-div {
...@@ -21,19 +21,22 @@ ...@@ -21,19 +21,22 @@
padding: 9px 25px; padding: 9px 25px;
margin: 5px 0; margin: 5px 0;
} }
@media (max-width:1920px) and (min-width:1300px) { @media (max-width:1920px) and (min-width:1300px) {
.pintuanActive .el-col-12 { .pintuanActive .el-col-12 {
width: 50%; width: 50%;
} }
} }
@media (max-width:1910px) and (min-width:1200px) { @media (max-width:1910px) and (min-width:1200px) {
.pintuanActive .el-col-12 { .pintuanActive .el-col-12 {
width: 66.66667%; width: 66.66667%;
} }
} }
@media (max-width:1199px) and (min-width:200px) { @media (max-width:1199px) and (min-width:200px) {
.pintuanActive .el-col-12 { .pintuanActive .el-col-12 {
width: 80%; width: 80%;
} }
} }
...@@ -228,8 +231,8 @@ ...@@ -228,8 +231,8 @@
</el-tooltip> </el-tooltip>
</template> </template>
<template v-if="formName && formName != ''"> <template v-if="formName && formName != ''">
<el-tag style="margin-right:10px;" @close="(formName = ''),(checkedForm=''), (addMsg.FormsId = 0)" <el-tag style="margin-right:10px;"
closable> @close="(formName = ''),(checkedForm=''), (addMsg.FormsId = 0)" closable>
{{ formName }}</el-tag> {{ formName }}</el-tag>
</template> </template>
<el-button @click="choosebdDig = true" size="mini">选择表单</el-button> <el-button @click="choosebdDig = true" size="mini">选择表单</el-button>
...@@ -374,7 +377,8 @@ ...@@ -374,7 +377,8 @@
<el-tooltip class="item" effect="dark" content="建议尺寸:420 * 336" placement="top"> <el-tooltip class="item" effect="dark" content="建议尺寸:420 * 336" placement="top">
<el-button size="mini" @click="imgDialog=true">选择图片</el-button> <el-button size="mini" @click="imgDialog=true">选择图片</el-button>
</el-tooltip> </el-tooltip>
<div class="zk_pic_box" @click="imgDialog=true" style="width:80px;height:80px;" flex="main:center cross:center" <div class="zk_pic_box" @click="imgDialog=true" style="width:80px;height:80px;"
flex="main:center cross:center"
:style="{backgroundImage:'url(' + getIconLink(addMsg.App_share_pic) + ')'}"> :style="{backgroundImage:'url(' + getIconLink(addMsg.App_share_pic) + ')'}">
<i v-if="addMsg.App_share_pic==''" class="el-icon-picture-outline"></i> <i v-if="addMsg.App_share_pic==''" class="el-icon-picture-outline"></i>
<el-button type="danger" v-if="addMsg.App_share_pic!=''" class="image-delete" size="mini" <el-button type="danger" v-if="addMsg.App_share_pic!=''" class="image-delete" size="mini"
...@@ -387,7 +391,7 @@ ...@@ -387,7 +391,7 @@
</el-card> </el-card>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="阶梯团设置"> <el-tab-pane label="阶梯团设置">
<ladderGroup></ladderGroup> <ladderGroup :Goods="addMsg" :GroupList="GroupList" :SpecList="SpecificationList" :PriceList="SpecificationPriceList"></ladderGroup>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="分销价设置"> <el-tab-pane label="分销价设置">
<distributePrice></distributePrice> <distributePrice></distributePrice>
...@@ -521,6 +525,7 @@ ...@@ -521,6 +525,7 @@
App_share_pic: '', //自定义分享图片 App_share_pic: '', //自定义分享图片
}, },
IsShowSpec: false, //是否显示规格 IsShowSpec: false, //是否显示规格
GroupList:[],//阶梯价格列表
SpecificationList: [], //规格列表 SpecificationList: [], //规格列表
SpecificationPriceList: [], //规格价格列表 SpecificationPriceList: [], //规格价格列表
...@@ -534,12 +539,10 @@ ...@@ -534,12 +539,10 @@
AreaName: '', AreaName: '',
choosebdDig: false, //选择表单 choosebdDig: false, //选择表单
checkedForm:'', checkedForm: '',
formName: '', formName: '',
imgDialog:false, imgDialog: false,
rules: { rules: {},
},
}; };
}, },
created() {}, created() {},
...@@ -552,6 +555,10 @@ ...@@ -552,6 +555,10 @@
this.getRule(); this.getRule();
}, },
methods: { methods: {
//获取商品数据
getData() {
},
//点击checkbox是否限购商品 //点击checkbox是否限购商品
itemChecked(type) { itemChecked(type) {
this.addMsg.Confine_Count = type ? -1 : 0; this.addMsg.Confine_Count = type ? -1 : 0;
...@@ -562,12 +569,15 @@ ...@@ -562,12 +569,15 @@
}, },
//保存拼团活动 //保存拼团活动
SaveActivity() { SaveActivity() {
console.log(this.addMsg); this.addMsg.SpecificationPriceList = this.SpecificationPriceList;
return; this.addMsg.SpecificationList = this.SpecificationList;
this.apipost("/api/GroupBuy/SetGroupbuyActivity", this.addMsg, res => { this.apipost("/api/GroupBuy/SetGroupbuyActivity", this.addMsg, res => {
console.log("res", res); console.log("res", res);
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.Success(res.data.message);
} else {
this.Info(res.data.message);
} }
}) })
}, },
...@@ -576,7 +586,6 @@ ...@@ -576,7 +586,6 @@
this.isShowGoods = false; this.isShowGoods = false;
this.IsShowSpec = false; this.IsShowSpec = false;
var chooseGoods = this.$refs.choiceGood.getChoicedGoods(); var chooseGoods = this.$refs.choiceGood.getChoicedGoods();
console.log("chooseGoods", chooseGoods);
if (chooseGoods && chooseGoods.length > 0) { if (chooseGoods && chooseGoods.length > 0) {
this.addMsg.GoodId = chooseGoods[0].Id; this.addMsg.GoodId = chooseGoods[0].Id;
this.addMsg.name = chooseGoods[0].Name; this.addMsg.name = chooseGoods[0].Name;
...@@ -642,14 +651,14 @@ ...@@ -642,14 +651,14 @@
this.AreaName = val.RulesName; this.AreaName = val.RulesName;
}, },
//选择默认表单 //选择默认表单
getCkedForm(){ getCkedForm() {
if(this.checkedForm===''){ if (this.checkedForm === '') {
this.addMsg.FormsId=0; this.addMsg.FormsId = 0;
}else{ } else {
this.addMsg.FormsId=this.checkedForm; this.addMsg.FormsId = this.checkedForm;
} }
this.formName='默认表单'; this.formName = '默认表单';
this.choosebdDig=false; this.choosebdDig = false;
}, },
//选择图片 //选择图片
SelectId(msg) { SelectId(msg) {
...@@ -662,6 +671,3 @@ ...@@ -662,6 +671,3 @@
}; };
</script> </script>
<style>
</style>
...@@ -68,33 +68,45 @@ ...@@ -68,33 +68,45 @@
</div> </div>
<el-form-item> <el-form-item>
<div>价格与库存</div> <div>价格与库存</div>
<priceAndGroup :attr-groups="new_attr_groups" v-model="item.attr" :list="{price: '拼团价', stock: '拼团库存'}"></priceAndGroup> <priceAndGroup :attrGroups="new_attr_groups" :pinTuanPriceList="item.attr">
</priceAndGroup>
</el-form-item> </el-form-item>
</el-card> </el-card>
</el-form> </el-form>
</div> </div>
</template> </template>
<script> <script>
import priceAndGroup from "@/components/pintuan/pintuanPlugin/priceAndGroup.vue" import priceAndGroup from "@/components/pintuan/pintuanPlugin/priceAndGroup.vue"
export default { export default {
props: ['SpecList', "GroupList", "PriceList"],
components: { components: {
priceAndGroup //拼团与库存组件 priceAndGroup //拼团与库存组件
}, },
data() { data() {
return { return {
group_list: [], group_list: [],
new_PriceList: [],
//以下为写死-需要传入 new_attr_groups: []
newAttr: [],
defaultMemberPrice: [],
goods_stock: 0,
price: 0,
goods_no: '',
goods_weight: '',
new_attr_groups:[]
}; };
}, },
watch: {
'GroupList': {
handler: function (val, oldval) {
this.group_list = JSON.parse(JSON.stringify(val));
},
},
'SpecList': {
handler: function (val, oldval) {
this.new_attr_groups = JSON.parse(JSON.stringify(val));
},
},
'PriceList': {
handler: function (val, oldval) {
this.new_PriceList = JSON.parse(JSON.stringify(val));
},
},
},
created() { created() {
}, },
...@@ -140,49 +152,15 @@ ...@@ -140,49 +152,15 @@
}, },
//新增阶梯团 //新增阶梯团
addPintuan() { addPintuan() {
let data = {}; if (!this.group_list) {
if (this.newAttr.length === 0) { this.group_list = [];
data = [{
attr_list: [{
attr_group_id: -1,
attr_group_name: '规格',
attr_name: this.attr_default_name ? this.attr_default_name : '默认',
attr_id: -1,
}],
stock: this.goods_stock,
price: this.price,
no: this.goods_no,
weight: this.goods_weight,
pic_url: '',
pintuan_stock: this.goods_stock,
pintuan_price: this.price,
goodsAttr: {
id: undefined
}
}];
} else {
data = JSON.parse(JSON.stringify(this.newAttr));
data.forEach((item) => {
item.pintuan_price = item.price;
item.pintuan_stock = item.stock;
item.goodsAttr = {
id: item.id
}
});
} }
this.group_list.push({ this.group_list.push({
people_num: 2, people_num: 2,
preferential_price: 1, preferential_price: 1,
pintuan_time: 1, pintuan_time: 1,
goods_id: 0, goods_id: 0,
attr: JSON.parse(JSON.stringify(data)), attr: JSON.parse(JSON.stringify(this.new_PriceList))
member_price: JSON.parse(JSON.stringify(this.defaultMemberPrice)),
shareLevelList: {
share_commission_first: 0,
share_commission_second: 0,
share_commission_third: 0,
},
}); });
}, },
//删除拼团 //删除拼团
......
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