orderDetail.jsx 45 KB

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