Commit 0da2f428 authored by 黄奎's avatar 黄奎
parents 3022d5d6 146df150
<style>
.box-grow-0 {
flex-grow: 0;
width: 35px;
}
.bottom-div {
border-top: 1px solid #E3E3E3;
position: fixed;
bottom: 0;
background-color: #ffffff;
z-index: 999;
padding: 10px;
width: 86%;
left: 230px;
}
.button-item {
padding: 9px 25px;
margin: 5px 0;
}
</style>
<template>
<div class="goodsListEdit">
<div class="pintuanActive">
<div class="head-title">
<span @click="CommonJump('pintuanList')" class="blue point">拼团活动</span>
/ 新建活动
......@@ -48,7 +71,7 @@
</el-input>
</el-form-item>
<el-form-item label="上架状态">
<el-switch active-color="#409EFF" :active-value="1" :inactive-value="2">
<el-switch active-color="#409EFF" v-model="addMsg.status" :active-value="1" :inactive-value="2">
</el-switch>
</el-form-item>
<el-form-item>
......@@ -83,8 +106,8 @@
<i class="el-tooltip el-icon-info"></i>
</el-tooltip>
</template>
<el-input v-model="addMsg.original_price" type="number" :disabled="true" min="1" size="small" placeholder="请输入内容"
class="input-with-select">
<el-input v-model="addMsg.original_price" type="number" :disabled="true" min="1" size="small"
placeholder="请输入内容" class="input-with-select">
<el-button slot="append"></el-button>
</el-input>
</el-form-item>
......@@ -93,25 +116,26 @@
</el-input>
</el-form-item>
<el-form-item label="默认规格名">
<el-input v-model="addMsg.attr_default_name" type="text" size="small" placeholder="请输入默认规格名" class="input-with-select">
<el-input v-model="addMsg.attr_default_name" type="text" size="small" placeholder="请输入默认规格名"
class="input-with-select">
</el-input>
</el-form-item>
<el-form-item label="商品规格">
<template slot="label">
<span>商品规格</span>
<el-tooltip class="item" effect="dark" content="如有颜色、尺码等多种规格,请添加商品规格" placement="top-start">
<i class="elzk el-tooltip el-icon-info"></i>
<i class="elzk el-tooltip el-icon-info"></i>
</el-tooltip>
</template>
<goodsSpe></goodsSpe>
</el-form-item>
<el-form-item label="商品货号">
<el-input v-model="addMsg.GoodsNumbers" size="small" placeholder="请输入内容"
<el-input v-model="addMsg.goods_no" size="small" placeholder="请输入内容"
class="input-with-select">
</el-input>
</el-form-item>
<el-form-item label="商品重量">
<el-input v-model="addMsg.GoodsWeight" type="number" min="1" size="small" placeholder="请输入内容"
<el-input v-model="addMsg.goods_weight" type="number" min="1" size="small" placeholder="请输入内容"
class="input-with-select">
<el-button slot="append"></el-button>
</el-input>
......@@ -119,9 +143,202 @@
</el-col>
</el-row>
</el-card>
<el-card style="margin-top:20px;" shadow="never">
<div slot="header" class="clearfix">
<span>购买设置</span>
</div>
<el-row>
<el-col :span="12">
<el-form-item label="是否开启虚拟成团">
<el-switch active-color="#409EFF" v-model="addMsg.is_auto_add_robot" :active-value="1" :inactive-value="2">
</el-switch>
<div style="color:#c6c6c6">开启虚拟成团后,系统将模拟“匿名买家”凑满人数促成成团,商家仅需对真实拼团买家发货</div>
</el-form-item>
<el-form-item>
<template slot="label">
<span>已团商品数</span>
<el-tooltip class="item" effect="dark" content="前端展示的销量=实际销量+已团商品数" placement="top">
<i class="el-tooltip el-icon-info"></i>
</el-tooltip>
</template>
<el-input type="number" :disabled="true" v-model="addMsg.virtual_sales" min="0" size="small" placeholder="请输入内容"
class="input-with-select">
<el-button slot="append"></el-button>
</el-input>
</el-form-item>
<el-form-item label="是否允许单独购买">
<el-switch active-color="#409EFF" v-model="addMsg.is_alone_buy" :active-value="1" :inactive-value="2">
</el-switch>
</el-form-item>
<el-form-item label="商品服务">
<el-button size="small">新增服务</el-button>
<el-checkbox>默认服务</el-checkbox>
</el-form-item>
<el-form-item>
<template slot="label">
<span>运费设置</span>
<el-tooltip class="item" effect="dark" content="选择第一项(默认运费)将会根据运费管理的(默认运费)变化而变化"
placement="top">
<i class="el-tooltip el-icon-info"></i>
</el-tooltip>
</template>
<el-button size="small">选择运费</el-button>
</el-form-item>
<el-form-item>
<template slot="label">
<span>自定义表单</span>
<el-tooltip class="item" effect="dark" content="选择第一项(默认表单)将会根据表单列表的(默认表单)变化而变化"
placement="top">
<i class="el-tooltip el-icon-info"></i>
</el-tooltip>
</template>
<el-button size="small">选择表单</el-button>
</el-form-item>
<el-form-item label="限购数量" size="small">
<div flex="dir:left">
<span class="box-grow-0" style="color:#606266">商品</span>
<div style="width: 100%;margin:0 10px">
<el-input placeholder="请输入限购数量" v-model="addMsg.confine_count" size="small">
<template slot="append"></template>
</el-input>
</div>
<el-checkbox v-model="addMsg.confine_count <= -1" @change="itemChecked" style="margin-left:5px;line-height:32px;">无限制
</el-checkbox>
</div>
<div flex="dir:left" style="margin-top: 10px;">
<span class="box-grow-0" style="color:#606266">订单</span>
<div style="width: 100%;margin:0 10px">
<el-input placeholder="请输入限购数量" v-model="addMsg.confine_order_count" size="small">
<template slot="append"></template>
</el-input>
</div>
<el-checkbox v-model="addMsg.confine_order_count<=-1" @change="itemOrderChecked" style="margin-left:5px;line-height:32px;">无限制
</el-checkbox>
</div>
</el-form-item>
<el-form-item>
<template slot="label">
<span>单品满件包邮</span>
<el-tooltip class="item" effect="dark" content="如果设置0或空,则不支持满件包邮" placement="top">
<i class="el-tooltip el-icon-info"></i>
</el-tooltip>
</template>
<el-input type="number" :disabled="true" v-model="addMsg.pieces" min="0" size="small" placeholder="请输入数量"
class="input-with-select">
<el-button slot="append"></el-button>
</el-input>
</el-form-item>
<el-form-item>
<template slot="label">
<span>单品满额包邮</span>
<el-tooltip class="item" effect="dark" content="如果设置0或空,则不支持满额包邮" placement="top">
<i class="el-tooltip el-icon-info"></i>
</el-tooltip>
</template>
<el-input type="number" :disabled="true" v-model="addMsg.forehead" min="0" size="small" placeholder="请输入金额"
class="input-with-select">
<el-button slot="append"></el-button>
</el-input>
</el-form-item>
<el-form-item label="区域购买">
<el-switch active-color="#409EFF" v-model="addMsg.is_area_limit" :active-value="1" :inactive-value="2">
</el-switch>
</el-form-item>
</el-col>
</el-row>
</el-card>
<el-card style="margin-top:20px;" shadow="never">
<div slot="header" class="clearfix">
<span>营销设置</span>
</div>
<el-row>
<el-col :span="12">
<el-form-item>
<template slot="label">
<span>积分赠送</span>
<el-tooltip effect="dark" placement="top">
<div slot="content">用户购物赠送的积分, 如果不填写或填写0,则默认为不赠送积分,
如果为百分比则为按成交价格的比例计算积分"<br />
如: 购买2件,设置10 积分, 不管成交价格是多少, 则购买后获得20积分</br>
如: 购买2件,设置10%积分, 成交价格2 * 200= 400, 则购买后获得 40 积分(400*10%)
</div>
<i class="el-icon-info"></i>
</el-tooltip>
</template>
<el-input type="number" min="0" v-model="addMsg.give_integral" size="small" placeholder="请输入赠送积分数量">
<template slot="append">
<el-radio :label="1" v-model="addMsg.give_integral_type">固定值
</el-radio>
<el-radio :label="2" v-model="addMsg.give_integral_type">百分比
</el-radio>
</template>
</el-input>
</el-form-item>
<el-form-item>
<template slot="label">
<span>积分抵扣</span>
<el-tooltip effect="dark" content="如果设置0,则不支持积分抵扣 如果带%则为按成交价格的比例计算抵扣多少元" placement="top">
<i class="el-icon-info"></i>
</el-tooltip>
</template>
<el-input type="number" min="0" size="small" v-model="addMsg.forehead_integral" placeholder="请输最高抵扣金额">
<template slot="prepend">最多抵扣</template>
<template slot="append">
<el-radio :label="1" v-model="addMsg.forehead_integral_type">固定值
</el-radio>
<el-radio :label="2" v-model="addMsg.forehead_integral_type">百分比
</el-radio>
</template>
</el-input>
<el-checkbox :true-label="1" v-model="addMsg.accumulative" :false-label="0">
允许多件累计抵扣
</el-checkbox>
</el-form-item>
<el-form-item label="卡券发放">
<el-button size="small">选择表单</el-button>
</el-form-item>
</el-col>
</el-row>
</el-card>
<el-card style="margin-top:20px;" shadow="never">
<div slot="header" class="clearfix">
<span>分享设置</span>
</div>
<el-row>
<el-col :span="12">
<el-form-item>
<template slot="label">
<span>自定义分享标题</span>
<el-tooltip effect="dark" content="分享给好友时,作为商品名称" placement="top">
<i class="el-icon-info"></i>
</el-tooltip>
</template>
<el-input type="text" size="small" v-model="addMsg.app_share_title" placeholder="请输入分享标题"></el-input>
<el-button type="text">查看图例</el-button>
</el-form-item>
<el-form-item>
<template slot="label">
<span>自定义分享图片</span>
<el-tooltip effect="dark" content="分享给好友时,作为分享图片" placement="top">
<i class="el-icon-info"></i>
</el-tooltip>
</template>
<el-tooltip class="item" effect="dark" content="建议尺寸:420 * 336" placement="top">
<el-button size="mini">选择图片</el-button>
</el-tooltip>
<div class="zk_pic_box" flex="main:center cross:center" style="width:80px;height:80px;">
<!-- app_share_pic -->
<i class="el-icon-picture-outline"></i>
</div>
<el-button type="text">查看图例</el-button>
</el-form-item>
</el-col>
</el-row>
</el-card>
</el-tab-pane>
<el-tab-pane lebel="阶梯团设置">
<el-tab-pane lebel="购买设置">
</el-tab-pane>
<el-tab-pane lebel="分销价设置">
......@@ -134,8 +351,9 @@
</el-tabs>
</el-row>
</el-form>
<div class="bottom-div" style="margin-top:20px">
<el-button size="small" type="primary" @click="Save('addMsg')">保存</el-button>
<div class="bottom-div" flex="cross:center" style="margin-top:20px">
<el-button size="small" class="button-item" type="primary" @click="Save('addMsg')">保存</el-button>
<el-button size="small" class="button-item">预览</el-button>
</div>
</div>
<!-- 选择图片 -->
......@@ -159,12 +377,37 @@
start_time: '', //开始时间
end_time: '', //结束时间
name: '', //商品名称
Sort: 0, //排序
status:0, //上架状态
Sort: 100, //排序
price: 0, //售价
original_price: 0, //原价
goods_num:0, //库存
goods_stock: 0, //商品总库存
attr_default_name: '', //默认规格名
// 商品规格字段
goods_no:'', //商品货号
goods_weight:'', //商品重量
is_auto_add_robot:0, //是否开启虚拟团
virtual_sales:0, //已团商品数
is_alone_buy:0, //是否允许单独购买
Service:[], //商品服务字段
freight:'', //运费设置
form:'', //自定义表单
confine_count:-1, //限购数量
confine_order_count:-1, //限购订单
pieces:0, //单品满件包邮
forehead:0, //单品满额包邮
is_area_limit:0, //区域购买
give_integral:0, //积分赠送
give_integral_type:1, //积分赠送=>1固定值 2百分比
forehead_integral:0, //积分抵扣
forehead_integral_type:1, //积分抵扣=>1固定值 2百分比
accumulative:0, //允许多件累计抵扣
cards:[], //卡券发放
app_share_title:'', //自定义分享标题、
app_share_pic:'', //自定义分享图片
price:0, //售价
original_price:0, //原价
goods_stock:0, //商品总库存
attr_default_name:'', //默认规格名
},
rules: {
// Name: [{
......@@ -183,7 +426,14 @@
// }
},
methods: {
//点击checkbox是否限购商品
itemChecked(type) {
this.addMsg.confine_count = type ? -1 : 0;
},
//点击checkbox是否限购订单
itemOrderChecked(type) {
this.addMsg.confine_order_count = type ? -1 : 0;
},
}
};
......
......@@ -49,6 +49,47 @@
align-items: center;
padding: 10px 0;
}
.goodsSpecifica .app-attr-group .attr-list {
display: inline-block;
margin-right: 10px;
margin-bottom: 10px;
position: relative;
}
.goodsSpecifica .app-attr-group .close {
position: absolute;
top: -4px;
right: -4px;
font-size: 16px;
cursor: pointer;
}
.goodsSpecifica .box-grow-0 {
min-width: 0;
-webkit-box-flex: 0;
flex-grow: 0;
flex-shrink: 0;
}
.goodsSpecifica .app-attr-group .img-box {
position: relative;
height: 100px;
width: 100px;
margin-top: 8px;
border: 1px solid #ebeef5;
}
.goodsSpecifica .app-attr-group .attr-jt {
background: #ffffff;
width: 6px;
height: 6px;
border-top: 1px solid rgb(235, 238, 245);
border-right: 1px solid #ebeef5;
transform: rotate(-45deg);
-o-transform: rotate(-45deg);
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
position: absolute;
top: -5px;
}
</style>
<template>
<div>
......@@ -202,12 +243,20 @@
<el-button type="primary" size="small" @click="chooseSpecificationValueList">确定选择</el-button>
</div>
</el-dialog>
<!-- 选择图片 -->
<el-dialog title="选择文件" :visible.sync="changeState" width="1240px">
<ChooseImg @SelectId="SelectId" :IsMultiple="true"></ChooseImg>
</el-dialog>
</div>
</template>
<script>
import ChooseImg from "@/components/global/ChooseImg.vue";
export default {
components:{
ChooseImg
},
data() {
return {
SpecificationList: [], //规格数组
......@@ -228,6 +277,7 @@
ggplList: [],
speciList: [],
DropdownList: [],
huiyList: [],
SeparateDistributionType: 1, //待传递给父组件
EnjoyMember: 1, //待传父组件
......@@ -546,6 +596,33 @@
});
});
},
//选择图片
SelectId(msg) {
let that = this;
if (msg && msg.length > 0) {
if (this.imgType == 1) {
msg.forEach(item => {
let obj = {
Id: item.selectId,
Path: that.getIconLink(item.url),
};
this.addMsg.CarouselImageList.push(obj);
})
}
if (this.imgType == 2) {
this.addMsg.CustomShareImage = that.getIconLink(msg[0].url);
}
if (this.imgType == 3) {
let imgListIndex1 = this.imgListIndex1;
let imgListIndex2 = this.imgListIndex2;
this.SpecificationList[imgListIndex1].SpecificationValueList[
imgListIndex2
].Image = that.getIconLink(msg[0].url);
}
}
this.changeState = false;
},
TbaleSelectionChange(val) {
this.ggplList = val;
},
......@@ -587,6 +664,9 @@
}
});
},
CheckBox(val) {
console.log(val,'valll');
},
},
mounted() {
......
......@@ -12,6 +12,7 @@
cursor: pointer;
color: #c9c9c9;
z-index: 11;
background-color: #fff;
}
.diy-component-preview {
......@@ -78,8 +79,9 @@
style="right: -25px; top: 30px;"></el-button>
</div>
<div class="diy-rubik">
<div class="diy-component-preview">
<div :style="{marginTop:rubData.data.top+'px',marginRight:rubData.data.right+'px',marginBottom:rubData.data.bottom+'px',marginLeft:rubData.data.left+'px'}">
<div class="diy-component-preview" :style="{backgroundColor:rubData.data.background}">
<div :style="{marginTop:rubData.data.top+'px',marginRight:rubData.data.right+'px',marginBottom:rubData.data.bottom+'px',
marginLeft:rubData.data.left+'px'}">
<div class="layout" :style="blockStyle(rubData.data.style)" :class="{'defaultImg':rubData.data.style==8}"
@click="blockClick">
<div class="rubik" style="width:100%;height:100%;" @mousemove="blockMove"
......@@ -142,6 +144,13 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="背景色">
<el-color-picker v-model="rubData.data.background"></el-color-picker>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="样式">
<div flex="dir:left" style="flex-wrap: wrap;">
<div class="block" @click="selectStyle(index)" :class="blockActive(index)"
......
......@@ -651,7 +651,8 @@
top:0, // 上边距
right:0, //右边距
bottom:0, //下边距
left:0 //左边距
left:0, //左边距
background:'', //背景颜色
}
}
this.dataList.push(rubObj);
......
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