|
@@ -1,6 +1,10 @@
|
|
import React,{Component} from "react";
|
|
import React,{Component} from "react";
|
|
import TabelContent from "../../../common/tabelContent";
|
|
import TabelContent from "../../../common/tabelContent";
|
|
-import {Button} from "antd";
|
|
|
|
|
|
+import {Button, message,Modal} from "antd";
|
|
|
|
+import $ from "jquery/src/ajax";
|
|
|
|
+import DunningRecord from "./dunningRecord";
|
|
|
|
+
|
|
|
|
+const confirm = Modal.confirm;
|
|
|
|
|
|
class PressMoney extends Component{
|
|
class PressMoney extends Component{
|
|
constructor(props) {
|
|
constructor(props) {
|
|
@@ -11,80 +15,97 @@ class PressMoney extends Component{
|
|
title: "序号",
|
|
title: "序号",
|
|
dataIndex: "key",
|
|
dataIndex: "key",
|
|
key: "key",
|
|
key: "key",
|
|
- width: 120,
|
|
|
|
|
|
+ width: 45,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: "合同编号",
|
|
title: "合同编号",
|
|
- dataIndex: "key",
|
|
|
|
- key: "key",
|
|
|
|
- width: 200,
|
|
|
|
|
|
+ dataIndex: "contractNo",
|
|
|
|
+ key: "contractNo",
|
|
|
|
+ width: 140,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: "客户名称",
|
|
title: "客户名称",
|
|
- dataIndex: "key",
|
|
|
|
- key: "key",
|
|
|
|
- width: 200,
|
|
|
|
|
|
+ dataIndex: "buyerName",
|
|
|
|
+ key: "buyerName",
|
|
|
|
+ width: 150,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: "订单负责人",
|
|
title: "订单负责人",
|
|
- dataIndex: "key",
|
|
|
|
- key: "key",
|
|
|
|
|
|
+ dataIndex: "salesmanName",
|
|
|
|
+ key: "salesmanName",
|
|
width: 120,
|
|
width: 120,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: "订单部门",
|
|
title: "订单部门",
|
|
- dataIndex: "key",
|
|
|
|
- key: "key",
|
|
|
|
|
|
+ dataIndex: "depName",
|
|
|
|
+ key: "depName",
|
|
width: 120,
|
|
width: 120,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: "签单金额(万元)",
|
|
title: "签单金额(万元)",
|
|
- dataIndex: "key",
|
|
|
|
- key: "key",
|
|
|
|
- width: 120,
|
|
|
|
|
|
+ dataIndex: "totalAmount",
|
|
|
|
+ key: "totalAmount",
|
|
|
|
+ width: 80,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: "已收款(万元)",
|
|
title: "已收款(万元)",
|
|
- dataIndex: "key",
|
|
|
|
- key: "key",
|
|
|
|
- width: 120,
|
|
|
|
|
|
+ dataIndex: "settlementAmount",
|
|
|
|
+ key: "settlementAmount",
|
|
|
|
+ width: 80,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: "应收款(万元)",
|
|
title: "应收款(万元)",
|
|
- dataIndex: "key",
|
|
|
|
- key: "key",
|
|
|
|
- width: 120,
|
|
|
|
|
|
+ dataIndex: "orderReceivables",
|
|
|
|
+ key: "orderReceivables",
|
|
|
|
+ width: 80,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: "欠款(万元)",
|
|
title: "欠款(万元)",
|
|
- dataIndex: "key",
|
|
|
|
- key: "key",
|
|
|
|
- width: 120,
|
|
|
|
|
|
+ dataIndex: "orderArrears",
|
|
|
|
+ key: "orderArrears",
|
|
|
|
+ width: 80,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: "催款启动日期",
|
|
title: "催款启动日期",
|
|
- dataIndex: "key",
|
|
|
|
- key: "key",
|
|
|
|
- width: 120,
|
|
|
|
|
|
+ dataIndex: "dunStartTimes",
|
|
|
|
+ key: "dunStartTimes",
|
|
|
|
+ width: 125,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: "自动移交法务(天)",
|
|
title: "自动移交法务(天)",
|
|
- dataIndex: "key",
|
|
|
|
- key: "key",
|
|
|
|
- width: 120,
|
|
|
|
|
|
+ dataIndex: "daysRemaining",
|
|
|
|
+ key: "daysRemaining",
|
|
|
|
+ width: 80,
|
|
|
|
+ render: (text) => {
|
|
|
|
+ return (
|
|
|
|
+ text === 0 ? '已移交法务' : text+'天'
|
|
|
|
+ )
|
|
|
|
+ }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: "操作",
|
|
title: "操作",
|
|
dataIndex: "id",
|
|
dataIndex: "id",
|
|
key: "id",
|
|
key: "id",
|
|
|
|
+ width: 250,
|
|
render: (text, record, index) => {
|
|
render: (text, record, index) => {
|
|
|
|
+ let _this = this;
|
|
return (
|
|
return (
|
|
- <div>
|
|
|
|
|
|
+ <div style={{display:'flex',alignItems:'center'}}>
|
|
<Button
|
|
<Button
|
|
|
|
+ disabled={record.daysRemaining === 0}
|
|
type="primary"
|
|
type="primary"
|
|
style={{marginRight: "10px",}}
|
|
style={{marginRight: "10px",}}
|
|
onClick={e => {
|
|
onClick={e => {
|
|
e.stopPropagation();
|
|
e.stopPropagation();
|
|
|
|
+ confirm({
|
|
|
|
+ title: '提醒',
|
|
|
|
+ content: '你确定移交法务吗?',
|
|
|
|
+ okText:'转交',
|
|
|
|
+ cancelText:'取消',
|
|
|
|
+ onOk() {
|
|
|
|
+ _this.transfer(record.orderNo);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
移交法务
|
|
移交法务
|
|
@@ -94,6 +115,10 @@ class PressMoney extends Component{
|
|
style={{marginRight: "10px",}}
|
|
style={{marginRight: "10px",}}
|
|
onClick={e => {
|
|
onClick={e => {
|
|
e.stopPropagation();
|
|
e.stopPropagation();
|
|
|
|
+ this.setState({
|
|
|
|
+ visible:true,
|
|
|
|
+ dataInfor:record
|
|
|
|
+ })
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
催款记录
|
|
催款记录
|
|
@@ -112,8 +137,84 @@ class PressMoney extends Component{
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
],
|
|
- searchList:[]
|
|
|
|
|
|
+ searchList:[
|
|
|
|
+ {
|
|
|
|
+ type:'text',
|
|
|
|
+ dataKey:'userName',
|
|
|
|
+ placeholder:'请输入客户名称'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ type:'text',
|
|
|
|
+ dataKey:'contractNo',
|
|
|
|
+ placeholder:'请输入合同编号'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ type:'autoComplete',
|
|
|
|
+ dataKey:'aid',
|
|
|
|
+ api:'/api/admin/customer/listAdminByName',
|
|
|
|
+ search:'adminName',
|
|
|
|
+ placeholder:'请输入营销人名称'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ type:'departmentSelect',
|
|
|
|
+ dataKey:'depId',
|
|
|
|
+ placeholder:'请选择订单部门'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ type:'select',
|
|
|
|
+ dataKey:'legalAffairs',
|
|
|
|
+ placeholder:'请选择是否移交法务',
|
|
|
|
+ selectList:[
|
|
|
|
+ {
|
|
|
|
+ value:'1',
|
|
|
|
+ label:'已移交法务'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ value:'0',
|
|
|
|
+ label:'未移交法务'
|
|
|
|
+ },
|
|
|
|
+ ]
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ type:'times',
|
|
|
|
+ title:'催款启动',
|
|
|
|
+ dataKey:['startTime','endTime'],
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ visible: false
|
|
}
|
|
}
|
|
|
|
+ this.tabelContentRef=null;
|
|
|
|
+ this.transfer = this.transfer.bind(this);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ transfer(orderNo){
|
|
|
|
+ this.setState({
|
|
|
|
+ transferLoading: true
|
|
|
|
+ });
|
|
|
|
+ $.ajax({
|
|
|
|
+ method: "post",
|
|
|
|
+ dataType: "json",
|
|
|
|
+ crossDomain: false,
|
|
|
|
+ url:
|
|
|
|
+ globalConfig.context + "/api/admin/lagalAffairs/transfer",
|
|
|
|
+ data: {
|
|
|
|
+ orderNo
|
|
|
|
+ },
|
|
|
|
+ success: function (data) {
|
|
|
|
+ if(data.error.length){
|
|
|
|
+ message.warning(data.error[0].message);
|
|
|
|
+ }else{
|
|
|
|
+ message.success('移交成功');
|
|
|
|
+ this.tabelContentRef && this.tabelContentRef.onRefresh();
|
|
|
|
+ }
|
|
|
|
+ }.bind(this)
|
|
|
|
+ }).done(
|
|
|
|
+ function () {
|
|
|
|
+ this.setState({
|
|
|
|
+ transferLoading: false
|
|
|
|
+ });
|
|
|
|
+ }.bind(this)
|
|
|
|
+ );
|
|
}
|
|
}
|
|
|
|
|
|
render() {
|
|
render() {
|
|
@@ -125,21 +226,37 @@ class PressMoney extends Component{
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<TabelContent
|
|
<TabelContent
|
|
|
|
+ ref={ref => this.tabelContentRef = ref}
|
|
scroll={{ x: 0, y: 1000 }}
|
|
scroll={{ x: 0, y: 1000 }}
|
|
searchList={this.state.searchList}
|
|
searchList={this.state.searchList}
|
|
columns={this.state.columns}
|
|
columns={this.state.columns}
|
|
- tabelApi={'/api/admin/newOrder/statisticsList'}
|
|
|
|
- exportApi={'/api/admin/newOrder/statisticsListExprot'}
|
|
|
|
|
|
+ tabelApi={'/api/admin/lagalAffairs/orderList'}
|
|
|
|
+ exportApi={'/api/admin/lagalAffairs/orderList/Exprot'}
|
|
|
|
+ query={{type:0}}
|
|
|
|
+ exportExecProcessing={(data)=>{
|
|
|
|
+ data.type = 0;
|
|
|
|
+ return data;
|
|
|
|
+ }}
|
|
dataProcessing={(data)=>{
|
|
dataProcessing={(data)=>{
|
|
let theArr = [];
|
|
let theArr = [];
|
|
- for (let i = 0; i < data.data.length; i++) {
|
|
|
|
- let thisdata = data.data[i];
|
|
|
|
|
|
+ for (let i = 0; i < data.data.list.length; i++) {
|
|
|
|
+ let thisdata = data.data.list[i];
|
|
thisdata.key=i + 1;
|
|
thisdata.key=i + 1;
|
|
theArr.push(thisdata);
|
|
theArr.push(thisdata);
|
|
}
|
|
}
|
|
return theArr;
|
|
return theArr;
|
|
}}
|
|
}}
|
|
/>
|
|
/>
|
|
|
|
+ {this.state.visible && <DunningRecord
|
|
|
|
+ dataInfor={this.state.dataInfor}
|
|
|
|
+ visible={this.state.visible}
|
|
|
|
+ onCancel={()=>{
|
|
|
|
+ this.setState({
|
|
|
|
+ visible:false,
|
|
|
|
+ dataInfor:{}
|
|
|
|
+ })
|
|
|
|
+ }}
|
|
|
|
+ />}
|
|
</div>
|
|
</div>
|
|
)
|
|
)
|
|
}
|
|
}
|