changeDetailCwjl.js 57 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956
  1. import React, { Component } from "react";
  2. import {
  3. Form,
  4. Upload,
  5. Modal,
  6. Input,
  7. DatePicker,
  8. Button,
  9. message,
  10. Select,
  11. Table,
  12. Popconfirm,
  13. Spin
  14. } from "antd";
  15. import AgreeButton from "./agreeButton.js";
  16. import Rizhi from "./rizhi.js";
  17. import PicturesWall from "./picturesWall";
  18. import moment from "moment";
  19. import { getProcessStatusNew, moneyVerify } from "@/tools.js";
  20. import { shenghePeo, changeColor } from "@/tools.js";
  21. import { typeList } from '@/dataDic.js'
  22. import $ from "jquery/src/ajax";
  23. import ReactToPrint from "react-to-print";
  24. import tongguo from "../../../../../../image/tongguo.png";
  25. import quxiao from "../../../../../../image/quxiao.png";
  26. import ProAndCuiList from "./proAndCuiList.jsx";
  27. import Refund from "./refund.js"
  28. import "./xButton.less"
  29. import ImgList from "../../../../common/imgList";
  30. const { RangePicker } = DatePicker;
  31. const { TextArea } = Input;
  32. const FormItem = Form.Item;
  33. const formItemLayout = {
  34. labelCol: { span: 8 },
  35. wrapperCol: { span: 14 }
  36. };
  37. const formItemLayoutRefund = {
  38. labelCol: { span: 5 },
  39. wrapperCol: { span: 11 }
  40. };
  41. const getChangeType = function (e) {
  42. if (e || e == 0) {
  43. let str = e.toString();
  44. let theType = "";
  45. typeList.map(function (item) {
  46. if (item.value == str) {
  47. theType = item.key;
  48. }
  49. });
  50. return theType;
  51. }
  52. };
  53. class Itemlist extends Component {
  54. constructor(props) {
  55. super(props);
  56. }
  57. render() {
  58. let pageData = this.props.pageData;
  59. return (
  60. <div className="clearfix">
  61. <Form.Item
  62. label={pageData.labelA}
  63. {...pageData.formItemLayoutA}
  64. className="half-item"
  65. style={{ marginBottom: "-5px" }}
  66. >
  67. <p style={{ width: 731, wordWrap: "break-word" }}>{pageData.dataA}</p>
  68. </Form.Item>
  69. <Form.Item
  70. label={pageData.labelB}
  71. {...pageData.formItemLayoutB}
  72. className="half-item"
  73. style={{ marginBottom: "-5px" }}
  74. >
  75. <span>{pageData.dataB}</span>
  76. </Form.Item>
  77. </div>
  78. );
  79. }
  80. }
  81. class ItemInput extends Component {
  82. constructor(props) {
  83. super(props);
  84. this.state = {
  85. valueA: "",
  86. valueB: ""
  87. };
  88. }
  89. componentWillReceiveProps(nextProps) {
  90. if (!nextProps.reset) {
  91. this.reset();
  92. }
  93. }
  94. reset() {
  95. this.setState({
  96. valueA: "",
  97. valueB: ""
  98. });
  99. }
  100. render() {
  101. let pageData = this.props.pageData;
  102. return (
  103. <div className="clearfix">
  104. <Form.Item
  105. label={pageData.labelA}
  106. {...pageData.formItemLayoutA}
  107. className="half-item"
  108. >
  109. <Input
  110. value={this.state.valueA}
  111. placeholder={"请输入" + pageData.labelA}
  112. style={{ width: 160 }}
  113. onChange={e => {
  114. this.setState({ valueA: e.target.value });
  115. pageData.onChangeA(e.target.value);
  116. }}
  117. />
  118. </Form.Item>
  119. <Form.Item
  120. label={pageData.labelB}
  121. {...pageData.formItemLayoutB}
  122. className="half-item"
  123. >
  124. {pageData.mark ? (
  125. <Input
  126. value={this.state.valueB}
  127. placeholder={"请输入" + pageData.labelB}
  128. style={{ width: 160 }}
  129. onChange={e => {
  130. this.setState({ valueB: e.target.value });
  131. pageData.onChangeB(e.target.value);
  132. }}
  133. />
  134. ) : (
  135. ""
  136. )}
  137. </Form.Item>
  138. </div>
  139. );
  140. }
  141. }
  142. class ChangeDetail extends Component {
  143. constructor(props) {
  144. super(props);
  145. this.state = {
  146. rotateDeg: 0,
  147. previewVisible: false,
  148. buttonStatus: true,
  149. changeType: 2,
  150. dataSource: [],
  151. voucherUrl: [],
  152. loading: false,
  153. reason: "",
  154. // 累计回收退票
  155. refundInvoice: 0,
  156. // 退票数组
  157. contactList: [],
  158. // 退款数据
  159. refundDataSource: [],
  160. rejectState: 0,
  161. // 收款信息
  162. proceedsData: [],
  163. proceedsTotal: this.props.proceedsTotal,
  164. // 开票信息
  165. invoiceData: [],
  166. invoiceTotal: this.props.invoiceTotal,
  167. cost: 10,
  168. refund: 8,
  169. // 测试添加退票
  170. contactList: this.props.contactList,
  171. // 退款
  172. refundColumn: [
  173. {
  174. title: "退款金额(万元)",
  175. dataIndex: "refundAmount",
  176. key: "refundAmount",
  177. },
  178. {
  179. title: "退款时间",
  180. dataIndex: "refundDate",
  181. key: "refundDate"
  182. },
  183. {
  184. title: "备注",
  185. dataIndex: "remarks",
  186. key: "remarks"
  187. },
  188. {
  189. title: "操作",
  190. dataIndex: "delete",
  191. key: "delete",
  192. render: (text, record) => {
  193. return (
  194. <Popconfirm
  195. title="是否删除?"
  196. onConfirm={() => {
  197. this.deleteRefund(record)
  198. }}
  199. okText="删除"
  200. cancelText="不删除"
  201. >
  202. <Button
  203. style={{ display: !this.props.refundStatus ? "block" : "none" }}
  204. type="danger">
  205. 删除
  206. </Button>
  207. </Popconfirm>
  208. )
  209. }
  210. }
  211. ],
  212. ContactsLists: [
  213. {
  214. title: "金额(万元)",
  215. dataIndex: "amount",
  216. key: "amount",
  217. render: (text, record) => {
  218. return (
  219. <div>
  220. 实际回收退票(万元)
  221. <Input
  222. value={record.amount}
  223. placeholder="请输入金额(必填项)"
  224. disabled={record.load}
  225. key={record.id}
  226. required="required"
  227. onChange={e => {
  228. record.amount = e.target.value;
  229. this.setState({ contactList: this.state.contactList });
  230. }}
  231. style={{ width: "120px" }}
  232. />
  233. </div>
  234. );
  235. }
  236. },
  237. {
  238. title: "时间",
  239. dataIndex: "createTimes",
  240. key: "createTimes",
  241. render: (text, record) => {
  242. return (
  243. <div>
  244. {/* <DatePicker
  245. showTime
  246. placeholder="请输入退票时间"
  247. onChange={v => {
  248. record.time = v._d;
  249. this.setState({ contactList: this.state.contactList });
  250. }}
  251. onOk={v => {
  252. record.time = v._d;
  253. this.setState({ contactList: this.state.contactList });
  254. console.log(this.state);
  255. }}
  256. /> */}
  257. {record.createTimes}
  258. </div>
  259. );
  260. }
  261. },
  262. {
  263. title: "操作",
  264. dataIndex: "dels",
  265. key: "dels",
  266. render: (text, record, index) => {
  267. return (
  268. <div
  269. style={{
  270. display:
  271. (this.props.data.processState == 7 ||
  272. this.props.data.processState == 8) &&
  273. this.props.data.status == 4
  274. ? "none"
  275. : "block"
  276. }}
  277. >
  278. <Popconfirm
  279. title="是否删除?"
  280. onConfirm={() => {
  281. this.confirmDelet(record);
  282. }}
  283. okText="删除"
  284. cancelText="不删除"
  285. >
  286. <Button
  287. style={{
  288. marginRight: "10px",
  289. color: "#ffffff",
  290. background: "#f00",
  291. border: "none",
  292. }}
  293. >
  294. 删除
  295. </Button>
  296. </Popconfirm>
  297. {record.load != true ? (
  298. <Button
  299. type="primary"
  300. onClick={() => {
  301. this.contactSave(record);
  302. }}
  303. >
  304. 保存
  305. </Button>
  306. ) : (
  307. ""
  308. )}
  309. </div>
  310. );
  311. }
  312. }
  313. ]
  314. };
  315. this.getOrgCodeUrl = this.getOrgCodeUrl.bind(this);
  316. this.changeButtonStatus = this.changeButtonStatus.bind(this);
  317. this.reset = this.reset.bind(this);
  318. this.addcontact = this.addcontact.bind(this);
  319. this.contactSave = this.contactSave.bind(this);
  320. this.confirmDelet = this.confirmDelet.bind(this);
  321. this.finish = this.finish.bind(this);
  322. this.reload = this.reLoad.bind(this);
  323. this.downImg = this.downImg.bind(this);
  324. this.upImg = this.upImg.bind(this);
  325. this.rotate = this.rotate.bind(this);
  326. this.moneyOld = this.moneyOld.bind(this);
  327. this.addRefund = this.addRefund.bind(this);
  328. this.refundCancel = this.refundCancel.bind(this);
  329. this.sumitRefund = this.sumitRefund.bind(this);
  330. this.getVoucherUrl = this.getVoucherUrl.bind(this);
  331. this.refundGetList = this.refundGetList.bind(this);
  332. this.deleteRefund = this.deleteRefund.bind(this);
  333. this.refundExecute = this.refundExecute.bind(this);
  334. }
  335. componentWillReceiveProps(nextProps) {
  336. this.setState({
  337. paymentTimes: nextProps.data.paymentTimes,
  338. paymentAmount: nextProps.data.paymentAmount,
  339. invoiceTimes: nextProps.data.invoiceTimes,
  340. invoiceAmount: nextProps.data.invoiceAmount,
  341. cwCost: nextProps.data.cwCost,
  342. refundableAmount: nextProps.data.refundableAmount,
  343. cwRemarks: nextProps.data.cwRemarks,
  344. contactList: nextProps.contactList,
  345. refundInvoice: nextProps.data.refundInvoice
  346. });
  347. if (!nextProps.reset) {
  348. this.reset();
  349. }
  350. }
  351. refundExecute() {
  352. this.setState({
  353. loading: true
  354. });
  355. $.ajax({
  356. method: "post",
  357. dataType: "json",
  358. crossDomain: false,
  359. url: globalConfig.context + "/api/admin/orderChange/pushRefund",
  360. data: {
  361. id: this.props.id,
  362. refundUrl: this.state.refundUrl
  363. },
  364. success: function (data) {
  365. let theArr = [];
  366. if (data.error && data.error.length) {
  367. message.warning(data.error[0].message);
  368. } else {
  369. message.success("提交退款成功!")
  370. this.refundGetList()
  371. this.props.onCancel()
  372. }
  373. }.bind(this)
  374. }).always(
  375. function () {
  376. this.setState({
  377. loading: false
  378. });
  379. }.bind(this)
  380. );
  381. }
  382. deleteRefund(record) {
  383. this.setState({
  384. loading: true
  385. });
  386. $.ajax({
  387. method: "post",
  388. dataType: "json",
  389. crossDomain: false,
  390. url: globalConfig.context + "/api/admin/orderChange/deleteRefund",
  391. data: {
  392. id: record.id
  393. },
  394. success: function (data) {
  395. let theArr = [];
  396. if (data.error && data.error.length) {
  397. message.warning(data.error[0].message);
  398. } else {
  399. message.success("删除成功!")
  400. this.refundGetList()
  401. }
  402. }.bind(this)
  403. }).always(
  404. function () {
  405. this.setState({
  406. loading: false
  407. });
  408. }.bind(this)
  409. );
  410. }
  411. sumitRefund() {
  412. if (this.state.refundMoney == "" || this.state.refundMoney == undefined) {
  413. message.warning("请填写正确退款金额")
  414. return
  415. } else if (this.state.refundRemarks == "" || this.state.refundRemarks == undefined) {
  416. message.warning("请填写备注")
  417. return
  418. } else if (this.state.refundDate == "" || this.state.refundDate == undefined) {
  419. message.warning("请选择退款时间")
  420. return
  421. }
  422. this.setState({
  423. loading: true
  424. });
  425. $.ajax({
  426. method: "post",
  427. dataType: "json",
  428. crossDomain: false,
  429. url: globalConfig.context + "/api/admin/orderChange/addRefund",
  430. data: {
  431. refundAmount: this.state.refundMoney,
  432. refundDate: this.state.refundDate,
  433. remarks: this.state.refundRemarks,
  434. orderNo: this.props.data.orderNo,
  435. cid: this.props.id,
  436. },
  437. success: function (data) {
  438. let theArr = [];
  439. if (data.error && data.error.length) {
  440. message.warning(data.error[0].message);
  441. } else {
  442. message.success("添加成功!")
  443. this.refundGetList()
  444. this.setState({
  445. addRefundVisible: false
  446. })
  447. }
  448. }.bind(this)
  449. }).always(
  450. function () {
  451. this.setState({
  452. loading: false
  453. });
  454. }.bind(this)
  455. );
  456. }
  457. refundGetList() {
  458. this.setState({
  459. loading: true
  460. });
  461. $.ajax({
  462. method: "get",
  463. dataType: "json",
  464. crossDomain: false,
  465. url: globalConfig.context + "/api/admin/orderChange/listRefund",
  466. data: {
  467. id: this.props.id
  468. },
  469. success: function (data) {
  470. let theArr = [];
  471. if (data.error && data.error.length) {
  472. message.warning(data.error[0].message);
  473. } else {
  474. this.setState({
  475. refundDataSource: data.data
  476. })
  477. }
  478. }.bind(this)
  479. }).always(
  480. function () {
  481. this.setState({
  482. loading: false
  483. });
  484. }.bind(this)
  485. );
  486. }
  487. moneyOld(str, money) {
  488. if (money) {
  489. return (
  490. <span style={{ color: "red", fontWeight: 900, fontSize: 16 }}>
  491. {str}(原合同金额{money}万元)
  492. </span>
  493. );
  494. } else {
  495. return (
  496. <span style={{ color: "red", fontWeight: 900, fontSize: 16 }}>
  497. {str}
  498. </span>
  499. );
  500. }
  501. }
  502. componentDidMount() {
  503. window.setTimeout(() => {
  504. const contactList = this.props.contactList;
  505. contactList.forEach(item => {
  506. item.load = true;
  507. });
  508. this.setState({
  509. contactList
  510. });
  511. }, 0);
  512. this.refundGetList()
  513. }
  514. addRefund() {
  515. this.setState({
  516. addRefundVisible: true,
  517. refundMoney: undefined,
  518. refundDate: undefined,
  519. refundRemarks: undefined,
  520. })
  521. }
  522. refundCancel() {
  523. this.setState({
  524. addRefundVisible: false,
  525. refundMoney: undefined,
  526. refundDate: undefined,
  527. refundRemarks: undefined,
  528. })
  529. }
  530. getVoucherUrl(e) {
  531. this.setState({
  532. voucherUrl: e
  533. });
  534. let url = ""
  535. e.forEach((item, index) => {
  536. if (item.response && item.response.data) {
  537. if (index < e.length - 1) {
  538. url += item.response.data + ","
  539. } else {
  540. url += item.response.data
  541. }
  542. }
  543. })
  544. this.setState({
  545. refundUrl: url
  546. })
  547. }
  548. downImg() {
  549. let num = 0;
  550. for (let i = 0; i < this.props.pictureUrl.length; i++) {
  551. if (this.props.pictureUrl[i].url == this.state.previewImage) {
  552. num = i;
  553. }
  554. }
  555. if (num == this.props.pictureUrl.length - 1) {
  556. return message.warning("已经是最后一张了哦");
  557. }
  558. this.state.previewImage = this.props.pictureUrl[num + 1].url;
  559. this.setState({
  560. previewImage: this.state.previewImage,
  561. rotateDeg: 0
  562. });
  563. }
  564. upImg() {
  565. let num = 0;
  566. for (let i = 0; i < this.props.pictureUrl.length; i++) {
  567. if (this.props.pictureUrl[i].url == this.state.previewImage) {
  568. num = i;
  569. }
  570. }
  571. if (num == 0) {
  572. return message.warning("已经是第一张了哦");
  573. }
  574. this.state.previewImage = this.props.pictureUrl[num - 1].url;
  575. this.setState({
  576. previewImage: this.state.previewImage,
  577. rotateDeg: 0
  578. });
  579. }
  580. rotate() {
  581. let rotateDeg = this.state.rotateDeg + 90;
  582. this.setState({
  583. rotateDeg
  584. });
  585. }
  586. reset() {
  587. this.setState({
  588. paymentTimes: null,
  589. paymentAmount: "",
  590. invoiceTimes: null,
  591. invoiceAmount: "",
  592. cwCost: "",
  593. refundableAmount: "",
  594. cwRemarks: ""
  595. });
  596. }
  597. getOrgCodeUrl(e) {
  598. this.setState({
  599. orgCodeUrl: e
  600. });
  601. }
  602. // //查看催款节点
  603. // loaduserss(record) {
  604. // this.state.orderList = [];
  605. // this.setState({
  606. // orderNoss: record ? record.orderNo : this.props.datauser.orderNo
  607. // });
  608. // $.ajax({
  609. // method: "get",
  610. // dataType: "json",
  611. // crossDomain: false,
  612. // url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  613. // data: {
  614. // orderNo: record ? record.orderNo : this.props.datauser.orderNo
  615. // },
  616. // success: function(data) {
  617. // let theArr = [];
  618. // let thisData = [];
  619. // if (!thisData) {
  620. // if (data.error && data.error.length) {
  621. // message.warning(data.error[0].message);
  622. // }
  623. // thisData = {};
  624. // } else {
  625. // for (let i = 0; i < data.data.length; i++) {
  626. // thisData = data.data[i];
  627. // theArr.push({
  628. // key: i,
  629. // dunSubject: thisData.dunSubject
  630. // ? thisData.dunSubject.toString()
  631. // : "", //催款科目
  632. // id: thisData.id, //节点Id
  633. // money: thisData.money, //催款金额
  634. // dunStatus: thisData.dunStatus, //催款状态
  635. // orderNo: record ? record.orderNo : this.props.datauser.orderNo
  636. // });
  637. // }
  638. // this.setState({
  639. // contactList: theArr
  640. // });
  641. // }
  642. // }.bind(this)
  643. // }).always(
  644. // function() {
  645. // this.setState({
  646. // loading: false
  647. // });
  648. // }.bind(this)
  649. // );
  650. // }
  651. timestampToTime(timestamp) {
  652. var date = new Date(timestamp); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
  653. var Y = date.getFullYear() + "-";
  654. var M =
  655. (date.getMonth() + 1 < 10
  656. ? "0" + (date.getMonth() + 1)
  657. : date.getMonth() + 1) + "-";
  658. var D = date.getDate() + " ";
  659. var h = date.getHours() + ":";
  660. var m = date.getMinutes() + ":";
  661. var s = date.getSeconds();
  662. return Y + M + D + h + m + s;
  663. }
  664. reLoad() {
  665. $.ajax({
  666. method: "get",
  667. dataType: "json",
  668. crossDomain: false,
  669. url:
  670. globalConfig.context + "/api/admin/orderChange/listOrderRefundInvoice",
  671. data: {
  672. orderNo: this.props.data.orderNo
  673. },
  674. success: data => {
  675. if (!data) return;
  676. data.data.forEach(item => {
  677. item.load = true;
  678. });
  679. this.setState({
  680. contactList: data.data
  681. });
  682. }
  683. });
  684. }
  685. // 完成订单
  686. finish() {
  687. $.ajax({
  688. url: globalConfig.context + "/api/admin/orderChange/completeOrderChange",
  689. method: "get",
  690. data: {
  691. orderNo: this.props.data.orderNo,
  692. type: this.props.data.type,
  693. id: this.props.data.id
  694. },
  695. success: data => {
  696. if (data) {
  697. message.success("保存成功!");
  698. window.location.reload();
  699. }
  700. }
  701. });
  702. }
  703. contactSave(index) {
  704. if (this.state.contactList) {
  705. let Data = this.state.contactList;
  706. for (var a = 0; a < Data.length; a++) {
  707. if (Data[a].amount == "") {
  708. message.warning("退票金额不能为空");
  709. // this.refs.signFirstPayment.focus();
  710. return false;
  711. }
  712. }
  713. }
  714. // this.setState({
  715. // loading: true
  716. // });
  717. $.ajax({
  718. url:
  719. globalConfig.context + "/api/admin/orderChange/addOrderRefundInvoice",
  720. method: "post",
  721. data: {
  722. orderNo: this.props.data.orderNo,
  723. amount: index.amount
  724. }
  725. }).done(
  726. function (data) {
  727. if (!data.error.length) {
  728. message.success("保存成功!");
  729. let num = 0;
  730. this.state.contactList.forEach(item => {
  731. num += +item.amount;
  732. // if (item.key == index.key) {
  733. // item.load = true;
  734. // let time = this.timestampToTime(new Date().getTime());
  735. // item.createTimes = time;
  736. // }
  737. });
  738. this.setState({
  739. contactList: this.state.contactList,
  740. refundInvoice: num
  741. });
  742. this.reLoad();
  743. } else {
  744. message.warning(data.error[0].message);
  745. }
  746. }.bind(this)
  747. );
  748. }
  749. //点击新增催款节点
  750. addcontact() {
  751. // let key = this.state.contactList.length
  752. // if(key == 0) {
  753. // key
  754. // }
  755. this.state.contactList.push({
  756. key: this.state.contactList.length,
  757. amount: "",
  758. createTime: undefined
  759. // orderNo: this.state.orderNoss,
  760. // dunTarget: this.state.kehuId
  761. });
  762. this.setState({
  763. contactList: this.state.contactList
  764. });
  765. }
  766. //删除收款节点
  767. confirmDelet(index) {
  768. // if (index.id) {
  769. // this.state.contactList.splice(index.key, 1);
  770. // this.setState({
  771. // contactList: this.state.contactList
  772. // });
  773. // this.contactSave();
  774. // } else {
  775. // this.state.contactList.splice(index.key, 1);
  776. // this.setState({
  777. // contactList: this.state.contactList
  778. // });
  779. // }
  780. // if(this.state.contactList.length == 1) {
  781. // this.state.contactList = []
  782. // this.setState({
  783. // contactList: this.state.contactList
  784. // });
  785. // return
  786. // }
  787. // let num = index.key
  788. // if (this.state.contactList[num + 1].key) {
  789. // this.state.contactList[num + 1].key = index.key;
  790. // }
  791. if (index.key || !index.id) {
  792. let num = this.state.contactList.findIndex(item => item.key == index.key);
  793. this.state.contactList.splice(num, 1);
  794. let total = 0;
  795. this.state.contactList.forEach(item => {
  796. total += +item.amount;
  797. });
  798. this.setState({
  799. contactList: this.state.contactList,
  800. refundInvoice: total
  801. });
  802. } else {
  803. $.ajax({
  804. url:
  805. globalConfig.context +
  806. "/api/admin/orderChange/deleteOrderRefundInvoice",
  807. method: "post",
  808. data: {
  809. id: index.id
  810. }
  811. }).done(
  812. function (data) {
  813. if (!data.error.length) {
  814. message.success("删除成功!");
  815. this.reLoad();
  816. } else {
  817. message.warning(data.error[0].message);
  818. }
  819. }.bind(this)
  820. );
  821. }
  822. // console.log(this.state.contactList[num + 1].key);
  823. }
  824. // loadData() {
  825. // $.ajax({
  826. // method: "get",
  827. // dataType: "json",
  828. // async: false,
  829. // crossDomain: false,
  830. // url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
  831. // data: {
  832. // changeId: this.props.data.id
  833. // },
  834. // success: function(data) {
  835. // if (data.error.length || data.data.list == "") {
  836. // if (data.error && data.error.length) {
  837. // message.warning(data.error[0].message);
  838. // }
  839. // } else {
  840. // this.setState({
  841. // dataSource: data.data
  842. // });
  843. // }
  844. // }.bind(this)
  845. // });
  846. // }
  847. //同意拒绝按钮的有无
  848. changeButtonStatus() {
  849. this.setState({
  850. buttonStatus: !this.state.buttonStatus
  851. });
  852. }
  853. onRef(ref) {
  854. this.fun = ref;
  855. }
  856. render() {
  857. const pageData = [
  858. {
  859. labelA: "客户名称",
  860. formItemLayoutA: formItemLayout,
  861. dataA: this.props.data.userName,
  862. labelB: "合同编号",
  863. formItemLayoutB: formItemLayout,
  864. dataB: this.props.data.contractNo
  865. },
  866. {
  867. labelA: "时间",
  868. formItemLayoutA: formItemLayout,
  869. dataA: this.props.data.createTimes,
  870. labelB: "发起人",
  871. formItemLayoutB: formItemLayout,
  872. dataB: this.props.data.applicant
  873. },
  874. {
  875. labelA: "当前进度",
  876. formItemLayoutA: formItemLayout,
  877. // 当前是咨询师以及咨询师经理时使用shenhePeo函数,其他流程正常显示
  878. dataA:
  879. this.props.data.processState == 2 || this.props.data.processState == 3
  880. ? shenghePeo(this.props.data.examineName, this.props.data.processState)
  881. : getProcessStatusNew(
  882. this.props.data.examineName,
  883. this.props.data.processState,
  884. this.props.data.status
  885. ),
  886. labelB: "变更类型",
  887. formItemLayoutB: formItemLayout,
  888. dataB: getChangeType(this.props.data.type)
  889. },
  890. {
  891. labelA: "合同额(万元)",
  892. formItemLayoutA: formItemLayout,
  893. dataA: this.moneyOld(this.props.data.totalAmount, this.props.money),
  894. labelB: "已收款(万元)",
  895. formItemLayoutB: formItemLayout,
  896. dataB: changeColor(this.props.data.settlementAmount)
  897. },
  898. {
  899. labelA: "欠款(万元)",
  900. formItemLayoutA: formItemLayout,
  901. dataA: changeColor(this.props.data.arrears),
  902. labelB: "申请退款(万元)",
  903. formItemLayoutB: formItemLayout,
  904. dataB: changeColor(this.props.data.changeAmount)
  905. },
  906. {
  907. labelA: "首付款(万元)",
  908. formItemLayoutA: formItemLayout,
  909. dataA:changeColor(this.props.data.firstAmount),
  910. },
  911. {
  912. labelA: "变更原因",
  913. formItemLayoutA: formItemLayout,
  914. dataA: this.props.data.remarks
  915. }
  916. ];
  917. const planData = [
  918. {
  919. labelA: "项目进度",
  920. formItemLayoutA: formItemLayout,
  921. dataA: this.props.data.projectState,
  922. onChangeA: value => {
  923. this.setState({
  924. projectState: value
  925. });
  926. },
  927. labelB: "发生成本费用(万元)",
  928. formItemLayoutB: formItemLayout,
  929. dataB: this.props.data.zxsCost,
  930. onChangeB: value => {
  931. this.setState({
  932. zxsCost: value
  933. });
  934. }
  935. },
  936. {
  937. labelA: "备注",
  938. formItemLayoutA: formItemLayout,
  939. dataA: this.props.data.zxsRemarks,
  940. onChangeA: value => {
  941. this.setState({
  942. zxsRemarks: value
  943. });
  944. }
  945. }
  946. ];
  947. const financeData = [
  948. {
  949. labelA: "发生成本(万元)",
  950. formItemLayoutA: formItemLayout,
  951. dataA: this.props.data.cwCost ? this.props.data.cwCost : "0",
  952. onChangeA: value => {
  953. this.setState({
  954. cwCost: value
  955. });
  956. },
  957. labelB: "应退金额(万元)",
  958. formItemLayoutB: formItemLayout,
  959. dataB: this.props.data.refundableAmount
  960. ? this.props.data.refundableAmount
  961. : "0",
  962. onChangeB: value => {
  963. this.setState({
  964. refundableAmount: value
  965. });
  966. },
  967. mark: true
  968. }
  969. // {
  970. // labelA: "备注",
  971. // formItemLayoutA: formItemLayout,
  972. // dataA: this.props.data.cwRemarks,
  973. // onChangeA: value => {
  974. // this.setState({
  975. // reason: value
  976. // });
  977. // },
  978. // mark: false
  979. // }
  980. ];
  981. const buttonData = [
  982. {
  983. name: "同意",
  984. title: "理由",
  985. placeholder: "请输入理由",
  986. type: "primary",
  987. status: 2,
  988. onChange: value => {
  989. this.setState({
  990. remarks: value
  991. });
  992. }
  993. },
  994. {
  995. name: "拒绝",
  996. title: "理由",
  997. placeholder: "请输入理由",
  998. type: "danger",
  999. status: 3,
  1000. onChange: value => {
  1001. this.setState({
  1002. remarks: value
  1003. });
  1004. }
  1005. }
  1006. ];
  1007. const orgCodeUrl = this.props.pictureUrl;
  1008. const attachment = this.props.attachment
  1009. return (
  1010. <div className="clearfix changeDetail">
  1011. <div
  1012. className="clearfix"
  1013. ref={(e) => {
  1014. this.refs = e;
  1015. }}
  1016. >
  1017. <div
  1018. style={{
  1019. borderRadius: "50%",
  1020. width: 300,
  1021. height: 300,
  1022. position: "absolute",
  1023. top: 230,
  1024. left: 525,
  1025. transform: "rotate(-5deg)",
  1026. zIndex: 1,
  1027. display:
  1028. (this.props.data.processState == 7 ||
  1029. this.props.data.processState == 8) &&
  1030. this.props.data.status == 4
  1031. ? "block"
  1032. : "none",
  1033. }}
  1034. >
  1035. {/* <span
  1036. style={{
  1037. fontSize: 29,
  1038. position: "absolute",
  1039. left: "50%",
  1040. top: "50%",
  1041. transform: "translate(-50%,-50%)",
  1042. color: "red"
  1043. }}
  1044. >
  1045. 通过
  1046. </span> */}
  1047. <img src={tongguo} style={{ width: "100%" }} />
  1048. </div>
  1049. <div
  1050. style={{
  1051. borderRadius: "50%",
  1052. width: 300,
  1053. height: 300,
  1054. position: "absolute",
  1055. top: 284,
  1056. left: 586,
  1057. transform: "rotate(-5deg)",
  1058. zIndex: 1,
  1059. display: this.props.data.status == 5 ? "block" : "none",
  1060. }}
  1061. >
  1062. <img src={quxiao} style={{ width: "63%" }} />
  1063. </div>
  1064. <h2 style={{ textAlign: "center", marginBottom: 10, marginTop: 20 }}>
  1065. 合同变更记录
  1066. </h2>
  1067. {pageData.map((item, index) => {
  1068. return <Itemlist key={index} pageData={item} />;
  1069. })}
  1070. <Form.Item
  1071. label="变更凭证"
  1072. labelCol={{ span: 4 }}
  1073. wrapperCol={{ span: 18 }}
  1074. >
  1075. <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
  1076. <ImgList domId={this.props.domId ? this.props.domId : 'changeDetailCwjlqq'} fileList={orgCodeUrl} ItemWidth={'96px'} />
  1077. </div>
  1078. <Modal
  1079. maskClosable={false}
  1080. footer={null}
  1081. width={"50%"}
  1082. visible={this.state.previewVisible}
  1083. onCancel={() => {
  1084. this.setState({ previewVisible: false, rotateDeg: 0 }, () => {
  1085. this.reset();
  1086. });
  1087. }}
  1088. >
  1089. <img
  1090. alt=""
  1091. style={{
  1092. width: "100%",
  1093. transform: `rotate(${this.state.rotateDeg}deg)`,
  1094. }}
  1095. src={this.state.previewImage || ""}
  1096. />
  1097. <Button
  1098. onClick={this.rotate}
  1099. style={{
  1100. position: "relative",
  1101. left: "50%",
  1102. transform: "translateX(-50%)",
  1103. }}
  1104. >
  1105. 旋转
  1106. </Button>
  1107. <Button
  1108. onClick={this.upImg}
  1109. style={{
  1110. position: "absolute",
  1111. left: -81,
  1112. top: "50%",
  1113. transform: "translateY(-50%)",
  1114. }}
  1115. >
  1116. 上一张
  1117. </Button>
  1118. <Button
  1119. onClick={this.downImg}
  1120. style={{
  1121. position: "absolute",
  1122. right: -81,
  1123. top: "50%",
  1124. transform: "translateY(-50%)",
  1125. }}
  1126. >
  1127. 下一张
  1128. </Button>
  1129. </Modal>
  1130. <Rizhi changeId={this.props.id} />
  1131. </Form.Item>
  1132. {
  1133. this.props.contractPictureUrl && this.props.contractPictureUrl.length != 0 &&
  1134. <div className="clearfix">
  1135. <Form.Item
  1136. labelCol={{ span: 4 }}
  1137. wrapperCol={{ span: 18 }}
  1138. label="最新合同"
  1139. >
  1140. <div style={{ paddingTop: 10 }}>
  1141. <ImgList
  1142. fileList={
  1143. this.props.contractPictureUrl
  1144. }
  1145. ItemWidth={"96px"}
  1146. />
  1147. </div>
  1148. </Form.Item>
  1149. </div>
  1150. }
  1151. <ul
  1152. style={{
  1153. width: "868px",
  1154. overflow: "hidden",
  1155. paddingLeft: "90px",
  1156. paddingTop: "10px",
  1157. position: "relative",
  1158. bottom: "20px",
  1159. fontSize: "12px",
  1160. color: "rgba(0, 0, 0, 0.65)",
  1161. }}
  1162. >
  1163. {/* <span>操作人:</span> */}
  1164. {this.props.dataSource.map((item, index) => {
  1165. if (item.status == 0) {
  1166. item.status = "发起";
  1167. } else if (item.status == 1) {
  1168. item.status = "审核中";
  1169. } else if (item.status == 2) {
  1170. item.status = "通过";
  1171. } else if (item.status == 3) {
  1172. item.status = "驳回";
  1173. } else if (item.status == 4) {
  1174. item.status = "完成";
  1175. }
  1176. return (
  1177. <li
  1178. key={index}
  1179. style={{
  1180. width: "100%",
  1181. height: "auto",
  1182. wordBreak: "break-all",
  1183. marginBottom: "10px",
  1184. }}
  1185. >
  1186. {item.aname + ":" + "(" + item.status + ")" + item.remarks}
  1187. </li>
  1188. );
  1189. })}
  1190. </ul>
  1191. <ProAndCuiList id={this.props.id} />
  1192. {/* 收款情况 */}
  1193. <div className="clearfix">
  1194. <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
  1195. 收款情况
  1196. </h3>
  1197. <div style={{ marginLeft: "90px" }}>
  1198. <ul style={{ fontSize: "12px", color: "rgba(0, 0, 0, 0.65)" }}>
  1199. {(this.props.proceedsData.bill || []).map((item, index) => (
  1200. <li key={index}>
  1201. {item.payTime +
  1202. " " +
  1203. item.aName +
  1204. " 收款:" +
  1205. item.transactionAmount +
  1206. "万元"}
  1207. </li>
  1208. ))}
  1209. </ul>
  1210. <div>收款总计:{this.props.proceedsTotal}万元</div>
  1211. </div>
  1212. <br />
  1213. <div style={{ marginLeft: "90px" }}>
  1214. <ul style={{ fontSize: "12px", color: "rgba(0, 0, 0, 0.65)" }}>
  1215. {(this.props.proceedsData.invoice || []).map((item, index) => (
  1216. <li key={index}>
  1217. {item.createTime + " " + " 开票:" + item.amount + "万元"}
  1218. </li>
  1219. ))}
  1220. </ul>
  1221. <div>开票总计:{this.props.invoiceTotal}万元</div>
  1222. </div>
  1223. <p style={{ marginLeft: "90px", color: "red" }}>
  1224. 系统预估 产生成本(万元):
  1225. {this.props.data.estimateCost
  1226. ? this.props.data.estimateCost
  1227. : "0"}{" "}
  1228. &nbsp;应退金额(万元):
  1229. {this.props.data.estimateRefundable
  1230. ? this.props.data.estimateRefundable
  1231. : "0"}
  1232. </p>
  1233. </div>
  1234. {/* {this.props.data.type === 0 ? (
  1235. <div>
  1236. <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
  1237. 当前项目进度(咨询师经理填写)
  1238. </h3>
  1239. {planData.map((item, index) => {
  1240. return <Itemlist key={index} pageData={item} />;
  1241. })}
  1242. </div>
  1243. ) : (
  1244. ""
  1245. )} */}
  1246. {/* 当前财务状态 */}
  1247. {(this.props.data.processState > 5 &&
  1248. this.props.data.processState <= 8) ||
  1249. (this.props.data.processState === 9 &&
  1250. this.props.data.status === 4) ||
  1251. (1 == 1) ? (
  1252. <div>
  1253. <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
  1254. 当前财务状态(财务填写)
  1255. </h3>
  1256. {/* <div className="clearfix">
  1257. <Form.Item
  1258. className="half-item"
  1259. label="收款时间"
  1260. labelCol={{ span: 8 }}
  1261. wrapperCol={{ span: 14 }}
  1262. >
  1263. <span>{this.props.data.paymentTimes}</span>
  1264. </Form.Item>
  1265. <Form.Item
  1266. className="half-item"
  1267. label="收款金额(万元)"
  1268. labelCol={{ span: 8 }}
  1269. wrapperCol={{ span: 14 }}
  1270. >
  1271. <span>{this.props.data.paymentAmount}</span>
  1272. </Form.Item>
  1273. </div>
  1274. <div className="clearfix">
  1275. <Form.Item
  1276. className="half-item"
  1277. label="开票时间"
  1278. labelCol={{ span: 8 }}
  1279. wrapperCol={{ span: 14 }}
  1280. >
  1281. <span>{this.props.data.invoiceTimes}</span>
  1282. </Form.Item>
  1283. <Form.Item
  1284. className="half-item"
  1285. label="开票金额(万元)"
  1286. labelCol={{ span: 8 }}
  1287. wrapperCol={{ span: 14 }}
  1288. >
  1289. <span>{this.props.data.invoiceAmount}</span>
  1290. </Form.Item>
  1291. </div> */}
  1292. {financeData.map((item, index) => {
  1293. return <Itemlist key={index} pageData={item} />;
  1294. })}
  1295. </div>
  1296. ) : (
  1297. <div style={{ marginBottom: 10 }}>
  1298. <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
  1299. 当前财务状态(财务填写)
  1300. </h3>
  1301. <div className="clearfix">
  1302. {/* <Form.Item
  1303. className="half-item"
  1304. label="收款时间"
  1305. labelCol={{ span: 8 }}
  1306. wrapperCol={{ span: 14 }}
  1307. >
  1308. <DatePicker
  1309. style={{ width: 160 }}
  1310. value={
  1311. this.state.paymentTimes
  1312. ? moment(this.state.paymentTimes)
  1313. : null
  1314. }
  1315. onChange={(_data, dataString) => {
  1316. this.setState({
  1317. paymentTimes: dataString
  1318. });
  1319. }}
  1320. />
  1321. </Form.Item>
  1322. <Form.Item
  1323. className="half-item"
  1324. label="收款金额(万元)"
  1325. labelCol={{ span: 8 }}
  1326. wrapperCol={{ span: 14 }}
  1327. >
  1328. <Input
  1329. style={{ width: 160 }}
  1330. value={this.state.paymentAmount}
  1331. placeholder="请输入收款金额"
  1332. onChange={e => {
  1333. this.setState({
  1334. paymentAmount: e.target.value
  1335. });
  1336. }}
  1337. />
  1338. </Form.Item>
  1339. </div>
  1340. <div className="clearfix">
  1341. <Form.Item
  1342. className="half-item"
  1343. label="开票时间"
  1344. labelCol={{ span: 8 }}
  1345. wrapperCol={{ span: 14 }}
  1346. >
  1347. <DatePicker
  1348. style={{ width: 160 }}
  1349. value={
  1350. this.state.invoiceTimes
  1351. ? moment(this.state.invoiceTimes)
  1352. : null
  1353. }
  1354. onChange={(_data, dataString) => {
  1355. this.setState({
  1356. invoiceTimes: dataString
  1357. });
  1358. }}
  1359. />
  1360. </Form.Item>
  1361. <Form.Item
  1362. className="half-item"
  1363. label="开票金额(万元)"
  1364. labelCol={{ span: 8 }}
  1365. wrapperCol={{ span: 14 }}
  1366. >
  1367. <Input
  1368. style={{ width: 160 }}
  1369. value={this.state.invoiceAmount}
  1370. placeholder="请输入开票金额"
  1371. onChange={e => {
  1372. this.setState({
  1373. invoiceAmount: e.target.value
  1374. });
  1375. }}
  1376. />
  1377. </Form.Item> */}
  1378. <Form.Item
  1379. className="half-item"
  1380. label="发生成本(万元)"
  1381. labelCol={{ span: 8 }}
  1382. wrapperCol={{ span: 14 }}
  1383. >
  1384. <Input
  1385. style={{ width: 160 }}
  1386. value={this.state.cwCost}
  1387. placeholder="请输入发生成本"
  1388. onChange={(e) => {
  1389. this.setState({
  1390. cwCost: e.target.value,
  1391. });
  1392. }}
  1393. />
  1394. </Form.Item>
  1395. <Form.Item
  1396. className="half-item"
  1397. label="应退金额(万元)"
  1398. labelCol={{ span: 8 }}
  1399. wrapperCol={{ span: 14 }}
  1400. >
  1401. <Input
  1402. style={{ width: 160 }}
  1403. value={this.state.refundableAmount}
  1404. placeholder="请输入应退金额"
  1405. onChange={(e) => {
  1406. this.setState({
  1407. refundableAmount: e.target.value,
  1408. });
  1409. }}
  1410. />
  1411. </Form.Item>
  1412. </div>
  1413. {/* <div
  1414. style={{
  1415. marginTop: "10px",
  1416. display:
  1417. this.props.data.processState == 5 &&
  1418. this.props.data.status == 2
  1419. ? "none"
  1420. : "block"
  1421. }}
  1422. >
  1423. <Form.Item
  1424. label="备注"
  1425. labelCol={{ span: 4 }}
  1426. wrapperCol={{ span: 14 }}
  1427. >
  1428. <Input.TextArea
  1429. rows={4}
  1430. value={this.state.reason}
  1431. placeholder="请输入补充资料/备注"
  1432. onChange={e => {
  1433. this.setState({
  1434. reason: e.target.value
  1435. });
  1436. }}
  1437. />
  1438. </Form.Item>
  1439. </div> */}
  1440. </div>
  1441. )}
  1442. {/* 回收退票3 */}
  1443. <div
  1444. style={{
  1445. display:
  1446. (this.props.data.processState == 8 ||
  1447. this.props.data.processState == 7) &&
  1448. (this.props.data.status == 2 || this.props.data.status == 4 || this.props.data.status == 3 || this.props.data.status == 6)
  1449. ? "block"
  1450. : "none",
  1451. marginTop: '10px'
  1452. }}
  1453. >
  1454. <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
  1455. 回收退票
  1456. </h3>
  1457. <Table
  1458. size="middle"
  1459. pagination={false}
  1460. bordered
  1461. columns={this.state.ContactsLists}
  1462. dataSource={this.state.contactList}
  1463. />
  1464. </div>
  1465. <ul
  1466. style={{
  1467. margin: "10px 0 0 20px",
  1468. color: "red",
  1469. display:
  1470. (this.props.data.processState == 7 ||
  1471. this.props.data.processState == 8) &&
  1472. (this.props.data.status == 4 || this.props.data.status == 2 || this.props.data.status == 3 || this.props.data.status == 6)
  1473. ? "inline-block"
  1474. : "none",
  1475. }}
  1476. >
  1477. <li>
  1478. {"本次应收退票(万元):" +
  1479. (this.props.data.refundableAmount == null
  1480. ? 0
  1481. : this.props.data.refundableAmount)}
  1482. </li>
  1483. <li>
  1484. {"累计已回收退票(万元):" +
  1485. (this.state.refundInvoice == null
  1486. ? 0
  1487. : this.state.refundInvoice)}
  1488. </li>
  1489. </ul>
  1490. {/* 完成审核,上传附件 */}
  1491. <div style={{
  1492. position: "relative",
  1493. display:
  1494. (this.props.data.processState == 7 ||
  1495. this.props.data.processState == 8) &&
  1496. this.props.data.status == 2 || this.props.data.status == 4 || this.props.data.status == 3 || this.props.data.status == 6
  1497. ? "block"
  1498. : "none",
  1499. marginTop: 10,
  1500. }}
  1501. >
  1502. <hr
  1503. style={{
  1504. marginTop: 12,
  1505. marginBottom: 10,
  1506. backgroundColor: "black",
  1507. height: 1,
  1508. border: "none",
  1509. }}
  1510. />
  1511. <h3
  1512. style={{
  1513. marginLeft: 20,
  1514. fontWeight: 800,
  1515. marginBottom: 10,
  1516. display: "inline-block",
  1517. }}
  1518. >
  1519. 完成审核,上传附件{" "}
  1520. <span
  1521. style={{ fontSize: 12, fontWeight: "normal", color: "red" }}
  1522. >
  1523. (注:由营销员上传变更后附件,全变更流程完成。)
  1524. </span>
  1525. </h3>
  1526. <div>
  1527. <Form.Item
  1528. label="变更附件"
  1529. labelCol={{ span: 4 }}
  1530. wrapperCol={{ span: 18 }}
  1531. >
  1532. <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
  1533. {attachment.length > 0 ? <ImgList domId={this.props.domId + 2 ? this.props.domId + 2 : 'changeDetailCwjlqq1'} fileList={attachment} ItemWidth={'96px'} /> : '无附件'}
  1534. </div>
  1535. <Modal
  1536. maskClosable={false}
  1537. footer={null}
  1538. width={"50%"}
  1539. visible={this.state.previewVisible}
  1540. onCancel={() => {
  1541. this.setState({ previewVisible: false, rotateDeg: 0 }, () => {
  1542. // this.reset();
  1543. });
  1544. }}
  1545. >
  1546. <img
  1547. alt=""
  1548. style={{
  1549. width: "100%",
  1550. transform: `rotate(${this.state.rotateDeg}deg)`,
  1551. }}
  1552. src={this.state.previewImage || ""}
  1553. />
  1554. <Button
  1555. onClick={this.rotate}
  1556. style={{
  1557. position: "relative",
  1558. left: "50%",
  1559. transform: "translateX(-50%)",
  1560. }}
  1561. >
  1562. 旋转
  1563. </Button>
  1564. <Button
  1565. onClick={this.upImg}
  1566. style={{
  1567. position: "absolute",
  1568. left: -81,
  1569. top: "50%",
  1570. transform: "translateY(-50%)",
  1571. }}
  1572. >
  1573. 上一张
  1574. </Button>
  1575. <Button
  1576. onClick={this.downImg}
  1577. style={{
  1578. position: "absolute",
  1579. right: -81,
  1580. top: "50%",
  1581. transform: "translateY(-50%)",
  1582. }}
  1583. >
  1584. 下一张
  1585. </Button>
  1586. </Modal>
  1587. {/* <Rizhi changeId={this.props.id} /> */}
  1588. </Form.Item>
  1589. </div>
  1590. </div>
  1591. {/* <div
  1592. style={{
  1593. position: "relative",
  1594. display:
  1595. (this.props.data.processState == 7 ||
  1596. this.props.data.processState == 8) &&
  1597. this.props.data.status == 4 && !this.props.data.refundStatus
  1598. ? "block"
  1599. : "none",
  1600. marginTop: 10
  1601. }}
  1602. >
  1603. <hr style={{ marginTop: 12, marginBottom: 10, backgroundColor: "black", height: 1, border: "none" }} />
  1604. <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10, display: "inline-block" }}>
  1605. 执行退款 <span style={{ fontSize: 12, fontWeight: "normal", color: "red" }}>(注:执行退款,系统将从已收款金额中直接减款)</span>
  1606. </h3>
  1607. <Button onClick={this.addRefund} style={{ float: "right" }}>添加执行退款</Button>
  1608. <Table
  1609. pagination={false}
  1610. bordered
  1611. columns={this.state.refundColumn}
  1612. dataSource={this.state.refundDataSource}
  1613. scroll={{ x: "max-content", y: 0 }}
  1614. size="small"
  1615. />
  1616. <div className="clearfix">
  1617. <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
  1618. 上传退款凭证
  1619. </h3>
  1620. <div style={{ marginLeft: 20 }}>
  1621. <PicturesWall
  1622. fileList={this.getVoucherUrl}
  1623. pictureUrl={this.state.voucherUrl}
  1624. url="/api/admin/orderChange/uploadRefund"
  1625. sign="order_change_file"
  1626. />
  1627. </div>
  1628. </div>
  1629. <Button type="primary" onClick={this.refundExecute} style={{ position: "relative", left: "50%", transform: "translateX(-50%)" }}>确定执行退款</Button>
  1630. </div> */}
  1631. <div
  1632. style={{
  1633. display:
  1634. (this.props.data.processState == 7 ||
  1635. this.props.data.processState == 8) &&
  1636. this.props.data.status == 4 &&
  1637. this.props.data.refundStatus
  1638. ? "block"
  1639. : "none",
  1640. }}
  1641. >
  1642. <Refund
  1643. data={this.props.data}
  1644. id={this.props.id}
  1645. dataSource={this.state.refundDataSource}
  1646. />
  1647. </div>
  1648. </div>
  1649. {/* {!(
  1650. (this.props.data.processState > 5 &&
  1651. this.props.data.processState <= 8) ||
  1652. (this.props.data.processState === 9 && this.props.data.status === 4)
  1653. ) ? (
  1654. this.state.buttonStatus ? (
  1655. <div>
  1656. <div
  1657. className="clearfix"
  1658. style={{ display: "flex", justifyContent: "space-around" }}
  1659. >
  1660. {buttonData.map((item, index) => {
  1661. return (
  1662. <AgreeButton
  1663. data={item}
  1664. key={index}
  1665. backData={this.props.data}
  1666. processState={this.props.processState}
  1667. visible={this.changeButtonStatus}
  1668. ajaxData={this.state}
  1669. loadData={this.props.loadData}
  1670. rejectState={this.state.rejectState}
  1671. reason={this.state.reason}
  1672. onCancel={this.props.onCancel}
  1673. />
  1674. );
  1675. })}
  1676. </div>
  1677. <Select
  1678. defaultValue="0"
  1679. style={{
  1680. width: 120,
  1681. float: "left",
  1682. position: "relative",
  1683. bottom: "28px",
  1684. right: "-600px"
  1685. }}
  1686. onChange={val => {
  1687. this.setState({ rejectState: val });
  1688. // console.log(val, this.state.rejectState);
  1689. }}
  1690. >
  1691. <Option
  1692. value="0"
  1693. style={{
  1694. display: this.props.processState >= 1 ? "block" : "none"
  1695. }}
  1696. >
  1697. 营销员
  1698. </Option>
  1699. <Option
  1700. value="1"
  1701. style={{
  1702. display: this.props.processState >= 2 ? "block" : "none"
  1703. }}
  1704. >
  1705. 营销管理员
  1706. </Option>
  1707. <Option
  1708. value="2"
  1709. style={{
  1710. display: this.props.processState >= 3 ? "block" : "none"
  1711. }}
  1712. >
  1713. 咨询师
  1714. </Option>
  1715. <Option
  1716. value="3"
  1717. style={{
  1718. display: this.props.processState >= 4 ? "block" : "none"
  1719. }}
  1720. >
  1721. 咨询师经理
  1722. </Option>
  1723. <Option
  1724. value="4"
  1725. style={{
  1726. display: this.props.processState >= 5 ? "block" : "none"
  1727. }}
  1728. >
  1729. 咨询师总监
  1730. </Option>
  1731. <Option
  1732. value="5"
  1733. style={{
  1734. display: this.props.processState >= 6 ? "block" : "none"
  1735. }}
  1736. >
  1737. 财务专员(退单)
  1738. </Option>
  1739. <Option
  1740. value="6"
  1741. style={{
  1742. display: this.props.processState >= 7 ? "block" : "none"
  1743. }}
  1744. >
  1745. 财务总监
  1746. </Option>
  1747. <Option
  1748. value="7"
  1749. style={{
  1750. display: this.props.processState >= 8 ? "block" : "none"
  1751. }}
  1752. >
  1753. 总裁
  1754. </Option>
  1755. </Select>
  1756. </div>
  1757. ) : (
  1758. ""
  1759. )
  1760. ) : (
  1761. ""
  1762. )} */}
  1763. {/* <Button
  1764. type="primary"
  1765. shape="round"
  1766. size="large"
  1767. style={{
  1768. position: "absolute",
  1769. left: "50%",
  1770. bottom: "0",
  1771. transform: "translateX(-50%)",
  1772. display:
  1773. (this.props.data.processState == 7 ||
  1774. this.props.data.processState == 8) &&
  1775. this.props.data.status == 2
  1776. ? "block"
  1777. : "none"
  1778. }}
  1779. onClick={this.finish}
  1780. >
  1781. 完成订单
  1782. </Button> */}
  1783. <ReactToPrint
  1784. trigger={() => (
  1785. <Button
  1786. type="primary"
  1787. style={{
  1788. float: "right",
  1789. marginTop: 10,
  1790. position: "absolute",
  1791. top: 0,
  1792. right: 30,
  1793. display:
  1794. (this.props.data.processState == 7 ||
  1795. this.props.data.processState == 8) &&
  1796. this.props.data.status == 4
  1797. ? "block"
  1798. : "block",
  1799. }}
  1800. >
  1801. 打印
  1802. </Button>
  1803. )}
  1804. content={() => this.refs}
  1805. />
  1806. <Modal
  1807. maskClosable={false}
  1808. visible={this.state.addRefundVisible}
  1809. onOk={this.refundCancel}
  1810. onCancel={this.refundCancel}
  1811. width="700px"
  1812. title="添加执行退款"
  1813. footer=""
  1814. className="admin-desc-content"
  1815. >
  1816. <Form
  1817. layout="horizontal"
  1818. onSubmit={this.nextSubmit}
  1819. // id="demand-form"
  1820. >
  1821. <Spin spinning={this.state.loading}>
  1822. <div className="clearfix">
  1823. <FormItem
  1824. className="half-item"
  1825. {...formItemLayoutRefund}
  1826. label="退款金额"
  1827. >
  1828. <Input
  1829. style={{ width: "155px" }}
  1830. placeholder="请输入退款金额"
  1831. value={this.state.refundMoney}
  1832. onChange={(e) => {
  1833. this.setState({
  1834. refundMoney: e.target.value,
  1835. });
  1836. }}
  1837. />
  1838. </FormItem>
  1839. <FormItem
  1840. className="half-item"
  1841. {...formItemLayoutRefund}
  1842. label="退款时间"
  1843. >
  1844. <DatePicker
  1845. value={
  1846. this.state.refundDate
  1847. ? moment(this.state.refundDate)
  1848. : null
  1849. }
  1850. onChange={(date, dateString) => {
  1851. this.setState({
  1852. refundDate: dateString,
  1853. });
  1854. }}
  1855. />
  1856. </FormItem>
  1857. <FormItem
  1858. style={{ height: "auto" }}
  1859. labelCol={{ span: 3 }}
  1860. wrapperCol={{ span: 19 }}
  1861. label="备注"
  1862. >
  1863. <TextArea
  1864. rows={4}
  1865. placeholder="请输入备注信息"
  1866. style={{ width: "95%" }}
  1867. value={this.state.refundRemarks}
  1868. onChange={(e) => {
  1869. this.setState({
  1870. refundRemarks: e.target.value,
  1871. });
  1872. }}
  1873. />
  1874. </FormItem>
  1875. <FormItem
  1876. wrapperCol={{ span: 12, offset: 6 }}
  1877. className="half-middle"
  1878. style={{ marginTop: 10 }}
  1879. >
  1880. <Button
  1881. className="submitSave"
  1882. type="primary"
  1883. onClick={this.sumitRefund}
  1884. >
  1885. 保存
  1886. </Button>
  1887. <Button
  1888. className="submitSave"
  1889. type="ghost"
  1890. style={{ marginLeft: 10 }}
  1891. onClick={this.refundCancel}
  1892. >
  1893. 取消
  1894. </Button>
  1895. </FormItem>
  1896. </div>
  1897. </Spin>
  1898. </Form>
  1899. </Modal>
  1900. </div>
  1901. );
  1902. }
  1903. }
  1904. export { ChangeDetail };