orderDetail.jsx 37 KB

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