orderDetail.jsx 45 KB

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