|
@@ -174,9 +174,6 @@ const NewService = Form.create()(React.createClass({
|
|
|
title: '平台流水号',
|
|
|
dataIndex: 'billNo',
|
|
|
key: 'billNo',
|
|
|
- render:(text)=>{
|
|
|
- return text&&text.substr(0,9)+'…'
|
|
|
- }
|
|
|
}, {
|
|
|
title: '平台流水时间',
|
|
|
dataIndex: 'createTime',
|
|
@@ -296,7 +293,6 @@ const NewService = Form.create()(React.createClass({
|
|
|
},
|
|
|
//查看基本详情基本信息
|
|
|
loaduser(record){
|
|
|
- if(record){
|
|
|
this.state.orderList=[]
|
|
|
$.ajax({
|
|
|
method: "get",
|
|
@@ -304,7 +300,7 @@ const NewService = Form.create()(React.createClass({
|
|
|
crossDomain: false,
|
|
|
url: globalConfig.context + '/api/admin/order/getServiceOrderDetail',
|
|
|
data: {
|
|
|
- orderNo: record.orderNo
|
|
|
+ orderNo:record?record.orderNo:this.props.datauser.orderNo
|
|
|
},
|
|
|
success: function (data) {
|
|
|
let thisData = data.data;
|
|
@@ -334,7 +330,6 @@ const NewService = Form.create()(React.createClass({
|
|
|
loading: false
|
|
|
});
|
|
|
}.bind(this));
|
|
|
- }
|
|
|
},
|
|
|
handleOk(e) {
|
|
|
this.setState({
|
|
@@ -367,15 +362,17 @@ const NewService = Form.create()(React.createClass({
|
|
|
this.setState({
|
|
|
loading: false,
|
|
|
});
|
|
|
+ this.loaduser()
|
|
|
+ this.loadData();
|
|
|
} else {
|
|
|
message.warning(data.error[0].message);
|
|
|
};
|
|
|
- this.loadData();
|
|
|
}.bind(this));
|
|
|
},
|
|
|
//添加明细
|
|
|
addDetailed(){
|
|
|
this.setState({
|
|
|
+ gid:'',
|
|
|
customerArr:[],
|
|
|
commodityName:'',
|
|
|
commodityId:'',
|
|
@@ -505,24 +502,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 +529,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 +550,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 +589,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,//商品规格
|
|
@@ -852,9 +836,9 @@ const NewService = Form.create()(React.createClass({
|
|
|
const orderDetaiel=this.state.orderList || []
|
|
|
const dataSources=this.state.customerArr || [];
|
|
|
const options = this.state.states?dataSources.map((group,index) =>
|
|
|
- <Option key={index} value={group.name}>{group.name}</Option>
|
|
|
+ <Select.Option key={index} value={group.name}>{group.name}</Select.Option>
|
|
|
):dataSources.map((group,index) =>
|
|
|
- <Option key={group.id} value={group.bname}>{group.bname}</Option>
|
|
|
+ <Select.Option key={group.id} value={group.bname}>{group.bname}</Select.Option>
|
|
|
)
|
|
|
|
|
|
return(
|
|
@@ -1113,10 +1097,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 +1132,6 @@ const NewService = Form.create()(React.createClass({
|
|
|
value={this.state.commodityName}
|
|
|
onChange={this.httpChange}
|
|
|
filterOption={true}
|
|
|
- onBlur={this.blurState}
|
|
|
onSelect={this.selectAuto}
|
|
|
>
|
|
|
<Input/>
|
|
@@ -1158,9 +1141,7 @@ const NewService = Form.create()(React.createClass({
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="市场价格" >
|
|
|
- <Input placeholder="输入市场价格" value={this.state.commodityPrice} style={{width:'200px'}}
|
|
|
- onChange={(e)=>{this.setState({commodityPrice:e.target.value})}} ref='commodityPrice'/>
|
|
|
- <span className="mandatory">*</span>
|
|
|
+ <span>{this.state.commodityPrice}</span>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
@@ -1179,9 +1160,7 @@ const NewService = Form.create()(React.createClass({
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="市场首付金额" >
|
|
|
- <Input placeholder="请输入市场首付金额" value={this.state.commodityFirstPayment} style={{width:'200px'}}
|
|
|
- onChange={(e)=>{this.setState({commodityFirstPayment:e.target.value})}} ref='commodityFirstPayment'/>
|
|
|
- <span className="mandatory">*</span>
|
|
|
+ <span>{this.state.commodityFirstPayment}</span>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
@@ -1190,12 +1169,6 @@ const NewService = Form.create()(React.createClass({
|
|
|
onChange={(e)=>{this.setState({discountFirstPayment:e.target.value})}} ref='discountFirstPayment'/>
|
|
|
<span className="mandatory">*</span>
|
|
|
</FormItem>
|
|
|
- <FormItem className="half-item"
|
|
|
- {...formItemLayout}
|
|
|
- label="商品规格" >
|
|
|
- <Input placeholder="请输入实签价格" value={this.state.commodityMode} style={{width:'200px'}}
|
|
|
- onChange={(e)=>{this.setState({commodityMode:e.target.value})}} />
|
|
|
- </FormItem>
|
|
|
<div className='clearfix'>
|
|
|
<FormItem
|
|
|
labelCol={{ span: 4 }}
|
|
@@ -1231,11 +1204,6 @@ const NewService = Form.create()(React.createClass({
|
|
|
label="服务数量" >
|
|
|
<span>{editFws.commodityQuantity}</span>
|
|
|
</FormItem>
|
|
|
- <FormItem className="half-item"
|
|
|
- {...formItemLayout}
|
|
|
- label="商品规格" >
|
|
|
- <span>{editFws.commodityMode}</span>
|
|
|
- </FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="市场首付金额" >
|
|
@@ -1363,7 +1331,7 @@ const NewService = Form.create()(React.createClass({
|
|
|
</Modal>
|
|
|
<Modal maskClosable={false} visible={this.state.lookVisible}
|
|
|
onOk={this.lookCancel} onCancel={this.lookCancel}
|
|
|
- width='1000px'
|
|
|
+ width='1300px'
|
|
|
title= '查看流水'
|
|
|
footer=''
|
|
|
className="admin-desc-content">
|