orderDetail.jsx 40 KB

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