From 08cce3334a2dc81d690b518136b0aaea64e48b0b Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 14 六月 2023 09:55:50 +0800
Subject: [PATCH] 2023-06-14

---
 src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx |   82 ++++++++++++++++++++++++++++++++--------
 1 files changed, 65 insertions(+), 17 deletions(-)

diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx
index 249c732..a3460ed 100644
--- a/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx
@@ -19,6 +19,7 @@
 const { confirm } = Modal
 const { Paragraph } = Typography
 const EditTable = asyncComponent(() => import('@/templates/zshare/editTable'))
+const FullScripts = asyncComponent(() => import('@/templates/zshare/verifycard/fullScripts'))
 
 class VerifyCard extends Component {
   static propTpyes = {
@@ -122,7 +123,7 @@
       {
         title: '鎶ラ敊缂栫爜',
         dataIndex: 'errorCode',
-        width: '12%',
+        width: '10%',
         editable: true,
         inputType: 'select',
         options: [
@@ -135,13 +136,24 @@
       {
         title: '楠岃瘉绫诲瀷',
         dataIndex: 'verifyType',
-        width: '12%',
-        render: (text, record) => record.verifyType === 'logic' ? '閫昏緫楠岃瘉' : '鐗╃悊楠岃瘉',
+        width: '14%',
+        render: (text, record) => {
+          let names = {
+            physical: '鐗╃悊楠岃瘉锛堝叏閲忛獙璇侊級',
+            logic: '閫昏緫楠岃瘉锛堝叏閲忛獙璇侊級',
+            physical_temp: '鐗╃悊楠岃瘉锛堜粎涓存椂琛級',
+            logic_temp: '閫昏緫楠岃瘉锛堜粎涓存椂琛級',
+          }
+
+          return names[text] || '鐗╃悊楠岃瘉锛堝叏閲忛獙璇侊級'
+        },
         inputType: 'select',
         editable: true,
         options: [
-          { value: 'physical', text: '鐗╃悊楠岃瘉' },
-          { value: 'logic', text: '閫昏緫楠岃瘉' }
+          { value: 'physical', text: '鐗╃悊楠岃瘉锛堝叏閲忛獙璇侊級' },
+          { value: 'logic', text: '閫昏緫楠岃瘉锛堝叏閲忛獙璇侊級' },
+          { value: 'physical_temp', text: '鐗╃悊楠岃瘉锛堜粎涓存椂琛級' },
+          { value: 'logic_temp', text: '閫昏緫楠岃瘉锛堜粎涓存椂琛級' }
         ]
       },
       {
@@ -453,6 +465,7 @@
   changeColumns = (columns) => {
     const { verify } = this.state
 
+    let reset = false
     columns = columns.map(col => {
       col.type = col.type || 'Nvarchar(50)'
       if (col.type === 'text' || col.type === 'image') {
@@ -465,8 +478,14 @@
         col.limit = col.type.match(/\d+/) ? col.type.match(/\d+/)[0] : '20000'
       } else if (/^Decimal/ig.test(col.type)) {
         col.limit = col.type.match(/\d+/ig)[1]
+        if (col.required === 'false') {
+          reset = true
+        }
         col.required = 'true'
       } else if (/^int/ig.test(col.type)) {
+        if (col.required === 'false') {
+          reset = true
+        }
         col.required = 'true'
       } else {
         col.limit = ''
@@ -477,6 +496,10 @@
 
       return col
     })
+
+    if (reset) {
+      message.warning('鏁板�肩被鍨嬪潎涓哄繀濉��')
+    }
 
     this.setState({verify: {...verify, columns}}, () => {
       this.resetUniqueColumns()
@@ -833,6 +856,23 @@
               {verify.scripts.length ? <span className="count-tip">{verify.scripts.length}</span> : null}
             </span>
           } key="scripts" id="mk-exin-script">
+            <FullScripts
+              verify={verify}
+              getScriptsFullForm={() => this.scriptsFullForm}
+              getScriptsForm={() => this.scriptsForm}
+              handleStatus={this.handleStatus}
+              handleDelete={this.handleDelete}
+            >
+              <CustomScript
+                type="fullscreen"
+                btn={this.props.card}
+                usefulfields={verify.columns}
+                scripts={verify.scripts}
+                systemScripts={this.state.systemScripts}
+                scriptsChange={this.scriptsChange}
+                wrappedComponentRef={(inst) => this.scriptsFullForm = inst}
+              />
+            </FullScripts>
             <CustomScript
               btn={this.props.card}
               usefulfields={verify.columns}
@@ -847,7 +887,7 @@
             <Form {...formItemLayout}>
               <Row gutter={24}>
                 <Col offset={6} span={6}>
-                  <Form.Item label={'鎻愮ず缂栫爜'}>
+                  <Form.Item label="鎻愮ず缂栫爜">
                     <span className="errorval"> S </span>
                     <Button onClick={() => {this.showError('S')}} type="primary" size="small">
                       鏌ョ湅
@@ -855,14 +895,14 @@
                   </Form.Item>
                 </Col>
                 <Col span={8}>
-                  <Form.Item label={'鍋滅暀鏃堕棿'}>
+                  <Form.Item label="鍋滅暀鏃堕棿">
                     <InputNumber defaultValue={verify.stime || 2} min={1} max={10000} precision={0} onChange={(val) => {this.timeChange(val, 'stime')}} />
                   </Form.Item>
                 </Col>
               </Row>
               <Row gutter={24}>
                 <Col offset={6} span={6}>
-                  <Form.Item label={'鎻愮ず缂栫爜'}>
+                  <Form.Item label="鎻愮ず缂栫爜">
                     <span className="errorval"> Y </span>
                     <Button onClick={() => {this.showError('Y')}} type="primary" size="small">
                       鏌ョ湅
@@ -872,7 +912,15 @@
               </Row>
               <Row gutter={24}>
                 <Col offset={6} span={6}>
-                  <Form.Item label={'鎻愮ず缂栫爜'}>
+                  <Form.Item label="鎻愮ず缂栫爜">
+                    <span className="errorval"> -1 </span>
+                    鎵ц鎴愬姛鏃犳彁绀恒��
+                  </Form.Item>
+                </Col>
+              </Row>
+              <Row gutter={24}>
+                <Col offset={6} span={6}>
+                  <Form.Item label="鎻愮ず缂栫爜">
                     <span className="errorval"> N </span>
                     <Button onClick={() => {this.showError('N')}} type="primary" size="small">
                       鏌ョ湅
@@ -880,14 +928,14 @@
                   </Form.Item>
                 </Col>
                 <Col span={8}>
-                  <Form.Item label={'鍋滅暀鏃堕棿'}>
+                  <Form.Item label="鍋滅暀鏃堕棿">
                     <InputNumber defaultValue={verify.ntime || 10} min={1} max={10000} precision={0} onChange={(val) => {this.timeChange(val, 'ntime')}} />
                   </Form.Item>
                 </Col>
               </Row>
               <Row gutter={24}>
                 <Col offset={6} span={6}>
-                  <Form.Item label={'鎻愮ず缂栫爜'}>
+                  <Form.Item label="鎻愮ず缂栫爜">
                     <span className="errorval"> F </span>
                     <Button onClick={() => {this.showError('F')}} type="primary" size="small">
                       鏌ョ湅
@@ -895,14 +943,14 @@
                   </Form.Item>
                 </Col>
                 <Col span={8}>
-                  <Form.Item label={'鍋滅暀鏃堕棿'}>
+                  <Form.Item label="鍋滅暀鏃堕棿">
                     <InputNumber defaultValue={verify.ftime || 10} min={1} max={10000} precision={0} onChange={(val) => {this.timeChange(val, 'ftime')}} />
                   </Form.Item>
                 </Col>
               </Row>
               <Row gutter={24}>
                 <Col offset={6} span={6}>
-                  <Form.Item label={'鎻愮ず缂栫爜'}>
+                  <Form.Item label="鎻愮ず缂栫爜">
                     <span className="errorval"> E </span>
                     <Button onClick={() => {this.showError('E')}} type="primary" size="small">
                       鏌ョ湅
@@ -912,7 +960,7 @@
               </Row>
               <Row gutter={24}>
                 <Col offset={6} span={6}>
-                  <Form.Item label={'鎻愮ず缂栫爜'}>
+                  <Form.Item label="鎻愮ず缂栫爜">
                     <span className="errorval"> NM </span>
                     <Button onClick={() => {this.showError('NM')}} type="primary" size="small">
                       鏌ョ湅
@@ -922,9 +970,9 @@
               </Row>
               <Row gutter={24}>
                 <Col offset={6} span={6}>
-                  <Form.Item label={'鎻愮ず缂栫爜'}>
-                    <span className="errorval"> -1 </span>
-                    涓嶆彁绀�
+                  <Form.Item label="鎻愮ず缂栫爜">
+                    <span className="errorval"> -2 </span>
+                    鎵ц澶辫触鏃犳彁绀�
                   </Form.Item>
                 </Col>
               </Row>

--
Gitblit v1.8.0