orderDetail.jsx 41 KB

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