orderDetail.jsx 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368
  1. import React from 'react';
  2. import $ from 'jquery/src/ajax';
  3. import {
  4. Modal,
  5. message,
  6. Spin,
  7. Upload,
  8. Button,
  9. Form,
  10. Table,
  11. Col,
  12. Tag
  13. } from 'antd';
  14. import {
  15. getjiedian,
  16. splitUrl,
  17. getNewOrderType,
  18. getProcessStatus,
  19. getApproval,
  20. getLiquidationStatus,
  21. getboutique,
  22. getCuikuan,
  23. } from "@/tools";
  24. import OrderRiZi from "@/orderRiZi.jsx";
  25. import ResolutionDetail from "@/resolutionDetail";
  26. import ImgList from "../../../common/imgList";
  27. import {getProjectName} from "../../../tools";
  28. import ProjectDetailsReadOnly from "../../../common/projectDetailsReadOnly";
  29. import OrderItemStatus from "../../../common/orderItemStatus";
  30. import EnterpriseNameChange from "../../../common/enterpriseNameChange";
  31. import OrderCoor from '../../order/orderNew/changeComponent/orderCoor';
  32. import ContentUrl from '../../order/orderNew/contentUrl';
  33. const OrderDetail = Form.create()(
  34. React.createClass({
  35. loadXmu(record) {
  36. this.state.data = [];
  37. this.setState({
  38. loading: true,
  39. });
  40. $.ajax({
  41. method: "get",
  42. dataType: "json",
  43. crossDomain: false,
  44. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  45. data: {
  46. orderNo: record ? record.orderNo : this.props.data.orderNo,
  47. },
  48. success: function (data) {
  49. let theArr = [];
  50. if (!data.data) {
  51. if (data.error && data.error.length) {
  52. message.warning(data.error[0].message);
  53. }
  54. } else {
  55. for (let i = 0; i < data.data.length; i++) {
  56. let thisdata = data.data[i];
  57. thisdata.key = i;
  58. thisdata.sort = thisdata.cSort;
  59. theArr.push(thisdata);
  60. }
  61. }
  62. this.setState({
  63. dataSource: theArr,
  64. pagination: false,
  65. });
  66. }.bind(this),
  67. }).always(
  68. function () {
  69. this.setState({
  70. loading: false,
  71. });
  72. }.bind(this)
  73. );
  74. },
  75. getInitialState() {
  76. return {
  77. rotateDeg: 0,
  78. orderNos:'',
  79. visible: false,
  80. avisible: false,
  81. loading: false,
  82. declarationBatch: 1,
  83. dataInfor: {},
  84. addnextVisible:false,
  85. jsDate: [],
  86. replenishUrl: [],
  87. auditStatus: 0,
  88. textFileList: [],
  89. videoFileList: [],
  90. previewVisibles: false,
  91. pictureUrl: [],
  92. pictureUrlMin: [],
  93. columns: [
  94. {
  95. title: "业务项目名称",
  96. dataIndex: "commodityName",
  97. key: "commodityName",
  98. render: (text, record) => {
  99. return text && text.length > 6 ? (
  100. <span title={text}>
  101. {text.substr(0, 8) + "-" + record.id}...
  102. </span>
  103. ) : (
  104. text + "-" + record.id
  105. );
  106. },
  107. },
  108. {
  109. title: "项目类别",
  110. dataIndex: "cname",
  111. key: "cname",
  112. },
  113. {
  114. title: "项目数量",
  115. dataIndex: "commodityQuantity",
  116. key: "commodityQuantity",
  117. render: (text, record) => {
  118. if (record.splitStatus == 1) {
  119. return (
  120. <span>
  121. {text}{" "}
  122. <Tag
  123. color="#108ee9"
  124. onClick={(e) => {
  125. e.stopPropagation();
  126. this.showRes(record);
  127. }}
  128. >
  129. 已拆
  130. </Tag>
  131. </span>
  132. );
  133. } else {
  134. return text;
  135. }
  136. },
  137. },
  138. {
  139. title: "服务市价(万元)",
  140. dataIndex: "commodityPrice",
  141. key: "commodityPrice",
  142. },
  143. {
  144. title: "项目状态",
  145. dataIndex: "projectStatus",
  146. key: "projectStatus",
  147. render: (text) => {
  148. return getProjectName(text);
  149. },
  150. },
  151. {
  152. title: "证书编号",
  153. dataIndex: "certificateNumber",
  154. key: "certificateNumber",
  155. },
  156. {
  157. title: "是否主要项目",
  158. dataIndex: "main",
  159. key: "main",
  160. render: (text) => {
  161. return text ? "是" : "否";
  162. },
  163. },
  164. {
  165. title: "项目说明",
  166. dataIndex: "taskComment",
  167. key: "taskComment",
  168. render: (text) => {
  169. return text && text.length > 8 ? (
  170. <span title={text}>{text.substr(0, 8)}...</span>
  171. ) : (
  172. text
  173. );
  174. },
  175. },
  176. ],
  177. columnsX: [
  178. {
  179. title: "流程",
  180. dataIndex: "processName",
  181. key: "processName",
  182. },
  183. {
  184. title: "操作人",
  185. dataIndex: "adminName",
  186. key: "adminName",
  187. },
  188. {
  189. title: "时间",
  190. dataIndex: "createDate",
  191. key: "createDate",
  192. },
  193. ],
  194. ContactsListsNew: [
  195. {
  196. title: "项目名称",
  197. dataIndex: "commodityName",
  198. key: "commodityName",
  199. render: (text, record) => {
  200. return <span>{text + "-" + record.tid}</span>;
  201. },
  202. },
  203. {
  204. title: "项目分类",
  205. dataIndex: "projectType",
  206. key: "projectType",
  207. render: (text) => {
  208. let arr = this.state.dataSource || [];
  209. let str = "";
  210. for (let i = 0; i < arr.length; i++) {
  211. if (this.state.dataSource[i].sort == text) {
  212. str = this.state.dataSource[i].cname;
  213. return <span>{str}</span>;
  214. }
  215. }
  216. },
  217. },
  218. {
  219. title: "催款科目",
  220. dataIndex: "dunTypeName",
  221. key: "dunTypeName",
  222. render: (text, record) => {
  223. if (record.customizeName) {
  224. return text + record.customizeName;
  225. }
  226. return <span>{text}</span>;
  227. },
  228. },
  229. {
  230. title: "时间(天)",
  231. dataIndex: "waitDay",
  232. key: "waitDay",
  233. render: (text, record) => {
  234. if (record.dunTypeName) {
  235. if (record.customizeTimes) {
  236. return record.customizeTimes;
  237. }
  238. return <span>{text}</span>;
  239. }
  240. },
  241. },
  242. {
  243. title: "金额(万元)",
  244. dataIndex: "money",
  245. key: "money",
  246. render: (text, record) => {
  247. if (record.dunTypeName) {
  248. if (record.appropriationRatio) {
  249. return <span>{record.appropriationRatio}(拨款比例)</span>;
  250. } else {
  251. return <span>{text}</span>;
  252. }
  253. }
  254. },
  255. },
  256. {
  257. title: "服务年限",
  258. dataIndex: "startDate",
  259. key: "startDate",
  260. render: (text, record) => {
  261. if (record.dunTypeName) {
  262. return <span>{text}</span>;
  263. }
  264. },
  265. },
  266. {
  267. title: "催款状态",
  268. dataIndex: "status",
  269. key: "status",
  270. render: (text) => {
  271. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  272. },
  273. },
  274. ],
  275. ContactsLists: [
  276. {
  277. title: "催款科目",
  278. dataIndex: "dunSubject",
  279. key: "dunSubject",
  280. render: (text) => {
  281. return getjiedian(text);
  282. },
  283. },
  284. {
  285. title: "金额(万元)",
  286. dataIndex: "money",
  287. key: "money",
  288. },
  289. {
  290. title: "催款状态",
  291. dataIndex: "dunStatus",
  292. key: "dunStatus",
  293. render: (text) => {
  294. return getCuikuan(text);
  295. },
  296. },
  297. ],
  298. };
  299. },
  300. //点击打卡项目详情
  301. tableRowClick(record) {
  302. if (record.type == "1") {
  303. this.setState({
  304. displayFees: "block",
  305. costReduction: record.costReduction,
  306. officialCost: record.officialCost,
  307. });
  308. }else{
  309. this.setState({
  310. displayFees: "none",
  311. });
  312. }
  313. this.setState({
  314. jid: record.id, //项目ID
  315. kid: record.commodityId, //商品ID
  316. commodityName: record.commodityName, //金额
  317. commodityPrice: record.commodityPrice, //金额
  318. commodityQuantity: record.commodityQuantity, //数量
  319. taskComment: record.taskComment, //备注
  320. main: record.main.toString(), //是否为主要
  321. addnextVisible: true,
  322. dataInfor:record,
  323. addState: 0,
  324. });
  325. },
  326. //项目详情关闭
  327. nextCancel() {
  328. this.setState({
  329. addnextVisible: false,
  330. displayFees: "none",
  331. officialCost: "", //是否有官费
  332. costReduction: "", //是否有费减
  333. });
  334. },
  335. // 拆分详细
  336. showRes(record) {
  337. this.setState({
  338. resVisible: true,
  339. resRecord: record,
  340. });
  341. },
  342. resCancel() {
  343. this.setState({
  344. resVisible: false,
  345. });
  346. },
  347. loadData(record) {
  348. this.state.orderList = [];
  349. $.ajax({
  350. method: "get",
  351. dataType: "json",
  352. crossDomain: false,
  353. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  354. data: {
  355. orderNo: record ? record.orderNo : this.props.data.orderNo,
  356. },
  357. success: function (data) {
  358. let thisData = data.data;
  359. if (!thisData) {
  360. if (data.error && data.error.length) {
  361. message.warning(data.error[0].message);
  362. }
  363. thisData = {};
  364. }
  365. this.setState({
  366. id: thisData.id,
  367. orderUid: thisData.uid,
  368. orderList: thisData,
  369. approval:
  370. thisData.approval == 0
  371. ? thisData.approval.toString()
  372. : thisData.approval,
  373. orderRemarks: thisData.orderRemarks,
  374. orgCodeUrl: thisData.contractPictureUrl
  375. ? splitUrl(
  376. thisData.contractPictureUrl,
  377. ",",
  378. globalConfig.avatarHost + "/upload"
  379. )
  380. : [],
  381. replenishUrl: thisData.agreementUrl
  382. ? splitUrl(
  383. thisData.agreementUrl,
  384. ",",
  385. globalConfig.avatarHost + "/upload"
  386. )
  387. : [],
  388. contentUrl:thisData.serviceContent
  389. ? splitUrl(
  390. thisData.serviceContent,
  391. ",",
  392. globalConfig.avatarHost + "/upload"
  393. )
  394. : [], //图片地址
  395. orderNo: thisData.orderNo, //订单编号
  396. buyerId: thisData.buyerId,
  397. depName: thisData.depName,
  398. outsource: thisData.outsource == 0 ? "否" : "是",
  399. deleteSign:thisData.deleteSign,
  400. });
  401. }.bind(this),
  402. }).always(
  403. function () {
  404. this.setState({
  405. loading: false,
  406. });
  407. }.bind(this)
  408. );
  409. },
  410. jdDate(record) {
  411. $.ajax({
  412. method: "get",
  413. dataType: "json",
  414. crossDomain: false,
  415. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  416. data: {
  417. orderNo: record ? record.orderNo : this.props.data.orderNo,
  418. },
  419. success: function (data) {
  420. let thisData = data.data;
  421. if (!thisData.length) {
  422. if (data.error && data.error.length) {
  423. message.warning(data.error[0].message);
  424. }
  425. thisData = {};
  426. } else {
  427. this.setState({
  428. jsDate: thisData,
  429. });
  430. }
  431. }.bind(this),
  432. }).always(
  433. function () {
  434. this.setState({
  435. loading: false,
  436. });
  437. }.bind(this)
  438. );
  439. },
  440. rizhi() {
  441. this.setState({
  442. loading: true,
  443. });
  444. $.ajax({
  445. method: "get",
  446. dataType: "json",
  447. crossDomain: false,
  448. url: "/api/admin/newOrder/selectOrderLog",
  449. data: {
  450. orderNo: this.props.data.orderNo,
  451. },
  452. success: function (data) {
  453. let theArr = [];
  454. let thisData = data.data;
  455. if (!thisData.length) {
  456. if (data.error && data.error.length) {
  457. message.warning(data.error[0].message);
  458. }
  459. thisData = {};
  460. } else {
  461. for (let i = 0; i < data.data.length; i++) {
  462. let thisdata = data.data[i];
  463. theArr.push({
  464. processName: thisdata.processName,
  465. adminName: thisdata.adminName,
  466. createDate: thisdata.createDate,
  467. remarks: thisdata.remarks,
  468. });
  469. }
  470. }
  471. this.setState({
  472. dataSourceX: theArr,
  473. });
  474. }.bind(this),
  475. }).always(
  476. function () {
  477. this.setState({
  478. loading: false,
  479. });
  480. }.bind(this)
  481. );
  482. },
  483. getOrderLog() {
  484. this.setState({
  485. avisible: true,
  486. });
  487. this.rizhi();
  488. },
  489. closeOrderLog() {
  490. this.setState({
  491. avisible: false,
  492. });
  493. },
  494. getPictureUrl(e) {
  495. this.setState({ pictureUrl: e });
  496. },
  497. componentWillMount() {
  498. if (this.props.data.orderNo) {
  499. this.setState({
  500. orderNos:this.props.data.orderNo
  501. })
  502. this.loadData();
  503. this.loadXmu();
  504. this.jdDate();
  505. this.jiedian(this.props.data.orderNo);
  506. this.jiedianNew(this.props.data.orderNo);
  507. } else {
  508. this.state.data = {};
  509. }
  510. },
  511. componentWillReceiveProps(nextProps) {
  512. if (!this.props.visible && nextProps.visible) {
  513. this.state.textFileList = [];
  514. this.state.videoFileList = [];
  515. if (nextProps.data.orderNo) {
  516. this.setState({
  517. orderNos:nextProps.data.orderNo
  518. })
  519. this.loadData(nextProps.data);
  520. this.loadXmu(nextProps.data);
  521. this.jdDate(nextProps.data);
  522. this.jiedian(nextProps.data.orderNo);
  523. this.jiedianNew(nextProps.data.orderNo);
  524. } else {
  525. this.state.data = {};
  526. this.state.pictureUrl = [];
  527. this.state.pictureUrlMin = [];
  528. }
  529. this.props.form.resetFields();
  530. }
  531. },
  532. downImg() {
  533. let num = 0;
  534. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  535. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  536. num = i;
  537. }
  538. }
  539. if (num == this.state.orgCodeUrl.length - 1) {
  540. return message.warning("已经是最后一张了哦");
  541. }
  542. this.state.previewImage = this.state.orgCodeUrl[num + 1].url;
  543. this.setState({
  544. previewImage: this.state.previewImage,
  545. rotateDeg: 0,
  546. });
  547. },
  548. upImg() {
  549. let num = 0;
  550. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  551. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  552. num = i;
  553. }
  554. }
  555. if (num == 0) {
  556. return message.warning("已经是第一张了哦");
  557. }
  558. this.state.previewImage = this.state.orgCodeUrl[num - 1].url;
  559. this.setState({
  560. previewImage: this.state.previewImage,
  561. rotateDeg: 0,
  562. });
  563. },
  564. rotate() {
  565. let rotateDeg = this.state.rotateDeg + 90;
  566. this.setState({
  567. rotateDeg,
  568. });
  569. },
  570. downImgs() {
  571. let num = 0;
  572. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  573. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  574. num = i;
  575. }
  576. }
  577. if (num == this.state.replenishUrl.length - 1) {
  578. return message.warning("已经是最后一张了哦");
  579. }
  580. this.state.previewImage = this.state.replenishUrl[num + 1].url;
  581. this.setState({
  582. previewImage: this.state.previewImage,
  583. rotateDeg: 0,
  584. });
  585. },
  586. upImgs() {
  587. let num = 0;
  588. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  589. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  590. num = i;
  591. }
  592. }
  593. if (num == 0) {
  594. return message.warning("已经是第一张了哦");
  595. }
  596. this.state.previewImage = this.state.replenishUrl[num - 1].url;
  597. this.setState({
  598. previewImage: this.state.previewImage,
  599. rotateDeg: 0,
  600. });
  601. },
  602. rotates() {
  603. let rotateDeg = this.state.rotateDeg + 90;
  604. this.setState({
  605. rotateDeg,
  606. });
  607. },
  608. //节点列表
  609. jiedian(orderNos) {
  610. $.ajax({
  611. method: "get",
  612. dataType: "json",
  613. crossDomain: false,
  614. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  615. data: {
  616. orderNo: orderNos,
  617. },
  618. success: function (data) {
  619. let theArr = [];
  620. let thisData = [];
  621. if (data.error.length || data.data.list == "") {
  622. if (data.error && data.error.length) {
  623. message.warning(data.error[0].message);
  624. }
  625. } else {
  626. for (let i = 0; i < data.data.length; i++) {
  627. thisData = data.data[i];
  628. theArr.push({
  629. key: i,
  630. dunSubject: thisData.dunSubject
  631. ? thisData.dunSubject.toString()
  632. : "", //催款科目
  633. id: thisData.id, //节点Id
  634. money: thisData.money, //催款金额
  635. dunStatus: thisData.dunStatus, //催款状态
  636. orderNo: thisData.orderNo,
  637. });
  638. }
  639. this.setState({
  640. contactList: theArr,
  641. });
  642. }
  643. }.bind(this),
  644. }).always(
  645. function () {
  646. this.setState({
  647. loading: false,
  648. });
  649. }.bind(this)
  650. );
  651. },
  652. //查看催款节点
  653. jiedianNew(orderNos) {
  654. $.ajax({
  655. method: "get",
  656. dataType: "json",
  657. crossDomain: false,
  658. url:
  659. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  660. data: {
  661. orderNo: orderNos,
  662. },
  663. success: function (data) {
  664. if (data.error && data.error.length) {
  665. message.warning(data.error[0].message);
  666. } else {
  667. let theArr = [];
  668. let thisData = [];
  669. let arr = data.data || [];
  670. let totalCui = 0;
  671. for (let i = 0; i < arr.length; i++) {
  672. thisData = arr[i];
  673. totalCui += +thisData.money;
  674. theArr.push({
  675. key: i,
  676. dunSubject: thisData.dunSubject
  677. ? thisData.dunSubject.toString()
  678. : "", //催款科目
  679. id: thisData.id, //节点Id
  680. money: thisData.money, //催款金额
  681. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  682. commodityName: thisData.commodityName,
  683. projectType: thisData.projectType,
  684. dunTypeName: thisData.dunTypeName,
  685. status: thisData.status,
  686. waitDay: thisData.waitDay,
  687. effectiveCount: thisData.effectiveCount,
  688. startDate: thisData.startDate,
  689. dunType: thisData.dunType,
  690. appropriationRatio: thisData.appropriationRatio,
  691. customizeName: thisData.customizeName,
  692. customizeTimes: thisData.customizeTimes,
  693. tid: thisData.tid,
  694. });
  695. }
  696. if (!totalCui) {
  697. totalCui = 0;
  698. }
  699. totalCui = (Math.round(totalCui * 1000000) / 1000000).toFixed(6);
  700. this.setState({
  701. contactListNew: theArr,
  702. totalCui,
  703. });
  704. }
  705. }.bind(this),
  706. }).always(
  707. function () {
  708. this.setState({
  709. loading: false,
  710. });
  711. }.bind(this)
  712. );
  713. },
  714. render() {
  715. const theData = this.state.orderList || {};
  716. const FormItem = Form.Item;
  717. const formItemLayout = {
  718. labelCol: { span: 10 },
  719. wrapperCol: { span: 12 },
  720. };
  721. const jsDate = this.state.jsDate || [];
  722. const cuiDataList = this.state.contactList || [];
  723. return (
  724. <div className="login">
  725. <div style={{position:"absolute",top:'12px',left:'81px',zIndex:10000}}>
  726. <OrderItemStatus deleteSign={this.state.deleteSign}/>
  727. </div>
  728. {this.state.resVisible ? (
  729. <ResolutionDetail
  730. cancel={this.resCancel}
  731. detail={this.state.resRecord}
  732. visible={this.state.resVisible}
  733. id={this.state.resRecord.orderNo}
  734. />
  735. ) : (
  736. ""
  737. )}
  738. <Form layout="horizontal" id="demand-form">
  739. <Spin spinning={this.state.loading}>
  740. <div className="clearfix">
  741. <FormItem
  742. className="half-item"
  743. {...formItemLayout}
  744. label="订单编号"
  745. >
  746. <span>{theData.orderNo}</span>
  747. </FormItem>
  748. <FormItem
  749. className="half-item"
  750. {...formItemLayout}
  751. label="签单时间"
  752. >
  753. <span>{theData.signDate}</span>
  754. </FormItem>
  755. <FormItem
  756. className="half-item"
  757. {...formItemLayout}
  758. label="客户名称"
  759. >
  760. <span>
  761. {theData.userName}
  762. <EnterpriseNameChange
  763. type='journal'
  764. style={{ marginLeft: 10 }}
  765. enterpriseId={this.state.orderUid}/>
  766. </span>
  767. </FormItem>
  768. <FormItem
  769. className="half-item"
  770. {...formItemLayout}
  771. label="流程状态"
  772. >
  773. <span>{getProcessStatus(theData.processStatus)}</span>
  774. </FormItem>
  775. <FormItem
  776. className="half-item"
  777. {...formItemLayout}
  778. label="订单类型"
  779. >
  780. <span>{getNewOrderType(theData.orderType)}</span>
  781. </FormItem>
  782. <FormItem
  783. className="half-item"
  784. {...formItemLayout}
  785. label="结算状态"
  786. >
  787. <span>{getLiquidationStatus(theData.liquidationStatus)}</span>
  788. </FormItem>
  789. <FormItem
  790. className="half-item"
  791. {...formItemLayout}
  792. label="签单总金额(万元)"
  793. >
  794. <span>{theData.totalAmount}</span>
  795. </FormItem>
  796. <FormItem
  797. className="half-item"
  798. {...formItemLayout}
  799. label="首付款(万元)"
  800. >
  801. <span>{theData.firstAmount}</span>
  802. </FormItem>
  803. <FormItem
  804. className="half-item"
  805. {...formItemLayout}
  806. label="已收款(万元)"
  807. >
  808. <span>{theData.settlementAmount}</span>
  809. </FormItem>
  810. <FormItem
  811. className="half-item"
  812. {...formItemLayout}
  813. label="是否特批"
  814. >
  815. <span>{getApproval(theData.approval)}</span>
  816. </FormItem>
  817. <FormItem
  818. className="half-item"
  819. {...formItemLayout}
  820. label="是否外包"
  821. >
  822. <span>{this.state.outsource}</span>
  823. </FormItem>
  824. {this.props.data.orderStatus == "6" && (
  825. <FormItem
  826. className="half-item"
  827. {...formItemLayout}
  828. label="已退(万元)"
  829. >
  830. <span>{this.props.data.refundAmount}</span>
  831. </FormItem>
  832. )}
  833. </div>
  834. <div className="clearfix">
  835. <FormItem
  836. labelCol={{ span: 5 }}
  837. wrapperCol={{ span: 18 }}
  838. label="合同扫描件"
  839. >
  840. {/*<Upload*/}
  841. {/* className="demandDetailShow-upload"*/}
  842. {/* listType="picture-card"*/}
  843. {/* fileList={this.state.orgCodeUrl}*/}
  844. {/* onPreview={(file) => {*/}
  845. {/* this.setState({*/}
  846. {/* previewImage: file.url || file.thumbUrl,*/}
  847. {/* previewVisible: true,*/}
  848. {/* });*/}
  849. {/* }}*/}
  850. {/*/>*/}
  851. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  852. {this.state.orgCodeUrl ? <ImgList fileList={this.state.orgCodeUrl} ItemWidth={'96px'}/> : <div/>}
  853. </div>
  854. <Modal
  855. maskClosable={false}
  856. footer={null}
  857. width={"50%"}
  858. visible={this.state.previewVisible}
  859. onCancel={() => {
  860. this.setState({ previewVisible: false, rotateDeg: 0 });
  861. }}
  862. >
  863. {/* <div
  864. onClick={this.upImg}
  865. className="up-btn"
  866. style={{
  867. cursor: "pointer",
  868. transition: "all .5s",
  869. opacity: ".2",
  870. width: "41px",
  871. height: "69px",
  872. backgroundColor: "rgba(0,0,0,.5)",
  873. position: "absolute",
  874. top: "50%",
  875. left: 16,
  876. transform: "translateY(-50%)",
  877. zIndex: 1
  878. }}
  879. >
  880. <span
  881. style={{
  882. position: "absolute",
  883. border: "1px solid #fff",
  884. width: "20px",
  885. height: "20px",
  886. left: "60%",
  887. top: "50%",
  888. transform: "translate(-50%, -50%) rotate(45deg)",
  889. borderTop: "none",
  890. borderRight: "none"
  891. }}
  892. ></span>
  893. </div>
  894. <div
  895. onClick={this.rotate}
  896. style={{
  897. textAlign: "center",
  898. lineHeight: "30px",
  899. color: "#000",
  900. cursor: "pointer",
  901. transition: "all .5s",
  902. width: "50px",
  903. height: "30px",
  904. backgroundColor: "white",
  905. position: "absolute",
  906. bottom: "-30",
  907. left: "50%",
  908. transform: "translateX(-50%)",
  909. zIndex: 1,
  910. borderRadius: "5px",
  911. border: "1px solid #ccc"
  912. }}
  913. >
  914. 旋转
  915. </div>
  916. <div
  917. onClick={this.downImg}
  918. className="up-btn"
  919. style={{
  920. cursor: "pointer",
  921. transition: "all .5s",
  922. opacity: ".2",
  923. width: "41px",
  924. height: "69px",
  925. backgroundColor: "rgba(0,0,0,.5)",
  926. position: "absolute",
  927. top: "50%",
  928. right: 16,
  929. transform: "translateY(-50%)",
  930. zIndex: 1
  931. }}
  932. >
  933. <span
  934. style={{
  935. position: "absolute",
  936. border: "1px solid #fff",
  937. width: "20px",
  938. height: "20px",
  939. left: "40%",
  940. top: "50%",
  941. transform: "translate(-50%, -50%) rotate(225deg)",
  942. borderTop: "none",
  943. borderRight: "none"
  944. }}
  945. ></span>
  946. </div> */}
  947. <img
  948. alt=""
  949. style={{
  950. width: "100%",
  951. transform: `rotate(${this.state.rotateDeg}deg)`,
  952. }}
  953. src={this.state.previewImage || ""}
  954. />
  955. <Button
  956. onClick={this.rotate}
  957. style={{
  958. position: "relative",
  959. left: "50%",
  960. transform: "translateX(-50%)",
  961. }}
  962. >
  963. 旋转
  964. </Button>
  965. <Button
  966. onClick={this.upImg}
  967. style={{
  968. position: "absolute",
  969. left: -81,
  970. top: "50%",
  971. transform: "translateY(-50%)",
  972. }}
  973. >
  974. 上一张
  975. </Button>
  976. <Button
  977. onClick={this.downImg}
  978. style={{
  979. position: "absolute",
  980. right: -81,
  981. top: "50%",
  982. transform: "translateY(-50%)",
  983. }}
  984. >
  985. 下一张
  986. </Button>
  987. </Modal>
  988. <Button
  989. style={{
  990. float: "right",
  991. marginRight: "140px",
  992. marginTop: "20px",
  993. }}
  994. onClick={this.getOrderLog}
  995. >
  996. 查看订单日志
  997. </Button>
  998. </FormItem>
  999. <FormItem
  1000. labelCol={{ span: 5 }}
  1001. wrapperCol={{ span: 18 }}
  1002. label="补充协议"
  1003. >
  1004. {/*<Upload*/}
  1005. {/* className="demandDetailShow-upload"*/}
  1006. {/* listType="picture-card"*/}
  1007. {/* fileList={this.state.replenishUrl}*/}
  1008. {/* onPreview={(file) => {*/}
  1009. {/* this.setState({*/}
  1010. {/* previewImage: file.url || file.thumbUrl,*/}
  1011. {/* previewVisibles: true,*/}
  1012. {/* });*/}
  1013. {/* }}*/}
  1014. {/*/>*/}
  1015. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  1016. {this.state.replenishUrl ? <ImgList domId={'orderDetail1'} fileList={this.state.replenishUrl}/> : <div/>}
  1017. </div>
  1018. <Modal
  1019. maskClosable={false}
  1020. footer={null}
  1021. width={"50%"}
  1022. visible={this.state.previewVisibles}
  1023. onCancel={() => {
  1024. this.setState({ previewVisibles: false, rotateDeg: 0 });
  1025. }}
  1026. >
  1027. {/* <div
  1028. onClick={this.upImg}
  1029. className="up-btn"
  1030. style={{
  1031. cursor: "pointer",
  1032. transition: "all .5s",
  1033. opacity: ".2",
  1034. width: "41px",
  1035. height: "69px",
  1036. backgroundColor: "rgba(0,0,0,.5)",
  1037. position: "absolute",
  1038. top: "50%",
  1039. left: 16,
  1040. transform: "translateY(-50%)",
  1041. zIndex: 1
  1042. }}
  1043. >
  1044. <span
  1045. style={{
  1046. position: "absolute",
  1047. border: "1px solid #fff",
  1048. width: "20px",
  1049. height: "20px",
  1050. left: "60%",
  1051. top: "50%",
  1052. transform: "translate(-50%, -50%) rotate(45deg)",
  1053. borderTop: "none",
  1054. borderRight: "none"
  1055. }}
  1056. ></span>
  1057. </div>
  1058. <div
  1059. onClick={this.rotate}
  1060. style={{
  1061. textAlign: "center",
  1062. lineHeight: "30px",
  1063. color: "#000",
  1064. cursor: "pointer",
  1065. transition: "all .5s",
  1066. width: "50px",
  1067. height: "30px",
  1068. backgroundColor: "white",
  1069. position: "absolute",
  1070. bottom: "-30",
  1071. left: "50%",
  1072. transform: "translateX(-50%)",
  1073. zIndex: 1,
  1074. borderRadius: "5px",
  1075. border: "1px solid #ccc"
  1076. }}
  1077. >
  1078. 旋转
  1079. </div>
  1080. <div
  1081. onClick={this.downImg}
  1082. className="up-btn"
  1083. style={{
  1084. cursor: "pointer",
  1085. transition: "all .5s",
  1086. opacity: ".2",
  1087. width: "41px",
  1088. height: "69px",
  1089. backgroundColor: "rgba(0,0,0,.5)",
  1090. position: "absolute",
  1091. top: "50%",
  1092. right: 16,
  1093. transform: "translateY(-50%)",
  1094. zIndex: 1
  1095. }}
  1096. >
  1097. <span
  1098. style={{
  1099. position: "absolute",
  1100. border: "1px solid #fff",
  1101. width: "20px",
  1102. height: "20px",
  1103. left: "40%",
  1104. top: "50%",
  1105. transform: "translate(-50%, -50%) rotate(225deg)",
  1106. borderTop: "none",
  1107. borderRight: "none"
  1108. }}
  1109. ></span>
  1110. </div> */}
  1111. <img
  1112. alt=""
  1113. style={{
  1114. width: "100%",
  1115. transform: `rotate(${this.state.rotateDeg}deg)`,
  1116. }}
  1117. src={this.state.previewImage || ""}
  1118. />
  1119. <Button
  1120. onClick={this.rotates}
  1121. style={{
  1122. position: "relative",
  1123. left: "50%",
  1124. transform: "translateX(-50%)",
  1125. }}
  1126. >
  1127. 旋转
  1128. </Button>
  1129. <Button
  1130. onClick={this.upImgs}
  1131. style={{
  1132. position: "absolute",
  1133. left: -81,
  1134. top: "50%",
  1135. transform: "translateY(-50%)",
  1136. }}
  1137. >
  1138. 上一张
  1139. </Button>
  1140. <Button
  1141. onClick={this.downImgs}
  1142. style={{
  1143. position: "absolute",
  1144. right: -81,
  1145. top: "50%",
  1146. transform: "translateY(-50%)",
  1147. }}
  1148. >
  1149. 下一张
  1150. </Button>
  1151. </Modal>
  1152. </FormItem>
  1153. </div>
  1154. <div style={{marginLeft:"56px"}}>
  1155. <ContentUrl
  1156. processStatus={1}
  1157. domId = {"detailContents"}
  1158. contentUrl = {this.state.contentUrl}
  1159. imgId = {"detailContentsImg"}
  1160. />
  1161. </div>
  1162. <div className="clearfix">
  1163. <FormItem
  1164. className="half-item"
  1165. {...formItemLayout}
  1166. label="合同编号"
  1167. >
  1168. <span>{theData.contractNo}</span>
  1169. </FormItem>
  1170. <FormItem
  1171. className="half-item"
  1172. {...formItemLayout}
  1173. label="订单部门"
  1174. >
  1175. <span>{theData.depName}</span>
  1176. </FormItem>
  1177. </div>
  1178. <div className="clearfix">
  1179. <FormItem
  1180. labelCol={{ span: 5 }}
  1181. wrapperCol={{ span: 18 }}
  1182. label="订单留言"
  1183. >
  1184. <p style={{ maxWidth: 500, wordWrap: "break-word" }}>
  1185. {this.state.orderRemarks}
  1186. </p>
  1187. </FormItem>
  1188. </div>
  1189. {/* <div className="clearfix">
  1190. <FormItem
  1191. labelCol={{ span: 5 }}
  1192. wrapperCol={{ span: 18 }}
  1193. label="收款节点"
  1194. >
  1195. {jsDate.map(item => {
  1196. return (
  1197. <p>
  1198. {getjiedian(item.dunSubject)} -- {item.money} 万元
  1199. </p>
  1200. );
  1201. })}
  1202. </FormItem>
  1203. </div> */}
  1204. <div className="clearfix">
  1205. <FormItem
  1206. className="half-item"
  1207. {...formItemLayout}
  1208. label="订单负责人"
  1209. >
  1210. <span>{theData.salesmanName}</span>
  1211. </FormItem>
  1212. <FormItem
  1213. className="half-item"
  1214. {...formItemLayout}
  1215. label="订单负责人电话"
  1216. >
  1217. <span>{theData.salesmanMobile}</span>
  1218. </FormItem>
  1219. <FormItem
  1220. className="half-item"
  1221. {...formItemLayout}
  1222. label="当前财务负责人"
  1223. >
  1224. <span>{theData.nowFinance}</span>
  1225. </FormItem>
  1226. <FormItem
  1227. className="half-item"
  1228. {...formItemLayout}
  1229. label="当前财务负责人电话"
  1230. >
  1231. <span>{theData.nowFinanceMobile}</span>
  1232. </FormItem>
  1233. <FormItem
  1234. className="half-item"
  1235. {...formItemLayout}
  1236. style={{ opacity: ".5" }}
  1237. label="原订单负责人"
  1238. >
  1239. <span>{theData.oldSalesmanName}</span>
  1240. </FormItem>
  1241. <FormItem
  1242. className="half-item"
  1243. {...formItemLayout}
  1244. style={{ opacity: ".5" }}
  1245. label="原订单负责人电话"
  1246. >
  1247. <span>{theData.oldSalesmanMobile}</span>
  1248. </FormItem>
  1249. <FormItem
  1250. className="half-item"
  1251. {...formItemLayout}
  1252. style={{ opacity: ".5" }}
  1253. label="实际财务操作人"
  1254. >
  1255. <span>{theData.financeName}</span>
  1256. </FormItem>
  1257. <FormItem
  1258. className="half-item"
  1259. {...formItemLayout}
  1260. style={{ opacity: ".5" }}
  1261. label="实际财务操作人电话"
  1262. >
  1263. <span>{theData.financeMobile}</span>
  1264. </FormItem>
  1265. </div>
  1266. {/* <Modal
  1267. visible={this.state.avisible}
  1268. className="admin-desc-content"
  1269. width="800px"
  1270. maskClosable={false}
  1271. title="订单日志"
  1272. footer={null}
  1273. onCancel={this.closeOrderLog}
  1274. >
  1275. <div className="patent-table">
  1276. <Spin spinning={this.state.loading}>
  1277. <Table
  1278. columns={this.state.columnsX}
  1279. dataSource={this.state.dataSourceX}
  1280. pagination={false}
  1281. />
  1282. </Spin>
  1283. </div>
  1284. </Modal> */}
  1285. <OrderRiZi
  1286. dataSourcerizhi={this.state.dataSourceX}
  1287. closeOrderLog={this.closeOrderLog}
  1288. visible={this.state.avisible}
  1289. loading={this.state.loading}
  1290. />
  1291. <OrderCoor orderNo={this.state.orderNos} mrs={'20px'} mro={'64px'}/>
  1292. <div className="clearfix" style={{ marginBottom: 10 }}>
  1293. <p style={{ fontSize: 18, marginLeft: 20 }}>项目业务</p>
  1294. <div className="patent-table">
  1295. <Spin spinning={this.state.loading}>
  1296. <Table
  1297. columns={this.state.columns}
  1298. dataSource={this.state.dataSource}
  1299. pagination={this.state.pagination}
  1300. onRowClick={this.tableRowClick}
  1301. bordered
  1302. size="small"
  1303. />
  1304. </Spin>
  1305. </div>
  1306. </div>
  1307. <div>
  1308. <span style={{ marginLeft: 20, fontSize: "18px" }}>
  1309. 催款节点
  1310. </span>
  1311. <span
  1312. style={{
  1313. display: cuiDataList.length ? "none" : "inline-block",
  1314. marginLeft: 10,
  1315. color: "red",
  1316. }}
  1317. >
  1318. 金额总计(万元): {this.state.totalCui}
  1319. </span>
  1320. </div>
  1321. <div className="clearfix">
  1322. <Spin spinning={this.state.loading}>
  1323. <Form layout="horizontal" id="demand-form">
  1324. <Table
  1325. pagination={false}
  1326. bordered
  1327. size="small"
  1328. columns={
  1329. cuiDataList.length
  1330. ? this.state.ContactsLists
  1331. : this.state.ContactsListsNew
  1332. }
  1333. dataSource={
  1334. cuiDataList.length
  1335. ? this.state.contactList
  1336. : this.state.contactListNew
  1337. }
  1338. />
  1339. <Col
  1340. span={24}
  1341. offset={9}
  1342. style={{ marginTop: "15px" }}
  1343. ></Col>
  1344. </Form>
  1345. </Spin>
  1346. </div>
  1347. </Spin>
  1348. </Form>
  1349. {this.state.addnextVisible && <ProjectDetailsReadOnly
  1350. infor={this.state.dataInfor}
  1351. visible={this.state.addnextVisible}
  1352. onCancel={this.nextCancel}
  1353. />}
  1354. </div>
  1355. );
  1356. },
  1357. })
  1358. );
  1359. export default OrderDetail;