import React from "react";
import {
Button,
Input,
Select,
Spin,
Table,
message,
DatePicker,
Form,
Modal,
Tabs,
Tooltip,
Tag,
} from "antd";
import $ from "jquery/src/ajax";
import moment from "moment";
import {
getLiquidationStatus,
getjiedian,
getNewOrderStatus,
getProjectStatus,
getProjectName,
getApprovalTag,
} from "@/tools.js";
import "./customer.less";
import { ChooseList } from "./chooseList";
import { salesList } from "@/dataDic.js"
import DepartmentList from "../../../common/departmentList";
import OrderItemStatus from "../../../common/orderItemStatus";
import OrderDesc from "../../financialManage/orderDetail/orderDesc";
import Cascaders from "../../../common/cascaders";
const IntentionCustomer = Form.create()(
React.createClass({
loadData(pageNo) {
this.setState({
visitModul: false,
loading: true,
ispage: pageNo,
modalVisible: false,
});
$.ajax({
method: "get",
dataType: "json",
crossDomain: false,
url: globalConfig.context + "/api/admin/newOrder/dunOrderNewList",
data: {
pageNo: pageNo || 1,
pageSize: this.state.pagination.pageSize,
name: this.state.customerName, //名称
orderNo: this.state.orderNo, //订单编号
contractNo: this.state.contractNo,
deps: this.state.departmenttSearch, //订单部门
adminName: this.state.adminName, //责任人名称
starTime: this.state.releaseDate[0], //开始时间
endTime: this.state.releaseDate[1], //结束时间
newStatus: this.state.newStatus,
amountStatus: this.state.amountStatus,//签单金额
approval: this.state.approval,//是否特批
memberType: this.state.memberType,//会员
},
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];
theArr.push({
key: i + 1,
id: thisdata.id, //ID
contractNo: thisdata.contractNo,
orderNo: thisdata.orderNo, //订单编号
totalAmount: thisdata.totalAmount, //签单金额
settlementAmount: thisdata.settlementAmount, //已收款
accountsReceivable: thisdata.accountsReceivable, //应收款
uncollectedAmount: thisdata.uncollectedAmount, //应收款
appropriationRatio: thisdata.appropriationRatio, //拨款比例
orderStatus: thisdata.orderStatus, //订单状态
projectStatus: thisdata.projectStatus, //项目状态
liquidationStatus: thisdata.liquidationStatus, //结算状态
signDate: thisdata.signDate, //签单时间
userName: thisdata.userName, //客户名称
salesmanName: thisdata.salesmanName, //营销员名称
dunSubject: thisdata.dunSubject, //催收科目
startDate: thisdata.startDate, //催收启动时间
depName: thisdata.depName, //部门名称
dunStatus: thisdata.dunStatus == 0 ? "未触发" : "已触发",
commodityName: thisdata.commodityName,
approval: thisdata.approval, //特批状态
memberType: thisdata.memberType, //会员状态
deleteSign: thisdata.deleteSign,//变更状态
});
}
this.state.pagination.total = data.data.totalCount;
this.state.pagination.current = data.data.pageNo;
}
if (data.data && data.data.list && !data.data.list.length) {
this.state.pagination.total = 0;
}
this.setState({
dataSource: theArr,
pageNo: pageNo,
pagination: this.state.pagination,
selectedRowKeys: [],
});
}.bind(this),
}).always(
function () {
this.setState({
loading: false,
});
}.bind(this)
);
},
loadDatas(dunId) {
this.setState({
loading: true,
});
$.ajax({
method: "get",
dataType: "json",
crossDomain: false,
url: globalConfig.context + "/api/admin/newOrder/selectDunLogList",
data: {
dunId: dunId,
},
success: function (data) {
let theArr = [];
if (data.error.length || 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, //ID
dunId: thisdata.dunId, //催款ID
dumBy: thisdata.dumBy, //催款人
dumTime: thisdata.dumDate, //催款时间
remarks: thisdata.remarks, //备注
});
}
}
this.setState({
dataSources: theArr,
});
}.bind(this),
}).always(
function () {
this.setState({
loading: false,
});
}.bind(this)
);
},
getInitialState() {
return {
showDesc: false,
newStatus: 1,
page: 1,
releaseDate: [],
selectedRowKeys: [],
orgCodeUrl: [],
paginations: 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: "contractNo",
key: "contractNo",
render: (text, record) => {
return (