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