合并ma分支解决冲突
commit
3eee6b35e8
|
@ -4,7 +4,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<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>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -441,3 +441,39 @@ export function memberPointHistory (params) {
|
|||
params
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 分页获取会员站内信
|
||||
* @param {Object} params 请求参数,包括pageNumber、pageSize、status
|
||||
*/
|
||||
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
|
||||
});
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ import {
|
|||
export default {
|
||||
name: 'addressManage',
|
||||
props: {
|
||||
id: {
|
||||
id: { // 传入的地址id
|
||||
defalut: '',
|
||||
type: String
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ export default {
|
|||
};
|
||||
},
|
||||
methods: {
|
||||
save () {
|
||||
save () { // 保存地址
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
const params = JSON.parse(JSON.stringify(this.formData));
|
||||
|
@ -138,15 +138,15 @@ export default {
|
|||
this.formData.lat = item.position.lat;
|
||||
this.formData.lon = item.position.lng;
|
||||
},
|
||||
show () {
|
||||
show () { // 地址模态框显示
|
||||
this.showAddr = true;
|
||||
},
|
||||
hide () {
|
||||
hide () { // 地址模态框隐藏
|
||||
this.showAddr = false;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
id: {
|
||||
id: { // 传入的地址id
|
||||
handler: function (v) {
|
||||
if (v) {
|
||||
this.getAddrById(v);
|
||||
|
|
|
@ -59,7 +59,6 @@ export default {
|
|||
isActive: 0 // 已激活tab栏下标
|
||||
};
|
||||
},
|
||||
mounted () {},
|
||||
methods: {
|
||||
// 点击右侧的回调
|
||||
callBack () {
|
||||
|
|
|
@ -44,7 +44,7 @@ export default {
|
|||
};
|
||||
},
|
||||
methods: {
|
||||
getList () {
|
||||
getList () { // 获取优惠券列表
|
||||
this.loading = true
|
||||
memberCouponList(this.params).then(res => {
|
||||
this.loading = false
|
||||
|
@ -67,18 +67,18 @@ export default {
|
|||
}
|
||||
},
|
||||
|
||||
changePageNum (val) {
|
||||
changePageNum (val) { // 分页改变页码
|
||||
this.params.pageNumber = val;
|
||||
this.getList()
|
||||
},
|
||||
|
||||
changePageSize (val) {
|
||||
changePageSize (val) { // 分页改变页数
|
||||
this.pageNumber = 1;
|
||||
this.params.pageSize = val;
|
||||
this.getList()
|
||||
},
|
||||
|
||||
useScope (type, storeName) {
|
||||
useScope (type, storeName) { // 根据字段返回 优惠券适用范围
|
||||
let shop = '平台';
|
||||
let goods = '全部商品'
|
||||
if (storeName !== 'platform') shop = storeName
|
||||
|
@ -104,7 +104,7 @@ export default {
|
|||
|
||||
<style scoped lang="scss">
|
||||
@import '../../assets/styles/coupon.scss';
|
||||
.pageration{
|
||||
.pageration {
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
|
||||
<div class="goodsConfig mt_10">
|
||||
<span @click="collect" ><Icon type="ios-heart" :color="isCollected ? '#ed3f14' : '#666'" />{{isCollected?'已收藏':'收藏'}}</span>
|
||||
<!-- <span>举报</span> -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- 右侧商品信息、活动信息、操作展示 -->
|
||||
|
@ -60,7 +59,7 @@
|
|||
:key="index"
|
||||
@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>
|
||||
</p>
|
||||
|
@ -126,32 +125,6 @@
|
|||
</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>
|
||||
</template>
|
||||
|
|
|
@ -51,16 +51,16 @@
|
|||
</DropdownMenu>
|
||||
</Dropdown>
|
||||
</li>
|
||||
<li class="hover-color" @click="goUserCenter('/home/MyOrder')"><span class="nav-item">我的订单</span></li>
|
||||
<li class="hover-color" @click="goUserCenter('/home/MyTracks')"><span class="nav-item">我的足迹</span></li>
|
||||
<li v-if="$route.name !== 'Cart'" style="position:relative;" >
|
||||
<li @click="goUserCenter('/home/MyOrder')"><span class="nav-item hover-color">我的订单</span></li>
|
||||
<li @click="goUserCenter('/home/MyTracks')"><span class="nav-item hover-color">我的足迹</span></li>
|
||||
<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>
|
||||
<Dropdown placement="bottom-start">
|
||||
<router-link to="cart" target="_blank" >
|
||||
<span @mouseenter="getCartList">
|
||||
<Icon
|
||||
size="18"
|
||||
class="cart-icon"
|
||||
type="ios-cart-outline"
|
||||
></Icon>
|
||||
购物车
|
||||
|
@ -260,12 +260,12 @@ export default {
|
|||
float: left;
|
||||
font-size: 14px;
|
||||
line-height: 35px;
|
||||
margin-right: 15px;
|
||||
margin-right: 10px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.nav a,.nav-item {
|
||||
text-decoration: none;
|
||||
padding-left: 15px;
|
||||
padding-left: 10px;
|
||||
border-left: 1px solid #ccc;
|
||||
color: #999;
|
||||
cursor: pointer;
|
||||
|
@ -406,9 +406,7 @@ export default {
|
|||
.sign-out p {
|
||||
font-size: 12px;
|
||||
}
|
||||
.cart-icon{
|
||||
padding: 0 6px;
|
||||
}
|
||||
|
||||
.goods-title:hover {
|
||||
color: $theme_color;
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<template>
|
||||
<div class="shop-box">
|
||||
<div class="shop-container">
|
||||
<div class="shop-title">
|
||||
<div class="shop-title-content">
|
||||
<p><router-link :to="`/merchant?id=${skuDetail.storeId}`">{{ skuDetail.storeName }}</router-link></p>
|
||||
</div>
|
||||
<img class="hover-pointer" @click="linkTo(`/merchant?id=${storeDetail.storeId}`)" :src="storeDetail.storeLogo" height="40" alt="">
|
||||
<p><router-link :to="`/merchant?id=${storeDetail.storeId}`">{{ storeDetail.storeName }}</router-link></p>
|
||||
<div class="ml_20" v-html="storeDetail.storeDesc"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -20,7 +20,7 @@ export default {
|
|||
}
|
||||
},
|
||||
computed: {
|
||||
skuDetail () {
|
||||
storeDetail () {
|
||||
return this.detail;
|
||||
}
|
||||
}
|
||||
|
@ -46,57 +46,17 @@ export default {
|
|||
color: #fff;
|
||||
}
|
||||
|
||||
.shop-title {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.shop-title-icon {
|
||||
font-size: 46px;
|
||||
}
|
||||
|
||||
.shop-title-content {
|
||||
padding-top: 8px;
|
||||
margin-left: 15px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.shop-title-content p {
|
||||
line-height: 26px;
|
||||
font-size: 20px;
|
||||
|
||||
}
|
||||
.shop-title-content p:nth-child(2) {
|
||||
font-size: 16px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
.shop-title-content a {
|
||||
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>
|
||||
|
|
|
@ -13,11 +13,12 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 侧边导航 -->
|
||||
<!-- 全部商品分类 -->
|
||||
<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>
|
||||
<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 v-for="(second, secIndex) in item.children" :key="secIndex">
|
||||
<span v-if="secIndex < 2" > / </span>
|
||||
|
@ -26,13 +27,11 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<transition name="fade">
|
||||
<!-- 展开分类 -->
|
||||
<div
|
||||
class="detail-item-panel"
|
||||
:duration="{ enter: 100, leave: 100 }"
|
||||
v-show="panel"
|
||||
@mouseenter="panel = true"
|
||||
ref="itemPanel1"
|
||||
@mouseleave="panel = false"
|
||||
>
|
||||
<div class="nav-detail-item">
|
||||
|
@ -57,7 +56,6 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</transition>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -86,12 +84,12 @@ export default {
|
|||
}
|
||||
},
|
||||
computed: {
|
||||
navList () {
|
||||
navList () { // 导航列表
|
||||
return JSON.parse(storage.getItem('navList')) || []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getCate () {
|
||||
getCate () { // 获取分类数据
|
||||
getCategory(0).then(res => {
|
||||
if (res.success) {
|
||||
this.cateList = res.result;
|
||||
|
@ -99,7 +97,7 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
showDetail (index) {
|
||||
showDetail (index) { // 展示全部分类
|
||||
this.panel = true
|
||||
this.panelData = this.cateList[index].children
|
||||
},
|
||||
|
@ -245,9 +243,6 @@ export default {
|
|||
.nav-detail-item span:hover {
|
||||
background-color: $theme_color;
|
||||
}
|
||||
.detail-item-panel ul {
|
||||
list-style: none;
|
||||
}
|
||||
.detail-item-panel li {
|
||||
line-height: 30px;
|
||||
// margin-left: 40px;
|
||||
|
|
|
@ -17,10 +17,10 @@ export default {
|
|||
* @description api请求基础路径
|
||||
*/
|
||||
api_dev: {
|
||||
// common: 'http://192.168.0.103:8890',
|
||||
// buyer: 'http://192.168.0.103:8888',
|
||||
// seller: 'http://192.168.0.103:8889',
|
||||
// manager: 'http://192.168.0.103:8887'
|
||||
// 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'
|
||||
|
||||
common: 'https://common-api.pickmall.cn',
|
||||
buyer: 'https://buyer-api.pickmall.cn',
|
||||
|
|
|
@ -37,6 +37,11 @@ Vue.prototype.linkTo = function (url) {
|
|||
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
|
||||
/* eslint-disable no-new */
|
||||
new Vue({
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<BaseHeader></BaseHeader>
|
||||
<Search></Search>
|
||||
<drawer></drawer>
|
||||
<ShopHeader v-if="goodsMsg.data" :detail="goodsMsg.data"></ShopHeader>
|
||||
<ShopHeader :detail="storeMsg"></ShopHeader>
|
||||
<div class="shop-item-path">
|
||||
<div class="shop-nav-container">
|
||||
<Breadcrumb>
|
||||
|
@ -11,8 +11,9 @@
|
|||
<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"><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="connectCs(storeMsg.yzfSign)" class="ml_10"><Icon custom="icomoon icon-customer-service" />联系客服</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -40,6 +41,7 @@ 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) {
|
||||
|
@ -48,20 +50,15 @@ export default {
|
|||
},
|
||||
created () {
|
||||
this.getGoodsDetail();
|
||||
if (this.Cookies.getItem('userInfo')) {
|
||||
isCollection('STORE', this.goodsMsg.data.storeId).then(res => {
|
||||
if (res.success && res.result) {
|
||||
this.storeCollected = true;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
goodsMsg: {}, // 商品信息
|
||||
isLoading: false, // 加载状态
|
||||
categoryBar: [], // 分类
|
||||
storeCollected: false // 商品收藏
|
||||
storeCollected: false, // 商品收藏
|
||||
storeMsg: {} // 店铺信息
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
@ -83,6 +80,20 @@ export default {
|
|||
});
|
||||
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('/')
|
||||
|
@ -91,7 +102,7 @@ export default {
|
|||
this.$router.push('/')
|
||||
});
|
||||
},
|
||||
goGoodsList (currIndex) {
|
||||
goGoodsList (currIndex) { // 跳转商品列表
|
||||
const arr = []
|
||||
this.categoryBar.forEach((e, index) => {
|
||||
if (index <= currIndex) {
|
||||
|
@ -132,7 +143,6 @@ export default {
|
|||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.shop-item-path {
|
||||
height: 38px;
|
||||
|
@ -146,6 +156,7 @@ export default {
|
|||
padding: 20px 0;
|
||||
@include white_background_color();
|
||||
}
|
||||
|
||||
.shop-nav-container {
|
||||
width: 1200px;
|
||||
margin: 0 auto;
|
||||
|
|
|
@ -9,9 +9,10 @@
|
|||
<img :src="storeMsg.storeLogo" height="50" alt="">
|
||||
<div>
|
||||
<p>{{storeMsg.storeName || 'xx店铺'}}</p>
|
||||
<p>{{storeMsg.storeDesc || 'xx店铺描述'}}</p>
|
||||
<p v-html="storeMsg.storeDesc"></p>
|
||||
</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 class="store-category">
|
||||
|
@ -204,7 +205,7 @@ export default {
|
|||
}
|
||||
}
|
||||
.store-collect{
|
||||
margin-left: 20px!important;
|
||||
margin-left: 750px!important;
|
||||
&:hover{
|
||||
cursor: pointer;
|
||||
}
|
||||
|
|
|
@ -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) => { // 插入分类id和name
|
||||
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>
|
|
@ -4,7 +4,7 @@
|
|||
<Search></Search>
|
||||
<cateNav></cateNav>
|
||||
<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>
|
||||
<h3 class="promotion-decorate">积分商品</h3>
|
||||
<!-- 列表 -->
|
||||
|
@ -39,6 +39,13 @@
|
|||
</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>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -79,11 +86,27 @@ export default {
|
|||
}
|
||||
})
|
||||
},
|
||||
selectCate (id) {
|
||||
selectCate (id) { // 选择商品分类
|
||||
this.params.pointsGoodsCategoryId = id
|
||||
this.getList()
|
||||
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>
|
||||
|
@ -104,8 +127,19 @@ export default {
|
|||
margin: 0 10px;
|
||||
&:hover{
|
||||
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{
|
||||
background-image: url('../../static/sprite@2x.png');
|
||||
|
|
|
@ -34,33 +34,6 @@
|
|||
</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>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -112,6 +112,10 @@ export default {
|
|||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.page-size {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.order-img {
|
||||
> img {
|
||||
width: 60px;
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
<template>
|
||||
<div class="msg-list">
|
||||
会员消息详情
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
detail: {}, // 消息详情
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
|
@ -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>
|
|
@ -41,6 +41,11 @@ const member = [{
|
|||
title: '账户安全',
|
||||
path: 'AccountSafe'
|
||||
},
|
||||
{
|
||||
icon: '',
|
||||
title: '我的消息',
|
||||
path: 'MsgList'
|
||||
},
|
||||
{
|
||||
icon: '',
|
||||
title: '我的足迹',
|
||||
|
|
|
@ -47,6 +47,8 @@ const ComplainList = resolve => require(['@/pages/home/memberCenter/ComplainList
|
|||
const ComplainDetail = resolve => require(['@/pages/home/memberCenter/ComplainDetail'], resolve);
|
||||
const Invoice = resolve => require(['@/pages/home/memberCenter/Invoice'], 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',
|
||||
component: AddAddress
|
||||
},
|
||||
{
|
||||
path: 'MsgList',
|
||||
name: 'MsgList',
|
||||
component: MsgList,
|
||||
meta: {title: '我的消息'}
|
||||
},
|
||||
{
|
||||
path: 'MsgDetail',
|
||||
name: 'MsgDetail',
|
||||
component: MsgDetail,
|
||||
meta: {title: '我的消息'}
|
||||
},
|
||||
{
|
||||
path: 'MyOrder',
|
||||
name: 'MyOrder',
|
||||
|
|
|
@ -98,11 +98,16 @@ export const getMemberStatistics = params => {
|
|||
};
|
||||
|
||||
|
||||
|
||||
// 获取会员注册统计列表
|
||||
export const getStatisticsList = params => {
|
||||
return getRequest("/statistics/view/list", params);
|
||||
};
|
||||
|
||||
// 获取会员历史流量
|
||||
export const historyMemberChartList = () => {
|
||||
return getRequest("/statistics/view/online/history");
|
||||
}
|
||||
|
||||
//查询会员数量
|
||||
export const getMemberNum = params => {
|
||||
return getRequest("/member/num", params);
|
||||
|
@ -121,15 +126,15 @@ export const removeMemberAddress = (id) => {
|
|||
}
|
||||
//添加会员收货地址
|
||||
export const addMemberAddress = (params) => {
|
||||
return postRequest(`/member/address`,params)
|
||||
return postRequest(`/member/address`, params)
|
||||
}
|
||||
//修改会员收货地址
|
||||
export const editMemberAddress = (params) => {
|
||||
return putRequest(`/member/address`,params)
|
||||
return putRequest(`/member/address`, params)
|
||||
}
|
||||
//查询会员预存款
|
||||
export const getMemberWallet = (params) => {
|
||||
return getRequest(`/members/wallet`,params)
|
||||
return getRequest(`/members/wallet`, params)
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -17,14 +17,10 @@ export default {
|
|||
* @description api请求基础路径
|
||||
*/
|
||||
api_dev: {
|
||||
// common: "https://common-api.pickmall.cn",
|
||||
// buyer: "https://buyer-api.pickmall.cn",
|
||||
// seller: "https://store-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'
|
||||
common: "https://common-api.pickmall.cn",
|
||||
buyer: "https://buyer-api.pickmall.cn",
|
||||
seller: "https://store-api.pickmall.cn",
|
||||
manager: "https://admin-api.pickmall.cn"
|
||||
},
|
||||
api_prod: {
|
||||
common: "https://common-api.pickmall.cn",
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<shrinkable-menu></shrinkable-menu>
|
||||
</div>
|
||||
<!-- 顶部标题栏主体 -->
|
||||
<div class="main-header-con" style="padding-left:240px">
|
||||
<div class="main-header-con">
|
||||
<div class="main-header">
|
||||
<div :class="{'header-avator-con':navType!=4, 'header-avator-con nav4':navType == 4}">
|
||||
<!-- 通知消息 -->
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<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">
|
||||
<Input
|
||||
type="text"
|
||||
|
@ -15,44 +19,73 @@
|
|||
/>
|
||||
</Form-item>
|
||||
<Form-item label="状态">
|
||||
<Select v-model="searchForm.distributionStatus" style="width:200px">
|
||||
<Option v-for="item in distributionStatusList" :value="item.value" :key="item.value">{{ item.label }}</Option>
|
||||
<Select
|
||||
v-model="searchForm.distributionStatus"
|
||||
style="width: 200px"
|
||||
>
|
||||
<Option
|
||||
v-for="item in distributionStatusList"
|
||||
:value="item.value"
|
||||
:key="item.value"
|
||||
>{{ item.label }}</Option
|
||||
>
|
||||
</Select>
|
||||
</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>
|
||||
</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>
|
||||
</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>
|
||||
<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>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
import {
|
||||
getDistributionListData,
|
||||
retreatDistribution,
|
||||
resumeDistribution,
|
||||
auditDistribution,
|
||||
} from "@/api/distribution";
|
||||
import {distributionStatusList} from './dataJson.js';
|
||||
export default {
|
||||
} from "@/api/distribution";
|
||||
import { distributionStatusList } from "./dataJson.js";
|
||||
export default {
|
||||
name: "distribution",
|
||||
components: {
|
||||
},
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
distributionStatusList, // 分销状态
|
||||
openSearch: true, // 显示搜索
|
||||
loading: true, // 表单加载状态
|
||||
searchForm: { // 搜索框初始化对象
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
},
|
||||
|
@ -63,7 +96,7 @@
|
|||
title: "会员名称",
|
||||
key: "memberName",
|
||||
minWidth: 120,
|
||||
tooltip: true
|
||||
tooltip: true,
|
||||
},
|
||||
{
|
||||
title: "推广单数",
|
||||
|
@ -77,8 +110,11 @@
|
|||
width: 150,
|
||||
sortable: false,
|
||||
render: (h, params) => {
|
||||
return h('div', this.$options.filters.unitPrice(params.row.rebateTotal, '¥'))
|
||||
}
|
||||
return h(
|
||||
"div",
|
||||
this.$options.filters.unitPrice(params.row.rebateTotal, "¥")
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "可用金额",
|
||||
|
@ -86,8 +122,11 @@
|
|||
width: 150,
|
||||
sortable: false,
|
||||
render: (h, params) => {
|
||||
return h('div', this.$options.filters.unitPrice(params.row.rebateTotal, '¥'))
|
||||
}
|
||||
return h(
|
||||
"div",
|
||||
this.$options.filters.unitPrice(params.row.rebateTotal, "¥")
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "冻结金额",
|
||||
|
@ -95,8 +134,11 @@
|
|||
width: 150,
|
||||
sortable: false,
|
||||
render: (h, params) => {
|
||||
return h('div', this.$options.filters.unitPrice(params.row.rebateTotal, '¥'))
|
||||
}
|
||||
return h(
|
||||
"div",
|
||||
this.$options.filters.unitPrice(params.row.rebateTotal, "¥")
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
|
@ -105,16 +147,24 @@
|
|||
sortable: false,
|
||||
render: (h, params) => {
|
||||
if (params.row.distributionStatus == "PASS") {
|
||||
return h( "Badge", {props: { status: "success",text: "审核通过" } })
|
||||
return h("Badge", {
|
||||
props: { status: "success", text: "审核通过" },
|
||||
});
|
||||
} else if (params.row.distributionStatus == "APPLY") {
|
||||
return h( "Badge", {props: { status: "processing",text: "申请中" } })
|
||||
return h("Badge", {
|
||||
props: { status: "processing", text: "申请中" },
|
||||
});
|
||||
} else if (params.row.distributionStatus == "RETREAT") {
|
||||
return h( "Badge", {props: { status: "warning",text: "已清退" } })
|
||||
return h("Badge", {
|
||||
props: { status: "warning", text: "已清退" },
|
||||
});
|
||||
} else if (params.row.distributionStatus == "REFUSE") {
|
||||
return h( "Badge", {props: { status: "error",text: "审核拒绝" } })
|
||||
}
|
||||
return h("Badge", {
|
||||
props: { status: "error", text: "审核拒绝" },
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
key: "action",
|
||||
|
@ -122,11 +172,13 @@
|
|||
fixed: "right",
|
||||
width: 140,
|
||||
render: (h, params) => {
|
||||
return h("div",{
|
||||
style:{
|
||||
display:'flex',
|
||||
justifyContent:'center'
|
||||
}
|
||||
return h(
|
||||
"div",
|
||||
{
|
||||
style: {
|
||||
display: "flex",
|
||||
justifyContent: "center",
|
||||
},
|
||||
},
|
||||
[
|
||||
h(
|
||||
|
@ -134,14 +186,20 @@
|
|||
{
|
||||
props: {
|
||||
type: "error",
|
||||
size: "small"
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px",
|
||||
display:
|
||||
params.row.distributionStatus != "RETREAT"
|
||||
? "block"
|
||||
: "none",
|
||||
},
|
||||
style:{marginRight:'5px', display:params.row.distributionStatus!='RETREAT'?'block':'none'},
|
||||
on: {
|
||||
click: () => {
|
||||
this.retreat(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"清退"
|
||||
),
|
||||
|
@ -150,23 +208,30 @@
|
|||
{
|
||||
props: {
|
||||
type: "success",
|
||||
size: "small"
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px",
|
||||
display:
|
||||
params.row.distributionStatus == "RETREAT"
|
||||
? "block"
|
||||
: "none",
|
||||
},
|
||||
style:{marginRight:'5px', display:params.row.distributionStatus=='RETREAT'?'block':'none'},
|
||||
on: {
|
||||
click: () => {
|
||||
this.resume(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"恢复"
|
||||
)
|
||||
]);
|
||||
}
|
||||
}
|
||||
),
|
||||
]
|
||||
);
|
||||
},
|
||||
},
|
||||
],
|
||||
data: [], // 表单数据
|
||||
total: 0 // 表单数据总数
|
||||
total: 0, // 表单数据总数
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
@ -176,7 +241,7 @@
|
|||
see(v) {
|
||||
this.$router.push({
|
||||
name: "distributionOrder",
|
||||
query: { id:v.memberId }
|
||||
query: { id: v.memberId },
|
||||
});
|
||||
},
|
||||
changePage(v) {
|
||||
|
@ -194,7 +259,8 @@
|
|||
this.getDataList();
|
||||
},
|
||||
|
||||
clearSelectAll() { // 清空
|
||||
clearSelectAll() {
|
||||
// 清空
|
||||
this.$refs.table.selectAll(false);
|
||||
},
|
||||
changeSelect(e) {
|
||||
|
@ -206,7 +272,7 @@
|
|||
this.loading = true;
|
||||
this.searchForm.status = "PASS";
|
||||
// 带多条件搜索参数获取表单数据 请自行修改接口
|
||||
getDistributionListData(this.searchForm).then(res => {
|
||||
getDistributionListData(this.searchForm).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.data = res.result.records;
|
||||
|
@ -223,41 +289,41 @@
|
|||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
retreatDistribution(v.id).then(res => {
|
||||
retreatDistribution(v.id).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
// 恢复分销商
|
||||
resume(v){
|
||||
resume(v) {
|
||||
this.$Modal.confirm({
|
||||
title: '提示',
|
||||
title: "提示",
|
||||
// 记得确认修改此处
|
||||
content: "您确认要恢复 " + v.memberName + " ?",
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
resumeDistribution(v.id).then(res => {
|
||||
resumeDistribution(v.id).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
}
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@import "@/styles/table-common.scss";
|
||||
@import "@/styles/table-common.scss";
|
||||
</style>
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<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">
|
||||
<Input
|
||||
type="text"
|
||||
|
@ -14,45 +18,64 @@
|
|||
style="width: 200px"
|
||||
/>
|
||||
</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>
|
||||
</Row>
|
||||
<Row style="margin-top: 10px">
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"
|
||||
@on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||
</Row>
|
||||
<Table
|
||||
class="mt_10"
|
||||
: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>
|
||||
<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>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getDistributionListData,
|
||||
auditDistribution
|
||||
} from "@/api/distribution";
|
||||
import { getDistributionListData, auditDistribution } from "@/api/distribution";
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: "distributionApply",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
loading: true, // 表单加载状态
|
||||
searchForm: { // 搜索框初始化对象
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
startDate: "", // 起始时间
|
||||
endDate: "" // 终止时间
|
||||
endDate: "", // 终止时间
|
||||
},
|
||||
form: { // 添加或编辑表单对象初始化数据
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
memberName: "",
|
||||
},
|
||||
// 表单验证规则
|
||||
|
@ -92,13 +115,13 @@
|
|||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px"
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.audit(params.row, "PASS");
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"通过"
|
||||
),
|
||||
|
@ -112,17 +135,17 @@
|
|||
on: {
|
||||
click: () => {
|
||||
this.audit(params.row, "REFUSE");
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"拒绝"
|
||||
)
|
||||
),
|
||||
]);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
data: [], // 表单数据
|
||||
total: 0 // 表单数据总数
|
||||
total: 0, // 表单数据总数
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
@ -168,7 +191,7 @@
|
|||
this.loading = true;
|
||||
this.searchForm.distributionStatus = "APPLY";
|
||||
// 带多条件搜索参数获取表单数据 请自行修改接口
|
||||
getDistributionListData(this.searchForm).then(res => {
|
||||
getDistributionListData(this.searchForm).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.data = res.result.records;
|
||||
|
@ -183,35 +206,35 @@
|
|||
},
|
||||
//审核
|
||||
audit(v, status) {
|
||||
let test = "拒绝"
|
||||
let test = "拒绝";
|
||||
if (status == "PASS") {
|
||||
test = "通过"
|
||||
test = "通过";
|
||||
}
|
||||
let params = {
|
||||
status : status
|
||||
}
|
||||
status: status,
|
||||
};
|
||||
this.$Modal.confirm({
|
||||
title: "确认" + test,
|
||||
// 记得确认修改此处
|
||||
content: "您确认要" + test + " " + v.memberName + " ?",
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
auditDistribution(v.id, params).then(res => {
|
||||
auditDistribution(v.id, params).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
}
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@import "@/styles/table-common.scss";
|
||||
@import "@/styles/table-common.scss";
|
||||
</style>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch" >
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
|
@ -21,15 +19,11 @@
|
|||
</Form-item>
|
||||
</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"></Table>
|
||||
</Row>
|
||||
<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">
|
||||
<Form ref="form" :model="form" :label-width="100" :rules="formValidate" >
|
||||
<FormItem label="编号">
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
|
@ -20,7 +18,6 @@
|
|||
<Row class="operation" style="margin-top: 10px">
|
||||
<Button @click="delAll">批量删除</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect">
|
||||
<template slot="goodsName" slot-scope="{row}">
|
||||
<div>
|
||||
|
@ -36,13 +33,10 @@
|
|||
</div>
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10,20,50]" size="small" show-total show-elevator show-sizer></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row v-show="openSearch" @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
|
@ -36,19 +34,13 @@
|
|||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
|
||||
<Row class="padding-row">
|
||||
<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"
|
||||
@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>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch"> </Row>
|
||||
<Row class="operation">
|
||||
|
@ -9,7 +7,6 @@
|
|||
|
||||
<Button @click="delAll">批量删除</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -20,7 +17,6 @@
|
|||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -36,8 +32,6 @@
|
|||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<Modal
|
||||
:title="modalTitle"
|
||||
v-model="modalVisible"
|
||||
|
|
|
@ -70,7 +70,6 @@
|
|||
<Tabs v-model="orderStatus" @on-click="handleClickType">
|
||||
<TabPane label="行业订单数量" name="NUM">
|
||||
<Table :columns="columns" :data="data"></Table>
|
||||
|
||||
</TabPane>
|
||||
<TabPane label="行业订单金额" name="PRICE">
|
||||
<Table :columns="columns" :data="data"></Table>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form
|
||||
|
@ -43,7 +41,6 @@
|
|||
<Button @click="handleSearch" class="search-btn" type="primary" icon="ios-search" >搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -77,7 +74,6 @@
|
|||
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -93,8 +89,6 @@
|
|||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<Modal
|
||||
:title="modalTitle"
|
||||
v-model="modalVisible"
|
||||
|
@ -105,7 +99,6 @@
|
|||
ref="underForm"
|
||||
:model="underForm"
|
||||
:label-width="100"
|
||||
:rules="formValidate"
|
||||
>
|
||||
<FormItem label="下架原因" prop="reason">
|
||||
<Input v-model="underForm.reason" clearable style="width: 100%" />
|
||||
|
@ -133,9 +126,6 @@ export default {
|
|||
modalType: 0, // 添加或编辑标识
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
drop: false, // 展开搜索框
|
||||
dropDownContent: "展开", // 展开标签文字
|
||||
dropDownIcon: "ios-arrow-down", // 展开图标
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
|
@ -146,17 +136,6 @@ export default {
|
|||
underForm: { // 下架原因
|
||||
reason: "",
|
||||
},
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
goodsName: "",
|
||||
sn: "",
|
||||
marketEnable: "",
|
||||
price: "",
|
||||
sellerName: "",
|
||||
},
|
||||
// 表单验证规则
|
||||
|
||||
formValidate: {},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
|
@ -379,16 +358,6 @@ export default {
|
|||
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;
|
||||
// 带多条件搜索参数获取表单数据
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form
|
||||
|
@ -32,7 +30,6 @@
|
|||
<Button @click="handleSearch" class="search-btn" type="primary" icon="ios-search" >搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -60,7 +57,6 @@
|
|||
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -76,8 +72,6 @@
|
|||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -105,16 +99,6 @@
|
|||
goodsAuditForm: { // 商品编辑表单
|
||||
is_auth: 1,
|
||||
},
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
goodsName: "",
|
||||
sn: "",
|
||||
marketEnable: "",
|
||||
price: "",
|
||||
sellerName: "",
|
||||
},
|
||||
// 表单验证规则
|
||||
formValidate: {},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
</style>
|
||||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form
|
||||
|
@ -30,7 +28,6 @@
|
|||
<Row class="operation padding-row">
|
||||
<Button @click="add" type="primary">添加</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -41,7 +38,6 @@
|
|||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -57,8 +53,6 @@
|
|||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<Modal
|
||||
:title="modalTitle"
|
||||
v-model="modalVisible"
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form
|
||||
|
@ -28,7 +26,6 @@
|
|||
<Button @click="add" type="primary" >添加</Button>
|
||||
<Button @click="delAll" >批量删除</Button>
|
||||
</Row>
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -39,9 +36,7 @@
|
|||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
>
|
||||
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -57,8 +52,6 @@
|
|||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<Modal
|
||||
:title="modalTitle"
|
||||
v-model="modalVisible"
|
||||
|
|
|
@ -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>
|
|
@ -1,6 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
|
@ -10,7 +9,6 @@
|
|||
<Button @click="handleSearch" type="primary" class="search-btn" 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">
|
||||
<!-- 页面展示 -->
|
||||
|
@ -24,15 +22,12 @@
|
|||
</i-switch>
|
||||
</template>
|
||||
</Table>
|
||||
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage"
|
||||
@on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
|
||||
size="small" show-total show-elevator show-sizer></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</Row>
|
||||
|
||||
<Modal v-model="infoFlag" width="800" :title="infoTitle">
|
||||
|
||||
|
@ -68,7 +63,7 @@
|
|||
<div style="margin-left: 40px">
|
||||
<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"
|
||||
alt="" />
|
||||
alt="" :key="index"/>
|
||||
</div>
|
||||
</div>
|
||||
</List>
|
||||
|
@ -81,7 +76,7 @@
|
|||
</div>
|
||||
<div v-if="infoData.haveReplyImage == 1">
|
||||
<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=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -114,16 +109,6 @@ export default {
|
|||
startDate: "", // 起始时间
|
||||
endDate: "", // 终止时间
|
||||
},
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
memberName: "",
|
||||
storeName: "",
|
||||
shopDisable: "",
|
||||
id: "",
|
||||
createTime: "",
|
||||
},
|
||||
// 表单验证规则
|
||||
formValidate: {},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
|
|
|
@ -172,14 +172,22 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- chart -->
|
||||
<div class="card transform">
|
||||
<div>
|
||||
<h4>最近48小时在线人数(整点为准)</h4>
|
||||
<div id="historyMemberChart"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- chart -->
|
||||
<div class="charts flex">
|
||||
<div class="chart-item">
|
||||
<h4>流量统计</h4>
|
||||
<h4>流量走势</h4>
|
||||
<div id="pvChart"></div>
|
||||
</div>
|
||||
<div class="chart-item">
|
||||
<h4>交易统计</h4>
|
||||
<h4>交易趋势</h4>
|
||||
<div id="orderChart"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -279,6 +287,7 @@ export default {
|
|||
homeData: "", // 首页数据
|
||||
pvChart: "", // 流量统计
|
||||
orderChart: "", // 订单统计
|
||||
historyMemberChart: "", // 最近会员流量统计
|
||||
params: { // 请求参数
|
||||
searchType: "LAST_SEVEN",
|
||||
},
|
||||
|
@ -308,13 +317,13 @@ export default {
|
|||
},
|
||||
// top10热卖商品
|
||||
async toHotGoods() {
|
||||
let res = await hotGoods();
|
||||
let res = await hotGoods(this.params);
|
||||
res.success ? (this.topHotGoodsData = res.result) : "";
|
||||
},
|
||||
|
||||
// top10热卖店铺
|
||||
async topHotShops() {
|
||||
let res = await hotShops();
|
||||
let res = await hotShops(this.params);
|
||||
res.success ? (this.topHotShopsData = res.result) : "";
|
||||
},
|
||||
// 今日待办
|
||||
|
@ -323,6 +332,7 @@ export default {
|
|||
res.success ? (this.awaitTodoData = res.result) : "";
|
||||
},
|
||||
|
||||
//首页统计数据
|
||||
async getHomeData() {
|
||||
let res = await homeStatistics();
|
||||
if (res.success) {
|
||||
|
@ -358,6 +368,7 @@ export default {
|
|||
}
|
||||
},
|
||||
|
||||
|
||||
initOrderChart() {
|
||||
// 默认已经加载 legend-filter 交互
|
||||
let data = this.chartList;
|
||||
|
@ -393,6 +404,9 @@ export default {
|
|||
this.orderChart.render();
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
// 浏览量统计图
|
||||
initPvChart() {
|
||||
let uv = [];
|
||||
|
@ -465,8 +479,54 @@ export default {
|
|||
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() {
|
||||
this.toHotGoods();
|
||||
|
@ -475,6 +535,7 @@ export default {
|
|||
this.getHomeData();
|
||||
this.getPvChart();
|
||||
this.initOrderChartList();
|
||||
this.initHistoryMemberChartList();
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
|
|
|
@ -114,6 +114,7 @@ export default {
|
|||
res.result.records.forEach((item) => {
|
||||
item.selected = false;
|
||||
item.___type = "goods"; //设置为goods让pc wap知道标识
|
||||
|
||||
this.selectedWay.forEach(e => {
|
||||
if (e.id === item.id) {
|
||||
item.selected = true
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<template>
|
||||
<Modal :styles="{ top: '120px' }" width="1160" @on-cancel="clickClose" @on-ok="clickOK" v-model="flag" :mask-closable="false" scrollable>
|
||||
<template v-if="flag">
|
||||
<goodsDialog @selected="(val) => {goodsData = val;}"
|
||||
v-if="goodsFlag" ref="goodsDialog" :selectedWay='goodsData'/>
|
||||
<linkDialog @selectedLink="
|
||||
|
@ -7,6 +8,7 @@
|
|||
linkData = val;
|
||||
}
|
||||
" v-else class="linkDialog" />
|
||||
</template>
|
||||
</Modal>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -25,9 +27,6 @@ export default {
|
|||
flag: false, // modal显隐
|
||||
};
|
||||
},
|
||||
props: ["types"],
|
||||
watch: {},
|
||||
mounted() {},
|
||||
methods: {
|
||||
// 关闭弹窗
|
||||
clickClose() {
|
||||
|
@ -51,13 +50,17 @@ export default {
|
|||
}
|
||||
this.clickClose();
|
||||
},
|
||||
open(type) {
|
||||
open(type, mutiple) {
|
||||
this.flag = true;
|
||||
if (type == "goods") {
|
||||
this.goodsFlag = true;
|
||||
if (mutiple) {
|
||||
this.singleGoods()
|
||||
}
|
||||
} else {
|
||||
this.goodsFlag = false;
|
||||
}
|
||||
|
||||
},
|
||||
close() {
|
||||
this.flag = false;
|
||||
|
|
|
@ -40,7 +40,7 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs["lili-component"][0].type = "single"; //如果商品页面设置成为单选
|
||||
this.$refs["lili-component"][0].type = "single"; //商品页面设置成为单选
|
||||
});
|
||||
|
||||
this.wap.forEach((item) => {
|
||||
|
|
|
@ -65,7 +65,7 @@ export default {
|
|||
},
|
||||
{
|
||||
title: "店铺名称",
|
||||
key: "sellerName",
|
||||
key: "storeName",
|
||||
tooltip: true,
|
||||
},
|
||||
{
|
||||
|
@ -113,7 +113,7 @@ export default {
|
|||
},
|
||||
{
|
||||
title: "店铺名称",
|
||||
key: "sellerName",
|
||||
key: "storeName",
|
||||
tooltip: true,
|
||||
},
|
||||
{
|
||||
|
|
|
@ -176,12 +176,16 @@ export default {
|
|||
handleSelectGoods(item) { // 调起选择商品
|
||||
console.warn(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) {
|
||||
this.selected.url = this.$options.filters.formatLinkType(val);
|
||||
},
|
||||
selectedGoodsData (val) {
|
||||
console.log(val);
|
||||
let goods = val[0]
|
||||
console.log(this.selected);
|
||||
this.selected.img = goods.thumbnail
|
||||
|
|
|
@ -108,7 +108,10 @@ export default {
|
|||
},
|
||||
handleSelectGoods(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) {
|
||||
this.selected.url = this.$options.filters.formatLinkType(val);
|
||||
|
|
|
@ -241,7 +241,7 @@ export default {
|
|||
},
|
||||
handleSelectGoods(item) {
|
||||
// 调起选择商品
|
||||
this.$refs.liliDialog.open("goods");
|
||||
this.$refs.liliDialog.open('goods', 'single')
|
||||
},
|
||||
selectedLink(val) {
|
||||
this.selected.url = this.$options.filters.formatLinkType(val);
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch"></Row>
|
||||
<Row class="operation padding-row">
|
||||
<Button @click="add" type="primary">添加</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -26,7 +23,6 @@
|
|||
</i-switch>
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -42,8 +38,6 @@
|
|||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<Modal
|
||||
:title="modalTitle"
|
||||
v-model="modalVisible"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<template>
|
||||
<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">
|
||||
{{item.title}}
|
||||
</MenuItem>
|
||||
|
@ -12,7 +12,7 @@
|
|||
<Menu
|
||||
ref="childrenMenu"
|
||||
:active-name="$route.name"
|
||||
width="130px"
|
||||
width="100px"
|
||||
@on-select="changeMenu"
|
||||
>
|
||||
<template v-for="item in menuList">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.ivu-shrinkable-menu{
|
||||
height: calc(100% - 60px);
|
||||
width: 240px;
|
||||
width: 180px;
|
||||
display: flex;
|
||||
}
|
||||
.ivu-menu-vertical .ivu-menu-item-group-title {
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
box-sizing: border-box;
|
||||
position: fixed;
|
||||
display: block;
|
||||
padding-left: 200px;
|
||||
padding-left: 180px;
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
z-index: 20;
|
||||
|
@ -256,12 +256,12 @@
|
|||
.single-page-con {
|
||||
min-width: 740px;
|
||||
position: relative;
|
||||
left: 240px;
|
||||
left: 180px;
|
||||
top: 100px;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
height: calc(100% - 110px);
|
||||
width: calc(100% - 240px);
|
||||
width: calc(100% - 180px);
|
||||
overflow: auto;
|
||||
background-color: #f0f0f0;
|
||||
z-index: 1;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form
|
||||
|
@ -43,7 +41,6 @@
|
|||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -54,7 +51,6 @@
|
|||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -70,8 +66,6 @@
|
|||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
|
||||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
|
@ -15,16 +13,12 @@
|
|||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</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"></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>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form
|
||||
|
@ -50,7 +48,6 @@
|
|||
</Form-item>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -61,7 +58,6 @@
|
|||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -77,8 +73,6 @@
|
|||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<Modal
|
||||
:title="modalTitle"
|
||||
v-model="roleModalVisible"
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
|
@ -22,17 +21,13 @@
|
|||
<Button @click="addMember" type="primary">添加会员</Button>
|
||||
</Row>
|
||||
|
||||
<Row>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect">
|
||||
</Table>
|
||||
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
|
||||
size="small" show-total show-elevator show-sizer></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</Row>
|
||||
|
||||
<!-- 添加用户模态框 -->
|
||||
<Modal v-model="addFlag" title="添加用户">
|
||||
|
|
|
@ -78,7 +78,6 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="point-data" style="margin-top: -5px">
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -89,7 +88,6 @@
|
|||
@on-sort-change="pointChangeSort"
|
||||
>
|
||||
</Table>
|
||||
</Row>
|
||||
|
||||
<Row type="flex" justify="end" class="page" style="margin-top: 10px">
|
||||
<Page
|
||||
|
@ -168,7 +166,6 @@
|
|||
</Form>
|
||||
</Row>
|
||||
<div style="min-height: 180px">
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -179,7 +176,6 @@
|
|||
@on-sort-change="orderChangeSort"
|
||||
>
|
||||
</Table>
|
||||
</Row>
|
||||
|
||||
<Row type="flex" justify="end" class="page" style="margin-top: 10px">
|
||||
<Page
|
||||
|
@ -201,7 +197,6 @@
|
|||
<Row class="operation padding-row">
|
||||
<Button @click="addMemberAddress" type="primary">新增</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -212,7 +207,6 @@
|
|||
@on-sort-change="addressChangeSort"
|
||||
>
|
||||
</Table>
|
||||
</Row>
|
||||
|
||||
<Row type="flex" justify="end" class="page" style="margin-top: 10px">
|
||||
<Page
|
||||
|
@ -249,7 +243,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -260,7 +253,6 @@
|
|||
@on-sort-change="walletChangeSort"
|
||||
>
|
||||
</Table>
|
||||
</Row>
|
||||
|
||||
<Row type="flex" justify="end" class="page" style="margin-top: 10px">
|
||||
<Page
|
||||
|
@ -292,7 +284,6 @@
|
|||
<Button @click="getReceiptRecordData" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -308,7 +299,6 @@
|
|||
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
|
||||
<Row type="flex" justify="end" class="page" style="margin-top: 10px">
|
||||
<Page
|
||||
|
@ -502,7 +492,20 @@
|
|||
{
|
||||
title: "来源",
|
||||
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: "订单状态",
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
<Button @click="handleSearch" class="search-btn" type="primary" icon="ios-search">搜索</Button >
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -44,8 +43,6 @@
|
|||
@on-selection-change="changeSelect"
|
||||
>
|
||||
</Table>
|
||||
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
|
|
@ -101,7 +101,6 @@
|
|||
<a class="select-clear" @click="clearSelectAll">清空</a>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -112,7 +111,6 @@
|
|||
@on-selection-change="showSelect"
|
||||
ref="memberTable"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -145,7 +143,6 @@
|
|||
<a class="select-clear" @click="clearSelectAll">清空</a>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -156,7 +153,6 @@
|
|||
@on-selection-change="showSelect"
|
||||
ref="shopTable"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -191,7 +187,6 @@
|
|||
<a class="select-clear" @click="clearSelectAll">清空</a>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -202,7 +197,6 @@
|
|||
@on-selection-change="showSelect"
|
||||
ref="weChatTable"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="weChatSearchForm.pageNumber"
|
||||
|
@ -236,7 +230,6 @@
|
|||
<a class="select-clear" @click="clearSelectAll">清空</a>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -247,7 +240,6 @@
|
|||
@on-selection-change="showSelect"
|
||||
ref="otherTable"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -275,7 +267,7 @@
|
|||
import {
|
||||
getMessageData,
|
||||
editSmsMessageTemplate,
|
||||
editNoticeMessageTemplate,
|
||||
editNoticeMessage,
|
||||
wechatMessageSync,
|
||||
getWechatMessagePage,
|
||||
editWechatMessageTemplate,
|
||||
|
@ -600,7 +592,7 @@
|
|||
noticeFormDataEdit(){
|
||||
this.$refs['noticeFormData'].validate((valid) => {
|
||||
if (valid) {
|
||||
editNoticeMessageTemplate(this.messageTemplateId,this.noticeFormData).then(res => {
|
||||
editNoticeMessage(this.messageTemplateId,this.noticeFormData).then(res => {
|
||||
if(res.message === 'success') {
|
||||
this.$Message.success('站内信修改成功');
|
||||
this.noticeModal = false;
|
||||
|
|
|
@ -75,7 +75,6 @@
|
|||
<a class="select-clear" @click="clearSelectAll">清空</a>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -86,7 +85,6 @@
|
|||
@on-selection-change="showSelect"
|
||||
ref="table"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
<a class="select-clear" @click="clearSelectAll">清空</a>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -52,7 +51,6 @@
|
|||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="pageNumber"
|
||||
|
|
|
@ -46,7 +46,6 @@
|
|||
<Row class="operation">
|
||||
<Button @click="weChatSync" type="primary">同步微信消息</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -54,7 +53,6 @@
|
|||
:data="weChatData"
|
||||
ref="weChatTable"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="weChatSearchForm.pageNumber"
|
||||
|
@ -77,7 +75,6 @@
|
|||
<Row class="operation">
|
||||
<Button @click="weChatSync('mp')" type="primary">同步微信小程序订阅消息</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -86,7 +83,6 @@
|
|||
sortable="custom"
|
||||
ref="weChatMPTable"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="weChatMPSearchForm.pageNumber"
|
||||
|
|
|
@ -1,32 +1,61 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<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="title">
|
||||
<Input type="text" v-model="searchForm.title" placeholder="请输入标题" clearable style="width: 200px"/>
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.title"
|
||||
placeholder="请输入标题"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="消息内容" prop="content">
|
||||
<Input type="text" v-model="searchForm.content" placeholder="请输入消息内容" clearable style="width: 200px"/>
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.content"
|
||||
placeholder="请输入消息内容"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
/>
|
||||
</Form-item>
|
||||
<span v-if="drop">
|
||||
<Form-item label="发送类型" prop="sendType">
|
||||
<Select v-model="searchForm.sendType" placeholder="请选择" clearable style="width: 200px">
|
||||
<Select
|
||||
v-model="searchForm.sendType"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
>
|
||||
<Option value="ALL">全站会员</Option>
|
||||
<Option value="SELECT">指定会员</Option>
|
||||
</Select>
|
||||
</Form-item>
|
||||
<Form-item label="创建人" prop="createBy">
|
||||
<Input type="text" v-model="searchForm.createBy" placeholder="请输入创建人" clearable style="width: 200px"/>
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.createBy"
|
||||
placeholder="请输入创建人"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
/>
|
||||
</Form-item>
|
||||
</span>
|
||||
<Form-item style="margin-left:-35px;" class="br">
|
||||
<Button @click="handleSearch" type="primary" icon="ios-search">搜索</Button>
|
||||
<Form-item style="margin-left: -35px" class="br">
|
||||
<Button @click="handleSearch" type="primary" icon="ios-search"
|
||||
>搜索</Button
|
||||
>
|
||||
<Button @click="handleReset">重置</Button>
|
||||
<a class="drop-down" @click="dropDown">
|
||||
{{dropDownContent}}
|
||||
{{ dropDownContent }}
|
||||
<Icon :type="dropDownIcon"></Icon>
|
||||
</a>
|
||||
</Form-item>
|
||||
|
@ -39,27 +68,42 @@
|
|||
</Row>
|
||||
<Row v-show="openTip">
|
||||
<Alert show-icon>
|
||||
已选择 <span class="select-count">{{selectCount}}</span> 项
|
||||
已选择 <span class="select-count">{{ selectCount }}</span> 项
|
||||
<a class="select-clear" @click="clearSelectAll">清空</a>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||
</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>
|
||||
<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>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
export default {
|
||||
name: "member-notice-sender",
|
||||
components: {
|
||||
},
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
openSearch: true, // 显示搜索
|
||||
|
@ -71,7 +115,8 @@
|
|||
drop: false, // 更多搜索项
|
||||
dropDownContent: "展开", // drop中文提示
|
||||
dropDownIcon: "ios-arrow-down", // drop图标
|
||||
searchForm: { // 搜索框初始化对象
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
|
@ -85,12 +130,12 @@
|
|||
{
|
||||
type: "selection",
|
||||
width: 60,
|
||||
align: "center"
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
type: "index",
|
||||
width: 60,
|
||||
align: "center"
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "标题",
|
||||
|
@ -110,22 +155,21 @@
|
|||
h("Badge", {
|
||||
props: {
|
||||
status: "success",
|
||||
text: "全部会员"
|
||||
}
|
||||
})
|
||||
text: "全部会员",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
}else{
|
||||
} else {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "success",
|
||||
text: "指定会员"
|
||||
}
|
||||
})
|
||||
text: "指定会员",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "创建人",
|
||||
|
@ -152,22 +196,22 @@
|
|||
props: {
|
||||
type: "error",
|
||||
size: "small",
|
||||
icon: "md-trash"
|
||||
icon: "md-trash",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.remove(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"删除"
|
||||
)
|
||||
),
|
||||
]);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
data: [], // 表单数据
|
||||
total: 0 // 表单数据总数
|
||||
total: 0, // 表单数据总数
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
@ -223,13 +267,15 @@
|
|||
getDataList() {
|
||||
this.loading = true;
|
||||
// 带多条件搜索参数获取表单数据 请自行修改接口
|
||||
this.getRequest("/memberNoticeSenter/getByPage", this.searchForm).then(res => {
|
||||
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 = [
|
||||
//];
|
||||
|
@ -240,7 +286,7 @@
|
|||
let query = { type: 0, backRoute: this.$route.name };
|
||||
this.$router.push({
|
||||
name: "add_message",
|
||||
query: query
|
||||
query: query,
|
||||
});
|
||||
},
|
||||
edit(v) {
|
||||
|
@ -266,18 +312,20 @@
|
|||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
this.deleteRequest("/memberNoticeSenter/delByIds/" + v.id).then(res => {
|
||||
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() {
|
||||
|
@ -291,37 +339,39 @@
|
|||
loading: true,
|
||||
onOk: () => {
|
||||
let ids = "";
|
||||
this.selectList.forEach(function(e) {
|
||||
this.selectList.forEach(function (e) {
|
||||
ids += e.id + ",";
|
||||
});
|
||||
ids = ids.substring(0, ids.length - 1);
|
||||
// 批量删除
|
||||
this.deleteRequest("/memberNoticeSenter/delByIds/" + ids).then(res => {
|
||||
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>
|
||||
<style lang="scss">
|
||||
// 建议引入通用样式 可删除下面样式代码
|
||||
// @import "@/styles/table-common.scss";
|
||||
.search {
|
||||
// 建议引入通用样式 可删除下面样式代码
|
||||
// @import "@/styles/table-common.scss";
|
||||
.search {
|
||||
.operation {
|
||||
margin-bottom: 2vh;
|
||||
}
|
||||
|
@ -338,5 +388,5 @@
|
|||
.drop-down {
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
<Button @click="handleSearch" class="search-btn" type="primary" icon="ios-search">搜索</Button >
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -34,8 +33,6 @@
|
|||
@on-selection-change="changeSelect"
|
||||
>
|
||||
</Table>
|
||||
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
<Row class="operation" style="margin-bottom: 10px">
|
||||
<Button @click="add" type="primary" >添加</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -21,7 +20,6 @@
|
|||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -45,7 +43,6 @@
|
|||
<Row class="operation" style="margin-bottom: 10px">
|
||||
<Button @click="add" type="primary" icon="md-add">添加</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -56,7 +53,6 @@
|
|||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -80,7 +76,6 @@
|
|||
<Row class="operation" style="margin-bottom: 10px">
|
||||
<Button @click="add" type="primary" icon="md-add">添加</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -91,7 +86,6 @@
|
|||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -116,7 +110,6 @@
|
|||
<Button @click="add" type="primary" icon="md-add">添加</Button>
|
||||
<Button @click="getDataList" icon="md-refresh">刷新</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -127,7 +120,6 @@
|
|||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
|
|
@ -73,7 +73,6 @@
|
|||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -106,7 +105,6 @@
|
|||
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
|
@ -36,8 +34,6 @@
|
|||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -58,7 +54,6 @@
|
|||
</Poptip>
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -74,8 +69,6 @@
|
|||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<Modal
|
||||
:title="modalTitle"
|
||||
v-model="modalVisible"
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
|
@ -29,16 +27,12 @@
|
|||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</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"></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>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
|
@ -21,18 +19,14 @@
|
|||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</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"></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>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -57,14 +51,6 @@ export default {
|
|||
isRefund: "",
|
||||
},
|
||||
selectDate: null,
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
sn: "",
|
||||
sellerName: "",
|
||||
startTime: "",
|
||||
endTime: "",
|
||||
billPrice: "",
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
title: "售后单号",
|
||||
|
|
|
@ -51,7 +51,6 @@
|
|||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -62,7 +61,6 @@
|
|||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -106,16 +104,6 @@
|
|||
orderStatus: ""
|
||||
},
|
||||
selectDate: null, // 下单时间
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
sn: "",
|
||||
sellerName: "",
|
||||
startTime: "",
|
||||
endTime: "",
|
||||
billPrice: "",
|
||||
},
|
||||
// 表单验证规则
|
||||
formValidate: {},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
|
|
|
@ -212,7 +212,7 @@
|
|||
<li>
|
||||
<span class="label">应付金额:</span>
|
||||
<span class="txt flowPrice"
|
||||
>¥{{ orderInfo.order.priceDetailDTO.flowPrice }}</span
|
||||
>¥{{ orderInfo.order.priceDetailDTO.flowPrice | unitPrice }}</span
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
|
@ -35,16 +34,15 @@
|
|||
|
||||
</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"></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>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -121,16 +119,6 @@ export default {
|
|||
orderStatus: "",
|
||||
},
|
||||
selectDate: null,
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
sn: "",
|
||||
sellerName: "",
|
||||
startTime: "",
|
||||
endTime: "",
|
||||
billPrice: "",
|
||||
},
|
||||
// 表单验证规则
|
||||
formValidate: {},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
|
|
|
@ -58,7 +58,6 @@
|
|||
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -75,7 +74,6 @@
|
|||
@click="$router.push({name: 'order-detail',query: {sn: scope.row.orderSn}})">{{scope.row.orderSn}}</a>
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -114,20 +112,10 @@
|
|||
receiptStatus: "", // 起始时间
|
||||
},
|
||||
shopsData: [], // 店铺数据
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
sn: "",
|
||||
sellerName: "",
|
||||
startTime: "",
|
||||
endTime: "",
|
||||
billPrice: "",
|
||||
},
|
||||
params: {
|
||||
pageNumber: 1,
|
||||
pageSize: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
// 表单验证规则
|
||||
formValidate: {},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
|
@ -293,25 +281,6 @@
|
|||
this.total = this.data.length;
|
||||
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() {
|
||||
this.init();
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
<Row class="operation padding-row">
|
||||
<Button @click="add" type="primary" style="">添加</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<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">
|
||||
|
@ -33,14 +32,13 @@
|
|||
</i-switch>
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
|
||||
size="small" show-total show-elevator>
|
||||
|
||||
</Page>
|
||||
</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">
|
||||
|
@ -73,6 +71,8 @@
|
|||
<Button type="primary" :loading="submitLoading" @click="handleSubmit">提交</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
</template>
|
||||
|
||||
</Card>
|
||||
</Col>
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Card>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -15,7 +14,6 @@
|
|||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="pageNumber"
|
||||
|
|
|
@ -1,38 +1,68 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row class="operation">
|
||||
<Button @click="add" type="primary" icon="md-add">添加</Button>
|
||||
<Button @click="disableAll" icon="md-trash">批量禁用</Button>
|
||||
<Button @click="getDataList" icon="md-refresh">刷新</Button>
|
||||
<Button type="dashed" @click="openTip=!openTip">{{openTip ? "关闭提示" : "开启提示"}}</Button>
|
||||
<Button type="dashed" @click="openTip = !openTip">{{
|
||||
openTip ? "关闭提示" : "开启提示"
|
||||
}}</Button>
|
||||
</Row>
|
||||
<Row v-show="openTip">
|
||||
<Alert show-icon>
|
||||
已选择 <span class="select-count">{{selectCount}}</span> 项
|
||||
已选择 <span class="select-count">{{ selectCount }}</span> 项
|
||||
<a class="select-clear" @click="clearSelectAll">清空</a>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||
</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>
|
||||
<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="name" >
|
||||
<Input v-model="form.name" clearable style="width:100%"/>
|
||||
<Modal
|
||||
:title="modalTitle"
|
||||
v-model="modalVisible"
|
||||
:mask-closable="false"
|
||||
:width="500"
|
||||
>
|
||||
<Form ref="form" :model="form" :label-width="100" :rules="formValidate">
|
||||
<FormItem label="名称" prop="name">
|
||||
<Input v-model="form.name" clearable style="width: 100%" />
|
||||
</FormItem>
|
||||
<FormItem label="图片" prop="url">
|
||||
<upload-pic-input v-model="form.url" style="width:100%"></upload-pic-input>
|
||||
<upload-pic-input
|
||||
v-model="form.url"
|
||||
style="width: 100%"
|
||||
></upload-pic-input>
|
||||
</FormItem>
|
||||
<FormItem label="操作类型" prop="operationType" >
|
||||
<Select v-model="form.operationType" placeholder="请选择" clearable style="width: 200px">
|
||||
<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>
|
||||
|
@ -41,35 +71,37 @@
|
|||
<Option value="CATEGORY">商品分类</Option>
|
||||
</Select>
|
||||
</FormItem>
|
||||
<FormItem label="链接值" prop="sort" >
|
||||
<Input v-model="form.operationUrl" clearable style="width:100%"/>
|
||||
<FormItem label="链接值" prop="sort">
|
||||
<Input v-model="form.operationUrl" clearable style="width: 100%" />
|
||||
</FormItem>
|
||||
<FormItem label="排序" prop="sort" >
|
||||
<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>
|
||||
<Button type="text" @click="modalVisible = false">取消</Button>
|
||||
<Button type="primary" :loading="submitLoading" @click="handleSubmit"
|
||||
>提交</Button
|
||||
>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
import {
|
||||
getFocusData,
|
||||
saveFocusData,
|
||||
disableFocus,
|
||||
enableFocus,
|
||||
delFocus
|
||||
} from "@/api/pages";
|
||||
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
|
||||
delFocus,
|
||||
} from "@/api/pages";
|
||||
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: "mobileFocus",
|
||||
components: {
|
||||
uploadPicInput
|
||||
uploadPicInput,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -78,14 +110,16 @@
|
|||
modalType: 0, // 添加或编辑标识
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
searchForm: { // 搜索框初始化对象
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
clientType: "MOBILE", //客户端类型
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
},
|
||||
form: { // 添加或编辑表单对象初始化数据
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
name: "",
|
||||
operationType: "",
|
||||
operationUrl: "",
|
||||
|
@ -104,7 +138,7 @@
|
|||
{
|
||||
type: "selection",
|
||||
width: 60,
|
||||
align: "center"
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "名称",
|
||||
|
@ -118,26 +152,26 @@
|
|||
minWidth: 100,
|
||||
sortable: false,
|
||||
render: (h, params) => {
|
||||
if (params.row.status == 'CLOSE') {
|
||||
if (params.row.status == "CLOSE") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "禁用"
|
||||
}
|
||||
})
|
||||
text: "禁用",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
} else if (params.row.status == 'OPEN') {
|
||||
} else if (params.row.status == "OPEN") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "success",
|
||||
text: "启用"
|
||||
}
|
||||
})
|
||||
text: "启用",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "图片",
|
||||
|
@ -148,17 +182,17 @@
|
|||
return h("img", {
|
||||
attrs: {
|
||||
src: params.row.url,
|
||||
alt: "加载图片失败"
|
||||
alt: "加载图片失败",
|
||||
},
|
||||
style: {
|
||||
cursor: "pointer",
|
||||
width: "80px",
|
||||
height: "60px",
|
||||
margin: "10px 0",
|
||||
"object-fit": "contain"
|
||||
}
|
||||
"object-fit": "contain",
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "排序",
|
||||
|
@ -179,16 +213,16 @@
|
|||
{
|
||||
props: {
|
||||
type: "success",
|
||||
size: "small"
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px"
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.enable(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"启用"
|
||||
);
|
||||
|
@ -197,16 +231,16 @@
|
|||
"Button",
|
||||
{
|
||||
props: {
|
||||
size: "small"
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px"
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.disable(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"禁用"
|
||||
);
|
||||
|
@ -217,16 +251,16 @@
|
|||
{
|
||||
props: {
|
||||
type: "primary",
|
||||
size: "small"
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px"
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.edit(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"编辑"
|
||||
),
|
||||
|
@ -238,23 +272,23 @@
|
|||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px"
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.remove(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"删除"
|
||||
),
|
||||
enableOrDisable,
|
||||
]);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
data: [], // 表单数据
|
||||
total: 0 // 表单数据总数
|
||||
total: 0, // 表单数据总数
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
@ -300,7 +334,7 @@
|
|||
getDataList() {
|
||||
this.loading = true;
|
||||
// 带多条件搜索参数获取表单数据 请自行修改接口
|
||||
getFocusData(this.searchForm).then(res => {
|
||||
getFocusData(this.searchForm).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.data = res.result.records;
|
||||
|
@ -313,7 +347,7 @@
|
|||
this.total = this.data.length;
|
||||
this.loading = false;
|
||||
},
|
||||
enable(v){
|
||||
enable(v) {
|
||||
this.$Modal.confirm({
|
||||
title: "确认启用",
|
||||
// 记得确认修改此处
|
||||
|
@ -321,14 +355,14 @@
|
|||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
enableFocus(v.id).then(res => {
|
||||
enableFocus(v.id).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
disable(v) {
|
||||
|
@ -339,26 +373,26 @@
|
|||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
disableFocus(v.id).then(res => {
|
||||
disableFocus(v.id).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
handleSubmit() {
|
||||
this.$refs.form.validate(valid => {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.form.ClientType = "MOBILE"
|
||||
this.form.ClientType = "MOBILE";
|
||||
this.submitLoading = true;
|
||||
if (this.modalType === 0) {
|
||||
this.form.status = "OPEN"
|
||||
this.form.status = "OPEN";
|
||||
// 添加 避免编辑后传入id等数据 记得删除
|
||||
delete this.form.id;
|
||||
saveFocusData(this.form).then(res => {
|
||||
saveFocusData(this.form).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
|
@ -368,7 +402,7 @@
|
|||
});
|
||||
} else {
|
||||
// 编辑
|
||||
saveFocusData(this.form).then(res => {
|
||||
saveFocusData(this.form).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
|
@ -410,14 +444,14 @@
|
|||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
delFocus(v.id).then(res => {
|
||||
delFocus(v.id).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
disableAll() {
|
||||
|
@ -431,12 +465,12 @@
|
|||
loading: true,
|
||||
onOk: () => {
|
||||
let ids = "";
|
||||
this.selectList.forEach(function(e) {
|
||||
this.selectList.forEach(function (e) {
|
||||
ids += e.id + ",";
|
||||
});
|
||||
ids = ids.substring(0, ids.length - 1);
|
||||
// 批量删除
|
||||
disableFocus(ids).then(res => {
|
||||
disableFocus(ids).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("禁用成功");
|
||||
|
@ -444,19 +478,19 @@
|
|||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
}
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
// 建议引入通用样式 可删除下面样式代码
|
||||
// @import "@/styles/table-common.scss";
|
||||
.search {
|
||||
// 建议引入通用样式 可删除下面样式代码
|
||||
// @import "@/styles/table-common.scss";
|
||||
.search {
|
||||
.operation {
|
||||
margin-bottom: 2vh;
|
||||
}
|
||||
|
@ -473,5 +507,5 @@
|
|||
.drop-down {
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,38 +1,68 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row class="operation">
|
||||
<Button @click="add" type="primary" icon="md-add">添加</Button>
|
||||
<Button @click="disableAll" icon="md-trash">批量禁用</Button>
|
||||
<Button @click="getDataList" icon="md-refresh">刷新</Button>
|
||||
<Button type="dashed" @click="openTip=!openTip">{{openTip ? "关闭提示" : "开启提示"}}</Button>
|
||||
<Button type="dashed" @click="openTip = !openTip">{{
|
||||
openTip ? "关闭提示" : "开启提示"
|
||||
}}</Button>
|
||||
</Row>
|
||||
<Row v-show="openTip">
|
||||
<Alert show-icon>
|
||||
已选择 <span class="select-count">{{selectCount}}</span> 项
|
||||
已选择 <span class="select-count">{{ selectCount }}</span> 项
|
||||
<a class="select-clear" @click="clearSelectAll">清空</a>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||
</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>
|
||||
<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="name" >
|
||||
<Input v-model="form.name" clearable style="width:100%"/>
|
||||
<Modal
|
||||
:title="modalTitle"
|
||||
v-model="modalVisible"
|
||||
:mask-closable="false"
|
||||
:width="500"
|
||||
>
|
||||
<Form ref="form" :model="form" :label-width="100" :rules="formValidate">
|
||||
<FormItem label="名称" prop="name">
|
||||
<Input v-model="form.name" clearable style="width: 100%" />
|
||||
</FormItem>
|
||||
<FormItem label="图片" prop="url">
|
||||
<upload-pic-input v-model="form.url" style="width:100%"></upload-pic-input>
|
||||
<upload-pic-input
|
||||
v-model="form.url"
|
||||
style="width: 100%"
|
||||
></upload-pic-input>
|
||||
</FormItem>
|
||||
<FormItem label="操作类型" prop="operationType" >
|
||||
<Select v-model="form.operationType" placeholder="请选择" clearable style="width: 200px">
|
||||
<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>
|
||||
|
@ -41,35 +71,37 @@
|
|||
<Option value="CATEGORY">商品分类</Option>
|
||||
</Select>
|
||||
</FormItem>
|
||||
<FormItem label="链接值" prop="sort" >
|
||||
<Input v-model="form.operationUrl" clearable style="width:100%"/>
|
||||
<FormItem label="链接值" prop="sort">
|
||||
<Input v-model="form.operationUrl" clearable style="width: 100%" />
|
||||
</FormItem>
|
||||
<FormItem label="排序" prop="sort" >
|
||||
<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>
|
||||
<Button type="text" @click="modalVisible = false">取消</Button>
|
||||
<Button type="primary" :loading="submitLoading" @click="handleSubmit"
|
||||
>提交</Button
|
||||
>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
import {
|
||||
getFocusData,
|
||||
saveFocusData,
|
||||
disableFocus,
|
||||
enableFocus,
|
||||
delFocus
|
||||
} from "@/api/pages";
|
||||
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
|
||||
delFocus,
|
||||
} from "@/api/pages";
|
||||
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: "pcFocus",
|
||||
components: {
|
||||
uploadPicInput
|
||||
uploadPicInput,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -78,14 +110,16 @@
|
|||
modalType: 0, // 添加或编辑标识
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
searchForm: { // 搜索框初始化对象
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
clientType: "PC", //客户端类型
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
},
|
||||
form: { // 添加或编辑表单对象初始化数据
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
name: "",
|
||||
operationType: "",
|
||||
operationUrl: "",
|
||||
|
@ -104,7 +138,7 @@
|
|||
{
|
||||
type: "selection",
|
||||
width: 60,
|
||||
align: "center"
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "名称",
|
||||
|
@ -118,26 +152,26 @@
|
|||
minWidth: 100,
|
||||
sortable: false,
|
||||
render: (h, params) => {
|
||||
if (params.row.status == 'CLOSE') {
|
||||
if (params.row.status == "CLOSE") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "禁用"
|
||||
}
|
||||
})
|
||||
text: "禁用",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
} else if (params.row.status == 'OPEN') {
|
||||
} else if (params.row.status == "OPEN") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "success",
|
||||
text: "启用"
|
||||
}
|
||||
})
|
||||
text: "启用",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "图片",
|
||||
|
@ -148,17 +182,17 @@
|
|||
return h("img", {
|
||||
attrs: {
|
||||
src: params.row.url,
|
||||
alt: "加载图片失败"
|
||||
alt: "加载图片失败",
|
||||
},
|
||||
style: {
|
||||
cursor: "pointer",
|
||||
width: "80px",
|
||||
height: "60px",
|
||||
margin: "10px 0",
|
||||
"object-fit": "contain"
|
||||
}
|
||||
"object-fit": "contain",
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "排序",
|
||||
|
@ -179,16 +213,16 @@
|
|||
{
|
||||
props: {
|
||||
type: "success",
|
||||
size: "small"
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px"
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.enable(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"启用"
|
||||
);
|
||||
|
@ -197,16 +231,16 @@
|
|||
"Button",
|
||||
{
|
||||
props: {
|
||||
size: "small"
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px"
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.disable(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"禁用"
|
||||
);
|
||||
|
@ -217,16 +251,16 @@
|
|||
{
|
||||
props: {
|
||||
type: "primary",
|
||||
size: "small"
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px"
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.edit(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"编辑"
|
||||
),
|
||||
|
@ -238,23 +272,23 @@
|
|||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px"
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.remove(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"删除"
|
||||
),
|
||||
enableOrDisable,
|
||||
]);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
data: [], // 表单数据
|
||||
total: 0 // 表单数据总数
|
||||
total: 0, // 表单数据总数
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
@ -300,7 +334,7 @@
|
|||
getDataList() {
|
||||
this.loading = true;
|
||||
// 带多条件搜索参数获取表单数据 请自行修改接口
|
||||
getFocusData(this.searchForm).then(res => {
|
||||
getFocusData(this.searchForm).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.data = res.result.records;
|
||||
|
@ -313,7 +347,7 @@
|
|||
this.total = this.data.length;
|
||||
this.loading = false;
|
||||
},
|
||||
enable(v){
|
||||
enable(v) {
|
||||
this.$Modal.confirm({
|
||||
title: "确认启用",
|
||||
// 记得确认修改此处
|
||||
|
@ -321,14 +355,14 @@
|
|||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
enableFocus(v.id).then(res => {
|
||||
enableFocus(v.id).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
disable(v) {
|
||||
|
@ -339,26 +373,26 @@
|
|||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
disableFocus(v.id).then(res => {
|
||||
disableFocus(v.id).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
handleSubmit() {
|
||||
this.$refs.form.validate(valid => {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.form.ClientType = "PC"
|
||||
this.form.ClientType = "PC";
|
||||
this.submitLoading = true;
|
||||
if (this.modalType === 0) {
|
||||
this.form.status = "OPEN"
|
||||
this.form.status = "OPEN";
|
||||
// 添加 避免编辑后传入id等数据 记得删除
|
||||
delete this.form.id;
|
||||
saveFocusData(this.form).then(res => {
|
||||
saveFocusData(this.form).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
|
@ -368,7 +402,7 @@
|
|||
});
|
||||
} else {
|
||||
// 编辑
|
||||
saveFocusData(this.form).then(res => {
|
||||
saveFocusData(this.form).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
|
@ -410,14 +444,14 @@
|
|||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
delFocus(v.id).then(res => {
|
||||
delFocus(v.id).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
disableAll() {
|
||||
|
@ -431,12 +465,12 @@
|
|||
loading: true,
|
||||
onOk: () => {
|
||||
let ids = "";
|
||||
this.selectList.forEach(function(e) {
|
||||
this.selectList.forEach(function (e) {
|
||||
ids += e.id + ",";
|
||||
});
|
||||
ids = ids.substring(0, ids.length - 1);
|
||||
// 批量删除
|
||||
disableFocus(ids).then(res => {
|
||||
disableFocus(ids).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("禁用成功");
|
||||
|
@ -444,19 +478,19 @@
|
|||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
}
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
// 建议引入通用样式 可删除下面样式代码
|
||||
// @import "@/styles/table-common.scss";
|
||||
.search {
|
||||
// 建议引入通用样式 可删除下面样式代码
|
||||
// @import "@/styles/table-common.scss";
|
||||
.search {
|
||||
.operation {
|
||||
margin-bottom: 2vh;
|
||||
}
|
||||
|
@ -473,5 +507,5 @@
|
|||
.drop-down {
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,67 +1,90 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row class="operation">
|
||||
<Button @click="add" type="primary" icon="md-add">添加</Button>
|
||||
<Button @click="disableAll" icon="md-trash">批量禁用</Button>
|
||||
<Button @click="getDataList" icon="md-refresh">刷新</Button>
|
||||
<Button type="dashed" @click="openTip=!openTip">{{openTip ? "关闭提示" : "开启提示"}}</Button>
|
||||
<Button type="dashed" @click="openTip = !openTip">{{
|
||||
openTip ? "关闭提示" : "开启提示"
|
||||
}}</Button>
|
||||
</Row>
|
||||
<Row v-show="openTip">
|
||||
<Alert show-icon>
|
||||
已选择 <span class="select-count">{{selectCount}}</span> 项
|
||||
已选择 <span class="select-count">{{ selectCount }}</span> 项
|
||||
<a class="select-clear" @click="clearSelectAll">清空</a>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"
|
||||
@on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||
</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>
|
||||
<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">
|
||||
<FormItem label="导航栏名称" prop="navigationName">
|
||||
<Input v-model="form.navigationName" clearable style="width:100%"/>
|
||||
<Input v-model="form.navigationName" clearable style="width: 100%" />
|
||||
</FormItem>
|
||||
<FormItem label="导航栏链接" prop="url">
|
||||
<Input v-model="form.url" clearable style="width:100%"/>
|
||||
<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>
|
||||
<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>
|
||||
<Button type="text" @click="modalVisible = false">取消</Button>
|
||||
<Button type="primary" :loading="submitLoading" @click="handleSubmit"
|
||||
>提交</Button
|
||||
>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
import {
|
||||
save,
|
||||
getNavigationData,
|
||||
disableNavigation,
|
||||
enableNavigation,
|
||||
delNavigation,
|
||||
update
|
||||
} from "@/api/pages";
|
||||
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
|
||||
update,
|
||||
} from "@/api/pages";
|
||||
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: "mobileNavigation",
|
||||
components: {
|
||||
uploadPicInput
|
||||
uploadPicInput,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -71,21 +94,27 @@
|
|||
modalType: 0, // 添加或编辑标识
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
searchForm: { // 搜索框初始化对象
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
},
|
||||
form: { // 添加或编辑表单对象初始化数据
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
navigationName: "",
|
||||
image: "",
|
||||
url: "",
|
||||
},
|
||||
// 表单验证规则
|
||||
formValidate: {
|
||||
url: [{required: true, message: "导航栏url不能为空", trigger: "blur"}],
|
||||
navigationName: [{required: true, message: "导航栏不能为空", trigger: "blur"}],
|
||||
url: [
|
||||
{ required: true, message: "导航栏url不能为空", trigger: "blur" },
|
||||
],
|
||||
navigationName: [
|
||||
{ required: true, message: "导航栏不能为空", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
|
@ -95,7 +124,7 @@
|
|||
{
|
||||
type: "selection",
|
||||
width: 60,
|
||||
align: "center"
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "导航名称",
|
||||
|
@ -109,26 +138,26 @@
|
|||
minWidth: 100,
|
||||
sortable: false,
|
||||
render: (h, params) => {
|
||||
if (params.row.status == 'CLOSE') {
|
||||
if (params.row.status == "CLOSE") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "禁用"
|
||||
}
|
||||
})
|
||||
text: "禁用",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
} else if (params.row.status == 'OPEN') {
|
||||
} else if (params.row.status == "OPEN") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "success",
|
||||
text: "启用"
|
||||
}
|
||||
})
|
||||
text: "启用",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "图片",
|
||||
|
@ -139,17 +168,17 @@
|
|||
return h("img", {
|
||||
attrs: {
|
||||
src: params.row.image,
|
||||
alt: "加载图片失败"
|
||||
alt: "加载图片失败",
|
||||
},
|
||||
style: {
|
||||
cursor: "pointer",
|
||||
width: "80px",
|
||||
height: "60px",
|
||||
margin: "10px 0",
|
||||
"object-fit": "contain"
|
||||
}
|
||||
"object-fit": "contain",
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "排序",
|
||||
|
@ -163,7 +192,7 @@
|
|||
align: "center",
|
||||
width: 250,
|
||||
render: (h, params) => {
|
||||
console.warn(params.status)
|
||||
console.warn(params.status);
|
||||
let enableOrDisable = "";
|
||||
if (params.row.status == "CLOSE") {
|
||||
enableOrDisable = h(
|
||||
|
@ -171,16 +200,16 @@
|
|||
{
|
||||
props: {
|
||||
type: "success",
|
||||
size: "small"
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px"
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.enable(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"启用"
|
||||
);
|
||||
|
@ -189,16 +218,16 @@
|
|||
"Button",
|
||||
{
|
||||
props: {
|
||||
size: "small"
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px"
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.disable(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"禁用"
|
||||
);
|
||||
|
@ -209,16 +238,16 @@
|
|||
{
|
||||
props: {
|
||||
type: "primary",
|
||||
size: "small"
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px"
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.edit(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"编辑"
|
||||
),
|
||||
|
@ -230,23 +259,23 @@
|
|||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px"
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.del(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"删除"
|
||||
),
|
||||
enableOrDisable,
|
||||
]);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
data: [], // 表单数据
|
||||
total: 0 // 表单数据总数
|
||||
total: 0, // 表单数据总数
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
@ -290,10 +319,10 @@
|
|||
this.selectCount = e.length;
|
||||
},
|
||||
getDataList() {
|
||||
this.searchForm.clientType = this.type
|
||||
this.searchForm.clientType = this.type;
|
||||
this.loading = true;
|
||||
// 带多条件搜索参数获取表单数据 请自行修改接口
|
||||
getNavigationData(this.searchForm).then(res => {
|
||||
getNavigationData(this.searchForm).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.data = res.result.records;
|
||||
|
@ -304,14 +333,14 @@
|
|||
this.loading = false;
|
||||
},
|
||||
handleSubmit() {
|
||||
this.$refs.form.validate(valid => {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.submitLoading = true;
|
||||
this.form.clientType = this.type
|
||||
this.form.clientType = this.type;
|
||||
if (this.modalType === 0) {
|
||||
// 添加 避免编辑后传入id等数据 记得删除
|
||||
delete this.form.id;
|
||||
save(this.form).then(res => {
|
||||
save(this.form).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
|
@ -321,7 +350,7 @@
|
|||
});
|
||||
} else {
|
||||
// 编辑
|
||||
update(this.form).then(res => {
|
||||
update(this.form).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
|
@ -355,7 +384,7 @@
|
|||
this.form = data;
|
||||
this.modalVisible = true;
|
||||
},
|
||||
enable(v){
|
||||
enable(v) {
|
||||
this.$Modal.confirm({
|
||||
title: "确认启用",
|
||||
// 记得确认修改此处
|
||||
|
@ -363,14 +392,14 @@
|
|||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
enableNavigation(v.id).then(res => {
|
||||
enableNavigation(v.id).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
disable(v) {
|
||||
|
@ -381,14 +410,14 @@
|
|||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
disableNavigation(v.id).then(res => {
|
||||
disableNavigation(v.id).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
disableAll() {
|
||||
|
@ -407,7 +436,7 @@
|
|||
});
|
||||
ids = ids.substring(0, ids.length - 1);
|
||||
// 批量禁用
|
||||
disableNavigation(ids).then(res => {
|
||||
disableNavigation(ids).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
|
@ -415,7 +444,7 @@
|
|||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
del(v) {
|
||||
|
@ -426,27 +455,27 @@
|
|||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
delNavigation(v.id).then(res => {
|
||||
delNavigation(v.id).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.init();
|
||||
}
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
// 建议引入通用样式 可删除下面样式代码
|
||||
// @import "@/styles/table-common.scss";
|
||||
.search {
|
||||
// 建议引入通用样式 可删除下面样式代码
|
||||
// @import "@/styles/table-common.scss";
|
||||
.search {
|
||||
.operation {
|
||||
margin-bottom: 2vh;
|
||||
}
|
||||
|
@ -463,5 +492,5 @@
|
|||
.drop-down {
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row class="operation">
|
||||
<Button @click="add" type="primary" icon="md-add">添加</Button>
|
||||
|
@ -15,18 +13,14 @@
|
|||
<a class="select-clear" @click="clearSelectAll">清空</a>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"
|
||||
@on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize"
|
||||
@on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10,20,50]"
|
||||
size="small" show-total show-elevator show-sizer></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<Modal :title="modalTitle" v-model="modalVisible" :mask-closable='false' :width="500">
|
||||
<Form ref="form" :model="form" :label-width="100" :rules="formValidate">
|
||||
<FormItem label="导航栏名称" prop="navigationName">
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
<Button @click="delAll">批量下架</Button>
|
||||
<!-- <Button @click="upAll" >批量上架</Button> -->
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -54,13 +53,6 @@
|
|||
@on-selection-change="changeSelect"
|
||||
>
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<!-- <Button
|
||||
type="info"
|
||||
size="small"
|
||||
style="margin-right: 10px"
|
||||
@click="receiveInfo(row)"
|
||||
>查看</Button
|
||||
> -->
|
||||
<Button
|
||||
v-if="row.promotionStatus === 'NEW' || row.promotionStatus === 'CLOSE'"
|
||||
type="primary"
|
||||
|
@ -81,7 +73,6 @@
|
|||
>
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber + 1"
|
||||
|
|
|
@ -72,9 +72,7 @@
|
|||
</div>
|
||||
<h4>适用品类范围</h4>
|
||||
<div>
|
||||
<Row>
|
||||
<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">
|
||||
<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>
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
|
||||
<FormItem style="width: 100%" v-if="form.scopeType == 'PORTION_GOODS'">
|
||||
<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>
|
||||
</div>
|
||||
<Table border :columns="columns" :data="form.promotionGoodsList" @on-selection-change="changeSelect">
|
||||
|
@ -392,6 +392,14 @@ export default {
|
|||
);
|
||||
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) {
|
||||
// 已选商品批量选择
|
||||
this.selectedGoods = e;
|
||||
|
@ -424,25 +432,19 @@ export default {
|
|||
},
|
||||
selectedGoodsData(item) {
|
||||
// 回显已选商品
|
||||
let ids = [];
|
||||
let list = [];
|
||||
this.form.promotionGoodsList.forEach((e) => {
|
||||
ids.push(e.skuId);
|
||||
});
|
||||
item.forEach((e) => {
|
||||
if (!ids.includes(e.id)) {
|
||||
list.push({
|
||||
goodsName: e.goodsName,
|
||||
price: e.price,
|
||||
originalPrice: e.price,
|
||||
quantity: e.quantity,
|
||||
storeId: e.storeId,
|
||||
sellerName: e.sellerName,
|
||||
storeName: e.storeName,
|
||||
skuId: e.id,
|
||||
});
|
||||
}
|
||||
});
|
||||
this.form.promotionGoodsList.push(...list);
|
||||
this.form.promotionGoodsList = list;
|
||||
},
|
||||
getGoodsCategory(e) {
|
||||
// 获取级联选择器商品分类id
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -28,7 +25,6 @@
|
|||
>
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -44,8 +40,6 @@
|
|||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
<Button @click="handleSearch" type="primary" class="search-btn" icon="ios-search">搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -71,7 +70,6 @@
|
|||
</div>
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page operation">
|
||||
<Page
|
||||
:current="searchForm.pageNumber + 1"
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -72,7 +71,6 @@
|
|||
</Button>
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber + 1"
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
></Table>
|
||||
|
||||
<h4>商品信息</h4>
|
||||
<Row class="operation">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
class="operation"
|
||||
:columns="goodsColumns"
|
||||
:data="goodsData"
|
||||
ref="table"
|
||||
|
@ -34,7 +34,6 @@
|
|||
</template>
|
||||
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page operation">
|
||||
<Page
|
||||
:current="searchForm.pageNumber + 1"
|
||||
|
|
|
@ -5,19 +5,19 @@
|
|||
<div class="base-info-item">
|
||||
<h4>积分商品信息</h4>
|
||||
<div class="form-item-view">
|
||||
<FormItem label="商品名称" prop="goodsName">
|
||||
<FormItem label="商品名称">
|
||||
<div>{{ form.goodsSku.goodsName }}</div>
|
||||
</FormItem>
|
||||
<FormItem label="SKU编码" prop="skuId">
|
||||
<FormItem label="SKU编码">
|
||||
<div>{{ form.goodsSku.id }}</div>
|
||||
</FormItem>
|
||||
<FormItem label="店铺名称" prop="sellerName">
|
||||
<div>{{ form.goodsSku.sellerName }}</div>
|
||||
<FormItem label="店铺名称">
|
||||
<div>{{ form.goodsSku.storeName }}</div>
|
||||
</FormItem>
|
||||
<FormItem label="商品价格" prop="goodsPrice">
|
||||
<FormItem label="商品价格">
|
||||
<div>{{ form.goodsSku.price | unitPrice('¥') }}</div>
|
||||
</FormItem>
|
||||
<FormItem label="库存" prop="quantity">
|
||||
<FormItem label="库存">
|
||||
<div>{{ form.goodsSku.quantity }}</div>
|
||||
</FormItem>
|
||||
<FormItem label="结算价格" prop="settlementPrice">
|
||||
|
@ -90,9 +90,7 @@
|
|||
</FormItem>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<Button @click="closeCurrentPage" style="margin-right: 5px"
|
||||
>返回</Button
|
||||
>
|
||||
<Button @click="closeCurrentPage" style="margin-right: 5px">返回</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
:loading="submitLoading"
|
||||
|
|
|
@ -61,7 +61,6 @@
|
|||
<Button @click="addPointsGoods" type="primary" >添加积分商品</Button>
|
||||
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -124,7 +123,6 @@
|
|||
>
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
|
|
@ -148,11 +148,11 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
addPeriod() {
|
||||
addPeriod() { // 添加时间段显示input
|
||||
this.addPeriodTime();
|
||||
this.showAddPeriod = true;
|
||||
},
|
||||
addPeriodTime() {
|
||||
addPeriodTime() { // 添加秒杀时间段
|
||||
this.showAddPeriod = false;
|
||||
if (
|
||||
this.periodTime !== null &&
|
||||
|
@ -161,20 +161,10 @@ export default {
|
|||
this.form.seckillPeriod.push(this.periodTime);
|
||||
}
|
||||
},
|
||||
removePeriodTime(event, name) {
|
||||
removePeriodTime(event, 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() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
<Row class="operation padding-row">
|
||||
<Button type="primary" @click="add">添加活动</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -112,7 +112,7 @@
|
|||
>
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber + 1"
|
||||
|
|
|
@ -29,10 +29,10 @@
|
|||
<a class="select-clear" @click="clearSelectAll">清空</a>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Row class="operation">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
class="operation"
|
||||
:columns="goodsColumns"
|
||||
:data="goodsList"
|
||||
ref="table"
|
||||
|
@ -106,7 +106,6 @@
|
|||
>
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber + 1"
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
|
@ -16,43 +14,13 @@
|
|||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect">
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
|
||||
size="small" show-total show-elevator show-sizer></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<Modal :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>
|
||||
</template>
|
||||
|
||||
|
@ -65,9 +33,6 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
loading: true, // 表单加载状态
|
||||
modalType: 0, // 添加或编辑标识
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
|
@ -78,17 +43,6 @@ export default {
|
|||
endDate: "", // 终止时间
|
||||
},
|
||||
selectDate: null, // 选择一个事件段
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
sn: "",
|
||||
sellerName: "",
|
||||
startTime: "",
|
||||
endTime: "",
|
||||
billPrice: "",
|
||||
},
|
||||
// 表单验证规则
|
||||
formValidate: {},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
columns: [
|
||||
|
@ -227,8 +181,6 @@ export default {
|
|||
getDataList() {
|
||||
this.loading = true;
|
||||
|
||||
// this.searchForm
|
||||
|
||||
this.searchForm.startTime &&
|
||||
(this.searchForm.startTime = this.$options.filters.unixToDate(
|
||||
this.searchForm.startTime / 1000
|
||||
|
@ -248,35 +200,6 @@ export default {
|
|||
this.total = this.data.length;
|
||||
this.loading = false;
|
||||
},
|
||||
handleSubmit() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.submitLoading = true;
|
||||
if (this.modalType === 0) {
|
||||
// 添加 避免编辑后传入id等数据 记得删除
|
||||
delete this.form.id;
|
||||
this.postRequest("/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) {
|
||||
let id = v.id;
|
||||
this.$router.push({
|
||||
|
|
|
@ -48,7 +48,6 @@
|
|||
<Tabs active-key="key1" @on-click="clickTabs">
|
||||
<Tab-pane label="入账流水" key="key1">
|
||||
<Card>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -56,7 +55,6 @@
|
|||
:data="order"
|
||||
ref="table"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="orderParam.pageNumber"
|
||||
|
@ -73,7 +71,6 @@
|
|||
</Tab-pane>
|
||||
<Tab-pane label="退款流水" key="key2">
|
||||
<Card>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -81,7 +78,6 @@
|
|||
:data="refund"
|
||||
ref="table"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="refundParam.pageNumber"
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
|
@ -24,46 +22,15 @@
|
|||
</Form>
|
||||
</Row>
|
||||
<Row class="operation padding-row">
|
||||
<Button @click="add" type="primary">添加</Button>
|
||||
<Button @click="delAll">批量删除</Button>
|
||||
</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-selection-change="changeSelect">
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
|
||||
size="small" show-total show-elevator show-sizer></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<Modal :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>
|
||||
</template>
|
||||
|
||||
|
@ -76,9 +43,6 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
loading: true, // 表单加载状态
|
||||
modalType: 0, // 添加或编辑标识
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
|
@ -90,17 +54,6 @@ export default {
|
|||
billStatus:"" //状态
|
||||
},
|
||||
selectDate: null, // 选择一个时间段
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
sn: "",
|
||||
sellerName: "",
|
||||
startTime: "",
|
||||
endTime: "",
|
||||
billPrice: "",
|
||||
},
|
||||
// 表单验证规则
|
||||
formValidate: {},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
columns: [
|
||||
|
@ -201,28 +154,20 @@ export default {
|
|||
init() {
|
||||
this.getDataList();
|
||||
},
|
||||
changePage(v) {
|
||||
changePage(v) { // 改变页码
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
},
|
||||
changePageSize(v) {
|
||||
changePageSize(v) { // 改变页数
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
handleSearch() {
|
||||
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();
|
||||
},
|
||||
changeSelect(e) {
|
||||
changeSelect(e) { // 表格选中
|
||||
this.selectList = e;
|
||||
this.selectCount = e.length;
|
||||
},
|
||||
|
@ -235,8 +180,6 @@ export default {
|
|||
getDataList() {
|
||||
this.loading = true;
|
||||
|
||||
// this.searchForm
|
||||
|
||||
this.searchForm.startTime &&
|
||||
(this.searchForm.startTime = this.$options.filters.unixToDate(
|
||||
this.searchForm.startTime / 1000
|
||||
|
@ -256,43 +199,7 @@ export default {
|
|||
this.total = this.data.length;
|
||||
this.loading = false;
|
||||
},
|
||||
handleSubmit() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.submitLoading = true;
|
||||
if (this.modalType === 0) {
|
||||
// 添加 避免编辑后传入id等数据 记得删除
|
||||
delete this.form.id;
|
||||
this.postRequest("/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) {
|
||||
detail(v) { // 账单详情
|
||||
let id = v.id;
|
||||
this.$router.push({
|
||||
name: "bill-detail",
|
||||
|
@ -314,14 +221,10 @@ export default {
|
|||
this.getDataList();
|
||||
}
|
||||
});
|
||||
// 模拟请求成功
|
||||
//this.$Message.success("操作成功");
|
||||
//this.$Modal.remove();
|
||||
//this.getDataList();
|
||||
},
|
||||
});
|
||||
},
|
||||
delAll() {
|
||||
delAll() { // 多选删除数据
|
||||
if (this.selectCount <= 0) {
|
||||
this.$Message.warning("您还未选择要删除的数据");
|
||||
return;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
|
@ -29,16 +27,12 @@
|
|||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</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"></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>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -246,7 +246,6 @@
|
|||
</Form>
|
||||
</Row>
|
||||
<div style="min-height: 180px">
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -261,7 +260,6 @@
|
|||
<a @click="$router.push({name: 'order-detail',query: {sn: scope.row.sn}})">{{scope.row.sn}}</a>
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
|
||||
<Row type="flex" justify="end" class="page" style="margin-top: 10px">
|
||||
<Page
|
||||
|
@ -349,7 +347,6 @@
|
|||
</Form>
|
||||
</Row>
|
||||
<div style="min-height: 180px">
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -386,7 +383,6 @@
|
|||
<a @click="$router.push({name: 'after-order-detail',query: {sn: scope.row.sn}})">{{scope.row.sn}}</a>
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
|
||||
<Row type="flex" justify="end" class="page" style="margin-top: 10px">
|
||||
<Page
|
||||
|
@ -474,7 +470,6 @@
|
|||
</Form>
|
||||
</Row>
|
||||
<div style="min-height: 180px">
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -511,7 +506,6 @@
|
|||
<a @click="$router.push({name: 'after-order-detail',query: {sn: scope.row.sn}})">{{scope.row.sn}}</a>
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
|
||||
<Row type="flex" justify="end" class="page" style="margin-top: 10px">
|
||||
<Page
|
||||
|
@ -597,6 +591,20 @@
|
|||
title: "来源",
|
||||
key: "clientType",
|
||||
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: "订单状态",
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
|
@ -41,16 +39,12 @@
|
|||
<Row class="operation padding-row">
|
||||
<Button @click="add" type="primary">添加</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
|
||||
size="small" show-total show-elevator show-sizer></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -65,9 +65,17 @@
|
|||
<FormItem label="详细地址" prop="salesConsigneeDetail">
|
||||
<Input v-model="shopForm.salesConsigneeDetail" clearable style="width: 350px" />
|
||||
</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>
|
||||
</div>
|
||||
</TabPane>
|
||||
<!-- 入驻信息 -->
|
||||
<TabPane label="入驻信息" class="tab" name="sms">
|
||||
<!-- 遮罩层 -->
|
||||
<div v-if="isRead" class="mask">只读不可修改</div>
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row class="operation">
|
||||
<Button @click="add" type="primary">添加</Button>
|
||||
<Button @click="delAll">批量删除</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -18,7 +15,6 @@
|
|||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -34,8 +30,6 @@
|
|||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<Modal
|
||||
:title="modalTitle"
|
||||
v-model="modalVisible"
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
</div>
|
||||
<div class="card-item">
|
||||
<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 class="card-item">
|
||||
<div class="card-item-label">付款金额</div>
|
||||
|
@ -305,7 +305,7 @@ export default {
|
|||
},
|
||||
{
|
||||
title: "商家名称",
|
||||
key: "sellerName",
|
||||
key: "storeName",
|
||||
},
|
||||
{
|
||||
title: "售后单类型",
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
</div>
|
||||
<div class="label-item">
|
||||
<span>店铺名称</span>
|
||||
<span>{{res.sellerName}}</span>
|
||||
<span>{{res.storeName}}</span>
|
||||
</div>
|
||||
<div class="label-item">
|
||||
<span>创建时间</span>
|
||||
|
|
|
@ -55,7 +55,6 @@
|
|||
</i-switch>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Row>
|
||||
|
||||
<Table
|
||||
v-if="showDev"
|
||||
|
@ -78,8 +77,6 @@
|
|||
>
|
||||
</Table>
|
||||
|
||||
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
<Row class="operation" style="margin-top: 20px">
|
||||
<Button @click="sendMessage" type="primary">发送消息</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -46,7 +45,6 @@
|
|||
@on-sort-change="messageChangeSort"
|
||||
@on-selection-change="messageChangeSelect"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchMessageForm.pageNumber"
|
||||
|
@ -64,7 +62,6 @@
|
|||
</TabPane>
|
||||
|
||||
<TabPane label="通知类站内信" name="SETTING">
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -75,7 +72,6 @@
|
|||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -206,7 +202,6 @@
|
|||
</RadioGroup>
|
||||
</FormItem>
|
||||
<FormItem label="指定商家">
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -217,7 +212,6 @@
|
|||
@on-sort-change="messageChangeSort"
|
||||
@on-selection-change="messageChangeSelect"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchShopMessageForm.pageNumber"
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue