liting2017 7 年之前
父节点
当前提交
c8ea4c8fd6

+ 8 - 94
js/component/manageCenter/order/departmentOrder/servicesOrder/addService.jsx

@@ -507,69 +507,26 @@ const NewService = Form.create()(React.createClass({
 		})
 		this.setState({
 			commodityName:value,
+			gid:kid.id,
 			commodityPrice:kid.price==0?kid.price.toString():kid.price,
 			commodityFirstPayment:kid.firstPayment==0?kid.firstPayment.toString():kid.firstPayment
 		})
 	},
-	blurState(value){
-		let kid;
-		let fwList=this.state.customerArr;
-		fwList.map(function(item){
-			if(value==item.bname){
-				kid=item.id
-			}else{
-				kid=''
-			}
-		})
-		this.setState({
-			kid:kid,
-		})
-	},
-	//客户
-	selectAutoCUT(value,options){
-		this.setState({
-			customerName:value,
-		})
-	},
-	blurCutor(value){
-		let autoIds;
-		let fwList=this.state.customerArr;
-		fwList.map(function(item){
-			if(value==item.name){
-				autoIds=item.id
-			}else{
-				autoIds=''
-			}
-		})
-		this.setState({
-			autoId:autoIds
-		})
-	},
 	//服务值改变时请求客户名称
 	httpChange(e){
+		this.state.gid='';
 		if(e.length>=1){
 			this.supervisor(e,false); 
 		}	
 		this.setState({
-			kid:'',
 			commodityName:e
 		})
 	},
-	//客户名称自动补全
-	customerChange(e){
-		if(e.length>=1){
-			this.supervisor(e,true); 
-		}	
-		this.setState({
-			autoId:'',
-			customerName:e
-		})
-	},
 	//新建明细保存
 	nextSubmit(e) {
 		e.preventDefault();
-		if(this.state.kid==undefined||!this.state.kid){
-			message.warning('商品名称不匹配!');
+		if(this.state.gid==undefined||!this.state.gid){
+			message.warning('服务名称不匹配!');
 			return false;
 		};
 		if(!this.state.commodityPrice){
@@ -607,7 +564,7 @@ const NewService = Form.create()(React.createClass({
 			crossDomain: false,
 			url: globalConfig.context +api ,
 			data: {
-				commodityId:this.state.kid,
+				commodityId:this.state.gid,
 				orderNo:this.props.datauser.orderNo,
 				commodityName:this.state.commodityName,//商品名称
 				commodityMode:this.state.commodityMode,//商品规格
@@ -819,50 +776,8 @@ const NewService = Form.create()(React.createClass({
 			            <Form layout="horizontal" onSubmit={this.handleSubmit} id="demand-form" style={{paddingBottom:'40px'}} >
 			                <Spin spinning={this.state.loading}>
 			                        <div className="clearfix">
-			                            {!this.props.userDetaile?
-			                            <div className="clearfix">
+			                            {!this.props.userDetaile?<div></div>:
 			                            	<div className="clearfix">
-						                    	<FormItem 
-							                            {...formItemLayout}
-							                            label="订单类型" > 
-							                            <Select placeholder="请选择订单类型"
-								                            style={{ width:'200px'}}
-								                            value={this.state.orderType}
-								                            onChange={(e) => { this.setState({ orderType: e }) }}>
-								                            {
-							                                    orderType.map(function (item) {
-							                                            return <Select.Option key={item.value} >{item.key}</Select.Option>
-							                                    })
-							                                }
-								                        </Select>
-							                    		<span className="mandatory">*</span>
-							                    </FormItem>
-							                </div>
-							                <div className="clearfix">
-							                    <FormItem 
-							                            {...formItemLayout}
-							                            label="客户名称" >                             
-						                                    <AutoComplete
-													        className="certain-category-search"
-													        dropdownClassName="certain-category-search-dropdown"
-													        dropdownMatchSelectWidth={false}
-													        dropdownStyle={{ width: 200 }}
-													        size="large"
-													        style={{ width: '200px' }}
-													        dataSource={options}
-													        placeholder="输入名称"
-													        value={this.state.customerName}
-													        onChange={this.customerChange}
-													        filterOption={true}
-													        onBlur={this.blurCutor}
-													        onSelect={this.selectAutoCUT}
-													      >
-													        <Input/>
-													      </AutoComplete> 
-													      <span className="mandatory">*</span>
-							                    </FormItem>
-							                </div>    
-						                </div>:<div className="clearfix">
 						                       		<FormItem className="half-item"
 							                            {...formItemLayout}
 							                            label="订单编号" >
@@ -1064,10 +979,10 @@ const NewService = Form.create()(React.createClass({
 													    <Button style={{marginRight:'10px',marginLeft:'200px'}} type="danger">作废</Button>                 
 													</Popconfirm>}
 													{this.props.datauser.active.applyLock&&<Popconfirm title={'请确认您是否锁定客户【'+this.props.datauser.buyerName+'】的服务订单,订单锁定将导致订单暂停!'} onConfirm={(e)=>{this.lockOrder()}} okText="确认" cancelText="取消">
-													    <Button style={{marginRight:'10px'}} type="danger">锁定</Button>                 
+													    <Button style={{marginRight:'10px',marginLeft:'200px'}} type="danger">锁定</Button>                 
 													</Popconfirm>}
 													{this.props.datauser.active.applyUnLock&&<Popconfirm title={'请确认您是否解锁客户【'+this.props.datauser.buyerName+'】的服务订单,订单解锁将导致订单正常!'} onConfirm={(e)=>{this.unlockOrder()}} okText="确认" cancelText="取消">
-													    <Button style={{marginRight:'10px'}} type="primary">解锁</Button>                 
+													    <Button style={{marginRight:'10px',marginLeft:'200px'}} type="primary">解锁</Button>                 
 													</Popconfirm>}	
 				                                </div>:''}
 				                                <Button className="cancel" type="ghost" onClick={this.handleCancel} style={{float:'right',marginRight:'200px'}}>返回</Button>
@@ -1099,7 +1014,6 @@ const NewService = Form.create()(React.createClass({
 										        value={this.state.commodityName}
 										        onChange={this.httpChange}
 										        filterOption={true}
-										        onBlur={this.blurState}
 										        onSelect={this.selectAuto}
 										      >
 										        <Input/>

+ 1 - 1
js/component/manageCenter/order/flowSettlement/billManage/myBill.jsx

@@ -276,7 +276,7 @@ const MyBill=Form.create()(React.createClass({
         return (
             <div className="user-content" >
                 <div className="content-title">
-                	<span style={{fontSize:'16px'}}>部门订单流水查询</span>	
+                	<span style={{fontSize:'16px'}}>结算流水管理</span>	
 	                <div className="user-search">
 	                    <Input placeholder="付款人名称" style={{width:'150px'}}
 	                        value={this.state.draweeName}

+ 8 - 21
js/component/manageCenter/order/myOrder/servicesOrder/addService.jsx

@@ -376,6 +376,7 @@ const NewService = Form.create()(React.createClass({
 	//添加明细
 	addDetailed(){
 		this.setState({
+			gid:'',
 			customerArr:[],
 			commodityName:'',
 			commodityId:'',
@@ -505,24 +506,11 @@ const NewService = Form.create()(React.createClass({
 		})
 		this.setState({
 			commodityName:value,
+			gid:kid.id,
 			commodityPrice:kid.price==0?kid.price.toString():kid.price,
 			commodityFirstPayment:kid.firstPayment==0?kid.firstPayment.toString():kid.firstPayment
 		})
 	},
-	blurState(value){
-		let kid;
-		let fwList=this.state.customerArr;
-		fwList.map(function(item){
-			if(value==item.bname){
-				kid=item.id
-			}else{
-				kid=''
-			}
-		})
-		this.setState({
-			kid:kid,
-		})
-	},
 	//客户
 	selectAutoCUT(value,options){
 		this.setState({
@@ -545,11 +533,11 @@ const NewService = Form.create()(React.createClass({
 	},
 	//服务值改变时请求客户名称
 	httpChange(e){
+		this.state.gid='';
 		if(e.length>=1){
 			this.supervisor(e,false); 
 		}	
 		this.setState({
-			kid:'',
 			commodityName:e
 		})
 	},
@@ -566,8 +554,8 @@ const NewService = Form.create()(React.createClass({
 	//新建明细保存
 	nextSubmit(e) {
 		e.preventDefault();
-		if(this.state.kid==undefined||!this.state.kid){
-			message.warning('商品名称不匹配!');
+		if(this.state.gid==undefined||!this.state.gid){
+			message.warning('服务名称不匹配!');
 			return false;
 		};
 		if(!this.state.commodityPrice){
@@ -605,7 +593,7 @@ const NewService = Form.create()(React.createClass({
 			crossDomain: false,
 			url: globalConfig.context +api ,
 			data: {
-				commodityId:this.state.kid,
+				commodityId:this.state.gid,
 				orderNo:this.props.datauser.orderNo,
 				commodityName:this.state.commodityName,//商品名称
 				commodityMode:this.state.commodityMode,//商品规格
@@ -1113,10 +1101,10 @@ const NewService = Form.create()(React.createClass({
 													    <Button style={{marginRight:'10px',marginLeft:'200px'}} type="danger">作废</Button>                 
 													</Popconfirm>}
 													{this.props.datauser.active.applyLock&&<Popconfirm title={'请确认您是否锁定客户【'+this.props.datauser.buyerName+'】的服务订单,订单锁定将导致订单暂停!'} onConfirm={(e)=>{this.lockOrder()}} okText="确认" cancelText="取消">
-													    <Button style={{marginRight:'10px'}} type="danger">锁定</Button>                 
+													    <Button style={{marginRight:'10px',marginLeft:'200px'}} type="danger">锁定</Button>                 
 													</Popconfirm>}
 													{this.props.datauser.active.applyUnLock&&<Popconfirm title={'请确认您是否解锁客户【'+this.props.datauser.buyerName+'】的服务订单,订单解锁将导致订单正常!'} onConfirm={(e)=>{this.unlockOrder()}} okText="确认" cancelText="取消">
-													    <Button style={{marginRight:'10px'}} type="primary">解锁</Button>                 
+													    <Button style={{marginRight:'10px',marginLeft:'200px'}} type="primary">解锁</Button>                 
 													</Popconfirm>}	
 				                                </div>:''}
 				                                <Button className="cancel" type="ghost" onClick={this.handleCancel} style={{float:'right',marginRight:'200px'}}>返回</Button>
@@ -1148,7 +1136,6 @@ const NewService = Form.create()(React.createClass({
 										        value={this.state.commodityName}
 										        onChange={this.httpChange}
 										        filterOption={true}
-										        onBlur={this.blurState}
 										        onSelect={this.selectAuto}
 										      >
 										        <Input/>