From 1e4a7720c748bc0206b02b30f4a2e0b3dafb54f3 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 19 二月 2024 13:31:13 +0800
Subject: [PATCH] 2024-02-19

---
 src/tabviews/custom/components/table/edit-table/normalTable/index.jsx |   25 +++++++++++++++++++++++--
 1 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx
index 1de493a..ee270d7 100644
--- a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx
+++ b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx
@@ -752,6 +752,10 @@
         } else if (content === config.closeVal) {
           content = config.closeText
         }
+      } else if (col.editType === 'popSelect') {
+        if (col.showField) {
+          content = record[col.showField] || content
+        }
       }
 
       if (content !== '') {
@@ -809,8 +813,13 @@
               <MkDatePicker config={col} lineId={record.$$uuid} defaultValue={_value || null} autoFocus={true} onChange={this.onColChange} onBlur={() => this.setState({editing: false})}/>
             </td>)
           } else if (col.editType === 'popSelect') {
+            let showValue = ''
+            if (col.showField) {
+              showValue = record[col.showField] || ''
+            }
+
             return (<td onClick={(e) => e.stopPropagation()} className="editing_table_cell">
-              <MKPopSelect config={col} lineId={record.$$uuid} defaultValue={_value} BID={record.$$BID} autoFocus={true} onChange={this.onColChange} onBlur={() => this.setState({editing: false})}/>
+              <MKPopSelect config={col} lineId={record.$$uuid} defaultValue={_value} showValue={showValue} BID={record.$$BID} autoFocus={true} onChange={this.onColChange} onBlur={() => this.setState({editing: false})}/>
             </td>)
           } else {
             return (<td onClick={(e) => e.stopPropagation()} className="editing_table_cell">
@@ -1056,8 +1065,13 @@
             <MkDatePicker config={col} lineId={record.$$uuid} defaultValue={_value || null} autoFocus={false} onChange={this.onColChange}/>
           )
         } else if (col.editType === 'popSelect') {
+          let showValue = ''
+          if (col.showField) {
+            showValue = record[col.showField] || ''
+          }
+          
           children = (
-            <MKPopSelect config={col} lineId={record.$$uuid} defaultValue={_value} BID={record.$$BID} autoFocus={false} onChange={this.onColChange}/>
+            <MKPopSelect config={col} lineId={record.$$uuid} defaultValue={_value} showValue={showValue} BID={record.$$BID} autoFocus={false} onChange={this.onColChange}/>
           )
         } else {
           children = (
@@ -1077,6 +1091,10 @@
             content = config.openText
           } else if (content === config.closeVal) {
             content = config.closeText
+          }
+        } else if (col.editType === 'popSelect') {
+          if (col.showField) {
+            content = record[col.showField] || content
           }
         }
 
@@ -1682,6 +1700,9 @@
         result = originVal === contrastVal
       } else if (item.match === '!=') {
         result = originVal !== contrastVal
+      } else if (item.match === 'regexp') {
+        let reg = new RegExp(item.contrastValue, 'ig')
+        result = reg.test(originVal)
       } else {
         originVal = isNaN(originVal) ? originVal : +originVal
         contrastVal = isNaN(contrastVal) ? contrastVal : +contrastVal

--
Gitblit v1.8.0