orderDetail.jsx 45 KB

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