Browse Source

代码全部合并(会员,部分部门)2022-07-18 10:34:30

dev01 3 years ago
parent
commit
fb26110184
51 changed files with 2923 additions and 2015 deletions
  1. 112 60
      js/component/common/cascaders/index.jsx
  2. 25 10
      js/component/common/cascaders/index.less
  3. 24 2
      js/component/common/tabelContent/index.jsx
  4. 21 5
      js/component/manageCenter/customer/NEW/crm/patentPayment.jsx
  5. 117 106
      js/component/manageCenter/customer/managementFollow/followUpSummary/index.jsx
  6. 2 2
      js/component/manageCenter/customer/operationalData/interviewStatistics/detailedList.jsx
  7. 4 4
      js/component/manageCenter/customer/operationalData/receivablesStatistics/detailedList.jsx
  8. 2 2
      js/component/manageCenter/customer/operationalData/reexamine/detailedList.jsx
  9. 2 2
      js/component/manageCenter/customer/operationalData/signatureStatistics/detailedList.jsx
  10. 46 30
      js/component/manageCenter/customerService/administration/order.jsx
  11. 32 17
      js/component/manageCenter/financialManage/bonus/yxBonus.jsx
  12. 51 7
      js/component/manageCenter/financialManage/distribute/approvedOutsourcing.jsx
  13. 51 7
      js/component/manageCenter/financialManage/distribute/approvedOutsourcingAll.jsx
  14. 34 23
      js/component/manageCenter/financialManage/distribute/huiKuan.jsx
  15. 20 4
      js/component/manageCenter/financialManage/distribute/invoiceApplyList.jsx
  16. 35 20
      js/component/manageCenter/financialManage/distribute/invoiceApplyListQuery.jsx
  17. 26 11
      js/component/manageCenter/financialManage/distribute/invoiceApplyListWai.jsx
  18. 40 25
      js/component/manageCenter/financialManage/distribute/outInvoiceQuery.jsx
  19. 18 2
      js/component/manageCenter/financialManage/distribute/projectvip.jsx
  20. 60 11
      js/component/manageCenter/financialManage/distribute/shouKuanAll.jsx
  21. 79 19
      js/component/manageCenter/financialManage/distribute/shouKuang.jsx
  22. 20 6
      js/component/manageCenter/financialManage/flowWater/myWater.jsx
  23. 1 12
      js/component/manageCenter/index/content.jsx
  24. 2 2
      js/component/manageCenter/legalAffairs/collectioning/index.jsx
  25. 2 2
      js/component/manageCenter/legalAffairs/completedLegalAffairs/index.jsx
  26. 2 2
      js/component/manageCenter/legalAffairs/delayLegalAffairs/index.jsx
  27. 14 4
      js/component/manageCenter/order/orderNew/addService.jsx
  28. 149 95
      js/component/manageCenter/order/orderNew/approveds.jsx
  29. 102 84
      js/component/manageCenter/order/orderNew/arrearsList.jsx
  30. 25 10
      js/component/manageCenter/order/orderNew/billing.jsx
  31. 18 25
      js/component/manageCenter/order/orderNew/changeComponent/searchInput.js
  32. 74 62
      js/component/manageCenter/order/orderNew/contractCwjl.js
  33. 68 46
      js/component/manageCenter/order/orderNew/contractCwzj.js
  34. 65 53
      js/component/manageCenter/order/orderNew/contractCwzy.js
  35. 81 59
      js/component/manageCenter/order/orderNew/contractJsjl.js
  36. 78 55
      js/component/manageCenter/order/orderNew/contractJsy.js
  37. 87 64
      js/component/manageCenter/order/orderNew/contractJszj.js
  38. 34 11
      js/component/manageCenter/order/orderNew/contractYxgly.js
  39. 164 140
      js/component/manageCenter/order/orderNew/contractYxy.js
  40. 41 23
      js/component/manageCenter/order/orderNew/costAuditList/filterColumn.js
  41. 24 8
      js/component/manageCenter/order/orderNew/inquiry.jsx
  42. 18 2
      js/component/manageCenter/order/orderNew/myprojectvip.jsx
  43. 429 414
      js/component/manageCenter/order/orderNew/press.jsx
  44. 61 47
      js/component/manageCenter/order/orderNew/pressList.jsx
  45. 14 9
      js/component/manageCenter/order/pressMoney/index.jsx
  46. 19 5
      js/component/manageCenter/order/source/index.jsx
  47. 339 279
      js/component/manageCenter/project/patent/list.jsx
  48. 20 4
      js/component/manageCenter/project/project/projectAssignment.jsx
  49. 21 4
      js/component/manageCenter/project/project/projectQuery.jsx
  50. 129 113
      js/component/manageCenter/project/project/zxsglyOutSourcingPaiDan.jsx
  51. 21 6
      js/component/manageCenter/project/task/businessManagement/index.jsx

+ 112 - 60
js/component/common/cascaders/index.jsx

@@ -3,13 +3,14 @@ import { Button, message, Modal, Spin, Table, Checkbox, Collapse, } from "antd";
 import $ from "jquery/src/ajax";
 import "./index.less";
 
+//选择部门组件  2022-07-12
 class Cascaders extends Component {
   constructor(props) {
     super(props);
     this.state = {
-      visible: false,
-      authTree: [],
-      checkedList: [],
+      visible: false,//弹窗开关
+      authTree: [],//列表显示数据
+      checkedList: [],//选中数据
     };
     this.itemHandle = this.itemHandle.bind(this);
     this.onSelect = this.onSelect.bind(this);
@@ -17,7 +18,6 @@ class Cascaders extends Component {
     this.onCancel = this.onCancel.bind(this);
   }
 
-
   componentDidMount() {
     // 后端返回的数据,转成前端要用的数据保存页面使用
     // const authTree = [...params.authTree];
@@ -32,23 +32,57 @@ class Cascaders extends Component {
       this.itemHandle(item);
     });
   }
+  // 获取部门数据
+  selectSuperId() {
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      url: globalConfig.context + "/api/admin/organization/getAllDep",
+      data: {},
+      success: function (data) {
+        let theArr = [];
+        if (data.error && data.error.length === 0) {
+          localStorage.setItem("departmentData", JSON.stringify(data.data));
+          this.setState({
+            visible: true,
+            authTree: data.data || []
+          }, () => {
+            this.authTreeFun();
+          })
+        } else {
+          // message.warning(data.error[0].message);
+        }
+      }.bind(this),
+    }).always(
+
+    );
+  }
   // 点击选择部门
   onSelect() {
-    const list = JSON.parse(localStorage.getItem("departmentData"))
+    // 缓存的后端返回数据,转成前端要用的数据保存页面使用 
+    const list = JSON.parse(localStorage.getItem("departmentData")) || []
     const authTree = list
-    this.setState({
-      visible: true,
-      authTree: authTree,
-    }, () => {
-      this.authTreeFun();
-    })
+    if (authTree.length > 0) {
+      this.setState({
+        visible: !this.state.visible,
+        authTree: authTree,
+      }, () => {
+        this.authTreeFun();
+      })
+    } else {
+      //若缓存清理则重新请求接口拿
+      this.selectSuperId()
+    }
   }
-
+  // 确定
   onOks() {
-    const { authTree, checkedList } = this.state
+    const { authTree } = this.state
     const { id = "id", children = "children", onSel } = this.props
     let list = []
     authTree.forEach((its) => {
+      if (its.checked) {
+        list.push(its[id])
+      }
       if (its[children]) {
         its[children].forEach((itl) => {
           if (itl.checked) {
@@ -57,24 +91,26 @@ class Cascaders extends Component {
         });
       }
     })
+    if (list.length === 0) {
+      message.warn("还没有选择的部门")
+      return
+    }
     this.setState({
       checkedList: list,
       visible: false,
     })
-    onSel(checkedList)
+    onSel(list)
   }
-
+  // 取消
   onCancel() {
     this.setState({
       visible: false,
     })
   }
-
-  // 代码三级联动核心就在这里
+  // 代码二级联动
   itemHandle(iD, checked = true) {
     const { id = "id", children = "children" } = this.props
     const { authTree } = this.state
-    // const authTree = [...this.state.authTree];
     authTree.forEach((item1) => {
       if (item1[id] == iD) {
         item1.checked = checked;
@@ -84,24 +120,34 @@ class Cascaders extends Component {
           });
         }
       } else {
-        // 反向思路: 保存子选项框的个数, 子选项选中就-1, 等于0说明都选中了, 父选项就勾上
-        let temp1 = !!item1[children] ? item1[children].length : 0;
-        !!item1[children] && item1[children].forEach((item2) => {
-          if (item2[id] == iD) {
-            item2.checked = checked;
-          }
-          //  选中-1, 未选中不动
-          item2.checked ? temp1 -= 1 : temp1;
-        });
-        //  长度是0, 父选项框就勾选
-        !!item1[children] && temp1 === 0 ? item1.checked = true : item1.checked = false;
+        if (!!item1[children]) {
+          // 反向思路: 保存子选项框的个数, 子选项选中就-1, 等于0说明都选中了, 父选项就勾上
+          let temp1 = item1[children].length;
+          item1[children].forEach((item2) => {
+            if (item2[id] == iD) {
+              item2.checked = checked;
+            }
+            //  选中-1, 未选中不动
+            item2.checked ? temp1 -= 1 : temp1;
+          });
+          //  长度是0, 父选项框就勾选
+          temp1 === 0 ? item1.checked = true : item1.checked = false;
+        } else {
+
+        }
       }
     });
     this.setState({
       authTree,
     });
   }
-
+  // 清空  现用于重置
+  empty() {
+    this.setState({
+      visible: false,
+      checkedList: []
+    })
+  }
 
   render() {
     const { Panel } = Collapse;
@@ -110,21 +156,22 @@ class Cascaders extends Component {
       placeholder = "选择部门",
       width = 200,
       height = 32,
-      id = "id",
-      name = "name",
-      children = "children",
+      id = "id",//接口需要的字段名
+      name = "name",//显示内容字段名
+      children = "children",//二级列表字段名
     } = this.props
     const authTreeMap = authTree.map((item1) => (
       // Panel是手风琴
       <Panel
         key={item1[id]}
         header={(
-          <div className="item" onClick={(e) => { e.stopPropagation(); }}>
+          <div className="item">
             {/* 一级复选框(向下操控二级三级) */}
             <Checkbox
               name={item1[id]}
               checked={item1.checked}
               onClick={(e) => {
+                e.stopPropagation();
                 this.itemHandle(e.target.name, e.target.checked);
               }}
             >
@@ -144,46 +191,51 @@ class Cascaders extends Component {
               }}
             >
             </Checkbox>
-            <div className="iname">{item2[name]}</div>
+            <div className="iname" style={{ width: "90%" }}>{item2[name]}</div>
           </div>
         ))}
       </Panel>
     ));
     return (
-      <div className="cascaders">
+      <div className="cascaders"
+        // tabIndex={0}
+        // onBlur={(e) => {
+        //   this.setState({
+        //     visible: false
+        //   })
+        // }}
+      >
         <div
           className="cinput"
           style={{
             height: height,
             width: width,
-            color: checkedList.length > 0 ? "rgba(0, 0, 0, 0.65)" : "rgba(191, 191, 191, 1)"
+            color: checkedList.length > 0
+              ? "rgba(0, 0, 0, 0.65)"
+              : "rgba(191, 191, 191, 1)"
           }}
           onClick={this.onSelect}
-        >{checkedList.length > 0 ? `已选择${checkedList.length}个部门` : placeholder}
+        >
+          <div className="ctext">
+            {checkedList.length > 0 ? `已选择${checkedList.length}项` : placeholder}
+          </div>
         </div>
-        {
-          visible &&
-          <div
-            className="cpop"
-            style={{
-              width: width,
-            }}
-          >
-            <div className="clist">
-              <Collapse expandIconPosition="right">
-                {authTreeMap}
-              </Collapse>
-            </div>
-            <div className="cboot">
-              <Button
-                type="primary"
-                style={{ marginLeft: 10 }}
-                onClick={this.onOks}
-              >确定</Button>
-              <Button onClick={this.onCancel}>取消</Button>
+        <div data-reactroot>
+          {
+            visible &&
+            <div className="cpop" style={{ width: 260, }}>
+              <div className="clist">
+                <Collapse expandIconPosition="right">
+                  {authTreeMap}
+                </Collapse>
+              </div>
+              <div className="cboot">
+                <Button type="primary" style={{ marginLeft: 10 }} onClick={this.onOks}>确定</Button>
+                <Button onClick={this.onCancel}>取消</Button>
+              </div>
             </div>
-          </div>
-        }
+          }
+        </div>
       </div>
     );
   }

+ 25 - 10
js/component/common/cascaders/index.less

@@ -1,32 +1,47 @@
 .cascaders {
+  box-sizing: border-box;
   display: inline-block;
   position: relative;
-  z-index: 99999999;
+
 }
 
 .cinput {
+  cursor: pointer;
   margin-right: 10px;
-  padding: 6px 7px;
+  position: relative;
+  display: inline-block;
+  padding: 4px 7px;
   font-size: 12px;
+  line-height: 1.5;
   color: rgba(0, 0, 0, 0.65);
   background-color: #fff;
-  border-radius: 4px;
+  background-image: none;
   border: 1px solid #d9d9d9;
-  display: flex;
-  flex-direction: row;
-  align-items: center;
+  border-radius: 4px;
+  transition: all .3s;
 
 }
 
+
 .cpop {
-  border: 1px solid #d9d9d9;
+  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+  margin-bottom: 0;
+  padding-left: 0;
+  list-style: none;
+  margin-top: 2px;
+  background-color: #fff;
+  box-shadow: 0 1px 6px #d9d9d9;
   border-radius: 4px;
-  position: absolute;
+  box-sizing: border-box;
+  position: fixed;
+  z-index: 1050;
+  outline: none;
+  overflow: hidden;
 
 }
 
 .clist {
-  max-height: 250px;
+  max-height: 240px;
   overflow: auto;
 
 }
@@ -40,7 +55,7 @@
 }
 
 .iname {
-  width: 80%;
+  width: 84%;
   margin-left: 8px;
   font-size: 12px;
   white-space: nowrap;

+ 24 - 2
js/component/common/tabelContent/index.jsx

@@ -16,6 +16,7 @@ import { ChooseList } from "../../manageCenter/order/orderNew/chooseList";
 import $ from "jquery/src/ajax";
 import moment from "moment";
 import AutoCompleteSearch from "./autoCompleteSearch";
+import Cascaders from "../cascaders"
 
 const { TabPane } = Tabs;
 const { RangePicker, MonthPicker } = DatePicker;
@@ -143,7 +144,7 @@ class TabelContent extends Component {
     if (this.props.exportExecProcessing) {
       data = this.props.exportExecProcessing(data);
     }
-    console.log(data);
+    // console.log(data);
     $.ajax({
       method: "get",
       dataType: "json",
@@ -217,7 +218,7 @@ class TabelContent extends Component {
       );
       let arr1 = this.props.searchList.filter((v) => v.defaultValue);
       if (arr.length > 0) {
-        this.selectSuperId();
+        // this.selectSuperId();
       }
       if (arr1.length > 0) {
         for (let i of arr1) {
@@ -237,6 +238,7 @@ class TabelContent extends Component {
         searchValues: JSON.parse(JSON.stringify(obj)),
       },
       () => {
+        this.Cascaders.empty();
         this.loadData();
       }
     );
@@ -448,6 +450,26 @@ class TabelContent extends Component {
                           <Option value="3">已完成法务/已坏账处理</Option>
                         </Select>
                       </FormItem>
+                    ) : v.type === "newDepartmentSelect" ? (
+                      <FormItem
+                        label={v.title}
+                        key={k}
+                      >
+                        <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,
+                            });
+                          }}
+                        />
+                      </FormItem>
                     ) : null;
                   })}
                   <Button

+ 21 - 5
js/component/manageCenter/customer/NEW/crm/patentPayment.jsx

@@ -32,6 +32,8 @@ import ShowModalDiv from "@/showModal.jsx";
 import ImgList from "../../../../common/imgList";
 import { ChooseList } from "../../../order/orderNew/chooseList";
 import ReminderLog from "./reminderLog";
+import Cascaders from "../../../../common/cascaders";
+
 const Option = AutoComplete.Option;
 const { TabPane } = Tabs;
 //图片组件
@@ -147,7 +149,7 @@ const PatentPayment = Form.create()(React.createClass({
 					name: this.state.nameSearch,
 					aname: this.state.anameSearch,
 					patentNo: this.state.patentNoSearch,
-					departmentId: this.state.departmentSearch,
+					inputDep: this.state.departmentSearch,
 					startDate: this.state.timesArr[0],
 					endDate: this.state.timesArr[1],
 					type: this.state.typeSearch,
@@ -323,7 +325,7 @@ const PatentPayment = Form.create()(React.createClass({
 	},
 	componentWillMount() {
 		this.loadData()
-		this.departmentList()
+		// this.departmentList()
 		let data = localStorage.getItem('newData');
 		if (data != '{}' && data) {
 			var newData = JSON.parse(data);
@@ -573,7 +575,8 @@ const PatentPayment = Form.create()(React.createClass({
 			timesArr: [],
 			releaseDate: []
 		}, () => {
-			this.loadData()
+			this.Cascaders.empty();
+			this.loadData();
 		})
 	},
 
@@ -680,7 +683,20 @@ const PatentPayment = Form.create()(React.createClass({
 										});
 									}}
 								/>
-								<Select
+								<Cascaders
+									ref={ref => this.Cascaders = ref}
+									placeholder="请选择录入公司"
+									id="id"
+									name="name"
+									children="list"
+									height={28}
+									onSel={(e) => {
+										this.setState({
+											departmentSearch: JSON.stringify(e),
+										});
+									}}
+								/>
+								{/* <Select
 									value={this.state.departmentSearch}
 									placeholder="请选择录入公司"
 									onChange={e => {
@@ -693,7 +709,7 @@ const PatentPayment = Form.create()(React.createClass({
 									{this.state.departmentArr.map(e => {
 										return <Option value={e.id}>{e.name}</Option>;
 									})}
-								</Select>
+								</Select> */}
 								<Input
 									value={this.state.anameSearch}
 									placeholder="请输入录入人"

+ 117 - 106
js/component/manageCenter/customer/managementFollow/followUpSummary/index.jsx

@@ -1,4 +1,4 @@
-import React,{Component} from "react";
+import React, { Component } from "react";
 import {
     Button,
     DatePicker,
@@ -13,22 +13,23 @@ import {
 } from "antd";
 import moment from "moment";
 import ShowModalDiv from "@/showModal.jsx";
-import {ShowModal,getContactType} from "@/tools.js";
-import {ChooseList} from "../../../order/orderNew/chooseList";
+import { ShowModal, getContactType } from "@/tools.js";
+import { ChooseList } from "../../../order/orderNew/chooseList";
 import $ from "jquery/src/ajax";
 import IntentionDetail from "../../NEW/intentionCustomer/intentionDetail/intentionDetail";
 import { getProvince } from '@/NewDicProvinceList';
+import Cascaders from "../../../../common/cascaders";
 
-const {TabPane} = Tabs;
+const { TabPane } = Tabs;
 const { RangePicker } = DatePicker;
 
-class FollowUpSummary extends Component{
+class FollowUpSummary extends Component {
     constructor(props) {
         super(props);
-        this.state={
-            loading:false,
-            changeList:[],
-            columns:[
+        this.state = {
+            loading: false,
+            changeList: [],
+            columns: [
                 {
                     title: "客户名称",
                     dataIndex: "nickname",
@@ -37,10 +38,10 @@ class FollowUpSummary extends Component{
                         return (
                             <Tooltip title={text}>
                                 <div style={{
-                                    maxWidth:'150px',
-                                    overflow:'hidden',
+                                    maxWidth: '150px',
+                                    overflow: 'hidden',
                                     textOverflow: "ellipsis",
-                                    whiteSpace:'nowrap',
+                                    whiteSpace: 'nowrap',
                                 }}>{text}</div>
                             </Tooltip>
                         )
@@ -51,7 +52,7 @@ class FollowUpSummary extends Component{
                     dataIndex: 'shareType',
                     key: 'shareType',
                     render: text => {
-                    //    0-私有 1-公共 2 签单 3外联
+                        //    0-私有 1-公共 2 签单 3外联
                         return (
                             text === 0 ? '私有客户' :
                                 text === 1 ? '公共客户' :
@@ -91,15 +92,15 @@ class FollowUpSummary extends Component{
                     width: 150,
                     render: (text, record) => {
                         return (
-                            <Tooltip placement="topLeft" title={<div style={{wordBreak:"break-all"}}>{text}</div>}>
+                            <Tooltip placement="topLeft" title={<div style={{ wordBreak: "break-all" }}>{text}</div>}>
                                 <div style={{
-                                    cursor:"pointer",
+                                    cursor: "pointer",
                                     width: '150px',
                                     whiteSpace: 'nowrap',
                                     overflow: 'hidden',
                                     textOverflow: 'ellipsis',
                                 }}>
-                                  {text}
+                                    {text}
                                 </div>
                             </Tooltip>
                         );
@@ -119,18 +120,18 @@ class FollowUpSummary extends Component{
                     title: "指导意见",
                     dataIndex: "guidance",
                     key: "guidance",
-                    width:150,
+                    width: 150,
                     render: (text, record) => {
                         return (
-                            <Tooltip placement="topLeft" title={<div style={{wordBreak:"break-all"}}>{(record.guidanceName ? '('+record.guidanceName+')' : '') + text}</div>}>
+                            <Tooltip placement="topLeft" title={<div style={{ wordBreak: "break-all" }}>{(record.guidanceName ? '(' + record.guidanceName + ')' : '') + text}</div>}>
                                 <div style={{
-                                    cursor:"pointer",
+                                    cursor: "pointer",
                                     width: '150px',
                                     whiteSpace: 'nowrap',
                                     overflow: 'hidden',
                                     textOverflow: 'ellipsis',
                                 }}>
-                                    {record.guidanceName ? '('+record.guidanceName+')' : null}
+                                    {record.guidanceName ? '(' + record.guidanceName + ')' : null}
                                     {text}
                                 </div>
                             </Tooltip>
@@ -148,7 +149,7 @@ class FollowUpSummary extends Component{
                     }
                 }
             ],
-            dataSource:[],
+            dataSource: [],
             pagination: {
                 defaultCurrent: 1,
                 defaultPageSize: 10,
@@ -162,16 +163,15 @@ class FollowUpSummary extends Component{
                 },
             },
 
+            releaseDate: [],
+            releaseDate1: [],
+            releaseDate2: [],
 
-            releaseDate:[],
-            releaseDate1:[],
-            releaseDate2:[],
-
-            userName:undefined,
-            followName:undefined,
-            userType:undefined,
-            contactType:undefined,
-            depId: undefined,
+            userName: undefined,
+            followName: undefined,
+            userType: undefined,
+            contactType: undefined,
+            deps: undefined,
 
             shiroType: props.shiroType,
         }
@@ -185,19 +185,19 @@ class FollowUpSummary extends Component{
     }
 
     componentWillReceiveProps(prevProps) {
-        if(prevProps.shiroType !== this.state.shiroType){
+        if (prevProps.shiroType !== this.state.shiroType) {
             this.setState({
-                shiroType:prevProps.shiroType
-            },()=>{
+                shiroType: prevProps.shiroType
+            }, () => {
                 this.reset();
-                this.selectSuperId();
+                // this.selectSuperId();
             })
         }
     }
 
     componentDidMount() {
         this.loadData();
-        this.selectSuperId();
+        // this.selectSuperId();
     }
 
     loadData(pageNo) {
@@ -213,19 +213,18 @@ class FollowUpSummary extends Component{
             data: {
                 pageNo: pageNo || 1,
                 pageSize: this.state.pagination.pageSize,
-                userName:this.state.userName || undefined,
+                userName: this.state.userName || undefined,
                 followName: this.state.followName || undefined,
-                userType:isNaN(parseInt(this.state.userType)) ? undefined : this.state.userType,
+                userType: isNaN(parseInt(this.state.userType)) ? undefined : this.state.userType,
                 contactType: isNaN(parseInt(this.state.contactType)) ? undefined : this.state.contactType,
-                depId: this.state.depId || undefined,
-                followStartTime:this.state.releaseDate[0] ? this.state.releaseDate[0] : undefined,
-                followEndTime:this.state.releaseDate[1] ? this.state.releaseDate[1] : undefined,
-                createStartTime:this.state.releaseDate1[0] ? this.state.releaseDate1[0] : undefined,
-                createEndTime:this.state.releaseDate1[1] ? this.state.releaseDate1[1] : undefined,
-                guidanceStartTime:this.state.releaseDate2[0] ? this.state.releaseDate2[0] : undefined,
-                guidanceEndTime:this.state.releaseDate2[1] ? this.state.releaseDate2[1] : undefined,
-
-                shiroType:this.state.shiroType
+                deps: this.state.deps || undefined,
+                followStartTime: this.state.releaseDate[0] ? this.state.releaseDate[0] : undefined,
+                followEndTime: this.state.releaseDate[1] ? this.state.releaseDate[1] : undefined,
+                createStartTime: this.state.releaseDate1[0] ? this.state.releaseDate1[0] : undefined,
+                createEndTime: this.state.releaseDate1[1] ? this.state.releaseDate1[1] : undefined,
+                guidanceStartTime: this.state.releaseDate2[0] ? this.state.releaseDate2[0] : undefined,
+                guidanceEndTime: this.state.releaseDate2[1] ? this.state.releaseDate2[1] : undefined,
+                shiroType: this.state.shiroType
             },
             success: function (data) {
                 ShowModal(this);
@@ -233,13 +232,13 @@ class FollowUpSummary extends Component{
                     let theArr = [];
                     for (let i = 0; i < data.data.list.length; i++) {
                         let thisdata = data.data.list[i];
-                        let diqu =getProvince(thisdata.province,thisdata.city,thisdata.area)
+                        let diqu = getProvince(thisdata.province, thisdata.city, thisdata.area)
                         thisdata.key = i;
                         thisdata.lastFollowTime = thisdata.lastFollowTime && thisdata.lastFollowTime.split(" ")[0];
-                        thisdata.transferTime= thisdata.transferTime && thisdata.transferTime.split(" ")[0];
-                        thisdata.surplusFollowTime= thisdata.surplusFollowTime && thisdata.surplusFollowTime.split(" ")[0];
-                        thisdata.surplusSignTime= thisdata.surplusSignTime && thisdata.surplusSignTime.split(" ")[0];
-                        thisdata.locationProvince= diqu;
+                        thisdata.transferTime = thisdata.transferTime && thisdata.transferTime.split(" ")[0];
+                        thisdata.surplusFollowTime = thisdata.surplusFollowTime && thisdata.surplusFollowTime.split(" ")[0];
+                        thisdata.surplusSignTime = thisdata.surplusSignTime && thisdata.surplusSignTime.split(" ")[0];
+                        thisdata.locationProvince = diqu;
                         thisdata.uid = thisdata.id;
                         theArr.push(thisdata);
                     }
@@ -250,7 +249,7 @@ class FollowUpSummary extends Component{
                         dataSource: theArr,
                         pagination: this.state.pagination,
                     });
-                }else{
+                } else {
                     message.warning(data.error[0].message);
                 }
             }.bind(this),
@@ -270,11 +269,11 @@ class FollowUpSummary extends Component{
             dataType: "json",
             crossDomain: false,
             url: globalConfig.context + "/api/admin/organization/selectSuperId",
-            data:{},
+            data: {},
             success: function (data) {
-                if(data.error.length === 0){
+                if (data.error.length === 0) {
                     let theArr = [];
-                    for(let i=0;i<data.data.length;i++){
+                    for (let i = 0; i < data.data.length; i++) {
                         let theData = data.data[i];
                         theArr.push(
                             <Select.Option value={theData.id} key={theData.name}>{theData.name}</Select.Option>
@@ -283,11 +282,11 @@ class FollowUpSummary extends Component{
                     this.setState({
                         contactsOption: theArr,
                     });
-                }else{
+                } else {
                     message.warning(data.error[0].message);
                 }
             }.bind(this),
-        }).always(function () {}.bind(this));
+        }).always(function () { }.bind(this));
     }
 
     //品类数据获取
@@ -320,11 +319,11 @@ class FollowUpSummary extends Component{
         });
     }
 
-    tableRowClick(record){
+    tableRowClick(record) {
         this.category();
         this.setState({
             rowData: record,
-            modalVisible:true,
+            modalVisible: true,
             modalName: record.nickname,
         })
     }
@@ -341,28 +340,27 @@ class FollowUpSummary extends Component{
         }
     }
 
-    export(){
+    export() {
         this.setState({
             exportExecLoading: true
         })
         let loading = message.loading('加载中...');
         let data = {
-            userName:this.state.userName || undefined,
-            followName:this.state.followName || undefined,
-            userType:isNaN(parseInt(this.state.userType)) ? undefined : this.state.userType,
+            userName: this.state.userName || undefined,
+            followName: this.state.followName || undefined,
+            userType: isNaN(parseInt(this.state.userType)) ? undefined : this.state.userType,
             contactType: isNaN(parseInt(this.state.contactType)) ? undefined : this.state.contactType,
-            depId:this.state.depId || undefined,
-            followStartTime:this.state.releaseDate[0] ? this.state.releaseDate[0] : undefined,
-            followEndTime:this.state.releaseDate[1] ? this.state.releaseDate[1] : undefined,
-            createStartTime:this.state.releaseDate1[0] ? this.state.releaseDate1[0] : undefined,
-            createEndTime:this.state.releaseDate1[1] ? this.state.releaseDate1[1] : undefined,
-            guidanceStartTime:this.state.releaseDate2[0] ? this.state.releaseDate2[0] : undefined,
-            guidanceEndTime:this.state.releaseDate2[1] ? this.state.releaseDate2[1] : undefined,
-
-            shiroType:this.state.shiroType
+            deps: this.state.deps || undefined,
+            followStartTime: this.state.releaseDate[0] ? this.state.releaseDate[0] : undefined,
+            followEndTime: this.state.releaseDate[1] ? this.state.releaseDate[1] : undefined,
+            createStartTime: this.state.releaseDate1[0] ? this.state.releaseDate1[0] : undefined,
+            createEndTime: this.state.releaseDate1[1] ? this.state.releaseDate1[1] : undefined,
+            guidanceStartTime: this.state.releaseDate2[0] ? this.state.releaseDate2[0] : undefined,
+            guidanceEndTime: this.state.releaseDate2[1] ? this.state.releaseDate2[1] : undefined,
+            shiroType: this.state.shiroType
         };
-        for (let i in data){
-            if(typeof data[i] === "undefined"){
+        for (let i in data) {
+            if (typeof data[i] === "undefined") {
                 delete data[i]
             }
         }
@@ -372,14 +370,14 @@ class FollowUpSummary extends Component{
             crossDomain: false,
             url: globalConfig.context + "/api/admin/userFollowListExport",
             data,
-            success: function(data) {
-                if(data.error.length === 0){
+            success: function (data) {
+                if (data.error.length === 0) {
                     this.download(data.data);
-                }else{
+                } else {
                     message.warning(data.error[0].message);
                 }
             }.bind(this),
-        }).always(function() {
+        }).always(function () {
             loading();
             this.setState({
                 exportExecLoading: false
@@ -387,22 +385,22 @@ class FollowUpSummary extends Component{
         }.bind(this));
     }
 
-    download(fileName){
+    download(fileName) {
         window.location.href = globalConfig.context + "/open/download?fileName=" + fileName
     }
 
-    reset(){
+    reset() {
         this.setState({
-            userName:undefined,
-            followName:undefined,
-            userType:undefined,
-            contactType:undefined,
-            depId:undefined,
-
-            releaseDate:[],
-            releaseDate1:[],
-            releaseDate2:[],
-        },()=>{
+            userName: undefined,
+            followName: undefined,
+            userType: undefined,
+            contactType: undefined,
+            deps: undefined,
+            releaseDate: [],
+            releaseDate1: [],
+            releaseDate2: [],
+        }, () => {
+            this.Cascaders.empty();
             this.loadData();
         })
     }
@@ -418,7 +416,7 @@ class FollowUpSummary extends Component{
                     <TabPane tab="搜索" key="1">
                         <div className="user-search">
                             <Form layout="inline">
-                                <Form.Item style={{marginTop: '10px'}}>
+                                <Form.Item style={{ marginTop: '10px' }}>
                                     <Input
                                         placeholder="客户名称"
                                         value={this.state.userName}
@@ -428,7 +426,7 @@ class FollowUpSummary extends Component{
                                         }}
                                     />
                                 </Form.Item>
-                                <Form.Item style={{marginTop: '10px'}}>
+                                <Form.Item style={{ marginTop: '10px' }}>
                                     <Input
                                         placeholder="跟进人名称"
                                         value={this.state.followName}
@@ -441,7 +439,7 @@ class FollowUpSummary extends Component{
                                 <Form.Item>
                                     <Select
                                         placeholder="选择客户类型"
-                                        style={{ width: 100, marginRight: 10}}
+                                        style={{ width: 100, marginRight: 10 }}
                                         value={this.state.userType}
                                         onChange={
                                             (e) => {
@@ -459,7 +457,7 @@ class FollowUpSummary extends Component{
                                 <Form.Item>
                                     <Select
                                         placeholder="选择跟进方式"
-                                        style={{ width: 100, marginRight: 10}}
+                                        style={{ width: 100, marginRight: 10 }}
                                         value={this.state.contactType}
                                         onChange={(e) => { this.setState({ contactType: e }) }}
                                     >
@@ -471,10 +469,23 @@ class FollowUpSummary extends Component{
                                         <Select.Option value={5}>公出打卡</Select.Option>
                                     </Select>
                                 </Form.Item>
-                                <Form.Item>
-                                    <Select
+                                <Form.Item style={{ marginTop: '10px' }}>
+                                    <Cascaders
+                                        ref={ref => this.Cascaders = ref}
                                         placeholder="选择跟进部门"
-                                        style={{ width:'200px',marginRight:'10px' }}
+                                        id="id"
+                                        name="name"
+                                        children="list"
+                                        height={32}
+                                        onSel={(e) => {
+                                            this.setState({
+                                                deps: JSON.stringify(e)
+                                            })
+                                        }}
+                                    />
+                                    {/* <Select
+                                        placeholder="选择跟进部门"
+                                        style={{ width: '200px', marginRight: '10px' }}
                                         value={this.state.depId}
                                         onChange={
                                             (e) => {
@@ -483,11 +494,11 @@ class FollowUpSummary extends Component{
                                         notFoundContent="未获取到上级组织列表"
                                     >
                                         {this.state.contactsOption}
-                                    </Select>
+                                    </Select> */}
                                 </Form.Item>
-                                <Form.Item label='跟进时间:' style={{marginTop: '10px'}}>
+                                <Form.Item label='跟进时间:' style={{ marginTop: '10px' }}>
                                     <RangePicker
-                                        style={{ marginRight:'10px' }}
+                                        style={{ marginRight: '10px' }}
                                         value={[
                                             this.state.releaseDate[0]
                                                 ? moment(this.state.releaseDate[0])
@@ -501,9 +512,9 @@ class FollowUpSummary extends Component{
                                         }}
                                     />
                                 </Form.Item>
-                                <Form.Item label='客户初始时间:' style={{marginTop: '10px'}}>
+                                <Form.Item label='客户初始时间:' style={{ marginTop: '10px' }}>
                                     <RangePicker
-                                        style={{ marginRight:'10px' }}
+                                        style={{ marginRight: '10px' }}
                                         value={[
                                             this.state.releaseDate1[0]
                                                 ? moment(this.state.releaseDate1[0])
@@ -517,9 +528,9 @@ class FollowUpSummary extends Component{
                                         }}
                                     />
                                 </Form.Item>
-                                <Form.Item label='指导时间:' style={{marginTop: '10px'}}>
+                                <Form.Item label='指导时间:' style={{ marginTop: '10px' }}>
                                     <RangePicker
-                                        style={{ marginRight:'10px' }}
+                                        style={{ marginRight: '10px' }}
                                         value={[
                                             this.state.releaseDate2[0]
                                                 ? moment(this.state.releaseDate2[0])
@@ -537,7 +548,7 @@ class FollowUpSummary extends Component{
                             <Button
                                 type="primary"
                                 style={{ marginLeft: "10px", marginRight: 10 }}
-                                onClick={()=>{
+                                onClick={() => {
                                     this.loadData();
                                 }}
                             >
@@ -558,7 +569,7 @@ class FollowUpSummary extends Component{
                         </div>
                     </TabPane>
                     <TabPane tab="导出" key="3">
-                        <Button style={{ float: "left",margin:10 }} onClick={this.export}>
+                        <Button style={{ float: "left", margin: 10 }} onClick={this.export}>
                             导出excel
                         </Button>
                     </TabPane>

+ 2 - 2
js/component/manageCenter/customer/operationalData/interviewStatistics/detailedList.jsx

@@ -283,8 +283,8 @@ class DetailedList extends Component {
             ],
             searchList: [
                 {
-                    type: 'departmentSelect',
-                    dataKey: 'depId',
+                    type: 'newDepartmentSelect',
+                    dataKey: 'deps',
                     placeholder: '请选择部门'
                 },
                 {

+ 4 - 4
js/component/manageCenter/customer/operationalData/receivablesStatistics/detailedList.jsx

@@ -173,8 +173,8 @@ class DetailedList extends Component{
             ],
             searchList:[
             {
-                type:'departmentSelect',
-                dataKey:'depId',
+                type:'newDepartmentSelect',
+                dataKey:'deps',
                 placeholder:'请选择部门'
             },
             {
@@ -227,8 +227,8 @@ class DetailedList extends Component{
                     placeholder:'请输入合同编号'
                 },
                 {
-                    type:'departmentSelect',
-                    dataKey:'depId',
+                    type:'newDepartmentSelect',
+                    dataKey:'deps',
                     placeholder:'请选择订单部门'
                 },
                 {

+ 2 - 2
js/component/manageCenter/customer/operationalData/reexamine/detailedList.jsx

@@ -192,8 +192,8 @@ class DetailedList extends Component{
             ],
             searchList:[
             {
-                type:'departmentSelect',
-                dataKey:'depId',
+                type:'newDepartmentSelect',
+                dataKey:'deps',
                 placeholder:'请选择部门'
             },
             {

+ 2 - 2
js/component/manageCenter/customer/operationalData/signatureStatistics/detailedList.jsx

@@ -157,8 +157,8 @@ class DetailedList extends Component{
             ],
             searchList:[
                 {
-                    type:'departmentSelect',
-                    dataKey:'depId',
+                    type:'newDepartmentSelect',
+                    dataKey:'deps',
                     placeholder:'请选择部门'
                 },
                 {

+ 46 - 30
js/component/manageCenter/customerService/administration/order.jsx

@@ -51,6 +51,8 @@ import LogPopup from "../../../common/logPopup";
 import EnterpriseNameChange from "../../../common/enterpriseNameChange";
 import OrderCoor from "../../order/orderNew/changeComponent/orderCoor.jsx";
 import ContentUrl from "../../order/orderNew/contentUrl.jsx";
+import Cascaders from "../../../common/cascaders";
+
 const { Option } = Select;
 const { TabPane } = Tabs;
 const PicturesWall = React.createClass({
@@ -144,7 +146,7 @@ const Order = Form.create()(
           endTime: this.state.releaseDate[1],
           liquidationStatus: this.state.liquidationStatusSearch,
           contractNo: this.state.contractNoSearch,
-          depId: this.state.departmenttList,
+          deps: this.state.departmenttList,
           amountStatus: this.state.amountStatus,
           approval: this.state.approvalSearch,
         },
@@ -1053,10 +1055,10 @@ const Order = Form.create()(
               recipientAddress: thisdata.recipientAddress,
               orgCodeUrl: thisdata.voucherUrl
                 ? splitUrl(
-                    thisdata.voucherUrl,
-                    ",",
-                    globalConfig.avatarHost + "/upload"
-                  )
+                  thisdata.voucherUrl,
+                  ",",
+                  globalConfig.avatarHost + "/upload"
+                )
                 : [],
             });
           }
@@ -1288,10 +1290,10 @@ const Order = Form.create()(
               recipientAddress: thisdata.recipientAddress,
               orgCodeUrl: thisdata.voucherUrl
                 ? splitUrl(
-                    thisdata.voucherUrl,
-                    ",",
-                    globalConfig.avatarHost + "/upload"
-                  )
+                  thisdata.voucherUrl,
+                  ",",
+                  globalConfig.avatarHost + "/upload"
+                )
                 : [],
             });
           }
@@ -1351,10 +1353,10 @@ const Order = Form.create()(
             recipientAddress: thisdata.recipientAddress,
             orgCodeUrl: thisdata.voucherUrl
               ? splitUrl(
-                  thisdata.voucherUrl,
-                  ",",
-                  globalConfig.avatarHost + "/upload"
-                )
+                thisdata.voucherUrl,
+                ",",
+                globalConfig.avatarHost + "/upload"
+              )
               : [],
           });
         }.bind(this),
@@ -1659,24 +1661,24 @@ const Order = Form.create()(
               orderRemarks: thisdata.orderRemarks, //订单留言
               orgCodeUrl: thisdata.contractPictureUrl
                 ? splitUrl(
-                    thisdata.contractPictureUrl,
-                    ",",
-                    globalConfig.avatarHost + "/upload"
-                  )
+                  thisdata.contractPictureUrl,
+                  ",",
+                  globalConfig.avatarHost + "/upload"
+                )
                 : [], //图片地址
               replenishUrl: thisdata.agreementUrl
                 ? splitUrl(
-                    thisdata.agreementUrl,
-                    ",",
-                    globalConfig.avatarHost + "/upload"
-                  )
+                  thisdata.agreementUrl,
+                  ",",
+                  globalConfig.avatarHost + "/upload"
+                )
                 : [], //图片地址
               contentUrl: thisdata.serviceContent
                 ? splitUrl(
-                    thisdata.serviceContent,
-                    ",",
-                    globalConfig.avatarHost + "/upload"
-                  )
+                  thisdata.serviceContent,
+                  ",",
+                  globalConfig.avatarHost + "/upload"
+                )
                 : [], //图片地址
               salesmanName: thisdata.salesmanName, //营销员名称
               salesmanMobile: thisdata.salesmanMobile, //营销员电话
@@ -1918,9 +1920,10 @@ const Order = Form.create()(
       this.state.intentOrder = true;
       (this.state.liquidationStatusSearch = []),
         (this.state.contractNoSearch = "");
-      this.state.departmenttList = [];
+      this.state.departmenttList = undefined;
       this.state.amountStatus = undefined;
       this.state.approvalSearch = undefined;
+      this.Cascaders.empty();
       this.loadData();
     },
     //部门
@@ -2292,7 +2295,20 @@ const Order = Form.create()(
                       this.setState({ customerName: e.target.value });
                     }}
                   />
-                  <Select
+                  <Cascaders
+                    ref={node => this.Cascaders = node}
+                    placeholder="订单部门"
+                    id="id"
+                    name="name"
+                    children="list"
+                    height={28}
+                    onSel={(e) => {
+                      this.setState({
+                        departmenttList: JSON.stringify(e),
+                      });
+                    }}
+                  />
+                  {/* <Select
                     placeholder="订单部门"
                     style={{ width: 150, marginRight: 10 }}
                     value={this.state.departmenttList}
@@ -2303,7 +2319,7 @@ const Order = Form.create()(
                     {departmentArr.map(function (item) {
                       return <Option key={item.id}>{item.name}</Option>;
                     })}
-                  </Select>
+                  </Select> */}
                   <Input
                     placeholder="合同编号"
                     style={{ width: "150px" }}
@@ -3620,8 +3636,8 @@ const Order = Form.create()(
                           {this.state.invoiceType === 0
                             ? "增值税专用发票"
                             : this.state.invoiceType === 1
-                            ? "增值税普通发票"
-                            : "其他"}
+                              ? "增值税普通发票"
+                              : "其他"}
                         </span>
                       </FormItem>
                     </div>

+ 32 - 17
js/component/manageCenter/financialManage/bonus/yxBonus.jsx

@@ -23,6 +23,7 @@ import BonuseDetail from './bonusDetail';
 import { ChooseList } from "../../order/orderNew/chooseList";
 const FormItem = Form.Item;
 import ShowModalDiv from "@/showModal.jsx";
+import Cascaders from "../../../common/cascaders";
 
 const { TabPane } = Tabs
 const YxBonus = React.createClass({
@@ -81,7 +82,7 @@ const YxBonus = React.createClass({
         pageNo: pageNo || 1,
         pageSize: this.state.pagination.pageSize,
         salesName: this.state.orderRefundSearch, //订单负责人
-        departmentId: this.state.departmenttList,
+        deps: JSON.stringify(this.state.departmenttList),
         orderNo: this.state.orderNoSearch,
         startTime: this.state.releaseDate[0],
         endTime: this.state.releaseDate[1],
@@ -289,7 +290,7 @@ const YxBonus = React.createClass({
   },
   componentWillMount() {
     this.loadData();
-    this.departmentList();
+    // this.departmentList();
   },
   search() {
     this.loadData();
@@ -307,17 +308,17 @@ const YxBonus = React.createClass({
   },
   //导出
   exportExec() {
-    let departmentName = "",
-      depart = this.state.departmentArr || [];
-    depart.map(item => {
-      if (this.state.departmentId == item.id) {
-        departmentName = item.name;
-        return;
-      }
-    });
+    // let departmentName = "",
+    //   depart = this.state.departmentArr || [];
+    // depart.map(item => {
+    //   if (this.state.departmentId == item.id) {
+    //     departmentName = item.name;
+    //     return;
+    //   }
+    // });
     let data = {
-      departmentId: this.state.departmentId,
-      departmentName: departmentName,
+      deps: this.state.departmenttList,
+      // departmentName: departmentName,
       salesName: this.state.orderRefundSearch, //订单负责人
       startTime: this.state.releaseDate[0],
       endTime: this.state.releaseDate[1],
@@ -374,12 +375,13 @@ const YxBonus = React.createClass({
     );
   },
   reset() {
-    this.state.orderRefundSearch = "";
+    this.state.orderRefundSearch = undefined;
     this.state.releaseDate = [];
     this.state.createDate = [];
-    this.state.orderNoSearch = "";
+    this.state.orderNoSearch = undefined
     this.state.departmenttList = undefined;
     this.state.grantStatus = undefined;
+    this.Cascaders.empty();
     this.loadData();
   },
   searchSwitch() {
@@ -424,8 +426,21 @@ const YxBonus = React.createClass({
           onChange={this.callback}
           className="test">
           <TabPane tab="搜索" key="1">
-            <div className="user-search">
-              <Select
+            <div className="user-search" style={{ padding: "0 10px" }}>
+              <Cascaders
+                ref={ref => this.Cascaders = ref}
+                placeholder="订单部门"
+                id="id"
+                name="name"
+                children="list"
+                height={28}
+                onSel={(e) => {
+                  this.setState({
+                    departmenttList: e,
+                  });
+                }}
+              />
+              {/* <Select
                 placeholder="订单部门"
                 style={{ width: 150, marginRight: 10, marginLeft: 10 }}
                 value={this.state.departmenttList}
@@ -438,7 +453,7 @@ const YxBonus = React.createClass({
                     <Select.Option key={item.id}>{item.name}</Select.Option>
                   );
                 })}
-              </Select>
+              </Select> */}
               <Input
                 placeholder="订单编号"
                 value={this.state.orderNoSearch}

+ 51 - 7
js/component/manageCenter/financialManage/distribute/approvedOutsourcing.jsx

@@ -49,6 +49,7 @@ import EnterpriseNameChange from "../../../common/enterpriseNameChange";
 import LogPopup from "../../../common/logPopup";
 import ContentUrl from '../../order/orderNew/contentUrl'
 import { salesList } from "@/dataDic.js";
+import Cascaders from "../../../common/cascaders";
 const FormItem = Form.Item
 
 const approvedOutsourcing = React.createClass({
@@ -72,7 +73,7 @@ const approvedOutsourcing = React.createClass({
         endTime: this.state.releaseDate[1],
         startFinalReceivablesTime: this.state.shouKuanDate[0],
         endFinalReceivablesTime: this.state.shouKuanDate[1],
-        departmentId: this.state.departmenttList,
+        deps: this.state.departmenttList,
         processStatus: this.state.processStatusSearch,
         contractNo: this.state.contractNoSearch,
         outsource: 1,
@@ -2019,6 +2020,7 @@ const approvedOutsourcing = React.createClass({
     this.state.processStatusSearch = []
     this.state.liquidationStatus = []
     this.state.contractNo = ''
+    this.Cascaders.empty();
     this.loadData()
   },
   boHuiCo() {
@@ -2216,6 +2218,13 @@ const approvedOutsourcing = React.createClass({
     })
   },
   exportAll() {
+    message.config({
+      duration: 20,
+    });
+    let loading = message.loading("下载中...");
+    this.setState({
+      exportPendingLoading: true,
+    });
     const data = {
       pageSize: 9999999,
       buyerName: this.state.nameSearch, //客户名称
@@ -2224,16 +2233,38 @@ const approvedOutsourcing = React.createClass({
       endTime: this.state.releaseDate[1],
       startFinalReceivablesTime: this.state.shouKuanDate[0],
       endFinalReceivablesTime: this.state.shouKuanDate[1],
-      departmentId: this.state.departmenttList,
+      deps: this.state.departmenttList,
       processStatus: this.state.processStatusSearch,
       contractNo: this.state.contractNoSearch,
       outsource: 1,
       liquidationStatus: this.state.liquidationStatus,
     }
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: "/api/admin/receivables/exportReceivables",
+      data,
+      success: function (data) {
+        if (data.error.length === 0) {
+          this.download(data.data);
+        } else {
+          message.warning(data.error[0].message);
+        }
+      }.bind(this),
+    }).always(
+      function () {
+        loading();
+        this.setState({
+          exportPendingLoading: false,
+        });
+      }.bind(this)
+    );
+  },
+  // 下载
+  download(fileName) {
     window.location.href =
-      globalConfig.context +
-      '/api/admin/receivables/exportReceivables?' +
-      $.param(data)
+      globalConfig.context + "/open/download?fileName=" + fileName;
   },
   exportKaip() {
     window.location.href =
@@ -2888,11 +2919,24 @@ const approvedOutsourcing = React.createClass({
                   this.setState({ nameSearch: e.target.value })
                 }}
               />
-              <DepartmentList
+              <Cascaders
+                ref={node => this.Cascaders = node}
+                placeholder="订单部门"
+                id="id"
+                name="name"
+                children="list"
+                height={28}
+                onSel={(e) => {
+                  this.setState({
+                    departmenttList: JSON.stringify(e),
+                  });
+                }}
+              />
+              {/* <DepartmentList
                 value={this.state.departmenttList}
                 onChange={e => {
                   this.setState({ departmenttList: e });
-                }} />
+                }} /> */}
               <Input
                 placeholder="合同编号"
                 value={this.state.contractNoSearch}

+ 51 - 7
js/component/manageCenter/financialManage/distribute/approvedOutsourcingAll.jsx

@@ -46,6 +46,7 @@ import EnterpriseNameChange from "../../../common/enterpriseNameChange";
 import LogPopup from "../../../common/logPopup";
 import ContentUrl from "../../order/orderNew/contentUrl";
 import { salesList } from '@/dataDic.js'
+import Cascaders from "../../../common/cascaders";
 const FormItem = Form.Item;
 
 const approvedOutsourcing = React.createClass({
@@ -107,7 +108,7 @@ const approvedOutsourcing = React.createClass({
         endTime: this.state.releaseDate[1],
         startFinalReceivablesTime: this.state.shouKuanDate[0],
         endFinalReceivablesTime: this.state.shouKuanDate[1],
-        departmentId: this.state.departmenttList,
+        deps: this.state.departmenttList,
         processStatus: this.state.processStatusSearch,
         contractNo: this.state.contractNoSearch,
         outsource: 1,
@@ -2021,6 +2022,7 @@ const approvedOutsourcing = React.createClass({
     this.state.contractNoSearch = "";
     this.state.liquidationStatus = [];
     this.state.contractNo = "";
+    this.Cascaders.empty();
     this.loadData();
   },
   boHuiCo() {
@@ -2218,6 +2220,13 @@ const approvedOutsourcing = React.createClass({
     });
   },
   exportAll() {
+    message.config({
+      duration: 20,
+    });
+    let loading = message.loading("下载中...");
+    this.setState({
+      exportPendingLoading: true,
+    });
     const data = {
       pageSize: 9999999,
       buyerName: this.state.nameSearch, //客户名称
@@ -2226,16 +2235,38 @@ const approvedOutsourcing = React.createClass({
       endTime: this.state.releaseDate[1],
       startFinalReceivablesTime: this.state.shouKuanDate[0],
       endFinalReceivablesTime: this.state.shouKuanDate[1],
-      departmentId: this.state.departmenttList,
+      deps: this.state.departmenttList,
       processStatus: this.state.processStatusSearch,
       contractNo: this.state.contractNoSearch,
       outsource: 1,
       liquidationStatus: this.state.liquidationStatus,
     };
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: "/api/admin/receivables/exportReceivables",
+      data,
+      success: function (data) {
+        if (data.error.length === 0) {
+          this.download(data.data);
+        } else {
+          message.warning(data.error[0].message);
+        }
+      }.bind(this),
+    }).always(
+      function () {
+        loading();
+        this.setState({
+          exportPendingLoading: false,
+        });
+      }.bind(this)
+    );
+  },
+  // 下载
+  download(fileName) {
     window.location.href =
-      globalConfig.context +
-      "/api/admin/receivables/exportReceivables?" +
-      $.param(data);
+      globalConfig.context + "/open/download?fileName=" + fileName;
   },
   exportKaip() {
     window.location.href =
@@ -2832,7 +2863,20 @@ const approvedOutsourcing = React.createClass({
                   this.setState({ nameSearch: e.target.value });
                 }}
               />
-              <Select
+              <Cascaders
+                ref={node => this.Cascaders = node}
+                placeholder="订单部门"
+                id="id"
+                name="name"
+                children="list"
+                height={28}
+                onSel={(e) => {
+                  this.setState({
+                    departmenttList: JSON.stringify(e),
+                  });
+                }}
+              />
+              {/* <Select
                 placeholder="订单部门"
                 style={{ width: 120, marginRight: 10 }}
                 value={this.state.departmenttList}
@@ -2845,7 +2889,7 @@ const approvedOutsourcing = React.createClass({
                     <Select.Option key={item.id}>{item.name}</Select.Option>
                   );
                 })}
-              </Select>
+              </Select> */}
               <Input
                 placeholder="合同编号"
                 value={this.state.contractNoSearch}

+ 34 - 23
js/component/manageCenter/financialManage/distribute/huiKuan.jsx

@@ -29,8 +29,8 @@ import {
 } from "@/tools";
 import { ChooseList } from "../../../../component/manageCenter/order/orderNew/chooseList";
 import "./huiKuan.less"
-
 import LogPopup from "../../../common/logPopup";
+import Cascaders from "../../../common/cascaders";
 
 const { RangePicker } = DatePicker;
 const FormItem = Form.Item;
@@ -64,7 +64,7 @@ const HuiKuan = React.createClass({
         // 客户名称
         nickname: this.state.nickname,
         // 订单所属部门id
-        orderDepId: this.state.orderBranch,
+        deps: this.state.orderBranch,
         // 管理员部门id
         adminDepId: this.state.principalList
       },
@@ -232,14 +232,14 @@ const HuiKuan = React.createClass({
           width: 150,
           render: (text) => {
             return (
-                <Tooltip title={text}>
-                  <div style={{
-                    maxWidth:'150px',
-                    overflow:'hidden',
-                    textOverflow: "ellipsis",
-                    whiteSpace:'nowrap',
-                  }}>{text}</div>
-                </Tooltip>
+              <Tooltip title={text}>
+                <div style={{
+                  maxWidth: '150px',
+                  overflow: 'hidden',
+                  textOverflow: "ellipsis",
+                  whiteSpace: 'nowrap',
+                }}>{text}</div>
+              </Tooltip>
             )
           },
         },
@@ -319,7 +319,7 @@ const HuiKuan = React.createClass({
                 str = "名称异常";
               } else if (status.first == 5) {
                 str = "已收款";
-              }else if (status.first == 6) {
+              } else if (status.first == 6) {
                 str = "变更锁定";
               }
             }
@@ -399,7 +399,7 @@ const HuiKuan = React.createClass({
 
   search() {
     this.setState({
-      selectedRowKeys:[]
+      selectedRowKeys: []
     })
     this.loadData();
   },
@@ -423,8 +423,9 @@ const HuiKuan = React.createClass({
     this.state.principalList = [];
     this.state.payFrom = "";
     this.state.statusSearch = [];
-    this.state.orderBranch = [];
+    this.state.orderBranch = undefined;
     this.state.statusSearch = [];
+    this.Cascaders.empty();
     this.loadData();
   },
 
@@ -625,7 +626,7 @@ const HuiKuan = React.createClass({
   mergeAll() {
     // console.log("合并全部");
     this.setState({
-      confirmLoading:true
+      confirmLoading: true
     })
     $.ajax({
       method: "POST",
@@ -652,7 +653,7 @@ const HuiKuan = React.createClass({
           selectedRowKeys: this.state.selectedRowKeys,
           pagination: this.state.pagination,
           mergeModal: false,
-          confirmLoading:false,
+          confirmLoading: false,
         })
         // window.location.reload();
       }.bind(this)
@@ -744,8 +745,21 @@ const HuiKuan = React.createClass({
                   this.setState({ adminName: e.target.value });
                 }}
               />
+              <Cascaders
+                ref={node => this.Cascaders = node}
+                placeholder="订单所属部门"
+                id="id"
+                name="name"
+                children="list"
+                height={28}
+                onSel={(e) => {
+                  this.setState({
+                    orderBranch: JSON.stringify(e),
+                  })
+                }}
+              />
 
-              <Select
+              {/* <Select
                 placeholder="订单所属部门"
                 style={{ width: 150, marginRight: 10 }}
                 value={this.state.orderBranch}
@@ -758,7 +772,7 @@ const HuiKuan = React.createClass({
                     <Select.Option key={item.id}>{item.name}</Select.Option>
                   );
                 })}
-              </Select>
+              </Select> */}
 
               <Select
                 placeholder="负责人所属部门"
@@ -952,8 +966,7 @@ const HuiKuan = React.createClass({
             }
             {
               <span>
-                {`合同额总计(万元):${
-                  this.state.totalHui ? this.state.totalHui : "0"
+                {`合同额总计(万元):${this.state.totalHui ? this.state.totalHui : "0"
                   }`}
               </span>
             }
@@ -1177,15 +1190,13 @@ const HuiKuan = React.createClass({
             >
               {
                 <span style={{ marginRight: 10 }}>
-                  {`回款金额总计(万元):${
-                    this.state.hui ? this.state.hui : "0"
+                  {`回款金额总计(万元):${this.state.hui ? this.state.hui : "0"
                     }`}
                 </span>
               }
               {
                 <span>
-                  {`合同额总计(万元):${
-                    this.state.totalHui ? this.state.totalHui : "0"
+                  {`合同额总计(万元):${this.state.totalHui ? this.state.totalHui : "0"
                     }`}
                 </span>
               }

+ 20 - 4
js/component/manageCenter/financialManage/distribute/invoiceApplyList.jsx

@@ -31,6 +31,8 @@ import KaiPiaoModal from "./kaiPiaoModal";
 import { getProjectName } from "../../../tools";
 import DepartmentList from "../../../common/departmentList";
 import LogPopup from "../../../common/logPopup";
+import Cascaders from "../../../common/cascaders";
+
 const FormItem = Form.Item;
 const { TabPane } = Tabs;
 
@@ -52,7 +54,7 @@ const invoiceApplyList = React.createClass({
         pageSize: this.state.pagination.pageSize,
         name: this.state.nameSearch, //客户名称
         orderNo: this.state.orderNoSearch,
-        orderDep: this.state.departmenttList,
+        deps: this.state.departmenttList,
         status: this.state.statusSearch,
         type: 0,
         approval: this.state.processStatus,
@@ -580,8 +582,9 @@ const invoiceApplyList = React.createClass({
     this.state.releaseDate = [];
     this.state.orderNoSearch = "";
     this.state.processStatus = [];
-    this.state.departmenttList = [];
+    this.state.departmenttList = undefined;
     this.state.statusSearch = [];
+    this.Cascaders.empty();
     this.loadData();
   },
   changeList(arr) {
@@ -638,12 +641,25 @@ const invoiceApplyList = React.createClass({
                   this.setState({ orderNoSearch: e.target.value });
                 }}
               />
-              <DepartmentList
+              <Cascaders
+                ref={node => this.Cascaders = node}
+                placeholder="订单部门"
+                id="id"
+                name="name"
+                children="list"
+                height={28}
+                onSel={(e) => {
+                  this.setState({
+                    departmenttList: JSON.stringify(e),
+                  });
+                }}
+              />
+              {/* <DepartmentList
                 value={this.state.departmenttList}
                 onChange={(e) => {
                   this.setState({ departmenttList: e });
                 }}
-              />
+              /> */}
               <Button
                 type="primary"
                 onClick={this.search}

+ 35 - 20
js/component/manageCenter/financialManage/distribute/invoiceApplyListQuery.jsx

@@ -27,9 +27,10 @@ import {
 import { ChooseList } from "../../../../component/manageCenter/order/orderNew/chooseList";
 import ShowModalDiv from "@/showModal.jsx";
 import OrderDesc from "../orderDetail/orderDesc";
-import {getProjectName} from "../../../tools";
+import { getProjectName } from "../../../tools";
 import DepartmentList from '../../../common/departmentList';
 import LogPopup from "../../../common/logPopup";
+import Cascaders from "../../../common/cascaders";
 const FormItem = Form.Item;
 const { TabPane } = Tabs
 
@@ -51,11 +52,11 @@ const invoiceApplyListQuery = React.createClass({
         pageSize: this.state.pagination.pageSize,
         name: this.state.nameSearch, //客户名称
         orderNo: this.state.orderNoSearch,
-        orderDep: this.state.departmenttList,
+        deps: this.state.departmenttList,
         status: this.state.statusSearch,
         type: 0,
         approval: this.state.processStatus,
-        all:1,
+        all: 1,
       },
       success: function (data) {
         ShowModal(this);
@@ -202,17 +203,17 @@ const invoiceApplyListQuery = React.createClass({
           title: "客户",
           dataIndex: "unitName",
           key: "unitName",
-          width:100,
+          width: 100,
           render: text => {
             return (
-                <Tooltip title={text}>
-                  <div style={{
-                    maxWidth:'100px',
-                    overflow:'hidden',
-                    textOverflow: "ellipsis",
-                    whiteSpace:'nowrap',
-                  }}>{text}</div>
-                </Tooltip>
+              <Tooltip title={text}>
+                <div style={{
+                  maxWidth: '100px',
+                  overflow: 'hidden',
+                  textOverflow: "ellipsis",
+                  whiteSpace: 'nowrap',
+                }}>{text}</div>
+              </Tooltip>
             )
           }
         },
@@ -225,7 +226,7 @@ const invoiceApplyListQuery = React.createClass({
           title: "开票状态",
           dataIndex: "status",
           key: "status",
-          render: (text,record) => {
+          render: (text, record) => {
             // return getStatus(text);
             return getInvoiceStatus(text, record);
           }
@@ -487,7 +488,7 @@ const invoiceApplyListQuery = React.createClass({
               createTime: thisdata.createTime, //流程状态
               status: thisdata.status, //结算状态
               rejectReason: thisdata.rejectReason,
-              approval:thisdata.approval,//0非特批 1待审核 2审核通过
+              approval: thisdata.approval,//0非特批 1待审核 2审核通过
             });
           }
         }
@@ -535,8 +536,9 @@ const invoiceApplyListQuery = React.createClass({
     this.state.releaseDate = [];
     this.state.orderNoSearch = "";
     this.state.processStatus = [];
-    this.state.departmenttList = [];
+    this.state.departmenttList = undefined;
     this.state.statusSearch = [];
+    this.Cascaders.empty();
     this.loadData();
   },
   changeList(arr) {
@@ -597,18 +599,31 @@ const invoiceApplyListQuery = React.createClass({
                   this.setState({ orderNoSearch: e.target.value });
                 }}
               />
-              <DepartmentList
+              <Cascaders
+                ref={node => this.Cascaders = node}
+                placeholder="订单部门"
+                id="id"
+                name="name"
+                children="list"
+                height={28}
+                onSel={(e) => {
+                  this.setState({
+                    departmenttList: JSON.stringify(e),
+                  });
+                }}
+              />
+              {/* <DepartmentList
                   value={this.state.departmenttList}
                   onChange={e => {
                 this.setState({ departmenttList: e });
-              }}/>
+              }}/> */}
               <Button
                 type="primary"
                 onClick={this.search}
                 style={{ marginLeft: 10 }}
               >
                 搜索
-          </Button>
+              </Button>
               <Button onClick={this.reset}>重置</Button>
             </div>
           </TabPane>
@@ -939,8 +954,8 @@ const invoiceApplyListQuery = React.createClass({
                     </div>
                   </div>
                 ) : (
-                    ""
-                  )}
+                  ""
+                )}
                 {/* <FormItem
                   className="half-item"
                   {...formItemLayout}

+ 26 - 11
js/component/manageCenter/financialManage/distribute/invoiceApplyListWai.jsx

@@ -32,6 +32,7 @@ import { ChooseList } from "../../order/orderNew/chooseList";
 import { getProjectName } from "../../../tools";
 import DepartmentList from "../../../common/departmentList";
 import LogPopup from "../../../common/logPopup";
+import Cascaders from "../../../common/cascaders";
 
 const invoiceApplyListWai = React.createClass({
   loadData(pageNo) {
@@ -51,7 +52,7 @@ const invoiceApplyListWai = React.createClass({
         pageSize: this.state.pagination.pageSize,
         name: this.state.nameSearch, //客户名称
         orderNo: this.state.orderNoSearch,
-        orderDep: this.state.departmenttList,
+        deps: this.state.departmenttList,
         type: 1,
       },
       success: function (data) {
@@ -580,11 +581,12 @@ const invoiceApplyListWai = React.createClass({
     this.loadData();
   },
   reset() {
-    this.state.nameSearch = "";
-    this.state.releaseDate = [];
-    this.state.orderNoSearch = "";
-    this.state.processStatus = [];
-    this.state.departmenttList = [];
+    this.state.nameSearch = undefined;
+    this.state.releaseDate = undefined;
+    this.state.orderNoSearch = undefined;
+    this.state.processStatus = undefined;
+    this.state.departmenttList = undefined;
+    this.Cascaders.empty();
     this.loadData();
   },
   changeList(arr) {
@@ -607,12 +609,12 @@ const invoiceApplyListWai = React.createClass({
     };
     return (
       <div className="user-content">
-        <div className="content-title">
-          <span>省外开票审核</span>
+        <div className="content-title" style={{ marginBottom: 10 }}>
+          <span style={{ fontWeight: 900, fontSize: 16 }}>省外开票审核</span>
         </div>
         <Tabs defaultActiveKey="1" onChange={this.callback} className="test">
           <TabPane tab="搜索" key="1">
-            <div className="user-search">
+            <div className="user-search" style={{ padding: "0 10px" }}>
               <Input
                 placeholder="营销员名称"
                 value={this.state.nameSearch}
@@ -627,12 +629,25 @@ const invoiceApplyListWai = React.createClass({
                   this.setState({ orderNoSearch: e.target.value });
                 }}
               />
-              <DepartmentList
+              <Cascaders
+                ref={node => this.Cascaders = node}
+                placeholder="订单部门"
+                id="id"
+                name="name"
+                children="list"
+                height={28}
+                onSel={(e) => {
+                  this.setState({
+                    departmenttList: JSON.stringify(e),
+                  });
+                }}
+              />
+              {/* <DepartmentList
                 value={this.state.departmenttList}
                 onChange={(e) => {
                   this.setState({ departmenttList: e });
                 }}
-              />
+              /> */}
               <Button
                 type="primary"
                 onClick={this.search}

+ 40 - 25
js/component/manageCenter/financialManage/distribute/outInvoiceQuery.jsx

@@ -27,9 +27,10 @@ import {
 import ShowModalDiv from "@/showModal.jsx";
 import { ChooseList } from "../../../../component/manageCenter/order/orderNew/chooseList";
 import ImgList from "../../../common/imgList";
-import {getProjectName} from "../../../tools";
+import { getProjectName } from "../../../tools";
 import DepartmentList from "../../../common/departmentList";
 import LogPopup from "../../../common/logPopup";
+import Cascaders from "../../../common/cascaders";
 
 const FormItem = Form.Item;
 const { TabPane } = Tabs
@@ -52,11 +53,11 @@ const outInvoiceQuery = React.createClass({
         pageSize: this.state.pagination.pageSize,
         name: this.state.nameSearch, //客户名称
         orderNo: this.state.orderNoSearch,
-        orderDep: this.state.departmenttList,
+        deps: this.state.departmenttList,
         status: this.state.statusSearch,
         type: 1,
         approval: this.state.processStatus,
-        all:1,
+        all: 1,
       },
       success: function (data) {
         ShowModal(this);
@@ -200,17 +201,17 @@ const outInvoiceQuery = React.createClass({
           title: "客户",
           dataIndex: "unitName",
           key: "unitName",
-          width:100,
+          width: 100,
           render: text => {
             return (
-                <Tooltip title={text}>
-                  <div style={{
-                    maxWidth:'100px',
-                    overflow:'hidden',
-                    textOverflow: "ellipsis",
-                    whiteSpace:'nowrap',
-                  }}>{text}</div>
-                </Tooltip>
+              <Tooltip title={text}>
+                <div style={{
+                  maxWidth: '100px',
+                  overflow: 'hidden',
+                  textOverflow: "ellipsis",
+                  whiteSpace: 'nowrap',
+                }}>{text}</div>
+              </Tooltip>
             )
           }
         },
@@ -223,7 +224,7 @@ const outInvoiceQuery = React.createClass({
           title: "开票状态",
           dataIndex: "status",
           key: "status",
-          render: (text,record) => {
+          render: (text, record) => {
             // return getStatus(text);
             return getInvoiceStatus(text, record);
           }
@@ -353,7 +354,7 @@ const outInvoiceQuery = React.createClass({
           //   return getInvoiceStatus(text, {
           //     approval: 0
           //   });
-            
+
           // }
           render: (text, record) => {
             return <div>{getInvoiceStatus(text, record)} <LogPopup id={record.id} /></div>;
@@ -480,7 +481,7 @@ const outInvoiceQuery = React.createClass({
               createTime: thisdata.createTime, //流程状态
               status: thisdata.status, //结算状态
               rejectReason: thisdata.rejectReason,
-              approval:thisdata.approval,//0非特批 1待审核 2审核通过
+              approval: thisdata.approval,//0非特批 1待审核 2审核通过
             });
           }
         }
@@ -542,8 +543,9 @@ const outInvoiceQuery = React.createClass({
     this.state.releaseDate = [];
     this.state.orderNoSearch = "";
     this.state.processStatus = [];
-    this.state.departmenttList = [];
+    this.state.departmenttList = undefined;
     this.state.statusSearch = [];
+    this.Cascaders.empty();
     this.loadData();
   },
   render() {
@@ -578,11 +580,24 @@ const outInvoiceQuery = React.createClass({
                   this.setState({ orderNoSearch: e.target.value });
                 }}
               />
-              <DepartmentList
+              <Cascaders
+                ref={node => this.Cascaders = node}
+                placeholder="订单部门"
+                id="id"
+                name="name"
+                children="list"
+                height={28}
+                onSel={(e) => {
+                  this.setState({
+                    departmenttList: JSON.stringify(e),
+                  });
+                }}
+              />
+              {/* <DepartmentList
                   value={this.state.departmenttList}
                   onChange={e => {
                     this.setState({ departmenttList: e });
-                  }}/>
+                  }}/> */}
               {/* <Select
                 placeholder="特批状态"
                 onChange={e => {
@@ -611,7 +626,7 @@ const outInvoiceQuery = React.createClass({
                 style={{ marginLeft: 10 }}
               >
                 搜索
-          </Button>
+              </Button>
               <Button onClick={this.reset}>重置</Button>
             </div>
           </TabPane>
@@ -858,9 +873,9 @@ const outInvoiceQuery = React.createClass({
                     {/*    });*/}
                     {/*  }}*/}
                     {/*/>*/}
-                    {this.state.avisible && this.state.orgCodeUrl ? <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
-                      <ImgList fileList={this.state.orgCodeUrl} ItemWidth={'96px'}/>
-                    </div> : <div/>}
+                    {this.state.avisible && this.state.orgCodeUrl ? <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
+                      <ImgList fileList={this.state.orgCodeUrl} ItemWidth={'96px'} />
+                    </div> : <div />}
                     <Modal
                       maskClosable={false}
                       footer={null}
@@ -935,8 +950,8 @@ const outInvoiceQuery = React.createClass({
                     </div>
                   </div>
                 ) : (
-                    ""
-                  )}
+                  ""
+                )}
                 {/* <FormItem
                   className="half-item"
                   {...formItemLayout}
@@ -951,7 +966,7 @@ const outInvoiceQuery = React.createClass({
               </div>
             </Spin>
           </Form>
-        </Modal> : <div/>}
+        </Modal> : <div />}
         <Modal
           maskClosable={false}
           visible={this.state.bvisible}

+ 18 - 2
js/component/manageCenter/financialManage/distribute/projectvip.jsx

@@ -12,6 +12,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;
 
@@ -398,6 +399,7 @@ const ProjectVip = React.createClass({
     this.setState({
       searchValues: JSON.parse(JSON.stringify({})),
     }, () => {
+      this.Cascaders.empty();
       this.loadData();
     })
   },
@@ -629,7 +631,21 @@ const ProjectVip = 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"]
@@ -647,7 +663,7 @@ const ProjectVip = React.createClass({
                     <Select.Option key={item.id}>{item.name}</Select.Option>
                   );
                 })}
-              </Select>
+              </Select> */}
               <Input
                 placeholder="合同编号"
                 value={searchValues["contractNo"]

+ 60 - 11
js/component/manageCenter/financialManage/distribute/shouKuanAll.jsx

@@ -142,7 +142,7 @@ const ShouKuang = React.createClass({
         endTime: this.state.releaseDate[1],
         startFinalReceivablesTime: this.state.shouKuanDate[0],
         endFinalReceivablesTime: this.state.shouKuanDate[1],
-        departmentId: this.state.departmenttList,
+        deps: this.state.departmenttList,
         processStatus: this.state.processStatusSearch,
         contractNo: this.state.contractNoSearch,
         liquidationStatus: this.state.liquidationStatus,
@@ -1596,6 +1596,7 @@ const ShouKuang = React.createClass({
     this.state.contractNoSearch = "";
     this.state.liquidationStatus = [];
     this.state.contractNo = "";
+    this.Cascaders.empty();
     this.loadData();
   },
   //驳回
@@ -1796,14 +1797,49 @@ const ShouKuang = React.createClass({
       `orderNo=${this.state.selectedRowKeys}`;
   },
   exportAll() {
-    window.location.href =
-      globalConfig.context +
-      "/api/admin/receivables/exportReceivables?" +
-      `orderNo=${this.state.orderNoSearch ? this.state.orderNoSearch : ""
-      }&buyerName=${this.state.nameSearch ? this.state.nameSearch : ""
-      }&departmentId=${this.state.departmenttList ? this.state.departmenttList : ""
-      }&contractNo=${this.state.contractNoSearch ? this.state.contractNoSearch : ""
-      }&processStatus=${this.state.processStatusSearch}`;
+    message.config({
+      duration: 20,
+    });
+    let loading = message.loading("下载中...");
+    this.setState({
+      exportPendingLoading: true,
+    });
+    const data = {
+      orderNo: this.state.orderNoSearch,
+      buyerName: this.state.nameSearch,
+      deps: this.state.departmenttList,
+      contractNo: this.state.contractNoSearch,
+      processStatus: this.state.processStatusSearch,
+    }
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: "/api/admin/receivables/exportReceivables",
+      data,
+      success: function (data) {
+        if (data.error.length === 0) {
+          this.download(data.data);
+        } else {
+          message.warning(data.error[0].message);
+        }
+      }.bind(this),
+    }).always(
+      function () {
+        loading();
+        this.setState({
+          exportPendingLoading: false,
+        });
+      }.bind(this)
+    );
+    // window.location.href =
+    //   globalConfig.context +
+    //   "/api/admin/receivables/exportReceivables?" +
+    //   `orderNo=${this.state.orderNoSearch ? this.state.orderNoSearch : ""
+    //   }&buyerName=${this.state.nameSearch ? this.state.nameSearch : ""
+    //   }&departmentId=${this.state.departmenttList ? this.state.departmenttList : ""
+    //   }&contractNo=${this.state.contractNoSearch ? this.state.contractNoSearch : ""
+    //   }&processStatus=${this.state.processStatusSearch}`;
   },
   exportWater() {
     window.location.href =
@@ -2468,7 +2504,20 @@ const ShouKuang = React.createClass({
                   this.setState({ nameSearch: e.target.value });
                 }}
               />
-              <Select
+              <Cascaders
+                ref={node => this.Cascaders = node}
+                placeholder="订单部门"
+                id="id"
+                name="name"
+                children="list"
+                height={28}
+                onSel={(e) => {
+                  this.setState({
+                    departmenttList: JSON.stringify(e),
+                  });
+                }}
+              />
+              {/* <Select
                 placeholder="订单部门"
                 style={{ width: 180, marginRight: 10 }}
                 value={this.state.departmenttList}
@@ -2481,7 +2530,7 @@ const ShouKuang = React.createClass({
                     <Select.Option key={item.id}>{item.name}</Select.Option>
                   );
                 })}
-              </Select>
+              </Select> */}
               <Input
                 placeholder="合同编号"
                 value={this.state.contractNoSearch}

+ 79 - 19
js/component/manageCenter/financialManage/distribute/shouKuang.jsx

@@ -45,6 +45,8 @@ import { throws } from "assert";
 import { getProjectName, getClockState } from "@/tools";
 import { clockState, salesList } from "@/dataDic";
 import OrderItemStatus from "../../../common/orderItemStatus";
+import Cascaders from "../../../common/cascaders";
+
 const FormItem = Form.Item;
 const { TabPane } = Tabs;
 const { TextArea } = Input;
@@ -146,7 +148,7 @@ const ShouKuang = React.createClass({
         endTime: this.state.releaseDate[1],
         startFinalReceivablesTime: this.state.shouKuanDate[0],
         endFinalReceivablesTime: this.state.shouKuanDate[1],
-        departmentId: this.state.departmenttList,
+        deps: this.state.departmenttList,
         processStatus: this.state.processStatusSearch,
         contractNo: this.state.contractNoSearch,
         liquidationStatus: this.state.liquidationStatus,
@@ -1105,7 +1107,7 @@ const ShouKuang = React.createClass({
           key: "orderNo",
           className: "title-table",
           fixed: "left",
-          width: 140,
+          width: 150,
           render: (text, record) => {
             return (
               <Tooltip
@@ -1654,6 +1656,7 @@ const ShouKuang = React.createClass({
     this.state.liquidationStatus = [];
     this.state.processStatusSearch = [];
     this.state.contractNo = "";
+    this.Cascaders.empty();
     this.loadData();
   },
   //驳回
@@ -1856,14 +1859,55 @@ const ShouKuang = React.createClass({
       `orderNo=${this.state.selectedRowKeys}`;
   },
   exportAll() {
+    message.config({
+      duration: 20,
+    });
+    let loading = message.loading("下载中...");
+    this.setState({
+      exportPendingLoading: true,
+    });
+    let data = {
+      orderNo: this.state.orderNoSearch,
+      buyerName: this.state.nameSearch,
+      deps: this.state.departmenttList,
+      contractNo: this.state.contractNoSearch,
+      processStatus: this.state.processStatusSearch,
+    };
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: "/api/admin/receivables/exportReceivables",
+      data,
+      success: function (data) {
+        if (data.error.length === 0) {
+          this.download(data.data);
+        } else {
+          message.warning(data.error[0].message);
+        }
+      }.bind(this),
+    }).always(
+      function () {
+        loading();
+        this.setState({
+          exportPendingLoading: false,
+        });
+      }.bind(this)
+    );
+
+    // window.location.href =
+    //   globalConfig.context +
+    //   "/api/admin/receivables/exportReceivables?" +
+    //   `orderNo=${this.state.orderNoSearch ? this.state.orderNoSearch : ""
+    //   }&buyerName=${this.state.nameSearch ? this.state.nameSearch : ""
+    //   }&deps=${this.state.departmenttList ? this.state.departmenttList : ""
+    //   }&contractNo=${this.state.contractNoSearch ? this.state.contractNoSearch : ""
+    //   }&processStatus=${this.state.processStatusSearch}`;
+  },
+  // 下载
+  download(fileName) {
     window.location.href =
-      globalConfig.context +
-      "/api/admin/receivables/exportReceivables?" +
-      `orderNo=${this.state.orderNoSearch ? this.state.orderNoSearch : ""
-      }&buyerName=${this.state.nameSearch ? this.state.nameSearch : ""
-      }&departmentId=${this.state.departmenttList ? this.state.departmenttList : ""
-      }&contractNo=${this.state.contractNoSearch ? this.state.contractNoSearch : ""
-      }&processStatus=${this.state.processStatusSearch}`;
+      globalConfig.context + "/open/download?fileName=" + fileName;
   },
   exportWater() {
     window.location.href =
@@ -2542,8 +2586,9 @@ const ShouKuang = React.createClass({
             </div>
           </TabPane>
           <TabPane tab="搜索" key="2">
-            <div className="user-search" style={{ marginLeft: 10 }}>
+            <div className="user-search" style={{ padding: "0 20px 0 10px" }}>
               <Input
+                style={{ width: 200 }}
                 placeholder="订单编号"
                 value={this.state.orderNoSearch}
                 onChange={(e) => {
@@ -2551,13 +2596,27 @@ const ShouKuang = React.createClass({
                 }}
               />
               <Input
+                style={{ width: 200 }}
                 placeholder="客户名称"
                 value={this.state.nameSearch}
                 onChange={(e) => {
                   this.setState({ nameSearch: e.target.value });
                 }}
               />
-              <Select
+              <Cascaders
+                ref={node => this.Cascaders = node}
+                placeholder="订单部门"
+                id="id"
+                name="name"
+                children="list"
+                height={28}
+                onSel={(e) => {
+                  this.setState({
+                    departmenttList: JSON.stringify(e),
+                  });
+                }}
+              />
+              {/* <Select
                 placeholder="订单部门"
                 style={{ width: 190, marginRight: 10 }}
                 value={this.state.departmenttList}
@@ -2570,8 +2629,9 @@ const ShouKuang = React.createClass({
                     <Select.Option key={item.id}>{item.name}</Select.Option>
                   );
                 })}
-              </Select>
+              </Select> */}
               <Input
+                style={{ width: 200 }}
                 placeholder="合同编号"
                 value={this.state.contractNoSearch}
                 onChange={(e) => {
@@ -2585,7 +2645,7 @@ const ShouKuang = React.createClass({
                 onChange={(e) => {
                   this.setState({ processStatusSearch: e });
                 }}
-                style={{ width: 120, marginRight: 10 }}
+                style={{ width: 150, marginRight: 10 }}
                 value={this.state.processStatusSearch}
               >
                 <Option value="3">未分配</Option>
@@ -2597,7 +2657,7 @@ const ShouKuang = React.createClass({
                 onChange={(e) => {
                   this.setState({ liquidationStatus: e });
                 }}
-                style={{ width: 120, marginRight: 10 }}
+                style={{ width: 150, marginRight: 10 }}
                 value={this.state.liquidationStatus}
               >
                 <Option value="0">首付待付清</Option>
@@ -2605,7 +2665,7 @@ const ShouKuang = React.createClass({
                 <Option value="2">已付清</Option>
               </Select>
               <Select
-                style={{ width: 120 }}
+                style={{ width: 150 }}
                 placeholder="签单金额"
                 value={this.state.amountStatus}
                 onChange={(e) => {
@@ -2621,7 +2681,7 @@ const ShouKuang = React.createClass({
                 <Option value="4">40万元以上</Option>
               </Select>
               <Select
-                style={{ width: 120 }}
+                style={{ width: 150 }}
                 placeholder="特批状态"
                 value={this.state.approval}
                 onChange={(e) => {
@@ -2636,7 +2696,7 @@ const ShouKuang = React.createClass({
                 <Option value="4">全部特批</Option>
               </Select>
               <Select
-                style={{ width: 120 }}
+                style={{ width: 150 }}
                 placeholder="会员状态"
                 value={this.state.projectType}
                 onChange={(e) => {
@@ -2662,7 +2722,7 @@ const ShouKuang = React.createClass({
                   this.setState({ releaseDate: dataString });
                 }}
               />
-              <span>最近收款:</span>
+              <span style={{ marginLeft: 10 }}>最近收款:</span>
               <RangePicker
                 value={[
                   this.state.shouKuanDate[0]
@@ -3624,7 +3684,7 @@ const ShouKuang = React.createClass({
           onCancel={this.visitCancels}
           loading={this.state.loading}
         />
-        <textarea id="copyText" style={{ opacity: 0 }} /> 
+        <textarea id="copyText" style={{ opacity: 0 }} />
       </div>
     );
   },

+ 20 - 6
js/component/manageCenter/financialManage/flowWater/myWater.jsx

@@ -8,6 +8,7 @@ import { getTransactionProject, ShowModal } from "@/tools";
 import WaterDesc from './waterDetail';
 import { ChooseList } from "../../order/orderNew/chooseList";
 import ShowModalDiv from "@/showModal.jsx";
+import Cascaders from "../../../common/cascaders";
 
 const { TabPane } = Tabs
 const MyWater = React.createClass({
@@ -71,7 +72,7 @@ const MyWater = React.createClass({
         startTime: this.state.releaseDate[0],
         endTime: this.state.releaseDate[1],
         orderNo: this.state.orderNo,
-        departmentId: this.state.departmentId
+        deps: this.state.deps
       },
       success: function (data) {
         ShowModal(this);
@@ -233,8 +234,9 @@ const MyWater = React.createClass({
     this.state.orderNo = "";
     this.state.payeeNameSearch = "";
     this.state.releaseDate = [];
-    this.state.departmentId = undefined;
+    this.state.deps = undefined;
     this.state.payerNameSearch = "";
+    this.Cascaders.empty();
     this.loadData();
   },
   searchSwitch() {
@@ -302,7 +304,20 @@ const MyWater = React.createClass({
                   this.setState({ payerNameSearch: e.target.value });
                 }}
               />
-              <Select
+              <Cascaders
+                ref={node => this.Cascaders = node}
+                placeholder="订单部门"
+                id="id"
+                name="name"
+                children="list"
+                height={28}
+                onSel={(e) => {
+                  this.setState({
+                    deps: JSON.stringify(e),
+                  });
+                }}
+              />
+              {/* <Select
                 placeholder="订单部门"
                 style={{ width: 150, marginRight: 10 }}
                 value={this.state.departmentId}
@@ -313,7 +328,7 @@ const MyWater = React.createClass({
                 {departmentArr.map(function (item) {
                   return <Select.Option key={item.id}>{item.name}</Select.Option>;
                 })}
-              </Select>
+              </Select> */}
               <span style={{ marginRight: 10 }}>流水时间 :</span>
               <RangePicker
                 value={[
@@ -334,7 +349,7 @@ const MyWater = React.createClass({
                 style={{ marginLeft: 10 }}
               >
                 搜索
-          </Button>
+              </Button>
               <Button onClick={this.reset}>重置</Button>
             </div>
           </TabPane>
@@ -363,7 +378,6 @@ const MyWater = React.createClass({
               rowSelection={false}
               pagination={this.state.pagination}
               onRowClick={this.tableRowClick}
-              bordered
               size="small"
             />
           </Spin>

+ 1 - 12
js/component/manageCenter/index/content.jsx

@@ -254,21 +254,10 @@ const MessageModal = React.createClass({
         $.ajax({
             method: "get",
             dataType: "json",
-            url: globalConfig.context + "/api/admin/organization/selectSuperId",
+            url: globalConfig.context + "/api/admin/organization/getAllDep",
             data: {},
             success: function (data) {
-                let theArr = [];
                 if (data.error && data.error.length === 0) {
-                    // for (let i = 0; i < data.data.length; i++) {
-                    //     let theData = data.data[i];
-                    //     theArr.push({
-                    //         value: theData.id,
-                    //         label: theData.name,
-                    //     });
-                    // }
-                    // this.setState({
-                    //     contactsOption: theArr,
-                    // });
                     localStorage.setItem("departmentData", JSON.stringify(data.data))
                 } else {
                     // message.warning(data.error[0].message);

+ 2 - 2
js/component/manageCenter/legalAffairs/collectioning/index.jsx

@@ -167,8 +167,8 @@ class Collectioningn extends Component {
           placeholder: "请输入营销人名称",
         },
         {
-          type: "departmentSelect",
-          dataKey: "depId",
+          type: "newDepartmentSelect",
+          dataKey: "deps",
           placeholder: "请选择订单部门",
         },
         {

+ 2 - 2
js/component/manageCenter/legalAffairs/completedLegalAffairs/index.jsx

@@ -129,8 +129,8 @@ class CompletedLegalAffairs extends Component {
           placeholder: "请输入营销人名称",
         },
         {
-          type: "departmentSelect",
-          dataKey: "depId",
+          type: "newDepartmentSelect",
+          dataKey: "deps",
           placeholder: "请选择订单部门",
         },
         {

+ 2 - 2
js/component/manageCenter/legalAffairs/delayLegalAffairs/index.jsx

@@ -168,8 +168,8 @@ class DelayLegalAffairs extends Component {
           placeholder: "请输入营销人名称",
         },
         {
-          type: "departmentSelect",
-          dataKey: "depId",
+          type: "newDepartmentSelect",
+          dataKey: "deps",
           placeholder: "请选择订单部门",
         },
         {

+ 14 - 4
js/component/manageCenter/order/orderNew/addService.jsx

@@ -1895,14 +1895,24 @@ const NewService = Form.create()(
             }
             thedata = {};
           } else {
-            thedata.map(function (item, index) {
+            thedata.forEach((item) => {
               theArr.push({
-                key: index,
+                key: item.id,
                 name: item.name,
                 id: item.id,
                 depNo: item.depNo,
-              });
-            });
+              })
+              if (item.list) {
+                item.list.forEach((itl) => {
+                  theArr.push({
+                    key: itl.id,
+                    name: itl.name,
+                    id: itl.id,
+                    depNo: itl.depNo,
+                  })
+                });
+              }
+            })
           }
           this.setState({
             departmentArr: theArr,

+ 149 - 95
js/component/manageCenter/order/orderNew/approveds.jsx

@@ -39,7 +39,7 @@ import { ChooseList } from "../orderNew/chooseList";
 import ShowModalDiv from "@/showModal.jsx";
 import Project from "../../../../component/project";
 import ImgList from "../../../common/imgList";
-import {getProjectName} from "../../../tools";
+import { getProjectName } from "../../../tools";
 import ProjectDetailsReadOnly from "../../../common/projectDetailsReadOnly";
 import DepartmentList from "../../../common/departmentList";
 import OrderItemStatus from "../../../common/orderItemStatus";
@@ -87,8 +87,8 @@ const PicturesWall = React.createClass({
     return (
       <div style={{ display: "inline-block" }}>
         <ImgList
-            domId={this.props.domId}
-            fileList={fileList}
+          domId={this.props.domId}
+          fileList={fileList}
         />
       </div>
     );
@@ -117,7 +117,7 @@ const IntentionCustomer = Form.create()(
           name: this.state.nameSearch, //名称
           orderNo: this.state.orderNoSearch, //订单编号
           contractNo: this.state.contractNoSearch, //合同编号
-          depId: this.state.departmenttList, //订单部门
+          deps: this.state.departmenttList, //订单部门
           starTime: this.state.releaseDate[0], //开始时间
           endTime: this.state.releaseDate[1], //结束时间
           approval: this.state.approvalSearch ? this.state.approvalSearch : 0, //审批状态
@@ -180,7 +180,7 @@ const IntentionCustomer = Form.create()(
       return {
         page: 1,
         declarationBatch: 1,
-        orderNos:'',
+        orderNos: '',
         dataInfor: {},
         releaseDate: [],
         selectedRowKeys: [],
@@ -263,14 +263,14 @@ const IntentionCustomer = Form.create()(
             className: "title-table",
             render: text => {
               return (
-                  <Tooltip title={text}>
-                    <div style={{
-                      maxWidth:'150px',
-                      overflow:'hidden',
-                      textOverflow: "ellipsis",
-                      whiteSpace:'nowrap',
-                    }}>{text}</div>
-                  </Tooltip>
+                <Tooltip title={text}>
+                  <div style={{
+                    maxWidth: '150px',
+                    overflow: 'hidden',
+                    textOverflow: "ellipsis",
+                    whiteSpace: 'nowrap',
+                  }}>{text}</div>
+                </Tooltip>
               )
             }
           },
@@ -465,9 +465,9 @@ const IntentionCustomer = Form.create()(
             title: "催款科目",
             dataIndex: "dunTypeName",
             key: "dunTypeName",
-            render: (text,record) => {
+            render: (text, record) => {
               if (record.customizeName) {
-                return text +  record.customizeName;
+                return text + record.customizeName;
               }
               return <span>{text}</span>;
             },
@@ -622,14 +622,14 @@ const IntentionCustomer = Form.create()(
             key: "userName",
             render: text => {
               return (
-                  <Tooltip title={text}>
-                    <div style={{
-                      maxWidth:'150px',
-                      overflow:'hidden',
-                      textOverflow: "ellipsis",
-                      whiteSpace:'nowrap',
-                    }}>{text}</div>
-                  </Tooltip>
+                <Tooltip title={text}>
+                  <div style={{
+                    maxWidth: '150px',
+                    overflow: 'hidden',
+                    textOverflow: "ellipsis",
+                    whiteSpace: 'nowrap',
+                  }}>{text}</div>
+                </Tooltip>
               )
             }
           },
@@ -751,14 +751,14 @@ const IntentionCustomer = Form.create()(
             key: "userName",
             render: text => {
               return (
-                  <Tooltip title={text}>
-                    <div style={{
-                      maxWidth:'150px',
-                      overflow:'hidden',
-                      textOverflow: "ellipsis",
-                      whiteSpace:'nowrap',
-                    }}>{text}</div>
-                  </Tooltip>
+                <Tooltip title={text}>
+                  <div style={{
+                    maxWidth: '150px',
+                    overflow: 'hidden',
+                    textOverflow: "ellipsis",
+                    whiteSpace: 'nowrap',
+                  }}>{text}</div>
+                </Tooltip>
               )
             }
           },
@@ -857,14 +857,14 @@ const IntentionCustomer = Form.create()(
             key: "userName",
             render: text => {
               return (
-                  <Tooltip title={text}>
-                    <div style={{
-                      maxWidth:'150px',
-                      overflow:'hidden',
-                      textOverflow: "ellipsis",
-                      whiteSpace:'nowrap',
-                    }}>{text}</div>
-                  </Tooltip>
+                <Tooltip title={text}>
+                  <div style={{
+                    maxWidth: '150px',
+                    overflow: 'hidden',
+                    textOverflow: "ellipsis",
+                    whiteSpace: 'nowrap',
+                  }}>{text}</div>
+                </Tooltip>
               )
             }
           },
@@ -960,7 +960,7 @@ const IntentionCustomer = Form.create()(
     tableRowClick(record) {
       this.setState({
         visible: true,
-        orderNos:record.orderNo
+        orderNos: record.orderNo
       });
       this.xiangqing(record.orderNo);
       this.xiangmu(record.orderNo);
@@ -979,7 +979,7 @@ const IntentionCustomer = Form.create()(
         taskComment: record.taskComment, //备注
         main: record.main.toString(), //是否为主要
         addnextVisible: true,
-        dataInfor:record,
+        dataInfor: record,
         addState: 0,
       });
     },
@@ -1025,31 +1025,31 @@ const IntentionCustomer = Form.create()(
               orderRemarks: thisdata.orderRemarks, //订单留言
               orgCodeUrl: thisdata.contractPictureUrl
                 ? splitUrl(
-                    thisdata.contractPictureUrl,
-                    ",",
-                    globalConfig.avatarHost + "/upload"
-                  )
+                  thisdata.contractPictureUrl,
+                  ",",
+                  globalConfig.avatarHost + "/upload"
+                )
                 : [], //图片地址
               replenishUrl: thisdata.agreementUrl
                 ? splitUrl(
-                    thisdata.agreementUrl,
-                    ",",
-                    globalConfig.avatarHost + "/upload"
-                  )
+                  thisdata.agreementUrl,
+                  ",",
+                  globalConfig.avatarHost + "/upload"
+                )
                 : [],
-                contentUrl:thisdata.serviceContent
+              contentUrl: thisdata.serviceContent
                 ? splitUrl(
-                    thisdata.serviceContent,
-                    ",",
-                    globalConfig.avatarHost + "/upload"
-                  )
+                  thisdata.serviceContent,
+                  ",",
+                  globalConfig.avatarHost + "/upload"
+                )
                 : [], //图片地址
               salesmanName: thisdata.salesmanName, //营销员名称
               salesmanMobile: thisdata.salesmanMobile, //营销员电话
               financeName: thisdata.financeName, //财务名称
               financeMobile: thisdata.financeMobile, //财务电话
               outsource: thisdata.outsource == 0 ? "否" : "是",
-              deleteSign:thisdata.deleteSign,
+              deleteSign: thisdata.deleteSign,
             });
           }
         }.bind(this),
@@ -1378,6 +1378,7 @@ const IntentionCustomer = Form.create()(
       this.state.releaseDate[0] = undefined;
       this.state.releaseDate[1] = undefined;
       this.state.approvalSearch = "1";
+      this.Cascaders.empty();
       this.loadData();
     },
     resets() {
@@ -1578,18 +1579,58 @@ const IntentionCustomer = Form.create()(
         `orderNo=${this.state.selectedRowKeys}`;
     },
     exportAll() {
+      message.config({
+        duration: 20,
+      });
+      let loading = message.loading("下载中...");
+      this.setState({
+        exportPendingLoading: true,
+      });
+      let data = {
+        orderNo: this.state.orderNoSearch,
+        buyerName: this.state.nameSearch,
+        deps: this.state.departmenttList,
+        contractNo: this.state.contractNoSearch,
+        processStatus: this.state.processStatusSearch,
+      };
+      $.ajax({
+        method: "get",
+        dataType: "json",
+        crossDomain: false,
+        url: "/api/admin/receivables/exportReceivables",
+        data,
+        success: function (data) {
+          if (data.error.length === 0) {
+            this.download(data.data);
+          } else {
+            message.warning(data.error[0].message);
+          }
+        }.bind(this),
+      }).always(
+        function () {
+          loading();
+          this.setState({
+            exportPendingLoading: false,
+          });
+        }.bind(this)
+      )
+      // window.location.href =
+      //   globalConfig.context +
+      //   "/api/admin/receivables/exportReceivables?" +
+      //   `orderNo=${
+      //     this.state.orderNoSearch ? this.state.orderNoSearch : ""
+      //   }&buyerName=${
+      //     this.state.nameSearch ? this.state.nameSearch : ""
+      //   }&departmentId=${
+      //     this.state.departmenttList ? this.state.departmenttList : ""
+      //   }&contractNo=${
+      //     this.state.contractNoSearch ? this.state.contractNoSearch : ""
+      //   }&processStatus=${this.state.processStatusSearch}`;
+    },
+    // 下载
+    download(fileName) {
       window.location.href =
-        globalConfig.context +
-        "/api/admin/receivables/exportReceivables?" +
-        `orderNo=${
-          this.state.orderNoSearch ? this.state.orderNoSearch : ""
-        }&buyerName=${
-          this.state.nameSearch ? this.state.nameSearch : ""
-        }&departmentId=${
-          this.state.departmenttList ? this.state.departmenttList : ""
-        }&contractNo=${
-          this.state.contractNoSearch ? this.state.contractNoSearch : ""
-        }&processStatus=${this.state.processStatusSearch}`;
+        globalConfig.context + "/open/download?fileName=" + fileName;
     },
     exportWater() {
       window.location.href =
@@ -1829,7 +1870,7 @@ const IntentionCustomer = Form.create()(
                 createTime: thisdata.createTime, //流程状态
                 status: thisdata.status, //结算状态
                 rejectReason: thisdata.rejectReason,
-                approval:thisdata.approval,//0非特批 1待审核 2审核通过
+                approval: thisdata.approval,//0非特批 1待审核 2审核通过
               });
             }
           }
@@ -1933,11 +1974,24 @@ const IntentionCustomer = Form.create()(
                     this.setState({ nameSearch: e.target.value });
                   }}
                 />
-                <DepartmentList
-                    value={this.state.departmenttList}
-                    onChange={e => {
-                      this.setState({ departmenttList: e });
-                    }}/>
+                <Cascaders
+                  ref={node => this.Cascaders = node}
+                  placeholder="订单部门"
+                  id="id"
+                  name="name"
+                  children="list"
+                  height={28}
+                  onSel={(e) => {
+                    this.setState({
+                      departmenttList: JSON.stringify(e),
+                    });
+                  }}
+                />
+                {/* <DepartmentList
+                  value={this.state.departmenttList}
+                  onChange={e => {
+                    this.setState({ departmenttList: e });
+                  }} /> */}
                 <Input
                   placeholder="合同编号"
                   value={this.state.contractNoSearch}
@@ -2236,8 +2290,8 @@ const IntentionCustomer = Form.create()(
               >
                 <Spin spinning={this.state.loading}>
                   <div className="clearfix">
-                    <div style={{position:"absolute",top:'-52px',left:'81px',zIndex:10000}}>
-                      <OrderItemStatus deleteSign={this.state.deleteSign}/>
+                    <div style={{ position: "absolute", top: '-52px', left: '81px', zIndex: 10000 }}>
+                      <OrderItemStatus deleteSign={this.state.deleteSign} />
                     </div>
                     <FormItem
                       className="half-item"
@@ -2261,9 +2315,9 @@ const IntentionCustomer = Form.create()(
                       <span>
                         {this.state.userName}
                         <EnterpriseNameChange
-                            type='journal'
-                            style={{ marginLeft: 10 }}
-                            enterpriseId={this.state.orderUid}/>
+                          type='journal'
+                          style={{ marginLeft: 10 }}
+                          enterpriseId={this.state.orderUid} />
                       </span>
                     </FormItem>
                     <FormItem
@@ -2409,10 +2463,10 @@ const IntentionCustomer = Form.create()(
                       </FormItem>
                     </div>
                     <ContentUrl
-                    processStatus={1}
-                    domId = {"approContents"}
-                    contentUrl = {this.state.contentUrl}
-                    imgId = {"approContentsImg"}
+                      processStatus={1}
+                      domId={"approContents"}
+                      contentUrl={this.state.contentUrl}
+                      imgId={"approContentsImg"}
                     />
                     <div className="clearfix">
                       <FormItem
@@ -2447,7 +2501,7 @@ const IntentionCustomer = Form.create()(
                       </FormItem>
                     </div>
                     {/*  */}
-                    <OrderCoor orderNo={this.state.orderNos}/>
+                    <OrderCoor orderNo={this.state.orderNos} />
                     <div>
                       <span style={{ marginLeft: "50px", fontSize: "18px" }}>
                         项目业务
@@ -2551,7 +2605,7 @@ const IntentionCustomer = Form.create()(
                   </div>
                 </Spin>
               </Form>
-            </Modal> : <div/>}
+            </Modal> : <div />}
             {this.state.noVisible ? <Modal
               maskClosable={false}
               visible={this.state.noVisible}
@@ -2602,7 +2656,7 @@ const IntentionCustomer = Form.create()(
                   </div>
                 </Spin>
               </Form>
-            </Modal> : <div/>}
+            </Modal> : <div />}
             {this.state.passVisible ? <Modal
               maskClosable={false}
               visible={this.state.passVisible}
@@ -2653,7 +2707,7 @@ const IntentionCustomer = Form.create()(
                   </div>
                 </Spin>
               </Form>
-            </Modal> : <div/>}
+            </Modal> : <div />}
             {this.state.rizhivisible ? <Modal
               visible={this.state.rizhivisible}
               className="admin-desc-content"
@@ -2674,7 +2728,7 @@ const IntentionCustomer = Form.create()(
                   />
                 </Spin>
               </div>
-            </Modal> : <div/>}
+            </Modal> : <div />}
             {this.state.dvisible ? <Modal
               maskClosable={false}
               visible={this.state.dvisible}
@@ -2730,7 +2784,7 @@ const IntentionCustomer = Form.create()(
                 )}
                 content={() => this.refs.all}
               />
-            </Modal> : <div/>}
+            </Modal> : <div />}
             {this.state.bvisible ? <Modal
               maskClosable={false}
               visible={this.state.bvisible}
@@ -2782,7 +2836,7 @@ const IntentionCustomer = Form.create()(
                   />
                 </div>
               </Spin>
-            </Modal> : <div/>}
+            </Modal> : <div />}
             {this.state.cvisible ? <Modal
               maskClosable={false}
               visible={this.state.cvisible}
@@ -2833,7 +2887,7 @@ const IntentionCustomer = Form.create()(
                   />
                 </div>
               </Spin>
-            </Modal> : <div/>}
+            </Modal> : <div />}
             {this.state.timeVisible ? <Modal
               maskClosable={false}
               visible={this.state.timeVisible}
@@ -2893,7 +2947,7 @@ const IntentionCustomer = Form.create()(
                 )}
                 content={() => this.refs.all}
               />
-            </Modal> : <div/>}
+            </Modal> : <div />}
             {this.state.cuiVisible ? <Modal
               maskClosable={false}
               visible={this.state.cuiVisible}
@@ -2953,7 +3007,7 @@ const IntentionCustomer = Form.create()(
                 )}
                 content={() => this.refs.all}
               />
-            </Modal> : <div/>}
+            </Modal> : <div />}
             {this.state.proVisible ? <Modal
               maskClosable={false}
               visible={this.state.proVisible}
@@ -3023,12 +3077,12 @@ const IntentionCustomer = Form.create()(
                 )}
                 content={() => this.refs.all}
               />
-            </Modal> : <div/>}
+            </Modal> : <div />}
           </div>
           {this.state.addnextVisible && <ProjectDetailsReadOnly
-              infor={this.state.dataInfor}
-              visible={this.state.addnextVisible}
-              onCancel={this.nextCancel}
+            infor={this.state.dataInfor}
+            visible={this.state.addnextVisible}
+            onCancel={this.nextCancel}
           />}
         </div>
       );

+ 102 - 84
js/component/manageCenter/order/orderNew/arrearsList.jsx

@@ -25,6 +25,7 @@ import "./customer.less";
 import { ChooseList } from "./chooseList";
 import { getProjectName } from "../../../tools";
 import DepartmentList from "../../../common/departmentList";
+import Cascaders from "../../../common/cascaders";
 
 const ArrearsList = Form.create()(
   React.createClass({
@@ -46,7 +47,7 @@ const ArrearsList = Form.create()(
           name: this.state.customerName, //名称
           orderNo: this.state.orderNo, //订单编号
           contractNo: this.state.contractNo,
-          depId: this.state.departmenttSearch, //订单部门
+          deps: this.state.departmenttSearch, //订单部门
           starTime: this.state.releaseDate[0], //开始时间
           endTime: this.state.releaseDate[1], //结束时间
           tStarTime: this.state.chufaDate[0], //开始时间
@@ -366,15 +367,16 @@ const ArrearsList = Form.create()(
     },
     //重置
     reset() {
-      this.state.orderNo = "";
-      this.state.contractNo = '';
-      this.state.customerName = "";
-      this.state.adminName = "";
+      this.state.orderNo = undefined;
+      this.state.contractNo = undefined;
+      this.state.customerName = undefined;
+      this.state.adminName = undefined;
       this.state.departmenttSearch = undefined;
       this.state.releaseDate[0] = undefined;
       this.state.releaseDate[1] = undefined;
       this.state.chufaDate[1] = undefined;
       this.state.chufaDate[0] = undefined;
+      this.Cascaders.empty();
       this.loadData();
     },
     changeList(arr) {
@@ -484,89 +486,105 @@ const ArrearsList = Form.create()(
               className="test"
             >
               <TabPane tab="搜索" key="1">
-                <Input
-                  placeholder="客户名称"
-                  style={{
-                    width: "150px",
-                    marginBottom: "10px",
-                    marginLeft: 10,
-                    marginRight: 10,
-                  }}
-                  value={this.state.customerName}
-                  onChange={(e) => {
-                    this.setState({ customerName: e.target.value });
-                  }}
-                />
-                <Input
-                  placeholder="订单编号"
-                  style={{ width: "150px", marginRight: 10 }}
-                  value={this.state.orderNo}
-                  onChange={(e) => {
-                    this.setState({ orderNo: e.target.value });
-                  }}
-                />
-                <Input
-                  placeholder="合同编号"
-                  style={{ width: "150px", marginRight: 10 }}
-                  value={this.state.contractNo}
-                  onChange={(e) => {
-                    this.setState({ contractNo: e.target.value });
-                  }}
-                />
-                <Input
-                  placeholder="营销员名称"
-                  style={{
-                    width: "150px",
-                    marginBottom: "10px",
-                    marginRight: 10,
-                  }}
-                  value={this.state.adminName}
-                  onChange={(e) => {
-                    this.setState({ adminName: e.target.value });
-                  }}
-                />
-                <DepartmentList
+                <div className="user-search">
+                  <Input
+                    placeholder="客户名称"
+                    style={{
+                      width: "150px",
+                      marginBottom: "10px",
+                      marginLeft: 10,
+                      marginRight: 10,
+                    }}
+                    value={this.state.customerName}
+                    onChange={(e) => {
+                      this.setState({ customerName: e.target.value });
+                    }}
+                  />
+                  <Input
+                    placeholder="订单编号"
+                    style={{ width: "150px", marginRight: 10 }}
+                    value={this.state.orderNo}
+                    onChange={(e) => {
+                      this.setState({ orderNo: e.target.value });
+                    }}
+                  />
+                  <Input
+                    placeholder="合同编号"
+                    style={{ width: "150px", marginRight: 10 }}
+                    value={this.state.contractNo}
+                    onChange={(e) => {
+                      this.setState({ contractNo: e.target.value });
+                    }}
+                  />
+                  <Input
+                    placeholder="营销员名称"
+                    style={{
+                      width: "150px",
+                      marginBottom: "10px",
+                      marginRight: 10,
+                    }}
+                    value={this.state.adminName}
+                    onChange={(e) => {
+                      this.setState({ adminName: e.target.value });
+                    }}
+                  />
+                  <Cascaders
+                    ref={node => this.Cascaders = node}
+                    placeholder="订单部门"
+                    id="id"
+                    name="name"
+                    children="list"
+                    height={28}
+                    onSel={(e) => {
+                      this.setState({
+                        departmenttSearch: JSON.stringify(e),
+                      });
+                    }}
+                  />
+                  {/* <DepartmentList
                   value={this.state.departmenttSearch}
                   onChange={e => {
                     this.setState({ departmenttSearch: e });
-                  }} />
-                <span style={{ marginRight: "10px" }}>下单时间 :</span>
-                <RangePicker
-                  value={[
-                    this.state.releaseDate[0]
-                      ? moment(this.state.releaseDate[0])
-                      : null,
-                    this.state.releaseDate[1]
-                      ? moment(this.state.releaseDate[1])
-                      : null,
-                  ]}
-                  onChange={(data, dataString) => {
-                    this.setState({ releaseDate: dataString });
                   }}
-                />
-                <span style={{ marginRight: "10px", marginLeft: 10 }}>触发时间 :</span>
-                <RangePicker
-                  value={[
-                    this.state.chufaDate[0]
-                      ? moment(this.state.chufaDate[0])
-                      : null,
-                    this.state.chufaDate[1]
-                      ? moment(this.state.chufaDate[1])
-                      : null,
-                  ]}
-                  onChange={(data, dataString) => {
-                    this.setState({ chufaDate: dataString });
-                  }}
-                />
-                <div>
-                  <Button
-                    type="primary"
-                    onClick={this.search}
-                    style={{ marginLeft: "10px", marginRight: 10 }}
-                  >
-                    搜索
-                  </Button>
-                  <Button onClick={this.reset}>重置</Button>
+                /> */}
+                  <span style={{ marginRight: "10px" }}>下单时间 :</span>
+                  <RangePicker
+                    value={[
+                      this.state.releaseDate[0]
+                        ? moment(this.state.releaseDate[0])
+                        : null,
+                      this.state.releaseDate[1]
+                        ? moment(this.state.releaseDate[1])
+                        : null,
+                    ]}
+                    onChange={(data, dataString) => {
+                      this.setState({ releaseDate: dataString });
+                    }}
+                  />
+                  <span style={{ marginRight: "10px", marginLeft: 10 }}>触发时间 :</span>
+                  <RangePicker
+                    value={[
+                      this.state.chufaDate[0]
+                        ? moment(this.state.chufaDate[0])
+                        : null,
+                      this.state.chufaDate[1]
+                        ? moment(this.state.chufaDate[1])
+                        : null,
+                    ]}
+                    onChange={(data, dataString) => {
+                      this.setState({ chufaDate: dataString });
+                    }}
+                  />
+                  <div>
+                    <Button
+                      type="primary"
+                      onClick={this.search}
+                      style={{ marginLeft: "10px", marginRight: 10 }}
+                    >
+                      搜索
+                    </Button>
+                    <Button onClick={this.reset}>重置</Button>
+                  </div>
                 </div>
               </TabPane>
               <TabPane tab="导出催款列表" key="2">

+ 25 - 10
js/component/manageCenter/order/orderNew/billing.jsx

@@ -47,6 +47,7 @@ import Project from "../../../../component/project";
 import ImgList from "../../../common/imgList";
 import OrderItemStatus from "../../../common/orderItemStatus";
 import LogPopup from "../../../common/logPopup";
+import Cascaders from "../../../common/cascaders";
 
 const { Option } = Select;
 const { TabPane } = Tabs;
@@ -132,7 +133,7 @@ const MyService = Form.create()(
           endTime: this.state.releaseDate[1],
           liquidationStatus: this.state.liquidationStatusSearch,
           contractNo: this.state.contractNoSearch,
-          depId: this.state.departmenttList,
+          deps: JSON.stringify(this.state.departmenttList),
           approval: this.state.approvalSearch,
           amountStatus: this.state.amountStatus,
           projectType: this.state.projectType,
@@ -1169,6 +1170,7 @@ const MyService = Form.create()(
         }
       );
     },
+
     saveApp() {
       this.setState(
         {
@@ -1255,6 +1257,7 @@ const MyService = Form.create()(
         },
       });
     },
+
     visitCancels() {
       this.setState({
         id: "",
@@ -1262,7 +1265,6 @@ const MyService = Form.create()(
         cvisible: false,
       });
     },
-
     //查看开票历史记录详情
     dtableRowClick(record) {
       this.setState({
@@ -1324,7 +1326,6 @@ const MyService = Form.create()(
         }.bind(this)
       );
     },
-
     //关闭开票历史记录详情
     dvisitCancels() {
       this.setState({
@@ -1531,7 +1532,7 @@ const MyService = Form.create()(
       });
     },
     componentWillMount() {
-      this.departmentList();
+      // this.departmentList();
       this.loadData();
       let data = localStorage.getItem("newData");
       if (data != "{}" && data && data.toString() !== "[object Object]") {
@@ -1618,8 +1619,8 @@ const MyService = Form.create()(
         signBillVisible: false,
       });
       this.state.searchOrderNo = undefined;
-      this.state.orderNo = "";
-      this.state.customerName = "";
+      this.state.orderNo = undefined;
+      this.state.customerName = undefined;
       this.state.departmenttSearch = undefined;
       this.state.releaseDate[0] = undefined;
       this.state.releaseDate[1] = undefined;
@@ -1628,12 +1629,13 @@ const MyService = Form.create()(
       this.state.formalOrder = true;
       this.state.intentOrder = true;
       (this.state.liquidationStatusSearch = []),
-        (this.state.contractNoSearch = "");
-      this.state.departmenttList = [];
+        (this.state.contractNoSearch = undefined);
+      this.state.departmenttList = undefined;
       this.state.approvalSearch = undefined;
       this.state.amountStatus = undefined;
       this.state.projectType = undefined;
       this.state.processStatus = undefined;
+      this.Cascaders.empty();
       this.loadData();
     },
     //部门
@@ -1918,7 +1920,20 @@ const MyService = Form.create()(
                         this.setState({ customerName: e.target.value });
                       }}
                     />
-                    <Select
+                    <Cascaders
+                      ref={node => this.Cascaders = node}
+                      placeholder="订单部门"
+                      id="id"
+                      name="name"
+                      children="list"
+                      height={28}
+                      onSel={(e) => {
+                        this.setState({
+                          departmenttList: e
+                        })
+                      }}
+                    />
+                    {/* <Select
                       placeholder="订单部门"
                       style={{ width: 200, marginRight: 10 }}
                       value={this.state.departmenttList}
@@ -1929,7 +1944,7 @@ const MyService = Form.create()(
                       {departmentArr.map(function (item) {
                         return <Option key={item.id}>{item.name}</Option>;
                       })}
-                    </Select>
+                    </Select> */}
                     <Input
                       placeholder="合同编号"
                       style={{ width: "150px", marginRight: 10 }}

+ 18 - 25
js/component/manageCenter/order/orderNew/changeComponent/searchInput.js

@@ -191,7 +191,7 @@ class SearchInput extends Component {
   }
 
   componentWillMount() {
-    this.departmentList();
+    // this.departmentList();
   }
 
   render() {
@@ -245,18 +245,18 @@ class SearchInput extends Component {
 
     // 选择框数据
     const SearchSelectData = [
-      {
-        placeholder: "订单部门",
-        width: 200,
-        defaultValue: undefined,
-        content: this.state.departmentArr,
-        getValue: value => {
-          this.setState({
-            depIdSearch: value,
-            reset: false
-          });
-        }
-      },
+      // {
+      //   placeholder: "订单部门",
+      //   width: 200,
+      //   defaultValue: undefined,
+      //   content: this.state.departmentArr,
+      //   getValue: value => {
+      //     this.setState({
+      //       depIdSearch: value,
+      //       reset: false
+      //     });
+      //   }
+      // },
       {
         placeholder: "审核状态",
         width: 120,
@@ -290,7 +290,7 @@ class SearchInput extends Component {
             name: "已驳回",
             id: "5"
           },
-         
+
         ],
         getValue: value => {
           this.setState({
@@ -383,9 +383,9 @@ class SearchInput extends Component {
           );
         })}
         {SearchSelectData.map((item, index) => {
-          if(this.props.isYxy) {
-            if(item.placeholder == "审核状态") {
-              item.content.splice(item.content.length -1, 1)
+          if (this.props.isYxy) {
+            if (item.placeholder == "审核状态") {
+              item.content.splice(item.content.length - 1, 1)
             }
           }
           return (
@@ -416,14 +416,7 @@ class SearchInput extends Component {
         </Button>
         <Button
           onClick={_e => {
-            this.setState(
-              {
-                reset: true
-              },
-              () => {
-                this.props.search(this.state);
-              }
-            );
+            this.props.search(Object.assign(this.state, { reset: true }));
           }}
           style={{ marginLeft: 10 }}
         >

+ 74 - 62
js/component/manageCenter/order/orderNew/contractCwjl.js

@@ -1,5 +1,5 @@
 import React from "react";
-import {Button, Input, Spin, Table, message, Form, Modal, Tabs, Select, DatePicker, Tooltip} from "antd";
+import { Button, Input, Spin, Table, message, Form, Modal, Tabs, Select, DatePicker, Tooltip } from "antd";
 import $ from "jquery/src/ajax";
 import {
   getNewOrderStatus,
@@ -21,8 +21,9 @@ import ShowModalDiv from "@/showModal.jsx";
 const { RangePicker } = DatePicker;
 import ReactToPrint from "react-to-print";
 import OrderRiZi from "@/orderRiZi.jsx";
-import {getProjectName} from "../../../tools";
+import { getProjectName } from "../../../tools";
 import ProjectDetailsReadOnly from "../../../common/projectDetailsReadOnly";
+import Cascaders from "../../../common/cascaders";
 
 const contractChange = Form.create()(
   React.createClass({
@@ -45,7 +46,7 @@ const contractChange = Form.create()(
           endTime: this.state.searchData.releaseDate[1],
           salesmanName: this.state.searchData.salesmanNameSearch,
           complete: this.state.searchData.completeSearch || 1,
-          depId: this.state.searchData.depIdSearch,
+          deps: this.state.searchData.deps,
           orderNo: this.state.searchData.orderNoSearch,
           contractNo: this.state.searchData.contractNoSearch,
           type: this.state.searchData.changeSearch
@@ -115,7 +116,7 @@ const contractChange = Form.create()(
         orderData: {}, //现订单数据
         pictureUrl: [],
         voucherUrl: [],
-        attachment:[],
+        attachment: [],
         declarationBatch: 1,
         dataInfor: {},
         attachmentUrl: [],
@@ -162,14 +163,14 @@ const contractChange = Form.create()(
             width: 150,
             render: (text) => {
               return (
-                  <Tooltip title={text}>
-                    <div style={{
-                      maxWidth:'150px',
-                      overflow:'hidden',
-                      textOverflow: "ellipsis",
-                      whiteSpace:'nowrap',
-                    }}>{text}</div>
-                  </Tooltip>
+                <Tooltip title={text}>
+                  <div style={{
+                    maxWidth: '150px',
+                    overflow: 'hidden',
+                    textOverflow: "ellipsis",
+                    whiteSpace: 'nowrap',
+                  }}>{text}</div>
+                </Tooltip>
               )
             },
           },
@@ -248,9 +249,9 @@ const contractChange = Form.create()(
             key: "commodityName",
             render: (text, record) => {
               return (
-                  <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span></span>
+                <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span></span>
               )
-          }
+            }
           },
           {
             title: "项目类别",
@@ -422,7 +423,7 @@ const contractChange = Form.create()(
         taskComment: record.taskComment, //备注
         main: record.main.toString(), //是否为主要
         addnextVisible: true,
-        dataInfor:record,
+        dataInfor: record,
         addState: 0
       });
     },
@@ -464,7 +465,7 @@ const contractChange = Form.create()(
                   url
                 )
                 : [],
-                attachment: thisdata.attachmentUrl
+              attachment: thisdata.attachmentUrl
                 ? splitUrl(
                   thisdata.attachmentUrl,
                   ",",
@@ -554,17 +555,17 @@ const contractChange = Form.create()(
               isAddition: thisdata.additionalOrder ? true : false,
               contractPictureUrl: thisdata.contractPictureUrl
                 ? splitUrl(
-                    thisdata.contractPictureUrl,
-                    ",",
-                    globalConfig.avatarHost + "/upload"
-                  )
+                  thisdata.contractPictureUrl,
+                  ",",
+                  globalConfig.avatarHost + "/upload"
+                )
                 : [],
               replenishUrl: thisdata.agreementUrl
                 ? splitUrl(
-                    thisdata.agreementUrl,
-                    ",",
-                    globalConfig.avatarHost + "/upload"
-                  )
+                  thisdata.agreementUrl,
+                  ",",
+                  globalConfig.avatarHost + "/upload"
+                )
                 : [],
             });
             // console.log(thisdata.contractPictureUrl);
@@ -680,14 +681,20 @@ const contractChange = Form.create()(
     },
 
     search(obj) {
-      this.setState(
-        {
-          searchData: obj
-        },
-        () => {
-          this.loadData(1);
-        }
-      );
+      if (obj.reset) {
+        this.state.searchData.deps = [];
+        this.Cascaders.empty();
+        this.loadData(1);
+      } else {
+        this.setState(
+          {
+            searchData: Object.assign(this.state.searchData, obj)
+          },
+          () => {
+            this.loadData(1);
+          }
+        );
+      }
     },
 
     rizhi(orderNo) {
@@ -1208,49 +1215,39 @@ const contractChange = Form.create()(
       window.location.href =
         globalConfig.context +
         "/api/admin/orderChange/exportMyChange?" +
-        `orderNo=${
-        this.state.searchData.orderNoSearch
+        `orderNo=${this.state.searchData.orderNoSearch
           ? this.state.searchData.orderNoSearch
           : ""
-        }&processState=${
-        this.props.processState ? this.props.processState : ""
-        }&userName=${
-        this.state.searchData.userNameSearch
+        }&processState=${this.props.processState ? this.props.processState : ""
+        }&userName=${this.state.searchData.userNameSearch
           ? this.state.searchData.userNameSearch
           : ""
-        }&contractNo=${
-        this.state.searchData.contractNoSearch
+        }&contractNo=${this.state.searchData.contractNoSearch
           ? this.state.searchData.contractNoSearch
           : ""
         }
-        &timeType=${
-        this.state.searchData.timeTypeSearch
+        &timeType=${this.state.searchData.timeTypeSearch
           ? this.state.searchData.timeTypeSearch
           : ""
         }
-        &startTime=${
-        this.state.searchData.releaseDate[0]
+        &startTime=${this.state.searchData.releaseDate[0]
           ? this.state.searchData.releaseDate[0]
           : ""
         }
-        &endTime=${
-        this.state.searchData.releaseDate[1]
+        &endTime=${this.state.searchData.releaseDate[1]
           ? this.state.searchData.releaseDate[1]
           : ""
         }
-        &salesmanName=${
-        this.state.searchData.salesmanNameSearch
+        &salesmanName=${this.state.searchData.salesmanNameSearch
           ? this.state.searchData.salesmanNameSearch
           : ""
         }
         &complete=${this.state.searchData.completeSearch || 1}
-        &depId=${
-        this.state.searchData.depIdSearch
+        &depId=${this.state.searchData.depIdSearch
           ? this.state.searchData.depIdSearch
           : ""
         }
-        &type=${
-        this.state.searchData.changeSearch
+        &type=${this.state.searchData.changeSearch
           ? this.state.searchData.changeSearch
           : ""
         }`;
@@ -1302,6 +1299,21 @@ const contractChange = Form.create()(
             <Tabs defaultActiveKey="2" className="test">
               <TabPane tab="搜索" key="2">
                 <div style={{ marginLeft: 10 }}>
+                  <Cascaders
+                    ref={node => this.Cascaders = node}
+                    placeholder="订单部门"
+                    id="id"
+                    name="name"
+                    children="list"
+                    height={28}
+                    onSel={(e) => {
+                      const { searchData } = this.state
+                      searchData["deps"] = JSON.stringify(e);
+                      this.setState({
+                        searchData: searchData
+                      })
+                    }}
+                  />
                   <SearchInput search={this.search} />
                 </div>
               </TabPane>
@@ -1327,11 +1339,11 @@ const contractChange = Form.create()(
               <TabPane tab="更改表格显示数据" key="1">
                 <div style={{ marginLeft: 10 }}>
                   <ChooseList
-                      columns={this.state.columns}
-                      changeFn={this.changeList}
-                      changeList={this.state.changeList}
-                      top={55}
-                      margin={11}
+                    columns={this.state.columns}
+                    changeFn={this.changeList}
+                    changeList={this.state.changeList}
+                    top={55}
+                    margin={11}
                   />
                 </div>
               </TabPane>
@@ -1409,7 +1421,7 @@ const contractChange = Form.create()(
                   return (
                     <TabPane tab={"合同变更记录" + (index + 1)} key={item.id}>
                       <ChangeDetail
-                        domId={'changeDetail'+(index + 1)}
+                        domId={'changeDetail' + (index + 1)}
                         id={item.id}
                         money={
                           index == arr.length - 1
@@ -1420,7 +1432,7 @@ const contractChange = Form.create()(
                         // loadData={this.ChangeDetail}
                         txt={this.state.processStateText}
                         pictureUrl={this.state.voucherUrl}
-                         attachment = {this.state.attachment}
+                        attachment={this.state.attachment}
                         processState={this.props.processState}
                         loadData={this.callback}
                         reset={this.state.visible}
@@ -1630,9 +1642,9 @@ const contractChange = Form.create()(
             </Modal>
           </div>
           {this.state.addnextVisible && <ProjectDetailsReadOnly
-              infor={this.state.dataInfor}
-              visible={this.state.addnextVisible}
-              onCancel={this.nextCancel}
+            infor={this.state.dataInfor}
+            visible={this.state.addnextVisible}
+            onCancel={this.nextCancel}
           />}
         </div>
       );

+ 68 - 46
js/component/manageCenter/order/orderNew/contractCwzj.js

@@ -1,5 +1,5 @@
 import React from "react";
-import { Button, Input, Spin, Table, message, Form, Modal, Tabs,Tooltip } from "antd";
+import { Button, Input, Spin, Table, message, Form, Modal, Tabs, Tooltip } from "antd";
 import $ from "jquery/src/ajax";
 import {
   getNewOrderStatus,
@@ -19,9 +19,10 @@ import OrderDetail from "./changeComponent/orderDetail";
 import { ChooseList } from "./chooseList.jsx";
 import ShowModalDiv from "@/showModal.jsx";
 import OrderRiZi from "@/orderRiZi.jsx";
-import {getProjectName} from "../../../tools";
+import { getProjectName } from "../../../tools";
 import ProjectDetailsReadOnly from "../../../common/projectDetailsReadOnly";
 import OrderItemStatus from "../../../common/orderItemStatus";
+import Cascaders from "../../../common/cascaders";
 
 const contractChange = Form.create()(
   React.createClass({
@@ -46,7 +47,7 @@ const contractChange = Form.create()(
           orderNo: this.state.searchData.orderNoSearch,
           contractNo: this.state.searchData.contractNoSearch,
           complete: this.state.searchData.completeSearch || 1,
-          depId: this.state.searchData.depIdSearch,
+          deps: this.state.searchData.deps,
           type: this.state.searchData.changeSearch
         },
         success: function (data) {
@@ -115,7 +116,7 @@ const contractChange = Form.create()(
         orderData: {}, //现订单数据
         pictureUrl: [],
         voucherUrl: [],
-        attachment:[],
+        attachment: [],
         attachmentUrl: [],
         //收款数据
         proceedsData: {},
@@ -157,16 +158,16 @@ const contractChange = Form.create()(
             title: "客户名称",
             dataIndex: "nickname",
             key: "nickname",
-            render:text=>{
+            render: text => {
               return (
-                  <Tooltip title={text}>
-                    <div style={{
-                      maxWidth:'150px',
-                      overflow:'hidden',
-                      textOverflow: "ellipsis",
-                      whiteSpace:'nowrap',
-                    }}>{text}</div>
-                  </Tooltip>
+                <Tooltip title={text}>
+                  <div style={{
+                    maxWidth: '150px',
+                    overflow: 'hidden',
+                    textOverflow: "ellipsis",
+                    whiteSpace: 'nowrap',
+                  }}>{text}</div>
+                </Tooltip>
               )
             }
           },
@@ -245,9 +246,9 @@ const contractChange = Form.create()(
             key: "commodityName",
             render: (text, record) => {
               return (
-                  <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span></span>
+                <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span></span>
               )
-          }
+            }
           },
           {
             title: "项目类别",
@@ -381,7 +382,7 @@ const contractChange = Form.create()(
         taskComment: record.taskComment, //备注
         main: record.main.toString(), //是否为主要
         addnextVisible: true,
-        dataInfor:record,
+        dataInfor: record,
         addState: 0
       });
     },
@@ -423,7 +424,7 @@ const contractChange = Form.create()(
                   url
                 )
                 : [],
-                attachment: thisdata.attachmentUrl
+              attachment: thisdata.attachmentUrl
                 ? splitUrl(
                   thisdata.attachmentUrl,
                   ",",
@@ -490,7 +491,7 @@ const contractChange = Form.create()(
     xiangqing(orderNos) {
       this.setState({
         orderData: {}
-      },()=>{
+      }, () => {
         $.ajax({
           method: "get",
           dataType: "json",
@@ -515,7 +516,7 @@ const contractChange = Form.create()(
                 // arrears: thisdata.arrears,
                 orderData: thisdata,
                 isAddition: thisdata.additionalOrder ? true : false,
-                deleteSign:thisdata.deleteSign,
+                deleteSign: thisdata.deleteSign,
               });
             }
           }.bind(this)
@@ -606,14 +607,20 @@ const contractChange = Form.create()(
     },
 
     search(obj) {
-      this.setState(
-        {
-          searchData: obj
-        },
-        () => {
-          this.loadData(1);
-        }
-      );
+      if (obj.reset) {
+        this.state.searchData.deps = [];
+        this.Cascaders.empty();
+        this.loadData(1);
+      } else {
+        this.setState(
+          {
+            searchData: Object.assign(this.state.searchData, obj)
+          },
+          () => {
+            this.loadData(1);
+          }
+        );
+      }
     },
 
     rizhi(orderNo) {
@@ -1155,6 +1162,21 @@ const contractChange = Form.create()(
               className="test">
               <TabPane tab="搜索" key="1">
                 <div style={{ marginLeft: 10 }}>
+                  <Cascaders
+                    ref={node => this.Cascaders = node}
+                    placeholder="订单部门"
+                    id="id"
+                    name="name"
+                    children="list"
+                    height={28}
+                    onSel={(e) => {
+                      const { searchData } = this.state
+                      searchData["deps"] = JSON.stringify(e);
+                      this.setState({
+                        searchData: searchData
+                      })
+                    }}
+                  />
                   <SearchInput search={this.search} />
                 </div>
               </TabPane>
@@ -1199,15 +1221,15 @@ const contractChange = Form.create()(
                 onChange={this.callback}
                 type="card"
                 tabBarExtraContent={
-                  <div style={{fontWeight:'bold',paddingRight:'15px'}}>
-                    <OrderItemStatus deleteSign={this.state.deleteSign}/>
+                  <div style={{ fontWeight: 'bold', paddingRight: '15px' }}>
+                    <OrderItemStatus deleteSign={this.state.deleteSign} />
                   </div>
                 }
               >
                 <TabPane tab="订单详情" key="a">
                   <div style={{ paddingBottom: "40px" }}>
                     <Spin spinning={this.state.loading}>
-                      {this.state.activeKey === 'a' && this.state.visible? <OrderDetail
+                      {this.state.activeKey === 'a' && this.state.visible ? <OrderDetail
                         orderData={this.state.orderData}
                         orderUid={this.state.orderUid}
                         getOrderLog={this.getOrderLog}
@@ -1216,8 +1238,8 @@ const contractChange = Form.create()(
                         orderNo={this.state.orderNo}
                         totalCui={this.state.totalCui}
                         contactListNew={this.state.contactListNew}
-                        // isCaiWu={true}
-                      />: <div/>}
+                      // isCaiWu={true}
+                      /> : <div />}
                     </Spin>
                   </div>
                 </TabPane>
@@ -1252,7 +1274,7 @@ const contractChange = Form.create()(
                         orderData={this.state.orderData}
                         txt={this.state.processStateText}
                         pictureUrl={this.state.voucherUrl}
-                        attachment = {this.state.attachment}
+                        attachment={this.state.attachment}
                         processState={this.props.processState}
                         loadData={this.callback}
                         reset={this.state.visible}
@@ -1262,7 +1284,7 @@ const contractChange = Form.create()(
                         invoiceTotal={this.state.invTotal}
                         contactList={this.state.refundInvoice}
                         onCancel={this.visitCancel}
-                      /> : <div/>}
+                      /> : <div />}
                     </TabPane>
                   );
                 })}
@@ -1298,7 +1320,7 @@ const contractChange = Form.create()(
                         tab={"原订单" + (index + 1)}
                         key={item.usedOrder}
                       >
-                        {this.state.activeKey === String(item.usedOrder)? <Form
+                        {this.state.activeKey === String(item.usedOrder) ? <Form
                           layout="horizontal"
                           onSubmit={this.handleSubmit}
                           id="demand-form"
@@ -1315,9 +1337,9 @@ const contractChange = Form.create()(
                               isCaiWu={true}
                               totalCui={this.state.totalCui}
                               contactListNew={this.state.contactListNew}
-                            /> : <div/>}
+                            /> : <div />}
                           </Spin>
-                        </Form> : <div/>}
+                        </Form> : <div />}
                       </TabPane>
                     );
                   } else {
@@ -1337,15 +1359,15 @@ const contractChange = Form.create()(
                         isCaiWu={true}
                         totalCui={this.state.totalCui}
                         contactListNew={this.state.contactListNew}
-                      /> : <div/>}
+                      /> : <div />}
                     </TabPane>
                   ) : (
-                      ""
-                    )
-                ) : (
                     ""
-                  )}
-              </Tabs> : <div/>}
+                  )
+                ) : (
+                  ""
+                )}
+              </Tabs> : <div />}
             </Modal>
             <Modal
               maskClosable={false}
@@ -1428,9 +1450,9 @@ const contractChange = Form.create()(
             />
           </div>
           {this.state.addnextVisible && <ProjectDetailsReadOnly
-              infor={this.state.dataInfor}
-              visible={this.state.addnextVisible}
-              onCancel={this.nextCancel}
+            infor={this.state.dataInfor}
+            visible={this.state.addnextVisible}
+            onCancel={this.nextCancel}
           />}
         </div>
       );

+ 65 - 53
js/component/manageCenter/order/orderNew/contractCwzy.js

@@ -1,5 +1,5 @@
 import React from "react";
-import {Button, Input, Spin, Table, message, Form, Modal, Tabs, Select, DatePicker, Tooltip} from "antd";
+import { Button, Input, Spin, Table, message, Form, Modal, Tabs, Select, DatePicker, Tooltip } from "antd";
 import $ from "jquery/src/ajax";
 import {
   getNewOrderStatus,
@@ -21,8 +21,9 @@ import ShowModalDiv from "@/showModal.jsx";
 const { RangePicker } = DatePicker;
 import ReactToPrint from "react-to-print";
 import OrderRiZi from "@/orderRiZi.jsx";
-import {getProjectName} from "../../../tools";
+import { getProjectName } from "../../../tools";
 import ProjectDetailsReadOnly from "../../../common/projectDetailsReadOnly";
+import Cascaders from "../../../common/cascaders";
 
 const contractChange = Form.create()(
   React.createClass({
@@ -45,7 +46,7 @@ const contractChange = Form.create()(
           endTime: this.state.searchData.releaseDate[1],
           salesmanName: this.state.searchData.salesmanNameSearch,
           complete: this.state.searchData.completeSearch || 1,
-          depId: this.state.searchData.depIdSearch,
+          deps: this.state.searchData.deps,
           orderNo: this.state.searchData.orderNoSearch,
           contractNo: this.state.searchData.contractNoSearch,
           type: this.state.searchData.changeSearch
@@ -117,7 +118,7 @@ const contractChange = Form.create()(
         orderData: {}, //现订单数据
         pictureUrl: [],
         voucherUrl: [],
-        attachment:[],
+        attachment: [],
         attachmentUrl: [],
         //收款数据
         proceedsData: {},
@@ -162,14 +163,14 @@ const contractChange = Form.create()(
             width: 150,
             render: (text) => {
               return (
-                  <Tooltip title={text}>
-                    <div style={{
-                      maxWidth:'150px',
-                      overflow:'hidden',
-                      textOverflow: "ellipsis",
-                      whiteSpace:'nowrap',
-                    }}>{text}</div>
-                  </Tooltip>
+                <Tooltip title={text}>
+                  <div style={{
+                    maxWidth: '150px',
+                    overflow: 'hidden',
+                    textOverflow: "ellipsis",
+                    whiteSpace: 'nowrap',
+                  }}>{text}</div>
+                </Tooltip>
               )
             },
           },
@@ -248,9 +249,9 @@ const contractChange = Form.create()(
             key: "commodityName",
             render: (text, record) => {
               return (
-                  <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span></span>
+                <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span></span>
               )
-          }
+            }
           },
           {
             title: "项目类别",
@@ -422,7 +423,7 @@ const contractChange = Form.create()(
         taskComment: record.taskComment, //备注
         main: record.main.toString(), //是否为主要
         addnextVisible: true,
-        dataInfor:record,
+        dataInfor: record,
         addState: 0
       });
     },
@@ -464,7 +465,7 @@ const contractChange = Form.create()(
                   url
                 )
                 : [],
-                attachment: thisdata.attachmentUrl
+              attachment: thisdata.attachmentUrl
                 ? splitUrl(
                   thisdata.attachmentUrl,
                   ",",
@@ -673,14 +674,20 @@ const contractChange = Form.create()(
     },
 
     search(obj) {
-      this.setState(
-        {
-          searchData: obj
-        },
-        () => {
-          this.loadData(1);
-        }
-      );
+      if (obj.reset) {
+        this.state.searchData.deps = [];
+        this.Cascaders.empty();
+        this.loadData(1);
+      } else {
+        this.setState(
+          {
+            searchData: Object.assign(this.state.searchData, obj)
+          },
+          () => {
+            this.loadData(1);
+          }
+        );
+      }
     },
 
     rizhi(orderNo) {
@@ -1201,49 +1208,39 @@ const contractChange = Form.create()(
       window.location.href =
         globalConfig.context +
         "/api/admin/orderChange/exportMyChange?" +
-        `orderNo=${
-        this.state.searchData.orderNoSearch
+        `orderNo=${this.state.searchData.orderNoSearch
           ? this.state.searchData.orderNoSearch
           : ""
-        }&processState=${
-        this.props.processState ? this.props.processState : ""
-        }&userName=${
-        this.state.searchData.userNameSearch
+        }&processState=${this.props.processState ? this.props.processState : ""
+        }&userName=${this.state.searchData.userNameSearch
           ? this.state.searchData.userNameSearch
           : ""
-        }&contractNo=${
-        this.state.searchData.contractNoSearch
+        }&contractNo=${this.state.searchData.contractNoSearch
           ? this.state.searchData.contractNoSearch
           : ""
         }
-        &timeType=${
-        this.state.searchData.timeTypeSearch
+        &timeType=${this.state.searchData.timeTypeSearch
           ? this.state.searchData.timeTypeSearch
           : ""
         }
-        &startTime=${
-        this.state.searchData.releaseDate[0]
+        &startTime=${this.state.searchData.releaseDate[0]
           ? this.state.searchData.releaseDate[0]
           : ""
         }
-        &endTime=${
-        this.state.searchData.releaseDate[1]
+        &endTime=${this.state.searchData.releaseDate[1]
           ? this.state.searchData.releaseDate[1]
           : ""
         }
-        &salesmanName=${
-        this.state.searchData.salesmanNameSearch
+        &salesmanName=${this.state.searchData.salesmanNameSearch
           ? this.state.searchData.salesmanNameSearch
           : ""
         }
         &complete=${this.state.searchData.completeSearch || 1}
-        &depId=${
-        this.state.searchData.depIdSearch
+        &depId=${this.state.searchData.depIdSearch
           ? this.state.searchData.depIdSearch
           : ""
         }
-        &type=${
-        this.state.searchData.changeSearch
+        &type=${this.state.searchData.changeSearch
           ? this.state.searchData.changeSearch
           : ""
         }`;
@@ -1310,6 +1307,21 @@ const contractChange = Form.create()(
               </TabPane>
               <TabPane tab="搜索" key="2">
                 <div style={{ marginLeft: 10 }}>
+                  <Cascaders
+                    ref={node => this.Cascaders = node}
+                    placeholder="订单部门"
+                    id="id"
+                    name="name"
+                    children="list"
+                    height={28}
+                    onSel={(e) => {
+                      const { searchData } = this.state
+                      searchData["deps"] = JSON.stringify(e);
+                      this.setState({
+                        searchData: searchData
+                      })
+                    }}
+                  />
                   <SearchInput search={this.search} />
                 </div>
               </TabPane>
@@ -1413,7 +1425,7 @@ const contractChange = Form.create()(
                         loadData={this.ChangeDetail}
                         txt={this.state.processStateText}
                         pictureUrl={this.state.voucherUrl}
-                        attachment = {this.state.attachment}
+                        attachment={this.state.attachment}
                         processState={this.props.processState}
                         loadData={this.callback}
                         reset={this.state.visible}
@@ -1442,7 +1454,7 @@ const contractChange = Form.create()(
                         >
                           <Spin spinning={this.state.loading}>
                             <OrderDetail
-                              domId={'yuandingdan'+(index + 1)}
+                              domId={'yuandingdan' + (index + 1)}
                               orderData={this.state.primaryOrderData}
                               getOrderLog={this.getOrderLog}
                               dataSourceX={this.state.dataSourceX}
@@ -1476,11 +1488,11 @@ const contractChange = Form.create()(
                       />
                     </TabPane>
                   ) : (
-                      ""
-                    )
-                ) : (
                     ""
-                  )}
+                  )
+                ) : (
+                  ""
+                )}
               </Tabs>
             </Modal>
             <Modal
@@ -1623,9 +1635,9 @@ const contractChange = Form.create()(
             </Modal>
           </div>
           {this.state.addnextVisible && <ProjectDetailsReadOnly
-              infor={this.state.dataInfor}
-              visible={this.state.addnextVisible}
-              onCancel={this.nextCancel}
+            infor={this.state.dataInfor}
+            visible={this.state.addnextVisible}
+            onCancel={this.nextCancel}
           />}
         </div>
       );

+ 81 - 59
js/component/manageCenter/order/orderNew/contractJsjl.js

@@ -1,5 +1,5 @@
 import React from "react";
-import {Button, Input, Spin, Table, message, Form, Modal, Tabs, Tooltip} from "antd";
+import { Button, Input, Spin, Table, message, Form, Modal, Tabs, Tooltip } from "antd";
 import $ from "jquery/src/ajax";
 import {
   getNewOrderStatus,
@@ -18,10 +18,11 @@ import { SearchInput } from "./changeComponent/searchInput.js";
 import OrderDetail from "./changeComponent/orderDetail";
 import ShowModalDiv from "@/showModal.jsx";
 import OrderRiZi from "@/orderRiZi.jsx";
-import {ChooseList} from "./chooseList";
-import {getProjectName} from "../../../tools";
+import { ChooseList } from "./chooseList";
+import { getProjectName } from "../../../tools";
 import ProjectDetailsReadOnly from "../../../common/projectDetailsReadOnly";
 import OrderItemStatus from "../../../common/orderItemStatus";
+import Cascaders from "../../../common/cascaders";
 
 const contractChange = Form.create()(
   React.createClass({
@@ -46,7 +47,7 @@ const contractChange = Form.create()(
           endTime: this.state.searchData.releaseDate[1],
           salesmanName: this.state.searchData.salesmanNameSearch,
           complete: this.state.searchData.completeSearch || 1,
-          depId: this.state.searchData.depIdSearch,
+          deps: this.state.searchData.deps,
           type: this.state.searchData.changeSearch
         },
         success: function (data) {
@@ -115,7 +116,7 @@ const contractChange = Form.create()(
         orderData: {}, //现订单数据
         pictureUrl: [],
         voucherUrl: [],
-        attachment:[],
+        attachment: [],
         attachmentUrl: [],
         proceedsData: {},
         proTotal: 0,
@@ -159,14 +160,14 @@ const contractChange = Form.create()(
             width: 150,
             render: (text) => {
               return (
-                  <Tooltip title={text}>
-                    <div style={{
-                      maxWidth:'150px',
-                      overflow:'hidden',
-                      textOverflow: "ellipsis",
-                      whiteSpace:'nowrap',
-                    }}>{text}</div>
-                  </Tooltip>
+                <Tooltip title={text}>
+                  <div style={{
+                    maxWidth: '150px',
+                    overflow: 'hidden',
+                    textOverflow: "ellipsis",
+                    whiteSpace: 'nowrap',
+                  }}>{text}</div>
+                </Tooltip>
               )
             },
           },
@@ -245,9 +246,9 @@ const contractChange = Form.create()(
             key: "commodityName",
             render: (text, record) => {
               return (
-                  <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span></span>
+                <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span></span>
               )
-          }
+            }
           },
           {
             title: "项目类别",
@@ -380,7 +381,7 @@ const contractChange = Form.create()(
         taskComment: record.taskComment, //备注
         main: record.main.toString(), //是否为主要
         addnextVisible: true,
-        dataInfor:record,
+        dataInfor: record,
         addState: 0
       });
     },
@@ -422,7 +423,7 @@ const contractChange = Form.create()(
                   url
                 )
                 : [],
-                attachment: thisdata.attachmentUrl
+              attachment: thisdata.attachmentUrl
                 ? splitUrl(
                   thisdata.attachmentUrl,
                   ",",
@@ -510,7 +511,7 @@ const contractChange = Form.create()(
               // arrears: thisdata.arrears,
               orderData: thisdata,
               isAddition: thisdata.additionalOrder ? true : false,
-              deleteSign:thisdata.deleteSign,
+              deleteSign: thisdata.deleteSign,
             });
           }
         }.bind(this)
@@ -600,14 +601,20 @@ const contractChange = Form.create()(
     },
 
     search(obj) {
-      this.setState(
-        {
-          searchData: obj
-        },
-        () => {
-          this.loadData(1);
-        }
-      );
+      if (obj.reset) {
+        this.state.searchData.deps = [];
+        this.Cascaders.empty();
+        this.loadData(1);
+      } else {
+        this.setState(
+          {
+            searchData: Object.assign(this.state.searchData, obj)
+          },
+          () => {
+            this.loadData(1);
+          }
+        );
+      }
     },
 
     rizhi(orderNo) {
@@ -1156,17 +1163,32 @@ const contractChange = Form.create()(
               className="test">
               <TabPane tab="搜索" key="1">
                 <div style={{ marginLeft: 10 }}>
+                  <Cascaders
+                    ref={node => this.Cascaders = node}
+                    placeholder="订单部门"
+                    id="id"
+                    name="name"
+                    children="list"
+                    height={28}
+                    onSel={(e) => {
+                      const { searchData } = this.state
+                      searchData["deps"] = JSON.stringify(e);
+                      this.setState({
+                        searchData: searchData
+                      })
+                    }}
+                  />
                   <SearchInput search={this.search} />
                 </div>
               </TabPane>
               <TabPane tab="更改表格显示数据" key="2">
                 <div style={{ marginLeft: 10 }}>
                   <ChooseList
-                      columns={this.state.columns}
-                      changeFn={this.changeList}
-                      changeList={this.state.changeList}
-                      top={55}
-                      margin={11}
+                    columns={this.state.columns}
+                    changeFn={this.changeList}
+                    changeList={this.state.changeList}
+                    top={55}
+                    margin={11}
                   />
                 </div>
               </TabPane>
@@ -1178,8 +1200,8 @@ const contractChange = Form.create()(
                   bordered
                   columns={
                     this.state.changeList
-                        ? this.state.changeList
-                        : this.state.columns
+                      ? this.state.changeList
+                      : this.state.columns
                   }
                   dataSource={this.state.dataSource}
                   pagination={this.state.pagination}
@@ -1201,8 +1223,8 @@ const contractChange = Form.create()(
                 onChange={this.callback}
                 type="card"
                 tabBarExtraContent={
-                  <div style={{fontWeight:'bold',paddingRight:'15px'}}>
-                    <OrderItemStatus deleteSign={this.state.deleteSign}/>
+                  <div style={{ fontWeight: 'bold', paddingRight: '15px' }}>
+                    <OrderItemStatus deleteSign={this.state.deleteSign} />
                   </div>
                 }
               >
@@ -1245,23 +1267,23 @@ const contractChange = Form.create()(
                 {tabList.map((item, index, arr) => {
                   return (
                     <TabPane tab={"合同变更记录" + (index + 1)} key={item.id}>
-                          <ChangeDetail
-                            id={item.id}
-                            domId={'hetongbiangenjilu' + (index + 1)}
-                            money={index == arr.length - 1 ? this.state.orderData.totalAmount + "" : undefined}
-                            data={this.state.contractData}
-                            pictureUrl={this.state.voucherUrl}
-                            attachment={this.state.attachment}
-                            processState={this.props.processState}
-                            // loadData={this.callback}
-                            reset={this.state.visible}
-                            dataSource={this.state.dataProps}
-                            proceedsData={this.state.proceedsData}
-                            proceedsTotal={this.state.proTotal}
-                            invoiceTotal={this.state.invTotal}
-                            contactList={this.state.refundInvoice}
-                            onCancel={this.visitCancel}
-                          />
+                      <ChangeDetail
+                        id={item.id}
+                        domId={'hetongbiangenjilu' + (index + 1)}
+                        money={index == arr.length - 1 ? this.state.orderData.totalAmount + "" : undefined}
+                        data={this.state.contractData}
+                        pictureUrl={this.state.voucherUrl}
+                        attachment={this.state.attachment}
+                        processState={this.props.processState}
+                        // loadData={this.callback}
+                        reset={this.state.visible}
+                        dataSource={this.state.dataProps}
+                        proceedsData={this.state.proceedsData}
+                        proceedsTotal={this.state.proTotal}
+                        invoiceTotal={this.state.invTotal}
+                        contactList={this.state.refundInvoice}
+                        onCancel={this.visitCancel}
+                      />
                     </TabPane>
                   );
                 })}
@@ -1335,11 +1357,11 @@ const contractChange = Form.create()(
                       />
                     </TabPane>
                   ) : (
-                      ""
-                    )
-                ) : (
                     ""
-                  )}
+                  )
+                ) : (
+                  ""
+                )}
               </Tabs>
             </Modal>
             <Modal
@@ -1423,9 +1445,9 @@ const contractChange = Form.create()(
             />
           </div>
           {this.state.addnextVisible && <ProjectDetailsReadOnly
-              infor={this.state.dataInfor}
-              visible={this.state.addnextVisible}
-              onCancel={this.nextCancel}
+            infor={this.state.dataInfor}
+            visible={this.state.addnextVisible}
+            onCancel={this.nextCancel}
           />}
         </div>
       );

+ 78 - 55
js/component/manageCenter/order/orderNew/contractJsy.js

@@ -1,5 +1,5 @@
 import React from "react";
-import {Button, Input, Spin, Table, message, Form, Modal, Tabs, Tag, Tooltip} from "antd";
+import { Button, Input, Spin, Table, message, Form, Modal, Tabs, Tag, Tooltip } from "antd";
 import $ from "jquery/src/ajax";
 import {
   getNewOrderStatus,
@@ -18,10 +18,12 @@ import { SearchInput } from "./changeComponent/searchInput.js";
 import OrderDetail from "./changeComponent/orderDetail";
 import ShowModalDiv from "@/showModal.jsx";
 import OrderRiZi from "@/orderRiZi.jsx";
-import {ChooseList} from "./chooseList";
-import {getProjectName} from "../../../tools";
+import { ChooseList } from "./chooseList";
+import { getProjectName } from "../../../tools";
 import ProjectDetailsReadOnly from "../../../common/projectDetailsReadOnly";
 import OrderItemStatus from '../../../../component/common/orderItemStatus';
+import Cascaders from "../../../common/cascaders";
+
 const contractChange = Form.create()(
   React.createClass({
     loadData(pageNo) {
@@ -45,7 +47,7 @@ const contractChange = Form.create()(
           endTime: this.state.searchData.releaseDate[1],
           salesmanName: this.state.searchData.salesmanNameSearch,
           complete: this.state.searchData.completeSearch || 1,
-          depId: this.state.searchData.depIdSearch,
+          deps: this.state.searchData.deps,
           type: this.state.searchData.changeSearch
         },
         success: function (data) {
@@ -112,7 +114,7 @@ const contractChange = Form.create()(
         orderData: {}, //现订单数据
         pictureUrl: [],
         voucherUrl: [],
-        attachment:[],
+        attachment: [],
         declarationBatch: 1,
         dataInfor: {},
         attachmentUrl: [],
@@ -155,14 +157,14 @@ const contractChange = Form.create()(
             width: 150,
             render: (text) => {
               return (
-                  <Tooltip title={text}>
-                    <div style={{
-                      maxWidth:'150px',
-                      overflow:'hidden',
-                      textOverflow: "ellipsis",
-                      whiteSpace:'nowrap',
-                    }}>{text}</div>
-                  </Tooltip>
+                <Tooltip title={text}>
+                  <div style={{
+                    maxWidth: '150px',
+                    overflow: 'hidden',
+                    textOverflow: "ellipsis",
+                    whiteSpace: 'nowrap',
+                  }}>{text}</div>
+                </Tooltip>
               )
             },
           },
@@ -241,9 +243,9 @@ const contractChange = Form.create()(
             key: "commodityName",
             render: (text, record) => {
               return (
-                  <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span></span>
+                <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span></span>
               )
-          }
+            }
           },
           {
             title: "项目类别",
@@ -393,7 +395,7 @@ const contractChange = Form.create()(
         taskComment: record.taskComment, //备注
         main: record.main.toString(), //是否为主要
         addnextVisible: true,
-        dataInfor:record,
+        dataInfor: record,
         addState: 0
       });
     },
@@ -435,7 +437,7 @@ const contractChange = Form.create()(
                   url
                 )
                 : [],
-                attachment: thisdata.attachmentUrl
+              attachment: thisdata.attachmentUrl
                 ? splitUrl(
                   thisdata.attachmentUrl,
                   ",",
@@ -475,7 +477,7 @@ const contractChange = Form.create()(
               // arrears: thisdata.arrears,
               orderData: thisdata,
               isAddition: thisdata.additionalOrder ? true : false,
-              deleteSign:thisdata.deleteSign,
+              deleteSign: thisdata.deleteSign,
             });
           }
         }.bind(this)
@@ -565,14 +567,20 @@ const contractChange = Form.create()(
     },
 
     search(obj) {
-      this.setState(
-        {
-          searchData: obj
-        },
-        () => {
-          this.loadData(1);
-        }
-      );
+      if (obj.reset) {
+        this.state.searchData.deps = [];
+        this.Cascaders.empty();
+        this.loadData(1);
+      } else {
+        this.setState(
+          {
+            searchData: Object.assign(this.state.searchData, obj)
+          },
+          () => {
+            this.loadData(1);
+          }
+        );
+      }
     },
 
     rizhi(orderNo) {
@@ -1100,17 +1108,32 @@ const contractChange = Form.create()(
               className="test">
               <TabPane tab="搜索" key="1">
                 <div style={{ marginLeft: 10 }}>
+                  <Cascaders
+                    ref={node => this.Cascaders = node}
+                    placeholder="订单部门"
+                    id="id"
+                    name="name"
+                    children="list"
+                    height={28}
+                    onSel={(e) => {
+                      const { searchData } = this.state
+                      searchData["deps"] = JSON.stringify(e);
+                      this.setState({
+                        searchData: searchData
+                      })
+                    }}
+                  />
                   <SearchInput search={this.search} />
                 </div>
               </TabPane>
               <TabPane tab="更改表格显示数据" key="2">
                 <div style={{ marginLeft: 10 }}>
                   <ChooseList
-                      columns={this.state.columns}
-                      changeFn={this.changeList}
-                      changeList={this.state.changeList}
-                      top={55}
-                      margin={11}
+                    columns={this.state.columns}
+                    changeFn={this.changeList}
+                    changeList={this.state.changeList}
+                    top={55}
+                    margin={11}
                   />
                 </div>
               </TabPane>
@@ -1122,8 +1145,8 @@ const contractChange = Form.create()(
                   bordered
                   columns={
                     this.state.changeList
-                        ? this.state.changeList
-                        : this.state.columns
+                      ? this.state.changeList
+                      : this.state.columns
                   }
                   dataSource={this.state.dataSource}
                   pagination={this.state.pagination}
@@ -1145,8 +1168,8 @@ const contractChange = Form.create()(
                 onChange={this.callback}
                 type="card"
                 tabBarExtraContent={
-                  <div style={{fontWeight:'bold',paddingRight:'15px'}}>
-                    <OrderItemStatus deleteSign={this.state.deleteSign}/>
+                  <div style={{ fontWeight: 'bold', paddingRight: '15px' }}>
+                    <OrderItemStatus deleteSign={this.state.deleteSign} />
                   </div>
                 }
               >
@@ -1177,19 +1200,19 @@ const contractChange = Form.create()(
                   return (
                     <TabPane tab={"合同变更记录" + (index + 1)} key={item.id}>
 
-                          <ChangeDetail
-                            id={item.id}
-                            domId={'hetongbiangenjilu' + (index + 1)}
-                            orderUid={this.state.orderUid}
-                            data={this.state.contractData}
-                            pictureUrl={this.state.voucherUrl}
-                            attachment={this.state.attachment}
-                            processState={this.props.processState}
-                            loadData={this.callback}
-                            reset={this.state.visible}
-                            dataSource={this.state.dataProps}
-                            onCancel={this.visitCancel}
-                          />
+                      <ChangeDetail
+                        id={item.id}
+                        domId={'hetongbiangenjilu' + (index + 1)}
+                        orderUid={this.state.orderUid}
+                        data={this.state.contractData}
+                        pictureUrl={this.state.voucherUrl}
+                        attachment={this.state.attachment}
+                        processState={this.props.processState}
+                        loadData={this.callback}
+                        reset={this.state.visible}
+                        dataSource={this.state.dataProps}
+                        onCancel={this.visitCancel}
+                      />
                     </TabPane>
                   );
                 })}
@@ -1269,11 +1292,11 @@ const contractChange = Form.create()(
                       />
                     </TabPane>
                   ) : (
-                      ""
-                    )
-                ) : (
                     ""
-                  )}
+                  )
+                ) : (
+                  ""
+                )}
               </Tabs>
             </Modal>
             <Modal
@@ -1357,9 +1380,9 @@ const contractChange = Form.create()(
             />
           </div>
           {this.state.addnextVisible && <ProjectDetailsReadOnly
-              infor={this.state.dataInfor}
-              visible={this.state.addnextVisible}
-              onCancel={this.nextCancel}
+            infor={this.state.dataInfor}
+            visible={this.state.addnextVisible}
+            onCancel={this.nextCancel}
           />}
         </div>
       );

+ 87 - 64
js/component/manageCenter/order/orderNew/contractJszj.js

@@ -1,5 +1,5 @@
 import React from "react";
-import {Button, Input, Spin, Table, message, Form, Modal, Tabs, Tooltip} from "antd";
+import { Button, Input, Spin, Table, message, Form, Modal, Tabs, Tooltip } from "antd";
 import $ from "jquery/src/ajax";
 import {
   getNewOrderStatus,
@@ -18,10 +18,12 @@ import { SearchInput } from "./changeComponent/searchInput.js";
 import OrderDetail from "./changeComponent/orderDetail";
 import ShowModalDiv from "@/showModal.jsx";
 import OrderRiZi from "@/orderRiZi.jsx";
-import {ChooseList} from "./chooseList";
-import {getProjectName} from "../../../tools";
+import { ChooseList } from "./chooseList";
+import { getProjectName } from "../../../tools";
 import ProjectDetailsReadOnly from "../../../common/projectDetailsReadOnly";
 import OrderItemStatus from "../../../common/orderItemStatus";
+import Cascaders from "../../../common/cascaders";
+
 const contractChange = Form.create()(
   React.createClass({
     loadData(pageNo) {
@@ -43,7 +45,7 @@ const contractChange = Form.create()(
           endTime: this.state.searchData.releaseDate[1],
           salesmanName: this.state.searchData.salesmanNameSearch,
           complete: this.state.searchData.completeSearch || 1,
-          depId: this.state.searchData.depIdSearch,
+          deps: this.state.searchData.deps,
           orderNo: this.state.searchData.orderNoSearch,
           contractNo: this.state.searchData.contractNoSearch,
           type: this.state.searchData.changeSearch
@@ -114,7 +116,7 @@ const contractChange = Form.create()(
         orderData: {}, //现订单数据
         pictureUrl: [],
         voucherUrl: [],
-        attachment:[],
+        attachment: [],
         attachmentUrl: [],
         proceedsData: {},
         proTotal: 0,
@@ -157,14 +159,14 @@ const contractChange = Form.create()(
             key: "nickname",
             render: text => {
               return (
-                  <Tooltip title={text}>
-                    <div style={{
-                      maxWidth:'150px',
-                      overflow:'hidden',
-                      textOverflow: "ellipsis",
-                      whiteSpace:'nowrap',
-                    }}>{text}</div>
-                  </Tooltip>
+                <Tooltip title={text}>
+                  <div style={{
+                    maxWidth: '150px',
+                    overflow: 'hidden',
+                    textOverflow: "ellipsis",
+                    whiteSpace: 'nowrap',
+                  }}>{text}</div>
+                </Tooltip>
               )
             }
           },
@@ -243,9 +245,9 @@ const contractChange = Form.create()(
             key: "commodityName",
             render: (text, record) => {
               return (
-                  <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span></span>
+                <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span></span>
               )
-          }
+            }
           },
           {
             title: "项目类别",
@@ -377,7 +379,7 @@ const contractChange = Form.create()(
         taskComment: record.taskComment, //备注
         main: record.main.toString(), //是否为主要
         addnextVisible: true,
-        dataInfor:record,
+        dataInfor: record,
         addState: 0
       });
     },
@@ -419,7 +421,7 @@ const contractChange = Form.create()(
                   url
                 )
                 : [],
-                attachment: thisdata.attachmentUrl
+              attachment: thisdata.attachmentUrl
                 ? splitUrl(
                   thisdata.attachmentUrl,
                   ",",
@@ -508,7 +510,7 @@ const contractChange = Form.create()(
               // arrears: thisdata.arrears,
               orderData: thisdata,
               isAddition: thisdata.additionalOrder ? true : false,
-              deleteSign:thisdata.deleteSign,
+              deleteSign: thisdata.deleteSign,
             });
           }
         }.bind(this)
@@ -598,14 +600,20 @@ const contractChange = Form.create()(
     },
 
     search(obj) {
-      this.setState(
-        {
-          searchData: obj
-        },
-        () => {
-          this.loadData(1);
-        }
-      );
+      if (obj.reset) {
+        this.state.searchData.deps = [];
+        this.Cascaders.empty();
+        this.loadData(1);
+      } else {
+        this.setState(
+          {
+            searchData: Object.assign(this.state.searchData, obj)
+          },
+          () => {
+            this.loadData(1);
+          }
+        );
+      }
     },
 
     rizhi(orderNo) {
@@ -1150,17 +1158,32 @@ const contractChange = Form.create()(
               className="test">
               <TabPane tab="搜索" key="1">
                 <div style={{ marginLeft: 10 }}>
+                  <Cascaders
+                    ref={node => this.Cascaders = node}
+                    placeholder="订单部门"
+                    id="id"
+                    name="name"
+                    children="list"
+                    height={28}
+                    onSel={(e) => {
+                      const { searchData } = this.state
+                      searchData["deps"] = JSON.stringify(e);
+                      this.setState({
+                        searchData: searchData
+                      })
+                    }}
+                  />
                   <SearchInput search={this.search} />
                 </div>
               </TabPane>
               <TabPane tab="更改表格显示数据" key="2">
                 <div style={{ marginLeft: 10 }}>
                   <ChooseList
-                      columns={this.state.columns}
-                      changeFn={this.changeList}
-                      changeList={this.state.changeList}
-                      top={55}
-                      margin={11}
+                    columns={this.state.columns}
+                    changeFn={this.changeList}
+                    changeList={this.state.changeList}
+                    top={55}
+                    margin={11}
                   />
                 </div>
               </TabPane>
@@ -1172,8 +1195,8 @@ const contractChange = Form.create()(
                   bordered
                   columns={
                     this.state.changeList
-                        ? this.state.changeList
-                        : this.state.columns
+                      ? this.state.changeList
+                      : this.state.columns
                   }
                   dataSource={this.state.dataSource}
                   pagination={this.state.pagination}
@@ -1195,8 +1218,8 @@ const contractChange = Form.create()(
                 onChange={this.callback}
                 type="card"
                 tabBarExtraContent={
-                  <div style={{fontWeight:'bold',paddingRight:'15px'}}>
-                    <OrderItemStatus deleteSign={this.state.deleteSign}/>
+                  <div style={{ fontWeight: 'bold', paddingRight: '15px' }}>
+                    <OrderItemStatus deleteSign={this.state.deleteSign} />
                   </div>
                 }
               >
@@ -1219,7 +1242,7 @@ const contractChange = Form.create()(
                         orderNo={this.state.orderNo}
                       />
                     </Spin>
-                  </Form> : <div/>}
+                  </Form> : <div />}
                 </TabPane>
                 {/* <TabPane tab="合同变更记录" key="2">
                   <ChangeDetail
@@ -1239,23 +1262,23 @@ const contractChange = Form.create()(
                 {tabList.map((item, index, arr) => {
                   return (
                     <TabPane tab={"合同变更记录" + (index + 1)} key={item.id}>
-                      {this.state.activeKey === String(item.id) ?<ChangeDetail
-                            id={item.id}
-                            orderUid={this.state.orderUid}
-                            money={index == arr.length - 1 ? this.state.orderData.totalAmount + "" : undefined}
-                            data={this.state.contractData}
-                            pictureUrl={this.state.voucherUrl}
-                            attachment = {this.state.attachment}
-                            processState={this.props.processState}
-                            loadData={this.callback}
-                            reset={this.state.visible}
-                            dataSource={this.state.dataProps}
-                            proceedsData={this.state.proceedsData}
-                            proceedsTotal={this.state.proTotal}
-                            invoiceTotal={this.state.invTotal}
-                            contactList={this.state.refundInvoice}
-                            onCancel={this.visitCancel}
-                          /> : <div/>}
+                      {this.state.activeKey === String(item.id) ? <ChangeDetail
+                        id={item.id}
+                        orderUid={this.state.orderUid}
+                        money={index == arr.length - 1 ? this.state.orderData.totalAmount + "" : undefined}
+                        data={this.state.contractData}
+                        pictureUrl={this.state.voucherUrl}
+                        attachment={this.state.attachment}
+                        processState={this.props.processState}
+                        loadData={this.callback}
+                        reset={this.state.visible}
+                        dataSource={this.state.dataProps}
+                        proceedsData={this.state.proceedsData}
+                        proceedsTotal={this.state.proTotal}
+                        invoiceTotal={this.state.invTotal}
+                        contactList={this.state.refundInvoice}
+                        onCancel={this.visitCancel}
+                      /> : <div />}
                     </TabPane>
                   );
                 })}
@@ -1290,7 +1313,7 @@ const contractChange = Form.create()(
                         tab={"原订单" + (index + 1)}
                         key={item.usedOrder}
                       >
-                        {this.state.activeKey === String(item.usedOrder) ?<Form
+                        {this.state.activeKey === String(item.usedOrder) ? <Form
                           layout="horizontal"
                           onSubmit={this.handleSubmit}
                           id="demand-form"
@@ -1307,7 +1330,7 @@ const contractChange = Form.create()(
                               contactListNew={this.state.contactListNew}
                             />
                           </Spin>
-                        </Form> : <div/>}
+                        </Form> : <div />}
                       </TabPane>
                     );
                   } else {
@@ -1325,16 +1348,16 @@ const contractChange = Form.create()(
                         orderNo={this.state.additionalOrder}
                         totalCui={this.state.totalCui}
                         contactListNew={this.state.contactListNew}
-                      /> : <div/>}
+                      /> : <div />}
                     </TabPane>
                   ) : (
-                      ""
-                    )
-                ) : (
                     ""
-                  )}
+                  )
+                ) : (
+                  ""
+                )}
               </Tabs>
-            </Modal>:<div/>}
+            </Modal> : <div />}
             <Modal
               maskClosable={false}
               visible={this.state.noVisible}
@@ -1416,9 +1439,9 @@ const contractChange = Form.create()(
             />
           </div>
           {this.state.addnextVisible && <ProjectDetailsReadOnly
-              infor={this.state.dataInfor}
-              visible={this.state.addnextVisible}
-              onCancel={this.nextCancel}
+            infor={this.state.dataInfor}
+            visible={this.state.addnextVisible}
+            onCancel={this.nextCancel}
           />}
         </div>
       );

+ 34 - 11
js/component/manageCenter/order/orderNew/contractYxgly.js

@@ -22,6 +22,8 @@ import { ChooseList } from "./chooseList";
 import { getProjectName } from "../../../tools";
 import ProjectDetailsReadOnly from "../../../common/projectDetailsReadOnly";
 import OrderItemStatus from "../../../common/orderItemStatus";
+import Cascaders from "../../../common/cascaders";
+
 const contractChange = Form.create()(
   React.createClass({
     loadData(pageNo) {
@@ -45,7 +47,7 @@ const contractChange = Form.create()(
           endTime: this.state.searchData.releaseDate[1],
           salesmanName: this.state.searchData.salesmanNameSearch,
           complete: this.state.searchData.completeSearch || 1,
-          depId: this.state.searchData.depIdSearch,
+          deps: this.state.searchData.deps,
           type: this.state.searchData.changeSearch
         },
         success: function (data) {
@@ -239,9 +241,9 @@ const contractChange = Form.create()(
             key: "commodityName",
             render: (text, record) => {
               return (
-                  <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span></span>
+                <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span></span>
               )
-          }
+            }
           },
           {
             title: "项目类别",
@@ -595,14 +597,20 @@ const contractChange = Form.create()(
     },
 
     search(obj) {
-      this.setState(
-        {
-          searchData: obj
-        },
-        () => {
-          this.loadData(1);
-        }
-      );
+      if (obj.reset) {
+        this.state.searchData.deps = [];
+        this.Cascaders.empty();
+        this.loadData(1);
+      } else {
+        this.setState(
+          {
+            searchData: Object.assign(this.state.searchData, obj)
+          },
+          () => {
+            this.loadData(1);
+          }
+        );
+      }
     },
 
     rizhi(orderNo) {
@@ -1159,6 +1167,21 @@ const contractChange = Form.create()(
               className="test">
               <TabPane tab="搜索" key="1">
                 <div style={{ marginLeft: 10 }}>
+                  <Cascaders
+                    ref={node => this.Cascaders = node}
+                    placeholder="订单部门"
+                    id="id"
+                    name="name"
+                    children="list"
+                    height={28}
+                    onSel={(e) => {
+                      const { searchData } = this.state
+                      searchData["deps"] = JSON.stringify(e);
+                      this.setState({
+                        searchData: searchData
+                      })
+                    }}
+                  />
                   <SearchInput search={this.search} />
                 </div>
               </TabPane>

+ 164 - 140
js/component/manageCenter/order/orderNew/contractYxy.js

@@ -1,5 +1,5 @@
 import React from "react";
-import {Button, Input, Spin, Table, message, Form, Modal, Tabs, Tooltip,} from "antd";
+import { Button, Input, Spin, Table, message, Form, Modal, Tabs, Tooltip, } from "antd";
 import $ from "jquery/src/ajax";
 import {
   getNewOrderStatus,
@@ -22,9 +22,10 @@ import ChangeApply from "./changeComponent/changeApply";
 import { ChooseList } from "./chooseList.jsx";
 import ShowModalDiv from "@/showModal.jsx";
 import OrderRiZi from "@/orderRiZi.jsx";
-import {getProjectName} from "../../../tools";
+import { getProjectName } from "../../../tools";
 import ProjectDetailsReadOnly from "../../../common/projectDetailsReadOnly";
 import OrderItemStatus from "../../../common/orderItemStatus";
+import Cascaders from "../../../common/cascaders";
 
 const contractChange = Form.create()(
   React.createClass({
@@ -47,7 +48,7 @@ const contractChange = Form.create()(
           endTime: this.state.searchData.releaseDate[1],
           salesmanName: this.state.searchData.salesmanNameSearch,
           complete: this.state.searchData.completeSearch || 1,
-          depId: this.state.searchData.depIdSearch,
+          deps: this.state.searchData.deps,
           orderNo: this.state.searchData.orderNoSearch,
           contractNo: this.state.searchData.contractNoSearch,
           type: this.state.searchData.changeSearch
@@ -118,7 +119,7 @@ const contractChange = Form.create()(
         orderData: {}, //现订单数据
         pictureUrl: [],
         voucherUrl: [],
-        attachment:[],
+        attachment: [],
         buttonStatusA: true,
         attachmentUrl: [],
         proceedsData: {},
@@ -162,14 +163,14 @@ const contractChange = Form.create()(
             width: 150,
             render: (text) => {
               return (
-                  <Tooltip title={text}>
-                    <div style={{
-                      maxWidth:'150px',
-                      overflow:'hidden',
-                      textOverflow: "ellipsis",
-                      whiteSpace:'nowrap',
-                    }}>{text}</div>
-                  </Tooltip>
+                <Tooltip title={text}>
+                  <div style={{
+                    maxWidth: '150px',
+                    overflow: 'hidden',
+                    textOverflow: "ellipsis",
+                    whiteSpace: 'nowrap',
+                  }}>{text}</div>
+                </Tooltip>
               )
             },
           },
@@ -248,9 +249,9 @@ const contractChange = Form.create()(
             key: "commodityName",
             render: (text, record) => {
               return (
-                  <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span></span>
+                <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span></span>
               )
-          }
+            }
           },
           {
             title: "项目类别",
@@ -382,7 +383,7 @@ const contractChange = Form.create()(
         taskComment: record.taskComment, //备注
         main: record.main.toString(), //是否为主要
         addnextVisible: true,
-        dataInfor:record,
+        dataInfor: record,
         addState: 0
       });
     },
@@ -426,7 +427,7 @@ const contractChange = Form.create()(
                   url
                 )
                 : [],
-                attachment: thisdata.attachmentUrl
+              attachment: thisdata.attachmentUrl
                 ? splitUrl(
                   thisdata.attachmentUrl,
                   ",",
@@ -516,7 +517,7 @@ const contractChange = Form.create()(
                 // arrears: thisdata.arrears,
                 orderData: thisdata,
                 isAddition: thisdata.additionalOrder ? true : false,
-                deleteSign:thisdata.deleteSign,
+                deleteSign: thisdata.deleteSign,
               },
               () => {
                 if (this.state.orderData.deleteSign !== 3) {
@@ -615,14 +616,20 @@ const contractChange = Form.create()(
     },
 
     search(obj) {
-      this.setState(
-        {
-          searchData: obj
-        },
-        () => {
-          this.loadData(1);
-        }
-      );
+      if (obj.reset) {
+        this.state.searchData.deps = [];
+        this.Cascaders.empty();
+        this.loadData(1);
+      } else {
+        this.setState(
+          {
+            searchData: Object.assign(this.state.searchData, obj)
+          },
+          () => {
+            this.loadData(1);
+          }
+        );
+      }
     },
 
     rizhi(orderNo) {
@@ -1162,16 +1169,33 @@ const contractChange = Form.create()(
           <div className="user-search">
             <Tabs defaultActiveKey="1" className="test">
               <TabPane tab="搜索" key="1">
-                <SearchInput search={this.search} isYxy={true} />
+                <div>
+                  <Cascaders
+                    ref={node => this.Cascaders = node}
+                    placeholder="订单部门"
+                    id="id"
+                    name="name"
+                    children="list"
+                    height={28}
+                    onSel={(e) => {
+                      const { searchData } = this.state
+                      searchData["deps"] = JSON.stringify(e);
+                      this.setState({
+                        searchData: searchData
+                      })
+                    }}
+                  />
+                  <SearchInput search={this.search} isYxy={true} />
+                </div>
               </TabPane>
               <TabPane tab="更改表格显示数据" key="2">
                 <div style={{ marginLeft: 10 }}>
                   <ChooseList
-                      columns={this.state.columns}
-                      changeFn={this.changeList}
-                      changeList={this.state.changeList}
-                      top={55}
-                      margin={11}
+                    columns={this.state.columns}
+                    changeFn={this.changeList}
+                    changeList={this.state.changeList}
+                    top={55}
+                    margin={11}
                   />
                 </div>
               </TabPane>
@@ -1183,8 +1207,8 @@ const contractChange = Form.create()(
                   bordered
                   columns={
                     this.state.changeList
-                        ? this.state.changeList
-                        : this.state.columns
+                      ? this.state.changeList
+                      : this.state.columns
                   }
                   style={{
                     cursor: 'pointer',
@@ -1209,87 +1233,87 @@ const contractChange = Form.create()(
                 onChange={this.callback}
                 type="card"
                 tabBarExtraContent={
-                  <div style={{fontWeight:'bold',paddingRight:'15px'}}>
-                    <OrderItemStatus deleteSign={this.state.deleteSign}/>
+                  <div style={{ fontWeight: 'bold', paddingRight: '15px' }}>
+                    <OrderItemStatus deleteSign={this.state.deleteSign} />
                   </div>
                 }
               >
                 <TabPane tab="订单详情" key="a">
                   {this.state.activeKey === 'a' ? <div>
                     {this.state.orderData.deleteSign === 3 ? (
-                        <AddOrders
+                      <AddOrders
+                        orderUid={this.state.orderUid}
+                        processStatus={0}
+                        data={this.state.orderData.orderNo}
+                        mark={this.state.buttonStatus}
+                        getPrimaryOrder={this.getPrimaryOrder}
+                        totalCui={this.state.totalCui}
+                        closeDesc={this.closeDesc}
+                        getAdditionalOrder={this.getAdditionalOrder}
+                        deleteSign={this.state.orderData.deleteSign}
+                      />
+                    ) : (
+                      <Form
+                        layout="horizontal"
+                        onSubmit={this.handleSubmit}
+                        id="demand-form"
+                        style={{ paddingBottom: "40px" }}
+                      >
+                        <Spin spinning={this.state.loading}>
+                          <OrderDetail
+                            domId='dindanxiangqing'
                             orderUid={this.state.orderUid}
-                            processStatus={0}
-                            data={this.state.orderData.orderNo}
-                            mark={this.state.buttonStatus}
-                            getPrimaryOrder={this.getPrimaryOrder}
-                            totalCui={this.state.totalCui}
-                            closeDesc={this.closeDesc}
-                            getAdditionalOrder={this.getAdditionalOrder}
-                            deleteSign={this.state.orderData.deleteSign}
-                        />
-                    ):(
-                        <Form
-                            layout="horizontal"
-                            onSubmit={this.handleSubmit}
-                            id="demand-form"
-                            style={{ paddingBottom: "40px" }}
-                        >
-                          <Spin spinning={this.state.loading}>
-                            <OrderDetail
-                                domId='dindanxiangqing'
-                                orderUid={this.state.orderUid}
-                                orderData={this.state.orderData}
-                                getOrderLog={this.getOrderLog}
-                                totalCui={parseFloat(this.state.totalCui)}
-                                dataSourceX={this.state.dataSourceX}
-                                contactList={this.state.contactList}
-                                contactListNew={this.state.contactListNew}
-                                orderNo={this.state.orderNo}
-                            />
-                          </Spin>
-                        </Form>
-                    ) }
-                  </div>:<div/>}
+                            orderData={this.state.orderData}
+                            getOrderLog={this.getOrderLog}
+                            totalCui={parseFloat(this.state.totalCui)}
+                            dataSourceX={this.state.dataSourceX}
+                            contactList={this.state.contactList}
+                            contactListNew={this.state.contactListNew}
+                            orderNo={this.state.orderNo}
+                          />
+                        </Spin>
+                      </Form>
+                    )}
+                  </div> : <div />}
                 </TabPane>
                 {tabList.map((item, index, arr) => {
                   return (
                     <TabPane tab={"合同变更记录" + (index + 1)} key={item.id}>
                       {
                         this.state.activeKey === String(item.id) ?
-                            (
-                                this.state.contractData.processState === 0 &&
-                                this.state.contractData.status != 5 ? (
-                                    <ChangeApply
-                                        orderUid={this.state.orderUid}
-                                        id={Math.random()}
-                                        orderData={this.state.contractData}
-                                        voucherUrl={this.state.voucherUrl}
-                                        onCancel={this.visitCancel}
-                                    />
-                                ) : (
-                                    <ChangeDetail
-                                        domId={'hetongbiangenjilu' + (index + 1)}
-                                        orderUid={this.state.orderUid}
-                                        id={item.id}
-                                        money={
-                                          index == arr.length - 1
-                                              ? this.state.orderData.totalAmount + ""
-                                              : undefined
-                                        }
-                                        visitCancel={this.visitCancel}
-                                        data={this.state.contractData}
-                                        pictureUrl={this.state.voucherUrl}
-                                        attachment = {this.state.attachment}
-                                        processState={this.props.processState}
-                                        dataSource={this.state.dataProps}
-                                        proceedsData={this.state.proceedsData}
-                                        proceedsTotal={this.state.proTotal}
-                                        invoiceTotal={this.state.invTotal}
-                                        contactList={this.state.refundInvoice}
-                                    />
-                                )
-                            ) : <div/>
+                          (
+                            this.state.contractData.processState === 0 &&
+                              this.state.contractData.status != 5 ? (
+                              <ChangeApply
+                                orderUid={this.state.orderUid}
+                                id={Math.random()}
+                                orderData={this.state.contractData}
+                                voucherUrl={this.state.voucherUrl}
+                                onCancel={this.visitCancel}
+                              />
+                            ) : (
+                              <ChangeDetail
+                                domId={'hetongbiangenjilu' + (index + 1)}
+                                orderUid={this.state.orderUid}
+                                id={item.id}
+                                money={
+                                  index == arr.length - 1
+                                    ? this.state.orderData.totalAmount + ""
+                                    : undefined
+                                }
+                                visitCancel={this.visitCancel}
+                                data={this.state.contractData}
+                                pictureUrl={this.state.voucherUrl}
+                                attachment={this.state.attachment}
+                                processState={this.props.processState}
+                                dataSource={this.state.dataProps}
+                                proceedsData={this.state.proceedsData}
+                                proceedsTotal={this.state.proTotal}
+                                invoiceTotal={this.state.invTotal}
+                                contactList={this.state.refundInvoice}
+                              />
+                            )
+                          ) : <div />
                       }
                     </TabPane>
                   );
@@ -1303,26 +1327,26 @@ const contractChange = Form.create()(
                       >
                         {
                           this.state.activeKey === String(item.usedOrder) ?
-                              <Form
-                                  layout="horizontal"
-                                  onSubmit={this.handleSubmit}
-                                  id="demand-form"
-                                  style={{ paddingBottom: "40px" }}
-                              >
-                                <Spin spinning={this.state.loading}>
-                                  <OrderDetail
-                                      domId={'yuandingdan' + (index + 1)}
-                                      orderUid={this.state.orderUid}
-                                      orderData={this.state.primaryOrderData}
-                                      getOrderLog={this.getOrderLog}
-                                      dataSourceX={this.state.dataSourceX}
-                                      contactList={this.state.contactList}
-                                      orderNo={this.state.primaryOrderNo}
-                                      totalCui={this.state.totalCui}
-                                      contactListNew={this.state.contactListNew}
-                                  />
-                                </Spin>
-                              </Form> : <div/>
+                            <Form
+                              layout="horizontal"
+                              onSubmit={this.handleSubmit}
+                              id="demand-form"
+                              style={{ paddingBottom: "40px" }}
+                            >
+                              <Spin spinning={this.state.loading}>
+                                <OrderDetail
+                                  domId={'yuandingdan' + (index + 1)}
+                                  orderUid={this.state.orderUid}
+                                  orderData={this.state.primaryOrderData}
+                                  getOrderLog={this.getOrderLog}
+                                  dataSourceX={this.state.dataSourceX}
+                                  contactList={this.state.contactList}
+                                  orderNo={this.state.primaryOrderNo}
+                                  totalCui={this.state.totalCui}
+                                  contactListNew={this.state.contactListNew}
+                                />
+                              </Spin>
+                            </Form> : <div />
                         }
                       </TabPane>
                     );
@@ -1359,27 +1383,27 @@ const contractChange = Form.create()(
                     <TabPane tab="附加订单" key="c">
                       {
                         this.state.activeKey === "c" ?
-                            <AddOrders
-                                domId='fujiadingdan'
-                                orderUid={this.state.orderUid}
-                                processStatus={0}
-                                data={this.state.orderData.additionalOrder}
-                                mark={this.state.buttonStatusA}
-                                getPrimaryOrder={this.getPrimaryOrder}
-                                closeDesc={this.closeDesc}
-                                getAdditionalOrder={this.getAdditionalOrder}
-                                activeKey={this.state.activeKey}
-                            /> : <div/>
+                          <AddOrders
+                            domId='fujiadingdan'
+                            orderUid={this.state.orderUid}
+                            processStatus={0}
+                            data={this.state.orderData.additionalOrder}
+                            mark={this.state.buttonStatusA}
+                            getPrimaryOrder={this.getPrimaryOrder}
+                            closeDesc={this.closeDesc}
+                            getAdditionalOrder={this.getAdditionalOrder}
+                            activeKey={this.state.activeKey}
+                          /> : <div />
                       }
                     </TabPane>
                   ) : (
-                      ""
-                    )
-                ) : (
                     ""
-                  )}
+                  )
+                ) : (
+                  ""
+                )}
               </Tabs>
-            </Modal> : <div/>}
+            </Modal> : <div />}
             <Modal
               maskClosable={false}
               visible={this.state.noVisible}
@@ -1461,9 +1485,9 @@ const contractChange = Form.create()(
             />
           </div>
           {this.state.addnextVisible && <ProjectDetailsReadOnly
-              infor={this.state.dataInfor}
-              visible={this.state.addnextVisible}
-              onCancel={this.nextCancel}
+            infor={this.state.dataInfor}
+            visible={this.state.addnextVisible}
+            onCancel={this.nextCancel}
           />}
         </div>
       );

+ 41 - 23
js/component/manageCenter/order/orderNew/costAuditList/filterColumn.js

@@ -1,33 +1,37 @@
-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: [],
+            deps: undefined,
         }
         this.handleReset = this.handleReset.bind(this);
         this.departmentList = this.departmentList.bind(this);
     }
 
     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 +79,7 @@ class FilterColumn extends Component{
                     initialValues={{
                         remember: true,
                     }}
-                    onSubmit={(e)=>{
+                    onSubmit={(e) => {
                         this.handleSubmit(e)
                     }}
                 >
@@ -85,7 +89,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 +98,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,27 +107,41 @@ 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('deps', {
                             rules: [{ required: false, message: '' }],
                         })(
-                            <Select placeholder="请选择部门" style={{
-                                width: '200px',
-                                marginTop: '0px',
-                            }}>
+                            <Select
+                                placeholder="请选择部门"
+                                style={{
+                                    width: '200px',
+                                    marginTop: '0px',
+                                }}>
                                 {
                                     this.state.departmentArr.map(function (item) {
                                         return <Select.Option key={item.id} value={item.id}>{item.name}</Select.Option>
                                     })
                                 }
                             </Select>
-                        )}
-
+                        )} */}
                     </Form.Item>
                     <Form.Item
                         label="发起人"
@@ -131,7 +149,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 +158,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 +167,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 +176,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

+ 24 - 8
js/component/manageCenter/order/orderNew/inquiry.jsx

@@ -54,6 +54,8 @@ import OrderCoor from "./changeComponent/orderCoor.jsx";
 import ContentUrl from "./contentUrl.jsx";
 import Order from "../../customerService/administration/order.jsx";
 import LogPopup from "../../../common/logPopup";
+import Cascaders from "../../../common/cascaders";
+
 const { Option } = Select;
 const { TabPane } = Tabs;
 const PicturesWall = React.createClass({
@@ -143,12 +145,12 @@ const IntentionCustomer = Form.create()(
           specially: 5,
           name: this.state.customerName,
           orderNo: this.state.searchOrderNo,
-          depId: this.state.departmenttSearch,
+          // depId: this.state.departmenttSearch,
           starTime: this.state.releaseDate[0],
           endTime: this.state.releaseDate[1],
           liquidationStatus: this.state.liquidationStatusSearch,
           contractNo: this.state.contractNoSearch,
-          depId: this.state.departmenttList,
+          deps: this.state.departmenttList,
           amountStatus: this.state.amountStatus,
           approval: this.state.approvalSearch,
           projectType: this.state.projectType,
@@ -1662,7 +1664,7 @@ const IntentionCustomer = Form.create()(
       });
     },
     componentWillMount() {
-      this.departmentList();
+      // this.departmentList();
       this.loadData();
     },
     //整行点击
@@ -1989,8 +1991,8 @@ const IntentionCustomer = Form.create()(
         signBillVisible: false,
       });
       this.state.searchOrderNo = undefined;
-      this.state.orderNo = "";
-      this.state.customerName = "";
+      this.state.orderNo = undefined;
+      this.state.customerName = undefined;
       this.state.departmenttSearch = undefined;
       this.state.releaseDate[0] = undefined;
       this.state.releaseDate[1] = undefined;
@@ -1999,12 +2001,13 @@ const IntentionCustomer = Form.create()(
       this.state.formalOrder = true;
       this.state.intentOrder = true;
       (this.state.liquidationStatusSearch = []),
-        (this.state.contractNoSearch = "");
+        (this.state.contractNoSearch = undefined);
       this.state.departmenttList = [];
       this.state.amountStatus = undefined;
       this.state.approvalSearch = undefined;
       this.state.processStatusSearch = undefined;
       this.state.projectType = undefined;
+      this.Cascaders.empty();
       this.loadData();
     },
     //部门
@@ -2374,7 +2377,20 @@ const IntentionCustomer = Form.create()(
                       this.setState({ customerName: e.target.value });
                     }}
                   />
-                  <Select
+                  <Cascaders
+                    ref={node => this.Cascaders = node}
+                    placeholder="订单部门"
+                    id="id"
+                    name="name"
+                    children="list"
+                    height={28}
+                    onSel={(e) => {
+                      this.setState({
+                        departmenttList: JSON.stringify(e),
+                      });
+                    }}
+                  />
+                  {/* <Select
                     placeholder="订单部门"
                     style={{ width: 200, marginRight: 10 }}
                     value={this.state.departmenttList}
@@ -2385,7 +2401,7 @@ const IntentionCustomer = Form.create()(
                     {departmentArr.map(function (item) {
                       return <Option key={item.id}>{item.name}</Option>;
                     })}
-                  </Select>
+                  </Select> */}
                   <Input
                     placeholder="合同编号"
                     style={{ width: "140px" }}

+ 18 - 2
js/component/manageCenter/order/orderNew/myprojectvip.jsx

@@ -12,6 +12,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;
 
 //我的会员项目列表
@@ -417,6 +418,7 @@ const MyProjectVip = React.createClass({
     this.setState({
       searchValues: JSON.parse(JSON.stringify({})),
     }, () => {
+      this.Cascaders.empty();
       this.loadData();
     })
   },
@@ -603,7 +605,21 @@ const MyProjectVip = 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: 200, marginRight: 10 }}
                 value={searchValues["depId"]
@@ -621,7 +637,7 @@ const MyProjectVip = React.createClass({
                     <Select.Option key={item.id}>{item.name}</Select.Option>
                   );
                 })}
-              </Select>
+              </Select> */}
               <Input
                 placeholder="合同编号"
                 value={searchValues["contractNo"]

+ 429 - 414
js/component/manageCenter/order/orderNew/press.jsx

@@ -1,23 +1,23 @@
 import React from 'react';
-import { Button, Input, Select, Spin, Table, message,DatePicker, Form ,Modal,Tabs,Tooltip} from 'antd';
+import { Button, Input, Select, Spin, Table, message, DatePicker, Form, Modal, Tabs, Tooltip } from 'antd';
 import $ from 'jquery/src/ajax';
 import moment from 'moment';
-import { getLiquidationStatus,getjiedian,getNewOrderStatus,getProjectStatus} from '@/tools.js';
+import { getLiquidationStatus, getjiedian, getNewOrderStatus, getProjectStatus } from '@/tools.js';
 import './customer.less';
-import {ChooseList} from "./chooseList";
-import {getProjectName} from "../../../tools";
+import { ChooseList } from "./chooseList";
+import { getProjectName } from "../../../tools";
 import DepartmentList from "../../../common/departmentList";
-
+import Cascaders from "../../../common/cascaders";
 
 const IntentionCustomer = Form.create()(React.createClass({
-	loadData(pageNo) {
-		this.setState({
-			visitModul:false,
-			loading: true,
-			ispage:pageNo,
-			modalVisible:false
-		});
-		$.ajax({
+  loadData(pageNo) {
+    this.setState({
+      visitModul: false,
+      loading: true,
+      ispage: pageNo,
+      modalVisible: false
+    });
+    $.ajax({
       method: "get",
       dataType: "json",
       crossDomain: false,
@@ -27,13 +27,13 @@ const IntentionCustomer = Form.create()(React.createClass({
         pageSize: this.state.pagination.pageSize,
         name: this.state.customerName, //名称
         orderNo: this.state.orderNo, //订单编号
-        depId: this.state.departmenttSearch, //订单部门
+        deps: this.state.departmenttSearch, //订单部门
         adminName: this.state.adminName, //责任人名称
         starTime: this.state.releaseDate[0], //开始时间
         endTime: this.state.releaseDate[1], //结束时间
         newStatus: this.state.newStatus
       },
-      success: function(data) {
+      success: function (data) {
         let theArr = [];
         if (data.error.length || data.data.list == "") {
           if (data.error && data.error.length) {
@@ -61,7 +61,7 @@ const IntentionCustomer = Form.create()(React.createClass({
               depName: thisdata.depName, //部门名称
               contractNo: thisdata.contractNo,
               dunStatus: thisdata.dunStatus == 0 ? "未触发" : "已触发",
-              commodityName:thisdata.commodityName,
+              commodityName: thisdata.commodityName,
             });
           }
           this.state.pagination.total = data.data.totalCount;
@@ -77,407 +77,409 @@ const IntentionCustomer = Form.create()(React.createClass({
         });
       }.bind(this)
     }).always(
-      function() {
+      function () {
         this.setState({
           loading: false
         });
       }.bind(this)
     );
-	},
-	loadDatas(dunId) {
-		this.setState({
-			loading: true,
-		});
-		$.ajax({
-			method: "get",
-			dataType: "json",
-			crossDomain: false,
-			url: globalConfig.context +"/api/admin/newOrder/selectDunLogList",
-			data: {
-				dunId:dunId,
-			},
-			success: function(data) {
-				let theArr = [];
-				if(data.error.length || data.data == "") {
-					if(data.error && data.error.length) {
-						message.warning(data.error[0].message);
-					};
-				} else {
-					for(let i = 0; i < data.data.length; i++) {
-						let thisdata = data.data[i];
-						theArr.push({
-							 key: i,
-							 id:thisdata.id,//ID
-							 dunId: thisdata.dunId,//催款ID
-	                         dumBy:thisdata.dumBy,//催款人
-	                         dumTime:thisdata.dumDate,//催款时间
-	                         remarks:thisdata.remarks,//备注
-						});
-					};
-				};
-				this.setState({
-					dataSources: theArr,
-				});
-			}.bind(this),
-		}).always(function() {
-			this.setState({
-				loading: false
-			});
-		}.bind(this));
-	},
-	getInitialState() {
-	return {
-    newStatus: 1,
-    page: 1,
-    releaseDate: [],
-    selectedRowKeys: [],
-    orgCodeUrl: [],
-    paginations: false,
-    pagination: {
-      defaultCurrent: 1,
-      defaultPageSize: 10,
-      showQuickJumper: true,
-      pageSize: 10,
-      onChange: function(page) {
-        this.loadData(page);
-      }.bind(this),
-      showTotal: function(total) {
-        return "共" + total + "条数据";
-      }
-    },
-    columns: [
-      {
-        title: "序号",
-        dataIndex: "key",
-        key: "key",
-        fixed: 'left'
-      },
-      {
-        title: "合同编号",
-        dataIndex: "contractNo",
-        key: "contractNo",
-        fixed: 'left'
+  },
+  loadDatas(dunId) {
+    this.setState({
+      loading: true,
+    });
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/newOrder/selectDunLogList",
+      data: {
+        dunId: dunId,
       },
-      {
-        title: "订单编号",
-        dataIndex: "orderNo",
-        key: "orderNo"
+      success: function (data) {
+        let theArr = [];
+        if (data.error.length || data.data == "") {
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
+          };
+        } else {
+          for (let i = 0; i < data.data.length; i++) {
+            let thisdata = data.data[i];
+            theArr.push({
+              key: i,
+              id: thisdata.id,//ID
+              dunId: thisdata.dunId,//催款ID
+              dumBy: thisdata.dumBy,//催款人
+              dumTime: thisdata.dumDate,//催款时间
+              remarks: thisdata.remarks,//备注
+            });
+          };
+        };
+        this.setState({
+          dataSources: theArr,
+        });
+      }.bind(this),
+    }).always(function () {
+      this.setState({
+        loading: false
+      });
+    }.bind(this));
+  },
+  getInitialState() {
+    return {
+      newStatus: 1,
+      page: 1,
+      releaseDate: [],
+      selectedRowKeys: [],
+      orgCodeUrl: [],
+      paginations: false,
+      pagination: {
+        defaultCurrent: 1,
+        defaultPageSize: 10,
+        showQuickJumper: true,
+        pageSize: 10,
+        onChange: function (page) {
+          this.loadData(page);
+        }.bind(this),
+        showTotal: function (total) {
+          return "共" + total + "条数据";
+        }
       },
-      {
-        title: "客户名称",
-        dataIndex: "userName",
-        key: "userName",
-        render: text => {
-          return (
+      columns: [
+        {
+          title: "序号",
+          dataIndex: "key",
+          key: "key",
+          fixed: 'left'
+        },
+        {
+          title: "合同编号",
+          dataIndex: "contractNo",
+          key: "contractNo",
+          fixed: 'left'
+        },
+        {
+          title: "订单编号",
+          dataIndex: "orderNo",
+          key: "orderNo"
+        },
+        {
+          title: "客户名称",
+          dataIndex: "userName",
+          key: "userName",
+          render: text => {
+            return (
               <Tooltip title={text}>
-                  <div style={{
-                      maxWidth:'150px',
-                      overflow:'hidden',
-                      textOverflow: "ellipsis",
-                      whiteSpace:'nowrap',
-                  }}>{text}</div>
+                <div style={{
+                  maxWidth: '150px',
+                  overflow: 'hidden',
+                  textOverflow: "ellipsis",
+                  whiteSpace: 'nowrap',
+                }}>{text}</div>
               </Tooltip>
-          )
-        }
-      },
-      {
-        title: "订单负责人",
-        dataIndex: "salesmanName",
-        key: "salesmanName"
-      },
-      {
-        title: "订单部门",
-        dataIndex: "depName",
-        key: "depName"
-      },
-      {
-        title: "订单状态",
-        dataIndex: "orderStatus",
-        key: "orderStatus",
-        render: text => {
-          return getNewOrderStatus(text);
+            )
+          }
+        },
+        {
+          title: "订单负责人",
+          dataIndex: "salesmanName",
+          key: "salesmanName"
+        },
+        {
+          title: "订单部门",
+          dataIndex: "depName",
+          key: "depName"
+        },
+        {
+          title: "订单状态",
+          dataIndex: "orderStatus",
+          key: "orderStatus",
+          render: text => {
+            return getNewOrderStatus(text);
+          }
+        },
+        {
+          title: "项目名称",
+          dataIndex: "commodityName",
+          key: "commodityName",
+          // render: text => {
+          //   return getNewOrderStatus(text);
+          // }
+        },
+        {
+          title: "项目状态",
+          dataIndex: "projectStatus",
+          key: "projectStatus",
+          render: text => {
+            return getProjectName(text);
+          }
+        },
+        {
+          title: "签单金额(万元)",
+          dataIndex: "totalAmount",
+          key: "totalAmount"
+        },
+        {
+          title: "已收款(万元)",
+          dataIndex: "settlementAmount",
+          key: "settlementAmount"
+        },
+        {
+          title: "未收款(万元)",
+          dataIndex: "uncollectedAmount",
+          key: "uncollectedAmount"
+        },
+        {
+          title: "结算状态",
+          dataIndex: "liquidationStatus",
+          key: "liquidationStatus",
+          render: text => {
+            return getLiquidationStatus(text);
+          }
+        },
+        {
+          title: "催收科目",
+          dataIndex: "dunSubject",
+          key: "dunSubject"
+          //   render: text => {
+          //     return getjiedian(text);
+          //   }
+        },
+        {
+          title: "应收款(万元)",
+          dataIndex: "accountsReceivable",
+          key: "accountsReceivable"
+        },
+        {
+          title: "催款状态",
+          dataIndex: "dunStatus",
+          key: "dunStatus"
+        },
+        {
+          title: "催款启动日期",
+          dataIndex: "startDate",
+          key: "startDate"
+        },
+        {
+          title: "签单时间",
+          dataIndex: "signDate",
+          key: "signDate"
         }
-      },
-      {
-        title: "项目名称",
-        dataIndex: "commodityName",
-        key: "commodityName",
-        // render: text => {
-        //   return getNewOrderStatus(text);
+        // {
+        //   title: "催收操作",
+        //   dataIndex: "abc",
+        //   key: "abc",
+        //   render: (text, record) => {
+        //     return (
+        //       <div>
+        //         <Button
+        //           onClick={e => {
+        //             e.stopPropagation(), this.visit(record);
+        //           }}
+        //           type="primary"
+        //         >
+        //           添加催款记录
+        //         </Button>
+        //       </div>
+        //     );
+        //   }
         // }
-      },
-      {
-        title: "项目状态",
-        dataIndex: "projectStatus",
-        key: "projectStatus",
-        render: text => {
-          return getProjectName(text);
+      ],
+      data: [],
+      dataSource: [],
+      columnsX: [
+        {
+          title: "催款人",
+          dataIndex: "dumBy",
+          key: "dumBy"
+        },
+        {
+          title: "催款时间",
+          dataIndex: "dumTime",
+          key: "dumTime"
+        },
+        {
+          title: "催款情况",
+          dataIndex: "remarks",
+          key: "remarks"
         }
-      },
-      {
-        title: "签单金额(万元)",
-        dataIndex: "totalAmount",
-        key: "totalAmount"
-      },
-      {
-        title: "已收款(万元)",
-        dataIndex: "settlementAmount",
-        key: "settlementAmount"
-      },
-      {
-        title: "未收款(万元)",
-        dataIndex: "uncollectedAmount",
-        key: "uncollectedAmount"
-      },
-      {
-        title: "结算状态",
-        dataIndex: "liquidationStatus",
-        key: "liquidationStatus",
-        render: text => {
-          return getLiquidationStatus(text);
-        }
-      },
-      {
-        title: "催收科目",
-        dataIndex: "dunSubject",
-        key: "dunSubject"
-        //   render: text => {
-        //     return getjiedian(text);
-        //   }
-      },
-      {
-        title: "应收款(万元)",
-        dataIndex: "accountsReceivable",
-        key: "accountsReceivable"
-      },
-      {
-        title: "催款状态",
-        dataIndex: "dunStatus",
-        key: "dunStatus"
-      },
-      {
-        title: "催款启动日期",
-        dataIndex: "startDate",
-        key: "startDate"
-      },
-      {
-        title: "签单时间",
-        dataIndex: "signDate",
-        key: "signDate"
-      }
-      // {
-      //   title: "催收操作",
-      //   dataIndex: "abc",
-      //   key: "abc",
-      //   render: (text, record) => {
-      //     return (
-      //       <div>
-      //         <Button
-      //           onClick={e => {
-      //             e.stopPropagation(), this.visit(record);
-      //           }}
-      //           type="primary"
-      //         >
-      //           添加催款记录
-      //         </Button>
-      //       </div>
-      //     );
-      //   }
-      // }
-    ],
-    data: [],
-    dataSource: [],
-    columnsX: [
-      {
-        title: "催款人",
-        dataIndex: "dumBy",
-        key: "dumBy"
-      },
-      {
-        title: "催款时间",
-        dataIndex: "dumTime",
-        key: "dumTime"
-      },
-      {
-        title: "催款情况",
-        dataIndex: "remarks",
-        key: "remarks"
-      }
-    ],
-    dataSources: []
-  };
-	},
+      ],
+      dataSources: []
+    };
+  },
 
-	//页面加载函数
-	componentWillMount() {
-		this.loadData();
-	},
-	//进入新增拜访记录
-	visit(record) {
-		this.setState({
-			visible:true,
-			dunId:record.id
-		})
-	},
-//	//整行点击
-	tableRowClick(record) {
-		this.setState({
-			visibles:true,
-		});
-		this.loadDatas(record.id);
-	},
+  //页面加载函数
+  componentWillMount() {
+    this.loadData();
+  },
+  //进入新增拜访记录
+  visit(record) {
+    this.setState({
+      visible: true,
+      dunId: record.id
+    })
+  },
+  //	//整行点击
+  tableRowClick(record) {
+    this.setState({
+      visibles: true,
+    });
+    this.loadDatas(record.id);
+  },
 
 
 
-	//新增催款记录
-	examOk(){
-		$.ajax({
-			method: "post",
-			dataType: "json",
-			crossDomain: false,
-			url: globalConfig.context +"/api/admin/newOrder/createDunLog",
-			data: {
-				dunId:this.state.dunId,
-				dumTime:this.state.dumTime,
-				remarks:this.state.remarks,
-			},
-			success: function(data) {
-				if(data.error.length || data.data.list == "") {
-					if(data.error && data.error.length) {
-						message.warning(data.error[0].message);
-					};
-				} else {
-					message.success("新增催款记录成功~");
-					this.setState({
-						visible:false,
-					});
-					this.loadData();
-					this.resets();
-				};
+  //新增催款记录
+  examOk() {
+    $.ajax({
+      method: "post",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/newOrder/createDunLog",
+      data: {
+        dunId: this.state.dunId,
+        dumTime: this.state.dumTime,
+        remarks: this.state.remarks,
+      },
+      success: function (data) {
+        if (data.error.length || data.data.list == "") {
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
+          };
+        } else {
+          message.success("新增催款记录成功~");
+          this.setState({
+            visible: false,
+          });
+          this.loadData();
+          this.resets();
+        };
 
-			}.bind(this),
-		}).always(function() {
-			this.setState({
-				loading: false
-			});
-		}.bind(this));
-	},
+      }.bind(this),
+    }).always(function () {
+      this.setState({
+        loading: false
+      });
+    }.bind(this));
+  },
 
 
-	//关闭输入理由框
-	noCancel(){
-		this.setState({
-			visible:false
-		})
-	},
-	//搜索
-	search() {
-    	this.setState({
-    		//signBillVisible:false
-    	})
-        this.loadData();
-    },
-    //重置
-    reset() {
-    	this.setState({
-    		signBillVisible:false
-    	})
-    	this.state.orderNo='';
-    	this.state.customerName='';
-    	this.state.adminName='';
-    	this.state.departmenttSearch=undefined;
-    	this.state.releaseDate[0] = undefined;
-		this.state.releaseDate[1] = undefined;
-        this.loadData();
-    },
-    resets(){
-    	this.state.orderNo='';
-    	this.state.customerName='';
-    	this.state.adminName='';
-    	this.state.departmenttSearch=undefined;
-    	this.state.releaseDate[0] = undefined;
-		this.state.releaseDate[1] = undefined;
-    },
-	getOrgCodeUrl(e) {
-        this.setState({ orgCodeUrl: e });
-    },
-	//关闭详情
-	visitCancel(){
-		this.setState({
-			visible:false
-		})
-		this.resets();
-	},
-	visitOk(){
-		this.setState({
-			visible:false
-		})
-		this.resets();
-	},
-	//关闭详情
-	visitCancels(){
-		this.setState({
-			visibles:false
-		})
-		this.resets();
-	},
-	//导出
-    exportExec(){
-        var data = {
-            name: this.state.customerName?this.state.customerName:undefined,//客户名称
-            adminName:this.state.adminName?this.state.adminName:undefined,//订单负责人
-            orderNo: this.state.orderNo?this.state.orderNo:undefined,//订单编号
-            starTime: this.state.releaseDate[0]?this.state.releaseDate[0]:undefined,
-            endTime: this.state.releaseDate[1]?this.state.releaseDate[1]:undefined,
-            pageSize: 9999999,
-            newStatus: this.state.newStatus
+  //关闭输入理由框
+  noCancel() {
+    this.setState({
+      visible: false
+    })
+  },
+  //搜索
+  search() {
+    this.setState({
+      //signBillVisible:false
+    })
+    this.loadData();
+  },
+  //重置
+  reset() {
+    this.setState({
+      signBillVisible: false
+    })
+    this.state.orderNo = '';
+    this.state.customerName = '';
+    this.state.adminName = '';
+    this.state.departmenttSearch = undefined;
+    this.state.releaseDate[0] = undefined;
+    this.state.releaseDate[1] = undefined;
+    this.Cascaders.empty();
+    this.loadData();
+  },
+  resets() {
+    this.state.orderNo = '';
+    this.state.customerName = '';
+    this.state.adminName = '';
+    this.state.departmenttSearch = undefined;
+    this.state.releaseDate[0] = undefined;
+    this.state.releaseDate[1] = undefined;
+    this.Cascaders.empty();
+  },
+  getOrgCodeUrl(e) {
+    this.setState({ orgCodeUrl: e });
+  },
+  //关闭详情
+  visitCancel() {
+    this.setState({
+      visible: false
+    })
+    this.resets();
+  },
+  visitOk() {
+    this.setState({
+      visible: false
+    })
+    this.resets();
+  },
+  //关闭详情
+  visitCancels() {
+    this.setState({
+      visibles: false
+    })
+    this.resets();
+  },
+  //导出
+  exportExec() {
+    var data = {
+      name: this.state.customerName ? this.state.customerName : undefined,//客户名称
+      adminName: this.state.adminName ? this.state.adminName : undefined,//订单负责人
+      orderNo: this.state.orderNo ? this.state.orderNo : undefined,//订单编号
+      starTime: this.state.releaseDate[0] ? this.state.releaseDate[0] : undefined,
+      endTime: this.state.releaseDate[1] ? this.state.releaseDate[1] : undefined,
+      pageSize: 9999999,
+      newStatus: this.state.newStatus
+    }
+    window.location.href = (globalConfig.context + '/api/admin/newOrder/exportOrderDunData?' + $.param(data));
+  },
+  visitOks() {
+    this.setState({
+      visibles: false
+    })
+    this.resets();
+  },
+  changeList(arr) {
+    const newArr = [];
+    this.state.columns.forEach(item => {
+      arr.forEach(val => {
+        if (val === item.title) {
+          newArr.push(item);
         }
-        window.location.href=(globalConfig.context+'/api/admin/newOrder/exportOrderDunData?'+$.param(data));
-    },
-	visitOks(){
-		this.setState({
-			visibles:false
-		})
-		this.resets();
-	},
-    changeList(arr) {
-        const newArr = [];
-        this.state.columns.forEach(item => {
-            arr.forEach(val => {
-                if (val === item.title) {
-                    newArr.push(item);
-                }
-            });
-        });
+      });
+    });
+    this.setState({
+      changeList: newArr
+    });
+  },
+  render() {
+    const formItemLayout = {
+      labelCol: { span: 8 },
+      wrapperCol: { span: 14 },
+    };
+    const FormItem = Form.Item;
+    const { RangePicker } = DatePicker;
+    const rowSelection = {
+      selectedRowKeys: this.state.selectedRowKeys,
+      onChange: (selectedRowKeys, selectedRows) => {
         this.setState({
-            changeList: newArr
+          modalVisible: false,
+          selectedRows: selectedRows.slice(-1),
+          selectedRowKeys: selectedRowKeys.slice(-1)
         });
-    },
-	render() {
-		const formItemLayout = {
-			labelCol: { span: 8 },
-			wrapperCol: { span: 14 },
-		};
-		const FormItem = Form.Item;
-		const { RangePicker } = DatePicker;
-		const rowSelection = {
-			selectedRowKeys: this.state.selectedRowKeys,
-			onChange: (selectedRowKeys, selectedRows) => {
-				this.setState({
-					modalVisible:false,
-					selectedRows: selectedRows.slice(-1),
-					selectedRowKeys: selectedRowKeys.slice(-1)
-				});
-			},
-			onSelect: (recordt) => {
-				this.setState({
-					modalVisible:false,
-					recordt: recordt.id
-				})
-			},
-		};
+      },
+      onSelect: (recordt) => {
+        this.setState({
+          modalVisible: false,
+          recordt: recordt.id
+        })
+      },
+    };
     const { TabPane } = Tabs;
-		return (
+    return (
       <div className="user-content">
         <div className="content-title" style={{ marginBottom: 10 }}>
           <span style={{ fontWeight: 900, fontSize: 16 }}>催款节点统计</span>
@@ -518,11 +520,24 @@ const IntentionCustomer = Form.create()(React.createClass({
                   this.setState({ orderNo: e.target.value });
                 }}
               />
-            <DepartmentList
+              <Cascaders
+                ref={node => this.Cascaders = node}
+                placeholder="订单部门"
+                id="id"
+                name="name"
+                children="list"
+                height={28}
+                onSel={(e) => {
+                  this.setState({
+                    departmenttSearch: JSON.stringify(e),
+                  });
+                }}
+              />
+              {/* <DepartmentList
                 value={this.state.departmenttSearch}
                 onChange={e => {
-                    this.setState({ departmenttSearch: e });
-                }}/>
+                  this.setState({ departmenttSearch: e });
+                }} /> */}
               <Select
                 placeholder="选择催款节点类型"
                 style={{ width: 150, marginRight: "10px" }}
@@ -566,26 +581,26 @@ const IntentionCustomer = Form.create()(React.createClass({
                 导出催款列表
               </Button>
             </TabPane>
-          <TabPane tab="更改表格显示数据" key="3">
+            <TabPane tab="更改表格显示数据" key="3">
               <div style={{ marginLeft: 10 }}>
-                  <ChooseList
-                      columns={this.state.columns}
-                      changeFn={this.changeList}
-                      changeList={this.state.changeList}
-                      top={55}
-                      margin={11}
-                  />
+                <ChooseList
+                  columns={this.state.columns}
+                  changeFn={this.changeList}
+                  changeList={this.state.changeList}
+                  top={55}
+                  margin={11}
+                />
               </div>
-          </TabPane>
+            </TabPane>
           </Tabs>
           <div className="patent-table">
             <Spin spinning={this.state.loading}>
               <Table
-                  columns={
-                      this.state.changeList
-                          ? this.state.changeList
-                          : this.state.columns
-                  }
+                columns={
+                  this.state.changeList
+                    ? this.state.changeList
+                    : this.state.columns
+                }
                 dataSource={this.state.dataSource}
                 pagination={this.state.pagination}
                 onRowClick={this.tableRowClick}
@@ -626,7 +641,7 @@ const IntentionCustomer = Form.create()(React.createClass({
                         }}
                         showTime
                         format="YYYY-MM-DD"
-                        onOk={() => {}}
+                        onOk={() => { }}
                         value={
                           this.state.dumTime ? moment(this.state.dumTime) : null
                         }
@@ -693,7 +708,7 @@ const IntentionCustomer = Form.create()(React.createClass({
                     dataSource={this.state.dataSources}
                     rowSelection={rowSelection}
                     pagination={this.state.paginations}
-                    // onRowClick={this.tableRowClick}
+                  // onRowClick={this.tableRowClick}
                   />
                 </Spin>
               </div>
@@ -702,7 +717,7 @@ const IntentionCustomer = Form.create()(React.createClass({
         </div>
       </div>
     );
-	}
+  }
 }));
 export default IntentionCustomer;
 

+ 61 - 47
js/component/manageCenter/order/orderNew/pressList.jsx

@@ -28,6 +28,7 @@ import { salesList } from "@/dataDic.js"
 import DepartmentList from "../../../common/departmentList";
 import OrderItemStatus from "../../../common/orderItemStatus";
 import OrderDesc from "../../financialManage/orderDetail/orderDesc";
+import Cascaders from "../../../common/cascaders";
 
 const IntentionCustomer = Form.create()(
   React.createClass({
@@ -49,7 +50,7 @@ const IntentionCustomer = Form.create()(
           name: this.state.customerName, //名称
           orderNo: this.state.orderNo, //订单编号
           contractNo: this.state.contractNo,
-          depId: this.state.departmenttSearch, //订单部门
+          deps: this.state.departmenttSearch, //订单部门
           adminName: this.state.adminName, //责任人名称
           starTime: this.state.releaseDate[0], //开始时间
           endTime: this.state.releaseDate[1], //结束时间
@@ -489,16 +490,17 @@ const IntentionCustomer = Form.create()(
       this.setState({
         signBillVisible: false,
       });
-      this.state.orderNo = "";
-      this.state.contractNo = "";
-      this.state.customerName = "";
-      this.state.adminName = "";
+      this.state.orderNo = undefined;
+      this.state.contractNo = undefined;
+      this.state.customerName = undefined;
+      this.state.adminName = undefined;
       this.state.departmenttSearch = undefined;
       this.state.releaseDate[0] = undefined;
       this.state.releaseDate[1] = undefined;
       this.state.amountStatus = undefined;
       this.state.approval = undefined;
       this.state.memberType = undefined;
+      this.Cascaders.empty();
       this.loadData();
     },
     resets() {
@@ -557,7 +559,7 @@ const IntentionCustomer = Form.create()(
         name: this.state.customerName, //名称
         orderNo: this.state.orderNo, //订单编号
         contractNo: this.state.contractNo,
-        depId: this.state.departmenttSearch, //订单部门
+        deps: this.state.departmenttSearch, //订单部门
         adminName: this.state.adminName, //责任人名称
         starTime: this.state.releaseDate[0], //开始时间
         endTime: this.state.releaseDate[1], //结束时间
@@ -641,35 +643,34 @@ const IntentionCustomer = Form.create()(
           <div className="content-title" style={{ marginBottom: 10 }}>
             <span style={{ fontWeight: 900, fontSize: 16 }}>催款节点统计</span>
           </div>
-          <div className="user-search">
-            <Tabs
-              defaultActiveKey="1"
-              onChange={this.callback}
-              className="test"
-            >
-              <TabPane tab="导出催款列表" key="2">
-                <Button
-                  type="primary"
-                  onClick={this.exportExec}
-                  style={{
-                    float: "left",
-                    marginTop: 10,
-                    marginBottom: 10,
-                    marginLeft: 10,
-                    marginRight: 10,
-                  }}
-                >
-                  导出催款列表
-                </Button>
-              </TabPane>
-              <TabPane tab="搜索" key="1">
+          <Tabs
+            defaultActiveKey="1"
+            onChange={this.callback}
+            className="test"
+          >
+            <TabPane tab="导出催款列表" key="2">
+              <Button
+                type="primary"
+                onClick={this.exportExec}
+                style={{
+                  float: "left",
+                  marginTop: 10,
+                  marginBottom: 10,
+                  marginLeft: 10,
+                  marginRight: 10,
+                }}
+              >
+                导出催款列表
+              </Button>
+            </TabPane>
+            <TabPane tab="搜索" key="1">
+              <div className="user-search" style={{ padding: "0 10px" }}>
                 <Input
                   placeholder="客户名称"
                   style={{
                     width: 170,
                     marginBottom: 10,
                     marginRight: 15,
-                    marginLeft: 15,
                   }}
                   value={this.state.customerName}
                   onChange={(e) => {
@@ -712,12 +713,25 @@ const IntentionCustomer = Form.create()(
                     this.setState({ contractNo: e.target.value });
                   }}
                 />
-                <DepartmentList
+                <Cascaders
+                  ref={node => this.Cascaders = node}
+                  placeholder="订单部门"
+                  id="id"
+                  name="name"
+                  children="list"
+                  height={28}
+                  onSel={(e) => {
+                    this.setState({
+                      departmenttSearch: JSON.stringify(e),
+                    });
+                  }}
+                />
+                {/* <DepartmentList
                   value={this.state.departmenttSearch}
                   onChange={(e) => {
                     this.setState({ departmenttSearch: e });
                   }}
-                />
+                /> */}
                 <Select
                   placeholder="选择催款节点类型"
                   style={{ width: 170, marginRight: 15, marginLeft: 5 }}
@@ -763,7 +777,7 @@ const IntentionCustomer = Form.create()(
                   <Option value="4">全部特批</Option>
                 </Select>
                 <Select
-                  style={{ width: 170, marginRight: 30 }}
+                  style={{ width: 170, marginRight: 15 }}
                   placeholder="会员"
                   value={this.state.memberType}
                   onChange={(e) => {
@@ -775,7 +789,7 @@ const IntentionCustomer = Form.create()(
                   <Option value="0">否</Option>
                   <Option value="1">是</Option>
                 </Select>
-                <span style={{ marginRight: 15, marginLeft: 15 }}>下单时间 :</span>
+                <span style={{ marginRight: 15, }}>下单时间 :</span>
                 <RangePicker
                   value={[
                     this.state.releaseDate[0]
@@ -797,20 +811,20 @@ const IntentionCustomer = Form.create()(
                   搜索
                 </Button>
                 <Button onClick={this.reset}>重置</Button>
-              </TabPane>
-              <TabPane tab="更改表格显示数据" key="3">
-                <div style={{ marginLeft: 10 }}>
-                  <ChooseList
-                    columns={this.state.columns}
-                    changeFn={this.changeList}
-                    changeList={this.state.changeList}
-                    top={55}
-                    margin={11}
-                  />
-                </div>
-              </TabPane>
-            </Tabs>
-          </div>
+              </div>
+            </TabPane>
+            <TabPane tab="更改表格显示数据" key="3">
+              <div style={{ marginLeft: 10 }}>
+                <ChooseList
+                  columns={this.state.columns}
+                  changeFn={this.changeList}
+                  changeList={this.state.changeList}
+                  top={55}
+                  margin={11}
+                />
+              </div>
+            </TabPane>
+          </Tabs>
           <div className="patent-table">
             <Spin spinning={this.state.loading}>
               <Table

+ 14 - 9
js/component/manageCenter/order/pressMoney/index.jsx

@@ -38,7 +38,7 @@ class PressMoney extends Component {
           title: "合同编号",
           dataIndex: "contractNo",
           key: "contractNo",
-          width:90,
+          width: 90,
         },
         {
           title: "客户名称",
@@ -179,9 +179,14 @@ class PressMoney extends Component {
           search: "adminName",
           placeholder: "请输入营销人名称",
         },
+        // {
+        //   type: "departmentSelect",
+        //   dataKey: "depId",
+        //   placeholder: "请选择订单部门",
+        // },
         {
-          type: "departmentSelect",
-          dataKey: "depId",
+          type: "newDepartmentSelect",
+          dataKey: "deps",
           placeholder: "请选择订单部门",
         },
         {
@@ -288,7 +293,7 @@ class PressMoney extends Component {
       visibleTree: false,
       visibleTransfer: false,
       orderNoTransfer: "",
-      transferKey:0,
+      transferKey: 0,
     };
     // this.tabelContentRef = null;
     this.transfer = this.transfer.bind(this);
@@ -321,7 +326,7 @@ class PressMoney extends Component {
           message.success("移交成功");
           this.setState({
             visibleTransfer: false,
-            transferKey:this.state.transferKey+13
+            transferKey: this.state.transferKey + 13
           });
           this.tabelContentRef && this.tabelContentRef.onRefresh();
         }
@@ -718,7 +723,7 @@ class PressMoney extends Component {
                         cursor: "pointer",
                         fontSize: "18px",
                       }}
-                      // onClick={() => this.getUrl(item.url, item.name)}
+                    // onClick={() => this.getUrl(item.url, item.name)}
                     >
                       <a href={`${window.window.globalConfig.context}/open/download?fileName=${item.url}&delete=false&attName=${item.name}`}>下载附件</a>
                     </div>
@@ -767,11 +772,11 @@ class PressMoney extends Component {
         )}
         <Modal
           visible={this.state.visibleTransfer}
-          key={this.state.transferKey+13}
+          key={this.state.transferKey + 13}
           onCancel={() => {
             this.setState({
               visibleTransfer: false,
-              transferKey:this.state.transferKey+13
+              transferKey: this.state.transferKey + 13
             });
           }}
           width="500px"
@@ -829,7 +834,7 @@ class PressMoney extends Component {
               onClick={() => {
                 this.setState({
                   visibleTransfer: false,
-                  transferKey:this.state.transferKey+13
+                  transferKey: this.state.transferKey + 13
                 });
               }}
             >

+ 19 - 5
js/component/manageCenter/order/source/index.jsx

@@ -19,8 +19,7 @@ import { ChooseList } from "../../../manageCenter/order/orderNew/chooseList";
 import OrderList from "./order"; //客户订单列表
 import './index.less';
 import ShowModalDiv from "@/showModal.jsx";
-import ReactEcharts from 'echarts-for-react/lib/core';
-const echarts = require('echarts');
+import Cascaders from "../../../common/cascaders";
 
 const { TabPane } = Tabs;
 const FormItem = Form.Item;
@@ -295,6 +294,7 @@ class Source extends Component {
         selectedRowKeys: [],
       },
       () => {
+        this.Cascaders.empty();
         this.loadData();
       }
     );
@@ -481,7 +481,7 @@ class Source extends Component {
   }
 
   componentWillMount() {
-    this.selectSuperId();
+    // this.selectSuperId();
     this.loadData();
   }
 
@@ -498,7 +498,21 @@ class Source extends Component {
             <div style={{ paddingTop: 10 }}>
               <Form layout="inline">
                 <FormItem>
-                  <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: 200 }}
                     value={searchValues["depId"]
@@ -514,7 +528,7 @@ class Source extends Component {
                     {contactsOption.map((cit, index) => (
                       <Option key={cit.value}>{cit.label}</Option>
                     ))}
-                  </Select>
+                  </Select> */}
                 </FormItem>
                 <FormItem>
                   <Select

File diff suppressed because it is too large
+ 339 - 279
js/component/manageCenter/project/patent/list.jsx


+ 20 - 4
js/component/manageCenter/project/project/projectAssignment.jsx

@@ -38,6 +38,7 @@ import ProjectOperation from "../../../common/projectOperation";
 import OrderCoor from "../../order/orderNew/changeComponent/orderCoor";
 import ContentUrl from "../../order/orderNew/contentUrl";
 import { salesList } from "@/dataDic.js";
+import Cascaders from "../../../common/cascaders";
 const { TabPane } = Tabs
 
 const PaiDan = React.createClass({
@@ -57,7 +58,7 @@ const PaiDan = React.createClass({
         specially: 4, //咨询师管理列表
         distribution: this.state.distribution, //全部列表
         name: this.state.customerName, //名称
-        depId: this.state.departmenttSearch, //订单部门
+        deps: this.state.departmenttSearch, //订单部门
         orderNo: this.state.orderNoSearch, //订单编号
         starTime: this.state.releaseDate[0], //开始时间
         endTime: this.state.releaseDate[1], //结束时间
@@ -389,7 +390,7 @@ const PaiDan = React.createClass({
   },
 
   componentWillMount() {
-    this.departmentList();
+    // this.departmentList();
     this.loadData();
   },
   tableRowClick(record) {
@@ -793,6 +794,7 @@ const PaiDan = React.createClass({
     this.state.orderNoSearch = "";
     this.state.departmenttSearch = undefined;
     this.state.distribution = undefined;
+    this.Cascaders.empty();
     this.loadData(this.state.page);
   },
   nextCancel() {
@@ -834,6 +836,7 @@ const PaiDan = React.createClass({
     this.state.departmenttSearch = undefined;
     this.state.releaseDate[0] = undefined;
     this.state.releaseDate[1] = undefined;
+    this.Cascaders.empty();
   },
   //部门
   departmentList() {
@@ -1030,7 +1033,20 @@ const PaiDan = React.createClass({
                   this.setState({ orderNoSearch: e.target.value });
                 }}
               />
-              <Select
+              <Cascaders
+                ref={node => this.Cascaders = node}
+                placeholder="选择部门"
+                id="id"
+                name="name"
+                children="list"
+                height={28}
+                onSel={(e) => {
+                  this.setState({
+                    departmenttSearch: JSON.stringify(e),
+                  });
+                }}
+              />
+              {/* <Select
                 placeholder="选择部门"
                 style={{ width: 200, marginRight: "10px" }}
                 value={this.state.departmenttSearch}
@@ -1043,7 +1059,7 @@ const PaiDan = React.createClass({
                     <Select.Option key={item.id}>{item.name}</Select.Option>
                   );
                 })}
-              </Select>
+              </Select> */}
               <Select
                 onChange={(e) => {
                   this.setState({ distribution: e });

+ 21 - 4
js/component/manageCenter/project/project/projectQuery.jsx

@@ -27,6 +27,8 @@ import EnterpriseNameChange from "../../../common/enterpriseNameChange";
 import OrderCoor from '../../order/orderNew/changeComponent/orderCoor';
 import ContentUrl from '../../order/orderNew/contentUrl';
 import { salesList } from "@/dataDic.js";
+import Cascaders from "../../../common/cascaders";
+
 const { TabPane } = Tabs
 const PaiDan = React.createClass({
   loadData(pageNo) {
@@ -46,7 +48,7 @@ const PaiDan = React.createClass({
         specially: 4, //咨询师管理列表
         distribution: this.state.distribution, //全部列表
         name: this.state.customerName, //名称
-        depId: this.state.departmenttSearch, //订单部门
+        deps: this.state.departmenttSearch, //订单部门
         orderNo: this.state.orderNoSearch, //订单编号
         starTime: this.state.releaseDate[0], //开始时间
         endTime: this.state.releaseDate[1] //结束时间
@@ -287,7 +289,7 @@ const PaiDan = React.createClass({
   },
 
   componentWillMount() {
-    this.departmentList();
+    // this.departmentList();
     this.loadData();
   },
   tableRowClick(record, index) {
@@ -447,6 +449,7 @@ const PaiDan = React.createClass({
     this.state.orderNoSearch = "";
     this.state.departmenttSearch = undefined;
     this.state.distribution = undefined;
+    this.Cascaders.empty();
     this.loadData(this.state.page);
   },
   resetAll() {
@@ -456,6 +459,7 @@ const PaiDan = React.createClass({
     this.state.orderNoSearch = "";
     this.state.departmenttSearch = undefined;
     this.state.distribution = undefined;
+    this.Cascaders.empty();
     this.loadData();
   },
   searchSwitch() {
@@ -743,7 +747,20 @@ const PaiDan = React.createClass({
                   this.setState({ orderNoSearch: e.target.value });
                 }}
               />
-              <Select
+              <Cascaders
+                ref={node => this.Cascaders = node}
+                placeholder="订单部门"
+                id="id"
+                name="name"
+                children="list"
+                height={28}
+                onSel={(e) => {
+                  this.setState({
+                    departmenttSearch: JSON.stringify(e),
+                  });
+                }}
+              />
+              {/* <Select
                 placeholder="选择部门"
                 style={{ width: 200, marginRight: "10px" }}
                 value={this.state.departmenttSearch}
@@ -756,7 +773,7 @@ const PaiDan = React.createClass({
                     <Select.Option key={item.id}>{item.name}</Select.Option>
                   );
                 })}
-              </Select>
+              </Select> */}
               <Select
                 onChange={(e) => {
                   this.setState({ distribution: e });

+ 129 - 113
js/component/manageCenter/project/project/zxsglyOutSourcingPaiDan.jsx

@@ -2,7 +2,7 @@ import React from 'react';
 import $ from 'jquery/src/ajax';
 import moment from 'moment';
 import '../../order/userMangagement.less';
-import {boutique} from '../../../dataDic.js';
+import { boutique } from '../../../dataDic.js';
 import '@/manageCenter/financialManage/distribute/public.less';
 import {
   Button,
@@ -33,11 +33,13 @@ import {
 } from "@/tools";
 import ShowModalDiv from "@/showModal.jsx";
 import OrderRiZi from "@/orderRiZi.jsx";
-import {ChooseList} from "../../order/orderNew/chooseList";
+import { ChooseList } from "../../order/orderNew/chooseList";
 import ProjectDetailsReadOnly from "../../../common/projectDetailsReadOnly";
 import OrderItemStatus from "../../../common/orderItemStatus";
 import EnterpriseNameChange from "../../../common/enterpriseNameChange";
 import ProjectOperation from "../../../common/projectOperation";
+import Cascaders from "../../../common/cascaders";
+
 const zxsglyOutSourcingPaiDan = React.createClass({
   loadData(pageNo) {
     this.state.data = [];
@@ -56,13 +58,13 @@ const zxsglyOutSourcingPaiDan = React.createClass({
         specially: 4, //咨询师管理列表
         distribution: this.state.distribution, //全部列表
         name: this.state.customerName, //名称
-        depId: this.state.departmenttSearch, //订单部门
+        deps: this.state.departmenttSearch, //订单部门
         orderNo: this.state.orderNoSearch, //订单编号
         starTime: this.state.releaseDate[0], //开始时间
         endTime: this.state.releaseDate[1], //结束时间
         outsource: 1
       },
-      success: function(data) {
+      success: function (data) {
         ShowModal(this);
         let theArr = [];
         if (!data.data || !data.data.list) {
@@ -104,7 +106,7 @@ const zxsglyOutSourcingPaiDan = React.createClass({
         });
       }.bind(this)
     }).always(
-      function() {
+      function () {
         this.setState({
           loading: false
         });
@@ -133,10 +135,10 @@ const zxsglyOutSourcingPaiDan = React.createClass({
         defaultPageSize: 10,
         showQuickJumper: true,
         pageSize: 10,
-        onChange: function(page) {
+        onChange: function (page) {
           this.loadData(page);
         }.bind(this),
-        showTotal: function(total) {
+        showTotal: function (total) {
           return "共" + total + "条数据";
         }
       },
@@ -264,10 +266,10 @@ const zxsglyOutSourcingPaiDan = React.createClass({
             return test[0] === null
               ? ""
               : getprovince(test[0]) +
-                  "/" +
-                  getprovince(test[1]) +
-                  "/" +
-                  getprovince(test[2]);
+              "/" +
+              getprovince(test[1]) +
+              "/" +
+              getprovince(test[2]);
           }
         },
         {
@@ -328,9 +330,9 @@ const zxsglyOutSourcingPaiDan = React.createClass({
           key: "commodityName",
           render: (text, record) => {
             return (
-                <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span></span>
+              <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span></span>
             )
-        }
+          }
         },
         {
           title: "项目类别",
@@ -430,7 +432,7 @@ const zxsglyOutSourcingPaiDan = React.createClass({
   },
 
   componentWillMount() {
-    this.departmentList();
+    // this.departmentList();
     this.loadData();
   },
   tableRowClick(record) {
@@ -458,7 +460,7 @@ const zxsglyOutSourcingPaiDan = React.createClass({
         orderNo: this.state.orderNo,
         reason: this.state.reason
       },
-      success: function(data) {
+      success: function (data) {
         if (data.error.length || data.data == "") {
           if (data.error && data.error.length) {
             message.warning(data.error[0].message);
@@ -474,7 +476,7 @@ const zxsglyOutSourcingPaiDan = React.createClass({
         }
       }.bind(this)
     }).always(
-      function() {
+      function () {
         this.setState({
           loading: false
         });
@@ -505,7 +507,7 @@ const zxsglyOutSourcingPaiDan = React.createClass({
       data: {
         orderNo: orderNos
       },
-      success: function(data) {
+      success: function (data) {
         if (data.error.length || data.data.list == "") {
           if (data.error && data.error.length) {
             message.warning(data.error[0].message);
@@ -532,10 +534,10 @@ const zxsglyOutSourcingPaiDan = React.createClass({
             orderRemarks: thisdata.orderRemarks, //订单留言
             orgCodeUrl: thisdata.contractPictureUrl
               ? splitUrl(
-                  thisdata.contractPictureUrl,
-                  ",",
-                  globalConfig.avatarHost + "/upload"
-                )
+                thisdata.contractPictureUrl,
+                ",",
+                globalConfig.avatarHost + "/upload"
+              )
               : [], //图片地址
             salesmanName: thisdata.salesmanName, //营销员名称
             salesmanMobile: thisdata.salesmanMobile, //营销员电话
@@ -545,12 +547,12 @@ const zxsglyOutSourcingPaiDan = React.createClass({
             oldSalesmanMobile: thisdata.oldSalesmanMobile, //营销员电话
             nowFinance: thisdata.nowFinance, //财务名称
             nowFinanceMobile: thisdata.nowFinanceMobile, //财务电话
-            deleteSign:thisdata.deleteSign,
+            deleteSign: thisdata.deleteSign,
           });
         }
       }.bind(this)
     }).always(
-      function() {
+      function () {
         this.setState({
           loading: false
         });
@@ -567,7 +569,7 @@ const zxsglyOutSourcingPaiDan = React.createClass({
       data: {
         orderNo: orderNos
       },
-      success: function(data) {
+      success: function (data) {
         let theArr = [];
 
         if (data.error.length || data.data.list == "") {
@@ -586,7 +588,7 @@ const zxsglyOutSourcingPaiDan = React.createClass({
         });
       }.bind(this)
     }).always(
-      function() {
+      function () {
         this.setState({
           loading: false
         });
@@ -620,7 +622,7 @@ const zxsglyOutSourcingPaiDan = React.createClass({
       data: {
         orderNo: this.state.orderNo
       },
-      success: function(data) {
+      success: function (data) {
         let theArr = [];
         let thisData = data.data;
         if (!thisData.length) {
@@ -644,7 +646,7 @@ const zxsglyOutSourcingPaiDan = React.createClass({
         });
       }.bind(this)
     }).always(
-      function() {
+      function () {
         this.setState({
           loading: false
         });
@@ -690,7 +692,7 @@ const zxsglyOutSourcingPaiDan = React.createClass({
       data: {
         businessName: e
       },
-      success: function(data) {
+      success: function (data) {
         let thedata = data.data;
         if (!thedata) {
           if (data.error && data.error.length) {
@@ -704,7 +706,7 @@ const zxsglyOutSourcingPaiDan = React.createClass({
         });
       }.bind(this)
     }).always(
-      function() {
+      function () {
         this.setState({
           loading: false
         });
@@ -739,7 +741,7 @@ const zxsglyOutSourcingPaiDan = React.createClass({
     }
     if (this.state.pictureUrl.length) {
       let picArr = [];
-      this.state.pictureUrl.map(function(item) {
+      this.state.pictureUrl.map(function (item) {
         if (item.response && item.response.data && item.response.data.length) {
           picArr.push(item.response.data);
         }
@@ -761,7 +763,7 @@ const zxsglyOutSourcingPaiDan = React.createClass({
         data: {
           orderNo: this.state.orderNo
         },
-        success: function(data) {
+        success: function (data) {
           let thisdata = data.data;
           console.log(thisdata);
           if (thisdata) {
@@ -772,17 +774,17 @@ const zxsglyOutSourcingPaiDan = React.createClass({
               remarks: thisdata.remarks,
               attachmentUrl: thisdata.attachmentUrl
                 ? splitUrl(
-                    thisdata.attachmentUrl,
-                    ",",
-                    globalConfig.avatarHost + "/upload"
-                  )
+                  thisdata.attachmentUrl,
+                  ",",
+                  globalConfig.avatarHost + "/upload"
+                )
                 : [],
               pictureUrl: thisdata.pictureUrl
                 ? splitUrl(
-                    thisdata.pictureUrl,
-                    ",",
-                    globalConfig.avatarHost + "/upload"
-                  )
+                  thisdata.pictureUrl,
+                  ",",
+                  globalConfig.avatarHost + "/upload"
+                )
                 : [], //图片地址
               amount: thisdata.amount,
               companyName: thisdata.companyName,
@@ -791,7 +793,7 @@ const zxsglyOutSourcingPaiDan = React.createClass({
           }
         }.bind(this)
       }).always(
-        function() {
+        function () {
           this.setState({
             loading: false
           });
@@ -811,7 +813,7 @@ const zxsglyOutSourcingPaiDan = React.createClass({
       data: {
         orderNo: this.state.orderNo
       },
-      success: function(data) {
+      success: function (data) {
         let theArr = [];
         if (data.error.length || data.data.list == "") {
           if (data.error && data.error.length) {
@@ -849,11 +851,11 @@ const zxsglyOutSourcingPaiDan = React.createClass({
           {
             dataSourceW: theArr
           },
-          () => {}
+          () => { }
         );
       }.bind(this)
     }).always(
-      function() {
+      function () {
         this.setState({
           loading: false
         });
@@ -865,7 +867,7 @@ const zxsglyOutSourcingPaiDan = React.createClass({
   selectAuto(value) {
     let kid = [];
     let fwList = this.state.customerArr;
-    fwList.map(function(item) {
+    fwList.map(function (item) {
       if (value == item.bname) {
         kid = item;
       }
@@ -905,7 +907,7 @@ const zxsglyOutSourcingPaiDan = React.createClass({
       data: {
         orderNo: orderNos
       },
-      success: function(data) {
+      success: function (data) {
         let theArr = [];
         let thisData = [];
         if (data.error.length || data.data.list == "") {
@@ -931,7 +933,7 @@ const zxsglyOutSourcingPaiDan = React.createClass({
         }
       }.bind(this)
     }).always(
-      function() {
+      function () {
         this.setState({
           loading: false
         });
@@ -963,14 +965,15 @@ const zxsglyOutSourcingPaiDan = React.createClass({
     this.state.orderNoSearch = "";
     this.state.departmenttSearch = undefined;
     this.state.distribution = undefined;
+    this.Cascaders.empty();
     this.loadData(this.state.page);
   },
   nextCancel() {
     this.setState({
       projectOperationVisible: false,
       gid: "",
-      dataInfor:{},
-    },()=>{
+      dataInfor: {},
+    }, () => {
       this.loadData();
       this.xiangmu(this.state.orderNo);
     });
@@ -978,8 +981,8 @@ const zxsglyOutSourcingPaiDan = React.createClass({
   //点击打卡项目详情
   tableRowClickX(record) {
     this.setState({
-      projectOperationVisible:true,
-      dataInfor:record,
+      projectOperationVisible: true,
+      dataInfor: record,
     })
   },
   searchSwitch() {
@@ -1025,7 +1028,7 @@ const zxsglyOutSourcingPaiDan = React.createClass({
       crossDomain: false,
       url: globalConfig.context + "/api/admin/organization/selectSuperId",
       data: {},
-      success: function(data) {
+      success: function (data) {
         let thedata = data.data;
         let theArr = [];
         if (!thedata) {
@@ -1034,7 +1037,7 @@ const zxsglyOutSourcingPaiDan = React.createClass({
           }
           thedata = {};
         } else {
-          thedata.map(function(item, index) {
+          thedata.map(function (item, index) {
             theArr.push({
               key: index,
               name: item.name,
@@ -1047,7 +1050,7 @@ const zxsglyOutSourcingPaiDan = React.createClass({
         });
       }.bind(this)
     }).always(
-      function() {
+      function () {
         this.setState({
           loading: false
         });
@@ -1106,7 +1109,20 @@ const zxsglyOutSourcingPaiDan = React.createClass({
                   this.setState({ orderNoSearch: e.target.value });
                 }}
               />
-              <Select
+              <Cascaders
+                ref={node => this.Cascaders = node}
+                placeholder="选择部门"
+                id="id"
+                name="name"
+                children="list"
+                height={28}
+                onSel={(e) => {
+                  this.setState({
+                    departmenttSearch: JSON.stringify(e)
+                  })
+                }}
+              />
+              {/* <Select
                 placeholder="选择部门"
                 style={{ width: 200, marginRight: "10px" }}
                 value={this.state.departmenttSearch}
@@ -1114,12 +1130,12 @@ const zxsglyOutSourcingPaiDan = React.createClass({
                   this.setState({ departmenttSearch: e });
                 }}
               >
-                {departmentArr.map(function(item) {
+                {departmentArr.map(function (item) {
                   return (
                     <Select.Option key={item.id}>{item.name}</Select.Option>
                   );
                 })}
-              </Select>
+              </Select> */}
               <Select
                 onChange={e => {
                   this.setState({ distribution: e });
@@ -1167,11 +1183,11 @@ const zxsglyOutSourcingPaiDan = React.createClass({
           <TabPane tab="更改表格显示数据" key="2">
             <div style={{ marginLeft: 10 }}>
               <ChooseList
-                  columns={this.state.columns}
-                  changeFn={this.changeList}
-                  changeList={this.state.changeList}
-                  top={55}
-                  margin={11}
+                columns={this.state.columns}
+                changeFn={this.changeList}
+                changeList={this.state.changeList}
+                top={55}
+                margin={11}
               />
             </div>
           </TabPane>
@@ -1179,11 +1195,11 @@ const zxsglyOutSourcingPaiDan = React.createClass({
         <div className="patent-table">
           <Spin spinning={this.state.loading}>
             <Table
-                columns={
-                  this.state.changeList
-                      ? this.state.changeList
-                      : this.state.columns
-                }
+              columns={
+                this.state.changeList
+                  ? this.state.changeList
+                  : this.state.columns
+              }
               dataSource={this.state.dataSource}
               pagination={this.state.pagination}
               style={{
@@ -1215,8 +1231,8 @@ const zxsglyOutSourcingPaiDan = React.createClass({
           onCancel={this.visitCancel}
         >
           <Tabs onChange={this.callBack} activeKey={this.state.modKey} tabBarExtraContent={
-            <div style={{fontWeight:'bold',paddingRight:'15px'}}>
-              <OrderItemStatus deleteSign={this.state.deleteSign}/>
+            <div style={{ fontWeight: 'bold', paddingRight: '15px' }}>
+              <OrderItemStatus deleteSign={this.state.deleteSign} />
             </div>
           }>
             <TabPane tab="项目概况" key="1">
@@ -1249,9 +1265,9 @@ const zxsglyOutSourcingPaiDan = React.createClass({
                     >
                       <span>{this.state.userName}</span>
                       <EnterpriseNameChange
-                          type='journal'
-                          style={{ marginLeft: 10 }}
-                          enterpriseId={this.state.orderUid}/>
+                        type='journal'
+                        style={{ marginLeft: 10 }}
+                        enterpriseId={this.state.orderUid} />
                     </FormItem>
                     <FormItem
                       className="half-item"
@@ -1578,43 +1594,43 @@ const zxsglyOutSourcingPaiDan = React.createClass({
           className="admin-desc-content"
         >
           <Form layout="horizontal" id="demand-form">
-              <div className="clearfix">
-                <FormItem
-                  labelCol={{ span: 4 }}
-                  wrapperCol={{ span: 16 }}
-                  label="拒绝理由"
-                >
-                  <Input
-                    type="textarea"
-                    placeholder="请输入拒绝理由"
-                    rows={4}
-                    value={this.state.reason}
-                    onChange={e => {
-                      this.setState({ reason: e.target.value });
-                    }}
-                  />
-                </FormItem>
-              </div>
-              <div className="clearfix">
-                <Button
-                  className="cancel"
-                  type="primary"
-                  onClick={this.examOks}
-                  loading={this.state.loading}
-                  style={{ marginLeft: "50px" }}
-                  htmlType="submit"
-                >
-                  确定
-                </Button>
-                <Button
-                  className="cancel"
-                  type="ghost"
-                  onClick={this.noCancel}
-                  style={{ marginLeft: "50px" }}
-                >
-                  取消
-                </Button>
-              </div>
+            <div className="clearfix">
+              <FormItem
+                labelCol={{ span: 4 }}
+                wrapperCol={{ span: 16 }}
+                label="拒绝理由"
+              >
+                <Input
+                  type="textarea"
+                  placeholder="请输入拒绝理由"
+                  rows={4}
+                  value={this.state.reason}
+                  onChange={e => {
+                    this.setState({ reason: e.target.value });
+                  }}
+                />
+              </FormItem>
+            </div>
+            <div className="clearfix">
+              <Button
+                className="cancel"
+                type="primary"
+                onClick={this.examOks}
+                loading={this.state.loading}
+                style={{ marginLeft: "50px" }}
+                htmlType="submit"
+              >
+                确定
+              </Button>
+              <Button
+                className="cancel"
+                type="ghost"
+                onClick={this.noCancel}
+                style={{ marginLeft: "50px" }}
+              >
+                取消
+              </Button>
+            </div>
           </Form>
         </Modal>
         {this.state.resVisible ? (
@@ -1653,11 +1669,11 @@ const zxsglyOutSourcingPaiDan = React.createClass({
           loading={this.state.loading}
         />
         {this.state.projectOperationVisible ? <ProjectOperation
-            readOnly={this.state.dataInfor && Object.keys(this.state.dataInfor).length > 0 && this.state.processStatus !== 0}
-            orderNo={this.state.orderNo}
-            visible={this.state.projectOperationVisible}
-            dataInfor={this.state.dataInfor}
-            onCancel={this.nextCancel}
+          readOnly={this.state.dataInfor && Object.keys(this.state.dataInfor).length > 0 && this.state.processStatus !== 0}
+          orderNo={this.state.orderNo}
+          visible={this.state.projectOperationVisible}
+          dataInfor={this.state.dataInfor}
+          onCancel={this.nextCancel}
         /> : null}
       </div>
     );

+ 21 - 6
js/component/manageCenter/project/task/businessManagement/index.jsx

@@ -5,6 +5,7 @@ import { ChooseList } from "../../../order/orderNew/chooseList";
 import { projectStatusCascader } from '@/dataDic.js';
 import CheckInfor from './checkInfor';
 import OrderInfor from "./orderInfor";
+import Cascaders from "../../../../common/cascaders"
 
 const TabPane = Tabs.TabPane;
 
@@ -19,8 +20,7 @@ class BusinessManagement extends Component {
                     title: '项目编号',
                     dataIndex: 'id',
                     key: 'id',
-                    fixed: 'left',
-                    width: 50,
+                    // fixed: 'left',
                     render: (text, record) => {
                         if (record.splitStatus == 2) {
                             return <span>{record.splitSuper + '-' + record.splitId}</span>
@@ -33,7 +33,7 @@ class BusinessManagement extends Component {
                     title: '项目名称',
                     dataIndex: 'commodityName',
                     key: 'commodityName',
-                    fixed: 'left',
+                    // fixed: 'left',
                     width: 100,
                     render: text => {
                         return (
@@ -52,6 +52,7 @@ class BusinessManagement extends Component {
                     title: '项目数量',
                     dataIndex: 'commodityQuantity',
                     key: 'commodityQuantity',
+                    width: 50,
                 },
                 {
                     title: '订单编号',
@@ -172,7 +173,7 @@ class BusinessManagement extends Component {
                 pageNo: pageNo || 1,
                 pageSize: this.state.pagination.pageSize,
                 name: this.state.nameSearch || undefined, //客户名称
-                depId: this.state.departmenttSearch, //订单部门
+                deps: this.state.departmenttSearch, //订单部门
                 orderNo: this.state.orderNoSearch || undefined, //订单编号
                 contractNo: this.state.contractNoSearch, //合同编号
                 taskId: this.state.taskNoSearch || undefined, //项目编号
@@ -284,6 +285,7 @@ class BusinessManagement extends Component {
             approvalSearch: undefined,
             outsourceStatusSearch: [],
         }, () => {
+            this.Cascaders.empty();
             this.loadData();
         })
     }
@@ -329,7 +331,20 @@ class BusinessManagement extends Component {
                                         this.setState({ taskNoSearch: e.target.value })
                                     }}
                                 />
-                                <Select
+                                <Cascaders
+                                    ref={node => this.Cascaders = node}
+                                    placeholder="选择部门"
+                                    id="id"
+                                    name="name"
+                                    children="list"
+                                    height={28}
+                                    onSel={(e) => {
+                                        this.setState({
+                                            departmenttSearch: JSON.stringify(e),
+                                        });
+                                    }}
+                                />
+                                {/* <Select
                                     placeholder="选择部门"
                                     style={{ width: 200, marginRight: '10px' }}
                                     value={this.state.departmenttSearch}
@@ -342,7 +357,7 @@ class BusinessManagement extends Component {
                                             <Select.Option key={item.id}>{item.name}</Select.Option>
                                         )
                                     })}
-                                </Select>
+                                </Select> */}
                                 <Cascader
                                     placeholder="项目状态"
                                     style={{ width: 150, marginRight: '10px' }}