From 1d697f5eaa9a85e70aa284c538bc676319b0bae0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E8=AF=9A=E8=AF=9A?= Date: Wed, 18 Jan 2023 16:36:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AE=A2=E5=8D=95=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 +++++++- src/views/Orders_sub.js | 12 ++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b4a6edb..2c37880 100644 --- a/README.md +++ b/README.md @@ -11,4 +11,10 @@ https://charts.ant.design/zh/examples/column/basic#basic https://antv-g2plot.gitee.io/zh/examples/pie/basic/#legend-interaction ### momentjs -http://momentjs.cn/docs/ \ No newline at end of file +http://momentjs.cn/docs/ + +### mobx6 +https://www.mobxjs.com/react-integration + +### 添加权限 +INSERT INTO [dbo].[ding_auth] ([din_userid] ,[din_auth] ,[din_username]) VALUES ('user_id','marketing','姓名') \ No newline at end of file diff --git a/src/views/Orders_sub.js b/src/views/Orders_sub.js index 00ea649..8504f6b 100644 --- a/src/views/Orders_sub.js +++ b/src/views/Orders_sub.js @@ -8,6 +8,7 @@ import DatePickerCharts from "../charts/DatePickerCharts"; import { NavLink, useParams } from "react-router-dom"; import * as comm from "../utils/commons"; import * as config from "../config"; +import { utils, writeFileXLSX } from "xlsx"; const Orders_sub = () => { const { ordertype, ordertype_sub, ordertype_title } = useParams(); @@ -210,9 +211,11 @@ const Orders_sub = () => { {date_picker_store.start_date.format(config.DATE_FORMAT)}~{date_picker_store.end_date.format(config.DATE_FORMAT)} record.key} expandable={{ expandedRowRender: record => ( @@ -229,6 +232,15 @@ const Orders_sub = () => { ), }} /> + + { + const wb = utils.table_to_book(document.getElementById("table_to_xlsx_form").getElementsByTagName("table")[0]); + writeFileXLSX(wb, "订单列表.xlsx"); + }}> + 导出excel + +