From b3e3c463d176a1ec9ab16adea08bcbe6536ec52a Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 21 五月 2025 15:45:26 +0800
Subject: [PATCH] 2025-05-21

---
 src/menu/datasource/verifycard/settingform/index.jsx |  107 +++++++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 91 insertions(+), 16 deletions(-)

diff --git a/src/menu/datasource/verifycard/settingform/index.jsx b/src/menu/datasource/verifycard/settingform/index.jsx
index 560e5d9..92b8896 100644
--- a/src/menu/datasource/verifycard/settingform/index.jsx
+++ b/src/menu/datasource/verifycard/settingform/index.jsx
@@ -38,11 +38,24 @@
     const { config, setting } = this.props
 
     let menu = window.GLOB.customMenu
-    let modules = MenuUtils.getSupModules(menu.components, config.uuid, menu.interfaces)
+    let modules = []
     let ismain = false
 
     if (menu.Template === 'BaseTable') {
       ismain = config.name === '涓昏〃'
+    }
+
+    if (config.type === 'interface') {
+      menu.components.forEach(item => {
+        if (item.type === 'module' && item.subtype === 'account') {
+          modules.push({
+            value: item.uuid,
+            label: item.name
+          })
+        }
+      })
+    } else {
+      modules = MenuUtils.getSupModules(menu.components, config.uuid, menu.interfaces)
     }
 
     modules.unshift({
@@ -105,6 +118,9 @@
           if (values.interType === 'system' && values.onload === 'false') {
             values.sync = 'false'
           }
+          if (values.interType === 'system' && values.database === 'sso') {
+            values.sync = 'false'
+          }
 
           // 鏁版嵁婧愬墠绔獙璇�
           if (values.interType === 'system' && values.execute !== 'false' && values.dataresource) {
@@ -145,10 +161,10 @@
     let tableName = this.props.form.getFieldValue('tableName') || '琛ㄥ悕'
 
     if (type === 'flowstart') {
-      _sql = _sql + `\n/* select a.*, w.remark as remark_w, w.statusname  as statusname_w,w.status as status_w,w.works_flow_param,w.modifydate as modifydate_w  from (select * from ${tableName} where status=0 and deleted=0 $@ and createuserid=@userid@ @$) a
+      _sql = _sql + `\n/* select a.*, w.remark as remark_w, w.statusname  as statusname_w,w.status as status_w,w.works_flow_param,w.works_flow_detail_id,w.modifydate as modifydate_w  from (select * from ${tableName} where status=0 and deleted=0 $@ and createuserid=@userid@ @$) a
     inner join (select * from  s_my_works_flow  where works_flow_code=@works_flow_code@ and status=0 and deleted=0) w on a.id=w.works_flow_id */`
     } else if (type === 'flowcheck') {
-      _sql = _sql + `\n/* select a.*, w.remark as remark_w, w.statusname  as statusname_w,w.status as status_w,w.works_flow_param,w.modifydate as modifydate_w  
+      _sql = _sql + `\n/* select a.*, w.remark as remark_w, w.statusname  as statusname_w,w.status as status_w,w.works_flow_param,w.works_flow_detail_id,w.modifydate as modifydate_w  
     from (select * from ${tableName} where status=0 and deleted=0 ) a
     inner join (select * from  s_my_works_flow  where works_flow_code=@works_flow_code@ and status>0 and status<888 and deleted=0) w 
     on a.id=w.works_flow_id 
@@ -189,7 +205,7 @@
   }
 
   render() {
-    const { columns, config } = this.props
+    const { columns, config, hasMainSearch } = this.props
     const { getFieldDecorator } = this.props.form
     const { setting, modules, innerRules, innertip, MenuType, visible } = this.state
 
@@ -203,6 +219,7 @@
         sm: { span: 16 }
       }
     }
+    let hasUp = !['balcony', 'menubar', 'commonbar', 'tabbar', 'invTable'].includes(config.subtype) && (!config.wrap || config.wrap.supType !== 'multi') && MenuType !== 'billPrint'
 
     return (
       <div className="model-datasource-setting-form-box">
@@ -414,10 +431,10 @@
                 {getFieldDecorator('primaryKey', {
                   initialValue: setting.primaryKey || ''
                 })(
-                  <Select>
+                  <Select showSearch filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}>
                     {columns.map((option, i) =>
                       <Select.Option key={i} value={option.field}>
-                        {option.label}
+                        {`${option.label}锛�${option.field}锛塦}
                       </Select.Option>
                     )}
                   </Select>
@@ -438,6 +455,10 @@
                     {
                       required: true,
                       message: '璇疯緭鍏ラ粯璁ゆ帓搴�!'
+                    },
+                    {
+                      pattern: /^[^'+]+$/,
+                      message: '鎺掑簭涓笉鍙娇鐢╘'涓�+'
                     }
                   ]
                 })(<Input placeholder={'ID asc, UID desc'} autoComplete="off" />)}
@@ -454,7 +475,7 @@
                 </Radio.Group>)}
               </Form.Item>
             </Col> : null}
-            {!['balcony', 'menubar', 'commonbar', 'tabbar', 'invTable'].includes(config.subtype) && (!config.wrap || config.wrap.supType !== 'multi') && MenuType !== 'billPrint' ? <Col span={8}>
+            {hasUp ? <Col span={8}>
               <Form.Item label={
                 <Tooltip placement="topLeft" title={'璇ョ粍浠跺鏋滃彈鍏朵粬缁勪欢鎺у埗锛岃閫夐」鐩稿簲鐨勭粍浠讹紝娌℃湁鏃堕�夆�滄棤鈥濄��'}>
                   <QuestionCircleOutlined className="mk-form-tip" />
@@ -515,16 +536,27 @@
                 </Radio.Group>)}
               </Form.Item>
             </Col> : null}
+            {setting.interType === 'system' ? <Col span={8}>
+              <Form.Item label="鏁版嵁搴�">
+                {getFieldDecorator('database', {
+                  initialValue: setting.database || 'local'
+                })(
+                <Radio.Group>
+                  <Radio value="local">鏈湴</Radio>
+                  <Radio value="sso">鍗曠偣</Radio>
+                </Radio.Group>)}
+              </Form.Item>
+            </Col> : null}
             {/* 1銆佷笉鍒嗛〉涓斾笉瀛樺湪涓婄骇妯″潡 */}
             {!['navbar', 'interface', 'calendar'].includes(config.type) && !['editable', 'basetable', 'dualdatacard', 'invoice', 'invTable'].includes(config.subtype) && (!config.pageable || (config.pageable && setting.laypage === 'false')) && (setting.supModule.length === 0 || setting.supModule[0] === 'empty') && setting.interType === 'system' && setting.onload !== 'false' ? <Col span={8}>
               <Form.Item label={
-                <Tooltip placement="topLeft" title={'鍒濆鍖栧姞杞芥椂锛屾槸鍚︿笌鍏朵粬缁勪欢涓�鍚屽姞杞芥暟鎹紝娉細濡傝彍鍗曟湭浣跨敤鍚庣缂撳瓨锛屽垯鏌ヨ璇彞澶т簬8000瀛楃鏃舵棤鏁堛��'}>
+                <Tooltip placement="topLeft" title={'鍒濆鍖栧姞杞芥椂锛屾槸鍚︿笌鍏朵粬缁勪欢涓�鍚屽姞杞芥暟鎹��'}>
                   <QuestionCircleOutlined className="mk-form-tip" />
                   鍚屾鏌ヨ
                 </Tooltip>
               }>
                 {getFieldDecorator('sync', {
-                  initialValue: setting.sync || 'true'
+                  initialValue: setting.sync || 'false'
                 })(
                   <Radio.Group>
                     <Radio value="true">鏄�</Radio>
@@ -544,7 +576,7 @@
                   initialValue: setting.useMSearch || 'true'
                 })(
                   <Radio.Group onChange={(e) => {this.onOptionChange(e.target.value, 'useMSearch')}}>
-                    <Radio value="true">浣跨敤</Radio>
+                    <Radio value="true">浣跨敤{!hasMainSearch ? <Tooltip placement="top" title="鏃犲彲浣跨敤鐨勫閮ㄦ悳绱㈡潯浠�"><span className="mk-dot"></span></Tooltip> : null}</Radio>
                     <Radio value="false">涓嶄娇鐢�</Radio>
                   </Radio.Group>
                 )}
@@ -575,6 +607,23 @@
                   <Radio.Group onChange={(e) => {this.onOptionChange(e.target.value, 'onload')}}>
                     <Radio value="true">鍔犺浇</Radio>
                     <Radio value="false">涓嶅姞杞�</Radio>
+                  </Radio.Group>
+                )}
+              </Form.Item>
+            </Col> : null}
+            {setting.interType === 'system' ? <Col span={8}>
+              <Form.Item label={
+                <Tooltip placement="topLeft" title="浣跨敤鍚庣sql鑴氭湰鏃舵湁鏁堛��">
+                  <QuestionCircleOutlined className="mk-form-tip" />
+                  浜嬪姟
+                </Tooltip>
+              }>
+                {getFieldDecorator('transact', {
+                  initialValue: setting.transact || 'false'
+                })(
+                  <Radio.Group onChange={(e) => {this.onOptionChange(e.target.value, 'transact')}}>
+                    <Radio value="true">鍚敤</Radio>
+                    <Radio value="false">绂佺敤</Radio>
                   </Radio.Group>
                 )}
               </Form.Item>
@@ -631,7 +680,7 @@
             </Col> : null}
             {config.subtype === 'dualdatacard' ? <Col span={8}>
               <Form.Item label={
-                <Tooltip placement="topLeft" title="瀛愯〃鍦ㄤ富琛ㄤ腑鐨勬暟鎹泦鍚嶇О銆�">
+                <Tooltip placement="topLeft" title="瀛愯〃鍦ㄤ富琛ㄤ腑鐨勬暟鎹泦鍚嶇О锛屼娇鐢� sub_data_string 鏃舵暟鎹互 JSON 瀛楃涓插舰寮忚繑鍥烇紙瀛楁闆嗕腑闇�娣诲姞 sub_data_string 瀛楁锛夛紱褰撲富琛ㄥ瓧娈靛瓨鍦� sub_data_string 涓斿�间笉涓虹┖鏃讹紝浼樺厛浣跨敤涓昏〃鐨� sub_data_string銆�">
                   <QuestionCircleOutlined className="mk-form-tip" />
                   瀛愯〃瀛楁
                 </Tooltip>
@@ -641,7 +690,7 @@
                   rules: [
                     {
                       required: true,
-                      message: '璇疯緭鍏ラ粯璁ゆ帓搴�!'
+                      message: '璇疯緭鍏ュ瓙琛ㄥ瓧娈�!'
                     }
                   ]
                 })(<Input placeholder={''} autoComplete="off" />)}
@@ -652,10 +701,10 @@
                 {getFieldDecorator('subKey', {
                   initialValue: setting.subKey || ''
                 })(
-                  <Select>
+                  <Select showSearch filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}>
                     {this.props.subColumns.map((option, i) =>
                       <Select.Option key={i} value={option.field}>
-                        {option.label}
+                        {`${option.label}锛�${option.field}锛塦}
                       </Select.Option>
                     )}
                   </Select>
@@ -667,16 +716,42 @@
                 {getFieldDecorator('subBID', {
                   initialValue: setting.subBID || ''
                 })(
-                  <Select>
+                  <Select showSearch filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}>
                     {this.props.subColumns.map((option, i) =>
                       <Select.Option key={i} value={option.field}>
-                        {option.label}
+                        {`${option.label}锛�${option.field}锛塦}
                       </Select.Option>
                     )}
                   </Select>
                 )}
               </Form.Item>
             </Col> : null}
+            {setting.onload !== 'false' ? <Col span={8}>
+              <Form.Item label={
+                <Tooltip placement="topLeft" title="鍙欢杩熷垵濮嬪寲鏁版嵁鐨勫姞杞芥椂闂达紝鍗曚綅姣锛坢s锛夈��">
+                  <QuestionCircleOutlined className="mk-form-tip" />
+                  寤舵椂鍔犺浇
+                </Tooltip>
+              }>
+                {getFieldDecorator('delay', {
+                  initialValue: setting.delay,
+                })(<InputNumber min={0} max={60000} precision={0} />)}
+              </Form.Item>
+            </Col> : null}
+            {hasUp && setting.supModule && setting.supModule[0] && setting.supModule[0] !== 'empty' ? <Col span={8}>
+              <Form.Item label={
+                <Tooltip placement="topLeft" title="鏈幏鍙栧埌涓婄骇涓婚敭鍊肩殑鎻愮ず鏂囨湰銆�">
+                  <QuestionCircleOutlined className="mk-form-tip" />
+                  涓婄骇绌哄�兼彁绀�
+                </Tooltip>
+              }>
+                {getFieldDecorator('supModTip', {
+                  initialValue: setting.supModTip || ''
+                })(
+                  <Input placeholder={''} autoComplete="off" />
+                )}
+              </Form.Item>
+            </Col> : null}
           </Row>
         </Form>
         <Modal

--
Gitblit v1.8.0