From c0e017668d780c40f85230f227ea0160b5d22d4d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 20 二月 2024 14:13:00 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 src/tabviews/custom/components/table/edit-table/normalTable/mkPopSelect/index.jsx |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/src/tabviews/custom/components/table/edit-table/normalTable/mkPopSelect/index.jsx b/src/tabviews/custom/components/table/edit-table/normalTable/mkPopSelect/index.jsx
index 4428a97..d74157b 100644
--- a/src/tabviews/custom/components/table/edit-table/normalTable/mkPopSelect/index.jsx
+++ b/src/tabviews/custom/components/table/edit-table/normalTable/mkPopSelect/index.jsx
@@ -44,7 +44,7 @@
     let param = {
       func: 'sPC_Get_TableData',
       obj_name: 'data',
-      exec_type: 'y',
+      exec_type: window.GLOB.execType || 'y',
       arr_field: config.arr_field,
       default_sql: 'true',
       custom_script: '',
@@ -88,8 +88,8 @@
       DateCount && console.info(`/*${config.label} 鎬绘暟鏌ヨ*/\n` + DateCount.replace(/\n\s{6}/ig, '\n'))
     }
 
-    param.LText = Utils.formatOptions(sql)
-    param.DateCount = Utils.formatOptions(DateCount)
+    param.LText = Utils.formatOptions(sql, param.exec_type)
+    param.DateCount = Utils.formatOptions(DateCount, param.exec_type)
 
     param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
     param.secretkey = Utils.encrypt('', param.timestamp)
@@ -234,6 +234,7 @@
     
     this.state = {
       value: props.defaultValue,
+      showValue: props.showValue,
       visible: false
     }
   }
@@ -275,6 +276,10 @@
     const { config, lineId } = this.props
 
     let values = {[config.field]: record.$$uuid}
+    let showValue = ''
+    if (config.showField) {
+      showValue = record[config.showField] || ''
+    }
 
     if (config.linkSubField) {
       config.linkSubField.forEach((m, i) => {
@@ -284,7 +289,7 @@
 
     this.props.onChange(values, record.$$uuid)
 
-    this.setState({visible: false, value: record.$$uuid})
+    this.setState({visible: false, value: record.$$uuid, showValue})
 
     if (config.$ctrl) {
       MKEmitter.emit('colBlur' + config.tableId, lineId, config.uuid)
@@ -329,7 +334,7 @@
     }
 
     this.props.onChange(values, '')
-    this.setState({value: ''})
+    this.setState({value: '', showValue: ''})
 
     if (config.$ctrl) {
       MKEmitter.emit('colBlur' + config.tableId, lineId, config.uuid)
@@ -350,12 +355,12 @@
 
   render() {
     const { autoFocus, BID, lineId, config } = this.props
-    const { value, visible } = this.state
+    const { showValue, value, visible } = this.state
     
     return <>
       {autoFocus ? <div className="mk-pop-select-mask" onClick={this.trigger}></div> : null}
       <div className="mk-pop-select-wrap" onClick={this.trigger}>
-        {value}
+        {showValue || value}
         {value && !autoFocus ? <CloseCircleFilled onClick={this.clear} /> : null}
         <TableOutlined onClick={this.trigger}/>
       </div>

--
Gitblit v1.8.0