orderDetail.jsx 45 KB

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