提交
This commit is contained in:
parent
e323a010c3
commit
50bb34b2bb
|
@ -73,3 +73,14 @@ export function getBillDailyAmount(params) {
|
|||
params
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 按商户统计分成
|
||||
*/
|
||||
export function getBonusGroupByMch(params) {
|
||||
return request({
|
||||
url: '/system/dashboard/bonusGroupByMch',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
106
src/views/ss/dashboard/components/BonusDashboard.vue
Normal file
106
src/views/ss/dashboard/components/BonusDashboard.vue
Normal file
|
@ -0,0 +1,106 @@
|
|||
<template>
|
||||
<div v-loading="loading">
|
||||
<!-- 搜索区域 -->
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true">
|
||||
<el-form-item label="日期范围">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="mini"
|
||||
:clearable="true">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery" size="mini">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery" size="mini">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 表格区域 -->
|
||||
<el-table
|
||||
:data="list"
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
border>
|
||||
<el-table-column
|
||||
prop="arrivalName"
|
||||
label="名称"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.arrivalName || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="totalAmount"
|
||||
label="总金额"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.totalAmount.toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getBonusGroupByMch } from '@/api/system/dashboard.js'
|
||||
|
||||
export default {
|
||||
name: "BonusDashboard",
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 100,
|
||||
orderByColumn: "totalAmount",
|
||||
isAsc: "desc",
|
||||
payDateStart: null,
|
||||
payDateEnd: null
|
||||
},
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
dateRange: {
|
||||
get() {
|
||||
if (!this.queryParams.payDateStart || !this.queryParams.payDateEnd) {
|
||||
return [];
|
||||
}
|
||||
return [this.queryParams.payDateStart, this.queryParams.payDateEnd];
|
||||
},
|
||||
set(val) {
|
||||
this.queryParams.payDateStart = val[0];
|
||||
this.queryParams.payDateEnd = val[0];
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.loading = true;
|
||||
getBonusGroupByMch(this.queryParams).then(res => {
|
||||
this.list = res.rows;
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
resetQuery() {
|
||||
this.handleQuery();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
35
src/views/ss/dashboard/index.vue
Normal file
35
src/views/ss/dashboard/index.vue
Normal file
|
@ -0,0 +1,35 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-tabs>
|
||||
<el-tab-pane label="收入统计" lazy>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<BonusDashboard />
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<!-- TODO 套餐统计-->
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<!-- TODO 设备统计-->
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="店铺地图" lazy>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BonusDashboard from '@/views/ss/dashboard/components/BonusDashboard.vue'
|
||||
export default {
|
||||
name: "Dashboard",
|
||||
components: {
|
||||
BonusDashboard
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
|
@ -57,6 +57,12 @@
|
|||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
||||
>
|
||||
<el-table-column prop="classifyName" label="分类名称" min-width="260"></el-table-column>
|
||||
<el-table-column prop="classifyId" label="ID" min-width="80"></el-table-column>
|
||||
<el-table-column prop="picture" label="分类图片" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.picture" :width="32" :height="32"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="orderNum" label="排序" width="200" align="center"></el-table-column>
|
||||
<el-table-column prop="builtSystem" label="是否系统内置" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
|
@ -104,6 +110,13 @@
|
|||
<!-- 添加或修改分类对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="分类图片" prop="picture">
|
||||
<image-upload v-model="form.picture" :limit="1"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24" v-if="form.parentId !== 0">
|
||||
<el-form-item label="上级分类" prop="parentId">
|
||||
|
|
|
@ -67,6 +67,12 @@
|
|||
<form-col :span="span" label="签名Key" prop="channelConfig.signKey">
|
||||
<el-input v-model="form.channelConfig.signKey" placeholder="请输入签名Key" />
|
||||
</form-col>
|
||||
<form-col :span="span" label="请求主机" prop="channelConfig.httpUrl">
|
||||
<el-input v-model="form.channelConfig.httpUrl" placeholder="请输入请求主机" />
|
||||
</form-col>
|
||||
<form-col :span="span" label="SN" prop="channelConfig.sn">
|
||||
<el-input v-model="form.channelConfig.sn" placeholder="请输入SN" />
|
||||
</form-col>
|
||||
</template>
|
||||
|
||||
<!-- 国通星驿配置 -->
|
||||
|
|
|
@ -270,9 +270,6 @@ export default {
|
|||
{ required: true, message: "型号标签不能为空", trigger: "blur" },
|
||||
{ min: 1, type: 'array', message: "型号标签不能为空", trigger: "blur" }
|
||||
],
|
||||
productId: [
|
||||
{ required: true, message: "OneNet产品ID不能为空", trigger: "blur" }
|
||||
],
|
||||
sort: [
|
||||
{ required: true, message: "排序不允许为空", trigger: "blur" }
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue
Block a user