king
2020-03-26 a24beb36feaa46f39cbb26ce5277e84f91241ce8
src/tabviews/zshare/verifycard/tabcard/actionform/index.jsx
File was renamed from src/tabviews/zshare/verifycard/actionform/index.jsx
@@ -1,6 +1,6 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { Form, Row, Col, Select, Button, Input, Cascader } from 'antd'
import { Form, Row, Col, Button, Input, Cascader } from 'antd'
import './index.scss'
const shortkeycode = {
@@ -86,10 +86,6 @@
        shortcut: _shortcut
      }
      if (record.OpenType === 'funcbutton' && record.funcType === 'print') {
        item.printer = record.printer || ''
      }
      this.props.form.setFieldsValue(item)
    })
  }
@@ -105,11 +101,6 @@
        this.setState({
          editItem: null
        }, () => {
          this.props.form.setFieldsValue({
            shortcut: [],
            label: ''
          })
        })
      }
    })
@@ -129,11 +120,9 @@
      }
    }
    let hasprint = editItem && editItem.OpenType === 'funcbutton' && editItem.funcType === 'print'
    return (
      <Form {...formItemLayout} className="verify-form" id="verifycard1">
        <Row gutter={24}>
      <Form {...formItemLayout} className="verify-form">
        {editItem ? <Row gutter={24}>
          <Col span={10}>
            <Form.Item label={'名称'}>
              {getFieldDecorator('label', {
@@ -154,34 +143,18 @@
            </Form.Item>
          </Col>
          <Col span={4} className="add">
            <Form.Item label=" " colon={false} >
              <Button onClick={this.handleConfirm} type="primary" className="add-row">
                确定
              </Button>
            <Button onClick={this.handleConfirm} type="primary" className="add-row">
              确定
            </Button>
          </Col>
        </Row> : null}
        {!editItem ? <Row gutter={24} style={{height: '64px', paddingTop: '5px'}}>
          <Col span={24} className="print-tip">
            <Form.Item label={'提示'}>
              点击编辑图标可设置按钮对应的快捷键,注:快捷键设置重复时,会以排序在前的按钮为准。
            </Form.Item>
          </Col>
          {hasprint ?
            <Col span={10}>
              <Form.Item label={'打印机'}>
                {getFieldDecorator('printer', {
                  initialValue: '',
                  rules: [
                    {
                      required: true,
                      message: '请选择打印机!'
                    }
                  ]
                })(
                  <Select>
                    {editItem.printers && editItem.printers.map(option =>
                      <Select.Option id={option.value} title={option.text} key={option.value} value={option.value}>{option.text}</Select.Option>
                    )}
                  </Select>
                )}
              </Form.Item>
            </Col> : null
          }
        </Row>
        </Row> : null}
      </Form>
    )
  }