From 64970c768fe8772ee83e6aef1a2179986ff2fef9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=9Csrekal=E2=80=9D?= <“543127346@qq.com”>
Date: Fri, 8 Dec 2023 20:10:09 +0800
Subject: [PATCH] =?UTF-8?q?=E7=89=88=E6=9C=AC=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/payment.vue | 33 ++--
src/views/sale.vue | 6 +-
src/views/sale_summary.vue | 336 ++++++++++++++++++++++++-------------
3 files changed, 237 insertions(+), 138 deletions(-)
diff --git a/src/views/payment.vue b/src/views/payment.vue
index d39515b..547c04e 100755
--- a/src/views/payment.vue
+++ b/src/views/payment.vue
@@ -39,33 +39,38 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
+
+
+
+
+
+
+
+
@@ -79,7 +84,7 @@
-
+
diff --git a/src/views/sale.vue b/src/views/sale.vue
index efd80f7..97bd977 100755
--- a/src/views/sale.vue
+++ b/src/views/sale.vue
@@ -16,7 +16,7 @@
- 公司:
+ 公司:
@@ -25,7 +25,7 @@
导出EXCEL
+ :default-sort="{prop:'amount',order:'descending'}">
@@ -168,7 +168,7 @@
if (this.date && this.company_ids && this.category_ids&&this.handover) {
var postdata = {
'date': self.date,
- 'company_ids': self.company_ids,
+ 'company_ids': self.company_ids.join(','),
'category_ids': self.category_ids.join(','),
'handover': self.category_ids.join(','),
}
diff --git a/src/views/sale_summary.vue b/src/views/sale_summary.vue
index 9fcb630..138df58 100755
--- a/src/views/sale_summary.vue
+++ b/src/views/sale_summary.vue
@@ -18,7 +18,7 @@
- 公司:
+ 公司:
@@ -27,140 +27,147 @@
导出EXCEL
+ :default-sort="{prop:'amount',order:'descending'}" @expand-change="getTableDetail" >
+
+
+
+
+
+
+
-
-
+
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -192,12 +199,18 @@
fetchGet,
fetchPost
} from "../utils/request"
- import qs from 'qs'
+ import qs from 'qs'
+
+
export default {
mixins: [createEcharts],
- name: 'Demo',
+ name: 'Demo',
+ components: {
+
+ },
data() {
- return {
+ return {
+ expends:[],
title: '菜品销售汇总',
handover: '',
date: '',
@@ -207,8 +220,8 @@
company_ids: [],
company_options: [],
category_ids: [],
- category_options: [],
-
+ category_options: [],
+
}
},
mounted() {
@@ -226,7 +239,87 @@
components: {
},
- methods: {
+ methods: {
+ getTableDetail(row, expandeRows) {
+
+ // this.get_echart_data()
+ },
+
+ get_echart_data() {
+
+ var option = {
+ legend: {
+ top: 'bottom'
+ },
+ toolbox: {
+ show: true,
+ feature: {
+ mark: {
+ show: true
+ },
+ dataView: {
+ show: true,
+ readOnly: false
+ },
+ restore: {
+ show: true
+ },
+ saveAsImage: {
+ show: true
+ }
+ }
+ },
+ series: [{
+ name: 'Nightingale Chart',
+ type: 'pie',
+ radius: [50, 250],
+ center: ['50%', '50%'],
+ roseType: 'area',
+ itemStyle: {
+ borderRadius: 8
+ },
+ data: [{
+ value: 40,
+ name: 'rose 1'
+ },
+ {
+ value: 38,
+ name: 'rose 2'
+ },
+ {
+ value: 32,
+ name: 'rose 3'
+ },
+ {
+ value: 30,
+ name: 'rose 4'
+ },
+ {
+ value: 28,
+ name: 'rose 5'
+ },
+ {
+ value: 26,
+ name: 'rose 6'
+ },
+ {
+ value: 22,
+ name: 'rose 7'
+ },
+ {
+ value: 18,
+ name: 'rose 8'
+ }
+ ]
+ }]
+ };
+
+ var echarts1 = this.initCreate(
+ "PIE_ECHART",
+ option
+ );
+
+ },
Export() {
this.$confirm("确定要导出文件到Excel?", "导出提示", {
//这里是加一个导出提示,根据个人喜好,可加可不加
@@ -262,11 +355,11 @@
check_data() {
var self = this
- if (this.date && this.company_ids && this.category_ids &&this.handover) {
+ if (this.date && this.company_ids && this.category_ids && this.handover) {
var postdata = {
'date': self.date,
- 'company_ids': self.company_ids,
- 'category_ids': self.category_ids.join(','),
+ 'company_ids': self.company_ids.join(','),
+ 'category_ids': self.category_ids.join(','),
'handover': self.handover.join(','),
}
console.log(postdata)
@@ -276,7 +369,8 @@
// self.table_list = data.data['table_list']
self.tableData = data.data
- })
+ })
+ // this.get_echart_data()
// //查询数据
// this.tableData = [{
// organization: '组织机构',