From c51f5e007a3e03c9d6731ab7f28f0080de009990 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 17 十一月 2021 18:38:32 +0800
Subject: [PATCH] 2021-11-17

---
 src/templates/zshare/formconfig.jsx |  308 +++++++++++++++++++++++++++++++++-----------------
 1 files changed, 203 insertions(+), 105 deletions(-)

diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx
index c9c8963..ab0abab 100644
--- a/src/templates/zshare/formconfig.jsx
+++ b/src/templates/zshare/formconfig.jsx
@@ -314,9 +314,9 @@
     }, {
       value: 'datemonth',
       text: Formdict['model.form.datemonth']
-    }, {
-      value: 'daterange',
-      text: Formdict['model.form.daterange']
+    // }, {
+    //   value: 'daterange',
+    //   text: Formdict['model.form.daterange']
     }]
   } else {
     typeOptions = [{
@@ -678,6 +678,20 @@
         text: Formdict['model.false']
       }]
     },
+    {
+      type: 'radio',
+      key: 'query',
+      label: '鍙備笌鏌ヨ',
+      initVal: card.query || 'true',
+      tooltip: '鏄惁浣滀负 where 鏉′欢锛屽弬涓庢暟鎹煡璇€��',
+      options: [{
+        value: 'true',
+        text: '鏄�'
+      }, {
+        value: 'false',
+        text: '鍚�'
+      }]
+    },
     // {
     //   type: 'radio',
     //   key: 'transfer',
@@ -720,14 +734,14 @@
     {
       type: 'radio',
       key: 'labelShow',
-      label: '鏄剧ず鍚嶇О',
+      label: '鍚嶇О',
       initVal: card.labelShow || 'true',
       options: [{
         value: 'true',
-        text: Formdict['model.true']
+        text: '鏄剧ず'
       }, {
         value: 'false',
-        text: Formdict['model.false']
+        text: '闅愯棌'
       }]
     },
     {
@@ -840,19 +854,10 @@
     }
   ]
 
-  // 鏍囩绫诲瀷锛屼富琛ㄦ墠浼氬瓨鍦ㄨ〃鍗曟爣绛鹃〉
-  let tabTems = [{
-    value: 'FormTab',
-    text: '琛ㄥ崟鏍囩椤�'
-  }]
-  if (type === 'subtable') {
-    tabTems = []
-  }
-
   if (card.execSuccess === 'view' || card.execSuccess === 'refresh') { // refresh涓鸿〃鍗曟爣绛鹃〉
     card.execSuccess = 'grid'
   }
-  if (card.execError === 'view' || card.execSuccess === 'refresh') {
+  if (card.execError === 'view' || card.execError === 'refresh') {
     card.execError = 'grid'
   }
   if (card.popClose === 'view') {
@@ -872,6 +877,13 @@
       value: 'equaltab',
       text: Formdict['header.form.refresh.equaltab']
     })
+  }
+
+  if (card.OpenType === 'blank') {
+    card.OpenType = 'tab'
+  }
+  if (!card.control && card.controlField) {
+    card.control = 'disabled'
   }
 
   return [
@@ -1139,20 +1151,6 @@
       options: []
     },
     {
-      type: 'select',
-      key: 'tabTemplate',
-      label: '鏍囩绫诲瀷',
-      initVal: card.tabTemplate || '',
-      required: true,
-      options: [
-        {
-          value: 'ThdMenu',
-          text: Formdict['model.menu.level3']
-        },
-        ...tabTems
-      ]
-    },
-    {
       type: 'cascader',
       key: 'linkmenu',
       label: Formdict['model.form.linkmenu'],
@@ -1169,45 +1167,21 @@
       options: menulist
     },
     {
-      type: 'radio',
-      key: 'afterExecSuccess',
-      label: Formdict['header.form.afterExecSuccess'],
-      initVal: card.afterExecSuccess || 'close',
-      required: true,
-      options: [{
-        value: 'close',
-        text: Formdict['model.close']
-      }, {
-        value: 'notclose',
-        text: Formdict['model.notclose']
-      }]
-    },
-    {
-      type: 'radio',
-      key: 'afterExecError',
-      label: Formdict['header.form.afterExecError'],
-      initVal: card.afterExecError || 'notclose',
-      required: true,
-      options: [{
-        value: 'close',
-        text: Formdict['model.close']
-      }, {
-        value: 'notclose',
-        text: Formdict['model.notclose']
-      }]
-    },
-    {
       type: refresh.length === 0 ? 'radio' : 'select',
       key: 'execSuccess',
       label: Formdict['model.form.afterSuccess'],
       initVal: card.execSuccess || 'never',
+      tooltip: '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍笺��',
       required: true,
       options: [{
         value: 'never',
-        text: Formdict['header.form.refresh.never']
+        text: '涓嶅埛鏂�'
       }, {
         value: 'grid',
-        text: Formdict['header.form.refresh.grid']
+        text: '鍒锋柊琛ㄦ牸'
+      }, {
+        value: 'line',
+        text: '鍒锋柊琛�'
       },
       ...refresh]
     },
@@ -1216,13 +1190,17 @@
       key: 'execError',
       label: Formdict['model.form.afterError'],
       initVal: card.execError || 'never',
+      tooltip: '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍笺��',
       required: true,
       options: [{
         value: 'never',
-        text: Formdict['header.form.refresh.never']
+        text: '涓嶅埛鏂�'
       }, {
         value: 'grid',
-        text: Formdict['header.form.refresh.grid']
+        text: '鍒锋柊琛ㄦ牸'
+      }, {
+        value: 'line',
+        text: '鍒锋柊琛�'
       },
       ...refresh]
     },
@@ -1234,10 +1212,10 @@
       required: true,
       options: [{
         value: 'never',
-        text: Formdict['header.form.refresh.never']
+        text: '涓嶅埛鏂�'
       }, {
         value: 'grid',
-        text: Formdict['header.form.refresh.grid']
+        text: '鍒锋柊琛ㄦ牸'
       },
       ...refresh]
     },
@@ -1338,23 +1316,6 @@
       }]
     },
     {
-      type: 'select',
-      key: 'controlField',
-      label: '鎺у埗瀛楁',
-      tooltip: '绂佺敤鎺у埗瀛楁锛屽彲鏍规嵁鏁版嵁鎺у埗鎸夐挳鏄惁绂佺敤銆�',
-      initVal: card.controlField || '',
-      required: false,
-      options: [{label: '鏃�', field: ''}, ...columns]
-    },
-    {
-      type: 'text',
-      key: 'controlVal',
-      label: '鎺у埗鍊�',
-      tooltip: '褰撻�夋嫨鎺у埗瀛楁锛屼笖瀛楁鍊间笌鎺у埗鍊肩浉绛夋椂锛屾寜閽細绂佺敤锛屽涓�肩敤閫楀彿鍒嗛殧銆�',
-      initVal: card.controlVal || '',
-      required: false
-    },
-    {
       type: 'radio',
       key: 'display',
       label: '鏄剧ず鏂瑰紡',
@@ -1405,11 +1366,45 @@
       key: 'preFunc',
       label: '鍓嶇疆鍑芥暟',
       initVal: card.preFunc || '',
-      tooltip: `鍑芥暟鍚嶇О闇�浠�${usefulFields.join(', ')}绛夊瓧绗﹀紑濮嬶紱鍓嶇疆鍑芥暟鎵ц瀹屾垚鍚庯紝缁撴灉浼氫紶鍏ュ唴閮ㄥ嚱鏁颁腑锛屾鏃跺唴閮ㄥ嚱鏁颁細寮傛鎵ц銆俙,
+      tooltip: `鍑芥暟鍚嶇О闇�浠�${usefulFields.join(', ')}绛夊瓧绗﹀紑濮嬶紱鍓嶇疆鍑芥暟鎵ц瀹屾垚鍚庯紝缁撴灉浼氫紶鍏ュ唴閮ㄥ嚱鏁颁腑锛屾鏃跺唴閮ㄥ嚱鏁颁細寮傛鎵ц锛涘綋鍓嶇疆鍑芥暟杩斿洖涓璄rrCode绛変簬-1鏃讹紝灏嗕笉鍐嶆墽琛屽唴閮ㄥ嚱鏁般�俙,
       fields: usefulFields,
       tooltipClass: 'middle',
       required: false,
       readonly: false
+    },
+    {
+      type: 'radio',
+      key: 'control',
+      label: '鎸夐挳鎺у埗',
+      initVal: card.control || '',
+      required: false,
+      options: [{
+        value: '',
+        text: '鏃�'
+      }, {
+        value: 'disabled',
+        text: '绂佺敤'
+      }, {
+        value: 'hidden',
+        text: '闅愯棌'
+      }]
+    },
+    {
+      type: 'select',
+      key: 'controlField',
+      label: '鎺у埗瀛楁',
+      tooltip: '鎺у埗瀛楁锛屽彲鏍规嵁鏁版嵁鎺у埗鎸夐挳鐨勯殣钘忔垨绂佺敤銆�',
+      initVal: card.controlField || '',
+      required: true,
+      options: columns
+    },
+    {
+      type: 'text',
+      key: 'controlVal',
+      label: '鎺у埗鍊�',
+      tooltip: '褰撻�夋嫨鎺у埗瀛楁锛屼笖瀛楁鍊间笌鎺у埗鍊肩浉绛夋椂锛屾寜閽細闅愯棌鎴栫鐢紝澶氫釜鍊肩敤閫楀彿鍒嗛殧銆�',
+      initVal: card.controlVal || '',
+      required: false
     },
   ]
 }
@@ -2190,9 +2185,8 @@
  * @param {*} tabfields       // 鍙垏鎹㈣〃鍗�
  * @param {*} linkableFields  // 鍙叧鑱旇〃鍗�
  * @param {*} linksupFields   // 涓婄骇琛ㄥ崟
- * @param {*} subtable        // 鏄惁涓哄瓙琛ㄨ〃鍗�
  */
-export function getModalForm (card, inputfields = [], tabfields = [], linkableFields, linksupFields, subtable = false) {
+export function getModalForm (card, inputfields = [], tabfields = [], linkableFields, linksupFields) {
   let appType = sessionStorage.getItem('appType')
   let roleList = sessionStorage.getItem('sysRoles')
   if (roleList) {
@@ -2611,6 +2605,70 @@
       required: false
     },
     {
+      type: 'select',
+      key: 'minDate',
+      label: '鏈�灏忓��',
+      initVal: card.minDate || '',
+      required: false,
+      options: [{
+        value: '',
+        text: '鏃�'
+      }, {
+        value: '0',
+        text: '褰撳ぉ'
+      }, {
+        value: '-1',
+        text: '鍓嶄竴澶�'
+      }, {
+        value: '-2',
+        text: '鍓嶄袱澶�'
+      }, {
+        value: '-3',
+        text: '鍓嶄笁澶�'
+      }, {
+        value: '-7',
+        text: '鍓嶄竷澶�'
+      }, {
+        value: '-30',
+        text: '鍓�30澶�'
+      }, {
+        value: '-90',
+        text: '鍓�90澶�'
+      }]
+    },
+    {
+      type: 'select',
+      key: 'maxDate',
+      label: '鏈�澶у��',
+      initVal: card.maxDate || '',
+      required: false,
+      options: [{
+        value: '',
+        text: '鏃�'
+      }, {
+        value: '0',
+        text: '褰撳ぉ'
+      }, {
+        value: '1',
+        text: '鍚庝竴澶�'
+      }, {
+        value: '2',
+        text: '鍚庝袱澶�'
+      }, {
+        value: '3',
+        text: '鍚庝笁澶�'
+      }, {
+        value: '7',
+        text: '鍚庝竷澶�'
+      }, {
+        value: '30',
+        text: '鍚�30澶�'
+      }, {
+        value: '90',
+        text: '鍚�90澶�'
+      }]
+    },
+    {
       type: 'number',
       key: 'fieldlength',
       min: 1,
@@ -2658,17 +2716,20 @@
       type: 'select',
       key: 'fileType',
       label: '鏄剧ず鏂瑰紡',
-      initVal: card.fileType || (appType === 'mob' ? 'picture-card' : 'text'),
+      initVal: card.fileType || 'text',
       options: [{
         value: 'text',
         text: '鏂囦欢'
-      }, {
+      },
+      {
         value: 'picture',
         text: '鍥炬枃淇℃伅'
-      }, {
+      },
+      {
         value: 'picture-card',
         text: '鍥剧墖鍗�'
-      }]
+      }],
+      forbid: appType === 'mob'
     },
     {
       type: 'number',
@@ -2739,11 +2800,11 @@
       label: '鍏夋爣',
       initVal: card.cursor || 'left',
       options: [{
-        value: 'right',
-        text: '鍙冲榻�'
-      }, {
         value: 'left',
         text: '宸﹀榻�'
+      }, {
+        value: 'right',
+        text: '鍙冲榻�'
       }],
       forbid: appType !== 'mob'
     },
@@ -2865,20 +2926,20 @@
         text: 'nvarchar(50)'
       }]
     },
-    {
-      type: 'radio',
-      key: 'mode',
-      label: '妯″紡',
-      initVal: card.mode || 'picker',
-      options: [{
-        value: 'picker',
-        text: '閫夋嫨鍣�'
-      }, {
-        value: 'calendar',
-        text: '鏃ュ巻'
-      }],
-      forbid: appType !== 'mob'
-    },
+    // {
+    //   type: 'radio',
+    //   key: 'mode',
+    //   label: '妯″紡',
+    //   initVal: card.mode || 'picker',
+    //   options: [{
+    //     value: 'picker',
+    //     text: '閫夋嫨鍣�'
+    //   }, {
+    //     value: 'calendar',
+    //     text: '鏃ュ巻'
+    //   }],
+    //   forbid: appType !== 'mob'
+    // },
     {
       type: 'number',
       key: 'span',
@@ -3000,6 +3061,21 @@
     },
     {
       type: 'radio',
+      key: 'place',
+      label: '鎺掑垪',
+      initVal: card.place || 'left_right',
+      tooltip: '鎻愮ず鏂囧瓧涓庤緭鍏ユ鐨勪綅缃叧绯汇��',
+      forbid: appType !== 'mob',
+      options: [{
+        value: 'left_right',
+        text: '宸﹀彸'
+      }, {
+        value: 'up_down',
+        text: '涓婁笅'
+      }]
+    },
+    {
+      type: 'radio',
       key: 'count',
       label: '璁℃暟鍔熻兘',
       initVal: card.count || 'false',
@@ -3100,6 +3176,28 @@
       options: inputfields
     },
     {
+      type: 'number',
+      key: 'marginTop',
+      label: '涓婅竟璺濓紙px锛�',
+      initVal: card.marginTop || 0,
+      min: 0,
+      max: 1000,
+      precision: 0,
+      required: false,
+      forbid: appType !== 'mob'
+    },
+    {
+      type: 'number',
+      key: 'marginBottom',
+      label: '涓嬭竟璺濓紙px锛�',
+      initVal: card.marginBottom || 0,
+      min: 0,
+      max: 1000,
+      precision: 0,
+      required: false,
+      forbid: appType !== 'mob'
+    },
+    {
       type: 'multiselect',
       key: 'blacklist',
       label: Formdict['header.form.blacklist'],

--
Gitblit v1.8.0