From e543372cc70a19ff2630c79d8421c2c593e54e5f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 02 六月 2021 17:15:21 +0800
Subject: [PATCH] 2021-06-02

---
 src/tabviews/zshare/actionList/excelInbutton/index.jsx |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/tabviews/zshare/actionList/excelInbutton/index.jsx b/src/tabviews/zshare/actionList/excelInbutton/index.jsx
index 549dd47..1d3ea4f 100644
--- a/src/tabviews/zshare/actionList/excelInbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/excelInbutton/index.jsx
@@ -6,7 +6,7 @@
 import { Button, Modal, notification, message } from 'antd'
 
 import ExcelIn from './excelin'
-import Utils from '@/utils/utils.js'
+import Utils, { getExcelInSql } from '@/utils/utils.js'
 import options from '@/store/options.js'
 import Api from '@/api'
 import zhCN from '@/locales/zh-CN/main.js'
@@ -74,7 +74,7 @@
 
     if ((triggerId && btn.uuid !== triggerId) || loading) return
 
-    if (Tab && Tab.supMenu && !BID) {
+    if (((Tab && Tab.supMenu) || setting.supModule) && !BID) {
       notification.warning({
         top: 92,
         message: '闇�瑕佷笂绾т富閿�硷紒',
@@ -103,7 +103,7 @@
     }
 
     let primaryId = '' // 瀵煎叆鏃惰Id
-    if (btn.Ot === 'requiredSgl') {
+    if (btn.Ot === 'requiredSgl' && setting.primaryKey) {
       primaryId = data[0][setting.primaryKey] || ''
     }
 
@@ -194,7 +194,7 @@
   /**
    * @description Excel 瀵煎叆
    */
-  getexceldata = (data, errors, sheetName) => {
+  getexceldata = (data, errors, sheetName, errDetail) => {
     const { btn } = this.props
 
     if (errors) {
@@ -213,7 +213,7 @@
       } else if (errors === 'headerError') {
         notification.warning({
           top: 92,
-          message: '宸ヤ綔琛ㄣ��' + sheetName + '銆嬭〃澶磋缃敊璇紝璇锋鏌ヨ〃澶翠腑鐨勫悕绉板強椤哄簭锛屼笌鎸夐挳Excel鍒椾俊鎭槸鍚︿竴鑷达紒',
+          message: `宸ヤ綔琛ㄣ��${sheetName}銆嬭〃澶撮敊璇紝${errDetail}`,
           duration: 5
         })
       }
@@ -238,7 +238,7 @@
       })
     }
 
-    let result = Utils.getExcelInSql(btn, data, this.state.dict, (this.props.BID || ''))
+    let result = getExcelInSql(btn, data, this.state.dict, (this.props.BID || ''))
 
     if (result.errors) {
       notification.warning({
@@ -426,7 +426,7 @@
           type="link"
           title={show === 'icon' ? btn.label : ''}
           loading={loading}
-          style={btn.btnstyle}
+          style={btn.style}
           icon={show === 'text' ? '' : (show === 'icon' ? (btn.icon || 'upload') : (btn.icon || ''))}
           onClick={() => {this.actionTrigger()}}
         >{show === 'icon' ? '' : btn.label}</Button>

--
Gitblit v1.8.0