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, Tabs } from "antd"; import OrderDesc from "@/manageCenter/financialManage/orderDetail/orderDesc"; import Assign from "@/manageCenter/publicComponent/assign"; import { getProcessStatus, getApproval } from "@/tools"; import { ChooseList } from "../../order/orderNew/chooseList"; import DepartmentList from "../../../common/departmentList"; const FormItem = Form.Item; const { TabPane } = Tabs; const PaiDan = React.createClass({ loadData(pageNo) { this.state.data = []; this.setState({ selectedRowKeys: [], selectedRowKey: [], page: pageNo, loading: true }); $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/financial/allUnassignedOrder", data: { pageNo: pageNo || 1, pageSize: this.state.pagination.pageSize, buyerName: this.state.nameSearch, //客户名称 orderNo: this.state.orderNoSearch, startTime: this.state.releaseDate[0], endTime: this.state.releaseDate[1], processStatus: this.state.processStatusSearch, contractNo: this.state.contractNoSearch, departmentId: this.state.departmenttList, outsource: 0 }, 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, orderNo: thisdata.orderNo, approval: thisdata.approval, orderType: thisdata.orderType, examineName: thisdata.examineName, processStatus: thisdata.processStatus, signTotalAmount: thisdata.signTotalAmount, buyerName: thisdata.buyerName, sellerName: thisdata.sellerName, createTime: thisdata.createTime ? new Date(thisdata.createTime).toLocaleString() : "", signTime: thisdata.signTime, contractNo: thisdata.contractNo, financeId: thisdata.financeId, departmentName: thisdata.departmentName }); } } this.state.pagination.current = data.data.pageNo; this.state.pagination.total = data.data.totalCount; if (data.data && data.data.list && !data.data.list.length) { this.state.pagination.current = 0; this.state.pagination.total = 0; } this.setState({ totalPage: data.data.totalPage, dataSource: theArr, pagination: this.state.pagination }); }.bind(this) }).always( function () { this.setState({ loading: false }); }.bind(this) ); }, getInitialState() { return { searchMore: true, assignVisible: false, releaseDate: [], totalPage: 0, processStatusSearch: "2", 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 + "条数据"; } }, columns: [ { title: "订单编号", dataIndex: "orderNo", key: "orderNo" }, { title: "合同编号", dataIndex: "contractNo", key: "contractNo" }, { title: "下单时间", dataIndex: "createTime", key: "createTime" }, { title: "签单时间", dataIndex: "signTime", key: "signTime" }, { title: "签单客户", dataIndex: "buyerName", key: "buyerName", render: text => { return text && text.length > 8 ? text.substr(0, 8) + "..." : text; } }, { title: "流程状态", dataIndex: "processStatus", key: "processStatus", render: (text, record) => { return getProcessStatus(text, record.examineName, record.approval); }, }, { title: "订单部门", dataIndex: "departmentName", key: "departmentName", render: text => { return text && text.length > 8 ? text.substr(0, 8) + "..." : text; } }, { title: "订单总金额(万)", dataIndex: "signTotalAmount", key: "signTotalAmount" }, { title: "是否特批", dataIndex: "approval", key: "approval", render: text => { return getApproval(text); } }, { title: "订单负责人", dataIndex: "sellerName", key: "sellerName" }, { title: "操作", dataIndex: "caozuo", key: "caouzo", render: (text, recard) => { return