|
@@ -117,6 +117,9 @@ const NewService = Form.create()(React.createClass({
|
|
|
orgCodeUrl:[],
|
|
|
checkedKeys: [],
|
|
|
lookflowList:[],
|
|
|
+ active:{
|
|
|
+ applySign:false
|
|
|
+ },
|
|
|
editFw:[],
|
|
|
lookState:false,
|
|
|
signBillVisible:false,
|
|
@@ -393,8 +396,13 @@ const NewService = Form.create()(React.createClass({
|
|
|
})
|
|
|
},
|
|
|
tableRowClick(record, index) {
|
|
|
+ console.log(this.props.datauser.active)
|
|
|
this.setState({
|
|
|
+ active:this.props.datauser.active,
|
|
|
editFw:record,
|
|
|
+ jid:record.id,
|
|
|
+ discountFirstPayment:record.discountFirstPayment,
|
|
|
+ discountPrice:record.discountPrice,
|
|
|
addnextVisible:true,
|
|
|
addState:0,
|
|
|
});
|
|
@@ -610,6 +618,43 @@ const NewService = Form.create()(React.createClass({
|
|
|
}
|
|
|
}.bind(this));
|
|
|
},
|
|
|
+ tabRowSave(e){
|
|
|
+ e.preventDefault();
|
|
|
+ if(!this.state.discountPrice){
|
|
|
+ message.warning('实签价格不能为空!');
|
|
|
+ return false;
|
|
|
+ };
|
|
|
+ if(!this.state.discountFirstPayment){
|
|
|
+ message.warning('签单首付金额不能为空!');
|
|
|
+ return false;
|
|
|
+ };
|
|
|
+ $.ajax({
|
|
|
+ method: "POST",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context +'/api/admin/order/updateOrderCommodity' ,
|
|
|
+ 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
|
|
|
+ }
|
|
|
+ }).done(function(data) {
|
|
|
+ this.setState({
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
+ if(!data.error.length) {
|
|
|
+ message.success('保存成功!');
|
|
|
+ this.nextCancel()
|
|
|
+ this.loaduser(this.props.datauser);
|
|
|
+ this.loadData();
|
|
|
+ } else {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ }
|
|
|
+ }.bind(this));
|
|
|
+ },
|
|
|
//签单保存
|
|
|
signOk(e){
|
|
|
e.preventDefault();
|
|
@@ -1104,7 +1149,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">
|
|
@@ -1188,24 +1233,38 @@ const NewService = Form.create()(React.createClass({
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
+ label="市场首付金额" >
|
|
|
+ <span>{editFws.commodityFirstPayment+'万元'}</span>
|
|
|
+ </FormItem>
|
|
|
+ {this.state.active.applySign?<FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="实签价格(万元)" >
|
|
|
+ <Input placeholder="请输入签单首付金额" value={this.state.discountPrice} style={{width:'200px'}}
|
|
|
+ onChange={(e)=>{this.setState({discountPrice:e.target.value})}} />
|
|
|
+ <span className="mandatory">*</span>
|
|
|
+ </FormItem>:
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
label="实签价格" >
|
|
|
- <span>{editFws.discountPrice+'万元'}</span>
|
|
|
- </FormItem>
|
|
|
+ <span>{this.state.discountPrice+'万元'}</span>
|
|
|
+ </FormItem>}
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="服务数量" >
|
|
|
<span>{editFws.commodityQuantity}</span>
|
|
|
</FormItem>
|
|
|
- <FormItem className="half-item"
|
|
|
+ {this.state.active.applySign?<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
- label="市场首付金额" >
|
|
|
- <span>{editFws.commodityFirstPayment+'万元'}</span>
|
|
|
- </FormItem>
|
|
|
+ label="签单首付金额(万元)" >
|
|
|
+ <Input placeholder="请输入签单首付金额" value={this.state.discountFirstPayment} style={{width:'200px'}}
|
|
|
+ onChange={(e)=>{this.setState({discountFirstPayment:e.target.value})}} />
|
|
|
+ <span className="mandatory">*</span>
|
|
|
+ </FormItem>:
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
- label="签单首付金额" >
|
|
|
- <span>{editFws.discountFirstPayment+'万元'}</span>
|
|
|
- </FormItem>
|
|
|
+ label="签单首付金额" >
|
|
|
+ <span>{this.state.discountFirstPayment+'万元'}</span>
|
|
|
+ </FormItem>}
|
|
|
<div className='clearfix'>
|
|
|
<FormItem
|
|
|
labelCol={{ span: 4 }}
|
|
@@ -1214,6 +1273,10 @@ const NewService = Form.create()(React.createClass({
|
|
|
<span>{editFws.remarks}</span>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
+ {this.state.active.applySign&&<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>}
|
|
|
</div>}
|
|
|
</Spin>
|
|
|
</Form >
|