orderDetail.jsx 38 KB

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