合并ma分支解决冲突

master
lemon橪 2021-06-03 11:51:39 +08:00
commit 3eee6b35e8
142 changed files with 6024 additions and 6336 deletions

View File

@ -4,7 +4,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="./static/logo.ico" type="image/x-icon"> <link rel="icon" href="./static/logo.ico" type="image/x-icon">
<!-- <script src = 'https://webapi.amap.com/maps?v=2.0&key=b440952723253aa9fe483e698057bf7d'></script> --> <script src="https://yzf.qq.com/xv/web/static/chat_sdk/yzf_chat.min.js"></script>
<title>LILI</title> <title>LILI</title>
</head> </head>
<body> <body>

View File

@ -441,3 +441,39 @@ export function memberPointHistory (params) {
params params
}); });
} }
/**
* 分页获取会员站内信
* @param {Object} params 请求参数包括pageNumberpageSizestatus
*/
export function memberMsgList (params) {
return request({
url: `/buyer/member/message`,
method: Method.GET,
needToken: true,
params
});
}
/**
* 设置消息为已读
* @param {String} messageId 消息id
*/
export function readMemberMsg (params) {
return request({
url: `/buyer/member/message`,
method: Method.PUT,
needToken: true,
params
});
}
/**
* 删除会员消息
* @param {String} messageId 消息id
*/
export function delMemberMsg (params) {
return request({
url: `/buyer/member/message`,
method: Method.DELETE,
needToken: true,
params
});
}

View File

@ -57,7 +57,7 @@ import {
export default { export default {
name: 'addressManage', name: 'addressManage',
props: { props: {
id: { id: { // id
defalut: '', defalut: '',
type: String type: String
} }
@ -89,7 +89,7 @@ export default {
}; };
}, },
methods: { methods: {
save () { save () { //
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
const params = JSON.parse(JSON.stringify(this.formData)); const params = JSON.parse(JSON.stringify(this.formData));
@ -138,15 +138,15 @@ export default {
this.formData.lat = item.position.lat; this.formData.lat = item.position.lat;
this.formData.lon = item.position.lng; this.formData.lon = item.position.lng;
}, },
show () { show () { //
this.showAddr = true; this.showAddr = true;
}, },
hide () { hide () { //
this.showAddr = false; this.showAddr = false;
} }
}, },
watch: { watch: {
id: { id: { // id
handler: function (v) { handler: function (v) {
if (v) { if (v) {
this.getAddrById(v); this.getAddrById(v);

View File

@ -59,7 +59,6 @@ export default {
isActive: 0 // tab isActive: 0 // tab
}; };
}, },
mounted () {},
methods: { methods: {
// //
callBack () { callBack () {

View File

@ -44,7 +44,7 @@ export default {
}; };
}, },
methods: { methods: {
getList () { getList () { //
this.loading = true this.loading = true
memberCouponList(this.params).then(res => { memberCouponList(this.params).then(res => {
this.loading = false this.loading = false
@ -67,18 +67,18 @@ export default {
} }
}, },
changePageNum (val) { changePageNum (val) { //
this.params.pageNumber = val; this.params.pageNumber = val;
this.getList() this.getList()
}, },
changePageSize (val) { changePageSize (val) { //
this.pageNumber = 1; this.pageNumber = 1;
this.params.pageSize = val; this.params.pageSize = val;
this.getList() this.getList()
}, },
useScope (type, storeName) { useScope (type, storeName) { //
let shop = '平台'; let shop = '平台';
let goods = '全部商品' let goods = '全部商品'
if (storeName !== 'platform') shop = storeName if (storeName !== 'platform') shop = storeName
@ -104,7 +104,7 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
@import '../../assets/styles/coupon.scss'; @import '../../assets/styles/coupon.scss';
.pageration{ .pageration {
text-align: right; text-align: right;
} }
</style> </style>

View File

@ -20,7 +20,6 @@
<div class="goodsConfig mt_10"> <div class="goodsConfig mt_10">
<span @click="collect" ><Icon type="ios-heart" :color="isCollected ? '#ed3f14' : '#666'" />{{isCollected?'已收藏':'收藏'}}</span> <span @click="collect" ><Icon type="ios-heart" :color="isCollected ? '#ed3f14' : '#666'" />{{isCollected?'已收藏':'收藏'}}</span>
<!-- <span>举报</span> -->
</div> </div>
</div> </div>
<!-- 右侧商品信息活动信息操作展示 --> <!-- 右侧商品信息活动信息操作展示 -->
@ -60,7 +59,7 @@
:key="index" :key="index"
@click="receiveCoupon(item.id)" @click="receiveCoupon(item.id)"
> >
<span v-if="item.couponType == 'PRICE'">{{ item.consumeThreshold }}{{item.price | unitPrice}}</span> <span v-if="item.couponType == 'PRICE'">{{ item.consumeThreshold }}{{item.price}}</span>
<span v-if="item.couponType == 'DISCOUNT'">{{ item.consumeThreshold }}{{item.couponDiscount}}</span> <span v-if="item.couponType == 'DISCOUNT'">{{ item.consumeThreshold }}{{item.couponDiscount}}</span>
</span> </span>
</p> </p>
@ -126,32 +125,6 @@
</div> </div>
</div> </div>
</div> </div>
<!-- <div class="item-detail-see">
<Divider>更多推荐</Divider>
<Row>
<Col :span="24" class="see-Item">
<img class="see-Img" src="https://demo.dscmall.cn/storage/images/201703/thumb_img/0_thumb_G_1489099128797.jpg" alt="" />
<p>
名龙堂i7 6700升7700 GTX1060 6G台式电脑主机DIY游戏组装整机
升6GB独显 送正版WIN10 一年上门
</p>
<p class="global_color">2500.00</p>
</Col>
<Col :span="24" class="see-Item">
<img
class="see-Img"
src="https://demo.dscmall.cn/storage/images/201703/thumb_img/0_thumb_G_1489099128797.jpg"
alt=""
/>
<p>
名龙堂i7 6700升7700 GTX1060 6G台式电脑主机DIY游戏组装整机
升6GB独显 送正版WIN10 一年上门
</p>
<p class="global_color">2500.00</p>
</Col>
</Row>
</div> -->
</div> </div>
</div> </div>
</template> </template>

View File

@ -51,16 +51,16 @@
</DropdownMenu> </DropdownMenu>
</Dropdown> </Dropdown>
</li> </li>
<li class="hover-color" @click="goUserCenter('/home/MyOrder')"><span class="nav-item">我的订单</span></li> <li @click="goUserCenter('/home/MyOrder')"><span class="nav-item hover-color">我的订单</span></li>
<li class="hover-color" @click="goUserCenter('/home/MyTracks')"><span class="nav-item">我的足迹</span></li> <li @click="goUserCenter('/home/MyTracks')"><span class="nav-item hover-color">我的足迹</span></li>
<li v-if="$route.name !== 'Cart'" style="position:relative;" > <li @click="goUserCenter('/home/MsgList')"><span class="nav-item hover-color">我的消息</span></li>
<li v-if="$route.name !== 'Cart'" style="position:relative;">
<i class="cart-badge" v-show="Number(cartNum)">{{cartNum < 100 ? cartNum : '99'}}</i> <i class="cart-badge" v-show="Number(cartNum)">{{cartNum < 100 ? cartNum : '99'}}</i>
<Dropdown placement="bottom-start"> <Dropdown placement="bottom-start">
<router-link to="cart" target="_blank" > <router-link to="cart" target="_blank" >
<span @mouseenter="getCartList"> <span @mouseenter="getCartList">
<Icon <Icon
size="18" size="18"
class="cart-icon"
type="ios-cart-outline" type="ios-cart-outline"
></Icon> ></Icon>
购物车 购物车
@ -260,12 +260,12 @@ export default {
float: left; float: left;
font-size: 14px; font-size: 14px;
line-height: 35px; line-height: 35px;
margin-right: 15px; margin-right: 10px;
font-weight: bold; font-weight: bold;
} }
.nav a,.nav-item { .nav a,.nav-item {
text-decoration: none; text-decoration: none;
padding-left: 15px; padding-left: 10px;
border-left: 1px solid #ccc; border-left: 1px solid #ccc;
color: #999; color: #999;
cursor: pointer; cursor: pointer;
@ -406,9 +406,7 @@ export default {
.sign-out p { .sign-out p {
font-size: 12px; font-size: 12px;
} }
.cart-icon{
padding: 0 6px;
}
.goods-title:hover { .goods-title:hover {
color: $theme_color; color: $theme_color;
} }

View File

@ -1,10 +1,10 @@
<template> <template>
<div class="shop-box"> <div class="shop-box">
<div class="shop-container"> <div class="shop-container">
<div class="shop-title"> <div class="shop-title-content">
<div class="shop-title-content"> <img class="hover-pointer" @click="linkTo(`/merchant?id=${storeDetail.storeId}`)" :src="storeDetail.storeLogo" height="40" alt="">
<p><router-link :to="`/merchant?id=${skuDetail.storeId}`">{{ skuDetail.storeName }}</router-link></p> <p><router-link :to="`/merchant?id=${storeDetail.storeId}`">{{ storeDetail.storeName }}</router-link></p>
</div> <div class="ml_20" v-html="storeDetail.storeDesc"></div>
</div> </div>
</div> </div>
</div> </div>
@ -20,7 +20,7 @@ export default {
} }
}, },
computed: { computed: {
skuDetail () { storeDetail () {
return this.detail; return this.detail;
} }
} }
@ -46,57 +46,17 @@ export default {
color: #fff; color: #fff;
} }
.shop-title {
display: flex;
flex-direction: row;
}
.shop-title-icon {
font-size: 46px;
}
.shop-title-content { .shop-title-content {
padding-top: 8px;
margin-left: 15px;
display: flex; display: flex;
align-items: center;
} }
.shop-title-content p { .shop-title-content p {
line-height: 26px;
font-size: 20px; font-size: 20px;
}
.shop-title-content p:nth-child(2) {
font-size: 16px;
margin-left: 20px; margin-left: 20px;
} }
.shop-title-content a { .shop-title-content a {
color: #fff; color: #fff;
} }
.shop-another-item {
display: flex;
flex-direction: row;
}
.shop-another-item-detail {
display: flex;
flex-direction: row;
align-items: center;
margin-left: 15px;
}
.shop-another-item-img {
height: 80px;
border-radius: 40px;
overflow: hidden;
}
.shop-another-item-img img {
width: 80px;
}
.shop-anoter-item-intro {
margin-left: 15px;
}
</style> </style>

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

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

View File

@ -37,6 +37,11 @@ Vue.prototype.linkTo = function (url) {
window.open(url, '_blank') window.open(url, '_blank')
} }
} }
// 联系客服
Vue.prototype.connectCs = function (sign = '37ef9b97807d03c6741298ed4eb5b536d2d238e08a3c00fb01fe48f03a569974c99ad767e72c04b3165ef29aca2c488b505fe4ca') {
const url = 'https://yzf.qq.com/xv/web/static/chat/index.html?sign=' + sign
window.open(url, '_blank')
}
Vue.prototype.Cookies = storage Vue.prototype.Cookies = storage
/* eslint-disable no-new */ /* eslint-disable no-new */
new Vue({ new Vue({

View File

@ -3,7 +3,7 @@
<BaseHeader></BaseHeader> <BaseHeader></BaseHeader>
<Search></Search> <Search></Search>
<drawer></drawer> <drawer></drawer>
<ShopHeader v-if="goodsMsg.data" :detail="goodsMsg.data"></ShopHeader> <ShopHeader :detail="storeMsg"></ShopHeader>
<div class="shop-item-path"> <div class="shop-item-path">
<div class="shop-nav-container"> <div class="shop-nav-container">
<Breadcrumb> <Breadcrumb>
@ -11,8 +11,9 @@
<BreadcrumbItem v-for="(item, index) in categoryBar" :to="goGoodsList(index)" target="_blank" :key="index">{{item.name}}</BreadcrumbItem> <BreadcrumbItem v-for="(item, index) in categoryBar" :to="goGoodsList(index)" target="_blank" :key="index">{{item.name}}</BreadcrumbItem>
</Breadcrumb> </Breadcrumb>
<div class="store-collect"> <div class="store-collect">
<span class="mr_10"><router-link :to="'Merchant?id=' + goodsMsg.data.storeId">{{goodsMsg.data.storeName}}</router-link></span> <span class="mr_10" v-if="goodsMsg.data"><router-link :to="'Merchant?id=' + goodsMsg.data.storeId">{{goodsMsg.data.storeName}}</router-link></span>
<span @click="collect" ><Icon type="ios-heart" :color="storeCollected ? '#ed3f14' : '#666'" />{{storeCollected?'已收藏店铺':'收藏店铺'}}</span> <span @click="collect" ><Icon type="ios-heart" :color="storeCollected ? '#ed3f14' : '#666'" />{{storeCollected?'已收藏店铺':'收藏店铺'}}</span>
<span @click="connectCs(storeMsg.yzfSign)" class="ml_10"><Icon custom="icomoon icon-customer-service" />联系客服</span>
</div> </div>
</div> </div>
</div> </div>
@ -40,6 +41,7 @@ import ShowGoodsDetail from '@/components/goodsDetail/ShowGoodsDetail';
import ShowLikeGoods from '@/components/like'; import ShowLikeGoods from '@/components/like';
import { goodsSkuDetail } from '@/api/goods'; import { goodsSkuDetail } from '@/api/goods';
import { cancelCollect, collectGoods, isCollection } from '@/api/member'; import { cancelCollect, collectGoods, isCollection } from '@/api/member';
import {getDetailById} from '@/api/shopentry'
export default { export default {
name: 'GoodsDetail', name: 'GoodsDetail',
beforeRouteEnter (to, from, next) { beforeRouteEnter (to, from, next) {
@ -48,20 +50,15 @@ export default {
}, },
created () { created () {
this.getGoodsDetail(); this.getGoodsDetail();
if (this.Cookies.getItem('userInfo')) {
isCollection('STORE', this.goodsMsg.data.storeId).then(res => {
if (res.success && res.result) {
this.storeCollected = true;
}
})
}
}, },
data () { data () {
return { return {
goodsMsg: {}, // goodsMsg: {}, //
isLoading: false, // isLoading: false, //
categoryBar: [], // categoryBar: [], //
storeCollected: false // storeCollected: false, //
storeMsg: {} //
}; };
}, },
methods: { methods: {
@ -83,6 +80,20 @@ export default {
}); });
this.categoryBar = cateArr; this.categoryBar = cateArr;
this.goodsMsg = res.result; this.goodsMsg = res.result;
//
if (this.Cookies.getItem('userInfo')) {
isCollection('STORE', this.goodsMsg.data.storeId).then(res => {
if (res.success && res.result) {
this.storeCollected = true;
}
})
}
//
getDetailById(this.goodsMsg.data.storeId).then(res => {
if (res.success) {
this.storeMsg = res.result
}
})
} else { } else {
this.$Message.error(res.message) this.$Message.error(res.message)
this.$router.push('/') this.$router.push('/')
@ -91,7 +102,7 @@ export default {
this.$router.push('/') this.$router.push('/')
}); });
}, },
goGoodsList (currIndex) { goGoodsList (currIndex) { //
const arr = [] const arr = []
this.categoryBar.forEach((e, index) => { this.categoryBar.forEach((e, index) => {
if (index <= currIndex) { if (index <= currIndex) {
@ -132,7 +143,6 @@ export default {
} }
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.shop-item-path { .shop-item-path {
height: 38px; height: 38px;
@ -146,6 +156,7 @@ export default {
padding: 20px 0; padding: 20px 0;
@include white_background_color(); @include white_background_color();
} }
.shop-nav-container { .shop-nav-container {
width: 1200px; width: 1200px;
margin: 0 auto; margin: 0 auto;

View File

@ -9,9 +9,10 @@
<img :src="storeMsg.storeLogo" height="50" alt=""> <img :src="storeMsg.storeLogo" height="50" alt="">
<div> <div>
<p>{{storeMsg.storeName || 'xx店铺'}}</p> <p>{{storeMsg.storeName || 'xx店铺'}}</p>
<p>{{storeMsg.storeDesc || 'xx店铺描述'}}</p> <p v-html="storeMsg.storeDesc"></p>
</div> </div>
<div class="store-collect" @click="collect"><Icon type="ios-heart" :color="storeCollected ? '#ed3f14' : '#fff'" />{{storeCollected?'已收藏店铺':'收藏店铺'}}</div> <div class="store-collect" @click="collect"><Icon type="ios-heart" :color="storeCollected ? '#ed3f14' : '#fff'" />{{storeCollected?'已收藏店铺':'收藏店铺'}}</div>
<span class="hover-pointer ml_10" @click="connectCs(storeMsg.yzfSign)"><Icon custom="icomoon icon-customer-service" />联系客服</span>
</div> </div>
</div> </div>
<div class="store-category"> <div class="store-category">
@ -204,7 +205,7 @@ export default {
} }
} }
.store-collect{ .store-collect{
margin-left: 20px!important; margin-left: 750px!important;
&:hover{ &:hover{
cursor: pointer; cursor: pointer;
} }

View File

@ -0,0 +1,171 @@
<template>
<div style="background:#fff;">
<BaseHeader></BaseHeader>
<Search></Search>
<drawer></drawer>
<ShopHeader :detail="storeMsg"></ShopHeader>
<div class="shop-item-path">
<div class="shop-nav-container">
<Breadcrumb>
<BreadcrumbItem to="/">首页</BreadcrumbItem>
<BreadcrumbItem v-for="(item, index) in categoryBar" :to="goGoodsList(index)" target="_blank" :key="index">{{item.name}}</BreadcrumbItem>
</Breadcrumb>
<div class="store-collect">
<span class="mr_10" v-if="goodsMsg.data"><router-link :to="'Merchant?id=' + goodsMsg.data.storeId">{{goodsMsg.data.storeName}}</router-link></span>
<span @click="collect" ><Icon type="ios-heart" :color="storeCollected ? '#ed3f14' : '#666'" />{{storeCollected?'已收藏店铺':'收藏店铺'}}</span>
<span @click="connectCs(storeMsg.yzfSign)" class="ml_10"><Icon custom="icomoon icon-customer-service" />联系客服</span>
</div>
</div>
</div>
<!-- 商品信息展示 -->
<ShowGoods v-if="goodsMsg.data" :detail="goodsMsg"></ShowGoods>
<!-- 商品详细展示 -->
<ShowGoodsDetail v-if="goodsMsg.data" :detail="goodsMsg"></ShowGoodsDetail>
<Spin size="large" fix v-if="isLoading"></Spin>
<BaseFooter></BaseFooter>
</div>
</template>
<script>
import Search from '@/components/Search';
import ShopHeader from '@/components/header/ShopHeader';
import ShowGoods from '@/components/goodsDetail/ShowGoods';
import ShowGoodsDetail from '@/components/goodsDetail/ShowGoodsDetail';
import ShowLikeGoods from '@/components/like';
import { goodsSkuDetail } from '@/api/goods';
import { cancelCollect, collectGoods, isCollection } from '@/api/member';
import {getDetailById} from '@/api/shopentry'
export default {
name: 'GoodsDetail',
beforeRouteEnter (to, from, next) {
window.scrollTo(0, 0);
next();
},
created () {
this.getGoodsDetail();
},
data () {
return {
goodsMsg: {}, //
isLoading: false, //
categoryBar: [], //
storeCollected: false, //
storeMsg: {} //
};
},
methods: {
getGoodsDetail () {
this.isLoading = true;
const params = this.$route.query
goodsSkuDetail(params).then((res) => {
this.isLoading = false;
if (res.success) {
const result = res.result;
const cateName = res.result.categoryName;
const cateId = result.data.categoryPath.split(',');
const cateArr = [];
cateId.forEach((e, index) => { // idname
cateArr.push({
id: e,
name: cateName[index]
});
});
this.categoryBar = cateArr;
this.goodsMsg = res.result;
//
if (this.Cookies.getItem('userInfo')) {
isCollection('STORE', this.goodsMsg.data.storeId).then(res => {
if (res.success && res.result) {
this.storeCollected = true;
}
})
}
//
getDetailById(this.goodsMsg.data.storeId).then(res => {
if (res.success) {
this.storeMsg = res.result
}
})
} else {
this.$Message.error(res.message)
this.$router.push('/')
}
}).catch(() => {
this.$router.push('/')
});
},
goGoodsList (currIndex) { //
const arr = []
this.categoryBar.forEach((e, index) => {
if (index <= currIndex) {
arr.push(e.id)
}
})
return location.origin + '/goodsList?categoryId=' + arr.toString()
},
async collect () { //
if (this.storeCollected) {
let cancel = await cancelCollect('STORE', this.goodsMsg.data.storeId)
if (cancel.success) {
this.$Message.success('已取消收藏')
this.storeCollected = false;
}
} else {
let collect = await collectGoods('STORE', this.goodsMsg.data.storeId);
if (collect.code === 200) {
this.storeCollected = true;
this.$Message.success('收藏店铺成功,可以前往个人中心我的收藏查看');
}
}
}
},
watch: {
'$route.query.skuId': function (val) {
location.reload();
}
},
computed: {
},
components: {
Search,
ShopHeader,
ShowGoods,
ShowGoodsDetail,
ShowLikeGoods
}
};
</script>
<style scoped lang="scss">
.shop-item-path {
height: 38px;
@include background_color($light_background_color);
line-height: 38px;
color: #2c2c2c;
}
.like {
width: 100%;
padding: 20px 0;
@include white_background_color();
}
.shop-nav-container {
width: 1200px;
margin: 0 auto;
position: relative;
.store-collect {
position: absolute;
right: 20px;
top: 0;
color: #999;
span{
&:hover{
cursor: pointer;
color: $theme_color;
}
}
}
}
</style>

View File

@ -4,7 +4,7 @@
<Search></Search> <Search></Search>
<cateNav></cateNav> <cateNav></cateNav>
<ul class="category"> <ul class="category">
<li @click="selectCate(cate.id)" v-for="(cate, index) in cateList" :key="index">{{cate.name}}</li> <li @click="selectCate(cate.id)" :class="{'selected-cate': cate.id === params.pointsGoodsCategoryId}" v-for="(cate, index) in cateList" :key="index">{{cate.name}}</li>
</ul> </ul>
<h3 class="promotion-decorate">积分商品</h3> <h3 class="promotion-decorate">积分商品</h3>
<!-- 列表 --> <!-- 列表 -->
@ -39,6 +39,13 @@
</div> </div>
</div> </div>
</div> </div>
<div class="page-size">
<Page :total="total" @on-change="changePageNum"
@on-page-size-change="changePageSize"
:page-size="params.pageSize"
show-sizer>
</Page>
</div>
<BaseFooter></BaseFooter> <BaseFooter></BaseFooter>
</div> </div>
</template> </template>
@ -79,11 +86,27 @@ export default {
} }
}) })
}, },
selectCate (id) { selectCate (id) { //
this.params.pointsGoodsCategoryId = id this.params.pointsGoodsCategoryId = id
this.getList() this.getList()
this.$router.push({query: {categoryId: id}}) this.$router.push({query: {categoryId: id}})
} },
goGoodsDetail (skuId, goodsId) { //
let routerUrl = this.$router.resolve({
path: '/goodsDetail',
query: {skuId, goodsId}
})
window.open(routerUrl.href, '_blank')
},
changePageNum (val) { //
this.params.pageNumber = val;
this.getList()
},
changePageSize (val) { //
this.pageNumber = 1;
this.params.pageSize = val;
this.getList()
},
} }
} }
</script> </script>
@ -104,8 +127,19 @@ export default {
margin: 0 10px; margin: 0 10px;
&:hover{ &:hover{
cursor: pointer; cursor: pointer;
color: $theme_color;
} }
} }
.selected-cate{
color: $theme_color;
}
}
.page-size {
width: 1200px;
margin: 10px auto;
display: flex;
justify-content: flex-end;
} }
.promotion-decorate::before,.promotion-decorate::after{ .promotion-decorate::before,.promotion-decorate::after{
background-image: url('../../static/sprite@2x.png'); background-image: url('../../static/sprite@2x.png');

View File

@ -34,33 +34,6 @@
</div> </div>
</div> </div>
</div> </div>
<!-- <div class="other-user-buy-box">
<div class="other-user-buy-title">
<p>可以顺便看下其他商品哦 ~</p>
</div>
<div class="other-user-buy-row" v-for="(items,index1) in recommend" :key="index1">
<div class="other-user-buy-item-box" v-for="(item,index2) in items" :key="index2">
<div class="other-user-buy-item-img">
<a href="item_detail.html"><img :src="item.img" alt=""></a>
</div>
<div class="other-buy-detail-box">
<div class="other-buy-title">
<a href="item_detail.html">
<p>{{item.intro}}</p>
</a>
</div>
<div class="other-buy-price">
<p>{{item.price}}</p>
</div>
<div class="other-buy-btn-box">
<router-link to="/goodsDetail">
<button class="other-buy-btn"><Icon type="ios-cart"></Icon> 加入购物车</button>
</router-link>
</div>
</div>
</div>
</div>
</div> -->
<BaseFooter></BaseFooter> <BaseFooter></BaseFooter>
</div> </div>
</template> </template>

View File

@ -112,6 +112,10 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.page-size {
display: flex;
justify-content: flex-end;
}
.order-img { .order-img {
> img { > img {
width: 60px; width: 60px;

View File

@ -0,0 +1,17 @@
<template>
<div class="msg-list">
会员消息详情
</div>
</template>
<script>
export default {
data() {
return {
detail: {}, //
}
},
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,41 @@
<template>
<div class="msg-list">
<card _Title="我的消息" :_Tabs="status" :_Size="16" />
</div>
</template>
<script>
import {memberMsgList, readMemberMsg, delMemberMsg} from '@/api/member.js'
export default {
data() {
return {
list: [], //
status: ['未读', '已读', '回收站'],
params: { //
pageNumber: 1,
pageSize: 10,
status: ''
},
}
},
methods: {
getList () { //
memberMsgList(this.params).then(res => {
if (res.success) {
this.list = res.result.records;
}
})
},
setRead (id) { //
readMemberMsg(id).then(res => {
})
}
},
mounted () {
this.getList()
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -41,6 +41,11 @@ const member = [{
title: '账户安全', title: '账户安全',
path: 'AccountSafe' path: 'AccountSafe'
}, },
{
icon: '',
title: '我的消息',
path: 'MsgList'
},
{ {
icon: '', icon: '',
title: '我的足迹', title: '我的足迹',

View File

@ -47,6 +47,8 @@ const ComplainList = resolve => require(['@/pages/home/memberCenter/ComplainList
const ComplainDetail = resolve => require(['@/pages/home/memberCenter/ComplainDetail'], resolve); const ComplainDetail = resolve => require(['@/pages/home/memberCenter/ComplainDetail'], resolve);
const Invoice = resolve => require(['@/pages/home/memberCenter/Invoice'], resolve); const Invoice = resolve => require(['@/pages/home/memberCenter/Invoice'], resolve);
const Point = resolve => require(['@/pages/home/memberCenter/Point'], resolve); const Point = resolve => require(['@/pages/home/memberCenter/Point'], resolve);
const MsgList = resolve => require(['@/pages/home/memberCenter/memberMsg/MsgList'], resolve);
const MsgDetail = resolve => require(['@/pages/home/memberCenter/memberMsg/MsgDetail'], resolve);
/* /*
* 会员中心 * 会员中心
@ -316,6 +318,18 @@ export default new Router({
name: 'AddAddress', name: 'AddAddress',
component: AddAddress component: AddAddress
}, },
{
path: 'MsgList',
name: 'MsgList',
component: MsgList,
meta: {title: '我的消息'}
},
{
path: 'MsgDetail',
name: 'MsgDetail',
component: MsgDetail,
meta: {title: '我的消息'}
},
{ {
path: 'MyOrder', path: 'MyOrder',
name: 'MyOrder', name: 'MyOrder',

View File

@ -98,11 +98,16 @@ export const getMemberStatistics = params => {
}; };
// 获取会员注册统计列表 // 获取会员注册统计列表
export const getStatisticsList = params => { export const getStatisticsList = params => {
return getRequest("/statistics/view/list", params); return getRequest("/statistics/view/list", params);
}; };
// 获取会员历史流量
export const historyMemberChartList = () => {
return getRequest("/statistics/view/online/history");
}
//查询会员数量 //查询会员数量
export const getMemberNum = params => { export const getMemberNum = params => {
return getRequest("/member/num", params); return getRequest("/member/num", params);
@ -121,15 +126,15 @@ export const removeMemberAddress = (id) => {
} }
//添加会员收货地址 //添加会员收货地址
export const addMemberAddress = (params) => { export const addMemberAddress = (params) => {
return postRequest(`/member/address`,params) return postRequest(`/member/address`, params)
} }
//修改会员收货地址 //修改会员收货地址
export const editMemberAddress = (params) => { export const editMemberAddress = (params) => {
return putRequest(`/member/address`,params) return putRequest(`/member/address`, params)
} }
//查询会员预存款 //查询会员预存款
export const getMemberWallet = (params) => { export const getMemberWallet = (params) => {
return getRequest(`/members/wallet`,params) return getRequest(`/members/wallet`, params)
} }

View File

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

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

@ -172,14 +172,22 @@
</div> </div>
</div> </div>
</div> </div>
<!-- chart -->
<div class="card transform">
<div>
<h4>最近48小时在线人数整点为准</h4>
<div id="historyMemberChart"></div>
</div>
</div>
<!-- chart --> <!-- chart -->
<div class="charts flex"> <div class="charts flex">
<div class="chart-item"> <div class="chart-item">
<h4>流量统计</h4> <h4>流量走势</h4>
<div id="pvChart"></div> <div id="pvChart"></div>
</div> </div>
<div class="chart-item"> <div class="chart-item">
<h4>交易统计</h4> <h4>交易趋势</h4>
<div id="orderChart"></div> <div id="orderChart"></div>
</div> </div>
</div> </div>
@ -279,6 +287,7 @@ export default {
homeData: "", // homeData: "", //
pvChart: "", // pvChart: "", //
orderChart: "", // orderChart: "", //
historyMemberChart: "", //
params: { // params: { //
searchType: "LAST_SEVEN", searchType: "LAST_SEVEN",
}, },
@ -308,13 +317,13 @@ export default {
}, },
// top10 // top10
async toHotGoods() { async toHotGoods() {
let res = await hotGoods(); let res = await hotGoods(this.params);
res.success ? (this.topHotGoodsData = res.result) : ""; res.success ? (this.topHotGoodsData = res.result) : "";
}, },
// top10 // top10
async topHotShops() { async topHotShops() {
let res = await hotShops(); let res = await hotShops(this.params);
res.success ? (this.topHotShopsData = res.result) : ""; res.success ? (this.topHotShopsData = res.result) : "";
}, },
// //
@ -323,6 +332,7 @@ export default {
res.success ? (this.awaitTodoData = res.result) : ""; res.success ? (this.awaitTodoData = res.result) : "";
}, },
//
async getHomeData() { async getHomeData() {
let res = await homeStatistics(); let res = await homeStatistics();
if (res.success) { if (res.success) {
@ -358,6 +368,7 @@ export default {
} }
}, },
initOrderChart() { initOrderChart() {
// legend-filter // legend-filter
let data = this.chartList; let data = this.chartList;
@ -393,6 +404,9 @@ export default {
this.orderChart.render(); this.orderChart.render();
}, },
// //
initPvChart() { initPvChart() {
let uv = []; let uv = [];
@ -465,8 +479,54 @@ export default {
this.initPvChart(); this.initPvChart();
} }
}); });
}, }, //
async initHistoryMemberChartList() {
const res = await API_Member.historyMemberChartList();
if (res.success) {
this.chartList = res.result;
if (!this.historyMemberChart) {
this.historyMemberChart = new Chart({
container: "historyMemberChart",
autoFit: true,
height: 500,
padding: [70, 35, 70, 35],
});
}
this.initHistoryMemberChart();
}
},
initHistoryMemberChart(){
// legend-filter
let data = this.chartList;
data.forEach((item) => {
item.title = "历史在线人数";
});
this.historyMemberChart.data(data);
console.error(data)
this.historyMemberChart.tooltip({
showCrosshairs: true,
shared: true,
});
this.historyMemberChart
.line()
.position("date*num")
.color("title",['#ffaa71'])
.shape("smooth")
;
this.historyMemberChart
.point()
.position("date*num")
.color("title",['#ffaa71'])
.shape("circle")
;
this.historyMemberChart.render();
},
// //
init() { init() {
this.toHotGoods(); this.toHotGoods();
@ -475,6 +535,7 @@ export default {
this.getHomeData(); this.getHomeData();
this.getPvChart(); this.getPvChart();
this.initOrderChartList(); this.initOrderChartList();
this.initHistoryMemberChartList();
}, },
}, },
mounted() { mounted() {

View File

@ -114,6 +114,7 @@ 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 => { this.selectedWay.forEach(e => {
if (e.id === item.id) { if (e.id === item.id) {
item.selected = true item.selected = true

View File

@ -1,12 +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="(val) => {goodsData = val;}" <template v-if="flag">
v-if="goodsFlag" ref="goodsDialog" :selectedWay='goodsData'/> <goodsDialog @selected="(val) => {goodsData = val;}"
<linkDialog @selectedLink=" v-if="goodsFlag" ref="goodsDialog" :selectedWay='goodsData'/>
(val) => { <linkDialog @selectedLink="
linkData = val; (val) => {
} linkData = val;
" v-else class="linkDialog" /> }
" v-else class="linkDialog" />
</template>
</Modal> </Modal>
</template> </template>
<script> <script>
@ -25,9 +27,6 @@ export default {
flag: false, // modal flag: false, // modal
}; };
}, },
props: ["types"],
watch: {},
mounted() {},
methods: { methods: {
// //
clickClose() { clickClose() {
@ -51,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
@ -502,7 +492,20 @@
{ {
title: "来源", title: "来源",
key: "clientType", key: "clientType",
width: 80, width: 80,render: (h, params) => {
if (params.row.clientType == "H5") {
return h("div",{},"移动端");
}else if(params.row.clientType == "PC") {
return h("div",{},"PC端");
}else if(params.row.clientType == "WECHAT_MP") {
return h("div",{},"小程序端");
}else if(params.row.clientType == "APP") {
return h("div",{},"移动应用端");
}
else{
return h("div",{},params.row.clientType);
}
},
}, },
{ {
title: "订单状态", title: "订单状态",

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"
@ -275,7 +267,7 @@
import { import {
getMessageData, getMessageData,
editSmsMessageTemplate, editSmsMessageTemplate,
editNoticeMessageTemplate, editNoticeMessage,
wechatMessageSync, wechatMessageSync,
getWechatMessagePage, getWechatMessagePage,
editWechatMessageTemplate, editWechatMessageTemplate,
@ -600,7 +592,7 @@
noticeFormDataEdit(){ noticeFormDataEdit(){
this.$refs['noticeFormData'].validate((valid) => { this.$refs['noticeFormData'].validate((valid) => {
if (valid) { if (valid) {
editNoticeMessageTemplate(this.messageTemplateId,this.noticeFormData).then(res => { editNoticeMessage(this.messageTemplateId,this.noticeFormData).then(res => {
if(res.message === 'success') { if(res.message === 'success') {
this.$Message.success('站内信修改成功'); this.$Message.success('站内信修改成功');
this.noticeModal = false; this.noticeModal = false;

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,7 +1,6 @@
<template> <template>
<div class="search"> <div class="search">
<Row>
<Col>
<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">
@ -35,16 +34,15 @@
</Form> </Form>
</Row> </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"></Table> <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 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>
</Row> </Row>
</Card> </Card>
</Col>
</Row>
</div> </div>
</template> </template>
@ -121,16 +119,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, //
@ -293,25 +281,6 @@
this.total = this.data.length; this.total = this.data.length;
this.loading = false; this.loading = false;
}, },
//
invoicing(params){
this.$Modal.confirm({
title: "确认开票",
content: "您确认已经开具发票 ?",
loading: true,
onOk: () => {
API_Order.invoicing(params.id).then((res) => {
if (res.success) {
this.$Message.success("开票成功");
}
this.$Modal.remove();
this.getData();
});
}
});
},
}, },
mounted() { mounted() {
this.init(); this.init();

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">
<Form ref="form" :model="form" :label-width="100">
<FormItem label="文章标题" prop="title">
<Input v-model="form.title" clearable style="width: 40%" />
</FormItem>
<FormItem label="文章分类" prop="categoryId">
<Select v-model="treeValue" placeholder="请选择" clearable style="width: 180px">
<Option :value="treeValue" style="display: none">{{
treeValue
}}
</Option>
<Tree :data="treeData" @on-select-change="handleCheckChange"></Tree>
</Select>
</FormItem>
<FormItem label="文章排序" prop="sort">
<Input type="number" v-model="form.sort" clearable style="width: 10%" />
</FormItem>
<FormItem class="form-item-view-el" label="文章内容" prop="content">
<editor v-model="form.content"></editor>
</FormItem>
<FormItem label="是否展示" prop="openStatus">
<i-switch size="large" v-model="form.openStatus" :true-value="open" :false-value="close">
<span slot="open">展示</span>
<span slot="close">隐藏</span>
</i-switch>
</FormItem>
</Form>
<div slot="footer">
<Button type="text" @click="modalVisible = false">取消</Button>
<Button type="primary" :loading="submitLoading" @click="handleSubmit"></Button>
</div>
</Modal>
</template>
<Modal :title="modalTitle" v-model="modalVisible" :mask-closable="false" :width="1100">
<Form ref="form" :model="form" :label-width="100">
<FormItem label="文章标题" prop="title">
<Input v-model="form.title" clearable style="width: 40%" />
</FormItem>
<FormItem label="文章分类" prop="categoryId">
<Select v-model="treeValue" placeholder="请选择" clearable style="width: 180px">
<Option :value="treeValue" style="display: none">{{
treeValue
}}
</Option>
<Tree :data="treeData" @on-select-change="handleCheckChange"></Tree>
</Select>
</FormItem>
<FormItem label="文章排序" prop="sort">
<Input type="number" v-model="form.sort" clearable style="width: 10%" />
</FormItem>
<FormItem class="form-item-view-el" label="文章内容" prop="content">
<editor v-model="form.content"></editor>
</FormItem>
<FormItem label="是否展示" prop="openStatus">
<i-switch size="large" v-model="form.openStatus" :true-value="open" :false-value="close">
<span slot="open">展示</span>
<span slot="close">隐藏</span>
</i-switch>
</FormItem>
</Form>
<div slot="footer">
<Button type="text" @click="modalVisible = false">取消</Button>
<Button type="primary" :loading="submitLoading" @click="handleSubmit"></Button>
</div>
</Modal>
</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 size="small"
type="error" :disabled="row.memberCouponStatus != 'NEW'"
ghost @click="remove(row)"
size="small" >作废</Button
:disabled="row.memberCouponStatus != 'NEW'" >
@click="remove(row)" </template>
>作废</Button </Table>
> <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>
</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

@ -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,70 +61,68 @@
<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" :current="searchForm.pageNumber"

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,7 +53,7 @@
<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
@ -112,7 +112,7 @@
> >
</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
@ -597,6 +591,20 @@
title: "来源", title: "来源",
key: "clientType", key: "clientType",
width: 80, width: 80,
render: (h, params) => {
if (params.row.clientType == "H5") {
return h("div",{},"移动端");
}else if(params.row.clientType == "PC") {
return h("div",{},"PC端");
}else if(params.row.clientType == "WECHAT_MP") {
return h("div",{},"小程序端");
}else if(params.row.clientType == "APP") {
return h("div",{},"移动应用端");
}
else{
return h("div",{},params.row.clientType);
}
},
}, },
{ {
title: "订单状态", title: "订单状态",

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

@ -52,7 +52,7 @@
</div> </div>
<div class="card-item"> <div class="card-item">
<div class="card-item-label">付款笔数</div> <div class="card-item-label">付款笔数</div>
<div class="card-item-value">{{overViewList.paymentsNum || 0}}</div> <div class="card-item-value">{{overViewList.paymentOrderNum || 0}}</div>
</div> </div>
<div class="card-item"> <div class="card-item">
<div class="card-item-label">付款金额</div> <div class="card-item-label">付款金额</div>
@ -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"

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