|
@@ -15,67 +15,69 @@ const IntentionCustomer = Form.create()(React.createClass({
|
|
|
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,//订单编号
|
|
|
- depId: this.state.departmenttSearch,//订单部门
|
|
|
- adminName:this.state.adminName,//责任人名称
|
|
|
- starTime: this.state.releaseDate[0],//开始时间
|
|
|
- endTime: this.state.releaseDate[1],//结束时间
|
|
|
- },
|
|
|
- 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,
|
|
|
- id:thisdata.id,//ID
|
|
|
- orderNo: thisdata.orderNo,//订单编号
|
|
|
- totalAmount:thisdata.totalAmount,//签单金额
|
|
|
- settlementAmount:thisdata.settlementAmount,//已收款
|
|
|
- accountsReceivable:thisdata.accountsReceivable,//应收款
|
|
|
- uncollectedAmount:thisdata.uncollectedAmount,//应收款
|
|
|
- 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,//部门名称
|
|
|
- contractNo: thisdata.contractNo
|
|
|
-
|
|
|
- });
|
|
|
- };
|
|
|
- this.state.pagination.total = data.data.totalCount;
|
|
|
- };
|
|
|
- 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));
|
|
|
+ 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, //订单编号
|
|
|
+ depId: this.state.departmenttSearch, //订单部门
|
|
|
+ adminName: this.state.adminName, //责任人名称
|
|
|
+ starTime: this.state.releaseDate[0], //开始时间
|
|
|
+ endTime: this.state.releaseDate[1], //结束时间
|
|
|
+ newStatus: this.state.newStatus
|
|
|
+ },
|
|
|
+ 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,
|
|
|
+ id: thisdata.id, //ID
|
|
|
+ orderNo: thisdata.orderNo, //订单编号
|
|
|
+ totalAmount: thisdata.totalAmount, //签单金额
|
|
|
+ settlementAmount: thisdata.settlementAmount, //已收款
|
|
|
+ accountsReceivable: thisdata.accountsReceivable, //应收款
|
|
|
+ uncollectedAmount: thisdata.uncollectedAmount, //应收款
|
|
|
+ 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, //部门名称
|
|
|
+ contractNo: thisdata.contractNo
|
|
|
+ });
|
|
|
+ }
|
|
|
+ this.state.pagination.total = data.data.totalCount;
|
|
|
+ }
|
|
|
+ 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({
|
|
@@ -119,7 +121,8 @@ const IntentionCustomer = Form.create()(React.createClass({
|
|
|
}.bind(this));
|
|
|
},
|
|
|
getInitialState() {
|
|
|
- return {
|
|
|
+ return {
|
|
|
+ newStatus: 1,
|
|
|
page: 1,
|
|
|
releaseDate: [],
|
|
|
selectedRowKeys: [],
|
|
@@ -219,10 +222,10 @@ const IntentionCustomer = Form.create()(React.createClass({
|
|
|
{
|
|
|
title: "催收科目",
|
|
|
dataIndex: "dunSubject",
|
|
|
- key: "dunSubject",
|
|
|
- // render: text => {
|
|
|
- // return getjiedian(text);
|
|
|
- // }
|
|
|
+ key: "dunSubject"
|
|
|
+ // render: text => {
|
|
|
+ // return getjiedian(text);
|
|
|
+ // }
|
|
|
},
|
|
|
{
|
|
|
title: "催款启动日期",
|
|
@@ -233,7 +236,7 @@ const IntentionCustomer = Form.create()(React.createClass({
|
|
|
title: "签单时间",
|
|
|
dataIndex: "signDate",
|
|
|
key: "signDate"
|
|
|
- },
|
|
|
+ }
|
|
|
// {
|
|
|
// title: "催收操作",
|
|
|
// dataIndex: "abc",
|
|
@@ -399,6 +402,8 @@ const IntentionCustomer = Form.create()(React.createClass({
|
|
|
orderNo: this.state.orderNo?this.state.orderNo:undefined,//订单编号
|
|
|
starTime: this.state.releaseDate[0]?this.state.releaseDate[0]:undefined,
|
|
|
endTime: this.state.releaseDate[1]?this.state.releaseDate[1]:undefined,
|
|
|
+ pageSize: 9999,
|
|
|
+ newStatus: this.state.newStatus
|
|
|
}
|
|
|
window.location.href=(globalConfig.context+'/api/admin/newOrder/exportOrderDunData?'+$.param(data));
|
|
|
},
|
|
@@ -472,116 +477,204 @@ const IntentionCustomer = Form.create()(React.createClass({
|
|
|
},
|
|
|
};
|
|
|
let departmentArr = this.state.departmentArr || [];
|
|
|
- return(
|
|
|
- <div className="user-content">
|
|
|
- <div className="content-title">
|
|
|
- <span>催款节点统计</span>
|
|
|
- </div>
|
|
|
- <div className="user-search">
|
|
|
- <Input placeholder="客户名称" style={{width:'150px',marginBottom:'10px'}}
|
|
|
- value={this.state.customerName}
|
|
|
- onChange={(e) => { this.setState({ customerName: e.target.value }); }} />
|
|
|
- <Input placeholder="营销员名称" style={{width:'150px',marginBottom:'10px'}}
|
|
|
- value={this.state.adminName}
|
|
|
- onChange={(e) => { this.setState({ adminName: e.target.value }); }} />
|
|
|
- <Input placeholder="订单编号" style={{width:'150px'}}
|
|
|
- value={this.state.orderNo}
|
|
|
- onChange={(e) => { this.setState({ orderNo: e.target.value }); }} />
|
|
|
- <Select placeholder="选择部门"
|
|
|
- style={{ width: 150 ,marginRight:'10px'}}
|
|
|
- value={this.state.departmenttSearch}
|
|
|
- onChange={(e) => { this.setState({ departmenttSearch: e }) }}>
|
|
|
- {
|
|
|
- departmentArr.map(function (item) {
|
|
|
- return <Select.Option key={item.id} >{item.name}</Select.Option>
|
|
|
- })
|
|
|
+ return (
|
|
|
+ <div className="user-content">
|
|
|
+ <div className="content-title">
|
|
|
+ <span>催款节点统计</span>
|
|
|
+ </div>
|
|
|
+ <div className="user-search">
|
|
|
+ <Input
|
|
|
+ placeholder="客户名称"
|
|
|
+ style={{ width: "150px", marginBottom: "10px" }}
|
|
|
+ value={this.state.customerName}
|
|
|
+ onChange={e => {
|
|
|
+ this.setState({ customerName: e.target.value });
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ <Input
|
|
|
+ placeholder="营销员名称"
|
|
|
+ style={{ width: "150px", marginBottom: "10px" }}
|
|
|
+ value={this.state.adminName}
|
|
|
+ onChange={e => {
|
|
|
+ this.setState({ adminName: e.target.value });
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ <Input
|
|
|
+ placeholder="订单编号"
|
|
|
+ style={{ width: "150px" }}
|
|
|
+ value={this.state.orderNo}
|
|
|
+ onChange={e => {
|
|
|
+ this.setState({ orderNo: e.target.value });
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ <Select
|
|
|
+ placeholder="选择部门"
|
|
|
+ style={{ width: 150, marginRight: "10px" }}
|
|
|
+ value={this.state.departmenttSearch}
|
|
|
+ onChange={e => {
|
|
|
+ this.setState({ departmenttSearch: e });
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {departmentArr.map(function(item) {
|
|
|
+ return <Select.Option key={item.id}>{item.name}</Select.Option>;
|
|
|
+ })}
|
|
|
+ </Select>
|
|
|
+ <Select
|
|
|
+ placeholder="选择催款节点类型"
|
|
|
+ style={{ width: 150, marginRight: "10px" }}
|
|
|
+ value={this.state.newStatus == 0 ? "旧催款节点" : "新催款节点"}
|
|
|
+ onChange={e => {
|
|
|
+ this.setState({ newStatus: e });
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <Select.Option key={0}>{"旧催款节点"}</Select.Option>
|
|
|
+ <Select.Option key={1}>{"新催款节点"}</Select.Option>
|
|
|
+ </Select>
|
|
|
+ <span style={{ marginRight: "10px" }}>下单时间 :</span>
|
|
|
+ <RangePicker
|
|
|
+ value={[
|
|
|
+ this.state.releaseDate[0]
|
|
|
+ ? moment(this.state.releaseDate[0])
|
|
|
+ : null,
|
|
|
+ this.state.releaseDate[1]
|
|
|
+ ? moment(this.state.releaseDate[1])
|
|
|
+ : null
|
|
|
+ ]}
|
|
|
+ onChange={(data, dataString) => {
|
|
|
+ this.setState({ releaseDate: dataString });
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ onClick={this.search}
|
|
|
+ style={{ marginLeft: "10px" }}
|
|
|
+ >
|
|
|
+ 搜索
|
|
|
+ </Button>
|
|
|
+ <Button onClick={this.reset}>重置</Button>
|
|
|
+ <Button type="primary" onClick={this.exportExec}>
|
|
|
+ 导出催款列表
|
|
|
+ </Button>
|
|
|
+ <div className="patent-table">
|
|
|
+ <Spin spinning={this.state.loading}>
|
|
|
+ <Table
|
|
|
+ columns={this.state.columns}
|
|
|
+ dataSource={this.state.dataSource}
|
|
|
+ pagination={this.state.pagination}
|
|
|
+ onRowClick={this.tableRowClick}
|
|
|
+ scroll={{ x: "max-content", y: 0 }}
|
|
|
+ bordered
|
|
|
+ size="small"
|
|
|
+ />
|
|
|
+ </Spin>
|
|
|
+ </div>
|
|
|
+ <Modal
|
|
|
+ className="customeDetails"
|
|
|
+ footer=""
|
|
|
+ title="新增催款记录"
|
|
|
+ width="500px"
|
|
|
+ visible={this.state.visible}
|
|
|
+ onOk={this.visitOk}
|
|
|
+ onCancel={this.visitCancel}
|
|
|
+ >
|
|
|
+ <Form
|
|
|
+ layout="horizontal"
|
|
|
+ onSubmit={this.handleSubmit}
|
|
|
+ id="demand-form"
|
|
|
+ style={{ paddingBottom: "40px" }}
|
|
|
+ >
|
|
|
+ <Spin spinning={this.state.loading}>
|
|
|
+ <div className="clearfix">
|
|
|
+ <div className="clearfix">
|
|
|
+ <FormItem
|
|
|
+ className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="催款时间"
|
|
|
+ >
|
|
|
+ <DatePicker
|
|
|
+ style={{
|
|
|
+ marginTop: "2px",
|
|
|
+ width: "240px",
|
|
|
+ height: "32px"
|
|
|
+ }}
|
|
|
+ showTime
|
|
|
+ format="YYYY-MM-DD"
|
|
|
+ onOk={() => {}}
|
|
|
+ value={
|
|
|
+ this.state.dumTime ? moment(this.state.dumTime) : null
|
|
|
}
|
|
|
- </Select>
|
|
|
- <span style={{marginRight:"10px"}}>下单时间 :</span>
|
|
|
- <RangePicker
|
|
|
- value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
|
|
|
- this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
|
|
|
- onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
|
|
|
- <Button type="primary" onClick={this.search} style={{marginLeft:'10px'}}>搜索</Button>
|
|
|
- <Button onClick={this.reset}>重置</Button>
|
|
|
- <Button type="primary" onClick={this.exportExec} >导出催款列表</Button>
|
|
|
- <div className="patent-table">
|
|
|
- <Spin spinning={this.state.loading}>
|
|
|
- <Table columns={this.state.columns}
|
|
|
- dataSource={this.state.dataSource}
|
|
|
- scroll={{ x: 1500, y: 0 }}
|
|
|
- pagination={this.state.pagination}
|
|
|
- onRowClick={this.tableRowClick}
|
|
|
- bordered
|
|
|
- size="small"
|
|
|
- />
|
|
|
- </Spin>
|
|
|
- </div>
|
|
|
- <Modal
|
|
|
- className="customeDetails"
|
|
|
- footer=''
|
|
|
- title="新增催款记录"
|
|
|
- width='500px'
|
|
|
- visible={this.state.visible}
|
|
|
- onOk={this.visitOk}
|
|
|
- onCancel={this.visitCancel}
|
|
|
- >
|
|
|
- <Form layout="horizontal" onSubmit={this.handleSubmit} id="demand-form" style={{paddingBottom:'40px'}} >
|
|
|
- <Spin spinning={this.state.loading}>
|
|
|
- <div className="clearfix">
|
|
|
- <div className='clearfix'>
|
|
|
- <FormItem className="half-item" {...formItemLayout} label="催款时间">
|
|
|
- <DatePicker
|
|
|
- style={{marginTop:"2px",width: '240px',height:"32px" }}
|
|
|
- showTime
|
|
|
- format="YYYY-MM-DD"
|
|
|
- onOk={()=>{}}
|
|
|
- value={this.state.dumTime ? moment(this.state.dumTime) : null}
|
|
|
- onChange={(data, dataString) => { this.setState({ dumTime: dataString }); }} />
|
|
|
- </FormItem>
|
|
|
- </div>
|
|
|
- <div className='clearfix'>
|
|
|
- <FormItem
|
|
|
- labelCol={{ span: 4 }}
|
|
|
- wrapperCol={{ span: 16 }}
|
|
|
- label="催款情况" >
|
|
|
- <Input type="textarea" placeholder="请输入催款情况" rows={4} value={this.state.remarks}
|
|
|
- onChange={(e)=>{this.setState({remarks:e.target.value})}}/>
|
|
|
- </FormItem>
|
|
|
- </div>
|
|
|
- <div className='clearfix'>
|
|
|
- <Button className="cancel" type="primary" onClick={this.examOk} style={{marginLeft:"50px"}} htmlType="submit">添加</Button>
|
|
|
- <Button className="cancel" type="ghost" onClick={this.noCancel} style={{marginLeft:"50px"}}>取消</Button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </Spin>
|
|
|
- </Form>
|
|
|
- </Modal>
|
|
|
- <Modal
|
|
|
- className="customeDetails"
|
|
|
- footer=''
|
|
|
- title="催款记录查看"
|
|
|
- width='500px'
|
|
|
- visible={this.state.visibles}
|
|
|
- onOk={this.visitOks}
|
|
|
- onCancel={this.visitCancels}
|
|
|
- >
|
|
|
- <div className="user-content">
|
|
|
- <div className="patent-table">
|
|
|
- <Spin spinning={this.state.loading}>
|
|
|
- <Table columns={this.state.columnsX}
|
|
|
- dataSource={this.state.dataSources}
|
|
|
- rowSelection={rowSelection}
|
|
|
- pagination={this.state.paginations}
|
|
|
- onRowClick={this.tableRowClick}
|
|
|
- />
|
|
|
- </Spin>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </Modal>
|
|
|
- </div>
|
|
|
+ onChange={(data, dataString) => {
|
|
|
+ this.setState({ dumTime: dataString });
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <div className="clearfix">
|
|
|
+ <FormItem
|
|
|
+ labelCol={{ span: 4 }}
|
|
|
+ wrapperCol={{ span: 16 }}
|
|
|
+ label="催款情况"
|
|
|
+ >
|
|
|
+ <Input
|
|
|
+ type="textarea"
|
|
|
+ placeholder="请输入催款情况"
|
|
|
+ rows={4}
|
|
|
+ value={this.state.remarks}
|
|
|
+ onChange={e => {
|
|
|
+ this.setState({ remarks: e.target.value });
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <div className="clearfix">
|
|
|
+ <Button
|
|
|
+ className="cancel"
|
|
|
+ type="primary"
|
|
|
+ onClick={this.examOk}
|
|
|
+ style={{ marginLeft: "50px" }}
|
|
|
+ htmlType="submit"
|
|
|
+ >
|
|
|
+ 添加
|
|
|
+ </Button>
|
|
|
+ <Button
|
|
|
+ className="cancel"
|
|
|
+ type="ghost"
|
|
|
+ onClick={this.noCancel}
|
|
|
+ style={{ marginLeft: "50px" }}
|
|
|
+ >
|
|
|
+ 取消
|
|
|
+ </Button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </Spin>
|
|
|
+ </Form>
|
|
|
+ </Modal>
|
|
|
+ <Modal
|
|
|
+ className="customeDetails"
|
|
|
+ footer=""
|
|
|
+ title="催款记录查看"
|
|
|
+ width="500px"
|
|
|
+ visible={this.state.visibles}
|
|
|
+ onOk={this.visitOks}
|
|
|
+ onCancel={this.visitCancels}
|
|
|
+ >
|
|
|
+ <div className="user-content">
|
|
|
+ <div className="patent-table">
|
|
|
+ <Spin spinning={this.state.loading}>
|
|
|
+ <Table
|
|
|
+ columns={this.state.columnsX}
|
|
|
+ dataSource={this.state.dataSources}
|
|
|
+ rowSelection={rowSelection}
|
|
|
+ pagination={this.state.paginations}
|
|
|
+ onRowClick={this.tableRowClick}
|
|
|
+ />
|
|
|
+ </Spin>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- );
|
|
|
+ </Modal>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ );
|
|
|
}
|
|
|
}));
|
|
|
export default IntentionCustomer;
|