orderDetail.jsx 36 KB

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