Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-ui

master
Chopper 2021-06-01 08:53:37 +08:00
commit 5f5e24638b
130 changed files with 6551 additions and 6484 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -13,11 +13,12 @@
</li> </li>
</ul> </ul>
</div> </div>
<!-- 侧边导航 --> <!-- 全部商品分类 -->
<div class="cate-list" v-show="showAlways || showFirstList" @mouseenter="showFirstList = true" @mouseleave="showFirstList = false"> <div class="cate-list" v-show="showAlways || showFirstList" @mouseenter="showFirstList = true" @mouseleave="showFirstList = false">
<div class="nav-side"> <!-- 第一级分类 -->
<div class="nav-side" @mouseleave="panel = false">
<ul> <ul>
<li v-for="(item, index) in cateList" :key="index" @mouseenter="showDetail(index)" @mouseleave="panel = false"> <li v-for="(item, index) in cateList" :key="index" @mouseenter="showDetail(index)" >
<span class="nav-side-item" @click="goGoodsList(item.id)">{{item.name}}</span> <span class="nav-side-item" @click="goGoodsList(item.id)">{{item.name}}</span>
<span v-for="(second, secIndex) in item.children" :key="secIndex"> <span v-for="(second, secIndex) in item.children" :key="secIndex">
<span v-if="secIndex < 2" > / </span> <span v-if="secIndex < 2" > / </span>
@ -26,38 +27,35 @@
</li> </li>
</ul> </ul>
</div> </div>
<transition name="fade"> <!-- 展开分类 -->
<div <div
class="detail-item-panel" class="detail-item-panel"
:duration="{ enter: 100, leave: 100 }" v-show="panel"
v-show="panel" @mouseenter="panel = true"
@mouseenter="panel = true" @mouseleave="panel = false"
ref="itemPanel1" >
@mouseleave="panel = false" <div class="nav-detail-item">
> <template v-for="(item, index) in panelData">
<div class="nav-detail-item"> <span @click="goGoodsList(item.id, item.parentId)" v-if="index < 8" :key="index">{{ item.name }}<Icon type="ios-arrow-forward" /></span>
<template v-for="(item, index) in panelData"> </template>
<span @click="goGoodsList(item.id, item.parentId)" v-if="index < 8" :key="index">{{ item.name }}<Icon type="ios-arrow-forward" /></span>
</template>
</div>
<ul>
<li
v-for="(items, index) in panelData"
:key="index"
class="detail-item-row"
>
<span class="detail-item-title" @click="goGoodsList(items.id,items.parentId)">
{{ items.name }} <Icon type="ios-arrow-forward" />
<span class="glyphicon glyphicon-menu-right"></span>
</span>
<div>
<span v-for="(item, subIndex) in items.children" @click="goGoodsList(item.id,items.id,items.parentId)"
:key="subIndex" class="detail-item">{{ item.name }}</span>
</div>
</li>
</ul>
</div> </div>
</transition> <ul>
<li
v-for="(items, index) in panelData"
:key="index"
class="detail-item-row"
>
<span class="detail-item-title" @click="goGoodsList(items.id,items.parentId)">
{{ items.name }} <Icon type="ios-arrow-forward" />
<span class="glyphicon glyphicon-menu-right"></span>
</span>
<div>
<span v-for="(item, subIndex) in items.children" @click="goGoodsList(item.id,items.id,items.parentId)"
:key="subIndex" class="detail-item">{{ item.name }}</span>
</div>
</li>
</ul>
</div>
</div> </div>
</div> </div>
</template> </template>
@ -86,12 +84,12 @@ export default {
} }
}, },
computed: { computed: {
navList () { navList () { //
return JSON.parse(storage.getItem('navList')) || [] return JSON.parse(storage.getItem('navList')) || []
} }
}, },
methods: { methods: {
getCate () { getCate () { //
getCategory(0).then(res => { getCategory(0).then(res => {
if (res.success) { if (res.success) {
this.cateList = res.result; this.cateList = res.result;
@ -99,7 +97,7 @@ export default {
} }
}); });
}, },
showDetail (index) { showDetail (index) { //
this.panel = true this.panel = true
this.panelData = this.cateList[index].children this.panelData = this.cateList[index].children
}, },
@ -245,9 +243,6 @@ export default {
.nav-detail-item span:hover { .nav-detail-item span:hover {
background-color: $theme_color; background-color: $theme_color;
} }
.detail-item-panel ul {
list-style: none;
}
.detail-item-panel li { .detail-item-panel li {
line-height: 30px; line-height: 30px;
// margin-left: 40px; // margin-left: 40px;

View File

@ -116,11 +116,13 @@
<span v-if="item.couponType === 'DISCOUNT'" class="fontsize_12 global_color"><span class="price">{{item.couponDiscount}}</span></span> <span v-if="item.couponType === 'DISCOUNT'" class="fontsize_12 global_color"><span class="price">{{item.couponDiscount}}</span></span>
<span class="describe">{{item.consumeThreshold}}元可用</span> <span class="describe">{{item.consumeThreshold}}元可用</span>
</div> </div>
<p>使用范围{{useScope(item.scopeType)}}</p> <p>使用范围{{useScope(item.scopeType)}}</p>
<p>有效期{{item.endTime}}</p> <p>有效期{{item.endTime}}</p>
</div> </div>
<img class="used" v-if="usedCouponId.includes(item.id)" src="../../assets/images/geted.png" alt="">
<b></b> <b></b>
<a class="c-right" @click="useCoupon(item.id)">使</a> <a class="c-right" @click="useCoupon(item.id, true)">立即使用</a>
<a class="c-right" v-if="usedCouponId.includes(item.id)" @click="useCoupon(item.id, false)"></a>
<i class="circle-top"></i> <i class="circle-top"></i>
<i class="circle-bottom"></i> <i class="circle-bottom"></i>
</li> </li>
@ -207,7 +209,9 @@ export default {
moreAddr: false, // moreAddr: false, //
canUseCouponNum: 0, // canUseCouponNum: 0, //
couponList: [], // couponList: [], //
logoImg: '' // logo logoImg: '', // logo
usedCouponId: [], // 使id
selectedCoupon: {} //
}; };
}, },
mounted () { mounted () {
@ -250,7 +254,10 @@ export default {
this.goodsList = res.result.cartList; this.goodsList = res.result.cartList;
this.priceDetailDTO = res.result.priceDetailDTO; this.priceDetailDTO = res.result.priceDetailDTO;
this.skuList = res.result.skuList; this.skuList = res.result.skuList;
let notSupArea = res.result.notSupportFreight let notSupArea = res.result.notSupportFreight;
this.selectedCoupon = {}
if (res.result.platformCoupon) this.selectedCoupon.platformCoupon = res.result.platformCoupon
Object.assign(this.selectedCoupon, res.result.storeCoupons)
if (notSupArea) { if (notSupArea) {
let content = []; let content = [];
let title = '' let title = ''
@ -295,8 +302,22 @@ export default {
storeId: storeArr.toString(), storeId: storeArr.toString(),
totalPrice: this.priceDetailDTO.goodsPrice totalPrice: this.priceDetailDTO.goodsPrice
} }
canUseCouponList(params).then(res => { canUseCouponList(params).then(res => { //
if (res.success) this.couponList = res.result.records if (res.success) this.couponList = res.result.records
const couponKeys = Object.keys(this.selectedCoupon)
this.usedCouponId = []
if (couponKeys.length) {
this.couponList.forEach(e => {
if (e.id === this.selectedCoupon[couponKeys].memberCoupon.id) {
this.usedCouponId.push(e.id)
}
})
this.$nextTick(() => {
this.$forceUpdate()
})
}
}) })
} }
}) })
@ -361,16 +382,14 @@ export default {
}); });
}, },
useCoupon (id) { // 使 useCoupon (id, used) { // 使
let params = { let params = {
way: this.$route.query.way, way: this.$route.query.way,
memberCouponId: id, memberCouponId: id,
used: true used: used // true 使 false
} }
selectCoupon(params).then(res => { selectCoupon(params).then(res => {
if (res.success) { if (res.success) this.init()
this.init()
}
}) })
}, },
editInvoice () { // editInvoice () { //
@ -774,5 +793,16 @@ export default {
.circle-top,.circle-bottom{ .circle-top,.circle-bottom{
right: 22px; right: 22px;
} }
.used {
position: absolute;
top: 60px;
right: 40px;
width: 50px;
height: 50px;
}
}
.coupon-list {
max-height: 260px;
overflow: scroll;
} }
</style> </style>

View File

@ -2,7 +2,7 @@ export default {
/** /**
* @description 配置显示在浏览器标签的title * @description 配置显示在浏览器标签的title
*/ */
title: 'Lili电商', title: "Lili电商",
/** /**
* @description token在Cookie中存储的天数默认1天 * @description token在Cookie中存储的天数默认1天
*/ */
@ -17,29 +17,28 @@ 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"
}, },
api_prod: { api_prod: {
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"
}, },
/** /**
* @description api请求基础路径前缀 * @description api请求基础路径前缀
*/ */
baseUrlPrefix: '/manager', baseUrlPrefix: "/manager",
/** /**
* @description 需要加载的插件 * @description 需要加载的插件
*/ */
plugin: { plugin: {
'error-store': { "error-store": {
showInHeader: true, // 设为false后不会在顶部显示错误日志徽标 showInHeader: true, // 设为false后不会在顶部显示错误日志徽标
developmentOff: true // 设为true后在开发环境不会收集错误信息方便开发中排查错误 developmentOff: true // 设为true后在开发环境不会收集错误信息方便开发中排查错误
} }
} }
} };

View File

@ -12,7 +12,7 @@
<shrinkable-menu></shrinkable-menu> <shrinkable-menu></shrinkable-menu>
</div> </div>
<!-- 顶部标题栏主体 --> <!-- 顶部标题栏主体 -->
<div class="main-header-con" style="padding-left:240px"> <div class="main-header-con">
<div class="main-header"> <div class="main-header">
<div :class="{'header-avator-con':navType!=4, 'header-avator-con nav4':navType == 4}"> <div :class="{'header-avator-con':navType!=4, 'header-avator-con nav4':navType == 4}">
<!-- 通知消息 --> <!-- 通知消息 -->

View File

@ -1,263 +1,329 @@
<template> <template>
<div class="search"> <div class="search">
<Row> <Card>
<Col> <Row @keydown.enter.native="handleSearch">
<Card> <Form
<Row @keydown.enter.native="handleSearch"> ref="searchForm"
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> :model="searchForm"
<Form-item label="会员名称" prop="memberName"> inline
<Input :label-width="70"
type="text" class="search-form"
v-model="searchForm.memberName" >
placeholder="请输入会员名称" <Form-item label="会员名称" prop="memberName">
clearable <Input
style="width: 200px" type="text"
/> v-model="searchForm.memberName"
</Form-item> placeholder="请输入会员名称"
<Form-item label="状态"> clearable
<Select v-model="searchForm.distributionStatus" style="width:200px"> style="width: 200px"
<Option v-for="item in distributionStatusList" :value="item.value" :key="item.value">{{ item.label }}</Option> />
</Select> </Form-item>
</Form-item> <Form-item label="状态">
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button> <Select
</Form> v-model="searchForm.distributionStatus"
</Row> style="width: 200px"
<Row class="padding-row"> >
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table> <Option
</Row> v-for="item in distributionStatusList"
<Row type="flex" justify="end" class="page"> :value="item.value"
<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> :key="item.value"
</Row> >{{ item.label }}</Option
</Card> >
</Col> </Select>
</Row> </Form-item>
<Button
</div> @click="handleSearch"
type="primary"
icon="ios-search"
class="search-btn"
>搜索</Button
>
</Form>
</Row>
<Table
:loading="loading"
border
:columns="columns"
:data="data"
ref="table"
sortable="custom"
@on-sort-change="changeSort"
@on-selection-change="changeSelect"
></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> </template>
<script> <script>
import { import {
getDistributionListData, getDistributionListData,
retreatDistribution, retreatDistribution,
resumeDistribution, resumeDistribution,
auditDistribution, auditDistribution,
} from "@/api/distribution"; } from "@/api/distribution";
import {distributionStatusList} from './dataJson.js'; import { distributionStatusList } from "./dataJson.js";
export default { export default {
name: "distribution", name: "distribution",
components: { components: {},
data() {
return {
distributionStatusList, //
openSearch: true, //
loading: true, //
searchForm: {
//
pageNumber: 1, //
pageSize: 10, //
},
selectList: [], //
selectCount: 0, //
columns: [
{
title: "会员名称",
key: "memberName",
minWidth: 120,
tooltip: true,
}, },
data() { {
return { title: "推广单数",
distributionStatusList, // key: "orderNum",
openSearch: true, // minWidth: 120,
loading: true, // width: 150,
searchForm: { //
pageNumber: 1, //
pageSize: 10, //
},
selectList: [], //
selectCount: 0, //
columns: [
{
title: "会员名称",
key: "memberName",
minWidth: 120,
tooltip: true
},
{
title: "推广单数",
key: "orderNum",
minWidth: 120,
width: 150,
},
{
title: "分销金额",
key: "rebateTotal",
width: 150,
sortable: false,
render: (h, params) => {
return h('div', this.$options.filters.unitPrice(params.row.rebateTotal, '¥'))
}
},
{
title: "可用金额",
key: "canRebate",
width: 150,
sortable: false,
render: (h, params) => {
return h('div', this.$options.filters.unitPrice(params.row.rebateTotal, '¥'))
}
},
{
title: "冻结金额",
key: "commissionFrozen",
width: 150,
sortable: false,
render: (h, params) => {
return h('div', this.$options.filters.unitPrice(params.row.rebateTotal, '¥'))
}
},
{
title: "状态",
key: "distributionStatus",
width: 150,
sortable: false,
render: (h, params) => {
if (params.row.distributionStatus == "PASS") {
return h( "Badge", {props: { status: "success",text: "审核通过" } })
} else if (params.row.distributionStatus == "APPLY") {
return h( "Badge", {props: { status: "processing",text: "申请中" } })
} else if (params.row.distributionStatus == "RETREAT") {
return h( "Badge", {props: { status: "warning",text: "已清退" } })
} else if (params.row.distributionStatus == "REFUSE") {
return h( "Badge", {props: { status: "error",text: "审核拒绝" } })
}
}
},
{
title: "操作",
key: "action",
align: "center",
fixed: "right",
width: 140,
render: (h, params) => {
return h("div",{
style:{
display:'flex',
justifyContent:'center'
}
},
[
h(
"Button",
{
props: {
type: "error",
size: "small"
},
style:{marginRight:'5px', display:params.row.distributionStatus!='RETREAT'?'block':'none'},
on: {
click: () => {
this.retreat(params.row);
}
}
},
"清退"
),
h(
"Button",
{
props: {
type: "success",
size: "small"
},
style:{marginRight:'5px', display:params.row.distributionStatus=='RETREAT'?'block':'none'},
on: {
click: () => {
this.resume(params.row);
}
}
},
"恢复"
)
]);
}
}
],
data: [], //
total: 0 //
};
}, },
methods: { {
init() { title: "分销金额",
this.getDataList(); key: "rebateTotal",
}, width: 150,
see(v) { sortable: false,
this.$router.push({ render: (h, params) => {
name: "distributionOrder", return h(
query: { id:v.memberId } "div",
}); this.$options.filters.unitPrice(params.row.rebateTotal, "¥")
}, );
changePage(v) { },
this.searchForm.pageNumber = v; },
this.getDataList(); {
this.clearSelectAll(); title: "可用金额",
}, key: "canRebate",
changePageSize(v) { width: 150,
this.searchForm.pageSize = v; sortable: false,
this.getDataList(); render: (h, params) => {
}, return h(
handleSearch() { "div",
this.searchForm.pageNumber = 1; this.$options.filters.unitPrice(params.row.rebateTotal, "¥")
this.searchForm.pageSize = 10; );
this.getDataList(); },
}, },
{
clearSelectAll() { // title: "冻结金额",
this.$refs.table.selectAll(false); key: "commissionFrozen",
}, width: 150,
changeSelect(e) { sortable: false,
this.selectList = e; render: (h, params) => {
this.selectCount = e.length; return h(
}, "div",
this.$options.filters.unitPrice(params.row.rebateTotal, "¥")
getDataList() { );
this.loading = true; },
this.searchForm.status = "PASS"; },
// {
getDistributionListData(this.searchForm).then(res => { title: "状态",
this.loading = false; key: "distributionStatus",
if (res.success) { width: 150,
this.data = res.result.records; sortable: false,
this.total = res.result.total; render: (h, params) => {
} if (params.row.distributionStatus == "PASS") {
}); return h("Badge", {
}, props: { status: "success", text: "审核通过" },
// 退 });
retreat(v) { } else if (params.row.distributionStatus == "APPLY") {
this.$Modal.confirm({ return h("Badge", {
title: "提示", props: { status: "processing", text: "申请中" },
// });
content: "您确认要清退 " + v.memberName + " ?", } else if (params.row.distributionStatus == "RETREAT") {
loading: true, return h("Badge", {
onOk: () => { props: { status: "warning", text: "已清退" },
// });
retreatDistribution(v.id).then(res => { } else if (params.row.distributionStatus == "REFUSE") {
this.$Modal.remove(); return h("Badge", {
if (res.success) { props: { status: "error", text: "审核拒绝" },
this.$Message.success("操作成功"); });
this.getDataList();
}
});
}
});
},
//
resume(v){
this.$Modal.confirm({
title: '提示',
//
content: "您确认要恢复 " + v.memberName + " ?",
loading: true,
onOk: () => {
//
resumeDistribution(v.id).then(res => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
}
});
} }
},
}, },
mounted() { {
this.init(); title: "操作",
} key: "action",
align: "center",
fixed: "right",
width: 140,
render: (h, params) => {
return h(
"div",
{
style: {
display: "flex",
justifyContent: "center",
},
},
[
h(
"Button",
{
props: {
type: "error",
size: "small",
},
style: {
marginRight: "5px",
display:
params.row.distributionStatus != "RETREAT"
? "block"
: "none",
},
on: {
click: () => {
this.retreat(params.row);
},
},
},
"清退"
),
h(
"Button",
{
props: {
type: "success",
size: "small",
},
style: {
marginRight: "5px",
display:
params.row.distributionStatus == "RETREAT"
? "block"
: "none",
},
on: {
click: () => {
this.resume(params.row);
},
},
},
"恢复"
),
]
);
},
},
],
data: [], //
total: 0, //
}; };
},
methods: {
init() {
this.getDataList();
},
see(v) {
this.$router.push({
name: "distributionOrder",
query: { id: v.memberId },
});
},
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();
},
clearSelectAll() {
//
this.$refs.table.selectAll(false);
},
changeSelect(e) {
this.selectList = e;
this.selectCount = e.length;
},
getDataList() {
this.loading = true;
this.searchForm.status = "PASS";
//
getDistributionListData(this.searchForm).then((res) => {
this.loading = false;
if (res.success) {
this.data = res.result.records;
this.total = res.result.total;
}
});
},
// 退
retreat(v) {
this.$Modal.confirm({
title: "提示",
//
content: "您确认要清退 " + v.memberName + " ?",
loading: true,
onOk: () => {
//
retreatDistribution(v.id).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
},
});
},
//
resume(v) {
this.$Modal.confirm({
title: "提示",
//
content: "您确认要恢复 " + v.memberName + " ?",
loading: true,
onOk: () => {
//
resumeDistribution(v.id).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
},
});
},
},
mounted() {
this.init();
},
};
</script> </script>
<style lang="scss"> <style lang="scss">
@import "@/styles/table-common.scss"; @import "@/styles/table-common.scss";
</style> </style>

View File

@ -1,217 +1,240 @@
<template> <template>
<div class="search"> <div class="search">
<Row> <Card>
<Col> <Row @keydown.enter.native="handleSearch">
<Card> <Form
<Row @keydown.enter.native="handleSearch"> ref="searchForm"
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> :model="searchForm"
<Form-item label="会员名称" prop="memberName"> inline
<Input :label-width="70"
type="text" class="search-form"
v-model="searchForm.memberName" >
placeholder="请输入会员名称" <Form-item label="会员名称" prop="memberName">
clearable <Input
style="width: 200px" type="text"
/> v-model="searchForm.memberName"
</Form-item> placeholder="请输入会员名称"
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button> clearable
</Form> style="width: 200px"
</Row> />
<Row style="margin-top: 10px"> </Form-item>
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" <Button
@on-sort-change="changeSort" @on-selection-change="changeSelect"></Table> @click="handleSearch"
</Row> type="primary"
<Row type="flex" justify="end" class="page"> icon="ios-search"
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" class="search-btn"
@on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10,20,50]" >搜索</Button
size="small" show-total show-elevator show-sizer></Page> >
</Row> </Form>
</Card> </Row>
</Col> <Table
</Row> class="mt_10"
</div> :loading="loading"
border
:columns="columns"
:data="data"
ref="table"
sortable="custom"
@on-sort-change="changeSort"
@on-selection-change="changeSelect"
></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> </template>
<script> <script>
import { import { getDistributionListData, auditDistribution } from "@/api/distribution";
getDistributionListData,
auditDistribution
} from "@/api/distribution";
export default { export default {
name: "distributionApply", name: "distributionApply",
components: {}, components: {},
data() { data() {
return { return {
loading: true, // loading: true, //
searchForm: { // searchForm: {
pageNumber: 1, // //
pageSize: 10, // pageNumber: 1, //
sort: "createTime", // pageSize: 10, //
order: "desc", // sort: "createTime", //
startDate: "", // order: "desc", //
endDate: "" // startDate: "", //
}, endDate: "", //
form: { // },
memberName: "", form: {
}, //
// memberName: "",
submitLoading: false, // },
selectList: [], // //
selectCount: 0, // submitLoading: false, //
columns: [ selectList: [], //
{ selectCount: 0, //
title: "会员名称", columns: [
key: "memberName", {
minWidth: 150, title: "会员名称",
tooltip: true, key: "memberName",
}, minWidth: 150,
{ tooltip: true,
title: "会员姓名", },
key: "name", {
minWidth: 120, title: "会员姓名",
key: "name",
minWidth: 120,
},
{
title: "提交时间",
key: "createTime",
minWidth: 150,
},
{
title: "操作",
key: "action",
align: "center",
fixed: "right",
width: 200,
render: (h, params) => {
return h("div", [
h(
"Button",
{
props: {
type: "success",
size: "small",
}, },
{ style: {
title: "提交时间", marginRight: "5px",
key: "createTime", },
minWidth: 150, on: {
click: () => {
this.audit(params.row, "PASS");
}, },
{ },
title: "操作", },
key: "action", "通过"
align: "center", ),
fixed: "right", h(
width: 200, "Button",
render: (h, params) => { {
return h("div", [ props: {
h( type: "error",
"Button", size: "small",
{ },
props: { on: {
type: "success", click: () => {
size: "small", this.audit(params.row, "REFUSE");
}, },
style: { },
marginRight: "5px" },
}, "拒绝"
on: { ),
click: () => { ]);
this.audit(params.row, "PASS"); },
}
}
},
"通过"
),
h(
"Button",
{
props: {
type: "error",
size: "small",
},
on: {
click: () => {
this.audit(params.row, "REFUSE");
}
}
},
"拒绝"
)
]);
}
}
],
data: [], //
total: 0 //
};
}, },
methods: { ],
init() { data: [], //
this.getDataList(); total: 0, //
},
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();
},
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;
},
selectDateRange(v) {
if (v) {
this.searchForm.startDate = v[0];
this.searchForm.endDate = v[1];
}
},
getDataList() {
this.loading = true;
this.searchForm.distributionStatus = "APPLY";
//
getDistributionListData(this.searchForm).then(res => {
this.loading = false;
if (res.success) {
this.data = res.result.records;
this.total = res.result.total;
}
});
//
//this.data = [
//];
this.total = this.data.length;
this.loading = false;
},
//
audit(v, status) {
let test = "拒绝"
if (status == "PASS") {
test = "通过"
}
let params = {
status : status
}
this.$Modal.confirm({
title: "确认" + test,
//
content: "您确认要" + test + " " + v.memberName + " ?",
loading: true,
onOk: () => {
auditDistribution(v.id, params).then(res => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
}
});
}
},
mounted() {
this.init();
}
}; };
},
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();
},
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;
},
selectDateRange(v) {
if (v) {
this.searchForm.startDate = v[0];
this.searchForm.endDate = v[1];
}
},
getDataList() {
this.loading = true;
this.searchForm.distributionStatus = "APPLY";
//
getDistributionListData(this.searchForm).then((res) => {
this.loading = false;
if (res.success) {
this.data = res.result.records;
this.total = res.result.total;
}
});
//
//this.data = [
//];
this.total = this.data.length;
this.loading = false;
},
//
audit(v, status) {
let test = "拒绝";
if (status == "PASS") {
test = "通过";
}
let params = {
status: status,
};
this.$Modal.confirm({
title: "确认" + test,
//
content: "您确认要" + test + " " + v.memberName + " ?",
loading: true,
onOk: () => {
auditDistribution(v.id, params).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
},
});
},
},
mounted() {
this.init();
},
};
</script> </script>
<style lang="scss"> <style lang="scss">
@import "@/styles/table-common.scss"; @import "@/styles/table-common.scss";
</style> </style>

View File

@ -1,35 +1,29 @@
<template> <template>
<div class="search"> <div class="search">
<Row> <Card>
<Col> <Row @keydown.enter.native="handleSearch" >
<Card> <Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
<Row @keydown.enter.native="handleSearch" > <Input class="search-input" v-model="searchForm.memberName">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> <span slot="prepend">会员名称</span>
<Input class="search-input" v-model="searchForm.memberName"> </Input>
<span slot="prepend">会员名称</span> <Input class="search-input" v-model="searchForm.sn">
</Input> <span slot="prepend">编号</span>
<Input class="search-input" v-model="searchForm.sn"> </Input>
<span slot="prepend">编号</span> <Form-item label="状态" style="margin-left: -20px">
</Input> <Select v-model="searchForm.distributionCashStatus" style="width:150px;">
<Form-item label="状态" style="margin-left: -20px"> <Option v-for="item in cashStatusList" :value="item.value" :key="item.value">{{ item.label }}</Option>
<Select v-model="searchForm.distributionCashStatus" style="width:150px;"> </Select>
<Option v-for="item in cashStatusList" :value="item.value" :key="item.value">{{ item.label }}</Option> </Form-item>
</Select> <Form-item style="margin-left:-35px;" class="br">
</Form-item> <Button @click="handleSearch" type="primary" icon="ios-search">搜索</Button>
<Form-item style="margin-left:-35px;" class="br"> </Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search">搜索</Button> </Form>
</Form-item> </Row>
</Form> <Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
</Row> <Row type="flex" justify="end" class="page padding-row">
<Row class="padding-row"> <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>
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table> </Row>
</Row> </Card>
<Row type="flex" justify="end" class="page padding-row">
<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>
</Col>
</Row>
<Modal :title="modalTitle" v-model="modalVisible" :mask-closable='false' :width="500"> <Modal :title="modalTitle" v-model="modalVisible" :mask-closable='false' :width="500">
<Form ref="form" :model="form" :label-width="100" :rules="formValidate" > <Form ref="form" :model="form" :label-width="100" :rules="formValidate" >
<FormItem label="编号"> <FormItem label="编号">

View File

@ -1,48 +1,42 @@
<template> <template>
<div class="search"> <div class="search">
<Row> <Card>
<Col> <Row @keydown.enter.native="handleSearch">
<Card> <Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
<Row @keydown.enter.native="handleSearch"> <Form-item label="商品名称" prop="goodsName">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> <Input
<Form-item label="商品名称" prop="goodsName"> type="text"
<Input v-model="searchForm.goodsName"
type="text" placeholder="请输入商品名称"
v-model="searchForm.goodsName" clearable
placeholder="请输入商品名称" style="width: 200px"
clearable />
style="width: 200px" </Form-item>
/> <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form-item> </Form>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button> </Row>
</Form> <Row class="operation" style="margin-top: 10px">
</Row> <Button @click="delAll"></Button>
<Row class="operation" style="margin-top: 10px"> </Row>
<Button @click="delAll"></Button> <Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect">
</Row> <template slot="goodsName" slot-scope="{row}">
<Row> <div>
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"> <div class="div-zoom">
<template slot="goodsName" slot-scope="{row}"> <a @click="linkTo(row.goodsId,row.skuId)">{{row.goodsName}}</a>
<div> </div>
<div class="div-zoom"> <Poptip trigger="hover" title="扫码在手机中查看" transfer>
<a @click="linkTo(row.goodsId,row.skuId)">{{row.goodsName}}</a> <div slot="content">
</div> <vue-qr :text="wapLinkTo(row.goodsId,row.skuId)" :margin="0" colorDark="#000" colorLight="#fff" :size="150"></vue-qr>
<Poptip trigger="hover" title="扫码在手机中查看" transfer> </div>
<div slot="content"> <img src="../../assets/qrcode.svg" class="hover-pointer" width="20" height="20" alt="">
<vue-qr :text="wapLinkTo(row.goodsId,row.skuId)" :margin="0" colorDark="#000" colorLight="#fff" :size="150"></vue-qr> </Poptip>
</div> </div>
<img src="../../assets/qrcode.svg" class="hover-pointer" width="20" height="20" alt=""> </template>
</Poptip> </Table>
</div> <Row type="flex" justify="end" class="page">
</template> <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>
</Table> </Row>
</Row> </Card>
<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>
</Col>
</Row>
</div> </div>
</template> </template>

View File

@ -1,54 +1,46 @@
<template> <template>
<div class="search"> <div class="search">
<Row> <Card>
<Col> <Row v-show="openSearch" @keydown.enter.native="handleSearch">
<Card> <Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
<Row v-show="openSearch" @keydown.enter.native="handleSearch"> <Form-item label="订单编号" prop="orderSn">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> <Input
<Form-item label="订单编号" prop="orderSn"> type="text"
<Input v-model="searchForm.orderSn"
type="text" placeholder="请输入订单编号"
v-model="searchForm.orderSn" clearable
placeholder="请输入订单编号" style="width: 200px"
clearable />
style="width: 200px" </Form-item>
/> <Form-item label="分销商" prop="distributionName">
</Form-item> <Input
<Form-item label="分销商" prop="distributionName"> type="text"
<Input v-model="searchForm.distributionName"
type="text" placeholder="请输入分销商名称"
v-model="searchForm.distributionName" clearable
placeholder="请输入分销商名称" style="width: 200px"
clearable />
style="width: 200px" </Form-item>
/> <Form-item label="店铺名称">
</Form-item> <Select v-model="searchForm.shopId" placeholder="请选择" @on-query-change="searchChange" filterable
<Form-item label="店铺名称"> clearable style="width: 150px">
<Select v-model="searchForm.shopId" placeholder="请选择" @on-query-change="searchChange" filterable <Option v-for="item in shopList" :value="item.id" :key="item.id">{{ item.storeName }}</Option>
clearable style="width: 150px"> </Select>
<Option v-for="item in shopList" :value="item.id" :key="item.id">{{ item.storeName }}</Option> </Form-item>
</Select> <Form-item label="订单时间">
</Form-item> <DatePicker type="daterange" v-model="timeRange" format="yyyy-MM-dd" placeholder="选择时间"
<Form-item label="订单时间"> style="width: 210px"></DatePicker>
<DatePicker type="daterange" v-model="timeRange" format="yyyy-MM-dd" placeholder="选择时间" </Form-item>
style="width: 210px"></DatePicker> <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form-item> </Form>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button> </Row>
</Form> <Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"></Table>
</Row> <Row type="flex" justify="end" class="page">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize"
<Row class="padding-row"> @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10,20,50]"
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"></Table> size="small" show-total show-elevator show-sizer></Page>
</Row> </Row>
<Row type="flex" justify="end" class="page"> </Card>
<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>
</Col>
</Row>
</div> </div>
</template> </template>

View File

@ -1,43 +1,37 @@
<template> <template>
<div class="search"> <div class="search">
<Row> <Card>
<Col> <Row @keydown.enter.native="handleSearch"> </Row>
<Card> <Row class="operation">
<Row @keydown.enter.native="handleSearch"> </Row> <Button @click="add" type="primary" >添加</Button>
<Row class="operation">
<Button @click="add" type="primary" >添加</Button>
<Button @click="delAll"></Button> <Button @click="delAll"></Button>
</Row> </Row>
<Row> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="columns"
:columns="columns" :data="data"
:data="data" ref="table"
ref="table" sortable="custom"
sortable="custom" @on-sort-change="changeSort"
@on-sort-change="changeSort" @on-selection-change="changeSelect"
@on-selection-change="changeSelect" ></Table>
></Table> <Row type="flex" justify="end" class="page">
</Row> <Page
<Row type="flex" justify="end" class="page"> :current="searchForm.pageNumber"
<Page :total="total"
:current="searchForm.pageNumber" :page-size="searchForm.pageSize"
:total="total" @on-change="changePage"
:page-size="searchForm.pageSize" @on-page-size-change="changePageSize"
@on-change="changePage" :page-size-opts="[10, 20, 50]"
@on-page-size-change="changePageSize" size="small"
:page-size-opts="[10, 20, 50]" show-total
size="small" show-elevator
show-total show-sizer
show-elevator ></Page>
show-sizer </Row>
></Page> </Card>
</Row>
</Card>
</Col>
</Row>
<Modal <Modal
:title="modalTitle" :title="modalTitle"
v-model="modalVisible" v-model="modalVisible"

View File

@ -70,7 +70,6 @@
<Tabs v-model="orderStatus" @on-click="handleClickType"> <Tabs v-model="orderStatus" @on-click="handleClickType">
<TabPane label="行业订单数量" name="NUM"> <TabPane label="行业订单数量" name="NUM">
<Table :columns="columns" :data="data"></Table> <Table :columns="columns" :data="data"></Table>
</TabPane> </TabPane>
<TabPane label="行业订单金额" name="PRICE"> <TabPane label="行业订单金额" name="PRICE">
<Table :columns="columns" :data="data"></Table> <Table :columns="columns" :data="data"></Table>

View File

@ -1,100 +1,94 @@
<template> <template>
<div class="search"> <div class="search">
<Row> <Card>
<Col> <Row @keydown.enter.native="handleSearch">
<Card> <Form
<Row @keydown.enter.native="handleSearch"> ref="searchForm"
<Form :model="searchForm"
ref="searchForm" inline
:model="searchForm" :label-width="70"
inline class="search-form"
:label-width="70" >
class="search-form" <Form-item label="商品名称" prop="goodsName">
> <Input
<Form-item label="商品名称" prop="goodsName"> type="text"
<Input v-model="searchForm.goodsName"
type="text" placeholder="请输入商品名称"
v-model="searchForm.goodsName" clearable
placeholder="请输入商品名称" style="width: 200px"
clearable />
style="width: 200px" </Form-item>
/> <Form-item label="商品编号" prop="sn">
</Form-item> <Input
<Form-item label="商品编号" prop="sn"> type="text"
<Input v-model="searchForm.sn"
type="text" placeholder="请输入商品编号"
v-model="searchForm.sn" clearable
placeholder="请输入商品编号" style="width: 200px"
clearable />
style="width: 200px" </Form-item>
/> <Form-item label="状态" prop="status">
</Form-item> <Select
<Form-item label="状态" prop="status"> v-model="searchForm.marketEnable"
<Select placeholder="请选择"
v-model="searchForm.marketEnable" clearable
placeholder="请选择" style="width: 200px"
clearable
style="width: 200px"
>
<Option value="UPPER">上架</Option>
<Option value="DOWN">下架</Option>
</Select>
</Form-item>
<Button @click="handleSearch" class="search-btn" type="primary" icon="ios-search" >搜索</Button>
</Form>
</Row>
<Row class="padding-row">
<Table
:loading="loading"
border
:columns="columns"
:data="data"
ref="table"
sortable="custom"
@on-sort-change="changeSort"
@on-selection-change="changeSelect"
> >
<Option value="UPPER">上架</Option>
<Option value="DOWN">下架</Option>
</Select>
</Form-item>
<Button @click="handleSearch" class="search-btn" type="primary" icon="ios-search" >搜索</Button>
</Form>
</Row>
<Table
:loading="loading"
border
:columns="columns"
:data="data"
ref="table"
sortable="custom"
@on-sort-change="changeSort"
@on-selection-change="changeSelect"
>
<!-- 商品栏目格式化 --> <!-- 商品栏目格式化 -->
<template slot="goodsSlot" slot-scope="{row}"> <template slot="goodsSlot" slot-scope="{row}">
<div style="margin: 5px 0px;height: 80px; display: flex;"> <div style="margin: 5px 0px;height: 80px; display: flex;">
<div style=""> <div style="">
<img :src="row.original" style="height: 60px;margin-top: 1px;width: 60px"> <img :src="row.original" style="height: 60px;margin-top: 1px;width: 60px">
</div> </div>
<div style="margin-left: 13px;"> <div style="margin-left: 13px;">
<div class="div-zoom"> <div class="div-zoom">
<a @click="linkTo(row.id,row.skuId)">{{row.goodsName}}</a> <a @click="linkTo(row.id,row.skuId)">{{row.goodsName}}</a>
</div> </div>
<Poptip trigger="hover" title="扫码在手机中查看" transfer> <Poptip trigger="hover" title="扫码在手机中查看" transfer>
<div slot="content"> <div slot="content">
<vue-qr :text="wapLinkTo(row.id,row.skuId)" :margin="0" colorDark="#000" colorLight="#fff" :size="150"></vue-qr> <vue-qr :text="wapLinkTo(row.id,row.skuId)" :margin="0" colorDark="#000" colorLight="#fff" :size="150"></vue-qr>
</div>
<img src="../../../assets/qrcode.svg" class="hover-pointer" width="20" height="20" alt="">
</Poptip>
</div>
</div> </div>
<img src="../../../assets/qrcode.svg" class="hover-pointer" width="20" height="20" alt="">
</Poptip>
</div>
</div>
</template> </template>
</Table> </Table>
</Row> <Row type="flex" justify="end" class="page">
<Row type="flex" justify="end" class="page"> <Page
<Page :current="searchForm.pageNumber"
:current="searchForm.pageNumber" :total="total"
:total="total" :page-size="searchForm.pageSize"
:page-size="searchForm.pageSize" @on-change="changePage"
@on-change="changePage" @on-page-size-change="changePageSize"
@on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
:page-size-opts="[10, 20, 50]" size="small"
size="small" show-total
show-total show-elevator
show-elevator show-sizer
show-sizer ></Page>
></Page> </Row>
</Row> </Card>
</Card>
</Col>
</Row>
<Modal <Modal
:title="modalTitle" :title="modalTitle"
v-model="modalVisible" v-model="modalVisible"
@ -105,7 +99,6 @@
ref="underForm" ref="underForm"
:model="underForm" :model="underForm"
:label-width="100" :label-width="100"
:rules="formValidate"
> >
<FormItem label="下架原因" prop="reason"> <FormItem label="下架原因" prop="reason">
<Input v-model="underForm.reason" clearable style="width: 100%" /> <Input v-model="underForm.reason" clearable style="width: 100%" />
@ -133,9 +126,6 @@ export default {
modalType: 0, // modalType: 0, //
modalVisible: false, // modalVisible: false, //
modalTitle: "", // modalTitle: "", //
drop: false, //
dropDownContent: "展开", //
dropDownIcon: "ios-arrow-down", //
searchForm: { searchForm: {
// //
pageNumber: 1, // pageNumber: 1, //
@ -146,17 +136,6 @@ export default {
underForm: { // underForm: { //
reason: "", reason: "",
}, },
form: {
//
goodsName: "",
sn: "",
marketEnable: "",
price: "",
sellerName: "",
},
//
formValidate: {},
submitLoading: false, // submitLoading: false, //
selectList: [], // selectList: [], //
selectCount: 0, // selectCount: 0, //
@ -379,16 +358,6 @@ export default {
this.selectList = e; this.selectList = e;
this.selectCount = e.length; this.selectCount = e.length;
}, },
dropDown() {
if (this.drop) {
this.dropDownContent = "展开";
this.dropDownIcon = "ios-arrow-down";
} else {
this.dropDownContent = "收起";
this.dropDownIcon = "ios-arrow-up";
}
this.drop = !this.drop;
},
getDataList() { getDataList() {
this.loading = true; this.loading = true;
// //

View File

@ -1,83 +1,77 @@
<template> <template>
<div class="search"> <div class="search">
<Row> <Card>
<Col> <Row @keydown.enter.native="handleSearch">
<Card> <Form
<Row @keydown.enter.native="handleSearch"> ref="searchForm"
<Form :model="searchForm"
ref="searchForm" inline
:model="searchForm" :label-width="70"
inline class="search-form"
:label-width="70" >
class="search-form" <Form-item label="商品名称" prop="goodsName">
> <Input
<Form-item label="商品名称" prop="goodsName"> type="text"
<Input v-model="searchForm.goodsName"
type="text" placeholder="请输入商品名称"
v-model="searchForm.goodsName" clearable
placeholder="请输入商品名称" style="width: 200px"
clearable />
style="width: 200px" </Form-item>
/> <Form-item label="商品编号" prop="sn">
</Form-item> <Input
<Form-item label="商品编号" prop="sn"> type="text"
<Input v-model="searchForm.sn"
type="text" placeholder="请输入商品编号"
v-model="searchForm.sn" clearable
placeholder="请输入商品编号" style="width: 200px"
clearable />
style="width: 200px" </Form-item>
/> <Button @click="handleSearch" class="search-btn" type="primary" icon="ios-search" >搜索</Button>
</Form-item> </Form>
<Button @click="handleSearch" class="search-btn" type="primary" icon="ios-search" >搜索</Button> </Row>
</Form> <Table
</Row> :loading="loading"
<Row class="padding-row"> border
<Table :columns="columns"
:loading="loading" :data="data"
border ref="table"
:columns="columns" sortable="custom"
:data="data" @on-sort-change="changeSort"
ref="table" @on-selection-change="changeSelect"
sortable="custom" >
@on-sort-change="changeSort"
@on-selection-change="changeSelect"
>
<!-- 商品栏目格式化 --> <!-- 商品栏目格式化 -->
<template slot="goodsSlot" slot-scope="scope"> <template slot="goodsSlot" slot-scope="scope">
<div style="margin-top: 5px;height: 80px; display: flex;"> <div style="margin-top: 5px;height: 80px; display: flex;">
<div style=""> <div style="">
<img :src="scope.row.original" style="height: 60px;margin-top: 3px;width: 60px"> <img :src="scope.row.original" style="height: 60px;margin-top: 3px;width: 60px">
</div> </div>
<div style="margin-left: 13px"> <div style="margin-left: 13px">
<div class="div-zoom" > <div class="div-zoom" >
<a>{{scope.row.goodsName}}</a> <a>{{scope.row.goodsName}}</a>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
</Table> </Table>
</Row> <Row type="flex" justify="end" class="page">
<Row type="flex" justify="end" class="page"> <Page
<Page :current="searchForm.pageNumber"
:current="searchForm.pageNumber" :total="total"
:total="total" :page-size="searchForm.pageSize"
:page-size="searchForm.pageSize" @on-change="changePage"
@on-change="changePage" @on-page-size-change="changePageSize"
@on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
:page-size-opts="[10, 20, 50]" size="small"
size="small" show-total
show-total show-elevator
show-elevator show-sizer
show-sizer ></Page>
></Page> </Row>
</Row> </Card>
</Card>
</Col>
</Row>
</div> </div>
</template> </template>
@ -105,16 +99,6 @@
goodsAuditForm: { // goodsAuditForm: { //
is_auth: 1, is_auth: 1,
}, },
form: {
//
goodsName: "",
sn: "",
marketEnable: "",
price: "",
sellerName: "",
},
//
formValidate: {},
submitLoading: false, // submitLoading: false, //
selectList: [], // selectList: [], //
selectCount: 0, // selectCount: 0, //

View File

@ -3,62 +3,56 @@
</style> </style>
<template> <template>
<div class="search"> <div class="search">
<Row> <Card>
<Col> <Row @keydown.enter.native="handleSearch">
<Card> <Form
<Row @keydown.enter.native="handleSearch"> ref="searchForm"
<Form :model="searchForm"
ref="searchForm" inline
:model="searchForm" :label-width="70"
inline class="search-form"
:label-width="70" >
class="search-form" <Form-item label="品牌名称" prop="name">
> <Input
<Form-item label="品牌名称" prop="name"> type="text"
<Input v-model="searchForm.name"
type="text" placeholder="请输入品牌名称"
v-model="searchForm.name" clearable
placeholder="请输入品牌名称" style="width: 200px"
clearable />
style="width: 200px" </Form-item>
/>
</Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button> <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form> </Form>
</Row> </Row>
<Row class="operation padding-row"> <Row class="operation padding-row">
<Button @click="add" type="primary">添加</Button> <Button @click="add" type="primary">添加</Button>
</Row> </Row>
<Row> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="columns"
:columns="columns" :data="data"
:data="data" ref="table"
ref="table" sortable="custom"
sortable="custom" @on-sort-change="changeSort"
@on-sort-change="changeSort" @on-selection-change="changeSelect"
@on-selection-change="changeSelect" ></Table>
></Table> <Row type="flex" justify="end" class="page">
</Row> <Page
<Row type="flex" justify="end" class="page"> :current="searchForm.pageNumber"
<Page :total="total"
:current="searchForm.pageNumber" :page-size="searchForm.pageSize"
:total="total" @on-change="changePage"
:page-size="searchForm.pageSize" @on-page-size-change="changePageSize"
@on-change="changePage" :page-size-opts="[10, 20, 50]"
@on-page-size-change="changePageSize" size="small"
:page-size-opts="[10, 20, 50]" show-total
size="small" show-elevator
show-total show-sizer
show-elevator ></Page>
show-sizer </Row>
></Page> </Card>
</Row>
</Card>
</Col>
</Row>
<Modal <Modal
:title="modalTitle" :title="modalTitle"
v-model="modalVisible" v-model="modalVisible"

View File

@ -1,64 +1,57 @@
<template> <template>
<div class="search"> <div class="search">
<Row> <Card>
<Col> <Row @keydown.enter.native="handleSearch">
<Card> <Form
<Row @keydown.enter.native="handleSearch"> ref="searchForm"
<Form :model="searchForm"
ref="searchForm" inline
:model="searchForm" :label-width="70"
inline class="search-form"
:label-width="70" >
class="search-form" <Form-item label="规格名称" prop="specName">
> <Input
<Form-item label="规格名称" prop="specName"> type="text"
<Input v-model="searchForm.specName"
type="text" placeholder="请输入规格名称"
v-model="searchForm.specName" clearable
placeholder="请输入规格名称" style="width: 200px"
clearable />
style="width: 200px" </Form-item>
/>
</Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button> <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form> </Form>
</Row> </Row>
<Row class="operation padding-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>
</Row> </Row>
<Row class="padding-row"> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="columns"
:columns="columns" :data="data"
:data="data" ref="table"
ref="table" sortable="custom"
sortable="custom" @on-sort-change="changeSort"
@on-sort-change="changeSort" @on-selection-change="changeSelect"
@on-selection-change="changeSelect" >
> </Table>
<Row type="flex" justify="end" class="page">
</Table> <Page
</Row> :current="searchForm.pageNumber"
<Row type="flex" justify="end" class="page"> :total="total"
<Page :page-size="searchForm.pageSize"
:current="searchForm.pageNumber" @on-change="changePage"
:total="total" @on-page-size-change="changePageSize"
:page-size="searchForm.pageSize" :page-size-opts="[10, 20, 50]"
@on-change="changePage" size="small"
@on-page-size-change="changePageSize" show-total
:page-size-opts="[10, 20, 50]" show-elevator
size="small" show-sizer
show-total ></Page>
show-elevator </Row>
show-sizer </Card>
></Page>
</Row>
</Card>
</Col>
</Row>
<Modal <Modal
:title="modalTitle" :title="modalTitle"
v-model="modalVisible" v-model="modalVisible"

View File

@ -1,249 +0,0 @@
<template>
<Card>
<Form
label-position="left"
ref="searchForm"
:model="params"
inline
:label-width="100"
class="search-form"
>
<Form-item label="选择店铺" prop="sn">
<span class="tips" v-if="storeName"
>{{ storeName }}
<Button
@click="
() => {
storeName = '';
params.shopId = '';
}
"
type="text"
>清空</Button
>
</span>
<Button size="small" @click="handleClickShop" type="primary"
>选择店铺</Button
>
</Form-item>
<Form-item label="选择时间类型">
<Select v-model="params.timeType" style="width: 200px">
<Option
v-for="item in typeList"
:value="item.value"
:key="item.value"
>{{ item.label }}</Option
>
</Select>
</Form-item>
<Form-item label="按年查询">
<DatePicker
type="year"
placeholder="Select year"
style="width: 200px"
v-model="year"
></DatePicker>
</Form-item>
<Form-item label="按月查询" v-if="params.timeType == 'MONTH'">
<InputNumber :max="12" :min="1" v-model="params.month"></InputNumber>
</Form-item>
</Form>
<div class="order-list">
<div class="order-col">
<div>金额</div>
<div>{{ priceData | unitPrice }}</div>
</div>
</div>
<Tabs v-model="orderStatus" @on-click="handleClickType">
<TabPane label="订单列表" name="PRICE">
<Table :columns="columns" :data="data"></Table>
<div class="page-col">
<Page @on-change="changePage" :total="total" show-total />
</div>
</TabPane>
</Tabs>
<Modal v-model="modalFlag" width="1200" :title="selectName">
<!-- 店铺 -->
<shopLayout v-if="shopFlag" @callback="callbackShop" ref="shops" />
<!-- 会员 -->
<memberLayout v-else @callback="callbackMember" ref="members" />
</Modal>
</Card>
</template>
<script>
import shopLayout from "@/views/seller/shop/shopList";
import memberLayout from "@/views/member/list/index";
import * as API_Goods from "@/api/goods";
export default {
components: {
shopLayout,
memberLayout,
},
data() {
return {
storeName: "", //
memberName: "", //
shopFlag: false, //
selectName: "选择", // modal
modalFlag: false, // modal
priceData: "", //
orderStatus: "PRICE", // tab
shopList: {}, //
memberList: {}, //
typeList: [
{
value: "YEAR",
label: "年",
},
{
value: "MONTH",
label: "月",
},
],
total: 0, //
year: "", //
params: { //
type: "PRICE",
timeType: "YEAR",
pageNumber: 1,
pageSize: 10,
year: "",
shopId: "",
memberId: "",
},
columns: [ //
{
title: "售后号",
key: "refundSn",
},
{
title: "卖家名称",
key: "sellerName",
},
{
title: "商品名称",
key: "name",
},
{
title: "规格名称",
key: "specs",
},
{
title: "会员名称",
key: "memberName",
},
{
title: "实际退款金额",
key: "finalPrice",
align: "center",
render: (h, params) => {
return h(
"div",
this.$options.filters.unitPrice(params.row.finalPrice)
);
},
},
],
data: [] //
};
},
watch: {
params: {
handler(val) {
this.init();
},
deep: true,
},
year(val) {
this.params.year = new Date(val).getFullYear();
},
},
methods: {
//
handleClickShop() {
this.modalFlag = true;
this.selectName += "店铺";
this.shopFlag = true;
this.$nextTick(() => {
this.$refs.shops.selectedShop = true;
});
},
//
handleClickMember() {
this.modalFlag = true;
this.selectName += "会员";
this.$nextTick(() => {
this.$refs.members.selectedMember = true;
});
},
callbackMember(val) {
this.memberName = val.username;
this.params.memberId = val.id;
this.modalFlag = false;
},
callbackShop(val) {
this.storeName = val.storeName;
this.params.shopId = val.id;
this.modalFlag = false;
},
//
changePage(index) {
this.params.pageNumber = index;
},
handleClickType(name) {
this.params.type = name;
},
init(name) {
Promise.all([
API_Goods.refundStatistics(this.params),
!this.priceData ? API_Goods.refundPriceStatistics(this.params) : "",
]).then((res) => {
if (res[0].result) {
this.data = res[0].result.records;
this.total = res[0].result.total;
}
if (res[1].result) {
this.priceData = res[1].result;
}
});
},
},
mounted() {
let data = new Date();
this.year = data;
this.year && this.params.month
? this.timeType == "MONTH"
: this.timeType == "YEAR";
},
};
</script>
<style scoped lang="scss">
.page-col {
text-align: right;
margin: 10px 0;
}
.order-col {
display: flex;
> div {
margin-right: 8px;
padding: 16px;
font-size: 15px;
}
}
.order-list {
display: flex;
}
.tips {
margin: 0 8px;
}
</style>

View File

@ -1,38 +1,33 @@
<template> <template>
<div class="search"> <div class="search">
<Row> <Card>
<Card> <Row @keydown.enter.native="handleSearch">
<Row @keydown.enter.native="handleSearch"> <Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> <Form-item label="会员名称" prop="memberName">
<Form-item label="会员名称" prop="memberName"> <Input type="text" v-model="searchForm.memberName" placeholder="请输入会员名称" clearable style="width: 200px"/>
<Input type="text" v-model="searchForm.memberName" placeholder="请输入会员名称" clearable style="width: 200px"/> </Form-item>
</Form-item> <Button @click="handleSearch" type="primary" class="search-btn" icon="ios-search">搜索</Button>
<Button @click="handleSearch" type="primary" class="search-btn" icon="ios-search">搜索</Button> </Form>
</Form> </Row>
</Row> <Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"
<Row class="padding-row"> @on-sort-change="changeSort" @on-selection-change="changeSelect">
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" <!-- 页面展示 -->
@on-sort-change="changeSort" @on-selection-change="changeSelect"> <template slot="shopDisableSlot" slot-scope="scope">
<!-- 页面展示 --> <div>
<template slot="shopDisableSlot" slot-scope="scope"> </div>
<div> <i-switch size="large" true-value="OPEN" false-value="CLOSE" v-model="scope.row.status"
</div> @on-change="changeSwitch(scope.row)">
<i-switch size="large" true-value="OPEN" false-value="CLOSE" v-model="scope.row.status" <span slot="open">展示</span>
@on-change="changeSwitch(scope.row)"> <span slot="close">隐藏</span>
<span slot="open">展示</span> </i-switch>
<span slot="close">隐藏</span> </template>
</i-switch> </Table>
</template> <Row type="flex" justify="end" class="page">
</Table> <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage"
@on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
</Row> size="small" show-total show-elevator show-sizer></Page>
<Row type="flex" justify="end" class="page"> </Row>
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" </Card>
@on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
size="small" show-total show-elevator show-sizer></Page>
</Row>
</Card>
</Row>
<Modal v-model="infoFlag" width="800" :title="infoTitle"> <Modal v-model="infoFlag" width="800" :title="infoTitle">
@ -68,7 +63,7 @@
<div style="margin-left: 40px"> <div style="margin-left: 40px">
<img style="width: 100px;height: 110px;margin-left: 2px" <img style="width: 100px;height: 110px;margin-left: 2px"
v-for="(img,index) in infoData.image.split(',')" v-if="infoData.image.length !=0" :src="img" v-for="(img,index) in infoData.image.split(',')" v-if="infoData.image.length !=0" :src="img"
alt="" /> alt="" :key="index"/>
</div> </div>
</div> </div>
</List> </List>
@ -81,7 +76,7 @@
</div> </div>
<div v-if="infoData.haveReplyImage == 1"> <div v-if="infoData.haveReplyImage == 1">
<div style="margin-left: 60px"> <div style="margin-left: 60px">
<img style="width: 100px;height: 110px" v-for="(img,index) in infoData.replyImage.split(',')" <img style="width: 100px;height: 110px" v-for="(img,index) in infoData.replyImage.split(',')" :key="index"
v-if="infoData.replyImage.length !=0" :src="img" alt=""/> v-if="infoData.replyImage.length !=0" :src="img" alt=""/>
</div> </div>
</div> </div>
@ -114,16 +109,6 @@ export default {
startDate: "", // startDate: "", //
endDate: "", // endDate: "", //
}, },
form: {
//
memberName: "",
storeName: "",
shopDisable: "",
id: "",
createTime: "",
},
//
formValidate: {},
submitLoading: false, // submitLoading: false, //
selectList: [], // selectList: [], //
selectCount: 0, // selectCount: 0, //

View File

@ -45,8 +45,6 @@ export default {
type: "multiple", // single multiple type: "multiple", // single multiple
skuList: [], // sku skuList: [], // sku
selectedWay: [], //
total: "", // total: "", //
goodsParams: { // goodsParams: { //
pageNumber: 1, pageNumber: 1,
@ -64,7 +62,12 @@ export default {
loading: false, // loading: false, //
}; };
}, },
props: ["clearFlag"], props: {
selectedWay: {
type: Array,
default: new Array()
}
},
watch: { watch: {
category(val) { category(val) {
this.goodsParams.categoryPath = val[0]; this.goodsParams.categoryPath = val[0];
@ -74,6 +77,7 @@ export default {
this.$emit("selected", this.selectedWay); this.$emit("selected", this.selectedWay);
}, },
deep: true, deep: true,
immediate: true
}, },
"goodsParams.categoryPath": { "goodsParams.categoryPath": {
@ -110,6 +114,12 @@ export default {
res.result.records.forEach((item) => { res.result.records.forEach((item) => {
item.selected = false; item.selected = false;
item.___type = "goods"; //goodspc wap item.___type = "goods"; //goodspc wap
this.selectedWay.forEach(e => {
if (e.id === item.id) {
item.selected = true
}
})
}); });
/** /**
* 解决数据请求中滚动栏会一直上下跳动 * 解决数据请求中滚动栏会一直上下跳动
@ -117,7 +127,6 @@ export default {
this.total = res.result.total; this.total = res.result.total;
this.goodsData.push(...res.result.records); this.goodsData.push(...res.result.records);
// console.log(this.goodsData);
} else { } else {
this.empty = true; this.empty = true;
} }
@ -193,9 +202,13 @@ export default {
this.selectedWay.push(val); this.selectedWay.push(val);
} else { } else {
val.selected = false; val.selected = false;
this.selectedWay.splice(index, 1); for (let i = 0; i<this.selectedWay.length; i++ ) {
if (this.selectedWay[i].id===val.id) {
this.selectedWay.splice(i,1)
break;
}
}
} }
// console.log(this.selectedWay);
}, },
}, },
}; };

View File

@ -1,15 +1,14 @@
<template> <template>
<Modal :styles="{ top: '120px' }" width="1160" @on-cancel="clickClose" @on-ok="clickOK" v-model="flag" :mask-closable="false" scrollable> <Modal :styles="{ top: '120px' }" width="1160" @on-cancel="clickClose" @on-ok="clickOK" v-model="flag" :mask-closable="false" scrollable>
<goodsDialog @selected=" <template v-if="flag">
(val) => { <goodsDialog @selected="(val) => {goodsData = val;}"
goodsData = val; v-if="goodsFlag" ref="goodsDialog" :selectedWay='goodsData'/>
} <linkDialog @selectedLink="
" v-if="goodsFlag" ref="goodsDialog" /> (val) => {
<linkDialog @selectedLink=" linkData = val;
(val) => { }
linkData = val; " v-else class="linkDialog" />
} </template>
" v-else class="linkDialog" />
</Modal> </Modal>
</template> </template>
<script> <script>
@ -23,14 +22,11 @@ export default {
data() { data() {
return { return {
goodsFlag: false, // goodsFlag: false, //
goodsData: "", // goodsData: [], //
linkData: "", // linkData: "", //
flag: false, // modal flag: false, // modal
}; };
}, },
props: ["types"],
watch: {},
mounted() {},
methods: { methods: {
// //
clickClose() { clickClose() {
@ -54,13 +50,17 @@ export default {
} }
this.clickClose(); this.clickClose();
}, },
open(type) { open(type, mutiple) {
this.flag = true; this.flag = true;
if (type == "goods") { if (type == "goods") {
this.goodsFlag = true; this.goodsFlag = true;
if (mutiple) {
this.singleGoods()
}
} else { } else {
this.goodsFlag = false; this.goodsFlag = false;
} }
}, },
close() { close() {
this.flag = false; this.flag = false;

View File

@ -40,7 +40,7 @@ export default {
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs["lili-component"][0].type = "single"; // this.$refs["lili-component"][0].type = "single"; //
}); });
this.wap.forEach((item) => { this.wap.forEach((item) => {

View File

@ -65,7 +65,7 @@ export default {
}, },
{ {
title: "店铺名称", title: "店铺名称",
key: "sellerName", key: "storeName",
tooltip: true, tooltip: true,
}, },
{ {
@ -113,7 +113,7 @@ export default {
}, },
{ {
title: "店铺名称", title: "店铺名称",
key: "sellerName", key: "storeName",
tooltip: true, tooltip: true,
}, },
{ {

View File

@ -176,12 +176,16 @@ export default {
handleSelectGoods(item) { // handleSelectGoods(item) { //
console.warn(item); console.warn(item);
if (item) this.selected = item; if (item) this.selected = item;
this.$refs.liliDialog.open('goods') this.$refs.liliDialog.open('goods', 'single')
setTimeout(() => {
this.$refs.liliDialog.goodsData = [this.selected]
}, 500);
}, },
selectedLink (val) { selectedLink (val) {
this.selected.url = this.$options.filters.formatLinkType(val); this.selected.url = this.$options.filters.formatLinkType(val);
}, },
selectedGoodsData (val) { selectedGoodsData (val) {
console.log(val);
let goods = val[0] let goods = val[0]
console.log(this.selected); console.log(this.selected);
this.selected.img = goods.thumbnail this.selected.img = goods.thumbnail

View File

@ -108,7 +108,10 @@ export default {
}, },
handleSelectGoods(item) { // handleSelectGoods(item) { //
if(item) this.selected = item; if(item) this.selected = item;
this.$refs.liliDialog.open('goods') this.$refs.liliDialog.open('goods', 'single')
setTimeout(() => {
this.$refs.liliDialog.goodsData = [this.selected]
}, 500);
}, },
selectedLink(val) { selectedLink(val) {
this.selected.url = this.$options.filters.formatLinkType(val); this.selected.url = this.$options.filters.formatLinkType(val);

View File

@ -241,7 +241,7 @@ export default {
}, },
handleSelectGoods(item) { handleSelectGoods(item) {
// //
this.$refs.liliDialog.open("goods"); this.$refs.liliDialog.open('goods', 'single')
}, },
selectedLink(val) { selectedLink(val) {
this.selected.url = this.$options.filters.formatLinkType(val); this.selected.url = this.$options.filters.formatLinkType(val);

View File

@ -1,49 +1,43 @@
<template> <template>
<div class="search"> <div class="search">
<Row> <Card>
<Col> <Row @keydown.enter.native="handleSearch"></Row>
<Card> <Row class="operation padding-row">
<Row @keydown.enter.native="handleSearch"></Row> <Button @click="add" type="primary">添加</Button>
<Row class="operation padding-row"> </Row>
<Button @click="add" type="primary">添加</Button> <Table
</Row> :loading="loading"
<Row> border
<Table :columns="columns"
:loading="loading" :data="data"
border ref="table"
:columns="columns" sortable="custom"
:data="data" @on-sort-change="changeSort"
ref="table" @on-selection-change="changeSelect"
sortable="custom" >
@on-sort-change="changeSort" <!-- 页面展示 -->
@on-selection-change="changeSelect" <template slot="disableSlot" slot-scope="scope">
> <i-switch size="large" v-model="scope.row.disabled == 'OPEN'?true:false" @on-change="changeSwitch(scope.row)">
<!-- 页面展示 --> <span slot="open">展示</span>
<template slot="disableSlot" slot-scope="scope"> <span slot="close">隐藏</span>
<i-switch size="large" v-model="scope.row.disabled == 'OPEN'?true:false" @on-change="changeSwitch(scope.row)"> </i-switch>
<span slot="open">展示</span> </template>
<span slot="close">隐藏</span> </Table>
</i-switch> <Row type="flex" justify="end" class="page">
</template> <Page
</Table> :current="searchForm.pageNumber"
</Row> :total="total"
<Row type="flex" justify="end" class="page"> :page-size="searchForm.pageSize"
<Page @on-change="changePage"
:current="searchForm.pageNumber" @on-page-size-change="changePageSize"
:total="total" :page-size-opts="[10, 20, 50]"
:page-size="searchForm.pageSize" size="small"
@on-change="changePage" show-total
@on-page-size-change="changePageSize" show-elevator
:page-size-opts="[10, 20, 50]" show-sizer
size="small" ></Page>
show-total </Row>
show-elevator </Card>
show-sizer
></Page>
</Row>
</Card>
</Col>
</Row>
<Modal <Modal
:title="modalTitle" :title="modalTitle"
v-model="modalVisible" v-model="modalVisible"

View File

@ -3,7 +3,7 @@
<template> <template>
<div class="ivu-shrinkable-menu"> <div class="ivu-shrinkable-menu">
<!-- 一级菜单 --> <!-- 一级菜单 -->
<Menu ref="sideMenu" width="110px" theme="dark" :active-name="currNav" @on-select="selectNav"> <Menu ref="sideMenu" width="80px" theme="dark" :active-name="currNav" @on-select="selectNav">
<MenuItem v-for="(item, i) in navList" :key="i" :name="item.name"> <MenuItem v-for="(item, i) in navList" :key="i" :name="item.name">
{{item.title}} {{item.title}}
</MenuItem> </MenuItem>
@ -12,7 +12,7 @@
<Menu <Menu
ref="childrenMenu" ref="childrenMenu"
:active-name="$route.name" :active-name="$route.name"
width="130px" width="100px"
@on-select="changeMenu" @on-select="changeMenu"
> >
<template v-for="item in menuList"> <template v-for="item in menuList">

View File

@ -1,6 +1,6 @@
.ivu-shrinkable-menu{ .ivu-shrinkable-menu{
height: calc(100% - 60px); height: calc(100% - 60px);
width: 240px; width: 180px;
display: flex; display: flex;
} }
.ivu-menu-vertical .ivu-menu-item-group-title { .ivu-menu-vertical .ivu-menu-item-group-title {

View File

@ -52,7 +52,7 @@
box-sizing: border-box; box-sizing: border-box;
position: fixed; position: fixed;
display: block; display: block;
padding-left: 200px; padding-left: 180px;
width: 100%; width: 100%;
height: 100px; height: 100px;
z-index: 20; z-index: 20;
@ -256,12 +256,12 @@
.single-page-con { .single-page-con {
min-width: 740px; min-width: 740px;
position: relative; position: relative;
left: 240px; left: 180px;
top: 100px; top: 100px;
right: 0; right: 0;
bottom: 0; bottom: 0;
height: calc(100% - 110px); height: calc(100% - 110px);
width: calc(100% - 240px); width: calc(100% - 180px);
overflow: auto; overflow: auto;
background-color: #f0f0f0; background-color: #f0f0f0;
z-index: 1; z-index: 1;

View File

@ -1,77 +1,71 @@
<template> <template>
<div class="search"> <div class="search">
<Row> <Card>
<Col> <Row @keydown.enter.native="handleSearch">
<Card> <Form
<Row @keydown.enter.native="handleSearch"> ref="searchForm"
<Form :model="searchForm"
ref="searchForm" inline
:model="searchForm" :label-width="70"
inline class="search-form"
:label-width="70" >
class="search-form" <Form-item label="会员名称" prop="memberName">
> <Input
<Form-item label="会员名称" prop="memberName"> type="text"
<Input v-model="searchForm.memberName"
type="text" placeholder="请输入会员名称"
v-model="searchForm.memberName" clearable
placeholder="请输入会员名称" style="width: 200px"
clearable />
style="width: 200px" </Form-item>
/> <Form-item label="充值单号" prop="rechargeSn">
</Form-item> <Input
<Form-item label="充值单号" prop="rechargeSn"> type="text"
<Input v-model="searchForm.rechargeSn"
type="text" placeholder="请输入充值单号"
v-model="searchForm.rechargeSn" clearable
placeholder="请输入充值单号" style="width: 200px"
clearable />
style="width: 200px" </Form-item>
/> <Form-item label="支付时间">
</Form-item> <DatePicker
<Form-item label="支付时间"> v-model="selectDate"
<DatePicker type="datetimerange"
v-model="selectDate" format="yyyy-MM-dd HH:mm:ss"
type="datetimerange" clearable
format="yyyy-MM-dd HH:mm:ss" @on-change="selectDateRange"
clearable placeholder="选择起始时间"
@on-change="selectDateRange" style="width: 200px"
placeholder="选择起始时间" ></DatePicker>
style="width: 200px" </Form-item>
></DatePicker> <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form-item> </Form>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button> </Row>
</Form> <Table
</Row> :loading="loading"
<Row class="padding-row"> border
<Table :columns="columns"
:loading="loading" :data="data"
border ref="table"
:columns="columns" sortable="custom"
:data="data" @on-sort-change="changeSort"
ref="table" @on-selection-change="changeSelect"
sortable="custom" ></Table>
@on-sort-change="changeSort" <Row type="flex" justify="end" class="page">
@on-selection-change="changeSelect" <Page
></Table> :current="searchForm.pageNumber"
</Row> :total="total"
<Row type="flex" justify="end" class="page"> :page-size="searchForm.pageSize"
<Page @on-change="changePage"
:current="searchForm.pageNumber" @on-page-size-change="changePageSize"
:total="total" :page-size-opts="[10, 20, 50]"
:page-size="searchForm.pageSize" size="small"
@on-change="changePage" show-total
@on-page-size-change="changePageSize" show-elevator
:page-size-opts="[10, 20, 50]" show-sizer
size="small" ></Page>
show-total </Row>
show-elevator </Card>
show-sizer
></Page>
</Row>
</Card>
</Col>
</Row>
</div> </div>
</template> </template>

View File

@ -1,30 +1,24 @@
<template> <template>
<div class="search"> <div class="search">
<Row> <Card>
<Col> <Row @keydown.enter.native="handleSearch">
<Card> <Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
<Row @keydown.enter.native="handleSearch"> <Form-item label="会员名称" prop="memberName">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> <Input type="text" v-model="searchForm.memberName" placeholder="请输入会员名称" clearable style="width: 200px" />
<Form-item label="会员名称" prop="memberName"> </Form-item>
<Input type="text" v-model="searchForm.memberName" placeholder="请输入会员名称" clearable style="width: 200px" /> <Form-item label="支付时间">
</Form-item> <DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd HH:mm:ss" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px"></DatePicker>
<Form-item label="支付时间"> </Form-item>
<DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd HH:mm:ss" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px"></DatePicker> <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form-item> </Form>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button> </Row>
</Form> <Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
</Row> <Row type="flex" justify="end" class="page">
<Row class="padding-row"> <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table> size="small" show-total show-elevator show-sizer></Page>
</Row> </Row>
<Row type="flex" justify="end" class="page"> </Card>
<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>
</Col>
</Row>
</div> </div>
</template> </template>

View File

@ -1,84 +1,78 @@
<template> <template>
<div class="search"> <div class="search">
<Row> <Card>
<Col> <Row @keydown.enter.native="handleSearch">
<Card> <Form
<Row @keydown.enter.native="handleSearch"> ref="searchForm"
<Form :model="searchForm"
ref="searchForm" inline
:model="searchForm" :label-width="70"
inline class="search-form"
:label-width="70" >
class="search-form" <Form-item label="会员名称" prop="memberName">
<Input
type="text"
v-model="searchForm.memberName"
placeholder="请输入会员名称"
clearable
style="width: 200px"
/>
</Form-item>
<Form-item label="审核状态" prop="applyStatus">
<Select
v-model="searchForm.memberName"
clearable
style="width: 200px"
> >
<Form-item label="会员名称" prop="memberName"> <Option value="APPLY">申请中</Option>
<Input <Option value="VIA_AUDITING">审核通过(提现成功)</Option>
type="text" <Option value="FAIL_AUDITING">审核拒绝</Option>
v-model="searchForm.memberName" </Select>
placeholder="请输入会员名称" </Form-item>
clearable <Form-item label="申请时间">
style="width: 200px" <DatePicker
/> v-model="selectDate"
</Form-item> type="datetimerange"
<Form-item label="审核状态" prop="applyStatus"> format="yyyy-MM-dd HH:mm:ss"
<Select clearable
v-model="searchForm.memberName" @on-change="selectDateRange"
clearable placeholder="选择起始时间"
style="width: 200px" style="width: 200px"
> ></DatePicker>
<Option value="APPLY">申请中</Option> </Form-item>
<Option value="VIA_AUDITING">审核通过(提现成功)</Option> <Form-item style="margin-left: -35px" class="br">
<Option value="FAIL_AUDITING">审核拒绝</Option> <Button @click="handleSearch" type="primary" icon="ios-search"
</Select> >搜索
</Form-item> </Button
<Form-item label="申请时间"> >
<DatePicker </Form-item>
v-model="selectDate" </Form>
type="datetimerange" </Row>
format="yyyy-MM-dd HH:mm:ss" <Table
clearable :loading="loading"
@on-change="selectDateRange" border
placeholder="选择起始时间" :columns="columns"
style="width: 200px" :data="data"
></DatePicker> ref="table"
</Form-item> sortable="custom"
<Form-item style="margin-left: -35px" class="br"> @on-sort-change="changeSort"
<Button @click="handleSearch" type="primary" icon="ios-search" @on-selection-change="changeSelect"
>搜索 ></Table>
</Button <Row type="flex" justify="end" class="page">
> <Page
</Form-item> :current="searchForm.pageNumber"
</Form> :total="total"
</Row> :page-size="searchForm.pageSize"
<Row class="padding-row"> @on-change="changePage"
<Table @on-page-size-change="changePageSize"
:loading="loading" :page-size-opts="[10, 20, 50]"
border size="small"
:columns="columns" show-total
:data="data" show-elevator
ref="table" show-sizer
sortable="custom" ></Page>
@on-sort-change="changeSort" </Row>
@on-selection-change="changeSelect" </Card>
></Table>
</Row>
<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>
</Col>
</Row>
<Modal <Modal
:title="modalTitle" :title="modalTitle"
v-model="roleModalVisible" v-model="roleModalVisible"

View File

@ -1,38 +1,33 @@
<template> <template>
<div class="search"> <div class="search">
<Row> <Card>
<Card> <Row @keydown.enter.native="handleSearch">
<Row @keydown.enter.native="handleSearch"> <Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> <Form-item label="会员名称" prop="username">
<Form-item label="会员名称" prop="username"> <Input type="text" v-model="searchForm.username" placeholder="请输入会员名称" clearable style="width: 200px" />
<Input type="text" v-model="searchForm.username" placeholder="请输入会员名称" clearable style="width: 200px" /> </Form-item>
</Form-item>
<Form-item label="会员昵称" prop="nickName"> <Form-item label="会员昵称" prop="nickName">
<Input type="text" v-model="searchForm.nickName" placeholder="请输入会员昵称" clearable style="width: 200px" /> <Input type="text" v-model="searchForm.nickName" placeholder="请输入会员昵称" clearable style="width: 200px" />
</Form-item> </Form-item>
<Form-item label="联系方式" prop="mobile"> <Form-item label="联系方式" prop="mobile">
<Input type="text" v-model="searchForm.mobile" placeholder="请输入会员联系方式" clearable style="width: 200px" /> <Input type="text" v-model="searchForm.mobile" placeholder="请输入会员联系方式" clearable style="width: 200px" />
</Form-item> </Form-item>
<Button @click="handleSearch" class="search-btn" type="primary" icon="ios-search">搜索</Button> <Button @click="handleSearch" class="search-btn" type="primary" icon="ios-search">搜索</Button>
</Form> </Form>
</Row> </Row>
<Row class="operation padding-row"> <Row class="operation padding-row">
<Button @click="addMember" type="primary">添加会员</Button> <Button @click="addMember" type="primary">添加会员</Button>
</Row> </Row>
<Row> <Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect">
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"> </Table>
</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]"
</Row> size="small" show-total show-elevator show-sizer></Page>
<Row type="flex" justify="end" class="page"> </Row>
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" </Card>
size="small" show-total show-elevator show-sizer></Page>
</Row>
</Card>
</Row>
<!-- 添加用户模态框 --> <!-- 添加用户模态框 -->
<Modal v-model="addFlag" title="添加用户"> <Modal v-model="addFlag" title="添加用户">

View File

@ -78,7 +78,6 @@
</div> </div>
</div> </div>
<div class="point-data" style="margin-top: -5px"> <div class="point-data" style="margin-top: -5px">
<Row>
<Table <Table
:loading="loading" :loading="loading"
border border
@ -89,7 +88,6 @@
@on-sort-change="pointChangeSort" @on-sort-change="pointChangeSort"
> >
</Table> </Table>
</Row>
<Row type="flex" justify="end" class="page" style="margin-top: 10px"> <Row type="flex" justify="end" class="page" style="margin-top: 10px">
<Page <Page
@ -168,18 +166,16 @@
</Form> </Form>
</Row> </Row>
<div style="min-height: 180px"> <div style="min-height: 180px">
<Row class="padding-row"> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="orderColumns"
:columns="orderColumns" :data="orderData"
:data="orderData" ref="table"
ref="table" sortable="custom"
sortable="custom" @on-sort-change="orderChangeSort"
@on-sort-change="orderChangeSort" >
> </Table>
</Table>
</Row>
<Row type="flex" justify="end" class="page" style="margin-top: 10px"> <Row type="flex" justify="end" class="page" style="margin-top: 10px">
<Page <Page
@ -201,18 +197,16 @@
<Row class="operation padding-row"> <Row class="operation padding-row">
<Button @click="addMemberAddress" type="primary">新增</Button> <Button @click="addMemberAddress" type="primary">新增</Button>
</Row> </Row>
<Row> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="addressColumns"
:columns="addressColumns" :data="addressData"
:data="addressData" ref="table"
ref="table" sortable="custom"
sortable="custom" @on-sort-change="addressChangeSort"
@on-sort-change="addressChangeSort" >
> </Table>
</Table>
</Row>
<Row type="flex" justify="end" class="page" style="margin-top: 10px"> <Row type="flex" justify="end" class="page" style="margin-top: 10px">
<Page <Page
@ -249,18 +243,16 @@
</div> </div>
</div> </div>
</div> </div>
<Row> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="walletColumns"
:columns="walletColumns" :data="walletData"
:data="walletData" ref="table"
ref="table" sortable="custom"
sortable="custom" @on-sort-change="walletChangeSort"
@on-sort-change="walletChangeSort" >
> </Table>
</Table>
</Row>
<Row type="flex" justify="end" class="page" style="margin-top: 10px"> <Row type="flex" justify="end" class="page" style="margin-top: 10px">
<Page <Page
@ -292,23 +284,21 @@
<Button @click="getReceiptRecordData" type="primary" icon="ios-search" class="search-btn">搜索</Button> <Button @click="getReceiptRecordData" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form> </Form>
</Row> </Row>
<Row class="padding-row"> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="receiptRecordColumns"
:columns="receiptRecordColumns" :data="receiptRecordData"
:data="receiptRecordData" ref="table"
ref="table" sortable="custom"
sortable="custom" @on-sort-change="walletChangeSort"
@on-sort-change="walletChangeSort" >
> <template slot="orderSnSlot" slot-scope="scope">
<template slot="orderSnSlot" slot-scope="scope">
<a @click="orderDetail(scope.row.orderSn)">{{scope.row.orderSn}}</a> <a @click="orderDetail(scope.row.orderSn)">{{scope.row.orderSn}}</a>
</template> </template>
</Table> </Table>
</Row>
<Row type="flex" justify="end" class="page" style="margin-top: 10px"> <Row type="flex" justify="end" class="page" style="margin-top: 10px">
<Page <Page

View File

@ -32,20 +32,17 @@
<Button @click="handleSearch" class="search-btn" type="primary" icon="ios-search">搜索</Button > <Button @click="handleSearch" class="search-btn" type="primary" icon="ios-search">搜索</Button >
</Form> </Form>
</Row> </Row>
<Row class="padding-row"> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="columns"
:columns="columns" :data="data"
:data="data" ref="table"
ref="table" sortable="custom"
sortable="custom" @on-sort-change="changeSort"
@on-sort-change="changeSort" @on-selection-change="changeSelect"
@on-selection-change="changeSelect" >
> </Table>
</Table>
</Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
:current="searchForm.pageNumber" :current="searchForm.pageNumber"

View File

@ -101,18 +101,16 @@
<a class="select-clear" @click="clearSelectAll"></a> <a class="select-clear" @click="clearSelectAll"></a>
</Alert> </Alert>
</Row> </Row>
<Row> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="columns"
:columns="columns" :data="data"
:data="data" sortable="custom"
sortable="custom" @on-sort-change="changeSort"
@on-sort-change="changeSort" @on-selection-change="showSelect"
@on-selection-change="showSelect" ref="memberTable"
ref="memberTable" ></Table>
></Table>
</Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
:current="searchForm.pageNumber" :current="searchForm.pageNumber"
@ -145,18 +143,16 @@
<a class="select-clear" @click="clearSelectAll"></a> <a class="select-clear" @click="clearSelectAll"></a>
</Alert> </Alert>
</Row> </Row>
<Row> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="columns"
:columns="columns" :data="data"
:data="data" sortable="custom"
sortable="custom" @on-sort-change="changeSort"
@on-sort-change="changeSort" @on-selection-change="showSelect"
@on-selection-change="showSelect" ref="shopTable"
ref="shopTable" ></Table>
></Table>
</Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
:current="searchForm.pageNumber" :current="searchForm.pageNumber"
@ -191,18 +187,16 @@
<a class="select-clear" @click="clearSelectAll"></a> <a class="select-clear" @click="clearSelectAll"></a>
</Alert> </Alert>
</Row> </Row>
<Row> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="weChatColumns"
:columns="weChatColumns" :data="weChatData"
:data="weChatData" sortable="custom"
sortable="custom" @on-sort-change="changeSort"
@on-sort-change="changeSort" @on-selection-change="showSelect"
@on-selection-change="showSelect" ref="weChatTable"
ref="weChatTable" ></Table>
></Table>
</Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
:current="weChatSearchForm.pageNumber" :current="weChatSearchForm.pageNumber"
@ -236,18 +230,16 @@
<a class="select-clear" @click="clearSelectAll"></a> <a class="select-clear" @click="clearSelectAll"></a>
</Alert> </Alert>
</Row> </Row>
<Row> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="columns"
:columns="columns" :data="data"
:data="data" sortable="custom"
sortable="custom" @on-sort-change="changeSort"
@on-sort-change="changeSort" @on-selection-change="showSelect"
@on-selection-change="showSelect" ref="otherTable"
ref="otherTable" ></Table>
></Table>
</Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
:current="searchForm.pageNumber" :current="searchForm.pageNumber"

View File

@ -75,18 +75,16 @@
<a class="select-clear" @click="clearSelectAll"></a> <a class="select-clear" @click="clearSelectAll"></a>
</Alert> </Alert>
</Row> </Row>
<Row> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="columns"
:columns="columns" :data="data"
:data="data" sortable="custom"
sortable="custom" @on-sort-change="changeSort"
@on-sort-change="changeSort" @on-selection-change="showSelect"
@on-selection-change="showSelect" ref="table"
ref="table" ></Table>
></Table>
</Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
:current="searchForm.pageNumber" :current="searchForm.pageNumber"

View File

@ -41,18 +41,16 @@
<a class="select-clear" @click="clearSelectAll"></a> <a class="select-clear" @click="clearSelectAll"></a>
</Alert> </Alert>
</Row> </Row>
<Row> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="columns"
:columns="columns" :data="data"
:data="data" ref="table"
ref="table" sortable="custom"
sortable="custom" @on-sort-change="changeSort"
@on-sort-change="changeSort" @on-selection-change="changeSelect"
@on-selection-change="changeSelect" ></Table>
></Table>
</Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
:current="pageNumber" :current="pageNumber"

View File

@ -46,15 +46,13 @@
<Row class="operation"> <Row class="operation">
<Button @click="weChatSync" type="primary">同步微信消息</Button> <Button @click="weChatSync" type="primary">同步微信消息</Button>
</Row> </Row>
<Row> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="weChatColumns"
:columns="weChatColumns" :data="weChatData"
:data="weChatData" ref="weChatTable"
ref="weChatTable" ></Table>
></Table>
</Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
:current="weChatSearchForm.pageNumber" :current="weChatSearchForm.pageNumber"
@ -77,16 +75,14 @@
<Row class="operation"> <Row class="operation">
<Button @click="weChatSync('mp')" type="primary">同步微信小程序订阅消息</Button> <Button @click="weChatSync('mp')" type="primary">同步微信小程序订阅消息</Button>
</Row> </Row>
<Row> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="weChatColumns"
:columns="weChatColumns" :data="weChatMPData"
:data="weChatMPData" sortable="custom"
sortable="custom" ref="weChatMPTable"
ref="weChatMPTable" ></Table>
></Table>
</Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
:current="weChatMPSearchForm.pageNumber" :current="weChatMPSearchForm.pageNumber"

View File

@ -1,342 +1,392 @@
<template> <template>
<div class="search"> <div class="search">
<Row> <Card>
<Col> <Row @keydown.enter.native="handleSearch">
<Card> <Form
<Row @keydown.enter.native="handleSearch"> ref="searchForm"
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> :model="searchForm"
<Form-item label="标题" prop="title"> inline
<Input type="text" v-model="searchForm.title" placeholder="请输入标题" clearable style="width: 200px"/> :label-width="70"
</Form-item> class="search-form"
<Form-item label="消息内容" prop="content"> >
<Input type="text" v-model="searchForm.content" placeholder="请输入消息内容" clearable style="width: 200px"/> <Form-item label="标题" prop="title">
</Form-item> <Input
<span v-if="drop"> type="text"
<Form-item label="发送类型" prop="sendType"> v-model="searchForm.title"
<Select v-model="searchForm.sendType" placeholder="请选择" clearable style="width: 200px"> placeholder="请输入标题"
<Option value="ALL">全站会员</Option> clearable
<Option value="SELECT">指定会员</Option> style="width: 200px"
</Select> />
</Form-item> </Form-item>
<Form-item label="创建人" prop="createBy"> <Form-item label="消息内容" prop="content">
<Input type="text" v-model="searchForm.createBy" placeholder="请输入创建人" clearable style="width: 200px"/> <Input
</Form-item> type="text"
</span> v-model="searchForm.content"
<Form-item style="margin-left:-35px;" class="br"> placeholder="请输入消息内容"
<Button @click="handleSearch" type="primary" icon="ios-search">搜索</Button> clearable
<Button @click="handleReset"></Button> style="width: 200px"
<a class="drop-down" @click="dropDown"> />
{{dropDownContent}} </Form-item>
<Icon :type="dropDownIcon"></Icon> <span v-if="drop">
</a> <Form-item label="发送类型" prop="sendType">
</Form-item> <Select
</Form> v-model="searchForm.sendType"
</Row> placeholder="请选择"
<Row class="operation"> clearable
<Button @click="add" type="primary" icon="md-add">发送新消息</Button> style="width: 200px"
<Button @click="delAll" icon="md-trash">批量删除</Button> >
<Button @click="getDataList" icon="md-refresh">刷新</Button> <Option value="ALL">全站会员</Option>
</Row> <Option value="SELECT">指定会员</Option>
<Row v-show="openTip"> </Select>
<Alert show-icon> </Form-item>
已选择 <span class="select-count">{{selectCount}}</span> <Form-item label="创建人" prop="createBy">
<a class="select-clear" @click="clearSelectAll"></a> <Input
</Alert> type="text"
</Row> v-model="searchForm.createBy"
<Row> placeholder="请输入创建人"
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table> clearable
</Row> style="width: 200px"
<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> </Form-item>
</Row> </span>
</Card> <Form-item style="margin-left: -35px" class="br">
</Col> <Button @click="handleSearch" type="primary" icon="ios-search"
</Row> >搜索</Button
</div> >
<Button @click="handleReset"></Button>
<a class="drop-down" @click="dropDown">
{{ dropDownContent }}
<Icon :type="dropDownIcon"></Icon>
</a>
</Form-item>
</Form>
</Row>
<Row class="operation">
<Button @click="add" type="primary" icon="md-add">发送新消息</Button>
<Button @click="delAll" icon="md-trash">批量删除</Button>
<Button @click="getDataList" icon="md-refresh">刷新</Button>
</Row>
<Row v-show="openTip">
<Alert show-icon>
已选择 <span class="select-count">{{ selectCount }}</span>
<a class="select-clear" @click="clearSelectAll"></a>
</Alert>
</Row>
<Table
:loading="loading"
border
:columns="columns"
:data="data"
ref="table"
sortable="custom"
@on-sort-change="changeSort"
@on-selection-change="changeSelect"
></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> </template>
<script> <script>
export default { export default {
name: "member-notice-sender", name: "member-notice-sender",
components: { components: {},
data() {
return {
openSearch: true, //
openTip: true, //
loading: true, //
modalType: 0, //
modalVisible: false, //
modalTitle: "", //
drop: false, //
dropDownContent: "展开", // drop
dropDownIcon: "ios-arrow-down", // drop
searchForm: {
//
pageNumber: 1, //
pageSize: 10, //
sort: "createTime", //
order: "desc", //
},
submitLoading: false, //
selectList: [], //
selectCount: 0, //
columns: [
//
{
type: "selection",
width: 60,
align: "center",
}, },
data() { {
return { type: "index",
openSearch: true, // width: 60,
openTip: true, // align: "center",
loading: true, //
modalType: 0, //
modalVisible: false, //
modalTitle: "", //
drop: false, //
dropDownContent: "展开", // drop
dropDownIcon: "ios-arrow-down", // drop
searchForm: { //
pageNumber: 1, //
pageSize: 10, //
sort: "createTime", //
order: "desc", //
},
submitLoading: false, //
selectList: [], //
selectCount: 0, //
columns: [
//
{
type: "selection",
width: 60,
align: "center"
},
{
type: "index",
width: 60,
align: "center"
},
{
title: "标题",
key: "title",
minWidth: 120,
sortable: false,
},
{
title: "发送类型",
key: "sendType",
minWidth: 120,
sortable: false,
render: (h, params) => {
if (params.row.sendType == "ALL") {
return h("div", [
h("Badge", {
props: {
status: "success",
text: "全部会员"
}
})
]);
}else{
return h("div", [
h("Badge", {
props: {
status: "success",
text: "指定会员"
}
})
]);
}
}
},
{
title: "创建人",
key: "createBy",
minWidth: 120,
sortable: false,
},
{
title: "创建时间",
key: "createTime",
minWidth: 120,
sortable: true,
},
{
title: "操作",
key: "action",
align: "center",
width: 200,
render: (h, params) => {
return h("div", [
h(
"Button",
{
props: {
type: "error",
size: "small",
icon: "md-trash"
},
on: {
click: () => {
this.remove(params.row);
}
}
},
"删除"
)
]);
}
}
],
data: [], //
total: 0 //
};
}, },
methods: { {
init() { title: "标题",
this.getDataList(); key: "title",
}, minWidth: 120,
changePage(v) { sortable: false,
this.searchForm.pageNumber = v; },
this.getDataList(); {
this.clearSelectAll(); title: "发送类型",
}, key: "sendType",
changePageSize(v) { minWidth: 120,
this.searchForm.pageSize = v; sortable: false,
this.getDataList();
}, render: (h, params) => {
handleSearch() { if (params.row.sendType == "ALL") {
this.searchForm.pageNumber = 1; return h("div", [
this.searchForm.pageSize = 10; h("Badge", {
this.getDataList(); props: {
}, status: "success",
handleReset() { text: "全部会员",
this.$refs.searchForm.resetFields(); },
this.searchForm.pageNumber = 1; }),
this.searchForm.pageSize = 10; ]);
// } else {
this.getDataList(); return h("div", [
}, h("Badge", {
changeSort(e) { props: {
this.searchForm.sort = e.key; status: "success",
this.searchForm.order = e.order; text: "指定会员",
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() {
if (this.drop) {
this.dropDownContent = "展开";
this.dropDownIcon = "ios-arrow-down";
} else {
this.dropDownContent = "收起";
this.dropDownIcon = "ios-arrow-up";
}
this.drop = !this.drop;
},
getDataList() {
this.loading = true;
//
this.getRequest("/memberNoticeSenter/getByPage", this.searchForm).then(res => {
this.loading = false;
if (res.success) {
this.data = res.result.records;
this.total = res.result.total;
}
});
//
//this.data = [
//];
this.total = this.data.length;
this.loading = false;
},
add() {
let query = { type: 0, backRoute: this.$route.name };
this.$router.push({
name: "add_message",
query: query
});
},
edit(v) {
this.modalType = 1;
this.modalTitle = "编辑";
this.$refs.form.resetFields();
// null""
for (let attr in v) {
if (v[attr] === null) {
v[attr] = "";
}
}
let str = JSON.stringify(v);
let data = JSON.parse(str);
this.form = data;
this.modalVisible = true;
},
remove(v) {
this.$Modal.confirm({
title: "确认删除",
//
content: "您确认要删除么?",
loading: true,
onOk: () => {
//
this.deleteRequest("/memberNoticeSenter/delByIds/" + v.id).then(res => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
//
//this.$Message.success("");
//this.$Modal.remove();
//this.getDataList();
}
});
},
delAll() {
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 += e.id + ",";
});
ids = ids.substring(0, ids.length - 1);
//
this.deleteRequest("/memberNoticeSenter/delByIds/" + ids).then(res => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.clearSelectAll();
this.getDataList();
}
});
//
//this.$Message.success("");
//this.$Modal.remove();
//this.clearSelectAll();
//this.getDataList();
}
});
} }
},
}, },
mounted() { {
this.init(); title: "创建人",
} key: "createBy",
minWidth: 120,
sortable: false,
},
{
title: "创建时间",
key: "createTime",
minWidth: 120,
sortable: true,
},
{
title: "操作",
key: "action",
align: "center",
width: 200,
render: (h, params) => {
return h("div", [
h(
"Button",
{
props: {
type: "error",
size: "small",
icon: "md-trash",
},
on: {
click: () => {
this.remove(params.row);
},
},
},
"删除"
),
]);
},
},
],
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;
this.selectCount = e.length;
},
dropDown() {
if (this.drop) {
this.dropDownContent = "展开";
this.dropDownIcon = "ios-arrow-down";
} else {
this.dropDownContent = "收起";
this.dropDownIcon = "ios-arrow-up";
}
this.drop = !this.drop;
},
getDataList() {
this.loading = true;
//
this.getRequest("/memberNoticeSenter/getByPage", this.searchForm).then(
(res) => {
this.loading = false;
if (res.success) {
this.data = res.result.records;
this.total = res.result.total;
}
}
);
//
//this.data = [
//];
this.total = this.data.length;
this.loading = false;
},
add() {
let query = { type: 0, backRoute: this.$route.name };
this.$router.push({
name: "add_message",
query: query,
});
},
edit(v) {
this.modalType = 1;
this.modalTitle = "编辑";
this.$refs.form.resetFields();
// null""
for (let attr in v) {
if (v[attr] === null) {
v[attr] = "";
}
}
let str = JSON.stringify(v);
let data = JSON.parse(str);
this.form = data;
this.modalVisible = true;
},
remove(v) {
this.$Modal.confirm({
title: "确认删除",
//
content: "您确认要删除么?",
loading: true,
onOk: () => {
//
this.deleteRequest("/memberNoticeSenter/delByIds/" + v.id).then(
(res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
}
);
//
//this.$Message.success("");
//this.$Modal.remove();
//this.getDataList();
},
});
},
delAll() {
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 += e.id + ",";
});
ids = ids.substring(0, ids.length - 1);
//
this.deleteRequest("/memberNoticeSenter/delByIds/" + ids).then(
(res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.clearSelectAll();
this.getDataList();
}
}
);
//
//this.$Message.success("");
//this.$Modal.remove();
//this.clearSelectAll();
//this.getDataList();
},
});
},
},
mounted() {
this.init();
},
};
</script> </script>
<style lang="scss"> <style lang="scss">
// //
// @import "@/styles/table-common.scss"; // @import "@/styles/table-common.scss";
.search { .search {
.operation { .operation {
margin-bottom: 2vh; margin-bottom: 2vh;
} }
.select-count { .select-count {
font-weight: 600; font-weight: 600;
color: #40a9ff; color: #40a9ff;
} }
.select-clear { .select-clear {
margin-left: 10px; margin-left: 10px;
} }
.page { .page {
margin-top: 2vh; margin-top: 2vh;
} }
.drop-down { .drop-down {
margin-left: 5px; margin-left: 5px;
} }
} }
</style> </style>

View File

@ -22,20 +22,17 @@
<Button @click="handleSearch" class="search-btn" type="primary" icon="ios-search">搜索</Button > <Button @click="handleSearch" class="search-btn" type="primary" icon="ios-search">搜索</Button >
</Form> </Form>
</Row> </Row>
<Row class="padding-row"> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="columns"
:columns="columns" :data="data"
:data="data" ref="table"
ref="table" sortable="custom"
sortable="custom" @on-sort-change="changeSort"
@on-sort-change="changeSort" @on-selection-change="changeSelect"
@on-selection-change="changeSelect" >
> </Table>
</Table>
</Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
:current="searchForm.pageNumber" :current="searchForm.pageNumber"

View File

@ -10,18 +10,16 @@
<Row class="operation" style="margin-bottom: 10px"> <Row class="operation" style="margin-bottom: 10px">
<Button @click="add" type="primary" >添加</Button> <Button @click="add" type="primary" >添加</Button>
</Row> </Row>
<Row> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="columns"
:columns="columns" :data="data"
:data="data" ref="table"
ref="table" sortable="custom"
sortable="custom" @on-sort-change="changeSort"
@on-sort-change="changeSort" @on-selection-change="changeSelect"
@on-selection-change="changeSelect" ></Table>
></Table>
</Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
:current="searchForm.pageNumber" :current="searchForm.pageNumber"
@ -45,18 +43,16 @@
<Row class="operation" style="margin-bottom: 10px"> <Row class="operation" style="margin-bottom: 10px">
<Button @click="add" type="primary" icon="md-add">添加</Button> <Button @click="add" type="primary" icon="md-add">添加</Button>
</Row> </Row>
<Row> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="columns"
:columns="columns" :data="data"
:data="data" ref="table"
ref="table" sortable="custom"
sortable="custom" @on-sort-change="changeSort"
@on-sort-change="changeSort" @on-selection-change="changeSelect"
@on-selection-change="changeSelect" ></Table>
></Table>
</Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
:current="searchForm.pageNumber" :current="searchForm.pageNumber"
@ -80,18 +76,16 @@
<Row class="operation" style="margin-bottom: 10px"> <Row class="operation" style="margin-bottom: 10px">
<Button @click="add" type="primary" icon="md-add">添加</Button> <Button @click="add" type="primary" icon="md-add">添加</Button>
</Row> </Row>
<Row> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="columns"
:columns="columns" :data="data"
:data="data" ref="table"
ref="table" sortable="custom"
sortable="custom" @on-sort-change="changeSort"
@on-sort-change="changeSort" @on-selection-change="changeSelect"
@on-selection-change="changeSelect" ></Table>
></Table>
</Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
:current="searchForm.pageNumber" :current="searchForm.pageNumber"
@ -116,18 +110,16 @@
<Button @click="add" type="primary" icon="md-add">添加</Button> <Button @click="add" type="primary" icon="md-add">添加</Button>
<Button @click="getDataList" icon="md-refresh">刷新</Button> <Button @click="getDataList" icon="md-refresh">刷新</Button>
</Row> </Row>
<Row> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="columns"
:columns="columns" :data="data"
:data="data" ref="table"
ref="table" sortable="custom"
sortable="custom" @on-sort-change="changeSort"
@on-sort-change="changeSort" @on-selection-change="changeSelect"
@on-selection-change="changeSelect" ></Table>
></Table>
</Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
:current="searchForm.pageNumber" :current="searchForm.pageNumber"

View File

@ -73,40 +73,38 @@
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button> <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form> </Form>
</Row> </Row>
<Row class="padding-row"> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="columns"
:columns="columns" :data="data"
:data="data" ref="table"
ref="table" sortable="custom"
sortable="custom" @on-sort-change="changeSort"
@on-sort-change="changeSort" @on-selection-change="changeSelect"
@on-selection-change="changeSelect" >
> <!-- 商品栏目格式化 -->
<!-- 商品栏目格式化 --> <template slot="goodsSlot" slot-scope="{row}">
<template slot="goodsSlot" slot-scope="{row}"> <div style="margin-top: 5px;height: 80px; display: flex;">
<div style="margin-top: 5px;height: 80px; display: flex;"> <div style="">
<div style=""> <img :src="row.goodsImage" style="height: 60px;margin-top: 3px">
<img :src="row.goodsImage" style="height: 60px;margin-top: 3px">
</div>
<div style="margin-left: 13px;">
<div class="div-zoom">
<a @click="linkTo(row.goodsId,row.skuId)">{{row.goodsName}}</a>
</div>
<Poptip trigger="hover" title="扫码在手机中查看" transfer>
<div slot="content">
<vue-qr :text="wapLinkTo(row.goodsId,row.skuId)" :margin="0" colorDark="#000" colorLight="#fff" :size="150"></vue-qr>
</div>
<img src="../../../assets/qrcode.svg" class="hover-pointer" width="20" height="20" alt="">
</Poptip>
</div>
</div> </div>
</template> <div style="margin-left: 13px;">
</Table> <div class="div-zoom">
</Row> <a @click="linkTo(row.goodsId,row.skuId)">{{row.goodsName}}</a>
</div>
<Poptip trigger="hover" title="扫码在手机中查看" transfer>
<div slot="content">
<vue-qr :text="wapLinkTo(row.goodsId,row.skuId)" :margin="0" colorDark="#000" colorLight="#fff" :size="150"></vue-qr>
</div>
<img src="../../../assets/qrcode.svg" class="hover-pointer" width="20" height="20" alt="">
</Poptip>
</div>
</div>
</template>
</Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
:current="searchForm.pageNumber" :current="searchForm.pageNumber"

View File

@ -1,81 +1,74 @@
<template> <template>
<div class="search"> <div class="search">
<Row> <Card>
<Col> <Row @keydown.enter.native="handleSearch">
<Card> <Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
<Row @keydown.enter.native="handleSearch"> <Form-item label="订单编号" prop="orderSn">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> <Input
<Form-item label="订单编号" prop="orderSn"> type="text"
<Input v-model="searchForm.orderSn"
type="text" placeholder="请输入订单编号"
v-model="searchForm.orderSn" clearable
placeholder="请输入订单编号" style="width: 200px"
clearable />
style="width: 200px" </Form-item>
/> <Form-item label="会员名称" prop="memberName">
</Form-item> <Input
<Form-item label="会员名称" prop="memberName"> type="text"
<Input v-model="searchForm.memberName"
type="text" placeholder="请输入会员名称"
v-model="searchForm.memberName" clearable
placeholder="请输入会员名称" style="width: 200px"
clearable />
style="width: 200px" </Form-item>
/> <Form-item label="状态" prop="status">
</Form-item> <Select v-model="searchForm.status" placeholder="请选择" clearable style="width: 200px">
<Form-item label="状态" prop="status"> <Option value="NEW">新投诉</Option>
<Select v-model="searchForm.status" placeholder="请选择" clearable style="width: 200px"> <Option value="CANCEL">已撤销</Option>
<Option value="NEW">新投诉</Option> <Option value="WAIT_APPEAL">待申诉</Option>
<Option value="CANCEL">已撤销</Option> <Option value="COMMUNICATION">对话中</Option>
<Option value="WAIT_APPEAL">待申诉</Option> <Option value="WAIT_ARBITRATION">等待仲裁</Option>
<Option value="COMMUNICATION">对话中</Option> <Option value="COMPLETE">已完成</Option>
<Option value="WAIT_ARBITRATION">等待仲裁</Option> </Select>
<Option value="COMPLETE">已完成</Option> </Form-item>
</Select> <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form-item> </Form>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button> </Row>
</Form> <Table
</Row> :loading="loading"
border
<Row class="padding-row"> :columns="columns"
<Table :data="data"
:loading="loading" ref="table"
border sortable="custom"
:columns="columns" @on-sort-change="changeSort"
:data="data" @on-selection-change="changeSelect"
ref="table" >
sortable="custom" <template slot-scope="{row}" slot="goodsName">
@on-sort-change="changeSort" <a class="mr_10" @click="linkTo(row.goodsId,row.skuId)">{{row.goodsName}}</a>
@on-selection-change="changeSelect" <Poptip trigger="hover" title="扫码在手机中查看" transfer>
> <div slot="content">
<template slot-scope="{row}" slot="goodsName"> <vue-qr :text="wapLinkTo(row.goodsId,row.skuId)" :margin="0" colorDark="#000" colorLight="#fff" :size="150"></vue-qr>
<a class="mr_10" @click="linkTo(row.goodsId,row.skuId)">{{row.goodsName}}</a> </div>
<Poptip trigger="hover" title="扫码在手机中查看" transfer> <img src="../../../assets/qrcode.svg" style="vertical-align:bottom;" class="hover-pointer" width="20" height="20" alt="">
<div slot="content"> </Poptip>
<vue-qr :text="wapLinkTo(row.goodsId,row.skuId)" :margin="0" colorDark="#000" colorLight="#fff" :size="150"></vue-qr> </template>
</div> </Table>
<img src="../../../assets/qrcode.svg" style="vertical-align:bottom;" class="hover-pointer" width="20" height="20" alt=""> <Row type="flex" justify="end" class="page">
</Poptip> <Page
</template> :current="searchForm.pageNumber"
</Table> :total="total"
</Row> :page-size="searchForm.pageSize"
<Row type="flex" justify="end" class="page"> @on-change="changePage"
<Page @on-page-size-change="changePageSize"
:current="searchForm.pageNumber" :page-size-opts="[10, 20, 50]"
:total="total" size="small"
:page-size="searchForm.pageSize" show-total
@on-change="changePage" show-elevator
@on-page-size-change="changePageSize" show-sizer
:page-size-opts="[10, 20, 50]" ></Page>
size="small" </Row>
show-total </Card>
show-elevator
show-sizer
></Page>
</Row>
</Card>
</Col>
</Row>
<Modal <Modal
:title="modalTitle" :title="modalTitle"
v-model="modalVisible" v-model="modalVisible"

View File

@ -1,44 +1,38 @@
<template> <template>
<div class="search"> <div class="search">
<Row> <Card>
<Col> <Row @keydown.enter.native="handleSearch">
<Card> <Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
<Row @keydown.enter.native="handleSearch"> <Form-item label="订单号" prop="sn">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> <Input type="text" v-model="searchForm.sn" placeholder="订单/交易号" clearable style="width: 200px" />
<Form-item label="订单号" prop="sn"> </Form-item>
<Input type="text" v-model="searchForm.sn" placeholder="订单/交易号" clearable style="width: 200px" /> <Form-item label="付款状态" prop="orderStatus">
</Form-item> <Select v-model="searchForm.payStatus" placeholder="请选择" clearable style="width: 200px">
<Form-item label="付款状态" prop="orderStatus"> <Option value="UNPAID">未付款</Option>
<Select v-model="searchForm.payStatus" placeholder="请选择" clearable style="width: 200px"> <Option value="PAID">已付款</Option>
<Option value="UNPAID">未付款</Option> </Select>
<Option value="PAID">已付款</Option> </Form-item>
</Select> <Form-item label="支付方式" prop="orderStatus">
</Form-item> <Select v-model="searchForm.paymentMethod" placeholder="请选择" clearable style="width: 200px">
<Form-item label="支付方式" prop="orderStatus"> <Option value="WECHAT">微信</Option>
<Select v-model="searchForm.paymentMethod" placeholder="请选择" clearable style="width: 200px"> <Option value="ALIPAY">支付宝</Option>
<Option value="WECHAT">微信</Option> <Option value="WALLET">余额</Option>
<Option value="ALIPAY">支付宝</Option> <Option value="BANK_TRANSFER">银行转账</Option>
<Option value="WALLET">余额</Option> <Option value="">暂未付款</Option>
<Option value="BANK_TRANSFER">银行转账</Option> </Select>
<Option value="">暂未付款</Option> </Form-item>
</Select> <Form-item label="支付时间">
</Form-item> <DatePicker v-model="searchForm" type="datetimerange" format="yyyy-MM-dd" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px"></DatePicker>
<Form-item label="支付时间"> </Form-item>
<DatePicker v-model="searchForm" type="datetimerange" format="yyyy-MM-dd" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px"></DatePicker> <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form-item> </Form>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button> </Row>
</Form> <Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
</Row> <Row type="flex" justify="end" class="page">
<Row class="padding-row"> <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table> size="small" show-total show-elevator show-sizer></Page>
</Row> </Row>
<Row type="flex" justify="end" class="page"> </Card>
<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>
</Col>
</Row>
</div> </div>
</template> </template>

View File

@ -1,38 +1,32 @@
<template> <template>
<div class="search"> <div class="search">
<Row> <Card>
<Col> <Row @keydown.enter.native="handleSearch">
<Card> <Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
<Row @keydown.enter.native="handleSearch"> <Form-item label="订单号" prop="orderSn">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> <Input type="text" v-model="searchForm.orderSn" placeholder="订单/交易号" clearable style="width: 200px"/>
<Form-item label="订单号" prop="orderSn"> </Form-item>
<Input type="text" v-model="searchForm.orderSn" placeholder="订单/交易号" clearable style="width: 200px"/> <Form-item label="退款状态" prop="orderStatus">
</Form-item> <Select v-model="searchForm.isRefund" placeholder="请选择" clearable style="width: 200px">
<Form-item label="退款状态" prop="orderStatus"> <Option value="false">未退款</Option>
<Select v-model="searchForm.isRefund" placeholder="请选择" clearable style="width: 200px"> <Option value="true">已退款</Option>
<Option value="false">未退款</Option> </Select>
<Option value="true">已退款</Option> </Form-item>
</Select> <Form-item label="退款时间">
</Form-item> <DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd" clearable
<Form-item label="退款时间"> @on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px"></DatePicker>
<DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd" clearable </Form-item>
@on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px"></DatePicker> <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form-item> </Form>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button> </Row>
</Form> <Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"
</Row> @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
<Row class="padding-row"> <Row type="flex" justify="end" class="page">
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize"
@on-sort-change="changeSort" @on-selection-change="changeSelect"></Table> @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
</Row> size="small" show-total show-elevator show-sizer></Page>
<Row type="flex" justify="end" class="page"> </Row>
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" </Card>
@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>
</Col>
</Row>
</div> </div>
</template> </template>
@ -57,14 +51,6 @@ export default {
isRefund: "", isRefund: "",
}, },
selectDate: null, selectDate: null,
form: {
//
sn: "",
sellerName: "",
startTime: "",
endTime: "",
billPrice: "",
},
columns: [ columns: [
{ {
title: "售后单号", title: "售后单号",

View File

@ -51,18 +51,16 @@
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button> <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form> </Form>
</Row> </Row>
<Row class="padding-row"> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="columns"
:columns="columns" :data="data"
:data="data" ref="table"
ref="table" sortable="custom"
sortable="custom" @on-sort-change="changeSort"
@on-sort-change="changeSort" @on-selection-change="changeSelect"
@on-selection-change="changeSelect" ></Table>
></Table>
</Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
:current="searchForm.pageNumber" :current="searchForm.pageNumber"
@ -106,16 +104,6 @@
orderStatus: "" orderStatus: ""
}, },
selectDate: null, // selectDate: null, //
form: {
//
sn: "",
sellerName: "",
startTime: "",
endTime: "",
billPrice: "",
},
//
formValidate: {},
submitLoading: false, // submitLoading: false, //
selectList: [], // selectList: [], //
selectCount: 0, // selectCount: 0, //

View File

@ -212,7 +212,7 @@
<li> <li>
<span class="label">应付金额</span> <span class="label">应付金额</span>
<span class="txt flowPrice" <span class="txt flowPrice"
>¥{{ orderInfo.order.priceDetailDTO.flowPrice }}</span >¥{{ orderInfo.order.priceDetailDTO.flowPrice | unitPrice }}</span
> >
</li> </li>
</ul> </ul>

View File

@ -1,43 +1,37 @@
<template> <template>
<div class="search"> <div class="search">
<Row> <Card>
<Col> <Row @keydown.enter.native="handleSearch">
<Card> <Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
<Row @keydown.enter.native="handleSearch"> <Form-item label="订单号" prop="orderSn">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> <Input type="text" v-model="searchForm.orderSn" placeholder="请输入订单号" clearable style="width: 200px" />
<Form-item label="订单号" prop="orderSn"> </Form-item>
<Input type="text" v-model="searchForm.orderSn" placeholder="请输入订单号" clearable style="width: 200px" /> <Form-item label="会员名称" prop="buyerName">
</Form-item> <Input type="text" v-model="searchForm.buyerName" placeholder="请输入会员名称" clearable style="width: 200px" />
<Form-item label="会员名称" prop="buyerName"> </Form-item>
<Input type="text" v-model="searchForm.buyerName" placeholder="请输入会员名称" clearable style="width: 200px" /> <Form-item label="订单状态" prop="orderStatus">
</Form-item> <Select v-model="searchForm.orderStatus" placeholder="请选择" clearable style="width: 200px">
<Form-item label="订单状态" prop="orderStatus"> <Option value="UNPAID">未付款</Option>
<Select v-model="searchForm.orderStatus" placeholder="请选择" clearable style="width: 200px"> <Option value="PAID">已付款</Option>
<Option value="UNPAID">未付款</Option> <Option value="UNDELIVERED">待发货</Option>
<Option value="PAID">已付款</Option> <Option value="DELIVERED">已发货</Option>
<Option value="UNDELIVERED">待发货</Option> <Option value="COMPLETED">已完成</Option>
<Option value="DELIVERED">已发货</Option> <Option value="TAKE">待核验</Option>
<Option value="COMPLETED">已完成</Option> <Option value="CANCELLED">已取消</Option>
<Option value="TAKE">待核验</Option> </Select>
<Option value="CANCELLED">已取消</Option> </Form-item>
</Select> <Form-item label="下单时间">
</Form-item> <DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px"></DatePicker>
<Form-item label="下单时间"> </Form-item>
<DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px"></DatePicker> <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form-item> </Form>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button> </Row>
</Form> <Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
</Row> <Row type="flex" justify="end" class="page">
<Row class="padding-row"> <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table> size="small" show-total show-elevator show-sizer></Page>
</Row> </Row>
<Row type="flex" justify="end" class="page"> </Card>
<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>
</Col>
</Row>
</div> </div>
</template> </template>
@ -64,16 +58,6 @@ export default {
orderStatus: "", orderStatus: "",
}, },
selectDate: null, selectDate: null,
form: {
//
sn: "",
sellerName: "",
startTime: "",
endTime: "",
billPrice: "",
},
//
formValidate: {},
submitLoading: false, // submitLoading: false, //
selectList: [], // selectList: [], //
selectCount: 0, // selectCount: 0, //

View File

@ -58,24 +58,22 @@
</Form> </Form>
</Row> </Row>
<Row class="padding-row"> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="columns"
:columns="columns" :data="data"
:data="data" ref="table"
ref="table" sortable="custom"
sortable="custom" @on-sort-change="changeSort"
@on-sort-change="changeSort" @on-selection-change="changeSelect"
@on-selection-change="changeSelect" >
> <!-- 订单详情格式化 -->
<!-- 订单详情格式化 --> <template slot="orderSlot" slot-scope="scope">
<template slot="orderSlot" slot-scope="scope"> <a
<a @click="$router.push({name: 'order-detail',query: {sn: scope.row.orderSn}})">{{scope.row.orderSn}}</a>
@click="$router.push({name: 'order-detail',query: {sn: scope.row.orderSn}})">{{scope.row.orderSn}}</a> </template>
</template> </Table>
</Table>
</Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
:current="searchForm.pageNumber" :current="searchForm.pageNumber"
@ -114,20 +112,10 @@
receiptStatus: "", // receiptStatus: "", //
}, },
shopsData: [], // shopsData: [], //
form: {
//
sn: "",
sellerName: "",
startTime: "",
endTime: "",
billPrice: "",
},
params: { params: {
pageNumber: 1, pageNumber: 1,
pageSize: 1, pageSize: 10,
}, },
//
formValidate: {},
submitLoading: false, // submitLoading: false, //
selectList: [], // selectList: [], //
selectCount: 0, // selectCount: 0, //

View File

@ -20,59 +20,59 @@
<Row class="operation padding-row"> <Row class="operation padding-row">
<Button @click="add" type="primary" style="">添加</Button> <Button @click="add" type="primary" style="">添加</Button>
</Row> </Row>
<Row> <Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect">
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"> <!-- 页面展示 -->
<!-- 页面展示 --> <template slot="openStatusSlot" slot-scope="scope">
<template slot="openStatusSlot" slot-scope="scope"> <div>
<div>
</div> </div>
<i-switch size="large" v-model="scope.row.openStatus" @on-change="changeSwitch(scope.row)"> <i-switch size="large" v-model="scope.row.openStatus" @on-change="changeSwitch(scope.row)">
<span slot="open">展示</span> <span slot="open">展示</span>
<span slot="close">隐藏</span> <span slot="close">隐藏</span>
</i-switch> </i-switch>
</template> </template>
</Table> </Table>
</Row>
<Row type="flex" justify="end" class="page"> <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]" <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> size="small" show-total show-elevator>
</Page> </Page>
</Row> </Row>
<template v-if="!selected">
<Modal :title="modalTitle" v-model="modalVisible" :mask-closable="false" :width="1100"> <Modal :title="modalTitle" v-model="modalVisible" :mask-closable="false" :width="1100">
<Form ref="form" :model="form" :label-width="100"> <Form ref="form" :model="form" :label-width="100">
<FormItem label="文章标题" prop="title"> <FormItem label="文章标题" prop="title">
<Input v-model="form.title" clearable style="width: 40%" /> <Input v-model="form.title" clearable style="width: 40%" />
</FormItem> </FormItem>
<FormItem label="文章分类" prop="categoryId"> <FormItem label="文章分类" prop="categoryId">
<Select v-model="treeValue" placeholder="请选择" clearable style="width: 180px"> <Select v-model="treeValue" placeholder="请选择" clearable style="width: 180px">
<Option :value="treeValue" style="display: none">{{ <Option :value="treeValue" style="display: none">{{
treeValue treeValue
}} }}
</Option> </Option>
<Tree :data="treeData" @on-select-change="handleCheckChange"></Tree> <Tree :data="treeData" @on-select-change="handleCheckChange"></Tree>
</Select> </Select>
</FormItem> </FormItem>
<FormItem label="文章排序" prop="sort"> <FormItem label="文章排序" prop="sort">
<Input type="number" v-model="form.sort" clearable style="width: 10%" /> <Input type="number" v-model="form.sort" clearable style="width: 10%" />
</FormItem> </FormItem>
<FormItem class="form-item-view-el" label="文章内容" prop="content"> <FormItem class="form-item-view-el" label="文章内容" prop="content">
<editor v-model="form.content"></editor> <editor v-model="form.content"></editor>
</FormItem> </FormItem>
<FormItem label="是否展示" prop="openStatus"> <FormItem label="是否展示" prop="openStatus">
<i-switch size="large" v-model="form.openStatus" :true-value="open" :false-value="close"> <i-switch size="large" v-model="form.openStatus" :true-value="open" :false-value="close">
<span slot="open">展示</span> <span slot="open">展示</span>
<span slot="close">隐藏</span> <span slot="close">隐藏</span>
</i-switch> </i-switch>
</FormItem> </FormItem>
</Form> </Form>
<div slot="footer"> <div slot="footer">
<Button type="text" @click="modalVisible = false">取消</Button> <Button type="text" @click="modalVisible = false">取消</Button>
<Button type="primary" :loading="submitLoading" @click="handleSubmit"></Button> <Button type="primary" :loading="submitLoading" @click="handleSubmit"></Button>
</div> </div>
</Modal> </Modal>
</template>
</Card> </Card>
</Col> </Col>

View File

@ -4,18 +4,16 @@
<template> <template>
<div class="search"> <div class="search">
<Card> <Card>
<Row> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="columns"
:columns="columns" :data="data"
:data="data" ref="table"
ref="table" sortable="custom"
sortable="custom" @on-sort-change="changeSort"
@on-sort-change="changeSort" @on-selection-change="changeSelect"
@on-selection-change="changeSelect" ></Table>
></Table>
</Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
:current="pageNumber" :current="pageNumber"

View File

@ -1,477 +1,511 @@
<template> <template>
<div class="search"> <div class="search">
<Row> <Card>
<Col> <Row class="operation">
<Card> <Button @click="add" type="primary" icon="md-add">添加</Button>
<Row class="operation"> <Button @click="disableAll" icon="md-trash">批量禁用</Button>
<Button @click="add" type="primary" icon="md-add">添加</Button> <Button @click="getDataList" icon="md-refresh">刷新</Button>
<Button @click="disableAll" icon="md-trash">批量禁用</Button> <Button type="dashed" @click="openTip = !openTip">{{
<Button @click="getDataList" icon="md-refresh">刷新</Button> openTip ? "关闭提示" : "开启提示"
<Button type="dashed" @click="openTip=!openTip">{{openTip ? "" : ""}}</Button> }}</Button>
</Row> </Row>
<Row v-show="openTip"> <Row v-show="openTip">
<Alert show-icon> <Alert show-icon>
已选择 <span class="select-count">{{selectCount}}</span> 已选择 <span class="select-count">{{ selectCount }}</span>
<a class="select-clear" @click="clearSelectAll"></a> <a class="select-clear" @click="clearSelectAll"></a>
</Alert> </Alert>
</Row> </Row>
<Row> <Table
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table> :loading="loading"
</Row> border
<Row type="flex" justify="end" class="page"> :columns="columns"
<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> :data="data"
</Row> ref="table"
</Card> sortable="custom"
</Col> @on-sort-change="changeSort"
</Row> @on-selection-change="changeSelect"
<Modal :title="modalTitle" v-model="modalVisible" :mask-closable='false' :width="500"> ></Table>
<Form ref="form" :model="form" :label-width="100" :rules="formValidate" > <FormItem label="名称" prop="name" > <Row type="flex" justify="end" class="page">
<Input v-model="form.name" clearable style="width:100%"/> <Page
</FormItem> :current="searchForm.pageNumber"
<FormItem label="图片" prop="url"> :total="total"
<upload-pic-input v-model="form.url" style="width:100%"></upload-pic-input> :page-size="searchForm.pageSize"
</FormItem> @on-change="changePage"
<FormItem label="操作类型" prop="operationType" > @on-page-size-change="changePageSize"
<Select v-model="form.operationType" placeholder="请选择" clearable style="width: 200px"> :page-size-opts="[10, 20, 50]"
<Option value="NONE">无操作</Option> size="small"
<Option value="URL">链接地址</Option> show-total
<Option value="GOODS">商品序号</Option> show-elevator
<Option value="SHOP">店铺编号</Option> show-sizer
<Option value="KEYWORD">关键字</Option> ></Page>
<Option value="CATEGORY">商品分类</Option> </Row>
</Select> </Card>
</FormItem> <Modal
<FormItem label="链接值" prop="sort" > :title="modalTitle"
<Input v-model="form.operationUrl" clearable style="width:100%"/> v-model="modalVisible"
</FormItem> :mask-closable="false"
<FormItem label="排序" prop="sort" > :width="500"
<InputNumber :max="999" :min="0" v-model="form.sort"></InputNumber> >
</FormItem> <Form ref="form" :model="form" :label-width="100" :rules="formValidate">
</Form> <FormItem label="名称" prop="name">
<div slot="footer"> <Input v-model="form.name" clearable style="width: 100%" />
<Button type="text" @click="modalVisible=false"></Button> </FormItem>
<Button type="primary" :loading="submitLoading" @click="handleSubmit"></Button> <FormItem label="图片" prop="url">
</div> <upload-pic-input
</Modal> v-model="form.url"
</div> style="width: 100%"
></upload-pic-input>
</FormItem>
<FormItem label="操作类型" prop="operationType">
<Select
v-model="form.operationType"
placeholder="请选择"
clearable
style="width: 200px"
>
<Option value="NONE">无操作</Option>
<Option value="URL">链接地址</Option>
<Option value="GOODS">商品序号</Option>
<Option value="SHOP">店铺编号</Option>
<Option value="KEYWORD">关键字</Option>
<Option value="CATEGORY">商品分类</Option>
</Select>
</FormItem>
<FormItem label="链接值" prop="sort">
<Input v-model="form.operationUrl" clearable style="width: 100%" />
</FormItem>
<FormItem label="排序" prop="sort">
<InputNumber :max="999" :min="0" v-model="form.sort"></InputNumber>
</FormItem>
</Form>
<div slot="footer">
<Button type="text" @click="modalVisible = false">取消</Button>
<Button type="primary" :loading="submitLoading" @click="handleSubmit"
>提交</Button
>
</div>
</Modal>
</div>
</template> </template>
<script> <script>
import { import {
getFocusData, getFocusData,
saveFocusData, saveFocusData,
disableFocus, disableFocus,
enableFocus, enableFocus,
delFocus delFocus,
} from "@/api/pages"; } from "@/api/pages";
import uploadPicInput from "@/views/my-components/lili/upload-pic-input"; import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
export default { export default {
name: "mobileFocus", name: "mobileFocus",
components: { components: {
uploadPicInput uploadPicInput,
},
data() {
return {
openTip: true, //
loading: true, //
modalType: 0, //
modalVisible: false, //
modalTitle: "", //
searchForm: {
//
clientType: "MOBILE", //
pageNumber: 1, //
pageSize: 10, //
sort: "createTime", //
order: "desc", //
},
form: {
//
name: "",
operationType: "",
operationUrl: "",
url: "",
sort: 0,
},
//
formValidate: {
name: [{ required: true, message: "不能为空", trigger: "blur" }],
},
submitLoading: false, //
selectList: [], //
selectCount: 0, //
columns: [
//
{
type: "selection",
width: 60,
align: "center",
}, },
data() { {
return { title: "名称",
openTip: true, // key: "name",
loading: true, // minWidth: 120,
modalType: 0, // sortable: false,
modalVisible: false, //
modalTitle: "", //
searchForm: { //
clientType: "MOBILE", //
pageNumber: 1, //
pageSize: 10, //
sort: "createTime", //
order: "desc", //
},
form: { //
name: "",
operationType: "",
operationUrl: "",
url: "",
sort: 0,
},
//
formValidate: {
name: [{ required: true, message: "不能为空", trigger: "blur" }],
},
submitLoading: false, //
selectList: [], //
selectCount: 0, //
columns: [
//
{
type: "selection",
width: 60,
align: "center"
},
{
title: "名称",
key: "name",
minWidth: 120,
sortable: false,
},
{
title: "状态",
key: "status",
minWidth: 100,
sortable: false,
render: (h, params) => {
if (params.row.status == 'CLOSE') {
return h("div", [
h("Badge", {
props: {
status: "error",
text: "禁用"
}
})
]);
} else if (params.row.status == 'OPEN') {
return h("div", [
h("Badge", {
props: {
status: "success",
text: "启用"
}
})
]);
}
}
},
{
title: "图片",
key: "url",
minWidth: 120,
sortable: false,
render: (h, params) => {
return h("img", {
attrs: {
src: params.row.url,
alt: "加载图片失败"
},
style: {
cursor: "pointer",
width: "80px",
height: "60px",
margin: "10px 0",
"object-fit": "contain"
}
});
}
},
{
title: "排序",
key: "sort",
minWidth: 120,
sortable: false,
},
{
title: "操作",
key: "action",
align: "center",
width: 200,
render: (h, params) => {
let enableOrDisable = "";
if (params.row.status == "CLOSE") {
enableOrDisable = h(
"Button",
{
props: {
type: "success",
size: "small"
},
style: {
marginRight: "5px"
},
on: {
click: () => {
this.enable(params.row);
}
}
},
"启用"
);
} else {
enableOrDisable = h(
"Button",
{
props: {
size: "small"
},
style: {
marginRight: "5px"
},
on: {
click: () => {
this.disable(params.row);
}
}
},
"禁用"
);
}
return h("div", [
h(
"Button",
{
props: {
type: "primary",
size: "small"
},
style: {
marginRight: "5px"
},
on: {
click: () => {
this.edit(params.row);
}
}
},
"编辑"
),
h(
"Button",
{
props: {
type: "error",
size: "small",
},
style: {
marginRight: "5px"
},
on: {
click: () => {
this.remove(params.row);
}
}
},
"删除"
),
enableOrDisable,
]);
}
}
],
data: [], //
total: 0 //
};
}, },
methods: { {
init() { title: "状态",
this.getDataList(); key: "status",
}, minWidth: 100,
changePage(v) { sortable: false,
this.searchForm.pageNumber = v; render: (h, params) => {
this.getDataList(); if (params.row.status == "CLOSE") {
this.clearSelectAll(); return h("div", [
}, h("Badge", {
changePageSize(v) { props: {
this.searchForm.pageSize = v; status: "error",
this.getDataList(); text: "禁用",
}, },
handleSearch() { }),
this.searchForm.pageNumber = 1; ]);
this.searchForm.pageSize = 10; } else if (params.row.status == "OPEN") {
this.getDataList(); return h("div", [
}, h("Badge", {
handleReset() { props: {
this.$refs.searchForm.resetFields(); status: "success",
this.searchForm.pageNumber = 1; text: "启用",
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;
this.selectCount = e.length;
},
getDataList() {
this.loading = true;
//
getFocusData(this.searchForm).then(res => {
this.loading = false;
if (res.success) {
this.data = res.result.records;
this.total = res.result.total;
}
});
//
//this.data = [
//];
this.total = this.data.length;
this.loading = false;
},
enable(v){
this.$Modal.confirm({
title: "确认启用",
//
content: "您确认要确认启用 " + v.name + " ?",
loading: true,
onOk: () => {
//
enableFocus(v.id).then(res => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
}
});
},
disable(v) {
this.$Modal.confirm({
title: "确认禁用",
//
content: "您确认要禁用 " + v.name + " ?",
loading: true,
onOk: () => {
//
disableFocus(v.id).then(res => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
}
});
},
handleSubmit() {
this.$refs.form.validate(valid => {
if (valid) {
this.form.ClientType = "MOBILE"
this.submitLoading = true;
if (this.modalType === 0) {
this.form.status = "OPEN"
// id
delete this.form.id;
saveFocusData(this.form).then(res => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
this.modalVisible = false;
}
});
} else {
//
saveFocusData(this.form).then(res => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
this.modalVisible = false;
}
});
}
}
});
},
add() {
this.modalType = 0;
this.modalTitle = "添加";
this.$refs.form.resetFields();
delete this.form.id;
this.modalVisible = true;
},
edit(v) {
this.modalType = 1;
this.modalTitle = "编辑";
this.$refs.form.resetFields();
// null""
for (let attr in v) {
if (v[attr] === null) {
v[attr] = "";
}
}
let str = JSON.stringify(v);
let data = JSON.parse(str);
this.form = data;
this.modalVisible = true;
},
remove(v) {
this.$Modal.confirm({
title: "确认删除",
//
content: "您确认要删除么?",
loading: true,
onOk: () => {
//
delFocus(v.id).then(res => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
}
});
},
disableAll() {
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 += e.id + ",";
});
ids = ids.substring(0, ids.length - 1);
//
disableFocus(ids).then(res => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("禁用成功");
this.clearSelectAll();
this.getDataList();
}
});
}
});
} }
},
}, },
mounted() { {
this.init(); title: "图片",
} key: "url",
minWidth: 120,
sortable: false,
render: (h, params) => {
return h("img", {
attrs: {
src: params.row.url,
alt: "加载图片失败",
},
style: {
cursor: "pointer",
width: "80px",
height: "60px",
margin: "10px 0",
"object-fit": "contain",
},
});
},
},
{
title: "排序",
key: "sort",
minWidth: 120,
sortable: false,
},
{
title: "操作",
key: "action",
align: "center",
width: 200,
render: (h, params) => {
let enableOrDisable = "";
if (params.row.status == "CLOSE") {
enableOrDisable = h(
"Button",
{
props: {
type: "success",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.enable(params.row);
},
},
},
"启用"
);
} else {
enableOrDisable = h(
"Button",
{
props: {
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.disable(params.row);
},
},
},
"禁用"
);
}
return h("div", [
h(
"Button",
{
props: {
type: "primary",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.edit(params.row);
},
},
},
"编辑"
),
h(
"Button",
{
props: {
type: "error",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.remove(params.row);
},
},
},
"删除"
),
enableOrDisable,
]);
},
},
],
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;
this.selectCount = e.length;
},
getDataList() {
this.loading = true;
//
getFocusData(this.searchForm).then((res) => {
this.loading = false;
if (res.success) {
this.data = res.result.records;
this.total = res.result.total;
}
});
//
//this.data = [
//];
this.total = this.data.length;
this.loading = false;
},
enable(v) {
this.$Modal.confirm({
title: "确认启用",
//
content: "您确认要确认启用 " + v.name + " ?",
loading: true,
onOk: () => {
//
enableFocus(v.id).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
},
});
},
disable(v) {
this.$Modal.confirm({
title: "确认禁用",
//
content: "您确认要禁用 " + v.name + " ?",
loading: true,
onOk: () => {
//
disableFocus(v.id).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
},
});
},
handleSubmit() {
this.$refs.form.validate((valid) => {
if (valid) {
this.form.ClientType = "MOBILE";
this.submitLoading = true;
if (this.modalType === 0) {
this.form.status = "OPEN";
// id
delete this.form.id;
saveFocusData(this.form).then((res) => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
this.modalVisible = false;
}
});
} else {
//
saveFocusData(this.form).then((res) => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
this.modalVisible = false;
}
});
}
}
});
},
add() {
this.modalType = 0;
this.modalTitle = "添加";
this.$refs.form.resetFields();
delete this.form.id;
this.modalVisible = true;
},
edit(v) {
this.modalType = 1;
this.modalTitle = "编辑";
this.$refs.form.resetFields();
// null""
for (let attr in v) {
if (v[attr] === null) {
v[attr] = "";
}
}
let str = JSON.stringify(v);
let data = JSON.parse(str);
this.form = data;
this.modalVisible = true;
},
remove(v) {
this.$Modal.confirm({
title: "确认删除",
//
content: "您确认要删除么?",
loading: true,
onOk: () => {
//
delFocus(v.id).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
},
});
},
disableAll() {
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 += e.id + ",";
});
ids = ids.substring(0, ids.length - 1);
//
disableFocus(ids).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("禁用成功");
this.clearSelectAll();
this.getDataList();
}
});
},
});
},
},
mounted() {
this.init();
},
};
</script> </script>
<style lang="scss"> <style lang="scss">
// //
// @import "@/styles/table-common.scss"; // @import "@/styles/table-common.scss";
.search { .search {
.operation { .operation {
margin-bottom: 2vh; margin-bottom: 2vh;
} }
.select-count { .select-count {
font-weight: 600; font-weight: 600;
color: #40a9ff; color: #40a9ff;
} }
.select-clear { .select-clear {
margin-left: 10px; margin-left: 10px;
} }
.page { .page {
margin-top: 2vh; margin-top: 2vh;
} }
.drop-down { .drop-down {
margin-left: 5px; margin-left: 5px;
} }
} }
</style> </style>

View File

@ -1,477 +1,511 @@
<template> <template>
<div class="search"> <div class="search">
<Row> <Card>
<Col> <Row class="operation">
<Card> <Button @click="add" type="primary" icon="md-add">添加</Button>
<Row class="operation"> <Button @click="disableAll" icon="md-trash">批量禁用</Button>
<Button @click="add" type="primary" icon="md-add">添加</Button> <Button @click="getDataList" icon="md-refresh">刷新</Button>
<Button @click="disableAll" icon="md-trash">批量禁用</Button> <Button type="dashed" @click="openTip = !openTip">{{
<Button @click="getDataList" icon="md-refresh">刷新</Button> openTip ? "关闭提示" : "开启提示"
<Button type="dashed" @click="openTip=!openTip">{{openTip ? "" : ""}}</Button> }}</Button>
</Row> </Row>
<Row v-show="openTip"> <Row v-show="openTip">
<Alert show-icon> <Alert show-icon>
已选择 <span class="select-count">{{selectCount}}</span> 已选择 <span class="select-count">{{ selectCount }}</span>
<a class="select-clear" @click="clearSelectAll"></a> <a class="select-clear" @click="clearSelectAll"></a>
</Alert> </Alert>
</Row> </Row>
<Row> <Table
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table> :loading="loading"
</Row> border
<Row type="flex" justify="end" class="page"> :columns="columns"
<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> :data="data"
</Row> ref="table"
</Card> sortable="custom"
</Col> @on-sort-change="changeSort"
</Row> @on-selection-change="changeSelect"
<Modal :title="modalTitle" v-model="modalVisible" :mask-closable='false' :width="500"> ></Table>
<Form ref="form" :model="form" :label-width="100" :rules="formValidate" > <FormItem label="名称" prop="name" > <Row type="flex" justify="end" class="page">
<Input v-model="form.name" clearable style="width:100%"/> <Page
</FormItem> :current="searchForm.pageNumber"
<FormItem label="图片" prop="url"> :total="total"
<upload-pic-input v-model="form.url" style="width:100%"></upload-pic-input> :page-size="searchForm.pageSize"
</FormItem> @on-change="changePage"
<FormItem label="操作类型" prop="operationType" > @on-page-size-change="changePageSize"
<Select v-model="form.operationType" placeholder="请选择" clearable style="width: 200px"> :page-size-opts="[10, 20, 50]"
<Option value="NONE">无操作</Option> size="small"
<Option value="URL">链接地址</Option> show-total
<Option value="GOODS">商品序号</Option> show-elevator
<Option value="SHOP">店铺编号</Option> show-sizer
<Option value="KEYWORD">关键字</Option> ></Page>
<Option value="CATEGORY">商品分类</Option> </Row>
</Select> </Card>
</FormItem> <Modal
<FormItem label="链接值" prop="sort" > :title="modalTitle"
<Input v-model="form.operationUrl" clearable style="width:100%"/> v-model="modalVisible"
</FormItem> :mask-closable="false"
<FormItem label="排序" prop="sort" > :width="500"
<InputNumber :max="999" :min="0" v-model="form.sort"></InputNumber> >
</FormItem> <Form ref="form" :model="form" :label-width="100" :rules="formValidate">
</Form> <FormItem label="名称" prop="name">
<div slot="footer"> <Input v-model="form.name" clearable style="width: 100%" />
<Button type="text" @click="modalVisible=false"></Button> </FormItem>
<Button type="primary" :loading="submitLoading" @click="handleSubmit"></Button> <FormItem label="图片" prop="url">
</div> <upload-pic-input
</Modal> v-model="form.url"
</div> style="width: 100%"
></upload-pic-input>
</FormItem>
<FormItem label="操作类型" prop="operationType">
<Select
v-model="form.operationType"
placeholder="请选择"
clearable
style="width: 200px"
>
<Option value="NONE">无操作</Option>
<Option value="URL">链接地址</Option>
<Option value="GOODS">商品序号</Option>
<Option value="SHOP">店铺编号</Option>
<Option value="KEYWORD">关键字</Option>
<Option value="CATEGORY">商品分类</Option>
</Select>
</FormItem>
<FormItem label="链接值" prop="sort">
<Input v-model="form.operationUrl" clearable style="width: 100%" />
</FormItem>
<FormItem label="排序" prop="sort">
<InputNumber :max="999" :min="0" v-model="form.sort"></InputNumber>
</FormItem>
</Form>
<div slot="footer">
<Button type="text" @click="modalVisible = false">取消</Button>
<Button type="primary" :loading="submitLoading" @click="handleSubmit"
>提交</Button
>
</div>
</Modal>
</div>
</template> </template>
<script> <script>
import { import {
getFocusData, getFocusData,
saveFocusData, saveFocusData,
disableFocus, disableFocus,
enableFocus, enableFocus,
delFocus delFocus,
} from "@/api/pages"; } from "@/api/pages";
import uploadPicInput from "@/views/my-components/lili/upload-pic-input"; import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
export default { export default {
name: "pcFocus", name: "pcFocus",
components: { components: {
uploadPicInput uploadPicInput,
},
data() {
return {
openTip: true, //
loading: true, //
modalType: 0, //
modalVisible: false, //
modalTitle: "", //
searchForm: {
//
clientType: "PC", //
pageNumber: 1, //
pageSize: 10, //
sort: "createTime", //
order: "desc", //
},
form: {
//
name: "",
operationType: "",
operationUrl: "",
url: "",
sort: 0,
},
//
formValidate: {
name: [{ required: true, message: "不能为空", trigger: "blur" }],
},
submitLoading: false, //
selectList: [], //
selectCount: 0, //
columns: [
//
{
type: "selection",
width: 60,
align: "center",
}, },
data() { {
return { title: "名称",
openTip: true, // key: "name",
loading: true, // minWidth: 120,
modalType: 0, // sortable: false,
modalVisible: false, //
modalTitle: "", //
searchForm: { //
clientType: "PC", //
pageNumber: 1, //
pageSize: 10, //
sort: "createTime", //
order: "desc", //
},
form: { //
name: "",
operationType: "",
operationUrl: "",
url: "",
sort: 0,
},
//
formValidate: {
name: [{ required: true, message: "不能为空", trigger: "blur" }],
},
submitLoading: false, //
selectList: [], //
selectCount: 0, //
columns: [
//
{
type: "selection",
width: 60,
align: "center"
},
{
title: "名称",
key: "name",
minWidth: 120,
sortable: false,
},
{
title: "状态",
key: "status",
minWidth: 100,
sortable: false,
render: (h, params) => {
if (params.row.status == 'CLOSE') {
return h("div", [
h("Badge", {
props: {
status: "error",
text: "禁用"
}
})
]);
} else if (params.row.status == 'OPEN') {
return h("div", [
h("Badge", {
props: {
status: "success",
text: "启用"
}
})
]);
}
}
},
{
title: "图片",
key: "url",
minWidth: 120,
sortable: false,
render: (h, params) => {
return h("img", {
attrs: {
src: params.row.url,
alt: "加载图片失败"
},
style: {
cursor: "pointer",
width: "80px",
height: "60px",
margin: "10px 0",
"object-fit": "contain"
}
});
}
},
{
title: "排序",
key: "sort",
minWidth: 120,
sortable: false,
},
{
title: "操作",
key: "action",
align: "center",
width: 200,
render: (h, params) => {
let enableOrDisable = "";
if (params.row.status == "CLOSE") {
enableOrDisable = h(
"Button",
{
props: {
type: "success",
size: "small"
},
style: {
marginRight: "5px"
},
on: {
click: () => {
this.enable(params.row);
}
}
},
"启用"
);
} else {
enableOrDisable = h(
"Button",
{
props: {
size: "small"
},
style: {
marginRight: "5px"
},
on: {
click: () => {
this.disable(params.row);
}
}
},
"禁用"
);
}
return h("div", [
h(
"Button",
{
props: {
type: "primary",
size: "small"
},
style: {
marginRight: "5px"
},
on: {
click: () => {
this.edit(params.row);
}
}
},
"编辑"
),
h(
"Button",
{
props: {
type: "error",
size: "small",
},
style: {
marginRight: "5px"
},
on: {
click: () => {
this.remove(params.row);
}
}
},
"删除"
),
enableOrDisable,
]);
}
}
],
data: [], //
total: 0 //
};
}, },
methods: { {
init() { title: "状态",
this.getDataList(); key: "status",
}, minWidth: 100,
changePage(v) { sortable: false,
this.searchForm.pageNumber = v; render: (h, params) => {
this.getDataList(); if (params.row.status == "CLOSE") {
this.clearSelectAll(); return h("div", [
}, h("Badge", {
changePageSize(v) { props: {
this.searchForm.pageSize = v; status: "error",
this.getDataList(); text: "禁用",
}, },
handleSearch() { }),
this.searchForm.pageNumber = 1; ]);
this.searchForm.pageSize = 10; } else if (params.row.status == "OPEN") {
this.getDataList(); return h("div", [
}, h("Badge", {
handleReset() { props: {
this.$refs.searchForm.resetFields(); status: "success",
this.searchForm.pageNumber = 1; text: "启用",
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;
this.selectCount = e.length;
},
getDataList() {
this.loading = true;
//
getFocusData(this.searchForm).then(res => {
this.loading = false;
if (res.success) {
this.data = res.result.records;
this.total = res.result.total;
}
});
//
//this.data = [
//];
this.total = this.data.length;
this.loading = false;
},
enable(v){
this.$Modal.confirm({
title: "确认启用",
//
content: "您确认要确认启用 " + v.name + " ?",
loading: true,
onOk: () => {
//
enableFocus(v.id).then(res => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
}
});
},
disable(v) {
this.$Modal.confirm({
title: "确认禁用",
//
content: "您确认要禁用 " + v.name + " ?",
loading: true,
onOk: () => {
//
disableFocus(v.id).then(res => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
}
});
},
handleSubmit() {
this.$refs.form.validate(valid => {
if (valid) {
this.form.ClientType = "PC"
this.submitLoading = true;
if (this.modalType === 0) {
this.form.status = "OPEN"
// id
delete this.form.id;
saveFocusData(this.form).then(res => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
this.modalVisible = false;
}
});
} else {
//
saveFocusData(this.form).then(res => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
this.modalVisible = false;
}
});
}
}
});
},
add() {
this.modalType = 0;
this.modalTitle = "添加";
this.$refs.form.resetFields();
delete this.form.id;
this.modalVisible = true;
},
edit(v) {
this.modalType = 1;
this.modalTitle = "编辑";
this.$refs.form.resetFields();
// null""
for (let attr in v) {
if (v[attr] === null) {
v[attr] = "";
}
}
let str = JSON.stringify(v);
let data = JSON.parse(str);
this.form = data;
this.modalVisible = true;
},
remove(v) {
this.$Modal.confirm({
title: "确认删除",
//
content: "您确认要删除么?",
loading: true,
onOk: () => {
//
delFocus(v.id).then(res => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
}
});
},
disableAll() {
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 += e.id + ",";
});
ids = ids.substring(0, ids.length - 1);
//
disableFocus(ids).then(res => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("禁用成功");
this.clearSelectAll();
this.getDataList();
}
});
}
});
} }
},
}, },
mounted() { {
this.init(); title: "图片",
} key: "url",
minWidth: 120,
sortable: false,
render: (h, params) => {
return h("img", {
attrs: {
src: params.row.url,
alt: "加载图片失败",
},
style: {
cursor: "pointer",
width: "80px",
height: "60px",
margin: "10px 0",
"object-fit": "contain",
},
});
},
},
{
title: "排序",
key: "sort",
minWidth: 120,
sortable: false,
},
{
title: "操作",
key: "action",
align: "center",
width: 200,
render: (h, params) => {
let enableOrDisable = "";
if (params.row.status == "CLOSE") {
enableOrDisable = h(
"Button",
{
props: {
type: "success",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.enable(params.row);
},
},
},
"启用"
);
} else {
enableOrDisable = h(
"Button",
{
props: {
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.disable(params.row);
},
},
},
"禁用"
);
}
return h("div", [
h(
"Button",
{
props: {
type: "primary",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.edit(params.row);
},
},
},
"编辑"
),
h(
"Button",
{
props: {
type: "error",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.remove(params.row);
},
},
},
"删除"
),
enableOrDisable,
]);
},
},
],
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;
this.selectCount = e.length;
},
getDataList() {
this.loading = true;
//
getFocusData(this.searchForm).then((res) => {
this.loading = false;
if (res.success) {
this.data = res.result.records;
this.total = res.result.total;
}
});
//
//this.data = [
//];
this.total = this.data.length;
this.loading = false;
},
enable(v) {
this.$Modal.confirm({
title: "确认启用",
//
content: "您确认要确认启用 " + v.name + " ?",
loading: true,
onOk: () => {
//
enableFocus(v.id).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
},
});
},
disable(v) {
this.$Modal.confirm({
title: "确认禁用",
//
content: "您确认要禁用 " + v.name + " ?",
loading: true,
onOk: () => {
//
disableFocus(v.id).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
},
});
},
handleSubmit() {
this.$refs.form.validate((valid) => {
if (valid) {
this.form.ClientType = "PC";
this.submitLoading = true;
if (this.modalType === 0) {
this.form.status = "OPEN";
// id
delete this.form.id;
saveFocusData(this.form).then((res) => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
this.modalVisible = false;
}
});
} else {
//
saveFocusData(this.form).then((res) => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
this.modalVisible = false;
}
});
}
}
});
},
add() {
this.modalType = 0;
this.modalTitle = "添加";
this.$refs.form.resetFields();
delete this.form.id;
this.modalVisible = true;
},
edit(v) {
this.modalType = 1;
this.modalTitle = "编辑";
this.$refs.form.resetFields();
// null""
for (let attr in v) {
if (v[attr] === null) {
v[attr] = "";
}
}
let str = JSON.stringify(v);
let data = JSON.parse(str);
this.form = data;
this.modalVisible = true;
},
remove(v) {
this.$Modal.confirm({
title: "确认删除",
//
content: "您确认要删除么?",
loading: true,
onOk: () => {
//
delFocus(v.id).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
},
});
},
disableAll() {
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 += e.id + ",";
});
ids = ids.substring(0, ids.length - 1);
//
disableFocus(ids).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("禁用成功");
this.clearSelectAll();
this.getDataList();
}
});
},
});
},
},
mounted() {
this.init();
},
};
</script> </script>
<style lang="scss"> <style lang="scss">
// //
// @import "@/styles/table-common.scss"; // @import "@/styles/table-common.scss";
.search { .search {
.operation { .operation {
margin-bottom: 2vh; margin-bottom: 2vh;
} }
.select-count { .select-count {
font-weight: 600; font-weight: 600;
color: #40a9ff; color: #40a9ff;
} }
.select-clear { .select-clear {
margin-left: 10px; margin-left: 10px;
} }
.page { .page {
margin-top: 2vh; margin-top: 2vh;
} }
.drop-down { .drop-down {
margin-left: 5px; margin-left: 5px;
} }
} }
</style> </style>

View File

@ -1,467 +1,496 @@
<template> <template>
<div class="search"> <div class="search">
<Row> <Card>
<Col> <Row class="operation">
<Card> <Button @click="add" type="primary" icon="md-add">添加</Button>
<Row class="operation"> <Button @click="disableAll" icon="md-trash">批量禁用</Button>
<Button @click="add" type="primary" icon="md-add">添加</Button> <Button @click="getDataList" icon="md-refresh">刷新</Button>
<Button @click="disableAll" icon="md-trash">批量禁用</Button> <Button type="dashed" @click="openTip = !openTip">{{
<Button @click="getDataList" icon="md-refresh">刷新</Button> openTip ? "关闭提示" : "开启提示"
<Button type="dashed" @click="openTip=!openTip">{{openTip ? "" : ""}}</Button> }}</Button>
</Row> </Row>
<Row v-show="openTip"> <Row v-show="openTip">
<Alert show-icon> <Alert show-icon>
已选择 <span class="select-count">{{selectCount}}</span> 已选择 <span class="select-count">{{ selectCount }}</span>
<a class="select-clear" @click="clearSelectAll"></a> <a class="select-clear" @click="clearSelectAll"></a>
</Alert> </Alert>
</Row> </Row>
<Row> <Table
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" :loading="loading"
@on-sort-change="changeSort" @on-selection-change="changeSelect"></Table> border
</Row> :columns="columns"
<Row type="flex" justify="end" class="page"> :data="data"
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" ref="table"
@on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10,20,50]" sortable="custom"
size="small" show-total show-elevator show-sizer></Page> @on-sort-change="changeSort"
</Row> @on-selection-change="changeSelect"
</Card> ></Table>
</Col> <Row type="flex" justify="end" class="page">
</Row> <Page
<Modal :title="modalTitle" v-model="modalVisible" :mask-closable='false' :width="500"> :current="searchForm.pageNumber"
<Form ref="form" :model="form" :label-width="100" :rules="formValidate"> :total="total"
<FormItem label="导航栏名称" prop="navigationName"> :page-size="searchForm.pageSize"
<Input v-model="form.navigationName" clearable style="width:100%"/> @on-change="changePage"
</FormItem> @on-page-size-change="changePageSize"
<FormItem label="导航栏链接" prop="url"> :page-size-opts="[10, 20, 50]"
<Input v-model="form.url" clearable style="width:100%"/> size="small"
</FormItem> show-total
<FormItem label="品牌图标" prop="image"> show-elevator
<upload-pic-input v-model="form.image" style="width:100%"></upload-pic-input> show-sizer
</FormItem> ></Page>
</Form> </Row>
<div slot="footer"> </Card>
<Button type="text" @click="modalVisible=false"></Button> <Modal
<Button type="primary" :loading="submitLoading" @click="handleSubmit"></Button> :title="modalTitle"
</div> v-model="modalVisible"
</Modal> :mask-closable="false"
</div> :width="500"
>
<Form ref="form" :model="form" :label-width="100" :rules="formValidate">
<FormItem label="导航栏名称" prop="navigationName">
<Input v-model="form.navigationName" clearable style="width: 100%" />
</FormItem>
<FormItem label="导航栏链接" prop="url">
<Input v-model="form.url" clearable style="width: 100%" />
</FormItem>
<FormItem label="品牌图标" prop="image">
<upload-pic-input
v-model="form.image"
style="width: 100%"
></upload-pic-input>
</FormItem>
</Form>
<div slot="footer">
<Button type="text" @click="modalVisible = false">取消</Button>
<Button type="primary" :loading="submitLoading" @click="handleSubmit"
>提交</Button
>
</div>
</Modal>
</div>
</template> </template>
<script> <script>
import { import {
save, save,
getNavigationData, getNavigationData,
disableNavigation, disableNavigation,
enableNavigation, enableNavigation,
delNavigation, delNavigation,
update update,
} from "@/api/pages"; } from "@/api/pages";
import uploadPicInput from "@/views/my-components/lili/upload-pic-input"; import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
export default { export default {
name: "mobileNavigation", name: "mobileNavigation",
components: { components: {
uploadPicInput uploadPicInput,
},
data() {
return {
openTip: true, //
loading: true, //
type: "MOBILE", // pc
modalType: 0, //
modalVisible: false, //
modalTitle: "", //
searchForm: {
//
pageNumber: 1, //
pageSize: 10, //
sort: "createTime", //
order: "desc", //
},
form: {
//
navigationName: "",
image: "",
url: "",
},
//
formValidate: {
url: [
{ required: true, message: "导航栏url不能为空", trigger: "blur" },
],
navigationName: [
{ required: true, message: "导航栏不能为空", trigger: "blur" },
],
},
submitLoading: false, //
selectList: [], //
selectCount: 0, //
columns: [
//
{
type: "selection",
width: 60,
align: "center",
}, },
data() { {
return { title: "导航名称",
openTip: true, // key: "navigationName",
loading: true, // minWidth: 120,
type: "MOBILE", // pc sortable: false,
modalType: 0, //
modalVisible: false, //
modalTitle: "", //
searchForm: { //
pageNumber: 1, //
pageSize: 10, //
sort: "createTime", //
order: "desc", //
},
form: { //
navigationName: "",
image: "",
url: "",
},
//
formValidate: {
url: [{required: true, message: "导航栏url不能为空", trigger: "blur"}],
navigationName: [{required: true, message: "导航栏不能为空", trigger: "blur"}],
},
submitLoading: false, //
selectList: [], //
selectCount: 0, //
columns: [
//
{
type: "selection",
width: 60,
align: "center"
},
{
title: "导航名称",
key: "navigationName",
minWidth: 120,
sortable: false,
},
{
title: "状态",
key: "status",
minWidth: 100,
sortable: false,
render: (h, params) => {
if (params.row.status == 'CLOSE') {
return h("div", [
h("Badge", {
props: {
status: "error",
text: "禁用"
}
})
]);
} else if (params.row.status == 'OPEN') {
return h("div", [
h("Badge", {
props: {
status: "success",
text: "启用"
}
})
]);
}
}
},
{
title: "图片",
key: "image",
minWidth: 120,
sortable: false,
render: (h, params) => {
return h("img", {
attrs: {
src: params.row.image,
alt: "加载图片失败"
},
style: {
cursor: "pointer",
width: "80px",
height: "60px",
margin: "10px 0",
"object-fit": "contain"
}
});
}
},
{
title: "排序",
key: "sort",
minWidth: 120,
sortable: false,
},
{
title: "操作",
key: "action",
align: "center",
width: 250,
render: (h, params) => {
console.warn(params.status)
let enableOrDisable = "";
if (params.row.status == "CLOSE") {
enableOrDisable = h(
"Button",
{
props: {
type: "success",
size: "small"
},
style: {
marginRight: "5px"
},
on: {
click: () => {
this.enable(params.row);
}
}
},
"启用"
);
} else {
enableOrDisable = h(
"Button",
{
props: {
size: "small"
},
style: {
marginRight: "5px"
},
on: {
click: () => {
this.disable(params.row);
}
}
},
"禁用"
);
}
return h("div", [
h(
"Button",
{
props: {
type: "primary",
size: "small"
},
style: {
marginRight: "5px"
},
on: {
click: () => {
this.edit(params.row);
}
}
},
"编辑"
),
h(
"Button",
{
props: {
type: "error",
size: "small",
},
style: {
marginRight: "5px"
},
on: {
click: () => {
this.del(params.row);
}
}
},
"删除"
),
enableOrDisable,
]);
}
}
],
data: [], //
total: 0 //
};
}, },
methods: { {
init() { title: "状态",
this.getDataList(); key: "status",
}, minWidth: 100,
changePage(v) { sortable: false,
this.searchForm.pageNumber = v; render: (h, params) => {
this.getDataList(); if (params.row.status == "CLOSE") {
this.clearSelectAll(); return h("div", [
}, h("Badge", {
changePageSize(v) { props: {
this.searchForm.pageSize = v; status: "error",
this.getDataList(); text: "禁用",
}, },
handleSearch() { }),
this.searchForm.pageNumber = 1; ]);
this.searchForm.pageSize = 10; } else if (params.row.status == "OPEN") {
this.getDataList(); return h("div", [
}, h("Badge", {
handleReset() { props: {
this.$refs.searchForm.resetFields(); status: "success",
this.searchForm.pageNumber = 1; text: "启用",
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;
this.selectCount = e.length;
},
getDataList() {
this.searchForm.clientType = this.type
this.loading = true;
//
getNavigationData(this.searchForm).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;
},
handleSubmit() {
this.$refs.form.validate(valid => {
if (valid) {
this.submitLoading = true;
this.form.clientType = this.type
if (this.modalType === 0) {
// id
delete this.form.id;
save(this.form).then(res => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
this.modalVisible = false;
}
});
} else {
//
update(this.form).then(res => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
this.modalVisible = false;
}
});
}
}
});
},
add() {
this.modalType = 0;
this.modalTitle = "添加";
this.$refs.form.resetFields();
delete this.form.id;
this.modalVisible = true;
},
edit(v) {
this.modalType = 1;
this.modalTitle = "编辑";
this.$refs.form.resetFields();
// null""
for (let attr in v) {
if (v[attr] === null) {
v[attr] = "";
}
}
let str = JSON.stringify(v);
let data = JSON.parse(str);
this.form = data;
this.modalVisible = true;
},
enable(v){
this.$Modal.confirm({
title: "确认启用",
//
content: "您确认要确认启用 " + v.navigationName + " ?",
loading: true,
onOk: () => {
//
enableNavigation(v.id).then(res => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
}
});
},
disable(v) {
this.$Modal.confirm({
title: "确认禁用",
//
content: "您确认要禁用 " + v.navigationName + " ?",
loading: true,
onOk: () => {
//
disableNavigation(v.id).then(res => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
}
});
},
disableAll() {
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 += e.id + ",";
});
ids = ids.substring(0, ids.length - 1);
//
disableNavigation(ids).then(res => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.clearSelectAll();
this.getDataList();
}
});
}
});
},
del(v) {
this.$Modal.confirm({
title: "确认删除",
//
content: "您确认要永久性删除 " + v.navigationName + " ?",
loading: true,
onOk: () => {
//
delNavigation(v.id).then(res => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
}
});
} }
},
}, },
{
mounted() { title: "图片",
this.init(); key: "image",
} minWidth: 120,
sortable: false,
render: (h, params) => {
return h("img", {
attrs: {
src: params.row.image,
alt: "加载图片失败",
},
style: {
cursor: "pointer",
width: "80px",
height: "60px",
margin: "10px 0",
"object-fit": "contain",
},
});
},
},
{
title: "排序",
key: "sort",
minWidth: 120,
sortable: false,
},
{
title: "操作",
key: "action",
align: "center",
width: 250,
render: (h, params) => {
console.warn(params.status);
let enableOrDisable = "";
if (params.row.status == "CLOSE") {
enableOrDisable = h(
"Button",
{
props: {
type: "success",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.enable(params.row);
},
},
},
"启用"
);
} else {
enableOrDisable = h(
"Button",
{
props: {
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.disable(params.row);
},
},
},
"禁用"
);
}
return h("div", [
h(
"Button",
{
props: {
type: "primary",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.edit(params.row);
},
},
},
"编辑"
),
h(
"Button",
{
props: {
type: "error",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.del(params.row);
},
},
},
"删除"
),
enableOrDisable,
]);
},
},
],
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;
this.selectCount = e.length;
},
getDataList() {
this.searchForm.clientType = this.type;
this.loading = true;
//
getNavigationData(this.searchForm).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;
},
handleSubmit() {
this.$refs.form.validate((valid) => {
if (valid) {
this.submitLoading = true;
this.form.clientType = this.type;
if (this.modalType === 0) {
// id
delete this.form.id;
save(this.form).then((res) => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
this.modalVisible = false;
}
});
} else {
//
update(this.form).then((res) => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
this.modalVisible = false;
}
});
}
}
});
},
add() {
this.modalType = 0;
this.modalTitle = "添加";
this.$refs.form.resetFields();
delete this.form.id;
this.modalVisible = true;
},
edit(v) {
this.modalType = 1;
this.modalTitle = "编辑";
this.$refs.form.resetFields();
// null""
for (let attr in v) {
if (v[attr] === null) {
v[attr] = "";
}
}
let str = JSON.stringify(v);
let data = JSON.parse(str);
this.form = data;
this.modalVisible = true;
},
enable(v) {
this.$Modal.confirm({
title: "确认启用",
//
content: "您确认要确认启用 " + v.navigationName + " ?",
loading: true,
onOk: () => {
//
enableNavigation(v.id).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
},
});
},
disable(v) {
this.$Modal.confirm({
title: "确认禁用",
//
content: "您确认要禁用 " + v.navigationName + " ?",
loading: true,
onOk: () => {
//
disableNavigation(v.id).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
},
});
},
disableAll() {
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 += e.id + ",";
});
ids = ids.substring(0, ids.length - 1);
//
disableNavigation(ids).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.clearSelectAll();
this.getDataList();
}
});
},
});
},
del(v) {
this.$Modal.confirm({
title: "确认删除",
//
content: "您确认要永久性删除 " + v.navigationName + " ?",
loading: true,
onOk: () => {
//
delNavigation(v.id).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
},
});
},
},
mounted() {
this.init();
},
};
</script> </script>
<style lang="scss"> <style lang="scss">
// //
// @import "@/styles/table-common.scss"; // @import "@/styles/table-common.scss";
.search { .search {
.operation { .operation {
margin-bottom: 2vh; margin-bottom: 2vh;
} }
.select-count { .select-count {
font-weight: 600; font-weight: 600;
color: #40a9ff; color: #40a9ff;
} }
.select-clear { .select-clear {
margin-left: 10px; margin-left: 10px;
} }
.page { .page {
margin-top: 2vh; margin-top: 2vh;
} }
.drop-down { .drop-down {
margin-left: 5px; margin-left: 5px;
} }
} }
</style> </style>

View File

@ -1,7 +1,5 @@
<template> <template>
<div class="search"> <div class="search">
<Row>
<Col>
<Card> <Card>
<Row class="operation"> <Row class="operation">
<Button @click="add" type="primary" icon="md-add">添加</Button> <Button @click="add" type="primary" icon="md-add">添加</Button>
@ -15,18 +13,14 @@
<a class="select-clear" @click="clearSelectAll"></a> <a class="select-clear" @click="clearSelectAll"></a>
</Alert> </Alert>
</Row> </Row>
<Row> <Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
@on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
</Row>
<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"
@on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10,20,50]" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10,20,50]"
size="small" show-total show-elevator show-sizer></Page> size="small" show-total show-elevator show-sizer></Page>
</Row> </Row>
</Card> </Card>
</Col>
</Row>
<Modal :title="modalTitle" v-model="modalVisible" :mask-closable='false' :width="500"> <Modal :title="modalTitle" v-model="modalVisible" :mask-closable='false' :width="500">
<Form ref="form" :model="form" :label-width="100" :rules="formValidate"> <Form ref="form" :model="form" :label-width="100" :rules="formValidate">
<FormItem label="导航栏名称" prop="navigationName"> <FormItem label="导航栏名称" prop="navigationName">

View File

@ -42,46 +42,37 @@
<Button @click="delAll"></Button> <Button @click="delAll"></Button>
<!-- <Button @click="upAll" >批量上架</Button> --> <!-- <Button @click="upAll" >批量上架</Button> -->
</Row> </Row>
<Row> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="columns"
:columns="columns" :data="data"
:data="data" ref="table"
ref="table" sortable="custom"
sortable="custom" @on-sort-change="changeSort"
@on-sort-change="changeSort" @on-selection-change="changeSelect"
@on-selection-change="changeSelect" >
> <template slot-scope="{ row }" slot="action">
<template slot-scope="{ row }" slot="action"> <Button
<!-- <Button v-if="row.promotionStatus === 'NEW' || row.promotionStatus === 'CLOSE'"
type="info" type="primary"
size="small" size="small"
style="margin-right: 10px" style="margin-right: 10px"
@click="receiveInfo(row)" @click="edit(row)"
>查看</Button >编辑
> --> </Button
<Button >
v-if="row.promotionStatus === 'NEW' || row.promotionStatus === 'CLOSE'" <Button
type="primary" v-if="row.promotionStatus === 'START' || row.promotionStatus === 'NEW'"
size="small" type="error"
style="margin-right: 10px" size="small"
@click="edit(row)" style="margin-right: 10px"
>编辑 @click="remove(row)"
</Button >下架
> </Button
<Button >
v-if="row.promotionStatus === 'START' || row.promotionStatus === 'NEW'" </template>
type="error" </Table>
size="small"
style="margin-right: 10px"
@click="remove(row)"
>下架
</Button
>
</template>
</Table>
</Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
:current="searchForm.pageNumber + 1" :current="searchForm.pageNumber + 1"

View File

@ -72,9 +72,7 @@
</div> </div>
<h4>适用品类范围</h4> <h4>适用品类范围</h4>
<div> <div>
<Row> <Table :loading="loading" border :columns="columns1" :data="data1" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
<Table :loading="loading" border :columns="columns1" :data="data1" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
</Row>
<Row type="flex" justify="end" class="page"> <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]" <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> size="small" show-total show-elevator show-sizer></Page>

View File

@ -70,7 +70,7 @@
<FormItem style="width: 100%" v-if="form.scopeType == 'PORTION_GOODS'"> <FormItem style="width: 100%" v-if="form.scopeType == 'PORTION_GOODS'">
<div style="display: flex; margin-bottom: 10px"> <div style="display: flex; margin-bottom: 10px">
<Button type="primary" @click="$refs.skuSelect.open('goods')"></Button> <Button type="primary" @click="openSkuList"></Button>
<Button type="error" ghost style="margin-left: 10px" @click="delSelectGoods"></Button> <Button type="error" ghost style="margin-left: 10px" @click="delSelectGoods"></Button>
</div> </div>
<Table border :columns="columns" :data="form.promotionGoodsList" @on-selection-change="changeSelect"> <Table border :columns="columns" :data="form.promotionGoodsList" @on-selection-change="changeSelect">
@ -392,6 +392,14 @@ export default {
); );
this.$router.go(-1); this.$router.go(-1);
}, },
openSkuList() { //
this.$refs.skuSelect.open("goods");
let data = JSON.parse(JSON.stringify(this.form.promotionGoodsList))
data.forEach(e => {
e.id = e.skuId
})
this.$refs.skuSelect.goodsData = data;
},
changeSelect(e) { changeSelect(e) {
// //
this.selectedGoods = e; this.selectedGoods = e;
@ -424,25 +432,19 @@ export default {
}, },
selectedGoodsData(item) { selectedGoodsData(item) {
// //
let ids = [];
let list = []; let list = [];
this.form.promotionGoodsList.forEach((e) => {
ids.push(e.skuId);
});
item.forEach((e) => { item.forEach((e) => {
if (!ids.includes(e.id)) {
list.push({ list.push({
goodsName: e.goodsName, goodsName: e.goodsName,
price: e.price, price: e.price,
originalPrice: e.price, originalPrice: e.price,
quantity: e.quantity, quantity: e.quantity,
storeId: e.storeId, storeId: e.storeId,
sellerName: e.sellerName, storeName: e.storeName,
skuId: e.id, skuId: e.id,
}); });
}
}); });
this.form.promotionGoodsList.push(...list); this.form.promotionGoodsList = list;
}, },
getGoodsCategory(e) { getGoodsCategory(e) {
// id // id

View File

@ -1,51 +1,45 @@
<template> <template>
<div class="search"> <div class="search">
<Row> <Card>
<Col> <Table
<Card> :loading="loading"
<Row> border
<Table :columns="columns"
:loading="loading" :data="data"
border ref="table"
:columns="columns" sortable="custom"
:data="data" @on-sort-change="changeSort"
ref="table" @on-selection-change="changeSelect"
sortable="custom" >
@on-sort-change="changeSort" <template slot-scope="{ row }" slot="rangeTime">
@on-selection-change="changeSelect" <div>{{ row.startTime }} ~ {{ row.endTime }}</div>
> </template>
<template slot-scope="{ row }" slot="rangeTime"> <template slot-scope="{ row }" slot="action">
<div>{{ row.startTime }} ~ {{ row.endTime }}</div> <Button
</template> type="error"
<template slot-scope="{ row }" slot="action"> ghost
<Button
type="error"
ghost
size="small"
:disabled="row.memberCouponStatus != 'NEW'"
@click="remove(row)"
>作废</Button
>
</template>
</Table>
</Row>
<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" size="small"
show-total :disabled="row.memberCouponStatus != 'NEW'"
show-elevator @click="remove(row)"
show-sizer >作废</Button
></Page> >
</Row> </template>
</Card> </Table>
</Col> <Row type="flex" justify="end" class="page">
</Row> <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> </div>
</template> </template>

View File

@ -43,35 +43,33 @@
<Button @click="handleSearch" type="primary" class="search-btn" icon="ios-search">搜索</Button> <Button @click="handleSearch" type="primary" class="search-btn" icon="ios-search">搜索</Button>
</Form> </Form>
</Row> </Row>
<Row class="padding-row"> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="columns"
:columns="columns" :data="data"
:data="data" ref="table"
ref="table" sortable="custom"
sortable="custom" >
> <template slot-scope="{ row }" slot="applyEndTime">
<template slot-scope="{ row }" slot="applyEndTime"> {{ unixDate(row.applyEndTime) }}
{{ unixDate(row.applyEndTime) }} </template>
</template> <template slot-scope="{ row }" slot="promotionType">
<template slot-scope="{ row }" slot="promotionType"> {{ row.isFullMinus ? "满减" : "满折" }}
{{ row.isFullMinus ? "满减" : "满折" }} </template>
</template> <template slot-scope="{ row }" slot="hours">
<template slot-scope="{ row }" slot="hours"> <Tag v-for="item in unixHours(row.hours)" :key="item">{{
<Tag v-for="item in unixHours(row.hours)" :key="item">{{ item
item }}</Tag>
}}</Tag> </template>
</template> <template slot-scope="{ row }" slot="action">
<template slot-scope="{ row }" slot="action"> <div>
<div> <Button type="success" size="small" @click="view(row)"
<Button type="success" size="small" @click="view(row)" >查看</Button
>查看</Button >&nbsp;
>&nbsp; </div>
</div> </template>
</template> </Table>
</Table>
</Row>
<Row type="flex" justify="end" class="page operation"> <Row type="flex" justify="end" class="page operation">
<Page <Page
:current="searchForm.pageNumber + 1" :current="searchForm.pageNumber + 1"

View File

@ -45,7 +45,6 @@
> >
</Form> </Form>
</Row> </Row>
<Row class="padding-row">
<Table <Table
:loading="loading" :loading="loading"
border border
@ -72,7 +71,6 @@
</Button> </Button>
</template> </template>
</Table> </Table>
</Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
:current="searchForm.pageNumber + 1" :current="searchForm.pageNumber + 1"

View File

@ -10,10 +10,10 @@
></Table> ></Table>
<h4>商品信息</h4> <h4>商品信息</h4>
<Row class="operation">
<Table <Table
:loading="loading" :loading="loading"
border border
class="operation"
:columns="goodsColumns" :columns="goodsColumns"
:data="goodsData" :data="goodsData"
ref="table" ref="table"
@ -34,7 +34,6 @@
</template> </template>
</Table> </Table>
</Row>
<Row type="flex" justify="end" class="page operation"> <Row type="flex" justify="end" class="page operation">
<Page <Page
:current="searchForm.pageNumber + 1" :current="searchForm.pageNumber + 1"

View File

@ -7,9 +7,7 @@
<div class="form-item-view"> <div class="form-item-view">
<FormItem astyle="width: 100%"> <FormItem astyle="width: 100%">
<div style="display: flex; margin-bottom: 10px"> <div style="display: flex; margin-bottom: 10px">
<Button type="primary" @click="$refs.skuSelect.open('goods')" <Button type="primary" @click="openSkuList"></Button>
>选择商品</Button
>
<Button <Button
type="error" type="error"
ghost ghost
@ -20,22 +18,19 @@
</div> </div>
<Table <Table
border border
v-if="showTable"
:columns="columns" :columns="columns"
:data="form.promotionGoodsList" :data="promotionGoodsList"
@on-selection-change="changeSelect" @on-selection-change="changeSelect"
> >
<template slot-scope="{ row }" slot="skuId"> <template slot-scope="{ row }" slot="skuId">
<div>{{ row.skuId }}</div> <div>{{ row.skuId }}</div>
</template> </template>
<template slot-scope="{ row, index }" slot="settlementPrice"> <template slot-scope="{ index }" slot="settlementPrice">
<Input <Input
type="number" type="number"
v-model="row.settlementPrice" v-model="promotionGoodsList[index].settlementPrice"
@input="
pointsGoodsList[index].settlementPrice =
row.settlementPrice
"
/> />
</template> </template>
@ -44,7 +39,7 @@
slot="pointsGoodsCategory" slot="pointsGoodsCategory"
> >
<Select <Select
v-model="pointsGoodsList[index].pointsGoodsCategoryId" v-model="promotionGoodsList[index].pointsGoodsCategoryId"
transfer="true" transfer="true"
label-in-value="true" label-in-value="true"
@on-change=" @on-change="
@ -62,21 +57,17 @@
</Select> </Select>
</template> </template>
<template slot-scope="{ row, index }" slot="activeStock"> <template slot-scope="{ index }" slot="activeStock">
<Input <Input
type="number" type="number"
v-model="row.activeStock" v-model="promotionGoodsList[index].activeStock"
@input="
pointsGoodsList[index].activeStock = row.activeStock
"
/> />
</template> </template>
<template slot-scope="{ row, index }" slot="points"> <template slot-scope="{ index }" slot="points">
<Input <Input
type="number" type="number"
v-model="row.points" v-model="promotionGoodsList[index].points"
@input="pointsGoodsList[index].points = row.points"
/> />
</template> </template>
</Table> </Table>
@ -151,22 +142,10 @@ export default {
}; };
return { return {
form: { form: {
/** 店铺承担比例 */ promotionGoodsList: [], //
sellerCommission: 0,
/** 发行数量 */
publishNum: 1,
/** 运费承担者 */
scopeType: "ALL",
/** 限领数量 */
couponLimitNum: 1,
/** 活动类型 */
couponType: "PRICE",
/** 优惠券名称 */
couponName: "",
getType: "FREE",
promotionGoodsList: [],
}, },
pointsGoodsList: [], // showTable: true,
promotionGoodsList: [], //
categoryList: [], // categoryList: [], //
submitLoading: false, // submitLoading: false, //
selectedGoods: [], // 便 selectedGoods: [], // 便
@ -226,6 +205,12 @@ export default {
title: "商品名称", title: "商品名称",
key: "goodsName", key: "goodsName",
minWidth: 120, minWidth: 120,
render: (h, params) => {
return h(
"div",
params.row.goodsSku.goodsName
);
},
}, },
{ {
title: "SKU编码", title: "SKU编码",
@ -236,6 +221,12 @@ export default {
title: "店铺名称", title: "店铺名称",
key: "storeName", key: "storeName",
minWidth: 60, minWidth: 60,
render: (h, params) => {
return h(
"div",
params.row.goodsSku.storeName
);
},
}, },
{ {
title: "商品价格", title: "商品价格",
@ -244,7 +235,7 @@ export default {
render: (h, params) => { render: (h, params) => {
return h( return h(
"div", "div",
this.$options.filters.unitPrice(params.row.price, "¥") this.$options.filters.unitPrice(params.row.goodsSku.price, "¥")
); );
}, },
}, },
@ -252,6 +243,12 @@ export default {
title: "库存", title: "库存",
key: "quantity", key: "quantity",
minWidth: 20, minWidth: 20,
render: (h, params) => {
return h(
"div",
params.row.goodsSku.quantity
);
},
}, },
{ {
title: "结算价格", title: "结算价格",
@ -313,11 +310,11 @@ export default {
let res = await getPointsGoodsCategoryList(); let res = await getPointsGoodsCategoryList();
this.categoryList = res.result.records; this.categoryList = res.result.records;
}, },
/** 保存平台优惠券 */ /** 保存积分商品 */
handleSubmit() { handleSubmit() {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
let params = this.pointsGoodsList; let params = this.promotionGoodsList;
const start = this.$options.filters.unixToDate( const start = this.$options.filters.unixToDate(
this.form.startTime / 1000 this.form.startTime / 1000
); );
@ -355,7 +352,8 @@ export default {
this.$router.go(-1); this.$router.go(-1);
}, },
changeCategory(val, index) { changeCategory(val, index) {
this.pointsGoodsList[index].pointsGoodsCategoryName = val.label; this.promotionGoodsList[index].pointsGoodsCategoryName = val.label;
console.log(this.promotionGoodsList);
}, },
changeSelect(e) { changeSelect(e) {
// //
@ -363,7 +361,7 @@ export default {
}, },
delSelectGoods() { delSelectGoods() {
// //
if (this.pointsGoodsList.length <= 0) { if (this.selectedGoods.length <= 0) {
this.$Message.warning("您还未选择要删除的数据"); this.$Message.warning("您还未选择要删除的数据");
return; return;
} }
@ -375,55 +373,42 @@ export default {
this.selectedGoods.forEach(function (e) { this.selectedGoods.forEach(function (e) {
ids.push(e.id); ids.push(e.id);
}); });
this.form.promotionGoodsList = this.form.promotionGoodsList.filter( this.promotionGoodsList = this.promotionGoodsList.filter(
(item) => { (item) => {
return !ids.includes(item.id); return !ids.includes(item.id);
} }
); );
this.pointsGoodsList = this.pointsGoodsList.filter((item) => {
return !ids.includes(item.id);
});
}, },
}); });
}, },
delGoods(index) { delGoods(index) {
// //
this.form.promotionGoodsList.splice(index, 1); this.promotionGoodsList.splice(index, 1);
this.pointsGoodsList.splice(index, 1); },
openSkuList() { //
this.$refs.skuSelect.open("goods");
let data = JSON.parse(JSON.stringify(this.promotionGoodsList))
data.forEach(e => {
e.id = e.skuId
})
this.$refs.skuSelect.goodsData = data;
}, },
selectedGoodsData(item) { selectedGoodsData(item) {
// //
let ids = [];
let list = []; let list = [];
this.form.promotionGoodsList.forEach((e) => {
ids.push(e.skuId);
});
item.forEach((e) => { item.forEach((e) => {
if (!ids.includes(e.id)) { const obj = {
list.push({ settlementPrice: e.settlementPrice || 0,
goodsName: e.goodsName, pointsGoodsCategoryId: e.pointsGoodsCategoryId || 0,
price: e.price, pointsGoodsCategoryName:e.pointsGoodsCategoryName || "",
originalPrice: e.price, activeStock:e.activeStock || 0,
quantity: e.quantity, points:e.points || 0,
storeId: e.storeId, skuId: e.id,
storeName: e.storeName, goodsSku: e.goodsSku || e
skuId: e.id,
...e,
});
this.pointsGoodsList.push({
settlementPrice: 0,
pointsGoodsCategoryId: 0,
pointsGoodsCategoryName: "",
activeStock: 0,
points: 0,
goodsSku: {
...e,
},
skuId: e.id,
});
} }
list.push(obj);
}); });
this.form.promotionGoodsList.push(...list); this.promotionGoodsList = list;
}, },
}, },
}; };

View File

@ -5,19 +5,19 @@
<div class="base-info-item"> <div class="base-info-item">
<h4>积分商品信息</h4> <h4>积分商品信息</h4>
<div class="form-item-view"> <div class="form-item-view">
<FormItem label="商品名称" prop="goodsName"> <FormItem label="商品名称">
<div>{{ form.goodsSku.goodsName }}</div> <div>{{ form.goodsSku.goodsName }}</div>
</FormItem> </FormItem>
<FormItem label="SKU编码" prop="skuId"> <FormItem label="SKU编码">
<div>{{ form.goodsSku.id }}</div> <div>{{ form.goodsSku.id }}</div>
</FormItem> </FormItem>
<FormItem label="店铺名称" prop="sellerName"> <FormItem label="店铺名称">
<div>{{ form.goodsSku.sellerName }}</div> <div>{{ form.goodsSku.storeName }}</div>
</FormItem> </FormItem>
<FormItem label="商品价格" prop="goodsPrice"> <FormItem label="商品价格">
<div>{{ form.goodsSku.price | unitPrice('¥') }}</div> <div>{{ form.goodsSku.price | unitPrice('¥') }}</div>
</FormItem> </FormItem>
<FormItem label="库存" prop="quantity"> <FormItem label="库存">
<div>{{ form.goodsSku.quantity }}</div> <div>{{ form.goodsSku.quantity }}</div>
</FormItem> </FormItem>
<FormItem label="结算价格" prop="settlementPrice"> <FormItem label="结算价格" prop="settlementPrice">
@ -90,9 +90,7 @@
</FormItem> </FormItem>
</div> </div>
<div class="footer"> <div class="footer">
<Button @click="closeCurrentPage" style="margin-right: 5px" <Button @click="closeCurrentPage" style="margin-right: 5px">返回</Button>
>返回</Button
>
<Button <Button
type="primary" type="primary"
:loading="submitLoading" :loading="submitLoading"

View File

@ -61,73 +61,71 @@
<Button @click="addPointsGoods" type="primary" >添加积分商品</Button> <Button @click="addPointsGoods" type="primary" >添加积分商品</Button>
</Row> </Row>
<Row> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="columns"
:columns="columns" :data="data"
:data="data" ref="table"
ref="table" >
> <template slot-scope="{ row }" slot="goodsName">
<template slot-scope="{ row }" slot="goodsName"> <div>
<div> <a class="mr_10" @click="linkTo(row.goodsSku.goodsId,row.goodsSku.skuId)">{{row.goodsSku.goodsName}}</a>
<a class="mr_10" @click="linkTo(row.goodsSku.goodsId,row.goodsSku.skuId)">{{row.goodsSku.goodsName}}</a> <Poptip trigger="hover" title="扫码在手机中查看" transfer>
<Poptip trigger="hover" title="扫码在手机中查看" transfer> <div slot="content">
<div slot="content"> <vue-qr :text="wapLinkTo(row.goodsSku.goodsId,row.goodsSku.skuId)" :margin="0" colorDark="#000" colorLight="#fff" :size="150"></vue-qr>
<vue-qr :text="wapLinkTo(row.goodsSku.goodsId,row.goodsSku.skuId)" :margin="0" colorDark="#000" colorLight="#fff" :size="150"></vue-qr> </div>
</div> <img src="../../../assets/qrcode.svg" style="vertical-align:middle;" class="hover-pointer" width="20" height="20" alt="">
<img src="../../../assets/qrcode.svg" style="vertical-align:middle;" class="hover-pointer" width="20" height="20" alt=""> </Poptip>
</Poptip> </div>
</div> </template>
</template> <template slot-scope="{ row }" slot="price">
<template slot-scope="{ row }" slot="price"> <div>{{ row.goodsSku.price | unitPrice("¥") }}</div>
<div>{{ row.goodsSku.price | unitPrice("¥") }}</div> </template>
</template> <template slot-scope="{ row }" slot="settlementPrice">
<template slot-scope="{ row }" slot="settlementPrice"> <div>{{ row.settlementPrice | unitPrice("¥") }}</div>
<div>{{ row.settlementPrice | unitPrice("¥") }}</div> </template>
</template> <template slot-scope="{ row }" slot="quantity">
<template slot-scope="{ row }" slot="quantity"> <div>{{ row.goodsSku.quantity }}</div>
<div>{{ row.goodsSku.quantity }}</div> </template>
</template> <template slot-scope="{ row }" slot="startTime">
<template slot-scope="{ row }" slot="startTime"> <div>{{ row.startTime }}</div>
<div>{{ row.startTime }}</div> <div>{{ row.endTime }}</div>
<div>{{ row.endTime }}</div> </template>
</template>
<template slot-scope="{ row }" slot="action">
<template slot-scope="{ row }" slot="action"> <Button
<Button v-if="row.promotionStatus == 'NEW'"
v-if="row.promotionStatus == 'NEW'" type="info"
type="info" size="small"
size="small" @click="edit(row.id)"
@click="edit(row.id)" style="margin-right: 5px"
style="margin-right: 5px" >编辑</Button
>编辑</Button >
> <Button
<Button v-if="row.promotionStatus == 'START'"
v-if="row.promotionStatus == 'START'" type="warning"
type="warning" size="small"
size="small" @click="statusChanged(row.id, 'CLOSE')"
@click="statusChanged(row.id, 'CLOSE')" style="margin-right: 5px"
style="margin-right: 5px" >停用</Button
>停用</Button >
> <Button
<Button v-if="row.promotionStatus == 'CLOSE'"
v-if="row.promotionStatus == 'CLOSE'" type="warning"
type="warning" size="small"
size="small" @click="statusChanged(row.id, 'START')"
@click="statusChanged(row.id, 'START')" style="margin-right: 5px"
style="margin-right: 5px" >启用</Button
>启用</Button >
> <Button type="error" size="small" @click="close(row.id)"
<Button type="error" size="small" @click="close(row.id)" >删除</Button
>删除</Button >
> </template>
</template> </Table>
</Table>
</Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
:current="searchForm.pageNumber + 1" :current="searchForm.pageNumber"
:total="total" :total="total"
:page-size="searchForm.pageSize" :page-size="searchForm.pageSize"
@on-change="changePage" @on-change="changePage"
@ -157,7 +155,7 @@ export default {
loading: true, // loading: true, //
searchForm: { searchForm: {
// //
pageNumber: 0, // pageNumber: 1, //
pageSize: 10, // pageSize: 10, //
order: "desc", // order: "desc", //
}, },
@ -248,18 +246,17 @@ export default {
this.$router.push({ name: "add-points-goods" }); this.$router.push({ name: "add-points-goods" });
}, },
changePage(v) { changePage(v) {
this.searchForm.pageNumber = v - 1; 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 = 1;
this.searchForm.pageSize = 10; this.searchForm.pageSize = 10;
if (this.searchForm.pointsS !== "") { if (this.searchForm.pointsS) {
this.searchForm.points = this.searchForm.points =
this.searchForm.pointsS + this.searchForm.pointsS +
"_" + "_" +

View File

@ -148,11 +148,11 @@ export default {
} }
}); });
}, },
addPeriod() { addPeriod() { // input
this.addPeriodTime(); this.addPeriodTime();
this.showAddPeriod = true; this.showAddPeriod = true;
}, },
addPeriodTime() { addPeriodTime() { //
this.showAddPeriod = false; this.showAddPeriod = false;
if ( if (
this.periodTime !== null && this.periodTime !== null &&
@ -161,20 +161,10 @@ export default {
this.form.seckillPeriod.push(this.periodTime); this.form.seckillPeriod.push(this.periodTime);
} }
}, },
removePeriodTime(event, name) { removePeriodTime(event, name) { //
this.form.seckillPeriod = this.form.seckillPeriod.filter((i) => i !== name); this.form.seckillPeriod = this.form.seckillPeriod.filter((i) => i !== name);
}, },
handleSelectLink(item, index) { /** 添加秒杀活动 */
//
if (item) this.selectedNav = item;
this.$refs.liliDialog.open('link')
},
changeScope(val) {
if (val === "PORTION_GOODS") {
this.handleSelectLink();
}
},
/** 保存平台优惠券 */
handleSubmit() { handleSubmit() {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {

View File

@ -53,66 +53,64 @@
<Row class="operation padding-row"> <Row class="operation padding-row">
<Button type="primary" @click="add"></Button> <Button type="primary" @click="add"></Button>
</Row> </Row>
<Row> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="columns"
:columns="columns" :data="data"
:data="data" ref="table"
ref="table" class="page"
class="page" >
> <template slot-scope="{ row }" slot="action">
<template slot-scope="{ row }" slot="action"> <Button
<Button type="info"
type="info" size="small"
size="small" class="mr_5"
class="mr_5" v-if="row.promotionStatus == 'NEW'"
v-if="row.promotionStatus == 'NEW'" @click="edit(row)"
@click="edit(row)" >编辑</Button
>编辑</Button >
> &nbsp;
&nbsp; <Button
<Button type="info"
type="info" size="small"
size="small" class="mr_5"
class="mr_5" v-else
v-else @click="manage(row)"
@click="manage(row)" >查看</Button
>查看</Button >
> &nbsp;
&nbsp; <Button
<Button type="primary"
type="primary" size="small"
size="small" class="mr_5"
class="mr_5" v-if="row.promotionStatus == 'NEW'"
v-if="row.promotionStatus == 'NEW'" @click="manage(row)"
@click="manage(row)" >管理</Button
>管理</Button >
> &nbsp;
&nbsp; <!-- <Button type="success" size="small" class="mr_5" v-if="row.promotionStatus == 'NEW' || row.promotionStatus == 'END'" @click="upper(row)"></Button> -->
<!-- <Button type="success" size="small" class="mr_5" v-if="row.promotionStatus == 'NEW' || row.promotionStatus == 'END'" @click="upper(row)"></Button> --> <Button
<Button type="error"
type="error" size="small"
size="small" v-if="
v-if=" row.promotionStatus == 'START' || row.promotionStatus == 'NEW'
row.promotionStatus == 'START' || row.promotionStatus == 'NEW' "
" class="mr_5"
class="mr_5" @click="off(row)"
@click="off(row)" >下架</Button
>下架</Button >
> &nbsp;
&nbsp; <Button
<Button type="error"
type="error" size="small"
size="small" v-if="row.promotionStatus == 'CLOSE'"
v-if="row.promotionStatus == 'CLOSE'" ghost
ghost @click="expire(row)"
@click="expire(row)" >删除</Button
>删除</Button >
> </template>
</template> </Table>
</Table>
</Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
:current="searchForm.pageNumber + 1" :current="searchForm.pageNumber + 1"

View File

@ -29,10 +29,10 @@
<a class="select-clear" @click="clearSelectAll"></a> <a class="select-clear" @click="clearSelectAll"></a>
</Alert> </Alert>
</Row> </Row>
<Row class="operation">
<Table <Table
:loading="loading" :loading="loading"
border border
class="operation"
:columns="goodsColumns" :columns="goodsColumns"
:data="goodsList" :data="goodsList"
ref="table" ref="table"
@ -106,7 +106,6 @@
> >
</template> </template>
</Table> </Table>
</Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
:current="searchForm.pageNumber + 1" :current="searchForm.pageNumber + 1"

View File

@ -1,58 +1,26 @@
<template> <template>
<div class="search"> <div class="search">
<Row> <Card>
<Col> <Row @keydown.enter.native="handleSearch">
<Card> <Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
<Row @keydown.enter.native="handleSearch"> <Form-item label="账单编号" prop="sn">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> <Input type="text" v-model="searchForm.sn" placeholder="请输入账单编号" clearable style="width: 200px" />
<Form-item label="账单编号" prop="sn"> </Form-item>
<Input type="text" v-model="searchForm.sn" placeholder="请输入账单编号" clearable style="width: 200px" /> <Form-item label="出帐时间" prop="createTime">
</Form-item> <DatePicker v-model="selectDate" type="daterange" format="yyyy-MM-dd HH:mm:ss" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px">
<Form-item label="出帐时间" prop="createTime"> </DatePicker>
<DatePicker v-model="selectDate" type="daterange" format="yyyy-MM-dd HH:mm:ss" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px"> </Form-item>
</DatePicker>
</Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button> <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form> </Form>
</Row> </Row>
<Row> <Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect">
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"> </Table>
</Table> <Row type="flex" justify="end" class="page">
</Row> <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
<Row type="flex" justify="end" class="page"> size="small" show-total show-elevator show-sizer></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]" </Row>
size="small" show-total show-elevator show-sizer></Page> </Card>
</Row>
</Card>
</Col>
</Row>
<Modal :title="modalTitle" v-model="modalVisible" :mask-closable="false" :width="500">
<Form ref="form" :model="form" :label-width="100" :rules="formValidate">
<FormItem label="账单号" prop="sn">
<Input v-model="form.sn" clearable style="width: 100%" />
</FormItem>
<FormItem label="店铺名称" prop="sellerName">
<Input v-model="form.sellerName" clearable style="width: 100%" />
</FormItem>
<FormItem label="结算开始时间" prop="startTime">
<DatePicker v-model="form.startTime" valueType="yyyy-MM-dd HH:mm:ss" clearable style="width: 100%"></DatePicker>
</FormItem>
<FormItem label="结算结束时间" prop="endTime">
<DatePicker type="date" v-model="form.endTime" clearable style="width: 100%"></DatePicker>
</FormItem>
<FormItem label="最终结算金额" prop="billPrice">
<Input v-model="form.billPrice" clearable style="width: 100%" />
</FormItem>
</Form>
<div slot="footer">
<Button type="text" @click="modalVisible = false">取消</Button>
<Button type="primary" :loading="submitLoading" @click="handleSubmit">
</Button>
</div>
</Modal>
</div> </div>
</template> </template>
@ -65,9 +33,6 @@ export default {
data() { data() {
return { return {
loading: true, // loading: true, //
modalType: 0, //
modalVisible: false, //
modalTitle: "", //
searchForm: { searchForm: {
// //
pageNumber: 1, // pageNumber: 1, //
@ -78,17 +43,6 @@ export default {
endDate: "", // endDate: "", //
}, },
selectDate: null, // selectDate: null, //
form: {
//
sn: "",
sellerName: "",
startTime: "",
endTime: "",
billPrice: "",
},
//
formValidate: {},
submitLoading: false, //
selectList: [], // selectList: [], //
selectCount: 0, // selectCount: 0, //
columns: [ columns: [
@ -227,8 +181,6 @@ export default {
getDataList() { getDataList() {
this.loading = true; this.loading = true;
// this.searchForm
this.searchForm.startTime && this.searchForm.startTime &&
(this.searchForm.startTime = this.$options.filters.unixToDate( (this.searchForm.startTime = this.$options.filters.unixToDate(
this.searchForm.startTime / 1000 this.searchForm.startTime / 1000
@ -248,35 +200,6 @@ export default {
this.total = this.data.length; this.total = this.data.length;
this.loading = false; 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("/bill/insertOrUpdate", this.form).then((res) => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
this.modalVisible = false;
}
});
} else {
//
this.postRequest("/bill/insertOrUpdate", this.form).then((res) => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
this.modalVisible = false;
}
});
}
}
});
},
detail(v) { detail(v) {
let id = v.id; let id = v.id;
this.$router.push({ this.$router.push({

View File

@ -48,15 +48,13 @@
<Tabs active-key="key1" @on-click="clickTabs"> <Tabs active-key="key1" @on-click="clickTabs">
<Tab-pane label="入账流水" key="key1"> <Tab-pane label="入账流水" key="key1">
<Card> <Card>
<Row> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="orderColumns"
:columns="orderColumns" :data="order"
:data="order" ref="table"
ref="table" ></Table>
></Table>
</Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
:current="orderParam.pageNumber" :current="orderParam.pageNumber"
@ -73,15 +71,13 @@
</Tab-pane> </Tab-pane>
<Tab-pane label="退款流水" key="key2"> <Tab-pane label="退款流水" key="key2">
<Card> <Card>
<Row> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="refundColumns"
:columns="refundColumns" :data="refund"
:data="refund" ref="table"
ref="table" ></Table>
></Table>
</Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
:current="refundParam.pageNumber" :current="refundParam.pageNumber"

View File

@ -1,69 +1,36 @@
<template> <template>
<div class="search"> <div class="search">
<Row> <Card>
<Col> <Row @keydown.enter.native="handleSearch">
<Card> <Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
<Row @keydown.enter.native="handleSearch"> <Form-item label="账单编号" prop="sn">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> <Input type="text" v-model="searchForm.sn" placeholder="请输入账单编号" clearable style="width: 200px" />
<Form-item label="账单编号" prop="sn"> </Form-item>
<Input type="text" v-model="searchForm.sn" placeholder="请输入账单编号" clearable style="width: 200px" /> <Form-item label="出帐时间" prop="createTime">
</Form-item> <DatePicker v-model="selectDate" type="daterange" format="yyyy-MM-dd HH:mm:ss" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px">
<Form-item label="出帐时间" prop="createTime"> </DatePicker>
<DatePicker v-model="selectDate" type="daterange" format="yyyy-MM-dd HH:mm:ss" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px"> </Form-item>
</DatePicker> <Form-item label="筛选状态">
</Form-item> <Select v-model="searchForm.billStatus" style="width:160px">
<Form-item label="筛选状态"> <Option value="">全部</Option>
<Select v-model="searchForm.billStatus" style="width:160px"> <Option value="OUT">已出账</Option>
<Option value="">全部</Option> <Option value="CHECK">已核对</Option>
<Option value="OUT">已出账</Option> <Option value="COMPLETE">已完成</Option>
<Option value="CHECK">已核对</Option> </Select>
<Option value="COMPLETE">已完成</Option> </Form-item>
</Select> <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form-item> </Form>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button> </Row>
</Form> <Row class="operation padding-row">
</Row> <Button @click="delAll"></Button>
<Row class="operation padding-row"> </Row>
<Button @click="add" type="primary">添加</Button> <Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-selection-change="changeSelect">
<Button @click="delAll"></Button> </Table>
</Row> <Row type="flex" justify="end" class="page">
<Row> <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"> size="small" show-total show-elevator show-sizer></Page>
</Table> </Row>
</Row> </Card>
<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>
</Col>
</Row>
<Modal :title="modalTitle" v-model="modalVisible" :mask-closable="false" :width="500">
<Form ref="form" :model="form" :label-width="100" :rules="formValidate">
<FormItem label="账单号" prop="sn">
<Input v-model="form.sn" clearable style="width: 100%" />
</FormItem>
<FormItem label="店铺名称" prop="sellerName">
<Input v-model="form.sellerName" clearable style="width: 100%" />
</FormItem>
<FormItem label="结算开始时间" prop="startTime">
<DatePicker v-model="form.startTime" valueType="yyyy-MM-dd HH:mm:ss" clearable style="width: 100%"></DatePicker>
</FormItem>
<FormItem label="结算结束时间" prop="endTime">
<DatePicker type="date" v-model="form.endTime" clearable style="width: 100%"></DatePicker>
</FormItem>
<FormItem label="最终结算金额" prop="billPrice">
<Input v-model="form.billPrice" clearable style="width: 100%" />
</FormItem>
</Form>
<div slot="footer">
<Button type="text" @click="modalVisible = false">取消</Button>
<Button type="primary" :loading="submitLoading" @click="handleSubmit">
</Button>
</div>
</Modal>
</div> </div>
</template> </template>
@ -76,9 +43,6 @@ export default {
data() { data() {
return { return {
loading: true, // loading: true, //
modalType: 0, //
modalVisible: false, //
modalTitle: "", //
searchForm: { searchForm: {
// //
pageNumber: 1, // pageNumber: 1, //
@ -90,17 +54,6 @@ export default {
billStatus:"" // billStatus:"" //
}, },
selectDate: null, // selectDate: null, //
form: {
//
sn: "",
sellerName: "",
startTime: "",
endTime: "",
billPrice: "",
},
//
formValidate: {},
submitLoading: false, //
selectList: [], // selectList: [], //
selectCount: 0, // selectCount: 0, //
columns: [ columns: [
@ -201,28 +154,20 @@ export default {
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();
}, },
changeSort(e) { changeSelect(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.selectList = e;
this.selectCount = e.length; this.selectCount = e.length;
}, },
@ -235,8 +180,6 @@ export default {
getDataList() { getDataList() {
this.loading = true; this.loading = true;
// this.searchForm
this.searchForm.startTime && this.searchForm.startTime &&
(this.searchForm.startTime = this.$options.filters.unixToDate( (this.searchForm.startTime = this.$options.filters.unixToDate(
this.searchForm.startTime / 1000 this.searchForm.startTime / 1000
@ -256,43 +199,7 @@ export default {
this.total = this.data.length; this.total = this.data.length;
this.loading = false; this.loading = false;
}, },
handleSubmit() { detail(v) { //
this.$refs.form.validate((valid) => {
if (valid) {
this.submitLoading = true;
if (this.modalType === 0) {
// id
delete this.form.id;
this.postRequest("/bill/insertOrUpdate", this.form).then((res) => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
this.modalVisible = false;
}
});
} else {
//
this.postRequest("/bill/insertOrUpdate", this.form).then((res) => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
this.modalVisible = false;
}
});
}
}
});
},
add() {
this.modalType = 0;
this.modalTitle = "添加";
this.$refs.form.resetFields();
delete this.form.id;
this.modalVisible = true;
},
detail(v) {
let id = v.id; let id = v.id;
this.$router.push({ this.$router.push({
name: "bill-detail", name: "bill-detail",
@ -314,14 +221,10 @@ export default {
this.getDataList(); this.getDataList();
} }
}); });
//
//this.$Message.success("");
//this.$Modal.remove();
//this.getDataList();
}, },
}); });
}, },
delAll() { delAll() { //
if (this.selectCount <= 0) { if (this.selectCount <= 0) {
this.$Message.warning("您还未选择要删除的数据"); this.$Message.warning("您还未选择要删除的数据");
return; return;

View File

@ -1,44 +1,38 @@
<template> <template>
<div class="search"> <div class="search">
<Row> <Card>
<Col> <Row @keydown.enter.native="handleSearch">
<Card> <Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
<Row @keydown.enter.native="handleSearch"> <Form-item label="会员名称" prop="memberName">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> <Input
<Form-item label="会员名称" prop="memberName"> type="text"
<Input v-model="searchForm.memberName"
type="text" placeholder="请输入会员名称"
v-model="searchForm.memberName" clearable
placeholder="请输入会员名称" style="width: 200px"
clearable />
style="width: 200px" </Form-item>
/> <Form-item label="店铺名称" prop="storeName">
</Form-item> <Input
<Form-item label="店铺名称" prop="storeName"> type="text"
<Input v-model="searchForm.storeName"
type="text" placeholder="请输入店铺名称"
v-model="searchForm.storeName" clearable
placeholder="请输入店铺名称" style="width: 200px"
clearable />
style="width: 200px" </Form-item>
/> <Form-item label="创建时间" prop="createTime">
</Form-item> <DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd HH:mm:ss" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px"></DatePicker>
<Form-item label="创建时间" prop="createTime"> </Form-item>
<DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd HH:mm:ss" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px"></DatePicker> <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form-item> </Form>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button> </Row>
</Form> <Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
</Row> <Row type="flex" justify="end" class="page">
<Row class="padding-row"> <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table> size="small" show-total show-elevator show-sizer></Page>
</Row> </Row>
<Row type="flex" justify="end" class="page"> </Card>
<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>
</Col>
</Row>
</div> </div>
</template> </template>

View File

@ -246,22 +246,20 @@
</Form> </Form>
</Row> </Row>
<div style="min-height: 180px"> <div style="min-height: 180px">
<Row class="padding-row"> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="orderColumns"
:columns="orderColumns" :data="orderData"
:data="orderData" ref="table"
ref="table" sortable="custom"
sortable="custom" @on-sort-change="orderChangeSort"
@on-sort-change="orderChangeSort" >
> <!-- 订单详情格式化 -->
<!-- 订单详情格式化 --> <template slot="orderSlot" slot-scope="scope">
<template slot="orderSlot" slot-scope="scope"> <a @click="$router.push({name: 'order-detail',query: {sn: scope.row.sn}})">{{scope.row.sn}}</a>
<a @click="$router.push({name: 'order-detail',query: {sn: scope.row.sn}})">{{scope.row.sn}}</a> </template>
</template> </Table>
</Table>
</Row>
<Row type="flex" justify="end" class="page" style="margin-top: 10px"> <Row type="flex" justify="end" class="page" style="margin-top: 10px">
<Page <Page
@ -349,44 +347,42 @@
</Form> </Form>
</Row> </Row>
<div style="min-height: 180px"> <div style="min-height: 180px">
<Row class="padding-row"> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="refundGoodsOrderColumns"
:columns="refundGoodsOrderColumns" :data="refundGoodsOrderData"
:data="refundGoodsOrderData" ref="table"
ref="table" sortable="custom"
sortable="custom" @on-sort-change="refundGoodsOrderChangeSort"
@on-sort-change="refundGoodsOrderChangeSort" >
> <!-- 商品栏目格式化 -->
<!-- 商品栏目格式化 --> <template slot="goodsSlot" slot-scope="scope">
<template slot="goodsSlot" slot-scope="scope"> <div style="margin-top: 5px;height: 80px; display: flex;">
<div style="margin-top: 5px;height: 80px; display: flex;"> <div style="">
<div style=""> <img :src="scope.row.goodsImage" style="height: 60px;margin-top: 3px">
<img :src="scope.row.goodsImage" style="height: 60px;margin-top: 3px">
</div>
<div style="margin-left: 13px;margin-top: 3px;">
<div class="div-zoom">
<a>{{scope.row.goodsName}}</a>
</div>
</div>
</div> </div>
</template> <div style="margin-left: 13px;margin-top: 3px;">
<div class="div-zoom">
<a>{{scope.row.goodsName}}</a>
</div>
</div>
</div>
<!-- 订单详情格式化 --> </template>
<template slot="orderSlot" slot-scope="scope">
<a
@click="$router.push({name: 'order-detail',query: {sn: scope.row.orderSn}})">{{scope.row.orderSn}}</a>
</template>
<!-- 售后单详情格式化 --> <!-- 订单详情格式化 -->
<template slot="refundGoodsOrderSlot" slot-scope="scope"> <template slot="orderSlot" slot-scope="scope">
<a @click="$router.push({name: 'after-order-detail',query: {sn: scope.row.sn}})">{{scope.row.sn}}</a> <a
</template> @click="$router.push({name: 'order-detail',query: {sn: scope.row.orderSn}})">{{scope.row.orderSn}}</a>
</Table> </template>
</Row>
<!-- 售后单详情格式化 -->
<template slot="refundGoodsOrderSlot" slot-scope="scope">
<a @click="$router.push({name: 'after-order-detail',query: {sn: scope.row.sn}})">{{scope.row.sn}}</a>
</template>
</Table>
<Row type="flex" justify="end" class="page" style="margin-top: 10px"> <Row type="flex" justify="end" class="page" style="margin-top: 10px">
<Page <Page
@ -474,44 +470,42 @@
</Form> </Form>
</Row> </Row>
<div style="min-height: 180px"> <div style="min-height: 180px">
<Row class="padding-row"> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="refundGoodsOrderColumns"
:columns="refundGoodsOrderColumns" :data="refundOrderData"
:data="refundOrderData" ref="table"
ref="table" sortable="custom"
sortable="custom" @on-sort-change="refundOrderChangeSort"
@on-sort-change="refundOrderChangeSort" >
> <!-- 商品栏目格式化 -->
<!-- 商品栏目格式化 --> <template slot="goodsSlot" slot-scope="scope">
<template slot="goodsSlot" slot-scope="scope"> <div style="margin-top: 5px;height: 80px; display: flex;">
<div style="margin-top: 5px;height: 80px; display: flex;"> <div style="">
<div style=""> <img :src="scope.row.goodsImage" style="height: 60px;margin-top: 3px">
<img :src="scope.row.goodsImage" style="height: 60px;margin-top: 3px">
</div>
<div style="margin-left: 13px;margin-top: 3px;">
<div class="div-zoom">
<a>{{scope.row.goodsName}}</a>
</div>
</div>
</div> </div>
</template> <div style="margin-left: 13px;margin-top: 3px;">
<div class="div-zoom">
<a>{{scope.row.goodsName}}</a>
</div>
</div>
</div>
<!-- 订单详情格式化 --> </template>
<template slot="orderSlot" slot-scope="scope">
<a
@click="$router.push({name: 'order-detail',query: {sn: scope.row.orderSn}})">{{scope.row.orderSn}}</a>
</template>
<!-- 售后单详情格式化 --> <!-- 订单详情格式化 -->
<template slot="refundGoodsOrderSlot" slot-scope="scope"> <template slot="orderSlot" slot-scope="scope">
<a @click="$router.push({name: 'after-order-detail',query: {sn: scope.row.sn}})">{{scope.row.sn}}</a> <a
</template> @click="$router.push({name: 'order-detail',query: {sn: scope.row.orderSn}})">{{scope.row.orderSn}}</a>
</Table> </template>
</Row>
<!-- 售后单详情格式化 -->
<template slot="refundGoodsOrderSlot" slot-scope="scope">
<a @click="$router.push({name: 'after-order-detail',query: {sn: scope.row.sn}})">{{scope.row.sn}}</a>
</template>
</Table>
<Row type="flex" justify="end" class="page" style="margin-top: 10px"> <Row type="flex" justify="end" class="page" style="margin-top: 10px">
<Page <Page

View File

@ -1,56 +1,50 @@
<template> <template>
<div class="search"> <div class="search">
<Row> <Card>
<Col> <Row @keydown.enter.native="handleSearch">
<Card> <Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
<Row @keydown.enter.native="handleSearch"> <Form-item label="会员名称" prop="memberName">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> <Input
<Form-item label="会员名称" prop="memberName"> type="text"
<Input v-model="searchForm.memberName"
type="text" placeholder="请输入会员名称"
v-model="searchForm.memberName" clearable
placeholder="请输入会员名称" style="width: 200px"
clearable />
style="width: 200px" </Form-item>
/> <Form-item label="店铺名称" prop="storeName">
</Form-item> <Input
<Form-item label="店铺名称" prop="storeName"> type="text"
<Input v-model="searchForm.storeName"
type="text" placeholder="请输入店铺名称"
v-model="searchForm.storeName" clearable
placeholder="请输入店铺名称" style="width: 200px"
clearable />
style="width: 200px" </Form-item>
/> <Form-item label="店铺状态" prop="shopDisable">
</Form-item> <Select v-model="searchForm.shopDisable" clearable style="width: 200px">
<Form-item label="店铺状态" prop="shopDisable"> <Option value="OPEN">开启中</Option>
<Select v-model="searchForm.shopDisable" clearable style="width: 200px"> <Option value="CLOSED">已关闭</Option>
<Option value="OPEN">开启中</Option> <Option value="APPLY">申请中</Option>
<Option value="CLOSED">已关闭</Option> <Option value="APPLYING">审核中</Option>
<Option value="APPLY">申请中</Option> <Option value="REFUSED">审核拒绝</Option>
<Option value="APPLYING">审核中</Option> </Select>
<Option value="REFUSED">审核拒绝</Option> </Form-item>
</Select> <Form-item label="创建时间" prop="createTime">
</Form-item> <DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd HH:mm:ss" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px"></DatePicker>
<Form-item label="创建时间" prop="createTime"> </Form-item>
<DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd HH:mm:ss" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px"></DatePicker> <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form-item> </Form>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button> </Row>
</Form> <Row class="operation padding-row">
</Row> <Button @click="add" type="primary">添加</Button>
<Row class="operation padding-row"> </Row>
<Button @click="add" type="primary">添加</Button> <Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
</Row> <Row type="flex" justify="end" class="page">
<Row> <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table> size="small" show-total show-elevator show-sizer></Page>
</Row> </Row>
<Row type="flex" justify="end" class="page"> </Card>
<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>
</Col>
</Row>
</div> </div>
</template> </template>

View File

@ -65,9 +65,17 @@
<FormItem label="详细地址" prop="salesConsigneeDetail"> <FormItem label="详细地址" prop="salesConsigneeDetail">
<Input v-model="shopForm.salesConsigneeDetail" clearable style="width: 350px" /> <Input v-model="shopForm.salesConsigneeDetail" clearable style="width: 350px" />
</FormItem> </FormItem>
<!-- <Divider orientation="left">腾讯云智服</Divider>
<FormItem label="唯一标识" prop="salesConsigneeDetail">
<Input v-model="shopForm.yzfSign" clearable style="width: 350px" />
</FormItem>
<FormItem label="小程序唯一标识" prop="salesConsigneeDetail">
<Input v-model="shopForm.yzfMpSign" clearable style="width: 350px" />
</FormItem> -->
<Spin fix v-if="loading"></Spin> <Spin fix v-if="loading"></Spin>
</div> </div>
</TabPane> </TabPane>
<!-- 入驻信息 -->
<TabPane label="入驻信息" class="tab" name="sms"> <TabPane label="入驻信息" class="tab" name="sms">
<!-- 遮罩层 --> <!-- 遮罩层 -->
<div v-if="isRead" class="mask"></div> <div v-if="isRead" class="mask"></div>

View File

@ -1,41 +1,35 @@
<template> <template>
<div class="search"> <div class="search">
<Row> <Card>
<Col> <Row class="operation">
<Card> <Button @click="add" type="primary">添加</Button>
<Row class="operation"> <Button @click="delAll"></Button>
<Button @click="add" type="primary">添加</Button> </Row>
<Button @click="delAll"></Button> <Table
</Row> :loading="loading"
<Row> border
<Table :columns="columns"
:loading="loading" :data="data"
border ref="table"
:columns="columns" sortable="custom"
:data="data" @on-sort-change="changeSort"
ref="table" @on-selection-change="changeSelect"
sortable="custom" ></Table>
@on-sort-change="changeSort" <Row type="flex" justify="end" class="page">
@on-selection-change="changeSelect" <Page
></Table> :current="searchForm.pageNumber"
</Row> :total="total"
<Row type="flex" justify="end" class="page"> :page-size="searchForm.pageSize"
<Page @on-change="changePage"
:current="searchForm.pageNumber" @on-page-size-change="changePageSize"
:total="total" :page-size-opts="[10, 20, 50]"
:page-size="searchForm.pageSize" size="small"
@on-change="changePage" show-total
@on-page-size-change="changePageSize" show-elevator
:page-size-opts="[10, 20, 50]" show-sizer
size="small" ></Page>
show-total </Row>
show-elevator </Card>
show-sizer
></Page>
</Row>
</Card>
</Col>
</Row>
<Modal <Modal
:title="modalTitle" :title="modalTitle"
v-model="modalVisible" v-model="modalVisible"

View File

@ -305,7 +305,7 @@ export default {
}, },
{ {
title: "商家名称", title: "商家名称",
key: "sellerName", key: "storeName",
}, },
{ {
title: "售后单类型", title: "售后单类型",

View File

@ -38,7 +38,7 @@
</div> </div>
<div class="label-item"> <div class="label-item">
<span>店铺名称</span> <span>店铺名称</span>
<span>{{res.sellerName}}</span> <span>{{res.storeName}}</span>
</div> </div>
<div class="label-item"> <div class="label-item">
<span>创建时间</span> <span>创建时间</span>

View File

@ -55,7 +55,6 @@
</i-switch> </i-switch>
</Alert> </Alert>
</Row> </Row>
<Row>
<Table <Table
v-if="showDev" v-if="showDev"
@ -78,8 +77,6 @@
> >
</Table> </Table>
</Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
:current="searchForm.pageNumber" :current="searchForm.pageNumber"

View File

@ -35,18 +35,16 @@
<Row class="operation" style="margin-top: 20px"> <Row class="operation" style="margin-top: 20px">
<Button @click="sendMessage" type="primary">发送消息</Button> <Button @click="sendMessage" type="primary">发送消息</Button>
</Row> </Row>
<Row> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="messageColumns"
:columns="messageColumns" :data="messageData"
:data="messageData" ref="table"
ref="table" sortable="custom"
sortable="custom" @on-sort-change="messageChangeSort"
@on-sort-change="messageChangeSort" @on-selection-change="messageChangeSelect"
@on-selection-change="messageChangeSelect" ></Table>
></Table>
</Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
:current="searchMessageForm.pageNumber" :current="searchMessageForm.pageNumber"
@ -64,18 +62,16 @@
</TabPane> </TabPane>
<TabPane label="通知类站内信" name="SETTING"> <TabPane label="通知类站内信" name="SETTING">
<Row> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="noticeColumns"
:columns="noticeColumns" :data="noticeData"
:data="noticeData" ref="table"
ref="table" sortable="custom"
sortable="custom" @on-sort-change="changeSort"
@on-sort-change="changeSort" @on-selection-change="changeSelect"
@on-selection-change="changeSelect" ></Table>
></Table>
</Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
:current="searchForm.pageNumber" :current="searchForm.pageNumber"
@ -206,18 +202,16 @@
</RadioGroup> </RadioGroup>
</FormItem> </FormItem>
<FormItem label="指定商家"> <FormItem label="指定商家">
<Row> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="messageDetailColumns"
:columns="messageDetailColumns" :data="shopMessageData"
:data="shopMessageData" ref="table"
ref="table" sortable="custom"
sortable="custom" @on-sort-change="messageChangeSort"
@on-sort-change="messageChangeSort" @on-selection-change="messageChangeSelect"
@on-selection-change="messageChangeSelect" ></Table>
></Table>
</Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
:current="searchShopMessageForm.pageNumber" :current="searchShopMessageForm.pageNumber"

View File

@ -1,17 +1,13 @@
<template> <template>
<div class="search"> <div class="search">
<Row>
<Col>
<Card> <Card>
<Tabs value="LIST" @on-click="paneChange"> <Tabs value="LIST" @on-click="paneChange">
<TabPane label="发送任务列表" name="LIST"> <TabPane label="发送任务列表" name="LIST">
<Row class="operation" style="margin-bottom: 10px"> <Row class="operation" style="margin-bottom: 10px">
<Button @click="sendBatchSmsModal" type="primary">发送短信</Button> <Button @click="sendBatchSmsModal" type="primary">发送短信</Button>
</Row> </Row>
<Row> <Table :loading="loading" border :columns="smsColumns" :data="smsData" ref="table" sortable="custom" @on-sort-change="templateChangeSort">
<Table :loading="loading" border :columns="smsColumns" :data="smsData" ref="table" sortable="custom" @on-sort-change="templateChangeSort"> </Table>
</Table>
</Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page :current="smsSearchForm.pageNumber" :total="smsTotal" :page-size="smsSearchForm.pageSize" @on-change="smsChangePage" @on-page-size-change="smsChangePageSize" <Page :current="smsSearchForm.pageNumber" :total="smsTotal" :page-size="smsSearchForm.pageSize" @on-change="smsChangePage" @on-page-size-change="smsChangePageSize"
@ -23,10 +19,8 @@
<Button @click="addTemplate" type="primary">添加短信模板</Button> <Button @click="addTemplate" type="primary">添加短信模板</Button>
<Button @click="syncTemplate" type="info">同步</Button> <Button @click="syncTemplate" type="info">同步</Button>
</Row> </Row>
<Row> <Table :loading="loading" border :columns="templateColumns" :data="templateData" ref="table" sortable="custom" @on-sort-change="smsChangeSort">
<Table :loading="loading" border :columns="templateColumns" :data="templateData" ref="table" sortable="custom" @on-sort-change="smsChangeSort"> </Table>
</Table>
</Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page :current="templateSearchForm.pageNumber" :total="templateTotal" :page-size="templateSearchForm.pageSize" @on-change="templateChangePage" <Page :current="templateSearchForm.pageNumber" :total="templateTotal" :page-size="templateSearchForm.pageSize" @on-change="templateChangePage"
@on-page-size-change="templateChangePageSize" :page-size-opts="[10, 20, 50]" size="small" show-total show-elevator show-sizer></Page> @on-page-size-change="templateChangePageSize" :page-size-opts="[10, 20, 50]" size="small" show-total show-elevator show-sizer></Page>
@ -37,36 +31,30 @@
<Button @click="addSign" type="primary">添加短信签名</Button> <Button @click="addSign" type="primary">添加短信签名</Button>
<Button @click="syncSign" type="info">同步</Button> <Button @click="syncSign" type="info">同步</Button>
</Row> </Row>
<Row> <Table :loading="loading" border :columns="signColumns" :data="signData" ref="table" sortable="custom" @on-sort-change="signChangeSort">
<Table :loading="loading" border :columns="signColumns" :data="signData" ref="table" sortable="custom" @on-sort-change="signChangeSort"> <template slot="signStatus" slot-scope="scope">
<template slot="signStatus" slot-scope="scope"> <div v-if="scope.row.signStatus ==2 ">
<div v-if="scope.row.signStatus ==2 "> 审核拒绝
审核拒绝 <Poptip trigger="hover" :content=scope.row.reason placement="top-start" transfer>
<Poptip trigger="hover" :content=scope.row.reason placement="top-start" transfer> <span style="color: #ed3f14">原因</span>
<span style="color: #ed3f14">原因</span> </Poptip>
</Poptip> </div>
</div> <div v-if="scope.row.signStatus ==0 ">
<div v-if="scope.row.signStatus ==0 "> 审核中
审核中 </div>
</div> <div v-if="scope.row.signStatus ==1 ">
<div v-if="scope.row.signStatus ==1 "> 审核通过
审核通过 </div>
</div>
</template> </template>
</Table> </Table>
</Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page :current="signSearchForm.pageNumber" :total="signTotal" :page-size="signSearchForm.pageSize" @on-change="signChangePage" @on-page-size-change="signChangePageSize" <Page :current="signSearchForm.pageNumber" :total="signTotal" :page-size="signSearchForm.pageSize" @on-change="signChangePage" @on-page-size-change="signChangePageSize"
:page-size-opts="[10, 20, 50]" size="small" show-total show-elevator show-sizer></Page> :page-size-opts="[10, 20, 50]" size="small" show-total show-elevator show-sizer></Page>
</Row> </Row>
</TabPane> </TabPane>
</Tabs> </Tabs>
</Card> </Card>
</Col>
</Row>
<Modal :title="templateModalTitle" v-model="templateModalVisible" :mask-closable="false" :width="500"> <Modal :title="templateModalTitle" v-model="templateModalVisible" :mask-closable="false" :width="500">
<Form ref="templateForm" :model="templateForm" :label-width="100" :rules="templateFormValidate"> <Form ref="templateForm" :model="templateForm" :label-width="100" :rules="templateFormValidate">
<FormItem label="模板名称" prop="templateName"> <FormItem label="模板名称" prop="templateName">

View File

@ -103,18 +103,16 @@
> >
</Alert> </Alert>
</Row> </Row>
<Row> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="columns"
:columns="columns" :data="data"
:data="data" ref="table"
ref="table" sortable="custom"
sortable="custom" @on-sort-change="changeSort"
@on-sort-change="changeSort" @on-selection-change="changeSelect"
@on-selection-change="changeSelect" ></Table>
></Table>
</Row>
</div> </div>
<div v-show="showType == 'thumb'"> <div v-show="showType == 'thumb'">
<div class="oss-wrapper"> <div class="oss-wrapper">

View File

@ -9,18 +9,16 @@
<Button @click="addRole" type="primary">添加角色</Button> <Button @click="addRole" type="primary">添加角色</Button>
<Button @click="delAll"></Button> <Button @click="delAll"></Button>
</Row> </Row>
<Row> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="columns"
:columns="columns" :data="data"
:data="data" ref="table"
ref="table" sortable="custom"
sortable="custom" @on-sort-change="changeSort"
@on-sort-change="changeSort" @on-selection-change="changeSelect"
@on-selection-change="changeSelect" ></Table>
></Table>
</Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
:current="pageNumber" :current="pageNumber"

View File

@ -1,100 +1,88 @@
<template> <template>
<div class="search"> <div class="search">
<Row> <Card>
<Col> <Tabs value="RESOURCE" @on-click="handleClickType">
<Card> <TabPane label="图片源" name="RESOURCE">
<Tabs value="RESOURCE" @on-click="handleClickType"> <Row class="operation" style="margin-bottom: 10px">
<TabPane label="图片源" name="RESOURCE"> <Button @click="add" type="primary">添加</Button>
<Row> </Row>
<Col> <Table
<Row class="operation" style="margin-bottom: 10px"> :loading="loading"
<Button @click="add" type="primary">添加</Button> border
</Row> :columns="columns"
<Row> :data="data"
<Table ref="table"
:loading="loading" sortable="custom"
border @on-sort-change="changeSort"
:columns="columns" @on-selection-change="changeSelect"
:data="data" >
ref="table" <!-- 商品栏目格式化 -->
sortable="custom" <template slot="imageSlot" slot-scope="scope">
@on-sort-change="changeSort" <div style="">
@on-selection-change="changeSelect" <img
> :src="scope.row.resource"
style="height: 60px; margin-top: 1px; width: 90px"
<!-- 商品栏目格式化 --> />
<template slot="imageSlot" slot-scope="scope"> </div>
<div style=""> </template>
<img :src="scope.row.resource" style="height: 60px;margin-top: 1px;width: 90px"> </Table>
</div> <Row type="flex" justify="end" class="page">
</template> <Page
:current="searchForm.pageNumber"
</Table> :total="total"
</Row> :page-size="searchForm.pageSize"
<Row type="flex" justify="end" class="page"> @on-change="changePage"
<Page @on-page-size-change="changePageSize"
:current="searchForm.pageNumber" :page-size-opts="[10, 20, 50]"
:total="total" size="small"
:page-size="searchForm.pageSize" show-total
@on-change="changePage" show-elevator
@on-page-size-change="changePageSize" show-sizer
:page-size-opts="[10, 20, 50]" >
size="small" </Page>
show-total </Row>
show-elevator </TabPane>
show-sizer <TabPane label="滑块源" name="SLIDER">
> <Row class="operation" style="margin-bottom: 10px">
</Page> <Button @click="add" type="primary" icon="md-add">添加</Button>
</Row> </Row>
</Col> <Table
</Row> :loading="loading"
</TabPane> border
<TabPane label="滑块源" name="SLIDER"> :columns="columns"
<Row> :data="data"
<Col> ref="table"
<Row class="operation" style="margin-bottom: 10px"> sortable="custom"
<Button @click="add" type="primary" icon="md-add">添加</Button> @on-sort-change="changeSort"
</Row> @on-selection-change="changeSelect"
<Row> >
<Table <!-- 商品栏目格式化 -->
:loading="loading" <template slot="imageSlot" slot-scope="scope">
border <div style="">
:columns="columns" <img
:data="data" :src="scope.row.resource"
ref="table" style="height: 60px; margin-top: 1px; width: 60px"
sortable="custom" />
@on-sort-change="changeSort" </div>
@on-selection-change="changeSelect" </template>
> </Table>
<!-- 商品栏目格式化 --> <Row type="flex" justify="end" class="page">
<template slot="imageSlot" slot-scope="scope"> <Page
<div style=""> :current="searchForm.pageNumber"
<img :src="scope.row.resource" style="height: 60px;margin-top: 1px;width: 60px"> :total="total"
</div> :page-size="searchForm.pageSize"
</template> @on-change="changePage"
</Table> @on-page-size-change="changePageSize"
</Row> :page-size-opts="[10, 20, 50]"
<Row type="flex" justify="end" class="page"> size="small"
<Page show-total
:current="searchForm.pageNumber" show-elevator
:total="total" show-sizer
:page-size="searchForm.pageSize" ></Page>
@on-change="changePage" </Row>
@on-page-size-change="changePageSize" </TabPane>
:page-size-opts="[10, 20, 50]" </Tabs>
size="small" </Card>
show-total
show-elevator
show-sizer
></Page>
</Row>
</Col>
</Row>
</TabPane>
</Tabs>
</Card>
</Col>
</Row>
<Modal <Modal
:title="modalTitle" :title="modalTitle"
v-model="modalVisible" v-model="modalVisible"
@ -103,10 +91,15 @@
> >
<Form ref="form" :model="form" :label-width="100" :rules="formValidate"> <Form ref="form" :model="form" :label-width="100" :rules="formValidate">
<FormItem label="名称" prop="name"> <FormItem label="名称" prop="name">
<Input v-model="form.name" maxlength="20" clearable style="width: 100%"/> <Input
v-model="form.name"
maxlength="20"
clearable
style="width: 100%"
/>
</FormItem> </FormItem>
<FormItem label="图片" prop="resource"> <FormItem label="图片" prop="resource">
<Input v-model="form.resource" clearable style="width: 100%"/> <Input v-model="form.resource" clearable style="width: 100%" />
</FormItem> </FormItem>
<FormItem label="类型" prop="type"> <FormItem label="类型" prop="type">
<radio-group v-model="form.type" type="button"> <radio-group v-model="form.type" type="button">
@ -118,9 +111,8 @@
<div slot="footer"> <div slot="footer">
<Button type="text" @click="modalVisible = false">取消</Button> <Button type="text" @click="modalVisible = false">取消</Button>
<Button type="primary" :loading="submitLoading" @click="handleSubmit" <Button type="primary" :loading="submitLoading" @click="handleSubmit"
>提交 >提交
</Button </Button>
>
</div> </div>
</Modal> </Modal>
</div> </div>
@ -131,7 +123,7 @@ import * as API_Setting from "@/api/setting";
export default { export default {
data() { data() {
return { return {
modalVisible: false,// modalVisible: false, //
modalTitle: "", // modalTitle: "", //
loading: true, // loading: true, //
selectList: [], // selectList: [], //
@ -142,7 +134,7 @@ export default {
name: "", name: "",
resource: "", resource: "",
type: "RESOURCE", type: "RESOURCE",
},// }, //
formValidate: { formValidate: {
name: [ name: [
{ {
@ -165,18 +157,19 @@ export default {
pageSize: 10, // pageSize: 10, //
sort: "createTime", // sort: "createTime", //
order: "desc", // order: "desc", //
type: "RESOURCE" type: "RESOURCE",
}, },
columns: [ columns: [
{ {
title: "名称", title: "名称",
key: "name", key: "name",
minWidth: 80, minWidth: 80,
},{ },
{
title: "图片", title: "图片",
key: "resource", key: "resource",
width: 150, width: 150,
slot: "imageSlot" slot: "imageSlot",
}, },
{ {
title: "创建人", title: "创建人",
@ -213,13 +206,13 @@ export default {
size: "small", size: "small",
}, },
style: { style: {
marginRight: "5px" marginRight: "5px",
}, },
on: { on: {
click: () => { click: () => {
this.edit(params.row); this.edit(params.row);
} },
} },
}, },
"编辑" "编辑"
), ),
@ -233,17 +226,17 @@ export default {
on: { on: {
click: () => { click: () => {
this.remove(params.row); this.remove(params.row);
} },
} },
}, },
"删除" "删除"
) ),
]); ]);
}, },
}, },
], ],
data: [], // data: [], //
total: 0,// total: 0, //
}; };
}, },
@ -264,15 +257,15 @@ export default {
}, },
//tab //tab
handleClickType(v) { handleClickType(v) {
this.searchForm.pageNumber = 1 // this.searchForm.pageNumber = 1; //
this.searchForm.pageSize = 10 // this.searchForm.pageSize = 10; //
// //
if (v == "RESOURCE") { if (v == "RESOURCE") {
this.searchForm.type = "RESOURCE" this.searchForm.type = "RESOURCE";
} }
// //
if (v == "SLIDER") { if (v == "SLIDER") {
this.searchForm.type = "SLIDER" this.searchForm.type = "SLIDER";
} }
this.getDataList(); this.getDataList();
}, },
@ -283,7 +276,7 @@ export default {
this.loading = false; this.loading = false;
if (res.success) { if (res.success) {
this.data = res.result.records; this.data = res.result.records;
this.total = res.result.total this.total = res.result.total;
} }
}); });
this.loading = false; this.loading = false;
@ -294,25 +287,25 @@ export default {
}, },
// //
add() { add() {
this.form.type = this.searchForm.type this.form.type = this.searchForm.type;
this.modalVisible = true this.modalVisible = true;
this.modalType = 0 this.modalType = 0;
this.modalTitle = "添加验证码源" this.modalTitle = "添加验证码源";
}, },
// //
edit(v) { edit(v) {
this.form.name = v.name this.form.name = v.name;
this.form.id = v.id this.form.id = v.id;
this.form.resource = v.resource this.form.resource = v.resource;
this.form.type = v.type this.form.type = v.type;
this.modalType = 1 this.modalType = 1;
this.modalVisible = true this.modalVisible = true;
this.modalTitle = "修改验证码源" this.modalTitle = "修改验证码源";
}, },
// //
handleSubmit() { handleSubmit() {
this.form.type = this.searchForm.type this.form.type = this.searchForm.type;
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
this.submitLoading = true; this.submitLoading = true;
@ -329,14 +322,16 @@ export default {
}); });
} else { } else {
// //
API_Setting.editVerification(this.form.id, this.form).then((res) => { API_Setting.editVerification(this.form.id, this.form).then(
this.submitLoading = false; (res) => {
if (res.success) { this.submitLoading = false;
this.$Message.success("修改成功"); if (res.success) {
this.getDataList(); this.$Message.success("修改成功");
this.modalVisible = false; this.getDataList();
this.modalVisible = false;
}
} }
}); );
} }
} }
}); });
@ -359,8 +354,7 @@ export default {
}); });
}, },
}); });
} },
}, },
mounted() { mounted() {
this.getDataList(); this.getDataList();

View File

@ -43,18 +43,16 @@
<Button @click="delAll"></Button> <Button @click="delAll"></Button>
<Button @click="resetPass"></Button> <Button @click="resetPass"></Button>
</Row> </Row>
<Row> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="columns"
:columns="columns" :data="data"
:data="data" sortable="custom"
sortable="custom" @on-sort-change="changeSort"
@on-sort-change="changeSort" @on-selection-change="showSelect"
@on-selection-change="showSelect" ref="table"
ref="table" ></Table>
></Table>
</Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
:current="searchForm.pageNumber" :current="searchForm.pageNumber"

View File

@ -1,5 +1,23 @@
// 统一请求路径前缀在libs/axios.js中修改 // 统一请求路径前缀在libs/axios.js中修改
import { getRequest, postRequest, putRequest, deleteRequest, importRequest, uploadFileRequest } from '@/libs/axios'; import { getRequest, postRequest, postRequestWithNoForm, putRequest, deleteRequest, importRequest, uploadFileRequest } from '@/libs/axios';
// 获取店铺直播间列表
export const getLivesList = (params) => {
return getRequest('/broadcast/studio', params)
}
// 获取店铺直播商品
export const getLiveGoods = (params) => {
return getRequest('/broadcast/commodity', params)
}
// 添加店铺直播商品
export const addLiveGoods = (params) => {
return postRequestWithNoForm('/broadcast/commodity', params)
}
// 获取拼团列表 // 获取拼团列表
export const getPintuanList = (params) => { export const getPintuanList = (params) => {
@ -128,4 +146,4 @@ export const getFullDiscountById = (id) => {
// 删除满减活动 // 删除满减活动
export const delFullDiscount = (id) => { export const delFullDiscount = (id) => {
return deleteRequest(`/promotion/fullDiscount/${id}`) return deleteRequest(`/promotion/fullDiscount/${id}`)
} }

View File

@ -216,19 +216,20 @@ export const postRequestWithNoForm = (url, params) => {
}); });
}; };
// export const postRequestWithHeaders = (url, params) => { export const postRequestWithHeaders = (url, params) => {
// let accessToken = getStore("accessToken"); let accessToken = getStore("accessToken");
// return axios({ return axios({
// method: "post", method: "post",
// url: `${url}`, url: `${url}`,
// data: params, data: params,
headers: {
accessToken: accessToken,
"Content-Type": "application/x-www-form-urlencoded"
}
});
};
// headers: {
// accessToken: accessToken,
// "Content-Type": "application/x-www-form-urlencoded"
// }
// });
// };
export const putRequest = (url, params,headers) => { export const putRequest = (url, params,headers) => {
let accessToken = getStore("accessToken"); let accessToken = getStore("accessToken");

View File

@ -425,6 +425,34 @@ export const result = [
url: "", url: "",
permTypes: [], permTypes: [],
children: null children: null
},
{
name: "live",
showAlways: true,
level: 2,
type: 0,
title: "直播管理",
path: "live",
component: "promotion/live/live",
icon: "md-person",
isMenu: true,
url: "",
permTypes: [],
children: null
},
{
name: "liveGoods",
showAlways: true,
level: 2,
type: 0,
title: "直播商品",
path: "liveGoods",
component: "promotion/live/liveGoods",
icon: "md-person",
isMenu: true,
url: "",
permTypes: [],
children: null
} }
] ]
}, },
@ -656,7 +684,7 @@ export const result = [
showAlways: true, showAlways: true,
level: 2, level: 2,
type: 0, type: 0,
title: "自提管理", title: "自提管理",
path: "shopAddress", path: "shopAddress",
component: "shop/shopAddress", component: "shop/shopAddress",
icon: "md-log-in", icon: "md-log-in",

View File

@ -71,6 +71,12 @@ export const otherRouter = {
name: "add-coupon", name: "add-coupon",
component: () => import("@/views/promotion/coupon/couponPublish.vue") component: () => import("@/views/promotion/coupon/couponPublish.vue")
}, },
{
path: "add-live",
title: "创建直播",
name: "add-live",
component: () => import("@/views/promotion/live/addLive.vue")
},
{ {
path: "bill-detail", path: "bill-detail",
title: "结算单详情", title: "结算单详情",

View File

@ -11,7 +11,7 @@
<shrinkable-menu></shrinkable-menu> <shrinkable-menu></shrinkable-menu>
</div> </div>
<!-- 顶部标题栏主体 --> <!-- 顶部标题栏主体 -->
<div class="main-header-con" style="padding-left:240px"> <div class="main-header-con">
<div class="main-header"> <div class="main-header">
<div :class="{'header-avator-con':navType!=4, 'header-avator-con nav4':navType == 4}"> <div :class="{'header-avator-con':navType!=4, 'header-avator-con nav4':navType == 4}">
<!-- 用户头像 --> <!-- 用户头像 -->

View File

@ -1,56 +1,50 @@
<template> <template>
<div class="search"> <div class="search">
<Row> <Card>
<Col> <Row @keydown.enter.native="handleSearch">
<Card> <Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
<Row @keydown.enter.native="handleSearch"> <Form-item label="商品名称" prop="goodsName">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> <Input type="text" v-model="searchForm.goodsName" placeholder="请输入商品名称" clearable style="width: 200px"/>
<Form-item label="商品名称" prop="goodsName"> </Form-item>
<Input type="text" v-model="searchForm.goodsName" placeholder="请输入商品名称" clearable style="width: 200px"/> <!-- <Form-item label="店铺名称">
</Form-item> <Select v-model="searchForm.shopId" placeholder="请选择" @on-query-change="searchChange" filterable clearable style="width: 200px">
<!-- <Form-item label="店铺名称"> <Option v-for="item in shopList" :value="item.id" :key="item.id">{{ item.storeName }}</Option>
<Select v-model="searchForm.shopId" placeholder="请选择" @on-query-change="searchChange" filterable clearable style="width: 200px"> </Select>
<Option v-for="item in shopList" :value="item.id" :key="item.id">{{ item.storeName }}</Option> </Form-item> -->
</Select> <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form-item> --> </Form>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button> </Row>
</Form> <Row class="operation padding-row">
</Row> <Button @click="add" type="primary">添加</Button>
<Row class="operation padding-row"> <!-- <Button @click="add" type="default">批量删除</Button>-->
<Button @click="add" type="primary">添加</Button> </Row>
<!-- <Button @click="add" type="default">批量删除</Button>--> <Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect">
</Row> <!-- 商品栏目格式化 -->
<Row> <template slot="goodsSlot" slot-scope="{row}">
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"> <div style="margin-top: 5px;height: 70px; display: flex;">
<!-- 商品栏目格式化 --> <div style="">
<template slot="goodsSlot" slot-scope="{row}"> <img :src="row.thumbnail" style="height: 60px;margin-top: 3px;width: 60px">
<div style="margin-top: 5px;height: 70px; display: flex;"> </div>
<div style="">
<img :src="row.thumbnail" style="height: 60px;margin-top: 3px;width: 60px">
</div>
<div style="margin-left: 13px;"> <div style="margin-left: 13px;">
<div class="div-zoom"> <div class="div-zoom">
<a @click="linkTo(row.id,row.skuId)">{{row.goodsName}}</a> <a @click="linkTo(row.id,row.skuId)">{{row.goodsName}}</a>
</div> </div>
<Poptip trigger="hover" title="扫码在手机中查看" transfer> <Poptip trigger="hover" title="扫码在手机中查看" transfer>
<div slot="content"> <div slot="content">
<vue-qr :text="wapLinkTo(row.id,row.skuId)" :margin="0" colorDark="#000" colorLight="#fff" :size="150"></vue-qr> <vue-qr :text="wapLinkTo(row.id,row.skuId)" :margin="0" colorDark="#000" colorLight="#fff" :size="150"></vue-qr>
</div>
<img src="../../assets/qrcode.svg" class="hover-pointer" width="20" height="20" alt="">
</Poptip>
</div>
</div> </div>
<img src="../../assets/qrcode.svg" class="hover-pointer" width="20" height="20" alt="">
</Poptip>
</div>
</div>
</template> </template>
</Table> </Table>
</Row> <Row type="flex" justify="end" class="page">
<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>
<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>
</Row> </Card>
</Card>
</Col>
</Row>
<liliDialog <liliDialog
ref="liliDialog" ref="liliDialog"
@selectedGoodsData="selectedGoodsData" @selectedGoodsData="selectedGoodsData"

View File

@ -1,30 +1,24 @@
<template> <template>
<div class="search"> <div class="search">
<Row> <Card>
<Col> <Row v-show="openSearch" @keydown.enter.native="handleSearch">
<Card> <Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
<Row v-show="openSearch" @keydown.enter.native="handleSearch"> <Form-item label="订单编号" prop="orderSn">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> <Input type="text" v-model="searchForm.orderSn" placeholder="请输入订单编号" clearable style="width: 200px" />
<Form-item label="订单编号" prop="orderSn"> </Form-item>
<Input type="text" v-model="searchForm.orderSn" placeholder="请输入订单编号" clearable style="width: 200px" /> <Form-item label="订单时间">
</Form-item> <DatePicker type="daterange" v-model="timeRange" format="yyyy-MM-dd" placeholder="选择时间" style="width: 210px"></DatePicker>
<Form-item label="订单时间"> </Form-item>
<DatePicker type="daterange" v-model="timeRange" format="yyyy-MM-dd" placeholder="选择时间" style="width: 210px"></DatePicker> <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form-item> </Form>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button> </Row>
</Form>
</Row>
<Row class="padding-row"> <Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"></Table>
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"></Table> <Row type="flex" justify="end" class="page">
</Row> <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"
<Row type="flex" justify="end" class="page"> show-total show-elevator show-sizer></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" </Row>
show-total show-elevator show-sizer></Page> </Card>
</Row>
</Card>
</Col>
</Row>
</div> </div>
</template> </template>

View File

@ -222,14 +222,13 @@ div.base-info-item {
/** 底部步骤 */ /** 底部步骤 */
.footer { .footer {
width: 88.7%; width: 100%;
padding: 10px; padding: 10px;
background-color: #ffc; background-color: #ffc;
position: fixed; position: sticky;
bottom: 0px; bottom: 0px;
left: 10%;
text-align: center; text-align: center;
z-index: 9999; z-index: 9;
} }
/*图片上传组件第一张图设置封面*/ /*图片上传组件第一张图设置封面*/

View File

@ -1,88 +1,82 @@
<template> <template>
<div class="search"> <div class="search">
<Row> <Card>
<Col> <Row v-show="openSearch" @keydown.enter.native="handleSearch">
<Card> <Form
<Row v-show="openSearch" @keydown.enter.native="handleSearch"> ref="searchForm"
<Form :model="searchForm"
ref="searchForm" inline
:model="searchForm" :label-width="70"
inline class="search-form"
:label-width="70" >
class="search-form" <Form-item label="商品名称" prop="goodsName">
<Input
type="text"
v-model="searchForm.goodsName"
placeholder="请输入商品名称"
clearable
style="width: 200px"
/>
</Form-item>
<span v-if="drop">
<Form-item label="状态" prop="status">
<Select
v-model="searchForm.marketEnable"
placeholder="请选择"
clearable
style="width: 200px"
>
<Option value="DOWN">下架</Option>
<Option value="UPPER">上架</Option>
</Select>
</Form-item>
<Form-item label="商品编号" prop="sn">
<Input
type="text"
v-model="searchForm.sn"
placeholder="商品编号"
clearable
style="width: 200px"
/>
</Form-item>
</span>
<Form-item style="margin-left: -35px" class="br">
<Button @click="handleSearch" type="primary" icon="ios-search"
>搜索</Button
> >
<Form-item label="商品名称" prop="goodsName"> <Button @click="handleReset"></Button>
<Input <a class="drop-down" @click="dropDown">
type="text" {{ dropDownContent }}
v-model="searchForm.goodsName" <Icon :type="dropDownIcon"></Icon>
placeholder="请输入商品名称" </a>
clearable </Form-item>
style="width: 200px" </Form>
/> </Row>
</Form-item> <Table
<span v-if="drop"> :loading="loading"
<Form-item label="状态" prop="status"> border
<Select :columns="columns"
v-model="searchForm.marketEnable" :data="data"
placeholder="请选择" ref="table"
clearable sortable="custom"
style="width: 200px" @on-sort-change="changeSort"
> @on-selection-change="changeSelect"
<Option value="DOWN">下架</Option> ></Table>
<Option value="UPPER">上架</Option> <Row type="flex" justify="end" class="page">
</Select> <Page
</Form-item> :current="searchForm.pageNumber"
<Form-item label="商品编号" prop="sn"> :total="total"
<Input :page-size="searchForm.pageSize"
type="text" @on-change="changePage"
v-model="searchForm.sn" @on-page-size-change="changePageSize"
placeholder="商品编号" :page-size-opts="[10, 20, 50]"
clearable size="small"
style="width: 200px" show-total
/> show-elevator
</Form-item> show-sizer
</span> ></Page>
<Form-item style="margin-left: -35px" class="br"> </Row>
<Button @click="handleSearch" type="primary" icon="ios-search" </Card>
>搜索</Button
>
<Button @click="handleReset"></Button>
<a class="drop-down" @click="dropDown">
{{ dropDownContent }}
<Icon :type="dropDownIcon"></Icon>
</a>
</Form-item>
</Form>
</Row>
<Row>
<Table
:loading="loading"
border
:columns="columns"
:data="data"
ref="table"
sortable="custom"
@on-sort-change="changeSort"
@on-selection-change="changeSelect"
></Table>
</Row>
<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>
</Col>
</Row>
<Modal <Modal
:title="modalTitle" :title="modalTitle"
v-model="modalVisible" v-model="modalVisible"

View File

@ -1,6 +1,5 @@
<template> <template>
<div class="search"> <div class="search">
<Card> <Card>
<Row @keydown.enter.native="handleSearch"> <Row @keydown.enter.native="handleSearch">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> <Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
@ -31,7 +30,7 @@
<DropdownItem name="uppers">批量上架</DropdownItem> <DropdownItem name="uppers">批量上架</DropdownItem>
<DropdownItem name="lowers">批量下架</DropdownItem> <DropdownItem name="lowers">批量下架</DropdownItem>
<DropdownItem name="deleteAll">批量删除</DropdownItem> <DropdownItem name="deleteAll">批量删除</DropdownItem>
<DropdownItem name="batchShipTemplate">批量设置运费模板</DropdownItem> <!-- <DropdownItem name="batchShipTemplate">批量设置运费模板</DropdownItem> -->
</DropdownMenu> </DropdownMenu>
</Dropdown> </Dropdown>
</Row> </Row>

View File

@ -1,5 +1,5 @@
<template> <template>
<div> <div class="goods-operation">
<div style="height: 45px"> <div style="height: 45px">
<steps <steps
:current="activestep" :current="activestep"
@ -522,7 +522,7 @@
<span slot="append">kg</span> <span slot="append">kg</span>
</Input> </Input>
</FormItem> </FormItem>
<FormItem class="form-item-view-el" label="运费" prop="skuList"> <!-- <FormItem class="form-item-view-el" label="运费" prop="skuList">
<RadioGroup type="button" button-style="solid" <RadioGroup type="button" button-style="solid"
@on-change="logisticsTemplateChange" @on-change="logisticsTemplateChange"
v-model="baseInfoForm.freightPayer" v-model="baseInfoForm.freightPayer"
@ -534,7 +534,7 @@
<span>使用物流规则</span> <span>使用物流规则</span>
</Radio> </Radio>
</RadioGroup> </RadioGroup>
</FormItem> </FormItem> -->
<FormItem <FormItem
class="form-item-view-el" class="form-item-view-el"
label="物流模板" label="物流模板"
@ -699,7 +699,7 @@ export default {
this.baseInfoForm = { this.baseInfoForm = {
salesModel: "RETAIL", salesModel: "RETAIL",
goodsParamsList: [], goodsParamsList: [],
freightPayer: "STORE", // freightPayer: "STORE",
weight: "", weight: "",
goodsGalleryFiles: [], goodsGalleryFiles: [],
release: "true", release: "true",
@ -844,7 +844,7 @@ export default {
/** 商品参数列表 */ /** 商品参数列表 */
goodsParamsList: [], goodsParamsList: [],
/** 运费承担者 */ /** 运费承担者 */
freightPayer: "STORE", // freightPayer: "STORE",
/** 商品重量 */ /** 商品重量 */
weight: "", weight: "",
/** 商品相册列表 */ /** 商品相册列表 */
@ -1007,7 +1007,7 @@ export default {
this.baseInfoForm = { this.baseInfoForm = {
salesModel: "RETAIL", salesModel: "RETAIL",
goodsParamsList: [], goodsParamsList: [],
freightPayer: "STORE", // freightPayer: "STORE",
weight: "", weight: "",
goodsGalleryFiles: [], goodsGalleryFiles: [],
release: "true", release: "true",
@ -1235,14 +1235,14 @@ export default {
...response.result, ...response.result,
}; };
console.warn(this.baseInfoForm); console.warn(this.baseInfoForm);
if (this.baseInfoForm.freightPayer === "BUYER") { // if (this.baseInfoForm.freightPayer === "BUYER") {
API_Shop.getShipTemplate().then((res) => { // API_Shop.getShipTemplate().then((res) => {
if (res.success) { // if (res.success) {
this.logisticsTemplate = res.result; // this.logisticsTemplate = res.result;
} // }
}); // });
this.logisticsTemplateShow = true; // this.logisticsTemplateShow = true;
} // }
this.baseInfoForm.release = "true"; this.baseInfoForm.release = "true";
this.baseInfoForm.recommend = this.baseInfoForm.recommend this.baseInfoForm.recommend = this.baseInfoForm.recommend
? "true" ? "true"
@ -1840,9 +1840,9 @@ export default {
return; return;
} }
// 0 // 0
if (this.baseInfoForm.freightPayer !== "BUYER") { // if (this.baseInfoForm.freightPayer !== "BUYER") {
this.baseInfoForm.templateId = 0; // this.baseInfoForm.templateId = 0;
} // }
this.baseInfoForm.skuList = this.skuTableData.map((sku) => { this.baseInfoForm.skuList = this.skuTableData.map((sku) => {
delete sku._index; delete sku._index;

View File

@ -68,18 +68,16 @@
<a class="select-clear" @click="clearSelectAll"></a> <a class="select-clear" @click="clearSelectAll"></a>
</Alert> </Alert>
</Row> </Row>
<Row> <Table
<Table :loading="loading"
:loading="loading" border
border :columns="columns"
:columns="columns" :data="data"
:data="data" ref="table"
ref="table" sortable="custom"
sortable="custom" @on-sort-change="changeSort"
@on-sort-change="changeSort" @on-selection-change="changeSelect"
@on-selection-change="changeSelect" ></Table>
></Table>
</Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
:current="searchForm.pageNumber" :current="searchForm.pageNumber"

View File

@ -41,12 +41,17 @@
<script> <script>
import * as API_Goods from "@/api/goods"; import * as API_Goods from "@/api/goods";
export default { export default {
data() { props: {
selectedWay: {
type: Array,
default: new Array()
}
},
data () {
return { return {
type: "multiple", // single multiple type: "multiple", // single multiple
cateList: [], // cateList: [], //
selectedWay: [], //
total: "", // total: "", //
goodsParams: { // goodsParams: { //
pageNumber: 1, pageNumber: 1,
@ -64,18 +69,17 @@ export default {
loading: false, // loading loading: false, // loading
}; };
}, },
props: ["clearFlag"],
watch: { watch: {
category(val) { category(val) {
this.goodsParams.categoryPath = val[2]; this.goodsParams.categoryPath = val[2];
}, },
selectedWay: { selectedWay: {
handler() { handler(val) {
this.$emit("selected", this.selectedWay); this.$emit("selected", this.selectedWay);
}, },
deep: true, deep: true,
immediate: true
}, },
"goodsParams.categoryPath": { "goodsParams.categoryPath": {
handler: function () { handler: function () {
this.goodsData = []; this.goodsData = [];
@ -88,7 +92,7 @@ export default {
this.init(); this.init();
}, },
methods: { methods: {
handleReachBottom() { handleReachBottom() { //
setTimeout(() => { setTimeout(() => {
if ( if (
this.goodsParams.pageNumber * this.goodsParams.pageSize <= this.goodsParams.pageNumber * this.goodsParams.pageSize <=
@ -99,17 +103,24 @@ export default {
} }
}, 1500); }, 1500);
}, },
getQueryGoodsList() { getQueryGoodsList() { //
API_Goods.getGoodsSkuData(this.goodsParams).then((res) => { API_Goods.getGoodsSkuData(this.goodsParams).then((res) => {
this.initGoods(res); this.initGoods(res);
}); });
}, },
initGoods(res) { initGoods(res) { //
if (res.result.records.length !=0) { if (res.result.records.length !=0) {
res.result.records.forEach((item) => { let data = res.result.records;
data.forEach((item) => {
item.selected = false; item.selected = false;
item.___type = "goods"; //goodspc wap item.___type = "goods"; //goodspc wap
this.selectedWay.forEach(e => {
if (e.id === item.id) {
item.selected = true
}
})
}); });
/** /**
* 解决数据请求中滚动栏会一直上下跳动 * 解决数据请求中滚动栏会一直上下跳动
@ -141,7 +152,6 @@ export default {
deepGroup(val) { deepGroup(val) {
val.forEach((item) => { val.forEach((item) => {
let childWay = []; // let childWay = []; //
let grandWay = []; //
// //
if (item.children) { if (item.children) {
item.children.forEach((child) => { item.children.forEach((child) => {
@ -196,7 +206,12 @@ export default {
this.selectedWay.push(val); this.selectedWay.push(val);
} else { } else {
val.selected = false; val.selected = false;
this.selectedWay.splice(index, 1); for (let i = 0; i<this.selectedWay.length; i++ ) {
if (this.selectedWay[i].id===val.id) {
this.selectedWay.splice(i,1)
break;
}
}
} }
}, },
}, },

View File

@ -10,20 +10,13 @@
scrollable scrollable
> >
<goodsDialog <goodsDialog
@selected=" @selected="(val) => {goodsData = val;}"
(val) => { :selectedWay='goodsData'
goodsData = val;
}
"
ref="goodsDialog" ref="goodsDialog"
v-if="goodsFlag" v-if="goodsFlag"
/> />
<linkDialog <linkDialog
@selectedLink=" @selectedLink="(val) => {linkData = val;}"
(val) => {
linkData = val;
}
"
v-else v-else
class="linkDialog" class="linkDialog"
/> />
@ -41,14 +34,11 @@ export default {
return { return {
title: "选择", // title: "选择", //
goodsFlag: false, // goodsFlag: false, //
goodsData: "", // goodsData: [], //
linkData: "", // linkData: "", //
flag: false, // flag: false, //
}; };
}, },
props: ["types"],
watch: {},
mounted() {},
methods: { methods: {
// //
clickClose() { clickClose() {
@ -58,7 +48,6 @@ export default {
// //
singleGoods(){ singleGoods(){
var timer = setInterval(() => { var timer = setInterval(() => {
if (this.$refs.goodsDialog) { if (this.$refs.goodsDialog) {
@ -66,19 +55,16 @@ export default {
clearInterval(timer); clearInterval(timer);
} }
}, 100); }, 100);
}, },
clickOK() { clickOK() { //
if (this.goodsFlag) { if (this.goodsFlag) {
this.$emit("selectedGoodsData", this.goodsData); this.$emit("selectedGoodsData", this.goodsData);
} else { } else {
this.$emit("selectedLink", this.linkData); this.$emit("selectedLink", this.linkData);
} }
this.clickClose(); this.clickClose();
// this.clearFlag = false
}, },
open(type){ open (type) { // ref
this.flag = true; this.flag = true;
if(type == 'goods'){ if(type == 'goods'){
this.goodsFlag = true; this.goodsFlag = true;
@ -87,7 +73,7 @@ export default {
} }
}, },
close(){ close(){ //
this.flag = false; this.flag = false;
} }
}, },

Some files were not shown because too many files have changed in this diff Show More