管理端 新增需求

pull/17/head
Jruome 2023-06-19 14:37:00 +08:00
parent 7ca2a339b2
commit 9d0790a24f
8 changed files with 280 additions and 17 deletions

View File

@ -1,5 +1,14 @@
import request from '@/utils/request'
// 获取商户
export function getTenantList(data) {
return request({
url: '/system/statement/getTenantList',
method: 'get'
})
}
// 创建订单
export function createRechargeOrder(data) {
return request({

View File

@ -1,9 +1,9 @@
<template>
<el-alert v-if="enable()" type="success" show-icon>
<template slot="title">
<div @click="goToUrl">{{ '' + title + '' + url }}</div>
</template>
</el-alert>
<!-- <el-alert v-if="enable()" type="success" show-icon>-->
<!-- <template slot="title">-->
<!-- <div @click="goToUrl">{{ '' + title + '' + url }}</div>-->
<!-- </template>-->
<!-- </el-alert>-->
</template>
<script>

View File

@ -3,8 +3,8 @@
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="98px">
<el-form-item label="商名称" prop="tenantName">
<el-input v-model="queryParams.tenantName" placeholder="请输入商名称" clearable @keyup.enter.native="handleQuery"/>
<el-form-item label="商名称" prop="tenantName">
<el-input v-model="queryParams.tenantName" placeholder="请输入商名称" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="订单编号" prop="orderId">
<el-input v-model="queryParams.orderId" placeholder="请输入订单编号" clearable @keyup.enter.native="handleQuery"/>
@ -51,7 +51,7 @@
</el-table-column>
<el-table-column label="销售金额" align="center" prop="payPrice" />
<el-table-column label="提成金额" align="center" prop="commissionPrice" />
<el-table-column label="商名称" align="center" prop="tenantName" />
<el-table-column label="商名称" align="center" prop="tenantName" />
<el-table-column label="支付方式" align="center" prop="payType" >
<template v-slot="scope">
<dict-tag :type="DICT_TYPE.PAY_TYPE" :value="scope.row.payType"/>

View File

@ -44,7 +44,7 @@
<!-- </el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" v-hasPermi="['member:promoter:allExcel']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
@ -70,7 +70,7 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['member:promoter:update']">修改
v-hasPermi="['member:promoter:allUpdate']">修改
</el-button>
<!-- <el-button size="mini" type="text" icon="el-icon-key" @click="handleUpdatePassword(scope.row)"-->
<!-- v-hasPermi="['member:promoter:delete']">修改密码-->

View File

@ -10,9 +10,13 @@
<el-input v-model="queryParams.paySerialNumber" placeholder="请输入交易流水号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="下单时间" prop="payTime">
<el-date-picker v-model="queryParams.payTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="daterange"
<el-date-picker v-model="queryParams.payTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange"
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="商户名称" prop="tenantId">
<treeselect style="width: 240px;" v-model="queryParams.tenantId" :options="deptOptions" :show-count="true"
placeholder="请选择商户名称" :normalizer="normalizer" @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="推广员" prop="nickname">
<el-input v-model="queryParams.nickname" placeholder="请输入推广员" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
@ -28,11 +32,19 @@
<el-option value="1" label="已发货"/>
</el-select>
</el-form-item>
<el-form-item label="支付状态" prop="userPhone">
<el-form-item label="支付状态" prop="paid">
<el-select v-model="queryParams.paid" placeholder="请选择支付状态" clearable style="width: 240px">
<el-option v-for="dict in statusDictDatas" :key="parseInt(dict.value)" :label="dict.label" :value="parseInt(dict.value)"/>
</el-select>
</el-form-item>
<el-form-item label="退款状态" prop="refundStatus">
<el-select v-model="queryParams.refundStatus" placeholder="请选择退款状态" clearable @keyup.enter.native="handleQuery">
<el-option :value="0" label="未退款"/>
<el-option :value="1" label="申请中"/>
<el-option :value="2" label="已退款"/>
<el-option :value="3" label="退款中"/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery" v-hasPermi="['shop:recharge-order:query']"></el-button>
<el-button icon="el-icon-refresh" @click="resetQuery"></el-button>
@ -71,6 +83,7 @@
<span>{{ parseTime(scope.row.payTime) }}</span>
</template>
</el-table-column>
<el-table-column label="商户名称" align="center" prop="tenantName" />
<el-table-column label="推广员" align="center" prop="parentOrganizationName" >
<template v-slot="scope">
<span>{{ scope.row.parentOrganizationName }}</span>
@ -137,7 +150,7 @@ import {
createRechargeOrder,
updateRechargeOrder,
deleteRechargeOrder,
getRechargeOrder,
getTenantList,
updateByIds,
getRechargeOrderPage,
exportRechargeOrderExcel,
@ -145,7 +158,8 @@ import {
} from '@/api/shop/rechargeOrder';
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
import ElementForm from "@/components/bpmnProcessDesigner/package/penal/form/ElementForm.vue";
import Treeselect from "@riophae/vue-treeselect";
import '@riophae/vue-treeselect/dist/vue-treeselect.css';
export default {
name: "RechargeOrder",
computed: {
@ -154,10 +168,12 @@ export default {
}
},
components: {
Treeselect,
ElementForm
},
data() {
return {
deptOptions:[],
//
loading: true,
//
@ -242,8 +258,24 @@ export default {
},
created() {
this.getList();
this.getTreeselect();
},
methods: {
/** 查询部门下拉树结构 + 岗位下拉 */
getTreeselect() {
getTenantList().then(response => {
// deptOptions
this.deptOptions = response.data
});
},
//
normalizer(node) {
return {
id: node.id,
label: node.name,
children: node.children
}
},
selectable(row,rowIndex) {
if(!row.status){
return true; //

View File

@ -0,0 +1,222 @@
<template>
<div class="app-container">
<el-card class="box-card">
<div slot="header" class="clearfix">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="100px">
<el-form-item label="快速查看" class="width100" prop="type">
<el-radio-group v-model="queryParams.type" type="button" class="mr20" size="small" @change="handleChange">
<el-radio-button v-for="(item,i) in lookList" :label=i+1 :key="i">{{item.name}}</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item label="选择日期" class="width100" prop="dateLimit">
<el-date-picker @change="onchangeTime" v-model="queryParams.dateLimit" :default-time="['00:00:00', '23:59:59']" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" size="small" type="datetimerange" start-placeholder=""
end-placeholder="结束时间" placement="bottom-end" placeholder="自定义时间" style="width: 220px;" ></el-date-picker>
</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-form-item>
</el-form>
</div>
<div class="statistics">
<div v-for="(item,index) in statisticsList" :key="index" :class="[item.class,'statistics_item']">
<span>{{item.name}}</span>
<span v-if="index<2">{{item.value}}</span>
<span v-else>{{item.value}} </span>
</div>
</div>
</el-card>
</div>
<!-- <div class="dashboard-editor-container">-->
<!-- <panel-group @handleSetLineChartData="handleSetLineChartData" />-->
<!-- <el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;">-->
<!-- <line-chart :chart-data="lineChartData" />-->
<!-- </el-row>-->
<!-- <el-row :gutter="32">-->
<!-- <el-col :xs="24" :sm="24" :lg="8">-->
<!-- <div class="chart-wrapper">-->
<!-- <raddar-chart />-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :xs="24" :sm="24" :lg="8">-->
<!-- <div class="chart-wrapper">-->
<!-- <pie-chart />-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :xs="24" :sm="24" :lg="8">-->
<!-- <div class="chart-wrapper">-->
<!-- <bar-chart />-->
<!-- </div>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- </div>-->
</template>
<script>
import PanelGroup from '@/views/dashboard/PanelGroup'
import LineChart from '@/views/dashboard/LineChart'
import RaddarChart from '@/views/dashboard/RaddarChart'
import PieChart from '@/views/dashboard/PieChart'
import BarChart from '@/views/dashboard/BarChart'
import creatComment from "@/views/mall/product/comment/creatComment.vue";
import {getTenantId} from '@/utils/auth'
import {
statisticsAll
} from '@/api/index';
const lineChartData = {
newVisitis: {
expectedData: [100, 120, 161, 134, 105, 160, 165],
actualData: [120, 82, 91, 154, 162, 140, 145]
},
messages: {
expectedData: [200, 192, 120, 144, 160, 130, 140],
actualData: [180, 160, 151, 106, 145, 150, 130]
},
purchases: {
expectedData: [80, 100, 121, 104, 105, 90, 100],
actualData: [120, 90, 100, 138, 142, 130, 130]
},
shoppings: {
expectedData: [130, 140, 141, 142, 145, 150, 160],
actualData: [120, 82, 91, 154, 162, 140, 130]
}
}
export default {
name: 'Index',
components: {
creatComment,
PanelGroup,
LineChart,
RaddarChart,
PieChart,
BarChart
},
data() {
return {
lineChartData: lineChartData.newVisitis,
queryParams: {
type:4
},
// list:[],
lookList:[{name:'今日'},{name:'上周'},{name:'上月'},{name:'全部'}],
statisticsList:[{name:'总销售金额',class:'totalMoney',value:0},{name:'总退款金额',class:'totalWithdrawMoney',value:0},{name:'总订单数量(单)',class:'totalNum',value:0},{name:'240档订单数量',class:'threeTotalNum',value:0},{name:'400档订单数量',class:'twoTotalNum',value:0},{name:'640档订单数量',class:'oneTotalNum',value:0}],
}
},
created() {
this.getList();
},
methods: {
handleChange(){
this.queryParams ={type:this.queryParams.type}
this.getList()
},
onchangeTime(value){
this.queryParams.type = null
this.queryParams.startTime = value[0]
this.queryParams.endTime = value[1]
},
/** 查询列表 */
getList() {
this.loading = true;
//
statisticsAll({tenantId:getTenantId(),...this.queryParams}).then(response => {
this.statisticsList.forEach((item,index) =>{
for (let key in response.data){
if(item.class === key){
item.value = response.data[key] || 0
}
}
})
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams ={
type: 4
};
this.handleQuery();
},
handleSetLineChartData(type) {
this.lineChartData = lineChartData[type]
}
}
}
</script>
<style lang="scss" scoped>
.statistics{
width: 100%;
height: 30%;
display: flex;
justify-content: space-around;
flex-wrap: wrap;
border-bottom: 1px solid #e6ebf5;
.statistics_item{
border-radius: 10px;
width: 240px;
min-height: 90px;
margin: 10px 6%;
font-size: 20px;
color: #fff;
display: flex;
flex-direction: column;
justify-content: center;
word-wrap: break-word;
span:nth-of-type(1){
margin-left: 20px;
}
span:nth-of-type(2){
margin-left: 40px;
}
}
.totalMoney{
background: rgb(77,157,255);
}
.totalNum{
background: rgb(95,212,89);
}
.totalWithdrawMoney{
background: rgb(171,109,234);
}
.threeTotalNum{
background: rgb(255,154,1);
}
.twoTotalNum{
background: rgb(10,193,224);
}
.oneTotalNum{
background: rgb(10,196,160);
}
}
.dashboard-editor-container {
padding: 32px;
background-color: rgb(240, 242, 245);
position: relative;
.chart-wrapper {
background: #fff;
padding: 16px 16px 0;
margin-bottom: 32px;
}
}
@media (max-width:1024px) {
.chart-wrapper {
padding: 8px;
}
}
</style>

View File

@ -3,7 +3,7 @@
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="110px">
<el-form-item label="商名称" prop="name">
<el-form-item label="商名称" prop="name">
<el-input v-model="queryParams.name" placeholder="请输入" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="选择日期" class="width100" prop="dateLimit">
@ -37,7 +37,7 @@
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="编号" align="center" type="index"/>
<el-table-column label="商名称" align="center" prop="tenantName"/>
<el-table-column label="商名称" align="center" prop="tenantName"/>
<el-table-column label="销售金额" align="center" prop="totalMoney"/>
<el-table-column label="订单数量" align="center" prop="totalNum"/>
<el-table-column label="退款金额" align="center" prop="totalWithdrawMoney"/>

View File

@ -9,7 +9,7 @@
</el-radio-group>
</el-form-item>
<el-form-item label="选择日期" class="width100" prop="dateLimit">
<el-date-picker @change="onchangeTime" v-model="queryParams.dateLimit" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" size="small" type="datetimerange" start-placeholder=""
<el-date-picker @change="onchangeTime" v-model="queryParams.dateLimit" :default-time="['00:00:00', '23:59:59']" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" size="small" type="datetimerange" start-placeholder=""
end-placeholder="结束时间" placement="bottom-end" placeholder="自定义时间" style="width: 220px;" ></el-date-picker>
</el-form-item>
<el-form-item>