Merge branch 'master' of http://192.168.31.244:3000/byx/oilSystem
This commit is contained in:
commit
53fba7f255
@ -38,6 +38,7 @@
|
||||
align="center"
|
||||
label="排序"
|
||||
>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="活动名称" align="center" prop="activeName" />
|
||||
<el-table-column label="选择条件 " align="center" prop="gradeName" width="400px" >
|
||||
@ -122,7 +123,6 @@
|
||||
<div style="width: 217px;">
|
||||
<el-input v-model="form.activeName" placeholder="请输入活动名称" />
|
||||
</div>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="会员等级" prop="gradeIds" >
|
||||
<el-select v-model="form.gradeIds" multiple clearable placeholder="会员等级" @change="change">
|
||||
|
61
fuintAdmin_zt/src/api/payConfig/ruleConfig.js
Normal file
61
fuintAdmin_zt/src/api/payConfig/ruleConfig.js
Normal file
@ -0,0 +1,61 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询支付配置规则列表
|
||||
export function listRuleConfig(query) {
|
||||
return request({
|
||||
url: '/api/ruleConfig',
|
||||
method: 'get',
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
|
||||
// 查询支付配置规则列表
|
||||
export function getRuleConfig(id) {
|
||||
return request({
|
||||
url: '/api/ruleConfig/'+id,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 查询支付配置规则列表
|
||||
export function addRuleConfig(query) {
|
||||
return request({
|
||||
url: '/api/ruleConfig',
|
||||
method: 'post',
|
||||
data: query,
|
||||
})
|
||||
}
|
||||
|
||||
// 查询支付配置规则列表
|
||||
export function editRuleConfig(query) {
|
||||
return request({
|
||||
url: '/api/ruleConfig',
|
||||
method: 'put',
|
||||
data: query,
|
||||
})
|
||||
}
|
||||
// 查询支付配置规则列表
|
||||
export function enableRuleConfig(query) {
|
||||
return request({
|
||||
url: '/api/ruleConfig/enableRule',
|
||||
method: 'post',
|
||||
data: query,
|
||||
})
|
||||
}
|
||||
|
||||
// 查询支付配置规则列表
|
||||
export function deleteRuleConfig(id) {
|
||||
return request({
|
||||
url: '/api/ruleConfig/'+id,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
// 查询支付配置规则列表
|
||||
export function getOilGunList(query) {
|
||||
return request({
|
||||
url: '/business/petrolStationManagement/oilGun/queryByPage',
|
||||
method: 'get',
|
||||
params: query,
|
||||
})
|
||||
}
|
@ -26,6 +26,15 @@ export function treeselect(params) {
|
||||
})
|
||||
}
|
||||
|
||||
// 查询菜单下拉树结构
|
||||
export function getButtonPermi(params) {
|
||||
return request({
|
||||
url: 'backendApi/source/getButtonPermi',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
// 根据角色ID查询菜单下拉树结构
|
||||
export function roleMenuTreeselect(roleId) {
|
||||
return request({
|
||||
|
@ -1,27 +1,39 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="ap-container">
|
||||
<div class="h-box">
|
||||
|
||||
<el-card >
|
||||
<div class="top-box">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="基本设置" name="first">
|
||||
<jcindex :id="id"></jcindex>
|
||||
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="支付配置" name="second">
|
||||
<payment :id="id"></payment>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="员工管理" name="staff">
|
||||
<staff :id="id"></staff>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="订单查看" name="allOrder">
|
||||
<allOrder :id="id"></allOrder>
|
||||
</el-tab-pane>
|
||||
<div class="top_">
|
||||
<div class="tab-box" :class="tabindex == index ? 'active' : ''" v-for="(item,index) in tabList" :key="index" @click="gettab(index)" >
|
||||
{{item.title}}
|
||||
</div>
|
||||
</div>
|
||||
<jcindex :id="id" v-if="tabindex == 0"></jcindex>
|
||||
<payment :id="id" :deptId="deptId" v-if="tabindex == 1" ></payment>
|
||||
<way :id="id" v-if="tabindex == 2" ></way>
|
||||
<staff :id="id" v-if="tabindex == 3" ></staff>
|
||||
<allOrder :id="id" v-if="tabindex == 4"></allOrder>
|
||||
|
||||
</el-tabs>
|
||||
</div>
|
||||
</el-card >
|
||||
<!-- <el-card >-->
|
||||
<!-- <div class="top-box">-->
|
||||
<!-- <el-tabs v-model="activeName" @tab-click="handleClick">-->
|
||||
<!-- <el-tab-pane label="基本设置" name="first">-->
|
||||
<!-- <jcindex :id="id"></jcindex>-->
|
||||
<!-- </el-tab-pane>-->
|
||||
<!-- <el-tab-pane label="支付配置" name="second">-->
|
||||
<!-- <payment :id="id"></payment>-->
|
||||
<!-- </el-tab-pane>-->
|
||||
<!-- <el-tab-pane label="员工管理" name="staff">-->
|
||||
<!-- <staff :id="id"></staff>-->
|
||||
<!-- </el-tab-pane>-->
|
||||
<!-- <el-tab-pane label="订单查看" name="allOrder">-->
|
||||
<!-- <allOrder :id="id"></allOrder>-->
|
||||
<!-- </el-tab-pane>-->
|
||||
|
||||
<!-- </el-tabs>-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-card >-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
@ -32,27 +44,63 @@
|
||||
import staff from '../components/Service/staff'
|
||||
import allOrder from '../components/Service/allOrder'
|
||||
import jcindex from '../components/Service/index'
|
||||
import way from '../components/Service/way'
|
||||
export default {
|
||||
name: 'details',
|
||||
data() {
|
||||
return {
|
||||
id:'',
|
||||
activeName: 'first'
|
||||
deptId:'',
|
||||
activeName: 'first',
|
||||
tabindex:0,
|
||||
tabList:[
|
||||
{
|
||||
name:'first',
|
||||
title:'基本设置',
|
||||
component:jcindex
|
||||
},
|
||||
{
|
||||
name:'second',
|
||||
title:'支付配置',
|
||||
component:payment
|
||||
},
|
||||
{
|
||||
name:'way',
|
||||
title:'支付方式',
|
||||
component:way
|
||||
},
|
||||
{
|
||||
name:'staff',
|
||||
title:'员工管理',
|
||||
component:staff
|
||||
},
|
||||
{
|
||||
name:'allOrder',
|
||||
title:'订单查看',
|
||||
component:allOrder
|
||||
}
|
||||
]
|
||||
|
||||
};
|
||||
},
|
||||
|
||||
// peizhi
|
||||
components:{
|
||||
jcindex,staff,payment,allOrder
|
||||
jcindex,staff,payment,allOrder,way
|
||||
},
|
||||
created() {
|
||||
this.id = this.$route.query.id
|
||||
this.deptId = this.$route.query.deptId
|
||||
},
|
||||
mounted() {
|
||||
console.log(this.id)
|
||||
|
||||
},
|
||||
methods: {
|
||||
gettab(index){
|
||||
this.tabindex = index
|
||||
console.log(this.tabindex)
|
||||
},
|
||||
handleClick(tab, event) {
|
||||
console.log(tab, event);
|
||||
}
|
||||
@ -62,11 +110,45 @@
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.app-container{
|
||||
height: 100%;
|
||||
.ap-container{
|
||||
height: 100vh;
|
||||
|
||||
background: #f9f9f9;
|
||||
box-sizing: border-box;
|
||||
|
||||
}
|
||||
.top-box{
|
||||
width: 100%;
|
||||
}
|
||||
.top_{
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
box-sizing: border-box;
|
||||
padding: 10px 25px;
|
||||
padding-bottom: 0px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
.active{
|
||||
color: #FF9655 !important;
|
||||
border-bottom: 2px solid #FF9655 !important;
|
||||
}
|
||||
.tab-box{
|
||||
color: #999999;
|
||||
font-size: 14px;
|
||||
height: 40px;
|
||||
width: 60px;
|
||||
border-bottom: 2px solid transparent;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 0px 25px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.h-box{
|
||||
height: 100%;
|
||||
background: #f9f9f9;
|
||||
|
||||
}
|
||||
</style>
|
||||
|
@ -1,68 +1,154 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card >
|
||||
<el-row :gutter="24">
|
||||
<el-form ref="queryParams" :model="queryParams" label-width="40px">
|
||||
<el-col :span="4">
|
||||
<div class="top-box">
|
||||
<div class="d-s">
|
||||
<el-input v-model="form.name" placeholder="请输入油站名称" style="width: 200px;margin-right: 15px;"></el-input>
|
||||
<el-select v-model="value" placeholder="请选择所属机构" style="width: 200px;margin-right: 15px;">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select v-model="value" placeholder="请选择油站状态" style="width: 200px;margin-right: 15px;">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select v-model="value" placeholder="请选择计费方式" style="width: 200px;margin-right: 15px;">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
v-model="value"
|
||||
type="date"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div class="d-s">
|
||||
<el-button type="primary" icon="el-icon-search">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh-right">重置</el-button>
|
||||
</div>
|
||||
|
||||
<el-form-item label="名称">
|
||||
<el-input v-model="queryParams.storeName"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
type="index"
|
||||
label="序号"
|
||||
align="center"
|
||||
width="50">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
align="center"
|
||||
label="油站名称"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
align="center"
|
||||
label="所属机构"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
align="center"
|
||||
width="100"
|
||||
label="油站负责人"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
align="center"
|
||||
label="联系电话"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
align="center"
|
||||
width="80"
|
||||
label="计费方式"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
align="center"
|
||||
label="到期提醒"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
align="center"
|
||||
label="会员人数"
|
||||
width="80"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
align="center"
|
||||
width="80"
|
||||
label="油站状态"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.status"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
align="center"
|
||||
label="创建时间"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
align="center"
|
||||
width="180"
|
||||
label="操作">
|
||||
<template slot-scope="scope">
|
||||
<div style="display: flex;justify-content: center;width: 100%">
|
||||
<div style="color: #409EFF;cursor: pointer;margin: 0 10px">进入油站</div>
|
||||
<div style="color: #409EFF;cursor: pointer;margin: 0 10px">查看详情</div>
|
||||
|
||||
<el-form-item label="状态">
|
||||
<el-select v-model="queryParams.status" placeholder="店铺状态">
|
||||
<el-option label="启用" value="qy"></el-option>
|
||||
<el-option label="禁用" value="jy"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
</el-col>
|
||||
<!-- <el-col :span="4">
|
||||
|
||||
<el-form-item label="套餐">
|
||||
<el-select v-model="form.region" placeholder="店铺套餐">
|
||||
<el-option label="店铺套餐一" value="shanghai"></el-option>
|
||||
<el-option label="店铺套餐二" value="beijing"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
</el-col> -->
|
||||
<!-- <el-col :span="6">
|
||||
|
||||
<el-form-item label="时间">
|
||||
<el-date-picker
|
||||
v-model="value1"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
</el-col> -->
|
||||
<el-col :span="4">
|
||||
<el-button type="primary" icon="el-icon-search" @click="getlist()">搜索</el-button>
|
||||
<el-button type="" icon="el-icon-refresh" @click="res()">重置</el-button>
|
||||
|
||||
|
||||
</el-col>
|
||||
|
||||
</el-form>
|
||||
|
||||
</el-row>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div style="margin-top: 20px">
|
||||
<el-pagination
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
:total="1000">
|
||||
</el-pagination>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-card style="margin-top: 20px" v-for="(item,index) in arrlist" :key="index">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>{{item.storeName || ''}}</span>
|
||||
<!-- <el-button style="float: right; padding: 3px 0" type="text">进入</el-button>-->
|
||||
|
||||
</div>
|
||||
<div class="box-wrap">
|
||||
<div class="zong-box" v-for="(items,index) in item.storeList" :key="index" >
|
||||
<div class="pur-box" @click="godetails(items.id)">
|
||||
<div class="pur-box" @click="godetails(items.id,items.contractDeptId)">
|
||||
<el-tag type="success" v-if="items.status=='qy'">启用</el-tag>
|
||||
<el-tag type="danger" v-else>禁用</el-tag>
|
||||
<div class="disper-box">
|
||||
@ -118,6 +204,41 @@ export default {
|
||||
dicts: ['zhzt'],
|
||||
data(){
|
||||
return{
|
||||
total:0,
|
||||
options: [{
|
||||
value: '选项1',
|
||||
label: '黄金糕'
|
||||
}, {
|
||||
value: '选项2',
|
||||
label: '双皮奶'
|
||||
}, {
|
||||
value: '选项3',
|
||||
label: '蚵仔煎'
|
||||
}, {
|
||||
value: '选项4',
|
||||
label: '龙须面'
|
||||
}, {
|
||||
value: '选项5',
|
||||
label: '北京烤鸭'
|
||||
}],
|
||||
value: '',
|
||||
tableData: [{
|
||||
date: '2016-05-02',
|
||||
name: '王小虎',
|
||||
address: '上海市普陀区金沙江路 1518 弄'
|
||||
}, {
|
||||
date: '2016-05-04',
|
||||
name: '王小虎',
|
||||
address: '上海市普陀区金沙江路 1517 弄'
|
||||
}, {
|
||||
date: '2016-05-01',
|
||||
name: '王小虎',
|
||||
address: '上海市普陀区金沙江路 1519 弄'
|
||||
}, {
|
||||
date: '2016-05-03',
|
||||
name: '王小虎',
|
||||
address: '上海市普陀区金沙江路 1516 弄'
|
||||
}],
|
||||
form: {
|
||||
name: '',
|
||||
region: '',
|
||||
@ -163,11 +284,12 @@ export default {
|
||||
|
||||
this.getlist()
|
||||
},
|
||||
godetails(id){
|
||||
godetails(id,deptId){
|
||||
this.$router.push({
|
||||
path:'/Service/details',
|
||||
query:{
|
||||
id:id
|
||||
id:id,
|
||||
deptId:deptId
|
||||
}
|
||||
})
|
||||
|
||||
@ -183,7 +305,7 @@ export default {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
/* height: 100vh; */
|
||||
background: white;
|
||||
background: #f9f9f9;
|
||||
}
|
||||
.ding-top{
|
||||
width: 100%;
|
||||
@ -263,4 +385,15 @@ export default {
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
}
|
||||
.top-box{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.d-s{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
|
@ -99,6 +99,7 @@
|
||||
type="warning"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['user:add']"
|
||||
>新增用户
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
@ -162,19 +163,22 @@
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['user:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['user:delete']"
|
||||
>删除</el-button>
|
||||
<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" >
|
||||
<span class="el-dropdown-link">
|
||||
<span class="el-dropdown-link" v-hasPermi="['user:password']">
|
||||
<i class="el-icon-d-arrow-right el-icon--right"></i>更多
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="handleResetPwd" icon="el-icon-key" >重置密码</el-dropdown-item>
|
||||
<el-dropdown-item command="handleResetPwd" icon="el-icon-key" v-hasPermi="['user:password']"
|
||||
>重置密码</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
@ -619,7 +623,7 @@
|
||||
<!--<el-button @click="resetForm('ruleForm')">重置</el-button> -->
|
||||
</el-form-item>
|
||||
<el-form-item v-if="pdinfo == 2">
|
||||
<el-button type="primary" @click="submitFormseide('ruleForm')">保存</el-button>
|
||||
<el-button type="primary" @click="submitFormseide('ruleForm')" v-hasPermi="['agency:update']">保存</el-button>
|
||||
<!--<el-button @click="resetForm('ruleForm')">重置</el-button> -->
|
||||
</el-form-item>
|
||||
</template>
|
||||
@ -725,6 +729,7 @@
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
v-hasPermi="['role:delete']"
|
||||
@click="handleDelete1(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
@ -937,7 +942,7 @@ import BigNumber from 'bignumber.js';
|
||||
/*import node from "../../../../gasStation-uni/uni_modules/uview-ui/components/u-parse/node/node.vue";*/
|
||||
import {dutyDelete, dutyEdit, dutyList, dutyLists} from "@/api/duty/duty";
|
||||
import {addRole, delRole, getRole, updateRole} from "@/api/system/role";
|
||||
import {treeselect as menuTreeselect} from "@/api/system/menu";
|
||||
import {getButtonPermi, treeselect as menuTreeselect} from "@/api/system/menu";
|
||||
|
||||
|
||||
|
||||
@ -986,6 +991,9 @@ export default {
|
||||
endTime:"",
|
||||
deleteid:0,
|
||||
pdinfo: 1 ,
|
||||
isAgencyAdd: false,
|
||||
isAgencyEdit: false,
|
||||
isAgencyDelete: false,
|
||||
activeName: 'list',
|
||||
ruleForm: {
|
||||
parentId:'',
|
||||
@ -1243,9 +1251,31 @@ export default {
|
||||
this.handleClick()
|
||||
}
|
||||
|
||||
if (this.$route.fullPath) {
|
||||
this.getPermi(this.$route.fullPath)
|
||||
}
|
||||
|
||||
},
|
||||
components: { Treeselect },
|
||||
methods: {
|
||||
// 获取权限信息
|
||||
getPermi(path){
|
||||
let _this = this;
|
||||
getButtonPermi({path:path}).then(res => {
|
||||
res.data.forEach(item => {
|
||||
if (item.sourceCode == "agency:add"){
|
||||
_this.isAgencyAdd = true;
|
||||
}
|
||||
if (item.sourceCode == "agency:update"){
|
||||
_this.isAgencyEdit = true;
|
||||
}
|
||||
if (item.sourceCode == "agency:delete"){
|
||||
_this.isAgencyDelete = true;
|
||||
}
|
||||
})
|
||||
console.log(_this.isAgencyAdd,_this.isAgencyDelete,12223)
|
||||
})
|
||||
},
|
||||
// 修改角色类型
|
||||
async changeMenu() {
|
||||
console.log(this.form1.roleType)
|
||||
@ -1812,13 +1842,13 @@ export default {
|
||||
<div class="custom-tree-node" style="display: flex;align-items: center;">
|
||||
<span class="custom-tree-box">{node.label}</span>
|
||||
<span style="display: flex;align-items: center;">
|
||||
{!isAdd ?
|
||||
{!isAdd && this.isAgencyAdd ?
|
||||
|
||||
|
||||
< img alt="" src="https://www.youkerr.com/add" style=" width: 20px;height: 20px; " on-click={() => this.append(data)}/>
|
||||
: null
|
||||
}
|
||||
{node.level !== 1 ?
|
||||
{node.level !== 1 && this.isAgencyDelete ?
|
||||
< img alt="" src="https://www.youkerr.com/del" style=" width: 20px;height: 20px; " on-click={() => this.remove(node, data)}/>
|
||||
|
||||
: null
|
||||
|
@ -1,9 +1,10 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card >
|
||||
|
||||
<div class="bai-box" style="margin-top: 20px" >
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
|
||||
<el-form-item label="订单类型" prop="type">
|
||||
<el-form-item label="" prop="type">
|
||||
<el-select
|
||||
v-model="queryParams.type"
|
||||
placeholder="请选择订单类型"
|
||||
@ -18,9 +19,9 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="订单号" prop="orderNo">
|
||||
<el-form-item label="" prop="orderNo">
|
||||
<el-input
|
||||
v-model="queryParams.orderNo"
|
||||
placeholder="请输入订单号"
|
||||
@ -29,7 +30,7 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="支付渠道" prop="payChannel">
|
||||
<el-form-item label="" prop="payChannel">
|
||||
<el-select
|
||||
v-model="queryParams.payChannel"
|
||||
placeholder="请选择支付渠道"
|
||||
@ -45,14 +46,14 @@
|
||||
</el-select>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="付款方式" prop="payType">
|
||||
<el-form-item label="" prop="payType">
|
||||
<el-select
|
||||
v-model="queryParams.payType"
|
||||
placeholder="状态"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
<el-option
|
||||
v-for="dict in dict.type.payment_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
@ -62,7 +63,7 @@
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="支付时间">
|
||||
<el-form-item label="">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
@ -77,25 +78,11 @@
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<el-card style="margin-top: 20px" >
|
||||
<!-- <el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="handleAdd"
|
||||
>新增员工</el-button>
|
||||
</el-col>
|
||||
|
||||
</el-row> -->
|
||||
|
||||
<el-table ref="tables" v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
|
||||
<el-table ref="tables" border v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
|
||||
<el-table-column label="订单号" align="center" prop="orderNo" />
|
||||
<el-table-column label="订单类型" align="center" prop="type" width="100">
|
||||
<template slot-scope="scope">
|
||||
@ -116,9 +103,9 @@
|
||||
<dict-tag :options="dict.type.payment_type" :value="scope.row.payType"/>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="150">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
@ -147,7 +134,7 @@
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-card>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -178,7 +165,7 @@
|
||||
categoryOptions: [],
|
||||
storeOptions: [],
|
||||
posPrem:'',
|
||||
|
||||
|
||||
props: { multiple: true },
|
||||
appletPrem:'',
|
||||
|
||||
@ -212,7 +199,7 @@
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
|
||||
|
||||
typeList:[
|
||||
{ value: '1',label: '油品'},
|
||||
{ value: '2',label: '商品'},
|
||||
@ -292,7 +279,7 @@
|
||||
toTarget(url) {
|
||||
this.$router.push( { path: url } );
|
||||
},
|
||||
|
||||
|
||||
// 查询角色列表
|
||||
getDuty(){
|
||||
listDuty().then(response => {
|
||||
@ -322,7 +309,7 @@
|
||||
this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order)
|
||||
this.handleQuery();
|
||||
},
|
||||
|
||||
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.operId)
|
||||
@ -358,7 +345,7 @@
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -368,7 +355,7 @@
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
/* height: 100vh; */
|
||||
background: white;
|
||||
background: #f9f9f9;
|
||||
}
|
||||
.pagin-box{
|
||||
background: white;
|
||||
@ -381,4 +368,9 @@
|
||||
padding: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.bai-box{
|
||||
background: #fff;
|
||||
box-sizing: border-box;
|
||||
padding: 20px;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,15 +1,12 @@
|
||||
<template>
|
||||
|
||||
<div style="width: 100%;height: 72vh;position: relative ">
|
||||
<div style="width: 100%;height: 100%;position: relative;background: #f9f9f9; ">
|
||||
<div class="box-h">
|
||||
<div class="dis-box" style="align-items: center; margin-bottom: 15px">
|
||||
<div class="gang"></div>
|
||||
<div class="title">基本设置</div>
|
||||
</div>
|
||||
<div class="dis-box">
|
||||
<!-- <div class="img-box">-->
|
||||
<!-- <img src="../../assets/images/wl.png" style="width: 96px; height: 96px">-->
|
||||
<!-- -->
|
||||
<!-- </div>-->
|
||||
<div class="block">
|
||||
<el-avatar v-if="fullImagePath" shape="square" :size="96" :key="fullImagePath" :src="fullImagePath"></el-avatar>
|
||||
<el-avatar v-else shape="square" :size="96" src="https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png"></el-avatar>
|
||||
@ -17,8 +14,8 @@
|
||||
<div style="width: 100%">
|
||||
<div class="dis-box" style="align-items: center;cursor: pointer;margin-bottom: 20px">
|
||||
<div class="title">{{from.name}}</div>
|
||||
<div class="lansiez" @click="editInfo()">编辑油站</div>
|
||||
<div class="lansiez" @click="enterThePetrolStation()">进入油站</div>
|
||||
<div class="lansiez" v-hasPermi="['Servic:edit']" @click="editInfo()">编辑油站</div>
|
||||
<div class="lansiez" v-hasPermi="['Service:enter']" @click="enterThePetrolStation()">进入油站</div>
|
||||
</div>
|
||||
<div class="wrap-box">
|
||||
<div class="threebox">
|
||||
@ -47,10 +44,10 @@
|
||||
<div>油站创建时间:</div>
|
||||
<div>{{ parseTime(seeFrom.createTime) }}</div>
|
||||
</div>
|
||||
<div class="threebox">
|
||||
<div>套餐到期时间:</div>
|
||||
<div>{{ from.expirationTime?parseTime(seeFrom.expirationTime):"--" }}</div>
|
||||
</div>
|
||||
<!-- <div class="threebox">-->
|
||||
<!-- <div>套餐到期时间:</div>-->
|
||||
<!-- <div>{{ from.expirationTime?parseTime(seeFrom.expirationTime):"--" }}</div>-->
|
||||
<!-- </div>-->
|
||||
<div class="threebox">
|
||||
<div>地址:</div>
|
||||
<div>{{ seeFrom.address }}</div>
|
||||
@ -58,11 +55,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class="bottom-box2"> -->
|
||||
<div class="bottom-box2">
|
||||
|
||||
<div style="height: 200px; width: 300px;">
|
||||
<span class="demonstration" >营业执照</span>
|
||||
<br/>
|
||||
@ -71,7 +64,6 @@
|
||||
<el-image v-else src="https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png" ></el-image>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="height: 200px; width: 300px; margin-left: 100px;">
|
||||
<span class="demonstration">门头照</span>
|
||||
<br/>
|
||||
@ -81,17 +73,8 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="bottom-box">
|
||||
<div class="bott-box"><el-tag type="info">返回</el-tag></div>
|
||||
<div class="bott-box"><el-tag>保存</el-tag></div>
|
||||
<div class="bott-box"><el-tag type="danger">删除油站</el-tag></div>
|
||||
</div> -->
|
||||
|
||||
<el-dialog title="编辑油站" class="d-dialog" :visible.sync="editDialog" width="900px" style="padding-right: 10px;">
|
||||
<el-form :model="from" ref="form" :rules="rules">
|
||||
|
||||
|
||||
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-form-item label="油站名称" prop="name" :label-width="formLabelWidth">
|
||||
@ -125,8 +108,6 @@
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-form-item label="联系电话" prop="phone" :label-width="formLabelWidth">
|
||||
@ -134,28 +115,13 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<!-- <el-form-item label="套餐到期时间" :label-width="formLabelWidth">-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- disabled-->
|
||||
<!-- v-model="from.expirationTime"-->
|
||||
<!-- type="date"-->
|
||||
<!-- style="width:220px"-->
|
||||
<!-- placeholder="选择日期">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
|
||||
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-form-item label="店铺地址" prop="address" :label-width="formLabelWidth">
|
||||
<el-input
|
||||
style="width:220px"
|
||||
|
||||
type="textarea"
|
||||
:rows="2"
|
||||
placeholder="请输入地址"
|
||||
@ -179,12 +145,6 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="上传营业执照" prop="name" :label-width="formLabelWidth">
|
||||
@ -232,22 +192,13 @@
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="editDialog = false">取 消</el-button>
|
||||
<el-button type="primary" @click=" edit">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="收货地址" :visible.sync="dialogFormVisible">
|
||||
<el-dialog title="收货地址" :visible.sync="dialogFormVisible">
|
||||
<el-form :model="form">
|
||||
<el-form-item label="活动名称" :label-width="formLabelWidth">
|
||||
<el-input v-model="form.name" autocomplete="off"></el-input>
|
||||
@ -265,6 +216,7 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -579,22 +531,18 @@
|
||||
font-size: 14px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
|
||||
.bottom-box2{
|
||||
/* width: 1400px; */
|
||||
/* position: absolute;
|
||||
bottom: 0px; */
|
||||
/* margin-top: 30px; */
|
||||
/* margin-bottom: 30px; */
|
||||
/* height: 350px; */
|
||||
background: rgb(255, 255, 255);
|
||||
/* background-color: #006cff; */
|
||||
display: flex;
|
||||
/* align-items: center; */
|
||||
justify-content: left;
|
||||
}
|
||||
|
||||
.box-h{
|
||||
background: rgb(255, 255, 255);
|
||||
width: 98%;
|
||||
margin: 10px auto;
|
||||
box-sizing: border-box;
|
||||
padding: 20px;
|
||||
}
|
||||
.bottom-box{
|
||||
width: 1600px;
|
||||
position: absolute;
|
||||
@ -613,21 +561,16 @@
|
||||
.block{
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
|
||||
/* 上传头像 */
|
||||
.list-img{
|
||||
width: 98px;
|
||||
height: 98px;
|
||||
}
|
||||
|
||||
|
||||
.d-dialog >>> .el-upload--picture-card {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
line-height: 100px;
|
||||
}
|
||||
|
||||
.d-dialog >>> .avatar-uploader .el-upload {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
@ -641,19 +584,6 @@
|
||||
height: 50px;
|
||||
line-height: 60px;
|
||||
}
|
||||
.hide {
|
||||
/deep/.el-upload--picture-card {
|
||||
display: none !important;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* //去掉过渡动画,不然删除操作的时候,布局会闪一下。 */
|
||||
|
||||
/* /deep/ .el-upload-list__item {
|
||||
transition: none !important
|
||||
|
||||
} */
|
||||
</style>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,80 +1,61 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card >
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<div class="app-containers">
|
||||
<div class="bai-box" style="margin-top: 20px" >
|
||||
<div class="top-box">
|
||||
<div class="d-s">
|
||||
<el-input v-model="input" placeholder="请输入内容" style="width: 240px;margin-right: 15px"></el-input>
|
||||
<el-select v-model="value" placeholder="请选择状态">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.realName"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
style="width: 240px;"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="mobile">
|
||||
<el-input
|
||||
v-model="queryParams.mobile"
|
||||
placeholder="请输入手机号"
|
||||
clearable
|
||||
style="width: 240px;"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="auditedStatus">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
placeholder="状态"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.zhzt"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<!-- <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>-->
|
||||
>搜索</el-button>
|
||||
<el-button
|
||||
icon="el-icon-refresh-right"
|
||||
>重置</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="handleAdd"
|
||||
>新增员工</el-button>
|
||||
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<el-card style="margin-top: 20px" >
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="handleAdd"
|
||||
>新增员工</el-button>
|
||||
</el-col>
|
||||
</div>
|
||||
|
||||
</el-row>
|
||||
|
||||
<el-table ref="tables" v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
|
||||
<el-table-column label="ID" align="center" prop="id" width="80" />
|
||||
<el-table-column label="姓名" align="center" prop="realName" />
|
||||
<el-table-column label="员工角色" align="center" prop="dutyName" >
|
||||
<el-table ref="tables" border v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
|
||||
<el-table-column
|
||||
type="index"
|
||||
align="center"
|
||||
label="序号"
|
||||
width="50">
|
||||
</el-table-column>
|
||||
<el-table-column label="用户姓名" width="140" align="center" prop="realName" />
|
||||
<el-table-column label="用户角色" width="140" align="center" prop="dutyName" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.dutyName || "--"}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="手机号" align="center" prop="mobile" />
|
||||
<el-table-column label="员工状态" align="center" prop="status">
|
||||
<el-table-column label="登录账号" align="center" prop="mobile" />
|
||||
<el-table-column label="员工状态" align="center" width="80" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.zhzt" :value="scope.row.status"/>
|
||||
<el-switch
|
||||
v-model="scope.row.value"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="公众号" align="center" prop="official">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.official" :value="scope.row.official"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
<el-table-column label="一键加油" align="center" prop="isRefuel">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.display" :value="scope.row.isRefuel"/>
|
||||
@ -85,16 +66,12 @@
|
||||
<dict-tag :options="dict.type.notice" :value="scope.row.notice"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="150">
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="更新时间" align="center" prop="updateTime" width="150">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{ parseTime(scope.row.updateTime) }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@ -120,25 +97,21 @@
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<!-- 添加或修改对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="60%" append-to-body>
|
||||
<el-dialog :title="title" :visible.sync="open" width="30%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
|
||||
<el-form-item label="姓名" prop="realName">
|
||||
<el-input v-model="form.realName" placeholder="请输入姓名" maxlength="30" style="width: 270px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
|
||||
<el-form-item label="手机号" prop="mobile">
|
||||
<el-input v-model="form.mobile" placeholder="请输入联系人电话" maxlength="30" style="width: 270px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
|
||||
|
||||
<el-form-item label="角色组" prop="roleId">
|
||||
<el-select v-model="form.roleId" placeholder="请选择角色" style="width: 270px">
|
||||
<el-option
|
||||
@ -149,14 +122,7 @@
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8">-->
|
||||
<!-- <el-form-item label="登录密码" prop="password">-->
|
||||
<!-- <el-input v-model="form.password" placeholder="请输入登录密码" maxlength="30"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="账号状态" prop="status">
|
||||
<el-select v-model="form.status"style="width: 270px">
|
||||
<el-option
|
||||
@ -175,10 +141,8 @@
|
||||
<span>状态禁用后,当前账号则无法进行登...</span>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
|
||||
|
||||
<el-form-item label="一键加油" prop="isRefuel">
|
||||
<el-select v-model="form.isRefuel" style="width: 270px">
|
||||
<el-option
|
||||
@ -197,8 +161,7 @@
|
||||
<span>加油时选择加油员场景使用,选择...</span>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
|
||||
<el-form-item label="收款通知" prop="notice">
|
||||
<el-select v-model="form.notice" style="width: 270px">
|
||||
<el-option
|
||||
@ -217,18 +180,17 @@
|
||||
<span>收款成功接收的公众号模板消息...</span>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
|
||||
|
||||
|
||||
<!-- </el-row>-->
|
||||
<!-- <el-row>-->
|
||||
<el-col :span="17">
|
||||
|
||||
<el-form-item label="备注信息">
|
||||
<el-input v-model="form.description" type="textarea" placeholder="请输入内容"></el-input>
|
||||
<el-input style="width: 270px" v-model="form.description" type="textarea" placeholder="请输入内容"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
@ -252,6 +214,24 @@
|
||||
|
||||
data() {
|
||||
return {
|
||||
options: [{
|
||||
value: '选项1',
|
||||
label: '黄金糕'
|
||||
}, {
|
||||
value: '选项2',
|
||||
label: '双皮奶'
|
||||
}, {
|
||||
value: '选项3',
|
||||
label: '蚵仔煎'
|
||||
}, {
|
||||
value: '选项4',
|
||||
label: '龙须面'
|
||||
}, {
|
||||
value: '选项5',
|
||||
label: '北京烤鸭'
|
||||
}],
|
||||
value: '',
|
||||
input: '',
|
||||
drawer: false,
|
||||
// 标题
|
||||
title: "",
|
||||
@ -555,11 +535,17 @@
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.app-container{
|
||||
width: 100%;
|
||||
.app-containers{
|
||||
width: 98%;
|
||||
height: 100%;
|
||||
/* height: 100vh; */
|
||||
background: white;
|
||||
background: #f9f9f9;
|
||||
margin: 20px auto;
|
||||
}
|
||||
.bai-box{
|
||||
background: #fff;
|
||||
box-sizing: border-box;
|
||||
padding: 20px;
|
||||
}
|
||||
.pagin-box{
|
||||
background: white;
|
||||
@ -572,4 +558,15 @@
|
||||
padding: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.top-box{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.d-s{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
|
234
fuintAdmin_zt/src/views/components/Service/way.vue
Normal file
234
fuintAdmin_zt/src/views/components/Service/way.vue
Normal file
@ -0,0 +1,234 @@
|
||||
<script >
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
value: true,
|
||||
tableData: [{
|
||||
date: '2016-05-02',
|
||||
name: '王小虎',
|
||||
address: '上海市普陀区金沙江路 1518 弄'
|
||||
}, {
|
||||
date: '2016-05-04',
|
||||
name: '王小虎',
|
||||
address: '上海市普陀区金沙江路 1517 弄'
|
||||
}, {
|
||||
date: '2016-05-01',
|
||||
name: '王小虎',
|
||||
address: '上海市普陀区金沙江路 1519 弄'
|
||||
}, {
|
||||
date: '2016-05-03',
|
||||
name: '王小虎',
|
||||
address: '上海市普陀区金沙江路 1516 弄'
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="container-app">
|
||||
<div class="d-s">
|
||||
<div class="left-size">机构名称:</div>
|
||||
<div>百业兴连锁加油站</div>
|
||||
</div>
|
||||
<div class="d-s">
|
||||
<div class="left-size">负责人姓名:</div>
|
||||
<div>xxxx</div>
|
||||
</div>
|
||||
<div class="d-s">
|
||||
<div class="left-size">负责人电话:</div>
|
||||
<div>15012345678</div>
|
||||
</div>
|
||||
<div class="d-s">
|
||||
<div class="left-size">机构类型:</div>
|
||||
<div>连锁店</div>
|
||||
</div>
|
||||
<div class="d-s">
|
||||
<div class="left-size">计费方式:</div>
|
||||
<div>年付费</div>
|
||||
<div>预付费</div>
|
||||
<div>后付费</div>
|
||||
<div>无限制</div>
|
||||
</div>
|
||||
<!-- 年付费 -->
|
||||
<el-table
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 70%;margin-left: 20px;margin-bottom: 20px">
|
||||
<el-table-column
|
||||
type="index"
|
||||
align="center"
|
||||
label="序号"
|
||||
width="50">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
align="center"
|
||||
label="价格(元)"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
align="center"
|
||||
label="付款金额(元)"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
align="center"
|
||||
label="系统生效时间">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
align="center"
|
||||
label="状态">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
align="center"
|
||||
label="创建时间">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
align="center"
|
||||
label="创建人">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 预付费 -->
|
||||
<el-table
|
||||
v-if="false"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 75%;margin-left: 20px;margin-bottom: 20px">
|
||||
<el-table-column
|
||||
type="index"
|
||||
align="center"
|
||||
label="序号"
|
||||
width="50">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
align="center"
|
||||
label="预付金额(元)"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
align="center"
|
||||
label="扣点费率(‱)"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
align="center"
|
||||
label="预估交易流量(万元)">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
align="center"
|
||||
label="剩余交易流量(万元)">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
align="center"
|
||||
label="状态">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
align="center"
|
||||
label="创建时间">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
align="center"
|
||||
label="创建人">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 后付费 -->
|
||||
<el-table
|
||||
v-if="false"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 75%;margin-left: 20px;margin-bottom: 20px">
|
||||
<el-table-column
|
||||
type="index"
|
||||
align="center"
|
||||
label="序号"
|
||||
width="50">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
align="center"
|
||||
label="预付金额(元)"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
align="center"
|
||||
label="已发生交易流量(万元)"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
align="center"
|
||||
label="系统服务费统计(元)">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
align="center"
|
||||
label="已付金额(元)">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
align="center"
|
||||
label="状态">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
align="center"
|
||||
label="创建时间">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
align="center"
|
||||
label="创建人">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 无限制 -->
|
||||
<div class="d-s">
|
||||
<div class="left-size">机构状态:</div>
|
||||
<div><el-switch
|
||||
v-model="value"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-s">
|
||||
<div class="left-size">备注:</div>
|
||||
<div>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.container-app{
|
||||
background: #fff;
|
||||
box-sizing: border-box;
|
||||
padding: 20px;
|
||||
width: 98%;
|
||||
margin: 20px auto;
|
||||
}
|
||||
.d-s{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 25px;
|
||||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
}
|
||||
.left-size{
|
||||
width: 100px;
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
644
fuintAdmin_zt/src/views/homeComponents/agent.vue
Normal file
644
fuintAdmin_zt/src/views/homeComponents/agent.vue
Normal file
@ -0,0 +1,644 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="bannser">
|
||||
<img src="../../assets/images/banner.png" alt="" >
|
||||
</div>
|
||||
<div class="b-bs">
|
||||
<div class="left-box">
|
||||
<div class="san-box">
|
||||
<div>
|
||||
<img src="../../assets/images/l-one.png" style="width: 80px;height: 80px">
|
||||
</div>
|
||||
<div>
|
||||
<div class="r-title">{{ storeTotal.allTotal || 0 }}</div>
|
||||
<div class="r-size">合作油站总数</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="san-box" style="background: linear-gradient( 90deg, #FFDC9B 0%, #FFC154 100%);">
|
||||
<div>
|
||||
<img src="../../assets/images/l-two.png" style="width: 80px;height: 80px">
|
||||
</div>
|
||||
<div>
|
||||
<div class="r-title">{{ storeTotal.weekTotal || 0 }}</div>
|
||||
<div class="r-size">7日活跃油站汇总数</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="san-box" style="background: linear-gradient( 90deg, #9CDCA0 0%, #5BC557 100%);">
|
||||
<div>
|
||||
<img src="../../assets/images/l-three.png" style="width: 80px;height: 80px">
|
||||
</div>
|
||||
<div>
|
||||
<div class="r-title">{{ storeTotal.monthTotal || 0 }}</div>
|
||||
<div class="r-size">本月新增油站数</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right-box">
|
||||
<div class="title_">
|
||||
<div>通知中心</div>
|
||||
<div style="font-size: 12px;color: #BBBBBB;display: flex;align-items: center">更多 <i class="el-icon-arrow-right"></i> </div>
|
||||
</div>
|
||||
<div class="hang_" v-for="(item,index) in 4" :key="index" >【到期提醒】百业兴智慧油站系统将于2024年07月10日到期...</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="b-bs">
|
||||
<div class="left-box-t">
|
||||
<div class="d-s">
|
||||
<div class="h-tt" >数据看板</div>
|
||||
<div class="q-anniu">近一周</div>
|
||||
<div style="margin-right: 40px">
|
||||
<el-date-picker
|
||||
v-model="value1"
|
||||
type="datetimerange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
@change="getStoreAmount">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div style="margin-right: 40px">
|
||||
<el-select v-model="value" clearable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.deptId"
|
||||
:label="item.deptName"
|
||||
:value="item.deptId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-s" style="margin-top: 15px">
|
||||
<div class="k-box">
|
||||
<div class="d-s" style="font-size: 12px;color: #999999;">
|
||||
<div class="sian"></div>
|
||||
<div>活跃油站数</div>
|
||||
</div>
|
||||
<div class="num-size">{{ storeAmount.storeTotal || 0 }}</div>
|
||||
</div>
|
||||
<div class="k-box">
|
||||
<div class="d-s" style="font-size: 12px;color: #999999;">
|
||||
<div class="sian"></div>
|
||||
<div>交易金额(万元)/交易笔数</div>
|
||||
</div>
|
||||
<div class="num-size">{{ storeAmount.tradeAmount || 0 }}/{{ storeAmount.tradeTotal || 0 }}</div>
|
||||
</div>
|
||||
<div class="k-box">
|
||||
<div class="d-s" style="font-size: 12px;color: #999999;">
|
||||
<div class="sian"></div>
|
||||
<div>退款金额(元)/退款笔数</div>
|
||||
</div>
|
||||
<div class="num-size">{{ storeAmount.refundAmount || 0 }}/{{ storeAmount.refundTotal || 0 }}</div>
|
||||
</div>
|
||||
<div class="k-box">
|
||||
<div class="d-s" style="font-size: 12px;color: #999999;">
|
||||
<div class="sian"></div>
|
||||
<div>笔均单价(元)</div>
|
||||
</div>
|
||||
<div class="num-size">{{ storeAmount.averagePrice || 0 }}</div>
|
||||
</div>
|
||||
<div class="k-box">
|
||||
<div class="d-s" style="font-size: 12px;color: #999999;">
|
||||
<div class="sian"></div>
|
||||
<div>日均交易额(万元)/日均交易笔数</div>
|
||||
</div>
|
||||
<div class="num-size">{{ storeAmount.dayTradeAmount || 0 }}/{{ storeAmount.dayTradeTotal || 0 }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hui-hang"></div>
|
||||
<div class="d-s" >
|
||||
<div>
|
||||
<div class="h-tt" >活跃油站</div>
|
||||
<div id="ccc" style="width: 300px;height: 200px; "></div>
|
||||
</div>
|
||||
<div class="h-r-ba"></div>
|
||||
<div>
|
||||
<div class="h-tt" >活跃油站</div>
|
||||
<div class="d-s" style="justify-content: space-between">
|
||||
<div id="cccc" style="width: 300px;height: 200px;margin-right: 50px"></div>
|
||||
<div id="ccct" style="width: 300px;height: 200px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right-box-t">
|
||||
<div class="h-tt" >硬件设备</div>
|
||||
<div class="d-s" style="margin: 30px 0px" v-for="(item,index) in 3" :key="index" >
|
||||
<div class="r-img">
|
||||
<img src="../../assets/images/pcin.png" style="width: 84px;height: 70px">
|
||||
</div>
|
||||
<div>容大(RT RONGTA)RP76II针式76mm小票打印机加油站二三联票据 RP76II/USB口</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom_">
|
||||
<div class="h-tt" style="margin-bottom: 15px" >数据统计</div>
|
||||
<div class="d-s">
|
||||
<div class="anniu-h" :class="{ 'anniu-act': index == 0 }" v-for="(item,index) in timeList" :key="index">
|
||||
{{item}}
|
||||
</div>
|
||||
<el-date-picker
|
||||
v-model="value2"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div id="ctct" style="width: 100%; height: 315px;background: linear-gradient( 360deg, #F8F0E7 0%, #FFFFFF 100%); "></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import echarts from "echarts";
|
||||
import {storeAmountIndex, storeTotalIndex} from "@/api/indexBanner";
|
||||
import {selectChildByDeptId} from "@/api/system/Site/site";
|
||||
import {parseTime} from "@/utils/fuint";
|
||||
export default {
|
||||
|
||||
data(){
|
||||
return{
|
||||
form: {},
|
||||
timeList:[
|
||||
"今日",
|
||||
"近一周",
|
||||
"近一月",
|
||||
"近一年",
|
||||
],
|
||||
|
||||
options: [{
|
||||
value: '选项1',
|
||||
label: '黄金糕'
|
||||
}, {
|
||||
value: '选项2',
|
||||
label: '双皮奶'
|
||||
}, {
|
||||
value: '选项3',
|
||||
label: '蚵仔煎'
|
||||
}, {
|
||||
value: '选项4',
|
||||
label: '龙须面'
|
||||
}, {
|
||||
value: '选项5',
|
||||
label: '北京烤鸭'
|
||||
}],
|
||||
value: '',
|
||||
value1: [],
|
||||
value2: [],
|
||||
imagePath: process.env.VUE_APP_SERVER_URL,
|
||||
queryParams:{},
|
||||
// 店铺数量
|
||||
storeTotal:{},
|
||||
// 店铺金额
|
||||
storeAmount:{},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
let nowDate = new Date();
|
||||
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
|
||||
this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
|
||||
this.getStoreTotal()
|
||||
this.selectChildByDeptIdApi()
|
||||
this.getStoreAmount()
|
||||
},
|
||||
mounted() {
|
||||
this.initChart()
|
||||
},
|
||||
methods:{
|
||||
// 查询
|
||||
selectChildByDeptIdApi() {
|
||||
selectChildByDeptId().then(res => {
|
||||
this.options = res.data
|
||||
})
|
||||
},
|
||||
getStoreTotal(){
|
||||
storeTotalIndex().then(res => {
|
||||
this.storeTotal = res.data
|
||||
})
|
||||
},
|
||||
getStoreAmount(){
|
||||
storeAmountIndex(this.addDateRange(this.queryParams,this.value1)).then(res => {
|
||||
this.storeAmount = res.data
|
||||
})
|
||||
},
|
||||
initChart() {
|
||||
const chart = echarts.init(document.getElementById('ccc'))
|
||||
const chart1 = echarts.init(document.getElementById('cccc'))
|
||||
const chart2= echarts.init(document.getElementById('ccct'))
|
||||
const chart3= echarts.init(document.getElementById('ctct'))
|
||||
|
||||
|
||||
const option = {
|
||||
color: [
|
||||
'#0DC291',
|
||||
'#FFB519',
|
||||
],
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
radius: '80%',
|
||||
data: [
|
||||
{ value: 28, name: '28%' },
|
||||
{ value: 72, name: '72%' },
|
||||
|
||||
],
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
const option1 = {
|
||||
color: [
|
||||
'#3B6ADE',
|
||||
'#409eff',
|
||||
],
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
radius: '80%',
|
||||
data: [
|
||||
{ value: 28, name: '28%' },
|
||||
{ value: 72, name: '72%' },
|
||||
|
||||
],
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
const option2 = {
|
||||
color: [
|
||||
'#0DC291',
|
||||
'#FFB519',
|
||||
],
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
radius: '80%',
|
||||
data: [
|
||||
{ value: 28, name: '28%' },
|
||||
{ value: 72, name: '72%' },
|
||||
|
||||
],
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
const option3 = {
|
||||
color: ['#FF9655', '#0DC291', '#409EFF'],
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross',
|
||||
crossStyle: {
|
||||
color: '#999'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
legend: {
|
||||
data: ['交易金额', '交易笔数', '活跃油站数']
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
data: [
|
||||
'00:00',
|
||||
'02:00',
|
||||
'04:00',
|
||||
'06:00',
|
||||
'08:00',
|
||||
'10:00',
|
||||
'12:00',
|
||||
'14:00',
|
||||
'16:00',
|
||||
'18:00',
|
||||
'20:00',
|
||||
'22:00'
|
||||
],
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
}
|
||||
}
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
name: '金额(元)',
|
||||
|
||||
min: 0,
|
||||
max: 250,
|
||||
interval: 50,
|
||||
axisLabel: {
|
||||
formatter: '{value} '
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
name: '笔数',
|
||||
min: 0,
|
||||
max: 25,
|
||||
interval: 5,
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
}
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '活跃油站数',
|
||||
type: 'bar',
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value + ' ml';
|
||||
}
|
||||
},
|
||||
barWidth: 13,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
//这里设置柱形图圆角 5左上角,右上角,右下角,左下角]
|
||||
barBorderRadius: [50, 50, 0, 0]
|
||||
}
|
||||
},
|
||||
data: [
|
||||
30.0, 31.9, 71.0, 23.2, 41.6, 31.7, 21.6, 30.0, 31.9, 71.0, 23.2, 41.6
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
name: '交易金额',
|
||||
type: 'line',
|
||||
yAxisIndex: 1,
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value + ' °C';
|
||||
}
|
||||
},
|
||||
data: [3.0, 3.9, 7.0, 2.2, 4.6, 3.7, 2.6, 3.0, 3.9, 7.0, 3.2, 4.6]
|
||||
},
|
||||
{
|
||||
name: '交易笔数',
|
||||
type: 'line',
|
||||
yAxisIndex: 1,
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value + ' °C';
|
||||
}
|
||||
},
|
||||
data: [2.0, 3.9, 4.0, 5.2, 4.6, 6.7, 7.6, 6.0, 5.9, 4.0, 4.2, 2.6]
|
||||
}
|
||||
],
|
||||
grid: {
|
||||
left: '1%',
|
||||
right: '1%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
chart.setOption(option)
|
||||
chart1.setOption(option1)
|
||||
chart2.setOption(option2)
|
||||
chart3.setOption(option3)
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
.app-container{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
/* height: 100vh; */
|
||||
background: #f4f5f9;
|
||||
}
|
||||
.d-s{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.bannser{
|
||||
width: 100%;
|
||||
height: 230px;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
}
|
||||
.b-bs{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.left-box{
|
||||
width: 73%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
border: 1px solid #FFFFFF;
|
||||
height: 192px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
}
|
||||
.left-box-t{
|
||||
width: 73%;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
border: 1px solid #FFFFFF;
|
||||
height: 380px;
|
||||
|
||||
}
|
||||
.right-box{
|
||||
width: 25%;
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
border: 1px solid #FFFFFF;
|
||||
height: 192px;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
}
|
||||
.right-box-t{
|
||||
width: 25%;
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
border: 1px solid #FFFFFF;
|
||||
height: 380px;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
}
|
||||
.san-box{
|
||||
width: 360px;
|
||||
height: 150px;
|
||||
box-sizing: border-box;
|
||||
border-radius: 8px;
|
||||
background: linear-gradient( 90deg, #70CAFD 0%, #02AAFE 100%);
|
||||
margin: 15px 0px;
|
||||
margin-right: 15px;
|
||||
box-sizing: border-box;
|
||||
padding: 20px 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.r-title{
|
||||
font-weight: bold;
|
||||
font-size: 42px;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
}
|
||||
.r-size{
|
||||
font-size: 14px;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.title_{
|
||||
font-size: 16px;
|
||||
color: #333333;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
}
|
||||
.hang_{
|
||||
width: 100%;
|
||||
white-space: nowrap; //不换行
|
||||
overflow: hidden; //超出部分隐藏
|
||||
text-overflow: ellipsis; //文本溢出显示省略号
|
||||
font-size: 14px;
|
||||
color: #777777;
|
||||
margin: 14px auto;
|
||||
}
|
||||
.h-tt{
|
||||
font-size: 16px;
|
||||
color: #333333;
|
||||
font-weight: bold;
|
||||
margin-right: 40px;
|
||||
}
|
||||
.q-anniu{
|
||||
width: 80px;
|
||||
height: 26px;
|
||||
background: #FF9655;
|
||||
border-radius: 4px 4px 4px 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.k-box{
|
||||
width: 215px;
|
||||
height: 68px;
|
||||
background: #FFFFFF;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #e1e0e0;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.num-size{
|
||||
font-weight: bold;
|
||||
font-size: 24px;
|
||||
color: #555555;
|
||||
}
|
||||
.sian{
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
background: #2BBCFF;
|
||||
border-radius: 50%;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.hui-hang{
|
||||
width: 100%;
|
||||
height: 5px;
|
||||
background: #F4F5F9;
|
||||
margin: 15px auto;
|
||||
}
|
||||
.h-r-ba{
|
||||
height: 170px;
|
||||
margin: 0px 50px;
|
||||
width: 5px;
|
||||
background: #f4f5f9;
|
||||
}
|
||||
.r-img{
|
||||
width: 84px;
|
||||
height: 70px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.bottom_{
|
||||
width: 100%;
|
||||
border-radius: 10px;
|
||||
background: #fff;
|
||||
box-sizing: border-box;
|
||||
padding: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.anniu-h{
|
||||
width: 80px;
|
||||
height: 26px;
|
||||
background: #FAFAFA;
|
||||
border-radius: 4px 4px 4px 4px;
|
||||
border: 1px solid #DDDDDD;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #777777;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.anniu-act{
|
||||
background: #FF9655 !important;
|
||||
border: 1px solid #FF9655 !important;
|
||||
color: #fff;
|
||||
|
||||
}
|
||||
</style>
|
644
fuintAdmin_zt/src/views/homeComponents/manage.vue
Normal file
644
fuintAdmin_zt/src/views/homeComponents/manage.vue
Normal file
@ -0,0 +1,644 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="bannser">
|
||||
<img src="../../assets/images/banner.png" alt="" >
|
||||
</div>
|
||||
<div class="b-bs">
|
||||
<div class="left-box">
|
||||
<div class="san-box">
|
||||
<div>
|
||||
<img src="../../assets/images/l-one.png" style="width: 80px;height: 80px">
|
||||
</div>
|
||||
<div>
|
||||
<div class="r-title">{{ storeTotal.allTotal || 0 }}</div>
|
||||
<div class="r-size">合作油站总数</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="san-box" style="background: linear-gradient( 90deg, #FFDC9B 0%, #FFC154 100%);">
|
||||
<div>
|
||||
<img src="../../assets/images/l-two.png" style="width: 80px;height: 80px">
|
||||
</div>
|
||||
<div>
|
||||
<div class="r-title">{{ storeTotal.weekTotal || 0 }}</div>
|
||||
<div class="r-size">7日活跃油站汇总数</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="san-box" style="background: linear-gradient( 90deg, #9CDCA0 0%, #5BC557 100%);">
|
||||
<div>
|
||||
<img src="../../assets/images/l-three.png" style="width: 80px;height: 80px">
|
||||
</div>
|
||||
<div>
|
||||
<div class="r-title">{{ storeTotal.monthTotal || 0 }}</div>
|
||||
<div class="r-size">本月新增油站数</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right-box">
|
||||
<div class="title_">
|
||||
<div>通知中心</div>
|
||||
<div style="font-size: 12px;color: #BBBBBB;display: flex;align-items: center">更多 <i class="el-icon-arrow-right"></i> </div>
|
||||
</div>
|
||||
<div class="hang_" v-for="(item,index) in 4" :key="index" >【到期提醒】百业兴智慧油站系统将于2024年07月10日到期...</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="b-bs">
|
||||
<div class="left-box-t">
|
||||
<div class="d-s">
|
||||
<div class="h-tt" >数据看板</div>
|
||||
<div class="q-anniu">近一周</div>
|
||||
<div style="margin-right: 40px">
|
||||
<el-date-picker
|
||||
v-model="value1"
|
||||
type="datetimerange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
@change="getStoreAmount">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div style="margin-right: 40px">
|
||||
<el-select v-model="value" clearable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.deptId"
|
||||
:label="item.deptName"
|
||||
:value="item.deptId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-s" style="margin-top: 15px">
|
||||
<div class="k-box">
|
||||
<div class="d-s" style="font-size: 12px;color: #999999;">
|
||||
<div class="sian"></div>
|
||||
<div>活跃油站数</div>
|
||||
</div>
|
||||
<div class="num-size">{{ storeAmount.storeTotal || 0 }}</div>
|
||||
</div>
|
||||
<div class="k-box">
|
||||
<div class="d-s" style="font-size: 12px;color: #999999;">
|
||||
<div class="sian"></div>
|
||||
<div>交易金额(万元)/交易笔数</div>
|
||||
</div>
|
||||
<div class="num-size">{{ storeAmount.tradeAmount || 0 }}/{{ storeAmount.tradeTotal || 0 }}</div>
|
||||
</div>
|
||||
<div class="k-box">
|
||||
<div class="d-s" style="font-size: 12px;color: #999999;">
|
||||
<div class="sian"></div>
|
||||
<div>退款金额(元)/退款笔数</div>
|
||||
</div>
|
||||
<div class="num-size">{{ storeAmount.refundAmount || 0 }}/{{ storeAmount.refundTotal || 0 }}</div>
|
||||
</div>
|
||||
<div class="k-box">
|
||||
<div class="d-s" style="font-size: 12px;color: #999999;">
|
||||
<div class="sian"></div>
|
||||
<div>笔均单价(元)</div>
|
||||
</div>
|
||||
<div class="num-size">{{ storeAmount.averagePrice || 0 }}</div>
|
||||
</div>
|
||||
<div class="k-box">
|
||||
<div class="d-s" style="font-size: 12px;color: #999999;">
|
||||
<div class="sian"></div>
|
||||
<div>日均交易额(万元)/日均交易笔数</div>
|
||||
</div>
|
||||
<div class="num-size">{{ storeAmount.dayTradeAmount || 0 }}/{{ storeAmount.dayTradeTotal || 0 }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hui-hang"></div>
|
||||
<div class="d-s" >
|
||||
<div>
|
||||
<div class="h-tt" >活跃油站</div>
|
||||
<div id="ccc" style="width: 300px;height: 200px; "></div>
|
||||
</div>
|
||||
<div class="h-r-ba"></div>
|
||||
<div>
|
||||
<div class="h-tt" >活跃油站</div>
|
||||
<div class="d-s" style="justify-content: space-between">
|
||||
<div id="cccc" style="width: 300px;height: 200px;margin-right: 50px"></div>
|
||||
<div id="ccct" style="width: 300px;height: 200px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right-box-t">
|
||||
<div class="h-tt" >硬件设备</div>
|
||||
<div class="d-s" style="margin: 30px 0px" v-for="(item,index) in 3" :key="index" >
|
||||
<div class="r-img">
|
||||
<img src="../../assets/images/pcin.png" style="width: 84px;height: 70px">
|
||||
</div>
|
||||
<div>容大(RT RONGTA)RP76II针式76mm小票打印机加油站二三联票据 RP76II/USB口</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom_">
|
||||
<div class="h-tt" style="margin-bottom: 15px" >数据统计</div>
|
||||
<div class="d-s">
|
||||
<div class="anniu-h" :class="{ 'anniu-act': index == 0 }" v-for="(item,index) in timeList" :key="index">
|
||||
{{item}}
|
||||
</div>
|
||||
<el-date-picker
|
||||
v-model="value2"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div id="ctct" style="width: 100%; height: 315px;background: linear-gradient( 360deg, #F8F0E7 0%, #FFFFFF 100%); "></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import echarts from "echarts";
|
||||
import {storeAmountIndex, storeTotalIndex} from "@/api/indexBanner";
|
||||
import {selectChildByDeptId} from "@/api/system/Site/site";
|
||||
import {parseTime} from "@/utils/fuint";
|
||||
export default {
|
||||
|
||||
data(){
|
||||
return{
|
||||
form: {},
|
||||
timeList:[
|
||||
"今日",
|
||||
"近一周",
|
||||
"近一月",
|
||||
"近一年",
|
||||
],
|
||||
|
||||
options: [{
|
||||
value: '选项1',
|
||||
label: '黄金糕'
|
||||
}, {
|
||||
value: '选项2',
|
||||
label: '双皮奶'
|
||||
}, {
|
||||
value: '选项3',
|
||||
label: '蚵仔煎'
|
||||
}, {
|
||||
value: '选项4',
|
||||
label: '龙须面'
|
||||
}, {
|
||||
value: '选项5',
|
||||
label: '北京烤鸭'
|
||||
}],
|
||||
value: '',
|
||||
value1: [],
|
||||
value2: [],
|
||||
imagePath: process.env.VUE_APP_SERVER_URL,
|
||||
queryParams:{},
|
||||
// 店铺数量
|
||||
storeTotal:{},
|
||||
// 店铺金额
|
||||
storeAmount:{},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
let nowDate = new Date();
|
||||
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
|
||||
this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
|
||||
this.getStoreTotal()
|
||||
this.selectChildByDeptIdApi()
|
||||
this.getStoreAmount()
|
||||
},
|
||||
mounted() {
|
||||
this.initChart()
|
||||
},
|
||||
methods:{
|
||||
// 查询
|
||||
selectChildByDeptIdApi() {
|
||||
selectChildByDeptId().then(res => {
|
||||
this.options = res.data
|
||||
})
|
||||
},
|
||||
getStoreTotal(){
|
||||
storeTotalIndex().then(res => {
|
||||
this.storeTotal = res.data
|
||||
})
|
||||
},
|
||||
getStoreAmount(){
|
||||
storeAmountIndex(this.addDateRange(this.queryParams,this.value1)).then(res => {
|
||||
this.storeAmount = res.data
|
||||
})
|
||||
},
|
||||
initChart() {
|
||||
const chart = echarts.init(document.getElementById('ccc'))
|
||||
const chart1 = echarts.init(document.getElementById('cccc'))
|
||||
const chart2= echarts.init(document.getElementById('ccct'))
|
||||
const chart3= echarts.init(document.getElementById('ctct'))
|
||||
|
||||
|
||||
const option = {
|
||||
color: [
|
||||
'#0DC291',
|
||||
'#FFB519',
|
||||
],
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
radius: '80%',
|
||||
data: [
|
||||
{ value: 28, name: '28%' },
|
||||
{ value: 72, name: '72%' },
|
||||
|
||||
],
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
const option1 = {
|
||||
color: [
|
||||
'#3B6ADE',
|
||||
'#409eff',
|
||||
],
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
radius: '80%',
|
||||
data: [
|
||||
{ value: 28, name: '28%' },
|
||||
{ value: 72, name: '72%' },
|
||||
|
||||
],
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
const option2 = {
|
||||
color: [
|
||||
'#0DC291',
|
||||
'#FFB519',
|
||||
],
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
radius: '80%',
|
||||
data: [
|
||||
{ value: 28, name: '28%' },
|
||||
{ value: 72, name: '72%' },
|
||||
|
||||
],
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
const option3 = {
|
||||
color: ['#FF9655', '#0DC291', '#409EFF'],
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross',
|
||||
crossStyle: {
|
||||
color: '#999'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
legend: {
|
||||
data: ['交易金额', '交易笔数', '活跃油站数']
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
data: [
|
||||
'00:00',
|
||||
'02:00',
|
||||
'04:00',
|
||||
'06:00',
|
||||
'08:00',
|
||||
'10:00',
|
||||
'12:00',
|
||||
'14:00',
|
||||
'16:00',
|
||||
'18:00',
|
||||
'20:00',
|
||||
'22:00'
|
||||
],
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
}
|
||||
}
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
name: '金额(元)',
|
||||
|
||||
min: 0,
|
||||
max: 250,
|
||||
interval: 50,
|
||||
axisLabel: {
|
||||
formatter: '{value} '
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
name: '笔数',
|
||||
min: 0,
|
||||
max: 25,
|
||||
interval: 5,
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
}
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '活跃油站数',
|
||||
type: 'bar',
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value + ' ml';
|
||||
}
|
||||
},
|
||||
barWidth: 13,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
//这里设置柱形图圆角 5左上角,右上角,右下角,左下角]
|
||||
barBorderRadius: [50, 50, 0, 0]
|
||||
}
|
||||
},
|
||||
data: [
|
||||
30.0, 31.9, 71.0, 23.2, 41.6, 31.7, 21.6, 30.0, 31.9, 71.0, 23.2, 41.6
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
name: '交易金额',
|
||||
type: 'line',
|
||||
yAxisIndex: 1,
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value + ' °C';
|
||||
}
|
||||
},
|
||||
data: [3.0, 3.9, 7.0, 2.2, 4.6, 3.7, 2.6, 3.0, 3.9, 7.0, 3.2, 4.6]
|
||||
},
|
||||
{
|
||||
name: '交易笔数',
|
||||
type: 'line',
|
||||
yAxisIndex: 1,
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value + ' °C';
|
||||
}
|
||||
},
|
||||
data: [2.0, 3.9, 4.0, 5.2, 4.6, 6.7, 7.6, 6.0, 5.9, 4.0, 4.2, 2.6]
|
||||
}
|
||||
],
|
||||
grid: {
|
||||
left: '1%',
|
||||
right: '1%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
chart.setOption(option)
|
||||
chart1.setOption(option1)
|
||||
chart2.setOption(option2)
|
||||
chart3.setOption(option3)
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
.app-container{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
/* height: 100vh; */
|
||||
background: #f4f5f9;
|
||||
}
|
||||
.d-s{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.bannser{
|
||||
width: 100%;
|
||||
height: 230px;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
}
|
||||
.b-bs{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.left-box{
|
||||
width: 73%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
border: 1px solid #FFFFFF;
|
||||
height: 192px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
}
|
||||
.left-box-t{
|
||||
width: 73%;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
border: 1px solid #FFFFFF;
|
||||
height: 380px;
|
||||
|
||||
}
|
||||
.right-box{
|
||||
width: 25%;
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
border: 1px solid #FFFFFF;
|
||||
height: 192px;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
}
|
||||
.right-box-t{
|
||||
width: 25%;
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
border: 1px solid #FFFFFF;
|
||||
height: 380px;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
}
|
||||
.san-box{
|
||||
width: 360px;
|
||||
height: 150px;
|
||||
box-sizing: border-box;
|
||||
border-radius: 8px;
|
||||
background: linear-gradient( 90deg, #70CAFD 0%, #02AAFE 100%);
|
||||
margin: 15px 0px;
|
||||
margin-right: 15px;
|
||||
box-sizing: border-box;
|
||||
padding: 20px 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.r-title{
|
||||
font-weight: bold;
|
||||
font-size: 42px;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
}
|
||||
.r-size{
|
||||
font-size: 14px;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.title_{
|
||||
font-size: 16px;
|
||||
color: #333333;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
}
|
||||
.hang_{
|
||||
width: 100%;
|
||||
white-space: nowrap; //不换行
|
||||
overflow: hidden; //超出部分隐藏
|
||||
text-overflow: ellipsis; //文本溢出显示省略号
|
||||
font-size: 14px;
|
||||
color: #777777;
|
||||
margin: 14px auto;
|
||||
}
|
||||
.h-tt{
|
||||
font-size: 16px;
|
||||
color: #333333;
|
||||
font-weight: bold;
|
||||
margin-right: 40px;
|
||||
}
|
||||
.q-anniu{
|
||||
width: 80px;
|
||||
height: 26px;
|
||||
background: #FF9655;
|
||||
border-radius: 4px 4px 4px 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.k-box{
|
||||
width: 215px;
|
||||
height: 68px;
|
||||
background: #FFFFFF;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #e1e0e0;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.num-size{
|
||||
font-weight: bold;
|
||||
font-size: 24px;
|
||||
color: #555555;
|
||||
}
|
||||
.sian{
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
background: #2BBCFF;
|
||||
border-radius: 50%;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.hui-hang{
|
||||
width: 100%;
|
||||
height: 5px;
|
||||
background: #F4F5F9;
|
||||
margin: 15px auto;
|
||||
}
|
||||
.h-r-ba{
|
||||
height: 170px;
|
||||
margin: 0px 50px;
|
||||
width: 5px;
|
||||
background: #f4f5f9;
|
||||
}
|
||||
.r-img{
|
||||
width: 84px;
|
||||
height: 70px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.bottom_{
|
||||
width: 100%;
|
||||
border-radius: 10px;
|
||||
background: #fff;
|
||||
box-sizing: border-box;
|
||||
padding: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.anniu-h{
|
||||
width: 80px;
|
||||
height: 26px;
|
||||
background: #FAFAFA;
|
||||
border-radius: 4px 4px 4px 4px;
|
||||
border: 1px solid #DDDDDD;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #777777;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.anniu-act{
|
||||
background: #FF9655 !important;
|
||||
border: 1px solid #FF9655 !important;
|
||||
color: #fff;
|
||||
|
||||
}
|
||||
</style>
|
644
fuintAdmin_zt/src/views/homeComponents/shopowner.vue
Normal file
644
fuintAdmin_zt/src/views/homeComponents/shopowner.vue
Normal file
@ -0,0 +1,644 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="bannser">
|
||||
<img src="../../assets/images/banner.png" alt="" >
|
||||
</div>
|
||||
<div class="b-bs">
|
||||
<div class="left-box">
|
||||
<div class="san-box">
|
||||
<div>
|
||||
<img src="../../assets/images/l-one.png" style="width: 80px;height: 80px">
|
||||
</div>
|
||||
<div>
|
||||
<div class="r-title">{{ storeTotal.allTotal || 0 }}</div>
|
||||
<div class="r-size">合作油站总数</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="san-box" style="background: linear-gradient( 90deg, #FFDC9B 0%, #FFC154 100%);">
|
||||
<div>
|
||||
<img src="../../assets/images/l-two.png" style="width: 80px;height: 80px">
|
||||
</div>
|
||||
<div>
|
||||
<div class="r-title">{{ storeTotal.weekTotal || 0 }}</div>
|
||||
<div class="r-size">7日活跃油站汇总数</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="san-box" style="background: linear-gradient( 90deg, #9CDCA0 0%, #5BC557 100%);">
|
||||
<div>
|
||||
<img src="../../assets/images/l-three.png" style="width: 80px;height: 80px">
|
||||
</div>
|
||||
<div>
|
||||
<div class="r-title">{{ storeTotal.monthTotal || 0 }}</div>
|
||||
<div class="r-size">本月新增油站数</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right-box">
|
||||
<div class="title_">
|
||||
<div>通知中心</div>
|
||||
<div style="font-size: 12px;color: #BBBBBB;display: flex;align-items: center">更多 <i class="el-icon-arrow-right"></i> </div>
|
||||
</div>
|
||||
<div class="hang_" v-for="(item,index) in 4" :key="index" >【到期提醒】百业兴智慧油站系统将于2024年07月10日到期...</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="b-bs">
|
||||
<div class="left-box-t">
|
||||
<div class="d-s">
|
||||
<div class="h-tt" >数据看板</div>
|
||||
<div class="q-anniu">近一周</div>
|
||||
<div style="margin-right: 40px">
|
||||
<el-date-picker
|
||||
v-model="value1"
|
||||
type="datetimerange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
@change="getStoreAmount">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div style="margin-right: 40px">
|
||||
<el-select v-model="value" clearable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.deptId"
|
||||
:label="item.deptName"
|
||||
:value="item.deptId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-s" style="margin-top: 15px">
|
||||
<div class="k-box">
|
||||
<div class="d-s" style="font-size: 12px;color: #999999;">
|
||||
<div class="sian"></div>
|
||||
<div>活跃油站数</div>
|
||||
</div>
|
||||
<div class="num-size">{{ storeAmount.storeTotal || 0 }}</div>
|
||||
</div>
|
||||
<div class="k-box">
|
||||
<div class="d-s" style="font-size: 12px;color: #999999;">
|
||||
<div class="sian"></div>
|
||||
<div>交易金额(万元)/交易笔数</div>
|
||||
</div>
|
||||
<div class="num-size">{{ storeAmount.tradeAmount || 0 }}/{{ storeAmount.tradeTotal || 0 }}</div>
|
||||
</div>
|
||||
<div class="k-box">
|
||||
<div class="d-s" style="font-size: 12px;color: #999999;">
|
||||
<div class="sian"></div>
|
||||
<div>退款金额(元)/退款笔数</div>
|
||||
</div>
|
||||
<div class="num-size">{{ storeAmount.refundAmount || 0 }}/{{ storeAmount.refundTotal || 0 }}</div>
|
||||
</div>
|
||||
<div class="k-box">
|
||||
<div class="d-s" style="font-size: 12px;color: #999999;">
|
||||
<div class="sian"></div>
|
||||
<div>笔均单价(元)</div>
|
||||
</div>
|
||||
<div class="num-size">{{ storeAmount.averagePrice || 0 }}</div>
|
||||
</div>
|
||||
<div class="k-box">
|
||||
<div class="d-s" style="font-size: 12px;color: #999999;">
|
||||
<div class="sian"></div>
|
||||
<div>日均交易额(万元)/日均交易笔数</div>
|
||||
</div>
|
||||
<div class="num-size">{{ storeAmount.dayTradeAmount || 0 }}/{{ storeAmount.dayTradeTotal || 0 }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hui-hang"></div>
|
||||
<div class="d-s" >
|
||||
<div>
|
||||
<div class="h-tt" >活跃油站</div>
|
||||
<div id="ccc" style="width: 300px;height: 200px; "></div>
|
||||
</div>
|
||||
<div class="h-r-ba"></div>
|
||||
<div>
|
||||
<div class="h-tt" >活跃油站</div>
|
||||
<div class="d-s" style="justify-content: space-between">
|
||||
<div id="cccc" style="width: 300px;height: 200px;margin-right: 50px"></div>
|
||||
<div id="ccct" style="width: 300px;height: 200px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right-box-t">
|
||||
<div class="h-tt" >硬件设备</div>
|
||||
<div class="d-s" style="margin: 30px 0px" v-for="(item,index) in 3" :key="index" >
|
||||
<div class="r-img">
|
||||
<img src="../../assets/images/pcin.png" style="width: 84px;height: 70px">
|
||||
</div>
|
||||
<div>容大(RT RONGTA)RP76II针式76mm小票打印机加油站二三联票据 RP76II/USB口</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom_">
|
||||
<div class="h-tt" style="margin-bottom: 15px" >数据统计</div>
|
||||
<div class="d-s">
|
||||
<div class="anniu-h" :class="{ 'anniu-act': index == 0 }" v-for="(item,index) in timeList" :key="index">
|
||||
{{item}}
|
||||
</div>
|
||||
<el-date-picker
|
||||
v-model="value2"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div id="ctct" style="width: 100%; height: 315px;background: linear-gradient( 360deg, #F8F0E7 0%, #FFFFFF 100%); "></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import echarts from "echarts";
|
||||
import {storeAmountIndex, storeTotalIndex} from "@/api/indexBanner";
|
||||
import {selectChildByDeptId} from "@/api/system/Site/site";
|
||||
import {parseTime} from "@/utils/fuint";
|
||||
export default {
|
||||
|
||||
data(){
|
||||
return{
|
||||
form: {},
|
||||
timeList:[
|
||||
"今日",
|
||||
"近一周",
|
||||
"近一月",
|
||||
"近一年",
|
||||
],
|
||||
|
||||
options: [{
|
||||
value: '选项1',
|
||||
label: '黄金糕'
|
||||
}, {
|
||||
value: '选项2',
|
||||
label: '双皮奶'
|
||||
}, {
|
||||
value: '选项3',
|
||||
label: '蚵仔煎'
|
||||
}, {
|
||||
value: '选项4',
|
||||
label: '龙须面'
|
||||
}, {
|
||||
value: '选项5',
|
||||
label: '北京烤鸭'
|
||||
}],
|
||||
value: '',
|
||||
value1: [],
|
||||
value2: [],
|
||||
imagePath: process.env.VUE_APP_SERVER_URL,
|
||||
queryParams:{},
|
||||
// 店铺数量
|
||||
storeTotal:{},
|
||||
// 店铺金额
|
||||
storeAmount:{},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
let nowDate = new Date();
|
||||
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
|
||||
this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
|
||||
this.getStoreTotal()
|
||||
this.selectChildByDeptIdApi()
|
||||
this.getStoreAmount()
|
||||
},
|
||||
mounted() {
|
||||
this.initChart()
|
||||
},
|
||||
methods:{
|
||||
// 查询
|
||||
selectChildByDeptIdApi() {
|
||||
selectChildByDeptId().then(res => {
|
||||
this.options = res.data
|
||||
})
|
||||
},
|
||||
getStoreTotal(){
|
||||
storeTotalIndex().then(res => {
|
||||
this.storeTotal = res.data
|
||||
})
|
||||
},
|
||||
getStoreAmount(){
|
||||
storeAmountIndex(this.addDateRange(this.queryParams,this.value1)).then(res => {
|
||||
this.storeAmount = res.data
|
||||
})
|
||||
},
|
||||
initChart() {
|
||||
const chart = echarts.init(document.getElementById('ccc'))
|
||||
const chart1 = echarts.init(document.getElementById('cccc'))
|
||||
const chart2= echarts.init(document.getElementById('ccct'))
|
||||
const chart3= echarts.init(document.getElementById('ctct'))
|
||||
|
||||
|
||||
const option = {
|
||||
color: [
|
||||
'#0DC291',
|
||||
'#FFB519',
|
||||
],
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
radius: '80%',
|
||||
data: [
|
||||
{ value: 28, name: '28%' },
|
||||
{ value: 72, name: '72%' },
|
||||
|
||||
],
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
const option1 = {
|
||||
color: [
|
||||
'#3B6ADE',
|
||||
'#409eff',
|
||||
],
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
radius: '80%',
|
||||
data: [
|
||||
{ value: 28, name: '28%' },
|
||||
{ value: 72, name: '72%' },
|
||||
|
||||
],
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
const option2 = {
|
||||
color: [
|
||||
'#0DC291',
|
||||
'#FFB519',
|
||||
],
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
radius: '80%',
|
||||
data: [
|
||||
{ value: 28, name: '28%' },
|
||||
{ value: 72, name: '72%' },
|
||||
|
||||
],
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
const option3 = {
|
||||
color: ['#FF9655', '#0DC291', '#409EFF'],
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross',
|
||||
crossStyle: {
|
||||
color: '#999'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
legend: {
|
||||
data: ['交易金额', '交易笔数', '活跃油站数']
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
data: [
|
||||
'00:00',
|
||||
'02:00',
|
||||
'04:00',
|
||||
'06:00',
|
||||
'08:00',
|
||||
'10:00',
|
||||
'12:00',
|
||||
'14:00',
|
||||
'16:00',
|
||||
'18:00',
|
||||
'20:00',
|
||||
'22:00'
|
||||
],
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
}
|
||||
}
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
name: '金额(元)',
|
||||
|
||||
min: 0,
|
||||
max: 250,
|
||||
interval: 50,
|
||||
axisLabel: {
|
||||
formatter: '{value} '
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
name: '笔数',
|
||||
min: 0,
|
||||
max: 25,
|
||||
interval: 5,
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
}
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '活跃油站数',
|
||||
type: 'bar',
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value + ' ml';
|
||||
}
|
||||
},
|
||||
barWidth: 13,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
//这里设置柱形图圆角 5左上角,右上角,右下角,左下角]
|
||||
barBorderRadius: [50, 50, 0, 0]
|
||||
}
|
||||
},
|
||||
data: [
|
||||
30.0, 31.9, 71.0, 23.2, 41.6, 31.7, 21.6, 30.0, 31.9, 71.0, 23.2, 41.6
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
name: '交易金额',
|
||||
type: 'line',
|
||||
yAxisIndex: 1,
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value + ' °C';
|
||||
}
|
||||
},
|
||||
data: [3.0, 3.9, 7.0, 2.2, 4.6, 3.7, 2.6, 3.0, 3.9, 7.0, 3.2, 4.6]
|
||||
},
|
||||
{
|
||||
name: '交易笔数',
|
||||
type: 'line',
|
||||
yAxisIndex: 1,
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value + ' °C';
|
||||
}
|
||||
},
|
||||
data: [2.0, 3.9, 4.0, 5.2, 4.6, 6.7, 7.6, 6.0, 5.9, 4.0, 4.2, 2.6]
|
||||
}
|
||||
],
|
||||
grid: {
|
||||
left: '1%',
|
||||
right: '1%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
chart.setOption(option)
|
||||
chart1.setOption(option1)
|
||||
chart2.setOption(option2)
|
||||
chart3.setOption(option3)
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
.app-container{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
/* height: 100vh; */
|
||||
background: #f4f5f9;
|
||||
}
|
||||
.d-s{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.bannser{
|
||||
width: 100%;
|
||||
height: 230px;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
}
|
||||
.b-bs{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.left-box{
|
||||
width: 73%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
border: 1px solid #FFFFFF;
|
||||
height: 192px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
}
|
||||
.left-box-t{
|
||||
width: 73%;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
border: 1px solid #FFFFFF;
|
||||
height: 380px;
|
||||
|
||||
}
|
||||
.right-box{
|
||||
width: 25%;
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
border: 1px solid #FFFFFF;
|
||||
height: 192px;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
}
|
||||
.right-box-t{
|
||||
width: 25%;
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
border: 1px solid #FFFFFF;
|
||||
height: 380px;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
}
|
||||
.san-box{
|
||||
width: 360px;
|
||||
height: 150px;
|
||||
box-sizing: border-box;
|
||||
border-radius: 8px;
|
||||
background: linear-gradient( 90deg, #70CAFD 0%, #02AAFE 100%);
|
||||
margin: 15px 0px;
|
||||
margin-right: 15px;
|
||||
box-sizing: border-box;
|
||||
padding: 20px 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.r-title{
|
||||
font-weight: bold;
|
||||
font-size: 42px;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
}
|
||||
.r-size{
|
||||
font-size: 14px;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.title_{
|
||||
font-size: 16px;
|
||||
color: #333333;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
}
|
||||
.hang_{
|
||||
width: 100%;
|
||||
white-space: nowrap; //不换行
|
||||
overflow: hidden; //超出部分隐藏
|
||||
text-overflow: ellipsis; //文本溢出显示省略号
|
||||
font-size: 14px;
|
||||
color: #777777;
|
||||
margin: 14px auto;
|
||||
}
|
||||
.h-tt{
|
||||
font-size: 16px;
|
||||
color: #333333;
|
||||
font-weight: bold;
|
||||
margin-right: 40px;
|
||||
}
|
||||
.q-anniu{
|
||||
width: 80px;
|
||||
height: 26px;
|
||||
background: #FF9655;
|
||||
border-radius: 4px 4px 4px 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.k-box{
|
||||
width: 215px;
|
||||
height: 68px;
|
||||
background: #FFFFFF;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #e1e0e0;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.num-size{
|
||||
font-weight: bold;
|
||||
font-size: 24px;
|
||||
color: #555555;
|
||||
}
|
||||
.sian{
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
background: #2BBCFF;
|
||||
border-radius: 50%;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.hui-hang{
|
||||
width: 100%;
|
||||
height: 5px;
|
||||
background: #F4F5F9;
|
||||
margin: 15px auto;
|
||||
}
|
||||
.h-r-ba{
|
||||
height: 170px;
|
||||
margin: 0px 50px;
|
||||
width: 5px;
|
||||
background: #f4f5f9;
|
||||
}
|
||||
.r-img{
|
||||
width: 84px;
|
||||
height: 70px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.bottom_{
|
||||
width: 100%;
|
||||
border-radius: 10px;
|
||||
background: #fff;
|
||||
box-sizing: border-box;
|
||||
padding: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.anniu-h{
|
||||
width: 80px;
|
||||
height: 26px;
|
||||
background: #FAFAFA;
|
||||
border-radius: 4px 4px 4px 4px;
|
||||
border: 1px solid #DDDDDD;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #777777;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.anniu-act{
|
||||
background: #FF9655 !important;
|
||||
border: 1px solid #FF9655 !important;
|
||||
color: #fff;
|
||||
|
||||
}
|
||||
</style>
|
@ -1,446 +1,29 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="bannser">
|
||||
<img src="./../assets/images/banner.png" alt="" >
|
||||
</div>
|
||||
<div class="b-bs">
|
||||
<div class="left-box">
|
||||
<div class="san-box">
|
||||
<div>
|
||||
<img src="./../assets/images/l-one.png" style="width: 80px;height: 80px">
|
||||
</div>
|
||||
<div>
|
||||
<div class="r-title">{{ storeTotal.allTotal || 0 }}</div>
|
||||
<div class="r-size">合作油站总数</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="san-box" style="background: linear-gradient( 90deg, #FFDC9B 0%, #FFC154 100%);">
|
||||
<div>
|
||||
<img src="./../assets/images/l-two.png" style="width: 80px;height: 80px">
|
||||
</div>
|
||||
<div>
|
||||
<div class="r-title">{{ storeTotal.weekTotal || 0 }}</div>
|
||||
<div class="r-size">7日活跃油站汇总数</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="san-box" style="background: linear-gradient( 90deg, #9CDCA0 0%, #5BC557 100%);">
|
||||
<div>
|
||||
<img src="./../assets/images/l-three.png" style="width: 80px;height: 80px">
|
||||
</div>
|
||||
<div>
|
||||
<div class="r-title">{{ storeTotal.monthTotal || 0 }}</div>
|
||||
<div class="r-size">本月新增油站数</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right-box">
|
||||
<div class="title_">
|
||||
<div>通知中心</div>
|
||||
<div style="font-size: 12px;color: #BBBBBB;display: flex;align-items: center">更多 <i class="el-icon-arrow-right"></i> </div>
|
||||
</div>
|
||||
<div class="hang_" v-for="(item,index) in 4" :key="index" >【到期提醒】百业兴智慧油站系统将于2024年07月10日到期...</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="b-bs">
|
||||
<div class="left-box-t">
|
||||
<div class="d-s">
|
||||
<div class="h-tt" >数据看板</div>
|
||||
<div class="q-anniu">近一周</div>
|
||||
<div style="margin-right: 40px">
|
||||
<el-date-picker
|
||||
v-model="value1"
|
||||
type="datetimerange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
@change="getStoreAmount">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div style="margin-right: 40px">
|
||||
<el-select v-model="value" clearable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.deptId"
|
||||
:label="item.deptName"
|
||||
:value="item.deptId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-s" style="margin-top: 15px">
|
||||
<div class="k-box">
|
||||
<div class="d-s" style="font-size: 12px;color: #999999;">
|
||||
<div class="sian"></div>
|
||||
<div>活跃油站数</div>
|
||||
</div>
|
||||
<div class="num-size">{{ storeAmount.storeTotal || 0 }}</div>
|
||||
</div>
|
||||
<div class="k-box">
|
||||
<div class="d-s" style="font-size: 12px;color: #999999;">
|
||||
<div class="sian"></div>
|
||||
<div>交易金额(万元)/交易笔数</div>
|
||||
</div>
|
||||
<div class="num-size">{{ storeAmount.tradeAmount || 0 }}/{{ storeAmount.tradeTotal || 0 }}</div>
|
||||
</div>
|
||||
<div class="k-box">
|
||||
<div class="d-s" style="font-size: 12px;color: #999999;">
|
||||
<div class="sian"></div>
|
||||
<div>退款金额(元)/退款笔数</div>
|
||||
</div>
|
||||
<div class="num-size">{{ storeAmount.refundAmount || 0 }}/{{ storeAmount.refundTotal || 0 }}</div>
|
||||
</div>
|
||||
<div class="k-box">
|
||||
<div class="d-s" style="font-size: 12px;color: #999999;">
|
||||
<div class="sian"></div>
|
||||
<div>笔均单价(元)</div>
|
||||
</div>
|
||||
<div class="num-size">{{ storeAmount.averagePrice || 0 }}</div>
|
||||
</div>
|
||||
<div class="k-box">
|
||||
<div class="d-s" style="font-size: 12px;color: #999999;">
|
||||
<div class="sian"></div>
|
||||
<div>日均交易额(万元)/日均交易笔数</div>
|
||||
</div>
|
||||
<div class="num-size">{{ storeAmount.dayTradeAmount || 0 }}/{{ storeAmount.dayTradeTotal || 0 }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hui-hang"></div>
|
||||
<div class="d-s" >
|
||||
<div>
|
||||
<div class="h-tt" >活跃油站</div>
|
||||
<div id="ccc" style="width: 300px;height: 200px; "></div>
|
||||
</div>
|
||||
<div class="h-r-ba"></div>
|
||||
<div>
|
||||
<div class="h-tt" >活跃油站</div>
|
||||
<div class="d-s" style="justify-content: space-between">
|
||||
<div id="cccc" style="width: 300px;height: 200px;margin-right: 50px"></div>
|
||||
<div id="ccct" style="width: 300px;height: 200px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right-box-t">
|
||||
<div class="h-tt" >硬件设备</div>
|
||||
<div class="d-s" style="margin: 30px 0px" v-for="(item,index) in 3" :key="index" >
|
||||
<div class="r-img">
|
||||
<img src="./../assets/images/pcin.png" style="width: 84px;height: 70px">
|
||||
</div>
|
||||
<div>容大(RT RONGTA)RP76II针式76mm小票打印机加油站二三联票据 RP76II/USB口</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom_">
|
||||
<div class="h-tt" style="margin-bottom: 15px" >数据统计</div>
|
||||
<div class="d-s">
|
||||
<div class="anniu-h" :class="{ 'anniu-act': index == 0 }" v-for="(item,index) in timeList" :key="index">
|
||||
{{item}}
|
||||
</div>
|
||||
<el-date-picker
|
||||
v-model="value2"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div id="ctct" style="width: 100%; height: 315px;background: linear-gradient( 360deg, #F8F0E7 0%, #FFFFFF 100%); "></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="">
|
||||
<agent v-if="power == 1"></agent>
|
||||
<manage v-if="power == 2"></manage>
|
||||
<shopowner v-if="power == 3"></shopowner>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import echarts from "echarts";
|
||||
import {storeAmountIndex, storeTotalIndex} from "@/api/indexBanner";
|
||||
import {selectChildByDeptId} from "@/api/system/Site/site";
|
||||
import {parseTime} from "@/utils/fuint";
|
||||
import agent from "@/views/homeComponents/agent.vue";
|
||||
import manage from "@/views/homeComponents/manage.vue"
|
||||
import shopowner from "@/views/homeComponents/shopowner.vue"
|
||||
export default {
|
||||
|
||||
data(){
|
||||
return{
|
||||
form: {},
|
||||
timeList:[
|
||||
"今日",
|
||||
"近一周",
|
||||
"近一月",
|
||||
"近一年",
|
||||
],
|
||||
|
||||
options: [{
|
||||
value: '选项1',
|
||||
label: '黄金糕'
|
||||
}, {
|
||||
value: '选项2',
|
||||
label: '双皮奶'
|
||||
}, {
|
||||
value: '选项3',
|
||||
label: '蚵仔煎'
|
||||
}, {
|
||||
value: '选项4',
|
||||
label: '龙须面'
|
||||
}, {
|
||||
value: '选项5',
|
||||
label: '北京烤鸭'
|
||||
}],
|
||||
value: '',
|
||||
value1: [],
|
||||
value2: [],
|
||||
imagePath: process.env.VUE_APP_SERVER_URL,
|
||||
queryParams:{},
|
||||
// 店铺数量
|
||||
storeTotal:{},
|
||||
// 店铺金额
|
||||
storeAmount:{},
|
||||
power:1
|
||||
}
|
||||
},
|
||||
created() {
|
||||
let nowDate = new Date();
|
||||
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
|
||||
this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
|
||||
console.log("this.value1",this.value1)
|
||||
this.getStoreTotal()
|
||||
this.selectChildByDeptIdApi()
|
||||
this.getStoreAmount()
|
||||
},
|
||||
mounted() {
|
||||
this.initChart()
|
||||
},
|
||||
components:{
|
||||
agent,manage,shopowner
|
||||
},
|
||||
methods:{
|
||||
// 查询
|
||||
selectChildByDeptIdApi() {
|
||||
selectChildByDeptId().then(res => {
|
||||
this.options = res.data
|
||||
})
|
||||
},
|
||||
getStoreTotal(){
|
||||
storeTotalIndex().then(res => {
|
||||
this.storeTotal = res.data
|
||||
})
|
||||
},
|
||||
getStoreAmount(){
|
||||
storeAmountIndex(this.addDateRange(this.queryParams,this.value1)).then(res => {
|
||||
this.storeAmount = res.data
|
||||
})
|
||||
},
|
||||
initChart() {
|
||||
const chart = echarts.init(document.getElementById('ccc'))
|
||||
const chart1 = echarts.init(document.getElementById('cccc'))
|
||||
const chart2= echarts.init(document.getElementById('ccct'))
|
||||
const chart3= echarts.init(document.getElementById('ctct'))
|
||||
|
||||
|
||||
const option = {
|
||||
color: [
|
||||
'#0DC291',
|
||||
'#FFB519',
|
||||
],
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
radius: '80%',
|
||||
data: [
|
||||
{ value: 28, name: '28%' },
|
||||
{ value: 72, name: '72%' },
|
||||
|
||||
],
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
const option1 = {
|
||||
color: [
|
||||
'#3B6ADE',
|
||||
'#409eff',
|
||||
],
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
radius: '80%',
|
||||
data: [
|
||||
{ value: 28, name: '28%' },
|
||||
{ value: 72, name: '72%' },
|
||||
|
||||
],
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
const option2 = {
|
||||
color: [
|
||||
'#0DC291',
|
||||
'#FFB519',
|
||||
],
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
radius: '80%',
|
||||
data: [
|
||||
{ value: 28, name: '28%' },
|
||||
{ value: 72, name: '72%' },
|
||||
|
||||
],
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
const option3 = {
|
||||
color: ['#FF9655', '#0DC291', '#409EFF'],
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross',
|
||||
crossStyle: {
|
||||
color: '#999'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
legend: {
|
||||
data: ['交易金额', '交易笔数', '活跃油站数']
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
data: [
|
||||
'00:00',
|
||||
'02:00',
|
||||
'04:00',
|
||||
'06:00',
|
||||
'08:00',
|
||||
'10:00',
|
||||
'12:00',
|
||||
'14:00',
|
||||
'16:00',
|
||||
'18:00',
|
||||
'20:00',
|
||||
'22:00'
|
||||
],
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
}
|
||||
}
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
name: '金额(元)',
|
||||
|
||||
min: 0,
|
||||
max: 250,
|
||||
interval: 50,
|
||||
axisLabel: {
|
||||
formatter: '{value} '
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
name: '笔数',
|
||||
min: 0,
|
||||
max: 25,
|
||||
interval: 5,
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
}
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '活跃油站数',
|
||||
type: 'bar',
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value + ' ml';
|
||||
}
|
||||
},
|
||||
barWidth: 13,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
//这里设置柱形图圆角 5左上角,右上角,右下角,左下角]
|
||||
barBorderRadius: [50, 50, 0, 0]
|
||||
}
|
||||
},
|
||||
data: [
|
||||
30.0, 31.9, 71.0, 23.2, 41.6, 31.7, 21.6, 30.0, 31.9, 71.0, 23.2, 41.6
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
name: '交易金额',
|
||||
type: 'line',
|
||||
yAxisIndex: 1,
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value + ' °C';
|
||||
}
|
||||
},
|
||||
data: [3.0, 3.9, 7.0, 2.2, 4.6, 3.7, 2.6, 3.0, 3.9, 7.0, 3.2, 4.6]
|
||||
},
|
||||
{
|
||||
name: '交易笔数',
|
||||
type: 'line',
|
||||
yAxisIndex: 1,
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value + ' °C';
|
||||
}
|
||||
},
|
||||
data: [2.0, 3.9, 4.0, 5.2, 4.6, 6.7, 7.6, 6.0, 5.9, 4.0, 4.2, 2.6]
|
||||
}
|
||||
],
|
||||
grid: {
|
||||
left: '1%',
|
||||
right: '1%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
chart.setOption(option)
|
||||
chart1.setOption(option1)
|
||||
chart2.setOption(option2)
|
||||
chart3.setOption(option3)
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -451,195 +34,7 @@ export default {
|
||||
.app-container{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
/* height: 100vh; */
|
||||
background: #f4f5f9;
|
||||
}
|
||||
.d-s{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.bannser{
|
||||
width: 100%;
|
||||
height: 230px;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
}
|
||||
.b-bs{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.left-box{
|
||||
width: 73%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
border: 1px solid #FFFFFF;
|
||||
height: 192px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
}
|
||||
.left-box-t{
|
||||
width: 73%;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
border: 1px solid #FFFFFF;
|
||||
height: 380px;
|
||||
|
||||
}
|
||||
.right-box{
|
||||
width: 25%;
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
border: 1px solid #FFFFFF;
|
||||
height: 192px;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
}
|
||||
.right-box-t{
|
||||
width: 25%;
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
border: 1px solid #FFFFFF;
|
||||
height: 380px;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
}
|
||||
.san-box{
|
||||
width: 360px;
|
||||
height: 150px;
|
||||
box-sizing: border-box;
|
||||
border-radius: 8px;
|
||||
background: linear-gradient( 90deg, #70CAFD 0%, #02AAFE 100%);
|
||||
margin: 15px 0px;
|
||||
margin-right: 15px;
|
||||
box-sizing: border-box;
|
||||
padding: 20px 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.r-title{
|
||||
font-weight: bold;
|
||||
font-size: 42px;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
}
|
||||
.r-size{
|
||||
font-size: 14px;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.title_{
|
||||
font-size: 16px;
|
||||
color: #333333;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
}
|
||||
.hang_{
|
||||
width: 100%;
|
||||
white-space: nowrap; //不换行
|
||||
overflow: hidden; //超出部分隐藏
|
||||
text-overflow: ellipsis; //文本溢出显示省略号
|
||||
font-size: 14px;
|
||||
color: #777777;
|
||||
margin: 14px auto;
|
||||
}
|
||||
.h-tt{
|
||||
font-size: 16px;
|
||||
color: #333333;
|
||||
font-weight: bold;
|
||||
margin-right: 40px;
|
||||
}
|
||||
.q-anniu{
|
||||
width: 80px;
|
||||
height: 26px;
|
||||
background: #FF9655;
|
||||
border-radius: 4px 4px 4px 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.k-box{
|
||||
width: 215px;
|
||||
height: 68px;
|
||||
background: #FFFFFF;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #e1e0e0;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.num-size{
|
||||
font-weight: bold;
|
||||
font-size: 24px;
|
||||
color: #555555;
|
||||
}
|
||||
.sian{
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
background: #2BBCFF;
|
||||
border-radius: 50%;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.hui-hang{
|
||||
width: 100%;
|
||||
height: 5px;
|
||||
background: #F4F5F9;
|
||||
margin: 15px auto;
|
||||
}
|
||||
.h-r-ba{
|
||||
height: 170px;
|
||||
margin: 0px 50px;
|
||||
width: 5px;
|
||||
background: #f4f5f9;
|
||||
}
|
||||
.r-img{
|
||||
width: 84px;
|
||||
height: 70px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.bottom_{
|
||||
width: 100%;
|
||||
border-radius: 10px;
|
||||
background: #fff;
|
||||
box-sizing: border-box;
|
||||
padding: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.anniu-h{
|
||||
width: 80px;
|
||||
height: 26px;
|
||||
background: #FAFAFA;
|
||||
border-radius: 4px 4px 4px 4px;
|
||||
border: 1px solid #DDDDDD;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #777777;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.anniu-act{
|
||||
background: #FF9655 !important;
|
||||
border: 1px solid #FF9655 !important;
|
||||
color: #fff;
|
||||
|
||||
}
|
||||
</style>
|
||||
|
@ -32,8 +32,7 @@ public class MerchantConfigController extends BaseController {
|
||||
|
||||
@GetMapping("/list2")
|
||||
public ResponseObject list(Integer storeId){
|
||||
List<MerchantConfig> list = merchantConfigService.selectMerchList(storeId);
|
||||
return getSuccessResult(list);
|
||||
return getSuccessResult(merchantConfigService.selectMerchList(storeId));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -0,0 +1,45 @@
|
||||
package com.fuint.api.fuyou.controller;
|
||||
|
||||
import com.fuint.api.fuyou.entity.PaymentRuleConfig;
|
||||
import com.fuint.api.fuyou.service.PaymentRuleConfigService;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/ruleConfig")
|
||||
public class PaymentRuleConfigController extends BaseController {
|
||||
@Autowired
|
||||
private PaymentRuleConfigService paymentRuleConfigService;
|
||||
|
||||
@GetMapping
|
||||
public ResponseObject getList(PaymentRuleConfig paymentRuleConfig){
|
||||
return getSuccessResult(paymentRuleConfigService.selectList(paymentRuleConfig));
|
||||
}
|
||||
|
||||
@GetMapping("{id}")
|
||||
public ResponseObject getInfo(@PathVariable Integer id){
|
||||
return getSuccessResult(paymentRuleConfigService.selectRuleById(id));
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
public ResponseObject add(@RequestBody PaymentRuleConfig paymentRuleConfig){
|
||||
return getSuccessResult(paymentRuleConfigService.addPaymentRuleConfig(paymentRuleConfig));
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
public ResponseObject edit(@RequestBody PaymentRuleConfig paymentRuleConfig){
|
||||
return getSuccessResult(paymentRuleConfigService.updatePaymentRuleConfig(paymentRuleConfig));
|
||||
}
|
||||
|
||||
@DeleteMapping("{id}")
|
||||
public ResponseObject delete(@PathVariable Integer id){
|
||||
return getSuccessResult(paymentRuleConfigService.deletePaymentRuleConfig(id));
|
||||
}
|
||||
|
||||
@PostMapping("enableRule")
|
||||
public ResponseObject enablePaymentRuleConfig(@RequestBody PaymentRuleConfig paymentRuleConfig){
|
||||
return getSuccessResult(paymentRuleConfigService.enablePaymentRuleConfig(paymentRuleConfig));
|
||||
}
|
||||
}
|
@ -30,6 +30,10 @@ public class MerchantConfig extends BaseEntity implements Serializable {
|
||||
* 店铺id
|
||||
*/
|
||||
private Integer storeId;
|
||||
/**
|
||||
* 机构id
|
||||
*/
|
||||
private Integer deptId;
|
||||
/**
|
||||
* 机构号
|
||||
*/
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.fuint.api.fuyou.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fuint.framework.entity.BaseEntity;
|
||||
@ -34,10 +35,22 @@ public class OilConfig extends BaseEntity implements Serializable {
|
||||
* 商户配置id
|
||||
*/
|
||||
private Integer merchConfigId;
|
||||
/**
|
||||
* 支付规则配置id
|
||||
*/
|
||||
private Integer ruleConfigId;
|
||||
/**
|
||||
* 交易类型:1、会员充值;2、便利店;3、积分商城;4、油品
|
||||
*/
|
||||
private String transactionType;
|
||||
/**
|
||||
* 交易占比
|
||||
*/
|
||||
private Integer proportion;
|
||||
/**
|
||||
* 油号油枪id
|
||||
*/
|
||||
private String oilGunId;
|
||||
/**
|
||||
* 规则周期
|
||||
*/
|
||||
@ -50,6 +63,11 @@ public class OilConfig extends BaseEntity implements Serializable {
|
||||
* value值
|
||||
*/
|
||||
private String valueStr;
|
||||
/**
|
||||
* 油号油枪名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String oilGunName;
|
||||
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,85 @@
|
||||
package com.fuint.api.fuyou.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fuint.api.fuyou.vo.OilConfigVo;
|
||||
import com.fuint.framework.entity.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 支付规则配置表(PaymentRuleConfig)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-07-16 14:47:13
|
||||
*/
|
||||
@Data
|
||||
@TableName("payment_rule_config")
|
||||
@ApiModel(value = "PaymentRuleConfig", description = "支付规则配置表")
|
||||
public class PaymentRuleConfig extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("自增ID")
|
||||
@TableId(value = "ID", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 规则名称
|
||||
*/
|
||||
private String ruleName;
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String description;
|
||||
/**
|
||||
* 规则类型:1、按比例分账;2、按交易类型分账
|
||||
*/
|
||||
private String ruleType;
|
||||
/**
|
||||
* 油站id
|
||||
*/
|
||||
private Integer storeId;
|
||||
/**
|
||||
* 关联机构id
|
||||
*/
|
||||
private Integer deptId;
|
||||
/**
|
||||
* 规则状态:qy:启用;jy:禁用
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
|
||||
private Date startTime;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 创建用户
|
||||
*/
|
||||
private String createBy;
|
||||
/**
|
||||
* 修改用户
|
||||
*/
|
||||
private String updateBy;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<OilConfigVo> ruleList;
|
||||
}
|
||||
|
@ -2,9 +2,14 @@ package com.fuint.api.fuyou.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.fuint.api.fuyou.entity.MerchantConfig;
|
||||
import com.fuint.api.fuyou.vo.MerchantConfigVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface MerchantConfigMapper extends BaseMapper<MerchantConfig> {
|
||||
MerchantConfig getConfig(@Param("storeId") Integer storeId, @Param("mchntCd") String mchntCd);
|
||||
int subtractAmount(@Param("id") Integer id,@Param("changeTheAmount") Double changeTheAmount);
|
||||
|
||||
List<MerchantConfigVo> selectList(@Param("merchantConfig") MerchantConfigVo merchantConfig);
|
||||
}
|
||||
|
@ -23,4 +23,6 @@ public interface OilConfigMapper extends BaseMapper<OilConfig> {
|
||||
* @return
|
||||
*/
|
||||
public OilConfigVo selectOilConfigById(@Param("id") int id);
|
||||
|
||||
List<OilConfigVo> selectOilConfigListByRuleId(@Param("ruleId") Integer ruleId);
|
||||
}
|
||||
|
@ -0,0 +1,23 @@
|
||||
package com.fuint.api.fuyou.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.fuint.api.fuyou.entity.PaymentRuleConfig;
|
||||
import com.fuint.api.fuyou.vo.PaymentRuleConfigVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface PaymentRuleConfigMapper extends BaseMapper<PaymentRuleConfig> {
|
||||
/**
|
||||
* 查询列表信息
|
||||
* @param paymentRuleConfig
|
||||
* @return
|
||||
*/
|
||||
List<PaymentRuleConfigVo> selectListByStoreId(@Param("entity") PaymentRuleConfig paymentRuleConfig);
|
||||
|
||||
/**
|
||||
* 查询店铺id列表
|
||||
* @return
|
||||
*/
|
||||
List<Integer> selectStoreIdList();
|
||||
}
|
@ -14,4 +14,13 @@
|
||||
mchnt_cd = #{mchntCd}
|
||||
limit 1
|
||||
</select>
|
||||
<select id="selectList" resultType="com.fuint.api.fuyou.vo.MerchantConfigVo"
|
||||
parameterType="com.fuint.api.fuyou.vo.MerchantConfigVo">
|
||||
SELECT mc.*,sd.dept_name,ta.real_name FROM `merchant_config` mc
|
||||
LEFT JOIN sys_dept sd ON mc.dept_id = sd.dept_id
|
||||
LEFT JOIN t_account ta ON mc.create_by = ta.acct_id
|
||||
<where>
|
||||
mc.store_id = #{merchantConfig.storeId}
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
@ -16,4 +16,11 @@
|
||||
oc.id = #{id}
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectOilConfigListByRuleId" resultType="com.fuint.api.fuyou.vo.OilConfigVo"
|
||||
parameterType="java.lang.Integer">
|
||||
<include refid="selectOilConfig"></include>
|
||||
<where>
|
||||
oc.rule_config_id = #{ruleId}
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.fuint.api.fuyou.mapper.PaymentRuleConfigMapper">
|
||||
|
||||
<select id="selectListByStoreId" resultType="com.fuint.api.fuyou.vo.PaymentRuleConfigVo"
|
||||
parameterType="com.fuint.api.fuyou.entity.PaymentRuleConfig">
|
||||
SELECT prc.*,ta.real_name FROM `payment_rule_config` prc
|
||||
LEFT JOIN t_account ta ON prc.create_by = ta.acct_id
|
||||
<where>
|
||||
prc.store_id = #{entity.storeId}
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectStoreIdList" resultType="java.lang.Integer">
|
||||
SELECT store_id FROM payment_rule_config GROUP BY store_id
|
||||
</select>
|
||||
</mapper>
|
@ -2,6 +2,7 @@ package com.fuint.api.fuyou.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fuint.api.fuyou.entity.MerchantConfig;
|
||||
import com.fuint.api.fuyou.vo.MerchantConfigVo;
|
||||
import io.swagger.models.auth.In;
|
||||
|
||||
import java.util.List;
|
||||
@ -43,7 +44,7 @@ public interface MerchantConfigService extends IService<MerchantConfig> {
|
||||
*/
|
||||
public List<MerchantConfig> selectMerchList();
|
||||
|
||||
public List<MerchantConfig> selectMerchList(Integer storeId);
|
||||
public List<MerchantConfigVo> selectMerchList(Integer storeId);
|
||||
|
||||
/**
|
||||
* 根据id查询商户信息
|
||||
@ -52,6 +53,14 @@ public interface MerchantConfigService extends IService<MerchantConfig> {
|
||||
*/
|
||||
public MerchantConfig selectMerchById(int id);
|
||||
|
||||
/**
|
||||
* 根据商户号和店铺id查询商户配置信息
|
||||
* @param storeId
|
||||
* @param mchntCd
|
||||
* @return
|
||||
*/
|
||||
MerchantConfig selectByMchntCd(Integer storeId,String mchntCd);
|
||||
|
||||
/**
|
||||
* 将此店铺中所有的使用1改为0
|
||||
*/
|
||||
|
@ -21,6 +21,12 @@ public interface OilConfigService extends IService<OilConfig> {
|
||||
*/
|
||||
public int judgmentProportion(Integer storeId);
|
||||
|
||||
/**
|
||||
* 判断占比相加是否为100% 是返回1 不是返回0
|
||||
* @return
|
||||
*/
|
||||
public int judgmentProportion1(Integer storeId,Integer ruleConfigId);
|
||||
|
||||
/**
|
||||
* 规则周期是否为当日
|
||||
*/
|
||||
@ -60,4 +66,13 @@ public interface OilConfigService extends IService<OilConfig> {
|
||||
* @param id
|
||||
*/
|
||||
public void delOilConfig(int id);
|
||||
|
||||
/**
|
||||
* 根据支付配置规则id查询配置列表信息
|
||||
* @param ruleId
|
||||
* @return
|
||||
*/
|
||||
List<OilConfigVo> selectListByRuleConfigId(Integer ruleId);
|
||||
|
||||
void deleteOilConfigByRuleId(Integer ruleId);
|
||||
}
|
||||
|
@ -0,0 +1,63 @@
|
||||
package com.fuint.api.fuyou.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fuint.api.fuyou.entity.PaymentRuleConfig;
|
||||
import com.fuint.api.fuyou.vo.PaymentRuleConfigVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface PaymentRuleConfigService extends IService<PaymentRuleConfig> {
|
||||
/**
|
||||
* 查询列表信息
|
||||
* @param paymentRuleConfig
|
||||
* @return
|
||||
*/
|
||||
List<PaymentRuleConfigVo> selectList(PaymentRuleConfig paymentRuleConfig);
|
||||
|
||||
/**
|
||||
* 根据id查询详情信息
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
PaymentRuleConfig selectRuleById(Integer id);
|
||||
|
||||
/**
|
||||
* 根据id查询详情信息
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
PaymentRuleConfig selectRuleByRuleName(String name,Integer storeId);
|
||||
|
||||
/**
|
||||
* 添加支付配置规则信息
|
||||
* @param ruleConfig
|
||||
* @return
|
||||
*/
|
||||
int addPaymentRuleConfig(PaymentRuleConfig ruleConfig);
|
||||
|
||||
/**
|
||||
* 修改支付配置规则信息
|
||||
* @param ruleConfig
|
||||
* @return
|
||||
*/
|
||||
int updatePaymentRuleConfig(PaymentRuleConfig ruleConfig);
|
||||
|
||||
/**
|
||||
* 删除支付配置规则信息
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
int deletePaymentRuleConfig(Integer id);
|
||||
|
||||
/**
|
||||
* 启用支付配置规则
|
||||
* @param ruleConfig
|
||||
* @return
|
||||
*/
|
||||
int enablePaymentRuleConfig(PaymentRuleConfig ruleConfig);
|
||||
|
||||
/**
|
||||
* 判断规则是否到启用时间
|
||||
*/
|
||||
void ifEnablePaymentRuleConfig();
|
||||
}
|
@ -8,6 +8,7 @@ import com.fuint.api.fuyou.entity.MerchantConfig;
|
||||
import com.fuint.api.fuyou.mapper.MerchantConfigMapper;
|
||||
import com.fuint.api.fuyou.service.MerchantConfigService;
|
||||
import com.fuint.api.fuyou.service.OilConfigService;
|
||||
import com.fuint.api.fuyou.vo.MerchantConfigVo;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.RedisLock;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
@ -18,6 +19,7 @@ import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 商户配置信息 业务层
|
||||
@ -81,11 +83,10 @@ public class MerchantConfigServiceImpl extends ServiceImpl<MerchantConfigMapper,
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MerchantConfig> selectMerchList(Integer storeId) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("store_id",storeId);
|
||||
List list = baseMapper.selectList(queryWrapper);
|
||||
return list;
|
||||
public List<MerchantConfigVo> selectMerchList(Integer storeId) {
|
||||
MerchantConfigVo merchantConfigVo = new MerchantConfigVo();
|
||||
merchantConfigVo.setStoreId(storeId);
|
||||
return baseMapper.selectList(merchantConfigVo);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -94,6 +95,14 @@ public class MerchantConfigServiceImpl extends ServiceImpl<MerchantConfigMapper,
|
||||
return merchantConfig;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MerchantConfig selectByMchntCd(Integer storeId, String mchntCd) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("store_id",storeId);
|
||||
queryWrapper.eq("mchnt_cd",mchntCd);
|
||||
return baseMapper.selectOne(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateMerchOrter(int storeId) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
@ -147,6 +156,10 @@ public class MerchantConfigServiceImpl extends ServiceImpl<MerchantConfigMapper,
|
||||
|
||||
@Override
|
||||
public int updateMerchRemark(MerchantConfig merchantConfig) {
|
||||
MerchantConfig merchantConfig1 = selectByMchntCd(merchantConfig.getStoreId(), merchantConfig.getMchntCd());
|
||||
if (ObjectUtil.isNotEmpty(merchantConfig1) && !Objects.equals(merchantConfig.getId(), merchantConfig1.getId())){
|
||||
return 0;
|
||||
}
|
||||
return baseMapper.updateById(merchantConfig);
|
||||
}
|
||||
|
||||
@ -158,6 +171,10 @@ public class MerchantConfigServiceImpl extends ServiceImpl<MerchantConfigMapper,
|
||||
if (ObjectUtil.isEmpty(merchantConfig.getStoreId())) {
|
||||
storeId = nowAccountInfo.getStoreId();
|
||||
}
|
||||
MerchantConfig merchantConfig2 = selectByMchntCd(storeId, merchantConfig.getMchntCd());
|
||||
if (ObjectUtil.isNotEmpty(merchantConfig2)){
|
||||
return 2;
|
||||
}
|
||||
merchantConfig.setStoreId(storeId);
|
||||
int row = 0;
|
||||
if (merchantConfig.getMerchantName().equals("富友")){
|
||||
|
@ -2,6 +2,7 @@ package com.fuint.api.fuyou.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.api.fuyou.entity.MerchantConfig;
|
||||
import com.fuint.api.fuyou.entity.OilConfig;
|
||||
@ -9,6 +10,8 @@ import com.fuint.api.fuyou.mapper.OilConfigMapper;
|
||||
import com.fuint.api.fuyou.service.MerchantConfigService;
|
||||
import com.fuint.api.fuyou.service.OilConfigService;
|
||||
import com.fuint.api.fuyou.vo.OilConfigVo;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilGun;
|
||||
import com.fuint.business.petrolStationManagement.service.OilGunService;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.StringUtils;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
@ -17,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.config.ScheduledTaskRegistrar;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
@ -26,6 +30,8 @@ import java.util.*;
|
||||
public class OilConfigServiceImpl extends ServiceImpl<OilConfigMapper, OilConfig> implements OilConfigService {
|
||||
@Autowired
|
||||
private MerchantConfigService merchantConfigService;
|
||||
@Resource
|
||||
private OilGunService oilGunService;
|
||||
|
||||
@Override
|
||||
public void oilRule(Integer storeId) {
|
||||
@ -82,6 +88,22 @@ public class OilConfigServiceImpl extends ServiceImpl<OilConfigMapper, OilConfig
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@Override
|
||||
public int judgmentProportion1(Integer storeId,Integer ruleConfigId) {
|
||||
int result = 0;
|
||||
int percentage = 0;
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("store_id",storeId);
|
||||
queryWrapper.eq("rule_config_id",ruleConfigId);
|
||||
List<OilConfig> list = baseMapper.selectList(queryWrapper);
|
||||
for (OilConfig config : list) {
|
||||
percentage += config.getProportion();
|
||||
}
|
||||
if (percentage==100){
|
||||
result = 1;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ruleCycle(String ruleCycle,Integer storeId) {
|
||||
@ -130,18 +152,22 @@ public class OilConfigServiceImpl extends ServiceImpl<OilConfigMapper, OilConfig
|
||||
storeId = oilConfig.getStoreId();
|
||||
}
|
||||
OilConfig config = new OilConfig();
|
||||
config.setRuleConfigId(oilConfig.getRuleConfigId());
|
||||
config.setOilGunId(oilConfig.getOilGunId());
|
||||
config.setTransactionType(oilConfig.getTransactionType());
|
||||
config.setMerchConfigId(oilConfig.getMerchConfigId());
|
||||
config.setStoreId(storeId);
|
||||
config.setProportion(oilConfig.getProportion());
|
||||
config.setKeyStr(oilConfig.getKeyStr());
|
||||
config.setValueStr(oilConfig.getValueStr());
|
||||
config.setMerchConfigId(oilConfig.getMerchConfigId());
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("merch_config_id",oilConfig.getMerchConfigId());
|
||||
OilConfig oilConfig1 = baseMapper.selectOne(queryWrapper);
|
||||
if (!ObjectUtil.isEmpty(oilConfig1)){
|
||||
return 0;
|
||||
}
|
||||
// QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
// queryWrapper.eq("merch_config_id",oilConfig.getMerchConfigId());
|
||||
// queryWrapper.eq("store_id",storeId);
|
||||
// OilConfig oilConfig1 = baseMapper.selectOne(queryWrapper);
|
||||
// if (!ObjectUtil.isEmpty(oilConfig1)){
|
||||
// return 0;
|
||||
// }
|
||||
int row = baseMapper.insert(config);
|
||||
return row;
|
||||
}
|
||||
@ -156,4 +182,34 @@ public class OilConfigServiceImpl extends ServiceImpl<OilConfigMapper, OilConfig
|
||||
public void delOilConfig(int id) {
|
||||
baseMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OilConfigVo> selectListByRuleConfigId(Integer ruleId) {
|
||||
List<OilConfigVo> oilConfigs = baseMapper.selectOilConfigListByRuleId(ruleId);
|
||||
for (OilConfig oilConfig : oilConfigs) {
|
||||
if (ObjectUtil.isNotEmpty(oilConfig.getOilGunId())) {
|
||||
String[] split = oilConfig.getOilGunId().split(",");
|
||||
String oilGunName = "";
|
||||
OilGun oilGun1 = new OilGun();
|
||||
oilGun1.setStoreId(oilConfig.getStoreId());
|
||||
List<OilGun> records = oilGunService.queryByPage(new Page(1, 10000), oilGun1).getRecords();
|
||||
for (OilGun record : records) {
|
||||
for (String gunId : split) {
|
||||
if (gunId.equals(record.getId())){
|
||||
oilGunName += record.getOilNumber() + "-" + record.getGunName() + ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
oilConfig.setOilGunName(oilGunName);
|
||||
}
|
||||
}
|
||||
return oilConfigs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteOilConfigByRuleId(Integer ruleId) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("rule_config_id",ruleId);
|
||||
baseMapper.delete(queryWrapper);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,154 @@
|
||||
package com.fuint.api.fuyou.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.api.fuyou.entity.OilConfig;
|
||||
import com.fuint.api.fuyou.entity.PaymentRuleConfig;
|
||||
import com.fuint.api.fuyou.mapper.PaymentRuleConfigMapper;
|
||||
import com.fuint.api.fuyou.service.OilConfigService;
|
||||
import com.fuint.api.fuyou.service.PaymentRuleConfigService;
|
||||
import com.fuint.api.fuyou.vo.OilConfigVo;
|
||||
import com.fuint.api.fuyou.vo.PaymentRuleConfigVo;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@Service
|
||||
public class PaymentRuleConfigServiceImpl extends ServiceImpl<PaymentRuleConfigMapper, PaymentRuleConfig> implements PaymentRuleConfigService {
|
||||
|
||||
@Autowired
|
||||
private OilConfigService oilConfigService;
|
||||
|
||||
@Override
|
||||
public List<PaymentRuleConfigVo> selectList(PaymentRuleConfig paymentRuleConfig) {
|
||||
List<PaymentRuleConfigVo> list = baseMapper.selectListByStoreId(paymentRuleConfig);
|
||||
for (PaymentRuleConfig ruleConfig : list) {
|
||||
List<OilConfigVo> oilConfigs = oilConfigService.selectListByRuleConfigId(ruleConfig.getId());
|
||||
ruleConfig.setRuleList(oilConfigs);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PaymentRuleConfig selectRuleById(Integer id) {
|
||||
PaymentRuleConfig paymentRuleConfig = baseMapper.selectById(id);
|
||||
if (ObjectUtil.isNotEmpty(paymentRuleConfig)){
|
||||
List<OilConfigVo> oilConfigs = oilConfigService.selectListByRuleConfigId(id);
|
||||
paymentRuleConfig.setRuleList(oilConfigs);
|
||||
}
|
||||
return paymentRuleConfig;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PaymentRuleConfig selectRuleByRuleName(String name,Integer storeId) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("store_id",storeId);
|
||||
queryWrapper.eq("rule_name",name);
|
||||
return baseMapper.selectOne(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int addPaymentRuleConfig(PaymentRuleConfig ruleConfig) {
|
||||
PaymentRuleConfig paymentRuleConfig = selectRuleByRuleName(ruleConfig.getRuleName(), ruleConfig.getStoreId());
|
||||
if (ObjectUtil.isNotEmpty(paymentRuleConfig)){
|
||||
return 0;
|
||||
}
|
||||
int row = baseMapper.insert(ruleConfig);
|
||||
paymentRuleConfig = selectRuleByRuleName(ruleConfig.getRuleName(), ruleConfig.getStoreId());
|
||||
if (ObjectUtil.isNotEmpty(ruleConfig.getRuleList())){
|
||||
for (OilConfigVo oilConfig : ruleConfig.getRuleList()) {
|
||||
oilConfig.setRuleConfigId(paymentRuleConfig.getId());
|
||||
oilConfigService.insertOilConfig(oilConfig);
|
||||
}
|
||||
}
|
||||
return row;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updatePaymentRuleConfig(PaymentRuleConfig ruleConfig) {
|
||||
PaymentRuleConfig paymentRuleConfig = selectRuleByRuleName(ruleConfig.getRuleName(), ruleConfig.getStoreId());
|
||||
if (ObjectUtil.isNotEmpty(paymentRuleConfig) && !Objects.equals(paymentRuleConfig.getId(), ruleConfig.getId())){
|
||||
return 0;
|
||||
}
|
||||
int row = baseMapper.updateById(ruleConfig);
|
||||
oilConfigService.deleteOilConfigByRuleId(ruleConfig.getId());
|
||||
if (ObjectUtil.isNotEmpty(ruleConfig.getRuleList())){
|
||||
for (OilConfigVo oilConfig : ruleConfig.getRuleList()) {
|
||||
oilConfig.setRuleConfigId(ruleConfig.getId());
|
||||
oilConfigService.insertOilConfig(oilConfig);
|
||||
}
|
||||
}
|
||||
return row;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deletePaymentRuleConfig(Integer id) {
|
||||
int row = baseMapper.deleteById(id);
|
||||
oilConfigService.deleteOilConfigByRuleId(id);
|
||||
return row;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int enablePaymentRuleConfig(PaymentRuleConfig ruleConfig) {
|
||||
if (ruleConfig.getStartTime().before(new Date())) {
|
||||
QueryWrapper<PaymentRuleConfig> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("store_id", ruleConfig.getStoreId());
|
||||
List<PaymentRuleConfig> list = baseMapper.selectList(queryWrapper);
|
||||
for (PaymentRuleConfig paymentRuleConfig : list) {
|
||||
paymentRuleConfig.setStatus("jy");
|
||||
baseMapper.updateById(paymentRuleConfig);
|
||||
}
|
||||
int i = 1;
|
||||
if (ruleConfig.getStatus().equals("qy") && ruleConfig.getRuleType().equals("1")){
|
||||
i = oilConfigService.judgmentProportion1(ruleConfig.getStoreId(), ruleConfig.getId());
|
||||
}
|
||||
if (i==0){
|
||||
return 0;
|
||||
}
|
||||
return baseMapper.updateById(ruleConfig);
|
||||
}else {
|
||||
if (ruleConfig.getStatus().equals("qy")){
|
||||
ruleConfig.setStatus("jy");
|
||||
}
|
||||
return baseMapper.updateById(ruleConfig);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断规则是否到启用时间
|
||||
*/
|
||||
@Scheduled(cron = "0 */1 * * * ?")
|
||||
public void ifEnablePaymentRuleConfig(){
|
||||
List<Integer> ids = baseMapper.selectStoreIdList();
|
||||
for (Integer storeId : ids) {
|
||||
QueryWrapper<PaymentRuleConfig> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("store_id",storeId);
|
||||
queryWrapper.orderByAsc("start_time");
|
||||
List<PaymentRuleConfig> list = baseMapper.selectList(queryWrapper);
|
||||
for (PaymentRuleConfig paymentRuleConfig : list) {
|
||||
if (ObjectUtil.isNotEmpty(paymentRuleConfig.getStartTime()) && paymentRuleConfig.getStartTime().before(new Date())) {
|
||||
int i = 1;
|
||||
if (paymentRuleConfig.getRuleType().equals("1")){
|
||||
i = oilConfigService.judgmentProportion1(paymentRuleConfig.getStoreId(), paymentRuleConfig.getId());
|
||||
}
|
||||
if (i==0){
|
||||
return;
|
||||
}
|
||||
|
||||
for (PaymentRuleConfig ruleConfig : list) {
|
||||
ruleConfig.setStatus("jy");
|
||||
baseMapper.updateById(ruleConfig);
|
||||
}
|
||||
paymentRuleConfig.setStatus("qy");
|
||||
baseMapper.updateById(paymentRuleConfig);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.fuint.api.fuyou.vo;
|
||||
|
||||
import com.fuint.api.fuyou.entity.MerchantConfig;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class MerchantConfigVo extends MerchantConfig {
|
||||
/**
|
||||
* 机构名称
|
||||
*/
|
||||
private String deptName;
|
||||
/**
|
||||
* 创建人名称
|
||||
*/
|
||||
private String realName;
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package com.fuint.api.fuyou.vo;
|
||||
|
||||
import com.fuint.api.fuyou.entity.PaymentRuleConfig;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class PaymentRuleConfigVo extends PaymentRuleConfig {
|
||||
private String realName;
|
||||
}
|
@ -76,6 +76,8 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
|
||||
@Autowired
|
||||
private OilOrderService orderService;
|
||||
@Autowired
|
||||
private ISysDeptService deptService;
|
||||
|
||||
@Resource
|
||||
AllOrderInfoMapper allOrderInfoMapper;
|
||||
@ -1051,6 +1053,12 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
@Override
|
||||
public Map<String, Object> getAmount(AllOrderInfoVo allOrderInfoVo) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
List<SysDeptVo> sysDeptVos = deptService.selectChildByDeptId(nowAccountInfo.getDeptId());
|
||||
List<Integer> ids = new ArrayList<>();
|
||||
|
||||
|
||||
Integer tradeTotal = ObjectUtil.isNotEmpty(baseMapper.selectTotal(allOrderInfoVo)) ? baseMapper.selectTotal(allOrderInfoVo) : 0;
|
||||
Double tradeAmount = ObjectUtil.isNotEmpty(baseMapper.selectAllAmount(allOrderInfoVo)) ? baseMapper.selectAllAmount(allOrderInfoVo) : 0;
|
||||
allOrderInfoVo.setStatus("refund");
|
||||
|
@ -53,8 +53,10 @@ public class OilGunServiceImpl implements OilGunService {
|
||||
*/
|
||||
@Override
|
||||
public IPage<OilGun> queryByPage(@Param("page") Page page, @Param("oilGun") OilGun oilGun) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
oilGun.setStoreId(nowAccountInfo.getStoreId());
|
||||
if (ObjectUtil.isEmpty(oilGun.getStoreId())) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
oilGun.setStoreId(nowAccountInfo.getStoreId());
|
||||
}
|
||||
return oilGunDao.queryAllByLimit(page, oilGun);
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,8 @@ import com.fuint.framework.exception.BusinessCheckException;
|
||||
import com.fuint.framework.pagination.PaginationRequest;
|
||||
import com.fuint.framework.pagination.PaginationResponse;
|
||||
import com.fuint.business.store.entity.MtStore;
|
||||
import com.fuint.system.dept.vo.SysDeptVo;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -116,4 +118,6 @@ public interface StoreService extends IService<MtStore> {
|
||||
List<Map<Object,Object>> getByStroeName(MtStore storeName);
|
||||
|
||||
Map<String,Object> getStoreTotal(LJStore store);
|
||||
|
||||
List<Integer> getStoreIds(List<SysDeptVo> sysDeptVos);
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ import com.fuint.repository.model.TAccount;
|
||||
import com.fuint.system.dept.entity.SysDept;
|
||||
import com.fuint.system.dept.mapper.SysDeptMapper;
|
||||
import com.fuint.system.dept.service.ISysDeptService;
|
||||
import com.fuint.system.dept.vo.SysDeptVo;
|
||||
import com.fuint.system.role.entity.TDuty;
|
||||
import com.fuint.system.role.mapper.TDutyMapper;
|
||||
import com.fuint.utils.StringUtil;
|
||||
@ -649,6 +650,15 @@ public class StoreServiceImpl extends ServiceImpl<MtStoreMapper, MtStore> implem
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Integer> getStoreIds(List<SysDeptVo> sysDeptVos) {
|
||||
List<Integer> ids = new ArrayList<>();
|
||||
for (SysDeptVo sysDeptVo : sysDeptVos) {
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
// 将在部门里面删除的在油站中删除
|
||||
public void beachDelStore() {
|
||||
|
@ -15,8 +15,10 @@ import com.fuint.repository.mapper.TSourceMapper;
|
||||
import com.fuint.repository.model.TSource;
|
||||
import com.fuint.common.domain.TreeNode;
|
||||
import com.fuint.framework.exception.BusinessCheckException;
|
||||
import com.fuint.system.role.service.DutyService;
|
||||
import com.fuint.utils.ArrayUtil;
|
||||
import com.fuint.utils.StringUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@ -35,6 +37,8 @@ public class SourceServiceImpl extends ServiceImpl<TSourceMapper, TSource> imple
|
||||
|
||||
@Resource
|
||||
private TSourceMapper tSourceMapper;
|
||||
@Autowired
|
||||
private DutyService tDutyService;
|
||||
|
||||
/**
|
||||
* 获取有效的角色集合
|
||||
@ -48,14 +52,26 @@ public class SourceServiceImpl extends ServiceImpl<TSourceMapper, TSource> imple
|
||||
|
||||
@Override
|
||||
public List<TSource> getButtonPermi(String path) {
|
||||
List<TSource> byStatusButton = null;
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
List<Long> checkedKeys = tDutyService.getSourceIdsByDutyId(Integer.valueOf(nowAccountInfo.getRoleIds()));
|
||||
if (path.startsWith("/")) {
|
||||
path = path.substring(1);
|
||||
}
|
||||
List<TSource> byStatusButton = new ArrayList<>();
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("path",path);
|
||||
queryWrapper.eq("status","A");
|
||||
queryWrapper.eq("is_menu","1");
|
||||
TSource tSource = baseMapper.selectOne(queryWrapper);
|
||||
if (ObjectUtil.isNotEmpty(tSource)){
|
||||
byStatusButton = tSourceMapper.findByStatusButton(tSource.getSourceId(), StatusEnum.ENABLED.getKey());
|
||||
List<TSource> byStatusButton1 = tSourceMapper.findByStatusButton(tSource.getSourceId(), StatusEnum.ENABLED.getKey());
|
||||
for (TSource source : byStatusButton1) {
|
||||
for (Long checkedKey : checkedKeys) {
|
||||
if (checkedKey.compareTo(Long.valueOf(source.getSourceId()))==0){
|
||||
byStatusButton.add(source);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return byStatusButton;
|
||||
}
|
||||
|
@ -257,6 +257,12 @@ public class BackendSourceController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private DutyService tDutyService;
|
||||
|
||||
@GetMapping("/getButtonPermi")
|
||||
public ResponseObject getButtonPermi(TSource tSource){
|
||||
return getSuccessResult(sourceService.getButtonPermi(tSource.getPath()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取菜单下拉树列表
|
||||
* */
|
||||
|
Loading…
Reference in New Issue
Block a user