From 24bba05db141f358bf1a8bb7213a2432c9de355e Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 08 十月 2021 19:14:22 +0800
Subject: [PATCH] 2021-10-08

---
 src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx |   94 ++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 93 insertions(+), 1 deletions(-)

diff --git a/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx b/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx
index 28c9fc9..c345c81 100644
--- a/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx
+++ b/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx
@@ -7,7 +7,7 @@
  * @description 鑾峰彇鏄剧ず鍒楄〃鍗曢厤缃俊鎭�
  * @param {object} card       // 鎼滅储鏉′欢瀵硅薄
  */
-export function getColumnForm (card, fields = []) {
+export function getColumnForm (card, fields = [], columns = []) {
   let roleList = sessionStorage.getItem('sysRoles')
   if (roleList) {
     try {
@@ -42,6 +42,21 @@
     value: 'index',
     text: '搴忓彿'
   }]
+
+  let editCols = [
+    {
+      field: '$next',
+      label: '涓嬩竴琛�'
+    }
+  ]
+  columns.forEach(col => {
+    if (col.editable === 'true' && col.uuid !== card.uuid) {
+      editCols.push({
+        field: col.uuid,
+        label: col.label
+      })
+    }
+  })
 
   return [
     {
@@ -125,6 +140,21 @@
     },
     {
       type: 'radio',
+      key: 'sum',
+      label: '鏄剧ず鍚堣',
+      initVal: card.sum || 'false',
+      tooltip: '鍚堣淇℃伅鍙湪浣跨敤绯荤粺鏁版嵁婧愭椂鏈夋晥銆�',
+      required: false,
+      options: [{
+        value: 'true',
+        text: Formdict['model.true']
+      }, {
+        value: 'false',
+        text: Formdict['model.false']
+      }]
+    },
+    {
+      type: 'radio',
       key: 'editable',
       label: '鍙紪杈�',
       initVal: card.editable || 'false',
@@ -138,6 +168,52 @@
       }]
     },
     {
+      type: 'radio',
+      key: 'required',
+      label: '蹇呭~',
+      initVal: card.required || 'false',
+      required: false,
+      options: [{
+        value: 'false',
+        text: '鍚�'
+      }, {
+        value: 'true',
+        text: '鏄�'
+      }]
+    },
+    {
+      type: 'text',
+      key: 'initval',
+      label: '榛樿鍊�',
+      initVal: card.initval,
+      tooltip: '浣跨敤$copy鏃讹紝琛ㄧず鏂板鏃跺鍒朵笂涓�琛屼俊鎭��',
+      required: false
+    },
+    {
+      type: 'select',
+      key: 'enter',
+      label: '鍥炶溅鍒囨崲',
+      initVal: card.enter || '$next',
+      options: editCols
+    },
+    {
+      type: 'radio',
+      key: 'footEnter',
+      label: '鏈鍥炶溅',
+      initVal: card.footEnter || 'false',
+      tooltip: '鏂板鍔熻兘浠呭湪琛ㄦ牸鍙柊澧炴椂鏈夋晥銆�',
+      options: [{
+        value: 'sub',
+        text: '鎻愪氦'
+      }, {
+        value: 'add',
+        text: '鏂板'
+      }, {
+        value: 'false',
+        text: '鏃犲姩浣�'
+      }]
+    },
+    {
       type: 'number',
       key: 'decimal',
       min: 0,
@@ -148,6 +224,22 @@
       required: true
     },
     {
+      type: 'number',
+      key: 'max',
+      label: '鏈�澶у��',
+      initVal: card.max,
+      unlimit: true,
+      required: false
+    },
+    {
+      type: 'number',
+      key: 'min',
+      label: '鏈�灏忓��',
+      initVal: card.min,
+      unlimit: true,
+      required: false
+    },
+    {
       type: 'select',
       key: 'format',
       label: Formdict['header.form.format'],

--
Gitblit v1.8.0