From da64ab0923bf8817fc8599a6e37b953ce38f64c8 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 27 八月 2023 18:37:36 +0800 Subject: [PATCH] 2023-08-27 --- src/menu/datasource/verifycard/settingform/index.jsx | 82 +++++++++++++++++++++++++++++++++++------ 1 files changed, 70 insertions(+), 12 deletions(-) diff --git a/src/menu/datasource/verifycard/settingform/index.jsx b/src/menu/datasource/verifycard/settingform/index.jsx index de02f21..3c256d0 100644 --- a/src/menu/datasource/verifycard/settingform/index.jsx +++ b/src/menu/datasource/verifycard/settingform/index.jsx @@ -27,16 +27,24 @@ modules: [], innerRules: [], innertip: '', + MenuType: '', ismain: false } UNSAFE_componentWillMount () { const { config, setting } = this.props - let modules = MenuUtils.getSupModules(window.GLOB.customMenu.components, config.uuid, window.GLOB.customMenu.interfaces) + let menu = window.GLOB.customMenu + let MenuType = '' + + if (menu.parentId === 'BillPrintTemp') { + MenuType = 'billPrint' + } + + let modules = MenuUtils.getSupModules(menu.components, config.uuid, menu.interfaces) let ismain = false - if (window.GLOB.customMenu.Template === 'BaseTable') { + if (menu.Template === 'BaseTable') { ismain = config.name === '涓昏〃' } @@ -82,7 +90,7 @@ } } - this.setState({modules, innerRules, innertip, setting: _setting, ismain}) + this.setState({modules, innerRules, innertip, setting: _setting, ismain, MenuType}) } handleConfirm = () => { @@ -95,6 +103,10 @@ if (['navbar', 'balcony', 'menubar', 'interface'].includes(config.type)) { values.onload = 'true' + } + + if (values.interType === 'system' && values.onload === 'false') { + values.sync = 'false' } // 鏁版嵁婧愬墠绔獙璇� @@ -127,6 +139,14 @@ notification.warning({ top: 92, message: '鏁版嵁婧愪腑锛屼笉鍙嚭鐜板瓧绗� -- 锛屾敞閲婅鐢� /*鍐呭*/', + duration: 5 + }) + reject() + return + } else if (/,,/ig.test(values.dataresource)) { + notification.warning({ + top: 92, + message: '鏁版嵁婧愪腑锛屼笉鍙嚭鐜拌繛缁殑鑻辨枃閫楀彿锛�,,锛�', duration: 5 }) reject() @@ -169,7 +189,7 @@ render() { const { columns, config } = this.props const { getFieldDecorator } = this.props.form - const { setting, modules, innerRules, innertip } = this.state + const { setting, modules, innerRules, innertip, MenuType } = this.state const formItemLayout = { labelCol: { @@ -337,7 +357,7 @@ </Col> : null} {setting.interType === 'system' ? <Col span={24} className="data-source" style={{paddingLeft: '7px'}}> <Form.Item labelCol={{xs: { span: 24 }, sm: { span: 2 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 22 }} } label={ - <Tooltip placement="topLeft" title={`浣跨敤绯荤粺鍑芥暟鏃讹紝闇�濉啓鏁版嵁婧愩�傛敞锛氭暟鎹潈闄愭浛鎹㈢ $@ -> /* 鎴� ''銆� @$ -> */ 鎴� ''锛涙煡璇㈡浛鎹㈢ $select@ -> /* 鎴� ''銆� @select$ -> */ 鎴� ''锛涚粺璁℃浛鎹㈢ $sum@ -> /* 鎴� ''銆� @sum$ -> */ 鎴� ''銆俙}> + <Tooltip placement="topLeft" title={`浣跨敤绯荤粺鍑芥暟鏃讹紝闇�濉啓鏁版嵁婧愩�傛敞锛氭暟鎹潈闄愭浛鎹㈢ $@ -> /* 鎴� ''銆� @$ -> */ 鎴� ''銆俙}> <QuestionCircleOutlined className="mk-form-tip" /> 鏁版嵁婧� </Tooltip> @@ -386,7 +406,12 @@ </Col> {/* 鏁扮粍鏁版嵁锛岄渶璁剧疆鎺掑簭瑙勫垯 */} {config.format === 'array' ? <Col span={8}> - <Form.Item label="榛樿鎺掑簭"> + <Form.Item label={ + <Tooltip placement="topLeft" title="濡傛灉鍦ㄨ嚜瀹氫箟鑴氭湰涓娇鐢ㄤ簡@pageSize@鎴朄orderBy@锛岃鍦ㄦ暟鎹簮涓崟鐙啓鎺掑簭璇彞銆�"> + <QuestionCircleOutlined className="mk-form-tip" /> + 榛樿鎺掑簭 + </Tooltip> + }> {getFieldDecorator('order', { initialValue: setting.order || 'ID desc', rules: [ @@ -409,7 +434,7 @@ </Radio.Group>)} </Form.Item> </Col> : null} - {!['navbar', 'balcony', 'menubar'].includes(config.type) && (!config.wrap || config.wrap.supType !== 'multi') ? <Col span={8}> + {!['navbar', 'balcony', 'menubar'].includes(config.type) && (!config.wrap || config.wrap.supType !== 'multi') && MenuType !== 'billPrint' ? <Col span={8}> <Form.Item label={ <Tooltip placement="topLeft" title={'璇ョ粍浠跺鏋滃彈鍏朵粬缁勪欢鎺у埗锛岃閫夐」鐩稿簲鐨勭粍浠讹紝娌℃湁鏃堕�夆�滄棤鈥濄��'}> <QuestionCircleOutlined className="mk-form-tip" /> @@ -459,10 +484,26 @@ })(<InputNumber min={1} max={500} precision={0} />)} </Form.Item> </Col> : null} - {/* 1銆佷笉鍒嗛〉涓斾笉瀛樺湪涓婄骇妯″潡 */} - {!['navbar', 'interface'].includes(config.type) && !['editable', 'basetable', 'dualdatacard'].includes(config.subtype) && (!config.pageable || (config.pageable && setting.laypage === 'false')) && (setting.supModule.length === 0 || setting.supModule[0] === 'empty') && setting.interType === 'system' ? <Col span={8}> + {setting.interType === 'inner' ? <Col span={8}> <Form.Item label={ - <Tooltip placement="topLeft" title={'鍒濆鍖栧姞杞芥椂锛屾槸鍚︿笌鍏朵粬缁勪欢涓�鍚屽姞杞芥暟鎹紝娉細浠呭湪浣跨敤绯荤粺鍑芥暟锛屼笖鍒濆鍖栧姞杞芥暟鎹椂鏈夋晥锛屽垎椤佃姹傛椂鏃犳晥銆�'}> + <Tooltip placement="topLeft" title="褰撻�夋嫨鈥滄槸鈥濇椂锛屽唴閮ㄥ嚱鏁扮殑浼犲弬浼氬鍔� username 涓� fullname銆�"> + <QuestionCircleOutlined className="mk-form-tip" /> + 璁板綍鐢ㄦ埛 + </Tooltip> + }> + {getFieldDecorator('recordUser', { + initialValue: setting.recordUser || 'false' + })( + <Radio.Group onChange={(e) => {this.onOptionChange(e.target.value, 'recordUser')}}> + <Radio value="false">鍚�</Radio> + <Radio value="true">鏄�</Radio> + </Radio.Group>)} + </Form.Item> + </Col> : null} + {/* 1銆佷笉鍒嗛〉涓斾笉瀛樺湪涓婄骇妯″潡 */} + {!['navbar', 'interface', 'calendar'].includes(config.type) && !['editable', 'basetable', 'dualdatacard'].includes(config.subtype) && (!config.pageable || (config.pageable && setting.laypage === 'false')) && (setting.supModule.length === 0 || setting.supModule[0] === 'empty') && setting.interType === 'system' && setting.onload !== 'false' ? <Col span={8}> + <Form.Item label={ + <Tooltip placement="topLeft" title={'鍒濆鍖栧姞杞芥椂锛屾槸鍚︿笌鍏朵粬缁勪欢涓�鍚屽姞杞芥暟鎹紝娉細濡傝彍鍗曟湭浣跨敤鍚庣缂撳瓨锛屽垯鏌ヨ璇彞澶т簬8000瀛楃鏃舵棤鏁堛��'}> <QuestionCircleOutlined className="mk-form-tip" /> 鍚屾鏌ヨ </Tooltip> @@ -516,14 +557,31 @@ {getFieldDecorator('onload', { initialValue: setting.onload || 'true' })( - <Radio.Group> + <Radio.Group onChange={(e) => {this.onOptionChange(e.target.value, 'onload')}}> <Radio value="true">鍔犺浇</Radio> <Radio value="false">涓嶅姞杞�</Radio> </Radio.Group> )} </Form.Item> </Col> : null} - {config.type === 'interface' ? <Col span={8}> + {config.type === 'interface' && ((setting.supModule && setting.supModule[0] === 'empty') || MenuType === 'billPrint') ? <Col span={8}> + <Form.Item label={ + <Tooltip placement="topLeft" title="鍒濆鍖栧姞杞藉皢鍦ㄩ〉闈㈠姞杞藉墠鎵ц銆�"> + <QuestionCircleOutlined className="mk-form-tip" /> + 鍔犺浇鏂瑰紡 + </Tooltip> + }> + {getFieldDecorator('loadlevel', { + initialValue: setting.loadlevel || 'default' + })( + <Radio.Group onChange={(e) => {this.onOptionChange(e.target.value, 'loadlevel')}}> + <Radio value="default">榛樿</Radio> + <Radio value="init">鍒濆鍖�</Radio> + </Radio.Group> + )} + </Form.Item> + </Col> : null} + {config.type === 'interface' && MenuType !== 'billPrint' ? <Col span={8}> <Form.Item label="瀹氭椂鍣�"> {getFieldDecorator('timer', { initialValue: setting.timer || '' -- Gitblit v1.8.0