orderDetail.jsx 38 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219
  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. render: (text, record) => {
  760. return text || record.receiverName;
  761. },
  762. },
  763. {
  764. title: "负责人电话",
  765. dataIndex: "contactsMobile",
  766. key: "contactsMobile",
  767. render: (text, record) => {
  768. return text || record.receiverMobile;
  769. },
  770. },
  771. {
  772. title: "项目状态",
  773. dataIndex: "projectStatus",
  774. key: "projectStatus",
  775. render: (text) => {
  776. return getProjectName(text);
  777. },
  778. },
  779. {
  780. title: "本次派单",
  781. dataIndex: "serviceYear",
  782. key: "serviceYear",
  783. },
  784. {
  785. title: "项目说明",
  786. dataIndex: "taskComment",
  787. key: "taskComment",
  788. render: (text) => {
  789. return (
  790. <Tooltip title={text}>
  791. <div
  792. >{text}</div>
  793. </Tooltip>
  794. )
  795. },
  796. },
  797. ];
  798. } else {
  799. columns = [
  800. {
  801. title: "子项目名称",
  802. dataIndex: "taskName",
  803. key: "taskName"
  804. },
  805. {
  806. title: "子项目数量",
  807. dataIndex: "commodityQuantity",
  808. key: "commodityQuantity"
  809. },
  810. {
  811. title: "拆分操作人",
  812. dataIndex: "splitAname",
  813. key: "splitAname"
  814. },
  815. {
  816. title: "项目负责人",
  817. dataIndex: "receiverName",
  818. key: "receiverName"
  819. },
  820. {
  821. title: "拆分时间",
  822. dataIndex: "splitTimes",
  823. key: "splitTimes"
  824. }
  825. ]
  826. }
  827. return (
  828. <Table
  829. columns={columns}
  830. dataSource={data}
  831. pagination={false}
  832. />
  833. );
  834. } else {
  835. columns = [];
  836. return (
  837. <p
  838. style={{ fontWeight: "bold", color: "red", textAlign: "center" }}
  839. >
  840. {e.cSort == 6 ? "暂无派单" : "此项目暂未拆分"}
  841. </p>
  842. );
  843. }
  844. };
  845. const theData = this.state.orderList || {};
  846. const FormItem = Form.Item;
  847. const formItemLayout = {
  848. labelCol: { span: 10 },
  849. wrapperCol: { span: 14 },
  850. };
  851. const cuiDataList = this.state.contactList || [];
  852. return (
  853. <div className="login">
  854. <div style={{ position: "absolute", top: '12px', left: '81px', zIndex: 10000 }}>
  855. <OrderItemStatus deleteSign={this.state.deleteSign} />
  856. </div>
  857. {this.state.resVisible &&
  858. <ResolutionDetail
  859. cancel={this.resCancel}
  860. detail={this.state.resRecord}
  861. visible={this.state.resVisible}
  862. id={this.state.resRecord.orderNo}
  863. />
  864. }
  865. <Form layout="horizontal" id="demand-form">
  866. <Spin spinning={this.state.loading}>
  867. <div className="clearfix">
  868. <FormItem
  869. className="half-item"
  870. {...formItemLayout}
  871. label="订单编号"
  872. >
  873. <span>{theData.orderNo}</span>
  874. </FormItem>
  875. <FormItem
  876. className="half-item"
  877. {...formItemLayout}
  878. label="合同编号"
  879. >
  880. <span>{theData.contractNo}</span>
  881. </FormItem>
  882. <FormItem
  883. className="half-item"
  884. {...formItemLayout}
  885. label="客户名称"
  886. >
  887. <span>
  888. {theData.userName}
  889. <EnterpriseNameChange
  890. type='journal'
  891. style={{ marginLeft: 10 }}
  892. enterpriseId={this.state.orderUid} />
  893. </span>
  894. </FormItem>
  895. <FormItem className="half-item"
  896. {...formItemLayout}
  897. label="销售类型"
  898. >
  899. <span>
  900. {(["私有客户-", "签单客户-"][theData.userType] || " ") +
  901. (salesList[theData.salesType] || "")}
  902. {
  903. theData.other != null && theData.other != "" &&
  904. <Tooltip title={theData.other}>
  905. <span>
  906. {"(" + theData.other.toString().slice(0, 10) + (theData.other.toString().length > 9 ? "...)" : ")")}
  907. </span>
  908. </Tooltip>
  909. }
  910. </span>
  911. </FormItem>
  912. <FormItem
  913. className="half-item"
  914. {...formItemLayout}
  915. label="签单时间"
  916. >
  917. <span>{theData.signDate}</span>
  918. </FormItem>
  919. <FormItem
  920. className="half-item"
  921. {...formItemLayout}
  922. label="流程状态"
  923. >
  924. <span>{getProcessStatus(theData.processStatus, theData.examineName, theData.approval)}</span>
  925. <FlowChart
  926. orderNo={theData.orderNo}
  927. />
  928. </FormItem>
  929. <FormItem
  930. className="half-item"
  931. {...formItemLayout}
  932. label="订单类型"
  933. >
  934. <span>{getNewOrderType(theData.orderType)}</span>
  935. </FormItem>
  936. <FormItem
  937. className="half-item"
  938. {...formItemLayout}
  939. label="结算状态"
  940. >
  941. <span>{getLiquidationStatus(theData.liquidationStatus)}</span>
  942. </FormItem>
  943. <FormItem
  944. className="half-item"
  945. {...formItemLayout}
  946. label="签单总金额(万元)"
  947. >
  948. <span>{theData.totalAmount}</span>
  949. </FormItem>
  950. <FormItem
  951. className="half-item"
  952. {...formItemLayout}
  953. label="首付款(万元)"
  954. >
  955. <span>{theData.firstAmount}</span>
  956. </FormItem>
  957. <FormItem
  958. className="half-item"
  959. {...formItemLayout}
  960. label="已收款(万元)"
  961. >
  962. <span>{theData.settlementAmount}</span>
  963. </FormItem>
  964. <FormItem
  965. className="half-item"
  966. {...formItemLayout}
  967. label="是否特批"
  968. >
  969. <span>{getApproval(theData.approval)}</span>
  970. </FormItem>
  971. <FormItem
  972. className="half-item"
  973. {...formItemLayout}
  974. label="是否外包"
  975. >
  976. <span>{this.state.outsource}</span>
  977. </FormItem>
  978. {this.props.data.orderStatus == "6" && (
  979. <FormItem
  980. className="half-item"
  981. {...formItemLayout}
  982. label="已退(万元)"
  983. >
  984. <span>{this.props.data.refundAmount}</span>
  985. </FormItem>
  986. )}
  987. <FormItem
  988. className="half-item"
  989. {...formItemLayout}
  990. label="订单部门"
  991. >
  992. <span>{theData.depName}</span>
  993. </FormItem>
  994. </div>
  995. <div className="clearfix">
  996. <FormItem
  997. labelCol={{ span: 5 }}
  998. wrapperCol={{ span: 18 }}
  999. label="订单留言"
  1000. >
  1001. <p style={{ maxWidth: 500, wordWrap: "break-word" }}>
  1002. {this.state.orderRemarks}
  1003. </p>
  1004. </FormItem>
  1005. </div>
  1006. <div className="clearfix">
  1007. <FormItem
  1008. labelCol={{ span: 5 }}
  1009. wrapperCol={{ span: 18 }}
  1010. label="合同扫描件"
  1011. >
  1012. <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
  1013. {this.state.orgCodeUrl ? <ImgList fileList={this.state.orgCodeUrl} ItemWidth={'96px'} /> : <div />}
  1014. </div>
  1015. <Button
  1016. style={{
  1017. float: "right",
  1018. marginRight: "140px",
  1019. marginTop: "20px",
  1020. }}
  1021. onClick={this.getOrderLog}
  1022. >
  1023. 查看订单日志
  1024. </Button>
  1025. </FormItem>
  1026. {/* 高新纯咨询合同说明详情 */}
  1027. <Gxczx
  1028. knowledgeServices={this.state.knowledgeServices}
  1029. auditServices={this.state.auditServices}
  1030. addDeductionServices={this.state.addDeductionServices}
  1031. knowledgeOther={this.state.knowledgeOther}
  1032. auditOther={this.state.auditOther}
  1033. addDeductionOther={this.state.addDeductionOther}
  1034. />
  1035. <FormItem
  1036. labelCol={{ span: 5 }}
  1037. wrapperCol={{ span: 18 }}
  1038. label="补充协议"
  1039. >
  1040. <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
  1041. {this.state.replenishUrl ? <ImgList domId={'orderDetail1'} fileList={this.state.replenishUrl} /> : <div />}
  1042. </div>
  1043. </FormItem>
  1044. </div>
  1045. <div>
  1046. <ContentUrl
  1047. processStatus={2}
  1048. domId={"detailContents"}
  1049. contentUrl={this.state.contentUrl}
  1050. imgId={"detailContentsImg"}
  1051. />
  1052. </div>
  1053. <div className="clearfix">
  1054. <FormItem
  1055. className="half-item"
  1056. {...formItemLayout}
  1057. label="订单负责人"
  1058. >
  1059. <span>{theData.salesmanName}</span>
  1060. </FormItem>
  1061. <FormItem
  1062. className="half-item"
  1063. {...formItemLayout}
  1064. label="订单负责人电话"
  1065. >
  1066. <span>{theData.salesmanMobile}</span>
  1067. </FormItem>
  1068. <FormItem
  1069. className="half-item"
  1070. {...formItemLayout}
  1071. label="当前财务负责人"
  1072. >
  1073. <span>{theData.nowFinance}</span>
  1074. </FormItem>
  1075. <FormItem
  1076. className="half-item"
  1077. {...formItemLayout}
  1078. label="当前财务负责人电话"
  1079. >
  1080. <span>{theData.nowFinanceMobile}</span>
  1081. </FormItem>
  1082. <FormItem
  1083. className="half-item"
  1084. {...formItemLayout}
  1085. style={{ opacity: ".5" }}
  1086. label="原订单负责人"
  1087. >
  1088. <span>{theData.oldSalesmanName}</span>
  1089. </FormItem>
  1090. <FormItem
  1091. className="half-item"
  1092. {...formItemLayout}
  1093. style={{ opacity: ".5" }}
  1094. label="原订单负责人电话"
  1095. >
  1096. <span>{theData.oldSalesmanMobile}</span>
  1097. </FormItem>
  1098. <FormItem
  1099. className="half-item"
  1100. {...formItemLayout}
  1101. style={{ opacity: ".5" }}
  1102. label="实际财务操作人"
  1103. >
  1104. <span>{theData.financeName}</span>
  1105. </FormItem>
  1106. <FormItem
  1107. className="half-item"
  1108. {...formItemLayout}
  1109. style={{ opacity: ".5" }}
  1110. label="实际财务操作人电话"
  1111. >
  1112. <span>{theData.financeMobile}</span>
  1113. </FormItem>
  1114. </div>
  1115. <OrderRiZi
  1116. dataSourcerizhi={this.state.dataSourceX}
  1117. closeOrderLog={this.closeOrderLog}
  1118. visible={this.state.avisible}
  1119. loading={this.state.loading}
  1120. />
  1121. <OrderCoor orderNo={this.state.orderNos} mrs={'20px'} mro={'64px'} />
  1122. <div className="clearfix" style={{ marginBottom: 10 }}>
  1123. <p style={{ fontSize: 18, marginLeft: 20 }}>项目业务</p>
  1124. <div className="patent-table">
  1125. <Spin spinning={this.state.loading}>
  1126. <Table
  1127. columns={this.state.columns}
  1128. dataSource={this.state.dataSource}
  1129. pagination={this.state.pagination}
  1130. onRowClick={this.tableRowClick}
  1131. expandedRowRender={expandedRowRenderVip}
  1132. rowClassName={this.addRowColor}
  1133. bordered
  1134. size="small"
  1135. />
  1136. </Spin>
  1137. </div>
  1138. </div>
  1139. <div>
  1140. <span style={{ marginLeft: 20, fontSize: "18px" }}>
  1141. 催款节点
  1142. </span>
  1143. <span
  1144. style={{
  1145. display: cuiDataList.length ? "none" : "inline-block",
  1146. marginLeft: 10,
  1147. color: "red",
  1148. }}
  1149. >
  1150. 金额总计(万元): {this.state.totalCui}
  1151. </span>
  1152. </div>
  1153. <div className="clearfix">
  1154. <Spin spinning={this.state.loading}>
  1155. <Form layout="horizontal" id="demand-form">
  1156. <Table
  1157. pagination={false}
  1158. bordered
  1159. size="small"
  1160. columns={
  1161. cuiDataList.length
  1162. ? this.state.ContactsLists
  1163. : this.state.ContactsListsNew
  1164. }
  1165. dataSource={
  1166. cuiDataList.length
  1167. ? this.state.contactList
  1168. : this.state.contactListNew
  1169. }
  1170. />
  1171. <Col
  1172. span={24}
  1173. offset={9}
  1174. style={{ marginTop: "15px" }}
  1175. ></Col>
  1176. </Form>
  1177. </Spin>
  1178. </div>
  1179. </Spin>
  1180. </Form>
  1181. {
  1182. // 项目业务详情
  1183. this.state.addnextVisible &&
  1184. <NewEditProject
  1185. readOnly={true}
  1186. visible={this.state.addnextVisible}
  1187. dataInfor={this.state.dataInfor}
  1188. onCancel={this.nextCancel}
  1189. />
  1190. }
  1191. {/* {this.state.addnextVisible &&
  1192. <ProjectDetailsReadOnly
  1193. infor={this.state.dataInfor}
  1194. visible={this.state.addnextVisible}
  1195. onCancel={this.nextCancel}
  1196. />
  1197. } */}
  1198. </div>
  1199. );
  1200. },
  1201. })
  1202. );
  1203. export default OrderDetail;