orderDetail.jsx 38 KB

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