新增代理人申请审批,公告管理功能
This commit is contained in:
parent
0d4b86754d
commit
8cc182dece
|
|
@ -290,6 +290,37 @@ export const asyncRouterMap = [
|
||||||
icon: 'chart'
|
icon: 'chart'
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
|
{
|
||||||
|
path: 'articleList',
|
||||||
|
component: () => import('@/views/promotion/articleList'),
|
||||||
|
name: 'articleList',
|
||||||
|
meta: {
|
||||||
|
perms: ['GET /admin/article/list', 'POST /admin/article/delete'],
|
||||||
|
title: '公告列表',
|
||||||
|
noCache: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'articleCreate',
|
||||||
|
component: () => import('@/views/promotion/articleCreate'),
|
||||||
|
name: 'articleCreate',
|
||||||
|
meta: {
|
||||||
|
perms: ['POST /admin/article/create'],
|
||||||
|
title: '发布公告',
|
||||||
|
noCache: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'articleEdit',
|
||||||
|
component: () => import('@/views/promotion/articleEdit'),
|
||||||
|
name: 'articleEdit',
|
||||||
|
meta: {
|
||||||
|
perms: ['GET /admin/article/detail', 'POST /admin/article/update'],
|
||||||
|
title: '广告管理',
|
||||||
|
noCache: true
|
||||||
|
},
|
||||||
|
hidden: true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: 'ad',
|
path: 'ad',
|
||||||
component: () => import('@/views/promotion/ad'),
|
component: () => import('@/views/promotion/ad'),
|
||||||
|
|
@ -441,6 +472,47 @@ export const asyncRouterMap = [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'external-link',
|
||||||
|
component: Layout,
|
||||||
|
redirect: 'noredirect',
|
||||||
|
alwaysShow: true,
|
||||||
|
name: 'externalLink',
|
||||||
|
meta: {
|
||||||
|
title: '外链',
|
||||||
|
icon: 'link'
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'https://cloud.tencent.com/product/cos',
|
||||||
|
meta: { title: '腾讯云存储', icon: 'link' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'https://cloud.tencent.com/product/sms',
|
||||||
|
meta: { title: '腾讯云短信', icon: 'link' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'https://pay.weixin.qq.com/index.php/core/home/login',
|
||||||
|
meta: { title: '微信支付', icon: 'link' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'https://mpkf.weixin.qq.com/',
|
||||||
|
meta: { title: '小程序客服', icon: 'link' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'https://www.alibabacloud.com/zh/product/oss',
|
||||||
|
meta: { title: '阿里云存储', icon: 'link' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'https://www.qiniu.com/products/kodo',
|
||||||
|
meta: { title: '七牛云存储', icon: 'link' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'http://www.kdniao.com/api-track',
|
||||||
|
meta: { title: '快递鸟', icon: 'link' }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/profile',
|
path: '/profile',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
<li class="link-type">
|
<li class="link-type">
|
||||||
<router-link to="/dashboard">回首页</router-link>
|
<router-link to="/dashboard">回首页</router-link>
|
||||||
</li>
|
</li>
|
||||||
<li class="link-type"><a href="https://gitee.com/qiguliuxing/dts-shop/">随便看看</a></li>
|
<li class="link-type"><a href="https://www.taobao.com/">随便看看</a></li>
|
||||||
<li><a href="#" @click.prevent="dialogVisible=true">点我看图</a></li>
|
<li><a href="#" @click.prevent="dialogVisible=true">点我看图</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
<div class="bullshit">
|
<div class="bullshit">
|
||||||
<div class="bullshit__oops">OOPS!</div>
|
<div class="bullshit__oops">OOPS!</div>
|
||||||
<div class="bullshit__info">版权所有
|
<div class="bullshit__info">版权所有
|
||||||
<a class="link-type" href="https://gitee.com/qiguliuxing/dts-shop" target="_blank">源码地址</a>
|
<a class="link-type" href="https://wallstreetcn.com" target="_blank">华尔街见闻</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="bullshit__headline">{{ message }}</div>
|
<div class="bullshit__headline">{{ message }}</div>
|
||||||
<div class="bullshit__info">请检查您输入的网址是否正确,请点击以下按钮返回主页或者发送错误报告</div>
|
<div class="bullshit__info">请检查您输入的网址是否正确,请点击以下按钮返回主页或者发送错误报告</div>
|
||||||
|
|
|
||||||
|
|
@ -405,7 +405,7 @@ export default {
|
||||||
this.goods.categoryId = value[value.length - 1]
|
this.goods.categoryId = value[value.length - 1]
|
||||||
},
|
},
|
||||||
handleCancel: function() {
|
handleCancel: function() {
|
||||||
this.$router.push({ path: '/goods/goods' })
|
this.$router.push({ path: '/goods/list' })
|
||||||
},
|
},
|
||||||
handlePublish: function() {
|
handlePublish: function() {
|
||||||
const finalGoods = {
|
const finalGoods = {
|
||||||
|
|
|
||||||
|
|
@ -34,12 +34,12 @@
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</router-link>
|
</router-link>
|
||||||
<el-dropdown-item divided>
|
<el-dropdown-item divided>
|
||||||
<a target="_blank" href="https://gitee.com/qiguliuxing/dts-shop">
|
<a target="_blank" href="https://github.com/linlinjava/litemall">
|
||||||
GitHub
|
GitHub
|
||||||
</a>
|
</a>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item>
|
<el-dropdown-item>
|
||||||
<a target="_blank" href="https://gitee.com/qiguliuxing/dts-shop">
|
<a target="_blank" href="https://gitee.com/linlinjava/litemall">
|
||||||
码云
|
码云
|
||||||
</a>
|
</a>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// In order to fix the click on menu on the ios device will trigger the mouseeleave bug
|
// In order to fix the click on menu on the ios device will trigger the mouseeleave bug
|
||||||
|
// https://github.com/PanJiaChen/vue-element-admin/issues/1135
|
||||||
this.fixBugIniOS()
|
this.fixBugIniOS()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
||||||
|
|
@ -36,16 +36,47 @@
|
||||||
<el-tag>{{ statusDic[scope.row.status] }}</el-tag>
|
<el-tag>{{ statusDic[scope.row.status] }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="操作" width="200" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button v-permission="['GET /admin/user/detailApprove']" v-if="scope.row.status==0 && scope.row.userLevel==2" type="primary" @click="handleDetail(scope.row)">推广代理</el-button>
|
||||||
|
<el-button v-permission="['POST /admin/user/approveAgency']" v-else-if="scope.row.status==3" type="primary" size="mini" @click="handleApproveAgency(scope.row)">审批</el-button>
|
||||||
|
<el-button v-permission="['GET /admin/user/detailApprove']" v-else type="info" size="mini" >非代理</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
|
<pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
|
||||||
|
|
||||||
|
<!-- 详情对话框 -->
|
||||||
|
<el-dialog :visible.sync="detailDialogVisible" title="代理详情" width="700">
|
||||||
|
<el-form :data="agencyDetail" label-position="left">
|
||||||
|
<el-form-item label="佣金比例(%)">
|
||||||
|
<span>{{ agencyDetail.settlementRate }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="推广二维码">
|
||||||
|
<img :src="agencyDetail.shareUrl" width="300">
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- 代理审批 -->
|
||||||
|
<el-dialog :visible.sync="approveDialogVisible" title="代理审批">
|
||||||
|
<el-form ref="approveForm" :model="approveForm" status-icon label-position="left" label-width="100px" style="width: 400px; margin-left:50px;">
|
||||||
|
<el-form-item label="佣金比例(%)" prop="settlementRate">
|
||||||
|
<el-input v-model="approveForm.settlementRate"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="approveDialogVisible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="confirmApprove">确定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { fetchList } from '@/api/user'
|
import { fetchList, approveAgency, detailApprove } from '@/api/user'
|
||||||
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
|
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -66,8 +97,15 @@ export default {
|
||||||
},
|
},
|
||||||
downloadLoading: false,
|
downloadLoading: false,
|
||||||
genderDic: ['未知', '男', '女'],
|
genderDic: ['未知', '男', '女'],
|
||||||
levelDic: ['普通用户', 'VIP用户', '高级VIP用户'],
|
levelDic: ['普通用户', 'VIP用户', '代理'],
|
||||||
statusDic: ['可用', '禁用', '注销']
|
statusDic: ['可用', '禁用', '注销', '代理申请'],
|
||||||
|
detailDialogVisible: false,
|
||||||
|
agencyDetail: {},
|
||||||
|
approveDialogVisible: false,
|
||||||
|
approveForm: {
|
||||||
|
userId: undefined,
|
||||||
|
settlementRate: undefined
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
@ -90,6 +128,43 @@ export default {
|
||||||
this.listQuery.page = 1
|
this.listQuery.page = 1
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
|
handleDetail(row) {
|
||||||
|
this.agencyDetail = {
|
||||||
|
shareUrl: undefined,
|
||||||
|
settlementRate: undefined
|
||||||
|
}
|
||||||
|
detailApprove(row.id).then(response => {
|
||||||
|
this.agencyDetail = response.data.data
|
||||||
|
})
|
||||||
|
this.detailDialogVisible = true
|
||||||
|
},
|
||||||
|
handleApproveAgency(row) {
|
||||||
|
this.approveForm.userId = row.id
|
||||||
|
|
||||||
|
this.approveDialogVisible = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['approveForm'].clearValidate()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
confirmApprove() {
|
||||||
|
this.$refs['approveForm'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
approveAgency(this.approveForm).then(response => {
|
||||||
|
this.approveDialogVisible = false
|
||||||
|
this.$notify.success({
|
||||||
|
title: '成功',
|
||||||
|
message: '审批成功'
|
||||||
|
})
|
||||||
|
this.getList()
|
||||||
|
}).catch(response => {
|
||||||
|
this.$notify.error({
|
||||||
|
title: '审批失败',
|
||||||
|
message: response.data.errmsg
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
handleDownload() {
|
handleDownload() {
|
||||||
this.downloadLoading = true
|
this.downloadLoading = true
|
||||||
import('@/vendor/Export2Excel').then(excel => {
|
import('@/vendor/Export2Excel').then(excel => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue