bug修改

master
mabo 2021-07-08 14:36:05 +08:00
parent e5449213c2
commit 48c0dcb69b
16 changed files with 104 additions and 644 deletions

View File

@ -40,7 +40,7 @@
</div> </div>
<div class="clearfix"></div> <div class="clearfix"></div>
<div class="copyright"> <div class="copyright">
<p>Copyright © LILI</p> <p>Copyright © {{year}} LILI</p>
</div> </div>
</div> </div>
</footer> </footer>
@ -58,7 +58,8 @@ export default {
[ '支付方式', '货到付款', '在线支付', '分期付款', '邮局汇款', '公司转账' ], [ '支付方式', '货到付款', '在线支付', '分期付款', '邮局汇款', '公司转账' ],
[ '售后服务', '售后政策', '价格保护', '退款说明', '返修/退换货', '取消订单' ] [ '售后服务', '售后政策', '价格保护', '退款说明', '返修/退换货', '取消订单' ]
], ],
moreLink: ['关于我们', '联系我们', '联系客服', '商家帮助', '隐私政策'] // moreLink: ['关于我们', '联系我们', '联系客服', '商家帮助', '隐私政策'], //
year: new Date().getFullYear() //
}; };
}, },
methods: { methods: {

View File

@ -3,7 +3,7 @@
<div class="imgBox" :style="{width:data.originalWidth+'px',height:data.originalHeight + 'px'}"> <div class="imgBox" :style="{width:data.originalWidth+'px',height:data.originalHeight + 'px'}">
<img :src="data.backImage" style="width:100%;height:100%" alt=""> <img :src="data.backImage" style="width:100%;height:100%" alt="">
<img class="slider" :src="data.slidingImage" :style="{left:distance+'px',top:data.randomY+'px'}" :width="data.sliderWidth" :height="data.sliderHeight" alt=""> <img class="slider" :src="data.slidingImage" :style="{left:distance+'px',top:data.randomY+'px'}" :width="data.sliderWidth" :height="data.sliderHeight" alt="">
<Icon type="md-refresh" class="refresh" @click="refresh" /> <Icon type="md-refresh" class="refresh" @click="init" />
</div> </div>
<div class="handle" :style="{width:data.originalWidth+'px'}"> <div class="handle" :style="{width:data.originalWidth+'px'}">
<span class="bgcolor" :style="{width:distance + 'px',background:bgColor}"></span> <span class="bgcolor" :style="{width:distance + 'px',background:bgColor}"></span>
@ -82,26 +82,24 @@ export default {
this.verifyText = '解锁失败'; this.verifyText = '解锁失败';
let that = this; let that = this;
setTimeout(() => { setTimeout(() => {
that.refresh(); that.init();
}, 1000); }, 1000);
this.$emit('change', { status: false, distance: this.distance }); this.$emit('change', { status: false, distance: this.distance });
} }
} else { } else {
this.refresh() this.init()
} }
}).catch(()=>{ }).catch(()=>{
this.refresh() this.init()
}); });
}, },
refresh () { // init () { //
this.flag = false; this.flag = false;
this.downX = 0; this.downX = 0;
this.distance = 0; this.distance = 0;
this.bgColor = '#04ad11'; this.bgColor = '#04ad11';
this.verifyText = '拖动滑块解锁'; this.verifyText = '拖动滑块解锁';
this.init();
},
init () { //
getVerifyImg(this.type).then(res => { getVerifyImg(this.type).then(res => {
if (res.result) { if (res.result) {
this.data = res.result; this.data = res.result;

View File

@ -97,7 +97,7 @@
<a class="item" href="https://pickmall.cn/" target="_blank">条款</a> <a class="item" href="https://pickmall.cn/" target="_blank">条款</a>
</Row> </Row>
<Row type="flex" justify="center" class="copyright"> <Row type="flex" justify="center" class="copyright">
Copyright © 2020 - Present Copyright © {{year}} - Present
<a href="https://pickmall.cn/" target="_blank" style="margin: 0 5px" <a href="https://pickmall.cn/" target="_blank" style="margin: 0 5px"
>lili-shop</a >lili-shop</a
> >
@ -130,6 +130,7 @@ export default {
password: '', password: '',
oncePasd: '' oncePasd: ''
}, },
year: new Date().getFullYear(), //
step: 0, // step: 0, //
ruleInline: { ruleInline: {
// //

View File

@ -84,7 +84,9 @@ export default {
params: { // params: { //
pageNumber: 1, pageNumber: 1,
pageSize: 10, pageSize: 10,
keywords: '' keywords: '',
sort: 'createTime',
order: 'desc'
}, },
// //
afterSaleStatusList, afterSaleStatusList,

View File

@ -230,13 +230,6 @@ export const otherRouter = {
name: "edit-platform-coupon", name: "edit-platform-coupon",
component: () => import("@/views/promotion/coupon/couponPublish.vue") component: () => import("@/views/promotion/coupon/couponPublish.vue")
}, },
{
path: "promotion/member-receive-coupon",
title: "领取详情",
name: "member-receive-coupon",
component: () =>
import("@/views/promotion/coupon/memberReceiveCoupon.vue")
},
{ {
path: "promotion/platform-coupon-info", path: "promotion/platform-coupon-info",
title: "详情", title: "详情",
@ -261,25 +254,12 @@ export const otherRouter = {
name: "coupon-activity-info", name: "coupon-activity-info",
component: () => import("@/views/promotion/couponActivity/couponInfo.vue") component: () => import("@/views/promotion/couponActivity/couponInfo.vue")
}, },
{
path: "promotion/member-receive-coupon",
title: "领取详情",
name: "member-coupon-activity",
component: () =>
import("@/views/promotion/coupon/memberReceiveCoupon.vue")
},
{ {
path: "promotion/platform-coupon-info", path: "promotion/platform-coupon-info",
title: "详情", title: "详情",
name: "platform-coupon-activity", name: "platform-coupon-activity",
component: () => import("@/views/promotion/coupon/couponInfo.vue") component: () => import("@/views/promotion/coupon/couponInfo.vue")
}, },
{
path: "promotion/add-coupon-specify",
title: "精准发劵",
name: "add-coupon-specify",
component: () => import("@/views/promotion/coupon/couponSpecify.vue")
},
{ {
path: "promotion/manager-pintuan", path: "promotion/manager-pintuan",
title: "平台拼团", title: "平台拼团",

View File

@ -6,7 +6,7 @@
<a class="item" href="https://pickmall.com" target="_blank">{{ $t('terms') }}</a> <a class="item" href="https://pickmall.com" target="_blank">{{ $t('terms') }}</a>
</Row> </Row>
<Row type="flex" justify="center" class="copyright"> <Row type="flex" justify="center" class="copyright">
Copyright © 2020 - Present Copyright © {{year}} - Present
<a <a
href="https://pickmall.cn/" href="https://pickmall.cn/"
target="_blank" target="_blank"
@ -18,7 +18,12 @@
<script> <script>
export default { export default {
name: "footer" name: "footer",
data() {
return {
year: new Date().getFullYear()
}
},
}; };
</script> </script>

View File

@ -3,7 +3,7 @@
<div class="imgBox" :style="{width:data.originalWidth+'px',height:data.originalHeight + 'px'}"> <div class="imgBox" :style="{width:data.originalWidth+'px',height:data.originalHeight + 'px'}">
<img :src="data.backImage" style="width:100%;height:100%" alt=""> <img :src="data.backImage" style="width:100%;height:100%" alt="">
<img class="slider" :src="data.slidingImage" :style="{left:distance+'px',top:data.randomY+'px'}" :width="data.sliderWidth" :height="data.sliderHeight" alt=""> <img class="slider" :src="data.slidingImage" :style="{left:distance+'px',top:data.randomY+'px'}" :width="data.sliderWidth" :height="data.sliderHeight" alt="">
<Icon type="md-refresh" class="refresh" @click="refresh" /> <Icon type="md-refresh" class="refresh" @click="init" />
</div> </div>
<div class="handle" :style="{width:data.originalWidth+'px'}"> <div class="handle" :style="{width:data.originalWidth+'px'}">
<span class="bgcolor" :style="{width:distance + 'px',background:bgColor}"></span> <span class="bgcolor" :style="{width:distance + 'px',background:bgColor}"></span>
@ -82,27 +82,24 @@ export default {
this.verifyText = '解锁失败'; this.verifyText = '解锁失败';
let that = this; let that = this;
setTimeout(() => { setTimeout(() => {
that.refresh(); that.init();
}, 1000); }, 1000);
this.$emit('change', { status: false, distance: this.distance }); this.$emit('change', { status: false, distance: this.distance });
} }
} else { } else {
this.refresh() this.init()
} }
}).catch(()=>{ }).catch(()=>{
this.refresh() this.init()
}); });
}, },
refresh () { // init () { //
this.flag = false; this.flag = false;
this.downX = 0; this.downX = 0;
this.distance = 0; this.distance = 0;
this.bgColor = '#04ad11'; this.bgColor = '#04ad11';
this.verifyText = '拖动滑块解锁'; this.verifyText = '拖动滑块解锁';
this.init();
},
init () { //
getVerifyImg(this.type).then(res => { getVerifyImg(this.type).then(res => {
if (res.result) { if (res.result) {
this.data = res.result; this.data = res.result;

View File

@ -1,8 +1,7 @@
<template> <template>
<div class="search"> <div class="search">
<Card> <Card>
<Row> <Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form mb_10">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
<Form-item label="活动名称" prop="couponName"> <Form-item label="活动名称" prop="couponName">
<Input type="text" v-model="searchForm.couponName" placeholder="请输入活动名称" clearable style="width: 200px" /> <Input type="text" v-model="searchForm.couponName" placeholder="请输入活动名称" clearable style="width: 200px" />
</Form-item> </Form-item>
@ -19,17 +18,15 @@
</Form-item> </Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button> <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form> </Form>
</Row> <Row class="operation padding-row" v-if="getType !== 'ACTIVITY'">
<Row class="operation padding-row">
<Button @click="add" type="primary">添加优惠券</Button> <Button @click="add" type="primary">添加优惠券</Button>
<Button @click="delAll"></Button> <Button @click="delAll"></Button>
<!-- <Button @click="upAll" >批量上架</Button> -->
</Row> </Row>
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-select-cancel="cancelSelect" @on-selection-change="changeSelect"> <Table v-if="refreshTable" :loading="loading" border :columns="columns" :data="data" ref="table" @on-selection-change="changeSelect">
<template slot-scope="{ row }" slot="action"> <template slot-scope="{ row }" slot="action">
<Button v-if="!checked && row.promotionStatus === 'NEW' || row.promotionStatus === 'CLOSE'" type="success" :class="{'mr_10' : !checked && row.promotionStatus === 'START' || row.promotionStatus === 'NEW'}" size="small" @click="edit(row)"> <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> </Button>
<Button v-if="!checked && row.promotionStatus === 'START' || row.promotionStatus === 'NEW'" type="error" size="small" @click="remove(row)"> <Button v-if="row.promotionStatus === 'START' || row.promotionStatus === 'NEW'" type="error" size="small" @click="remove(row)">
</Button> </Button>
</template> </template>
</Table> </Table>
@ -220,15 +217,10 @@ export default {
], ],
data: [], // data: [], //
total: 0, // total: 0, //
selectCoupon: [], // refreshTable: true, //
}; };
}, },
props: { props: {
//
checked: {
type: Boolean,
default: false,
},
// //
getType: { getType: {
type: String, type: String,
@ -246,94 +238,73 @@ export default {
this.init(); this.init();
} }
}, },
},
methods: {
// //
selectedList: { selectedList: {
handler(val) { handler(val) {
// //
if (val.length != 0) { if (val.length) {
this.selectCoupon = val; this.selectList = val;
this.data.forEach((item) => {
item._checked = false;
if (this.selectList.length) {
this.selectList.forEach((child) => {
if (item.id == child.id) {
item._checked = true;
} }
});
}
});
} else {
this.data.forEach((item) => {
item._checked = false;
});
}
this.refreshTable = false;
this.$nextTick(() =>{
this.refreshTable = true;
})
}, },
deep: true, deep: true,
immediate: true,
}, },
check() { },
// this.selectCoupon.push(this.selectList) methods: {
this.$emit("selected", this.selectCoupon); check() { //
this.$emit("selected", this.selectList);
}, },
init() { init() {
this.getDataList(); this.getDataList();
}, },
add() { add() { //
this.$router.push({ name: "add-platform-coupon" }); this.$router.push({ name: "add-platform-coupon" });
}, },
/** 跳转至领取详情页面 */ info(v) { //
receiveInfo(v) {
this.$router.push({ name: "member-receive-coupon", query: { id: v.id } });
},
info(v) {
this.$router.push({ name: "platform-coupon-info", query: { id: v.id } }); this.$router.push({ name: "platform-coupon-info", query: { id: v.id } });
}, },
changePage(v) { changePage(v) { //
this.searchForm.pageNumber = v; this.searchForm.pageNumber = v;
this.getDataList(); this.getDataList();
// this.clearSelectAll();
}, },
changePageSize(v) { changePageSize(v) { //
this.searchForm.pageSize = v; this.searchForm.pageSize = v;
this.getDataList(); this.getDataList();
}, },
handleSearch() { handleSearch() { //
this.searchForm.pageNumber = 0; this.searchForm.pageNumber = 0;
this.searchForm.pageSize = 10; this.searchForm.pageSize = 10;
this.getDataList(); this.getDataList();
}, },
changeSort(e) { clearSelectAll() { //
this.searchForm.sort = e.key;
this.searchForm.order = e.order;
if (e.order === "normal") {
this.searchForm.order = "";
}
this.getDataList();
},
clearSelectAll() {
this.$refs.table.selectAll(false); this.$refs.table.selectAll(false);
}, },
/**
* 取消已选择的数据
*/
cancelSelect(selection, row) {
console.log(row)
let findCoupon = this.selectCoupon.find((item) => {
return item.id == row.id;
});
//
if (!findCoupon) {
this.selectCoupon.push(row);
} else {
//
this.selectCoupon.map((item, index) => {
if (item.id == findCoupon.id) {
this.selectCoupon.splice(index, 1);
}
});
}
},
/** /**
* 选择优惠券 * 选择优惠券
*/ */
changeSelect(e) { changeSelect(e) {
if (this.checked && e.length != 0) {
this.selectCoupon.push(...e);
this.check();
}
this.selectList = e; this.selectList = e;
this.selectCount = e.length; this.selectCount = e.length;
if (this.getType === 'ACTIVITY') this.check()
}, },
getDataList() { getDataList() { //
this.loading = true; this.loading = true;
if (this.selectDate && this.selectDate[0] && this.selectDate[1]) { if (this.selectDate && this.selectDate[0] && this.selectDate[1]) {
this.searchForm.startTime = this.selectDate[0].getTime(); this.searchForm.startTime = this.selectDate[0].getTime();
@ -346,18 +317,6 @@ export default {
getPlatformCouponList(this.searchForm).then((res) => { getPlatformCouponList(this.searchForm).then((res) => {
this.loading = false; this.loading = false;
if (res.success) { if (res.success) {
res.result.records.forEach((item) => {
if (this.selectCoupon.length != 0) {
this.selectCoupon.forEach((child) => {
if (item.id == child.id) {
item.___selected = true;
item._checked = true;
}
});
}
item.___selected = false;
});
this.data = res.result.records; this.data = res.result.records;
this.total = res.result.total; this.total = res.result.total;
} }
@ -365,43 +324,11 @@ export default {
this.total = this.data.length; this.total = this.data.length;
this.loading = false; this.loading = false;
}, },
handleSubmit() {
this.$refs.form.validate((valid) => { edit(v) { //
if (valid) {
this.submitLoading = true;
if (this.modalType === 0) {
// id
delete this.form.id;
this.postRequest("/coupon/insertOrUpdate", this.form).then(
(res) => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
this.modalVisible = false;
}
}
);
} else {
//
this.postRequest("/coupon/insertOrUpdate", this.form).then(
(res) => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
this.modalVisible = false;
}
}
);
}
}
});
},
edit(v) {
this.$router.push({ name: "edit-platform-coupon", query: { id: v.id } }); this.$router.push({ name: "edit-platform-coupon", query: { id: v.id } });
}, },
remove(v) { remove(v) { //
this.$Modal.confirm({ this.$Modal.confirm({
title: "确认下架", title: "确认下架",
// //
@ -426,7 +353,7 @@ export default {
}, },
}); });
}, },
delAll() { delAll() { //
if (this.selectCount <= 0) { if (this.selectCount <= 0) {
this.$Message.warning("您还未选择要下架的优惠券"); this.$Message.warning("您还未选择要下架的优惠券");
return; return;
@ -456,41 +383,12 @@ export default {
}, },
}); });
}, },
upAll() {
if (this.selectCount <= 0) {
this.$Message.warning("请选择要上架的优惠券");
return;
}
this.$Modal.confirm({
title: "确认上架",
content: "您确认要上架所选的 " + this.selectCount + " 条数据?",
loading: true,
onOk: () => {
let ids = [];
this.selectList.forEach(function (e) {
ids.push(e.id);
});
let params = {
couponIds: ids.toString(),
promotionStatus: "START",
};
//
updatePlatformCouponStatus(params).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("上架成功");
this.clearSelectAll();
this.getDataList();
}
});
},
});
},
}, },
mounted() { mounted() {
// //
if (this.getType) { if (this.getType) {
this.searchForm.getType = this.getType; this.searchForm.getType = this.getType;
this.columns.pop()
} }
this.init(); this.init();
}, },

View File

@ -229,11 +229,11 @@ export default {
], ],
publishNum: [ publishNum: [
{required: true, message: "请输入发放数量"}, {required: true, message: "请输入发放数量"},
{pattern: regular.integer, message: "请输入正整数"}, {pattern: regular.Integer, message: "请输入正整数"},
], ],
couponLimitNum: [ couponLimitNum: [
{required: true, message: "领取限制不能为空"}, {required: true, message: "领取限制不能为空"},
{pattern: regular.integer, message: "请输入正整数"}, {pattern: regular.Integer, message: "请输入正整数"},
], ],
description: [{required: true, message: "请输入范围描述"}], description: [{required: true, message: "请输入范围描述"}],
}, },

View File

@ -1,172 +0,0 @@
<template>
<div>
<Card>
<Form ref="form" :model="form" :label-width="120">
<div class="base-info-item">
<h4>优惠券将在指定发放时间发放到用户账号中</h4>
<div class="form-item-view">
<FormItem label="活动名称" prop="promotionName">
<Input type="text" v-model="form.promotionName" placeholder="活动名称" clearable style="width: 260px" />
</FormItem>
<FormItem label="目标客户" prop="vipType">
<RadioGroup v-model="vipType">
<Radio :label="0">全平台客户</Radio>
<Radio :label="1">指定客户</Radio>
</RadioGroup>
<Button type="primary" v-if="vipType==1" icon="ios-add" @click="addVip" ghost>添加客户</Button>
</FormItem>
<FormItem label="发放时间" prop="couponDiscount">
<DatePicker type="datetime" v-model="form.rangeTime" format="yyyy-MM-dd HH:mm:ss" placeholder="请选择" :options="options" style="width: 260px">
</DatePicker>
</FormItem>
<FormItem label="选择优惠券" prop="couponType">
<Button type="primary" icon="ios-add" @click="checkCoupon=!checkCoupon" ghost>选择优惠券</Button>
<Table class="table" :columns="couponColumns" :data="couponData"></Table>
</FormItem>
</div>
<div style="margin-left:100px">
<Button type="text" @click="closeCurrentPage"></Button>
<Button type="primary" :loading="submitLoading" @click="handleSubmit"></Button>
</div>
</div>
</Form>
<Modal width="1200" v-model="checkCoupon">
<couponList checked @selected="callbackSelectCoupon" />
</Modal>
<Modal width="1200" v-model="checkUserList">
<userList @selected="callbackSelectUser" ref="memberLayout" />
</Modal>
</Card>
</div>
</template>
<script>
import { addCouponActivity } from "@/api/promotion";
import couponList from "./coupon";
import userList from "@/views/member/list/index";
// import userList from ''
export default {
components: {
couponList,
userList,
},
data() {
return {
//
checkCoupon: false,
//
checkUserList: false,
// title
couponColumns: [
{
title: "优惠券名称",
key: "name",
},
{
title: "有效期",
key: "age",
},
{
title: "优惠券数量",
key: "address",
},
{
title: "操作",
key: "action",
},
],
// datpicker
options: {
disabledDate(date) {
return date && date.valueOf() < Date.now() - 86400000;
},
},
//
vipType: 0, // 0 1
form: {},
formRule: {},
id: this.$route.query.id, // id
callbackCoupon: [],
};
},
mounted() {},
methods: {
//
addVip() {
this.checkUserList = true;
this.$nextTick(() => {
this.$refs.memberLayout.selectedMember = true;
});
},
//
callbackSelectUser(val){
console.log(val)
},
//
callbackSelectCoupon(val) {
if (val.___selected) {
this.callbackCoupon.forEach((item, index) => {
if (item.id == val.id) this.callbackCoupon.splice(index, 1);
});
} else {
this.callbackCoupon.push(val);
}
},
//
closeCurrentPage() {
this.$store.commit("removeTag", "add-coupon-specify");
localStorage.pageOpenedList = JSON.stringify(
this.$store.state.app.pageOpenedList
);
this.$router.go(-1);
},
async handleSubmit() {
let res = await addCouponActivity();
},
},
};
</script>
<style lang="scss" scpoed>
.table {
width: 800px;
margin: 20px 0;
}
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 {
margin: 20px 0;
}
.describe {
font-size: 12px;
margin-left: 10px;
color: #999;
}
.effectiveDays {
font-size: 12px;
color: #999;
> * {
margin: 0 4px;
}
}
</style>

View File

@ -1,250 +0,0 @@
<template>
<div class="search">
<Card>
<Table
:loading="loading"
border
:columns="columns"
:data="data"
ref="table"
sortable="custom"
@on-sort-change="changeSort"
@on-selection-change="changeSelect"
>
<template slot-scope="{ row }" slot="rangeTime">
<div>{{ row.startTime }} ~ {{ row.endTime }}</div>
</template>
<template slot-scope="{ row }" slot="action">
<Button
type="error"
ghost
size="small"
:disabled="row.memberCouponStatus != 'NEW'"
@click="remove(row)"
>作废</Button
>
</template>
</Table>
<Row type="flex" justify="end" class="page">
<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>
</Card>
</div>
</template>
<script>
import {
getMemberReceiveCouponList,
deleteMemberReceiveCoupon,
} from "@/api/promotion";
export default {
name: "memberReceiveCoupon",
components: {},
data() {
return {
loading: true, //
searchForm: {
//
pageNumber: 1, //
pageSize: 10, //
sort: "createTime", //
order: "desc", //
},
id: this.$route.query.id, // id
submitLoading: false, //
selectList: [], //
columns: [
//
{
title: "优惠券编号",
key: "couponId",
minWidth: 120,
},
{
title: "面额",
key: "price",
render: (h, params) => {
return h(
"div",
this.$options.filters.unitPrice(params.row.price, "¥")
);
},
},
{
title: "消费门槛",
key: "consumeThreshold",
render: (h, params) => {
return h(
"div",
this.$options.filters.unitPrice(params.row.consumeThreshold, "¥")
);
},
},
{
title: "有效期",
slot: "rangeTime",
minWidth: 120
},
{
title: "会员名称",
key: "memberName",
minWidth: 120
},
{
title: "适用范围",
key: "couponType",
minWidth: 50,
render: (h, params) => {
let text = "未知";
if (params.row.scopeType == "ALL") {
text = "全品类";
} else if (params.row.scopeType == "PORTION_CATEGORY") {
text = "部分商品分类";
} else if (params.row.scopeType == "PORTION_GOODS") {
text = "指定商品";
}
return h("div", [text]);
},
},
{
title: "会员名称",
key: "memberName",
},
{
title: "状态",
key: "memberCouponStatus",
minWidth: 50,
render: (h, params) => {
let text = "未知",
color = "";
if (params.row.memberCouponStatus == "NEW") {
text = "未使用";
color = "default";
} else if (params.row.memberCouponStatus == "USED") {
text = "已使用";
color = "green";
} else if (params.row.memberCouponStatus == "EXPIRE") {
text = "已过期";
color = "red";
} else if (params.row.memberCouponStatus == "CLOSED") {
text = "已作废";
color = "red";
}
return h("div", [
h(
"Tag",
{
props: {
color: color,
},
},
text
),
]);
},
},
{
title: "操作",
slot: "action",
align: "center",
width: 100,
},
],
data: [], //
total: 0, //
};
},
methods: {
init() {
this.getDataList();
},
changePage(v) {
this.searchForm.pageNumber = v;
this.getDataList();
this.clearSelectAll();
},
changePageSize(v) {
this.searchForm.pageSize = v;
this.getDataList();
},
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.getDataList();
},
handleReset() {
this.$refs.searchForm.resetFields();
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
//
this.getDataList();
},
changeSort(e) {
this.searchForm.sort = e.key;
this.searchForm.order = e.order;
if (e.order === "normal") {
this.searchForm.order = "";
}
this.getDataList();
},
clearSelectAll() {
this.$refs.table.selectAll(false);
},
changeSelect(e) {
this.selectList = e;
},
/** 查询单个优惠券领取详情 */
getDataList() {
this.loading = true;
//
getMemberReceiveCouponList(this.id).then((res) => {
this.loading = false;
if (res.success) {
this.data = res.result.records;
this.total = res.result.total;
}
});
this.total = this.data.length;
this.loading = false;
},
/** 作废优惠券 */
remove(v) {
this.$Modal.confirm({
title: "确认作废",
content: "您确认要作废此优惠券?",
loading: true,
onOk: () => {
//
deleteMemberReceiveCoupon(v.id).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("作废成功");
this.getDataList();
}
});
},
});
},
},
mounted() {
this.init();
},
};
</script>
<style lang="scss">
@import "@/styles/table-common.scss";
</style>

View File

@ -282,7 +282,6 @@ export default {
couponId: item.id, couponId: item.id,
} }
}); });
console.log(this.form.couponActivityItems)
}, },
// //
@ -308,7 +307,6 @@ 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));
console.log(params);
this.submitLoading = true; this.submitLoading = true;
// id // id
delete params.id; delete params.id;

View File

@ -187,11 +187,11 @@ export default {
], ],
publishNum: [ publishNum: [
{ required: true, message: "请输入发放数量" }, { required: true, message: "请输入发放数量" },
{ pattern: regular.integer, message: "请输入正整数" }, { pattern: regular.Integer, message: "请输入正整数" },
], ],
couponLimitNum: [ couponLimitNum: [
{ required: true, message: "请输入领取限制" }, { required: true, message: "请输入领取限制" },
{ pattern: regular.integer, message: "请输入正整数" }, { pattern: regular.Integer, message: "请输入正整数" },
], ],
description: [{ required: true, message: "请输入范围描述" }], description: [{ required: true, message: "请输入范围描述" }],
}, },

View File

@ -6,7 +6,7 @@
<a class="item" href="https://pickmall.cn/" target="_blank">{{ $t('terms') }}</a> <a class="item" href="https://pickmall.cn/" target="_blank">{{ $t('terms') }}</a>
</Row> </Row>
<Row type="flex" justify="center" class="copyright"> <Row type="flex" justify="center" class="copyright">
Copyright © 2020 - Present Copyright © {{year}} - Present
<a <a
href="https://pickmall.cn/" href="https://pickmall.cn/"
target="_blank" target="_blank"
@ -18,7 +18,12 @@
<script> <script>
export default { export default {
name: "footer" name: "footer",
data() {
return {
year: new Date().getFullYear()
}
},
}; };
</script> </script>

View File

@ -3,7 +3,7 @@
<div class="imgBox" :style="{width:data.originalWidth+'px',height:data.originalHeight + 'px'}"> <div class="imgBox" :style="{width:data.originalWidth+'px',height:data.originalHeight + 'px'}">
<img :src="data.backImage" style="width:100%;height:100%" alt=""> <img :src="data.backImage" style="width:100%;height:100%" alt="">
<img class="slider" :src="data.slidingImage" :style="{left:distance+'px',top:data.randomY+'px'}" :width="data.sliderWidth" :height="data.sliderHeight" alt=""> <img class="slider" :src="data.slidingImage" :style="{left:distance+'px',top:data.randomY+'px'}" :width="data.sliderWidth" :height="data.sliderHeight" alt="">
<Icon type="md-refresh" class="refresh" @click="refresh" /> <Icon type="md-refresh" class="refresh" @click="init" />
</div> </div>
<div class="handle" :style="{width:data.originalWidth+'px'}"> <div class="handle" :style="{width:data.originalWidth+'px'}">
<span class="bgcolor" :style="{width:distance + 'px',background:bgColor}"></span> <span class="bgcolor" :style="{width:distance + 'px',background:bgColor}"></span>
@ -82,27 +82,24 @@ export default {
this.verifyText = '解锁失败'; this.verifyText = '解锁失败';
let that = this; let that = this;
setTimeout(() => { setTimeout(() => {
that.refresh(); that.init();
}, 1000); }, 1000);
this.$emit('change', { status: false, distance: this.distance }); this.$emit('change', { status: false, distance: this.distance });
} }
} else { } else {
this.refresh() this.init()
} }
}).catch(()=>{ }).catch(()=>{
this.refresh() this.init()
}); });
}, },
refresh () { // init () { //
this.flag = false; this.flag = false;
this.downX = 0; this.downX = 0;
this.distance = 0; this.distance = 0;
this.bgColor = '#04ad11'; this.bgColor = '#04ad11';
this.verifyText = '拖动滑块解锁'; this.verifyText = '拖动滑块解锁';
this.init();
},
init () { //
getVerifyImg(this.type).then(res => { getVerifyImg(this.type).then(res => {
if (res.result) { if (res.result) {
this.data = res.result; this.data = res.result;

View File

@ -108,7 +108,7 @@ export default {
render: (h, params) => { render: (h, params) => {
return h( return h(
"div", "div",
params.row.receivedNum + "/" + (params.row.publishNum === 0 ? '限制' : params.row.publishNum) params.row.receivedNum + "/" + (params.row.publishNum === 0 ? '限制' : params.row.publishNum)
); );
}, },
}, },