|
@@ -1,9 +1,12 @@
|
|
|
import React, { Component } from "react";
|
|
|
-import { Form, Upload, Modal, Button } from "antd";
|
|
|
+import { Form, Upload, Modal, Button, message, Input, Select } from "antd";
|
|
|
import AgreeButton from "./agreeButton.js";
|
|
|
import Rizhi from "./rizhi.js";
|
|
|
import { getProcessStatusNew } from "@/tools.js";
|
|
|
+import $ from "jquery/src/ajax";
|
|
|
// import ReactToPrint from "react-to-print";
|
|
|
+const FormItem = Form.Item;
|
|
|
+const { TextArea } = Input;
|
|
|
|
|
|
const formItemLayout = {
|
|
|
labelCol: { span: 8 },
|
|
@@ -83,10 +86,14 @@ class ChangeDetail extends Component {
|
|
|
super(props);
|
|
|
this.state = {
|
|
|
previewVisible: false,
|
|
|
- buttonStatus: true
|
|
|
+ buttonStatus: true,
|
|
|
+ dataSource: [],
|
|
|
+ reason: "",
|
|
|
+ rejectState: 0
|
|
|
};
|
|
|
this.getOrgCodeUrl = this.getOrgCodeUrl.bind(this);
|
|
|
this.changeButtonStatus = this.changeButtonStatus.bind(this);
|
|
|
+ this.loadDataChange = this.loadDataChange.bind(this);
|
|
|
}
|
|
|
|
|
|
getOrgCodeUrl(e) {
|
|
@@ -95,6 +102,37 @@ class ChangeDetail extends Component {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ loadDataChange() {
|
|
|
+ $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
|
|
|
+ data: {
|
|
|
+ changeId: this.props.data.id
|
|
|
+ },
|
|
|
+ success: function(data) {
|
|
|
+ if (data.error.length || data.data.list == "") {
|
|
|
+ if (data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.setState({
|
|
|
+ dataSource: data.data
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }.bind(this)
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ componentDidMount() {
|
|
|
+ window.setTimeout(() => {
|
|
|
+ this.loadDataChange();
|
|
|
+ }, 10);
|
|
|
+ console.log(this.props.processState);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
//同意拒绝按钮的有无
|
|
|
changeButtonStatus() {
|
|
|
this.setState({
|
|
@@ -152,7 +190,7 @@ class ChangeDetail extends Component {
|
|
|
dataB: this.props.data.changeAmount
|
|
|
},
|
|
|
{
|
|
|
- labelA: "备注",
|
|
|
+ labelA: "变更原因",
|
|
|
formItemLayoutA: formItemLayout,
|
|
|
dataA: this.props.data.remarks
|
|
|
}
|
|
@@ -295,7 +333,32 @@ class ChangeDetail extends Component {
|
|
|
</Modal>
|
|
|
<Rizhi changeId={this.props.data.id} />
|
|
|
</Form.Item>
|
|
|
- {this.props.data.type === 0 && this.props.data.processState >= 4 ? (
|
|
|
+
|
|
|
+ {/* <h2 style={{ textAlign: "center", marginBottom: 0 }}>变更日志</h2> */}
|
|
|
+ <ul
|
|
|
+ style={{
|
|
|
+ width: "868px",
|
|
|
+ overflow: "hidden",
|
|
|
+ paddingLeft: "90px",
|
|
|
+ marginBottom: "20px"
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {/* <span>操作人:</span> */}
|
|
|
+ {this.state.dataSource.map((item, index) => (
|
|
|
+ <li
|
|
|
+ key={index}
|
|
|
+ style={{
|
|
|
+ width: "100%",
|
|
|
+ height: "auto",
|
|
|
+ wordBreak: "break-all",
|
|
|
+ color: "black",
|
|
|
+ marginBottom: "10px"
|
|
|
+ }}
|
|
|
+ >{`${item.aname}: ${item.remarks}`}</li>
|
|
|
+ ))}
|
|
|
+ </ul>
|
|
|
+
|
|
|
+ {/* {this.props.data.type === 0 && this.props.data.processState >= 4 ? (
|
|
|
<div>
|
|
|
<h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
|
|
|
当前项目进度(咨询师经理填写)
|
|
@@ -306,8 +369,8 @@ class ChangeDetail extends Component {
|
|
|
</div>
|
|
|
) : (
|
|
|
""
|
|
|
- )}
|
|
|
- {this.props.data.type === 0 ? (
|
|
|
+ )} */}
|
|
|
+ {/* {this.props.data.type === 0 ? (
|
|
|
this.props.data.processState >= 5 ? (
|
|
|
<div>
|
|
|
<h3
|
|
@@ -333,26 +396,130 @@ class ChangeDetail extends Component {
|
|
|
</div>
|
|
|
) : (
|
|
|
""
|
|
|
- )}
|
|
|
+ )} */}
|
|
|
</div>
|
|
|
{this.props.data.status !== 4 ? (
|
|
|
this.state.buttonStatus ? (
|
|
|
- <div
|
|
|
- className="clearfix"
|
|
|
- style={{ display: "flex", justifyContent: "space-around" }}
|
|
|
- >
|
|
|
- {buttonData.map((item, index) => {
|
|
|
- return (
|
|
|
- <AgreeButton
|
|
|
- data={item}
|
|
|
- key={index}
|
|
|
- backData={this.props.data}
|
|
|
- processState={this.props.processState}
|
|
|
- visible={this.changeButtonStatus}
|
|
|
- loadData={this.props.loadData}
|
|
|
+ <div>
|
|
|
+ <div className="clearfix">
|
|
|
+ <FormItem
|
|
|
+ style={{ height: "auto" }}
|
|
|
+ labelCol={{ span: 4 }}
|
|
|
+ wrapperCol={{ span: 18 }}
|
|
|
+ label="备注"
|
|
|
+ >
|
|
|
+ <TextArea
|
|
|
+ rows={4}
|
|
|
+ placeholder="请输入备注信息"
|
|
|
+ style={{ width: "95%" }}
|
|
|
+ value={this.state.reason}
|
|
|
+ onChange={e => {
|
|
|
+ let reason = e.target.value;
|
|
|
+ this.setState({ reason });
|
|
|
+ }}
|
|
|
/>
|
|
|
- );
|
|
|
- })}
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div
|
|
|
+ className="clearfix"
|
|
|
+ style={{ display: "flex", justifyContent: "space-around" }}
|
|
|
+ >
|
|
|
+ {buttonData.map((item, index) => {
|
|
|
+ return (
|
|
|
+ <AgreeButton
|
|
|
+ data={item}
|
|
|
+ key={index}
|
|
|
+ backData={this.props.data}
|
|
|
+ processState={this.props.processState}
|
|
|
+ visible={this.changeButtonStatus}
|
|
|
+ loadData={this.props.loadData}
|
|
|
+ reason={this.state.reason}
|
|
|
+ rejectState={this.state.rejectState}
|
|
|
+ />
|
|
|
+ );
|
|
|
+ })}
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <Select
|
|
|
+ defaultValue="0"
|
|
|
+ style={{
|
|
|
+ width: 120,
|
|
|
+ float: "left",
|
|
|
+ position: "relative",
|
|
|
+ bottom: "28px",
|
|
|
+ right: "-600px"
|
|
|
+ }}
|
|
|
+ onChange={val => {
|
|
|
+ this.setState({ rejectState: val });
|
|
|
+ console.log(val, this.state.rejectState);
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <Option
|
|
|
+ value="0"
|
|
|
+ style={{
|
|
|
+ display: this.props.processState >= 1 ? "block" : "none"
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 营销员
|
|
|
+ </Option>
|
|
|
+ <Option
|
|
|
+ value="1"
|
|
|
+ style={{
|
|
|
+ display: this.props.processState >= 2 ? "block" : "none"
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 营销管理员
|
|
|
+ </Option>
|
|
|
+ <Option
|
|
|
+ value="2"
|
|
|
+ style={{
|
|
|
+ display: this.props.processState >= 3 ? "block" : "none"
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 技术员
|
|
|
+ </Option>
|
|
|
+ <Option
|
|
|
+ value="3"
|
|
|
+ style={{
|
|
|
+ display: this.props.processState >= 4 ? "block" : "none"
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 技术经理
|
|
|
+ </Option>
|
|
|
+ <Option
|
|
|
+ value="4"
|
|
|
+ style={{
|
|
|
+ display: this.props.processState >= 5 ? "block" : "none"
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 技术总监
|
|
|
+ </Option>
|
|
|
+ <Option
|
|
|
+ value="5"
|
|
|
+ style={{
|
|
|
+ display: this.props.processState >= 6 ? "block" : "none"
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 财务专员(退单)
|
|
|
+ </Option>
|
|
|
+ <Option
|
|
|
+ value="6"
|
|
|
+ style={{
|
|
|
+ display: this.props.processState >= 7 ? "block" : "none"
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 财务总监
|
|
|
+ </Option>
|
|
|
+ <Option
|
|
|
+ value="7"
|
|
|
+ style={{
|
|
|
+ display: this.props.processState >= 8 ? "block" : "none"
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 总裁
|
|
|
+ </Option>
|
|
|
+ </Select>
|
|
|
</div>
|
|
|
) : (
|
|
|
""
|