orderDetail.jsx 43 KB

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