|
@@ -1,5 +1,5 @@
|
|
|
import React from "react";
|
|
|
-import { Button, Input, Spin, Table, message, Form, Modal, Tabs } from "antd";
|
|
|
+import { Button, Input, Spin, Table, message, Form, Modal, Tabs, Select, DatePicker } from "antd";
|
|
|
import $ from "jquery/src/ajax";
|
|
|
import {
|
|
|
getNewOrderStatus,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
getboutique,
|
|
|
getCuikuan,
|
|
|
getProjectStatus,
|
|
|
- ShowModal
|
|
|
+ ShowModal,
|
|
|
} from "@/tools.js";
|
|
|
import "./customer.less";
|
|
|
import { ChangeDetail } from "./changeComponent/changeDetailCwzy.js";
|
|
@@ -17,6 +17,7 @@ import { SearchInput } from "./changeComponent/searchInput.js";
|
|
|
import OrderDetail from "./changeComponent/orderDetail";
|
|
|
import { ChooseList } from "./chooseList.jsx";
|
|
|
import ShowModalDiv from "@/showModal.jsx";
|
|
|
+const { RangePicker } = DatePicker;
|
|
|
|
|
|
const contractChange = Form.create()(
|
|
|
React.createClass({
|
|
@@ -39,7 +40,10 @@ const contractChange = Form.create()(
|
|
|
endTime: this.state.searchData.releaseDate[1],
|
|
|
salesmanName: this.state.searchData.salesmanNameSearch,
|
|
|
complete: this.state.searchData.completeSearch || 1,
|
|
|
- depId: this.state.searchData.depIdSearch
|
|
|
+ depId: this.state.searchData.depIdSearch,
|
|
|
+ orderNo: this.state.searchData.orderNoSearch,
|
|
|
+ contractNo: this.state.searchData.contractNoSearch,
|
|
|
+ type: this.state.searchData.changeSearch
|
|
|
},
|
|
|
success: function(data) {
|
|
|
ShowModal(this);
|
|
@@ -68,6 +72,7 @@ const contractChange = Form.create()(
|
|
|
type: thisdata.type,
|
|
|
status: thisdata.status,
|
|
|
id: thisdata.id,
|
|
|
+ contractNo: thisdata.contractNo,
|
|
|
processStateText: getProcessStatusNew(
|
|
|
thisdata.processState,
|
|
|
thisdata.status
|
|
@@ -132,6 +137,11 @@ const contractChange = Form.create()(
|
|
|
},
|
|
|
columns: [
|
|
|
{
|
|
|
+ title: "合同编号",
|
|
|
+ dataIndex: "contractNo",
|
|
|
+ key: "contractNo"
|
|
|
+ },
|
|
|
+ {
|
|
|
title: "订单编号",
|
|
|
dataIndex: "orderNo",
|
|
|
key: "orderNo"
|
|
@@ -302,6 +312,44 @@ const contractChange = Form.create()(
|
|
|
]
|
|
|
};
|
|
|
},
|
|
|
+ departmentList() {
|
|
|
+ this.setState({
|
|
|
+ loading: true
|
|
|
+ });
|
|
|
+ $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + "/api/admin/organization/selectSuperId",
|
|
|
+ data: {},
|
|
|
+ success: function(data) {
|
|
|
+ let thedata = data.data;
|
|
|
+ let theArr = [];
|
|
|
+ if (!thedata) {
|
|
|
+ if (data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ thedata.map(function(item, index) {
|
|
|
+ theArr.push({
|
|
|
+ key: index,
|
|
|
+ name: item.name,
|
|
|
+ id: item.id
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ this.setState({
|
|
|
+ departmentArr: theArr
|
|
|
+ });
|
|
|
+ }.bind(this)
|
|
|
+ }).always(
|
|
|
+ function() {
|
|
|
+ this.setState({
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
+ }.bind(this)
|
|
|
+ );
|
|
|
+ },
|
|
|
//页面加载函数
|
|
|
componentWillMount() {
|
|
|
this.loadData();
|
|
@@ -382,7 +430,6 @@ const contractChange = Form.create()(
|
|
|
: []
|
|
|
});
|
|
|
console.log("url", this.state.voucherUrl);
|
|
|
-
|
|
|
}
|
|
|
}.bind(this)
|
|
|
});
|
|
@@ -465,7 +512,7 @@ const contractChange = Form.create()(
|
|
|
? splitUrl(
|
|
|
thisdata.contractPictureUrl,
|
|
|
",",
|
|
|
- globalConfig.avatarHost + "/upload",
|
|
|
+ globalConfig.avatarHost + "/upload"
|
|
|
)
|
|
|
: []
|
|
|
});
|
|
@@ -1034,21 +1081,246 @@ const contractChange = Form.create()(
|
|
|
};
|
|
|
const FormItem = Form.Item;
|
|
|
const { TabPane } = Tabs;
|
|
|
+ const departmentArr = this.state.departmentArr || [];
|
|
|
return (
|
|
|
<div className="user-content" style={{ position: "relative" }}>
|
|
|
<ShowModalDiv ShowModal={this.state.showModal} />
|
|
|
- <div className="content-title">
|
|
|
- <span>合同变更审核订单</span>
|
|
|
+ <div className="content-title" style={{ marginBottom: 10 }}>
|
|
|
+ <span style={{ fontWeight: 900, fontSize: 16 }}>
|
|
|
+ 合同变更审核订单
|
|
|
+ </span>
|
|
|
</div>
|
|
|
<div className="user-search">
|
|
|
- <SearchInput search={this.search} />
|
|
|
+ {/* <SearchInput search={this.search} /> */}
|
|
|
|
|
|
- <ChooseList
|
|
|
+ {/* <ChooseList
|
|
|
columns={this.state.columns}
|
|
|
changeFn={this.changeList}
|
|
|
changeList={this.state.changeList}
|
|
|
top={55}
|
|
|
- />
|
|
|
+ /> */}
|
|
|
+ <Tabs
|
|
|
+ defaultActiveKey="2"
|
|
|
+ onChange={this.callbackTab}
|
|
|
+ className="test"
|
|
|
+ >
|
|
|
+ <TabPane tab="更改表格显示数据" key="1">
|
|
|
+ <div style={{ marginLeft: 10 }}>
|
|
|
+ <ChooseList
|
|
|
+ columns={this.state.columns}
|
|
|
+ changeFn={this.changeList}
|
|
|
+ changeList={this.state.changeList}
|
|
|
+ top={55}
|
|
|
+ margin={11}
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </TabPane>
|
|
|
+ <TabPane tab="搜索" key="2">
|
|
|
+ <div style={{ marginLeft: 10 }}>
|
|
|
+ <SearchInput search={this.search} />
|
|
|
+ </div>
|
|
|
+ {/* <div className="user-search" style={{ marginLeft: 10 }}>
|
|
|
+ <Input
|
|
|
+ placeholder="订单编号"
|
|
|
+ value={this.state.orderNoSearch}
|
|
|
+ onChange={e => {
|
|
|
+ this.setState({ orderNoSearch: e.target.value });
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ <Input
|
|
|
+ placeholder="客户名称"
|
|
|
+ value={this.state.nameSearch}
|
|
|
+ onChange={e => {
|
|
|
+ this.setState({ nameSearch: e.target.value });
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ <Select
|
|
|
+ placeholder="订单部门"
|
|
|
+ style={{ width: 150, marginRight: 10 }}
|
|
|
+ value={this.state.departmenttList}
|
|
|
+ onChange={e => {
|
|
|
+ this.setState({ departmenttList: e });
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {departmentArr.map(function(item) {
|
|
|
+ return (
|
|
|
+ <Select.Option key={item.id}>{item.name}</Select.Option>
|
|
|
+ );
|
|
|
+ })}
|
|
|
+ </Select>
|
|
|
+ <Input
|
|
|
+ placeholder="合同编号"
|
|
|
+ value={this.state.contractNoSearch}
|
|
|
+ onChange={e => {
|
|
|
+ this.setState({
|
|
|
+ contractNoSearch: e.target.value
|
|
|
+ });
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ <Select
|
|
|
+ placeholder="流程状态"
|
|
|
+ onChange={e => {
|
|
|
+ this.setState({ processStatusSearch: e });
|
|
|
+ }}
|
|
|
+ style={{ width: 160, marginRight: 5 }}
|
|
|
+ value={this.state.processStatusSearch}
|
|
|
+ >
|
|
|
+ <Option value="3">未分配</Option>
|
|
|
+ <Option value="4">已分配</Option>
|
|
|
+ </Select>
|
|
|
+ <Select
|
|
|
+ placeholder="结算状态"
|
|
|
+ onChange={e => {
|
|
|
+ this.setState({ liquidationStatus: e });
|
|
|
+ }}
|
|
|
+ style={{ width: 160, marginRight: 5 }}
|
|
|
+ value={this.state.liquidationStatus}
|
|
|
+ >
|
|
|
+ <Option value="0">首付待付清</Option>
|
|
|
+ <Option value="1">尾款待付清</Option>
|
|
|
+ <Option value="2">已付清</Option>
|
|
|
+ </Select>
|
|
|
+ <span style={{}}>下单日期:</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 });
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ <span style={{}}>最近收款:</span>
|
|
|
+ <RangePicker
|
|
|
+ value={[
|
|
|
+ this.state.shouKuanDate[0]
|
|
|
+ ? moment(this.state.shouKuanDate[0])
|
|
|
+ : null,
|
|
|
+ this.state.shouKuanDate[1]
|
|
|
+ ? moment(this.state.shouKuanDate[1])
|
|
|
+ : null
|
|
|
+ ]}
|
|
|
+ onChange={(data, dataString) => {
|
|
|
+ this.setState({ shouKuanDate: dataString });
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ onClick={this.loadData}
|
|
|
+ style={{ marginLeft: 10 }}
|
|
|
+ >
|
|
|
+ 搜索
|
|
|
+ </Button>
|
|
|
+ <Button onClick={this.reset}>重置</Button>
|
|
|
+ </div> */}
|
|
|
+ </TabPane>
|
|
|
+ {/* <TabPane tab="打印" key="3">
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ style={{ margin: "11px 0px 10px 10px" }}
|
|
|
+ onClick={this.printAll}
|
|
|
+ disabled={!this.state.dataSource.length}
|
|
|
+ >
|
|
|
+ 打印所有列表信息
|
|
|
+ </Button>
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ disabled={this.state.selectedRowKeys.length != 1}
|
|
|
+ style={{ margin: "11px 0px 10px 10px" }}
|
|
|
+ onClick={() => {
|
|
|
+ this.inRecordData();
|
|
|
+ this.setState({
|
|
|
+ bvisible: true
|
|
|
+ });
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 打印开票详情
|
|
|
+ </Button>
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ disabled={this.state.selectedRowKeys.length != 1}
|
|
|
+ style={{ margin: "11px 0px 10px 10px" }}
|
|
|
+ onClick={() => {
|
|
|
+ this.waterData();
|
|
|
+ this.setState({
|
|
|
+ cvisible: true
|
|
|
+ });
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 打印收款流水
|
|
|
+ </Button>
|
|
|
+ </TabPane>
|
|
|
+ <TabPane tab="导出Excel" key="4">
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ style={{ margin: "11px 0px 10px 10px" }}
|
|
|
+ onClick={this.exportAll}
|
|
|
+ >
|
|
|
+ 导出当前列表
|
|
|
+ </Button>
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ disabled={this.state.selectedRowKeys.length != 1}
|
|
|
+ style={{ margin: "11px 0px 10px 10px" }}
|
|
|
+ onClick={this.exportKaip}
|
|
|
+ >
|
|
|
+ 导出所选开票详情
|
|
|
+ </Button>
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ disabled={this.state.selectedRowKeys.length != 1}
|
|
|
+ style={{ margin: "11px 0px 10px 10px" }}
|
|
|
+ onClick={this.exportWater}
|
|
|
+ >
|
|
|
+ 导出所选收款详情流水
|
|
|
+ </Button>
|
|
|
+ </TabPane>
|
|
|
+ <TabPane tab="查看" key="5">
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ disabled={this.state.selectedRowKeys.length != 1}
|
|
|
+ style={{ margin: "11px 0px 10px 10px" }}
|
|
|
+ onClick={() => {
|
|
|
+ this.inRecordData();
|
|
|
+ this.setState({
|
|
|
+ bvisible: true
|
|
|
+ });
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 查看开票详情
|
|
|
+ </Button>
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ disabled={this.state.selectedRowKeys.length != 1}
|
|
|
+ style={{ margin: "11px 0px 10px 10px" }}
|
|
|
+ onClick={() => {
|
|
|
+ this.waterData();
|
|
|
+ this.setState({
|
|
|
+ cvisible: true
|
|
|
+ });
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 详情收款流水
|
|
|
+ </Button>
|
|
|
+ </TabPane> */}
|
|
|
+ {/* <TabPane tab="批量操作" key="6">
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ disabled={this.state.selectedRowKeys.length == 0}
|
|
|
+ style={{ margin: "0px 0px 10px 10px" }}
|
|
|
+ onClick={e => {
|
|
|
+ e.stopPropagation(),
|
|
|
+ this.evaluateY(this.state.selectedRowKeys, "财务专员");
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 转交
|
|
|
+ </Button>
|
|
|
+ </TabPane> */}
|
|
|
+ </Tabs>
|
|
|
|
|
|
<div className="patent-table">
|
|
|
<Spin spinning={this.state.loading}>
|