orderDetail.jsx 41 KB

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