orderDetail.jsx 43 KB

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