From c6d0dcdccdb898e1abcdb7fb8312d3b7b653743f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 16 八月 2022 01:34:18 +0800
Subject: [PATCH] 2022-08-16

---
 src/tabviews/zshare/actionList/normalbutton/index.jsx |   42 +++++++++++++++++++++++++++++++++---------
 1 files changed, 33 insertions(+), 9 deletions(-)

diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx
index d58c19e..087de55 100644
--- a/src/tabviews/zshare/actionList/normalbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -606,9 +606,13 @@
           param.LText = Utils.formatOptions(param.LText)
         } else if (btn.OpenType === 'pop') { // 琛ㄥ崟
           if (index !== 0) {
+            let _cell = {}
+            Object.keys(cell).forEach(key => {
+              _cell[key.toLowerCase()] = cell[key]
+            })
             formdata = formdata.map(_data => {
-              if (_data.readin && cell.hasOwnProperty(_data.key)) {
-                _data.value = cell[_data.key]
+              if (_data.readin && _cell.hasOwnProperty(_data.key.toLowerCase())) {
+                _data.value = _cell[_data.key.toLowerCase()]
               }
               return _data
             })
@@ -741,9 +745,13 @@
 
         if (btn.OpenType === 'pop') { // 琛ㄥ崟
           if (index !== 0) {
+            let _cell = {}
+            Object.keys(cell).forEach(key => {
+              _cell[key.toLowerCase()] = cell[key]
+            })
             formdata = formdata.map(_data => {
-              if (_data.readin && cell.hasOwnProperty(_data.key)) {
-                _data.value = cell[_data.key]
+              if (_data.readin && _cell.hasOwnProperty(_data.key.toLowerCase())) {
+                _data.value = _cell[_data.key.toLowerCase()]
               }
               return _data
             })
@@ -2237,11 +2245,25 @@
   }
 
   modelconfirm = () => {
-    const { BData, btn } = this.props
+    const { btn } = this.props
     const { btnconfig, selines } = this.state
     let _this = this
 
     let result = []
+    let _data = {}
+    let BData = {}
+
+    if (selines[0]) {
+      Object.keys(selines[0]).forEach(key => {
+        _data[key.toLowerCase()] = selines[0][key]
+      })
+    }
+    if (this.props.BData) {
+      Object.keys(this.props.BData).forEach(key => {
+        BData[key.toLowerCase()] = this.props.BData[key]
+      })
+    }
+
     btnconfig.fields.forEach(item => {
       if (!item.field) return
       let _readin = item.readin !== 'false'
@@ -2251,10 +2273,12 @@
         _readin = false
       }
 
-      if (item.type === 'linkMain' && BData && BData.hasOwnProperty(item.field)) {
-        _initval = BData[item.field]
-      } else if (_readin && selines[0] && selines[0].hasOwnProperty(item.field)) {
-        _initval = selines[0][item.field]
+      let key = item.field.toLowerCase()
+
+      if (item.type === 'linkMain' && BData.hasOwnProperty(key)) {
+        _initval = BData[key]
+      } else if (_readin && _data.hasOwnProperty(key)) {
+        _initval = _data[key]
       } else if (item.type === 'date' && _initval) {
         _initval = moment().subtract(_initval, 'days').format('YYYY-MM-DD')
       } else if (item.type === 'datemonth' && _initval) {

--
Gitblit v1.8.0