From f9f60bb0dd17a764ba03faa8041f5b6e9e071553 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 18 一月 2025 23:37:44 +0800
Subject: [PATCH] 2025-01-18

---
 src/templates/zshare/modalform/index.jsx              |    4 
 src/menu/components/form/step-form/index.jsx          |   32 ++++++
 src/templates/modalconfig/settingform/index.jsx       |    4 
 src/templates/zshare/formconfig.jsx                   |   14 ++
 src/menu/components/form/dragtitle/options.jsx        |    4 
 src/menu/components/form/tab-form/index.jsx           |   32 ++++++
 src/templates/zshare/verifycard/index.jsx             |   19 +++
 src/utils/utils-custom.js                             |   20 ++++
 src/mob/components/formdragelement/index.jsx          |    5 
 src/tabviews/zshare/actionList/printbutton/index.jsx  |    8 +
 src/menu/components/form/simple-form/options.jsx      |    4 
 src/menu/components/form/simple-form/index.jsx        |   23 ++++
 src/tabviews/zshare/mutilform/index.jsx               |    6 +
 src/menu/modalconfig/index.jsx                        |   25 ++++
 src/templates/modalconfig/dragelement/index.jsx       |    1 
 src/menu/debug/index.jsx                              |   26 +++++
 src/tabviews/zshare/actionList/normalbutton/index.jsx |    8 +
 src/utils/utils.js                                    |   17 +++
 18 files changed, 235 insertions(+), 17 deletions(-)

diff --git a/src/menu/components/form/dragtitle/options.jsx b/src/menu/components/form/dragtitle/options.jsx
index 485faea..80097ad 100644
--- a/src/menu/components/form/dragtitle/options.jsx
+++ b/src/menu/components/form/dragtitle/options.jsx
@@ -8,13 +8,13 @@
   if (appType === 'mob') {
     group.fields.forEach(f => {
       if (f.field && ['select', 'text', 'number', 'textarea'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') {
-        fields.push(f)
+        fields.push({...f, label: `${f.label}锛�${f.field}锛塦})
       }
     })
   } else {
     group.fields.forEach(f => {
       if (f.field && ['select', 'link', 'text', 'number', 'textarea'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') {
-        fields.push(f)
+        fields.push({...f, label: `${f.label}锛�${f.field}锛塦})
       }
     })
   }
diff --git a/src/menu/components/form/simple-form/index.jsx b/src/menu/components/form/simple-form/index.jsx
index 60e1f9f..3e67e97 100644
--- a/src/menu/components/form/simple-form/index.jsx
+++ b/src/menu/components/form/simple-form/index.jsx
@@ -2,7 +2,7 @@
 import PropTypes from 'prop-types'
 import { is, fromJS } from 'immutable'
 import { Popover, Modal, Button, Switch, message } from 'antd'
-import { PlusOutlined, SettingOutlined, EditOutlined, ToolOutlined, DeleteOutlined, SwapOutlined, FontColorsOutlined } from '@ant-design/icons'
+import { PlusOutlined, SettingOutlined, EditOutlined, ToolOutlined, DeleteOutlined, SwapOutlined, FontColorsOutlined, VerticalRightOutlined } from '@ant-design/icons'
 
 import asyncComponent from '@/utils/asyncComponent'
 import asyncIconComponent from '@/utils/asyncIconComponent'
@@ -516,6 +516,26 @@
     })
   }
 
+  toLower = () => {
+    let card = fromJS(this.state.card).toJS()
+    let that = this
+
+    card.subcards[0].fields = card.subcards[0].fields.map(item => {
+      if (item.field) {
+        item.field = item.field.toLowerCase()
+      }
+      return item
+    })
+    
+    confirm({
+      content: `纭畾灏嗗瓧娈佃浆涓哄皬鍐欏悧锛焋,
+      onOk() {
+        that.updateComponent(card)
+      },
+      onCancel() {}
+    })
+  }
+
   clickComponent = (e) => {
     if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') {
       e.stopPropagation()
@@ -564,6 +584,7 @@
             } trigger="hover">
               <SwapOutlined />
             </Popover> : null}
+            <VerticalRightOutlined style={{color: 'orange', transform: 'rotate(270deg)'}} title="瀛楁杞皬鍐�" onClick={this.toLower}/>
             <FormFork forms={card.subcards[0].fields}/>
             {/* <CopyOutlined title="澶嶅埗" onClick={this.triggerCopy} /> */}
             <Switch checkedChildren="寮�" unCheckedChildren="鍏�" defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} />
diff --git a/src/menu/components/form/simple-form/options.jsx b/src/menu/components/form/simple-form/options.jsx
index ab8acc7..df74b82 100644
--- a/src/menu/components/form/simple-form/options.jsx
+++ b/src/menu/components/form/simple-form/options.jsx
@@ -23,13 +23,13 @@
   if (appType === 'mob') {
     config.subcards[0].fields.forEach(f => {
       if (f.field && ['select', 'text', 'number', 'textarea'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') {
-        fields.push(f)
+        fields.push({...f, label: `${f.label}锛�${f.field}锛塦})
       }
     })
   } else {
     config.subcards[0].fields.forEach(f => {
       if (f.field && ['select', 'link', 'text', 'number', 'textarea'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') {
-        fields.push(f)
+        fields.push({...f, label: `${f.label}锛�${f.field}锛塦})
       }
     })
   }
diff --git a/src/menu/components/form/step-form/index.jsx b/src/menu/components/form/step-form/index.jsx
index dd5790b..eb48849 100644
--- a/src/menu/components/form/step-form/index.jsx
+++ b/src/menu/components/form/step-form/index.jsx
@@ -2,7 +2,7 @@
 import PropTypes from 'prop-types'
 import { is, fromJS } from 'immutable'
 import { Popover, Modal, Button, Switch, notification, message } from 'antd'
-import { PlusOutlined, SettingOutlined, EditOutlined, ToolOutlined, DeleteOutlined, SwapOutlined, FontColorsOutlined } from '@ant-design/icons'
+import { PlusOutlined, SettingOutlined, EditOutlined, ToolOutlined, DeleteOutlined, SwapOutlined, FontColorsOutlined, VerticalRightOutlined } from '@ant-design/icons'
 
 import asyncComponent from '@/utils/asyncComponent'
 import asyncIconComponent from '@/utils/asyncIconComponent'
@@ -614,6 +614,35 @@
     }
   }
 
+  toLower = () => {
+    let group = fromJS(this.state.group).toJS()
+    let card = fromJS(this.state.card).toJS()
+    let that = this
+
+    group.fields = group.fields.map(item => {
+      if (item.field) {
+        item.field = item.field.toLowerCase()
+      }
+      return item
+    })
+
+    card.subcards = card.subcards.map(item => {
+      if (item.uuid === group.uuid) {
+        return group
+      }
+      return item
+    })
+
+    confirm({
+      content: `纭畾灏嗗瓧娈佃浆涓哄皬鍐欏悧锛焋,
+      onOk() {
+        that.setState({group})
+        that.updateComponent(card)
+      },
+      onCancel() {}
+    })
+  }
+
   clickComponent = (e) => {
     if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') {
       e.stopPropagation()
@@ -677,6 +706,7 @@
             } trigger="hover">
               <SwapOutlined />
             </Popover> : null}
+            <VerticalRightOutlined style={{color: 'orange', transform: 'rotate(270deg)'}} title="瀛楁杞皬鍐�" onClick={this.toLower}/>
             <FormFork forms={group.fields}/>
             {/* <CopyOutlined title="澶嶅埗" onClick={this.triggerCopy} /> */}
             <Switch checkedChildren="寮�" unCheckedChildren="鍏�" defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} />
diff --git a/src/menu/components/form/tab-form/index.jsx b/src/menu/components/form/tab-form/index.jsx
index 1758d75..c7591d4 100644
--- a/src/menu/components/form/tab-form/index.jsx
+++ b/src/menu/components/form/tab-form/index.jsx
@@ -2,7 +2,7 @@
 import PropTypes from 'prop-types'
 import { is, fromJS } from 'immutable'
 import { Popover, Modal, Button, Switch, notification, message } from 'antd'
-import { PlusOutlined, SettingOutlined, EditOutlined, ToolOutlined, DeleteOutlined, SwapOutlined, FontColorsOutlined } from '@ant-design/icons'
+import { PlusOutlined, SettingOutlined, EditOutlined, ToolOutlined, DeleteOutlined, SwapOutlined, FontColorsOutlined, VerticalRightOutlined } from '@ant-design/icons'
 
 import asyncComponent from '@/utils/asyncComponent'
 import asyncIconComponent from '@/utils/asyncIconComponent'
@@ -616,6 +616,35 @@
     }
   }
 
+  toLower = () => {
+    let group = fromJS(this.state.group).toJS()
+    let card = fromJS(this.state.card).toJS()
+    let that = this
+
+    group.fields = group.fields.map(item => {
+      if (item.field) {
+        item.field = item.field.toLowerCase()
+      }
+      return item
+    })
+
+    card.subcards = card.subcards.map(item => {
+      if (item.uuid === group.uuid) {
+        return group
+      }
+      return item
+    })
+
+    confirm({
+      content: `纭畾灏嗗瓧娈佃浆涓哄皬鍐欏悧锛焋,
+      onOk() {
+        that.setState({group})
+        that.updateComponent(card)
+      },
+      onCancel() {}
+    })
+  }
+
   clickComponent = (e) => {
     if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') {
       e.stopPropagation()
@@ -680,6 +709,7 @@
             } trigger="hover">
               <SwapOutlined />
             </Popover> : null}
+            <VerticalRightOutlined style={{color: 'orange', transform: 'rotate(270deg)'}} title="瀛楁杞皬鍐�" onClick={this.toLower}/>
             <FormFork forms={group.fields}/>
             {/* <CopyOutlined title="澶嶅埗" onClick={this.triggerCopy} /> */}
             <Switch checkedChildren="寮�" unCheckedChildren="鍏�" defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} />
diff --git a/src/menu/debug/index.jsx b/src/menu/debug/index.jsx
index 12aa296..9708b3d 100644
--- a/src/menu/debug/index.jsx
+++ b/src/menu/debug/index.jsx
@@ -783,6 +783,11 @@
             writein: item.writein !== 'false',
             type: item.type
           }
+
+          if (item.type === 'linkMain' && item.verifyVal === 'true') {
+            _item.$verify = true
+            _item.label = item.label
+          }
     
           if (_item.type === 'datemonth') {
             _item.type = 'text'
@@ -832,6 +837,11 @@
             writein: item.writein !== 'false',
             type: item.type
           }
+
+          if (item.type === 'linkMain' && item.verifyVal === 'true') {
+            _item.$verify = true
+            _item.label = item.label
+          }
     
           if (_item.type === 'datemonth') {
             _item.type = 'text'
@@ -869,8 +879,20 @@
         key: 'mk_n_id'
       })
     }
+
+    let verifyValSql = ''
     // 鑾峰彇瀛楁閿�煎
     formdata && formdata.forEach(form => {
+      if (form.$verify) {
+        verifyValSql += `
+        if @${form.key}=${form.type === 'number' ? 0 : `''`}
+        begin
+          select @errorcode='E',@retmsg='${form.label}锛屽叧鑱斾富琛ㄥけ鏁�'
+          goto aaa
+        end
+        `
+      }
+
       let _key = form.key.toLowerCase()
       if (!_initvars.includes(_key)) {
         _initvars.push(_key)
@@ -1512,6 +1534,10 @@
     } else if (_backCustomScript) {
       _sql += _backCustomScript
     }
+
+    if (verifyValSql) {
+      _sql += verifyValSql
+    }
   
     if (btn.procMode === 'system') {
       _sql += `
diff --git a/src/menu/modalconfig/index.jsx b/src/menu/modalconfig/index.jsx
index 884b633..91f6f5c 100644
--- a/src/menu/modalconfig/index.jsx
+++ b/src/menu/modalconfig/index.jsx
@@ -4,7 +4,7 @@
 import { DndProvider } from 'react-dnd'
 import HTML5Backend from 'react-dnd-html5-backend'
 import { Button, Card, Modal, Collapse, Switch, message, Popover } from 'antd'
-import { SettingOutlined, CopyOutlined, SwapOutlined, DeleteOutlined } from '@ant-design/icons'
+import { SettingOutlined, CopyOutlined, SwapOutlined, DeleteOutlined, VerticalRightOutlined } from '@ant-design/icons'
 
 import { getModalForm } from '@/templates/zshare/formconfig'
 import SourceElement from '@/templates/modalconfig/dragelement/source'
@@ -334,6 +334,28 @@
     })
   }
 
+  toLower = () => {
+    let _config = fromJS(this.state.config).toJS()
+    let that = this
+
+    _config.fields = _config.fields.map(item => {
+      if (item.field) {
+        item.field = item.field.toLowerCase()
+      }
+      return item
+    })
+    
+    confirm({
+      content: `纭畾灏嗗瓧娈佃浆涓哄皬鍐欏悧锛焋,
+      onOk() {
+        that.setState({
+          config: _config
+        })
+      },
+      onCancel() {}
+    })
+  }
+
   triggerCopy = () => {
     const { config } = this.state
 
@@ -413,6 +435,7 @@
                     } trigger="hover">
                       <SwapOutlined />
                     </Popover>
+                    <VerticalRightOutlined style={{color: 'orange', transform: 'rotate(270deg)'}} title="瀛楁杞皬鍐�" onClick={this.toLower}/>
                     <FormFork forms={config.fields}/>
                     <CopyOutlined title="澶嶅埗" onClick={this.triggerCopy} />
                     <Switch checkedChildren="寮�" unCheckedChildren="鍏�" defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} />
diff --git a/src/mob/components/formdragelement/index.jsx b/src/mob/components/formdragelement/index.jsx
index e28f1f9..794fa72 100644
--- a/src/mob/components/formdragelement/index.jsx
+++ b/src/mob/components/formdragelement/index.jsx
@@ -97,7 +97,10 @@
       newcard.span = 24
       newcard.focus = true
 
-      if (item.subType === 'textarea') {
+      if (item.subType === 'linkMain') {
+        newcard.hidden = 'true'
+        newcard.verifyVal = 'true'
+      } else if (item.subType === 'textarea') {
         newcard.required = 'false'
       }
 
diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx
index a8eeee0..117d4f3 100644
--- a/src/tabviews/zshare/actionList/normalbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -846,7 +846,7 @@
 
       let val = form.value
       if (form.type === 'number' || form.type === 'rate') {
-        if (isNaN(val)) {
+        if (isNaN(val) || val === '') {
           val = 0
         }
       } else if (['date', 'datemonth'].includes(form.type)) {
@@ -1322,7 +1322,7 @@
         let val = form.value
   
         if (form.type === 'number' || form.type === 'rate') {
-          if (isNaN(val)) {
+          if (isNaN(val) || val === '') {
             val = 0
           }
           _initFormfields.push(`@${_key}=${val}`)
@@ -3986,6 +3986,10 @@
       let key = item.field.toLowerCase()
       let _readin = item.readin !== 'false'
 
+      if (item.type === 'linkMain' && item.verifyVal === 'true') {
+        _item.$verify = true
+        _item.label = item.label
+      }
       if (_item.type === 'date') { // 鏃堕棿鍏煎
         _item.precision = item.precision || 'day'
       } else if (_item.type === 'datetime') {
diff --git a/src/tabviews/zshare/actionList/printbutton/index.jsx b/src/tabviews/zshare/actionList/printbutton/index.jsx
index b0e6202..2414f0c 100644
--- a/src/tabviews/zshare/actionList/printbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/printbutton/index.jsx
@@ -1008,7 +1008,7 @@
 
         let val = form.value
         if (form.type === 'number' || form.type === 'rate') {
-          if (isNaN(val)) {
+          if (isNaN(val) || val === '') {
             val = 0
           }
         } else if (['date', 'datemonth'].includes(form.type)) {
@@ -1142,7 +1142,7 @@
 
       if (form.type === 'number' || form.type === 'rate') {
         let val = form.value
-        if (isNaN(val)) {
+        if (isNaN(val) || val === '') {
           val = 0
         }
         _initvars.push(`@${_key}=${val}`)
@@ -2282,6 +2282,10 @@
       let key = item.field.toLowerCase()
       let _readin = item.readin !== 'false'
 
+      if (item.type === 'linkMain' && item.verifyVal === 'true') {
+        _item.$verify = true
+        _item.label = item.label
+      }
       if (_item.type === 'date') { // 鏃堕棿鍏煎
         _item.precision = item.precision || 'day'
       } else if (_item.type === 'datetime') {
diff --git a/src/tabviews/zshare/mutilform/index.jsx b/src/tabviews/zshare/mutilform/index.jsx
index 00c1b69..339ea61 100644
--- a/src/tabviews/zshare/mutilform/index.jsx
+++ b/src/tabviews/zshare/mutilform/index.jsx
@@ -173,6 +173,7 @@
       } else if (item.type === 'linkMain') {
         readin = false
         item.readin = false
+        item.$verify = item.verifyVal === 'true'
       } else if (item.type === 'number') {
         item.decimal = item.decimal || 0
         item.fieldlength = item.decimal
@@ -1534,6 +1535,11 @@
             key: item.field,
             isconst: item.constant === 'true'
           }
+
+          if (item.$verify) {
+            _item.$verify = true
+            _item.label = item.label
+          }
     
           _item.value = record[item.field] !== undefined ? record[item.field] : ''
     
diff --git a/src/templates/modalconfig/dragelement/index.jsx b/src/templates/modalconfig/dragelement/index.jsx
index 830681c..a9ac1a0 100644
--- a/src/templates/modalconfig/dragelement/index.jsx
+++ b/src/templates/modalconfig/dragelement/index.jsx
@@ -98,6 +98,7 @@
 
       if (item.subType === 'linkMain') {
         newcard.hidden = 'true'
+        newcard.verifyVal = 'true'
       } else if (item.subType === 'textarea') {
         newcard.required = 'false'
       }
diff --git a/src/templates/modalconfig/settingform/index.jsx b/src/templates/modalconfig/settingform/index.jsx
index 9d141c3..b0ff9d0 100644
--- a/src/templates/modalconfig/settingform/index.jsx
+++ b/src/templates/modalconfig/settingform/index.jsx
@@ -161,7 +161,7 @@
                 >
                   {fields.map(option =>
                     <Select.Option id={option.uuid} title={option.label} key={option.uuid} value={option.field}>
-                      {option.label}
+                      {`${option.label}锛�${option.field}锛塦}
                     </Select.Option>
                   )}
                 </Select>
@@ -185,7 +185,7 @@
                 >
                   {fields.map(option =>
                     <Select.Option key={option.uuid} value={option.uuid}>
-                      {option.label}
+                      {`${option.label}锛�${option.field}锛塦}
                     </Select.Option>
                   )}
                 </Select>
diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx
index b494bb7..2dacf15 100644
--- a/src/templates/zshare/formconfig.jsx
+++ b/src/templates/zshare/formconfig.jsx
@@ -1947,6 +1947,20 @@
     },
     {
       type: 'radio',
+      key: 'verifyVal',
+      label: '绌哄�奸獙璇�',
+      tooltip: '鎸夐挳鎻愪氦鏃堕獙璇佸瓧娈靛�兼槸鍚︿负绌猴紙鎴栨暟鍊间负0锛夈��',
+      initVal: card.verifyVal || 'false',
+      options: [{
+        value: 'true',
+        text: '寮�鍚�'
+      }, {
+        value: 'false',
+        text: '鍏抽棴'
+      }]
+    },
+    {
+      type: 'radio',
       key: 'format',
       label: '鏍煎紡鍖�',
       tooltip: '浣跨敤鍗冨垎浣嶆椂锛屾暟鍊煎皢浠ュ崈鍒嗕綅鏍煎紡鏄剧ず锛屾彁浜ゆ椂涓哄師鏁板�笺��',
diff --git a/src/templates/zshare/modalform/index.jsx b/src/templates/zshare/modalform/index.jsx
index 8867247..a860265 100644
--- a/src/templates/zshare/modalform/index.jsx
+++ b/src/templates/zshare/modalform/index.jsx
@@ -43,7 +43,7 @@
   formula: ['label', 'type', 'marginTop', 'marginBottom', 'splitline', 'supField', 'span', 'labelwidth', 'formula', 'eval', 'postfix'],
   brafteditor: ['required', 'hidelabel', 'hidden', 'readin', 'fieldlength', 'readonly', 'span', 'labelwidth', 'tooltip', 'extra', 'encryption', 'marginTop', 'marginBottom', 'contHeidht'],
   funcvar: ['span', 'labelwidth', 'splitline', 'marginTop', 'marginBottom'],
-  linkMain: ['readonly', 'required', 'hidden','declare', 'span', 'labelwidth', 'tooltip', 'interception', 'extra', 'place', 'marginTop', 'marginBottom'],
+  linkMain: ['readonly', 'required', 'hidden','declare', 'span', 'labelwidth', 'tooltip', 'interception', 'extra', 'place', 'marginTop', 'marginBottom', 'verifyVal'],
   popSelect: ['initval', 'readonly', 'required', 'hidden', 'readin', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'place', 'enter', 'dataSource', 'columns', 'primaryKey', 'order', 'controlField', 'laypage', 'onload', 'searchKey', 'showField', 'popWidth'],
   vercode: ['label', 'field', 'type', 'blacklist', 'supField', 'readonly', 'required', 'hidden', 'span', 'labelwidth', 'tooltip', 'marginTop', 'marginBottom', 'placeholder', 'enter', 'smsId', 'phoneField', 'sendType']
 }
@@ -426,7 +426,9 @@
 
       if (value === 'linkMain') {
         this.record.hidden = 'true'
+        this.record.verifyVal = 'true'
         _fieldval.hidden = 'true'
+        _fieldval.verifyVal = 'true'
       }
       
       if (this.record.type === 'cascader' && value !== 'cascader') {
diff --git a/src/templates/zshare/verifycard/index.jsx b/src/templates/zshare/verifycard/index.jsx
index 7722bbb..6e72f84 100644
--- a/src/templates/zshare/verifycard/index.jsx
+++ b/src/templates/zshare/verifycard/index.jsx
@@ -746,6 +746,10 @@
         _f.writein = _f.writein !== 'false'
         _f.fieldlen = _f.fieldlength || 50
 
+        if (_f.type === 'linkMain' && _f.verifyVal === 'true') {
+          _f.$verify = true
+        }
+
         if (_f.type === 'datemonth') {
           _f.type = 'text'
         } else if (_f.type === 'number' || _f.type === 'rate') {
@@ -1034,8 +1038,19 @@
 
     formdata = formdata.length ? formdata : null
 
+    let verifyValSql = ''
     // 鑾峰彇瀛楁閿�煎
     formdata && formdata.forEach(form => {
+      if (form.$verify) {
+        verifyValSql += `
+        if @${form.field}=${form.type === 'number' ? 0 : `''`}
+        begin
+          select @errorcode='E',@retmsg='${form.label}锛屽叧鑱斾富琛ㄥけ鏁�'
+          goto aaa
+        end
+        `
+      }
+
       let _key = form.field.toLowerCase()
       if (!_initvars.includes(_key)) {
         _initvars.push(_key)
@@ -1698,6 +1713,10 @@
     } else if (_backCustomScript) {
       _sql += _backCustomScript
     }
+
+    if (verifyValSql) {
+      _sql += verifyValSql
+    }
   
     if (btn.procMode === 'system') {
       _sql += `
diff --git a/src/utils/utils-custom.js b/src/utils/utils-custom.js
index 61f660e..ea5e994 100644
--- a/src/utils/utils-custom.js
+++ b/src/utils/utils-custom.js
@@ -3533,6 +3533,11 @@
             isconst: item.constant === 'true'
           }
 
+          if (item.type === 'linkMain' && item.verifyVal === 'true') {
+            _item.$verify = true
+            _item.label = item.label
+          }
+
           if (_item.type === 'datemonth') {
             _item.type = 'text'
           } else if (_item.type === 'number' || _item.type === 'rate') {
@@ -3571,8 +3576,19 @@
       formdata.push(item)
     }
 
+    let verifyValSql = ''
     // 鑾峰彇瀛楁閿�煎
     formdata && formdata.forEach(form => {
+      if (form.$verify) {
+        verifyValSql += `
+        if @${form.key}=${form.type === 'number' ? 0 : `''`}
+        begin
+          select @errorcode='E',@retmsg='${form.label}锛屽叧鑱斾富琛ㄥけ鏁�'
+          goto aaa
+        end
+        `
+      }
+
       let _key = form.key.toLowerCase()
 
       if (!formkeys.includes(_key)) {
@@ -4281,6 +4297,10 @@
       _sql += _backCustomScript
     }
 
+    if (verifyValSql) {
+      _sql += verifyValSql
+    }
+
     if (verify.workFlow === 'true' && process) {
       if (verify.flowType === 'start') {
         _sql = _sql.replace(/@start_type@/ig, `'寮�濮�'`)
diff --git a/src/utils/utils.js b/src/utils/utils.js
index bc7e3d2..f19e5a3 100644
--- a/src/utils/utils.js
+++ b/src/utils/utils.js
@@ -1820,9 +1820,20 @@
   let _initFormfields = []
   let _initColfields = []
   let _declarefields = []
+  let verifyValSql = ''
 
   // 鑾峰彇瀛楁閿�煎
   formdata && formdata.forEach(form => {
+    if (form.$verify) {
+      verifyValSql += `
+      if @${form.key}=${form.type === 'number' ? 0 : `''`}
+      begin
+        select @errorcode='E',@retmsg='${form.label}锛屽叧鑱斾富琛ㄥけ鏁�'
+        goto aaa
+      end
+      `
+    }
+
     let _key = form.key.toLowerCase()
 
     if (!_initvars.includes(_key)) {
@@ -1830,7 +1841,7 @@
       let val = form.value
 
       if (form.type === 'number' || form.type === 'rate') {
-        if (isNaN(val)) {
+        if (isNaN(val) || val === '') {
           val = 0
         }
         _initFormfields.push(`@${_key}=${val}`)
@@ -2879,6 +2890,10 @@
     _sql += _backCustomScript
   }
 
+  if (verifyValSql) {
+    _sql += verifyValSql
+  }
+
   if (window.GLOB.breakpoint) {
     let start = new RegExp('\\/\\*\\$breakpoint_begin_' + window.GLOB.breakpoint + '@', 'ig')
     let end = new RegExp('@breakpoint_end_' + window.GLOB.breakpoint + '\\$\\*\\/', 'ig')

--
Gitblit v1.8.0