From 66bdbc1df92e8ec4a5108a4e0323e25a7b9ff8f8 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 21 五月 2024 16:37:16 +0800 Subject: [PATCH] Merge branch 'develop' --- src/menu/components/module/invoice/verifycard/baseform/index.jsx | 83 ++++++++++++++++++++++++++++++++++++++--- 1 files changed, 77 insertions(+), 6 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..27cd4c6 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=""> @@ -81,9 +135,14 @@ </Form.Item> </Col> : null} */} {verify.type === 'billout' ? <Col span={24}> - <Form.Item label="娴嬭瘯鍦板潃"> + <Form.Item label={ + <Tooltip placement="bottomLeft" title="鎺ュ彛鍦板潃闇�閫氳繃nginx杞彂锛岄粯璁ゅ湴鍧�涓� /fcc/di/output/invoice/issue銆�"> + <QuestionCircleOutlined className="mk-form-tip" /> + 娴嬭瘯鍦板潃 + </Tooltip> + }> {getFieldDecorator('interface', { - initialValue: verify.interface || '', + initialValue: verify.interface || '/fcc/di/output/invoice/issue', rules: [ { required: true, message: '璇疯緭鍏ユ祴璇曞湴鍧�!' } ] @@ -95,12 +154,24 @@ {verify.type === 'billout' ? <Col span={24}> <Form.Item label="姝e紡鍦板潃"> {getFieldDecorator('proInterface', { - initialValue: verify.proInterface || '', + initialValue: verify.proInterface || '/fcc/di/output/invoice/issue', })( <TextArea rows={2}/> )} </Form.Item> </Col> : null} + {verify.type === 'billout' ? <Col span={8}> + <Form.Item label="鍥炶皟琛ㄥ悕"> + {getFieldDecorator('cbTable', { + initialValue: verify.cbTable || '', + rules: [ + { required: true, message: '璇疯緭鍏ヨ〃鍚�!' } + ] + })( + <Input autoComplete="off"/> + )} + </Form.Item> + </Col> : null} </Row> </Form> ) -- Gitblit v1.8.0