import React from "react"; import $ from "jquery/src/ajax"; import moment from "moment"; import "./public.less"; import "./shouKuan.less"; import { AutoComplete, Button, Form, Input, Spin, Table, Select, message, DatePicker, Modal, Tabs, Col, Tag, Tooltip, } from "antd"; import OrderDesc from "../orderDetail/orderDesc"; import Receivable from "./receivable"; import ResolutionDetail from "@/resolutionDetail"; import Assign from "@/manageCenter/publicComponent/assign"; import KaiPiaoModal from "./kaiPiaoModal"; import ReactToPrint from "react-to-print"; import { getLiquidationStatus, getProcessStatus, getApproval, getInvoiceStatus, getTransactionProject, getTaskStatus, getNewOrderStatus, getjiedian, splitUrl, getApprovalTag, getProjectName, getClockState, getApprovedType, } from "@/tools"; import { ChooseList } from "../../order/orderNew/chooseList"; import Project from "../../../../component/project"; import LogPopup from "../../../common/logPopup"; import { clockState, salesList, approvalOptions } from "@/dataDic"; import OrderItemStatus from "../../../common/orderItemStatus"; import Cascaders from "../../../common/cascaders"; const FormItem = Form.Item; const { TabPane } = Tabs; const ShouKuang = React.createClass({ //获取上级组织 selectSuperId() { $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/organization/selectSuperId", data: {}, success: function (data) { let theArr = []; if (data.error && data.error.length === 0) { for (let i = 0; i < data.data.length; i++) { let theData = data.data[i]; theArr.push( {theData.name} ); } this.setState({ contactsOption: theArr, }); } else { message.warning(data.error[0].message); } }.bind(this), }).always( function () { this.setState({ loading: false, }); }.bind(this) ); }, departmentList() { this.setState({ loading: true, }); $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/organization/selectSuperId", data: {}, success: function (data) { let thedata = data.data; let theArr = []; if (!thedata) { if (data.error && data.error.length) { message.warning(data.error[0].message); } } else { thedata.map(function (item, index) { theArr.push({ key: index, name: item.name, id: item.id, }); }); } this.setState({ departmentArr: theArr, }); }.bind(this), }).always( function () { this.setState({ loading: false, }); }.bind(this) ); }, loadData(pageNo, pageSize) { this.state.data = []; this.state.pagination.pageSize = 10; this.setState({ // selectedRowKeys: [], // selectedRowKey: [], page: pageNo, loadingA: true, pagination: this.state.pagination, }); $.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], deps: this.state.departmenttList, processStatus: this.state.processStatusSearch, contractNo: this.state.contractNoSearch, liquidationStatus: this.state.liquidationStatus, amountStatus: this.state.amountStatus, approval: this.state.approval, projectType: this.state.projectType, type: this.state.approvaType.length > 0 ? this.state.approvaType.toString() : undefined, //特批类型 }, 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]; thisdata.key = thisdata.orderNo; theArr.push(thisdata); } } 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 { approvaType: [], isDisplay: true, cuiTabKey: "1", pubVisible: false, pubDataList: [], pubpageNo: 1, pubpagination: { defaultCurrent: 1, defaultPageSize: 10, showQuickJumper: true, pageSize: 10, onChange: function (page) { this.loadData(page); }.bind(this), showTotal: function (total) { return "共" + total + "条数据"; }, }, searchMore: true, dvisible: false, pageNo: 1, assignVisibleX: false, assignVisibleY: false, releaseDate: [], shouKuanDate: [], assignDataX: [], assignDataY: [], totalPage: 0, processStatusSearch: [], boHuivisible: false, selectedRowKeys: [], selectedRows: [], loading: false, loadingA: 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, pubColumns: [ { title: "编号", dataIndex: "key", key: "key", width: 45, }, { title: "公出类型", dataIndex: "type", key: "type", width: 70, render: (text) => { text === 0 ? "业务公出" : text === 1 ? "技术公出" : text === 2 ? "行政公出" : text === 3 ? "技术协单" : "" } }, { title: "客户名称", dataIndex: "nickname", key: "nickname", width: 80, render: (text) => { return (
{text}
); }, }, { title: "跟单人", dataIndex: "sname", key: "sname", width: 70, render: (text) => { return (
{text}
); }, }, { title: "公出人", dataIndex: "aname", key: "aname", width: 70, render: (text) => { return (
{text}
); }, }, // { // title: "申请时间", // dataIndex: "createTimes", // key: "createTimes", // width: 130, // }, { title: "公出时间", dataIndex: "releaseStarts", key: "releaseStarts", width: 130, render: (text, record) => (
{text}
{record.releaseEnds}
), }, { title: "公出地点", dataIndex: "userName", key: "userName", width: 120, render: (text) => { return (
{text}
); }, }, { title: "打卡时间", dataIndex: "clockInTimes", key: "clockInTimes", width: 75, }, { title: "时长(时)", dataIndex: "duration", key: "duration", width: 50, }, { title: "打卡状态", dataIndex: "clockIn", key: "clockIn", width: 65, render: (text) => ( {["未打卡", "已打卡"][text]} ) }, { title: "审核状态", dataIndex: "status", key: "status", width: 110, render: (text, record) => (
{getClockState(text).title} {record.updateStatus == 1 && }
), }, { title: "审核/指导", dataIndex: "auditInfo", key: "auditInfo", width: 160, render: (text) => { return
{text}
; }, }, ], proColumns: [ { title: "序号", dataIndex: "key", key: "key", }, { title: "合同编号", dataIndex: "contractNo", key: "contractNo", }, { title: "订单编号", dataIndex: "orderNo", key: "orderNo", }, { title: "客户名称", dataIndex: "userName", key: "userName", 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: "outsource", key: "outsource", render: (text) => { if (text == 0) { return "否"; } else if (text == 1) { return "是"; } }, }, // { // 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", 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", 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", }, ], 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", 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", }, { title: "客户名称", dataIndex: "buyerName", key: "buyerName", render: (text) => { return (
{text}
); }, }, { 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: "costAmount", key: "costAmount", render: (text) => { return isNaN(parseFloat(text)) ? text : parseFloat(text); }, }, { title: "已付成本(万元)", dataIndex: "paymentAmount", key: "paymentAmount", render: (text) => { return isNaN(parseFloat(text)) ? text : parseFloat(text); }, }, { 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, record) => { return getProcessStatus(text, record.examineName, record.approval); }, }, // { // title: "特批状态", // dataIndex: "approval", // key: "approval", // render: (text) => { // return getApproval(text); // }, // }, ], columns: [ { title: "销售类型", dataIndex: "salesType", key: "salesType", className: "title-table", fixed: "left", render: (text, record) => { return ( {salesList[text]} ); }, }, { title: "特批类型", dataIndex: "type", key: "type", className: "title-table", fixed: "left", width: 110, render: (text, record) => { return ( {getApprovedType(text ? text.split(",").map(Number) : [], record.typeExplain)} ); }, }, { title: "合同编号", dataIndex: "contractNo", key: "contractNo", className: "title-table", fixed: "left", // width: 130, render: (text, record) => { return ( { e.stopPropagation(); let input = document.getElementById("copyText"); input.value = text; input.select(); document.execCommand("copy"); message.success("复制成功"); }} > 复制 } >
{text}
{getApprovalTag(record.approval)}
); }, }, { title: "客户名称", dataIndex: "buyerName", key: "buyerName", className: "title-table", fixed: "left", width: 150, render: (text) => { return (
{text}
); }, }, { title: "订单编号", dataIndex: "orderNo", key: "orderNo", className: "title-table", fixed: "left", width: 140, render: (text, record) => { return ( { e.stopPropagation(); let input = document.getElementById("copyText"); input.value = text; input.select(); document.execCommand("copy"); message.success("复制成功"); }} > 复制 } >
{text}
{record.signTotalAmount >= 10 && 大客户} {record.projectType == 1 && 会员}
); }, }, // { // 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: "serviceType", key: "serviceType", className: "title-table", width: 150, render: (text) => { return !!text && text.replace(/[,,]/g, "+"); } }, { title: "订单内容", dataIndex: "serviceProject", key: "serviceProject", className: "title-table", render: (text, record) => { return ( this.state.isDisplay ?
") }} >
:
{text}
); } }, { title: "财务负责人", dataIndex: "financeName", key: "financeName", className: "title-table", }, { title: "签单日期", dataIndex: "signTime", key: "signTime", className: "title-table", }, { title: "下单日期", dataIndex: "createTime", key: "createTime", className: "title-table", }, { title: "签单金额(万元)", dataIndex: "signTotalAmount", key: "signTotalAmount", className: "title-table", }, { title: "开票金额(万元)", dataIndex: "invoiceAmount", key: "invoiceAmount", className: "title-table", }, { title: "已收款(万元)", dataIndex: "actuallyTotalAmount", key: "actuallyTotalAmount", className: "title-table", }, { title: "应收款(万元)", dataIndex: "orderReceivables", key: "orderReceivables", className: "title-table", }, { title: "欠款(万元)", dataIndex: "orderArrears", key: "orderArrears", className: "title-table", }, { title: "总成本/实付", dataIndex: "costAmount", key: "costAmount", className: "title-table", render: (text, record) => { return ( {isNaN(parseFloat(text)) ? text : parseFloat(text)}/ {isNaN(parseFloat(record.paymentAmount)) ? text : parseFloat(record.paymentAmount)} ) }, }, { title: "专利/专利已付", dataIndex: "patentCost", key: "patentCost", className: "title-table", render: (text, record) => { return ( {isNaN(parseFloat(text)) ? text : parseFloat(text)}/ {isNaN(parseFloat(record.patentCostActual)) ? text : parseFloat(record.patentCostActual)} ) }, }, { title: "软著/软著已付", dataIndex: "softCost", key: "softCost", className: "title-table", render: (text, record) => { return ( {isNaN(parseFloat(text)) ? text : parseFloat(text)}/ {isNaN(parseFloat(record.softCostActual)) ? text : parseFloat(record.softCostActual)} ) }, }, { title: "审计/审计已付", dataIndex: "auditCost", key: "auditCost", className: "title-table", render: (text, record) => { return ( {isNaN(parseFloat(text)) ? text : parseFloat(text)}/ {isNaN(parseFloat(record.auditCostActual)) ? text : parseFloat(record.auditCostActual)} ) }, }, { title: "其他/其他已付", dataIndex: "otherCost", key: "otherCost", className: "title-table", render: (text, record) => { return ( {isNaN(parseFloat(text)) ? text : parseFloat(text)}/ {isNaN(parseFloat(record.otherCostActual)) ? text : parseFloat(record.otherCostActual)} ) }, }, { title: "预估毛利(万元)", dataIndex: "expectProfit", key: "expectProfit", className: "title-table", }, { title: "实际毛利(万元)", dataIndex: "actualProfit", key: "actualProfit", className: "title-table", }, { title: "最近收款(万元)", dataIndex: "finalReceivables", key: "finalReceivables", className: "title-table", }, { 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, record) => { return getProcessStatus(text, record.examineName, record.approval); }, }, { title: "驳回状态", dataIndex: "backStatus", key: "backStatus", className: "title-table", render: (text) => { if (text == 3) { return 已驳回; } else { return ""; } }, }, // { // title: '订单状态', // dataIndex: 'orderStatus', // key: 'orderStatus', // render: text => { return getNewOrderStatus(text)} // }, // { // title: "操作", // dataIndex: "caozuo", // key: "caouzo", // className: "title-table", // render: (text, recard) => { // return ( //
// {recard.liquidationStatus < 2 && // (recard.approval === 1 || recard.approval === 2) ? ( // // ) : ( // // )} // {recard.processStatus < 4 ? ( // // ) : ( // "" // )} // {!( // recard.actuallyTotalAmount && // Number(recard.actuallyTotalAmount) > 0 // ) && ( // // )} // { // // // } //
// ); // } // } ], dataSource: [], searchTime: [], columnsDate: [ { title: "编号", dataIndex: "id", key: "id", }, { title: "订单编号", dataIndex: "orderno", key: "orderno", }, { title: "开票金额(万元)", dataIndex: "amount", key: "amount", }, { title: "申请时间", dataIndex: "createTime", key: "createTime", }, { title: "开票状态", dataIndex: "status", key: "status", render: (text, record) => { return
{getInvoiceStatus(text, record)}
; }, }, ], waterlistDate: [ { title: "订单编号", dataIndex: "orderNo", key: "orderNo", }, { title: "平台流水号", dataIndex: "billNo", key: "billNo", // fixed: "left" }, { title: "收款金额(万元)", dataIndex: "transactionAmount", key: "transactionAmount", }, { 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 ""; } else { return 已删除; } }, }, ], waterData: [], newVisible: "", }; }, // 特批通过 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) ); }, /* 收款 */ 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: "", }); }, boHuiOk() { this.setState({ boHuiVisible: false, }); if ( this.state.pagination.current == this.state.totalPage && this.state.pagination.total % 10 == 1 ) { this.loadData(this.state.page - 1); } else { this.loadData(this.state.page); } }, boHuiCancel() { this.setState({ boHuiVisible: false, }); }, componentWillMount() { this.loadData(); this.departmentList(); }, tableRowClick(record) { let isName = record.sellerName.indexOf("曹津") != -1 let iskeep = window.adminData.shiroList.indexOf("13") != -1 if (iskeep && isName) { message.warning("无法查看,请联系管理员!"); } else { this.setState({ RowData: record, showDesc: true, }); } }, closeDesc(e, s) { this.state.showDesc = e; if (s) { this.loadData(this.state.page); } }, closeAssignX(e, s) { this.state.assignDataX = {}; this.state.assignVisibleX = e; if (s) { this.loadData(this.state.page); } }, closeAssignY(e, s) { this.state.assignDataY = {}; this.state.assignVisibleY = e; if (s) { this.loadData(this.state.page); } }, search() { this.setState({ selectedRowKeys: [], }); this.loadData(); }, // 拆分详细 showRes(record) { this.setState({ resVisible: true, resRecord: record, }); }, resCancel() { this.setState({ resVisible: false, }); }, reset() { this.state.nameSearch = ""; this.state.releaseDate = []; this.state.shouKuanDate = []; this.state.orderNoSearch = ""; this.state.departmenttList = undefined; this.state.amountStatus = undefined; this.state.approval = undefined; this.state.projectType = undefined; this.state.processStatus = []; this.state.processStatusSearch = []; this.state.contractNoSearch = ""; this.state.liquidationStatus = []; this.state.contractNo = ""; this.state.approvaType = []; this.Cascaders.empty(); this.loadData(); }, //驳回 boHuiSubmit(e) { e.preventDefault(); if (!this.state.content) { message.warning("请填写驳回原因"); return false; } if (!this.state.content.replace(/\s+/g, '')) { 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.content, }, }).done( function (data) { if (!data.error.length) { message.success("驳回成功!"); this.setState({ loading: false, }); this.boHuiOk(); } 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, isDisplay: this.ChooseList.state.checkedValues.length == this.ChooseList.state.columns.length ? true : false }); }, onSelectChange(selectedRowKeys, selectedRows) { // for(var i=0; i 0 ? this.state.approvaType.toString() : undefined, //特批类型 } $.ajax({ method: "get", dataType: "json", crossDomain: false, url: "/api/admin/receivables/exportReceivables", data, success: function (data) { if (data.error.length === 0) { this.download(data.data); } else { message.warning(data.error[0].message); } }.bind(this), }).always( function () { loading(); this.setState({ exportPendingLoading: false, }); }.bind(this) ); // window.location.href = // globalConfig.context + // "/api/admin/receivables/exportReceivables?" + // `orderNo=${this.state.orderNoSearch ? this.state.orderNoSearch : "" // }&buyerName=${this.state.nameSearch ? this.state.nameSearch : "" // }&departmentId=${this.state.departmenttList ? this.state.departmenttList : "" // }&contractNo=${this.state.contractNoSearch ? this.state.contractNoSearch : "" // }&processStatus=${this.state.processStatusSearch}`; }, exportWater() { window.location.href = globalConfig.context + "/api/admin/receivables/exportMyBill?" + `orderNo=${this.state.selectedRowKeys}&whoType=1`; }, printAll() { this.setState({ dvisible: true, }); this.loadData(1, 9999999); }, timeData(orderNO) { this.setState({ loading: true, }); $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/orderProject/taskHoursList", data: { orderNo: orderNO || this.state.selectedRowKeys[0], pageSize: 9999999, }, success: function (data) { let theArr = []; if (!data.data || !data.data.list) { if (data.error && data.error.length) { message.warning(data.error[0].message); } } else { for (let i = 0; i < data.data.list.length; i++) { let thisdata = data.data.list[i]; theArr.push({ key: i + 1, id: thisdata.id, //ID orderNo: thisdata.orderNo, //订单编号 taskName: thisdata.taskName, //任务名称 userName: thisdata.userName, //客户名称 cname: thisdata.cname, //项目品类 taskStatus: thisdata.taskStatus, //任务状态 receiverName: thisdata.receiverName, //负责人 hours: thisdata.hours, //任务工时 depName: thisdata.depName, //派单公司 contractNo: thisdata.contractNo, signTime: thisdata.signTime, creteTime: thisdata.creteTime, projectStatus: thisdata.projectStatus, commodityPrice: thisdata.commodityPrice, //价格 commodityQuantity: thisdata.commodityQuantity, //数量 salesmanName: thisdata.salesmanName, //订单负责人 taskDistributionTime: thisdata.taskDistributionTime, taskEndTime: thisdata.taskEndTime, outsource: thisdata.outsource, splitStatus: thisdata.splitStatus, splitSuper: thisdata.splitSuper, splitId: thisdata.splitId, }); } } this.setState({ timeDataList: theArr, }); }.bind(this), }).always( function () { this.setState({ loading: false, }); }.bind(this) ); }, exportTime() { const data = { orderNo: this.state.selectedRowKeys[0], pageSize: 9999999, }; window.location.href = globalConfig.context + "/api/admin/orderProject/exportMyTaskList?" + $.param(data); }, exportPro() { const data = { orderNo: this.state.selectedRowKeys[0], }; window.location.href = globalConfig.context + "/api/admin/newOrder/exportOrderTaskData?" + $.param(data); }, // exportCui() { // var data = { // orderNo: this.state.selectedRowKeys[0] // ? this.state.selectedRowKeys[0] // : undefined, //订单编号 // // specially: 1, // pageSize: 9999999, // }; // window.location.href = // globalConfig.context + // "/api/admin/newOrder/exportOrderDunData?" + // $.param(data); // }, exportCui() { this.setState({ exportPendingLoading: true, }); message.config({ duration: 20, }); let loading = message.loading("下载中..."); let data = { orderNo: this.state.selectedRowKeys[0] ? this.state.selectedRowKeys[0] : undefined, //订单编号 pageSize: 9999999, }; $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/newOrder/exportOrderDunData", data, success: function (data) { if (data.error.length === 0) { this.download(data.data); } else { message.warning(data.error[0].message); } }.bind(this), }).always( function () { loading(); this.setState({ exportPendingLoading: false, }); }.bind(this) ); }, cuiData() { this.setState({ loading: true, }); $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/newOrder/dunOrderNewList", data: { orderNo: this.state.selectedRowKeys[0], pageSize: 9999999, }, success: function (data) { let theArr = []; if (!data.data || !data.data.list) { if (data.error && data.error.length) { message.warning(data.error[0].message); } } else { for (let i = 0; i < data.data.list.length; i++) { let thisdata = data.data.list[i]; theArr.push({ key: i + 1, orderNo: thisdata.orderNo, contractNo: thisdata.contractNo, userName: thisdata.userName, buyerName: thisdata.buyerName, departmentName: thisdata.departmentName, salesmanName: thisdata.salesmanName, depName: thisdata.depName, orderStatus: thisdata.orderStatus, projectStatus: thisdata.projectStatus, totalAmount: thisdata.totalAmount, liquidationStatus: thisdata.liquidationStatus, settlementAmount: thisdata.settlementAmount, accountsReceivable: thisdata.accountsReceivable, dunSubject: thisdata.dunSubject, startDate: thisdata.startDate, taskStatus: thisdata.taskStatus, cname: thisdata.cname, id: thisdata.id, taskName: thisdata.taskName, hours: thisdata.hours, taskDistributionTime: thisdata.taskDistributionTime, taskEndTime: thisdata.taskEndTime, dunStatus: thisdata.dunStatus == 0 ? "未触发" : "已触发", }); } } this.setState({ cuiDataList: theArr, }); }.bind(this), }).always( function () { this.setState({ loading: false, }); }.bind(this) ); }, cuiTabChange(index) { this.setState({ cuiTabKey: index, }); if (index == 2) { this.setState({ loading: true, }); $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/newOrder/arrearsDunList", data: { orderNo: this.state.selectedRowKeys[0], pageSize: 9999999, }, 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.list.length; i++) { let thisdata = data.data.list[i]; let obj = thisdata; obj.key = i; theArr.push(obj); } } this.setState({ qianDataList: theArr, }); }.bind(this), }).always( function () { this.setState({ loading: false, }); }.bind(this) ); } }, proData() { this.setState({ loading: true, }); $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/newOrder/getOrderTask", data: { orderNo: this.state.selectedRowKeys[0], pageSize: 9999999, }, success: function (data) { let theArr = []; let totalWaibao = 0; 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]; totalWaibao += thisdata.outsourcePrice; theArr.push({ key: i + 1, orderNo: thisdata.orderNo, contractNo: thisdata.contractNo, userName: thisdata.userName, buyerName: thisdata.buyerName, departmentName: thisdata.departmentName, salesmanName: thisdata.salesmanName, depName: thisdata.depName, orderStatus: thisdata.orderStatus, projectStatus: thisdata.projectStatus, commodityName: thisdata.commodityName, totalAmount: thisdata.totalAmount, liquidationStatus: thisdata.liquidationStatus, settlementAmount: thisdata.settlementAmount, accountsReceivable: thisdata.accountsReceivable, dunSubject: thisdata.dunSubject, startDate: thisdata.startDate, taskStatus: thisdata.taskStatus, cname: thisdata.cname, id: thisdata.id, taskName: thisdata.taskName, hours: thisdata.hours, taskDistributionTime: thisdata.taskDistributionTime, taskEndTime: thisdata.taskEndTime, commodityQuantity: thisdata.commodityQuantity, commodityPrice: thisdata.commodityPrice, certificateNumber: thisdata.certificateNumber, taskComment: thisdata.taskComment, outsourceName: thisdata.outsourceName, outsourcePrice: thisdata.outsourcePrice, outsource: thisdata.outsource, splitStatus: thisdata.splitStatus, }); } } totalWaibao = (Math.round(totalWaibao * 1000000) / 1000000).toFixed(6); this.setState({ proDataList: theArr, totalWaibao, }); }.bind(this), }).always( function () { this.setState({ loading: false, }); }.bind(this) ); }, // 查看公出列表 pubData() { this.setState({ loading: true, }); let rows = this.state.selectedRows[0] let searchInfor = { releaseStart: this.state.releaseDate[0] || undefined, releaseEnd: this.state.releaseDate[1] || undefined, aid: this.state.theTypes || undefined, sid: this.state.theTypes1 || undefined, status: this.state.status, clockIn: this.state.clockIn, depId: this.state.depId || undefined, publicType: this.state.type, } let datas = Object.assign(searchInfor, { pageNo: this.state.pubpageNo || 1, pageSize: 9999999, uid: rows.buyerId, }); $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/release/publicReleaseDtails", data: datas, success: function (data) { let theArr = []; this.setState({ loading: false, }); if (!data.data) { if (data.error && data.error.length) { message.warning(data.error[0].message); } } else { for (let i = 0; i < data.data.list.length; i++) { let thisdata = data.data.list[i]; thisdata.key = (data.data.pageNo - 1) * data.data.pageSize + i + 1; theArr.push(thisdata); } this.state.pubpagination.current = data.data.pageNo; this.state.pubpagination.total = data.data.totalCount; if (data.data && data.data.list && !data.data.list.length) { this.state.pubpagination.current = 0; this.state.pubpagination.total = 0; } } this.setState({ pubDataList: theArr, pubpagination: this.state.pubpagination, pubpageNo: data.data.pageNo, }); }.bind(this), }).always( function () { this.setState({ loading: false, }); }.bind(this) ); }, // 重置公出列表查询 resetAll() { this.setState( { releaseDate: [], theCustomerTypes: undefined, status: undefined, clockIn: undefined, depId: undefined, auto: "", auto1: "", customer: "", theTypes: undefined, theTypes1: undefined, type: undefined, }, () => { this.pubData(); } ); }, //公出导出 pubexportExec() { this.setState({ exportPendingLoading: true, }); message.config({ duration: 20, }); let loading = message.loading("下载中..."); let rows = this.state.selectedRows[0] let searchInfor = { releaseStart: this.state.releaseDate[0] || undefined, releaseEnd: this.state.releaseDate[1] || undefined, aid: this.state.theTypes || undefined, sid: this.state.theTypes1 || undefined, status: this.state.status, clockIn: this.state.clockIn, depId: this.state.depId || undefined, publicType: this.state.type, } let data = Object.assign(searchInfor, { pageNo: this.state.pubpageNo || 1, pageSize: 9999999, uid: rows.buyerId, exportType: 1, }); for (let i of Object.keys(data)) { if (i === "status" || i === "clockIn") { if (isNaN(parseInt(data[i]))) { delete data[i]; } } else if (!data[i]) { delete data[i]; } } $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/release/publicReleaseDtails/export", data, success: function (data) { if (data.error.length === 0) { this.download(data.data); } else { message.warning(data.error[0].message); } }.bind(this), }).always( function () { loading(); this.setState({ exportPendingLoading: false, }); }.bind(this) ); }, // 下载 download(fileName) { window.location.href = globalConfig.context + "/open/download?fileName=" + fileName; }, tableRowClickPro(record) { this.setState({ pvisible: true, record, }); }, kaiPiaoData(record) { this.setState({ avisible: true, }); this.invoiceData(record.id); }, invoiceData(id) { this.setState({ loading: true, }); $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/orderInvoice/selectByIdOrderInvoice", data: { id, }, success: function (data) { let thisdata = data.data; let obj = { contractNo: thisdata.contractNo, orderNo: thisdata.orderNo, approval: thisdata.approval, type: thisdata.type, status: thisdata.status, remarks: thisdata.remarks, invoiceType: thisdata.invoiceType, unitName: thisdata.unitName, taxNumber: thisdata.taxNumber, amount: thisdata.amount, banks: thisdata.banks, content: thisdata.content, unitAddress: thisdata.unitAddress, invoiceRemarks: thisdata.invoiceRemarks, unitMobile: thisdata.unitMobile, post: thisdata.post, addressee: thisdata.addressee, addresseeMobile: thisdata.addresseeMobile, addresseeProvince: thisdata.addresseeProvince, addresseeCity: thisdata.addresseeCity, addresseeArea: thisdata.addresseeArea, alreadyAmount: thisdata.alreadyAmount, recipientAddress: thisdata.recipientAddress, orgCodeUrl: thisdata.voucherUrl ? splitUrl( thisdata.voucherUrl, ",", globalConfig.avatarHost + "/upload" ) : [], }; this.setState({ modalData: obj, }); }.bind(this), }).done( function () { this.setState({ loading: false, }); }.bind(this) ); }, visitCancels() { this.setState({ avisible: false, }); }, selectAuto(value, options) { this.setState({ auto: value, }); }, selectAuto1(value, options) { this.setState({ auto1: value, }); }, blurChange(e) { let theType = ""; let contactLists = this.state.customerArr || []; if (e) { contactLists.map(function (item) { if (item.name == e.toString()) { theType = item.id; } }); } this.setState({ theTypes: theType, }); }, blurChange1(e) { let theType = ""; let contactLists = this.state.customerArr1 || []; if (e) { contactLists.map(function (item) { if (item.name == e.toString()) { theType = item.id; } }); } this.setState({ theTypes1: theType, }); }, httpChange(e) { if (e.length >= 1) { this.supervisor(e); } this.setState({ auto: e, }); }, httpChange1(e) { if (e.length >= 1) { this.supervisor1(e); } this.setState({ auto1: e, }); }, supervisor(e) { $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/customer/listAdminByName", data: { adminName: e, }, success: function (data) { if (data.error && data.error.length === 0) { this.setState({ customerArr: data.data, }); } else { message.warning(data.error[0].message); } }.bind(this), }).always(function () { }.bind(this)); }, supervisor1(e) { $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/customer/listAdminByName", data: { adminName: e, }, success: function (data) { if (data.error && data.error.length === 0) { this.setState({ customerArr1: data.data, }); } else { message.warning(data.error[0].message); } }.bind(this), }).always(function () { }.bind(this)); }, render() { const formItemLayout = { labelCol: { span: 8 }, wrapperCol: { span: 14 }, }; const { RangePicker } = DatePicker; const { selectedRowKeys } = this.state; const rowSelection = { selectedRowKeys, onChange: this.onSelectChange, hideDefaultSelections: true, type: "radio", }; const dataSources = this.state.customerArr || []; const dataSources1 = this.state.customerArr1 || []; const options = dataSources.map((group) => ( {group.name} )); const options1 = dataSources1.map((group) => ( {group.name} )); const approvaChildren = approvalOptions.map(i => ( )); return (
{this.state.resVisible ? ( ) : ( "" )}
收款结算
{ this.setState({ orderNoSearch: e.target.value }); }} /> { this.setState({ contractNoSearch: e.target.value, }); }} /> { this.setState({ nameSearch: e.target.value }); }} /> this.Cascaders = node} placeholder="订单部门" id="id" name="name" children="list" height={28} onSel={(e) => { this.setState({ departmenttList: JSON.stringify(e), }); }} /> {/* */}
下单日期: { this.setState({ releaseDate: dataString }); }} /> 最近收款: { this.setState({ shouKuanDate: dataString }); }} />
this.ChooseList = ref} columns={this.state.columns} changeFn={this.changeList} changeList={this.state.changeList} top={55} margin={11} />
{/* */}

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

{/* 驳回备注 */}
*驳回原因 } > { this.setState({ content: e.target.value }); }} />
{/* 开票历史记录 */}
{ this.refs.kaiPiao = e; }} >
开票总计} > {this.state.sum + "(万元)"}
( )} content={() => this.refs.kaiPiao} /> {/* 详细收款流水 */}
{ this.refs.shouKuan = e; }} >
总计金额} > {this.state.waterSum + "(万元)"}
( )} content={() => this.refs.shouKuan} /> {/* 所有列表信息 */} { this.loadData(); this.setState({ dvisible: false, }); }} >
{ this.refs.all = e; }} >
( )} content={() => this.refs.all} /> {/* 工时详情 */} { this.loadData(this.state.page); this.setState({ timeVisible: false, }); }} > {this.state.pvisible && ( { this.setState({ pvisible: false }); }} /> )}
{ this.refs.all = e; }} >
( )} content={() => this.refs.all} /> {/* 催款详情 */} { this.loadData(this.state.page); this.setState({ cuiVisible: false, cuiTabKey: "1", }); }} >
{ this.refs.all = e; }} >
( )} content={() => this.refs.all} />
{ this.refs.all = e; }} >
( )} content={() => this.refs.all} /> { this.setState({ pvisible: false }); }} /> {/* 项目进度 */} { this.loadData(this.state.page); this.setState({ proVisible: false, }); }} >
{ this.refs.all = e; }} >
外包(内部)价格总计(万元):{this.state.totalWaibao} ( )} content={() => this.refs.all} /> {/* 查看公出 */} 公出详细列表( {this.state.selectedRows.length > 0 && this.state.selectedRows[0].buyerName} )} className="admin-desc-content" width="1500px" pagination={false} onCancel={() => { this.pubData(); this.setState({ pubVisible: false, }); }} >
公出时间 : { this.setState({ releaseDate: dataString }); }} />
{ this.refs.all = e; }} >
( )} content={() => this.refs.all} /> {/* 合并查看 */} { this.state.newVisible != "" && { this.setState({ newVisible: "", }); }} >
{ this.state.newVisible == "公出详细列表" &&
公出时间 : { this.setState({ releaseDate: dataString }); }} />
} { this.state.newVisible == "催款详情" ?
{ this.refs.all = e; }} >
( )} content={() => this.refs.all} />
{ this.refs.all = e; }} >
( )} content={() => this.refs.all} /> :
{ this.refs.all = e; }} >
{ this.state.newVisible == "开票历史记录" &&
开票总计} > {this.state.sum + "(万元)"}
} { this.state.newVisible == "开票历史记录" && } { this.state.newVisible == "开票历史记录" && ( )} content={() => this.refs.kaiPiao} /> } { this.state.newVisible == "详细收款流水" &&
总计金额} > {this.state.waterSum + "(万元)"}
} { this.state.newVisible == "详细收款流水" && } { this.state.newVisible == "详细收款流水" && ( )} content={() => this.refs.shouKuan} /> } { this.state.newVisible == "工时详情" && } { this.state.newVisible == "工时详情" && ( )} content={() => this.refs.all} /> } { this.state.newVisible == "项目进度" && 外包(内部)价格总计(万元):{this.state.totalWaibao} } { this.state.newVisible == "项目进度" && } { this.state.newVisible == "项目进度" && ( )} content={() => this.refs.all} /> } { this.state.newVisible == "公出详细列表" && } { this.state.newVisible == "公出详细列表" && ( )} content={() => this.refs.all} /> } } }