123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- import React from 'react';
- import ajax from 'jquery/src/ajax/xhr.js';
- import $ from 'jquery/src/ajax';
- import { Form, Spin, message, Modal } from 'antd';
- import {getTaskStatus,getProjectName,getLiquidationStatus,getJsyPaymentType,getBonusState} from '@/tools.js';
- import {splitUrl} from "../../../tools";
- import OrderItemStatus from "../../../common/orderItemStatus";
- const BonusDetail=React.createClass({
- getInitialState() {
- return {
- loading: false,
- visible:false,
- showDesc:false,
- };
- },
- onCancel(){
- this.setState({
- visible:false
- })
- this.props.closeDesc(false,false);
- },
- onShow() {
- this.setState({
- visible: false,
- });
- this.props.closeDesc(false, true);
- },
- componentWillMount() {
- },
- xiangqing(orderNo) {
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
- data: {
- orderNo,
- },
- 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;
- this.setState({
- deleteSign:thisdata.deleteSign,
- });
- }
- }.bind(this),
- }).always(
- function () {
- }.bind(this)
- );
- },
- componentWillReceiveProps(nextProps) {
- if(nextProps.data.orderNo){
- this.setState({data:nextProps.data});
- this.xiangqing(nextProps.data.orderNo);
- }
- this.state.visible=nextProps.showDesc;
- },
- render() {
- const theData = this.state.data || {};
- const FormItem = Form.Item;
- const formItemLayout = {
- labelCol: { span: 10 },
- wrapperCol: { span: 12 },
- };
- return (
- <div className="user-content" >
- <Modal maskClosable={false} visible={this.state.visible}
- onOk={this.onShow} onCancel={this.onCancel}
- width='800px'
- title='任务详情'
- footer=''
- className="admin-desc-content">
- <Form layout="horizontal" onSubmit={(e)=>{this.handleSubmit(e,0)}} >
- <Spin spinning={this.state.loading}>
- <div className="clearfix">
- <div style={{position:"absolute",top:'-52px',left:'81px',zIndex:10000}}>
- <OrderItemStatus deleteSign={this.state.deleteSign}/>
- </div>
- <FormItem className="half-item" {...formItemLayout} label="任务编号">
- <span>{theData.tid}</span>
- </FormItem>
- <FormItem className="half-item" {...formItemLayout} label="订单编号">
- <span>{theData.orderNo}</span>
- </FormItem>
- <FormItem className="half-item" {...formItemLayout} label="任务名称">
- <span>{theData.commodityName}</span>
- </FormItem>
- <FormItem className="half-item" {...formItemLayout} label="任务负责人">
- <span>{theData.targetName}</span>
- </FormItem>
- <FormItem className="half-item" {...formItemLayout} label="任务状态">
- <span>{getTaskStatus(theData.taskStatus)}</span>
- </FormItem>
- <FormItem className="half-item" {...formItemLayout} label="任务数量">
- <span>{theData.commodityQuantity}</span>
- </FormItem>
- <FormItem className="half-item" {...formItemLayout} label="项目状态">
- <span>{getProjectName(theData.projectStatus)}</span>
- </FormItem>
- <FormItem className="half-item" {...formItemLayout} label="受理日期">
- <span>{theData.acceptTime}</span>
- </FormItem>
- <FormItem className="half-item" {...formItemLayout} label="评审日期">
- <span>{theData.reviewTime}</span>
- </FormItem>
- <FormItem className="half-item" {...formItemLayout} label="下证日期">
- <span>{theData.licenceTime}</span>
- </FormItem>
- <FormItem className="half-item" {...formItemLayout} label="订单结算状态">
- <span>{getLiquidationStatus(theData.liquidationStatus)}</span>
- </FormItem>
- <FormItem className="half-item" {...formItemLayout} label="发放类型">
- <span>{getJsyPaymentType(theData.bonusSubject)}</span>
- </FormItem>
- <FormItem className="half-item" {...formItemLayout} label="发放状态">
- <span>{getBonusState(theData.grantStatus)}</span>
- </FormItem>
- </div>
- </Spin>
- </Form>
- </Modal>
- </div>
- );
- }
- });
- export default Form.create()(BonusDetail);
|