|
@@ -1,9 +1,10 @@
|
|
import React, { Component } from "react";
|
|
import React, { Component } from "react";
|
|
-import { Form, Upload, Modal, Input, DatePicker } from "antd";
|
|
|
|
|
|
+import { Form, Upload, Modal, Input, DatePicker, Button } from "antd";
|
|
import AgreeButton from "./agreeButton.js";
|
|
import AgreeButton from "./agreeButton.js";
|
|
import Rizhi from "./rizhi.js";
|
|
import Rizhi from "./rizhi.js";
|
|
import moment from "moment";
|
|
import moment from "moment";
|
|
import { getProcessStatusNew } from "@/tools.js";
|
|
import { getProcessStatusNew } from "@/tools.js";
|
|
|
|
+import ReactToPrint from "react-to-print";
|
|
|
|
|
|
const formItemLayout = {
|
|
const formItemLayout = {
|
|
labelCol: { span: 8 },
|
|
labelCol: { span: 8 },
|
|
@@ -342,240 +343,252 @@ class ChangeDetail extends Component {
|
|
const orgCodeUrl = this.props.pictureUrl;
|
|
const orgCodeUrl = this.props.pictureUrl;
|
|
|
|
|
|
return (
|
|
return (
|
|
- <div>
|
|
|
|
- {pageData.map((item, index) => {
|
|
|
|
- return <Itemlist key={index} pageData={item} />;
|
|
|
|
- })}
|
|
|
|
- <Form.Item
|
|
|
|
- label="变更凭证"
|
|
|
|
- labelCol={{ span: 4 }}
|
|
|
|
- wrapperCol={{ span: 18 }}
|
|
|
|
|
|
+ <div className="clearfix">
|
|
|
|
+ <div
|
|
|
|
+ className="clearfix"
|
|
|
|
+ style={{ marginTop: 20 }}
|
|
|
|
+ ref={e => {
|
|
|
|
+ this.refs = e;
|
|
|
|
+ }}
|
|
>
|
|
>
|
|
- <Upload
|
|
|
|
- className="demandDetailShow-upload"
|
|
|
|
- listType="picture-card"
|
|
|
|
- fileList={orgCodeUrl}
|
|
|
|
- onPreview={file => {
|
|
|
|
- this.setState({
|
|
|
|
- previewImage: file.url || file.thumbUrl,
|
|
|
|
- previewVisible: true
|
|
|
|
- });
|
|
|
|
- }}
|
|
|
|
- />
|
|
|
|
- <Modal
|
|
|
|
- maskClosable={false}
|
|
|
|
- footer={null}
|
|
|
|
- visible={this.state.previewVisible}
|
|
|
|
- onCancel={() => {
|
|
|
|
- this.setState({ previewVisible: false }, () => {
|
|
|
|
- this.foo.reset();
|
|
|
|
- });
|
|
|
|
- }}
|
|
|
|
|
|
+ <h2 style={{ textAlign: "center", marginBottom: 10 }}>
|
|
|
|
+ 合同变更记录
|
|
|
|
+ </h2>
|
|
|
|
+ {pageData.map((item, index) => {
|
|
|
|
+ return <Itemlist key={index} pageData={item} />;
|
|
|
|
+ })}
|
|
|
|
+ <Form.Item
|
|
|
|
+ label="变更凭证"
|
|
|
|
+ labelCol={{ span: 4 }}
|
|
|
|
+ wrapperCol={{ span: 18 }}
|
|
>
|
|
>
|
|
- <img
|
|
|
|
- alt=""
|
|
|
|
- style={{ width: "100%" }}
|
|
|
|
- src={this.state.previewImage || ""}
|
|
|
|
|
|
+ <Upload
|
|
|
|
+ className="demandDetailShow-upload"
|
|
|
|
+ listType="picture-card"
|
|
|
|
+ fileList={orgCodeUrl}
|
|
|
|
+ onPreview={file => {
|
|
|
|
+ this.setState({
|
|
|
|
+ previewImage: file.url || file.thumbUrl,
|
|
|
|
+ previewVisible: true
|
|
|
|
+ });
|
|
|
|
+ }}
|
|
/>
|
|
/>
|
|
- </Modal>
|
|
|
|
- <Rizhi changeId={this.props.data.id} />
|
|
|
|
- </Form.Item>
|
|
|
|
- {this.props.data.type === 0 ? (
|
|
|
|
- <div>
|
|
|
|
- <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
|
|
|
|
- 当前项目进度(咨询师经理填写)
|
|
|
|
- </h3>
|
|
|
|
- {planData.map((item, index) => {
|
|
|
|
- return <Itemlist key={index} pageData={item} />;
|
|
|
|
- })}
|
|
|
|
- </div>
|
|
|
|
- ) : (
|
|
|
|
- ""
|
|
|
|
- )}
|
|
|
|
- {(this.props.data.processState > 5 &&
|
|
|
|
- this.props.data.processState <= 8) ||
|
|
|
|
- (this.props.data.processState === 9 && this.props.data.status === 4) ? (
|
|
|
|
- <div>
|
|
|
|
- <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
|
|
|
|
- 当前财务状态(财务填写)
|
|
|
|
- </h3>
|
|
|
|
- <div className="clearfix">
|
|
|
|
- <Form.Item
|
|
|
|
- className="half-item"
|
|
|
|
- label="收款时间"
|
|
|
|
- labelCol={{ span: 8 }}
|
|
|
|
- wrapperCol={{ span: 14 }}
|
|
|
|
- >
|
|
|
|
- <span>{this.props.data.paymentTimes}</span>
|
|
|
|
- </Form.Item>
|
|
|
|
- <Form.Item
|
|
|
|
- className="half-item"
|
|
|
|
- label="收款金额(万元)"
|
|
|
|
- labelCol={{ span: 8 }}
|
|
|
|
- wrapperCol={{ span: 14 }}
|
|
|
|
- >
|
|
|
|
- <span>{this.props.data.paymentAmount}</span>
|
|
|
|
- </Form.Item>
|
|
|
|
- </div>
|
|
|
|
- <div className="clearfix">
|
|
|
|
- <Form.Item
|
|
|
|
- className="half-item"
|
|
|
|
- label="开票时间"
|
|
|
|
- labelCol={{ span: 8 }}
|
|
|
|
- wrapperCol={{ span: 14 }}
|
|
|
|
- >
|
|
|
|
- <span>{this.props.data.invoiceTimes}</span>
|
|
|
|
- </Form.Item>
|
|
|
|
- <Form.Item
|
|
|
|
- className="half-item"
|
|
|
|
- label="开票金额(万元)"
|
|
|
|
- labelCol={{ span: 8 }}
|
|
|
|
- wrapperCol={{ span: 14 }}
|
|
|
|
- >
|
|
|
|
- <span>{this.props.data.invoiceAmount}</span>
|
|
|
|
- </Form.Item>
|
|
|
|
- </div>
|
|
|
|
- {financeData.map((item, index) => {
|
|
|
|
- return <Itemlist key={index} pageData={item} />;
|
|
|
|
- })}
|
|
|
|
- </div>
|
|
|
|
- ) : (
|
|
|
|
- <div style={{ marginBottom: 10 }}>
|
|
|
|
- <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
|
|
|
|
- 当前财务状态(财务填写)
|
|
|
|
- </h3>
|
|
|
|
- <div className="clearfix">
|
|
|
|
- <Form.Item
|
|
|
|
- className="half-item"
|
|
|
|
- label="收款时间"
|
|
|
|
- labelCol={{ span: 8 }}
|
|
|
|
- wrapperCol={{ span: 14 }}
|
|
|
|
- >
|
|
|
|
- <DatePicker
|
|
|
|
- style={{ width: 160 }}
|
|
|
|
- value={
|
|
|
|
- this.state.paymentTimes
|
|
|
|
- ? moment(this.state.paymentTimes)
|
|
|
|
- : null
|
|
|
|
- }
|
|
|
|
- onChange={(_data, dataString) => {
|
|
|
|
- this.setState({
|
|
|
|
- paymentTimes: dataString
|
|
|
|
- });
|
|
|
|
- }}
|
|
|
|
- />
|
|
|
|
- </Form.Item>
|
|
|
|
- <Form.Item
|
|
|
|
- className="half-item"
|
|
|
|
- label="收款金额(万元)"
|
|
|
|
- labelCol={{ span: 8 }}
|
|
|
|
- wrapperCol={{ span: 14 }}
|
|
|
|
- >
|
|
|
|
- <Input
|
|
|
|
- style={{ width: 160 }}
|
|
|
|
- value={this.state.paymentAmount}
|
|
|
|
- placeholder="请输入收款金额"
|
|
|
|
- onChange={e => {
|
|
|
|
- this.setState({
|
|
|
|
- paymentAmount: e.target.value
|
|
|
|
- });
|
|
|
|
- }}
|
|
|
|
- />
|
|
|
|
- </Form.Item>
|
|
|
|
- </div>
|
|
|
|
- <div className="clearfix">
|
|
|
|
- <Form.Item
|
|
|
|
- className="half-item"
|
|
|
|
- label="开票时间"
|
|
|
|
- labelCol={{ span: 8 }}
|
|
|
|
- wrapperCol={{ span: 14 }}
|
|
|
|
- >
|
|
|
|
- <DatePicker
|
|
|
|
- style={{ width: 160 }}
|
|
|
|
- value={
|
|
|
|
- this.state.invoiceTimes
|
|
|
|
- ? moment(this.state.invoiceTimes)
|
|
|
|
- : null
|
|
|
|
- }
|
|
|
|
- onChange={(_data, dataString) => {
|
|
|
|
- this.setState({
|
|
|
|
- invoiceTimes: dataString
|
|
|
|
- });
|
|
|
|
- }}
|
|
|
|
- />
|
|
|
|
- </Form.Item>
|
|
|
|
- <Form.Item
|
|
|
|
- className="half-item"
|
|
|
|
- label="开票金额(万元)"
|
|
|
|
- labelCol={{ span: 8 }}
|
|
|
|
- wrapperCol={{ span: 14 }}
|
|
|
|
- >
|
|
|
|
- <Input
|
|
|
|
- style={{ width: 160 }}
|
|
|
|
- value={this.state.invoiceAmount}
|
|
|
|
- placeholder="请输入开票金额"
|
|
|
|
- onChange={e => {
|
|
|
|
- this.setState({
|
|
|
|
- invoiceAmount: e.target.value
|
|
|
|
- });
|
|
|
|
- }}
|
|
|
|
- />
|
|
|
|
- </Form.Item>
|
|
|
|
- <Form.Item
|
|
|
|
- className="half-item"
|
|
|
|
- label="发生成本(万元)"
|
|
|
|
- labelCol={{ span: 8 }}
|
|
|
|
- wrapperCol={{ span: 14 }}
|
|
|
|
- >
|
|
|
|
- <Input
|
|
|
|
- style={{ width: 160 }}
|
|
|
|
- value={this.state.cwCost}
|
|
|
|
- placeholder="请输入发生成本"
|
|
|
|
- onChange={e => {
|
|
|
|
- this.setState({
|
|
|
|
- cwCost: e.target.value
|
|
|
|
- });
|
|
|
|
- }}
|
|
|
|
- />
|
|
|
|
- </Form.Item>
|
|
|
|
- <Form.Item
|
|
|
|
- className="half-item"
|
|
|
|
- label="应退金额(万元)"
|
|
|
|
- labelCol={{ span: 8 }}
|
|
|
|
- wrapperCol={{ span: 14 }}
|
|
|
|
- >
|
|
|
|
- <Input
|
|
|
|
- style={{ width: 160 }}
|
|
|
|
- value={this.state.refundableAmount}
|
|
|
|
- placeholder="请输入应退金额"
|
|
|
|
- onChange={e => {
|
|
|
|
- this.setState({
|
|
|
|
- refundableAmount: e.target.value
|
|
|
|
- });
|
|
|
|
- }}
|
|
|
|
- />
|
|
|
|
- </Form.Item>
|
|
|
|
|
|
+ <Modal
|
|
|
|
+ maskClosable={false}
|
|
|
|
+ footer={null}
|
|
|
|
+ visible={this.state.previewVisible}
|
|
|
|
+ onCancel={() => {
|
|
|
|
+ this.setState({ previewVisible: false }, () => {
|
|
|
|
+ this.foo.reset();
|
|
|
|
+ });
|
|
|
|
+ }}
|
|
|
|
+ >
|
|
|
|
+ <img
|
|
|
|
+ alt=""
|
|
|
|
+ style={{ width: "100%" }}
|
|
|
|
+ src={this.state.previewImage || ""}
|
|
|
|
+ />
|
|
|
|
+ </Modal>
|
|
|
|
+ <Rizhi changeId={this.props.data.id} />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ {this.props.data.type === 0 ? (
|
|
|
|
+ <div>
|
|
|
|
+ <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
|
|
|
|
+ 当前项目进度(咨询师经理填写)
|
|
|
|
+ </h3>
|
|
|
|
+ {planData.map((item, index) => {
|
|
|
|
+ return <Itemlist key={index} pageData={item} />;
|
|
|
|
+ })}
|
|
</div>
|
|
</div>
|
|
|
|
+ ) : (
|
|
|
|
+ ""
|
|
|
|
+ )}
|
|
|
|
+ {(this.props.data.processState > 5 &&
|
|
|
|
+ this.props.data.processState <= 8) ||
|
|
|
|
+ (this.props.data.processState === 9 &&
|
|
|
|
+ this.props.data.status === 4) ? (
|
|
<div>
|
|
<div>
|
|
- <Form.Item
|
|
|
|
- label="补充资料/备注"
|
|
|
|
- labelCol={{ span: 4 }}
|
|
|
|
- wrapperCol={{ span: 14 }}
|
|
|
|
- >
|
|
|
|
- <Input.TextArea
|
|
|
|
- rows={4}
|
|
|
|
- value={this.state.cwRemarks}
|
|
|
|
- placeholder="请输入补充资料/备注"
|
|
|
|
- onChange={e => {
|
|
|
|
- this.setState({
|
|
|
|
- cwRemarks: e.target.value
|
|
|
|
- });
|
|
|
|
- }}
|
|
|
|
- />
|
|
|
|
- </Form.Item>
|
|
|
|
|
|
+ <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
|
|
|
|
+ 当前财务状态(财务填写)
|
|
|
|
+ </h3>
|
|
|
|
+ <div className="clearfix">
|
|
|
|
+ <Form.Item
|
|
|
|
+ className="half-item"
|
|
|
|
+ label="收款时间"
|
|
|
|
+ labelCol={{ span: 8 }}
|
|
|
|
+ wrapperCol={{ span: 14 }}
|
|
|
|
+ >
|
|
|
|
+ <span>{this.props.data.paymentTimes}</span>
|
|
|
|
+ </Form.Item>
|
|
|
|
+ <Form.Item
|
|
|
|
+ className="half-item"
|
|
|
|
+ label="收款金额(万元)"
|
|
|
|
+ labelCol={{ span: 8 }}
|
|
|
|
+ wrapperCol={{ span: 14 }}
|
|
|
|
+ >
|
|
|
|
+ <span>{this.props.data.paymentAmount}</span>
|
|
|
|
+ </Form.Item>
|
|
|
|
+ </div>
|
|
|
|
+ <div className="clearfix">
|
|
|
|
+ <Form.Item
|
|
|
|
+ className="half-item"
|
|
|
|
+ label="开票时间"
|
|
|
|
+ labelCol={{ span: 8 }}
|
|
|
|
+ wrapperCol={{ span: 14 }}
|
|
|
|
+ >
|
|
|
|
+ <span>{this.props.data.invoiceTimes}</span>
|
|
|
|
+ </Form.Item>
|
|
|
|
+ <Form.Item
|
|
|
|
+ className="half-item"
|
|
|
|
+ label="开票金额(万元)"
|
|
|
|
+ labelCol={{ span: 8 }}
|
|
|
|
+ wrapperCol={{ span: 14 }}
|
|
|
|
+ >
|
|
|
|
+ <span>{this.props.data.invoiceAmount}</span>
|
|
|
|
+ </Form.Item>
|
|
|
|
+ </div>
|
|
|
|
+ {financeData.map((item, index) => {
|
|
|
|
+ return <Itemlist key={index} pageData={item} />;
|
|
|
|
+ })}
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
- )}
|
|
|
|
|
|
+ ) : (
|
|
|
|
+ <div style={{ marginBottom: 10 }}>
|
|
|
|
+ <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
|
|
|
|
+ 当前财务状态(财务填写)
|
|
|
|
+ </h3>
|
|
|
|
+ <div className="clearfix">
|
|
|
|
+ <Form.Item
|
|
|
|
+ className="half-item"
|
|
|
|
+ label="收款时间"
|
|
|
|
+ labelCol={{ span: 8 }}
|
|
|
|
+ wrapperCol={{ span: 14 }}
|
|
|
|
+ >
|
|
|
|
+ <DatePicker
|
|
|
|
+ style={{ width: 160 }}
|
|
|
|
+ value={
|
|
|
|
+ this.state.paymentTimes
|
|
|
|
+ ? moment(this.state.paymentTimes)
|
|
|
|
+ : null
|
|
|
|
+ }
|
|
|
|
+ onChange={(_data, dataString) => {
|
|
|
|
+ this.setState({
|
|
|
|
+ paymentTimes: dataString
|
|
|
|
+ });
|
|
|
|
+ }}
|
|
|
|
+ />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ <Form.Item
|
|
|
|
+ className="half-item"
|
|
|
|
+ label="收款金额(万元)"
|
|
|
|
+ labelCol={{ span: 8 }}
|
|
|
|
+ wrapperCol={{ span: 14 }}
|
|
|
|
+ >
|
|
|
|
+ <Input
|
|
|
|
+ style={{ width: 160 }}
|
|
|
|
+ value={this.state.paymentAmount}
|
|
|
|
+ placeholder="请输入收款金额"
|
|
|
|
+ onChange={e => {
|
|
|
|
+ this.setState({
|
|
|
|
+ paymentAmount: e.target.value
|
|
|
|
+ });
|
|
|
|
+ }}
|
|
|
|
+ />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ </div>
|
|
|
|
+ <div className="clearfix">
|
|
|
|
+ <Form.Item
|
|
|
|
+ className="half-item"
|
|
|
|
+ label="开票时间"
|
|
|
|
+ labelCol={{ span: 8 }}
|
|
|
|
+ wrapperCol={{ span: 14 }}
|
|
|
|
+ >
|
|
|
|
+ <DatePicker
|
|
|
|
+ style={{ width: 160 }}
|
|
|
|
+ value={
|
|
|
|
+ this.state.invoiceTimes
|
|
|
|
+ ? moment(this.state.invoiceTimes)
|
|
|
|
+ : null
|
|
|
|
+ }
|
|
|
|
+ onChange={(_data, dataString) => {
|
|
|
|
+ this.setState({
|
|
|
|
+ invoiceTimes: dataString
|
|
|
|
+ });
|
|
|
|
+ }}
|
|
|
|
+ />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ <Form.Item
|
|
|
|
+ className="half-item"
|
|
|
|
+ label="开票金额(万元)"
|
|
|
|
+ labelCol={{ span: 8 }}
|
|
|
|
+ wrapperCol={{ span: 14 }}
|
|
|
|
+ >
|
|
|
|
+ <Input
|
|
|
|
+ style={{ width: 160 }}
|
|
|
|
+ value={this.state.invoiceAmount}
|
|
|
|
+ placeholder="请输入开票金额"
|
|
|
|
+ onChange={e => {
|
|
|
|
+ this.setState({
|
|
|
|
+ invoiceAmount: e.target.value
|
|
|
|
+ });
|
|
|
|
+ }}
|
|
|
|
+ />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ <Form.Item
|
|
|
|
+ className="half-item"
|
|
|
|
+ label="发生成本(万元)"
|
|
|
|
+ labelCol={{ span: 8 }}
|
|
|
|
+ wrapperCol={{ span: 14 }}
|
|
|
|
+ >
|
|
|
|
+ <Input
|
|
|
|
+ style={{ width: 160 }}
|
|
|
|
+ value={this.state.cwCost}
|
|
|
|
+ placeholder="请输入发生成本"
|
|
|
|
+ onChange={e => {
|
|
|
|
+ this.setState({
|
|
|
|
+ cwCost: e.target.value
|
|
|
|
+ });
|
|
|
|
+ }}
|
|
|
|
+ />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ <Form.Item
|
|
|
|
+ className="half-item"
|
|
|
|
+ label="应退金额(万元)"
|
|
|
|
+ labelCol={{ span: 8 }}
|
|
|
|
+ wrapperCol={{ span: 14 }}
|
|
|
|
+ >
|
|
|
|
+ <Input
|
|
|
|
+ style={{ width: 160 }}
|
|
|
|
+ value={this.state.refundableAmount}
|
|
|
|
+ placeholder="请输入应退金额"
|
|
|
|
+ onChange={e => {
|
|
|
|
+ this.setState({
|
|
|
|
+ refundableAmount: e.target.value
|
|
|
|
+ });
|
|
|
|
+ }}
|
|
|
|
+ />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ </div>
|
|
|
|
+ <div>
|
|
|
|
+ <Form.Item
|
|
|
|
+ label="补充资料/备注"
|
|
|
|
+ labelCol={{ span: 4 }}
|
|
|
|
+ wrapperCol={{ span: 14 }}
|
|
|
|
+ >
|
|
|
|
+ <Input.TextArea
|
|
|
|
+ rows={4}
|
|
|
|
+ value={this.state.cwRemarks}
|
|
|
|
+ placeholder="请输入补充资料/备注"
|
|
|
|
+ onChange={e => {
|
|
|
|
+ this.setState({
|
|
|
|
+ cwRemarks: e.target.value
|
|
|
|
+ });
|
|
|
|
+ }}
|
|
|
|
+ />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ )}
|
|
|
|
+ </div>
|
|
{!(
|
|
{!(
|
|
(this.props.data.processState > 5 &&
|
|
(this.props.data.processState > 5 &&
|
|
this.props.data.processState <= 8) ||
|
|
this.props.data.processState <= 8) ||
|
|
@@ -606,6 +619,16 @@ class ChangeDetail extends Component {
|
|
) : (
|
|
) : (
|
|
""
|
|
""
|
|
)}
|
|
)}
|
|
|
|
+ <ReactToPrint
|
|
|
|
+ trigger={() => (
|
|
|
|
+ <div className="clearfix">
|
|
|
|
+ <Button type="primary" style={{ float: "right", marginTop: 10 }}>
|
|
|
|
+ 打印
|
|
|
|
+ </Button>
|
|
|
|
+ </div>
|
|
|
|
+ )}
|
|
|
|
+ content={() => this.refs}
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
);
|
|
);
|
|
}
|
|
}
|