orderDetail.jsx 38 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226
  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: "projectStatus",
  773. key: "projectStatus",
  774. render: (text) => {
  775. return getProjectName(text);
  776. },
  777. },
  778. {
  779. title: "本次派单",
  780. dataIndex: "serviceYear",
  781. key: "serviceYear",
  782. },
  783. {
  784. title: "项目说明",
  785. dataIndex: "taskComment",
  786. key: "taskComment",
  787. render: (text) => {
  788. return (
  789. <Tooltip title={text}>
  790. <div
  791. >{text}</div>
  792. </Tooltip>
  793. )
  794. },
  795. },
  796. ];
  797. } else {
  798. columns = [
  799. {
  800. title: "子项目名称",
  801. dataIndex: "taskName",
  802. key: "taskName"
  803. },
  804. {
  805. title: "子项目数量",
  806. dataIndex: "commodityQuantity",
  807. key: "commodityQuantity"
  808. },
  809. {
  810. title: "拆分操作人",
  811. dataIndex: "splitAname",
  812. key: "splitAname"
  813. },
  814. {
  815. title: "项目负责人",
  816. dataIndex: "receiverName",
  817. key: "receiverName"
  818. },
  819. {
  820. title: "拆分时间",
  821. dataIndex: "splitTimes",
  822. key: "splitTimes"
  823. }
  824. ]
  825. }
  826. return (
  827. <Table
  828. columns={columns}
  829. dataSource={data}
  830. pagination={false}
  831. />
  832. );
  833. } else {
  834. columns = [];
  835. return (
  836. <p
  837. style={{ fontWeight: "bold", color: "red", textAlign: "center" }}
  838. >
  839. {e.cSort == 6 ? "暂无派单" : "此项目暂未拆分"}
  840. </p>
  841. );
  842. }
  843. };
  844. const theData = this.state.orderList || {};
  845. const FormItem = Form.Item;
  846. const formItemLayout = {
  847. labelCol: { span: 10 },
  848. wrapperCol: { span: 14 },
  849. };
  850. const cuiDataList = this.state.contactList || [];
  851. return (
  852. <div className="login">
  853. <div style={{ position: "absolute", top: '12px', left: '81px', zIndex: 10000 }}>
  854. <OrderItemStatus deleteSign={this.state.deleteSign} />
  855. </div>
  856. {this.state.resVisible &&
  857. <ResolutionDetail
  858. cancel={this.resCancel}
  859. detail={this.state.resRecord}
  860. visible={this.state.resVisible}
  861. id={this.state.resRecord.orderNo}
  862. />
  863. }
  864. <Form layout="horizontal" id="demand-form">
  865. <Spin spinning={this.state.loading}>
  866. <div className="clearfix">
  867. <FormItem
  868. className="half-item"
  869. {...formItemLayout}
  870. label="订单编号"
  871. >
  872. <span>{theData.orderNo}</span>
  873. </FormItem>
  874. <FormItem
  875. className="half-item"
  876. {...formItemLayout}
  877. label="合同编号"
  878. >
  879. <span>{theData.contractNo}</span>
  880. </FormItem>
  881. <FormItem
  882. className="half-item"
  883. {...formItemLayout}
  884. label="客户名称"
  885. >
  886. <span>
  887. {theData.userName}
  888. <EnterpriseNameChange
  889. type='journal'
  890. style={{ marginLeft: 10 }}
  891. enterpriseId={this.state.orderUid} />
  892. </span>
  893. </FormItem>
  894. <FormItem className="half-item"
  895. {...formItemLayout}
  896. label="销售类型"
  897. >
  898. <span>
  899. {(["私有客户-", "签单客户-"][theData.userType] || " ") +
  900. (salesList[theData.salesType] || "")}
  901. {
  902. theData.other != null && theData.other != "" &&
  903. <Tooltip title={theData.other}>
  904. <span>
  905. {"(" + theData.other.toString().slice(0, 10) + (theData.other.toString().length > 9 ? "...)" : ")")}
  906. </span>
  907. </Tooltip>
  908. }
  909. </span>
  910. </FormItem>
  911. <FormItem
  912. className="half-item"
  913. {...formItemLayout}
  914. label="签单时间"
  915. >
  916. <span>{theData.signDate}</span>
  917. </FormItem>
  918. <FormItem
  919. className="half-item"
  920. {...formItemLayout}
  921. label="流程状态"
  922. >
  923. <span>{getProcessStatus(theData.processStatus, theData.examineName, theData.approval)}</span>
  924. <FlowChart
  925. orderNo={theData.orderNo}
  926. />
  927. </FormItem>
  928. <FormItem
  929. className="half-item"
  930. {...formItemLayout}
  931. label="订单类型"
  932. >
  933. <span>{getNewOrderType(theData.orderType)}</span>
  934. </FormItem>
  935. <FormItem
  936. className="half-item"
  937. {...formItemLayout}
  938. label="结算状态"
  939. >
  940. <span>{getLiquidationStatus(theData.liquidationStatus)}</span>
  941. </FormItem>
  942. <FormItem
  943. className="half-item"
  944. {...formItemLayout}
  945. label="签单总金额(万元)"
  946. >
  947. <span>{theData.totalAmount}</span>
  948. </FormItem>
  949. <FormItem
  950. className="half-item"
  951. {...formItemLayout}
  952. label="首付款(万元)"
  953. >
  954. <span>{theData.firstAmount}</span>
  955. </FormItem>
  956. <FormItem
  957. className="half-item"
  958. {...formItemLayout}
  959. label="已收款(万元)"
  960. >
  961. <span>{theData.settlementAmount}</span>
  962. </FormItem>
  963. <FormItem
  964. className="half-item"
  965. {...formItemLayout}
  966. label="是否特批"
  967. >
  968. <span>
  969. {getApproval(theData.approval)}
  970. {getApprovedType(this.state.type ? this.state.type.split(",").map(Number) : [], this.state.typeExplain, 1)}
  971. </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;