dev01 2 years ago
parent
commit
957cec2f31

+ 4 - 0
js/component/common/cascaders/index.jsx

@@ -91,6 +91,10 @@ class Cascaders extends Component {
         });
       }
     })
+    if (list.length === 0) {
+      message.warn("还没有选择的部门")
+      return
+    }
     this.setState({
       checkedList: list,
       visible: false,

+ 23 - 1
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;
@@ -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

+ 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">

+ 60 - 46
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() {
@@ -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 - 3
js/component/manageCenter/order/source/index.jsx

@@ -19,6 +19,7 @@ import { ChooseList } from "../../../manageCenter/order/orderNew/chooseList";
 import OrderList from "./order"; //客户订单列表
 import './index.less';
 import ShowModalDiv from "@/showModal.jsx";
+import Cascaders from "../../../common/cascaders";
 
 const { TabPane } = Tabs;
 const FormItem = Form.Item;
@@ -294,6 +295,7 @@ class Source extends Component {
         selectedRowKeys: [],
       },
       () => {
+        this.Cascaders.empty();
         this.loadData();
       }
     );
@@ -434,7 +436,7 @@ class Source extends Component {
   }
 
   componentWillMount() {
-    this.selectSuperId();
+    // this.selectSuperId();
     this.loadData();
   }
 
@@ -451,7 +453,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"]
@@ -467,7 +483,7 @@ class Source extends Component {
                     {contactsOption.map((cit, index) => (
                       <Option key={cit.value}>{cit.label}</Option>
                     ))}
-                  </Select>
+                  </Select> */}
                 </FormItem>
                 <FormItem>
                   <Select

+ 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' }}

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "afanti",
-  "version": "1.2.35",
+  "version": "1.2.37",
   "description": "",
   "main": "index.js",
   "scripts": {