import React from 'react';
import { Icon, Table, Modal, message, Spin, Input, Select, Button, Form ,Upload,Popconfirm,AutoComplete} from 'antd';
import ajax from 'jquery/src/ajax/xhr.js';
import $ from 'jquery/src/ajax';
import '../userMangagement.less';
import {getApprovedState,getPaymentState,getOrderState,getProjectState,getOrderChannel,getOrderType,getTransactionProject,getTransactionChannel} from '../../../../tools.js';
const MySettlementDetaile = Form.create()(React.createClass({
loadData(record) {
this.state.data = [];
this.setState({
loading: true
});
$.ajax({
method: "get",
dataType: "json",
crossDomain: false,
url: globalConfig.context + '/api/admin/order/getOrderCommodity',
data: {
orderNo:record?record.orderNo:this.props.datauser.orderNo
},
success: function (data) {
let theArr = [];
if (!data.data) {
if (data.error && data.error.length) {
message.warning(data.error[0].message);
};
} else {
for (let i = 0; i < data.data.length; i++) {
let thisdata = data.data[i];
theArr.push({
key: i,
id:thisdata.id,
orderNo:thisdata.orderNo,
commodityName:thisdata.commodityName,
commodityType:thisdata.commodityType,
commodityMode:thisdata.commodityMode,
commodityQuantity:thisdata.commodityQuantity,
commodityPrice:thisdata.commodityPrice,
discountPrice:thisdata.discountPrice,
commodityFirstPayment:thisdata.commodityFirstPayment,
createTimes:thisdata.createTimes,
discountFirstPayment:thisdata.discountFirstPayment,
remarks:thisdata.remarks,
});
};
}
this.setState({
dataSource: theArr,
});
}.bind(this),
}).always(function () {
this.setState({
loading: false
});
}.bind(this));
},
getInitialState() {
return {
loading: false,
visible: false,
lookState:true,
orgCodeUrl:[],
lookflowList:[],
checkedKeys: [],
columns: [
{
title: '业务项目名称',
dataIndex: 'commodityName',
key: 'commodityName'
}, {
title: '项目类别',
dataIndex: 'commodityType',
key: 'commodityType',
render:(text)=>{
return (getOrderType(text))
}
},{
title: '项目数量',
dataIndex: 'commodityQuantity',
key: 'commodityQuantity'
}, {
title: '服务市价(万元)',
dataIndex: 'commodityPrice',
key: 'commodityPrice'
}, {
title: '实签价格(万元)',
dataIndex: 'discountPrice',
key: 'discountPrice'
}, {
title: '下单时间',
dataIndex: 'createTimes',
key: 'createTimes'
}, {
title: '项目说明',
dataIndex: 'remarks',
key: 'remarks',
render:(text)=>{
return (text&&text.length>8?text.substr(0,8)+'…':text)
}
}
],
userList:[
{
title: '用户编号',
dataIndex: 'userNo',
key: 'userNo'
}, {
title: '用户姓名',
dataIndex: 'name',
key: 'name'
},{
title: '部门机构',
dataIndex: 'departmentName',
key: 'departmentName'
}, {
title: '职务',
dataIndex: 'position',
key: 'position'
},{
title: '联系手机',
dataIndex: 'mobile',
key: 'mobile'
}, {
title: '操作',
dataIndex: 'abc',
key: 'abc',
render:(text,record,index)=>{
return (