优惠移动端楼层装修
parent
744567e8de
commit
c4168c9a2b
|
@ -101,7 +101,7 @@
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
class="item-desc-pintuan"
|
class="item-desc-pintuan"
|
||||||
v-if="promotionMap['FULL_DISCOUNT'].fullRate"
|
v-if="promotionMap['FULL_DISCOUNT'].fullRate && promotionMap['FULL_DISCOUNT'].fullRateFlag"
|
||||||
>满{{ promotionMap["FULL_DISCOUNT"].fullMoney }}元,立享{{
|
>满{{ promotionMap["FULL_DISCOUNT"].fullMoney }}元,立享{{
|
||||||
promotionMap["FULL_DISCOUNT"].fullRate
|
promotionMap["FULL_DISCOUNT"].fullRate
|
||||||
}}折</span
|
}}折</span
|
||||||
|
|
|
@ -287,7 +287,7 @@ export default {
|
||||||
},
|
},
|
||||||
filterOrderStatus (status) { // 获取订单状态中文
|
filterOrderStatus (status) { // 获取订单状态中文
|
||||||
const ob = this.orderStatusList.filter(e => { return e.status === status });
|
const ob = this.orderStatusList.filter(e => { return e.status === status });
|
||||||
return ob[0].name
|
return ob && ob[0] ? ob[0].name : status
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -41,7 +41,7 @@ export const getPromotionGoods = (promotionId, params) => {
|
||||||
|
|
||||||
// 获取当前进行中的促销活动
|
// 获取当前进行中的促销活动
|
||||||
export const getAllPromotion = params => {
|
export const getAllPromotion = params => {
|
||||||
return getRequest("/promotion/current", params);
|
return getRequest("/promotion/promotion/current", params);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 获取拼团数据
|
// 获取拼团数据
|
||||||
|
|
|
@ -519,6 +519,24 @@ export const modelData = [
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: "notice",
|
||||||
|
name: "公告",
|
||||||
|
img: "md-image",
|
||||||
|
notAdd: false,
|
||||||
|
notLink: true,
|
||||||
|
notImg: true,
|
||||||
|
options: {
|
||||||
|
list: [
|
||||||
|
{
|
||||||
|
title: [{context: "这是一条公告"}],
|
||||||
|
color: "#666",
|
||||||
|
bk_color: "#FFF",
|
||||||
|
img: 'http://files.sxcfx.cn/upload/20220318/71e5d27aca82aeedf647052e1e4ceaaa.png'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type: "promotions",
|
type: "promotions",
|
||||||
name: "促销活动",
|
name: "促销活动",
|
||||||
|
|
|
@ -148,7 +148,9 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.decorate-notice {}
|
.decorate-notice {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.card {}
|
.card {}
|
||||||
|
|
||||||
|
|
|
@ -274,6 +274,11 @@
|
||||||
class="decorate-notice"
|
class="decorate-notice"
|
||||||
>
|
>
|
||||||
<Input v-model="t.context" style="width: 200px" />
|
<Input v-model="t.context" style="width: 200px" />
|
||||||
|
<Icon
|
||||||
|
@click="removeNotice(tindex)"
|
||||||
|
size="16"
|
||||||
|
type="md-close-circle"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -503,6 +508,11 @@ export default {
|
||||||
this.selectedGoods = item;
|
this.selectedGoods = item;
|
||||||
this.picModelFlag = true;
|
this.picModelFlag = true;
|
||||||
},
|
},
|
||||||
|
removeNotice(index) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.res.options.list[0].title.splice(index, 1);
|
||||||
|
});
|
||||||
|
},
|
||||||
// 关闭
|
// 关闭
|
||||||
closeDecorate(index) {
|
closeDecorate(index) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
|
|
@ -178,7 +178,7 @@ export default {
|
||||||
color1: val.subColor,
|
color1: val.subColor,
|
||||||
bk_color: val.subBkColor,
|
bk_color: val.subBkColor,
|
||||||
data: res.result.commodityList
|
data: res.result.commodityList
|
||||||
? res.result.commodityList
|
? res.result.commodityList.splice(0,2)
|
||||||
: [],
|
: [],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -195,7 +195,7 @@ export default {
|
||||||
if (res.success && !exist) {
|
if (res.success && !exist) {
|
||||||
this.contentData.list[newIndex].options.list.push({
|
this.contentData.list[newIndex].options.list.push({
|
||||||
data: res.result[val.promotionsType]
|
data: res.result[val.promotionsType]
|
||||||
? res.result[val.promotionsType]
|
? res.result[val.promotionsType].splice(0,2)
|
||||||
: [],
|
: [],
|
||||||
type: val.promotionsType,
|
type: val.promotionsType,
|
||||||
title1: val.subName,
|
title1: val.subName,
|
||||||
|
|
|
@ -46,5 +46,4 @@ export default {
|
||||||
tpl_ad_list,
|
tpl_ad_list,
|
||||||
promotions: tpl_promotions,
|
promotions: tpl_promotions,
|
||||||
tpl_activity_list,
|
tpl_activity_list,
|
||||||
tpl_adv
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,38 +1,39 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="layout">
|
<div class="layout">
|
||||||
<div class="menu-list">
|
<div class="menu-list">
|
||||||
<div class="menu-item" v-for="(item,index) in res.list" :key="index">
|
<div class="menu-item" v-for="(item, index) in res.list" :key="index">
|
||||||
<div>
|
<div>
|
||||||
<img class="menu-img" :src="item.img" alt="">
|
<img class="menu-img" :src="item.img" alt="" />
|
||||||
</div>
|
</div>
|
||||||
<div class="menu-title">{{item.title}}</div>
|
<div class="menu-title">{{ item.title }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
props:['res']
|
props: ["res"],
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import "./tpl.scss";
|
@import "./tpl.scss";
|
||||||
.menu-list{
|
.menu-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|
||||||
>.menu-item{
|
> .menu-item {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: 20%;
|
width: 20%;
|
||||||
margin:10px 0;
|
margin: 10px 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.menu-img{
|
.menu-img {
|
||||||
width: 44px;
|
width: 44px;
|
||||||
height: 44px;
|
height: 44px;
|
||||||
}
|
}
|
||||||
.menu-title{
|
.menu-title {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -53,11 +53,19 @@
|
||||||
<span class="describe">消费达到当前金额可以参与优惠</span>
|
<span class="describe">消费达到当前金额可以参与优惠</span>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="优惠方式">
|
<FormItem label="优惠方式">
|
||||||
<RadioGroup type="button" button-style="solid" v-model="form.discountType">
|
<RadioGroup
|
||||||
<Radio :disabled="form.promotionStatus != 'NEW'" label="fullMinusFlag"
|
type="button"
|
||||||
|
button-style="solid"
|
||||||
|
v-model="form.discountType"
|
||||||
|
>
|
||||||
|
<Radio
|
||||||
|
:disabled="form.promotionStatus != 'NEW'"
|
||||||
|
label="fullMinusFlag"
|
||||||
>减现金</Radio
|
>减现金</Radio
|
||||||
>
|
>
|
||||||
<Radio :disabled="form.promotionStatus != 'NEW'" label="fullRateFlag"
|
<Radio
|
||||||
|
:disabled="form.promotionStatus != 'NEW'"
|
||||||
|
label="fullRateFlag"
|
||||||
>打折</Radio
|
>打折</Radio
|
||||||
>
|
>
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
|
@ -102,7 +110,9 @@
|
||||||
v-model="form.couponFlag"
|
v-model="form.couponFlag"
|
||||||
>送优惠券</Checkbox
|
>送优惠券</Checkbox
|
||||||
>
|
>
|
||||||
<Checkbox :disabled="form.promotionStatus != 'NEW'" v-model="form.giftFlag"
|
<Checkbox
|
||||||
|
:disabled="form.promotionStatus != 'NEW'"
|
||||||
|
v-model="form.giftFlag"
|
||||||
>送赠品</Checkbox
|
>送赠品</Checkbox
|
||||||
>
|
>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
|
@ -125,9 +135,12 @@
|
||||||
:loading="couponLoading"
|
:loading="couponLoading"
|
||||||
style="width: 280px"
|
style="width: 280px"
|
||||||
>
|
>
|
||||||
<Option v-for="item in couponList" :value="item.id" :key="item.id">{{
|
<Option
|
||||||
item.couponName
|
v-for="item in couponList"
|
||||||
}}</Option>
|
:value="item.id"
|
||||||
|
:key="item.id"
|
||||||
|
>{{ item.couponName }}</Option
|
||||||
|
>
|
||||||
</Select>
|
</Select>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem v-if="form.giftFlag" label="赠品" prop="giftId">
|
<FormItem v-if="form.giftFlag" label="赠品" prop="giftId">
|
||||||
|
@ -140,9 +153,14 @@
|
||||||
:loading="giftLoading"
|
:loading="giftLoading"
|
||||||
style="width: 280px"
|
style="width: 280px"
|
||||||
>
|
>
|
||||||
<Option v-for="item in giftList" :value="item.id" :key="item.id">{{
|
<Option
|
||||||
item.goodsName
|
v-for="item in giftList"
|
||||||
}}</Option>
|
:value="item.id"
|
||||||
|
:key="item.id"
|
||||||
|
>
|
||||||
|
{{ item.goodsName }}
|
||||||
|
</Option
|
||||||
|
>
|
||||||
</Select>
|
</Select>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem v-if="form.pointFlag" label="赠积分" prop="point">
|
<FormItem v-if="form.pointFlag" label="赠积分" prop="point">
|
||||||
|
@ -155,17 +173,26 @@
|
||||||
/>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="使用范围" prop="scopeType">
|
<FormItem label="使用范围" prop="scopeType">
|
||||||
<RadioGroup type="button" button-style="solid" v-model="form.scopeType">
|
<RadioGroup
|
||||||
|
type="button"
|
||||||
|
button-style="solid"
|
||||||
|
v-model="form.scopeType"
|
||||||
|
>
|
||||||
<Radio :disabled="form.promotionStatus != 'NEW'" label="ALL"
|
<Radio :disabled="form.promotionStatus != 'NEW'" label="ALL"
|
||||||
>全品类</Radio
|
>全品类</Radio
|
||||||
>
|
>
|
||||||
<Radio :disabled="form.promotionStatus != 'NEW'" label="PORTION_GOODS"
|
<Radio
|
||||||
|
:disabled="form.promotionStatus != 'NEW'"
|
||||||
|
label="PORTION_GOODS"
|
||||||
>指定商品</Radio
|
>指定商品</Radio
|
||||||
>
|
>
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
<FormItem style="width: 100%" v-if="form.scopeType == 'PORTION_GOODS'">
|
<FormItem
|
||||||
|
style="width: 100%"
|
||||||
|
v-if="form.scopeType == 'PORTION_GOODS'"
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
style="display: flex; margin-bottom: 10px"
|
style="display: flex; margin-bottom: 10px"
|
||||||
v-if="form.promotionStatus == 'NEW'"
|
v-if="form.promotionStatus == 'NEW'"
|
||||||
|
@ -196,7 +223,7 @@
|
||||||
<template slot-scope="{ index }" slot="action">
|
<template slot-scope="{ index }" slot="action">
|
||||||
<Button
|
<Button
|
||||||
type="error"
|
type="error"
|
||||||
:disabled="form.promotionStatus != 'NEW' && id"
|
:disabled="form.promotionStatus != 'NEW' && !!id"
|
||||||
size="small"
|
size="small"
|
||||||
ghost
|
ghost
|
||||||
@click="delGoods(index)"
|
@click="delGoods(index)"
|
||||||
|
@ -210,7 +237,7 @@
|
||||||
<Button type="text" @click="closeCurrentPage">返回</Button>
|
<Button type="text" @click="closeCurrentPage">返回</Button>
|
||||||
<Button
|
<Button
|
||||||
type="primary"
|
type="primary"
|
||||||
:disabled="form.promotionStatus != 'NEW' && id"
|
:disabled="form.promotionStatus != 'NEW' && !!id"
|
||||||
:loading="submitLoading"
|
:loading="submitLoading"
|
||||||
@click="handleSubmit"
|
@click="handleSubmit"
|
||||||
>提交</Button
|
>提交</Button
|
||||||
|
@ -220,7 +247,10 @@
|
||||||
</div>
|
</div>
|
||||||
</Form>
|
</Form>
|
||||||
</Card>
|
</Card>
|
||||||
<sku-select ref="skuSelect" @selectedGoodsData="selectedGoodsData"></sku-select>
|
<sku-select
|
||||||
|
ref="skuSelect"
|
||||||
|
@selectedGoodsData="selectedGoodsData"
|
||||||
|
></sku-select>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -280,7 +310,10 @@ export default {
|
||||||
promotionName: [{ required: true, message: "活动名称不能为空" }],
|
promotionName: [{ required: true, message: "活动名称不能为空" }],
|
||||||
rangeTime: [{ required: true, message: "请选择活动时间" }],
|
rangeTime: [{ required: true, message: "请选择活动时间" }],
|
||||||
description: [{ required: true, message: "请填写活动描述" }],
|
description: [{ required: true, message: "请填写活动描述" }],
|
||||||
price: [{ required: true, message: "请输入面额" }, { validator: checkPrice }],
|
price: [
|
||||||
|
{ required: true, message: "请输入面额" },
|
||||||
|
{ validator: checkPrice },
|
||||||
|
],
|
||||||
consumptionLimit: [{ required: true, validator: checkWeight }],
|
consumptionLimit: [{ required: true, validator: checkWeight }],
|
||||||
fullMoney: [{ required: true, validator: checkWeight }],
|
fullMoney: [{ required: true, validator: checkWeight }],
|
||||||
fullMinus: [
|
fullMinus: [
|
||||||
|
@ -318,7 +351,10 @@ export default {
|
||||||
key: "price",
|
key: "price",
|
||||||
minWidth: 40,
|
minWidth: 40,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
return h("div", this.$options.filters.unitPrice(params.row.price, "¥"));
|
return h(
|
||||||
|
"div",
|
||||||
|
this.$options.filters.unitPrice(params.row.price, "¥")
|
||||||
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -343,8 +379,8 @@ export default {
|
||||||
if (this.id) {
|
if (this.id) {
|
||||||
this.getDetail();
|
this.getDetail();
|
||||||
}
|
}
|
||||||
this.getCouponList();
|
await this.getCouponList();
|
||||||
this.getGiftList();
|
await this.getGiftList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 关闭当前页面
|
// 关闭当前页面
|
||||||
|
@ -390,14 +426,19 @@ export default {
|
||||||
this.$refs.form.validate((valid) => {
|
this.$refs.form.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const params = JSON.parse(JSON.stringify(this.form));
|
const params = JSON.parse(JSON.stringify(this.form));
|
||||||
const strat = this.$options.filters.unixToDate(this.form.rangeTime[0] / 1000);
|
const strat = this.$options.filters.unixToDate(
|
||||||
const end = this.$options.filters.unixToDate(this.form.rangeTime[1] / 1000);
|
this.form.rangeTime[0] / 1000
|
||||||
|
);
|
||||||
|
const end = this.$options.filters.unixToDate(
|
||||||
|
this.form.rangeTime[1] / 1000
|
||||||
|
);
|
||||||
params.startTime = strat;
|
params.startTime = strat;
|
||||||
params.endTime = end;
|
params.endTime = end;
|
||||||
|
|
||||||
if (
|
if (
|
||||||
params.scopeType == "PORTION_GOODS" &&
|
params.scopeType == "PORTION_GOODS" &&
|
||||||
(!params.promotionGoodsList || params.promotionGoodsList.length == 0)
|
(!params.promotionGoodsList ||
|
||||||
|
params.promotionGoodsList.length == 0)
|
||||||
) {
|
) {
|
||||||
this.$Modal.warning({ title: "提示", content: "请选择指定商品" });
|
this.$Modal.warning({ title: "提示", content: "请选择指定商品" });
|
||||||
return;
|
return;
|
||||||
|
@ -463,9 +504,11 @@ export default {
|
||||||
this.selectedGoods.forEach(function (e) {
|
this.selectedGoods.forEach(function (e) {
|
||||||
ids.push(e.id);
|
ids.push(e.id);
|
||||||
});
|
});
|
||||||
this.form.promotionGoodsList = this.form.promotionGoodsList.filter((item) => {
|
this.form.promotionGoodsList = this.form.promotionGoodsList.filter(
|
||||||
|
(item) => {
|
||||||
return !ids.includes(item.id);
|
return !ids.includes(item.id);
|
||||||
});
|
}
|
||||||
|
);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -511,7 +554,10 @@ export default {
|
||||||
let params = {
|
let params = {
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageNumber: 1,
|
pageNumber: 1,
|
||||||
goodsName: query,
|
id: query === this.form.giftId ? this.form.giftId : null,
|
||||||
|
goodsName: query === this.form.giftId ? null : query,
|
||||||
|
marketEnable: "UPPER",
|
||||||
|
authFlag: "PASS"
|
||||||
};
|
};
|
||||||
this.giftLoading = true;
|
this.giftLoading = true;
|
||||||
getGoodsSkuListDataSeller(params).then((res) => {
|
getGoodsSkuListDataSeller(params).then((res) => {
|
||||||
|
|
Loading…
Reference in New Issue