orderDetail.jsx 40 KB

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