orderDetail.jsx 44 KB

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