xy 3 years ago
parent c720f088cf
commit 8239264290

@ -0,0 +1,17 @@
import request from '@/utils/request'
export function getList(params){
return request({
method:'get',
url:'/api/merchant/balance/get-list',
params
})
}
export function balance(params){
return request({
method:'get',
url:'/api/merchant/balance',
params
})
}

@ -0,0 +1,17 @@
import request from '@/utils/request'
export function getList(params){
return request({
method:'get',
url:'/api/merchant/order/get-list',
params
})
}
export function itemAction(params){
return request({
method:'get',
url:'/api/merchant/order/item-action',
params
})
}

@ -72,8 +72,7 @@ export default {
}
},
btnWidth: {
type: Number,
default: 190
type: Number
},
//

@ -57,18 +57,44 @@ export const constantRoutes = [{
},
{
path: '/',
path: '/dashboard',
component: Layout,
redirect: '/dashboard',
children: [{
path: 'dashboard',
path: '',
name: '系统首页',
component: () => import('@/views/dashboard/index'),
meta: {
title: '系统首页',
icon: 'dashboard'
}
}, ]
}]
},
{
path: '/order',
component: Layout,
children: [{
path: '',
name: '订单管理',
component: () => import('@/views/order/index'),
meta: {
title: '订单管理',
icon: 'el-icon-s-order'
}
}]
},
{
path: '/finance',
component: Layout,
children: [{
path: '',
name: '财务中心',
component: () => import('@/views/finance/index'),
meta: {
title: '财务中心',
icon: 'el-icon-s-finance'
}
}]
}
]
@ -80,7 +106,6 @@ export const constantRoutes = [{
*/
export const asyncRoutes = [
// 404 page must be placed at the end !!!
{
path: '*',

@ -178,9 +178,9 @@ const actions = {
commit
}, roles) {
return new Promise(resolve => {
const loadMenuData = []
Object.assign(loadMenuData, asyncRoutes)
generaMenu(asyncRoutes, loadMenuData)
//const loadMenuData = []
//Object.assign(loadMenuData, asyncRoutes)
//generaMenu(asyncRoutes, loadMenuData)
let accessedRoutes
if (roles.includes('admin')) {
// alert(JSON.stringify(asyncRoutes))

@ -14,7 +14,7 @@ let loading ;
const service = axios.create({
baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
// withCredentials: true, // send cookies when cross-domain requests
timeout: 5000, // request timeout
timeout: 10000, // request timeout
isLoading:true
})

@ -6,65 +6,65 @@
<el-date-picker v-model="dateMonth" value-format="yyyy-MM" type="month" @change="loadData" placeholder="选择月份">
</el-date-picker>
</div>
<panel-group :totaldata="list" />
<!-- <panel-group :totaldata="list" />-->
</div>
<div class="chart">
<div style="display: flex;justify-content: flex-end;margin-bottom: 10px;">
<el-date-picker v-model="year" value-format="yyyy" type="year" @change="getCharData" placeholder="选择年份">
</el-date-picker>
</div>
<div>
<el-row :gutter="16">
<el-col :xs="12" :sm="12" :lg="8">
<div class="chart-wrapper">
<div class="chart-title">
<router-link to="/toolbox/exception">人员借阅统计</router-link>
</div>
<ybar-chart :chartData="lineUserData" />
</div>
</el-col>
<el-col :xs="12" :sm="12" :lg="8">
<div class="chart-wrapper">
<div class="chart-title">
<router-link to="/toolbox/exception">部门借阅统计</router-link>
</div>
<ybar-chart :chartData="lineDeptData" />
</div>
</el-col>
<el-col :xs="12" :sm="12" :lg="8">
<div class="chart-wrapper">
<div class="chart-title">
<router-link to="/toolbox/exception">书籍借阅统计</router-link>
</div>
<ybar-chart :chartData="lineBookData" />
</div>
</el-col>
</el-row>
</div>
</div>
<el-row :gutter="16" style="margin-top: 20px;">
<el-col :xs="12" :sm="12" :lg="8">
<div class="chart-wrapper">
<div class="chart-title">
<router-link to="/toolbox/exception">类目借阅统计</router-link>
</div>
<ybar-chart :chartData="lineTypeData" />
</div>
</el-col>
<el-col :xs="16" :sm="16" :lg="16">
<div class="chart-wrapper">
<div class="chart-title">
<router-link to="/toolbox/exception">月度借阅趋势</router-link>
</div>
<line-chart :chartData="lineArr" />
</div>
</el-col>
</el-row>
<!-- <div class="chart">-->
<!-- <div style="display: flex;justify-content: flex-end;margin-bottom: 10px;">-->
<!-- <el-date-picker v-model="year" value-format="yyyy" type="year" @change="getCharData" placeholder="选择年份">-->
<!-- </el-date-picker>-->
<!-- </div>-->
<!-- <div>-->
<!-- <el-row :gutter="16">-->
<!-- <el-col :xs="12" :sm="12" :lg="8">-->
<!-- <div class="chart-wrapper">-->
<!-- <div class="chart-title">-->
<!-- <router-link to="/toolbox/exception">人员借阅统计</router-link>-->
<!-- </div>-->
<!-- <ybar-chart :chartData="lineUserData" />-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :xs="12" :sm="12" :lg="8">-->
<!-- <div class="chart-wrapper">-->
<!-- <div class="chart-title">-->
<!-- <router-link to="/toolbox/exception">部门借阅统计</router-link>-->
<!-- </div>-->
<!-- <ybar-chart :chartData="lineDeptData" />-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :xs="12" :sm="12" :lg="8">-->
<!-- <div class="chart-wrapper">-->
<!-- <div class="chart-title">-->
<!-- <router-link to="/toolbox/exception">书籍借阅统计</router-link>-->
<!-- </div>-->
<!-- <ybar-chart :chartData="lineBookData" />-->
<!-- </div>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- </div>-->
<!-- </div>-->
<!-- <el-row :gutter="16" style="margin-top: 20px;">-->
<!-- <el-col :xs="12" :sm="12" :lg="8">-->
<!-- <div class="chart-wrapper">-->
<!-- <div class="chart-title">-->
<!-- <router-link to="/toolbox/exception">类目借阅统计</router-link>-->
<!-- </div>-->
<!-- <ybar-chart :chartData="lineTypeData" />-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :xs="16" :sm="16" :lg="16">-->
<!-- <div class="chart-wrapper">-->
<!-- <div class="chart-title">-->
<!-- <router-link to="/toolbox/exception">月度借阅趋势</router-link>-->
<!-- </div>-->
<!-- <line-chart :chartData="lineArr" />-->
<!-- </div>-->
<!-- </el-col>-->
<!-- </el-row>-->
</div>
</template>
@ -231,18 +231,15 @@
this.dateMonth = this.$moment().format("YYYY-MM");
this.year = this.$moment().format("YYYY");
this.loadData();
this.getCharData();
//this.loadData();
//this.getCharData();
},
mounted() {
window.onresize = () => {
this.col.resize()
this.line.resize()
}
},
destroyed() {
window.onresize = null
//window.onresize = null
}
}
</script>

@ -0,0 +1,90 @@
<template>
<div>
<div >
<div ref="lxHeader">
<LxHeader icon="md-apps" text="财务管理" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content"></div>
<slot>
<div style="display: flex;align-items: center;">
<template v-for="(val,key) in balance">
<el-card shadow="hover" style="margin-right: 10px">
<div style="display: flex;flex-direction: column;justify-content: center;">
<div style="font-weight: 600">
{{ balanceFormat(key) }}
</div>
<div style="text-align: center;">
{{ val }}
</div>
</div>
</el-card>
</template>
</div>
</slot>
</LxHeader>
</div>
</div>
<xy-table :table-item="table" :list="data">
<template v-slot:btns><div></div></template>
</xy-table>
</div>
</template>
<script>
import LxHeader from '@/components/LxHeader/index.vue'
import {getList,balance} from '@/api/finance'
export default {
components: {
LxHeader
},
data() {
return {
select:{
page:1,
rows:10,
},
balance:{},
data:[],
table:[
]
}
},
methods: {
async getBalance(){
let res = await balance()
console.log(res)
this.balance = res
},
async getList(){
let res = await getList(this.select)
console.log(res)
this.data = res.data
}
},
computed: {
balanceFormat(){
return function(key){
let map = new Map([
['balance','余额'],
['fees','充值'],
['recharges','退款'],
['refunds','佣金']
])
return map.get(key)
}
}
},
mounted() {
this.getList()
this.getBalance()
}
}
</script>
<style scoped lang="scss">
</style>

@ -55,13 +55,6 @@
callback()
}
}
const validatePassword = (rule, value, callback) => {
if (value.length < 6) {
callback(new Error('密码输入错误'))
} else {
callback()
}
}
return {
title: "",
loginForm: {
@ -77,7 +70,6 @@
password: [{
required: true,
trigger: 'blur',
validator: validatePassword
}]
},
loading: false,

@ -0,0 +1,116 @@
<template>
<div>
<div >
<div ref="lxHeader">
<LxHeader icon="md-apps" text="订单管理" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content"></div>
<slot>
<div style="display: flex;align-items: center;">
<div style="margin-right: 10px;">是否包含历史记录</div>
<el-switch v-model="select.show_history" :active-value="1" :inactive-value="0"></el-switch>
<Button type="primary" @click="getList" style="margin-left: 10px">查询</Button>
</div>
</slot>
</LxHeader>
</div>
</div>
<xy-table :table-item="table" :list="data">
<template v-slot:btns><div></div></template>
</xy-table>
</div>
</template>
<script>
import LxHeader from '@/components/LxHeader/index.vue'
import {getList} from '@/api/order'
export default {
components: {
LxHeader
},
data() {
return {
select:{
page:1,
rows:10,
show_history:0
},
data:[],
table:[
{
label:'客户姓名',
sortable:false,
prop:'member_name',
width:160
},
{
label:'客户电话',
sortable:false,
prop:'member_phone',
width: 200
},
{
label:'预产期',
sortable:false,
prop:'member_due_date',
width: 180
},
{
label:'产品类型',
sortable:false,
prop:'product_type.name',
width: 180
},
{
label:'状态',
sortable:false,
prop:'state_name',
width:120
},
{
label:'操作',
sortable:false,
align:'left',
customFn:row => {
let map = new Map([
['follow_by_merchant','el-icon-s-comment'],
['accept_by_merchant','el-icon-s-promotion'],
['return_by_merchant','el-icon-refresh-left'],
['confirm_by_merchant','el-icon-check'],
['mark_cancel_by_merchant','el-icon-circle-close'],
['finish_by_merchant','el-icon-edit-outline']
])
let btns = []
if(typeof row?.merchant_actions == 'object'){
for(let key in row.merchant_actions){
btns.push(
<el-button size="mini" type="primary" icon={map.get(key)} plain>{row.merchant_actions[key]}</el-button>
)
}
}
return btns
}
}
]
}
},
methods: {
async getList(){
let res = await getList(this.select)
console.log(res)
this.data = res.data
}
},
computed: {},
mounted() {
this.getList()
}
}
</script>
<style scoped lang="scss">
</style>
Loading…
Cancel
Save