|
@@ -4,6 +4,7 @@ import ajax from 'jquery/src/ajax/xhr.js';
|
|
|
import $ from 'jquery/src/ajax';
|
|
|
import '../userMangagement.less';
|
|
|
import moment from 'moment';
|
|
|
+import Picture from '@/manageCenter/publicComponent/picture';
|
|
|
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;
|
|
@@ -166,6 +167,8 @@ const NewService = Form.create()(React.createClass({
|
|
|
bussStats:false,
|
|
|
checkedKeys: [],
|
|
|
lookflowList:[],
|
|
|
+ contractUrl:[],
|
|
|
+ applicationUrl:[],
|
|
|
active:{
|
|
|
applySign:false
|
|
|
},
|
|
@@ -832,15 +835,63 @@ const NewService = Form.create()(React.createClass({
|
|
|
selTime:index
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ //退单操作
|
|
|
+ //点击退单
|
|
|
tuikuan(){
|
|
|
this.setState({
|
|
|
+ lookVisible:true
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //关闭退单
|
|
|
+ noCancel(){
|
|
|
+ this.setState({
|
|
|
lookVisible:false
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
+ //点击确认退单
|
|
|
+ tuidanOk(){
|
|
|
+ let contractUrls = [];
|
|
|
+ let applicationUrls = [];
|
|
|
+ if (this.state.contractUrl.length) {
|
|
|
+ let picArr = [];
|
|
|
+ this.state.contractUrl.map(function (item) {
|
|
|
+ if ( item.response && item.response.data && item.response.data.length ){
|
|
|
+ picArr.push(item.response.data);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ contractUrls = picArr.join(",");
|
|
|
+ };
|
|
|
+ if (this.state.applicationUrl.length) {
|
|
|
+ let picArr = [];
|
|
|
+ this.state.applicationUrl.map(function (item) {
|
|
|
+ if ( item.response && item.response.data && item.response.data.length ){
|
|
|
+ picArr.push(item.response.data);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ applicationUrls = picArr.join(",");
|
|
|
+ };
|
|
|
+ $.ajax({
|
|
|
+ method: "POST",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context +'/api/admin/newOrder/addOrderRefund' ,
|
|
|
+ data: {
|
|
|
+ orderNo:this.state.orderNo,//订单编号
|
|
|
+ contractUrl:contractUrls.length?contractUrls:'',//终止合同
|
|
|
+ applicationUrl:applicationUrls.length?applicationUrls:'',//退单申请表
|
|
|
+ reason:this.state.reason,//退单原因
|
|
|
+ }
|
|
|
+ }).done(function(data) {
|
|
|
+ this.setState({
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
+ if(!data.error.length) {
|
|
|
+ message.success('退单成功!');
|
|
|
+ } else {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ }
|
|
|
+ }.bind(this));
|
|
|
+ },
|
|
|
//开单选择订单类型骚操作
|
|
|
orderTypeFn(e){
|
|
|
if(e==0){
|
|
@@ -1032,7 +1083,7 @@ const NewService = Form.create()(React.createClass({
|
|
|
{...formItemLayout}
|
|
|
label="已收款项" >
|
|
|
<span>{this.state.settlementAmount+'万元'}</span>
|
|
|
- <Button type='primary' onClick={this.tuikuan} style={{float:'right',marginRight:'50px',marginBottom:'15px'}}>添加催款节点</Button>
|
|
|
+ <Button type='primary' onClick={this.tuikuan} style={{float:'right',marginRight:'50px',marginBottom:'15px'}}>退单</Button>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
@@ -1310,6 +1361,50 @@ const NewService = Form.create()(React.createClass({
|
|
|
</Spin>
|
|
|
</Form >
|
|
|
</Modal>
|
|
|
+ <Modal maskClosable={false} visible={this.state.lookVisible}
|
|
|
+ onOk={this.noCancel} onCancel={this.noCancel}
|
|
|
+ width='800px'
|
|
|
+ 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="终止合同">
|
|
|
+ <Picture
|
|
|
+ fileList={(e)=>{this.setState({contractUrl:e})}}
|
|
|
+ pictureUrl={this.state.contractUrl}
|
|
|
+ visible={this.props.visible}
|
|
|
+ data={{'sign':'order_refund_file',url:'/api/admin/newOrder/uploadRefundOrderFile',number:8}}
|
|
|
+ />
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <div className='clearfix'>
|
|
|
+ <FormItem labelCol={{ span: 4 }} wrapperCol={{ span: 16 }} label="退单申请表">
|
|
|
+ <Picture
|
|
|
+ fileList={(e)=>{this.setState({applicationUrl:e})}}
|
|
|
+ pictureUrl={this.state.applicationUrl}
|
|
|
+ visible={this.props.visible}
|
|
|
+ data={{'sign':'order_refund_file',url:'/api/admin/newOrder/uploadRefundOrderFile',number:8}}
|
|
|
+ />
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <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.tuidanOk} style={{marginLeft:"50px"}} htmlType="submit">确定退单</Button>
|
|
|
+ <Button className="cancel" type="ghost" onClick={this.noCancel} style={{marginLeft:"50px"}}>取消</Button>
|
|
|
+ </div>
|
|
|
+ </Spin>
|
|
|
+ </Form >
|
|
|
+ </Modal>
|
|
|
</div>
|
|
|
)
|
|
|
}
|