编辑时间,积分抵用,列表

This commit is contained in:
faiz 2024-12-07 18:17:04 +08:00
parent d15c719d48
commit 41b993cc9a
5 changed files with 1218 additions and 952 deletions

View File

@ -499,6 +499,10 @@ export function updatetProductLabel(id, data) {
export function updatetSeckillLabel(id, data) { export function updatetSeckillLabel(id, data) {
return request.post(`seckill/product/labels/${id}`, data) return request.post(`seckill/product/labels/${id}`, data)
} }
/** 秒杀列表 -- 编辑时间 */
export function updatetSeckillUpdate(id, data) {
return request.post(`seckill/product/update/day/${id}`, data)
}
/** 预售列表 -- 编辑标签 */ /** 预售列表 -- 编辑标签 */
export function updatetPresellLabel(id, data) { export function updatetPresellLabel(id, data) {
return request.post(`store/product/presell/labels/${id}`, data) return request.post(`store/product/presell/labels/${id}`, data)

View File

@ -1,21 +1,47 @@
<template> <template>
<div style="padding: 0 10px;"> <div style="padding: 0 10px">
<div class="mobile-page paddingBox" :class="bgStyle===0?'':'pageOn'" :style="{marginTop:slider+'px',background:activeColor}"> <div
class="mobile-page paddingBox"
:class="bgStyle === 0 ? '' : 'pageOn'"
:style="{ marginTop: slider + 'px', background: activeColor }"
>
<div class="home_product"> <div class="home_product">
<!-- 单列 --> <!-- 单列 -->
<template v-if="itemStyle == 0"> <template v-if="itemStyle == 0">
<div class="list-wrapper itemA" v-if="list.length > 0"> <div class="list-wrapper itemA" v-if="list.length > 0">
<div class="item" :class="conStyle?'':'itemOn'" v-for="(item,index) in list" :key="index"> <div
class="item"
:class="conStyle ? '' : 'itemOn'"
v-for="(item, index) in list"
:key="index"
>
<div class="img-box"> <div class="img-box">
<img v-if="item.image" :src="item.image" alt=""> <img v-if="item.image" :src="item.image" alt="" />
<div v-else class="empty-box"><span class="iconfont-diy icontupian"></span></div> <div v-else class="empty-box">
<span class="iconfont-diy icontupian"></span>
</div>
</div> </div>
<div class="info"> <div class="info">
<div class="hd"> <div class="hd">
<div class="title line2" v-if="titleShow">{{item.store_name}}</div> <div class="title line2" v-if="titleShow">
{{ item.store_name }}
</div>
<div class="text"> <div class="text">
<div class="label" :style="{background:labelColor}">旗舰店</div> <div class="label" :style="{ background: labelColor }">
<div class="coupon" v-if="item.couponId && item.couponId.length && couponShow" :style="'border:1px solid '+labelColor+';color:'+labelColor">领券</div> 旗舰店
</div>
<div
class="coupon"
v-if="item.couponId && item.couponId.length && couponShow"
:style="
'border:1px solid ' +
labelColor +
';color:' +
labelColor
"
>
领券
</div>
<div class="ship">包邮</div> <div class="ship">包邮</div>
</div> </div>
</div> </div>
@ -26,7 +52,7 @@
<!-- <div class="old-price" v-if="opriceShow">¥{{item.ot_price}}</div> --> <!-- <div class="old-price" v-if="opriceShow">¥{{item.ot_price}}</div> -->
</div> </div>
<div v-if="grabShow" class="right"> <div v-if="grabShow" class="right">
<img src="@/assets/images/aq-btn.png" alt=""> <img src="@/assets/images/aq-btn.png" alt="" />
</div> </div>
</div> </div>
</div> </div>
@ -34,42 +60,62 @@
<div class="list-wrapper itemA" v-else> <div class="list-wrapper itemA" v-else>
<div class="item" :class="conStyle ? '' : 'itemOn'"> <div class="item" :class="conStyle ? '' : 'itemOn'">
<div class="img-box"> <div class="img-box">
<div class="empty-box"><span class="iconfont-diy icontupian"></span></div> <div class="empty-box">
<span class="iconfont-diy icontupian"></span>
</div>
</div> </div>
<div class="info"> <div class="info">
<div class="hd"> <div class="hd">
<div class="title line2" v-if="titleShow">商品名称</div> <div class="title line2" v-if="titleShow">商品名称</div>
</div> </div>
<div class="text"> <div class="text">
<div class="label" :style="{background:labelColor}">旗舰店</div> <div class="label" :style="{ background: labelColor }">
<div class="coupon" v-if="couponShow" :style="'border:1px solid '+labelColor+';color:'+labelColor">领券</div> 旗舰店
</div>
<div
class="coupon"
v-if="couponShow"
:style="
'border:1px solid ' + labelColor + ';color:' + labelColor
"
>
领券
</div>
<div class="ship">包邮</div> <div class="ship">包邮</div>
</div> </div>
<div class="price" :style="{ color: fontColor }"> <div class="price" :style="{ color: fontColor }">
<div class="num" v-if="priceShow"> <div class="num" v-if="priceShow">¥<span>199</span></div>
¥<span>199</span>
</div>
<!-- <div class="old-price" v-if="opriceShow">¥399</div> --> <!-- <div class="old-price" v-if="opriceShow">¥399</div> -->
</div> </div>
</div> </div>
</div> </div>
<div class="item" :class="conStyle ? '' : 'itemOn'"> <div class="item" :class="conStyle ? '' : 'itemOn'">
<div class="img-box"> <div class="img-box">
<div class="empty-box"><span class="iconfont-diy icontupian"></span></div> <div class="empty-box">
<span class="iconfont-diy icontupian"></span>
</div>
</div> </div>
<div class="info"> <div class="info">
<div class="hd"> <div class="hd">
<div class="title line2" v-if="titleShow">商品名称</div> <div class="title line2" v-if="titleShow">商品名称</div>
</div> </div>
<div class="text"> <div class="text">
<div class="label" :style="{background:labelColor}">旗舰店</div> <div class="label" :style="{ background: labelColor }">
<div class="coupon" v-if="couponShow" :style="'border:1px solid '+labelColor+';color:'+labelColor">领券</div> 旗舰店
</div>
<div
class="coupon"
v-if="couponShow"
:style="
'border:1px solid ' + labelColor + ';color:' + labelColor
"
>
领券
</div>
<div class="ship">包邮</div> <div class="ship">包邮</div>
</div> </div>
<div class="price" :style="{ color: fontColor }"> <div class="price" :style="{ color: fontColor }">
<div class="num" v-if="priceShow"> <div class="num" v-if="priceShow">¥<span>199</span></div>
¥<span>199</span>
</div>
<!-- <div class="old-price" v-if="opriceShow">¥399</div> --> <!-- <div class="old-price" v-if="opriceShow">¥399</div> -->
</div> </div>
</div> </div>
@ -79,14 +125,23 @@
<!-- 二列 --> <!-- 二列 -->
<template v-if="itemStyle == 1"> <template v-if="itemStyle == 1">
<div class="list-wrapper itemC" v-if="list.length > 0"> <div class="list-wrapper itemC" v-if="list.length > 0">
<div class="item" :class="conStyle?'':'itemOn'" v-for="(item,index) in list" :key="index"> <div
class="item"
:class="conStyle ? '' : 'itemOn'"
v-for="(item, index) in list"
:key="index"
>
<div class="img-box"> <div class="img-box">
<img v-if="item.image" :src="item.image" alt=""> <img v-if="item.image" :src="item.image" alt="" />
<div v-else class="empty-box"><span class="iconfont-diy icontupian"></span></div> <div v-else class="empty-box">
<span class="iconfont-diy icontupian"></span>
</div>
</div> </div>
<div class="info"> <div class="info">
<div class="hd"> <div class="hd">
<div class="title line2" v-if="titleShow">{{item.store_name}}</div> <div class="title line2" v-if="titleShow">
{{ item.store_name }}
</div>
</div> </div>
<div class="price" :style="{ color: fontColor }"> <div class="price" :style="{ color: fontColor }">
<div class="num" v-if="priceShow"> <div class="num" v-if="priceShow">
@ -96,7 +151,16 @@
</div> </div>
<div class="text"> <div class="text">
<!-- <div class="label" :style="{background:labelColor}" v-if="index==0">官方旗舰店</div> --> <!-- <div class="label" :style="{background:labelColor}" v-if="index==0">官方旗舰店</div> -->
<div class="coupon" :style="'border:1px solid '+labelColor+';color:'+labelColor" :class="priceShow?'':'on'" v-if="item.couponId && item.couponId.length && couponShow">领券</div> <div
class="coupon"
:style="
'border:1px solid ' + labelColor + ';color:' + labelColor
"
:class="priceShow ? '' : 'on'"
v-if="item.couponId && item.couponId.length && couponShow"
>
领券
</div>
</div> </div>
</div> </div>
</div> </div>
@ -104,41 +168,57 @@
<div class="list-wrapper itemC" v-else> <div class="list-wrapper itemC" v-else>
<div class="item" :class="conStyle ? '' : 'itemOn'"> <div class="item" :class="conStyle ? '' : 'itemOn'">
<div class="img-box"> <div class="img-box">
<div class="empty-box"><span class="iconfont-diy icontupian"></span></div> <div class="empty-box">
<span class="iconfont-diy icontupian"></span>
</div>
</div> </div>
<div class="info"> <div class="info">
<div class="hd"> <div class="hd">
<div class="title line2" v-if="titleShow">商品名称</div> <div class="title line2" v-if="titleShow">商品名称</div>
</div> </div>
<div class="price" :style="{ color: fontColor }"> <div class="price" :style="{ color: fontColor }">
<div class="num" v-if="priceShow"> <div class="num" v-if="priceShow">¥<span>66.66</span></div>
¥<span>66.66</span>
</div>
<!-- <div class="old-price" v-if="opriceShow">¥99.99</div> --> <!-- <div class="old-price" v-if="opriceShow">¥99.99</div> -->
</div> </div>
<div class="text"> <div class="text">
<!-- <div class="label" :style="{background:labelColor}">官方旗舰店</div> --> <!-- <div class="label" :style="{background:labelColor}">官方旗舰店</div> -->
<div class="coupon" :style="'border:1px solid '+labelColor+';color:'+labelColor" v-if="couponShow">领券</div> <div
class="coupon"
:style="
'border:1px solid ' + labelColor + ';color:' + labelColor
"
v-if="couponShow"
>
领券
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="item" :class="conStyle ? '' : 'itemOn'"> <div class="item" :class="conStyle ? '' : 'itemOn'">
<div class="img-box"> <div class="img-box">
<div class="empty-box"><span class="iconfont-diy icontupian"></span></div> <div class="empty-box">
<span class="iconfont-diy icontupian"></span>
</div>
</div> </div>
<div class="info"> <div class="info">
<div class="hd"> <div class="hd">
<div class="title line2" v-if="titleShow">商品名称</div> <div class="title line2" v-if="titleShow">商品名称</div>
</div> </div>
<div class="price" :style="{ color: fontColor }"> <div class="price" :style="{ color: fontColor }">
<div class="num" v-if="priceShow"> <div class="num" v-if="priceShow"><span>66.66</span></div>
<span>66.66</span>
</div>
<!-- <div class="old-price" v-if="opriceShow">¥99.99</div> --> <!-- <div class="old-price" v-if="opriceShow">¥99.99</div> -->
</div> </div>
<div class="text"> <div class="text">
<!-- <div class="label" :style="{background:labelColor}">官方旗舰店</div> --> <!-- <div class="label" :style="{background:labelColor}">官方旗舰店</div> -->
<div class="coupon" :style="'border:1px solid '+labelColor+';color:'+labelColor" v-if="couponShow">领券</div> <div
class="coupon"
:style="
'border:1px solid ' + labelColor + ';color:' + labelColor
"
v-if="couponShow"
>
领券
</div>
</div> </div>
</div> </div>
</div> </div>
@ -147,14 +227,23 @@
<!-- 三列 --> <!-- 三列 -->
<template v-if="itemStyle == 2"> <template v-if="itemStyle == 2">
<div class="list-wrapper itemB" v-if="list.length > 0"> <div class="list-wrapper itemB" v-if="list.length > 0">
<div class="item" :class="conStyle?'':'itemOn'" v-for="(item,index) in list" :key="index"> <div
class="item"
:class="conStyle ? '' : 'itemOn'"
v-for="(item, index) in list"
:key="index"
>
<div class="img-box"> <div class="img-box">
<img v-if="item.image" :src="item.image" alt=""> <img v-if="item.image" :src="item.image" alt="" />
<div v-else class="empty-box"><span class="iconfont-diy icontupian"></span></div> <div v-else class="empty-box">
<span class="iconfont-diy icontupian"></span>
</div>
</div> </div>
<div class="info"> <div class="info">
<div class="hd"> <div class="hd">
<div class="title line1" v-if="titleShow">{{item.store_name}}</div> <div class="title line1" v-if="titleShow">
{{ item.store_name }}
</div>
</div> </div>
<div class="price" :style="{ color: fontColor }"> <div class="price" :style="{ color: fontColor }">
<div class="num" v-if="priceShow"> <div class="num" v-if="priceShow">
@ -168,48 +257,48 @@
<div class="list-wrapper itemB" v-else> <div class="list-wrapper itemB" v-else>
<div class="item" :class="conStyle ? '' : 'itemOn'"> <div class="item" :class="conStyle ? '' : 'itemOn'">
<div class="img-box"> <div class="img-box">
<div class="empty-box"><span class="iconfont-diy icontupian"></span></div> <div class="empty-box">
<span class="iconfont-diy icontupian"></span>
</div>
</div> </div>
<div class="info"> <div class="info">
<div class="hd"> <div class="hd">
<div class="title line1" v-if="titleShow">商品名称</div> <div class="title line1" v-if="titleShow">商品名称</div>
</div> </div>
<div class="price" :style="{ color: fontColor }"> <div class="price" :style="{ color: fontColor }">
<div class="num" v-if="priceShow"> <div class="num" v-if="priceShow">¥<span>66.66</span></div>
¥<span>66.66</span>
</div>
<!-- <div class="old-price" v-if="opriceShow">¥99.99</div> --> <!-- <div class="old-price" v-if="opriceShow">¥99.99</div> -->
</div> </div>
</div> </div>
</div> </div>
<div class="item" :class="conStyle ? '' : 'itemOn'"> <div class="item" :class="conStyle ? '' : 'itemOn'">
<div class="img-box"> <div class="img-box">
<div class="empty-box"><span class="iconfont-diy icontupian"></span></div> <div class="empty-box">
<span class="iconfont-diy icontupian"></span>
</div>
</div> </div>
<div class="info"> <div class="info">
<div class="hd"> <div class="hd">
<div class="title line1" v-if="titleShow">商品名称</div> <div class="title line1" v-if="titleShow">商品名称</div>
</div> </div>
<div class="price" :style="{ color: fontColor }"> <div class="price" :style="{ color: fontColor }">
<div class="num" v-if="priceShow"> <div class="num" v-if="priceShow">¥<span>66.66</span></div>
¥<span>66.66</span>
</div>
<!-- <div class="old-price" v-if="opriceShow">¥99.99</div> --> <!-- <div class="old-price" v-if="opriceShow">¥99.99</div> -->
</div> </div>
</div> </div>
</div> </div>
<div class="item" :class="conStyle ? '' : 'itemOn'"> <div class="item" :class="conStyle ? '' : 'itemOn'">
<div class="img-box"> <div class="img-box">
<div class="empty-box"><span class="iconfont-diy icontupian"></span></div> <div class="empty-box">
<span class="iconfont-diy icontupian"></span>
</div>
</div> </div>
<div class="info"> <div class="info">
<div class="hd"> <div class="hd">
<div class="title line1" v-if="titleShow">商品名称</div> <div class="title line1" v-if="titleShow">商品名称</div>
</div> </div>
<div class="price" :style="{ color: fontColor }"> <div class="price" :style="{ color: fontColor }">
<div class="num" v-if="priceShow"> <div class="num" v-if="priceShow">¥<span>66.66</span></div>
¥<span>66.66</span>
</div>
<!-- <div class="old-price" v-if="opriceShow">¥99.99</div> --> <!-- <div class="old-price" v-if="opriceShow">¥99.99</div> -->
</div> </div>
</div> </div>
@ -219,13 +308,25 @@
<!-- 大图 --> <!-- 大图 -->
<template v-if="itemStyle == 3"> <template v-if="itemStyle == 3">
<div class="listBig" v-if="list.length > 0"> <div class="listBig" v-if="list.length > 0">
<div class="itemBig" :class="conStyle?'':'itemOn'" v-for="(item,index) in list" :key="index"> <div
class="itemBig"
:class="conStyle ? '' : 'itemOn'"
v-for="(item, index) in list"
:key="index"
>
<div class="img-box"> <div class="img-box">
<img v-if="item.image" :src="item.image" alt=""> <img v-if="item.image" :src="item.image" alt="" />
<div v-else class="empty-box"><span class="iconfont-diy icontupian"></span></div> <div v-else class="empty-box">
<span class="iconfont-diy icontupian"></span>
</div> </div>
<div class="name line2"><span v-if="titleShow">{{item.store_name}}</span></div> </div>
<div class="price" :style="{color:fontColor}"><span v-if="priceShow"><span class="num">{{item.price}}</span></span> <div class="name line2">
<span v-if="titleShow">{{ item.store_name }}</span>
</div>
<div class="price" :style="{ color: fontColor }">
<span v-if="priceShow"
><span class="num">{{ item.price }}</span></span
>
<!-- <span class="old-price" v-if="opriceShow">¥{{item.ot_price}}</span> --> <!-- <span class="old-price" v-if="opriceShow">¥{{item.ot_price}}</span> -->
</div> </div>
</div> </div>
@ -233,19 +334,29 @@
<div class="listBig" v-else> <div class="listBig" v-else>
<div class="itemBig" :class="conStyle ? '' : 'itemOn'"> <div class="itemBig" :class="conStyle ? '' : 'itemOn'">
<div class="img-box"> <div class="img-box">
<div class="empty-box"><span class="iconfont-diy icontupian"></span></div> <div class="empty-box">
<span class="iconfont-diy icontupian"></span>
</div> </div>
<div class="name line2"><span v-if="titleShow">商品名称</span></div> </div>
<div class="price" :style="{color:fontColor}"><span v-if="priceShow">¥<span class="num">66.66</span></span> <div class="name line2">
<span v-if="titleShow">商品名称</span>
</div>
<div class="price" :style="{ color: fontColor }">
<span v-if="priceShow">¥<span class="num">66.66</span></span>
<!-- <span class="old-price" v-if="opriceShow">¥99.99</span> --> <!-- <span class="old-price" v-if="opriceShow">¥99.99</span> -->
</div> </div>
</div> </div>
<div class="itemBig" :class="conStyle ? '' : 'itemOn'"> <div class="itemBig" :class="conStyle ? '' : 'itemOn'">
<div class="img-box"> <div class="img-box">
<div class="empty-box"><span class="iconfont-diy icontupian"></span></div> <div class="empty-box">
<span class="iconfont-diy icontupian"></span>
</div> </div>
<div class="name line2"><span v-if="titleShow">商品名称</span></div> </div>
<div class="price" :style="{color:fontColor}"><span v-if="priceShow">¥<span class="num">66.66</span></span> <div class="name line2">
<span v-if="titleShow">商品名称</span>
</div>
<div class="price" :style="{ color: fontColor }">
<span v-if="priceShow">¥<span class="num">66.66</span></span>
<!-- <span class="old-price" v-if="opriceShow">¥99.99</span> --> <!-- <span class="old-price" v-if="opriceShow">¥99.99</span> -->
</div> </div>
</div> </div>
@ -257,241 +368,246 @@
</template> </template>
<script> <script>
import { mapState } from "vuex";
import { mapState } from 'vuex' import { getProduct } from "@/api/diy";
import { getProduct } from '@/api/diy'
export default { export default {
name: 'home_goods_list', name: "home_goods_list",
cname: '商品列表', cname: "商品列表",
configName: 'c_home_goods_list', configName: "c_home_goods_list",
icon: 'iconshangpinliebiao2', icon: "iconshangpinliebiao2",
type: 0, // 0 1 2 type: 0, // 0 1 2
defaultName: 'goodList', // defaultName: "goodList", //
props: { props: {
index: { index: {
type: null type: null,
}, },
num: { num: {
type: null type: null,
} },
}, },
computed: { computed: {
...mapState('mobildConfig', ['defaultArray']) ...mapState("mobildConfig", ["defaultArray"]),
}, },
watch: { watch: {
pageData: { pageData: {
handler(nVal, oVal) { handler(nVal, oVal) {
this.setConfig(nVal) this.setConfig(nVal);
}, },
deep: true deep: true,
}, },
num: { num: {
handler(nVal, oVal) { handler(nVal, oVal) {
let data = this.$store.state.mobildConfig.defaultArray[nVal] let data = this.$store.state.mobildConfig.defaultArray[nVal];
this.setConfig(data)
},
deep: true
},
'defaultArray': {
handler (nVal, oVal) {
let data = this.$store.state.mobildConfig.defaultArray[this.num]
this.setConfig(data); this.setConfig(data);
}, },
deep: true deep: true,
} },
defaultArray: {
handler(nVal, oVal) {
let data = this.$store.state.mobildConfig.defaultArray[this.num];
this.setConfig(data);
},
deep: true,
},
}, },
data() { data() {
return { return {
// //
defaultConfig: { defaultConfig: {
name: 'goodList', name: "goodList",
timestamp: this.num, timestamp: this.num,
setUp: { setUp: {
tabVal: '0' tabVal: "0",
}, },
tabConfig: { tabConfig: {
title: '选择模板', title: "选择模板",
tabVal: 0, tabVal: 0,
type: 1, type: 1,
tabList: [ tabList: [
{ {
name: '自动选择', name: "自动选择",
icon: 'iconzidongxuanze' icon: "iconzidongxuanze",
}, },
{ {
name: '手动选择', name: "手动选择",
icon: 'iconshoudongxuanze' icon: "iconshoudongxuanze",
} },
] ],
}, },
titleShow: { titleShow: {
title: '是否显示名称', title: "是否显示名称",
val: true val: true,
}, },
// opriceShow: { // opriceShow: {
// title: '', // title: '',
// val: true // val: true
// }, // },
priceShow: { priceShow: {
title: '是否显示价格', title: "是否显示价格",
val: true val: true,
}, },
couponShow: { couponShow: {
title: '是否显示优惠券', title: "是否显示优惠券",
val: true val: true,
}, },
grabShow: { grabShow: {
title: '是否显示抢', title: "是否显示抢",
val: false val: false,
}, },
selectConfig: { selectConfig: {
title: '商品分类', title: "商品分类",
activeValue: [], activeValue: [],
list: [ list: [
{ {
value: '', value: "",
label: '' label: "",
}, },
{ {
value: '', value: "",
label: '' label: "",
} },
] ],
}, },
goodsSort: { goodsSort: {
title: '商品排序', title: "商品排序",
name: 'goodsSort', name: "goodsSort",
type: 0, type: 0,
list: [ list: [
{ {
val: '综合', val: "综合",
icon: 'iconComm_whole' icon: "iconComm_whole",
}, },
{ {
val: '销量', val: "销量",
icon: 'iconComm_number' icon: "iconComm_number",
}, },
{ {
val: '价格', val: "价格",
icon: 'iconComm_Price' icon: "iconComm_Price",
} },
] ],
}, },
numConfig: { numConfig: {
val: 6 val: 6,
}, },
themeColor: { themeColor: {
title: '背景颜色', title: "背景颜色",
name: 'themeColor', name: "themeColor",
default: [{ default: [
item: '#fff' {
}], item: "#fff",
},
],
color: [ color: [
{ {
item: '#fff' item: "#fff",
} },
] ],
}, },
fontColor: { fontColor: {
title: '价格颜色', title: "价格颜色",
name: 'fontColor', name: "fontColor",
default: [{ default: [
item: '#e93323' {
}], item: "#e93323",
},
],
color: [ color: [
{ {
item: '#e93323' item: "#e93323",
} },
] ],
}, },
labelColor: { labelColor: {
title: '活动标签', title: "活动标签",
name: 'labelColor', name: "labelColor",
default: [{ default: [
item: '#e93323' {
}], item: "#e93323",
},
],
color: [ color: [
{ {
item: '#e93323' item: "#e93323",
} },
] ],
}, },
itemStyle: { itemStyle: {
title: '显示类型', title: "显示类型",
name: 'itemSstyle', name: "itemSstyle",
type: 0, type: 0,
list: [ list: [
{ {
val: '单列', val: "单列",
icon: 'iconzuoyoutuwen' icon: "iconzuoyoutuwen",
}, },
{ {
val: '两列', val: "两列",
icon: 'iconlianglie' icon: "iconlianglie",
}, },
{ {
val: '三列', val: "三列",
icon: 'iconsanlie' icon: "iconsanlie",
}, },
{ {
val: '大图', val: "大图",
icon: 'icondanlie' icon: "icondanlie",
} },
] ],
}, },
bgStyle: { bgStyle: {
title: '背景样式', title: "背景样式",
name: 'bgStyle', name: "bgStyle",
type: 0, type: 0,
list: [ list: [
{ {
val: '直角', val: "直角",
icon: 'iconPic_square' icon: "iconPic_square",
}, },
{ {
val: '圆角', val: "圆角",
icon: 'iconPic_fillet' icon: "iconPic_fillet",
} },
] ],
}, },
conStyle: { conStyle: {
title: '内容样式', title: "内容样式",
name: 'conStyle', name: "conStyle",
type: 1, type: 1,
list: [ list: [
{ {
val: '直角', val: "直角",
icon: 'iconPic_square' icon: "iconPic_square",
}, },
{ {
val: '圆角', val: "圆角",
icon: 'iconPic_fillet' icon: "iconPic_fillet",
} },
] ],
}, },
mbConfig: { mbConfig: {
title: '页面间距', title: "页面间距",
val: 0, val: 0,
min: 0 min: 0,
}, },
productList: { productList: {
title:'商品列表', title: "商品列表",
list:[] list: [],
}, },
goodsList: { goodsList: {
max: 20, max: 20,
list:[] list: [],
} },
}, },
navlist: [], navlist: [],
imgStyle: '', imgStyle: "",
txtColor: '', txtColor: "",
slider: '', slider: "",
tabCur: 0, tabCur: 0,
list: [], list: [],
activeColor: '', activeColor: "",
fontColor: '', fontColor: "",
labelColor:'', labelColor: "",
pageData: {}, pageData: {},
itemStyle: 0, itemStyle: 0,
titleShow: true, titleShow: true,
@ -500,18 +616,18 @@ export default {
grabShow: true, grabShow: true,
couponShow: true, couponShow: true,
bgStyle: 0, bgStyle: 0,
conStyle:1 conStyle: 1,
} };
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.pageData = this.$store.state.mobildConfig.defaultArray[this.num] this.pageData = this.$store.state.mobildConfig.defaultArray[this.num];
this.getProductList(this.pageData) this.getProductList(this.pageData);
}) });
}, },
methods: { methods: {
setConfig(data) { setConfig(data) {
if(!data) return if (!data) return;
if (data.mbConfig) { if (data.mbConfig) {
this.itemStyle = data.itemStyle.type || 0; this.itemStyle = data.itemStyle.type || 0;
this.activeColor = data.themeColor.color[0].item; this.activeColor = data.themeColor.color[0].item;
@ -521,7 +637,7 @@ export default {
this.titleShow = data.titleShow.val; this.titleShow = data.titleShow.val;
// this.opriceShow = data.opriceShow.val; // this.opriceShow = data.opriceShow.val;
this.priceShow = data.priceShow.val; this.priceShow = data.priceShow.val;
this.grabShow = data.grabShow.val; this.grabShow = data.grabShow?.val;
this.couponShow = data.couponShow.val; this.couponShow = data.couponShow.val;
this.bgStyle = data.bgStyle.type; this.bgStyle = data.bgStyle.type;
this.conStyle = data.conStyle.type; this.conStyle = data.conStyle.type;
@ -531,12 +647,11 @@ export default {
} else { } else {
this.list = data.productList.list; this.list = data.productList.list;
} }
} }
}, },
/**获取之前选择的商品 */ /**获取之前选择的商品 */
getProductList(data) { getProductList(data) {
if(!data)return if (!data) return;
// if (!data.name && data == 1) { // if (!data.name && data == 1) {
// this.pageData.goodsList.list = [] // this.pageData.goodsList.list = []
// return // return
@ -545,35 +660,42 @@ export default {
// this.pageData.goodsList.list = [] // this.pageData.goodsList.list = []
// return // return
// } // }
let activeValue = this.pageData.selectConfig.activeValue let activeValue = this.pageData.selectConfig.activeValue;
let parmas = {} let parmas = {};
if(data.tabConfig.tabVal){ // if (data.tabConfig.tabVal) {
parmas = { product_ids:data.goodsList.ids.toString() } //
parmas = { product_ids: data.goodsList.ids.toString() };
} else { } else {
parmas = { parmas = {
cate_pid: activeValue, cate_pid: activeValue,
page: 1, page: 1,
limit: this.pageData.numConfig.val, limit: this.pageData.numConfig.val,
order: this.pageData.goodsSort.type == 2 ? 'price_asc' : this.pageData.goodsSort.type == 1 ? 'sales' : '', order:
this.pageData.goodsSort.type == 2
? "price_asc"
: this.pageData.goodsSort.type == 1
? "sales"
: "",
};
} }
} getProduct(parmas).then((res) => {
getProduct(parmas).then(res => { this.list = res.data.list;
this.list = res.data.list
if (data.tabConfig.tabVal) { if (data.tabConfig.tabVal) {
this.pageData.goodsList.list = res.data.list; this.pageData.goodsList.list = res.data.list;
} else { } else {
this.pageData.productList.list = res.data.list; this.pageData.productList.list = res.data.list;
} }
this.setConfig(this.pageData) this.setConfig(this.pageData);
}) });
} },
} },
} };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.itemOn { .itemOn {
border-radius: 0 !important; border-radius: 0 !important;
img,.empty-box{ img,
.empty-box {
border-radius: 0 !important; border-radius: 0 !important;
} }
.img-box { .img-box {
@ -692,14 +814,17 @@ export default {
font-size: 12px; font-size: 12px;
&.active { &.active {
.title { .title {
color: #FF4444; color: #ff4444;
} }
.label { .label {
color: #fff; color: #fff;
background:linear-gradient(270deg,rgba(255,84,0,1) 0%,rgba(255,0,0,1) 100%); background: linear-gradient(
270deg,
rgba(255, 84, 0, 1) 0%,
rgba(255, 0, 0, 1) 100%
);
} }
} }
} }
} }
} }
@ -716,7 +841,8 @@ export default {
position: relative; position: relative;
width: 100%; width: 100%;
height: 173px; height: 173px;
img,.box{ img,
.box {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 10px; border-radius: 10px;
@ -728,7 +854,7 @@ export default {
} }
.box { .box {
background: #D8D8D8; background: #d8d8d8;
} }
} }
.info { .info {
@ -750,7 +876,8 @@ export default {
text-align: center; text-align: center;
line-height: 15px; line-height: 15px;
} }
.coupon,.ship{ .coupon,
.ship {
padding: 0 5px; padding: 0 5px;
line-height: 13px; line-height: 13px;
border-radius: 2px; border-radius: 2px;
@ -758,8 +885,8 @@ export default {
margin-left: 3px; margin-left: 3px;
} }
.ship { .ship {
color: #FF9000; color: #ff9000;
border: 1px solid #FF9000; border: 1px solid #ff9000;
} }
.old-price { .old-price {
color: #aaa; color: #aaa;
@ -799,7 +926,9 @@ export default {
position: relative; position: relative;
width: 110px; width: 110px;
height: 110px; height: 110px;
img,.box,.empty-box{ img,
.box,
.empty-box {
border-radius: 10px; border-radius: 10px;
} }
} }
@ -838,7 +967,9 @@ export default {
position: relative; position: relative;
width: 100%; width: 100%;
height: 110px; height: 110px;
img,.box,.empty-box{ img,
.box,
.empty-box {
border-radius: 10px; border-radius: 10px;
} }
} }
@ -852,7 +983,9 @@ export default {
&.itemC { &.itemC {
.item { .item {
background-color: #fff; background-color: #fff;
img,.box,.empty-box{ img,
.box,
.empty-box {
border-radius: 10px; border-radius: 10px;
} }
.price { .price {

View File

@ -38,7 +38,7 @@
</el-select> </el-select>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="提现方式:" prop="extract_type"> <el-form-item label="方式:" prop="extract_type">
<el-select <el-select
v-model="tableFrom.extract_type" v-model="tableFrom.extract_type"
clearable clearable
@ -106,7 +106,7 @@
<el-table-column prop="extract_price" label="提现金额" min-width="90" /> <el-table-column prop="extract_price" label="提现金额" min-width="90" />
<el-table-column prop="tx_price" label="到账金额" min-width="90" /> <el-table-column prop="tx_price" label="到账金额" min-width="90" />
<el-table-column prop="ratio_price" label="手续费" min-width="90" /> <el-table-column prop="ratio_price" label="手续费" min-width="90" />
<el-table-column label="提现方式" min-width="100"> <el-table-column label="方式" min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.extract_type | extractTypeFilter }}</span> <span>{{ scope.row.extract_type | extractTypeFilter }}</span>
</template> </template>
@ -250,7 +250,7 @@
</div> </div>
</div> </div>
<div class="list-count"> <div class="list-count">
<div class="title">提现方式</div> <div class="title">方式</div>
<div class="acea-row"> <div class="acea-row">
<div class="list"> <div class="list">
<label class="name">审核状态</label <label class="name">审核状态</label

View File

@ -13,58 +13,96 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="24"> <el-col :span="24">
<el-form-item label="积分:" prop="integral_status"> <el-form-item label="积分:" prop="integral_status">
<el-radio-group <el-radio-group v-model="formValidate.integral_status">
v-model="formValidate.integral_status">
<el-radio :label="0" class="radio">关闭</el-radio> <el-radio :label="0" class="radio">关闭</el-radio>
<el-radio :label="1">开启</el-radio> <el-radio :label="1">开启</el-radio>
</el-radio-group> </el-radio-group>
<span class="label_tip">指平台积分功能的开启或关闭开启积分功能正常启用关闭积分功能不可使用且前端不展示</span> <span class="label_tip"
>指平台积分功能的开启或关闭开启积分功能正常启用关闭积分功能不可使用且前端不展示</span
>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" v-if="formValidate.integral_status > 0"> <el-col :span="24" v-if="formValidate.integral_status > 0">
<el-form-item label="积分赠送:" prop="integral_give_status"> <el-form-item label="积分赠送:" prop="integral_give_status">
<el-radio-group <el-radio-group v-model="formValidate.integral_give_status">
v-model="formValidate.integral_give_status">
<el-radio :label="0" class="radio">关闭</el-radio> <el-radio :label="0" class="radio">关闭</el-radio>
<el-radio :label="1">开启</el-radio> <el-radio :label="1">开启</el-radio>
</el-radio-group> </el-radio-group>
<!-- <span class="label_tip">指平台积分功能的开启或关闭开启积分功能正常启用关闭积分功能不可使用且前端不展示</span> --> <!-- <span class="label_tip">指平台积分功能的开启或关闭开启积分功能正常启用关闭积分功能不可使用且前端不展示</span> -->
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col v-if="formValidate.integral_status>0"> <el-col v-if="formValidate.integral_status > 0">
<el-form-item label="积分抵用金额:" prop="integral_money"> <el-form-item label="积分抵用金额:" prop="integral_money">
<el-input-number :min="0" v-model="formValidate.integral_money" size="small" placeholder="积分抵用金额" /> <el-input-number
:min="0"
v-model="formValidate.integral_money"
size="small"
placeholder="积分抵用金额"
/>
<span class="label_tip">指1积分抵用多少金额单位 </span> <span class="label_tip">指1积分抵用多少金额单位 </span>
</el-form-item> </el-form-item>
</el-col> --> </el-col>
<el-col v-if="formValidate.integral_status > 0"> <el-col v-if="formValidate.integral_status > 0">
<el-form-item label="订单返还积分比例(%)" prop="integral_price_return_rate"> <el-form-item
<el-input-number :min="0" v-model="formValidate.integral_price_return_rate" size="small" placeholder="订单返还积分比例(%)" /> label="订单返还积分比例(%)"
prop="integral_price_return_rate"
>
<el-input-number
:min="0"
v-model="formValidate.integral_price_return_rate"
size="small"
placeholder="订单返还积分比例(%)"
/>
<span class="label_tip">订单支付价格返还比例%</span> <span class="label_tip">订单支付价格返还比例%</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-if="formValidate.integral_status > 0"> <el-col v-if="formValidate.integral_status > 0">
<el-form-item label="积分兑现倍数:" prop="integral_money_time"> <el-form-item label="积分兑现倍数:" prop="integral_money_time">
<el-input-number :min="0" v-model="formValidate.integral_money_time" size="small" placeholder="积分兑现倍数" /> <el-input-number
:min="0"
v-model="formValidate.integral_money_time"
size="small"
placeholder="积分兑现倍数"
/>
<span class="label_tip">一元兑积分数量</span> <span class="label_tip">一元兑积分数量</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-if="formValidate.integral_status > 0"> <el-col v-if="formValidate.integral_status > 0">
<el-form-item label="积分签到返还天数:" prop="integral_return_day"> <el-form-item label="积分签到返还天数:" prop="integral_return_day">
<el-input-number :min="0" v-model="formValidate.integral_return_day" size="small" placeholder="积分签到返还天数" /> <el-input-number
:min="0"
v-model="formValidate.integral_return_day"
size="small"
placeholder="积分签到返还天数"
/>
<span class="label_tip">积分连续签到返还结束天数</span> <span class="label_tip">积分连续签到返还结束天数</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-if="formValidate.integral_status > 0"> <el-col v-if="formValidate.integral_status > 0">
<el-form-item label="每日签到封顶积分:" prop="integral_sign_max"> <el-form-item label="每日签到封顶积分:" prop="integral_sign_max">
<el-input-number :min="0" v-model="formValidate.integral_sign_max" size="small" placeholder="每日签到封顶积分" /> <el-input-number
:min="0"
v-model="formValidate.integral_sign_max"
size="small"
placeholder="每日签到封顶积分"
/>
<span class="label_tip">每个用户日签到获得积分上限</span> <span class="label_tip">每个用户日签到获得积分上限</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-if="formValidate.integral_status > 0"> <el-col v-if="formValidate.integral_status > 0">
<el-form-item label="每日签到积分递减(%)" prop="integral_sign_dec_rate"> <el-form-item
<el-input-number :min="0" v-model="formValidate.integral_sign_dec_rate" size="small" placeholder="每日签到积分递减(%)" /> label="每日签到积分递减(%)"
<span class="label_tip">每个用户日签到获得每单返还积分逐日递减%</span> prop="integral_sign_dec_rate"
>
<el-input-number
:min="0"
v-model="formValidate.integral_sign_dec_rate"
size="small"
placeholder="每日签到积分递减(%)"
/>
<span class="label_tip"
>每个用户日签到获得每单返还积分逐日递减%</span
>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col v-if="formValidate.integral_status>0"> <!-- <el-col v-if="formValidate.integral_status>0">
@ -104,9 +142,24 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-form-item style="margin-top:30px;"> <el-form-item style="margin-top: 30px">
<el-button v-if="formValidate.integral_status>0" :loading="loading" type="primary" class="submission" size="small" @click="preview">预览</el-button> <el-button
<el-button :loading="loading" type="primary" class="submission" size="small" @click="handleSubmit('formValidate')">提交</el-button> v-if="formValidate.integral_status > 0"
:loading="loading"
type="primary"
class="submission"
size="small"
@click="preview"
>预览</el-button
>
<el-button
:loading="loading"
type="primary"
class="submission"
size="small"
@click="handleSubmit('formValidate')"
>提交</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-card> </el-card>
@ -131,14 +184,13 @@
</template> </template>
<script> <script>
import ueditorFrom from "@/components/ueditorFrom"; import ueditorFrom from "@/components/ueditorFrom";
import VueUeditorWrap from "vue-ueditor-wrap"; import VueUeditorWrap from "vue-ueditor-wrap";
import { mapState } from 'vuex' import { mapState } from "vuex";
import { getIntegralConfig, updateIntegralConfig } from "@/api/marketing"; import { getIntegralConfig, updateIntegralConfig } from "@/api/marketing";
import { roterPre } from "@/settings"; import { roterPre } from "@/settings";
import SettingMer from '@/libs/settingMer'; import SettingMer from "@/libs/settingMer";
import { getToken } from '@/utils/auth' import { getToken } from "@/utils/auth";
const defaultObj = { const defaultObj = {
integral_status: 1, integral_status: 1,
@ -153,26 +205,27 @@ const defaultObj = {
integral_money_time: 0, integral_money_time: 0,
integral_return_day: 0, integral_return_day: 0,
integral_sign_max: 0, integral_sign_max: 0,
integral_sign_dec_rate:0 integral_sign_dec_rate: 0,
}; };
export default { export default {
name: "ProductProductAdd", name: "ProductProductAdd",
components: { ueditorFrom, VueUeditorWrap }, components: { ueditorFrom, VueUeditorWrap },
data() { data() {
const url = SettingMer.https + '/upload/image/0/file?ueditor=1&token=' + getToken() const url =
SettingMer.https + "/upload/image/0/file?ueditor=1&token=" + getToken();
return { return {
myConfig: { myConfig: {
autoHeightEnabled: false, // autoHeightEnabled: false, //
initialFrameHeight: 500, // initialFrameHeight: 500, //
initialFrameWidth: "100%", // initialFrameWidth: "100%", //
UEDITOR_HOME_URL: '/UEditor/', UEDITOR_HOME_URL: "/UEditor/",
'serverUrl': url, serverUrl: url,
'imageUrl': url, imageUrl: url,
'imageFieldName': 'file', imageFieldName: "file",
imageUrlPrefix: '', imageUrlPrefix: "",
'imageActionName': 'upfile', imageActionName: "upfile",
'imageMaxSize': 2048000, imageMaxSize: 2048000,
'imageAllowFiles': ['.png', '.jpg', '.jpeg', '.gif', '.bmp'] imageAllowFiles: [".png", ".jpg", ".jpeg", ".gif", ".bmp"],
}, },
roterPre: roterPre, roterPre: roterPre,
fullscreenLoading: false, fullscreenLoading: false,
@ -181,36 +234,45 @@ export default {
modals: false, modals: false,
ruleValidate: { ruleValidate: {
integral_status: [ integral_status: [
{ required: true, message: "请选择是否开启积分功能", trigger: "blur" } {
required: true,
message: "请选择是否开启积分功能",
trigger: "blur",
},
], ],
integral_money: [ integral_money: [
{ required: true, message: "请输入积分抵用金额", trigger: "blur" } { required: true, message: "请输入积分抵用金额", trigger: "blur" },
], ],
integral_order_rate: [ integral_order_rate: [
{ required: true, message: "请输入下单赠送积分比例", trigger: "blur" } {
required: true,
message: "请输入下单赠送积分比例",
trigger: "blur",
},
], ],
integral_freeze: [ integral_freeze: [
{ required: true, message: "请输入下单赠送积分冻结期", trigger: "blur" } {
required: true,
message: "请输入下单赠送积分冻结期",
trigger: "blur",
},
], ],
integral_clear_time: [ integral_clear_time: [
{ required: true, message: "请输入积分清除时间", trigger: "blur" } { required: true, message: "请输入积分清除时间", trigger: "blur" },
], ],
integral_user_give: [ integral_user_give: [
{ required: true, message: "请输入邀请好友赠送积分数", trigger: "blur" } {
] required: true,
message: "请输入邀请好友赠送积分数",
trigger: "blur",
},
],
}, },
}; };
}, },
computed: { computed: {},
watch: {},
}, created() {},
watch: {
},
created() {
},
mounted() { mounted() {
this.getInfo(); this.getInfo();
}, },
@ -219,11 +281,11 @@ export default {
getInfo() { getInfo() {
this.fullscreenLoading = true; this.fullscreenLoading = true;
getIntegralConfig() getIntegralConfig()
.then(async res => { .then(async (res) => {
this.formValidate = res.data this.formValidate = res.data;
this.fullscreenLoading = false; this.fullscreenLoading = false;
}) })
.catch(res => { .catch((res) => {
this.fullscreenLoading = false; this.fullscreenLoading = false;
this.$message.error(res.message); this.$message.error(res.message);
}); });
@ -234,17 +296,17 @@ export default {
// //
handleSubmit(name) { handleSubmit(name) {
this.$refs[name].validate(valid => { this.$refs[name].validate((valid) => {
if (valid) { if (valid) {
this.fullscreenLoading = true; this.fullscreenLoading = true;
this.loading = true; this.loading = true;
updateIntegralConfig(this.formValidate) updateIntegralConfig(this.formValidate)
.then(async res => { .then(async (res) => {
this.fullscreenLoading = false; this.fullscreenLoading = false;
this.$message.success(res.message); this.$message.success(res.message);
this.loading = false; this.loading = false;
}) })
.catch(res => { .catch((res) => {
this.fullscreenLoading = false; this.fullscreenLoading = false;
this.loading = false; this.loading = false;
this.$message.error(res.message); this.$message.error(res.message);
@ -269,7 +331,7 @@ export default {
editor: editor, editor: editor,
name: uiName, name: uiName,
title: "上传图片", title: "上传图片",
cssRules: "width:1200px;height:500px;padding:20px;" cssRules: "width:1200px;height:500px;padding:20px;",
}); });
this.dialog = dialog; this.dialog = dialog;
let btn = new window.UE.ui.Button({ let btn = new window.UE.ui.Button({
@ -280,7 +342,7 @@ export default {
// dialog // dialog
dialog.render(); dialog.render();
dialog.open(); dialog.open();
} },
}); });
return btn; return btn;
}, },
@ -294,7 +356,7 @@ export default {
editor: editor, editor: editor,
name: uiName, name: uiName,
title: "上传视频", title: "上传视频",
cssRules: "width:600px;height:420px;padding:10px 20px 20px;" cssRules: "width:600px;height:420px;padding:10px 20px 20px;",
}); });
this.dialog = dialog; this.dialog = dialog;
let btn = new window.UE.ui.Button({ let btn = new window.UE.ui.Button({
@ -305,14 +367,14 @@ export default {
// dialog // dialog
dialog.render(); dialog.render();
dialog.open(); dialog.open();
} },
}); });
return btn; return btn;
}, },
38 38
); );
} },
} },
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@ -327,7 +389,8 @@ export default {
.selWidthd { .selWidthd {
width: 300px; width: 300px;
} }
.dialog-scustom,.addDia{ .dialog-scustom,
.addDia {
min-width: 400px; min-width: 400px;
height: 900px; height: 900px;
.el-dialog { .el-dialog {
@ -344,7 +407,7 @@ export default {
.agreement { .agreement {
width: 350px; width: 350px;
margin: 0 auto; margin: 0 auto;
box-shadow: 1px 5px 5px 2px rgba(0,0,0,.2); box-shadow: 1px 5px 5px 2px rgba(0, 0, 0, 0.2);
padding: 26px; padding: 26px;
border-radius: 15px; border-radius: 15px;
.content { .content {
@ -418,5 +481,4 @@ export default {
left: 46px; left: 46px;
top: -4px; top: -4px;
} }
</style> </style>

View File

@ -325,6 +325,9 @@
@click="onEdit(scope.row.product_id)" @click="onEdit(scope.row.product_id)"
>编辑</el-button >编辑</el-button
> >
<el-button type="text" size="small" @click="onEditDate(scope.row)"
>编辑时间</el-button
>
<el-button type="text" size="small" @click="onAuditFree(scope.row)" <el-button type="text" size="small" @click="onAuditFree(scope.row)"
>价格编辑</el-button >价格编辑</el-button
> >
@ -692,6 +695,39 @@
> >
</span> </span>
</el-dialog> </el-dialog>
<!--编辑时间-->
<el-dialog
v-if="dialogDate"
title="编辑时间"
:visible.sync="dialogDate"
width="470px"
:before-close="handleClose"
>
<el-form
ref="dateForm"
:model="dateForm"
size="small"
@submit.native.prevent
>
<el-form-item prop="date">
<el-date-picker
v-model="dateForm.date"
type="date"
placeholder="选择日期"
>
</el-date-picker>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogDate = false">取消</el-button>
<el-button
type="primary"
size="small"
@click="submitDateForm('dateForm')"
>提交</el-button
>
</span>
</el-dialog>
<edit-attr ref="editAttr" /> <edit-attr ref="editAttr" />
</div> </div>
</template> </template>
@ -708,6 +744,7 @@ import {
seckillProductOffApi, seckillProductOffApi,
getProductLabelApi, getProductLabelApi,
updatetSeckillLabel, updatetSeckillLabel,
updatetSeckillUpdate,
exportSeckillApi, exportSeckillApi,
} from "@/api/product"; } from "@/api/product";
import { seckillDetailApi } from "@/api/marketing"; import { seckillDetailApi } from "@/api/marketing";
@ -781,6 +818,9 @@ export default {
timeVal: [], timeVal: [],
dialogVisible: false, dialogVisible: false,
detailDialog: false, detailDialog: false,
dateForm: {
date: "",
},
checkboxGroup: [], checkboxGroup: [],
formValidate: { formValidate: {
is_hot: 0, is_hot: 0,
@ -851,6 +891,8 @@ export default {
previewKey: "", previewKey: "",
labelList: [], labelList: [],
dialogLabel: false, dialogLabel: false,
dialogDate: false,
seckill_active_id: "",
labelForm: {}, labelForm: {},
}; };
}, },
@ -988,6 +1030,14 @@ export default {
sys_labels: row.sys_labels, sys_labels: row.sys_labels,
}; };
}, },
//
onEditDate(row) {
this.dialogDate = true;
this.seckill_active_id = row.seckillActive.seckill_active_id;
this.dateForm = {
date: row.seckillActive.start_day,
};
},
submitForm(name) { submitForm(name) {
this.$refs[name].validate((valid) => { this.$refs[name].validate((valid) => {
if (valid) { if (valid) {
@ -1003,6 +1053,21 @@ export default {
} }
}); });
}, },
submitDateForm(name) {
this.$refs[name].validate((valid) => {
if (valid) {
updatetSeckillUpdate(this.seckill_active_id, this.dateForm).then(
({ message }) => {
this.$message.success(message);
this.getList("");
this.dialogDate = false;
}
);
} else {
return;
}
});
},
// //
handleSubmit(name) { handleSubmit(name) {
this.$refs[name].validate((valid) => { this.$refs[name].validate((valid) => {
@ -1040,8 +1105,10 @@ export default {
: (this.formValidate.is_hot = 0 && this.checkboxGroup.remove("is_hot")); : (this.formValidate.is_hot = 0 && this.checkboxGroup.remove("is_hot"));
}, },
handleClose() { handleClose() {
this.$refs["dateForm"].resetFields();
this.dialogVisible = false; this.dialogVisible = false;
this.dialogLabel = false; this.dialogLabel = false;
this.dialogDate = false;
}, },
watCh(val) { watCh(val) {
const tmp = {}; const tmp = {};