contractCwjl.js 52 KB

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