Browse Source

完成催款

mentoswzq 5 years ago
parent
commit
446df0551e

+ 5 - 5
js/component/manageCenter/order/orderNew/addService.jsx

@@ -781,7 +781,7 @@ const NewService = Form.create()(
             "非特批存在填写催款节点首付时间的情况,请删除后重新填写保存"
           );
           return false;
-        }else if(arr[i] != 1 && !arr[i].waitDay && this.state.approval == 1) {
+        }else if(arr[i].dunType == 1 && !arr[i].waitDay && this.state.approval == 1) {
           message.warning("特批存在首付催款节点未填写时间的情况,请删除后重新填写保存")
           return false
         }
@@ -1355,13 +1355,12 @@ const NewService = Form.create()(
     },
     //删除收款节点
     confirmDeletNew(index) {
-      console.log(index);
-
       if (index.id) {
         this.state.contactListNew.splice(index.key, 1);
         this.setState({
           contactListNew: this.state.contactListNew,
-          cuiFlag: false
+          cuiFlag: false,
+          addFlag: false
         });
         $.ajax({
           url: globalConfig.context + "/api/admin/newOrderDun/deleteDun",
@@ -1389,7 +1388,8 @@ const NewService = Form.create()(
         this.state.contactListNew.splice(index.key, 1);
         this.setState({
           contactListNew: this.state.contactListNew,
-          cuiFlag: false
+          cuiFlag: false,
+          addFlag: false
         });
       }
     },

File diff suppressed because it is too large
+ 1230 - 1066
js/component/manageCenter/order/orderNew/approveds.jsx


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

@@ -178,7 +178,7 @@ const MyService=Form.create()(React.createClass({
                     title: '订单编号',
                     dataIndex: 'orderNo',
                     key: 'orderNo',
-					fixed: 'left'
+					// fixed: 'left'
                 },{
                     title: '客户名称',
                     dataIndex: 'userName',

+ 4 - 0
js/component/manageCenter/order/orderNew/examine.jsx

@@ -1449,6 +1449,8 @@ const IntentionCustomer = Form.create()(
                             <Form layout="horizontal" id="demand-form">
                               <Table
                                 pagination={false}
+                                bordered
+                                size="small"
                                 columns={
                                   cuiDataList.length
                                     ? this.state.ContactsLists
@@ -1497,6 +1499,8 @@ const IntentionCustomer = Form.create()(
                               dataSource={this.state.dataSourceX}
                               pagination={this.state.paginations}
                               onRowClick={this.tableRowClickX}
+                              bordered
+                              size="small"
                             />
                           </Spin>
                         </div>

+ 268 - 175
js/component/manageCenter/order/orderNew/press.jsx

@@ -15,67 +15,69 @@ const IntentionCustomer = Form.create()(React.createClass({
 			modalVisible:false
 		});
 		$.ajax({
-			method: "get",
-			dataType: "json",
-			crossDomain: false,
-			url: globalConfig.context +"/api/admin/newOrder/dunOrderNewList",
-			data: {
-				pageNo: pageNo || 1,
-				pageSize: this.state.pagination.pageSize,
-				name: this.state.customerName,//名称
-				orderNo: this.state.orderNo,//订单编号
-				depId: this.state.departmenttSearch,//订单部门
-				adminName:this.state.adminName,//责任人名称
-				starTime: this.state.releaseDate[0],//开始时间
-				endTime: this.state.releaseDate[1],//结束时间
-			},
-			success: function(data) {
-				let theArr = [];
-				if(data.error.length || data.data.list == "") {
-					if(data.error && data.error.length) {
-						message.warning(data.error[0].message);
-					};
-				} else {
-					for(let i = 0; i < data.data.list.length; i++) {
-						let thisdata = data.data.list[i];
-						theArr.push({
-							 key: i,
-							 id:thisdata.id,//ID
-							 orderNo: thisdata.orderNo,//订单编号
-	                         totalAmount:thisdata.totalAmount,//签单金额
-	                         settlementAmount:thisdata.settlementAmount,//已收款
-	                         accountsReceivable:thisdata.accountsReceivable,//应收款
-	                         uncollectedAmount:thisdata.uncollectedAmount,//应收款
-	                         orderStatus:thisdata.orderStatus,//订单状态
-	                         projectStatus:thisdata.projectStatus,//项目状态
-	                         liquidationStatus:thisdata.liquidationStatus,//结算状态
-	                         signDate:thisdata.signDate,//签单时间
-	                          userName:thisdata.userName,//客户名称
-	                         salesmanName:thisdata.salesmanName,//营销员名称
-	                         dunSubject:thisdata.dunSubject,//催收科目
-	                         startDate:thisdata.startDate,//催收启动时间
-							 depName:thisdata.depName,//部门名称
-							 contractNo: thisdata.contractNo
-	                        
-						});
-					};
-				    this.state.pagination.total = data.data.totalCount;
-				};
-				if(data.data&&data.data.list&&!data.data.list.length){
-					this.state.pagination.total=0
-				}
-				this.setState({
-					dataSource: theArr,
-					pageNo: pageNo,
-					pagination: this.state.pagination,
-					selectedRowKeys:[]
-				});
-			}.bind(this),
-		}).always(function() {
-			this.setState({
-				loading: false
-			});
-		}.bind(this));
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/newOrder/dunOrderNewList",
+      data: {
+        pageNo: pageNo || 1,
+        pageSize: this.state.pagination.pageSize,
+        name: this.state.customerName, //名称
+        orderNo: this.state.orderNo, //订单编号
+        depId: this.state.departmenttSearch, //订单部门
+        adminName: this.state.adminName, //责任人名称
+        starTime: this.state.releaseDate[0], //开始时间
+        endTime: this.state.releaseDate[1], //结束时间
+        newStatus: this.state.newStatus
+      },
+      success: function(data) {
+        let theArr = [];
+        if (data.error.length || data.data.list == "") {
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
+          }
+        } else {
+          for (let i = 0; i < data.data.list.length; i++) {
+            let thisdata = data.data.list[i];
+            theArr.push({
+              key: i,
+              id: thisdata.id, //ID
+              orderNo: thisdata.orderNo, //订单编号
+              totalAmount: thisdata.totalAmount, //签单金额
+              settlementAmount: thisdata.settlementAmount, //已收款
+              accountsReceivable: thisdata.accountsReceivable, //应收款
+              uncollectedAmount: thisdata.uncollectedAmount, //应收款
+              orderStatus: thisdata.orderStatus, //订单状态
+              projectStatus: thisdata.projectStatus, //项目状态
+              liquidationStatus: thisdata.liquidationStatus, //结算状态
+              signDate: thisdata.signDate, //签单时间
+              userName: thisdata.userName, //客户名称
+              salesmanName: thisdata.salesmanName, //营销员名称
+              dunSubject: thisdata.dunSubject, //催收科目
+              startDate: thisdata.startDate, //催收启动时间
+              depName: thisdata.depName, //部门名称
+              contractNo: thisdata.contractNo
+            });
+          }
+          this.state.pagination.total = data.data.totalCount;
+        }
+        if (data.data && data.data.list && !data.data.list.length) {
+          this.state.pagination.total = 0;
+        }
+        this.setState({
+          dataSource: theArr,
+          pageNo: pageNo,
+          pagination: this.state.pagination,
+          selectedRowKeys: []
+        });
+      }.bind(this)
+    }).always(
+      function() {
+        this.setState({
+          loading: false
+        });
+      }.bind(this)
+    );
 	},
 	loadDatas(dunId) {
 		this.setState({
@@ -119,7 +121,8 @@ const IntentionCustomer = Form.create()(React.createClass({
 		}.bind(this));
 	},
 	getInitialState() {
-		return {
+	return {
+      newStatus: 1,
       page: 1,
       releaseDate: [],
       selectedRowKeys: [],
@@ -219,10 +222,10 @@ const IntentionCustomer = Form.create()(React.createClass({
         {
           title: "催收科目",
           dataIndex: "dunSubject",
-          key: "dunSubject",
-        //   render: text => {
-        //     return getjiedian(text);
-        //   }
+          key: "dunSubject"
+          //   render: text => {
+          //     return getjiedian(text);
+          //   }
         },
         {
           title: "催款启动日期",
@@ -233,7 +236,7 @@ const IntentionCustomer = Form.create()(React.createClass({
           title: "签单时间",
           dataIndex: "signDate",
           key: "signDate"
-        },
+        }
         // {
         //   title: "催收操作",
         //   dataIndex: "abc",
@@ -399,6 +402,8 @@ const IntentionCustomer = Form.create()(React.createClass({
             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: 9999,
+            newStatus: this.state.newStatus
         }
         window.location.href=(globalConfig.context+'/api/admin/newOrder/exportOrderDunData?'+$.param(data));
     },
@@ -472,116 +477,204 @@ const IntentionCustomer = Form.create()(React.createClass({
 			},
 		};
 		let departmentArr = this.state.departmentArr || [];
-		return(
-			<div className="user-content">
-				<div className="content-title">                  
-                    <span>催款节点统计</span>
-                </div>
-               	<div className="user-search">             
-                   <Input placeholder="客户名称" style={{width:'150px',marginBottom:'10px'}}
-	                        value={this.state.customerName}
-	                        onChange={(e) => { this.setState({ customerName: e.target.value }); }} />
-                    <Input placeholder="营销员名称" style={{width:'150px',marginBottom:'10px'}}
-	                        value={this.state.adminName}
-	                        onChange={(e) => { this.setState({ adminName: e.target.value }); }} />
-                    <Input placeholder="订单编号" style={{width:'150px'}}
-                        value={this.state.orderNo}
-                        onChange={(e) => { this.setState({ orderNo: e.target.value }); }} />
-                    <Select placeholder="选择部门"
-                        style={{ width: 150 ,marginRight:'10px'}}
-                        value={this.state.departmenttSearch}
-                        onChange={(e) => { this.setState({ departmenttSearch: e }) }}>
-                        {
-                            departmentArr.map(function (item) {
-                                    return <Select.Option key={item.id} >{item.name}</Select.Option>
-                            })
+		return (
+      <div className="user-content">
+        <div className="content-title">
+          <span>催款节点统计</span>
+        </div>
+        <div className="user-search">
+          <Input
+            placeholder="客户名称"
+            style={{ width: "150px", marginBottom: "10px" }}
+            value={this.state.customerName}
+            onChange={e => {
+              this.setState({ customerName: e.target.value });
+            }}
+          />
+          <Input
+            placeholder="营销员名称"
+            style={{ width: "150px", marginBottom: "10px" }}
+            value={this.state.adminName}
+            onChange={e => {
+              this.setState({ adminName: e.target.value });
+            }}
+          />
+          <Input
+            placeholder="订单编号"
+            style={{ width: "150px" }}
+            value={this.state.orderNo}
+            onChange={e => {
+              this.setState({ orderNo: e.target.value });
+            }}
+          />
+          <Select
+            placeholder="选择部门"
+            style={{ width: 150, marginRight: "10px" }}
+            value={this.state.departmenttSearch}
+            onChange={e => {
+              this.setState({ departmenttSearch: e });
+            }}
+          >
+            {departmentArr.map(function(item) {
+              return <Select.Option key={item.id}>{item.name}</Select.Option>;
+            })}
+          </Select>
+          <Select
+            placeholder="选择催款节点类型"
+            style={{ width: 150, marginRight: "10px" }}
+            value={this.state.newStatus == 0 ? "旧催款节点" : "新催款节点"}
+            onChange={e => {
+              this.setState({ newStatus: e });
+            }}
+          >
+            <Select.Option key={0}>{"旧催款节点"}</Select.Option>
+            <Select.Option key={1}>{"新催款节点"}</Select.Option>
+          </Select>
+          <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 });
+            }}
+          />
+          <Button
+            type="primary"
+            onClick={this.search}
+            style={{ marginLeft: "10px" }}
+          >
+            搜索
+          </Button>
+          <Button onClick={this.reset}>重置</Button>
+          <Button type="primary" onClick={this.exportExec}>
+            导出催款列表
+          </Button>
+          <div className="patent-table">
+            <Spin spinning={this.state.loading}>
+              <Table
+                columns={this.state.columns}
+                dataSource={this.state.dataSource}
+                pagination={this.state.pagination}
+                onRowClick={this.tableRowClick}
+                scroll={{ x: "max-content", y: 0 }}
+                bordered
+                size="small"
+              />
+            </Spin>
+          </div>
+          <Modal
+            className="customeDetails"
+            footer=""
+            title="新增催款记录"
+            width="500px"
+            visible={this.state.visible}
+            onOk={this.visitOk}
+            onCancel={this.visitCancel}
+          >
+            <Form
+              layout="horizontal"
+              onSubmit={this.handleSubmit}
+              id="demand-form"
+              style={{ paddingBottom: "40px" }}
+            >
+              <Spin spinning={this.state.loading}>
+                <div className="clearfix">
+                  <div className="clearfix">
+                    <FormItem
+                      className="half-item"
+                      {...formItemLayout}
+                      label="催款时间"
+                    >
+                      <DatePicker
+                        style={{
+                          marginTop: "2px",
+                          width: "240px",
+                          height: "32px"
+                        }}
+                        showTime
+                        format="YYYY-MM-DD"
+                        onOk={() => {}}
+                        value={
+                          this.state.dumTime ? moment(this.state.dumTime) : null
                         }
-               		 </Select>  
-                    <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 }); }} />
-                    <Button type="primary" onClick={this.search} style={{marginLeft:'10px'}}>搜索</Button>
-                    <Button onClick={this.reset}>重置</Button> 
-					<Button type="primary" onClick={this.exportExec} >导出催款列表</Button>
-                   	<div className="patent-table">
-	                    <Spin spinning={this.state.loading}>
-	                        <Table columns={this.state.columns}
-	                            dataSource={this.state.dataSource}  
-								scroll={{ x: 1500, y: 0 }}
-	                            pagination={this.state.pagination} 
-								onRowClick={this.tableRowClick}
-								bordered
-								size="small"
-	                           />
-	                    </Spin>
-               		 </div> 
-               		<Modal	
-				      className="customeDetails"
-				      footer=''
-			          title="新增催款记录"
-			          width='500px'
-			          visible={this.state.visible}
-			          onOk={this.visitOk}
-					  onCancel={this.visitCancel}							          							          
-			        >	
-				        <Form layout="horizontal" onSubmit={this.handleSubmit} id="demand-form" style={{paddingBottom:'40px'}} >
-				            <Spin spinning={this.state.loading}>
-				                <div className="clearfix">
-				                	<div className='clearfix'>
-				                    	<FormItem className="half-item" {...formItemLayout} label="催款时间">
-	                                        <DatePicker 
-	                                            style={{marginTop:"2px",width: '240px',height:"32px" }}
-	                                            showTime
-	                                            format="YYYY-MM-DD"
-	                                            onOk={()=>{}}
-	                                            value={this.state.dumTime ? moment(this.state.dumTime) : null}
-	                                            onChange={(data, dataString) => { this.setState({ dumTime: dataString }); }} />
-	                                    </FormItem>
-				                	 </div>
-				                	<div className='clearfix'>
-				                    	<FormItem
-								            labelCol={{ span: 4 }}
-								            wrapperCol={{ span: 16 }}
-								            label="催款情况" >
-								                <Input type="textarea" placeholder="请输入催款情况" rows={4}  value={this.state.remarks} 
-									    				onChange={(e)=>{this.setState({remarks:e.target.value})}}/>	
-								        </FormItem>
-				                    </div>	
-				                     <div className='clearfix'>
-						                   <Button className="cancel" type="primary" onClick={this.examOk} style={{marginLeft:"50px"}} htmlType="submit">添加</Button>
-			                               <Button className="cancel" type="ghost" onClick={this.noCancel} style={{marginLeft:"50px"}}>取消</Button>
-	                            	</div>
-				                </div>
-				            </Spin>
-				        </Form>
-			        </Modal>
-			        <Modal	
-				      className="customeDetails"
-				      footer=''
-			          title="催款记录查看"
-			          width='500px'
-			          visible={this.state.visibles}
-			          onOk={this.visitOks}
-					  onCancel={this.visitCancels}							          							          
-			        >	
-			        	<div className="user-content">
-					        <div className="patent-table">
-			                    <Spin spinning={this.state.loading}>
-			                        <Table columns={this.state.columnsX}
-			                            dataSource={this.state.dataSources}    
-			                            rowSelection={rowSelection}
-			                            pagination={this.state.paginations} 
-			                            onRowClick={this.tableRowClick}
-			                           />
-			                    </Spin>
-		               		 </div>
-		                </div>
-			        </Modal>
-               	</div>  
+                        onChange={(data, dataString) => {
+                          this.setState({ dumTime: dataString });
+                        }}
+                      />
+                    </FormItem>
+                  </div>
+                  <div className="clearfix">
+                    <FormItem
+                      labelCol={{ span: 4 }}
+                      wrapperCol={{ span: 16 }}
+                      label="催款情况"
+                    >
+                      <Input
+                        type="textarea"
+                        placeholder="请输入催款情况"
+                        rows={4}
+                        value={this.state.remarks}
+                        onChange={e => {
+                          this.setState({ remarks: e.target.value });
+                        }}
+                      />
+                    </FormItem>
+                  </div>
+                  <div className="clearfix">
+                    <Button
+                      className="cancel"
+                      type="primary"
+                      onClick={this.examOk}
+                      style={{ marginLeft: "50px" }}
+                      htmlType="submit"
+                    >
+                      添加
+                    </Button>
+                    <Button
+                      className="cancel"
+                      type="ghost"
+                      onClick={this.noCancel}
+                      style={{ marginLeft: "50px" }}
+                    >
+                      取消
+                    </Button>
+                  </div>
+                </div>
+              </Spin>
+            </Form>
+          </Modal>
+          <Modal
+            className="customeDetails"
+            footer=""
+            title="催款记录查看"
+            width="500px"
+            visible={this.state.visibles}
+            onOk={this.visitOks}
+            onCancel={this.visitCancels}
+          >
+            <div className="user-content">
+              <div className="patent-table">
+                <Spin spinning={this.state.loading}>
+                  <Table
+                    columns={this.state.columnsX}
+                    dataSource={this.state.dataSources}
+                    rowSelection={rowSelection}
+                    pagination={this.state.paginations}
+                    onRowClick={this.tableRowClick}
+                  />
+                </Spin>
+              </div>
             </div>
-			);
+          </Modal>
+        </div>
+      </div>
+    );
 	}
 }));
 export default IntentionCustomer;

+ 20 - 5
js/component/manageCenter/order/orderNew/pressList.jsx

@@ -28,7 +28,8 @@ const IntentionCustomer = Form.create()(React.createClass({
 				adminName:this.state.adminName,//责任人名称
 				starTime: this.state.releaseDate[0],//开始时间
 				endTime: this.state.releaseDate[1],//结束时间
-				specially:1
+        specially:1,
+        newStatus: this.state.newStatus,
 			},
 			success: function(data) {
 				let theArr = [];
@@ -122,6 +123,7 @@ const IntentionCustomer = Form.create()(React.createClass({
 	},
 	getInitialState() {
 		return {
+      newStatus: 1,
       page: 1,
       releaseDate: [],
       selectedRowKeys: [],
@@ -400,10 +402,11 @@ const IntentionCustomer = Form.create()(React.createClass({
             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,
-			depId: this.state.departmenttSearch ? this.state.departmenttSearch : undefined,//订单部门
-			specially:1,
-			pageSize: 9999
+            endTime: this.state.releaseDate[1]?this.state.releaseDate[1]:undefined,
+            depId: this.state.departmenttSearch ? this.state.departmenttSearch : undefined,//订单部门
+            specially:1,
+            pageSize: 9999,
+            newStatus: this.state.newStatus
         }
         window.location.href=(globalConfig.context+'/api/admin/newOrder/exportOrderDunData?'+$.param(data));
     },
@@ -526,6 +529,17 @@ const IntentionCustomer = Form.create()(React.createClass({
               return <Select.Option key={item.id}>{item.name}</Select.Option>;
             })}
           </Select>
+          <Select
+            placeholder="选择催款节点类型"
+            style={{ width: 150, marginRight: "10px" }}
+            value={this.state.newStatus == 0 ? "旧催款节点" : "新催款节点"}
+            onChange={e => {
+              this.setState({ newStatus: e });
+            }}
+          >
+            <Select.Option key={0}>{"旧催款节点"}</Select.Option>
+            <Select.Option key={1}>{"新催款节点"}</Select.Option>
+          </Select>
           <span style={{ marginRight: "10px" }}>下单时间 :</span>
           <RangePicker
             value={[
@@ -554,6 +568,7 @@ const IntentionCustomer = Form.create()(React.createClass({
                 columns={this.state.columns}
                 dataSource={this.state.dataSource}
                 pagination={this.state.pagination}
+                scroll={{ x: "max-content", y: 0 }}
                 onRowClick={this.tableRowClick}
                 bordered
                 size="small"

+ 5 - 5
js/component/manageCenter/order/orderNew/reject.jsx

@@ -1132,13 +1132,12 @@ const IntentionCustomer = Form.create()(
     },
     //删除收款节点
     confirmDeletNew(index) {
-      console.log(index);
-      
       if (index.id) {
         this.state.contactListNew.splice(index.key, 1);
         this.setState({
           contactListNew: this.state.contactListNew,
-          cuiFlag: false
+          cuiFlag: false,
+          addFlag: false
         });
         $.ajax({
           url: globalConfig.context + "/api/admin/newOrderDun/deleteDun",
@@ -1166,7 +1165,8 @@ const IntentionCustomer = Form.create()(
         this.state.contactListNew.splice(index.key, 1);
         this.setState({
           contactListNew: this.state.contactListNew,
-          cuiFlag: false
+          cuiFlag: false,
+          addFlag: false
         });
       }
     },
@@ -1246,7 +1246,7 @@ const IntentionCustomer = Form.create()(
             flag: false
           });
           return false;
-        } else if (arr[i] != 1 && !arr[i].waitDay && this.state.approval == 1) {
+        } else if (arr[i].dunType == 1 && !arr[i].waitDay && this.state.approval == 1) {
           message.warning(
             "特批存在首付催款节点未填写时间的情况,请删除后重新填写保存"
           );