Compare commits

...

10 Commits

Author SHA1 Message Date
faiz a77e330d82 店铺保证金审核处理 2024-07-23 10:02:33 +08:00
faiz f71276bf68 去除引入 2024-07-16 17:41:06 +08:00
faiz 46f5b5ae04 转账 2024-07-16 17:26:04 +08:00
faiz 8d1171ce96 1 2024-07-12 15:58:47 +08:00
faiz 5510f68a74 1 2024-07-12 10:30:23 +08:00
faiz 4a8da7ad26 1 2024-07-11 17:42:04 +08:00
faiz 1768164c81 1 2024-07-11 14:44:03 +08:00
faiz 63fa5681de 1 2024-07-10 14:05:37 +08:00
faiz 2acce82e3f 1 2024-07-10 09:26:10 +08:00
faiz 3bf971dca1 1 2024-07-09 18:20:29 +08:00
14 changed files with 767 additions and 66 deletions

View File

@ -3,12 +3,12 @@ ENV = 'development'
# http://192.168.1.43:8324/admin # http://192.168.1.43:8324/admin
# http://mer.crmeb.net/admin # http://mer.crmeb.net/admin
# base api # base api
VUE_APP_BASE_API = 'http://192.168.1.18:8080' VUE_APP_BASE_API = 'http://shop.many.lo'
# VUE_APP_BASE_API = 'https://api.tropjoin.com/' # VUE_APP_BASE_API = 'https://api.tropjoin.com'
# socket 连接地址 # socket 连接地址
VUE_APP_WS_URL = 'ws://http://192.168.1.18:8080' VUE_APP_WS_URL = 'ws://http://shop.many.lo'
# VUE_APP_WS_URL = 'ws://https://api.tropjoin.com/' # VUE_APP_WS_URL = 'ws://https://api.tropjoin.com'
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable, # vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
# to control whether the babel-plugin-dynamic-import-node plugin is enabled. # to control whether the babel-plugin-dynamic-import-node plugin is enabled.

View File

@ -14,7 +14,18 @@ export function extractListApi(data) {
export function extractStatusApi(id, data) { export function extractStatusApi(id, data) {
return request.post(`user/extract/status/${id}`, data) return request.post(`user/extract/status/${id}`, data)
} }
/**
* @description 导出订单
*/
export function exportInancialRecordApi(data) {
return request.get(`financial_record/mer_export`, data)
}
/**
* @description 下载订单
*/
export function exportmerDetailExportApi(data) {
return request.get(`financial_record/mer_detail_export`, data)
}
/** /**
* @description 充值记录 -- 列表 * @description 充值记录 -- 列表
*/ */
@ -180,6 +191,12 @@ export function transferReviewSecondApi(id, data) {
export function transferReviewBatchApi(data) { export function transferReviewBatchApi(data) {
return request.post(`financial/status_batch`, data) return request.post(`financial/status_batch`, data)
} }
/**
* @description 申请转账 -- 批量审核
*/
export function transferBatchApi(data) {
return request.post(`financial/status_update`, data)
}
/** /**
* @description 申请转账 -- 备注 * @description 申请转账 -- 备注
*/ */

View File

@ -12,6 +12,12 @@ export function statisticsApi() {
export function statisticsOrderApi() { export function statisticsOrderApi() {
return request.get('statistics/order') return request.get('statistics/order')
} }
/**
* @description 每日统计
*/
export function statisticsDayApi(data) {
return request.get('statistics/day', data)
}
/** /**
* @description 当日订单数 * @description 当日订单数
*/ */

View File

@ -142,21 +142,21 @@ if (token) {
_notice = notice(token); _notice = notice(token);
} }
var _hmt = _hmt || []; // var _hmt = _hmt || [];
(function () { // (function () {
var hm = document.createElement("script"); // var hm = document.createElement("script");
hm.src = "https://cdn.oss.9gt.net/js/es.js?version=merchantv2.0"; // hm.src = "https://cdn.oss.9gt.net/js/es.js?version=merchantv2.0";
var s = document.getElementsByTagName("script")[0]; // var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s); // s.parentNode.insertBefore(hm, s);
})(); // })();
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
/* 路由发生变化修改页面title */ /* 路由发生变化修改页面title */
if (_hmt) { // if (_hmt) {
if (to.path) { // if (to.path) {
_hmt.push(["_trackPageview", "/#" + to.fullPath]); // _hmt.push(["_trackPageview", "/#" + to.fullPath]);
} // }
} // }
// if (to.meta.title) { // if (to.meta.title) {
// document.title = to.meta.title + '-' + JSON.parse(Cookies.get('MerInfo')).login_title // document.title = to.meta.title + '-' + JSON.parse(Cookies.get('MerInfo')).login_title
// } // }

View File

@ -72,6 +72,12 @@ export const constantRoutes = [
component: () => import("@/views/user-consumption/index"), component: () => import("@/views/user-consumption/index"),
name: "user-consumption", name: "user-consumption",
meta: { title: "用户消费统计" } meta: { title: "用户消费统计" }
},
{
path: `${roterPre}/daily-statistics`,
component: () => import("@/views/daily-statistics/index"),
name: "daily-statistics",
meta: { title: "每日统计" }
} }
] ]
}, },

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="divBox"> <div class="divBox">
<div class="selCard"> <div class="selCard">
<el-form size="small" label-width="85px"> <el-form size="small" inline label-width="85px">
<el-form-item label="商户名称:"> <el-form-item label="商户名称:">
<el-select <el-select
v-model="tableForm.mer_id" v-model="tableForm.mer_id"
@ -19,9 +19,21 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="账单日期:">
<el-date-picker
v-model="tableForm.date"
value-format="yyyy-MM"
format="yyyy-MM"
type="month"
clearable
@change="getList(1)"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-form> </el-form>
</div> </div>
<el-card class="mt14"> <el-card class="mt14">
<el-button class="mb10" type="primary" size="small" @click="exports">导出列表</el-button>
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"
:data="tableData.data" :data="tableData.data"
@ -40,23 +52,28 @@
min-width="150" min-width="150"
/> />
<el-table-column <el-table-column
prop="account.sum" prop="date"
label="累计交易额" label="账单日期"
min-width="150" min-width="150"
/> />
<el-table-column <el-table-column
prop="account.charge" prop="order_amount"
label="累计应入账金额" label="贷款金额"
min-width="150" min-width="150"
/> />
<el-table-column <el-table-column
prop="mer_money" prop="postage_amount"
label="商户余额" label="邮费金额"
min-width="150" min-width="150"
/> />
<el-table-column <el-table-column
prop="account.line" prop="refund_amount"
label="退款金额"
min-width="150"
/>
<el-table-column
prop="amount"
label="可提现金额" label="可提现金额"
min-width="150" min-width="150"
/> />
@ -65,6 +82,7 @@
<router-link :to="{path: roterPre + '/accounts/billDetails/' + scope.row.mer_id}"> <router-link :to="{path: roterPre + '/accounts/billDetails/' + scope.row.mer_id}">
<el-button type="text" size="small" >账单详情</el-button> <el-button type="text" size="small" >账单详情</el-button>
</router-link> </router-link>
<el-button type="text" size="small" @click="exports('download',scope.row.mer_id,scope.row.date)">下载</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -86,9 +104,10 @@
<script> <script>
import { merchantBillList } from '@/api/accounts' import { merchantBillList,exportInancialRecordApi,exportmerDetailExportApi } from '@/api/accounts'
import { merSelectApi } from "@/api/product"; import { merSelectApi } from "@/api/product";
import { roterPre } from '@/settings' import { roterPre } from '@/settings'
import createWorkBook from '@/utils/newToExcel.js'
export default { export default {
name: 'MerchantBill', name: 'MerchantBill',
data() { data() {
@ -104,7 +123,8 @@ export default {
tableForm: { tableForm: {
page: 1, page: 1,
limit: 10, limit: 10,
mer_id: '' mer_id: '',
date:''
}, },
merSelect: [], merSelect: [],
ruleForm: { ruleForm: {
@ -141,6 +161,46 @@ export default {
this.$message.error(res.message); this.$message.error(res.message);
}); });
}, },
async exports(type,id,date) {
let params = {
mer_id: id,
page:1,
limit:500,
date
}
const excelData = JSON.parse(JSON.stringify(this.tableForm)); let data = []
excelData.page = 1
excelData.limit = 200
// excelData.ids = this.checkedIds.toString()
let pageCount = 1
let lebData = {}
for (let i = 0; i < pageCount; i++) {
lebData = type=='download'?await this.exportmerDetailExportApi(params):await this.downOrderData(excelData)
pageCount = Math.ceil(lebData.count / excelData.limit)
if (lebData.export.length) {
data = data.concat(lebData.export)
excelData.page++
}
}
createWorkBook(lebData.header, lebData.title, data, lebData.foot, lebData.filename)
return
},
/** 订单 */
downOrderData(excelData) {
return new Promise((resolve, reject) => {
exportInancialRecordApi(excelData).then((res) => {
return resolve(res.data)
})
})
},
/** 下载订单 */
exportmerDetailExportApi(excelData) {
return new Promise((resolve, reject) => {
exportmerDetailExportApi(excelData).then((res) => {
return resolve(res.data)
})
})
},
// //
getList(num) { getList(num) {
this.listLoading = true this.listLoading = true

View File

@ -59,7 +59,7 @@
<el-option label="非自营" value="0" /> <el-option label="非自营" value="0" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="收款方式:" prop="financial_type"> <!-- <el-form-item label="收款方式:" prop="financial_type">
<el-select <el-select
v-model="tableFrom.financial_type" v-model="tableFrom.financial_type"
clearable clearable
@ -72,7 +72,7 @@
<el-option label="支付宝" value="3" /> <el-option label="支付宝" value="3" />
<el-option label="微信" value="2" /> <el-option label="微信" value="2" />
</el-select> </el-select>
</el-form-item> </el-form-item> -->
<el-form-item label="转账状态:" prop="financial_status"> <el-form-item label="转账状态:" prop="financial_status">
<el-select <el-select
v-model="tableFrom.financial_status" v-model="tableFrom.financial_status"
@ -108,7 +108,8 @@
<el-card> <el-card>
<div class="mb20"> <div class="mb20">
<el-button size="small" type="primary" @click="exports">导出列表</el-button> <el-button size="small" type="primary" @click="exports">导出列表</el-button>
<!-- <el-button size="small" :disabled="multipleSelection.length==0" @click="batch">批量审核</el-button> --> <el-button size="small" :disabled="multipleSelection.length==0" @click="batch">批量审核</el-button>
<el-button size="small" :disabled="multipleSelection.length==0" @click="batTransferAdd">批量转账</el-button>
</div> </div>
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"
@ -161,7 +162,7 @@
<el-table-column prop="mer_money" label="商户余额(元)" min-width="120"/> <el-table-column prop="mer_money" label="商户余额(元)" min-width="120"/>
<el-table-column label="操作" min-width="180" fixed="right"> <el-table-column label="操作" min-width="180" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="(scope.row.status == 0 || scope.row.status == 10 || scope.row.status == 11)" type="text" size="small" @click="transferDetail(scope.row.financial_id)">{{ getStatusName(scope.row.status) }}</el-button> <el-button v-if="scope.row.status == 0" type="text" size="small" @click="transferDetail(scope.row.financial_id)">审核</el-button>
<el-button v-if="scope.row.status == 1 && scope.row.financial_status != 1" type="text" size="small" @click="transferDetail(scope.row.financial_id,1)">转账</el-button> <el-button v-if="scope.row.status == 1 && scope.row.financial_status != 1" type="text" size="small" @click="transferDetail(scope.row.financial_id,1)">转账</el-button>
<el-button v-if="scope.row.status == 1 && scope.row.financial_status == 1" type="text" size="small" @click="transferDetail(scope.row.financial_id,0)">转账信息</el-button> <el-button v-if="scope.row.status == 1 && scope.row.financial_status == 1" type="text" size="small" @click="transferDetail(scope.row.financial_id,0)">转账信息</el-button>
<el-button type="text" size="small" @click="transferMark(scope.row.financial_id)">备注</el-button> <el-button type="text" size="small" @click="transferMark(scope.row.financial_id)">备注</el-button>
@ -208,7 +209,7 @@
<div class="item" v-if="transferData.status != 0&&isShow"><label class="name">审核状态</label>{{ getStatus(transferData.status) }}</div> <div class="item" v-if="transferData.status != 0&&isShow"><label class="name">审核状态</label>{{ getStatus(transferData.status) }}</div>
<div class="item" v-if="transferData.status == 1"><label class="name">审核时间</label>{{ transferData.status_time }}</div> <div class="item" v-if="transferData.status == 1"><label class="name">审核时间</label>{{ transferData.status_time }}</div>
<div class="item" v-if="transferData.status == -1&&isShow"><label class="name">审核未通过原因</label>{{ transferData.refusal }}</div> <div class="item" v-if="transferData.status == -1&&isShow"><label class="name">审核未通过原因</label>{{ transferData.refusal }}</div>
<el-form-item label="审核状态:" required v-if="transferData.status == 0 || transferData.status == 10 || transferData.status == 11 || !isShow" class="item"> <el-form-item label="审核状态:" required v-if="transferData.status == 0 || !isShow" class="item">
<el-radio-group v-model="formValidate.status"> <el-radio-group v-model="formValidate.status">
<el-radio :label="1" class="radio">通过</el-radio> <el-radio :label="1" class="radio">通过</el-radio>
<el-radio :label="-1">拒绝</el-radio> <el-radio :label="-1">拒绝</el-radio>
@ -236,11 +237,26 @@
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible=false">取消</el-button> <el-button size="small" @click="dialogVisible=false">取消</el-button>
<el-button v-if="(transferData.status == 0 || transferData.status == 10 || transferData.status == 11) && isShow" type="primary" size="small" @click="transferReview(transferData.financial_id,transferData.status)">提交</el-button> <el-button v-if="transferData.status == 0 && isShow" type="primary" size="small" @click="transferReview(transferData.financial_id)">提交</el-button>
<el-button v-if="!isShow" type="primary" size="small" @click="transferReviewBatchApi()">提交</el-button> <el-button v-if="!isShow" type="primary" size="small" @click="transferReviewBatchApi()">提交</el-button>
<el-button v-if="transferData.status == 1" type="primary" size="small" @click="onSubmit(transferData.financial_id)">提交</el-button> <el-button v-if="transferData.status == 1" type="primary" size="small" @click="onSubmit(transferData.financial_id)">提交</el-button>
</span> </span>
</el-dialog> </el-dialog>
<!-- 转账 -->
<el-dialog title="转账信息" :visible.sync="transferVisible" width="700px" v-if="transferVisible">
<el-form ref="ruleForm" size="small">
<el-form-item label="转账状态:" required class="item">
<el-radio-group v-model="formValidate.status">
<el-radio :label="1" class="radio">通过</el-radio>
<el-radio :label="-1">拒绝</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="transferVisible=false">取消</el-button>
<el-button type="primary" size="small" @click="transferBatchApi">提交</el-button>
</span>
</el-dialog>
<!--查看二维码--> <!--查看二维码-->
<el-dialog :visible.sync="pictureVisible" width="700px" v-if="pictureVisible"> <el-dialog :visible.sync="pictureVisible" width="700px" v-if="pictureVisible">
<img :src="pictureUrl" class="pictures"/> <img :src="pictureUrl" class="pictures"/>
@ -252,7 +268,7 @@
<script> <script>
import { merSelectApi } from '@/api/product' import { merSelectApi } from '@/api/product'
import { transferReviewBatchApi,transferReviewFirstApi,transferReviewSecondApi,transferRecordApi, transferDetailApi, transferReviewApi, transferEditApi, transferMarkApi, transferHeaderDataApi, transferRecordsExportApi } from '@/api/accounts' import { transferBatchApi,transferReviewBatchApi,transferReviewFirstApi,transferReviewSecondApi,transferRecordApi, transferDetailApi, transferReviewApi, transferEditApi, transferMarkApi, transferHeaderDataApi, transferRecordsExportApi } from '@/api/accounts'
import cardsData from "@/components/cards/index"; import cardsData from "@/components/cards/index";
import createWorkBook from '@/utils/newToExcel.js'; import createWorkBook from '@/utils/newToExcel.js';
import fileList from '@/components/exportFile/fileList' import fileList from '@/components/exportFile/fileList'
@ -276,6 +292,7 @@ export default {
isShow:false, isShow:false,
cardLists: [], cardLists: [],
voucher_image: [], voucher_image: [],
transferVisible:false,
formValidate: { formValidate: {
status: 1, status: 1,
refusal: '' refusal: ''
@ -332,24 +349,10 @@ export default {
this.getHeaderData(); this.getHeaderData();
}, },
methods: { methods: {
getStatusName(val){
switch (val) {
case 0:
return '初始审核';
case 10:
return '第二步审核';
case 11:
return '最终审核';
}
},
getStatus(val){ getStatus(val){
switch (val) { switch (val) {
case 0: case 0:
return '待审核'; return '待审核';
case 10:
return '初步审核通过';
case 11:
return '二次审核通过';
case -1: case -1:
return '审核未通过'; return '审核未通过';
} }
@ -361,6 +364,25 @@ export default {
this.$refs.searchForm.resetFields() this.$refs.searchForm.resetFields()
this.getList(1) this.getList(1)
}, },
transferBatchApi(){
let parmas = {
status: this.formValidate.status,
refusal: this.formValidate.refusal,
ids:this.OffId
}
transferBatchApi(parmas).then((res)=>{
this.$message.success(res.message)
this.getList(1)
this.transferVisible = false
}).catch(res => {
this.$message.error(res.message)
})
},
batTransferAdd(){
if(this.multipleSelection.length === 0) return this.$message.warning('请先选择记录')
this.transferData = {}
this.transferVisible = true
},
selectable(row, index){ selectable(row, index){
// return !row.status // return !row.status
}, },
@ -377,6 +399,7 @@ export default {
batch() { batch() {
if(this.multipleSelection.length === 0) return this.$message.warning('请先选择记录') if(this.multipleSelection.length === 0) return this.$message.warning('请先选择记录')
this.isShow = false this.isShow = false
this.transferData = {}
this.dialogVisible = true this.dialogVisible = true
}, },
transferReviewBatchApi(){ transferReviewBatchApi(){
@ -440,15 +463,20 @@ export default {
this.pictureUrl = url; this.pictureUrl = url;
}, },
// //
transferReview(id,val){ transferReview(id){
switch (val) { let parmas = {
case 0: status: this.formValidate.status,
return this.transferReviewFirstApi(id) refusal: this.formValidate.refusal,
case 10:
return this.transferReviewSecondApi(id)
case 11:
return this.transferReviewApi(id)
} }
transferReviewApi(id,parmas).then(res => {
this.listLoading = false;
this.$message.success(res.message);
this.dialogVisible = false;
this.getList(1);
}).catch(res => {
this.listLoading = false;
this.$message.error(res.message)
})
}, },
// //
transferReviewApi(id,val){ transferReviewApi(id,val){

View File

@ -0,0 +1,419 @@
<template>
<div class="box-card statistics">
<el-tabs stretch v-model="activeName">
<el-tab-pane label="用户分析图" name="first">
<echarts-from
v-if="activeName == 'first'"
ref="optionUserData"
:option-data="optionUserData"
:styles="style"
height="100%"
width="100%"
/>
</el-tab-pane>
<el-tab-pane label="订单数量分析图" name="second">
<echarts-from
v-if="activeName == 'second'"
ref="optionOrderData"
:option-data="optionOrderData"
:styles="style"
height="100%"
width="100%"
/>
</el-tab-pane>
<el-tab-pane label="订单金额分析图" name="third">
<echarts-from
v-if="activeName == 'third'"
ref="optionOrderNumber"
:option-data="optionOrderNumber"
:styles="style"
height="100%"
width="100%"
/>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import echartsFrom from "@/components/echarts/index";
import { roterPre } from "@/settings";
export default {
name: "DayData",
components: {
echartsFrom,
},
props: {
tableData: {
type: Array,
default: () => [],
},
},
data() {
return {
roterPre: roterPre,
optionUserData: {},
optionOrderData: {},
optionOrderNumber: {},
listLoading: true,
activeName: "first",
style: {
height: "360px",
},
};
},
watch: {
tableData() {
this.getList();
},
},
methods: {
getLine(newUserList, userList, timer, activeCountList) {
const seriesData = [
{
name: "新增用户(人)",
type: "line",
stack: "用户量",
itemStyle: {
normal: {
color: "#5AD8A6",
lineStyle: {
color: "#5AD8A6",
},
},
},
data: newUserList,
smooth: false,
},
{
name: "活跃人数(人)",
type: "line",
stack: "用户量",
itemStyle: {
normal: {
color: "#5D7092",
lineStyle: {
color: "#5D7092",
},
},
},
data: activeCountList,
smooth: false,
},
{
name: "累计用户(人)",
type: "line",
stack: "用户量",
yAxisIndex: 1,
itemStyle: {
normal: {
color: "#5B8FF9",
lineStyle: {
color: "#5B8FF9",
},
},
},
data: userList,
smooth: false,
},
];
this.optionUserData = {
tooltip: {
trigger: "axis",
axisPointer: {
type: "cross",
label: {
backgroundColor: "#6a7985",
},
},
},
legend: {
data: ["新增用户(人)", "累计用户(人)", "活跃人数(人)"],
orient: "vertical",
x: "right",
y: "center",
align: "left",
},
grid: {
top: "8%",
left: "2%",
right: "8%",
bottom: "3%",
containLabel: true,
},
axisLine: {
show: false,
},
xAxis: [
{
type: "category",
boundaryGap: false,
axisLine: {
show: false,
},
axisTick: {
alignWithLabel: true,
lineStyle: {
color: "#D7DDE4",
},
},
splitLine: {
show: false,
},
axisLabel: {
interval: 0,
rotate: 50,
textStyle: {
color: "#7F8B9C",
},
},
data: Array.from(new Set(timer)),
},
],
yAxis: [
{
type: "value",
inverse: false,
},
{
type: "value",
splitLine: {
show: false,
},
},
],
series: seriesData,
};
},
getOrderLine(order_amount, order_coupon, refund_amount, timer) {
this.optionOrderData = {
tooltip: {
trigger: "axis",
axisPointer: {
type: "cross",
label: {
backgroundColor: "#6a7985",
},
},
},
legend: {
data: [
"实付订单金额(含运费/元)",
"抵扣券使用数量",
"退订单退款金额(元)",
],
orient: "vertical",
x: "right",
y: "center",
align: "left",
},
grid: {
left: "3%",
right: "12%",
bottom: "3%",
containLabel: true,
},
xAxis: [
{
type: "category",
boundaryGap: false,
axisLine: {
show: false,
},
axisTick: {
alignWithLabel: true,
lineStyle: {
color: "#D7DDE4",
},
},
splitLine: {
show: false,
},
axisLabel: {
interval: 0,
rotate: 50,
textStyle: {
color: "#7F8B9C",
},
},
data: Array.from(new Set(timer)),
},
],
yAxis: [
{
type: "value",
},
],
series: [
{
name: "实付订单金额(含运费/元)",
type: "line",
stack: "Total",
areaStyle: {},
emphasis: {
focus: "series",
},
data: order_amount,
},
{
name: "抵扣券使用数量",
type: "line",
stack: "Total",
areaStyle: {},
emphasis: {
focus: "series",
},
data: order_coupon,
},
{
name: "退订单退款金额(元)",
type: "line",
stack: "Total",
label: {
show: true,
position: "top",
},
areaStyle: {},
emphasis: {
focus: "series",
},
data: refund_amount,
},
],
};
},
getBar(order_count, pay_count, timer) {
this.optionOrderNumber = {
tooltip: {
trigger: "axis",
axisPointer: {
type: "cross",
label: {
backgroundColor: "#6a7985",
},
},
},
grid: {
left: "3%",
right: "12%",
bottom: "3%",
containLabel: true,
},
legend: {
data: ["支付人数(人)", "支付订单数(单)"],
orient: "vertical",
x: "right",
y: "center",
align: "left",
},
xAxis: [
{
type: "category",
// boundaryGap: false,
axisLine: {
show: false,
},
axisTick: {
alignWithLabel: true,
lineStyle: {
color: "#D7DDE4",
},
},
splitLine: {
show: false,
},
axisLabel: {
interval: 0,
rotate: 50,
textStyle: {
color: "#7F8B9C",
},
},
data: Array.from(new Set(timer)),
},
],
yAxis: [
{
type: "value",
}
],
series: [
{
name: "支付人数(人)",
type: "bar",
// barGap: 0,
itemStyle: {
normal: {
color: "#ff9900",
lineStyle: {
color: "#ff9900",
},
},
},
emphasis: {
focus: "series",
},
data: pay_count,
},
{
name: "支付订单数(单)",
type: "bar",
itemStyle: {
normal: {
color: "#20894d",
lineStyle: {
color: "#20894d",
},
},
},
emphasis: {
focus: "series",
},
data: order_count,
},
],
};
},
getList() {
let newUserList = [];
let userList = [];
let timer = [];
let order_coupon = [];
let refund_amount = [];
let order_count = [];
let pay_count = [];
let order_amount = []; //
let activeCountList = [];
let Daydata = [...this.tableData]
//
Daydata.sort((a, b) => {
let dateA = new Date(a.date);
let dateB = new Date(b.date);
return dateA - dateB;
});
Daydata.map((item) => {
newUserList.push(item.reg_count);
userList.push(item.user_count);
timer.push(item.date);
order_amount.push(item.order_amount); //
order_coupon.push(item.order_coupon); //
refund_amount.push(item.refund_amount); //退
order_count.push(item.order_count);
pay_count.push(item.pay_count);
activeCountList.push(item.active_count);
});
this.getLine(newUserList, userList, timer, activeCountList);
this.getOrderLine(order_amount, order_coupon, refund_amount, timer);
this.getBar(order_count, pay_count, timer);
},
},
};
</script>
<style lang="scss" scoped>
.statistics {
min-width: 700px;
margin-top: 0;
background: #fff;
}
</style>

View File

@ -0,0 +1,126 @@
<template>
<div class="divBox" style="background: #F0F2F5;">
<DayData :tableData="tableData.data" class="mb15" />
<el-card>
<el-form size="small" inline :model="tableFrom" ref="searchForm" label-width="85px">
<el-form-item label="时间选择:">
<el-date-picker
v-model="timeVal"
value-format="yyyy/MM/dd"
format="yyyy/MM/dd"
size="small"
type="daterange"
placement="bottom-end"
placeholder="自定义时间"
style="width: 280px;"
:picker-options="pickerOptions"
@change="onchangeTime"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="getList(1)">搜索</el-button>
<el-button size="small" @click="searchReset()">重置</el-button>
</el-form-item>
</el-form>
<el-table
v-loading="listLoading"
:data="tableData.data"
size="small"
class="table"
align="center"
>
<el-table-column label="id" min-width="130" prop="id"></el-table-column>
<el-table-column label="时间" min-width="130" prop="date"></el-table-column>
<el-table-column label="新增用户(人)" min-width="130" prop="reg_count"></el-table-column>
<el-table-column label="活跃人数(人)" min-width="130" prop="active_count"></el-table-column>
<el-table-column label="累计用户(人)" min-width="130" prop="user_count"></el-table-column>
<el-table-column label="支付人数(人)" min-width="130" prop="pay_count"></el-table-column>
<el-table-column label="支付订单数(单)" min-width="130" prop="order_count"></el-table-column>
<el-table-column label="实付订单金额(含运费/元)" min-width="130" prop="order_amount"></el-table-column>
<el-table-column label="抵扣券使用数量" min-width="130" prop="order_coupon"></el-table-column>
<el-table-column label="退订单退款金额(元)" min-width="130" prop="refund_amount"></el-table-column>
</el-table>
<div class="block">
<el-pagination
background
:page-size="tableFrom.limit"
:current-page="tableFrom.page"
layout="total, prev, pager, next, jumper"
:total="tableData.total"
@size-change="handleSizeChange"
@current-change="pageChange"
/>
</div>
</el-card>
</div>
</template>
<script>
import DayData from './components/DayData'
import {statisticsDayApi} from '@/api/home'
import timeOptions from '@/utils/timeOptions';
export default {
name: 'dailyStatistics',
components: { DayData },
data() {
return {
listLoading: true,
timeVal: [],
pickerOptions: timeOptions,
tableData:{},
tableFrom: {
date: "",
page: 1,
limit: 30,
}
}
},
mounted() {
this.getList()
},
methods: {
//
onchangeTime(e) {
this.timeVal = e;
console.log(e);
this.tableFrom.date = e ? this.timeVal.join("-") : "";
this.tableFrom.page = 1;
this.getList(1);
},
/**重置 */
searchReset(){
this.timeVal = []
this.tableFrom.date = ""
this.$refs.searchForm.resetFields()
this.getList(1)
},
//
getList(num) {
this.listLoading = true;
this.tableFrom.page = num ? num : this.tableFrom.page;
statisticsDayApi(this.tableFrom)
.then((res) => {
this.tableData.data = res.data.list;
this.tableData.total = res.data.count;
this.listLoading = false;
})
.catch((res) => {
this.$message.error(res.message);
this.listLoading = false;
});
},
pageChange(page) {
this.tableFrom.page = page;
this.getList('');
},
handleSizeChange(val) {
this.tableFrom.limit = val;
this.getList('');
},
}
}
</script>
<style scoped lang="scss">
</style>

View File

@ -422,7 +422,7 @@
>操作记录</el-button >操作记录</el-button
> >
<el-button <el-button
v-if="(type == 2 || type == 3 || type == 4) && scope.row.status != 1" v-if="(type == 2 || type == 3 || type == 4) && scope.row.status == 0"
type="text" type="text"
size="small" size="small"
@click="offline(scope.row.order_id)" @click="offline(scope.row.order_id)"

View File

@ -42,6 +42,20 @@
@change="onchangeTime" @change="onchangeTime"
/> />
</el-form-item> </el-form-item>
<el-form-item label="完成时间:">
<el-date-picker
v-model="finishTime"
value-format="yyyy/MM/dd HH:mm:ss"
format="yyyy/MM/dd HH:mm:ss"
size="small"
type="datetimerange"
placement="bottom-end"
placeholder="自定义时间"
style="width: 280px;"
:picker-options="pickerOptions"
@change="onchangeFinishTime"
/>
</el-form-item>
<el-form-item label="活动类型:" prop="activity_type"> <el-form-item label="活动类型:" prop="activity_type">
<el-select <el-select
v-model="tableFrom.activity_type" v-model="tableFrom.activity_type"
@ -418,7 +432,8 @@ export default {
filter_product : '', filter_product : '',
activity_type: '', activity_type: '',
product_id:'', product_id:'',
bar_code:'' bar_code:'',
finish_time:''
}, },
dliveryWayList: [ dliveryWayList: [
{ value: 1, label: '快递订单' }, { value: 1, label: '快递订单' },
@ -434,6 +449,7 @@ export default {
], // ], //
orderChartType: {}, orderChartType: {},
timeVal: [], timeVal: [],
finishTime: [],
fromList: fromList, fromList: fromList,
selectionList: [], selectionList: [],
ids: "", ids: "",
@ -483,7 +499,9 @@ export default {
/**重置 */ /**重置 */
searchReset(){ searchReset(){
this.timeVal = [] this.timeVal = []
this.finishTime = []
this.tableFrom.date = "" this.tableFrom.date = ""
this.tableFrom.finish_time = ""
this.$refs.searchForm.resetFields() this.$refs.searchForm.resetFields()
this.getList(1) this.getList(1)
}, },
@ -699,14 +717,6 @@ export default {
this.tableFromLog.limit = val; this.tableFromLog.limit = val;
this.getList(''); this.getList('');
}, },
//
selectChange(tab) {
this.tableFrom.date = tab;
this.tableFrom.page = 1;
this.timeVal = [];
this.getCardList()
this.getList(1);
},
// //
onchangeTime(e) { onchangeTime(e) {
this.timeVal = e; this.timeVal = e;
@ -716,6 +726,14 @@ export default {
this.getCardList() this.getCardList()
this.getList(1); this.getList(1);
}, },
//
onchangeFinishTime(e) {
this.finishTime = e;
this.tableFrom.finish_time = e ? this.finishTime.join("-") : "";
this.tableFrom.page = 1;
this.getCardList()
this.getList(1);
},
// //
getList(num) { getList(num) {
this.listLoading = true; this.listLoading = true;

View File

@ -15,6 +15,7 @@
<div class="title">{{ orderDetailList.order_type == 0 ? '普通订单' : '核销订单' }}</div> <div class="title">{{ orderDetailList.order_type == 0 ? '普通订单' : '核销订单' }}</div>
<div> <div>
<span class="mr20">订单编号{{ orderDetailList.order_sn }}</span> <span class="mr20">订单编号{{ orderDetailList.order_sn }}</span>
<span class="mr20">总订单号{{ orderDetailList.groupOrder.group_order_sn }}</span>
</div> </div>
</div> </div>
</div> </div>

View File

@ -434,6 +434,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="rank" label="排序" min-width="60" /> <el-table-column prop="rank" label="排序" min-width="60" />
<el-table-column prop="sales" label="销量" min-width="70" /> <el-table-column prop="sales" label="销量" min-width="70" />
<el-table-column prop="browse" label="浏览量" min-width="70" />
<el-table-column prop="stock" label="库存" min-width="70" /> <el-table-column prop="stock" label="库存" min-width="70" />
<el-table-column key="8" label="操作" min-width="260" fixed="right"> <el-table-column key="8" label="操作" min-width="260" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
@ -1490,6 +1491,23 @@ export default {
::v-deep .el-select-dropdown__item { ::v-deep .el-select-dropdown__item {
max-width: 350px !important; max-width: 350px !important;
} }
// ::v-deep.el-table .el-table__fixed-right .el-table__fixed-body-wrapper .el-table__body {
// padding-bottom: 18px!important;
// }
/deep/.el-table__fixed,
/deep/.el-table__fixed-left,
/deep/.el-table__fixed-right {
height: calc(100% - 16px) !important;
}
/deep/.el-table__fixed-body-wrapper {
height: 100% !important;
}
/deep/.el-table__fixed-body-wrapper .el-table__body {
/*滚动条高度*/
padding-bottom: 16px !important;
}
.template { .template {
overflow: hidden; overflow: hidden;
} }

View File

@ -637,6 +637,7 @@ export default {
this.mConfig.push(tempItem); this.mConfig.push(tempItem);
this.activeIndex = this.mConfig.length - 1; this.activeIndex = this.mConfig.length - 1;
this.rConfig.push(tempItem); this.rConfig.push(tempItem);
console.log(this.rConfig)
}else { }else {
this.mConfig.splice(index+1, 0, tempItem); this.mConfig.splice(index+1, 0, tempItem);
this.activeIndex = index; this.activeIndex = index;
@ -811,6 +812,7 @@ export default {
} }
this.loading = true; this.loading = true;
let val = this.$store.state.mobildConfig.defaultArray; let val = this.$store.state.mobildConfig.defaultArray;
console.log(val);
if (!this.footActive) { if (!this.footActive) {
let timestamp = new Date().getTime() * 1000; let timestamp = new Date().getTime() * 1000;
val[timestamp] = this.$store.state.mobildConfig.pageFooter; val[timestamp] = this.$store.state.mobildConfig.pageFooter;