From 73083e2eef00c34c2db62ddea12baa6e44ba1dd6 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 08 二月 2024 00:31:07 +0800
Subject: [PATCH] 2024-02-08

---
 src/tabviews/custom/components/table/edit-table/normalTable/index.jsx |   22 ++++++++++++++++++++--
 1 files changed, 20 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..0272b1c 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 = (
@@ -1078,6 +1092,10 @@
           } else if (content === config.closeVal) {
             content = config.closeText
           }
+        } else if (col.editType === 'popSelect') {
+          if (col.showField) {
+            content = record[col.showField] || content
+          }
         }
 
         if (content !== '') {

--
Gitblit v1.8.0