From f6c788403ccd2a216d6ba793ed591379c9d02dc5 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 06 五月 2024 10:31:12 +0800 Subject: [PATCH] 2024-05-06 --- src/menu/components/module/invoice/verifycard/baseform/index.jsx | 69 +++++++++++++++++++++++++++++++++- 1 files changed, 66 insertions(+), 3 deletions(-) diff --git a/src/menu/components/module/invoice/verifycard/baseform/index.jsx b/src/menu/components/module/invoice/verifycard/baseform/index.jsx index e36d470..3074d39 100644 --- a/src/menu/components/module/invoice/verifycard/baseform/index.jsx +++ b/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> ) -- Gitblit v1.8.0