mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-20 18:05:53 +08:00
添加注释,删除无用代码,bug修改
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
<Button @click="add" type="primary">添加优惠券</Button>
|
||||
<Button @click="delAll">批量下架</Button>
|
||||
</Row>
|
||||
<Table v-if="refreshTable" :loading="loading" border :columns="columns" :data="data" ref="table" @on-selection-change="changeSelect">
|
||||
<Table v-if="refreshTable" :loading="loading" border :columns="columns" :data="data" ref="table" class="mt_10" @on-selection-change="changeSelect">
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<Button v-if="row.promotionStatus === 'NEW' || row.promotionStatus === 'CLOSE'" type="success" :class="{'mr_10' : row.promotionStatus === 'START' || row.promotionStatus === 'NEW'}" size="small" @click="edit(row)">编辑
|
||||
</Button>
|
||||
@@ -37,7 +37,6 @@
|
||||
</Card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getPlatformCouponList,
|
||||
@@ -46,14 +45,9 @@ import {
|
||||
|
||||
export default {
|
||||
name: "coupon",
|
||||
components: {},
|
||||
|
||||
data() {
|
||||
return {
|
||||
loading: true, // 表单加载状态
|
||||
modalType: 0, // 添加或编辑标识
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
@@ -62,17 +56,6 @@ export default {
|
||||
order: "desc", // 默认排序方式
|
||||
getType: "", // 默认排序方式
|
||||
},
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
promotionName: "",
|
||||
},
|
||||
// 表单验证规则
|
||||
formValidate: {
|
||||
promotionName: [
|
||||
{ required: true, message: "不能为空", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
columns: [
|
||||
@@ -271,6 +254,7 @@ export default {
|
||||
check() { // 选中的优惠券
|
||||
this.$emit("selected", this.selectList);
|
||||
},
|
||||
// 初始化数据
|
||||
init() {
|
||||
this.getDataList();
|
||||
},
|
||||
@@ -285,11 +269,12 @@ export default {
|
||||
this.getDataList();
|
||||
},
|
||||
changePageSize(v) { // 改变页数
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
handleSearch() { // 搜索
|
||||
this.searchForm.pageNumber = 0;
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
@@ -313,7 +298,6 @@ export default {
|
||||
this.searchForm.startTime = null;
|
||||
this.searchForm.endTime = null;
|
||||
}
|
||||
// 带多条件搜索参数获取表单数据 请自行修改接口
|
||||
getPlatformCouponList(this.searchForm).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
|
||||
@@ -1,240 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="content-goods-publish">
|
||||
<Form ref="form" :model="form" :label-width="130">
|
||||
<div class="base-info-item">
|
||||
<h4>平台券活动详情</h4>
|
||||
<div class="form-item-view">
|
||||
<FormItem label="活动名称">
|
||||
<span class="goods-category-name">{{ form.promotionName }}</span>
|
||||
</FormItem>
|
||||
<FormItem label="活动类型">
|
||||
<span class="goods-category-name">{{
|
||||
getCouponType(form.couponType)
|
||||
}}</span>
|
||||
</FormItem>
|
||||
<FormItem label="面额">
|
||||
<span class="goods-category-name"> ¥{{ form.price | unitPrice }}</span>
|
||||
</FormItem>
|
||||
<FormItem label="活动说明">
|
||||
<span class="goods-category-name">{{ form.description }}</span>
|
||||
</FormItem>
|
||||
<FormItem label="发放总数">
|
||||
<span class="goods-category-name">{{ form.publishNum }}</span>
|
||||
</FormItem>
|
||||
<FormItem label="领取限制">
|
||||
<span class="goods-category-name">{{ form.limitNum }}</span>
|
||||
</FormItem>
|
||||
<FormItem label="活动开始时间">
|
||||
<span class="goods-category-name">{{ form.startTime }}</span>
|
||||
</FormItem>
|
||||
<FormItem label="消费限额">
|
||||
<span class="goods-category-name">{{
|
||||
form.consumptionLimit
|
||||
}}</span>
|
||||
</FormItem>
|
||||
<FormItem label="使用有效期">
|
||||
<span class="goods-category-name">{{ form.startTime }} 至 {{ form.endTime }}</span>
|
||||
</FormItem>
|
||||
<FormItem label="适用品类范围">
|
||||
<span class="goods-category-name">{{
|
||||
getScopeType(form.scopeType)
|
||||
}}</span>
|
||||
</FormItem>
|
||||
<FormItem label="品类范围描述">
|
||||
<span class="goods-category-name">{{ form.couponName }}</span>
|
||||
</FormItem>
|
||||
<FormItem label="状态">
|
||||
<span class="goods-category-name">{{
|
||||
getStatus(form.status)
|
||||
}}</span>
|
||||
</FormItem>
|
||||
<FormItem label="优惠券类型">
|
||||
<span class="goods-category-name">{{
|
||||
getType(form.getType)
|
||||
}}</span>
|
||||
</FormItem>
|
||||
<FormItem label="活动创建时间">
|
||||
<span class="goods-category-name">{{ form.createTime }}</span>
|
||||
</FormItem>
|
||||
<FormItem label="活动最后更新时间">
|
||||
<span class="goods-category-name">{{ form.updateTime }}</span>
|
||||
</FormItem>
|
||||
<FormItem label="更新管理员名称">
|
||||
<span class="goods-category-name">{{ form.updateBy }}</span>
|
||||
</FormItem>
|
||||
<FormItem label="已发放数量">
|
||||
<span class="goods-category-name">{{ form.receivedNum }}</span>
|
||||
</FormItem>
|
||||
<FormItem label="已使用数量">
|
||||
<span class="goods-category-name">{{ form.usedNum }}</span>
|
||||
</FormItem>
|
||||
</div>
|
||||
<h4>适用品类范围</h4>
|
||||
<div>
|
||||
<Table :loading="loading" border :columns="columns1" :data="data1" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||
<Row type="flex" justify="end" class="mt_10">
|
||||
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
|
||||
size="small" show-total show-elevator show-sizer></Page>
|
||||
</Row>
|
||||
</div>
|
||||
</div>
|
||||
</Form>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
<Button type="primary" @click="back">返回活动列表</Button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getPlatformCoupon } from "@/api/promotion";
|
||||
|
||||
import uploadPicThumb from "@/views/my-components/lili/upload-pic-thumb";
|
||||
import editor from "@/views/my-components/lili/editor";
|
||||
|
||||
export default {
|
||||
name: "addCoupon",
|
||||
components: {
|
||||
uploadPicThumb,
|
||||
editor,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
modalType: 0, // 当前类型
|
||||
loading: false, // 表单加载状态
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
},
|
||||
form: {
|
||||
/** 店铺承担比例 */
|
||||
sellerCommission: 0,
|
||||
/** 发行数量 */
|
||||
publishNum: 1,
|
||||
/** 运费承担者 */
|
||||
scopeType: "ALL",
|
||||
/** 消费限额 */
|
||||
consumptionLimit: "",
|
||||
/** 限领数量 */
|
||||
limitNum: 1,
|
||||
/** 活动类型 */
|
||||
couponType: "",
|
||||
/** 优惠券名称 */
|
||||
couponName: "",
|
||||
/** 已被使用数量 */
|
||||
usedNum: 0,
|
||||
/** 已被领取的数量 */
|
||||
receivedNum: 0,
|
||||
},
|
||||
id: this.$route.query.id,
|
||||
columns1: [
|
||||
{
|
||||
title: "一级类目",
|
||||
key: "name",
|
||||
},
|
||||
{
|
||||
title: "二级类目",
|
||||
key: "age",
|
||||
},
|
||||
{
|
||||
title: "三级类目",
|
||||
key: "address",
|
||||
},
|
||||
],
|
||||
data1: [
|
||||
{
|
||||
name: "王小明",
|
||||
age: 18,
|
||||
address: "北京市朝阳区芍药居",
|
||||
},
|
||||
{
|
||||
name: "张小刚",
|
||||
age: 25,
|
||||
address: "北京市海淀区西二旗",
|
||||
},
|
||||
{
|
||||
name: "李小红",
|
||||
age: 30,
|
||||
address: "上海市浦东新区世纪大道",
|
||||
},
|
||||
{
|
||||
name: "周小伟",
|
||||
age: 26,
|
||||
address: "深圳市南山区深南大道",
|
||||
},
|
||||
],
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
// 如果id不为空则查询信息
|
||||
if (this.id) {
|
||||
this.getCoupon();
|
||||
this.modalType = 1;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getCouponType(value) {
|
||||
switch (value) {
|
||||
case "POINT":
|
||||
return "打折";
|
||||
case "PRICE":
|
||||
return "减免现金";
|
||||
}
|
||||
},
|
||||
/** 获取状态 */
|
||||
getStatus(value) {
|
||||
switch (value) {
|
||||
case "NEW":
|
||||
return "新建";
|
||||
case "START":
|
||||
return "开始";
|
||||
case "LOWER":
|
||||
return "结束";
|
||||
case "CANCEL":
|
||||
return "作废";
|
||||
}
|
||||
},
|
||||
/** 关联范围类型 */
|
||||
getScopeType(value) {
|
||||
switch (value) {
|
||||
case "PORTION_CATEGORY":
|
||||
return "部分商品分类";
|
||||
case "PORTION_GOODS":
|
||||
return "指定商品";
|
||||
case "ALL":
|
||||
return "全品类";
|
||||
}
|
||||
},
|
||||
/** 优惠券类型 */
|
||||
getType(value) {
|
||||
switch (value) {
|
||||
case "FREE":
|
||||
return "免费获取";
|
||||
case "ACTIVITY":
|
||||
return "活动获取";
|
||||
}
|
||||
},
|
||||
|
||||
getCoupon() {
|
||||
getPlatformCoupon(this.id).then((res) => {
|
||||
this.form = res.result;
|
||||
});
|
||||
},
|
||||
back() {
|
||||
this.$store.commit("removeTag", "platform-coupon-info");
|
||||
this.$router.go(-1);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "couponPublish.scss";
|
||||
</style>
|
||||
|
||||
@@ -1,257 +0,0 @@
|
||||
/*选择商品品类*/
|
||||
.content-goods-publish {
|
||||
padding: 15px;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
border: 1px solid #ddd;
|
||||
background: none repeat 0 0 #fff;
|
||||
height: 100%;
|
||||
margin-bottom: 20px;
|
||||
|
||||
/*商品品类*/
|
||||
.goods-category {
|
||||
text-align: left;
|
||||
padding: 10px;
|
||||
background: #fafafa;
|
||||
border: 1px solid #e6e6e6;
|
||||
|
||||
ul {
|
||||
padding: 8px 4px 8px 8px;
|
||||
list-style: none;
|
||||
width: 300px;
|
||||
background: none repeat 0 0 #fff;
|
||||
border: 1px solid #e6e6e6;
|
||||
display: inline-block;
|
||||
letter-spacing: normal;
|
||||
margin-right: 15px;
|
||||
vertical-align: top;
|
||||
word-spacing: normal;
|
||||
|
||||
li {
|
||||
line-height: 20px;
|
||||
padding: 5px;
|
||||
cursor: pointer;
|
||||
color: #333;
|
||||
font-size: 12px;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** 当前品类被选中的样式 */
|
||||
.activeClass {
|
||||
background-color: #d9edf7;
|
||||
border: 1px solid #bce8f1;
|
||||
color: #3a87ad;
|
||||
}
|
||||
|
||||
/*!*当前选择的商品品类文字*!*/
|
||||
.current-goods-category {
|
||||
text-align: left;
|
||||
padding: 10px;
|
||||
width: 100%;
|
||||
border: 1px solid #fbeed5;
|
||||
color: #c09853;
|
||||
background-color: #fcf8e3;
|
||||
margin: 10px auto;
|
||||
padding: 8px 35px 8px 14px;
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
/*编辑基本信息*/
|
||||
.el-form {
|
||||
padding-bottom: 80px;
|
||||
|
||||
.el-form-item {
|
||||
width: 100%;
|
||||
color: gray;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
div.base-info-item {
|
||||
|
||||
h4 {
|
||||
margin-bottom: 10px;
|
||||
padding: 0 10px;
|
||||
border: 1px solid #ddd;
|
||||
background-color: #f8f8f8;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
font-size: 14px;
|
||||
line-height: 40px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.form-item-view {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
padding-left: 80px;
|
||||
|
||||
.shop-category-text {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.item-goods-properts-row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
word-break: break-all;
|
||||
white-space: normal;
|
||||
width: 300px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.item-goods-properts {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.form-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
/** 审核信息-拒绝原因 */
|
||||
.auth-info {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.el-form-item {
|
||||
width: 30%;
|
||||
min-width: 300px;
|
||||
}
|
||||
|
||||
.goods-name-width {
|
||||
width: 50%;
|
||||
min-width: 300px;
|
||||
}
|
||||
|
||||
.el-form-item__content {
|
||||
margin-left: 120px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
p.goods-group-manager {
|
||||
padding-left: 7.5%;
|
||||
text-align: left;
|
||||
color: #999;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
/*teatarea*/
|
||||
/deep/ .el-textarea {
|
||||
width: 150%;
|
||||
}
|
||||
|
||||
.seo-text {
|
||||
width: 150%;
|
||||
}
|
||||
}
|
||||
|
||||
/*折叠面板*/
|
||||
.el-collapse-item {
|
||||
/deep/ .el-collapse-item__header {
|
||||
text-align: left;
|
||||
background-color: #f8f8f8;
|
||||
padding: 0 10px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.el-form-item {
|
||||
margin-left: 5%;
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
/deep/ .el-form-item__content {
|
||||
margin-left: 120px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
p.goods-group-manager {
|
||||
padding-left: 12%;
|
||||
text-align: left;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
/deep/ .el-collapse-item__content {
|
||||
padding: 10px 0;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
/*商品描述*/
|
||||
.goods-intro {
|
||||
line-height: 40;
|
||||
}
|
||||
|
||||
/** 底部步骤 */
|
||||
.footer {
|
||||
width: 88.7%;
|
||||
padding: 10px;
|
||||
background-color: #ffc;
|
||||
position: fixed;
|
||||
bottom: 0px;
|
||||
left: 10%;
|
||||
text-align: center;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
/*图片上传组件第一张图设置封面*/
|
||||
.goods-images {
|
||||
/deep/ li.el-upload-list__item:first-child {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/deep/ li.el-upload-list__item:first-child:after {
|
||||
content: "封";
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
font-size: 12px;
|
||||
position: absolute;
|
||||
left: -15px;
|
||||
top: -6px;
|
||||
width: 40px;
|
||||
height: 24px;
|
||||
padding-top: 6px;
|
||||
background: #13ce66;
|
||||
text-align: center;
|
||||
-webkit-transform: rotate(-45deg);
|
||||
transform: rotate(-45deg);
|
||||
-webkit-box-shadow: 0 0 1pc 1px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 0 0 1pc 1px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
}
|
||||
|
||||
.el-form-item__label {
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.step-view {
|
||||
width: 33%;
|
||||
height: 40px;
|
||||
font-size: 19px;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
background-color: #fff;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.page {
|
||||
margin-top: 2vh;
|
||||
margin-bottom: 5vh;
|
||||
}
|
||||
@@ -198,12 +198,6 @@ export default {
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectedGoods: [], // 已选商品列表,便于删除
|
||||
goodsCategoryList: [], // 商品分类列表
|
||||
shopCategoryList: [], // 店铺分类列表
|
||||
cascaderProps: {
|
||||
multiple: true,
|
||||
label: "name",
|
||||
value: "id",
|
||||
}, // 级联选择器配置项
|
||||
formRule: {
|
||||
promotionName: [{required: true, message: "活动名称不能为空"}],
|
||||
couponName: [{required: true, message: "优惠券名称不能为空"}],
|
||||
@@ -306,6 +300,7 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 获取优惠券数据
|
||||
getCoupon() {
|
||||
getPlatformCoupon(this.id).then((res) => {
|
||||
let data = res.result;
|
||||
@@ -495,17 +490,11 @@ export default {
|
||||
});
|
||||
this.form.promotionGoodsList = list;
|
||||
},
|
||||
getGoodsCategory(e) {
|
||||
// 获取级联选择器商品分类id
|
||||
// console.log(e);
|
||||
},
|
||||
|
||||
async getCagetoryList() {
|
||||
// 获取全部商品分类
|
||||
let data = await getCategoryTree();
|
||||
this.goodsCategoryList = data.result;
|
||||
// 过滤出可显示的值
|
||||
|
||||
this.goodsCategoryList = this.goodsCategoryList.map((item) => {
|
||||
if (item.children) {
|
||||
item.children = item.children.map((child) => {
|
||||
@@ -531,7 +520,6 @@ export default {
|
||||
}
|
||||
return {value: item.id, label: item.name, children: item.children};
|
||||
});
|
||||
console.log(this.goodsCategoryList);
|
||||
},
|
||||
filterCategoryId(list, idArr) {
|
||||
// 递归获取分类id
|
||||
|
||||
@@ -5,19 +5,17 @@
|
||||
<Button @click="add" type="primary">添加活动</Button>
|
||||
</Row>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom">
|
||||
|
||||
<template slot-scope="{ row,index }" slot="action">
|
||||
<Button type="info"
|
||||
size="small" style="margin-right: 10px" @click="info(row)">查看
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<Button type="info" size="small" style="margin-right: 10px" @click="info(row)">
|
||||
查看
|
||||
</Button>
|
||||
<Button v-if="!checked && row.promotionStatus === 'START' || row.promotionStatus === 'NEW'" type="error"
|
||||
size="small" style="margin-right: 10px" @click="remove(row)">停止
|
||||
size="small" style="margin-right: 10px" @click="remove(row)">停止
|
||||
</Button>
|
||||
</template>
|
||||
|
||||
</Table>
|
||||
<Row type="flex" justify="end" class="mt_10">
|
||||
<Page :current="searchForm.pageNumber + 1" :total="total" :page-size="searchForm.pageSize"
|
||||
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize"
|
||||
@on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
|
||||
size="small" show-total show-elevator show-sizer></Page>
|
||||
</Row>
|
||||
@@ -42,7 +40,7 @@ export default {
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 0, // 当前页数
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
@@ -170,19 +168,20 @@ export default {
|
||||
info(v) {
|
||||
this.$router.push({name: "coupon-activity-info", query: {id: v.id}});
|
||||
},
|
||||
//跳转页面
|
||||
// 分页 修改页码
|
||||
changePage(v) {
|
||||
this.searchForm.pageNumber = v - 1;
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
},
|
||||
//修改分页
|
||||
// 分页 修改页数
|
||||
changePageSize(v) {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
//搜索活动
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 0;
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
@@ -196,7 +195,6 @@ export default {
|
||||
this.searchForm.startTime = null;
|
||||
this.searchForm.endTime = null;
|
||||
}
|
||||
// 带多条件搜索参数获取表单数据 请自行修改接口
|
||||
getCouponActivityList(this.searchForm).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
@@ -210,23 +208,21 @@ export default {
|
||||
edit(v) {
|
||||
this.$router.push({name: "edit-platform-coupon", query: {id: v.id}});
|
||||
},
|
||||
//下架活动
|
||||
//停止活动
|
||||
remove(v) {
|
||||
this.$Modal.confirm({
|
||||
title: "确认下架",
|
||||
title: "确认停止",
|
||||
// 记得确认修改此处
|
||||
content: "确认要下架此优惠券活动么?下架活动只能重新创建",
|
||||
content: "确认要停止此优惠券活动么?停止活动只能重新创建",
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
closeActivity(v.id).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success("优惠券活动已作废");
|
||||
this.$Message.success("优惠券活动已停止");
|
||||
this.getDataList();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$Modal;
|
||||
});
|
||||
}).catch(() => {});
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="content-goods-publish">
|
||||
<Form ref="form" :model="form" :label-width="130">
|
||||
<Form ref="form" :model="form" :label-width="70">
|
||||
<div class="base-info-item">
|
||||
<h4>优惠券活动详情</h4>
|
||||
<div class="form-item-view">
|
||||
@@ -30,10 +30,10 @@
|
||||
<h4>优惠券列表</h4>
|
||||
<Table :columns="couponColumn" :data="couponData" ref="table">
|
||||
</Table>
|
||||
<h4 v-if="couponActivity.activityScopeInfo && memberData.length>0">会员列表列表</h4>
|
||||
<Table :columns="memberColumn" :data="memberData">
|
||||
|
||||
</Table>
|
||||
<template v-if="couponActivity.activityScopeInfo && memberData.length>0">
|
||||
<h4 class="mt_10">会员列表列表</h4>
|
||||
<Table :columns="memberColumn" :data="memberData"></Table>
|
||||
</template>
|
||||
</div>
|
||||
</Form>
|
||||
</div>
|
||||
@@ -52,7 +52,9 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
id: this.$route.query.id,//表单id
|
||||
couponActivity: "",//券活动
|
||||
couponActivity: {
|
||||
|
||||
},//券活动
|
||||
couponColumn: [
|
||||
{
|
||||
title: "优惠券名称",
|
||||
@@ -124,6 +126,52 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "couponPublish.scss";
|
||||
/*选择商品品类*/
|
||||
.content-goods-publish {
|
||||
padding: 15px;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
border: 1px solid #ddd;
|
||||
background: none repeat 0 0 #fff;
|
||||
height: 100%;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
div.base-info-item {
|
||||
h4 {
|
||||
margin-bottom: 10px;
|
||||
padding: 0 10px;
|
||||
border: 1px solid #ddd;
|
||||
background-color: #f8f8f8;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
font-size: 14px;
|
||||
line-height: 40px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.form-item-view {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
padding-left: 40px;
|
||||
|
||||
.shop-category-text {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
/** 底部步骤 */
|
||||
.footer {
|
||||
width: 88.7%;
|
||||
padding: 10px;
|
||||
background-color: #ffc;
|
||||
position: fixed;
|
||||
bottom: 0px;
|
||||
left: 10%;
|
||||
text-align: center;
|
||||
z-index: 9999;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -1,253 +0,0 @@
|
||||
/*选择商品品类*/
|
||||
.content-goods-publish {
|
||||
padding: 15px;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
border: 1px solid #ddd;
|
||||
background: none repeat 0 0 #fff;
|
||||
height: 100%;
|
||||
margin-bottom: 20px;
|
||||
|
||||
/*商品品类*/
|
||||
.goods-category {
|
||||
text-align: left;
|
||||
padding: 10px;
|
||||
background: #fafafa;
|
||||
border: 1px solid #e6e6e6;
|
||||
|
||||
ul {
|
||||
padding: 8px 4px 8px 8px;
|
||||
list-style: none;
|
||||
width: 300px;
|
||||
background: none repeat 0 0 #fff;
|
||||
border: 1px solid #e6e6e6;
|
||||
display: inline-block;
|
||||
letter-spacing: normal;
|
||||
margin-right: 15px;
|
||||
vertical-align: top;
|
||||
word-spacing: normal;
|
||||
|
||||
li {
|
||||
line-height: 20px;
|
||||
padding: 5px;
|
||||
cursor: pointer;
|
||||
color: #333;
|
||||
font-size: 12px;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** 当前品类被选中的样式 */
|
||||
.activeClass {
|
||||
background-color: #d9edf7;
|
||||
border: 1px solid #bce8f1;
|
||||
color: #3a87ad;
|
||||
}
|
||||
|
||||
/*!*当前选择的商品品类文字*!*/
|
||||
.current-goods-category {
|
||||
text-align: left;
|
||||
padding: 10px;
|
||||
width: 100%;
|
||||
border: 1px solid #fbeed5;
|
||||
color: #c09853;
|
||||
background-color: #fcf8e3;
|
||||
margin: 10px auto;
|
||||
padding: 8px 35px 8px 14px;
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
/*编辑基本信息*/
|
||||
.el-form {
|
||||
padding-bottom: 80px;
|
||||
|
||||
.el-form-item {
|
||||
width: 100%;
|
||||
color: gray;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
div.base-info-item {
|
||||
|
||||
h4 {
|
||||
margin-bottom: 10px;
|
||||
padding: 0 10px;
|
||||
border: 1px solid #ddd;
|
||||
background-color: #f8f8f8;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
font-size: 14px;
|
||||
line-height: 40px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.form-item-view {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
padding-left: 80px;
|
||||
|
||||
.shop-category-text {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.item-goods-properts-row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
word-break: break-all;
|
||||
white-space: normal;
|
||||
width: 300px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.item-goods-properts {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.form-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.el-form-item {
|
||||
width: 30%;
|
||||
min-width: 300px;
|
||||
}
|
||||
|
||||
.goods-name-width {
|
||||
width: 50%;
|
||||
min-width: 300px;
|
||||
}
|
||||
|
||||
.el-form-item__content {
|
||||
margin-left: 120px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
p.goods-group-manager {
|
||||
padding-left: 7.5%;
|
||||
text-align: left;
|
||||
color: #999;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
/*teatarea*/
|
||||
/deep/ .el-textarea {
|
||||
width: 150%;
|
||||
}
|
||||
|
||||
.seo-text {
|
||||
width: 150%;
|
||||
}
|
||||
}
|
||||
|
||||
/*折叠面板*/
|
||||
.el-collapse-item {
|
||||
/deep/ .el-collapse-item__header {
|
||||
text-align: left;
|
||||
background-color: #f8f8f8;
|
||||
padding: 0 10px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.el-form-item {
|
||||
margin-left: 5%;
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
/deep/ .el-form-item__content {
|
||||
margin-left: 120px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
p.goods-group-manager {
|
||||
padding-left: 12%;
|
||||
text-align: left;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
/deep/ .el-collapse-item__content {
|
||||
padding: 10px 0;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
/*商品描述*/
|
||||
.goods-intro {
|
||||
line-height: 40;
|
||||
}
|
||||
|
||||
/** 底部步骤 */
|
||||
.footer {
|
||||
width: 88.7%;
|
||||
padding: 10px;
|
||||
background-color: #ffc;
|
||||
position: fixed;
|
||||
bottom: 0px;
|
||||
left: 10%;
|
||||
text-align: center;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
/*图片上传组件第一张图设置封面*/
|
||||
.goods-images {
|
||||
/deep/ li.el-upload-list__item:first-child {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/deep/ li.el-upload-list__item:first-child:after {
|
||||
content: "封";
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
font-size: 12px;
|
||||
position: absolute;
|
||||
left: -15px;
|
||||
top: -6px;
|
||||
width: 40px;
|
||||
height: 24px;
|
||||
padding-top: 6px;
|
||||
background: #13ce66;
|
||||
text-align: center;
|
||||
-webkit-transform: rotate(-45deg);
|
||||
transform: rotate(-45deg);
|
||||
-webkit-box-shadow: 0 0 1pc 1px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 0 0 1pc 1px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
}
|
||||
|
||||
.el-form-item__label {
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.step-view {
|
||||
width: 33%;
|
||||
height: 40px;
|
||||
font-size: 19px;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
background-color: #fff;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.page {
|
||||
margin-top: 2vh;
|
||||
margin-bottom: 5vh;
|
||||
}
|
||||
@@ -6,12 +6,11 @@
|
||||
<h4>活动信息</h4>
|
||||
<div class="form-item-view">
|
||||
<FormItem label="活动名称" prop="promotionName">
|
||||
<Input type="text" v-model="form.promotionName" placeholder="活动名称" clearable style="width: 260px"/>
|
||||
<Input type="text" v-model="form.promotionName" placeholder="请填写活动名称" clearable style="width: 260px"/>
|
||||
</FormItem>
|
||||
|
||||
<FormItem label="活动时间">
|
||||
<DatePicker type="datetimerange" :options="options" v-model="rangeTime" format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择" style="width: 260px">
|
||||
placeholder="请选择活动时间" style="width: 260px">
|
||||
</DatePicker>
|
||||
</FormItem>
|
||||
|
||||
@@ -72,18 +71,16 @@
|
||||
|
||||
<script>
|
||||
import couponTemplate from "@/views/promotion/coupon/coupon";
|
||||
|
||||
import userList from "@/views/member/list/index";
|
||||
|
||||
import {saveActivityCoupon, updateCouponActivity} from "@/api/promotion";
|
||||
import {saveActivityCoupon} from "@/api/promotion";
|
||||
|
||||
export default {
|
||||
name: "addCouponActivity",
|
||||
components: {
|
||||
couponTemplate,
|
||||
userList,
|
||||
userList
|
||||
},
|
||||
data() {
|
||||
data () {
|
||||
return {
|
||||
options: {
|
||||
disabledDate(date) {
|
||||
@@ -228,7 +225,6 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 返回已选择的用户
|
||||
callbackSelectUser(val) {
|
||||
// 每次将返回的数据回调判断
|
||||
@@ -283,7 +279,6 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 添加指定用户
|
||||
addVip() {
|
||||
this.checkUserList = true;
|
||||
|
||||
@@ -2,13 +2,7 @@
|
||||
<div class="full-cut">
|
||||
<Card>
|
||||
<Row>
|
||||
<Form
|
||||
ref="searchForm"
|
||||
:model="searchForm"
|
||||
inline
|
||||
:label-width="70"
|
||||
class="search-form"
|
||||
>
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
<Form-item label="活动名称" prop="promotionName">
|
||||
<Input
|
||||
type="text"
|
||||
@@ -59,9 +53,7 @@
|
||||
{{ row.isFullMinus ? "满减" : "满折" }}
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="hours">
|
||||
<Tag v-for="item in unixHours(row.hours)" :key="item">{{
|
||||
item
|
||||
}}</Tag>
|
||||
<Tag v-for="item in unixHours(row.hours)" :key="item">{{item}}</Tag>
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<div>
|
||||
@@ -83,7 +75,7 @@
|
||||
</div>
|
||||
</template>
|
||||
</Table>
|
||||
<Row type="flex" justify="end" class="page operation">
|
||||
<Row type="flex" justify="end" class="mt_10">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
:total="total"
|
||||
@@ -183,6 +175,7 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init() {
|
||||
this.getDataList();
|
||||
},
|
||||
@@ -218,6 +211,7 @@ export default {
|
||||
},
|
||||
changePageSize(v) {
|
||||
// 改变页码
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
@@ -227,6 +221,7 @@ export default {
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
// 获取列表数据
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
if (this.selectDate && this.selectDate[0] && this.selectDate[1]) {
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
<Tabs v-model="searchForm.status">
|
||||
<!-- 标签栏 -->
|
||||
<TabPane v-for="(item,index) in tabs" :key="index" :name="item.status" :label="item.title">
|
||||
|
||||
</TabPane>
|
||||
|
||||
</Tabs>
|
||||
<Table :columns="liveColumns" :data="liveData"></Table>
|
||||
<Row type="flex" style="margin:20px;" justify="end" class="mt_10">
|
||||
@@ -167,6 +165,7 @@ export default {
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
// 直播状态
|
||||
"searchForm.status": {
|
||||
handler() {
|
||||
this.liveData = [];
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<Card>
|
||||
|
||||
<Form :model="liveForm" ref="liveForm" :rules="liveRulesForm" :label-width="120">
|
||||
<FormItem label="直播标题" prop="name">
|
||||
<Input disabled v-model="liveForm.name" style="width:460px"></Input>
|
||||
|
||||
@@ -1,79 +1,78 @@
|
||||
<template>
|
||||
<div class="search">
|
||||
<Card>
|
||||
<Row v-show="openSearch">
|
||||
<Form
|
||||
ref="searchForm"
|
||||
:model="searchForm"
|
||||
inline
|
||||
:label-width="70"
|
||||
class="search-form"
|
||||
>
|
||||
<Form-item label="活动名称" prop="promotionName">
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.promotionName"
|
||||
placeholder="请输入活动名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="活动状态" prop="promotionStatus">
|
||||
<Select
|
||||
v-model="searchForm.promotionStatus"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
>
|
||||
<Option value="NEW">未开始</Option>
|
||||
<Option value="START">已开始/上架</Option>
|
||||
<Option value="END">已结束/下架</Option>
|
||||
<Option value="CLOSE">紧急关闭/作废</Option>
|
||||
</Select>
|
||||
</Form-item>
|
||||
<Form-item label="活动时间">
|
||||
<DatePicker
|
||||
v-model="selectDate"
|
||||
type="daterange"
|
||||
clearable
|
||||
placeholder="选择起始时间"
|
||||
style="width: 200px"
|
||||
></DatePicker>
|
||||
</Form-item>
|
||||
<Button @click="handleSearch" type="primary" class="search-btn"
|
||||
>搜索</Button
|
||||
<Form
|
||||
ref="searchForm"
|
||||
:model="searchForm"
|
||||
inline
|
||||
:label-width="70"
|
||||
class="search-form"
|
||||
>
|
||||
<Form-item label="活动名称" prop="promotionName">
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.promotionName"
|
||||
placeholder="请输入活动名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="活动状态" prop="promotionStatus">
|
||||
<Select
|
||||
v-model="searchForm.promotionStatus"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
>
|
||||
</Form>
|
||||
</Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
ref="table"
|
||||
<Option value="NEW">未开始</Option>
|
||||
<Option value="START">已开始/上架</Option>
|
||||
<Option value="END">已结束/下架</Option>
|
||||
<Option value="CLOSE">紧急关闭/作废</Option>
|
||||
</Select>
|
||||
</Form-item>
|
||||
<Form-item label="活动时间">
|
||||
<DatePicker
|
||||
v-model="selectDate"
|
||||
type="daterange"
|
||||
clearable
|
||||
placeholder="选择起始时间"
|
||||
style="width: 200px"
|
||||
></DatePicker>
|
||||
</Form-item>
|
||||
<Button @click="handleSearch" type="primary" class="search-btn"
|
||||
>搜索</Button
|
||||
>
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<Button
|
||||
type="info"
|
||||
size="small"
|
||||
@click="view(row)"
|
||||
style="margin-right: 5px"
|
||||
>查看</Button
|
||||
>
|
||||
<Button
|
||||
type="error"
|
||||
size="small"
|
||||
:disabled="
|
||||
row.promotionStatus == 'END' || row.promotionStatus == 'CLOSE'
|
||||
"
|
||||
@click="close(row)"
|
||||
>关闭
|
||||
</Button>
|
||||
</template>
|
||||
</Table>
|
||||
</Form>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
ref="table"
|
||||
class="mt_10"
|
||||
>
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<Button
|
||||
type="info"
|
||||
size="small"
|
||||
@click="view(row)"
|
||||
style="margin-right: 5px"
|
||||
>查看</Button
|
||||
>
|
||||
<Button
|
||||
type="error"
|
||||
size="small"
|
||||
:disabled="
|
||||
row.promotionStatus == 'END' || row.promotionStatus == 'CLOSE'
|
||||
"
|
||||
@click="close(row)"
|
||||
>关闭
|
||||
</Button>
|
||||
</template>
|
||||
</Table>
|
||||
<Row type="flex" justify="end" class="mt_10">
|
||||
<Page
|
||||
:current="searchForm.pageNumber + 1"
|
||||
:current="searchForm.pageNumber"
|
||||
:total="total"
|
||||
:page-size="searchForm.pageSize"
|
||||
@on-change="changePage"
|
||||
@@ -94,14 +93,12 @@ import { getPintuanList, closePintuan } from "@/api/promotion";
|
||||
|
||||
export default {
|
||||
name: "pintuan",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
loading: true, // 表单加载状态
|
||||
openSearch: true, // 显示搜索项
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 0, // 当前页数
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "startTime",
|
||||
order: "desc", // 默认排序方式
|
||||
@@ -175,23 +172,29 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init() {
|
||||
this.getDataList();
|
||||
},
|
||||
// 分页 修改页码
|
||||
changePage(v) {
|
||||
this.searchForm.pageNumber = v - 1;
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
this.clearSelectAll();
|
||||
},
|
||||
// 分页 修改页数
|
||||
changePageSize(v) {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
// 搜索
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 0;
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
// 获取拼团列表
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
if (this.selectDate && this.selectDate[0] && this.selectDate[1]) {
|
||||
@@ -209,9 +212,11 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 查看拼团商品
|
||||
view(v) {
|
||||
this.$router.push({ name: "pintuan-goods", query: { id: v.id } });
|
||||
},
|
||||
// 关闭当前活动
|
||||
close(v) {
|
||||
this.$Modal.confirm({
|
||||
title: "确认关闭",
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
<div class="pintuan-goods">
|
||||
<Card>
|
||||
<h4>活动详情</h4>
|
||||
<Table
|
||||
style="margin: 10px 0"
|
||||
border
|
||||
<Table style="margin: 10px 0" border
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
></Table>
|
||||
@@ -36,7 +34,7 @@
|
||||
</Table>
|
||||
<Row type="flex" justify="end" class="page operation">
|
||||
<Page
|
||||
:current="searchForm.pageNumber + 1"
|
||||
:current="searchForm.pageNumber"
|
||||
:total="total"
|
||||
:page-size="searchForm.pageSize"
|
||||
@on-change="changePage"
|
||||
@@ -49,41 +47,21 @@
|
||||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
<Modal title="查看图片" v-model="visible">
|
||||
<img
|
||||
:src="showImg"
|
||||
v-if="visible"
|
||||
style="width: 200px; height: 200px; margin-left: 130px"
|
||||
/>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getPintuanGoodsList, getPintuanDetail } from "@/api/promotion.js";
|
||||
import config from "@/config";
|
||||
|
||||
const buyerUrl =
|
||||
process.env.NODE_ENV === "development"
|
||||
? config.api_dev.buyer
|
||||
: config.api_prod.buyer;
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
visible: false,// 预览图片
|
||||
showImg: "", // 预览图片url
|
||||
openSearch: true, // 显示搜索
|
||||
openTip: true, // 显示提示
|
||||
loading: false, // 表单加载状态
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 0, // 当前页数
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
},
|
||||
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
data: [], // 表单数据
|
||||
total: 0, // 表单数据总数
|
||||
columns: [
|
||||
@@ -170,35 +148,27 @@ export default {
|
||||
},
|
||||
|
||||
],
|
||||
goodsData: [],
|
||||
goodsData: [] // 商品数据
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init() {
|
||||
this.getDataList();
|
||||
this.getPintuanMsg();
|
||||
},
|
||||
|
||||
// 分页 改变页码
|
||||
changePage(v) {
|
||||
this.searchForm.pageNumber = v - 1;
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
this.clearSelectAll();
|
||||
},
|
||||
|
||||
// 分页 改变页数
|
||||
changePageSize(v) {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
|
||||
handleReset() {
|
||||
// 重置
|
||||
this.searchForm.pageNumber = 0;
|
||||
this.searchForm.promotionName = "";
|
||||
this.selectDate = null;
|
||||
// 重新加载数据
|
||||
this.getDataList();
|
||||
},
|
||||
|
||||
// 获取拼团商品列表
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
this.searchForm.pintuanId = this.$route.query.id;
|
||||
@@ -211,27 +181,12 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 获取拼团详情
|
||||
getPintuanMsg() {
|
||||
// 获取拼团详情
|
||||
getPintuanDetail(this.$route.query.id).then((res) => {
|
||||
if (res.success) this.data.push(res.result);
|
||||
});
|
||||
},
|
||||
|
||||
toBuyerGoods(row) {
|
||||
window.open(
|
||||
buyerUrl +
|
||||
"/pages/product/product?id=" +
|
||||
row.skuId +
|
||||
"&goodsId=" +
|
||||
row.goodsId
|
||||
);
|
||||
},
|
||||
viewImg(img) {
|
||||
this.showImg = img;
|
||||
this.visible = true;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
@@ -239,9 +194,6 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.operation {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
h4 {
|
||||
margin: 20px 0;
|
||||
padding: 0 10px;
|
||||
|
||||
@@ -56,19 +56,11 @@
|
||||
>
|
||||
</Select>
|
||||
</template>
|
||||
|
||||
<template slot-scope="{ index }" slot="activeStock">
|
||||
<Input
|
||||
type="number"
|
||||
v-model="promotionGoodsList[index].activeStock"
|
||||
/>
|
||||
<Input type="number" v-model="promotionGoodsList[index].activeStock" />
|
||||
</template>
|
||||
|
||||
<template slot-scope="{ index }" slot="points">
|
||||
<Input
|
||||
type="number"
|
||||
v-model="promotionGoodsList[index].points"
|
||||
/>
|
||||
<Input type="number" v-model="promotionGoodsList[index].points" />
|
||||
</template>
|
||||
</Table>
|
||||
</FormItem>
|
||||
@@ -306,6 +298,7 @@ export default {
|
||||
await this.getCategory();
|
||||
},
|
||||
methods: {
|
||||
// 获取商品分类
|
||||
async getCategory() {
|
||||
let res = await getPointsGoodsCategoryList();
|
||||
this.categoryList = res.result.records;
|
||||
@@ -351,10 +344,12 @@ export default {
|
||||
);
|
||||
this.$router.go(-1);
|
||||
},
|
||||
// 选择分类
|
||||
changeCategory(val, index) {
|
||||
this.promotionGoodsList[index].pointsGoodsCategoryName = val.label;
|
||||
console.log(this.promotionGoodsList);
|
||||
},
|
||||
// 变更选中状态
|
||||
changeSelect(e) {
|
||||
// 已选商品批量选择
|
||||
this.selectedGoods = e;
|
||||
|
||||
@@ -110,13 +110,11 @@ import {
|
||||
getPointsGoodsById,
|
||||
getPointsGoodsCategoryList,
|
||||
} from "@/api/promotion";
|
||||
import { format } from "date-fns";
|
||||
|
||||
export default {
|
||||
name: "addCoupon",
|
||||
name: "editPointsGoods",
|
||||
data() {
|
||||
return {
|
||||
modalType: 0, // 添加、编辑标识
|
||||
form: {
|
||||
/** 活动名称 */
|
||||
promotionName: "",
|
||||
@@ -134,7 +132,6 @@ export default {
|
||||
categoryList: [], // 分类列表
|
||||
id: this.$route.query.id, // 活动id
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
|
||||
formRule: {
|
||||
settlementPrice: [{ required: true, message: "请填写结算价格" }],
|
||||
pointsGoodsCategoryId: [
|
||||
@@ -150,7 +147,6 @@ export default {
|
||||
// 如果id不为空则查询信息
|
||||
if (this.id) {
|
||||
this.getData();
|
||||
this.modalType = 1;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -162,6 +158,7 @@ export default {
|
||||
);
|
||||
this.$router.go(-1);
|
||||
},
|
||||
// 获取商品数据
|
||||
getData() {
|
||||
getPointsGoodsById(this.id).then((res) => {
|
||||
if (res.success) {
|
||||
@@ -170,11 +167,12 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取分类
|
||||
async getCategory() {
|
||||
let res = await getPointsGoodsCategoryList();
|
||||
this.categoryList = res.result.records;
|
||||
},
|
||||
/** 保存平台优惠券 */
|
||||
/** 保存 */
|
||||
handleSubmit() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
|
||||
@@ -16,15 +16,14 @@
|
||||
<Option v-for="item in statusList" :value="item.value" :key="item.value">{{ item.label }}</Option>
|
||||
</Select>
|
||||
</Form-item>
|
||||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
<Form-item label="SKU编码">
|
||||
<Input type="text" v-model="searchForm.skuId" placeholder="请输入SKU编码" clearable style="width: 200px" />
|
||||
</Form-item>
|
||||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="operation padding-row">
|
||||
<Button @click="addPointsGoods" type="primary">添加积分商品</Button>
|
||||
|
||||
</Row>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table">
|
||||
<template slot-scope="{ row }" slot="goodsName">
|
||||
@@ -51,7 +50,6 @@
|
||||
<div>{{ row.startTime }}</div>
|
||||
<div>{{ row.endTime }}</div>
|
||||
</template>
|
||||
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<Button v-if="row.promotionStatus == 'NEW'" type="info" size="small" @click="edit(row.id)" style="margin-right: 5px">编辑</Button>
|
||||
<Button v-if="row.promotionStatus == 'START'" type="warning" size="small" @click="statusChanged(row.id, 'CLOSE')" style="margin-right: 5px">停用</Button>
|
||||
@@ -75,7 +73,6 @@ import {
|
||||
} from "@/api/promotion";
|
||||
export default {
|
||||
name: "pointsGoods",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
loading: true, // 表单加载状态
|
||||
@@ -92,8 +89,7 @@ export default {
|
||||
{ label: "已结束", value: "END" },
|
||||
{ label: "已关闭", value: "CLOSE" },
|
||||
],
|
||||
columns: [
|
||||
// 表头
|
||||
columns: [ // 表头
|
||||
{
|
||||
title: "商品名称",
|
||||
slot: "goodsName",
|
||||
@@ -111,7 +107,6 @@ export default {
|
||||
slot: "settlementPrice",
|
||||
width: 100,
|
||||
},
|
||||
|
||||
{
|
||||
title: "库存数量",
|
||||
slot: "quantity",
|
||||
@@ -178,20 +173,26 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init() {
|
||||
this.getDataList();
|
||||
},
|
||||
// 跳转添加商品页面
|
||||
addPointsGoods() {
|
||||
this.$router.push({ name: "add-points-goods" });
|
||||
},
|
||||
// 分页 修改页码
|
||||
changePage(v) {
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
},
|
||||
// 分页 修改页数
|
||||
changePageSize(v) {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
// 搜索
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
@@ -201,10 +202,9 @@ export default {
|
||||
"_" +
|
||||
(this.searchForm.pointsE ? this.searchForm.pointsE : "");
|
||||
}
|
||||
|
||||
this.getDataList();
|
||||
},
|
||||
|
||||
// 获取列表数据
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
getPointsGoodsList(this.searchForm).then((res) => {
|
||||
@@ -215,9 +215,11 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 编辑
|
||||
edit(id) {
|
||||
this.$router.push({ name: "edit-points-goods", query: { id: id } });
|
||||
},
|
||||
// 启用 停用积分商品
|
||||
statusChanged(id, status) {
|
||||
let text = "";
|
||||
if (status == "START") {
|
||||
@@ -242,6 +244,7 @@ export default {
|
||||
},
|
||||
});
|
||||
},
|
||||
// 删除积分商品
|
||||
close(id) {
|
||||
this.$Modal.confirm({
|
||||
title: "确认删除",
|
||||
@@ -258,7 +261,7 @@ export default {
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="operation">
|
||||
<Button @click="addParent" icon="md-add">添加积分商品分类</Button>
|
||||
<Button icon="md-refresh" @click="refresh">刷新</Button>
|
||||
</div>
|
||||
<tree-table
|
||||
ref="treeTable"
|
||||
size="default"
|
||||
:loading="loading"
|
||||
:data="tableData"
|
||||
:columns="columns"
|
||||
:border="true"
|
||||
:show-index="false"
|
||||
:is-fold="true"
|
||||
:expand-type="false"
|
||||
primary-key="id"
|
||||
>
|
||||
<template slot="action" slot-scope="scope">
|
||||
<Button @click.native="edit(scope.row)" style="margin-right:10px;" size="small">编辑</Button>
|
||||
<Button @click.native="remove(scope.row)" type="primary" size="small">删除</Button>
|
||||
|
||||
</template>
|
||||
</tree-table>
|
||||
|
||||
<Card>
|
||||
<div class="operation mb_10">
|
||||
<Button @click="addParent" type="primary" icon="md-add">添加积分商品分类</Button>
|
||||
<Button icon="md-refresh" @click="init">刷新</Button>
|
||||
</div>
|
||||
<tree-table
|
||||
ref="treeTable"
|
||||
size="default"
|
||||
:loading="loading"
|
||||
:data="tableData"
|
||||
:columns="columns"
|
||||
:border="true"
|
||||
:show-index="false"
|
||||
:is-fold="true"
|
||||
:expand-type="false"
|
||||
primary-key="id"
|
||||
>
|
||||
<template slot="action" slot-scope="scope">
|
||||
<Button @click.native="edit(scope.row)" style="margin-right:10px;" size="small">编辑</Button>
|
||||
<Button @click.native="remove(scope.row)" type="primary" size="small">删除</Button>
|
||||
</template>
|
||||
</tree-table>
|
||||
</Card>
|
||||
<Modal
|
||||
:title="modalTitle"
|
||||
v-model="modalVisible"
|
||||
@@ -59,13 +59,11 @@ import {
|
||||
deletePointsGoodsCategoryById,
|
||||
} from "@/api/promotion";
|
||||
import TreeTable from "@/views/my-components/tree-table/Table/Table";
|
||||
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
|
||||
|
||||
export default {
|
||||
name: "pointsGoodsCategory",
|
||||
components: {
|
||||
TreeTable,
|
||||
uploadPicInput,
|
||||
TreeTable
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -102,20 +100,15 @@ export default {
|
||||
template: "action",
|
||||
},
|
||||
],
|
||||
tableData: [],
|
||||
tableData: [], // 表格数据
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init() {
|
||||
this.getAllList();
|
||||
},
|
||||
refresh() {
|
||||
this.loading = true;
|
||||
let that = this;
|
||||
setTimeout(function () {
|
||||
that.loading = false;
|
||||
}, 1000);
|
||||
},
|
||||
// 编辑分类
|
||||
edit(v) {
|
||||
this.modalType = 1;
|
||||
this.modalTitle = "编辑";
|
||||
@@ -125,6 +118,7 @@ export default {
|
||||
this.showParent = false;
|
||||
this.modalVisible = true;
|
||||
},
|
||||
// 添加顶级分类
|
||||
addParent() {
|
||||
this.modalType = 0;
|
||||
this.modalTitle = "添加积分商品分类";
|
||||
@@ -135,6 +129,7 @@ export default {
|
||||
this.formAdd.parentId = 0;
|
||||
this.modalVisible = true;
|
||||
},
|
||||
// 提交
|
||||
Submit() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
console.log(valid);
|
||||
@@ -167,10 +162,10 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 删除
|
||||
remove(v) {
|
||||
this.$Modal.confirm({
|
||||
title: "确认删除",
|
||||
// 记得确认修改此处
|
||||
content: "您确认要删除 " + v.name + " ?",
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
@@ -185,6 +180,7 @@ export default {
|
||||
},
|
||||
});
|
||||
},
|
||||
// 获取所有分类
|
||||
getAllList() {
|
||||
this.loading = true;
|
||||
getPointsGoodsCategoryList().then((res) => {
|
||||
|
||||
@@ -1,264 +0,0 @@
|
||||
/*选择商品品类*/
|
||||
.content-goods-publish {
|
||||
padding: 15px;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
border: 1px solid #ddd;
|
||||
background: none repeat 0 0 #fff;
|
||||
height: 100%;
|
||||
margin-bottom: 20px;
|
||||
|
||||
/*商品品类*/
|
||||
.goods-category {
|
||||
text-align: left;
|
||||
padding: 10px;
|
||||
background: #fafafa;
|
||||
border: 1px solid #e6e6e6;
|
||||
|
||||
ul {
|
||||
padding: 8px 4px 8px 8px;
|
||||
list-style: none;
|
||||
width: 300px;
|
||||
background: none repeat 0 0 #fff;
|
||||
border: 1px solid #e6e6e6;
|
||||
display: inline-block;
|
||||
letter-spacing: normal;
|
||||
margin-right: 15px;
|
||||
vertical-align: top;
|
||||
word-spacing: normal;
|
||||
|
||||
li {
|
||||
line-height: 20px;
|
||||
padding: 5px;
|
||||
cursor: pointer;
|
||||
color: #333;
|
||||
font-size: 12px;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** 当前品类被选中的样式 */
|
||||
.activeClass {
|
||||
background-color: #d9edf7;
|
||||
border: 1px solid #bce8f1;
|
||||
color: #3a87ad;
|
||||
}
|
||||
|
||||
/*!*当前选择的商品品类文字*!*/
|
||||
.current-goods-category {
|
||||
text-align: left;
|
||||
padding: 10px;
|
||||
width: 100%;
|
||||
border: 1px solid #fbeed5;
|
||||
color: #c09853;
|
||||
background-color: #fcf8e3;
|
||||
margin: 10px auto;
|
||||
padding: 8px 35px 8px 14px;
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
/*编辑基本信息*/
|
||||
.el-form {
|
||||
padding-bottom: 80px;
|
||||
|
||||
.el-form-item {
|
||||
width: 100%;
|
||||
color: gray;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
getGoodsCategoryLevelList
|
||||
|
||||
/*平铺*/
|
||||
div.base-info-item>div {
|
||||
margin-left: 5%;
|
||||
}
|
||||
|
||||
div.base-info-item {
|
||||
|
||||
h4 {
|
||||
margin-bottom: 10px;
|
||||
padding: 0 10px;
|
||||
border: 1px solid #ddd;
|
||||
background-color: #f8f8f8;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
font-size: 14px;
|
||||
line-height: 40px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.form-item-view {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
padding-left: 80px;
|
||||
|
||||
.shop-category-text {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.item-goods-properts-row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
word-break: break-all;
|
||||
white-space: normal;
|
||||
width: 300px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.item-goods-properts {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.form-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
/** 审核信息-拒绝原因 */
|
||||
.auth-info {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.el-form-item {
|
||||
width: 30%;
|
||||
min-width: 300px;
|
||||
}
|
||||
|
||||
.goods-name-width {
|
||||
width: 50%;
|
||||
min-width: 300px;
|
||||
}
|
||||
|
||||
.el-form-item__content {
|
||||
margin-left: 120px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
p.goods-group-manager {
|
||||
padding-left: 7.5%;
|
||||
text-align: left;
|
||||
color: #999;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
/*teatarea*/
|
||||
/deep/ .el-textarea {
|
||||
width: 150%;
|
||||
}
|
||||
|
||||
.seo-text {
|
||||
width: 150%;
|
||||
}
|
||||
}
|
||||
|
||||
/*折叠面板*/
|
||||
.el-collapse-item {
|
||||
/deep/ .el-collapse-item__header {
|
||||
text-align: left;
|
||||
background-color: #f8f8f8;
|
||||
padding: 0 10px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.el-form-item {
|
||||
margin-left: 5%;
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
/deep/ .el-form-item__content {
|
||||
margin-left: 120px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
p.goods-group-manager {
|
||||
padding-left: 12%;
|
||||
text-align: left;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
/deep/ .el-collapse-item__content {
|
||||
padding: 10px 0;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
/*商品描述*/
|
||||
.goods-intro {
|
||||
line-height: 40;
|
||||
}
|
||||
|
||||
/** 底部步骤 */
|
||||
.footer {
|
||||
width: 88.7%;
|
||||
padding: 10px;
|
||||
background-color: #ffc;
|
||||
position: fixed;
|
||||
bottom: 0px;
|
||||
left: 10%;
|
||||
text-align: center;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
/*图片上传组件第一张图设置封面*/
|
||||
.goods-images {
|
||||
/deep/ li.el-upload-list__item:first-child {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/deep/ li.el-upload-list__item:first-child:after {
|
||||
content: "封";
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
font-size: 12px;
|
||||
position: absolute;
|
||||
left: -15px;
|
||||
top: -6px;
|
||||
width: 40px;
|
||||
height: 24px;
|
||||
padding-top: 6px;
|
||||
background: #13ce66;
|
||||
text-align: center;
|
||||
-webkit-transform: rotate(-45deg);
|
||||
transform: rotate(-45deg);
|
||||
-webkit-box-shadow: 0 0 1pc 1px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 0 0 1pc 1px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
}
|
||||
|
||||
.el-form-item__label {
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.step-view {
|
||||
width: 33%;
|
||||
height: 40px;
|
||||
font-size: 19px;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
background-color: #fff;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.page {
|
||||
margin-top: 2vh;
|
||||
margin-bottom: 5vh;
|
||||
}
|
||||
@@ -118,9 +118,9 @@ export default {
|
||||
|
||||
formRule: {
|
||||
promotionName: [{ required: true, message: "请填写活动名称" }],
|
||||
applyEndTime: [{ required: true, message: "请填写报名截止时间" }],
|
||||
applyEndTime: [{ required: true, message: "请选择报名截止时间" }],
|
||||
seckillPeriod: [{ required: true, message: "请填写抢购时间段" }],
|
||||
startTime: [{ required: true, message: "请填写活动开始时间" }],
|
||||
startTime: [{ required: true, message: "请选择活动开始时间" }],
|
||||
seckillRule: [{ required: true, message: "请输入申请规则" }],
|
||||
},
|
||||
};
|
||||
@@ -139,6 +139,7 @@ export default {
|
||||
localStorage.pageOpenedList = JSON.stringify(this.$store.state.app.pageOpenedList);
|
||||
this.$router.go(-1);
|
||||
},
|
||||
// 获取活动详情
|
||||
getData() {
|
||||
seckillDetail(this.id).then((res) => {
|
||||
if (res.success) {
|
||||
@@ -201,8 +202,18 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "addSeckill.scss";
|
||||
.ivu-form-item{
|
||||
margin-bottom: 30px;
|
||||
h4 {
|
||||
margin-bottom: 10px;
|
||||
padding: 0 10px;
|
||||
border: 1px solid #ddd;
|
||||
background-color: #f8f8f8;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
font-size: 14px;
|
||||
line-height: 40px;
|
||||
text-align: left;
|
||||
}
|
||||
// .ivu-form-item{
|
||||
// margin-bottom: 30px;
|
||||
// }
|
||||
</style>
|
||||
|
||||
@@ -63,7 +63,7 @@ import setupSeckill from "@/views/promotion/seckill/setupSeckill";
|
||||
export default {
|
||||
name: "seckill",
|
||||
components: {
|
||||
setupSeckill,
|
||||
setupSeckill
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -131,33 +131,32 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// tab栏点击切换列表和设置
|
||||
clickTabPane(name) {
|
||||
|
||||
if (name == "setup") {
|
||||
|
||||
this.setupFlag = true;
|
||||
} else {
|
||||
this.setupFlag = false;
|
||||
}
|
||||
},
|
||||
|
||||
// 初始化信息
|
||||
init() {
|
||||
this.getDataList();
|
||||
},
|
||||
// 点击分页
|
||||
// 分页 改变页码
|
||||
changePage(v) {
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
this.clearSelectAll();
|
||||
},
|
||||
// 设置每页大小
|
||||
// 分页 改变页数
|
||||
changePageSize(v) {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
// 搜索
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 0;
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
|
||||
@@ -308,25 +308,26 @@
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init() {
|
||||
this.getSeckillMsg();
|
||||
},
|
||||
|
||||
// 分页 改变页码
|
||||
changePage(v) {
|
||||
this.searchForm.pageNumber = v - 1;
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
this.clearSelectAll();
|
||||
},
|
||||
|
||||
// 分页 改变页数
|
||||
changePageSize(v) {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
|
||||
// 清除选中状态
|
||||
clearSelectAll() {
|
||||
this.$refs.table.selectAll(false);
|
||||
},
|
||||
|
||||
changeSelect(e) {
|
||||
// 获取选择数据
|
||||
this.selectList = e;
|
||||
@@ -379,17 +380,15 @@
|
||||
}
|
||||
return hourArr;
|
||||
},
|
||||
// 格式化申请状态
|
||||
promotionApplyStatus(key) {
|
||||
switch (key) {
|
||||
case "APPLY":
|
||||
return "申请";
|
||||
break;
|
||||
case "PASS":
|
||||
return "通过";
|
||||
break;
|
||||
case "REFUSE":
|
||||
return "拒绝";
|
||||
break;
|
||||
}
|
||||
},
|
||||
pass(row) {
|
||||
@@ -421,6 +420,7 @@
|
||||
}
|
||||
this.showModal = true;
|
||||
},
|
||||
// 确认审批
|
||||
sureAudit() {
|
||||
this.selectCount = this.selectList.length;
|
||||
// 批量审核
|
||||
@@ -453,6 +453,7 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
// 展示拒绝原因
|
||||
showReason(reason) {
|
||||
this.$Modal.info({
|
||||
title: "拒绝原因",
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
</div>
|
||||
</FormItem>
|
||||
</Form>
|
||||
<!-- 选择时间 -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -27,9 +26,8 @@ import { getSetting, setSetting } from "@/api/index";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
templateShow:false,
|
||||
templateShow:false, // 设置是否显示
|
||||
submitLoading: false,
|
||||
selectedTime: [],
|
||||
times: [], //时间集合 1-24点
|
||||
form: {
|
||||
seckillRule: "",
|
||||
@@ -107,7 +105,6 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 选中时间
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user