|
@@ -1,11 +1,12 @@
|
|
|
-import React,{Component} from 'react';
|
|
|
-import {Button, Form, Input, message, Select} from "antd";
|
|
|
+import React, { Component } from 'react';
|
|
|
+import { Button, Form, Input, message, Select } from "antd";
|
|
|
import $ from "jquery/src/ajax";
|
|
|
+import Cascaders from "../../../../common/cascaders"
|
|
|
|
|
|
-class FilterColumn extends Component{
|
|
|
+class FilterColumn extends Component {
|
|
|
constructor(props) {
|
|
|
super(props);
|
|
|
- this.state={
|
|
|
+ this.state = {
|
|
|
departmentArr: [],
|
|
|
}
|
|
|
this.handleReset = this.handleReset.bind(this);
|
|
@@ -13,21 +14,23 @@ class FilterColumn extends Component{
|
|
|
}
|
|
|
|
|
|
componentDidMount() {
|
|
|
- this.departmentList();
|
|
|
+ // this.departmentList();
|
|
|
}
|
|
|
|
|
|
- handleReset(){
|
|
|
+ handleReset() {
|
|
|
+ this.state.deps = undefined
|
|
|
+ this.Cascaders.empty();
|
|
|
this.props.form.resetFields();
|
|
|
this.props.onResetSearch && this.props.onResetSearch();
|
|
|
}
|
|
|
|
|
|
- handleSubmit(e){
|
|
|
+ handleSubmit(e) {
|
|
|
e.preventDefault();
|
|
|
this.props.form.validateFieldsAndScroll((err, values) => {
|
|
|
if (err) {
|
|
|
return;
|
|
|
}
|
|
|
- this.props.onSearch(values);
|
|
|
+ this.props.onSearch(Object.assign(values, { deps: this.state.deps }));
|
|
|
})
|
|
|
}
|
|
|
|
|
@@ -75,7 +78,7 @@ class FilterColumn extends Component{
|
|
|
initialValues={{
|
|
|
remember: true,
|
|
|
}}
|
|
|
- onSubmit={(e)=>{
|
|
|
+ onSubmit={(e) => {
|
|
|
this.handleSubmit(e)
|
|
|
}}
|
|
|
>
|
|
@@ -85,7 +88,7 @@ class FilterColumn extends Component{
|
|
|
{getFieldDecorator('contractNo', {
|
|
|
rules: [{ required: false, message: '' }],
|
|
|
})(
|
|
|
- <Input style={{ width: '200px' }} placeholder="请输入合同编号"/>
|
|
|
+ <Input style={{ width: '200px' }} placeholder="请输入合同编号" />
|
|
|
)}
|
|
|
</Form.Item>
|
|
|
<Form.Item
|
|
@@ -94,7 +97,7 @@ class FilterColumn extends Component{
|
|
|
{getFieldDecorator('orderNo', {
|
|
|
rules: [{ required: false, message: '' }],
|
|
|
})(
|
|
|
- <Input style={{ width: '200px' }} placeholder="请输入订单编号"/>
|
|
|
+ <Input style={{ width: '200px' }} placeholder="请输入订单编号" />
|
|
|
)}
|
|
|
</Form.Item>
|
|
|
<Form.Item
|
|
@@ -103,13 +106,26 @@ class FilterColumn extends Component{
|
|
|
{getFieldDecorator('userName', {
|
|
|
rules: [{ required: false, message: '' }],
|
|
|
})(
|
|
|
- <Input style={{ width: '200px' }} placeholder="请输入客户名称"/>
|
|
|
+ <Input style={{ width: '200px' }} placeholder="请输入客户名称" />
|
|
|
)}
|
|
|
</Form.Item>
|
|
|
<Form.Item
|
|
|
label="部门"
|
|
|
>
|
|
|
- {getFieldDecorator('depId', {
|
|
|
+ <Cascaders
|
|
|
+ ref={node => this.Cascaders = node}
|
|
|
+ placeholder="订单部门"
|
|
|
+ id="id"
|
|
|
+ name="name"
|
|
|
+ children="list"
|
|
|
+ height={32}
|
|
|
+ onSel={(e) => {
|
|
|
+ this.setState({
|
|
|
+ deps: JSON.stringify(e),
|
|
|
+ });
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ {/* {getFieldDecorator('depId', {
|
|
|
rules: [{ required: false, message: '' }],
|
|
|
})(
|
|
|
<Select placeholder="请选择部门" style={{
|
|
@@ -122,7 +138,7 @@ class FilterColumn extends Component{
|
|
|
})
|
|
|
}
|
|
|
</Select>
|
|
|
- )}
|
|
|
+ )} */}
|
|
|
|
|
|
</Form.Item>
|
|
|
<Form.Item
|
|
@@ -131,7 +147,7 @@ class FilterColumn extends Component{
|
|
|
{getFieldDecorator('aname', {
|
|
|
rules: [{ required: false, message: '' }],
|
|
|
})(
|
|
|
- <Input style={{ width: '200px' }} placeholder="请输入发起人"/>
|
|
|
+ <Input style={{ width: '200px' }} placeholder="请输入发起人" />
|
|
|
)}
|
|
|
</Form.Item>
|
|
|
<Form.Item
|
|
@@ -140,7 +156,7 @@ class FilterColumn extends Component{
|
|
|
{getFieldDecorator('financeName', {
|
|
|
rules: [{ required: false, message: '' }],
|
|
|
})(
|
|
|
- <Input style={{ width: '200px' }} placeholder="请输入财务名称"/>
|
|
|
+ <Input style={{ width: '200px' }} placeholder="请输入财务名称" />
|
|
|
)}
|
|
|
</Form.Item>
|
|
|
<Form.Item
|
|
@@ -149,7 +165,7 @@ class FilterColumn extends Component{
|
|
|
{getFieldDecorator('cname', {
|
|
|
rules: [{ required: false, message: '' }],
|
|
|
})(
|
|
|
- <Input style={{ width: '200px' }} placeholder="请输入分类名称"/>
|
|
|
+ <Input style={{ width: '200px' }} placeholder="请输入分类名称" />
|
|
|
)}
|
|
|
</Form.Item>
|
|
|
<Form.Item
|
|
@@ -158,7 +174,7 @@ class FilterColumn extends Component{
|
|
|
{getFieldDecorator('pname', {
|
|
|
rules: [{ required: false, message: '' }],
|
|
|
})(
|
|
|
- <Input style={{ width: '200px' }} placeholder="请输入项目名称"/>
|
|
|
+ <Input style={{ width: '200px' }} placeholder="请输入项目名称" />
|
|
|
)}
|
|
|
</Form.Item>
|
|
|
<Form.Item
|