合并方法

master
lemon橪 2021-07-12 18:19:05 +08:00
commit 3e3c101a1e
45 changed files with 1909 additions and 2693 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

@ -90,7 +90,7 @@
<template v-if="detail.goodsParamsDTOList && detail.goodsParamsDTOList.length"> <template v-if="detail.goodsParamsDTOList && detail.goodsParamsDTOList.length">
<div class="goods-params" v-for="item in detail.goodsParamsDTOList" :key="item.groupId"> <div class="goods-params" v-for="item in detail.goodsParamsDTOList" :key="item.groupId">
<span class="ml_10">{{item.groupName}}</span> <span class="ml_10">{{item.groupName}}</span>
<table class="mb_10" cellpadding='0' border="1" cellspacing="0" > <table class="mb_10" cellpadding='0' cellspacing="0" >
<tr v-for="param in item.goodsParamsItemDTOList" :key="param.paramId"> <tr v-for="param in item.goodsParamsItemDTOList" :key="param.paramId">
<td style="text-align: center">{{param.paramName}}</td><td>{{param.paramValue}}</td> <td style="text-align: center">{{param.paramName}}</td><td>{{param.paramValue}}</td>
</tr> </tr>
@ -222,7 +222,7 @@ export default {
}); });
window.addEventListener('scroll', this.handleScroll) window.addEventListener('scroll', this.handleScroll)
this.getList(); this.getList();
}, }
}; };
</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,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(() => {
this.refresh() }).catch(()=>{
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

@ -17,10 +17,10 @@ export default {
* @description api请求基础路径 * @description api请求基础路径
*/ */
api_dev: { api_dev: {
// common: 'http://192.168.0.100:8890', // common: 'http://192.168.0.106:8890',
// buyer: 'http://192.168.0.100:8888', // buyer: 'http://192.168.0.106:8888',
// seller: 'http://192.168.0.100:8889', // seller: 'http://192.168.0.106:8889',
// manager: 'http://192.168.0.100:8887' // manager: 'http://192.168.0.106:8887'
common: 'https://common-api.pickmall.cn', common: 'https://common-api.pickmall.cn',
buyer: 'https://buyer-api.pickmall.cn', buyer: 'https://buyer-api.pickmall.cn',

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

@ -46,9 +46,7 @@
<thead> <thead>
<tr> <tr>
<th width="50%">商品</th> <th width="50%">商品</th>
<!-- <th width="20%">属性</th> -->
<th width="20%">货号</th> <th width="20%">货号</th>
<!-- <th width="10%">发货仓库</th> -->
<th width="10%">单价</th> <th width="10%">单价</th>
<th width="10%">数量</th> <th width="10%">数量</th>
<th width="10%">小计</th> <th width="10%">小计</th>
@ -82,10 +80,11 @@
<div> <div>
<span>运费</span><span>+{{ order.order.freightPrice | unitPrice("¥") }}</span><br> <span>运费</span><span>+{{ order.order.freightPrice | unitPrice("¥") }}</span><br>
</div> </div>
<div><span>优惠金额</span><span>-{{ order.order.discountPrice | unitPrice("¥") }}</span></div> <div v-if="order.order.priceDetailDTO.couponPrice"><span>优惠券</span><span>-{{ order.order.priceDetailDTO.couponPrice || 0 | unitPrice("¥") }}</span></div>
<div v-if="order.order.discountPrice"><span>活动优惠</span><span>-{{ order.order.discountPrice | unitPrice("¥") }}</span></div>
<div> <div>
<span>应付金额</span <span>应付金额</span>
><span class="actrual-price">{{ order.order.flowPrice | unitPrice("¥") }}</span> <span class="actrual-price">{{ order.order.flowPrice | unitPrice("¥") }}</span>
</div> </div>
</div> </div>
</div> </div>
@ -121,7 +120,7 @@ export default {
}); });
window.open(routeUrl.href, '_blank'); window.open(routeUrl.href, '_blank');
}, },
getDetail () { // getDetail () { //
orderDetail(this.$route.query.sn).then(res => { orderDetail(this.$route.query.sn).then(res => {
if (res.success) { if (res.success) {
this.order = res.result; this.order = res.result;

View File

@ -21,10 +21,10 @@ export default {
buyer: "https://buyer-api.pickmall.cn", buyer: "https://buyer-api.pickmall.cn",
seller: "https://store-api.pickmall.cn", seller: "https://store-api.pickmall.cn",
manager: "https://admin-api.pickmall.cn" manager: "https://admin-api.pickmall.cn"
// common: 'http://192.168.0.105:8890', // common: 'http://192.168.0.103:8890',
// buyer: 'http://192.168.0.105:8888', // buyer: 'http://192.168.0.103:8888',
// seller: 'http://192.168.0.105:8889', // seller: 'http://192.168.0.103:8889',
// manager: 'http://192.168.0.105:8887' // manager: 'http://192.168.0.103:8887'
}, },
api_prod: { api_prod: {
common: "https://common-api.pickmall.cn", common: "https://common-api.pickmall.cn",

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

@ -52,6 +52,9 @@
</div> </div>
</div> </div>
</template> </template>
<template slot-scope="{row}" slot="distributionOrderStatus">
<Tag :color="filterStatusColor(row.distributionOrderStatus)">{{filterStatus(row.distributionOrderStatus)}}</Tag>
</template>
</Table> </Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize"
@ -121,20 +124,10 @@
}, },
{ {
title: "状态", title: "状态",
key: "distributionOrderStatus", slot: "distributionOrderStatus",
width: 100, width: 120,
sortable: false,
render: (h, params) => {
if (params.row.distributionOrderStatus == 'COMPLETE_CASH') {
return h('div', '提现完成')
} else if (params.row.distributionOrderStatus == 'WAIT_BILL') {
return h('div', '待结算')
} else if (params.row.distributionOrderStatus == 'WAIT_CASH') {
return h('div', '待提现')
}
}
}, },
{ {
title: "佣金金额", title: "佣金金额",
key: "rebateGrade", key: "rebateGrade",
@ -219,6 +212,34 @@
}, },
searchChange(val) { // searchChange(val) { //
this.getShopList(val) this.getShopList(val)
},
filterStatus (status) { //
const arr = [
{status: 'WAIT_BILL', title: '待结算'},
{status: 'WAIT_CASH', title: '待提现'},
{status: 'COMPLETE_CASH', title: '提现完成'},
{status: 'CANCEL', title: '订单取消'},
{status: 'REFUND', title: '退款'},
]
for (let i=0;i<arr.length;i++) {
if (arr[i].status === status) {
return arr[i].title;
}
}
},
filterStatusColor (status) { // tag
const arr = [
{status: 'WAIT_BILL', color: 'magenta'},
{status: 'WAIT_CASH', color: 'warning'},
{status: 'COMPLETE_CASH', color: 'success'},
{status: 'CANCEL', color: 'default'},
{status: 'REFUND', color: 'error'},
]
for (let i=0;i<arr.length;i++) {
if (arr[i].status === status) {
return arr[i].color;
}
}
} }
}, },
mounted() { mounted() {

View File

@ -40,13 +40,8 @@
{{ scope.row.commissionRate }}% {{ scope.row.commissionRate }}%
</template> </template>
<template slot="deleteFlag" slot-scope="scope"> <template slot="deleteFlag" slot-scope="{row}">
<div v-if="scope.row.deleteFlag == 0"> <Tag :class="{'ml_10': row.deleteFlag}" :color="row.deleteFlag == false ? 'success' : 'error'">{{row.deleteFlag == false ? '正常启用' : '禁用'}}</Tag>
<Badge text="正常启用" status="success"></Badge>
</div>
<div v-if="scope.row.deleteFlag == 1">
<Badge text="禁用" status="error"></Badge>
</div>
</template> </template>
</Table> </Table>
@ -129,7 +124,7 @@ import {
} from "@/api/goods"; } from "@/api/goods";
import uploadPicInput from "@/views/my-components/lili/upload-pic-input"; import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
import {regular} from "@/utils";
export default { export default {
name: "lili-components", name: "lili-components",
components: { components: {
@ -172,7 +167,12 @@ export default {
brandWay: "", // brandWay: "", //
specForm: {}, specForm: {},
// //
formValidate: {}, formValidate: {
commissionRate: [
{required: true, message: '请填写佣金比例'},
{pattern: regular.Integer, message: "佣金比例不能为负"},
]
},
columns: [ columns: [
{ {
title: "分类名称", title: "分类名称",
@ -181,8 +181,6 @@ export default {
}, },
{ {
title: "状态", title: "状态",
key: "deleteFlag",
slot: "deleteFlag", slot: "deleteFlag",
}, },
{ {

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

@ -1,5 +1,3 @@
<template> <template>
<div class="ivu-shrinkable-menu"> <div class="ivu-shrinkable-menu">
<!-- 一级菜单 --> <!-- 一级菜单 -->
@ -38,6 +36,9 @@ export default {
navList() { navList() {
return this.$store.state.app.navList; return this.$store.state.app.navList;
}, },
currNav() {
return this.$store.state.app.currNav;
}
}, },
watch: { watch: {
// //
@ -45,29 +46,17 @@ export default {
handler: function (val, oldVal) { handler: function (val, oldVal) {
console.log(val); console.log(val);
} }
}, }
menuList: {
handler: function (val, oldVal) {
}
}
},
mounted() {
}, },
methods: { methods: {
changeMenu(name) { // changeMenu(name) { //
console.log(name)
this.$router.push({ this.$router.push({
name: name name: name
}); });
}, },
selectNav(name) { selectNav(name) { //
this.$store.commit("setCurrNav", name); this.$store.commit("setCurrNav", name);
this.setStore("currNav", name); this.setStore("currNav", name);
// if (this.$route.name != "home_index") {
// this.$router.push({
// name: "home_index"
// });
// }
util.initRouter(this); util.initRouter(this);
}, },
} }

View File

@ -3,9 +3,7 @@
width: 180px; width: 180px;
display: flex; display: flex;
} }
.ivu-menu-vertical .ivu-menu-item-group-title {
padding-left: 5px;
}
.ivu-btn-text:hover { .ivu-btn-text:hover {
background-color: rgba(255,255,255,.2) !important; background-color: rgba(255,255,255,.2) !important;
} }
@ -21,3 +19,8 @@
.ivu-menu-dark.ivu-menu-vertical .ivu-menu-item-active:not(.ivu-menu-submenu), .ivu-menu-dark.ivu-menu-vertical .ivu-menu-submenu-title-active:not(.ivu-menu-submenu){ .ivu-menu-dark.ivu-menu-vertical .ivu-menu-item-active:not(.ivu-menu-submenu), .ivu-menu-dark.ivu-menu-vertical .ivu-menu-submenu-title-active:not(.ivu-menu-submenu){
color: #ed3f14; color: #ed3f14;
} }
/deep/.ivu-menu-vertical .ivu-menu-item-group-title {
height: 40px;
line-height: 40px;
padding-left: 20px;
}

View File

@ -30,26 +30,22 @@
</Card> </Card>
<!-- 添加用户模态框 --> <!-- 添加用户模态框 -->
<Modal v-model="addFlag" title="添加用户"> <Modal v-model="addFlag" title="添加会员">
<Form ref="addMemberForm" :model="addMemberForm" :rules="addRule" :label-width="100"> <Form ref="addMemberForm" :model="addMemberForm" :rules="addRule" :label-width="100">
<FormItem label="手机号码" prop="mobile" style="width: 90%;"> <FormItem label="手机号码" prop="mobile" style="width: 90%;">
<Input v-model="addMemberForm.mobile" maxlength="11" placeholder="请输入手机号码" /> <Input v-model="addMemberForm.mobile" maxlength="11" placeholder="请输入手机号码" />
</FormItem> </FormItem>
<FormItem label="会员名称" prop="uname" style="width: 90%"> <FormItem label="会员名称" prop="username" style="width: 90%">
<Input v-model="addMemberForm.username" maxlength="15" placeholder="请输入会员名称" /> <Input v-model="addMemberForm.username" maxlength="15" placeholder="请输入会员名称" />
</FormItem> </FormItem>
<FormItem label="会员密码" prop="pwd" style="width: 90%"> <FormItem label="会员密码" prop="password" style="width: 90%">
<Input type="password" password v-model="addMemberForm.password" maxlength="20" placeholder="请输入会员密码" /> <Input type="password" password v-model="addMemberForm.password" maxlength="20" placeholder="请输入会员密码" />
</FormItem> </FormItem>
</Form> </Form>
<div slot="footer"> <div slot="footer">
<Button @click=" <Button @click="addFlag = false">
() => {
addFlag = false;
}
">
取消 取消
</Button> </Button>
<Button type="primary" :loading="handleAddLoading" @click="addMemberSubmit"> <Button type="primary" :loading="handleAddLoading" @click="addMemberSubmit">
@ -163,8 +159,8 @@ export default {
message: "请输入正确的手机号", message: "请输入正确的手机号",
}, },
], ],
uname: [{ required: true, message: "请输入会员名称" }], username: [{ required: true, message: "请输入会员名称" }],
pwd: [{ required: true, message: "请输入密码" }], password: [{ required: true, message: "请输入密码" }],
}, },
ruleValidate: {}, // ruleValidate: {}, //
submitLoading: false, // submitLoading: false, //
@ -421,11 +417,7 @@ export default {
}, },
addMember() { addMember() {
this.addFlag = true; this.addFlag = true;
this.addMemberForm = { this.$refs.addMemberForm.resetFields()
mobile: "",
username: "",
password: "",
};
}, },
/** /**
* 查询查看会员详情 * 查询查看会员详情
@ -460,6 +452,7 @@ export default {
if (valid) { if (valid) {
API_Member.addMember(this.addMemberForm).then((res) => { API_Member.addMember(this.addMemberForm).then((res) => {
if (res.result) { if (res.result) {
this.$refs.addMemberForm.resetFields()
this.getData(); this.getData();
this.$Message.success("添加成功!"); this.$Message.success("添加成功!");
this.addFlag = false; this.addFlag = false;

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

@ -22,7 +22,7 @@
</Select> </Select>
</Form-item> </Form-item>
<Form-item label="支付时间"> <Form-item label="支付时间">
<DatePicker v-model="searchForm" type="datetimerange" format="yyyy-MM-dd" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px"></DatePicker> <DatePicker v-model="searchForm.paymentTime" type="datetime" format="yyyy-MM-dd HH:mm:ss" clearable @on-change="changeDate" placeholder="选择支付时间" style="width: 200px"></DatePicker>
</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>
@ -53,10 +53,9 @@ export default {
pageSize: 10, // pageSize: 10, //
sort: "createTime", // sort: "createTime", //
order: "desc", // order: "desc", //
startDate: "", //
endDate: "", //
sn: "", sn: "",
payStatus: "", payStatus: "",
paymentTime: "",
}, },
columns: [ columns: [
{ {
@ -151,61 +150,30 @@ export default {
}; };
}, },
methods: { methods: {
dropDown() { //
if (this.drop) {
this.dropDownContent = "展开";
this.dropDownIcon = "ios-arrow-down";
} else {
this.dropDownContent = "收起";
this.dropDownIcon = "ios-arrow-up";
}
this.drop = !this.drop;
},
init() { init() {
this.getDataList(); this.getDataList();
}, },
//
changePage(v) { changePage(v) {
this.searchForm.pageNumber = v; this.searchForm.pageNumber = v;
this.getDataList(); this.getDataList();
}, },
//
changePageSize(v) { changePageSize(v) {
this.searchForm.pageSize = v; this.searchForm.pageSize = v;
this.getDataList(); this.getDataList();
}, },
//
handleSearch() { handleSearch() {
this.searchForm.pageNumber = 1; this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10; this.searchForm.pageSize = 10;
this.getDataList(); this.getDataList();
}, },
handleReset() { changeDate (val) { //
this.$refs.searchForm.resetFields(); this.searchForm.paymentTime = val
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.selectDate = null;
this.searchForm.startDate = "";
this.searchForm.endDate = "";
//
this.getDataList();
},
changeSort(e) {
this.searchForm.sort = e.key;
this.searchForm.order = e.order;
if (e.order === "normal") {
this.searchForm.order = "";
}
this.getDataList();
},
changeSelect(e) {
this.selectList = e;
this.selectCount = e.length;
},
selectDateRange(v) {
if (v) {
this.searchForm.startDate = v[0];
this.searchForm.endDate = v[1];
}
}, },
//
getDataList() { getDataList() {
this.loading = true; this.loading = true;
API_Order.paymentLog(this.searchForm).then((res) => { API_Order.paymentLog(this.searchForm).then((res) => {

View File

@ -23,6 +23,11 @@
type="primary" type="primary"
>订单取消</Button >订单取消</Button
> >
<Button
v-if="orderInfo.order.orderStatus === 'UNPAID'"
@click="confirmPrice"
type="success"
>收款</Button>
<Button @click="orderLog" type="primary" <Button @click="orderLog" type="primary"
>订单日志</Button >订单日志</Button
> >
@ -571,6 +576,25 @@ export default {
this.showRegion = true; this.showRegion = true;
this.regionId = ""; this.regionId = "";
}, },
//
confirmPrice() {
this.$Modal.confirm({
title: "提示",
content:
"<p>您确定要收款吗?线下收款涉及库存变更,需异步进行,等待约一分钟刷新列表查看</p>",
onOk: () => {
API_Order.orderPay(this.sn).then((res) => {
if (res.success) {
this.$Message.success("收款成功");
this.getDataList();
} else {
this.$Message.error(res.message);
}
});
},
});
},
//
getDataList() { getDataList() {
this.loading = true; this.loading = true;
API_Order.orderDetail(this.sn).then((res) => { API_Order.orderDetail(this.sn).then((res) => {

View File

@ -1,43 +1,38 @@
<template> <template>
<div class="search"> <div class="search">
<Card> <Card>
<Form ref="searchForm" @keydown.enter.native="handleSearch" :model="searchForm" inline :label-width="70" class="search-form">
<Form-item label="订单号" prop="orderSn">
<Input type="text" v-model="searchForm.orderSn" placeholder="请输入订单号" clearable style="width: 160px" />
</Form-item>
<Form-item label="会员名称" prop="buyerName">
<Input type="text" v-model="searchForm.buyerName" placeholder="请输入会员名称" clearable style="width: 160px" />
</Form-item>
<Row @keydown.enter.native="handleSearch"> <Form-item label="订单类型" prop="orderType">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> <Select v-model="searchForm.orderType" placeholder="请选择" clearable style="width: 160px">
<Form-item label="订单号" prop="orderSn"> <Option value="NORMAL">普通订单</Option>
<Input type="text" v-model="searchForm.orderSn" placeholder="请输入订单号" clearable style="width: 160px" /> <Option value="PINTUAN">拼团订单</Option>
</Form-item> <Option value="GIFT">赠品订单</Option>
<Form-item label="会员名称" prop="buyerName"> <Option value="VIRTUAL">核验订单</Option>
<Input type="text" v-model="searchForm.buyerName" placeholder="请输入会员名称" clearable style="width: 160px" /> </Select>
</Form-item> </Form-item>
<Form-item label="订单状态" prop="orderStatus">
<Form-item label="订单类型" prop="orderType"> <Select v-model="searchForm.orderStatus" placeholder="请选择" clearable style="width: 160px">
<Select v-model="searchForm.orderType" placeholder="请选择" clearable style="width: 160px"> <Option value="UNPAID">未付款</Option>
<Option value="NORMAL">普通订单</Option> <Option value="PAID">已付款</Option>
<Option value="PINTUAN">拼团订单</Option> <Option value="UNDELIVERED">待发货</Option>
<Option value="GIFT">赠品订单</Option> <Option value="DELIVERED">已发货</Option>
<Option value="VIRTUAL">核验订单</Option> <Option value="COMPLETED">已完成</Option>
</Select> <Option value="TAKE">待核验</Option>
</Form-item> <Option value="CANCELLED">已取消</Option>
<Form-item label="订单状态" prop="orderStatus"> </Select>
<Select v-model="searchForm.orderStatus" placeholder="请选择" clearable style="width: 160px"> </Form-item>
<Option value="UNPAID">未付款</Option> <Form-item label="下单时间">
<Option value="PAID">已付款</Option> <DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 160px"></DatePicker>
<Option value="UNDELIVERED">待发货</Option> </Form-item>
<Option value="DELIVERED">已发货</Option> <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
<Option value="COMPLETED">已完成</Option> </Form>
<Option value="TAKE">待核验</Option>
<Option value="CANCELLED">已取消</Option>
</Select>
</Form-item>
<Form-item label="下单时间">
<DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 160px"></DatePicker>
</Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form>
</Row>
<div> <div>
<download-excel class="export-excel-wrapper" :data="data" :fields="fields" name="商品订单.xls"> <download-excel class="export-excel-wrapper" :data="data" :fields="fields" name="商品订单.xls">
<Button type="info" class="export"> <Button type="info" class="export">
@ -212,20 +207,13 @@ export default {
title: "操作", title: "操作",
key: "action", key: "action",
align: "center", align: "center",
width: 150, width: 100,
render: (h, params) => { render: (h, params) => {
return h("div", [h("Button", {props: {type: "primary", size: "small",}, return h("Button", {props: {type: "info", size: "small",},
attrs: {disabled: params.row.orderStatus == "UNPAID" ? false : true,},
style: {marginRight: "5px",}, style: {marginRight: "5px",},
on: {click: () => {this.confirmPrice(params.row);},}, on: {click: () => {this.detail(params.row);},},
}, "收款" }, "查看"
), )
h("Button", {props: {type: "info", size: "small",},
style: {marginRight: "5px",},
on: {click: () => {this.detail(params.row);},},
}, "查看"
),
]);
}, },
}, },
], ],
@ -291,25 +279,7 @@ export default {
this.total = this.data.length; this.total = this.data.length;
this.loading = false; this.loading = false;
}, },
// //
confirmPrice(v) {
this.$Modal.confirm({
title: "提示",
content:
"<p>您确定要收款吗?线下收款涉及库存变更,需异步进行,等待约一分钟刷新列表查看</p>",
onOk: () => {
API_Order.orderPay(v.sn).then((res) => {
if (res.success) {
this.$Message.success("收款成功");
this.getDataList();
} else {
this.$Message.error(res.message);
}
});
},
});
},
detail(v) { detail(v) {
let sn = v.sn; let sn = v.sn;
this.$router.push({ this.$router.push({

View File

@ -1,35 +1,32 @@
<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> <Form-item label="活动状态" prop="promotionStatus">
<Form-item label="活动状态" prop="promotionStatus"> <Select v-model="searchForm.promotionStatus" placeholder="请选择" clearable style="width: 200px">
<Select v-model="searchForm.promotionStatus" placeholder="请选择" clearable style="width: 200px"> <Option value="NEW">未开始</Option>
<Option value="NEW">未开始</Option> <Option value="START">已开始/上架</Option>
<Option value="START">已开始/上架</Option> <Option value="END">已结束/下架</Option>
<Option value="END">已结束/下架</Option> <Option value="CLOSE">紧急关闭/作废</Option>
<Option value="CLOSE">紧急关闭/作废</Option> </Select>
</Select> </Form-item>
</Form-item> <Form-item label="活动时间">
<Form-item label="活动时间"> <DatePicker v-model="selectDate" type="daterange" clearable placeholder="选择起始时间" style="width: 200px"></DatePicker>
<DatePicker v-model="selectDate" type="daterange" clearable placeholder="选择起始时间" style="width: 200px"></DatePicker> </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 class="operation padding-row" v-if="getType !== 'ACTIVITY'">
</Row>
<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,index }" slot="action"> <template slot-scope="{ row }" slot="action">
<Button v-if="!checked && row.promotionStatus === 'NEW' || row.promotionStatus === 'CLOSE'" type="primary" size="small" style="margin-right: 10px" @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" style="margin-right: 10px" @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>
@ -121,7 +118,7 @@ export default {
render: (h, params) => { render: (h, params) => {
return h( return h(
"div", "div",
params.row.receivedNum + "/" + params.row.publishNum params.row.receivedNum + "/" + (params.row.publishNum === 0 ? '不限制' : params.row.publishNum)
); );
}, },
@ -215,20 +212,15 @@ export default {
slot: "action", slot: "action",
align: "center", align: "center",
fixed: "right", fixed: "right",
maxWidth: 140, width: 130,
}, },
], ],
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

@ -68,7 +68,7 @@
</div> </div>
<div v-if="rangeTimeType == 1"> <div v-if="rangeTimeType == 1">
<DatePicker type="datetimerange" v-model="form.rangeTime" format="yyyy-MM-dd HH:mm:ss" placeholder="请选择" <DatePicker type="datetimerange" v-model="form.rangeTime" format="yyyy-MM-dd HH:mm:ss" placeholder="请选择"
:options="options" style="width: 260px"> :options="options" style="width: 260px">
</DatePicker> </DatePicker>
</div> </div>
<div class="effectiveDays" v-if="rangeTimeType == 0"> <div class="effectiveDays" v-if="rangeTimeType == 0">
@ -100,8 +100,8 @@
<FormItem v-if="form.scopeType == 'PORTION_GOODS_CATEGORY'"> <FormItem v-if="form.scopeType == 'PORTION_GOODS_CATEGORY'">
<Cascader @on-change="getGoodsCategory" :data="goodsCategoryList" style="width:300px;" <Cascader :data="goodsCategoryList" style="width:260px;"
v-model="form.scopeIdGoods"></Cascader> v-model="form.scopeIdGoods"></Cascader>
</FormItem> </FormItem>
<div> <div>
@ -127,7 +127,7 @@ import {regular} from "@/utils";
import skuSelect from "@/views/lili-dialog"; import skuSelect from "@/views/lili-dialog";
export default { export default {
name: "addCoupon", name: "edit-platform-coupon",
components: { components: {
skuSelect, skuSelect,
}, },
@ -140,6 +140,14 @@ export default {
}, },
deep: true, deep: true,
}, },
$route(e) { //
this.id = e.query.id;
if (this.id) {
this.getCoupon()
} else {
this.$refs.form.resetFiles()
}
}
}, },
data() { data() {
const checkPrice = (rule, value, callback) => { const checkPrice = (rule, value, callback) => {
@ -165,7 +173,7 @@ export default {
} }
}; };
return { return {
rangeTimeType: 1, rangeTimeType: 1, //
modalType: 0, // modalType: 0, //
form: { form: {
/** 店铺承担比例 */ /** 店铺承担比例 */
@ -221,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: "请输入范围描述"}],
}, },
@ -289,7 +297,7 @@ export default {
}, },
}; };
}, },
async mounted() { async mounted () {
await this.getCagetoryList(); await this.getCagetoryList();
// id // id
if (this.id) { if (this.id) {
@ -495,7 +503,7 @@ export default {
async getCagetoryList() { async getCagetoryList() {
// //
let data = await getCategoryTree(); let data = await getCategoryTree();
this.goodsCategoryList = this.filterCategory(data.result); this.goodsCategoryList = data.result;
// //
this.goodsCategoryList = this.goodsCategoryList.map((item) => { this.goodsCategoryList = this.goodsCategoryList.map((item) => {
@ -523,18 +531,7 @@ export default {
} }
return {value: item.id, label: item.name, children: item.children}; return {value: item.id, label: item.name, children: item.children};
}); });
}, console.log(this.goodsCategoryList);
filterCategory(list) {
// children
list.forEach((item) => {
if (item.children.length == 0) {
delete item.children;
} else {
this.filterCategory(item.children);
}
});
return list;
}, },
filterCategoryId(list, idArr) { filterCategoryId(list, idArr) {
// id // id

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

@ -7,7 +7,7 @@
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"> <Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom">
<template slot-scope="{ row,index }" slot="action"> <template slot-scope="{ row,index }" slot="action">
<Button type="primary" <Button type="info"
size="small" style="margin-right: 10px" @click="info(row)">查看 size="small" style="margin-right: 10px" @click="info(row)">查看
</Button> </Button>
<Button v-if="!checked && row.promotionStatus === 'START' || row.promotionStatus === 'NEW'" type="error" <Button v-if="!checked && row.promotionStatus === 'START' || row.promotionStatus === 'NEW'" type="error"

View File

@ -275,14 +275,13 @@ export default {
this.reSelectCoupon(); this.reSelectCoupon();
}, },
reSelectCoupon() { reSelectCoupon() {
// //
this.form.couponActivityItems = this.selectCouponList.map((item) => { this.form.couponActivityItems = this.selectCouponList.map((item) => {
return { return {
num: 0, num: 0,
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

@ -8,7 +8,7 @@
<!-- 遮罩层 --> <!-- 遮罩层 -->
<div v-if="isRead" class="mask"></div> <div v-if="isRead" class="mask"></div>
<div> <div>
<FormItem label="会员名称" required prop="memberName"> <FormItem label="会员名称" prop="memberName">
<div class="item"> <div class="item">
<Input disabled v-model="shopForm.memberName" /> <Input disabled v-model="shopForm.memberName" />
<Button @click="selectMember()" v-if="!$route.query.shopId"></Button> <Button @click="selectMember()" v-if="!$route.query.shopId"></Button>
@ -44,7 +44,7 @@
<FormItem label="店铺所在地" prop="storeAddressPath"> <FormItem label="店铺所在地" prop="storeAddressPath">
<Input disabled v-model="shopForm.storeAddressPath" style="width: 350px" /> <Input disabled v-model="shopForm.storeAddressPath" style="width: 350px" />
</FormItem> </FormItem>
<FormItem label="店铺详细地址" required prop="storeAddressDetail"> <FormItem label="店铺详细地址" prop="storeAddressDetail">
<Input v-model="shopForm.storeAddressDetail" clearable style="width: 350px" /> <Input v-model="shopForm.storeAddressDetail" clearable style="width: 350px" />
</FormItem> </FormItem>
@ -91,60 +91,60 @@
<div v-if="isRead" class="mask"></div> <div v-if="isRead" class="mask"></div>
<Divider orientation="left">公司信息</Divider> <Divider orientation="left">公司信息</Divider>
<div> <div>
<FormItem label="公司名称" required prop="companyName"> <FormItem label="公司名称" prop="companyName">
<Input v-model="shopForm.companyName" clearable style="width: 350px" /> <Input v-model="shopForm.companyName" clearable style="width: 350px" />
</FormItem> </FormItem>
<FormItem label="公司电话" required prop="companyPhone"> <FormItem label="公司电话" prop="companyPhone">
<Input v-model="shopForm.companyPhone" clearable style="width: 350px" /> <Input v-model="shopForm.companyPhone" clearable style="width: 350px" />
</FormItem> </FormItem>
<FormItem label="公司所在地" required> <FormItem label="公司所在地" >
<Input v-model="shopForm.companyAddressPath" disabled style="width: 260px" v-if="showRegion == false" /> <Input v-model="shopForm.companyAddressPath" disabled style="width: 260px" v-if="showRegion == false" />
<Button v-if="showRegion == false" @click="regionClick" :loading="submitLoading" type="primary" icon="ios-create-outline" style="margin-left: 8px"> <Button v-if="showRegion == false" @click="regionClick" :loading="submitLoading" type="primary" icon="ios-create-outline" style="margin-left: 8px">
</Button> </Button>
<region style="width: 350px" @selected="selectedRegion" v-if="showRegion == true" /> <region style="width: 350px" @selected="selectedRegion" v-if="showRegion == true" />
</FormItem> </FormItem>
<FormItem label="公司详细地址" required prop="companyAddress"> <FormItem label="公司详细地址" prop="companyAddress">
<Input v-model="shopForm.companyAddress" clearable style="width: 350px" /> <Input v-model="shopForm.companyAddress" clearable style="width: 350px" />
</FormItem> </FormItem>
<FormItem label="员工总数" required prop="employeeNum"> <FormItem label="员工总数" prop="employeeNum">
<InputNumber style="width: 150px" :min="1" :max="9999999" v-model="shopForm.employeeNum"> <InputNumber style="width: 150px" :min="1" :max="9999999" v-model="shopForm.employeeNum">
</InputNumber> </InputNumber>
</FormItem> </FormItem>
<FormItem label="注册资金" required prop="registeredCapital"> <FormItem label="注册资金" prop="registeredCapital">
<InputNumber style="width: 150px" :min="1" :max="9999999" v-model="shopForm.registeredCapital"> <InputNumber style="width: 150px" :min="1" :max="9999999" v-model="shopForm.registeredCapital">
</InputNumber> </InputNumber>
<span style="margin-left: 10px"></span> <span style="margin-left: 10px"></span>
</FormItem> </FormItem>
<FormItem label="联系人姓名" required prop="linkName"> <FormItem label="联系人姓名" prop="linkName">
<Input v-model="shopForm.linkName" clearable style="width: 200px" /> <Input v-model="shopForm.linkName" clearable style="width: 200px" />
</FormItem> </FormItem>
<FormItem label="联系人手机" required prop="linkPhone"> <FormItem label="联系人手机" prop="linkPhone">
<Input v-model="shopForm.linkPhone" maxlength="11" clearable style="width: 200px" /> <Input v-model="shopForm.linkPhone" maxlength="11" clearable style="width: 200px" />
</FormItem> </FormItem>
<FormItem label="电子邮箱" required prop="companyEmail"> <FormItem label="电子邮箱" prop="companyEmail">
<Input v-model="shopForm.companyEmail" clearable style="width: 200px" /> <Input v-model="shopForm.companyEmail" clearable style="width: 200px" />
</FormItem> </FormItem>
<Divider orientation="left">营业执照信息</Divider> <Divider orientation="left">营业执照信息</Divider>
<FormItem label="营业执照号" required prop="licenseNum"> <FormItem label="营业执照号" prop="licenseNum">
<Input v-model="shopForm.licenseNum" clearable style="width: 200px" /> <Input v-model="shopForm.licenseNum" clearable style="width: 200px" />
</FormItem> </FormItem>
<FormItem label="法定经营范围" required prop="scope"> <FormItem label="法定经营范围" prop="scope">
<Input v-model="shopForm.scope" clearable style="width: 200px" /> <Input v-model="shopForm.scope" clearable style="width: 200px" />
</FormItem> </FormItem>
<Divider orientation="left">法人信息</Divider> <Divider orientation="left">法人信息</Divider>
<FormItem label="法人姓名" required prop="legalName"> <FormItem label="法人姓名" prop="legalName">
<Input v-model="shopForm.legalName" clearable style="width: 200px" /> <Input v-model="shopForm.legalName" clearable style="width: 200px" />
</FormItem> </FormItem>
<FormItem label="法人证件号" required prop="legalId"> <FormItem label="法人证件号" prop="legalId">
<Input v-model="shopForm.legalId" clearable style="width: 200px" /> <Input v-model="shopForm.legalId" clearable style="width: 200px" />
</FormItem> </FormItem>
<FormItem label="法人身份证照片" required ref="legalPhoto"> <FormItem label="法人身份证照片" ref="legalPhoto">
<Avatar style="height: 100px;width: 100px" v-if="shopForm.legalPhoto" shape="square" icon="ios-person" size="default" :src="shopForm.legalPhoto" /> <Avatar style="height: 100px;width: 100px" v-if="shopForm.legalPhoto" shape="square" icon="ios-person" size="default" :src="shopForm.legalPhoto" />
<div> <div>
<Button @click="handleCLickImg('legalPhoto')" type="primary">选择图片</Button> <Button @click="handleCLickImg('legalPhoto')" type="primary">选择图片</Button>
@ -152,20 +152,20 @@
</FormItem> </FormItem>
<Divider orientation="left">结算银行信息</Divider> <Divider orientation="left">结算银行信息</Divider>
<FormItem label="银行开户名" required prop="settlementBankAccountName"> <FormItem label="银行开户名" prop="settlementBankAccountName">
<Input v-model="shopForm.settlementBankAccountName" clearable style="width: 200px" /> <Input v-model="shopForm.settlementBankAccountName" clearable style="width: 200px" />
</FormItem> </FormItem>
<FormItem label="银行账号" required prop="settlementBankAccountNum"> <FormItem label="银行账号" prop="settlementBankAccountNum">
<Input v-model="shopForm.settlementBankAccountNum" clearable style="width: 200px" /> <Input v-model="shopForm.settlementBankAccountNum" clearable style="width: 200px" />
</FormItem> </FormItem>
<FormItem label="银行支行名称" required prop="settlementBankBranchName"> <FormItem label="银行支行名称" prop="settlementBankBranchName">
<Input v-model="shopForm.settlementBankBranchName" clearable style="width: 200px" /> <Input v-model="shopForm.settlementBankBranchName" clearable style="width: 200px" />
</FormItem> </FormItem>
<FormItem label="支行联行号" required prop="settlementBankJointName"> <FormItem label="支行联行号" prop="settlementBankJointName">
<Input v-model="shopForm.settlementBankJointName" clearable style="width: 200px" /> <Input v-model="shopForm.settlementBankJointName" clearable style="width: 200px" />
</FormItem> </FormItem>
<FormItem label="许可证电子版" required> <FormItem label="许可证电子版" >
<Avatar style="height: 100px;width: 100px" v-if="shopForm.licencePhoto" shape="square" icon="ios-person" size="default" :src="shopForm.licencePhoto" /> <Avatar style="height: 100px;width: 100px" v-if="shopForm.licencePhoto" shape="square" icon="ios-person" size="default" :src="shopForm.licencePhoto" />
<div> <div>
<Button @click="handleCLickImg('licencePhoto')" type="primary">选择图片</Button> <Button @click="handleCLickImg('licencePhoto')" type="primary">选择图片</Button>
@ -262,28 +262,28 @@ export default {
shopValidate: { shopValidate: {
// //
memberName: [ memberName: [
{ required: true, message: "会员不能为空", trigger: "blur" }, { required: true, message: "会员不能为空" },
], ],
storeName: [ storeName: [
{ required: true, message: "店铺名称不能为空", trigger: "blur" }, { required: true, message: "店铺名称不能为空" },
], ],
companyAddress: [ companyAddress: [
{ required: true, message: "公司地址不能为空", trigger: "blur" }, { required: true, message: "公司地址不能为空" },
], ],
storeAddressDetail: [ storeAddressDetail: [
{ required: true, message: "店铺详细地址不能为空", trigger: "blur" }, { required: true, message: "店铺详细地址不能为空" },
], ],
storeDesc: [ storeDesc: [
{ required: true, message: "店铺简介不能为空", trigger: "blur" }, { required: true, message: "店铺简介不能为空" },
], ],
storeCenter: [ storeCenter: [
{ required: true, message: "店铺未定位", trigger: "change" }, { required: true, message: "店铺未定位" },
], ],
companyName: [ companyName: [
{ required: true, message: "公司名称不能为空", trigger: "blur" }, { required: true, message: "公司名称不能为空", },
], ],
companyPhone: [ companyPhone: [
{ required: true, message: "公司电话不能为空", trigger: "blur" }, { required: true, message: "公司电话不能为空", },
], ],
employeeNum: [ employeeNum: [
{ {
@ -302,10 +302,10 @@ export default {
}, },
], ],
linkName: [ linkName: [
{ required: true, message: "联系人姓名不能为空", trigger: "blur" }, { required: true, message: "联系人姓名不能为空", },
], ],
linkPhone: [ linkPhone: [
{ required: true, message: "联系人手机号不能为空", trigger: "blur" }, { required: true, message: "联系人手机号不能为空", },
{ {
type: "string", type: "string",
pattern: /^1[3|4|5|6|7|8][0-9]{9}$/, pattern: /^1[3|4|5|6|7|8][0-9]{9}$/,
@ -314,32 +314,32 @@ export default {
}, },
], ],
companyEmail: [ companyEmail: [
{ required: true, message: "邮箱不能为空", trigger: "blur" }, { required: true, message: "邮箱不能为空", },
{ type: "email", message: "邮箱格式错误", trigger: "blur" }, { type: "email", message: "邮箱格式错误", },
], ],
licenseNum: [ licenseNum: [
{ required: true, message: "营业执照号不能为空", trigger: "blur" }, { required: true, message: "营业执照号不能为空", },
], ],
scope: [ scope: [
{ required: true, message: "法定经营范围不能为空", trigger: "blur" }, { required: true, message: "法定经营范围不能为空", },
], ],
legalName: [ legalName: [
{ required: true, message: "法人姓名不能为空", trigger: "blur" }, { required: true, message: "法人姓名不能为空", },
], ],
legalId: [ legalId: [
{ required: true, message: "法人证件号不能为空", trigger: "blur" }, { required: true, message: "法人证件号不能为空", },
], ],
settlementBankAccountName: [ settlementBankAccountName: [
{ required: true, message: "银行开户名不能为空", trigger: "blur" }, { required: true, message: "银行开户名不能为空", },
], ],
settlementBankAccountNum: [ settlementBankAccountNum: [
{ required: true, message: "银行账号不能为空", trigger: "blur" }, { required: true, message: "银行账号不能为空", },
], ],
settlementBankBranchName: [ settlementBankBranchName: [
{ required: true, message: "银行支行名称不能为空", trigger: "blur" }, { required: true, message: "银行支行名称不能为空", },
], ],
settlementBankJointName: [ settlementBankJointName: [
{ required: true, message: "支行联行号不能为空", trigger: "blur" }, { required: true, message: "支行联行号不能为空", },
], ],
salesConsigneeMobile: [ salesConsigneeMobile: [
{ {

View File

@ -12,13 +12,7 @@
<Input type='number' v-model="formValidate.autoReceive"> <Input type='number' v-model="formValidate.autoReceive">
<span slot="append"></span> <span slot="append"></span>
</Input> </Input>
<span class="desc">收货后订单完成</span>
</FormItem>
<FormItem label="订单自动完成" prop="autoComplete">
<Input type='number' v-model="formValidate.autoComplete">
<span slot="append"></span>
</Input>
</FormItem> </FormItem>
<FormItem label="自动评价" prop="autoEvaluation"> <FormItem label="自动评价" prop="autoEvaluation">
@ -27,11 +21,17 @@
</Input> </Input>
</FormItem> </FormItem>
<FormItem label="售后自动取消" prop="autoCancelAfterSale"> <FormItem label="已完成订单允许退单" prop="closeAfterSale">
<Input type='number' v-model="formValidate.autoCancelAfterSale"> <Input type='number' v-model="formValidate.closeAfterSale">
<span slot="append"></span> <span slot="append"></span>
</Input> </Input>
<span class="desc">如果天数为0,则不允许退单</span>
</FormItem>
<FormItem label="已完成订单允许投诉" prop="closeComplaint">
<Input type='number' v-model="formValidate.closeComplaint">
<span slot="append"></span>
</Input>
<span class="desc">如果天数为0,则不允许投诉</span>
</FormItem> </FormItem>
<div class="label-btns"> <div class="label-btns">
@ -50,10 +50,10 @@ export default {
ruleValidate: {}, // ruleValidate: {}, //
formValidate: { // formValidate: { //
autoCancel: "", autoCancel: "",
autoComplete: "",
autoEvaluation: "", autoEvaluation: "",
autoReceive: "", autoReceive: "",
autoCancelAfterSale: "", closeAfterSale: "",
closeComplaint:""
}, },
}; };
}, },
@ -121,4 +121,8 @@ export default {
/deep/ .ivu-input { /deep/ .ivu-input {
width: 100px !important; width: 100px !important;
} }
.desc {
font-size: 12px;
color: #999;
}
</style> </style>

View File

@ -18,14 +18,14 @@ export default {
* @description api请求基础路径 * @description api请求基础路径
*/ */
api_dev: { api_dev: {
common: 'https://common-api.pickmall.cn', // common: 'https://common-api.pickmall.cn',
buyer: 'https://buyer-api.pickmall.cn', // buyer: 'https://buyer-api.pickmall.cn',
seller: 'https://store-api.pickmall.cn', // seller: 'https://store-api.pickmall.cn',
manager: 'https://admin-api.pickmall.cn', // manager: 'https://admin-api.pickmall.cn',
// common: 'http://192.168.0.109:8890', common: 'http://192.168.0.103:8890',
// buyer: 'http://192.168.0.109:8888', buyer: 'http://192.168.0.103:8888',
// seller: 'http://192.168.0.109:8889', seller: 'http://192.168.0.103:8889',
// manager: 'http://192.168.0.109:8887' manager: 'http://192.168.0.103:8887'
}, },
api_prod: { api_prod: {

View File

@ -0,0 +1,3 @@
import Vue from "vue";
export default new Vue;

View File

@ -77,10 +77,6 @@
} }
} }
/*平铺*/
div.base-info-item > div {
margin-left: 5%;
}
div.base-info-item { div.base-info-item {
h4 { h4 {
@ -94,13 +90,15 @@ div.base-info-item {
line-height: 40px; line-height: 40px;
text-align: left; text-align: left;
} }
>div{
padding-left: 5%;
}
.form-item-view { .form-item-view {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: flex-start; align-items: flex-start;
justify-content: space-between; justify-content: space-between;
padding-left: 80px; // padding-left: 80px;
.layout { .layout {
margin-bottom: 20px; margin-bottom: 20px;
@ -282,34 +280,13 @@ div.base-info-item {
word-break: break-all; word-break: break-all;
} }
/deep/ .ivu-steps {
width: 100% !important;
display: flex;
}
.step-list { .step-list {
height: 60px; height: 60px;
padding: 10px 30px;
background-color: #fff;
margin-bottom: 20px; margin-bottom: 20px;
border-radius: 0.8em; border-radius: 0.8em;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
// box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04)
}
.step-view {
flex: 1;
height: 60px;
font-size: 19px;
text-align: center;
display: flex;
background-color: #fff;
justify-content: center;
align-items: center;
}
.step-view:nth-of-type(1) {
border-top-left-radius: 0.4em;
border-bottom-left-radius: 0.4em;
}
.step-view:nth-last-child(1) {
border-top-right-radius: 0.4em;
border-bottom-right-radius: 0.4em;
} }
.add-sku-btn { .add-sku-btn {

View File

@ -59,8 +59,6 @@
:data="data" :data="data"
ref="table" ref="table"
sortable="custom" sortable="custom"
@on-sort-change="changeSort"
@on-selection-change="changeSelect"
></Table> ></Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
@ -77,29 +75,6 @@
></Page> ></Page>
</Row> </Row>
</Card> </Card>
<Modal
:title="modalTitle"
v-model="modalVisible"
:mask-closable="false"
:width="500"
>
<Form
ref="underForm"
:model="underForm"
:label-width="100"
:rules="formValidate"
>
<FormItem label="下架原因" prop="reason">
<Input v-model="underForm.reason" clearable style="width: 100%" />
</FormItem>
</Form>
<div slot="footer">
<Button type="text" @click="modalVisible = false">取消</Button>
<Button type="primary" :loading="submitLoading" @click="lower(form.id)"
>提交</Button
>
</div>
</Modal>
</div> </div>
</template> </template>
@ -110,11 +85,7 @@ export default {
components: {}, components: {},
data() { data() {
return { return {
id: "", //id
openSearch: true, //
loading: true, // loading: true, //
modalVisible: false, //
modalTitle: "", //
drop: false, drop: false,
dropDownContent: "展开", dropDownContent: "展开",
dropDownIcon: "ios-arrow-down", dropDownIcon: "ios-arrow-down",
@ -124,24 +95,8 @@ export default {
pageSize: 10, // pageSize: 10, //
sort: "create_time", // sort: "create_time", //
order: "desc", // order: "desc", //
saveType: "TEMPLATE"
}, },
underForm: { //
reason: "",
},
form: {
//
goodsName: "",
sn: "",
marketEnable: "",
price: "",
sellerName: "",
},
//
formValidate: {},
submitLoading: false, //
selectList: [], //
selectCount: 0, //
columns: [ // columns: [ //
{ {
title: "ID", title: "ID",
@ -202,7 +157,7 @@ export default {
"Button", "Button",
{ {
props: { props: {
type: "primary", type: "success",
size: "small", size: "small",
}, },
style: { style: {
@ -244,22 +199,14 @@ export default {
}, },
methods: { methods: {
init() { init() {
let here = this.$route.matched.find((v) => v.name === this.$route.name);
this.pageType = here.props.default ? here.props.default.type : "";
if (this.pageType === "TEMPLATE") {
this.searchForm.saveType = "TEMPLATE";
} else {
this.searchForm.saveType = "DRAFT";
}
this.getDataList(); this.getDataList();
}, },
//
editGoods(v) { editGoods(v) {
this.searchForm.saveType === "TEMPLATE" ? this.$router.push({ name: "goods-template-operation-edit", query: { draftId: v.id } })
this.$router.push({ name: "goods-template-operation-edit", query: { draftId: v.id } }):
this.$router.push({ name: "goods-draft-operation-edit", query: { draftId: v.id } });
}, },
removeDraft (id) { removeDraft (id) {
let showType = this.searchForm.saveType === "TEMPLATE" ? "模版" : "草稿"; let showType = "模版";
this.$Modal.confirm({ this.$Modal.confirm({
title: "确认审核", title: "确认审核",
content: "您确认要删除id为 " + id + " 的" + showType + "吗?", content: "您确认要删除id为 " + id + " 的" + showType + "吗?",
@ -278,7 +225,6 @@ export default {
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;
@ -296,21 +242,6 @@ export default {
// //
this.getDataList(); 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;
this.selectCount = e.length;
},
dropDown() { dropDown() {
if (this.drop) { if (this.drop) {
this.dropDownContent = "展开"; this.dropDownContent = "展开";

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,216 @@
<template>
<div>
<!-- 选择商品类型 -->
<Modal v-model="selectGoodsType" width="550" :closable="false">
<div class="goods-type-list" v-if="!showGoodsTemplates">
<div class="goods-type-item" :class="{'active-goods-type':item.check}" @click="handleClickGoodsType(item)"
v-for="(item,index) in goodsTypeWay" :key="index">
<img :src="item.img"/>
<div>
<h2>{{ item.title }}</h2>
<p>{{ item.desc }}</p>
</div>
</div>
</div>
<div v-else class="goods-type-list">
<h2 @click="showGoodsTemplates = !showGoodsTemplates">返回</h2>
<div class="goods-type-item template-item" @click="handleClickGoodsTemplate(item)"
v-for="(item,tempIndex) in goodsTemplates" :key="tempIndex">
<img :src="item.thumbnail" />
<div>
<h2>{{ item.goodsName }}</h2>
<p>{{ item.sellingPoint || '' }}</p>
</div>
</div>
</div>
</Modal>
<!-- 商品分类 -->
<div class="content-goods-publish">
<div class="goods-category">
<ul v-if="categoryListLevel1.length > 0">
<li v-for="(item, index) in categoryListLevel1" :class="{ activeClass: category[0].name === item.name }"
@click="handleSelectCategory(item, index, 1)" :key="index">
<span>{{ item.name }}</span>
<span>&gt;</span>
</li>
</ul>
<ul v-if="categoryListLevel2.length > 0">
<li v-for="(item, index) in categoryListLevel2" :class="{ activeClass: category[1].name === item.name }"
@click="handleSelectCategory(item, index, 2)" :key="index">
<span>{{ item.name }}</span>
<span>&gt;</span>
</li>
</ul>
<ul v-if="categoryListLevel3.length > 0">
<li v-for="(item, index) in categoryListLevel3" :class="{ activeClass: category[2].name === item.name }"
@click="handleSelectCategory(item, index, 3)" :key="index">
<span>{{ item.name }}</span>
</li>
</ul>
</div>
<p class="current-goods-category">
您当前选择的商品类别是
<span>{{ category[0].name }}</span>
<span v-show="category[1].name">> {{ category[1].name }}</span>
<span v-show="category[2].name">> {{ category[2].name }}</span>
</p>
<template v-if="selectedTemplate.goodsName">
<Divider>已选商品模版:{{selectedTemplate.goodsName}}</Divider>
</template>
</div>
<!-- 底部按钮 -->
<div class="footer">
<ButtonGroup>
<Button type="primary" @click="selectGoodsType = true">商品类型</Button>
<Button type="primary" @click="next"></Button>
</ButtonGroup>
</div>
</div>
</template>
<script>
import * as API_GOODS from "@/api/goods";
export default {
data() {
return {
selectedTemplate: {}, //
selectGoodsType: false, // modal
goodsTemplates: [], //
showGoodsTemplates: false, //
goodsTypeWay: [
{
title: "实物商品",
img: require("@/assets/goodsType1.png"),
desc: "零售批发,物流配送",
type: "PHYSICAL_GOODS",
check: false,
},
{
title: "虚拟商品",
img: require("@/assets/goodsType2.png"),
desc: "虚拟核验,无需物流",
type: "VIRTUAL_GOODS",
check: false,
},
{
title: "商品模板导入",
img: require("@/assets/goodsTypeTpl.png"),
desc: "商品模板,一键导入",
check: false,
},
],
//
category: [
{name: '', id: ''},
{name: '', id: ''},
{name: '', id: ''}
],
//
goodsType: '',
/** 1级分类列表*/
categoryListLevel1: [],
/** 2级分类列表*/
categoryListLevel2: [],
/** 3级分类列表*/
categoryListLevel3: [],
}
},
methods: {
//
handleClickGoodsType(val) {
this.goodsTypeWay.map((item) => {
return (item.check = false);
});
val.check = !val.check;
if (!val.type) {
this.GET_GoodsTemplate()
this.showGoodsTemplates = true;
} else {
this.goodsType = val.type;
this.selectedTemplate = {}
}
},
//
handleClickGoodsTemplate(val) {
console.log(val);
this.selectedTemplate = val;
this.selectGoodsType = false;
this.$emit('change', {tempId: val.id})
},
//
GET_GoodsTemplate() {
let searchParams = {
saveType: "TEMPLATE",
sort: "create_time",
order: "desc"
};
API_GOODS.getDraftGoodsListData(searchParams).then((res) => {
if (res.success) {
this.goodsTemplates = res.result.records;
}
});
},
/** 选择商城商品分类 */
handleSelectCategory(row, index, level) {
if (level === 1) {
this.category.forEach(cate => {
cate.name = '',
cate.id = ''
})
this.category[0].name = row.name;
this.category[0].id = row.id;
this.categoryListLevel2 = this.categoryListLevel1[index].children;
this.categoryListLevel3 = [];
} else if (level === 2) {
this.category[1].name = row.name;
this.category[1].id = row.id;
this.category[2].name = '';
this.category[2].id = '';
this.categoryListLevel3 = this.categoryListLevel2[index].children;
} else {
this.category[2].name = row.name
this.category[2].id = row.id
}
},
/** 查询下一级 商城商品分类*/
GET_NextLevelCategory(row) {
const _id = row && row.id !== 0 ? row.id : 0;
API_GOODS.getGoodsCategoryAll().then((res) => {
if (res.success && res.result) {
this.categoryListLevel1 = res.result;
}
});
},
//
next() {
window.scrollTo(0, 0);
if (!this.goodsType && !this.selectedTemplate.goodsName) {
this.$Message.error('请选择商品类型')
return
}
if (!this.category[0].name) {
this.$Message.error("请选择商品分类");
return;
} else if (!this.category[2].name) {
this.$Message.error("必须选择到三级分类");
return;
} else if (this.category[2].name) {
if (this.selectedTemplate.id) {
this.$emit('change',{tempId: this.selectedTemplate.id})
} else {
this.$emit('change',{category: this.category,goodsType:this.goodsType})
}
}
},
},
mounted () {
this.GET_NextLevelCategory()
}
}
</script>
<style lang="scss" scoped>
@import "./addGoods.scss";
</style>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,37 @@
<template>
<div class="content-goods-publish">
<div class="success" style="text-align: left">
<h1>恭喜您商品发布成功!</h1>
<div class="goToGoodsList" @click="gotoGoodsList">
<a>去店铺查看商品列表>></a>
</div>
<div class="operation">
<h3>您还可以</h3>
<div>
1继续
<a @click="gotoBack"></a>
</div>
<div>
2进入卖家中心管理
<a @click="gotoGoodsList"></a>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
methods: {
//
gotoGoodsList() {
this.$router.push({name: "goods"});
},
gotoBack() {
this.$router.go();
},
}
}
</script>
<style lang="scss" scoped>
@import "./addGoods.scss";
</style>

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

@ -1,7 +1,6 @@
<style lang="scss" scoped> <style lang="scss" scoped>
@import "./styles/menu.scss"; @import "./styles/menu.scss";
</style> </style>
<template> <template>
<div class="ivu-shrinkable-menu"> <div class="ivu-shrinkable-menu">
<!-- 一级菜单 --> <!-- 一级菜单 -->
@ -40,6 +39,9 @@ export default {
navList() { navList() {
return this.$store.state.app.navList; return this.$store.state.app.navList;
}, },
currNav() {
return this.$store.state.app.currNav;
}
}, },
methods: { methods: {
changeMenu(name) { // changeMenu(name) { //
@ -47,7 +49,7 @@ export default {
name: name name: name
}); });
}, },
selectNav(name) { selectNav(name) { //
this.$store.commit("setCurrNav", name); this.$store.commit("setCurrNav", name);
this.setStore("currNav", name); this.setStore("currNav", name);
util.initRouter(this); util.initRouter(this);

View File

@ -3,9 +3,7 @@
width: 180px; width: 180px;
display: flex; display: flex;
} }
.ivu-menu-vertical .ivu-menu-item-group-title {
padding-left: 5px;
}
.ivu-btn-text:hover { .ivu-btn-text:hover {
background-color: rgba(255,255,255,.2) !important; background-color: rgba(255,255,255,.2) !important;
} }
@ -21,3 +19,8 @@
.ivu-menu-dark.ivu-menu-vertical .ivu-menu-item-active:not(.ivu-menu-submenu), .ivu-menu-dark.ivu-menu-vertical .ivu-menu-submenu-title-active:not(.ivu-menu-submenu){ .ivu-menu-dark.ivu-menu-vertical .ivu-menu-item-active:not(.ivu-menu-submenu), .ivu-menu-dark.ivu-menu-vertical .ivu-menu-submenu-title-active:not(.ivu-menu-submenu){
color: #ed3f14; color: #ed3f14;
} }
/deep/.ivu-menu-vertical .ivu-menu-item-group-title {
height: 40px;
line-height: 40px;
padding-left: 20px;
}

View File

@ -90,7 +90,6 @@ export default {
initEditor() { initEditor() {
let that = this; let that = this;
this.editor = new E(`#${this.id}`); this.editor = new E(`#${this.id}`);
// //
this.editor.config.onchange = (html) => { this.editor.config.onchange = (html) => {
if (this.openXss) { if (this.openXss) {
@ -195,6 +194,7 @@ export default {
}); });
}, },
setData(value) { setData(value) {
//
if (!this.editor) { if (!this.editor) {
this.initEditor(); this.initEditor();
} }
@ -204,15 +204,14 @@ export default {
this.$emit("input", this.data); this.$emit("input", this.data);
this.$emit("on-change", this.data); this.$emit("on-change", this.data);
} }
}, }
}, },
watch: { watch: {
value: { value: {
immediate: true, immediate: true,
handler: function (val) { handler: function (val) {
this.setData(val); this.setData(val);
} },
}, },
}, },
mounted() { mounted() {
@ -231,6 +230,10 @@ export default {
color: #333; color: #333;
} }
} }
.w-e-toolbar {
//
flex-wrap: wrap;
}
.e-code { .e-code {
top: 6px; top: 6px;
left: 976px; left: 976px;

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

@ -79,13 +79,11 @@ export default {
{ {
title: "活动名称", title: "活动名称",
key: "promotionName", key: "promotionName",
minWidth: 100,
fixed: "left", fixed: "left",
}, },
{ {
title: "优惠券名称", title: "优惠券名称",
key: "couponName", key: "couponName",
minWidth: 100,
tooltip: true, tooltip: true,
}, },
{ {
@ -107,18 +105,16 @@ export default {
{ {
title: "领取数量/总数量", title: "领取数量/总数量",
key: "publishNum", key: "publishNum",
width: 130,
render: (h, params) => { render: (h, params) => {
return h( return h(
"div", "div",
params.row.receivedNum + "/" + params.row.publishNum params.row.receivedNum + "/" + (params.row.publishNum === 0 ? '不限制' : params.row.publishNum)
); );
}, },
}, },
{ {
title: "优惠券类型", title: "优惠券类型",
key: "couponType", key: "couponType",
width: 120,
render: (h, params) => { render: (h, params) => {
let text = "未知"; let text = "未知";
if (params.row.couponType === "DISCOUNT") { if (params.row.couponType === "DISCOUNT") {
@ -195,8 +191,7 @@ export default {
text text
), ),
]); ]);
}, }
minWidth: 70,
}, },
{ {
title: "操作", title: "操作",

View File

@ -180,11 +180,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

@ -277,6 +277,7 @@ export default {
// liveform // liveform
if (result.success) { if (result.success) {
console.log(result);
let data = result.result; let data = result.result;
for (let key in data) { for (let key in data) {
this.liveForm[key] = data[key]; this.liveForm[key] = data[key];
@ -494,11 +495,12 @@ export default {
this.$refs["liveForm"].validate((valid) => { this.$refs["liveForm"].validate((valid) => {
if (valid) { if (valid) {
// //
if (this.$route.query.id && this.liveData.length != 0) { if (this.$route.query.id) {
this.spinShow = true; this.spinShow = true;
this.liveForm.commodityList = JSON.stringify( this.liveForm.commodityList = JSON.stringify(
this.liveForm.commodityList this.liveForm.commodityList
); );
delete this.liveForm.updateTime
// //
editLive(this.liveForm).then((res) => { editLive(this.liveForm).then((res) => {
if (res.success) { if (res.success) {

View File

@ -37,7 +37,6 @@
</div> </div>
<div class="transaction-card" v-if="item.label=='订单'"> <div class="transaction-card" v-if="item.label=='订单'">
<div class="card-item"> <div class="card-item">
<div class="card-item-label">下单笔数</div> <div class="card-item-label">下单笔数</div>
<div class="card-item-value">{{overViewList.orderNum || 0}}</div> <div class="card-item-value">{{overViewList.orderNum || 0}}</div>
@ -48,7 +47,7 @@
</div> </div>
<div class="card-item"> <div class="card-item">
<div class="card-item-label">下单金额</div> <div class="card-item-label">下单金额</div>
<div class="card-item-value">{{overViewList.orderAmount ? ($options.filters.unitPrice(overViewList.orderAmount )) : 0 }}</div> <div class="card-item-value">{{overViewList.orderAmount || 0 | unitPrice('¥')}}</div>
</div> </div>
<div class="card-item"> <div class="card-item">
<div class="card-item-label">付款笔数</div> <div class="card-item-label">付款笔数</div>
@ -56,7 +55,7 @@
</div> </div>
<div class="card-item"> <div class="card-item">
<div class="card-item-label">付款金额</div> <div class="card-item-label">付款金额</div>
<div class="card-item-value">{{ overViewList.paymentAmount ? ($options.filters.unitPrice(overViewList.paymentAmount)) : 0 }}</div> <div class="card-item-value">{{ overViewList.paymentAmount || 0 | unitPrice('¥')}}</div>
</div> </div>
</div> </div>
@ -141,7 +140,6 @@
</div> </div>
</Card> </Card>
<Card class="card"> <Card class="card">
<div> <div>
<h4>订退单统计</h4> <h4>订退单统计</h4>
@ -152,9 +150,7 @@
<Table stripe :columns="columns" :data="data"></Table> <Table stripe :columns="columns" :data="data"></Table>
</div> </div>
<Page @on-change="(index)=>{refundParams.pageNumber = index}" @on-page-size-change="(size)=>{refundParams.pageSize= size}" class="page" show-total show-elevator :total="total" /> <Page @on-change="(index)=>{refundParams.pageNumber = index}" @on-page-size-change="(size)=>{refundParams.pageSize= size}" class="page" show-total show-elevator :total="total" />
</div> </div>
</Card> </Card>
</div> </div>