From 1d26ef81760acc22e68da8268a5fa3e665be0f9b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Mon, 19 Aug 2024 10:27:02 +0800
Subject: [PATCH] =?UTF-8?q?feature/2.15.1.2407.01-=E5=AF=BC=E5=85=A5?=
=?UTF-8?q?=E5=B7=A5=E5=85=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../importDialog/components/impStep3.js | 59 ++++++++++---------
.../importDialog/components/moveInResult.js | 39 ++++++++++--
2 files changed, 65 insertions(+), 33 deletions(-)
diff --git a/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js b/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js
index f42c7ef2..82ed0adb 100644
--- a/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js
+++ b/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js
@@ -16,39 +16,42 @@ class ImpStep3 extends Component {
const { importResult } = this.props;
return (
-
-
{
- !_.isEmpty(importResult) ?
-
-

+ importResult.results ?
:
+
{
- importResult.successCount &&
-
- {getLabel(389249, "已导入")}
- {importResult.successCount}
- {`${getLabel(30690, "条数据")},${getLabel(25009, "失败")}`}
- {importResult.errorCount} {getLabel(30690, "条数据")}
-
+ !_.isEmpty(importResult) ?
+
+

+ {
+ importResult.successCount &&
+
+ {getLabel(389249, "已导入")}
+ {importResult.successCount}
+ {`${getLabel(30690, "条数据")},${getLabel(25009, "失败")}`}
+ {importResult.errorCount} {getLabel(30690, "条数据")}
+
+ }
+
:
+
+
{getLabel(111, "导入失败")}
+
}
- :
-
-
{getLabel(111, "导入失败")}
-
- }
- {
- !_.isEmpty(importResult) && (!_.isEmpty(importResult.errorNotice) || !_.isEmpty(importResult.errorData)) &&
-
}
- ]}
- dataSource={importResult.errorData || importResult.errorNotice} pagination={false}
- scroll={{ y: `calc(100vh - 387px)` }}
- />
+
}
);
diff --git a/pc4mobx/hrmSalary/components/importDialog/components/moveInResult.js b/pc4mobx/hrmSalary/components/importDialog/components/moveInResult.js
index db1d3fef..ab3bc675 100644
--- a/pc4mobx/hrmSalary/components/importDialog/components/moveInResult.js
+++ b/pc4mobx/hrmSalary/components/importDialog/components/moveInResult.js
@@ -8,16 +8,45 @@
* @description:
*/
import React, { Component } from "react";
-import { WeaLocaleProvider } from "ecCom";
+import { WeaLocaleProvider, WeaTable } from "ecCom";
const getLabel = WeaLocaleProvider.getLabel;
class MoveInResult extends Component {
- render() {
- return (
-
+ downloadTxtfile = (value, type) => {
+ if (!value) return;
+ const element = document.createElement("a");
+ const file = new Blob([value], { type: "text/plain" });
+ element.href = URL.createObjectURL(file);
+ element.download = `导入${type}信息.txt`;
+ document.body.appendChild(element);
+ element.click();
+ };
-
+ render() {
+ const { dataSource } = this.props;
+ return (
+ (
+ this.downloadTxtfile(record.success.join("\n"), getLabel(111, "成功"))}>
+ {record.success.length}
+ this.downloadTxtfile(record.warning.join("\n"), getLabel(111, "警告"))}>{record.warning.length}
+ this.downloadTxtfile(record.error.join("\n"), getLabel(111, "错误"))}>{record.error.length}
+ )
+ }
+ ]}
+ dataSource={dataSource} pagination={false} bordered scroll={{ y: `calc(100vh - 333px)` }}
+ />
);
}
}