dev01 лет назад: 2
Родитель
Сommit
0ec8df8fe7

+ 1 - 1
js/component/manageCenter/financialManage/distribute/projectvip.jsx

@@ -284,7 +284,7 @@ const ProjectVip = React.createClass({
 
   componentWillMount() {
     this.loadData();
-    this.departmentList();
+    // this.departmentList();
   },
   // 获取订单部门
   departmentList() {

+ 19 - 3
js/component/manageCenter/financialManage/distribute/projectvipall.jsx

@@ -11,6 +11,7 @@ import ShowModalDiv from "@/showModal.jsx";
 import VipLogs from "../../../common/logPopup/viplogs";
 import { splitUrl } from "@/tools";
 import ImgList from "../../../common/imgList";
+import Cascaders from "../../../common/cascaders";
 const { TabPane } = Tabs;
 
 
@@ -280,7 +281,7 @@ const ProjectVipAll = React.createClass({
 
   componentWillMount() {
     this.loadData();
-    this.departmentList();
+    // this.departmentList();
   },
   // 获取订单部门
   departmentList() {
@@ -395,6 +396,7 @@ const ProjectVipAll = React.createClass({
     this.setState({
       searchValues: JSON.parse(JSON.stringify({})),
     }, () => {
+      this.Cascaders.empty();
       this.loadData();
     })
   },
@@ -581,7 +583,21 @@ const ProjectVipAll = React.createClass({
                   });
                 }}
               />
-              <Select
+              <Cascaders
+                ref={node => this.Cascaders = node}
+                placeholder="订单部门"
+                id="id"
+                name="name"
+                children="list"
+                height={28}
+                onSel={(e) => {
+                  searchValues["deps"] = JSON.stringify(e);
+                  this.setState({
+                    searchValues: searchValues,
+                  });
+                }}
+              />
+              {/* <Select
                 placeholder="订单部门"
                 style={{ width: 190, marginRight: 10 }}
                 value={searchValues["depId"]
@@ -599,7 +615,7 @@ const ProjectVipAll = React.createClass({
                     <Select.Option key={item.id}>{item.name}</Select.Option>
                   );
                 })}
-              </Select>
+              </Select> */}
               <Input
                 placeholder="合同编号"
                 value={searchValues["contractNo"]

+ 2 - 0
js/component/manageCenter/financialManage/distribute/shouKuanAll.jsx

@@ -42,6 +42,8 @@ import { getProjectName, getClockState } from "@/tools";
 import LogPopup from "../../../common/logPopup";
 import { clockState, salesList } from "@/dataDic";
 import OrderItemStatus from "../../../common/orderItemStatus";
+import Cascaders from "../../../common/cascaders";
+
 const FormItem = Form.Item;
 const { TabPane } = Tabs;
 

+ 19 - 3
js/component/manageCenter/order/orderNew/approvedvipproject.jsx

@@ -11,6 +11,7 @@ import ShowModalDiv from "@/showModal.jsx";
 import VipLogs from "../../../common/logPopup/viplogs";//会员日志
 import { splitUrl } from "@/tools";
 import ImgList from "../../../common/imgList";
+import Cascaders from "../../../common/cascaders";
 const { TabPane } = Tabs;
 
 //总裁特批会员项目
@@ -281,7 +282,7 @@ const ApprovedVipProject = React.createClass({
 
   componentWillMount() {
     this.loadData();
-    this.departmentList();
+    // this.departmentList();
   },
   // 获取订单部门
   departmentList() {
@@ -396,6 +397,7 @@ const ApprovedVipProject = React.createClass({
     this.setState({
       searchValues: JSON.parse(JSON.stringify({})),
     }, () => {
+      this.Cascaders.empty();
       this.loadData();
     })
   },
@@ -627,7 +629,21 @@ const ApprovedVipProject = React.createClass({
                   });
                 }}
               />
-              <Select
+              <Cascaders
+                ref={node => this.Cascaders = node}
+                placeholder="订单部门"
+                id="id"
+                name="name"
+                children="list"
+                height={28}
+                onSel={(e) => {
+                  searchValues["deps"] = JSON.stringify(e);
+                  this.setState({
+                    searchValues: searchValues,
+                  });
+                }}
+              />
+              {/* <Select
                 placeholder="订单部门"
                 style={{ width: 190, marginRight: 10 }}
                 value={searchValues["depId"]
@@ -645,7 +661,7 @@ const ApprovedVipProject = React.createClass({
                     <Select.Option key={item.id}>{item.name}</Select.Option>
                   );
                 })}
-              </Select>
+              </Select> */}
               <Input
                 placeholder="合同编号"
                 value={searchValues["contractNo"]

+ 34 - 18
js/component/manageCenter/order/orderNew/glCostAuditList/filterColumn.js

@@ -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

+ 1 - 1
js/component/manageCenter/order/orderNew/myprojectvip.jsx

@@ -295,7 +295,7 @@ const MyProjectVip = React.createClass({
 
   componentWillMount() {
     this.loadData();
-    this.departmentList();
+    // this.departmentList();
   },
   // 关闭编辑弹窗
   vipClose() {

+ 35 - 18
js/component/manageCenter/project/task/payApplyReject/filterColumn.js

@@ -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,27 @@ 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 +139,7 @@ class FilterColumn extends Component{
                                     })
                                 }
                             </Select>
-                        )}
+                        )} */}
 
                     </Form.Item>
                     <Form.Item
@@ -131,7 +148,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 +157,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 +166,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 +175,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*/}