合并方法

This commit is contained in:
lemon橪
2021-07-12 18:19:05 +08:00
45 changed files with 1909 additions and 2693 deletions

View File

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

View File

@@ -230,13 +230,6 @@ export const otherRouter = {
name: "edit-platform-coupon",
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",
title: "详情",
@@ -261,25 +254,12 @@ export const otherRouter = {
name: "coupon-activity-info",
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",
title: "详情",
name: "platform-coupon-activity",
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",
title: "平台拼团",

View File

@@ -52,6 +52,9 @@
</div>
</div>
</template>
<template slot-scope="{row}" slot="distributionOrderStatus">
<Tag :color="filterStatusColor(row.distributionOrderStatus)">{{filterStatus(row.distributionOrderStatus)}}</Tag>
</template>
</Table>
<Row type="flex" justify="end" class="page">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize"
@@ -121,20 +124,10 @@
},
{
title: "状态",
key: "distributionOrderStatus",
width: 100,
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', '待提现')
}
}
slot: "distributionOrderStatus",
width: 120,
},
{
title: "佣金金额",
key: "rebateGrade",
@@ -219,6 +212,34 @@
},
searchChange(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() {

View File

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

View File

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

View File

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

View File

@@ -3,9 +3,7 @@
width: 180px;
display: flex;
}
.ivu-menu-vertical .ivu-menu-item-group-title {
padding-left: 5px;
}
.ivu-btn-text:hover {
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){
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>
<!-- 添加用户模态框 -->
<Modal v-model="addFlag" title="添加用户">
<Modal v-model="addFlag" title="添加会员">
<Form ref="addMemberForm" :model="addMemberForm" :rules="addRule" :label-width="100">
<FormItem label="手机号码" prop="mobile" style="width: 90%;">
<Input v-model="addMemberForm.mobile" maxlength="11" placeholder="请输入手机号码" />
</FormItem>
<FormItem label="会员名称" prop="uname" style="width: 90%">
<FormItem label="会员名称" prop="username" style="width: 90%">
<Input v-model="addMemberForm.username" maxlength="15" placeholder="请输入会员名称" />
</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="请输入会员密码" />
</FormItem>
</Form>
<div slot="footer">
<Button @click="
() => {
addFlag = false;
}
">
<Button @click="addFlag = false">
取消
</Button>
<Button type="primary" :loading="handleAddLoading" @click="addMemberSubmit">
@@ -163,8 +159,8 @@ export default {
message: "请输入正确的手机号",
},
],
uname: [{ required: true, message: "请输入会员名称" }],
pwd: [{ required: true, message: "请输入密码" }],
username: [{ required: true, message: "请输入会员名称" }],
password: [{ required: true, message: "请输入密码" }],
},
ruleValidate: {}, //修改验证
submitLoading: false, // 添加或编辑提交状态
@@ -421,11 +417,7 @@ export default {
},
addMember() {
this.addFlag = true;
this.addMemberForm = {
mobile: "",
username: "",
password: "",
};
this.$refs.addMemberForm.resetFields()
},
/**
* 查询查看会员详情
@@ -460,6 +452,7 @@ export default {
if (valid) {
API_Member.addMember(this.addMemberForm).then((res) => {
if (res.result) {
this.$refs.addMemberForm.resetFields()
this.getData();
this.$Message.success("添加成功!");
this.addFlag = false;

View File

@@ -3,7 +3,7 @@
<div class="imgBox" :style="{width:data.originalWidth+'px',height:data.originalHeight + 'px'}">
<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="">
<Icon type="md-refresh" class="refresh" @click="refresh" />
<Icon type="md-refresh" class="refresh" @click="init" />
</div>
<div class="handle" :style="{width:data.originalWidth+'px'}">
<span class="bgcolor" :style="{width:distance + 'px',background:bgColor}"></span>
@@ -82,27 +82,24 @@ export default {
this.verifyText = '解锁失败';
let that = this;
setTimeout(() => {
that.refresh();
that.init();
}, 1000);
this.$emit('change', { status: false, distance: this.distance });
}
} else {
this.refresh()
this.init()
}
}).catch(()=>{
this.refresh()
this.init()
});
},
refresh () { // 刷新滑块
init () { // 初始化数据
this.flag = false;
this.downX = 0;
this.distance = 0;
this.bgColor = '#04ad11';
this.verifyText = '拖动滑块解锁';
this.init();
},
init () { // 初始化数据
getVerifyImg(this.type).then(res => {
if (res.result) {
this.data = res.result;

View File

@@ -22,7 +22,7 @@
</Select>
</Form-item>
<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>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form>
@@ -53,10 +53,9 @@ export default {
pageSize: 10, // 页面大小
sort: "createTime", // 默认排序字段
order: "desc", // 默认排序方式
startDate: "", // 起始时间
endDate: "", // 终止时间
sn: "",
payStatus: "",
paymentTime: "",
},
columns: [
{
@@ -151,61 +150,30 @@ export default {
};
},
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() {
this.getDataList();
},
// 改变页码
changePage(v) {
this.searchForm.pageNumber = v;
this.getDataList();
},
// 改变页数
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.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];
}
changeDate (val) { // 改变日期格式
this.searchForm.paymentTime = val
},
// 获取列表
getDataList() {
this.loading = true;
API_Order.paymentLog(this.searchForm).then((res) => {

View File

@@ -23,6 +23,11 @@
type="primary"
>订单取消</Button
>
<Button
v-if="orderInfo.order.orderStatus === 'UNPAID'"
@click="confirmPrice"
type="success"
>收款</Button>
<Button @click="orderLog" type="primary"
>订单日志</Button
>
@@ -571,6 +576,25 @@ export default {
this.showRegion = true;
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() {
this.loading = true;
API_Order.orderDetail(this.sn).then((res) => {

View File

@@ -1,43 +1,38 @@
<template>
<div class="search">
<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 ref="searchForm" :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>
<Form-item label="订单类型" prop="orderType">
<Select v-model="searchForm.orderType" placeholder="请选择" clearable style="width: 160px">
<Option value="NORMAL">普通订单</Option>
<Option value="PINTUAN">拼团订单</Option>
<Option value="GIFT">赠品订单</Option>
<Option value="VIRTUAL">核验订单</Option>
</Select>
</Form-item>
<Form-item label="订单状态" prop="orderStatus">
<Select v-model="searchForm.orderStatus" placeholder="请选择" clearable style="width: 160px">
<Option value="UNPAID">未付款</Option>
<Option value="PAID">已付款</Option>
<Option value="UNDELIVERED">待发货</Option>
<Option value="DELIVERED">已发货</Option>
<Option value="COMPLETED">已完成</Option>
<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>
<Form-item label="订单类型" prop="orderType">
<Select v-model="searchForm.orderType" placeholder="请选择" clearable style="width: 160px">
<Option value="NORMAL">普通订单</Option>
<Option value="PINTUAN">拼团订单</Option>
<Option value="GIFT">赠品订单</Option>
<Option value="VIRTUAL">核验订单</Option>
</Select>
</Form-item>
<Form-item label="订单状态" prop="orderStatus">
<Select v-model="searchForm.orderStatus" placeholder="请选择" clearable style="width: 160px">
<Option value="UNPAID">未付款</Option>
<Option value="PAID">已付款</Option>
<Option value="UNDELIVERED">待发货</Option>
<Option value="DELIVERED">已发货</Option>
<Option value="COMPLETED">已完成</Option>
<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>
<div>
<download-excel class="export-excel-wrapper" :data="data" :fields="fields" name="商品订单.xls">
<Button type="info" class="export">
@@ -212,20 +207,13 @@ export default {
title: "操作",
key: "action",
align: "center",
width: 150,
width: 100,
render: (h, params) => {
return h("div", [h("Button", {props: {type: "primary", size: "small",},
attrs: {disabled: params.row.orderStatus == "UNPAID" ? false : true,},
return h("Button", {props: {type: "info", size: "small",},
style: {marginRight: "5px",},
on: {click: () => {this.confirmPrice(params.row);},},
}, "收款"
),
h("Button", {props: {type: "info", size: "small",},
style: {marginRight: "5px",},
on: {click: () => {this.detail(params.row);},},
}, "查看"
),
]);
on: {click: () => {this.detail(params.row);},},
}, "查看"
)
},
},
],
@@ -291,25 +279,7 @@ export default {
this.total = this.data.length;
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) {
let sn = v.sn;
this.$router.push({

View File

@@ -1,35 +1,32 @@
<template>
<div class="search">
<Card>
<Row>
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
<Form-item label="活动名称" prop="couponName">
<Input type="text" v-model="searchForm.couponName" placeholder="请输入活动名称" clearable style="width: 200px" />
</Form-item>
<Form-item label="活动状态" prop="promotionStatus">
<Select v-model="searchForm.promotionStatus" placeholder="请选择" clearable style="width: 200px">
<Option value="NEW">开始</Option>
<Option value="START">开始/</Option>
<Option value="END">已结束/下架</Option>
<Option value="CLOSE">紧急关闭/作废</Option>
</Select>
</Form-item>
<Form-item label="活动时间">
<DatePicker v-model="selectDate" type="daterange" clearable placeholder="选择起始时间" style="width: 200px"></DatePicker>
</Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form>
</Row>
<Row class="operation padding-row">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form mb_10">
<Form-item label="活动名称" prop="couponName">
<Input type="text" v-model="searchForm.couponName" placeholder="请输入活动名称" clearable style="width: 200px" />
</Form-item>
<Form-item label="活动状态" prop="promotionStatus">
<Select v-model="searchForm.promotionStatus" placeholder="请选择" clearable style="width: 200px">
<Option value="NEW">未开始</Option>
<Option value="START">开始/上架</Option>
<Option value="END">结束/</Option>
<Option value="CLOSE">紧急关闭/作废</Option>
</Select>
</Form-item>
<Form-item label="活动时间">
<DatePicker v-model="selectDate" type="daterange" clearable placeholder="选择起始时间" style="width: 200px"></DatePicker>
</Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form>
<Row class="operation padding-row" v-if="getType !== 'ACTIVITY'">
<Button @click="add" type="primary">添加优惠券</Button>
<Button @click="delAll">批量下架</Button>
<!-- <Button @click="upAll" >批量上架</Button> -->
</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">
<template slot-scope="{ row,index }" slot="action">
<Button v-if="!checked && row.promotionStatus === 'NEW' || row.promotionStatus === 'CLOSE'" type="primary" size="small" style="margin-right: 10px" @click="edit(row)">编辑
<Table v-if="refreshTable" :loading="loading" border :columns="columns" :data="data" ref="table" @on-selection-change="changeSelect">
<template slot-scope="{ row }" slot="action">
<Button v-if="row.promotionStatus === 'NEW' || row.promotionStatus === 'CLOSE'" type="success" :class="{'mr_10' : row.promotionStatus === 'START' || row.promotionStatus === 'NEW'}" size="small" @click="edit(row)">编辑
</Button>
<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>
</template>
</Table>
@@ -121,7 +118,7 @@ export default {
render: (h, params) => {
return h(
"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",
align: "center",
fixed: "right",
maxWidth: 140,
width: 130,
},
],
data: [], // 表单数据
total: 0, // 表单数据总数
selectCoupon: [], //本级选中的优惠券
refreshTable: true, // 修改选中状态后刷新表格
};
},
props: {
// 是否为选中模式
checked: {
type: Boolean,
default: false,
},
//优惠券类型 查询参数
getType: {
type: String,
@@ -246,94 +238,73 @@ export default {
this.init();
}
},
},
methods: {
// 选中优惠券 父级传值
selectedList: {
handler(val) {
// 判断是否是父级回调给自己已选择优惠券
if (val.length != 0) {
this.selectCoupon = val;
if (val.length) {
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,
immediate: true,
},
check() {
// this.selectCoupon.push(this.selectList)
this.$emit("selected", this.selectCoupon);
},
methods: {
check() { // 选中的优惠券
this.$emit("selected", this.selectList);
},
init() {
this.getDataList();
},
add() {
add() { // 跳转添加页面
this.$router.push({ name: "add-platform-coupon" });
},
/** 跳转至领取详情页面 */
receiveInfo(v) {
this.$router.push({ name: "member-receive-coupon", query: { id: v.id } });
},
info(v) {
info(v) { // 查看优惠券
this.$router.push({ name: "platform-coupon-info", query: { id: v.id } });
},
changePage(v) {
changePage(v) { // 改变页码
this.searchForm.pageNumber = v;
this.getDataList();
// this.clearSelectAll();
},
changePageSize(v) {
changePageSize(v) { // 改变页数
this.searchForm.pageSize = v;
this.getDataList();
},
handleSearch() {
handleSearch() { // 搜索
this.searchForm.pageNumber = 0;
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() {
clearSelectAll() { // 清除选中状态
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) {
if (this.checked && e.length != 0) {
this.selectCoupon.push(...e);
this.check();
}
this.selectList = e;
this.selectCount = e.length;
if (this.getType === 'ACTIVITY') this.check()
},
getDataList() {
getDataList() { // 获取数据
this.loading = true;
if (this.selectDate && this.selectDate[0] && this.selectDate[1]) {
this.searchForm.startTime = this.selectDate[0].getTime();
@@ -346,18 +317,6 @@ export default {
getPlatformCouponList(this.searchForm).then((res) => {
this.loading = false;
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.total = res.result.total;
}
@@ -365,43 +324,11 @@ export default {
this.total = this.data.length;
this.loading = false;
},
handleSubmit() {
this.$refs.form.validate((valid) => {
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) {
edit(v) { // 跳转编辑页面
this.$router.push({ name: "edit-platform-coupon", query: { id: v.id } });
},
remove(v) {
remove(v) { // 下架优惠券
this.$Modal.confirm({
title: "确认下架",
// 记得确认修改此处
@@ -426,7 +353,7 @@ export default {
},
});
},
delAll() {
delAll() { // 批量下架
if (this.selectCount <= 0) {
this.$Message.warning("您还未选择要下架的优惠券");
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() {
//如果作为组件方式,传入了类型值,则搜索参数附加类型
if (this.getType) {
this.searchForm.getType = this.getType;
this.columns.pop()
}
this.init();
},

View File

@@ -68,7 +68,7 @@
</div>
<div v-if="rangeTimeType == 1">
<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>
</div>
<div class="effectiveDays" v-if="rangeTimeType == 0">
@@ -100,8 +100,8 @@
<FormItem v-if="form.scopeType == 'PORTION_GOODS_CATEGORY'">
<Cascader @on-change="getGoodsCategory" :data="goodsCategoryList" style="width:300px;"
v-model="form.scopeIdGoods"></Cascader>
<Cascader :data="goodsCategoryList" style="width:260px;"
v-model="form.scopeIdGoods"></Cascader>
</FormItem>
<div>
@@ -127,7 +127,7 @@ import {regular} from "@/utils";
import skuSelect from "@/views/lili-dialog";
export default {
name: "addCoupon",
name: "edit-platform-coupon",
components: {
skuSelect,
},
@@ -140,6 +140,14 @@ export default {
},
deep: true,
},
$route(e) { // 监听路由,参数变化调取接口
this.id = e.query.id;
if (this.id) {
this.getCoupon()
} else {
this.$refs.form.resetFiles()
}
}
},
data() {
const checkPrice = (rule, value, callback) => {
@@ -165,7 +173,7 @@ export default {
}
};
return {
rangeTimeType: 1,
rangeTimeType: 1, // 当前时间类型
modalType: 0, // 是否编辑
form: {
/** 店铺承担比例 */
@@ -221,11 +229,11 @@ export default {
],
publishNum: [
{required: true, message: "请输入发放数量"},
{pattern: regular.integer, message: "请输入正整数"},
{pattern: regular.Integer, message: "请输入正整数"},
],
couponLimitNum: [
{required: true, message: "领取限制不能为空"},
{pattern: regular.integer, message: "请输入正整数"},
{pattern: regular.Integer, message: "请输入正整数"},
],
description: [{required: true, message: "请输入范围描述"}],
},
@@ -289,7 +297,7 @@ export default {
},
};
},
async mounted() {
async mounted () {
await this.getCagetoryList();
// 如果id不为空则查询信息
if (this.id) {
@@ -495,7 +503,7 @@ export default {
async getCagetoryList() {
// 获取全部商品分类
let data = await getCategoryTree();
this.goodsCategoryList = this.filterCategory(data.result);
this.goodsCategoryList = data.result;
// 过滤出可显示的值
this.goodsCategoryList = this.goodsCategoryList.map((item) => {
@@ -523,18 +531,7 @@ export default {
}
return {value: item.id, label: item.name, children: item.children};
});
},
filterCategory(list) {
// 递归删除空children
list.forEach((item) => {
if (item.children.length == 0) {
delete item.children;
} else {
this.filterCategory(item.children);
}
});
return list;
console.log(this.goodsCategoryList);
},
filterCategoryId(list, idArr) {
// 递归获取分类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">
<template slot-scope="{ row,index }" slot="action">
<Button type="primary"
<Button type="info"
size="small" style="margin-right: 10px" @click="info(row)">查看
</Button>
<Button v-if="!checked && row.promotionStatus === 'START' || row.promotionStatus === 'NEW'" type="error"

View File

@@ -275,14 +275,13 @@ export default {
this.reSelectCoupon();
},
reSelectCoupon() {
//清空原有数据
// 清空原有数据
this.form.couponActivityItems = this.selectCouponList.map((item) => {
return {
num: 0,
couponId: item.id,
}
});
console.log(this.form.couponActivityItems)
},
// 添加指定用户
@@ -308,7 +307,6 @@ export default {
this.$refs.form.validate((valid) => {
if (valid) {
const params = JSON.parse(JSON.stringify(this.form));
console.log(params);
this.submitLoading = true;
// 添加 避免编辑后传入id等数据 记得删除
delete params.id;

View File

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

View File

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

View File

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