orderDetail.jsx 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284
  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. const OrderDetail = Form.create()(
  42. React.createClass({
  43. loadXmu(record) {
  44. this.state.data = [];
  45. this.setState({
  46. loading: true,
  47. });
  48. $.ajax({
  49. method: "get",
  50. dataType: "json",
  51. crossDomain: false,
  52. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  53. data: {
  54. orderNo: record ? record.orderNo : this.props.data.orderNo,
  55. },
  56. success: function (data) {
  57. let theArr = [];
  58. if (!data.data) {
  59. if (data.error && data.error.length) {
  60. message.warning(data.error[0].message);
  61. }
  62. } else {
  63. for (let i = 0; i < data.data.length; i++) {
  64. let thisdata = data.data[i];
  65. thisdata.key = i;
  66. thisdata.sort = thisdata.cSort;
  67. theArr.push(thisdata);
  68. }
  69. }
  70. this.setState({
  71. dataSource: theArr,
  72. pagination: false,
  73. });
  74. }.bind(this),
  75. }).always(
  76. function () {
  77. this.setState({
  78. loading: false,
  79. });
  80. }.bind(this)
  81. );
  82. },
  83. getInitialState() {
  84. return {
  85. rotateDeg: 0,
  86. orderNos: '',
  87. visible: false,
  88. avisible: false,
  89. loading: false,
  90. declarationBatch: 1,
  91. dataInfor: {},
  92. addnextVisible: false,
  93. jsDate: [],
  94. replenishUrl: [],
  95. auditStatus: 0,
  96. textFileList: [],
  97. videoFileList: [],
  98. previewVisibles: false,
  99. pictureUrl: [],
  100. pictureUrlMin: [],
  101. columns: [
  102. {
  103. title: "业务项目名称",
  104. dataIndex: "commodityName",
  105. key: "commodityName",
  106. render: (text, record) => {
  107. return <span>
  108. {text}<span style={{ color: "red" }}>{record.patentTypeName}</span>{"-" + record.id}
  109. <div>
  110. {record.cSort == 6 && record.projectType == 1 && <span>(含{record.htMember == 1 ? '高新会员&' : ''}{record.additionalDeduction == 1 ? '加计扣除&' : ''}{record.rdAwardsubsidy == 1 ? '研发奖补' : ''})</span>}
  111. {record.cSort == 6 && ([0, 3].indexOf(record.projectType) > -1) && <span>(仅提供单边会员服务)</span>}
  112. {record.cSort == 6 && record.projectType == 2 && <span>(仅填报表,仅咨询,不出备查资料)</span>}
  113. {record.cSort == 3 && <span>{record.technologyProjectType==0?'(简易项目)':record.technologyProjectType==1?'(市区级)':record.technologyProjectType==2?'(省级)':record.technologyProjectType==3?'(国家级)':''}</span>}
  114. {record.cSort == 8 ? (record.type != 2 && record.patentType == 1) ? <span>(变更)</span> : <span>{record.ordinaryRisk == 0 ? '(普通申请)' : record.ordinaryRisk == 1 ? '(风险代理)' : ''}</span> : ""}
  115. {record.type == 2 && <span>({record.days == 0 ? '普通' : record.days == 1 ? '加急' : ''}{record.scheme == 0 ? '&无方案' : record.scheme == 1 ? '&有方案' : ''})</span>}
  116. </div>
  117. </span>
  118. }
  119. },
  120. {
  121. title: "项目类别",
  122. dataIndex: "cname",
  123. key: "cname",
  124. },
  125. {
  126. title: "项目数量",
  127. dataIndex: "commodityQuantity",
  128. key: "commodityQuantity",
  129. render: (text, record) => {
  130. if (record.splitStatus == 1) {
  131. return (
  132. <span>
  133. {text}{" "}
  134. {/* {
  135. record.cSort != 6 &&
  136. <Tag
  137. color="#108ee9"
  138. onClick={(e) => {
  139. e.stopPropagation();
  140. this.showRes(record);
  141. }}
  142. >
  143. 已拆
  144. </Tag>
  145. } */}
  146. </span>
  147. );
  148. } else {
  149. return text;
  150. }
  151. },
  152. },
  153. {
  154. title: "金额(万元)",
  155. dataIndex: "commodityPrice",
  156. key: "commodityPrice",
  157. },
  158. {
  159. title: "负责人",
  160. dataIndex: "contacts",
  161. key: "contacts",
  162. },
  163. {
  164. title: "负责人电话",
  165. dataIndex: "contactsMobile",
  166. key: "contactsMobile",
  167. },
  168. {
  169. title: "项目状态",
  170. dataIndex: "projectStatus",
  171. key: "projectStatus",
  172. render: (text) => {
  173. return getProjectName(text);
  174. },
  175. },
  176. {
  177. title: "主要项目",
  178. dataIndex: "main",
  179. key: "main",
  180. width: 50,
  181. render: (text) => {
  182. return text ? "是" : "否";
  183. },
  184. },
  185. {
  186. title: "总年限",
  187. dataIndex: "yearSum",
  188. key: "yearSum",
  189. render: (text, record) => {
  190. return (
  191. <div>{["", "一年", "二年", "三年", "四年", "五年"][text]}</div>
  192. );
  193. }
  194. },
  195. {
  196. title: "年限",
  197. dataIndex: "serviceLife",
  198. key: "serviceLife",
  199. render: (text, record) => {
  200. return (
  201. <div>{!!text && JSON.parse(text).toString()}</div>
  202. );
  203. }
  204. },
  205. {
  206. title: "本次派单",
  207. dataIndex: "serviceYear",
  208. key: "serviceYear",
  209. render: (text, record) => {
  210. return (
  211. <div>{!text ? "" : text}</div>
  212. );
  213. }
  214. },
  215. {
  216. title: "项目说明",
  217. dataIndex: "taskComment",
  218. key: "taskComment",
  219. render: (text, record) => {
  220. let textStr = text;
  221. return (
  222. <Tooltip title={textStr}>
  223. <div
  224. style={{
  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. width: 140,
  776. },
  777. {
  778. title: "负责人电话",
  779. dataIndex: "receiverMobile",
  780. key: "receiverMobile",
  781. align: "center",
  782. width: 120,
  783. },
  784. {
  785. title: "会员负责人",
  786. dataIndex: "projectMemberName",
  787. key: "projectMemberName",
  788. width: 140,
  789. align: "center",
  790. },
  791. {
  792. title: "项目状态",
  793. dataIndex: "projectStatus",
  794. key: "projectStatus",
  795. align: "center",
  796. width: 100,
  797. render: (text) => {
  798. return getProjectName(text);
  799. },
  800. },
  801. {
  802. title: "本次派单",
  803. dataIndex: "serviceYear",
  804. key: "serviceYear",
  805. width: 80,
  806. align: "center"
  807. },
  808. {
  809. title: "项目说明",
  810. dataIndex: "taskComment",
  811. key: "taskComment",
  812. render: (text, record) => {
  813. let textStr = text;
  814. let textArr = [];
  815. if (record.htMember === 1) {
  816. textArr.push("高新会员");
  817. }
  818. if (record.additionalDeduction === 1) {
  819. textArr.push("加计扣除");
  820. }
  821. if (record.rdAwardsubsidy === 1) {
  822. textArr.push("研发奖补");
  823. }
  824. if (textArr.length) {
  825. textStr = `${textArr.join("&")} ${!!text ? `(${text})` : ''}`
  826. }
  827. return (
  828. <Tooltip title={textStr}>
  829. <div
  830. style={{
  831. overflow: "hidden",
  832. whiteSpace: "nowrap",
  833. textOverflow: "ellipsis",
  834. }}
  835. >{textStr}</div>
  836. </Tooltip>
  837. )
  838. },
  839. },
  840. ];
  841. } else {
  842. columns = [
  843. {
  844. title: "子项目名称",
  845. dataIndex: "taskName",
  846. key: "taskName"
  847. },
  848. {
  849. title: "子项目数量",
  850. dataIndex: "commodityQuantity",
  851. key: "commodityQuantity"
  852. },
  853. {
  854. title: "拆分操作人",
  855. dataIndex: "splitAname",
  856. key: "splitAname"
  857. },
  858. {
  859. title: "项目负责人",
  860. dataIndex: "receiverName",
  861. key: "receiverName"
  862. },
  863. {
  864. title: "拆分时间",
  865. dataIndex: "splitTimes",
  866. key: "splitTimes"
  867. }
  868. ]
  869. }
  870. return (
  871. <Table
  872. columns={columns}
  873. dataSource={data}
  874. pagination={false}
  875. />
  876. );
  877. } else {
  878. columns = [];
  879. return (
  880. <p
  881. style={{ fontWeight: "bold", color: "red", textAlign: "center" }}
  882. >
  883. {e.cSort == 6 ? "暂无派单" : "此项目暂未拆分"}
  884. </p>
  885. );
  886. }
  887. };
  888. const theData = this.state.orderList || {};
  889. const FormItem = Form.Item;
  890. const formItemLayout = {
  891. labelCol: { span: 10 },
  892. wrapperCol: { span: 14 },
  893. };
  894. const cuiDataList = this.state.contactList || [];
  895. return (
  896. <div className="login">
  897. <div style={{ position: "absolute", top: '12px', left: '81px', zIndex: 10000 }}>
  898. <OrderItemStatus deleteSign={this.state.deleteSign} />
  899. </div>
  900. {this.state.resVisible &&
  901. <ResolutionDetail
  902. cancel={this.resCancel}
  903. detail={this.state.resRecord}
  904. visible={this.state.resVisible}
  905. id={this.state.resRecord.orderNo}
  906. />
  907. }
  908. <Form layout="horizontal" id="demand-form">
  909. <Spin spinning={this.state.loading}>
  910. <div className="clearfix">
  911. <FormItem
  912. className="half-item"
  913. {...formItemLayout}
  914. label="订单编号"
  915. >
  916. <span>{theData.orderNo}</span>
  917. </FormItem>
  918. <FormItem
  919. className="half-item"
  920. {...formItemLayout}
  921. label="合同编号"
  922. >
  923. <span>{theData.contractNo}</span>
  924. </FormItem>
  925. <FormItem
  926. className="half-item"
  927. {...formItemLayout}
  928. label="客户名称"
  929. >
  930. <span>
  931. {theData.userName}
  932. <EnterpriseNameChange
  933. type='journal'
  934. style={{ marginLeft: 10 }}
  935. enterpriseId={this.state.orderUid} />
  936. </span>
  937. </FormItem>
  938. <FormItem className="half-item"
  939. {...formItemLayout}
  940. label="销售类型"
  941. >
  942. <span>
  943. {(["私有客户-", "签单客户-"][theData.userType] || " ") +
  944. (salesList[theData.salesType] || "")}
  945. {
  946. theData.other != null && theData.other != "" &&
  947. <Tooltip title={theData.other}>
  948. <span>
  949. {"(" + theData.other.toString().slice(0, 10) + (theData.other.toString().length > 9 ? "...)" : ")")}
  950. </span>
  951. </Tooltip>
  952. }
  953. </span>
  954. </FormItem>
  955. <FormItem
  956. className="half-item"
  957. {...formItemLayout}
  958. label="签单时间"
  959. >
  960. <span>{theData.signDate}</span>
  961. </FormItem>
  962. <FormItem
  963. className="half-item"
  964. {...formItemLayout}
  965. label="流程状态"
  966. >
  967. <span>{getProcessStatus(theData.processStatus, theData.examineName, theData.approval)}</span>
  968. <FlowChart
  969. orderNo={theData.orderNo}
  970. />
  971. </FormItem>
  972. <FormItem
  973. className="half-item"
  974. {...formItemLayout}
  975. label="订单类型"
  976. >
  977. <span>{getNewOrderType(theData.orderType)}</span>
  978. </FormItem>
  979. <FormItem
  980. className="half-item"
  981. {...formItemLayout}
  982. label="结算状态"
  983. >
  984. <span>{getLiquidationStatus(theData.liquidationStatus)}</span>
  985. </FormItem>
  986. <FormItem
  987. className="half-item"
  988. {...formItemLayout}
  989. label="签单总金额(万元)"
  990. >
  991. <span>{theData.totalAmount}</span>
  992. </FormItem>
  993. <FormItem
  994. className="half-item"
  995. {...formItemLayout}
  996. label="首付款(万元)"
  997. >
  998. <span>{theData.firstAmount}</span>
  999. </FormItem>
  1000. <FormItem
  1001. className="half-item"
  1002. {...formItemLayout}
  1003. label="已收款(万元)"
  1004. >
  1005. <span>{theData.settlementAmount}</span>
  1006. </FormItem>
  1007. <FormItem
  1008. className="half-item"
  1009. {...formItemLayout}
  1010. label="是否特批"
  1011. >
  1012. <span>
  1013. {getApproval(theData.approval)}
  1014. {getApprovedType(this.state.type ? this.state.type.split(",").map(Number) : [], this.state.typeExplain, 1)}
  1015. </span>
  1016. </FormItem>
  1017. { this.state.approval == 1 && <div className="clearfix">
  1018. <FormItem
  1019. labelCol={{ span: 5 }}
  1020. wrapperCol={{ span: 16 }}
  1021. label={
  1022. <span className="mandatory" style={{fontSize: '12px'}}>
  1023. 提示
  1024. </span>
  1025. }
  1026. >
  1027. <ApproveTypeTooltip />
  1028. </FormItem>
  1029. </div>
  1030. }
  1031. <FormItem
  1032. className="half-item"
  1033. {...formItemLayout}
  1034. label="是否外包"
  1035. >
  1036. <span>{this.state.outsource}</span>
  1037. </FormItem>
  1038. {this.props.data.orderStatus == "6" && (
  1039. <FormItem
  1040. className="half-item"
  1041. {...formItemLayout}
  1042. label="已退(万元)"
  1043. >
  1044. <span>{this.props.data.refundAmount}</span>
  1045. </FormItem>
  1046. )}
  1047. <FormItem
  1048. className="half-item"
  1049. {...formItemLayout}
  1050. label="订单部门"
  1051. >
  1052. <span>{theData.depName}</span>
  1053. </FormItem>
  1054. </div>
  1055. <div className="clearfix">
  1056. <FormItem
  1057. labelCol={{ span: 5 }}
  1058. wrapperCol={{ span: 18 }}
  1059. label="订单留言"
  1060. >
  1061. <p style={{ maxWidth: 500, wordWrap: "break-word" }}>
  1062. {this.state.orderRemarks}
  1063. </p>
  1064. </FormItem>
  1065. </div>
  1066. <div className="clearfix">
  1067. <FormItem
  1068. labelCol={{ span: 5 }}
  1069. wrapperCol={{ span: 18 }}
  1070. label="合同扫描件"
  1071. >
  1072. <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
  1073. {this.state.orgCodeUrl ? <ImgList fileList={this.state.orgCodeUrl} ItemWidth={'96px'} /> : <div />}
  1074. </div>
  1075. <Button
  1076. style={{
  1077. float: "right",
  1078. marginRight: "140px",
  1079. marginTop: "20px",
  1080. }}
  1081. onClick={this.getOrderLog}
  1082. >
  1083. 查看订单日志
  1084. </Button>
  1085. </FormItem>
  1086. {/* 高新纯咨询合同说明详情 */}
  1087. <Gxczx
  1088. knowledgeServices={this.state.knowledgeServices}
  1089. auditServices={this.state.auditServices}
  1090. addDeductionServices={this.state.addDeductionServices}
  1091. knowledgeOther={this.state.knowledgeOther}
  1092. auditOther={this.state.auditOther}
  1093. addDeductionOther={this.state.addDeductionOther}
  1094. />
  1095. <FormItem
  1096. labelCol={{ span: 5 }}
  1097. wrapperCol={{ span: 18 }}
  1098. label="补充协议"
  1099. >
  1100. <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
  1101. {this.state.replenishUrl ? <ImgList domId={'orderDetail1'} fileList={this.state.replenishUrl} /> : <div />}
  1102. </div>
  1103. </FormItem>
  1104. </div>
  1105. <div>
  1106. <ContentUrl
  1107. processStatus={2}
  1108. domId={"detailContents"}
  1109. contentUrl={this.state.contentUrl}
  1110. imgId={"detailContentsImg"}
  1111. />
  1112. </div>
  1113. {/* 知识产权情况 */}
  1114. <Property
  1115. patentStatus={this.state.patentStatus}
  1116. />
  1117. <div className="clearfix">
  1118. <FormItem
  1119. className="half-item"
  1120. {...formItemLayout}
  1121. label="订单负责人"
  1122. >
  1123. <span>{theData.salesmanName}</span>
  1124. </FormItem>
  1125. <FormItem
  1126. className="half-item"
  1127. {...formItemLayout}
  1128. label="订单负责人电话"
  1129. >
  1130. <span>{theData.salesmanMobile}</span>
  1131. </FormItem>
  1132. <FormItem
  1133. className="half-item"
  1134. {...formItemLayout}
  1135. label="当前财务负责人"
  1136. >
  1137. <span>{theData.nowFinance}</span>
  1138. </FormItem>
  1139. <FormItem
  1140. className="half-item"
  1141. {...formItemLayout}
  1142. label="当前财务负责人电话"
  1143. >
  1144. <span>{theData.nowFinanceMobile}</span>
  1145. </FormItem>
  1146. <FormItem
  1147. className="half-item"
  1148. {...formItemLayout}
  1149. style={{ opacity: ".5" }}
  1150. label="原订单负责人"
  1151. >
  1152. <span>{theData.oldSalesmanName}</span>
  1153. </FormItem>
  1154. <FormItem
  1155. className="half-item"
  1156. {...formItemLayout}
  1157. style={{ opacity: ".5" }}
  1158. label="原订单负责人电话"
  1159. >
  1160. <span>{theData.oldSalesmanMobile}</span>
  1161. </FormItem>
  1162. <FormItem
  1163. className="half-item"
  1164. {...formItemLayout}
  1165. style={{ opacity: ".5" }}
  1166. label="实际财务操作人"
  1167. >
  1168. <span>{theData.financeName}</span>
  1169. </FormItem>
  1170. <FormItem
  1171. className="half-item"
  1172. {...formItemLayout}
  1173. style={{ opacity: ".5" }}
  1174. label="实际财务操作人电话"
  1175. >
  1176. <span>{theData.financeMobile}</span>
  1177. </FormItem>
  1178. </div>
  1179. <OrderRiZi
  1180. dataSourcerizhi={this.state.dataSourceX}
  1181. closeOrderLog={this.closeOrderLog}
  1182. visible={this.state.avisible}
  1183. loading={this.state.loading}
  1184. />
  1185. <OrderCoor orderNo={this.state.orderNos} mrs={'20px'} mro={'64px'} />
  1186. <div className="clearfix" style={{ marginBottom: 10 }}>
  1187. <p style={{ fontSize: 18, marginLeft: 20 }}>项目业务</p>
  1188. <div className="patent-table">
  1189. <Spin spinning={this.state.loading}>
  1190. <Table
  1191. columns={this.state.columns}
  1192. dataSource={this.state.dataSource}
  1193. pagination={this.state.pagination}
  1194. onRowClick={this.tableRowClick}
  1195. expandedRowRender={expandedRowRenderVip}
  1196. rowClassName={this.addRowColor}
  1197. bordered
  1198. size="small"
  1199. />
  1200. </Spin>
  1201. </div>
  1202. </div>
  1203. <div>
  1204. <span style={{ marginLeft: 20, fontSize: "18px" }}>
  1205. 催款节点
  1206. </span>
  1207. <span
  1208. style={{
  1209. display: cuiDataList.length ? "none" : "inline-block",
  1210. marginLeft: 10,
  1211. color: "red",
  1212. }}
  1213. >
  1214. 金额总计(万元): {this.state.totalCui}
  1215. </span>
  1216. </div>
  1217. <div className="clearfix">
  1218. <Spin spinning={this.state.loading}>
  1219. <Form layout="horizontal" id="demand-form">
  1220. <Table
  1221. pagination={false}
  1222. bordered
  1223. size="small"
  1224. columns={
  1225. cuiDataList.length
  1226. ? this.state.ContactsLists
  1227. : this.state.ContactsListsNew
  1228. }
  1229. dataSource={
  1230. cuiDataList.length
  1231. ? this.state.contactList
  1232. : this.state.contactListNew
  1233. }
  1234. />
  1235. <Col
  1236. span={24}
  1237. offset={9}
  1238. style={{ marginTop: "15px" }}
  1239. ></Col>
  1240. </Form>
  1241. </Spin>
  1242. </div>
  1243. </Spin>
  1244. </Form>
  1245. {
  1246. // 项目业务详情
  1247. this.state.addnextVisible &&
  1248. <NewEditProject
  1249. readOnly={true}
  1250. visible={this.state.addnextVisible}
  1251. dataInfor={this.state.dataInfor}
  1252. onCancel={this.nextCancel}
  1253. />
  1254. }
  1255. {/* {this.state.addnextVisible &&
  1256. <ProjectDetailsReadOnly
  1257. infor={this.state.dataInfor}
  1258. visible={this.state.addnextVisible}
  1259. onCancel={this.nextCancel}
  1260. />
  1261. } */}
  1262. </div>
  1263. );
  1264. },
  1265. })
  1266. );
  1267. export default OrderDetail;