Commit f43559bc authored by 黄奎's avatar 黄奎

页面修改

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