changeDetailCwzj.js 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022
  1. import React, { Component } from "react";
  2. import { Form, Upload, Modal, Button, message, Input, Select, Table } from "antd";
  3. import AgreeButton from "./agreeButton.js";
  4. import Rizhi from "./rizhi.js";
  5. import { getProcessStatusNew,changeColor } from "@/tools.js";
  6. import { shenghePeo } from "@/tools.js";
  7. import $ from "jquery/src/ajax";
  8. import "../../../../../../css/changeDetail.less"
  9. import tongguo from "../../../../../../image/tongguo.png";
  10. import ProAndCuiList from "./proAndCuiList.jsx";
  11. import "./xButton.less";
  12. // import ReactToPrint from "react-to-print";
  13. const FormItem = Form.Item;
  14. const { TextArea } = Input;
  15. const formItemLayout = {
  16. labelCol: { span: 8 },
  17. wrapperCol: { span: 14 }
  18. };
  19. const changeType = [
  20. {
  21. value: "0",
  22. key: "退单退款"
  23. },
  24. {
  25. value: "1",
  26. key: "项目及金额变更"
  27. },
  28. {
  29. value: "2",
  30. key: "仅项目变更"
  31. },
  32. {
  33. value: "3",
  34. key: "仅金额变更"
  35. },
  36. {
  37. value: "4",
  38. key: "重报"
  39. },
  40. {
  41. value: "5",
  42. key: "赠送"
  43. }
  44. ];
  45. const getChangeType = function(e) {
  46. if (e || e == 0) {
  47. let str = e.toString();
  48. let theType = "";
  49. changeType.map(function(item) {
  50. if (item.value == str) {
  51. theType = item.key;
  52. }
  53. });
  54. return theType;
  55. }
  56. };
  57. class Itemlist extends Component {
  58. constructor(props) {
  59. super(props);
  60. }
  61. render() {
  62. let pageData = this.props.pageData;
  63. return (
  64. <div className="clearfix">
  65. <Form.Item
  66. label={pageData.labelA}
  67. {...pageData.formItemLayoutA}
  68. className="half-item"
  69. >
  70. <p style={{ width: 500, wordWrap: "break-word" }}>{pageData.dataA}</p>
  71. </Form.Item>
  72. <Form.Item
  73. label={pageData.labelB}
  74. {...pageData.formItemLayoutB}
  75. className="half-item"
  76. >
  77. <span>{pageData.dataB}</span>
  78. </Form.Item>
  79. </div>
  80. );
  81. }
  82. }
  83. class ChangeDetail extends Component {
  84. constructor(props) {
  85. super(props);
  86. this.state = {
  87. previewVisible: false,
  88. buttonStatus: true,
  89. dataSource: [],
  90. reason: "",
  91. rejectState: 0,
  92. rotateDeg: 0,
  93. contactList: [],
  94. ContactsLists: [
  95. {
  96. title: "金额(万元)",
  97. dataIndex: "amount",
  98. key: "amount",
  99. render: (text, record) => {
  100. return (
  101. <div>
  102. 实际回收退票(万元)
  103. <Input
  104. value={record.amount}
  105. placeholder="请输入金额(必填项)"
  106. disabled={record.load}
  107. key={record.id}
  108. required="required"
  109. onChange={e => {
  110. record.amount = e.target.value;
  111. this.setState({ contactList: this.state.contactList });
  112. }}
  113. style={{ width: "120px" }}
  114. />
  115. </div>
  116. );
  117. }
  118. },
  119. {
  120. title: "时间",
  121. dataIndex: "createTimes",
  122. key: "createTimes",
  123. render: (text, record) => {
  124. return (
  125. <div>
  126. {/* <DatePicker
  127. showTime
  128. placeholder="请输入退票时间"
  129. onChange={v => {
  130. record.time = v._d;
  131. this.setState({ contactList: this.state.contactList });
  132. }}
  133. onOk={v => {
  134. record.time = v._d;
  135. this.setState({ contactList: this.state.contactList });
  136. console.log(this.state);
  137. }}
  138. /> */}
  139. {record.createTimes}
  140. </div>
  141. );
  142. }
  143. }
  144. // {
  145. // title: "操作",
  146. // dataIndex: "dels",
  147. // key: "dels",
  148. // render: (text, record, index) => {
  149. // return (
  150. // <div style={{ display:
  151. // (this.props.data.processState == 7 ||
  152. // this.props.data.processState == 8) &&
  153. // this.props.data.status == 4
  154. // ? "none"
  155. // : "block"}}>
  156. // <Popconfirm
  157. // title="是否删除?"
  158. // onConfirm={() => {
  159. // this.confirmDelet(record);
  160. // }}
  161. // okText="删除"
  162. // cancelText="不删除"
  163. // >
  164. // <Button
  165. // style={{
  166. // marginRight: "10px",
  167. // color: "#ffffff",
  168. // background: "#f00",
  169. // border: "none"
  170. // }}
  171. // >
  172. // 删除
  173. // </Button>
  174. // </Popconfirm>
  175. // {record.load != true ? (
  176. // <Button
  177. // type="primary"
  178. // onClick={() => {
  179. // this.contactSave(record);
  180. // }}
  181. // >
  182. // 保存
  183. // </Button>
  184. // ) : (
  185. // ""
  186. // )}
  187. // </div>
  188. // );
  189. // }
  190. // }
  191. ]
  192. };
  193. this.getOrgCodeUrl = this.getOrgCodeUrl.bind(this);
  194. this.changeButtonStatus = this.changeButtonStatus.bind(this);
  195. this.downImg = this.downImg.bind(this);
  196. this.upImg = this.upImg.bind(this);
  197. this.rotate = this.rotate.bind(this);
  198. this.moneyOld = this.moneyOld.bind(this);
  199. }
  200. getOrgCodeUrl(e) {
  201. this.setState({
  202. orgCodeUrl: e
  203. });
  204. }
  205. downImg() {
  206. let num = 0;
  207. for (let i = 0; i < this.props.pictureUrl.length; i++) {
  208. if (this.props.pictureUrl[i].url == this.state.previewImage) {
  209. num = i;
  210. }
  211. }
  212. if (num == this.props.pictureUrl.length - 1) {
  213. return message.warning("已经是最后一张了哦");
  214. }
  215. this.state.previewImage = this.props.pictureUrl[num + 1].url;
  216. this.setState({
  217. previewImage: this.state.previewImage,
  218. rotateDeg: 0
  219. });
  220. }
  221. upImg() {
  222. let num = 0;
  223. for (let i = 0; i < this.props.pictureUrl.length; i++) {
  224. if (this.props.pictureUrl[i].url == this.state.previewImage) {
  225. num = i;
  226. }
  227. }
  228. if (num == 0) {
  229. return message.warning("已经是第一张了哦");
  230. }
  231. this.state.previewImage = this.props.pictureUrl[num - 1].url;
  232. this.setState({
  233. previewImage: this.state.previewImage,
  234. rotateDeg: 0
  235. });
  236. }
  237. rotate() {
  238. let rotateDeg = this.state.rotateDeg + 90;
  239. this.setState({
  240. rotateDeg
  241. });
  242. }
  243. moneyOld(str, money) {
  244. if (money) {
  245. return (
  246. <span style={{color: "red",fontWeight: 900,fontSize: 16}}>
  247. {str}(原合同金额{money}万元)
  248. </span>
  249. );
  250. } else {
  251. return <span style={{color: "red",fontWeight: 900,fontSize: 16}}>{str}</span>;
  252. }
  253. }
  254. componentDidMount() {
  255. window.setTimeout(() => {
  256. const contactList = this.props.contactList;
  257. // console.log("看看props", this.props);
  258. contactList.forEach(item => {
  259. item.load = true;
  260. });
  261. this.setState({
  262. contactList
  263. });
  264. }, 0);
  265. }
  266. // loadDataChange() {
  267. // $.ajax({
  268. // method: "get",
  269. // dataType: "json",
  270. // crossDomain: false,
  271. // url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
  272. // data: {
  273. // changeId: this.props.data.id
  274. // },
  275. // success: function(data) {
  276. // if (data.error.length || data.data.list == "") {
  277. // if (data.error && data.error.length) {
  278. // message.warning(data.error[0].message);
  279. // }
  280. // } else {
  281. // this.setState({
  282. // dataSource: data.data
  283. // });
  284. // }
  285. // }.bind(this)
  286. // });
  287. // }
  288. // componentDidMount() {
  289. // window.setTimeout(() => {
  290. // console.log(this.props);
  291. // },2000)
  292. // }
  293. //同意拒绝按钮的有无
  294. changeButtonStatus() {
  295. this.setState({
  296. buttonStatus: !this.state.buttonStatus
  297. });
  298. }
  299. componentWillReceiveProps(nextProps) {
  300. this.setState({
  301. paymentTimes: nextProps.data.paymentTimes,
  302. paymentAmount: nextProps.data.paymentAmount,
  303. invoiceTimes: nextProps.data.invoiceTimes,
  304. invoiceAmount: nextProps.data.invoiceAmount,
  305. cwCost: nextProps.data.cwCost,
  306. refundableAmount: nextProps.data.refundableAmount,
  307. cwRemarks: nextProps.data.cwRemarks,
  308. contactList: nextProps.contactList,
  309. refundInvoice: nextProps.data.refundInvoice
  310. });
  311. // if (!nextProps.reset) {
  312. // this.reset();
  313. // }
  314. }
  315. onRef(ref) {
  316. this.fun = ref;
  317. }
  318. render() {
  319. const pageData = [
  320. {
  321. labelA: "客户名称",
  322. formItemLayoutA: formItemLayout,
  323. dataA: this.props.data.userName,
  324. labelB: "合同编号",
  325. formItemLayoutB: formItemLayout,
  326. dataB: this.props.data.contractNo
  327. },
  328. {
  329. labelA: "时间",
  330. formItemLayoutA: formItemLayout,
  331. dataA: this.props.data.createTimes,
  332. labelB: "发起人",
  333. formItemLayoutB: formItemLayout,
  334. dataB: this.props.data.applicant
  335. },
  336. {
  337. labelA: "当前进度",
  338. formItemLayoutA: formItemLayout,
  339. // 当前是咨询师以及咨询师经理时使用shenhePeo函数,其他流程正常显示
  340. dataA:
  341. this.props.data.processState == 2 || this.props.data.processState == 3
  342. ? shenghePeo(
  343. this.props.data.processState == 2
  344. ? this.props.data.consultantExamine
  345. : this.props.data.managerExamine,
  346. this.props.data.processState
  347. )
  348. : getProcessStatusNew(
  349. this.props.data.processState,
  350. this.props.data.status
  351. ),
  352. labelB: "变更类型",
  353. formItemLayoutB: formItemLayout,
  354. dataB: getChangeType(this.props.data.type)
  355. },
  356. {
  357. labelA: "合同额(万元)",
  358. formItemLayoutA: formItemLayout,
  359. dataA: this.moneyOld(this.props.data.totalAmount, this.props.money),
  360. labelB: "已收款(万元)",
  361. formItemLayoutB: formItemLayout,
  362. dataB: changeColor(this.props.data.settlementAmount)
  363. },
  364. {
  365. labelA: "欠款(万元)",
  366. formItemLayoutA: formItemLayout,
  367. dataA: changeColor(this.props.data.arrears),
  368. labelB: "申请退款(万元)",
  369. formItemLayoutB: formItemLayout,
  370. dataB: changeColor(this.props.data.changeAmount)
  371. },
  372. {
  373. labelA: "变更原因",
  374. formItemLayoutA: formItemLayout,
  375. dataA: this.props.data.remarks
  376. }
  377. ];
  378. const planData = [
  379. {
  380. labelA: "项目进度",
  381. formItemLayoutA: formItemLayout,
  382. dataA: this.props.data.projectState,
  383. onChangeA: value => {
  384. this.setState({
  385. projectState: value
  386. });
  387. },
  388. labelB: "发生成本费用(万元)",
  389. formItemLayoutB: formItemLayout,
  390. dataB: this.props.data.zxsCost,
  391. onChangeB: value => {
  392. this.setState({
  393. zxsCost: value
  394. });
  395. }
  396. },
  397. {
  398. labelA: "备注",
  399. formItemLayoutA: formItemLayout,
  400. dataA: this.props.data.zxsRemarks,
  401. onChangeA: value => {
  402. this.setState({
  403. zxsRemarks: value
  404. });
  405. }
  406. }
  407. ];
  408. const financeData = [
  409. // {
  410. // labelA: "收款时间",
  411. // formItemLayoutA: formItemLayout,
  412. // dataA: this.props.data.paymentTimes,
  413. // labelB: "收款金额(万元)",
  414. // formItemLayoutB: formItemLayout,
  415. // dataB: this.props.data.paymentAmount
  416. // },
  417. // {
  418. // labelA: "开票时间",
  419. // formItemLayoutA: formItemLayout,
  420. // dataA: this.props.data.invoiceTimes,
  421. // labelB: "已开票金额(万元)",
  422. // formItemLayoutB: formItemLayout,
  423. // dataB: this.props.data.invoiceAmount
  424. // },
  425. {
  426. labelA: "发生成本(万元)",
  427. formItemLayoutA: formItemLayout,
  428. dataA: this.props.data.cwCost,
  429. labelB: "应退金额(万元)",
  430. formItemLayoutB: formItemLayout,
  431. dataB: this.props.data.refundableAmount
  432. }
  433. // {
  434. // labelA: "补充资料/备注",
  435. // formItemLayoutA: formItemLayout,
  436. // dataA: this.props.data.cwRemarks
  437. // }
  438. ];
  439. const buttonData = [
  440. {
  441. name: "同意",
  442. title: "理由",
  443. placeholder: "请输入理由",
  444. type: "primary",
  445. status: 2,
  446. onChange: value => {
  447. this.setState({
  448. remarks: value
  449. });
  450. }
  451. },
  452. {
  453. name: "拒绝",
  454. title: "理由",
  455. placeholder: "请输入理由",
  456. type: "danger",
  457. status: 3,
  458. onChange: value => {
  459. this.setState({
  460. remarks: value
  461. });
  462. }
  463. }
  464. ];
  465. const orgCodeUrl = this.props.pictureUrl;
  466. return (
  467. <div className="clearfix changeDetail">
  468. <div
  469. className="clearfix"
  470. ref={e => {
  471. this.refs = e;
  472. }}
  473. >
  474. <div
  475. style={{
  476. borderRadius: "50%",
  477. width: 300,
  478. height: 300,
  479. position: "absolute",
  480. top: 230,
  481. left: 525,
  482. transform: "rotate(-5deg)",
  483. zIndex: 1,
  484. display:
  485. (this.props.data.processState == 7 ||
  486. this.props.data.processState == 8) &&
  487. this.props.data.status == 4
  488. ? "block"
  489. : "none"
  490. }}
  491. >
  492. {/* <span
  493. style={{
  494. fontSize: 29,
  495. position: "absolute",
  496. left: "50%",
  497. top: "50%",
  498. transform: "translate(-50%,-50%)",
  499. color: "red"
  500. }}
  501. >
  502. 通过
  503. </span> */}
  504. <img src={tongguo} style={{ width: "100%" }} />
  505. </div>
  506. <h2 style={{ textAlign: "center", marginBottom: 10, marginTop: 20 }}>
  507. 合同变更记录
  508. </h2>
  509. {pageData.map((item, index) => {
  510. return <Itemlist key={index} pageData={item} />;
  511. })}
  512. <Form.Item
  513. label="变更凭证"
  514. labelCol={{ span: 4 }}
  515. wrapperCol={{ span: 18 }}
  516. >
  517. <Upload
  518. className="demandDetailShow-upload"
  519. listType="picture-card"
  520. fileList={orgCodeUrl}
  521. onPreview={file => {
  522. this.setState({
  523. previewImage: file.url || file.thumbUrl,
  524. previewVisible: true
  525. });
  526. }}
  527. />
  528. <Modal
  529. maskClosable={false}
  530. footer={null}
  531. visible={this.state.previewVisible}
  532. onCancel={() => {
  533. this.setState({ previewVisible: false }, () => {});
  534. }}
  535. >
  536. <img
  537. alt=""
  538. style={{
  539. width: "100%",
  540. transform: `rotate(${this.state.rotateDeg}deg)`
  541. }}
  542. src={this.state.previewImage || ""}
  543. />
  544. <Button
  545. onClick={this.rotate}
  546. style={{
  547. position: "relative",
  548. left: "50%",
  549. transform: "translateX(-50%)"
  550. }}
  551. >
  552. 旋转
  553. </Button>
  554. <Button
  555. onClick={this.upImg}
  556. style={{
  557. position: "absolute",
  558. left: -81,
  559. top: "50%",
  560. transform: "translateY(-50%)"
  561. }}
  562. >
  563. 上一张
  564. </Button>
  565. <Button
  566. onClick={this.downImg}
  567. style={{
  568. position: "absolute",
  569. right: -81,
  570. top: "50%",
  571. transform: "translateY(-50%)"
  572. }}
  573. >
  574. 下一张
  575. </Button>
  576. </Modal>
  577. <Rizhi changeId={this.props.id} />
  578. </Form.Item>
  579. {/* <h2 style={{ textAlign: "center", marginBottom: 0 }}>变更日志</h2> */}
  580. <ul
  581. style={{
  582. width: "868px",
  583. overflow: "hidden",
  584. paddingLeft: "90px",
  585. paddingTop: "10px",
  586. position: "relative",
  587. bottom: "20px"
  588. }}
  589. >
  590. {/* <span>操作人:</span> */}
  591. {this.props.dataSource.map((item, index) => {
  592. if (item.status == 0) {
  593. item.status = "发起";
  594. } else if (item.status == 1) {
  595. item.status = "审核中";
  596. } else if (item.status == 2) {
  597. item.status = "通过";
  598. } else if (item.status == 3) {
  599. item.status = "驳回";
  600. } else if (item.status == 4) {
  601. item.status = "完成";
  602. }
  603. return (
  604. <li
  605. key={index}
  606. style={{
  607. width: "100%",
  608. height: "auto",
  609. wordBreak: "break-all",
  610. marginBottom: "10px"
  611. }}
  612. >
  613. {item.aname + ":" + "(" + item.status + ")" + item.remarks}
  614. </li>
  615. );
  616. })}
  617. </ul>
  618. <ProAndCuiList id={this.props.id} />
  619. <div className="clearfix">
  620. <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
  621. 收款情况
  622. </h3>
  623. <div style={{ marginLeft: "90px" }}>
  624. <ul>
  625. {(this.props.proceedsData.bill || []).map((item, index) => (
  626. <li key={index}>
  627. {item.payTime +
  628. " " +
  629. item.aName +
  630. " 收款:" +
  631. item.transactionAmount +
  632. "万元"}
  633. </li>
  634. ))}
  635. </ul>
  636. <div>收款总计:{this.props.proceedsTotal}万元</div>
  637. </div>
  638. <br />
  639. <div style={{ marginLeft: "90px" }}>
  640. <ul>
  641. {(this.props.proceedsData.invoice || []).map((item, index) => (
  642. <li key={index}>
  643. {item.createTime + " " + " 开票:" + item.amount + "万元"}
  644. </li>
  645. ))}
  646. </ul>
  647. <div>开票总计:{this.props.invoiceTotal}万元</div>
  648. </div>
  649. <p style={{ marginLeft: "90px", color: "red" }}>
  650. 系统预估 产生成本(万元):
  651. {this.props.data.estimateCost
  652. ? this.props.data.estimateCost
  653. : "0"}{" "}
  654. &nbsp;应退金额(万元):
  655. {this.props.data.estimateRefundable
  656. ? this.props.data.estimateRefundable
  657. : "0"}
  658. </p>
  659. </div>
  660. <div
  661. style={{
  662. display:
  663. (this.props.data.processState == 8 ||
  664. this.props.data.processState == 7) &&
  665. (this.props.data.status == 2 || this.props.data.status == 4)
  666. ? "block"
  667. : "none"
  668. }}
  669. >
  670. <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
  671. 回收退票
  672. </h3>
  673. {/* {this.state.processStatus == 0 ? ( */}
  674. <Button
  675. type="primary"
  676. onClick={this.addcontact}
  677. style={{
  678. float: "right",
  679. marginRight: "50px",
  680. marginBottom: "15px",
  681. position: "relative",
  682. zIndex: "999",
  683. display: "none"
  684. }}
  685. >
  686. 添加回收退票
  687. </Button>
  688. {/* ) : (
  689. ""
  690. )} */}
  691. <Table
  692. pagination={false}
  693. bordered
  694. columns={this.state.ContactsLists}
  695. dataSource={this.state.contactList}
  696. />
  697. </div>
  698. {/* {this.props.data.type === 0 && this.props.data.processState >= 4 ? (
  699. <div>
  700. <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
  701. 当前项目进度(咨询师经理填写)
  702. </h3>
  703. {planData.map((item, index) => {
  704. return <Itemlist key={index} pageData={item} />;
  705. })}
  706. </div>
  707. ) : (
  708. ""
  709. )} */}
  710. {/* {this.props.data.type === 0 ? (
  711. this.props.data.processState >= 5 ? (
  712. <div>
  713. <h3
  714. style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}
  715. >
  716. 当前财务状态(财务填写)
  717. </h3>
  718. {financeData.map((item, index) => {
  719. return <Itemlist key={index} pageData={item} />;
  720. })}
  721. </div>
  722. ) : (
  723. ""
  724. )
  725. ) : this.props.data.status === 4 ? (
  726. <div>
  727. <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
  728. 当前财务状态(财务填写)
  729. </h3>
  730. {financeData.map((item, index) => {
  731. return <Itemlist key={index} pageData={item} />;
  732. })}
  733. </div>
  734. ) : (
  735. ""
  736. )} */}
  737. </div>
  738. {this.props.data.status !== 2 &&
  739. this.props.data.status !== 4 &&
  740. this.props.processState == this.props.data.processState ? (
  741. // this.state.buttonStatus ? (
  742. <div>
  743. <div style={{ marginBottom: 10 }}>
  744. <div className="clearfix">
  745. {/* <Form.Item
  746. className="half-item"
  747. label="收款时间"
  748. labelCol={{ span: 8 }}
  749. wrapperCol={{ span: 14 }}
  750. >
  751. <DatePicker
  752. style={{ width: 160 }}
  753. value={
  754. this.state.paymentTimes
  755. ? moment(this.state.paymentTimes)
  756. : null
  757. }
  758. onChange={(_data, dataString) => {
  759. this.setState({
  760. paymentTimes: dataString
  761. });
  762. }}
  763. />
  764. </Form.Item>
  765. <Form.Item
  766. className="half-item"
  767. label="收款金额(万元)"
  768. labelCol={{ span: 8 }}
  769. wrapperCol={{ span: 14 }}
  770. >
  771. <Input
  772. style={{ width: 160 }}
  773. value={this.state.paymentAmount}
  774. placeholder="请输入收款金额"
  775. onChange={e => {
  776. this.setState({
  777. paymentAmount: e.target.value
  778. });
  779. }}
  780. />
  781. </Form.Item>
  782. </div>
  783. <div className="clearfix">
  784. <Form.Item
  785. className="half-item"
  786. label="开票时间"
  787. labelCol={{ span: 8 }}
  788. wrapperCol={{ span: 14 }}
  789. >
  790. <DatePicker
  791. style={{ width: 160 }}
  792. value={
  793. this.state.invoiceTimes
  794. ? moment(this.state.invoiceTimes)
  795. : null
  796. }
  797. onChange={(_data, dataString) => {
  798. this.setState({
  799. invoiceTimes: dataString
  800. });
  801. }}
  802. />
  803. </Form.Item>
  804. <Form.Item
  805. className="half-item"
  806. label="开票金额(万元)"
  807. labelCol={{ span: 8 }}
  808. wrapperCol={{ span: 14 }}
  809. >
  810. <Input
  811. style={{ width: 160 }}
  812. value={this.state.invoiceAmount}
  813. placeholder="请输入开票金额"
  814. onChange={e => {
  815. this.setState({
  816. invoiceAmount: e.target.value
  817. });
  818. }}
  819. />
  820. </Form.Item> */}
  821. <div>
  822. <h3
  823. style={{
  824. marginLeft: 10,
  825. fontWeight: 800,
  826. marginBottom: 10
  827. }}
  828. >
  829. 当前财务状态(财务填写)
  830. </h3>
  831. {financeData.map((item, index) => {
  832. return <Itemlist key={index} pageData={item} />;
  833. })}
  834. </div>
  835. </div>
  836. <div
  837. style={{
  838. marginTop: "10px",
  839. display:
  840. this.props.data.status == 2 ||
  841. this.props.processState != this.props.data.processState
  842. ? "none"
  843. : "block"
  844. }}
  845. >
  846. <Form.Item
  847. label="备注"
  848. labelCol={{ span: 4 }}
  849. wrapperCol={{ span: 14 }}
  850. >
  851. <Input.TextArea
  852. rows={4}
  853. value={this.state.reason}
  854. placeholder="请输入补充资料/备注"
  855. onChange={e => {
  856. this.setState({
  857. reason: e.target.value
  858. });
  859. }}
  860. />
  861. </Form.Item>
  862. </div>
  863. </div>
  864. <div
  865. className="clearfix"
  866. style={{ display: "flex", justifyContent: "space-around" }}
  867. >
  868. {buttonData.map((item, index) => {
  869. return (
  870. <AgreeButton
  871. data={item}
  872. key={index}
  873. backData={this.props.data}
  874. processState={this.props.processState}
  875. visible={this.changeButtonStatus}
  876. ajaxData={this.state}
  877. loadData={this.props.loadData}
  878. reason={this.state.reason}
  879. rejectState={this.state.rejectState}
  880. onCancel={this.props.onCancel}
  881. />
  882. );
  883. })}
  884. </div>
  885. <Select
  886. defaultValue="0"
  887. style={{
  888. width: 120,
  889. float: "left",
  890. position: "relative",
  891. bottom: "28px",
  892. right: "-600px"
  893. }}
  894. onChange={val => {
  895. this.setState({ rejectState: val });
  896. }}
  897. >
  898. <Option
  899. value="0"
  900. style={{
  901. display: this.props.processState >= 1 ? "block" : "none"
  902. }}
  903. >
  904. 营销员
  905. </Option>
  906. <Option
  907. value="1"
  908. style={{
  909. display: this.props.processState >= 2 ? "block" : "none"
  910. }}
  911. >
  912. 营销管理员
  913. </Option>
  914. <Option
  915. value="2"
  916. style={{
  917. display: this.props.processState >= 3 ? "block" : "none"
  918. }}
  919. >
  920. 咨询师
  921. </Option>
  922. <Option
  923. value="3"
  924. style={{
  925. display: this.props.processState >= 4 ? "block" : "none"
  926. }}
  927. >
  928. 咨询师经理
  929. </Option>
  930. <Option
  931. value="4"
  932. style={{
  933. display: this.props.processState >= 5 ? "block" : "none"
  934. }}
  935. >
  936. 咨询师总监
  937. </Option>
  938. <Option
  939. value="5"
  940. style={{
  941. display: this.props.processState >= 6 ? "block" : "none"
  942. }}
  943. >
  944. 财务专员(退单)
  945. </Option>
  946. <Option
  947. value="6"
  948. style={{
  949. display: this.props.processState >= 7 ? "block" : "none"
  950. }}
  951. >
  952. 财务总监
  953. </Option>
  954. <Option
  955. value="7"
  956. style={{
  957. display: this.props.processState >= 8 ? "block" : "none"
  958. }}
  959. >
  960. 总裁
  961. </Option>
  962. </Select>
  963. </div>
  964. ) : (
  965. <div>
  966. <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
  967. 当前财务状态(财务填写)
  968. </h3>
  969. {financeData.map((item, index) => {
  970. return <Itemlist key={index} pageData={item} />;
  971. })}
  972. </div>
  973. )}
  974. {/* <ReactToPrint
  975. trigger={() => (
  976. <div className="clearfix">
  977. <Button type="primary" style={{ float: "right", marginTop: 10 }}>
  978. 打印
  979. </Button>
  980. </div>
  981. )}
  982. content={() => this.refs}
  983. /> */}
  984. </div>
  985. );
  986. }
  987. }
  988. export { ChangeDetail };