From f3d4db769ba9b51b799d981511a710fd443d0e08 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 21 四月 2025 12:18:03 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 src/templates/zshare/verifycard/billcodeform/index.jsx |   93 ++++++++++++++++++++++------------------------
 1 files changed, 44 insertions(+), 49 deletions(-)

diff --git a/src/templates/zshare/verifycard/billcodeform/index.jsx b/src/templates/zshare/verifycard/billcodeform/index.jsx
index b8363ba..bf5c929 100644
--- a/src/templates/zshare/verifycard/billcodeform/index.jsx
+++ b/src/templates/zshare/verifycard/billcodeform/index.jsx
@@ -1,21 +1,20 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
 import { is, fromJS } from 'immutable'
-import { Form, Row, Col, Select, Button, InputNumber, Input, Tooltip, Icon } from 'antd'
-import { formRule } from '@/utils/option.js'
-import './index.scss'
+import { Form, Row, Col, Select, Button, InputNumber, Input, Tooltip } from 'antd'
+import { QuestionCircleOutlined } from '@ant-design/icons'
 
+// import './index.scss'
 
-class UniqueForm extends Component {
+class BillCodeForm extends Component {
   static propTpyes = {
-    dict: PropTypes.object,         // 瀛楀吀椤�
-    btn: PropTypes.object,          // 鎸夐挳淇℃伅
-    fields: PropTypes.array,        // 琛ㄥ崟
-    billcodes: PropTypes.array,     // 琛ㄥ崟
-    columns: PropTypes.array,       // 琛ㄥ崟
-    modular: PropTypes.array,       // 琛ㄥ崟
-    modularDetail: PropTypes.array, // 琛ㄥ崟
-    orderChange: PropTypes.func     // 琛ㄥ崟
+    btn: PropTypes.object,
+    fields: PropTypes.array,
+    billcodes: PropTypes.array,
+    columns: PropTypes.array,
+    modular: PropTypes.array,
+    modularDetail: PropTypes.array,
+    orderChange: PropTypes.func
   }
 
   state = {
@@ -29,12 +28,7 @@
 
   UNSAFE_componentWillMount() {
     let _modularDetail = []
-    let _billFields = [{
-      field: 'BID',
-      label: 'BID',
-      type: 'text',
-      uuid: 'BID'
-    }]
+    let _billFields = []
 
     if (this.props.modular.length > 0) {
       _modularDetail = this.props.modularDetail.filter(item => item.BID === this.props.modular[0].ID)
@@ -97,6 +91,7 @@
       }, () => {
         this.props.form.setFieldsValue({
           field: record.field,
+          Type: record.Type || 4,
           TypeCharOne: record.TypeCharOne,
           ModularCode: record.ModularCode,
           ModularDetailCode: _modularDetailCode,
@@ -159,7 +154,7 @@
         values.fieldName = _funField ? _funField.label : ''
 
         // 涓�绾ц彍鍗曞�间负20190203125926873D6029A9C511041719420鏃禩ypeCharTwo=TableCode锛屽叾浠栫敤BillCode
-        if (values.ModularCode === '20190203125926873D6029A9C511041719420') {
+        if (values.ModularCode === '20190203125926873D6029A9C511041719420' || values.ModularCode === '01') {
           values.TypeCharTwo = 'TableCode'
         } else {
           values.TypeCharTwo = 'BillCode'
@@ -180,7 +175,7 @@
 
           // 璁剧疆娴佹按鍙蜂綅鏁�
           let _detail = this.state.modularDetail.filter(item => item.ModularDetailCode === values.ModularDetailCode)[0]
-          values.Type = _detail.Type
+          values.Type = values.Type || _detail.Type
         } else {
           let _billField = billFields.filter(item => item.field === values.linkField)[0]
           values.linkFieldName = _billField ? _billField.label : ''
@@ -222,23 +217,23 @@
     }
 
     return (
-      <Form {...formItemLayout} className="verify-form">
+      <Form {...formItemLayout} className="verify-form mk-fix-form-height">
         <Row gutter={24}>
           <Col span={7}>
-            <Form.Item label={this.props.dict['header.form.funcvar']}>
+            <Form.Item label="鍑芥暟鍙橀噺">
               {getFieldDecorator('field', {
                 initialValue: '',
                 rules: [
                   {
                     required: true,
-                    message: this.props.dict['form.required.input'] + this.props.dict['header.form.funcvar'] + '!'
+                    message: '璇烽�夋嫨鍑芥暟鍙橀噺!'
                   }
                 ]
               })(
                 <Select>
                   {this.state.funFields.map(option =>
-                    <Select.Option title={option.label} id={option.uuid} key={option.uuid} value={option.field}>
-                      {option.label}
+                    <Select.Option key={option.uuid} value={option.field}>
+                      {`${option.label}锛�${option.field}锛塦}
                     </Select.Option>
                   )}
                 </Select>
@@ -246,13 +241,13 @@
             </Form.Item>
           </Col>
           <Col span={7}>
-            <Form.Item label={'绫诲瀷'}>
+            <Form.Item label="绫诲瀷">
               {getFieldDecorator('TypeCharOne', {
                 initialValue: 'Lp',
                 rules: [
                   {
                     required: true,
-                    message: this.props.dict['form.required.select'] + '绫诲瀷!'
+                    message: '璇烽�夋嫨绫诲瀷!'
                   }
                 ]
               })(
@@ -266,20 +261,20 @@
             </Form.Item>
           </Col>
           {type === '1' ? <Col span={7}>
-            <Form.Item label={'鍏宠仈瀛楁'}>
+            <Form.Item label="鍏宠仈瀛楁">
               {getFieldDecorator('linkField', {
                 initialValue: '',
                 rules: [
                   {
                     required: true,
-                    message: this.props.dict['form.required.input'] + '鍏宠仈瀛楁!'
+                    message: '璇烽�夋嫨鍏宠仈瀛楁!'
                   }
                 ]
               })(
-                <Select>
+                <Select showSearch filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}>
                   {this.state.billFields.map(option =>
-                    <Select.Option title={option.label} id={option.uuid} key={option.uuid} value={option.field}>
-                      {option.label}
+                    <Select.Option key={option.uuid} value={option.field}>
+                      {`${option.label}锛�${option.field}锛塦}
                     </Select.Option>
                   )}
                 </Select>
@@ -287,13 +282,13 @@
             </Form.Item>
           </Col> : null}
           {type === '2' ? <Col span={7}>
-            <Form.Item label={'鍑瘉绫诲瀷'}>
+            <Form.Item label="鍑瘉绫诲瀷">
               {getFieldDecorator('ModularCode', {
                 initialValue: this.props.modular[0] ? this.props.modular[0].ID : '',
                 rules: [
                   {
                     required: true,
-                    message: this.props.dict['form.required.input'] + '鍑瘉绫诲瀷!'
+                    message: '璇烽�夋嫨鍑瘉绫诲瀷!'
                   }
                 ]
               })(
@@ -303,7 +298,7 @@
                   onChange={(value) => {this.voucherChange(value)}}
                 >
                   {this.props.modular.map(option =>
-                    <Select.Option title={option.NameNO} id={option.ID} key={option.ID} value={option.ID}>
+                    <Select.Option key={option.ID} value={option.ID}>
                       {option.NameNO}
                     </Select.Option>
                   )}
@@ -316,27 +311,27 @@
               淇濆瓨
             </Button>
           </Col>
-          {type === '1' ? <Col span={7}>
-            <Form.Item label={'浣嶆暟'}>
+          <Col span={7}>
+            <Form.Item label="浣嶆暟">
               {getFieldDecorator('Type', {
                 initialValue: 4,
                 rules: [
                   {
                     required: true,
-                    message: this.props.dict['form.required.input'] + '浣嶆暟!'
+                    message: '璇疯緭鍏ヤ綅鏁�!'
                   }
                 ]
-              })(<InputNumber min={1} max={10} precision={0} />)}
+              })(<InputNumber min={1} max={10} precision={0} onPressEnter={this.handleConfirm}/>)}
             </Form.Item>
-          </Col> : null}
+          </Col>
           {type === '2' ? <Col span={7}>
-            <Form.Item label={'鍑瘉鏍囪瘑'}>
+            <Form.Item label="鍑瘉鏍囪瘑">
               {getFieldDecorator('ModularDetailCode', {
                 initialValue: this.state.modularDetail[0] ? this.state.modularDetail[0].ModularDetailCode : '',
                 rules: [
                   {
                     required: true,
-                    message: this.props.dict['form.required.input'] + '鍑瘉鏍囪瘑!'
+                    message: '璇烽�夋嫨鍑瘉鏍囪瘑!'
                   }
                 ]
               })(
@@ -345,7 +340,7 @@
                   filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                 >
                   {this.state.modularDetail.map(option =>
-                    <Select.Option style={{whiteSpace: 'unset'}} title={option.CodeName} id={option.ModularDetailCode} key={option.ModularDetailCode} value={option.ModularDetailCode}>
+                    <Select.Option style={{whiteSpace: 'unset'}} key={option.ModularDetailCode} value={option.ModularDetailCode}>
                       {option.CodeName}
                     </Select.Option>
                   )}
@@ -356,8 +351,8 @@
           {TypeCharOne === 'Lp' ? <Col span={7}>
             <Form.Item label={
               <Tooltip placement="topLeft" title="璇ユ爣璇嗙敤浜庣敓鎴愯鍙疯鍒�">
-                <Icon type="question-circle" />
-                {'鏍囪瘑'}
+                <QuestionCircleOutlined className="mk-form-tip" />
+                鏍囪瘑
               </Tooltip>
             }>
               {getFieldDecorator('mark', {
@@ -365,14 +360,14 @@
                 rules: [
                   {
                     required: true,
-                    message: this.props.dict['form.required.input'] + '鏍囪瘑!'
+                    message: '璇疯緭鍏ユ爣璇�!'
                   },
                   {
                     pattern: /^[a-zA-Z0-9]*$/ig,
-                    message: formRule.input.letternummsg
+                    message: '璇疯緭鍏ユ暟瀛椼�佸瓧姣嶄互鍙奯'
                   }
                 ]
-              })(<Input placeholder="" autoComplete="off" />)}
+              })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleConfirm}/>)}
             </Form.Item>
           </Col> : null}
         </Row>
@@ -381,4 +376,4 @@
   }
 }
 
-export default Form.create()(UniqueForm)
\ No newline at end of file
+export default Form.create()(BillCodeForm)
\ No newline at end of file

--
Gitblit v1.8.0