dengzhiguo 6 years ago
parent
commit
cff5d07805

+ 48 - 1
js/component/dataDic.js

@@ -2585,5 +2585,52 @@ module.exports = {
             value: "2",
             key: "全部发放"
         }
-    ]
+    ],
+    //奖金发放状态
+    jiedian:[
+        {
+            value: "12",
+            key: "订单审核通过"
+        }, {
+            value: "20",
+            key: "项目待提交"
+        }, {
+            value: "21",
+            key: "项目已提交"
+        }, {
+            value: "22",
+            key: "项目评审"
+        }, {
+            value: "23",
+            key: "项目立项"
+        }, {
+            value: "24",
+            key: "项目公示"
+        }, {
+            value: "25",
+            key: "项目抽查"
+        }, {
+            value: "26",
+            key: "项目备案"
+        }, {
+            value: "27",
+            key: "项目下证"
+        }, {
+            value: "28",
+            key: "项目验收"
+        }, {
+            value: "29",
+            key: "项目拨款"
+        }
+    ],
+     //特批流程
+    tepi:[
+        {
+            value: "0",
+            key: "非特批"
+        }, {
+            value: "1",
+            key: "特批"
+        }
+    ],
 };

+ 443 - 197
js/component/manageCenter/order/orderNew/addService.jsx

@@ -1,10 +1,10 @@
 import React from 'react';
-import { Icon, Table, Modal, message, Spin, Input, Select, Button, Form ,Upload,Popconfirm,AutoComplete,DatePicker,Radio} from 'antd';
+import { Icon, Table, Modal, message, Spin, Input, Select, Button, Form ,Upload,Popconfirm,AutoComplete,DatePicker,Radio,Col} from 'antd';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import '../userMangagement.less';
-import {orderTypes,customerType} from '../../../dataDic.js';  
-import {splitUrl,getOrderType,getOrderStage,getProjectState,getOrderState,getTransactionProject,getChangeState,getPaymentState,getOrderChannel,getApprovedState,getLock,getPaymentMethod,getTransactionChannel,beforeUploadFile,getProcessStatus,getLiquidationStatus} from '../../../tools.js';
+import {orderTypes,customerType,jiedian,tepi,boutique} from '../../../dataDic.js';  
+import {splitUrl,getTransactionProject,getChangeState,getTransactionChannel,beforeUploadFile,getProcessStatus,getLiquidationStatus,getboutique} from '../../../tools.js';
 const Option = AutoComplete.Option;
 //图片组件
 const PicturesWall = React.createClass({
@@ -65,6 +65,7 @@ const PicturesWall = React.createClass({
     }
 });
 const NewService = Form.create()(React.createClass({
+	//查看项目列表
 	loadData(record) {
         this.state.data = [];
         this.setState({
@@ -74,7 +75,7 @@ const NewService = Form.create()(React.createClass({
             method: "get",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + '/api/admin/order/getOrderCommodity',
+            url: globalConfig.context + '/open/api/admin/newOrder/getOrderTask',
             data: {
             	orderNo:record?record.orderNo:this.props.datauser.orderNo
             },
@@ -90,18 +91,16 @@ const NewService = Form.create()(React.createClass({
                         theArr.push({
                              key: i,
                              id:thisdata.id,
-                             orderNo:thisdata.orderNo,
-                             commodityName:thisdata.commodityName,
-                             commodityType:thisdata.commodityType,
-                             commodityMode:thisdata.commodityMode,
-                             commodityQuantity:thisdata.commodityQuantity,
-                             commodityPrice:thisdata.commodityPrice,
-                             discountPrice:thisdata.discountPrice,
-                             commodityFirstPayment:thisdata.commodityFirstPayment,
-                             createTimes:thisdata.createTimes,
-                             discountFirstPayment:thisdata.discountFirstPayment,
-                             remarks:thisdata.remarks,
-                             commodityId:thisdata.commodityId,
+                             orderNo:thisdata.orderNo,//订单编号
+                              commodityId:thisdata.commodityId,//项目ID
+                             commodityName:thisdata.commodityName,//项目名称
+                             cname:thisdata.cname,//项目类别
+                             commodityPrice:thisdata.commodityPrice,//项目价格
+                             commodityQuantity:thisdata.commodityQuantity,//项目数量
+                             main:thisdata.main,//是否为主要任务
+                             taskComment:thisdata.taskComment,//任务说明
+                             contacts:thisdata.contacts,//联系人
+                             contactsMobile:thisdata.contactsMobile,//联系人电话
                         });
                     };
                    }
@@ -169,7 +168,6 @@ const NewService = Form.create()(React.createClass({
 			active:{
 				applySign:false
 			},
-			editFw:[],
 			lookState:false,
 			signBillVisible:false,
 			commod:'',
@@ -180,31 +178,36 @@ const NewService = Form.create()(React.createClass({
                     key: 'commodityName'
                 }, {
                     title: '项目类别',
-                    dataIndex: 'commodityType',
-                    key: 'commodityType',
-                    render:(text)=>{
-                    	return (getOrderType(text))
-                    }
+                    dataIndex: 'cname',
+                    key: 'cname',
+                    
                 },{
                     title: '项目数量',
                     dataIndex: 'commodityQuantity',
                     key: 'commodityQuantity'
                 }, {
-                    title: '服务市价(万元)',
+                    title: '金额(万元)',
                     dataIndex: 'commodityPrice',
                     key: 'commodityPrice'
                 }, {
-                    title: '实签价格(万元)',
-                    dataIndex: 'discountPrice',
-                    key: 'discountPrice'
+                    title: '负责人',
+                    dataIndex: 'contacts',
+                    key: 'contacts'
+                }, {
+                    title: '负责人电话',
+                    dataIndex: 'contactsMobile',
+                    key: 'contactsMobile'
                 }, {
-                    title: '下单时间',
-                    dataIndex: 'createTimes',
-                    key: 'createTimes'
+                    title: '主要项目',
+                    dataIndex: 'main',
+                    key: 'main',
+                    render:(text)=>{
+                    	return (text?'是':'否')
+                    }
                 }, {
                     title: '项目说明',
-                    dataIndex: 'remarks',
-                    key: 'remarks',
+                    dataIndex: 'taskComment',
+                    key: 'taskComment',
 					render:(text)=>{
 						return (text&&text.length>8?text.substr(0,8)+'…':text)
 					}
@@ -213,12 +216,11 @@ const NewService = Form.create()(React.createClass({
                     dataIndex: 'ABC',
                     key: 'ABC',
                     render: (text, record, index) => {
-						return 
-//						<div style={{display:this.props.datauser.active.applySign||this.state.changeStatus==1?'block':'none'}}>
-								<Popconfirm title="是否删除?" onConfirm={(e)=>{this.delectRow(record)}} okText="是" cancelText="否">
-								    <Button onClick={(e) =>{ e.stopPropagation()}} type="danger">删除</Button>                 
-								</Popconfirm>
-//							</div>
+						return <div>
+									{this.state.processStatus==0?<Popconfirm title="是否删除?" onConfirm={(e)=>{this.delectRow(record)}} okText="是" cancelText="否">
+										    <Button onClick={(e) =>{ e.stopPropagation()}} type="danger">删除</Button>                 
+										</Popconfirm>:""}
+								</div>
 							}
                 },
 			],
@@ -272,7 +274,56 @@ const NewService = Form.create()(React.createClass({
                     dataIndex: 'confirmTime',
                     key: 'confirmTime',
                 }
-			]
+			],
+			contactList:[],
+			loading:false,
+			ContactsLists: [{
+					title: '催款科目',
+					dataIndex: 'dunSubject',
+					key: 'dunSubject',
+					render: (text, record, index) => {
+						return <Select placeholder="请选择催款科目"  value={record.dunSubject}  style={{width:'150px'}}
+						    		onChange={(e) => { record.dunSubject = e; this.setState({ contactList: this.state.contactList }); }}> 
+                                 {
+                                    jiedian.map(function (item) {
+                                        return <Select.Option key={item.value} >{item.key}</Select.Option>
+                                    })
+                                }
+                            </Select>  
+				                               
+					}
+				},{
+					title: '金额(万)',
+					dataIndex: 'money',
+					key: 'money',
+					render: (text, record, index) => {
+						return <Input value={record.money} placeholder="请输入金额(必填项)" key={record.id} required="required"
+	                  onChange={(e) => { record.money = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
+					}
+				}, {
+					title: '催款状态',
+					dataIndex: 'dunStatus',
+					key: 'dunStatus',
+					render: (text, record, index) => {
+						return text?'已完成':'催款中'
+					}
+				},
+				{
+					title: '操作',
+					dataIndex: 'dels',
+					key: 'dels',
+					render: (text, record, index) => {
+						return <div>
+		                        {this.state.processStatus==0?<Popconfirm title="是否删除?" onConfirm={(e)=>{this.confirmDelet(record.key)}} okText="删除" cancelText="不删除">
+									    <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
+									</Popconfirm>
+									:''}
+								{record.id?'': <Button  type="primary" htmlType="submit" onClick={this.contactSave}>保存</Button>}
+								
+                            </div>
+					}
+				}
+			],
 		};
 	},
 	//新建订单、编辑订单保存
@@ -289,13 +340,28 @@ const NewService = Form.create()(React.createClass({
             theorgCodeUrl = picArr.join(",");
         };
         if(this.props.userDetaile){
-	        if(!this.state.signTotalAmount){
-	        	message.warning('请输入实签订单金额!');
+	        if(!this.state.contacts){
+	        	message.warning('企业负责人不能为空');
+	        	this.refs.signFirstPayment.focus()
+	        	return false;
+	        };
+	        if(!this.state.contactMobile){
+	        	message.warning('企业负责人电话不能为空');
 	        	this.refs.signFirstPayment.focus()
 	        	return false;
 	        };
-	        if(!this.state.signFirstPayment){
-	        	message.warning('实签首款金额不能为空');
+	        if(!this.state.totalAmount){
+	        	message.warning('签单金额不能为空');
+	        	this.refs.signFirstPayment.focus()
+	        	return false;
+	        };
+	        if(!this.state.firstAmount){
+	        	message.warning('首付金额不能为空');
+	        	this.refs.signFirstPayment.focus()
+	        	return false;
+	        };
+	        if(!theorgCodeUrl){
+	        	message.warning('企业负责人不能为空');
 	        	this.refs.signFirstPayment.focus()
 	        	return false;
 	        };
@@ -315,7 +381,7 @@ const NewService = Form.create()(React.createClass({
 				this.setState({
 					loading: true
 				});
-				let api=this.props.userDetaile?'/api/admin/order/updateServiceOrder':'/open/api/admin/newOrder/createOrder';
+				let api=this.props.userDetaile?'/open/api/admin/newOrder/updateServiceOrderNew':'/open/api/admin/newOrder/createOrder';
 				$.ajax({
 					method: "POST",
 					dataType: "json",
@@ -326,11 +392,18 @@ const NewService = Form.create()(React.createClass({
 						orderType:this.state.orderType,
 						contractType:this.state.contractType
 					}:{
-						orderNo:this.props.datauser.orderNo,
-						signTotalAmount:this.state.signTotalAmount,
-						signFirstPayment:this.state.signFirstPayment,
-						orderRemarks:this.state.orderRemarks,
-						contractNo:this.state.contractNo,
+						orderNo: this.state.orderNo,//订单编号
+						totalAmount: this.state.totalAmount,//总金额
+						firstAmount: this.state.firstAmount,//首付
+						isSubmit: this.state.isSubmit,//保存草稿还是提交
+						signDate: this.state.signDate,//签单日期
+						contacts: this.state.contacts,//企业负责人
+						contactMobile: this.state.contactMobile,//负责人联系方式
+						legalPerson: this.state.legalPerson,//企业法人
+						legalPersonTel: this.state.legalPersonTel,//企业法人联系电话
+						approval: this.state.approval,//特批状态
+						contractNo: this.state.contractNo,//合同编号
+						orderRemarks: this.state.orderRemarks,//订单备注
 						contractPictureUrl:theorgCodeUrl.length?theorgCodeUrl:'',
 					}
 				}).done(function(data) {
@@ -347,6 +420,41 @@ const NewService = Form.create()(React.createClass({
 			}
 		});
 	},
+	//订单详情修改
+	xiangqingClick(e) {
+		e.preventDefault();
+		this.setState({
+			loading: true
+		});
+		$.ajax({
+			url: globalConfig.context + '/open/api/admin/newOrder/updateServiceOrderNew',
+			method: 'post',
+			data: {
+				orderNo: this.state.orderNo,//订单编号
+				totalAmount: this.state.totalAmount,//总金额
+				firstAmount: this.state.firstAmount,//首付
+				isSubmit: this.state.isSubmit,//保存草稿还是提交
+				signDate: this.state.signDate,//签单日期
+				contacts: this.state.contacts,//企业负责人
+				contactMobile: this.state.contactMobile,//负责人联系方式
+				legalPerson: this.state.legalPerson,//企业法人
+				legalPersonTel: this.state.legalPersonTel,//企业法人联系电话
+				approval: this.state.approval,//特批状态
+				contractNo: this.state.contractNo,//合同编号
+				orderRemarks: this.state.orderRemarks,//订单备注
+			}
+		}).done(function(data) {
+			this.setState({
+				loading: false
+			});
+			if(!data.error.length) {
+				message.success('保存成功!');
+				this.loaduser();
+			} else {
+				message.warning(data.error[0].message);
+			}
+		}.bind(this));
+	},
 	//查看基本详情基本信息
     loaduser(record){
     	this.state.orderList=[]
@@ -368,14 +476,15 @@ const NewService = Form.create()(React.createClass({
                 };
                 this.setState({
 					id:thisData.id,
+					kehuId:thisData.buyerId,
 					orderNo:thisData.orderNo,//订单编号
 					orderType:thisData.orderType,//订单类型
-					firstAmount:thisData.firstAmount,//金额
-					totalAmount:thisData.totalAmount,//首付金额
+					firstAmount:thisData.firstAmount,//首付金额
+					totalAmount:thisData.totalAmount,//金额
 					settlementAmount:thisData.settlementAmount,//结算金额
 					liquidationStatus:thisData.liquidationStatus,//清算状态
 					processStatus:thisData.processStatus,//流程状态
-					approval:thisData.approval,//特批状态
+					approval:thisData.approval.toString(),//特批状态
                		orderRemarks:thisData.orderRemarks,//订单备注
                		contractNo:thisData.contractNo,//合同编号
                		contacts:thisData.contacts,//联系人
@@ -398,6 +507,99 @@ const NewService = Form.create()(React.createClass({
             });
         }.bind(this));  
     },
+    //查看催款节点
+    loaduserss(record){
+    	this.state.orderList=[]
+    	this.setState({
+    		orderNoss:record?record.orderNo:this.props.datauser.orderNo,
+    	})
+    	$.ajax({
+            method: "get",
+			dataType: "json",
+			crossDomain: false,
+			url: globalConfig.context + '/open/api/admin/newOrder/selectOrderDun',
+            data: {
+              orderNo:record?record.orderNo:this.props.datauser.orderNo
+            },
+            success: function (data) {
+                let theArr=[];
+                let thisData=[];
+                if (!thisData) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                    thisData = {};
+                }else{
+                	for(let i = 0; i < data.data.length; i++) {
+                		thisData= data.data[i];  
+	                	theArr.push({
+	                		key:i,
+	                		dunSubject:thisData.dunSubject?thisData.dunSubject.toString():"",//催款科目
+	                		id:thisData.id,//节点Id
+	                		money:thisData.money,//催款金额
+	                		dunStatus:thisData.dunStatus,//催款状态
+	                		orderNo:record?record.orderNo:this.props.datauser.orderNo,
+	                	})
+                	}
+                	this.setState({
+                		contactList:theArr
+                	})
+                };
+            }.bind(this),
+       }).always(function () {
+            this.setState({            	
+                loading: false
+            });
+        }.bind(this));  
+    },
+    //催款节点保存
+	contactSave(e) {
+		this.setState({
+			loading: true
+		});
+		$.ajax({
+			url: globalConfig.context + '/open/api/admin/newOrder/createOrderDun',
+			method: 'post',
+			data: {
+				orderNo: this.state.orderNoss,
+				orderDun: JSON.stringify(this.state.contactList)
+			}
+		}).done(function(data) {
+			this.setState({
+				loading: false
+			});
+			if(!data.error.length) {
+				message.success('保存成功!');
+				this.loaduserss();
+			} else {
+				message.warning(data.error[0].message);
+			}
+		}.bind(this));
+	},
+	//点击新增催款节点
+	addcontact(record) {
+		this.state.contactList.push({
+			key:this.state.contactList.length,
+			money: '',
+			dunSubject:undefined,
+			orderNo: this.state.orderNoss,
+			dunTarget:this.state.kehuId,
+		});
+		this.setState({
+			contactList: this.state.contactList
+		})
+		console.log(this.state.contactList);
+	},	
+	
+	//删除收款节点
+	confirmDelet(index) {
+		console.log(index);
+		this.state.contactList.splice(index,1);
+		this.setState({
+			contactList: this.state.contactList
+		})
+		this.contactSave();
+	},
 	handleOk(e) {
 		this.setState({
 			visible: false,
@@ -410,18 +612,38 @@ const NewService = Form.create()(React.createClass({
 		});
 		this.props.closeDesc(false);
 	},
+	//点击签单
+	handleCancels(e) {
+		this.setState({
+			//visible: false,
+		});
+		this.props.closeDesc(false);
+		this.setState({
+			isSubmit:1
+		})
+	},
+	//点击签单
+	handleCancelq(e) {
+		this.setState({
+			//visible: false,
+		});
+		this.props.closeDesc(false);
+		this.setState({
+			isSubmit:0
+		})
+	},
 	//删除
     delectRow(record) {
         this.setState({
             loading: true
         });
         $.ajax({
-            method: "get",
+            method: "post",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + "/api/admin/order/deleteOrderCommodity",
+            url: globalConfig.context + "/open/api/admin/newOrder/deleteOrderTask",
             data: {
-            	detailId:record.id
+            	id:record.id
             }
         }).done(function (data) {
             if (!data.error.length) {
@@ -436,40 +658,14 @@ const NewService = Form.create()(React.createClass({
             };
         }.bind(this));
     },
-	//添加明细
-	addDetailed(){
-		this.setState({
-			gid:'',
-			customerArr:[],
-			commodityName:'',
-			commodityId:'',
-			commodityMode:'',
-			commodityQuantity:'',
-			commodityPrice:'',
-			discountPrice:'',
-			commodityFirstPayment:'',
-			discountFirstPayment:'',
-			remarks:'',
-			addState:1,
-			addnextVisible: true
-		})
-	},
+	
+	
 	nextCancel() {
 		this.setState({
 			addnextVisible: false
 		})
 	},
-	tableRowClick(record, index) {
-        this.setState({
-        	active:this.props.datauser.active,
-        	editFw:record,
-        	jid:record.id,
-        	discountFirstPayment:record.discountFirstPayment,
-        	discountPrice:record.discountPrice,
-        	addnextVisible:true,
-        	addState:0,
-        });
-    },
+	
 	getOrgCodeUrl(e) {
         this.setState({ orgCodeUrl: e });
     },
@@ -578,7 +774,7 @@ const NewService = Form.create()(React.createClass({
 		this.setState({
 			commodityName:value,
 			gid:kid.id,
-			commodityPrice:kid.price==0?kid.price.toString():kid.price,
+			//commodityPrice:kid.price==0?kid.price.toString():kid.price,
 			commodityFirstPayment:kid.firstPayment==0?kid.firstPayment.toString():kid.firstPayment
 		})
 	},
@@ -617,7 +813,22 @@ const NewService = Form.create()(React.createClass({
 			customerName:e
 		})
 	},
-	//新建明细保存
+	//点击添加项目明细
+	addDetailed(){
+		this.setState({
+			gid:'',
+			customerArr:[],
+			commodityName:'',
+			commodityQuantity:'',
+			commodityId:'',
+			taskComment:'',
+			main:undefined,
+			commodityPrice:'',
+			addState:1,
+			addnextVisible: true
+		})
+	},
+	//新建项目明细保存
 	nextSubmit(e) {
 		e.preventDefault();
 		if(this.state.gid==undefined||!this.state.gid){
@@ -625,51 +836,37 @@ const NewService = Form.create()(React.createClass({
 			return false;
 		};
 		if(!this.state.commodityPrice){
-			message.warning('请输入市场价格!');
+			message.warning('请输入金额!');
 			this.refs.commodityPrice.focus();
 			return false;
 		};
-		if(!this.state.discountPrice){
-			message.warning('请输入实签价格!');
-			this.refs.discountPrice.focus();
-			return false;
-		};
 		if(!this.state.commodityQuantity){
 			message.warning('请输入商品数量!');
 			this.refs.commodityQuantity.focus();
 			return false;
 		};
-		if(!this.state.commodityFirstPayment){
-			message.warning('请输入市场首付金额!');
-			this.refs.commodityFirstPayment.focus();
-			return false;
-		};
-		if(!this.state.discountFirstPayment){
-			message.warning('请输入签单首付金额!');
-			this.refs.discountFirstPayment.focus();
+		if(!this.state.main){
+			message.warning('请选择是否为主要项目!');
+			this.refs.commodityQuantity.focus();
 			return false;
 		};
 		this.setState({
 			loading: true
 		});
-		let api=this.state.addState?'/api/admin/order/addOrderCommodity':'/api/bianji';
+		let api=this.state.addState?'/open/api/admin/newOrder/addOrderTask':'/api/bianji';
 		$.ajax({
 			method: "POST",
 			dataType: "json",
 			crossDomain: false,
 			url: globalConfig.context +api ,
 			data: {
-				commodityId:this.state.gid,
-				orderNo:this.props.datauser.orderNo,
+				commodityId:this.state.gid,//商品ID
+				orderNo:this.props.datauser.orderNo,//订单编号
 				commodityName:this.state.commodityName,//商品名称
-				commodityMode:this.state.commodityMode,//商品规格
 				commodityQuantity:this.state.commodityQuantity,//商品数量
-				commodityType:0,//商品类型
-				commodityPrice:this.state.commodityPrice,//市场总价
-				discountPrice:this.state.discountPrice,//签单总价
-				commodityFirstPayment:this.state.commodityFirstPayment,//市场首付金额
-				discountFirstPayment:this.state.discountFirstPayment,//签单首付金额
-				remarks:this.state.remarks,//服务说明
+				commodityPrice:this.state.commodityPrice,//签单总价
+				taskComment:this.state.taskComment,//服务说明
+				main:this.state.main,//是否为主要项目
 			}
 		}).done(function(data) {
 			this.setState({
@@ -678,35 +875,57 @@ const NewService = Form.create()(React.createClass({
 			if(!data.error.length) {
 				message.success('保存成功!');
 				this.nextCancel()
-				this.loaduser(this.props.datauser);
+				//this.loaduser(this.props.datauser);
 				this.loadData();
 			} else {
 				message.warning(data.error[0].message);
 			}
 		}.bind(this));
 	},
+	//点击打卡项目详情
+	tableRowClick(record, index) {
+		console.log(record);
+        this.setState({
+        	jid:record.id,//项目ID
+        	kid:record.commodityId,//商品ID
+        	commodityName:record.commodityName,//金额
+        	commodityPrice:record.commodityPrice,//金额
+        	commodityQuantity:record.commodityQuantity,//数量
+        	taskComment:record.taskComment,//备注
+        	main:record.main.toString(),//是否为主要
+        	addnextVisible:true,
+        	addState:0,
+        });
+    },
+    //修改项目详情
 	tabRowSave(e){
 		e.preventDefault();
-		if(!this.state.discountPrice){
-			message.warning('实签价格不能为空!');
+		if(!this.state.commodityPrice){
+			message.warning('金额不能为空!');
+			return false;
+		};
+		if(!this.state.commodityQuantity){
+			message.warning('数量不能为空!');
 			return false;
 		};
-		if(!this.state.discountFirstPayment){
-			message.warning('签单首付金额不能为空!');
+		if(!this.state.main){
+			message.warning('请选择是否为主要项目!');
+			this.refs.commodityQuantity.focus();
 			return false;
 		};
 		$.ajax({
 			method: "POST",
 			dataType: "json",
 			crossDomain: false,
-			url: globalConfig.context +'/api/admin/order/updateOrderCommodity' ,
+			url: globalConfig.context +'/open/api/admin/newOrder/updateOrderTask' ,
 			data: {
-				detailId:this.state.jid,
-				orderNo:this.props.datauser.orderNo,
-				discountPrice:this.state.discountPrice,//签单总价
-				discountFirstPayment:this.state.discountFirstPayment,//签单首付金额
-				commodityQuantity:this.state.editFw.commodityQuantity,
-				remarks:this.state.editFw.remarks
+				id:this.state.jid,//项目ID
+				commodityId:this.state.kid,//商品ID
+				orderNo:this.props.datauser.orderNo,//订单编号
+				main:this.state.main,//是否为主要
+				commodityPrice:this.state.commodityPrice,//金额
+				commodityQuantity:this.state.commodityQuantity,//数量
+				taskComment:this.state.taskComment//备注
 			}
 		}).done(function(data) {
 			this.setState({
@@ -1115,7 +1334,6 @@ const NewService = Form.create()(React.createClass({
                              discountPrice:thisdata.discountPrice,
                              commodityFirstPayment:thisdata.commodityFirstPayment,
                              createTimes:thisdata.createTimes,
-                             discountFirstPayment:thisdata.discountFirstPayment,
                              remarks:thisdata.remarks,
                         });
                     };
@@ -1188,6 +1406,7 @@ const NewService = Form.create()(React.createClass({
 		};
 		if(nextProps.userDetaile && nextProps.showDesc) {
 			this.loaduser(nextProps.datauser);
+			this.loaduserss(nextProps.datauser);
 			this.loadData(nextProps.datauser);
 		}else{
 			this.setState({
@@ -1208,7 +1427,6 @@ const NewService = Form.create()(React.createClass({
 			wrapperCol: { span: 14 },
 		};
 		const changeHtml=this.state.changeHtml ||[];
-		const editFws=this.state.editFw;
 		const categoryList=this.state.categoryArr ||[];
 		const orderDetaiel=this.state.orderList || [];
 		const dataSources=this.state.customerArr || [];
@@ -1297,18 +1515,11 @@ const NewService = Form.create()(React.createClass({
 							                            <span>{this.state.orderNo}</span>
 						                    		</FormItem>
 						                    		<FormItem className="half-item"
-							                            {...formItemLayout}
-							                            label="合同签订时间" >   
-							                            <DatePicker
-							                              style={{marginTop:"2px",width: '240px',height:"32px" }}
-													      showTime
-													      format="YYYY-MM-DD"
-													      placeholder="合同签订时间"
-													      value={this.state.signDate}
-													      onChange={(e,time)=>{this.selTime(e,time)}}
-													    />
-													    <span className="mandatory">*</span>
-						                    		</FormItem>
+								                            {...formItemLayout}
+								                            label="合同编号" >                             
+							                                    <Input placeholder="请输入合同编号" value={this.state.contractNo}
+							                                    	onChange={(e)=>{this.setState({contractNo:e.target.value})}} style={{width:'240px'}} />
+								                    </FormItem>
 						                    		<FormItem className="half-item"
 							                            {...formItemLayout}
 							                            label="客户名称" >  
@@ -1355,26 +1566,42 @@ const NewService = Form.create()(React.createClass({
 									                    <FormItem className="half-item"
 								                            {...formItemLayout}
 								                            label="签单金额(万元)" >                             
-							                                    <Input placeholder="签单金额" ref='signTotalAmount' value={this.state.firstAmount} onChange={(e)=>{this.setState({firstAmount:e.target.value})}} style={{width:'240px'}} />
+							                                    <Input placeholder="签单金额" ref='signTotalAmount' value={this.state.totalAmount} onChange={(e)=>{this.setState({totalAmount:e.target.value})}} style={{width:'240px'}} />
 									                   			<span className="mandatory">*</span>
 									                    </FormItem>
 									                    <FormItem className="half-item"
 									                            {...formItemLayout}
 									                            label="首付金额(万元)" >                             
-								                                    <Input placeholder="请输入实签首款金额" ref='signFirstPayment' value={this.state.totalAmount} onChange={(e)=>{this.setState({totalAmount:e.target.value})}} style={{width:'240px'}} />
+								                                    <Input placeholder="请输入实签首款金额" ref='signFirstPayment' value={this.state.firstAmount} onChange={(e)=>{this.setState({firstAmount:e.target.value})}} style={{width:'240px'}} />
 									                    		<span className="mandatory">*</span>
 									                    </FormItem>
 							                    		<FormItem className="half-item"
 								                            {...formItemLayout}
 								                            label="特批立项" >  
-								                            <span>{getApprovedState(this.state.approval)}</span>
+								                            <Select placeholder="请选择客户所属类型"
+									                            style={{ width:'240px'}}
+									                            value={this.state.approval}
+									                            onChange={(e)=>{this.setState({approval:e})}}>
+									                            {
+								                                    tepi.map(function (item) {
+								                                        return <Select.Option key={item.value} >{item.key}</Select.Option>
+								                                    })
+								                                }
+									                     </Select>
+							                    		</FormItem>
+									                    <FormItem className="half-item"
+								                            {...formItemLayout}
+								                            label="合同签订时间" >   
+								                            <DatePicker
+								                              style={{marginTop:"2px",width: '240px',height:"32px" }}
+														      showTime
+														      format="YYYY-MM-DD"
+														      placeholder="合同签订时间"
+														      value={this.state.signDate}
+														      onChange={(e,time)=>{this.selTime(e,time)}}
+														    />
+														    <span className="mandatory">*</span>
 							                    		</FormItem>
-							                    		<FormItem className="half-item"
-									                            {...formItemLayout}
-									                            label="合同编号" >                             
-								                                    <Input placeholder="请输入合同编号" value={this.state.contractNo}
-								                                    	onChange={(e)=>{this.setState({contractNo:e.target.value})}} style={{width:'240px'}} />
-									                    </FormItem>
 							                    		<div className='clearfix'>
 												            <FormItem
 												                labelCol={{ span: 4 }}
@@ -1427,8 +1654,26 @@ const NewService = Form.create()(React.createClass({
 							                    		</FormItem>
 							                    	</div>
 					                    		<div>
+								                	<span style={{marginLeft:'50px',fontSize:'20px'}}>催款节点</span>
+								                	{this.state.processStatus==0?<Button type='primary' onClick={this.addcontact} style={{float:'right',marginRight:'50px',marginBottom:'15px'}}>添加催款节点</Button>:""}
+								                </div>
+								                <div className="clearfix">
+								    			  <Spin spinning={this.state.loading}>
+								    			        <Form layout="horizontal" id="demand-form"  >
+													      	<Table 
+											            	 pagination={false}
+											            	 columns={this.state.ContactsLists} 
+											            	 dataSource={this.state.contactList}
+											            	 />
+									            	        <Col span={24} offset={9} style={{marginTop:'15px'}}>
+												                 
+												            </Col>
+										            	</Form> 
+												   </Spin> 
+												</div>
+									            <div>
 								                	<span style={{marginLeft:'50px',fontSize:'20px'}}>项目业务</span>
-								                	<Button type='primary' onClick={this.addDetailed} style={{float:'right',marginRight:'50px',marginBottom:'15px'}}>添加明细</Button>
+								                	{this.state.processStatus==0?<Button type='primary' onClick={this.addDetailed} style={{float:'right',marginRight:'50px',marginBottom:'15px'}}>添加项目明细</Button>:""}
 								                </div>
 								                <div className="patent-table">
 								                    <Spin spinning={this.state.loading}>
@@ -1439,11 +1684,12 @@ const NewService = Form.create()(React.createClass({
 								                            />
 								                    </Spin>
 									            </div>
+									            {this.state.processStatus==0?
 									            <div className='addSave' style={{marginTop:'15px'}}>
-								                   <Button className="cancel" type="primary" onClick={this.handleCancel} style={{marginLeft:"200px"}} htmlType="submit">签单</Button>
-								                   <Button className="cancel" type="primary" onClick={this.handleCancel} style={{marginLeft:"50px"}} htmlType="submit">保存</Button>
+								                   <Button className="cancel" type="primary" onClick={this.handleCancels} style={{marginLeft:"200px"}} htmlType="submit">签单</Button>
+								                   <Button className="cancel" type="primary" onClick={this.handleCancelq} style={{marginLeft:"50px"}} htmlType="submit">保存</Button>
 					                               <Button className="cancel" type="ghost" onClick={this.handleCancel} style={{marginLeft:"50px"}}>取消</Button>
-				                            	</div>
+				                            	</div>:""}
 					                        </div>}
 				                    </div>
 			                </Spin>
@@ -1452,7 +1698,7 @@ const NewService = Form.create()(React.createClass({
 			        <Modal maskClosable={false} visible={this.state.addnextVisible}
                         onOk={this.nextCancel} onCancel={this.nextCancel}
                         width='800px'
-                        title={this.state.addState?'添加服务':'服务详情'}                     
+                        title={this.state.addState?'添加项目任务':'项目任务详情'}                     
                         footer=''
                         className="admin-desc-content">
 			            <Form layout="horizontal" onSubmit={this.nextSubmit} id="demand-form">
@@ -1478,18 +1724,7 @@ const NewService = Form.create()(React.createClass({
 										      </AutoComplete> 
 										      <span className="mandatory">*</span>
 					                    </FormItem>
-					                    <FormItem className="half-item"
-					                            {...formItemLayout}
-					                            label="市场价格(万元)" >   
-				                                <span>{this.state.commodityPrice}</span>    
-					                    </FormItem>
-					                    <FormItem className="half-item"
-					                            {...formItemLayout}
-					                            label="实签价格(万元)" >   
-				                                    <Input placeholder="请输入实签价格" value={this.state.discountPrice} style={{width:'200px'}}
-				                                    onChange={(e)=>{this.setState({discountPrice:e.target.value})}} ref="discountPrice"/>
-				                                <span className="mandatory">*</span>    
-					                    </FormItem>
+					                     
 					                    <FormItem className="half-item"
 					                            {...formItemLayout}
 					                            label="服务数量" >   
@@ -1499,23 +1734,33 @@ const NewService = Form.create()(React.createClass({
 					                    </FormItem>
 					                    <FormItem className="half-item"
 					                            {...formItemLayout}
-					                            label="市场首付金额(万元)" >   
-				                                <span>{this.state.commodityFirstPayment}</span>    
-					                    </FormItem>
-					                    <FormItem className="half-item"
-					                            {...formItemLayout}
-					                            label="签单首付金额(万元)" >   
-				                                    <Input placeholder="请输入签单首付金额" value={this.state.discountFirstPayment} style={{width:'200px'}}
-				                                    onChange={(e)=>{this.setState({discountFirstPayment:e.target.value})}} ref='discountFirstPayment'/>
+					                            label="实签价格(万元)" >   
+				                                    <Input placeholder="请输入实签价格" value={this.state.commodityPrice} style={{width:'200px'}}
+				                                    onChange={(e)=>{this.setState({commodityPrice:e.target.value})}} ref="commodityPrice"/>
 				                                <span className="mandatory">*</span>    
 					                    </FormItem>
+					                    <FormItem className="half-item"
+				                            {...formItemLayout}
+				                            label="主要业务" >  
+				                            <Select placeholder="选择是否为主要业务"
+					                            style={{ width:'200px'}}
+					                            value={this.state.main}
+					                            onChange={(e)=>{this.setState({main:e})}}>
+					                            {
+				                                    boutique.map(function (item) {
+				                                        return <Select.Option key={item.value} >{item.key}</Select.Option>
+				                                    })
+				                                }
+					                    	 </Select>
+					                    	 <span className="mandatory">*</span>   
+			                    		</FormItem>
 					                    <div className='clearfix'>
 						                    <FormItem 
 						                            labelCol={{ span: 4 }}
 										            wrapperCol={{ span: 16 }}
 						                            label="服务说明" >   
-					                                    <Input type='textarea' placeholder="请输入服务说明" value={this.state.remarks} 
-					                                    onChange={(e)=>{this.setState({remarks:e.target.value})}} />
+					                                    <Input type='textarea' placeholder="请输入服务说明" value={this.state.taskComment} 
+					                                    onChange={(e)=>{this.setState({taskComment:e.target.value})}} />
 						                    </FormItem>
 					                    </div>
 					                    <FormItem wrapperCol={{ span: 12, offset: 4 }} className="half-middle">
@@ -1526,50 +1771,51 @@ const NewService = Form.create()(React.createClass({
 				                    <div className='clearfix'>
 				                    	<FormItem className="half-item"
 					                            {...formItemLayout}
-					                            label="服务名称" >
-				                    			<span>{editFws.commodityName}</span>
+					                            label="项目名称" >
+				                    			<span>{this.state.commodityName}</span>
 				                    	</FormItem>
 				                    	<FormItem className="half-item"
 					                            {...formItemLayout}
-					                            label="市场价格" >
-				                    			<span>{editFws.commodityPrice+'万元'}</span>
+					                            label="项目数量" >
+				                    			<Input placeholder="请输入数量" value={this.state.commodityQuantity} style={{width:'200px'}}
+				                                    onChange={(e)=>{this.setState({commodityQuantity:e.target.value})}} />
+				                                <span className="mandatory">*</span>  
 				                    	</FormItem>
 				                    	<FormItem className="half-item"
 					                            {...formItemLayout}
-					                            label="市场首付金额" >   
-				                                <span>{editFws.commodityFirstPayment+'万元'}</span>    
-					                    </FormItem>
-				                    	<FormItem className="half-item"
-					                            {...formItemLayout}
-					                            label="实签价格(万元)" >
-				                    			<Input placeholder="请输入签单首付金额" value={this.state.discountPrice} style={{width:'200px'}}
-				                                    onChange={(e)=>{this.setState({discountPrice:e.target.value})}} />
+					                            label="金额(万元)" >
+				                    			<Input placeholder="请输入签单金额" value={this.state.commodityPrice} style={{width:'200px'}}
+				                                    onChange={(e)=>{this.setState({commodityPrice:e.target.value})}} />
 				                                <span className="mandatory">*</span>      
 				                    	</FormItem>
-				                    	<FormItem className="half-item"
-					                            {...formItemLayout}
-					                            label="服务数量" >
-				                    			<span>{editFws.commodityQuantity}</span>
-				                    	</FormItem>
 					                    <FormItem className="half-item"
-					                            {...formItemLayout}
-					                            label="签单首付金额(万元)" >  
-					                            <Input placeholder="请输入签单首付金额" value={this.state.discountFirstPayment} style={{width:'200px'}}
-				                                    onChange={(e)=>{this.setState({discountFirstPayment:e.target.value})}}  />
-				                                <span className="mandatory">*</span>     
-					                    </FormItem>
+				                            {...formItemLayout}
+				                            label="主要项目" >  
+				                            <Select placeholder="选择是否为主要业务"
+					                            style={{ width:'200px'}}
+					                            value={this.state.main}
+					                            onChange={(e)=>{this.setState({main:e})}}>
+					                            {
+				                                    boutique.map(function (item) {
+				                                        return <Select.Option key={item.value} >{item.key}</Select.Option>
+				                                    })
+				                                }
+					                     	</Select>
+					                     	<span className="mandatory">*</span>   
+			                    		</FormItem>
 					                    <div className='clearfix'>
 					                    	<FormItem 
 						                            labelCol={{ span: 4 }}
 										            wrapperCol={{ span: 16 }}
 						                            label="服务说明" >
-					                    			<span>{editFws.remarks}</span>
+					                    			 <Input type='textarea' placeholder="请输入服务说明" value={this.state.taskComment} 
+					                                    onChange={(e)=>{this.setState({taskComment:e.target.value})}} />
 					                    	</FormItem>
 				                    	</div>
-				                    	{this.state.active.applySign&&<FormItem wrapperCol={{ span: 12, offset: 4 }} className="half-middle">
+				                    	<FormItem wrapperCol={{ span: 12, offset: 4 }} className="half-middle">
 					                        <Button className="submitSave" type="primary" onClick={this.tabRowSave}>保存</Button>  
 					                        <Button className="submitSave" type="ghost" onClick={this.nextCancel}>取消</Button>
-					                    </FormItem>}
+					                    </FormItem>
 				                    </div>}
 			                </Spin>
 			            </Form >

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

@@ -372,65 +372,11 @@ const MyService=Form.create()(React.createClass({
 		                        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 }); }} />    
-		                <Select placeholder="特批筛选"
-                            style={{ width: 150 ,marginLeft:'10px'}}
-                            value={this.state.approval}
-                            onChange={(e) => { this.setState({ approval: e }) }}>
-                            {
-                                specially.map(function (item) {
-                                        return <Select.Option key={item.value} >{item.key}</Select.Option>
-                                })
-                            }
-                        </Select>
+		               
                         <Button type="primary" onClick={this.search} style={{marginLeft:'10px'}}>搜索<Icon type="search" /></Button>
 	                    <Button onClick={this.reset}>重置 <Icon type="reload" /></Button>
-	                    <span style={{marginLeft:'10px',marginRight:'20px'}}>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>    
 	                    <Button type="primary" className="addButton" onClick={this.addClick} >开单<Icon type="plus" /></Button>
 	                </div>
-	                <div className='clearfix' style={{marginTop:'5px'}}>
-	                  <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>   
-	                  		<Select placeholder="订单状态"
-	                            style={{ width: 150 ,marginRight:'10px',marginBottom:'10px'}}
-	                            value={this.state.orderStatusSearch}
-	                            onChange={(e) => { this.setState({ orderStatusSearch: e }) }}>
-	                            {
-                                    orderState.map(function (item) {
-                                            return <Select.Option key={item.value} >{item.key}</Select.Option>
-                                    })
-                                }
-	                        </Select>
-	                        <Select placeholder="结算状态"
-	                            style={{ width: 150 ,marginRight:'10px'}}
-	                            value={this.state.settlementState}
-	                            onChange={(e) => { this.setState({ settlementState: e }) }}>
-	                            {
-                                    paymentState.map(function (item) {
-                                            return <Select.Option key={item.value} >{item.key}</Select.Option>
-                                    })
-                                }
-	                        </Select>
-	                        <Select placeholder="项目进度"
-	                            style={{ width: 150 ,marginRight:'10px'}}
-	                            value={this.state.projectProgress}
-	                            onChange={(e) => { this.setState({ projectProgress: e }) }}>
-	                            {
-                                    projectState.map(function (item) {
-                                            return <Select.Option key={item.value} >{item.key}</Select.Option>
-                                    })
-                                }
-	                        </Select>
-	                        <Select placeholder="订单渠道"
-	                            style={{ width: 150 }}
-	                            value={this.state.orderChannelSearch}
-	                            onChange={(e) => { this.setState({ orderChannelSearch: e }) }}>
-	                            {
-                                    orderChannel.map(function (item) {
-                                            return <Select.Option key={item.value} >{item.key}</Select.Option>
-                                    })
-                                }
-	                        </Select>
-	                    </div>
-	                </div>
 	                <div className="patent-table">
 	                    <Spin spinning={this.state.loading}>
 	                        <Table columns={this.state.columns}

+ 300 - 17
js/component/manageCenter/order/orderNew/examine.jsx

@@ -1,11 +1,11 @@
 import React from 'react';
-import { Radio, Icon, Button, AutoComplete,Cascader,Input, Select, Spin, Popconfirm, Table, Switch, message,Calendar , DatePicker, Upload, Form ,Modal,Tabs,Card } from 'antd';
+import { Radio, Icon, Button, AutoComplete,Cascader,Input, Select, Spin, Popconfirm, Table, Switch, message,Calendar , DatePicker, Upload, Form ,Modal,Tabs,Card ,Col} from 'antd';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import Jquery from 'jquery/dist/jquery.js';
 import moment from 'moment';
-import { } from '@/dataDic.js';
-import { getLiquidationStatus,getApprovedState,getProcessStatus} from '@/tools.js';
+import {boutique } from '@/dataDic.js';
+import { getLiquidationStatus,getApprovedState,getProcessStatus,splitUrl,getjiedian,getboutique} from '@/tools.js';
 import './customer.less';
 const TabPane = Tabs.TabPane;
 const Dragger = Upload.Dragger;
@@ -88,7 +88,7 @@ const IntentionCustomer = Form.create()(React.createClass({
 			data: {
 				pageNo: pageNo || 1,
 				pageSize: this.state.pagination.pageSize,
-				processStatus: 1,//审核列表
+				specially: 1,//审核列表
 				name: this.state.name,//名称
 				orderNo: this.state.orderNo,//订单编号
 				starTime: this.state.releaseDate[0],//开始时间
@@ -208,6 +208,67 @@ const IntentionCustomer = Form.create()(React.createClass({
 			],
 			data: [],
 			dataSource: [],
+			columnsX: [
+				{
+                    title: '业务项目名称',
+                    dataIndex: 'commodityName',
+                    key: 'commodityName'
+                }, {
+                    title: '项目类别',
+                    dataIndex: 'cname',
+                    key: 'cname',
+                    
+                },{
+                    title: '项目数量',
+                    dataIndex: 'commodityQuantity',
+                    key: 'commodityQuantity'
+                }, {
+                    title: '金额(万元)',
+                    dataIndex: 'commodityPrice',
+                    key: 'commodityPrice'
+                }, {
+                    title: '负责人',
+                    dataIndex: 'contacts',
+                    key: 'contacts'
+                }, {
+                    title: '负责人电话',
+                    dataIndex: 'contactsMobile',
+                    key: 'contactsMobile'
+                }, {
+                    title: '主要项目',
+                    dataIndex: 'main',
+                    key: 'main',
+                    render:(text)=>{
+                    	return (text?'是':'否')
+                    }
+                }, {
+                    title: '项目说明',
+                    dataIndex: 'taskComment',
+                    key: 'taskComment',
+					render:(text)=>{
+						return (text&&text.length>8?text.substr(0,8)+'…':text)
+					}
+                }
+			],
+			dataSourceX: [],
+			ContactsLists: [{
+					title: '催款科目',
+					dataIndex: 'dunSubject',
+					key: 'dunSubject',
+					render: text=>{return getjiedian(text)}
+				},{
+					title: '金额(万)',
+					dataIndex: 'money',
+					key: 'money',
+				}, {
+					title: '催款状态',
+					dataIndex: 'dunStatus',
+					key: 'dunStatus',
+					render: (text) => {
+						return text?'已完成':'催款中'
+					}
+				},
+			],
 		}
 	},
 	//页面加载函数
@@ -223,6 +284,28 @@ const IntentionCustomer = Form.create()(React.createClass({
 		this.xiangmu(record.orderNo);
 		this.jiedian(record.orderNo);
 	},	
+	//点击打卡项目详情
+	tableRowClickX(record, index) {
+		console.log(record);
+        this.setState({
+        	jid:record.id,//项目ID
+        	kid:record.commodityId,//商品ID
+        	commodityName:record.commodityName,//金额
+        	commodityPrice:record.commodityPrice,//金额
+        	commodityQuantity:record.commodityQuantity,//数量
+        	taskComment:record.taskComment,//备注
+        	main:record.main.toString(),//是否为主要
+        	addnextVisible:true,
+        	addState:0,
+        });
+    },
+    //项目详情关闭
+    nextCancel() {
+		this.setState({
+			addnextVisible: false
+		})
+	},
+    //订单详情
 	xiangqing(orderNos) {
 		$.ajax({
 			method: "get",
@@ -272,6 +355,7 @@ const IntentionCustomer = Form.create()(React.createClass({
 			});
 		}.bind(this));
 	},
+	//项目列表
 	xiangmu(orderNos) {
 		$.ajax({
 			method: "get",
@@ -289,12 +373,28 @@ const IntentionCustomer = Form.create()(React.createClass({
 						message.warning(data.error[0].message);
 					};
 				} else {
-					let thisdata=data.data;
-					this.setState({
-						 
-					})
+					for (let i = 0; i < data.data.length; i++) {
+                        let thisdata = data.data[i];
+                        theArr.push({
+                             key: i,
+                             id:thisdata.id,
+                             orderNo:thisdata.orderNo,//订单编号
+                              commodityId:thisdata.commodityId,//项目ID
+                             commodityName:thisdata.commodityName,//项目名称
+                             cname:thisdata.cname,//项目类别
+                             commodityPrice:thisdata.commodityPrice,//项目价格
+                             commodityQuantity:thisdata.commodityQuantity,//项目数量
+                             main:thisdata.main,//是否为主要任务
+                             taskComment:thisdata.taskComment,//任务说明
+                             contacts:thisdata.contacts,//联系人
+                             contactsMobile:thisdata.contactsMobile,//联系人电话
+                        });
+                    };
 				};
-				
+				this.setState({
+                    dataSourceX: theArr,
+                    pagination: false,
+                });
 			}.bind(this),
 		}).always(function() {
 			this.setState({
@@ -302,6 +402,7 @@ const IntentionCustomer = Form.create()(React.createClass({
 			});
 		}.bind(this));
 	},
+	//节点列表
 	jiedian(orderNos) {
 		$.ajax({
 			method: "get",
@@ -313,16 +414,89 @@ const IntentionCustomer = Form.create()(React.createClass({
 			},
 			success: function(data) {
 				let theArr = [];
+				let thisData=[];
+				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.length; i++) {
+                		thisData= data.data[i];  
+	                	theArr.push({
+	                		key:i,
+	                		dunSubject:thisData.dunSubject?thisData.dunSubject.toString():"",//催款科目
+	                		id:thisData.id,//节点Id
+	                		money:thisData.money,//催款金额
+	                		dunStatus:thisData.dunStatus,//催款状态
+	                	})
+                	}
+                	this.setState({
+                		contactList:theArr
+                	})
+				};
 				
+			}.bind(this),
+		}).always(function() {
+			this.setState({
+				loading: false
+			});
+		}.bind(this));
+	},
+	//审核通过
+	examOk(){
+		$.ajax({
+			method: "post",
+			dataType: "json",
+			crossDomain: false,
+			url: globalConfig.context +"/open/api/admin/newOrder/auditOrderNew",
+			data: {
+				orderNo:this.state.orderNo,
+				orderStatus:2,
+			},
+			success: function(data) {
 				if(data.error.length || data.data.list == "") {
 					if(data.error && data.error.length) {
 						message.warning(data.error[0].message);
 					};
 				} else {
-					let thisdata=data.data;
+					message.warning("该订单已通过审核~");
 					this.setState({
-						 
-					})
+						visible:false,
+					});
+					this.loadData();
+				};
+				
+			}.bind(this),
+		}).always(function() {
+			this.setState({
+				loading: false
+			});
+		}.bind(this));
+	},
+	//审核通过
+	examOks(){
+		$.ajax({
+			method: "post",
+			dataType: "json",
+			crossDomain: false,
+			url: globalConfig.context +"/open/api/admin/newOrder/auditOrderNew",
+			data: {
+				orderNo:this.state.orderNo,
+				orderStatus:3,
+				reason:this.state.reason,
+			},
+			success: function(data) {
+				if(data.error.length || data.data.list == "") {
+					if(data.error && data.error.length) {
+						message.warning(data.error[0].message);
+					};
+				} else {
+					message.warning("该订单已被拒绝~");
+					this.setState({
+						visible:false,
+						noVisible:false
+					});
+					this.loadData();
 				};
 				
 			}.bind(this),
@@ -332,6 +506,25 @@ const IntentionCustomer = Form.create()(React.createClass({
 			});
 		}.bind(this));
 	},
+	//点击拒绝
+	examNo(){
+		this.setState({
+			noVisible:true
+		})
+	},
+	//关闭输入理由框
+	noCancel(){
+		this.setState({
+			noVisible:false
+		})
+	},
+	//搜索
+	search() {
+    	this.setState({
+    		//signBillVisible:false
+    	})
+        this.loadData();
+    },
 	getOrgCodeUrl(e) {
         this.setState({ orgCodeUrl: e });
     },
@@ -531,8 +724,36 @@ const IntentionCustomer = Form.create()(React.createClass({
 			                    		</FormItem>
 			                    	</div>
 			                    	<div>
-					                	<span style={{marginLeft:'50px',fontSize:'20px'}}>项目业务</span>
-					                </div>
+								                	<span style={{marginLeft:'50px',fontSize:'20px'}}>催款节点</span>
+								                	{this.state.processStatus==0?<Button type='primary' onClick={this.addcontact} style={{float:'right',marginRight:'50px',marginBottom:'15px'}}>添加催款节点</Button>:""}
+								                </div>
+								                <div className="clearfix">
+								    			  <Spin spinning={this.state.loading}>
+								    			        <Form layout="horizontal" id="demand-form"  >
+													      	<Table 
+											            	 pagination={false}
+											            	 columns={this.state.ContactsLists} 
+											            	 dataSource={this.state.contactList}
+											            	 />
+									            	        <Col span={24} offset={9} style={{marginTop:'15px'}}>
+												                 
+												            </Col>
+										            	</Form> 
+												   </Spin> 
+												</div>
+									            <div>
+								                	<span style={{marginLeft:'50px',fontSize:'20px'}}>项目业务</span>
+								                	{this.state.processStatus==0?<Button type='primary' onClick={this.addDetailed} style={{float:'right',marginRight:'50px',marginBottom:'15px'}}>添加项目明细</Button>:""}
+								                </div>
+								                <div className="patent-table">
+								                    <Spin spinning={this.state.loading}>
+								                        <Table columns={this.state.columnsX}
+								                            dataSource={this.state.dataSourceX}
+								                            pagination={this.state.pagination}
+								                            onRowClick={this.tableRowClickX} 
+								                            />
+								                    </Spin>
+									            </div>
 					                <div className='addSave' style={{marginTop:'15px'}}>
 					                   <Button className="cancel" type="primary" onClick={this.examOk} style={{marginLeft:"200px"}} htmlType="submit">通过</Button>
 					                   <Button className="cancel" type="primary" onClick={this.examNo} style={{marginLeft:"50px"}} htmlType="submit">拒绝</Button>
@@ -542,10 +763,72 @@ const IntentionCustomer = Form.create()(React.createClass({
 				            </Spin>
 				        </Form>
 			        </Modal>
+			        <Modal maskClosable={false} visible={this.state.addnextVisible}
+                        onOk={this.nextCancel} onCancel={this.nextCancel}
+                        width='800px'
+                        title={'项目任务详情'}                     
+                        footer=''
+                        className="admin-desc-content">
+			            <Form layout="horizontal"  id="demand-form">
+			                <Spin spinning={this.state.loading}>
+				                    <div className='clearfix'>
+				                    	<FormItem className="half-item"
+					                            {...formItemLayout}
+					                            label="项目名称" >
+				                    			<span>{this.state.commodityName}</span>
+				                    	</FormItem>
+				                    	<FormItem className="half-item"
+					                            {...formItemLayout}
+					                            label="项目数量" >
+				                    			<span>{this.state.commodityQuantity}</span>
+				                    	</FormItem>
+				                    	<FormItem className="half-item"
+					                            {...formItemLayout}
+					                            label="金额(万元)" >
+				                    			<span>{this.state.commodityPrice}</span>
+				                    	</FormItem>
+					                    <FormItem className="half-item"
+				                            {...formItemLayout}
+				                            label="主要项目" >  
+				                            <span>{getboutique(this.state.main)}</span>
+			                    		</FormItem>
+					                    <div className='clearfix'>
+					                    	<FormItem 
+					                            labelCol={{ span: 4 }}
+									            wrapperCol={{ span: 16 }}
+					                            label="服务说明" >
+				                    			<span>{this.state.taskComment}</span>
+					                    	</FormItem>
+				                    	</div>
+				                    </div>	
+			                </Spin>
+			            </Form >
+			        </Modal>
+			         <Modal maskClosable={false} visible={this.state.noVisible}
+                        onOk={this.noCancel} onCancel={this.noCancel}
+                        width='400px'
+                        title={'拒绝理由'}                     
+                        footer=''
+                        className="admin-desc-content">
+			            <Form layout="horizontal"  id="demand-form">
+			                <Spin spinning={this.state.loading}>
+				                    <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} style={{marginLeft:"50px"}} htmlType="submit">确定</Button>
+			                               <Button className="cancel" type="ghost" onClick={this.noCancel} style={{marginLeft:"50px"}}>取消</Button>
+	                            	</div>
+			                </Spin>
+			            </Form >
+			        </Modal>
                	</div>  
-               	
-               	
-               	
             </div>
 			);
 	}

+ 16 - 2
js/component/tools.js

@@ -81,8 +81,9 @@ import {
     newOrderStatus,refundStatus,approval,projectStatus,processStatus,liquidationStatus,newOrderType,paymentType
     ,jsyPaymentType,
     customerType,
-    orderTypes
-    ,bonusState
+    orderTypes,
+    bonusState,
+    jiedian
 } from './dataDic.js';
 
 import { provinceList} from './NewDicProvinceList.js';
@@ -1625,4 +1626,17 @@ module.exports = {
             return theType;
         }
     },
+     //技术员发款类型  
+	getjiedian:function(e){
+        if (e||e==0) {
+            let str=e.toString()
+         let theType = '';
+         jiedian.map(function (item) {
+                if (item.value == str) {
+                    theType = item.key;
+                };
+            });
+            return theType;
+        }
+    },
 }

+ 2 - 2
webpack.config.js

@@ -304,7 +304,7 @@ module.exports = (function () {
     }
 
     //let staticHost = 'http://afts.hnzhiming.com';
-    let staticHost = 'http://192.168.0.188';
+    let staticHost = 'http://192.168.0.190';
     switch (argv.env.deploy) {
         case 'test':
             staticHost = 'http://static.jishutao.com';
@@ -343,7 +343,7 @@ module.exports = (function () {
         // }
         devServer: {
             disableHostCheck: true,
-            host: '192.168.0.188',
+            host: '192.168.0.190',
             port: 80,
             allowedHosts: ['127.0.0.1','192.168.0.20','192.168.0.99'],
             headers: {