Commit a414c8c0 authored by zhengke's avatar zhengke

修改

parent fe367803
<template>
<div class="goodsListEdit">
<div class="head-title">
<span @click="CommonJump('pintuanList')" class="blue point">拼团活动</span>
/ 新建活动
</div>
<div style="background:#fff;margin-top:10px;padding:10px 20px 20px">
<el-form class="app-batch" :model="addMsg" :rules="rules" ref="addMsg" label-width="180px">
<el-row :gutter="24">
<el-tabs v-model="activeName">
<el-tab-pane label="商品设置" name="first">
<el-card shadow="never">
<div slot="header" class="clearfix">
<span>活动设置</span>
</div>
<el-row>
<el-col :span="24">
<el-form-item label="开始时间">
<el-date-picker v-model="addMsg.start_time" size="small" type="datetime" placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="结束时间">
<el-date-picker v-model="addMsg.end_time" size="small" type="datetime" placeholder="选择日期时间">
</el-date-picker>
</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 class="item" effect="dark" content="只能从商城中获取商品信息,且基本信息与商城商品保持一致" placement="top">
<i class="el-tooltip el-icon-info"></i>
</el-tooltip>
</template>
<el-button type="text">文字按钮</el-button>
</el-form-item>
<el-form-item label="商品名称" prop="Name">
<el-input size="small" v-model="addMsg.name" placeholder="请输入内容" maxlength="100">
</el-input>
</el-form-item>
<el-form-item label="上架状态">
<el-switch active-color="#409EFF" :active-value="1" :inactive-value="2">
</el-switch>
</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 v-model="addMsg.Sort" type="number" min="1" size="small" placeholder="请输入内容"
class="input-with-select"></el-input>
</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 label="售价" prop="price">
<el-input v-model="addMsg.price" type="number" min="1" 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="以划线形式显示" placement="top">
<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-button slot="append"></el-button>
</el-input>
</el-form-item>
<el-form-item label="商品总库存">
<el-input v-model="addMsg.goods_stock" size="small" placeholder="请输入内容" class="input-with-select">
</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>
</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>
</el-tooltip>
</template>
<goodsSpe></goodsSpe>
</el-form-item>
<el-form-item label="商品货号">
<el-input v-model="addMsg.GoodsNumbers" 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="请输入内容"
class="input-with-select">
<el-button slot="append"></el-button>
</el-input>
</el-form-item>
</el-col>
</el-row>
</el-card>
</el-tab-pane>
<el-tab-pane lebel="阶梯团设置">
</el-tab-pane>
<el-tab-pane lebel="分销价设置">
</el-tab-pane>
<el-tab-pane lebel="阶梯团设置">
</el-tab-pane>
</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>
</div>
<!-- 选择图片 -->
<!-- <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";
import goodsSpe from "@/components/pintuan/pintuanPlugin/goodsSpecifica.vue"
export default {
components: {
ChooseImg,
goodsSpe
},
data() {
return {
activeName: "first",
addMsg: {
start_time: '', //开始时间
end_time: '', //结束时间
name: '', //商品名称
Sort: 0, //排序
price:0, //售价
original_price:0, //原价
goods_stock:0, //商品总库存
attr_default_name:'', //默认规格名
},
rules: {
// Name: [{
// required: true,
// message: "请输入商品名称",
// trigger: "blur"
// }]
},
};
},
created() {},
mounted() {
// if (this.$route.query.GoodsId) {
// this.GoodsId = this.$route.query.GoodsId;
// this.getData();
// }
},
methods: {
}
};
</script>
<style>
</style>
<template>
<div class="pintuanActive">
<div class="head-title">
拼团活动
<el-button style="float:right;margin-top: -5px;" size="small" @click="CommonJump('pintuanActive')" type="primary">新建活动</el-button>
</div>
<div class="content">
<div>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane :dataId="0" label="全部" name="first"></el-tab-pane>
<el-tab-pane :dataId="1" label="未开始" name="second"></el-tab-pane>
<el-tab-pane :dataId="2" label="进行中" name="third"></el-tab-pane>
<el-tab-pane :dataId="3" label="已结束" name="fourth"></el-tab-pane>
<el-tab-pane :dataId="4" label="下架中" name="fifth"></el-tab-pane>
</el-tabs>
</div>
<div>
<span>活动时间:</span>
<el-date-picker v-model="dateList" @change="msg.pageIndex=1,getList()" size="small" type="datetimerange"
range-separator="至" value-format="yyyy-MM-dd HH:mm:ss" start-placeholder="开始日期" end-placeholder="结束日期">
</el-date-picker>
<div class="searchInput" style="width:250px;margin-right: 0px;">
<el-input @keyup.enter.native="msg.pageIndex=1,getList()" style="display:inline-block;width:225px;height:30px"
placeholder="请输入商品名称搜索" v-model="msg.keyword" @clear="msg.pageIndex=1,getList()" size="small" clearable>
</el-input>
<span @click="msg.pageIndex=1,getList()" class="el-icon-search"
style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
</div>
<span @click="Clearconditions" v-if="msg.keyword!='' || (dateList && dateList.length>0)"
class='blue point'>清空筛选条件</span>
</div>
<div style="margin-top:15px">
<el-button @click="tableSet(4)" style="margin-left:10px;" size="mini">上架</el-button>
<el-button @click="tableSet(5)" style="margin-left:10px;" size="mini">下架</el-button>
<el-button @click="tableSet(6)" style="margin-left:10px;" size="mini">删除</el-button>
</div>
<el-table :data="tableData" v-loading="loading" border @selection-change="tableSelect"
style="width: 100%;margin:20px 0">
<el-table-column type="selection" width="55">
</el-table-column>
<el-table-column prop="id" width="120" sortable label="商品ID">
</el-table-column>
<el-table-column label="商品名称" width="320">
<template slot-scope="scope">
<div class="cell">
<div flex="box:first">
<div style="padding-right:10px;">
<div class="app-image" :style="{backgroundImage:'url(' + scope.row.goods_cover_pic + ')'}"></div>
<!-- <div class="app-image" :style="{backgroundImage:'url(' +domainManager().ImageUrl+ scope.row.goods_cover_pic + ')'}"></div> -->
</div>
<div class="app-ellipsis">
<div class="vue-line-clamp" style="word-break:break-all;-webkit-line-clamp: 2;">
{{scope.row.goods_name}}</div>
</div>
</div>
</div>
</template>
</el-table-column>
<el-table-column prop="goods_stock" label="库存">
</el-table-column>
<el-table-column label="活动时间">
<template slot-scope="scope">
<div style="width:160px;">
<div>{{scope.row.open_date}}</div>
<div>{{scope.row.end_date}}</div>
</div>
</template>
</el-table-column>
<el-table-column prop="groups" width="200" label="拼团组/拼团价">
<template slot-scope="scope">
<div class="cell">
<div flex="dir:top">
<div v-for="(SubItem,SubIndex) in scope.row.groups" :key="SubIndex">
<el-tag style="margin-bottom:10px;">{{SubItem.people_num}}人|¥{{SubItem.price}}</el-tag>
</div>
</div>
</div>
</template>
</el-table-column>
<el-table-column prop="status_cn" width="100" label="活动状态">
<template slot-scope="scope">
<el-tag>{{scope.row.status_cn}}</el-tag>
</template>
</el-table-column>
<el-table-column prop="address" label="操作">
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="编辑" placement="top">
<img style="width:32px;height:32px;margin:0 10px" src="../../assets/img/userman/edit.png" alt="">
</el-tooltip>
<el-tooltip class="item" effect="dark" content="活动数据" placement="top">
<img style="width:32px;height:32px;margin:0 10px"
src="../../assets/img/userman/order.png" alt="">
</el-tooltip>
</template>
</el-table-column>
</el-table>
<el-pagination style="text-align:right" background @current-change="handleCurrentChange" :page-size="msg.pageSize"
layout="prev, pager, next" :current-page.sync="msg.pageIndex" :total="total">
</el-pagination>
</div>
</div>
</template>
<script>
export default {
name: "pintuanActive",
data() {
return {
//日期数组
dateList: [],
activeName: 'first',
msg: {
pageIndex: 1,
pageSize: 15,
keyword: '', //商品名称
date_start: '', //开始日期
date_end: '', //结束日期
},
total: 0,
tableData: [{
id: 178355,
goods_name: '日本珂润(Curel)润浸保湿 滋养乳霜 40g 敏感肌专用 神经酰胺护理 抵抗外部刺激',
goods_cover_pic: 'https://cdnimg.iotweixin.com/uploads/mall1285/20200503/979653726a7bc1df0e24464f94b404bd.jpg',
open_date: '2020-07-26 00:00:00',
end_date: '2020-10-31 00:00:00',
status_cn: '进行中',
goods_stock: 276,
groups: [{
people_num: 2,
price: "180.00"
},
{
people_num: 3,
price: "175.00"
}
]
}],
loading: false,
}
},
created() {
//this.getList();
},
methods: {
//获取数据
getList() {
if (this.dateList && this.dateList.length > 0) {
this.msg.date_start = this.dateList[0];
this.msg.date_end = this.dateList[1];
} else {
this.msg.date_start = '';
this.msg.date_end = '';
}
this.loading = true;
this.apipost("/api/product/GetProductGoodsPageList", this.msg, res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.total = res.data.data.count;
let pageData = res.data.data.pageData;
this.tableData = pageData;
}
})
},
// 上架 下架 删除
tableSet(num) {},
//切换活动状态
handleClick(val) {
this.msg.pageIndex = 1
this.getList();
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
//清空筛选条件
Clearconditions() {
this.msg.keyword = '';
this.dateList = [];
this.getList();
},
//单选 全选返回数据
tableSelect() {
}
},
};
</script>
<style>
.pintuanActive .content {
background: #fff;
margin-top: 10px;
padding: 20px;
box-sizing: border-box;
}
.pintuanActive .app-image {
background-size: cover;
background-position: center center;
width: 50px;
height: 50px;
}
</style>
This diff is collapsed.
......@@ -172,7 +172,7 @@
<li class="menu_item" :class="{'Fchecked':isChecked=='/pintuanMsg'}" @click="isChecked='/pintuanMsg',CommonJump('pintuanMsg')">
<i class="el-icon-menu"></i><span>消息通知</span>
</li>
<li class="menu_item" :class="{'Fchecked':isChecked=='/AppletPublishing'}" @click="isChecked='/AppletPublishing',CommonJump('AppletPublishing')">
<li class="menu_item" :class="{'Fchecked':isChecked=='/pintuanList'}" @click="isChecked='/pintuanList',CommonJump('pintuanList')">
<i class="el-icon-menu"></i><span>拼团活动</span>
</li>
<li class="menu_item" :class="{'Fchecked':isChecked==4}" @click="isChecked=4">
......
......@@ -806,6 +806,18 @@ export default new Router({
path: '/pintuanMsg',
name: 'pintuanMsg',
component: resolve => require(['@/components/pintuan/pintuanMsg'], resolve),
},
//拼团 拼团活动-列表
{
path: '/pintuanList',
name: 'pintuanList',
component: resolve => require(['@/components/pintuan/pintuanList'], resolve),
},
//拼团 拼团活动
{
path: '/pintuanActive',
name: 'pintuanActive',
component: resolve => require(['@/components/pintuan/pintuanActive'], resolve),
}
]
}
......
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