|
@@ -45,60 +45,73 @@ const HuiKuan = React.createClass({
|
|
|
method: "get",
|
|
|
dataType: "json",
|
|
|
crossDomain: false,
|
|
|
- url:
|
|
|
- globalConfig.context +
|
|
|
- "/api/admin/orderInvoice/approvalOrderInvoiceList",
|
|
|
+ url: globalConfig.context + "/api/admin/receivables/listReceivables",
|
|
|
data: {
|
|
|
pageNo: pageNo || 1,
|
|
|
pageSize: this.state.pagination.pageSize,
|
|
|
- name: this.state.nameSearch, //客户名称
|
|
|
- userName: this.state.userName,
|
|
|
- status: this.state.status,
|
|
|
+ // 订单状态 判断是否重复
|
|
|
+ status: this.state.statusSearch,
|
|
|
+ // 订单编号
|
|
|
orderNo: this.state.orderNoSearch,
|
|
|
- orderDep: this.state.departmenttList,
|
|
|
- type: 0,
|
|
|
- approval: this.state.processStatus
|
|
|
+ // 合同编号
|
|
|
+ contractNo: this.state.contractSearch,
|
|
|
+ // 付款方
|
|
|
+ corporateName: this.state.corporateName,
|
|
|
+ // 营销员名字
|
|
|
+ adminName: this.state.adminName,
|
|
|
+ // 客户名称
|
|
|
+ nickname: this.state.nickname,
|
|
|
+ // 订单所属部门id
|
|
|
+ orderDepId: this.state.orderDepId,
|
|
|
+ // 管理员部门id
|
|
|
+ adminDepId: this.state.adminDepId
|
|
|
},
|
|
|
success: function(data) {
|
|
|
let theArr = [];
|
|
|
- if (!data.data || !data.data.list) {
|
|
|
+ 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.list.length; i++) {
|
|
|
- let thisdata = data.data.list[i];
|
|
|
+ for (let i = 0; i < data.data.pagination.list.length; i++) {
|
|
|
+ let thisdata = data.data.pagination.list[i];
|
|
|
theArr.push({
|
|
|
- key: i,
|
|
|
- id: thisdata.id,
|
|
|
+ key: thisdata.id,
|
|
|
status: thisdata.status,
|
|
|
- unitName: thisdata.unitName,
|
|
|
- orderno: thisdata.orderno,
|
|
|
- name: thisdata.name,
|
|
|
- processStatus: thisdata.processStatus,
|
|
|
- projectStatus: thisdata.projectStatus,
|
|
|
+ orderNo: thisdata.orderNo,
|
|
|
+ contractNo: thisdata.contractNo,
|
|
|
+ corporateName: thisdata.corporateName,
|
|
|
+ nickname: thisdata.nickname,
|
|
|
+ totalAmount: thisdata.totalAmount,
|
|
|
+ depName: thisdata.depName,
|
|
|
amount: thisdata.amount,
|
|
|
- sumAmount: thisdata.sumAmount,
|
|
|
- createTime: thisdata.createTime
|
|
|
- ? new Date(thisdata.createTime).toLocaleString()
|
|
|
- : "",
|
|
|
- settlementAmount: thisdata.settlementAmount,
|
|
|
- notAmount: thisdata.notAmount,
|
|
|
- approval: thisdata.approval
|
|
|
+ receivablesTimes: thisdata.receivablesTimes,
|
|
|
+ createTimes: thisdata.createTimes,
|
|
|
+ remarks: thisdata.remarks
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
- 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 = 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.totalPage,
|
|
|
+ totalPage: data.data.pagination.totalPage,
|
|
|
dataSource: theArr,
|
|
|
- pagination: this.state.pagination
|
|
|
+ pagination: this.state.pagination,
|
|
|
+ totalAmount: data.data.count.totalAmount,
|
|
|
+ amount: data.data.count.amount
|
|
|
});
|
|
|
+
|
|
|
+ console.log(this.state.dataSource);
|
|
|
+
|
|
|
+
|
|
|
}.bind(this)
|
|
|
}).always(
|
|
|
function() {
|
|
@@ -184,8 +197,8 @@ const HuiKuan = React.createClass({
|
|
|
columns: [
|
|
|
{
|
|
|
title: "合同编号",
|
|
|
- dataIndex: "id",
|
|
|
- key: "id"
|
|
|
+ dataIndex: "contractNo",
|
|
|
+ key: "contractNo"
|
|
|
// fixed: "left"
|
|
|
},
|
|
|
{
|
|
@@ -195,23 +208,23 @@ const HuiKuan = React.createClass({
|
|
|
},
|
|
|
{
|
|
|
title: "客户名称",
|
|
|
- dataIndex: "name",
|
|
|
- key: "name"
|
|
|
+ dataIndex: "corporateName",
|
|
|
+ key: "corporateName"
|
|
|
},
|
|
|
{
|
|
|
title: "合同额",
|
|
|
- dataIndex: "hetong",
|
|
|
- key: "hetong"
|
|
|
+ dataIndex: "totalAmount",
|
|
|
+ key: "totalAmount"
|
|
|
},
|
|
|
{
|
|
|
title: "本次回款(万元)",
|
|
|
- dataIndex: "benci",
|
|
|
- key: "benci"
|
|
|
+ dataIndex: "amount",
|
|
|
+ key: "amount"
|
|
|
},
|
|
|
{
|
|
|
title: "回款时间",
|
|
|
- dataIndex: "huiTime",
|
|
|
- key: "huiTime"
|
|
|
+ dataIndex: "receivablesTimes",
|
|
|
+ key: "receivablesTimes"
|
|
|
},
|
|
|
{
|
|
|
title: "状态",
|
|
@@ -223,22 +236,25 @@ const HuiKuan = React.createClass({
|
|
|
if (status == 0) {
|
|
|
str = "正常";
|
|
|
color = "#87d068";
|
|
|
- } else {
|
|
|
- str = "异常";
|
|
|
+ } else if(status == 1) {
|
|
|
+ str = "重复";
|
|
|
color = "#f50";
|
|
|
+ }else {
|
|
|
+ str = "异常"
|
|
|
+ color = "#000";
|
|
|
}
|
|
|
- return <Tag color={ color }>{str}</Tag>;
|
|
|
+ return <Tag color={color}>{str}</Tag>;
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
title: "批量导入时间",
|
|
|
- dataIndex: "daoTime",
|
|
|
- key: "daoTime"
|
|
|
+ dataIndex: "createTimes",
|
|
|
+ key: "createTimes"
|
|
|
},
|
|
|
{
|
|
|
title: "备注",
|
|
|
- dataIndex: "remake",
|
|
|
- key: "remake"
|
|
|
+ dataIndex: "remarks",
|
|
|
+ key: "remarks"
|
|
|
}
|
|
|
],
|
|
|
columnsDate: [
|
|
@@ -272,56 +288,7 @@ const HuiKuan = React.createClass({
|
|
|
}
|
|
|
],
|
|
|
dataSource: [],
|
|
|
- dataSource: [
|
|
|
- {
|
|
|
- id: 1,
|
|
|
- orderNo: "w1",
|
|
|
- name: "张三",
|
|
|
- hetong: 3,
|
|
|
- benci: 1,
|
|
|
- huiTime: "2019-10-11",
|
|
|
- daoTime: "2019-10-11",
|
|
|
- remake: "hhhhh",
|
|
|
- key: "w1",
|
|
|
- status: 0
|
|
|
- },
|
|
|
- {
|
|
|
- id: 2,
|
|
|
- orderNo: "w2",
|
|
|
- name: "王五",
|
|
|
- hetong: 3,
|
|
|
- benci: 1,
|
|
|
- huiTime: "2019-10-11",
|
|
|
- daoTime: "2019-10-11",
|
|
|
- remake: "zzzzzz",
|
|
|
- key: "w2",
|
|
|
- status: 0
|
|
|
- },
|
|
|
- {
|
|
|
- id: 3,
|
|
|
- orderNo: "w3",
|
|
|
- name: "二麻子",
|
|
|
- hetong: 3,
|
|
|
- benci: 1,
|
|
|
- huiTime: "2019-10-11",
|
|
|
- daoTime: "2019-10-11",
|
|
|
- remake: "yyyyyyy",
|
|
|
- key: "w3",
|
|
|
- status: 1
|
|
|
- },
|
|
|
- {
|
|
|
- id: 4,
|
|
|
- orderNo: "w4",
|
|
|
- name: "jax",
|
|
|
- hetong: 3,
|
|
|
- benci: 1,
|
|
|
- huiTime: "2019-10-11",
|
|
|
- daoTime: "2019-10-11",
|
|
|
- remake: "bbbbbb",
|
|
|
- key: "w4",
|
|
|
- status: 1
|
|
|
- }
|
|
|
- ],
|
|
|
+
|
|
|
upLoadFlag: false,
|
|
|
upLoad: {
|
|
|
name: "file",
|
|
@@ -338,57 +305,6 @@ const HuiKuan = React.createClass({
|
|
|
|
|
|
this.state.upLoadFlag = true;
|
|
|
|
|
|
- let dataSource = [
|
|
|
- {
|
|
|
- id: 1,
|
|
|
- orderNo: "w1",
|
|
|
- name: "张三",
|
|
|
- hetong: 3,
|
|
|
- benci: 1,
|
|
|
- huiTime: "2019-10-11",
|
|
|
- daoTime: "2019-10-11",
|
|
|
- remake: "hhhhh",
|
|
|
- key: "w1",
|
|
|
- status: 0
|
|
|
- },
|
|
|
- {
|
|
|
- id: 2,
|
|
|
- orderNo: "w2",
|
|
|
- name: "王五",
|
|
|
- hetong: 3,
|
|
|
- benci: 1,
|
|
|
- huiTime: "2019-10-11",
|
|
|
- daoTime: "2019-10-11",
|
|
|
- remake: "zzzzzz",
|
|
|
- key: "w2",
|
|
|
- status: 0
|
|
|
- },
|
|
|
- {
|
|
|
- id: 3,
|
|
|
- orderNo: "w3",
|
|
|
- name: "二麻子",
|
|
|
- hetong: 3,
|
|
|
- benci: 1,
|
|
|
- huiTime: "2019-10-11",
|
|
|
- daoTime: "2019-10-11",
|
|
|
- remake: "yyyyyyy",
|
|
|
- key: "w3",
|
|
|
- status: 1
|
|
|
- },
|
|
|
- {
|
|
|
- id: 4,
|
|
|
- orderNo: "w4",
|
|
|
- name: "jax",
|
|
|
- hetong: 3,
|
|
|
- benci: 1,
|
|
|
- huiTime: "2019-10-11",
|
|
|
- daoTime: "2019-10-11",
|
|
|
- remake: "bbbbbb",
|
|
|
- key: "w4",
|
|
|
- status: 1
|
|
|
- }
|
|
|
- ];
|
|
|
-
|
|
|
this.setState({
|
|
|
upLoadFlag: this.state.upLoadFlag,
|
|
|
dataSource
|
|
@@ -425,7 +341,7 @@ const HuiKuan = React.createClass({
|
|
|
},
|
|
|
|
|
|
componentWillMount() {
|
|
|
- // this.loadData();
|
|
|
+ this.loadData();
|
|
|
this.departmentList();
|
|
|
|
|
|
$("#rcDialogTitle0").on("click", function() {
|
|
@@ -442,6 +358,7 @@ const HuiKuan = React.createClass({
|
|
|
this.state.orderUserName = "";
|
|
|
this.state.principalList = [];
|
|
|
this.state.payFrom = "";
|
|
|
+ this.state.orderStatus = [];
|
|
|
// this.loadData();
|
|
|
},
|
|
|
|
|
@@ -548,18 +465,18 @@ const HuiKuan = React.createClass({
|
|
|
}}
|
|
|
/>
|
|
|
<Select
|
|
|
- placeholder="订单部门"
|
|
|
+ placeholder="状态"
|
|
|
style={{ width: 150, marginRight: 10 }}
|
|
|
- value={this.state.departmenttList}
|
|
|
+ value={this.state.orderStatus}
|
|
|
onChange={e => {
|
|
|
- this.setState({ departmenttList: e });
|
|
|
+ this.setState({ orderStatus: e });
|
|
|
+ console.log("状态",e);
|
|
|
+
|
|
|
}}
|
|
|
>
|
|
|
- {departmentArr.map(function(item) {
|
|
|
- return (
|
|
|
- <Select.Option key={item.id}>{item.name}</Select.Option>
|
|
|
- );
|
|
|
- })}
|
|
|
+ <Select.Option key={0}>正常</Select.Option>
|
|
|
+ <Select.Option key={1}>重复</Select.Option>
|
|
|
+ <Select.Option key={2}>异常</Select.Option>
|
|
|
</Select>
|
|
|
|
|
|
<Input
|
|
@@ -592,7 +509,6 @@ const HuiKuan = React.createClass({
|
|
|
this.setState({ payFrom: e.target.value });
|
|
|
}}
|
|
|
/>
|
|
|
-
|
|
|
<Button
|
|
|
type="primary"
|
|
|
onClick={this.search}
|
|
@@ -625,8 +541,7 @@ const HuiKuan = React.createClass({
|
|
|
// zIndex: 99,
|
|
|
// left: 400,
|
|
|
// transform: "translateX(-50%)",
|
|
|
- display:
|
|
|
- this.state.dataSource.length != 0 ? "none" : "inline-block"
|
|
|
+ display:"inline-block"
|
|
|
}}
|
|
|
>
|
|
|
<Upload {...this.state.upLoad}>
|