From ef8acbf3859bd13e759fbb9b8ba726039c1fb2c5 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 14 十一月 2023 15:51:59 +0800
Subject: [PATCH] 2023-11-14

---
 src/menu/components/share/actioncomponent/actionform/index.jsx |   50 +++++++++++++++++++++++++++++++++-----------------
 1 files changed, 33 insertions(+), 17 deletions(-)

diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx
index 4a4bd91..3c8a93c 100644
--- a/src/menu/components/share/actioncomponent/actionform/index.jsx
+++ b/src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -7,15 +7,16 @@
 
 import asyncComponent from '@/utils/asyncComponent'
 import KeyInterface from '@/components/keyInterface'
+import MkPrintTemps from './mkPrintTemps'
 import './index.scss'
 
 const { TextArea } = Input
 const MkEditIcon = asyncComponent(() => import('@/components/mkIcon'))
 const MKTable = asyncComponent(() => import('@/components/normalform/modalform/mkTable'))
 const acTyOptions = {
-  pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'tipTitle', 'hidden'],
-  prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'tipTitle', 'hidden'],
-  exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'hidden'],
+  pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'tipTitle', 'hidden', 'preButton'],
+  prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'tipTitle', 'hidden', 'preButton'],
+  exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'hidden', 'preButton'],
   excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'icon', 'class', 'color', 'sheet', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'width', 'hidden'],
   excelOut: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'pagination', 'search', 'width', 'hidden'],
   popview: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'color', 'popClose', 'width', 'display', 'ratio', 'syncComponent', 'clickouter', 'maskStyle', 'closeButton', 'hidden'],
@@ -213,7 +214,7 @@
           shows.push('exInterface', 'exProInterface')
         }
       } else if (intertype === 'inner') {
-        shows.push('innerFunc', 'output')
+        shows.push('innerFunc', 'output', 'recordUser')
         if (Ot === 'requiredOnce') { // 鍓嶇疆鍑芥暟
           shows.push('preFunc')
         }
@@ -294,7 +295,7 @@
           shows.push('exInterface', 'exProInterface')
         }
       } else if (intertype === 'inner') {
-        shows.push('innerFunc')
+        shows.push('innerFunc', 'recordUser')
         reRequired.innerFunc = true
       } else {
         shows.push('sql', 'sqlType')
@@ -345,7 +346,7 @@
           shows.push('exInterface', 'exProInterface')
         }
       } else if (this.record.intertype === 'inner') {
-        shows.push('innerFunc')
+        shows.push('innerFunc', 'recordUser')
         reRequired.innerFunc = true
       }
       if (this.record.execSuccess === 'grid' || this.record.execError === 'grid') {
@@ -353,7 +354,12 @@
       }
     } else if (openType === 'excelOut') {
       reOptions.intertype = this.state.interTypeOptions.filter(op => op.value !== 'custom')
-      reOptions.Ot = requireOptions.filter(op => ['notRequired', 'requiredOnce'].includes(op.value))
+
+      if (appType === 'mob') {
+        reOptions.Ot = requireOptions.filter(op => ['notRequired'].includes(op.value))
+      } else {
+        reOptions.Ot = requireOptions.filter(op => ['notRequired', 'requiredOnce'].includes(op.value))
+      }
 
       if (this.record.intertype === 'outer') {
         shows.push('innerFunc', 'sysInterface', 'outerFunc')
@@ -375,13 +381,15 @@
           shows.push('exInterface', 'exProInterface')
         }
       } else if (this.record.intertype === 'inner') {
-        shows.push('innerFunc')
+        shows.push('innerFunc', 'recordUser')
         reRequired.innerFunc = true
       }
       if (this.record.execSuccess === 'grid' || this.record.execError === 'grid') {
         shows.push('resetPageIndex')
       }
-      if (this.record.Ot !== 'notRequired' && this.record.Ot !== 'requiredOnce') {
+      if (this.record.Ot !== 'notRequired' && appType === 'mob') {
+        this.record.Ot = 'notRequired'
+      } else if (this.record.Ot !== 'notRequired' && this.record.Ot !== 'requiredOnce') {
         this.record.Ot = 'notRequired'
       }
     } else if (openType === 'popview') {
@@ -451,7 +459,7 @@
             shows.push('exInterface', 'exProInterface')
           }
         } else if (this.record.intertype === 'inner') {
-          shows.push('innerFunc')
+          shows.push('innerFunc', 'recordUser')
           reRequired.innerFunc = true
         }
         if (this.record.execSuccess === 'grid' || this.record.execError === 'grid') {
@@ -866,7 +874,7 @@
             getPopupContainer={() => document.getElementById('winter')}
           >
             {item.options.map((option, index) =>
-              <Select.Option key={index} title={option.text || option.label} value={(option.value || option.field)}>
+              <Select.Option key={index} title={option.text || option.label} disabled={option.$disabled || false} value={(option.value || option.field)}>
                 {(option.text || option.label)}
               </Select.Option>
             )}
@@ -923,6 +931,12 @@
         }
 
         content = <TextArea rows={2} readOnly={item.readonly}/>
+      } else if (item.type === 'printTemps') {
+        rules = [
+          { required: item.required, message: '璇烽�夋嫨' + item.label + '!' }
+        ]
+
+        content = <MkPrintTemps />
       } else if (item.type === 'keyinterface') {
         span = 24
         className = 'textarea'
@@ -966,11 +980,12 @@
           values.$fixed = card.$fixed || false
 
           if (card.OpenType === 'excelOut' && values.OpenType === 'excelIn') {
-            if (values.verify && values.verify.columns && values.verify.columns.length > 0) {
-              values.verify.columns = values.verify.columns.map(col => {
+            values.verify = {columns: [], scripts: [], sheet: 'Sheet1', default: 'true', range: 1, uniques: []}
+            if (card.verify && card.verify.columns) {
+              values.verify.columns = card.verify.columns.map(col => {
                 col.required = col.required || 'true'
                 col.type = col.type || 'Nvarchar(50)'
-                col.import = col.import || 'true'
+                col.import = 'true'
           
                 if (col.type === 'text' || col.type === 'image') {
                   col.type = 'Nvarchar(50)'
@@ -993,11 +1008,12 @@
                 return col
               })
 
-              values.verify.sheet = values.verify.sheet || 'Sheet1'
+              values.verify.sheet = card.verify.sheet || 'Sheet1'
             }
           } else if (card.OpenType === 'excelIn' && values.OpenType === 'excelOut') {
-            if (values.verify && values.verify.columns && values.verify.columns.length > 0) {
-              values.verify.columns = values.verify.columns.map(col => {
+            values.verify = {columns: [], scripts: [], dataType: 'default'}
+            if (card.verify && card.verify.columns) {
+              values.verify.columns = card.verify.columns.map(col => {
                 col.type = col.type || 'text'
                 col.output = col.output || 'true'
                 col.required = col.required || 'false'

--
Gitblit v1.8.0