contractCwjl.js 52 KB

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