orderDetail.jsx 43 KB

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