changeDetailCwzj.js 30 KB

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