king
2024-05-06 f6c788403ccd2a216d6ba793ed591379c9d02dc5
src/menu/components/module/invoice/verifycard/baseform/index.jsx
@@ -1,8 +1,9 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { Form, Row, Col, Input } from 'antd'
// import { QuestionCircleOutlined } from '@ant-design/icons'
import { Form, Row, Col, Input, Tooltip, Cascader } from 'antd'
import { QuestionCircleOutlined } from '@ant-design/icons'
import MenuUtils from '@/utils/utils-custom.js'
// import './index.scss'
const { TextArea } = Input
@@ -12,7 +13,31 @@
    onChange: PropTypes.func
  }
  state = {}
  state = {
    modules: [],
    menulist: [],
    appType: sessionStorage.getItem('appType')
  }
  UNSAFE_componentWillMount() {
    const { verify } = this.props
    let menu = window.GLOB.customMenu
    let modules = MenuUtils.getSubModules(menu.components, verify.parId, '', menu.interfaces || null)
    let menulist = sessionStorage.getItem('fstMenuList')
    if (menulist) {
      try {
        menulist = JSON.parse(menulist)
      } catch (e) {
        menulist = []
      }
    } else {
      menulist = []
    }
    this.setState({modules, menulist})
  }
  handleConfirm = () => {
    const { verify } = this.props
@@ -41,6 +66,7 @@
  render() {
    const { getFieldDecorator } = this.props.form
    const { verify } = this.props
    const { modules, menulist, appType } = this.state
    return (
      <Form className="base-form">
@@ -50,6 +76,34 @@
              <Input value={verify.label} disabled={true}/>
            </Form.Item>
          </Col>
          <Col span={8}>
            <Form.Item label={
              <Tooltip placement="bottomLeft" title="执行成功后需要刷新的组件。">
                <QuestionCircleOutlined className="mk-form-tip" />
                刷新组件
              </Tooltip>
            }>
              {getFieldDecorator('syncComponent', {
                initialValue: verify.syncComponent || []
              })(
                <Cascader allowClear={true} options={modules} expandTrigger="hover"/>
              )}
            </Form.Item>
          </Col>
          {!appType ? <Col span={8}>
            <Form.Item label={
              <Tooltip placement="bottomLeft" title="执行成功后需要刷新的菜单。">
                <QuestionCircleOutlined className="mk-form-tip" />
                刷新菜单
              </Tooltip>
            }>
              {getFieldDecorator('refreshTab', {
                initialValue: verify.refreshTab || []
              })(
                <Cascader allowClear={true} options={menulist} expandTrigger="hover"/>
              )}
            </Form.Item>
          </Col> : null}
          {/* <Col span={8}>
            <Form.Item label={
              <Tooltip placement="bottomLeft" title="">
@@ -101,6 +155,15 @@
              )}
            </Form.Item>
          </Col> : null}
          {verify.type === 'billout' ? <Col span={8}>
            <Form.Item label="回调表名">
              {getFieldDecorator('cbTable', {
                initialValue: verify.cbTable || ''
              })(
                <Input autoComplete="off"/>
              )}
            </Form.Item>
          </Col> : null}
        </Row>
      </Form>
    )