import React from 'react' import $ from 'jquery/src/ajax' import moment from 'moment' import './public.less' import { Button, Form, Input, Select, Spin, Table, message, DatePicker, Modal, Upload, Tabs, Col, Tag, Popconfirm, Tooltip, } from 'antd' import Receivable from './receivable' import Assign from '@/manageCenter/publicComponent/assign' import ReactToPrint from 'react-to-print' import ResolutionDetail from '@/resolutionDetail' import KaiPiaoModal from './kaiPiaoModal' import OrderRiZi from '@/orderRiZi.jsx' import { getjiedian, getProcessStatus, getApproval, getNewOrderType, getLiquidationStatus, getProjectStatus, splitUrl, getprovince, getRefundStatus, getTransactionProject, getTaskStatus, getNewOrderStatus, getInvoiceStatus, getCuikuan, } from '@/tools' import { ChooseList } from '../../../../component/manageCenter/order/orderNew/chooseList' import ImgList from "../../../common/imgList"; import {getProjectName} from "../../../tools"; import DepartmentList from "../../../common/departmentList"; import OrderItemStatus from "../../../common/orderItemStatus"; import EnterpriseNameChange from "../../../common/enterpriseNameChange"; const FormItem = Form.Item const approvedOutsourcing = React.createClass({ loadData(pageNo, pageSize) { this.state.data = [] this.setState({ page: pageNo, loadingA: true, }) $.ajax({ method: 'get', dataType: 'json', crossDomain: false, url: globalConfig.context + '/api/admin/financial/financeList', data: { pageNo: pageNo || 1, pageSize: pageSize || this.state.pagination.pageSize, buyerName: this.state.nameSearch, //客户名称 orderNo: this.state.orderNoSearch, startTime: this.state.releaseDate[0], endTime: this.state.releaseDate[1], startFinalReceivablesTime: this.state.shouKuanDate[0], endFinalReceivablesTime: this.state.shouKuanDate[1], departmentId: this.state.departmenttList, processStatus: this.state.processStatusSearch, contractNo: this.state.contractNoSearch, outsource: 1, liquidationStatus: this.state.liquidationStatus, amountStatus: this.state.amountStatus, }, success: function (data) { let theArr = [] if (!data.data || !data.data.pagination.list) { if (data.error && data.error.length) { message.warning(data.error[0].message) } } else { for (let i = 0; i < data.data.pagination.list.length; i++) { let thisdata = data.data.pagination.list[i] theArr.push({ key: thisdata.orderNo, orderNo: thisdata.orderNo, orderType: thisdata.orderType, orderStatus: thisdata.orderStatus, sellerName: thisdata.sellerName, processStatus: thisdata.processStatus, liquidationStatus: thisdata.liquidationStatus, approval: thisdata.approval, buyerName: thisdata.buyerName, actuallyTotalAmount: thisdata.actuallyTotalAmount, signTime: thisdata.signTime, companyId: thisdata.companyId, companyName: thisdata.companyName, buyerId: thisdata.buyerId, contractNo: thisdata.contractNo, createTime: thisdata.createTime, departmentName: thisdata.departmentName, outsourceName: thisdata.outsourceName, invoiceAmount: thisdata.invoiceAmount, finalReceivables: thisdata.finalReceivables, finalReceivablesTime: thisdata.finalReceivablesTime, signTotalAmount: thisdata.signTotalAmount, outsourceAmount: thisdata.outsourceAmount, financeName: thisdata.financeName, backStatus: thisdata.backStatus, orderReceivables: thisdata.orderReceivables, orderArrears: thisdata.orderArrears, }) } } this.state.pagination.current = data.data.pagination.pageNo this.state.pagination.total = data.data.pagination.totalCount if ( data.data && data.data.pagination.list && !data.data.pagination.list.length ) { this.state.pagination.current = 0 this.state.pagination.total = 0 } this.setState({ totalPage: data.data.pagination.totalPage, dataSource: theArr, pagination: this.state.pagination, totalHui: data.data.count ? data.data.count.signTotalAmount : 0, hui: data.data.count ? data.data.count.actuallyTotalAmount : 0, }) }.bind(this), }).always( function () { this.setState({ loadingA: false, }) }.bind(this) ) }, getInitialState() { return { cuiTabKey: '1', rotateDeg: 0, searchMore: true, loadingA: false, assignVisibleX: false, assignVisibleY: false, releaseDate: [], shouKuanDate: [], assignDataX: [], assignDataY: [], attachmentUrl: [], pictureUrl: [], totalPage: 0, modKey: '1', width: '800px', boHuivisible: false, selectedRowKeys: [], selectedRows: [], loading: false, pagination: { defaultCurrent: 1, defaultPageSize: 10, showQuickJumper: true, pageSize: 10, onChange: function (page) { this.loadData(page) }.bind(this), showTotal: function (total) { return '共' + total + '条数据' }, }, // 子组件改变的表格title数组 changeList: undefined, columns: [ { title: '合同编号', dataIndex: 'contractNo', key: 'contractNo', className: 'title-table', fixed: 'left', }, { title: '客户名称', dataIndex: 'buyerName', key: 'buyerName', className: 'title-table', fixed: 'left', width:100, render: text => { return (
{text}
) } }, { title: '订单编号', dataIndex: 'orderNo', key: 'orderNo', className: 'title-table', // fixed: "left" }, { title: '特批状态', dataIndex: 'approval', key: 'approval', className: 'title-table', render: (text) => { if (text == 1 || text == 2) { return {getApproval(text)} } return getApproval(text) }, }, { title: '订单部门', dataIndex: 'departmentName', key: 'departmentName', className: 'title-table', }, { title: '订单负责人', dataIndex: 'sellerName', key: 'sellerName', className: 'title-table', }, { title: '财务负责人', dataIndex: 'financeName', key: 'financeName', className: 'title-table', }, { title: '外包公司', dataIndex: 'outsourceName', key: 'outsourceName', className: 'title-table', }, { title: '外包成本', dataIndex: 'outsourceAmount', key: 'outsourceAmount', className: 'title-table', render: (text) => { return isNaN(parseFloat(text)) ? text : parseFloat(text); } }, { title: '签单日期', dataIndex: 'signTime', key: 'signTime', className: 'title-table', }, { title: '下单日期', dataIndex: 'createTime', key: 'createTime', className: 'title-table', }, { title: '签单金额(万元)', dataIndex: 'signTotalAmount', key: 'signTotalAmount', className: 'title-table', render: (text) => { return isNaN(parseFloat(text)) ? text : parseFloat(text); } }, { title: '开票金额(万元)', dataIndex: 'invoiceAmount', key: 'invoiceAmount', className: 'title-table', render: (text) => { return isNaN(parseFloat(text)) ? text : parseFloat(text); } }, { title: '已收款(万元)', dataIndex: 'actuallyTotalAmount', key: 'actuallyTotalAmount', className: 'title-table', render: (text) => { return isNaN(parseFloat(text)) ? text : parseFloat(text); } }, { title: '应收款(万元)', dataIndex: 'orderReceivables', key: 'orderReceivables', className: 'title-table', render: (text) => { return isNaN(parseFloat(text)) ? text : parseFloat(text); } }, { title: '欠款(万元)', dataIndex: 'orderArrears', key: 'orderArrears', className: 'title-table', render: (text) => { return isNaN(parseFloat(text)) ? text : parseFloat(text); } }, { title: '最近收款(万元)', dataIndex: 'finalReceivables', key: 'finalReceivables', className: 'title-table', render: (text) => { return isNaN(parseFloat(text)) ? text : parseFloat(text); } }, { title: '最近收款时间', dataIndex: 'finalReceivablesTime', key: 'finalReceivablesTime', className: 'title-table', }, { title: '结算状态', dataIndex: 'liquidationStatus', key: 'liquidationStatus', className: 'title-table', render: (text) => { return getLiquidationStatus(text) }, }, { title: '流程状态', dataIndex: 'processStatus', key: 'processStatus', className: 'title-table', render: (text) => { return getProcessStatus(text) }, }, { title: '操作', dataIndex: 'caozuo', key: 'caouzo', className: 'title-table', render: (text, recard) => { return (
{/* {recard.liquidationStatus < 2 && (recard.approval === 1 || recard.approval === 2) ? ( ) : ( )} */} {recard.backStatus == 3 ? 已驳回 : ''} {recard.processStatus == 3 ? ( ) : ( '' )} {!( recard.actuallyTotalAmount && Number(recard.actuallyTotalAmount) > 0 ) && ( )} { // }
) }, }, ], proColumns: [ { title: '序号', dataIndex: 'key', key: 'key', }, { title: '合同编号', dataIndex: 'contractNo', key: 'contractNo', }, { title: '订单编号', dataIndex: 'orderNo', key: 'orderNo', }, { title: '客户名称', dataIndex: 'userName', key: 'userName', width:100, render: text => { return (
{text}
) } }, { title: '订单负责人', dataIndex: 'salesmanName', key: 'salesmanName', }, { title: '是否主项目', dataIndex: 'main', key: 'main', render: (text) => { return text == 0 ? '否' : '是' }, }, { title: '项目类别', dataIndex: 'cname', key: 'cname', }, { title: '项目名称', dataIndex: 'commodityName', key: 'commodityName', }, { title: '项目数量', dataIndex: 'commodityQuantity', key: 'commodityQuantity', render: (text, record) => { if (record.splitStatus == 1) { return ( {text}{' '} { e.stopPropagation() this.showRes(record) }} > 已拆 ) } else { return text } }, }, { title: '服务市价', dataIndex: 'commodityPrice', key: 'commodityPrice', }, { title: '证书编号', dataIndex: 'certificateNumber', key: 'certificateNumber', }, { title: '项目状态', dataIndex: 'projectStatus', key: 'projectStatus', render: (text) => { return getProjectName(text) }, }, { title: '项目说明', dataIndex: 'taskComment', key: 'taskComment', }, // { // title: '外包(内部)公司', // dataIndex: 'outsourceName', // key: 'outsourceName', // }, // { // title: '外包(内部)价格', // dataIndex: 'outsourcePrice', // key: 'outsourcePrice', // }, ], qianColumns: [ { title: '序号', dataIndex: 'key', key: 'key', }, { title: '合同编号', dataIndex: 'contractNo', key: 'contractNo', }, { title: '订单编号', dataIndex: 'orderNo', key: 'orderNo', }, { title: '客户名称', dataIndex: 'userName', key: 'userName', width:100, render: text => { return (
{text}
) } }, { title: '订单负责人', dataIndex: 'salesmanName', key: 'salesmanName', }, { title: '订单部门', dataIndex: 'depName', key: 'depName', }, { title: '订单状态', dataIndex: 'orderStatus', key: 'orderStatus', render: (text) => { return getNewOrderStatus(text) }, }, { title: '项目状态', dataIndex: 'projectStatus', key: 'projectStatus', render: (text) => { return getProjectName(text) }, }, { title: '签单金额', dataIndex: 'totalAmount', key: 'totalAmount', }, { title: '结算状态', dataIndex: 'liquidationStatus', key: 'liquidationStatus', render: (text) => { return getLiquidationStatus(text) }, }, { title: '已收款', dataIndex: 'settlementAmount', key: 'settlementAmount', }, { title: '欠款', dataIndex: 'orderArrears', key: 'orderArrears', }, { title: '催收科目', dataIndex: 'type', key: 'type', render: (text) => { return '按时触发应收欠款' }, }, { title: '催款状态', dataIndex: 'dunStatus', key: 'dunStatus', render: (text) => { if (text == 0) { return '未启动' } else if (text == 1) { return '催款中' } else if (text == 2) { return '已完成' } else if (text == 3) { return '已停止' } }, }, { title: '催收启动时间', dataIndex: 'startDate', key: 'startDate', }, ], cuiColumns: [ { title: '序号', dataIndex: 'key', key: 'key', }, { title: '合同编号', dataIndex: 'contractNo', key: 'contractNo', }, { title: '订单编号', dataIndex: 'orderNo', key: 'orderNo', }, { title: '客户名称', dataIndex: 'userName', key: 'userName', width:100, render: text => { return (
{text}
) } }, { title: '订单负责人', dataIndex: 'salesmanName', key: 'salesmanName', }, { title: '订单部门', dataIndex: 'depName', key: 'depName', }, { title: '订单状态', dataIndex: 'orderStatus', key: 'orderStatus', render: (text) => { return getNewOrderStatus(text) }, }, { title: '项目状态', dataIndex: 'projectStatus', key: 'projectStatus', render: (text) => { return getProjectName(text) }, }, { title: '签单金额', dataIndex: 'totalAmount', key: 'totalAmount', }, { title: '结算状态', dataIndex: 'liquidationStatus', key: 'liquidationStatus', render: (text) => { return getLiquidationStatus(text) }, }, { title: '已收款', dataIndex: 'settlementAmount', key: 'settlementAmount', }, { title: '应收款', dataIndex: 'accountsReceivable', key: 'accountsReceivable', }, { title: '催收科目', dataIndex: 'dunSubject', key: 'dunSubject', // render: text => { // return getjiedian(text); // } }, { title: '催款状态', dataIndex: 'dunStatus', key: 'dunStatus', }, { title: '催收启动时间', dataIndex: 'startDate', key: 'startDate', }, ], ContactsListsNew: [ { title: '项目名称', dataIndex: 'commodityName', key: 'commodityName', render: (text, record) => { return {text + '-' + record.tid} }, }, { title: '项目分类', dataIndex: 'projectType', key: 'projectType', render: (text) => { let arr = this.state.dataSourceX || [] let str = '' for (let i = 0; i < arr.length; i++) { if (this.state.dataSourceX[i].sort == text) { str = this.state.dataSourceX[i].cname return {str} } } }, }, { title: '催款科目', dataIndex: 'dunTypeName', key: 'dunTypeName', render: (text, record) => { if (record.customizeName) { return text + record.customizeName } return {text} }, }, { title: '时间(天)', dataIndex: 'waitDay', key: 'waitDay', render: (text, record) => { if (record.dunTypeName) { if (record.customizeTimes) { return record.customizeTimes } return {text} } }, }, { title: '金额(万元)', dataIndex: 'money', key: 'money', render: (text, record) => { if (record.dunTypeName) { if (record.appropriationRatio) { return {record.appropriationRatio}(拨款比例); } else { return {text}; } } }, }, { title: '服务年限', dataIndex: 'startDate', key: 'startDate', render: (text, record) => { if (record.dunTypeName) { return {text} } }, }, { title: '催款状态', dataIndex: 'status', key: 'status', render: (text) => { return {text == 1 ? '已启动' : '未启动'} }, }, ], ContactsLists: [ { title: '催款科目', dataIndex: 'dunSubject', key: 'dunSubject', render: (text) => { return getjiedian(text) }, }, { title: '金额(万元)', dataIndex: 'money', key: 'money', }, { title: '催款状态', dataIndex: 'dunStatus', key: 'dunStatus', render: (text) => { return getCuikuan(text) }, }, ], timeColumns: [ { title: '合同编号', dataIndex: 'contractNo', key: 'contractNo', }, { title: '订单编号', dataIndex: 'orderNo', key: 'orderNo', }, { title: '项目编号', dataIndex: 'id', key: 'id', render: (text, record) => { if (record.splitStatus == 2) { return {record.splitSuper + '-' + record.splitId} } else { return text } }, }, { title: '客户名称', dataIndex: 'userName', key: 'userName', width:100, render: text => { return (
{text}
) } }, { title: '订单部门', dataIndex: 'depName', key: 'depName', }, { title: '订单负责人', dataIndex: 'salesmanName', key: 'salesmanName', }, { title: '项目类别', dataIndex: 'cname', key: 'cname', }, { title: '项目名称', dataIndex: 'taskName', key: 'taskName', }, { title: '项目负责人', dataIndex: 'receiverName', key: 'receiverName', }, { title: '项目价格(万元)', dataIndex: 'commodityPrice', key: 'commodityPrice', }, { title: '数量(个)', dataIndex: 'commodityQuantity', key: 'commodityQuantity', }, { title: '任务状态', dataIndex: 'taskStatus', key: 'taskStatus', render: (text) => { return getTaskStatus(text) }, }, { title: '项目状态', dataIndex: 'projectStatus', key: 'projectStatus', render: (text) => { return getProjectName(text) }, }, { title: '工时', dataIndex: 'hours', key: 'hours', }, { title: '是否外包', dataIndex: 'outsource', key: 'outsource', render: (text) => { if (text == 0) { return '否' } else if (text == 1) { return '是' } }, }, { title: '签单日期', dataIndex: 'signTime', key: 'signTime', }, { title: '派单日期', dataIndex: 'creteTime', key: 'creteTime', }, { title: '分配时间', dataIndex: 'taskDistributionTime', key: 'taskDistributionTime', }, { title: '完成时间', dataIndex: 'taskEndTime', key: 'taskEndTime', }, ], // printColumns: [ // { // title: '合同编号', // dataIndex: 'contractNo', // key: 'contractNo', // }, // { // title: '订单编号', // dataIndex: 'orderNo', // key: 'orderNo', // // fixed: "left" // }, // { // title: '客户名称', // dataIndex: 'buyerName', // key: 'buyerName', // }, // { // title: '订单部门', // dataIndex: 'departmentName', // key: 'departmentName', // }, // { // title: '订单负责人', // dataIndex: 'sellerName', // key: 'sellerName', // }, // { // title: '签单日期', // dataIndex: 'signTime', // key: 'signTime', // }, // { // title: '下单日期', // dataIndex: 'createTime', // key: 'createTime', // }, // { // title: '签单金额(万元)', // dataIndex: 'signTotalAmount', // key: 'signTotalAmount', // }, // { // title: '开票金额(万元)', // dataIndex: 'invoiceAmount', // key: 'invoiceAmount', // }, // { // title: '已收款(万元)', // dataIndex: 'actuallyTotalAmount', // key: 'actuallyTotalAmount', // }, // { // title: '最近收款(万元)', // dataIndex: 'finalReceivables', // key: 'finalReceivables', // }, // { // title: '最近收款时间', // dataIndex: 'finalReceivablesTime', // key: 'finalReceivablesTime', // }, // { // title: '结算状态', // dataIndex: 'liquidationStatus', // key: 'liquidationStatus', // render: (text) => { // return getLiquidationStatus(text) // }, // }, // { // title: '流程状态', // dataIndex: 'processStatus', // key: 'processStatus', // render: (text) => { // return getProcessStatus(text) // }, // }, // { // title: '特批状态', // dataIndex: 'approval', // key: 'approval', // render: (text) => { // return getApproval(text) // }, // }, // ], resVisible: false, columnsX: [ { title: '业务项目名称', dataIndex: 'commodityName', key: 'commodityName', render: (text, record) => { return text && text.length > 6 ? ( {text.substr(0, 8) + '-' + record.id}... ) : ( text + '-' + record.id ) }, }, { title: '项目类别', dataIndex: 'cname', key: 'cname', }, { title: '项目数量', dataIndex: 'commodityQuantity', key: 'commodityQuantity', render: (text, record) => { if (record.splitStatus == 1) { return ( {text}{' '} { e.stopPropagation() this.showRes(record) }} > 已拆 ) } else { return text } }, }, { title: '服务市价(万元)', dataIndex: 'commodityPrice', key: 'commodityPrice', }, { title: '项目状态', dataIndex: 'projectStatus', key: 'projectStatus', render: (text) => { return getProjectName(text) }, }, { title: '证书编号', dataIndex: 'certificateNumber', key: 'certificateNumber', }, { title: '是否主要项目', dataIndex: 'main', key: 'main', render: (text) => { return text ? '是' : '否' }, }, { title: '项目说明', dataIndex: 'taskComment', key: 'taskComment', render: (text) => { return text && text.length > 8 ? ( {text.substr(0, 8)}... ) : ( text ) }, }, ], columnsDate: [ { title: '编号', dataIndex: 'id', key: 'id', }, { title: '订单编号', dataIndex: 'orderno', key: 'orderno', }, { title: '开票金额(万元)', dataIndex: 'amount', key: 'amount', render: (text) => { return isNaN(parseFloat(text)) ? text : parseFloat(text); } }, { title: '申请时间', dataIndex: 'createTime', key: 'createTime', }, { title: '开票状态', dataIndex: 'status', key: 'status', render: (text) => { return getInvoiceStatus(text) }, }, ], columnsY: [ { title: '流程', dataIndex: 'processName', key: 'processName', }, { title: '操作人', dataIndex: 'adminName', key: 'adminName', }, { title: '时间', dataIndex: 'createDate', key: 'createDate', }, ], columnsW: [ { title: '外包名称', dataIndex: 'name', key: 'name', }, { title: '联系人', dataIndex: 'contacts', key: 'contacts', }, { title: '联系人电话', dataIndex: 'contactsMobile', key: 'contactsMobile', }, { title: '地址', dataIndex: 'ProvinceCity', key: 'ProvinceCity', render: (test) => { return test[0] === null ? '' : getprovince(test[0]) + '/' + getprovince(test[1]) + '/' + getprovince(test[2]) }, }, { title: '地址详情', dataIndex: 'address', key: 'address', render: (text) => { return text && text.length > 8 ? text.substr(0, 8) + '...' : text }, }, { title: '创建时间', dataIndex: 'createTimes', key: 'createTimes', }, { title: '任务名称', dataIndex: 'tname', key: 'tname', }, { title: '合同编号', dataIndex: 'contractNo', key: 'contractNo', }, { title: '项目状态', dataIndex: 'projectStatus', key: 'projectStatus', render: (text) => { return getProjectName(text) }, }, ], dataSource: [], searchTime: [,], printColumns: [ { title: '合同编号', dataIndex: 'contractNo', key: 'contractNo', }, { title: '订单编号', dataIndex: 'orderNo', key: 'orderNo', // fixed: "left" }, { title: '客户名称', dataIndex: 'buyerName', key: 'buyerName', width:100, render: text => { return (
{text}
) } }, { title: '订单部门', dataIndex: 'departmentName', key: 'departmentName', }, { title: '订单负责人', dataIndex: 'sellerName', key: 'sellerName', }, { title: '外包公司', dataIndex: 'outsourceName', key: 'outsourceName', }, { title: '签单日期', dataIndex: 'signTime', key: 'signTime', }, { title: '下单日期', dataIndex: 'createTime', key: 'createTime', }, { title: '签单金额(万元)', dataIndex: 'signTotalAmount', key: 'signTotalAmount', render: (text) => { return isNaN(parseFloat(text)) ? text : parseFloat(text); } }, { title: '开票金额(万元)', dataIndex: 'invoiceAmount', key: 'invoiceAmount', render: (text) => { return isNaN(parseFloat(text)) ? text : parseFloat(text); } }, { title: '已收款(万元)', dataIndex: 'actuallyTotalAmount', key: 'actuallyTotalAmount', render: (text) => { return isNaN(parseFloat(text)) ? text : parseFloat(text); } }, { title: '最近收款(万元)', dataIndex: 'finalReceivables', key: 'finalReceivables', render: (text) => { return isNaN(parseFloat(text)) ? text : parseFloat(text); } }, { title: '最近收款时间', dataIndex: 'finalReceivablesTime', key: 'finalReceivablesTime', }, { title: '结算状态', dataIndex: 'liquidationStatus', key: 'liquidationStatus', render: (text) => { return getLiquidationStatus(text) }, }, { title: '流程状态', dataIndex: 'processStatus', key: 'processStatus', render: (text) => { return getProcessStatus(text) }, }, { title: '特批状态', dataIndex: 'approval', key: 'approval', render: (text) => { return getApproval(text) }, }, ], waterlistDate: [ { title: '订单编号', dataIndex: 'orderNo', key: 'orderNo', }, { title: '平台流水号', dataIndex: 'billNo', key: 'billNo', // fixed: "left" }, { title: '金额(万元)', dataIndex: 'transactionAmount', key: 'transactionAmount', render: (text) => { return isNaN(parseFloat(text)) ? text : parseFloat(text); } }, { title: '收款方', dataIndex: 'payeeName', key: 'payeeName', }, { title: '付款方', dataIndex: 'payerName', key: 'payerName', }, { title: '流水科目', dataIndex: 'transactionSubject', key: 'transactionSubject', render: (text) => { return getTransactionProject(text) }, }, { title: '收款类型', dataIndex: 'type', key: 'type', }, { title: '财务流水时间', dataIndex: 'financialPayTimes', key: 'financialPayTimes', }, { title: '财务流水号', dataIndex: 'financialPayNo', key: 'financialPayNo', }, { title: '订单负责人', dataIndex: 'saleName', key: 'saleName', }, { title: '创建时间', dataIndex: 'createTimes', key: 'createTimes', }, { title: '退款时间', dataIndex: 'refundTimes', key: 'refundTimes', }, { title: '删除时间', dataIndex: 'deleteTimes', key: 'deleteTimes', }, { title: '备注', dataIndex: 'remarks', key: 'remarks', }, { title: '流水状态', dataIndex: 'deleteSign', key: 'deleteSign', render: (text, record) => { if (!text) { return ( { this.changeWater(record.billNo) }} okText="删除" cancelText="不删除" > ) } else { return 已删除 } }, }, ], waterData: [], } }, changeWater(billNo) { this.setState({ loading: true, }) $.ajax({ method: 'get', dataType: 'json', crossDomain: false, url: globalConfig.context + '/api/admin/financial/deleteMyBill', data: { billNo, }, success: function (data) { let theArr = [] if (data.error && data.error.length) { message.warning(data.error[0].message) } else { message.warning('删除流水成功!') this.waterData() } }.bind(this), }).always( function () { this.setState({ loading: false, }) }.bind(this) ) }, // 特批通过 evaluateZ(record) { $.ajax({ method: 'POST', dataType: 'json', crossDomain: false, url: globalConfig.context + '/api/admin/financial/financeApproval', data: { orderNo: record.orderNo, }, }).done( function (data) { if (!data.error.length) { message.success('通过成功!') this.setState({ loading: false, }) this.loadData() } else { message.warning(data.error[0].message) } }.bind(this) ) }, jdDate(orderNo) { $.ajax({ method: 'get', dataType: 'json', crossDomain: false, url: globalConfig.context + '/api/admin/newOrder/selectOrderDun', data: { orderNo: orderNo, }, success: function (data) { let thisData = data.data if (!thisData.length) { if (data.error && data.error.length) { message.warning(data.error[0].message) } thisData = {} } else { this.setState({ jsDate: thisData, }) } }.bind(this), }).always( function () { this.setState({ loading: false, }) }.bind(this) ) }, /* 收款 */ evaluateX(recard) { this.state.assignDataX = recard this.setState({ assignVisibleX: true, }) }, /* 转交 */ evaluateY(recard, nub) { this.state.assignDataY = recard this.setState({ nub, assignVisibleY: true, }) }, /* 驳回 */ reject(recard) { this.setState({ bohuiData: recard, boHuiVisible: true, content: '', }) }, boHuiCancel() { this.setState({ boHuiVisible: false, reason: '', }) }, componentWillMount() { this.loadData() }, tableRowClick(record) { this.state.RowData = record this.setState({ showDesc: true, visible: true, orderNo: record.orderNo, modKey: '1', }) this.jdDate(record.orderNo) this.loadXmu(record) this.loadModal(record) this.jiedian(record.orderNo) this.jiedianNew(record.orderNo) }, //详情 callBack(key) { if (key === '2') { this.setState({ modKey: key, width: '1200px', }) this.loadWaiBao() } if (key === '1') { this.setState({ modKey: key, width: '800px', }) } if (this.state.pictureUrl.length) { let picArr = [] this.state.pictureUrl.map(function (item) { if (item.response && item.response.data && item.response.data.length) { picArr.push(item.response.data) } }) } if (key === '3') { this.setState({ modKey: key, width: '800px', }) this.setState({ loading: true, }) $.ajax({ method: 'get', dataType: 'json', crossDomain: false, url: globalConfig.context + '/api/admin/outsourceOrg/orderOutsourceDtails', data: { orderNo: this.state.orderNo, }, success: function (data) { let thisdata = data.data this.setState({ id: thisdata.id, createTimes: thisdata.createTimes, auditTimes: thisdata.auditTimes, remarks: thisdata.remarks, attachmentUrl: thisdata.attachmentUrl ? splitUrl( thisdata.attachmentUrl, ',', globalConfig.avatarHost + '/upload' ) : [], pictureUrl: thisdata.pictureUrl ? splitUrl( thisdata.pictureUrl, ',', globalConfig.avatarHost + '/upload' ) : [], //图片地址 amount: thisdata.amount, companyName: thisdata.companyName, refundStatus: thisdata.refundStatus, outsourceRemarks: thisdata.outsourceRemarks, unitNumber: thisdata.unitNumber, unitPrice: thisdata.unitPrice, }) }.bind(this), }).always( function () { this.setState({ loading: false, }) }.bind(this) ) } }, // 拆分详细 showRes(record) { this.setState({ resVisible: true, resRecord: record, }) }, resCancel() { this.setState({ resVisible: false, }) }, //外包详情 loadWaiBao() { $.ajax({ method: 'get', dataType: 'json', rossDomain: false, url: globalConfig.context + '/api/admin/outsourceOrg/selectOrderOutsourceOrg', data: { orderNo: this.state.orderNo, }, success: function (data) { let theArr = [] if (data.error.length || data.data.list == '') { 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] let ProvinceCityArr = [] let ProvinceS = thisdata.province //省 let citys = thisdata.city //市 let Areas = thisdata.area //区 ProvinceCityArr.push(ProvinceS, citys, Areas) theArr.push({ key: i, id: thisdata.id, name: thisdata.name, contacts: thisdata.contacts, //订单编号 contactsMobile: thisdata.contactsMobile, ProvinceCity: ProvinceCityArr[0] === null ? [] : ProvinceCityArr, province: thisdata.province, city: thisdata.city, area: thisdata.area, address: thisdata.address, remarks: thisdata.remarks, tid: thisdata.tid, createTimes: thisdata.createTimes, tname: thisdata.tname, contractNo: thisdata.contractNo, projectStatus: thisdata.projectStatus, }) } } this.setState( { dataSourceW: theArr, }, () => {} ) }.bind(this), }).always( function () { this.setState({ loading: false, }) }.bind(this) ) }, loadXmu(record) { this.state.data = [] this.setState({ loading: true, }) $.ajax({ method: 'get', dataType: 'json', crossDomain: false, url: globalConfig.context + '/api/admin/newOrder/getOrderTask', data: { orderNo: record.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, commodityPrice: thisdata.commodityPrice, commodityQuantity: thisdata.commodityQuantity, taskStatus: thisdata.taskStatus, taskComment: thisdata.taskComment, main: thisdata.main, contacts: thisdata.contacts, contactsMobile: thisdata.contactsMobile, cname: thisdata.cname, certificateNumber: thisdata.certificateNumber, projectStatus: thisdata.projectStatus, sort: thisdata.cSort, splitStatus: thisdata.splitStatus, }) } } this.setState({ dataSourceX: theArr, }) }.bind(this), }).always( function () { this.setState({ loading: false, }) }.bind(this) ) }, loadModal(record) { this.state.orderList = [] $.ajax({ method: 'get', dataType: 'json', crossDomain: false, url: globalConfig.context + '/api/admin/newOrder/getOrderNewDetail', data: { orderNo: record.orderNo, }, success: function (data) { let thisData = data.data if (!thisData) { if (data.error && data.error.length) { message.warning(data.error[0].message) } thisData = {} } this.setState({ orderUid: thisData.uid, id: thisData.id, orderList: thisData, approval: thisData.approval == 0 ? thisData.approval.toString() : thisData.approval, orderRemarks: thisData.orderRemarks, orgCodeUrl: thisData.contractPictureUrl ? splitUrl( thisData.contractPictureUrl, ',', globalConfig.avatarHost + '/upload' ) : [], replenishUrl: thisData.agreementUrl ? splitUrl( thisData.agreementUrl, ',', globalConfig.avatarHost + '/upload' ) : [], orderNo: thisData.orderNo, //订单编号 buyerId: thisData.buyerId, depName: thisData.depName, deleteSign:thisData.deleteSign, }) }.bind(this), }).always( function () { this.setState({ loading: false, }) }.bind(this) ) }, rizhi() { this.setState({ loading: true, }) $.ajax({ method: 'get', dataType: 'json', crossDomain: false, url: '/api/admin/newOrder/selectOrderLog', data: { orderNo: this.state.orderNo, }, success: function (data) { let theArr = [] let thisData = data.data if (!thisData.length) { if (data.error && data.error.length) { message.warning(data.error[0].message) } thisData = {} } else { for (let i = 0; i < data.data.length; i++) { let thisdata = data.data[i] theArr.push({ processName: thisdata.processName, adminName: thisdata.adminName, createDate: thisdata.createDate, remarks: thisdata.remarks, }) } } this.setState({ dataSourceY: theArr, }) }.bind(this), }).always( function () { this.setState({ loading: false, }) }.bind(this) ) }, closeOrderLog() { this.setState({ avisible: false, }) }, load() { if (this.state.attachmentUrl) { let url = window.location.href.substring(7) this.state.attachmentUrl.forEach((e) => { window.location.href = 'http://' + url.substring(0, url.indexOf('/')) + '/api/admin/outsourceOrg//downloadFile?path=' + e.response.data }) } else { message.error('此订单无上传文件') } }, getOrderLog() { this.setState({ avisible: true, }) this.rizhi() }, closeModal() { this.setState( { visible: false, width: '800px', }, () => { this.setState({ modKey: '1', }) } ) }, closeDesc(e, s) { this.state.showDesc = e if (s) { this.loadData() } }, closeAssignX(e, s) { this.state.assignDataX = {} this.state.assignVisibleX = e if (s) { this.loadData() } }, closeAssignY(e, s) { this.state.assignDataY = {} this.state.assignVisibleY = e if (s) { this.loadData() } }, search() { this.setState({ selectedRowKeys: [], }) this.loadData() }, reset() { this.state.nameSearch = '' this.state.releaseDate = [] this.state.shouKuanDate = [] this.state.orderNoSearch = '' this.state.departmenttList = undefined this.state.amountStatus = undefined this.state.processStatus = [] this.state.contractNoSearch = '' this.state.processStatusSearch = [] this.state.liquidationStatus = [] this.state.contractNo = '' this.loadData() }, boHuiCo() { this.boHuiCancel() this.boHuiSubmit() }, //驳回 boHuiSubmit() { if (!this.state.reason) { message.warning('请填写驳回原因') return false } this.setState({ loading: true, }) $.ajax({ method: 'POST', dataType: 'json', crossDomain: false, url: globalConfig.context + '/api/admin/financial/reject', data: { orderNo: this.state.bohuiData.orderNo, reason: this.state.reason, }, }).done( function (data) { if (!data.error.length) { message.success('驳回成功!') this.setState({ loading: false, }) this.loadData() } else { message.warning(data.error[0].message) } }.bind(this) ) }, searchSwitch() { this.setState({ searchMore: !this.state.searchMore, }) }, changeList(arr) { const newArr = [] this.state.columns.forEach((item) => { arr.forEach((val) => { if (val === item.title) { newArr.push(item) } }) }) this.setState({ changeList: newArr, }) }, onSelectChange(selectedRowKeys) { // for(var i=0; i {this.state.resVisible ? ( ) : ( '' )}
外包结算管理
{ this.setState({ orderNoSearch: e.target.value }) }} /> { this.setState({ nameSearch: e.target.value }) }} /> { this.setState({ departmenttList: e }); }}/> { this.setState({ contractNoSearch: e.target.value, }) }} /> 下单日期: { this.setState({ releaseDate: dataString }) }} /> 最近收款: { this.setState({ shouKuanDate: dataString }) }} />
{/* */}

{ {`收款金额总计(万元):${this.state.hui ? this.state.hui : '0'}`} } { {`合同额总计(万元):${ this.state.totalHui ? this.state.totalHui : '0' }`} }

{this.state.visible ?
} > {this.state.modKey === "1" ?
{this.state.orderNo} {theData.signDate} {theData.userName} {getProcessStatus(theData.processStatus)} {getNewOrderType(theData.orderType)} {getLiquidationStatus(theData.liquidationStatus)} {theData.totalAmount} {theData.firstAmount} {theData.settlementAmount} {getApproval(theData.approval)} {/*this.props.data.orderStatus=='6'&& {this.props.data.refundAmount} */}
{/* {*/} {/* this.setState({*/} {/* previewImage: file.url || file.thumbUrl,*/} {/* previewVisible: true,*/} {/* })*/} {/* }}*/} {/*/>*/} {this.state.visible && this.state.modKey === "1" && this.state.orgCodeUrl ?
:
} { this.setState({ previewVisible: false, rotateDeg: 0, }) }} > {/* {*/} {/* this.setState({*/} {/* previewImage: file.url || file.thumbUrl,*/} {/* previewVisibles: true,*/} {/* })*/} {/* }}*/} {/*/>*/} {this.state.visible && this.state.modKey === "1" && this.state.replenishUrl ?
:
} { this.setState({ previewVisibles: false, rotateDeg: 0, }) }} >
{theData.contractNo} {theData.depName}

{this.state.orderRemarks}

{/*
{jsDate.map(item => { return (

{getjiedian(item.dunSubject)} -- {item.money} 万元

); })}
*/}
{theData.salesmanName} {theData.salesmanMobile} {theData.nowFinance} {theData.nowFinanceMobile} {theData.oldSalesmanName} {theData.oldSalesmanMobile} {theData.financeName} {theData.financeMobile}
{/*
*/}

项目业务

催款节点 金额总计(万元): {this.state.totalCui}
:
}

提示:查看备注请点击表格左侧加号按钮~

(

{record.remarks}

)} scroll={{ x: 300, y: 0 }} />
{this.state.companyName}
{this.state.unitPrice}
{this.state.unitNumber}
{this.state.amount}
{this.state.outsourceRemarks}
{/*
{ return { 'sign': e.name.substring(0,e.name.lastIndexOf(".")) } }} fileList={this.state.attachmentUrl} showUploadList={{showRemoveIcon:false}} onPreview={(e)=>{ let url = window.location.href.substring(7) window.location.href="http://"+url.substring(0,url.indexOf("/"))+"/api/admin/outsourceOrg//downloadFile?path="+e.response.data }}>
*/}
{/* {*/} {/* this.setState({*/} {/* previewImage: file.url || file.thumbUrl,*/} {/* previewVisible: true,*/} {/* })*/} {/* }}*/} {/*/>*/} {this.state.visible && this.state.modKey === "3" && this.state.pictureUrl ?
:
} { this.setState({ previewVisible: false }) }} >

{this.state.remarks}
{getRefundStatus(this.state.refundStatus)}
{this.state.auditTimes}
:
}