orderDetail.jsx 38 KB

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