From ac1d52c46ff9019fcc93cf3d5e7ab17cf850824e Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 10 八月 2023 16:05:24 +0800
Subject: [PATCH] 2023-08-10

---
 src/templates/sharecomponent/actioncomponent/verifyexcelin/uniqueform/index.jsx |   67 ++++++++++++---------------------
 1 files changed, 24 insertions(+), 43 deletions(-)

diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelin/uniqueform/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelin/uniqueform/index.jsx
index 38ea99a..365f6b0 100644
--- a/src/templates/sharecomponent/actioncomponent/verifyexcelin/uniqueform/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/verifyexcelin/uniqueform/index.jsx
@@ -6,51 +6,29 @@
 
 class UniqueForm extends Component {
   static propTpyes = {
-    dict: PropTypes.object,       // 瀛楀吀椤�
     fields: PropTypes.array,      // 琛ㄥ崟瀛楁
     uniqueChange: PropTypes.func  // 淇敼鍑芥暟
   }
 
-  state = {
-    editItem: null // 缂栬緫鍏冪礌
-  }
-
-  edit = (record) => {
-    this.setState({
-      editItem: record
-    })
-
-    this.props.form.setFieldsValue({
-      field: record.field.split(','),
-      errorCode: record.errorCode,
-      verifyType: record.verifyType || 'physical'
-    })
-  }
-
-
   handleConfirm = () => {
     const { fields } = this.props
+    let change = {}
+
+    fields.forEach(col => {
+      change[col.Column] = col.Text
+    })
+
     // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭�
     this.props.form.validateFieldsAndScroll((err, values) => {
       if (!err) {
-        values.uuid = this.state.editItem ? this.state.editItem.uuid : ''
         values.fieldlabel = values.field.map(field => {
-          let item = fields.filter(cell => cell.Column === field)[0]
-          let label = ''
-          if (item) {
-            label = item.Text
-          }
-          return label
+          return change[field] || ''
         })
 
         values.fieldlabel = values.fieldlabel.join(',')
         values.field = values.field.join(',')
 
-        this.setState({
-          editItem: null
-        }, () => {
-          this.props.uniqueChange(values)
-        })
+        this.props.uniqueChange(values)
         this.props.form.setFieldsValue({
           field: [],
         })
@@ -76,20 +54,21 @@
     return (
       <Form {...formItemLayout} className="verify-form" id="verifycard1">
         <Row gutter={24}>
-          <Col span={8}>
-            <Form.Item label={'鍒楀悕'}>
+          <Col span={7}>
+            <Form.Item label="鍒楀悕">
               {getFieldDecorator('field', {
                 initialValue: [],
                 rules: [
                   {
                     required: true,
-                    message: this.props.dict['form.required.select'] + '鍒楀悕!'
+                    message: '璇烽�夋嫨鍒楀悕!'
                   }
                 ]
               })(
                 <Select
                   mode="multiple"
                 >
+                  <Select.Option key="bid" value="BID">BID</Select.Option>
                   {fields.map(item => (
                     <Select.Option key={item.uuid} value={item.Column}>{item.Text}</Select.Option>
                   ))}
@@ -97,14 +76,14 @@
               )}
             </Form.Item>
           </Col>
-          <Col span={6}>
-            <Form.Item label={'鎶ラ敊缂栫爜'}>
+          <Col span={7}>
+            <Form.Item label="鎶ラ敊缂栫爜">
               {getFieldDecorator('errorCode', {
                 initialValue: 'E',
                 rules: [
                   {
                     required: true,
-                    message: this.props.dict['form.required.select'] + '鎶ラ敊缂栫爜!'
+                    message: '璇烽�夋嫨鎶ラ敊缂栫爜!'
                   }
                 ]
               })(
@@ -117,27 +96,29 @@
               )}
             </Form.Item>
           </Col>
-          <Col span={6}>
-            <Form.Item label={'楠岃瘉绫诲瀷'}>
+          <Col span={7}>
+            <Form.Item label="楠岃瘉绫诲瀷">
               {getFieldDecorator('verifyType', {
                 initialValue: 'physical',
                 rules: [
                   {
                     required: true,
-                    message: this.props.dict['form.required.select'] + '楠岃瘉绫诲瀷!'
+                    message: '璇烽�夋嫨楠岃瘉绫诲瀷!'
                   }
                 ]
               })(
                 <Select>
-                  <Select.Option value="physical"> 鐗╃悊楠岃瘉 </Select.Option>
-                  <Select.Option value="logic"> 閫昏緫楠岃瘉 </Select.Option>
+                  <Select.Option value="physical"> 鐗╃悊楠岃瘉锛堝叏閲忛獙璇侊級 </Select.Option>
+                  <Select.Option value="logic"> 閫昏緫楠岃瘉锛堝叏閲忛獙璇侊級 </Select.Option>
+                  <Select.Option value="physical_temp"> 鐗╃悊楠岃瘉锛堜粎涓存椂琛級 </Select.Option>
+                  <Select.Option value="logic_temp"> 閫昏緫楠岃瘉锛堜粎涓存椂琛級  </Select.Option>
                 </Select>
               )}
             </Form.Item>
           </Col>
-          <Col span={4} className="add">
+          <Col span={3} className="add">
             <Button onClick={this.handleConfirm} className="mk-green">
-              淇濆瓨
+              娣诲姞
             </Button>
           </Col>
         </Row>

--
Gitblit v1.8.0