orderDetail.jsx 39 KB

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