contractCwjl.js 52 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709
  1. import React from "react";
  2. import { Button, Input, Spin, Table, message, Form, Modal, Tabs, Select, DatePicker, Tooltip } from "antd";
  3. import $ from "jquery/src/ajax";
  4. import {
  5. getNewOrderStatus,
  6. getProcessStatusNew,
  7. splitUrl,
  8. getjiedian,
  9. getboutique,
  10. getCuikuan,
  11. getProjectStatus,
  12. ShowModal,
  13. getType
  14. } from "@/tools.js";
  15. import "./customer.less";
  16. import { ChangeDetail } from "./changeComponent/changeDetailCwjl.js";
  17. import { SearchInput } from "./changeComponent/searchInput.js";
  18. import OrderDetail from "./changeComponent/orderDetail";
  19. import { ChooseList } from "./chooseList.jsx";
  20. import ShowModalDiv from "@/showModal.jsx";
  21. const { RangePicker } = DatePicker;
  22. import ReactToPrint from "react-to-print";
  23. import OrderRiZi from "@/orderRiZi.jsx";
  24. import { getProjectName } from "../../../tools";
  25. import ProjectDetailsReadOnly from "../../../common/projectDetailsReadOnly";
  26. import NewEditProject from "../../../common/projectOperation/newEditProject";
  27. const contractChange = Form.create()(
  28. React.createClass({
  29. loadData(pageNo) {
  30. this.setState({
  31. loading: true
  32. });
  33. $.ajax({
  34. method: "get",
  35. dataType: "json",
  36. crossDomain: false,
  37. url: globalConfig.context + "/api/admin/orderChange/orderChangeList",
  38. data: {
  39. pageNo: pageNo || 1,
  40. pageSize: this.state.pagination.pageSize,
  41. userName: this.state.searchData.userNameSearch,
  42. processState: this.props.processState,
  43. timeType: this.state.searchData.timeTypeSearch,
  44. startTime: this.state.searchData.releaseDate[0],
  45. endTime: this.state.searchData.releaseDate[1],
  46. salesmanName: this.state.searchData.salesmanNameSearch,
  47. complete: this.state.searchData.completeSearch || 1,
  48. deps: this.state.searchData.deps,
  49. orderNo: this.state.searchData.orderNoSearch,
  50. contractNo: this.state.searchData.contractNoSearch,
  51. type: this.state.searchData.changeSearch
  52. },
  53. success: function (data) {
  54. ShowModal(this);
  55. let theArr = [];
  56. if (data.error.length || data.data.list == "") {
  57. if (data.error && data.error.length) {
  58. message.warning(data.error[0].message);
  59. }
  60. } else {
  61. for (let i = 0; i < data.data.list.length; i++) {
  62. let thisdata = data.data.list[i];
  63. theArr.push({
  64. key: i,
  65. orderNo: thisdata.orderNo,
  66. createTimes: thisdata.createTimes,
  67. nickname: thisdata.nickname,
  68. orderType: thisdata.orderType,
  69. establishTimes: thisdata.establishTimes,
  70. orderStatus: thisdata.orderStatus,
  71. totalAmount: thisdata.totalAmount,
  72. settlementAmount: thisdata.settlementAmount,
  73. arrears: thisdata.arrears,
  74. salesmanName: thisdata.salesmanName,
  75. depName: thisdata.depName,
  76. processState: thisdata.processState,
  77. type: thisdata.type,
  78. status: thisdata.status,
  79. id: thisdata.id,
  80. contractNo: thisdata.contractNo,
  81. processStateText: getProcessStatusNew(
  82. thisdata.examineName,
  83. thisdata.processState,
  84. thisdata.status
  85. )
  86. });
  87. }
  88. this.state.pagination.total = data.data.totalCount;
  89. this.state.pagination.current = data.data.pageNo;
  90. }
  91. if (data.data && data.data.list && !data.data.list.length) {
  92. this.state.pagination.total = 0;
  93. }
  94. this.setState({
  95. dataSource: theArr,
  96. pageNo: pageNo,
  97. pagination: this.state.pagination
  98. });
  99. }.bind(this)
  100. }).always(
  101. function () {
  102. this.setState({
  103. loading: false
  104. });
  105. }.bind(this)
  106. );
  107. },
  108. getInitialState() {
  109. return {
  110. dvisible: false,
  111. page: 1,
  112. searchData: {
  113. releaseDate: []
  114. },
  115. primaryOrderData: {}, //原订单数据
  116. orderData: {}, //现订单数据
  117. pictureUrl: [],
  118. voucherUrl: [],
  119. attachment: [],
  120. declarationBatch: 1,
  121. dataInfor: {},
  122. attachmentUrl: [],
  123. //收款数据
  124. proceedsData: {},
  125. proTotal: 0,
  126. invTotal: 0,
  127. contractData: {},
  128. // 回收退票数据
  129. refundInvoice: [],
  130. RefundInvoice: [],
  131. additionalOrderData: {},
  132. paginations: false,
  133. activeKey: "a",
  134. confirmLoading: false,
  135. aloading: false,
  136. pagination: {
  137. defaultCurrent: 1,
  138. defaultPageSize: 10,
  139. showQuickJumper: true,
  140. pageSize: 10,
  141. onChange: function (page) {
  142. this.loadData(page);
  143. }.bind(this),
  144. showTotal: function (total) {
  145. return "共" + total + "条数据";
  146. }
  147. },
  148. columns: [
  149. {
  150. title: "合同编号",
  151. dataIndex: "contractNo",
  152. key: "contractNo"
  153. },
  154. {
  155. title: "订单编号",
  156. dataIndex: "orderNo",
  157. key: "orderNo"
  158. },
  159. {
  160. title: "客户名称",
  161. dataIndex: "nickname",
  162. key: "nickname",
  163. width: 150,
  164. render: (text) => {
  165. return (
  166. <Tooltip title={text}>
  167. <div
  168. // style={{
  169. // maxWidth: '150px',
  170. // overflow: 'hidden',
  171. // textOverflow: "ellipsis",
  172. // whiteSpace: 'nowrap',
  173. // }}
  174. >{text}</div>
  175. </Tooltip>
  176. )
  177. },
  178. },
  179. {
  180. title: "订单部门",
  181. dataIndex: "depName",
  182. key: "depName"
  183. },
  184. {
  185. title: "订单类型",
  186. dataIndex: "orderType",
  187. key: "orderType",
  188. render: text => {
  189. return text ? "科技项目" : "认证项目";
  190. }
  191. },
  192. {
  193. title: "下单时间",
  194. dataIndex: "establishTimes",
  195. key: "establishTimes"
  196. },
  197. {
  198. title: "订单状态",
  199. dataIndex: "orderStatus",
  200. key: "orderStatus",
  201. render: text => {
  202. return getNewOrderStatus(text);
  203. }
  204. },
  205. {
  206. title: "合同额(万元)",
  207. dataIndex: "totalAmount",
  208. key: "totalAmount"
  209. },
  210. {
  211. title: "已付额(万元)",
  212. dataIndex: "settlementAmount",
  213. key: "settlementAmount"
  214. },
  215. {
  216. title: "欠款(万元)",
  217. dataIndex: "arrears",
  218. key: "arrears"
  219. },
  220. {
  221. title: "订单负责人",
  222. dataIndex: "salesmanName",
  223. key: "salesmanName"
  224. },
  225. {
  226. title: "变更类型",
  227. dataIndex: "type",
  228. key: "type",
  229. render: text => {
  230. return getType(text);
  231. }
  232. },
  233. {
  234. title: "审核状态",
  235. dataIndex: "processStateText",
  236. key: "processStateText"
  237. },
  238. {
  239. title: "提交时间",
  240. dataIndex: "createTimes",
  241. key: "createTimes"
  242. }
  243. ],
  244. dataSource: [],
  245. // 传递给子组件的
  246. dataProps: [],
  247. columnsX: [
  248. {
  249. title: "业务项目名称",
  250. dataIndex: "commodityName",
  251. key: "commodityName",
  252. render: (text, record) => {
  253. return <span>
  254. {text}<span style={{ color: "red" }}>{record.patentTypeName}</span>{"-" + record.id}
  255. <div>
  256. {record.cSort == 6 && record.projectType == 1 && <span>(含{record.htMember == 1 ? '高新会员&' : ''}{record.additionalDeduction == 1 ? '加计扣除&' : ''}{record.rdAwardsubsidy == 1 ? '研发奖补' : ''})</span>}
  257. {record.cSort == 6 && ([0, 3].indexOf(record.projectType) > -1) && <span>(仅提供单边会员服务)</span>}
  258. {record.cSort == 6 && record.projectType == 2 && <span>(仅填报表,仅咨询,不出备查资料)</span>}
  259. {record.cSort == 3 && <span>{record.technologyProjectType==0?'(简易项目)':record.technologyProjectType==1?'(市区级)':record.technologyProjectType==2?'(省级)':record.technologyProjectType==3?'(国家级)':''}</span>}
  260. {record.cSort == 8 ? (record.type != 2 && record.patentType == 1) ? <span>(变更)</span> : <span>{record.ordinaryRisk == 0 ? '(普通申请)' : record.ordinaryRisk == 1 ? '(风险代理)' : ''}</span> : ""}
  261. {record.type == 2 && <span>({record.days == 0 ? '普通' : record.days == 1 ? '加急' : ''}{record.scheme == 0 ? '&无方案' : record.scheme == 1 ? '&有方案' : ''})</span>}
  262. </div>
  263. </span>
  264. }
  265. },
  266. {
  267. title: "项目类别",
  268. dataIndex: "cname",
  269. key: "cname"
  270. },
  271. {
  272. title: "项目数量",
  273. dataIndex: "commodityQuantity",
  274. key: "commodityQuantity"
  275. },
  276. {
  277. title: "金额(万元)",
  278. dataIndex: "commodityPrice",
  279. key: "commodityPrice"
  280. },
  281. {
  282. title: "负责人",
  283. dataIndex: "contacts",
  284. key: "contacts"
  285. },
  286. {
  287. title: "负责人电话",
  288. dataIndex: "contactsMobile",
  289. key: "contactsMobile"
  290. },
  291. {
  292. title: "项目状态",
  293. dataIndex: "projectStatus",
  294. key: "projectStatus",
  295. render: text => {
  296. return getProjectName(text);
  297. }
  298. },
  299. {
  300. title: "主要项目",
  301. dataIndex: "main",
  302. key: "main",
  303. render: text => {
  304. return text ? "是" : "否";
  305. }
  306. },
  307. {
  308. title: "总年限",
  309. dataIndex: "yearSum",
  310. key: "yearSum",
  311. render: (text, record) => {
  312. return (
  313. <div>{["", "一年", "二年", "三年", "四年", "五年"][text]}</div>
  314. );
  315. }
  316. },
  317. {
  318. title: "年限",
  319. dataIndex: "serviceLife",
  320. key: "serviceLife",
  321. render: (text, record) => {
  322. return (
  323. <div>{!!text && JSON.parse(text).toString()}</div>
  324. );
  325. }
  326. },
  327. {
  328. title: "本次派单",
  329. dataIndex: "serviceYear",
  330. key: "serviceYear",
  331. render: (text, record) => {
  332. return (
  333. <div>{!text ? "" : text}</div>
  334. );
  335. }
  336. },
  337. {
  338. title: "项目说明",
  339. dataIndex: "taskComment",
  340. key: "taskComment",
  341. render: text => {
  342. return (
  343. <Tooltip title={text}>
  344. <div
  345. style={{
  346. width: 100,
  347. overflow: "hidden",
  348. whiteSpace: "nowrap",
  349. textOverflow: "ellipsis",
  350. }}
  351. >{text}</div>
  352. </Tooltip>
  353. )
  354. }
  355. }
  356. ],
  357. // 子组件改变的表格title数组
  358. changeList: undefined,
  359. columnsrizhi: [
  360. {
  361. title: "流程",
  362. dataIndex: "processName",
  363. key: "processName"
  364. },
  365. {
  366. title: "操作人",
  367. dataIndex: "adminName",
  368. key: "adminName"
  369. },
  370. {
  371. title: "时间",
  372. dataIndex: "createDate",
  373. key: "createDate"
  374. }
  375. ],
  376. dataSourceX: [],
  377. ContactsLists: [
  378. {
  379. title: "催款科目",
  380. dataIndex: "dunSubject",
  381. key: "dunSubject",
  382. render: text => {
  383. return getjiedian(text);
  384. }
  385. },
  386. {
  387. title: "金额(万元)",
  388. dataIndex: "money",
  389. key: "money"
  390. },
  391. {
  392. title: "催款状态",
  393. dataIndex: "dunStatus",
  394. key: "dunStatus",
  395. render: text => {
  396. return getCuikuan(text);
  397. }
  398. }
  399. ]
  400. };
  401. },
  402. departmentList() {
  403. this.setState({
  404. loading: true
  405. });
  406. $.ajax({
  407. method: "get",
  408. dataType: "json",
  409. crossDomain: false,
  410. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  411. data: {},
  412. success: function (data) {
  413. let thedata = data.data;
  414. let theArr = [];
  415. if (!thedata) {
  416. if (data.error && data.error.length) {
  417. message.warning(data.error[0].message);
  418. }
  419. } else {
  420. thedata.map(function (item, index) {
  421. theArr.push({
  422. key: index,
  423. name: item.name,
  424. id: item.id
  425. });
  426. });
  427. }
  428. this.setState({
  429. departmentArr: theArr
  430. });
  431. }.bind(this)
  432. }).always(
  433. function () {
  434. this.setState({
  435. loading: false
  436. });
  437. }.bind(this)
  438. );
  439. },
  440. //页面加载函数
  441. componentWillMount() {
  442. this.loadData();
  443. },
  444. //整行点击
  445. tableRowClick(record) {
  446. this.setState(
  447. {
  448. visible: true,
  449. type: record.type,
  450. status: record.status,
  451. buttonStatus: true,
  452. orderStatus: record.orderStatus,
  453. processStateText: record.processStateText,
  454. id: record.id,
  455. orderNo: record.orderNo
  456. },
  457. () => {
  458. this.xiangqing(record.orderNo);
  459. this.xiangmu(record.orderNo);
  460. this.jiedian(record.orderNo);
  461. this.jiedianNew(record.orderNo);
  462. this.createTabs();
  463. }
  464. );
  465. },
  466. //点击打卡项目详情
  467. tableRowClickX(record) {
  468. this.setState({
  469. jid: record.id, //项目ID
  470. kid: record.commodityId, //商品ID
  471. commodityName: record.commodityName, //金额
  472. commodityPrice: record.commodityPrice, //金额
  473. commodityQuantity: record.commodityQuantity, //数量
  474. taskComment: record.taskComment, //备注
  475. main: record.main.toString(), //是否为主要
  476. addnextVisible: true,
  477. dataInfor: record,
  478. addState: 0
  479. });
  480. },
  481. //项目详情关闭
  482. nextCancel() {
  483. this.setState({
  484. addnextVisible: false
  485. });
  486. },
  487. // 合同变更详情
  488. ChangeDetail(id) {
  489. let url = window.location.href.substring(7);
  490. $.ajax({
  491. method: "get",
  492. dataType: "json",
  493. crossDomain: false,
  494. url:
  495. globalConfig.context +
  496. "/api/admin/orderChange/orderChangeDetailsById",
  497. data: {
  498. id: id
  499. },
  500. success: function (data) {
  501. if (data.data) {
  502. let thisdata = data.data;
  503. Object.assign(thisdata, {
  504. processStateText: this.state.processStateText,
  505. userName: this.state.userName,
  506. contractNo: this.state.contractNo
  507. });
  508. this.setState({
  509. contractData: thisdata,
  510. voucherUrl: thisdata.voucherUrl
  511. ? splitUrl(
  512. thisdata.voucherUrl,
  513. ",",
  514. globalConfig.avatarHost + "/upload",
  515. url
  516. )
  517. : [],
  518. attachment: thisdata.attachmentUrl
  519. ? splitUrl(
  520. thisdata.attachmentUrl,
  521. ",",
  522. globalConfig.avatarHost + "/upload",
  523. url
  524. )
  525. : [],
  526. contractPictureUrl: thisdata.contractPictureUrl
  527. ? splitUrl(
  528. thisdata.contractPictureUrl,
  529. ",",
  530. globalConfig.avatarHost + "/upload",
  531. url
  532. )
  533. : []
  534. });
  535. }
  536. }.bind(this)
  537. });
  538. $.ajax({
  539. method: "get",
  540. dataType: "json",
  541. crossDomain: false,
  542. url:
  543. globalConfig.context +
  544. "/api/admin/orderChange/listOrderInvoiceAndBill",
  545. data: {
  546. orderNo: this.state.orderNo
  547. },
  548. success: function (data) {
  549. if (!data.data) return;
  550. let proTotal = 0;
  551. let invTotal = 0;
  552. data.data.bill.forEach(item => {
  553. proTotal += item.transactionAmount;
  554. });
  555. data.data.invoice.forEach(item => {
  556. invTotal += item.amount;
  557. });
  558. this.setState({
  559. proceedsData: data.data,
  560. proTotal: (Math.round(proTotal * 1000000) / 1000000).toFixed(6),
  561. invTotal: (Math.round(invTotal * 1000000) / 1000000).toFixed(6),
  562. });
  563. }.bind(this)
  564. });
  565. $.ajax({
  566. method: "get",
  567. dataType: "json",
  568. crossDomain: false,
  569. url:
  570. globalConfig.context +
  571. "/api/admin/orderChange/listOrderRefundInvoice",
  572. data: {
  573. orderNo: this.state.orderNo
  574. },
  575. success: data => {
  576. if (!data) return;
  577. data.data.forEach(item => {
  578. item.load = true;
  579. });
  580. this.setState({
  581. refundInvoice: data.data
  582. });
  583. }
  584. });
  585. },
  586. //订单详情
  587. xiangqing(orderNos) {
  588. $.ajax({
  589. method: "get",
  590. dataType: "json",
  591. crossDomain: false,
  592. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  593. data: {
  594. orderNo: orderNos
  595. },
  596. success: function (data) {
  597. if (data.error.length || data.data.list == "") {
  598. if (data.error && data.error.length) {
  599. message.warning(data.error[0].message);
  600. }
  601. } else {
  602. let thisdata = data.data;
  603. this.setState({
  604. userName: thisdata.userName,
  605. primaryOrderNo: thisdata.primaryOrder,
  606. additionalOrder: thisdata.additionalOrder,
  607. contractNo: thisdata.contractNo,
  608. // arrears: thisdata.arrears,
  609. orderData: thisdata,
  610. isAddition: thisdata.additionalOrder ? true : false,
  611. contractPictureUrl: thisdata.contractPictureUrl
  612. ? splitUrl(
  613. thisdata.contractPictureUrl,
  614. ",",
  615. globalConfig.avatarHost + "/upload"
  616. )
  617. : [],
  618. replenishUrl: thisdata.agreementUrl
  619. ? splitUrl(
  620. thisdata.agreementUrl,
  621. ",",
  622. globalConfig.avatarHost + "/upload"
  623. )
  624. : [],
  625. });
  626. // console.log(thisdata.contractPictureUrl);
  627. }
  628. }.bind(this)
  629. });
  630. },
  631. // 原订单数据
  632. primaryOrder(primaryOrder) {
  633. $.ajax({
  634. method: "get",
  635. dataType: "json",
  636. crossDomain: false,
  637. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  638. data: {
  639. orderNo: primaryOrder
  640. },
  641. success: function (data) {
  642. if (data.error.length || data.data.list == "") {
  643. if (data.error && data.error.length) {
  644. message.warning(data.error[0].message);
  645. }
  646. } else {
  647. let thisdata = data.data;
  648. this.setState({
  649. primaryOrderData: thisdata
  650. });
  651. }
  652. }.bind(this)
  653. });
  654. },
  655. // 附加订单数据
  656. additionalOrder(additionalOrder) {
  657. $.ajax({
  658. method: "get",
  659. dataType: "json",
  660. crossDomain: false,
  661. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  662. data: {
  663. orderNo: additionalOrder
  664. },
  665. success: function (data) {
  666. if (data.error.length || data.data.list == "") {
  667. if (data.error && data.error.length) {
  668. message.warning(data.error[0].message);
  669. }
  670. } else {
  671. let thisdata = data.data;
  672. this.setState({
  673. additionalOrderData: thisdata
  674. });
  675. }
  676. }.bind(this)
  677. });
  678. },
  679. //项目列表
  680. xiangmu(orderNos) {
  681. $.ajax({
  682. method: "get",
  683. dataType: "json",
  684. crossDomain: false,
  685. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  686. data: {
  687. orderNo: orderNos
  688. },
  689. success: function (data) {
  690. let theArr = [];
  691. if (data.error.length || data.data.list == "") {
  692. if (data.error && data.error.length) {
  693. message.warning(data.error[0].message);
  694. }
  695. } else {
  696. for (let i = 0; i < data.data.length; i++) {
  697. let thisdata = data.data[i];
  698. thisdata.key = i;
  699. thisdata.sort = thisdata.cSort;
  700. theArr.push(thisdata);
  701. }
  702. }
  703. this.setState({
  704. dataSourceX: theArr
  705. });
  706. }.bind(this)
  707. });
  708. },
  709. // 查看收款金额
  710. getProceeds(id) {
  711. $.ajax({
  712. method: "get",
  713. dataType: "json",
  714. crossDomain: false,
  715. url:
  716. globalConfig.context +
  717. "/api/admin/orderChange/orderChangeDetailsById",
  718. data: {
  719. id: id
  720. },
  721. success: function (data) {
  722. if (data.error.length || data.data.list == "") {
  723. if (data.error && data.error.length) {
  724. message.warning(data.error[0].message);
  725. }
  726. } else {
  727. // let thisdata = data.data;
  728. }
  729. }.bind(this)
  730. });
  731. },
  732. search(obj) {
  733. this.setState({
  734. searchData: obj
  735. }, () => {
  736. this.loadData(1);
  737. })
  738. },
  739. rizhi(orderNo) {
  740. $.ajax({
  741. method: "get",
  742. dataType: "json",
  743. crossDomain: false,
  744. url: "/api/admin/newOrder/selectOrderLog",
  745. data: {
  746. orderNo: orderNo
  747. },
  748. success: function (data) {
  749. let theArr = [];
  750. let thisData = data.data;
  751. if (!thisData.length) {
  752. if (data.error && data.error.length) {
  753. message.warning(data.error[0].message);
  754. }
  755. thisData = {};
  756. } else {
  757. for (let i = 0; i < data.data.length; i++) {
  758. let thisdata = data.data[i];
  759. theArr.push({
  760. processName: thisdata.processName,
  761. adminName: thisdata.adminName,
  762. createDate: thisdata.createDate,
  763. remarks: thisdata.remarks
  764. });
  765. }
  766. }
  767. this.setState({
  768. dataSourcerizhi: theArr
  769. });
  770. }.bind(this)
  771. });
  772. },
  773. getOrderLog(orderNo) {
  774. this.setState({
  775. rizhivisible: true
  776. });
  777. this.rizhi(orderNo);
  778. },
  779. closeOrderLog() {
  780. this.setState({
  781. rizhivisible: false
  782. });
  783. },
  784. //节点列表
  785. jiedian(orderNos) {
  786. $.ajax({
  787. method: "get",
  788. dataType: "json",
  789. crossDomain: false,
  790. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  791. data: {
  792. orderNo: orderNos
  793. },
  794. success: function (data) {
  795. let theArr = [];
  796. let thisData = [];
  797. if (data.error.length || data.data.list == "") {
  798. if (data.error && data.error.length) {
  799. message.warning(data.error[0].message);
  800. }
  801. } else {
  802. for (let i = 0; i < data.data.length; i++) {
  803. thisData = data.data[i];
  804. theArr.push({
  805. key: i,
  806. dunSubject: thisData.dunSubject
  807. ? thisData.dunSubject.toString()
  808. : "", //催款科目
  809. id: thisData.id, //节点Id
  810. money: thisData.money, //催款金额
  811. dunStatus: thisData.dunStatus //催款状态
  812. });
  813. }
  814. this.setState({
  815. contactList: theArr
  816. });
  817. }
  818. }.bind(this)
  819. });
  820. },
  821. jiedianNew(orderNos) {
  822. $.ajax({
  823. method: "get",
  824. dataType: "json",
  825. crossDomain: false,
  826. url:
  827. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  828. data: {
  829. orderNo: orderNos
  830. },
  831. success: function (data) {
  832. if (data.error && data.error.length) {
  833. message.warning(data.error[0].message);
  834. } else {
  835. let theArr = [];
  836. let thisData = [];
  837. let arr = data.data || [];
  838. let totalCui = 0;
  839. for (let i = 0; i < arr.length; i++) {
  840. thisData = arr[i];
  841. totalCui += +thisData.money;
  842. theArr.push({
  843. key: i,
  844. dunSubject: thisData.dunSubject
  845. ? thisData.dunSubject.toString()
  846. : "", //催款科目
  847. id: thisData.id, //节点Id
  848. money: thisData.money, //催款金额
  849. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  850. commodityName: thisData.commodityName,
  851. projectType: thisData.projectType,
  852. dunTypeName: thisData.dunTypeName,
  853. status: thisData.status,
  854. waitDay: thisData.waitDay,
  855. effectiveCount: thisData.effectiveCount,
  856. startDate: thisData.startDate,
  857. dunType: thisData.dunType,
  858. appropriationRatio: thisData.appropriationRatio,
  859. customizeName: thisData.customizeName,
  860. customizeTimes: thisData.customizeTimes,
  861. tid: thisData.tid,
  862. });
  863. }
  864. if (!totalCui) {
  865. totalCui = 0;
  866. }
  867. totalCui = (Math.round(totalCui * 1000000) / 1000000).toFixed(6);
  868. this.setState({
  869. contactListNew: theArr,
  870. totalCui
  871. });
  872. }
  873. }.bind(this)
  874. }).always(
  875. function () {
  876. this.setState({
  877. loading: false
  878. });
  879. }.bind(this)
  880. );
  881. },
  882. //审核通过
  883. examOk() {
  884. $.ajax({
  885. method: "post",
  886. dataType: "json",
  887. crossDomain: false,
  888. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  889. data: {
  890. orderNo: this.state.orderNo,
  891. orderStatus: 2
  892. },
  893. success: function (data) {
  894. if (data.error.length || data.data.list == "") {
  895. if (data.error && data.error.length) {
  896. message.warning(data.error[0].message);
  897. }
  898. } else {
  899. message.success("该订单已通过审核~");
  900. this.setState({
  901. visible: false
  902. });
  903. this.reset();
  904. }
  905. }.bind(this)
  906. }).always(
  907. function () {
  908. this.setState({
  909. loading: false
  910. });
  911. }.bind(this)
  912. );
  913. },
  914. //通过发给外包
  915. outsourcing() {
  916. $.ajax({
  917. method: "post",
  918. dataType: "json",
  919. crossDomain: false,
  920. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  921. data: {
  922. orderNo: this.state.orderNo,
  923. orderStatus: 2,
  924. outsource: 1
  925. },
  926. success: function (data) {
  927. if (data.error.length || data.data.list == "") {
  928. if (data.error && data.error.length) {
  929. message.warning(data.error[0].message);
  930. }
  931. } else {
  932. message.success("该订单已通过审核~");
  933. this.setState({
  934. visible: false
  935. });
  936. this.reset();
  937. }
  938. }.bind(this)
  939. }).always(
  940. function () {
  941. this.setState({
  942. loading: false
  943. });
  944. }.bind(this)
  945. );
  946. },
  947. //审核不通过
  948. examOks() {
  949. this.setState({
  950. aloading: true
  951. });
  952. $.ajax({
  953. method: "post",
  954. dataType: "json",
  955. crossDomain: false,
  956. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  957. data: {
  958. orderNo: this.state.orderNo,
  959. orderStatus: 3,
  960. reason: this.state.reason
  961. },
  962. success: function (data) {
  963. if (data.error.length || data.data.list == "") {
  964. if (data.error && data.error.length) {
  965. message.warning(data.error[0].message);
  966. this.setState({
  967. aloading: true
  968. });
  969. }
  970. } else {
  971. message.success("该订单已被拒绝~");
  972. this.setState({
  973. visible: false,
  974. aloading: false,
  975. noVisible: false,
  976. reason: ""
  977. });
  978. this.reset();
  979. }
  980. }.bind(this)
  981. }).always(
  982. function () {
  983. this.setState({
  984. loading: false
  985. });
  986. }.bind(this)
  987. );
  988. },
  989. //点击拒绝
  990. examNo() {
  991. this.setState({
  992. noVisible: true
  993. });
  994. },
  995. loadDataChange(key) {
  996. $.ajax({
  997. method: "get",
  998. dataType: "json",
  999. async: false,
  1000. crossDomain: false,
  1001. url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
  1002. data: {
  1003. changeId: key
  1004. },
  1005. success: function (data) {
  1006. if (data.error.length || data.data.list == "") {
  1007. if (data.error && data.error.length) {
  1008. message.warning(data.error[0].message);
  1009. }
  1010. } else {
  1011. // console.log("拿到历史", data);
  1012. this.setState({
  1013. dataProps: data.data
  1014. });
  1015. }
  1016. }.bind(this)
  1017. });
  1018. },
  1019. callback(key) {
  1020. this.setState(
  1021. {
  1022. activeKey: key
  1023. },
  1024. () => {
  1025. if (key != "a" && key != "c" && key.length < 10) {
  1026. this.ChangeDetail(key);
  1027. this.loadDataChange(key);
  1028. this.getProceeds(key);
  1029. } else if (key != "a" && key != "c" && key.length > 10) {
  1030. this.primaryOrder(key);
  1031. this.xiangmu(key);
  1032. this.jiedian(key);
  1033. this.jiedianNew(key);
  1034. this.loadDataChange(key);
  1035. }
  1036. }
  1037. );
  1038. if (key === "a") {
  1039. this.xiangmu(this.state.orderNo);
  1040. this.jiedian(this.state.orderNo);
  1041. this.jiedianNew(this.state.orderNo);
  1042. }
  1043. // if (key === "2") {
  1044. // this.ChangeDetail(this.state.id);
  1045. // this.loadDataChange();
  1046. // this.getProceeds(this.state.id);
  1047. // }
  1048. // if (key === "3") {
  1049. // this.primaryOrder(this.state.primaryOrderNo);
  1050. // this.xiangmu(this.state.primaryOrderNo);
  1051. // this.jiedian(this.state.primaryOrderNo);
  1052. // this.jiedianNew(this.state.primaryOrderNo);
  1053. // }
  1054. if (key === "c") {
  1055. this.additionalOrder(this.state.additionalOrder);
  1056. this.xiangmu(this.state.additionalOrder);
  1057. this.jiedian(this.state.additionalOrder);
  1058. this.jiedianNew(this.state.additionalOrder);
  1059. this.setState({
  1060. buttonStatusA: false
  1061. });
  1062. } else {
  1063. this.setState({
  1064. buttonStatusA: true
  1065. });
  1066. }
  1067. },
  1068. closeDesc(e, s) {
  1069. this.state.activeKey = "a";
  1070. this.state.userDetaile = false;
  1071. this.state.signBillVisible = false;
  1072. this.state.visible = e;
  1073. if (s) {
  1074. this.loadData(this.state.pageNo);
  1075. }
  1076. },
  1077. // 获取原订单编号
  1078. getPrimaryOrder(value) {
  1079. this.setState({
  1080. primaryOrder: value
  1081. });
  1082. },
  1083. getAdditionalOrder(value) {
  1084. this.setState({
  1085. additionalOrder: value
  1086. });
  1087. },
  1088. getUrl(url) {
  1089. let theorgCodeUrl = [];
  1090. if (url.length) {
  1091. let picArr = [];
  1092. url.map(function (item) {
  1093. if (
  1094. item.response &&
  1095. item.response.data &&
  1096. item.response.data.length
  1097. ) {
  1098. picArr.push(item.response.data);
  1099. }
  1100. });
  1101. theorgCodeUrl = picArr.join(",");
  1102. }
  1103. return theorgCodeUrl;
  1104. },
  1105. sureOut() {
  1106. if (!this.state.companyName) {
  1107. message.warning("公司名称不能为空");
  1108. return;
  1109. }
  1110. if (!this.state.unitPrice) {
  1111. message.warning("单价不能为空");
  1112. return;
  1113. }
  1114. if (!this.state.unitNumber) {
  1115. message.warning("数量不能为空");
  1116. return;
  1117. }
  1118. if (!this.state.amount) {
  1119. message.warning("总金额不能为空");
  1120. return;
  1121. }
  1122. if (!this.state.outsourceRemarks) {
  1123. message.warning("备注不能为空");
  1124. return;
  1125. }
  1126. if (this.state.pictureUrl.length === 0) {
  1127. message.warning("合同扫描件不能为空");
  1128. return;
  1129. }
  1130. $.ajax({
  1131. method: "POST",
  1132. dataType: "json",
  1133. crossDomain: false,
  1134. url: globalConfig.context + "/api/admin/outsourceOrg/auditOutsource",
  1135. data: {
  1136. id: this.state.id,
  1137. orderNo: this.state.orderNo,
  1138. companyName: this.state.companyName,
  1139. amount: this.state.amount,
  1140. outsourceRemarks: this.state.outsourceRemarks,
  1141. unitNumber: this.state.unitNumber,
  1142. unitPrice: this.state.unitPrice,
  1143. attachmentUrl: this.getUrl(this.state.attachmentUrl).length
  1144. ? this.getUrl(this.state.attachmentUrl)
  1145. : "",
  1146. orderStatus: 2,
  1147. pictureUrl: this.getUrl(this.state.pictureUrl).length
  1148. ? this.getUrl(this.state.pictureUrl)
  1149. : ""
  1150. }
  1151. }).done(
  1152. function (data) {
  1153. this.setState({
  1154. loading: false
  1155. });
  1156. if (!data.error.length) {
  1157. message.success("发起成功!");
  1158. this.outReset();
  1159. this.visitCancel();
  1160. } else {
  1161. message.warning(data.error[0].message);
  1162. }
  1163. }.bind(this)
  1164. );
  1165. },
  1166. //关闭输入理由框
  1167. noCancel() {
  1168. this.setState({
  1169. noVisible: false,
  1170. aloading: false,
  1171. reason: ""
  1172. });
  1173. },
  1174. //重置
  1175. reset() {
  1176. this.setState({
  1177. signBillVisible: false
  1178. });
  1179. this.state.orderNo = "";
  1180. this.state.customerName = "";
  1181. this.state.releaseDate[0] = undefined;
  1182. this.state.releaseDate[1] = undefined;
  1183. this.state.approval = undefined;
  1184. this.loadData(1);
  1185. },
  1186. outReset() {
  1187. this.setState({
  1188. companyName: "",
  1189. amount: "",
  1190. unitPrice: "",
  1191. unitNumber: "",
  1192. outsourceRemarks: "",
  1193. attachmentUrl: [],
  1194. pictureUrl: []
  1195. });
  1196. },
  1197. getOrgCodeUrl(e) {
  1198. this.setState({ pictureUrl: e });
  1199. },
  1200. //关闭详情
  1201. visitCancel() {
  1202. this.setState(
  1203. {
  1204. activeKey: "a",
  1205. visible: false
  1206. });
  1207. this.loadData(this.state.pageNo);
  1208. },
  1209. visitOk() {
  1210. this.setState({
  1211. visible: false
  1212. });
  1213. },
  1214. changeList(arr) {
  1215. const newArr = [];
  1216. this.state.columns.forEach(item => {
  1217. arr.forEach(val => {
  1218. if (val === item.title) {
  1219. newArr.push(item);
  1220. }
  1221. });
  1222. });
  1223. this.setState({
  1224. changeList: newArr
  1225. });
  1226. },
  1227. printAll() {
  1228. this.setState({
  1229. dvisible: true
  1230. // loading: true
  1231. });
  1232. this.state.pagination.pageSize = 9999999;
  1233. this.setState({
  1234. pagination: this.state.pagination
  1235. });
  1236. this.loadData();
  1237. },
  1238. exportAll() {
  1239. window.location.href =
  1240. globalConfig.context +
  1241. "/api/admin/orderChange/exportMyChange?" +
  1242. `orderNo=${this.state.searchData.orderNoSearch
  1243. ? this.state.searchData.orderNoSearch
  1244. : ""
  1245. }&processState=${this.props.processState ? this.props.processState : ""
  1246. }&userName=${this.state.searchData.userNameSearch
  1247. ? this.state.searchData.userNameSearch
  1248. : ""
  1249. }&contractNo=${this.state.searchData.contractNoSearch
  1250. ? this.state.searchData.contractNoSearch
  1251. : ""
  1252. }
  1253. &timeType=${this.state.searchData.timeTypeSearch
  1254. ? this.state.searchData.timeTypeSearch
  1255. : ""
  1256. }
  1257. &startTime=${this.state.searchData.releaseDate[0]
  1258. ? this.state.searchData.releaseDate[0]
  1259. : ""
  1260. }
  1261. &endTime=${this.state.searchData.releaseDate[1]
  1262. ? this.state.searchData.releaseDate[1]
  1263. : ""
  1264. }
  1265. &salesmanName=${this.state.searchData.salesmanNameSearch
  1266. ? this.state.searchData.salesmanNameSearch
  1267. : ""
  1268. }
  1269. &complete=${this.state.searchData.completeSearch || 1}
  1270. &depId=${this.state.searchData.depIdSearch
  1271. ? this.state.searchData.depIdSearch
  1272. : ""
  1273. }
  1274. &type=${this.state.searchData.changeSearch
  1275. ? this.state.searchData.changeSearch
  1276. : ""
  1277. }`;
  1278. },
  1279. createTabs() {
  1280. $.ajax({
  1281. url: globalConfig.context + "/api/admin/orderChange/getOrderChange",
  1282. method: "get",
  1283. data: {
  1284. orderNo: this.state.orderNo
  1285. },
  1286. success: data => {
  1287. if (data.error && data.error.length) {
  1288. message.warning(data.error[0].message);
  1289. } else {
  1290. this.setState({
  1291. tabList: data.data
  1292. });
  1293. }
  1294. }
  1295. });
  1296. },
  1297. render() {
  1298. const tabList = this.state.tabList || [];
  1299. const formItemLayout = {
  1300. labelCol: { span: 8 },
  1301. wrapperCol: { span: 14 }
  1302. };
  1303. const FormItem = Form.Item;
  1304. const { TabPane } = Tabs;
  1305. const departmentArr = this.state.departmentArr || [];
  1306. return (
  1307. <div className="user-content" style={{ position: "relative" }}>
  1308. <ShowModalDiv ShowModal={this.state.showModal} onClose={() => { this.setState({ showModal: false }) }} />
  1309. <div className="content-title" style={{ marginBottom: 10 }}>
  1310. <span style={{ fontWeight: 900, fontSize: 16 }}>
  1311. 合同变更查看订单
  1312. </span>
  1313. </div>
  1314. <div className="user-search">
  1315. {/* <SearchInput search={this.search} /> */}
  1316. {/* <ChooseList
  1317. columns={this.state.columns}
  1318. changeFn={this.changeList}
  1319. changeList={this.state.changeList}
  1320. top={55}
  1321. /> */}
  1322. <Tabs defaultActiveKey="2" className="test">
  1323. <TabPane tab="搜索" key="2">
  1324. <div style={{ marginLeft: 10 }}>
  1325. <SearchInput search={this.search} />
  1326. </div>
  1327. </TabPane>
  1328. <TabPane tab="打印" key="3">
  1329. <Button
  1330. type="primary"
  1331. style={{ margin: "11px 0px 10px 10px" }}
  1332. onClick={this.printAll}
  1333. disabled={!this.state.dataSource.length}
  1334. >
  1335. 打印所有列表信息
  1336. </Button>
  1337. </TabPane>
  1338. <TabPane tab="导出Excel" key="4">
  1339. <Button
  1340. type="primary"
  1341. style={{ margin: "11px 0px 10px 10px" }}
  1342. onClick={this.exportAll}
  1343. >
  1344. 导出当前列表
  1345. </Button>
  1346. </TabPane>
  1347. <TabPane tab="更改表格显示数据" key="1">
  1348. <div style={{ marginLeft: 10 }}>
  1349. <ChooseList
  1350. columns={this.state.columns}
  1351. changeFn={this.changeList}
  1352. changeList={this.state.changeList}
  1353. top={55}
  1354. margin={11}
  1355. />
  1356. </div>
  1357. </TabPane>
  1358. {/* <TabPane tab="批量操作" key="6">
  1359. <Button
  1360. type="primary"
  1361. disabled={this.state.selectedRowKeys.length == 0}
  1362. style={{ margin: "0px 0px 10px 10px" }}
  1363. onClick={e => {
  1364. e.stopPropagation(),
  1365. this.evaluateY(this.state.selectedRowKeys, "财务专员");
  1366. }}
  1367. >
  1368. 转交
  1369. </Button>
  1370. </TabPane> */}
  1371. </Tabs>
  1372. <div className="patent-table">
  1373. <Spin spinning={this.state.loading}>
  1374. <Table
  1375. bordered
  1376. columns={
  1377. this.state.changeList == undefined
  1378. ? this.state.columns
  1379. : this.state.changeList
  1380. }
  1381. scroll={{ x: "max-content", y: 0 }}
  1382. dataSource={this.state.dataSource}
  1383. pagination={this.state.pagination}
  1384. onRowClick={this.tableRowClick}
  1385. // scroll={{ y: 140 }}
  1386. size="small"
  1387. />
  1388. </Spin>
  1389. </div>
  1390. {
  1391. this.state.visible &&
  1392. <Modal
  1393. className="customeDetails"
  1394. footer=""
  1395. maskClosable={false}
  1396. width="1200px"
  1397. visible={this.state.visible}
  1398. onOk={this.visitOk}
  1399. onCancel={this.visitCancel}
  1400. >
  1401. <Tabs
  1402. activeKey={this.state.activeKey}
  1403. onChange={this.callback}
  1404. type="card"
  1405. >
  1406. <TabPane tab="订单详情" key="a">
  1407. <Form
  1408. layout="horizontal"
  1409. onSubmit={this.handleSubmit}
  1410. id="demand-form"
  1411. style={{ paddingBottom: "40px" }}
  1412. >
  1413. <Spin spinning={this.state.loading}>
  1414. {
  1415. this.state.activeKey == "a" &&
  1416. <OrderDetail
  1417. domId='dindanxiangqing'
  1418. orderData={this.state.orderData}
  1419. getOrderLog={this.getOrderLog}
  1420. dataSourceX={this.state.dataSourceX}
  1421. contactList={this.state.contactList}
  1422. orderNo={this.state.orderNo}
  1423. totalCui={this.state.totalCui}
  1424. contactListNew={this.state.contactListNew}
  1425. pictureUrl={this.state.contractPictureUrl}
  1426. isCaiWu={true}
  1427. />
  1428. }
  1429. </Spin>
  1430. </Form>
  1431. </TabPane>
  1432. {tabList.map((item, index, arr) => {
  1433. return (
  1434. <TabPane tab={"合同变更记录" + (tabList.length - index)} key={item.id}>
  1435. {
  1436. this.state.activeKey === String(item.id) &&
  1437. <ChangeDetail
  1438. domId={'changeDetail' + (index + 1)}
  1439. id={item.id}
  1440. money={
  1441. index == arr.length - 1
  1442. ? this.state.orderData.totalAmount + ""
  1443. : undefined
  1444. }
  1445. data={this.state.contractData}
  1446. // loadData={this.ChangeDetail}
  1447. txt={this.state.processStateText}
  1448. pictureUrl={this.state.voucherUrl}
  1449. contractPictureUrl={this.state.contractPictureUrl}
  1450. attachment={this.state.attachment}
  1451. processState={this.props.processState}
  1452. loadData={this.callback}
  1453. reset={this.state.visible}
  1454. dataSource={this.state.dataProps}
  1455. proceedsData={this.state.proceedsData}
  1456. proceedsTotal={this.state.proTotal}
  1457. invoiceTotal={this.state.invTotal}
  1458. contactList={this.state.refundInvoice}
  1459. onCancel={this.visitCancel}
  1460. />
  1461. }
  1462. </TabPane>
  1463. );
  1464. })}
  1465. {tabList.map((item, index) => {
  1466. if (item.usedOrder) {
  1467. return (
  1468. <TabPane
  1469. tab={"原订单" + (tabList.length - index)}
  1470. key={item.usedOrder}
  1471. >
  1472. {
  1473. this.state.activeKey == item.usedOrder &&
  1474. <Form
  1475. layout="horizontal"
  1476. onSubmit={this.handleSubmit}
  1477. id="demand-form"
  1478. style={{ paddingBottom: "40px" }}
  1479. >
  1480. <Spin spinning={this.state.loading}>
  1481. <OrderDetail
  1482. domId={'yuandingdan' + (index + 1)}
  1483. orderData={this.state.primaryOrderData}
  1484. getOrderLog={this.getOrderLog}
  1485. dataSourceX={this.state.dataSourceX}
  1486. contactList={this.state.contactList}
  1487. orderNo={this.state.primaryOrderNo}
  1488. totalCui={this.state.totalCui}
  1489. contactListNew={this.state.contactListNew}
  1490. isCaiWu={true}
  1491. />
  1492. </Spin>
  1493. </Form>
  1494. }
  1495. </TabPane>
  1496. );
  1497. } else {
  1498. return "";
  1499. }
  1500. })}
  1501. {this.state.status === 4 && this.state.isAddition ? (
  1502. this.state.type === 4 || this.state.type === 5 ? (
  1503. <TabPane tab="附加订单" key="c">
  1504. <OrderDetail
  1505. domId='fujiadingdan'
  1506. orderData={this.state.additionalOrderData}
  1507. getOrderLog={this.getOrderLog}
  1508. dataSourceX={this.state.dataSourceX}
  1509. contactList={this.state.contactList}
  1510. totalCui={this.state.totalCui}
  1511. contactListNew={this.state.contactListNew}
  1512. orderNo={this.state.additionalOrder}
  1513. isCaiWu={true}
  1514. />
  1515. </TabPane>
  1516. ) : (
  1517. ""
  1518. )
  1519. ) : (
  1520. ""
  1521. )}
  1522. </Tabs>
  1523. </Modal>
  1524. }
  1525. <Modal
  1526. maskClosable={false}
  1527. visible={this.state.noVisible}
  1528. onOk={this.handleOk}
  1529. onCancel={this.noCancel}
  1530. width="400px"
  1531. title={"拒绝理由"}
  1532. footer=""
  1533. className="admin-desc-content"
  1534. confirmLoading={this.state.confirmLoading}
  1535. >
  1536. <Form layout="horizontal" id="demand-form">
  1537. <Spin spinning={this.state.loading}>
  1538. <div className="clearfix">
  1539. <FormItem
  1540. labelCol={{ span: 4 }}
  1541. wrapperCol={{ span: 16 }}
  1542. label="拒绝理由"
  1543. >
  1544. <Input
  1545. type="textarea"
  1546. placeholder="请输入拒绝理由"
  1547. rows={4}
  1548. value={this.state.reason}
  1549. onChange={(e) => {
  1550. this.setState({ reason: e.target.value });
  1551. }}
  1552. />
  1553. </FormItem>
  1554. </div>
  1555. <div className="clearfix">
  1556. <Button
  1557. className="cancel"
  1558. type="primary"
  1559. onClick={this.examOks}
  1560. style={{ marginLeft: "50px" }}
  1561. htmlType="submit"
  1562. loading={this.state.aloading}
  1563. >
  1564. 确定
  1565. </Button>
  1566. <Button
  1567. className="cancel"
  1568. type="ghost"
  1569. onClick={this.noCancel}
  1570. style={{ marginLeft: "50px" }}
  1571. >
  1572. 取消
  1573. </Button>
  1574. </div>
  1575. </Spin>
  1576. </Form>
  1577. </Modal>
  1578. {/* <Modal
  1579. visible={this.state.rizhivisible}
  1580. className="admin-desc-content"
  1581. width="800px"
  1582. maskClosable={false}
  1583. title="订单日志"
  1584. footer={null}
  1585. onCancel={this.closeOrderLog}
  1586. >
  1587. <div className="patent-table">
  1588. <Spin spinning={this.state.loading}>
  1589. <Table
  1590. bordered
  1591. columns={this.state.columnsrizhi}
  1592. dataSource={this.state.dataSourcerizhi}
  1593. pagination={false}
  1594. />
  1595. </Spin>
  1596. </div>
  1597. </Modal> */}
  1598. <OrderRiZi
  1599. dataSourcerizhi={this.state.dataSourcerizhi}
  1600. closeOrderLog={this.closeOrderLog}
  1601. visible={this.state.rizhivisible}
  1602. loading={this.state.loading}
  1603. />
  1604. <Modal
  1605. visible={this.state.dvisible}
  1606. footer=""
  1607. title="所有列表信息"
  1608. className="admin-desc-content"
  1609. width="1300px"
  1610. onCancel={() => {
  1611. this.setState({
  1612. dvisible: false,
  1613. });
  1614. this.state.pagination.pageSize = 10;
  1615. this.setState({
  1616. pagination: this.state.pagination,
  1617. });
  1618. this.loadData();
  1619. }}
  1620. >
  1621. <Spin spinning={this.state.loading}>
  1622. <div
  1623. className="patent-table"
  1624. style={{
  1625. // width: 900,
  1626. // position: "relative",
  1627. // left: "50%",
  1628. // transform: "translate(-50%)",
  1629. padding: "25px 30px 30px 30px",
  1630. }}
  1631. ref={(e) => {
  1632. this.refs.all = e;
  1633. }}
  1634. >
  1635. <Table
  1636. columns={this.state.columns}
  1637. dataSource={this.state.dataSource}
  1638. pagination={false}
  1639. bordered
  1640. size="small"
  1641. />
  1642. </div>
  1643. </Spin>
  1644. <ReactToPrint
  1645. trigger={() => (
  1646. <Button
  1647. type="primary"
  1648. style={{
  1649. float: "right",
  1650. marginTop: 10,
  1651. position: "absolute",
  1652. top: 0,
  1653. right: 30,
  1654. }}
  1655. >
  1656. 打印
  1657. </Button>
  1658. )}
  1659. content={() => this.refs.all}
  1660. />
  1661. </Modal>
  1662. </div>
  1663. {/* {this.state.addnextVisible && <ProjectDetailsReadOnly
  1664. infor={this.state.dataInfor}
  1665. visible={this.state.addnextVisible}
  1666. onCancel={this.nextCancel}
  1667. />} */}
  1668. {
  1669. // 项目业务详情
  1670. this.state.addnextVisible &&
  1671. <NewEditProject
  1672. readOnly={true}
  1673. visible={this.state.addnextVisible}
  1674. dataInfor={this.state.dataInfor}
  1675. onCancel={this.nextCancel}
  1676. />
  1677. }
  1678. </div>
  1679. );
  1680. }
  1681. })
  1682. );
  1683. export default contractChange;