29 lines
1.1 KiB
JavaScript
29 lines
1.1 KiB
JavaScript
import React from 'react'
|
|
import { getCustomSearchs, getSearchs } from '../../../util';
|
|
import { Modal } from 'antd'
|
|
import { observable, action, toJS } from 'mobx';
|
|
import { inject, observer } from 'mobx-react';
|
|
import CustomForm from '../../../components/customForm'
|
|
|
|
@inject('programmeStore')
|
|
@observer
|
|
export default class CustomNewModal extends React.Component {
|
|
constructor(props) {
|
|
super(props)
|
|
}
|
|
|
|
handleOK() {
|
|
const { programmeStore: {createSICategory, setCustomRequest, customRequest}} = this.props;
|
|
createSICategory(customRequest)
|
|
}
|
|
|
|
render() {
|
|
const { programmeStore: {customRequest}} = this.props;
|
|
return (
|
|
<Modal visible={this.props.visible} onCancel={() => {this.props.onCancel()}} title="新建自定义福利" onOk={() => {this.handleOK()}}>
|
|
{/* {getCustomSearchs(this.props.form, toJS(this.props.condition), 1)} */}
|
|
<CustomForm condition={this.props.condition} request={customRequest} onChange={(value) => {setCustomRequest(value)}}/>
|
|
</Modal>
|
|
)
|
|
}
|
|
} |