contractCwzy.js 51 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703
  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/changeDetailCwzy.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,
  468. invTotal
  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. });
  526. // console.log(thisdata.contractPictureUrl);
  527. }
  528. }.bind(this)
  529. });
  530. },
  531. // 原订单数据
  532. primaryOrder(primaryOrder) {
  533. $.ajax({
  534. method: "get",
  535. dataType: "json",
  536. crossDomain: false,
  537. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  538. data: {
  539. orderNo: primaryOrder
  540. },
  541. success: function (data) {
  542. if (data.error.length || data.data.list == "") {
  543. if (data.error && data.error.length) {
  544. message.warning(data.error[0].message);
  545. }
  546. } else {
  547. let thisdata = data.data;
  548. this.setState({
  549. primaryOrderData: thisdata
  550. });
  551. }
  552. }.bind(this)
  553. });
  554. },
  555. // 附加订单数据
  556. additionalOrder(additionalOrder) {
  557. $.ajax({
  558. method: "get",
  559. dataType: "json",
  560. crossDomain: false,
  561. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  562. data: {
  563. orderNo: additionalOrder
  564. },
  565. success: function (data) {
  566. if (data.error.length || data.data.list == "") {
  567. if (data.error && data.error.length) {
  568. message.warning(data.error[0].message);
  569. }
  570. } else {
  571. let thisdata = data.data;
  572. this.setState({
  573. additionalOrderData: thisdata
  574. });
  575. }
  576. }.bind(this)
  577. });
  578. },
  579. //项目列表
  580. xiangmu(orderNos) {
  581. $.ajax({
  582. method: "get",
  583. dataType: "json",
  584. crossDomain: false,
  585. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  586. data: {
  587. orderNo: orderNos
  588. },
  589. success: function (data) {
  590. let theArr = [];
  591. if (data.error.length || data.data.list == "") {
  592. if (data.error && data.error.length) {
  593. message.warning(data.error[0].message);
  594. }
  595. } else {
  596. for (let i = 0; i < data.data.length; i++) {
  597. let thisdata = data.data[i];
  598. theArr.push({
  599. key: i,
  600. id: thisdata.id,
  601. orderNo: thisdata.orderNo, //订单编号
  602. commodityId: thisdata.commodityId, //项目ID
  603. commodityName: thisdata.commodityName, //项目名称
  604. cname: thisdata.cname, //项目类别
  605. commodityPrice: thisdata.commodityPrice, //项目价格
  606. commodityQuantity: thisdata.commodityQuantity, //项目数量
  607. main: thisdata.main, //是否为主要任务
  608. taskComment: thisdata.taskComment, //任务说明
  609. contacts: thisdata.contacts, //联系人
  610. contactsMobile: thisdata.contactsMobile, //联系人电话
  611. projectStatus: thisdata.projectStatus, //项目状态
  612. sort: thisdata.cSort,
  613. splitStatus: thisdata.splitStatus
  614. });
  615. }
  616. }
  617. this.setState({
  618. dataSourceX: theArr
  619. });
  620. }.bind(this)
  621. });
  622. },
  623. // 查看收款金额
  624. getProceeds(id) {
  625. $.ajax({
  626. method: "get",
  627. dataType: "json",
  628. crossDomain: false,
  629. url:
  630. globalConfig.context +
  631. "/api/admin/orderChange/orderChangeDetailsById",
  632. data: {
  633. id: id
  634. },
  635. success: function (data) {
  636. if (data.error.length || data.data.list == "") {
  637. if (data.error && data.error.length) {
  638. message.warning(data.error[0].message);
  639. }
  640. } else {
  641. // let thisdata = data.data;
  642. }
  643. }.bind(this)
  644. });
  645. },
  646. search(obj) {
  647. this.setState(
  648. {
  649. searchData: obj
  650. },
  651. () => {
  652. this.loadData(1);
  653. }
  654. );
  655. },
  656. rizhi(orderNo) {
  657. $.ajax({
  658. method: "get",
  659. dataType: "json",
  660. crossDomain: false,
  661. url: "/api/admin/newOrder/selectOrderLog",
  662. data: {
  663. orderNo: orderNo
  664. },
  665. success: function (data) {
  666. let theArr = [];
  667. let thisData = data.data;
  668. if (!thisData.length) {
  669. if (data.error && data.error.length) {
  670. message.warning(data.error[0].message);
  671. }
  672. thisData = {};
  673. } else {
  674. for (let i = 0; i < data.data.length; i++) {
  675. let thisdata = data.data[i];
  676. theArr.push({
  677. processName: thisdata.processName,
  678. adminName: thisdata.adminName,
  679. createDate: thisdata.createDate,
  680. remarks: thisdata.remarks
  681. });
  682. }
  683. }
  684. this.setState({
  685. dataSourcerizhi: theArr
  686. });
  687. }.bind(this)
  688. });
  689. },
  690. getOrderLog(orderNo) {
  691. this.setState({
  692. rizhivisible: true
  693. });
  694. this.rizhi(orderNo);
  695. },
  696. closeOrderLog() {
  697. this.setState({
  698. rizhivisible: false
  699. });
  700. },
  701. //节点列表
  702. jiedian(orderNos) {
  703. $.ajax({
  704. method: "get",
  705. dataType: "json",
  706. crossDomain: false,
  707. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  708. data: {
  709. orderNo: orderNos
  710. },
  711. success: function (data) {
  712. let theArr = [];
  713. let thisData = [];
  714. if (data.error.length || data.data.list == "") {
  715. if (data.error && data.error.length) {
  716. message.warning(data.error[0].message);
  717. }
  718. } else {
  719. for (let i = 0; i < data.data.length; i++) {
  720. thisData = data.data[i];
  721. theArr.push({
  722. key: i,
  723. dunSubject: thisData.dunSubject
  724. ? thisData.dunSubject.toString()
  725. : "", //催款科目
  726. id: thisData.id, //节点Id
  727. money: thisData.money, //催款金额
  728. dunStatus: thisData.dunStatus //催款状态
  729. });
  730. }
  731. this.setState({
  732. contactList: theArr
  733. });
  734. }
  735. }.bind(this)
  736. });
  737. },
  738. jiedianNew(orderNos) {
  739. $.ajax({
  740. method: "get",
  741. dataType: "json",
  742. crossDomain: false,
  743. url:
  744. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  745. data: {
  746. orderNo: orderNos
  747. },
  748. success: function (data) {
  749. if (data.error && data.error.length) {
  750. message.warning(data.error[0].message);
  751. } else {
  752. let theArr = [];
  753. let thisData = [];
  754. let arr = data.data || [];
  755. let totalCui = 0;
  756. for (let i = 0; i < arr.length; i++) {
  757. thisData = arr[i];
  758. totalCui += +thisData.money;
  759. theArr.push({
  760. key: i,
  761. dunSubject: thisData.dunSubject
  762. ? thisData.dunSubject.toString()
  763. : "", //催款科目
  764. id: thisData.id, //节点Id
  765. money: thisData.money, //催款金额
  766. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  767. commodityName: thisData.commodityName,
  768. projectType: thisData.projectType,
  769. dunTypeName: thisData.dunTypeName,
  770. status: thisData.status,
  771. waitDay: thisData.waitDay,
  772. effectiveCount: thisData.effectiveCount,
  773. startDate: thisData.startDate,
  774. dunType: thisData.dunType,
  775. appropriationRatio: thisData.appropriationRatio,
  776. customizeName: thisData.customizeName,
  777. customizeTimes: thisData.customizeTimes,
  778. });
  779. }
  780. if (!totalCui) {
  781. totalCui = 0;
  782. }
  783. totalCui = (Math.round(totalCui * 10000) / 10000).toFixed(4);
  784. this.setState({
  785. contactListNew: theArr,
  786. totalCui
  787. });
  788. }
  789. }.bind(this)
  790. }).always(
  791. function () {
  792. this.setState({
  793. loading: false
  794. });
  795. }.bind(this)
  796. );
  797. },
  798. //审核通过
  799. examOk() {
  800. $.ajax({
  801. method: "post",
  802. dataType: "json",
  803. crossDomain: false,
  804. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  805. data: {
  806. orderNo: this.state.orderNo,
  807. orderStatus: 2
  808. },
  809. success: function (data) {
  810. if (data.error.length || data.data.list == "") {
  811. if (data.error && data.error.length) {
  812. message.warning(data.error[0].message);
  813. }
  814. } else {
  815. message.success("该订单已通过审核~");
  816. this.setState({
  817. visible: false
  818. });
  819. this.reset();
  820. }
  821. }.bind(this)
  822. }).always(
  823. function () {
  824. this.setState({
  825. loading: false
  826. });
  827. }.bind(this)
  828. );
  829. },
  830. //通过发给外包
  831. outsourcing() {
  832. $.ajax({
  833. method: "post",
  834. dataType: "json",
  835. crossDomain: false,
  836. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  837. data: {
  838. orderNo: this.state.orderNo,
  839. orderStatus: 2,
  840. outsource: 1
  841. },
  842. success: function (data) {
  843. if (data.error.length || data.data.list == "") {
  844. if (data.error && data.error.length) {
  845. message.warning(data.error[0].message);
  846. }
  847. } else {
  848. message.success("该订单已通过审核~");
  849. this.setState({
  850. visible: false
  851. });
  852. this.reset();
  853. }
  854. }.bind(this)
  855. }).always(
  856. function () {
  857. this.setState({
  858. loading: false
  859. });
  860. }.bind(this)
  861. );
  862. },
  863. //审核不通过
  864. examOks() {
  865. this.setState({
  866. aloading: true
  867. });
  868. $.ajax({
  869. method: "post",
  870. dataType: "json",
  871. crossDomain: false,
  872. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  873. data: {
  874. orderNo: this.state.orderNo,
  875. orderStatus: 3,
  876. reason: this.state.reason
  877. },
  878. success: function (data) {
  879. if (data.error.length || data.data.list == "") {
  880. if (data.error && data.error.length) {
  881. message.warning(data.error[0].message);
  882. this.setState({
  883. aloading: true
  884. });
  885. }
  886. } else {
  887. message.success("该订单已被拒绝~");
  888. this.setState({
  889. visible: false,
  890. aloading: false,
  891. noVisible: false,
  892. reason: ""
  893. });
  894. this.reset();
  895. }
  896. }.bind(this)
  897. }).always(
  898. function () {
  899. this.setState({
  900. loading: false
  901. });
  902. }.bind(this)
  903. );
  904. },
  905. //点击拒绝
  906. examNo() {
  907. this.setState({
  908. noVisible: true
  909. });
  910. },
  911. loadDataChange(key) {
  912. $.ajax({
  913. method: "get",
  914. dataType: "json",
  915. async: false,
  916. crossDomain: false,
  917. url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
  918. data: {
  919. changeId: key
  920. },
  921. success: function (data) {
  922. if (data.error.length || data.data.list == "") {
  923. if (data.error && data.error.length) {
  924. message.warning(data.error[0].message);
  925. }
  926. } else {
  927. // console.log("拿到历史", data);
  928. this.setState({
  929. dataProps: data.data
  930. });
  931. }
  932. }.bind(this)
  933. });
  934. },
  935. callback(key) {
  936. this.setState(
  937. {
  938. activeKey: key
  939. },
  940. () => {
  941. if (key != "a" && key != "c" && key.length < 10) {
  942. this.ChangeDetail(key);
  943. this.loadDataChange(key);
  944. this.getProceeds(key);
  945. } else if (key != "a" && key != "c" && key.length > 10) {
  946. this.primaryOrder(key);
  947. this.xiangmu(key);
  948. this.jiedian(key);
  949. this.jiedianNew(key);
  950. this.loadDataChange(key);
  951. }
  952. }
  953. );
  954. if (key === "a") {
  955. this.xiangmu(this.state.orderNo);
  956. this.jiedian(this.state.orderNo);
  957. this.jiedianNew(this.state.orderNo);
  958. }
  959. // if (key === "2") {
  960. // this.ChangeDetail(this.state.id);
  961. // this.loadDataChange();
  962. // this.getProceeds(this.state.id);
  963. // }
  964. // if (key === "3") {
  965. // this.primaryOrder(this.state.primaryOrderNo);
  966. // this.xiangmu(this.state.primaryOrderNo);
  967. // this.jiedian(this.state.primaryOrderNo);
  968. // this.jiedianNew(this.state.primaryOrderNo);
  969. // }
  970. if (key === "c") {
  971. this.additionalOrder(this.state.additionalOrder);
  972. this.xiangmu(this.state.additionalOrder);
  973. this.jiedian(this.state.additionalOrder);
  974. this.jiedianNew(this.state.additionalOrder);
  975. this.setState({
  976. buttonStatusA: false
  977. });
  978. } else {
  979. this.setState({
  980. buttonStatusA: true
  981. });
  982. }
  983. },
  984. closeDesc(e, s) {
  985. this.state.activeKey = "a";
  986. this.state.userDetaile = false;
  987. this.state.signBillVisible = false;
  988. this.state.visible = e;
  989. if (s) {
  990. this.loadData(this.state.pageNo);
  991. }
  992. },
  993. // 获取原订单编号
  994. getPrimaryOrder(value) {
  995. this.setState({
  996. primaryOrder: value
  997. });
  998. },
  999. getAdditionalOrder(value) {
  1000. this.setState({
  1001. additionalOrder: value
  1002. });
  1003. },
  1004. getUrl(url) {
  1005. let theorgCodeUrl = [];
  1006. if (url.length) {
  1007. let picArr = [];
  1008. url.map(function (item) {
  1009. if (
  1010. item.response &&
  1011. item.response.data &&
  1012. item.response.data.length
  1013. ) {
  1014. picArr.push(item.response.data);
  1015. }
  1016. });
  1017. theorgCodeUrl = picArr.join(",");
  1018. }
  1019. return theorgCodeUrl;
  1020. },
  1021. sureOut() {
  1022. if (!this.state.companyName) {
  1023. message.warning("公司名称不能为空");
  1024. return;
  1025. }
  1026. if (!this.state.unitPrice) {
  1027. message.warning("单价不能为空");
  1028. return;
  1029. }
  1030. if (!this.state.unitNumber) {
  1031. message.warning("数量不能为空");
  1032. return;
  1033. }
  1034. if (!this.state.amount) {
  1035. message.warning("总金额不能为空");
  1036. return;
  1037. }
  1038. if (!this.state.outsourceRemarks) {
  1039. message.warning("备注不能为空");
  1040. return;
  1041. }
  1042. if (this.state.pictureUrl.length === 0) {
  1043. message.warning("合同扫描件不能为空");
  1044. return;
  1045. }
  1046. $.ajax({
  1047. method: "POST",
  1048. dataType: "json",
  1049. crossDomain: false,
  1050. url: globalConfig.context + "/api/admin/outsourceOrg/auditOutsource",
  1051. data: {
  1052. id: this.state.id,
  1053. orderNo: this.state.orderNo,
  1054. companyName: this.state.companyName,
  1055. amount: this.state.amount,
  1056. outsourceRemarks: this.state.outsourceRemarks,
  1057. unitNumber: this.state.unitNumber,
  1058. unitPrice: this.state.unitPrice,
  1059. attachmentUrl: this.getUrl(this.state.attachmentUrl).length
  1060. ? this.getUrl(this.state.attachmentUrl)
  1061. : "",
  1062. orderStatus: 2,
  1063. pictureUrl: this.getUrl(this.state.pictureUrl).length
  1064. ? this.getUrl(this.state.pictureUrl)
  1065. : ""
  1066. }
  1067. }).done(
  1068. function (data) {
  1069. this.setState({
  1070. loading: false
  1071. });
  1072. if (!data.error.length) {
  1073. message.success("发起成功!");
  1074. this.outReset();
  1075. this.visitCancel();
  1076. } else {
  1077. message.warning(data.error[0].message);
  1078. }
  1079. }.bind(this)
  1080. );
  1081. },
  1082. //关闭输入理由框
  1083. noCancel() {
  1084. this.setState({
  1085. noVisible: false,
  1086. aloading: false,
  1087. reason: ""
  1088. });
  1089. },
  1090. //重置
  1091. reset() {
  1092. this.setState({
  1093. signBillVisible: false
  1094. });
  1095. this.state.orderNo = "";
  1096. this.state.customerName = "";
  1097. this.state.releaseDate[0] = undefined;
  1098. this.state.releaseDate[1] = undefined;
  1099. this.state.approval = undefined;
  1100. this.loadData(1);
  1101. },
  1102. outReset() {
  1103. this.setState({
  1104. companyName: "",
  1105. amount: "",
  1106. unitPrice: "",
  1107. unitNumber: "",
  1108. outsourceRemarks: "",
  1109. attachmentUrl: [],
  1110. pictureUrl: []
  1111. });
  1112. },
  1113. getOrgCodeUrl(e) {
  1114. this.setState({ pictureUrl: e });
  1115. },
  1116. //关闭详情
  1117. visitCancel() {
  1118. this.setState(
  1119. {
  1120. activeKey: "a"
  1121. },
  1122. () => {
  1123. this.setState({
  1124. visible: false
  1125. });
  1126. }
  1127. );
  1128. this.loadData(this.state.pageNo);
  1129. },
  1130. visitOk() {
  1131. this.setState({
  1132. visible: false
  1133. });
  1134. },
  1135. changeList(arr) {
  1136. const newArr = [];
  1137. this.state.columns.forEach(item => {
  1138. arr.forEach(val => {
  1139. if (val === item.title) {
  1140. newArr.push(item);
  1141. }
  1142. });
  1143. });
  1144. this.setState({
  1145. changeList: newArr
  1146. });
  1147. },
  1148. printAll() {
  1149. this.setState({
  1150. dvisible: true
  1151. // loading: true
  1152. });
  1153. this.state.pagination.pageSize = 9999;
  1154. this.setState({
  1155. pagination: this.state.pagination
  1156. });
  1157. this.loadData();
  1158. },
  1159. exportAll() {
  1160. window.location.href =
  1161. globalConfig.context +
  1162. "/api/admin/orderChange/exportMyChange?" +
  1163. `orderNo=${
  1164. this.state.searchData.orderNoSearch
  1165. ? this.state.searchData.orderNoSearch
  1166. : ""
  1167. }&processState=${
  1168. this.props.processState ? this.props.processState : ""
  1169. }&userName=${
  1170. this.state.searchData.userNameSearch
  1171. ? this.state.searchData.userNameSearch
  1172. : ""
  1173. }&contractNo=${
  1174. this.state.searchData.contractNoSearch
  1175. ? this.state.searchData.contractNoSearch
  1176. : ""
  1177. }
  1178. &timeType=${
  1179. this.state.searchData.timeTypeSearch
  1180. ? this.state.searchData.timeTypeSearch
  1181. : ""
  1182. }
  1183. &startTime=${
  1184. this.state.searchData.releaseDate[0]
  1185. ? this.state.searchData.releaseDate[0]
  1186. : ""
  1187. }
  1188. &endTime=${
  1189. this.state.searchData.releaseDate[1]
  1190. ? this.state.searchData.releaseDate[1]
  1191. : ""
  1192. }
  1193. &salesmanName=${
  1194. this.state.searchData.salesmanNameSearch
  1195. ? this.state.searchData.salesmanNameSearch
  1196. : ""
  1197. }
  1198. &complete=${this.state.searchData.completeSearch || 1}
  1199. &depId=${
  1200. this.state.searchData.depIdSearch
  1201. ? this.state.searchData.depIdSearch
  1202. : ""
  1203. }
  1204. &type=${
  1205. this.state.searchData.changeSearch
  1206. ? this.state.searchData.changeSearch
  1207. : ""
  1208. }`;
  1209. },
  1210. createTabs() {
  1211. $.ajax({
  1212. url: globalConfig.context + "/api/admin/orderChange/getOrderChange",
  1213. method: "get",
  1214. data: {
  1215. orderNo: this.state.orderNo
  1216. },
  1217. success: data => {
  1218. if (data.error && data.error.length) {
  1219. message.warning(data.error[0].message);
  1220. } else {
  1221. this.setState({
  1222. tabList: data.data
  1223. });
  1224. }
  1225. }
  1226. });
  1227. },
  1228. render() {
  1229. const tabList = this.state.tabList || [];
  1230. const formItemLayout = {
  1231. labelCol: { span: 8 },
  1232. wrapperCol: { span: 14 }
  1233. };
  1234. const FormItem = Form.Item;
  1235. const { TabPane } = Tabs;
  1236. const departmentArr = this.state.departmentArr || [];
  1237. return (
  1238. <div className="user-content" style={{ position: "relative" }}>
  1239. <ShowModalDiv ShowModal={this.state.showModal} />
  1240. <div className="content-title" style={{ marginBottom: 10 }}>
  1241. <span style={{ fontWeight: 900, fontSize: 16 }}>
  1242. 合同变更审核订单
  1243. </span>
  1244. </div>
  1245. <div className="user-search">
  1246. {/* <SearchInput search={this.search} /> */}
  1247. {/* <ChooseList
  1248. columns={this.state.columns}
  1249. changeFn={this.changeList}
  1250. changeList={this.state.changeList}
  1251. top={55}
  1252. /> */}
  1253. <Tabs
  1254. defaultActiveKey="2"
  1255. onChange={this.callbackTab}
  1256. className="test"
  1257. >
  1258. <TabPane tab="更改表格显示数据" key="1">
  1259. <div style={{ marginLeft: 10 }}>
  1260. <ChooseList
  1261. columns={this.state.columns}
  1262. changeFn={this.changeList}
  1263. changeList={this.state.changeList}
  1264. top={55}
  1265. margin={11}
  1266. />
  1267. </div>
  1268. </TabPane>
  1269. <TabPane tab="搜索" key="2">
  1270. <div style={{ marginLeft: 10 }}>
  1271. <SearchInput search={this.search} />
  1272. </div>
  1273. </TabPane>
  1274. <TabPane tab="打印" key="3">
  1275. <Button
  1276. type="primary"
  1277. style={{ margin: "11px 0px 10px 10px" }}
  1278. onClick={this.printAll}
  1279. disabled={!this.state.dataSource.length}
  1280. >
  1281. 打印所有列表信息
  1282. </Button>
  1283. </TabPane>
  1284. <TabPane tab="导出Excel" key="4">
  1285. <Button
  1286. type="primary"
  1287. style={{ margin: "11px 0px 10px 10px" }}
  1288. onClick={this.exportAll}
  1289. >
  1290. 导出当前列表
  1291. </Button>
  1292. </TabPane>
  1293. {/* <TabPane tab="批量操作" key="6">
  1294. <Button
  1295. type="primary"
  1296. disabled={this.state.selectedRowKeys.length == 0}
  1297. style={{ margin: "0px 0px 10px 10px" }}
  1298. onClick={e => {
  1299. e.stopPropagation(),
  1300. this.evaluateY(this.state.selectedRowKeys, "财务专员");
  1301. }}
  1302. >
  1303. 转交
  1304. </Button>
  1305. </TabPane> */}
  1306. </Tabs>
  1307. <div className="patent-table">
  1308. <Spin spinning={this.state.loading}>
  1309. <Table
  1310. bordered
  1311. columns={
  1312. this.state.changeList == undefined
  1313. ? this.state.columns
  1314. : this.state.changeList
  1315. }
  1316. scroll={{ x: "max-content", y: 0 }}
  1317. dataSource={this.state.dataSource}
  1318. pagination={this.state.pagination}
  1319. onRowClick={this.tableRowClick}
  1320. // scroll={{ y: 140 }}
  1321. size="small"
  1322. />
  1323. </Spin>
  1324. </div>
  1325. <Modal
  1326. className="customeDetails"
  1327. footer=""
  1328. maskClosable={false}
  1329. width="900px"
  1330. visible={this.state.visible}
  1331. onOk={this.visitOk}
  1332. onCancel={this.visitCancel}
  1333. >
  1334. <Tabs
  1335. activeKey={this.state.activeKey}
  1336. onChange={this.callback}
  1337. type="card"
  1338. >
  1339. <TabPane tab="订单详情" key="a">
  1340. <Form
  1341. layout="horizontal"
  1342. onSubmit={this.handleSubmit}
  1343. id="demand-form"
  1344. style={{ paddingBottom: "40px" }}
  1345. >
  1346. <Spin spinning={this.state.loading}>
  1347. <OrderDetail
  1348. orderData={this.state.orderData}
  1349. getOrderLog={this.getOrderLog}
  1350. dataSourceX={this.state.dataSourceX}
  1351. contactList={this.state.contactList}
  1352. orderNo={this.state.orderNo}
  1353. totalCui={this.state.totalCui}
  1354. contactListNew={this.state.contactListNew}
  1355. pictureUrl={this.state.contractPictureUrl}
  1356. isCaiWu={true}
  1357. />
  1358. </Spin>
  1359. </Form>
  1360. </TabPane>
  1361. {/* <TabPane tab="合同变更记录" key="2">
  1362. <ChangeDetail
  1363. data={this.state.contractData}
  1364. txt={this.state.processStateText}
  1365. pictureUrl={this.state.voucherUrl}
  1366. processState={this.props.processState}
  1367. loadData={this.callback}
  1368. reset={this.state.visible}
  1369. dataSource={this.state.dataProps}
  1370. proceedsData={this.state.proceedsData}
  1371. proceedsTotal={this.state.proTotal}
  1372. invoiceTotal={this.state.invTotal}
  1373. contactList={this.state.refundInvoice}
  1374. onCancel={this.visitCancel}
  1375. />
  1376. </TabPane> */}
  1377. {tabList.map((item, index, arr) => {
  1378. return (
  1379. <TabPane tab={"合同变更记录" + (index + 1)} key={item.id}>
  1380. <ChangeDetail
  1381. id={item.id}
  1382. money={index == arr.length - 1 ? this.state.orderData.totalAmount + "" : undefined}
  1383. data={this.state.contractData}
  1384. loadData={this.ChangeDetail}
  1385. txt={this.state.processStateText}
  1386. pictureUrl={this.state.voucherUrl}
  1387. processState={this.props.processState}
  1388. loadData={this.callback}
  1389. reset={this.state.visible}
  1390. dataSource={this.state.dataProps}
  1391. proceedsData={this.state.proceedsData}
  1392. proceedsTotal={this.state.proTotal}
  1393. invoiceTotal={this.state.invTotal}
  1394. contactList={this.state.refundInvoice}
  1395. onCancel={this.visitCancel}
  1396. />
  1397. </TabPane>
  1398. );
  1399. })}
  1400. {/* {this.state.status === 4 ? (
  1401. <TabPane tab="原订单" key="3">
  1402. <Form
  1403. layout="horizontal"
  1404. onSubmit={this.handleSubmit}
  1405. id="demand-form"
  1406. style={{ paddingBottom: "40px" }}
  1407. >
  1408. <Spin spinning={this.state.loading}>
  1409. <OrderDetail
  1410. orderData={this.state.primaryOrderData}
  1411. getOrderLog={this.getOrderLog}
  1412. dataSourceX={this.state.dataSourceX}
  1413. contactList={this.state.contactList}
  1414. orderNo={this.state.primaryOrderNo}
  1415. totalCui={this.state.totalCui}
  1416. contactListNew={this.state.contactListNew}
  1417. isCaiWu={true}
  1418. />
  1419. </Spin>
  1420. </Form>
  1421. </TabPane>
  1422. ) : (
  1423. ""
  1424. )} */}
  1425. {tabList.map((item, index) => {
  1426. if (item.usedOrder) {
  1427. return (
  1428. <TabPane
  1429. tab={"原订单" + (index + 1)}
  1430. key={item.usedOrder}
  1431. >
  1432. <Form
  1433. layout="horizontal"
  1434. onSubmit={this.handleSubmit}
  1435. id="demand-form"
  1436. style={{ paddingBottom: "40px" }}
  1437. >
  1438. <Spin spinning={this.state.loading}>
  1439. <OrderDetail
  1440. orderData={this.state.primaryOrderData}
  1441. getOrderLog={this.getOrderLog}
  1442. dataSourceX={this.state.dataSourceX}
  1443. contactList={this.state.contactList}
  1444. orderNo={this.state.primaryOrderNo}
  1445. totalCui={this.state.totalCui}
  1446. contactListNew={this.state.contactListNew}
  1447. isCaiWu={true}
  1448. />
  1449. </Spin>
  1450. </Form>
  1451. </TabPane>
  1452. );
  1453. } else {
  1454. return "";
  1455. }
  1456. })}
  1457. {this.state.status === 4 && this.state.isAddition ? (
  1458. this.state.type === 4 || this.state.type === 5 ? (
  1459. <TabPane tab="附加订单" key="c">
  1460. <OrderDetail
  1461. orderData={this.state.additionalOrderData}
  1462. getOrderLog={this.getOrderLog}
  1463. dataSourceX={this.state.dataSourceX}
  1464. contactList={this.state.contactList}
  1465. totalCui={this.state.totalCui}
  1466. contactListNew={this.state.contactListNew}
  1467. orderNo={this.state.additionalOrder}
  1468. isCaiWu={true}
  1469. />
  1470. </TabPane>
  1471. ) : (
  1472. ""
  1473. )
  1474. ) : (
  1475. ""
  1476. )}
  1477. </Tabs>
  1478. </Modal>
  1479. <Modal
  1480. maskClosable={false}
  1481. visible={this.state.addnextVisible}
  1482. onOk={this.nextCancel}
  1483. onCancel={this.nextCancel}
  1484. confirmLoading={this.state.confirmLoading}
  1485. width="800px"
  1486. title={"项目任务详情"}
  1487. footer=""
  1488. className="admin-desc-content"
  1489. >
  1490. <Form layout="horizontal" id="demand-form">
  1491. <Spin spinning={this.state.loading}>
  1492. <div className="clearfix">
  1493. <FormItem
  1494. className="half-item"
  1495. {...formItemLayout}
  1496. label="项目名称"
  1497. >
  1498. <span>{this.state.commodityName}</span>
  1499. </FormItem>
  1500. <FormItem
  1501. className="half-item"
  1502. {...formItemLayout}
  1503. label="项目数量"
  1504. >
  1505. <span>{this.state.commodityQuantity}</span>
  1506. </FormItem>
  1507. <FormItem
  1508. className="half-item"
  1509. {...formItemLayout}
  1510. label="金额(万元)"
  1511. >
  1512. <span>{this.state.commodityPrice}</span>
  1513. </FormItem>
  1514. <FormItem
  1515. className="half-item"
  1516. {...formItemLayout}
  1517. label="主要项目"
  1518. >
  1519. <span>{getboutique(this.state.main)}</span>
  1520. </FormItem>
  1521. <div className="clearfix">
  1522. <FormItem
  1523. labelCol={{ span: 4 }}
  1524. wrapperCol={{ span: 16 }}
  1525. label="服务说明"
  1526. >
  1527. <span>{this.state.taskComment}</span>
  1528. </FormItem>
  1529. </div>
  1530. </div>
  1531. </Spin>
  1532. </Form>
  1533. </Modal>
  1534. <Modal
  1535. maskClosable={false}
  1536. visible={this.state.noVisible}
  1537. onOk={this.handleOk}
  1538. onCancel={this.noCancel}
  1539. width="400px"
  1540. title={"拒绝理由"}
  1541. footer=""
  1542. className="admin-desc-content"
  1543. confirmLoading={this.state.confirmLoading}
  1544. >
  1545. <Form layout="horizontal" id="demand-form">
  1546. <Spin spinning={this.state.loading}>
  1547. <div className="clearfix">
  1548. <FormItem
  1549. labelCol={{ span: 4 }}
  1550. wrapperCol={{ span: 16 }}
  1551. label="拒绝理由"
  1552. >
  1553. <Input
  1554. type="textarea"
  1555. placeholder="请输入拒绝理由"
  1556. rows={4}
  1557. value={this.state.reason}
  1558. onChange={e => {
  1559. this.setState({ reason: e.target.value });
  1560. }}
  1561. />
  1562. </FormItem>
  1563. </div>
  1564. <div className="clearfix">
  1565. <Button
  1566. className="cancel"
  1567. type="primary"
  1568. onClick={this.examOks}
  1569. style={{ marginLeft: "50px" }}
  1570. htmlType="submit"
  1571. loading={this.state.aloading}
  1572. >
  1573. 确定
  1574. </Button>
  1575. <Button
  1576. className="cancel"
  1577. type="ghost"
  1578. onClick={this.noCancel}
  1579. style={{ marginLeft: "50px" }}
  1580. >
  1581. 取消
  1582. </Button>
  1583. </div>
  1584. </Spin>
  1585. </Form>
  1586. </Modal>
  1587. {/* <Modal
  1588. visible={this.state.rizhivisible}
  1589. className="admin-desc-content"
  1590. width="800px"
  1591. maskClosable={false}
  1592. title="订单日志"
  1593. footer={null}
  1594. onCancel={this.closeOrderLog}
  1595. >
  1596. <div className="patent-table">
  1597. <Spin spinning={this.state.loading}>
  1598. <Table
  1599. bordered
  1600. columns={this.state.columnsrizhi}
  1601. dataSource={this.state.dataSourcerizhi}
  1602. pagination={false}
  1603. />
  1604. </Spin>
  1605. </div>
  1606. </Modal> */}
  1607. <OrderRiZi
  1608. dataSourcerizhi={this.state.dataSourcerizhi}
  1609. closeOrderLog={this.closeOrderLog}
  1610. visible={this.state.rizhivisible}
  1611. loading={this.state.loading}
  1612. />
  1613. <Modal
  1614. visible={this.state.dvisible}
  1615. footer=""
  1616. title="所有列表信息"
  1617. className="admin-desc-content"
  1618. width="1300px"
  1619. onCancel={() => {
  1620. this.setState({
  1621. dvisible: false
  1622. });
  1623. this.state.pagination.pageSize = 10;
  1624. this.setState({
  1625. pagination: this.state.pagination
  1626. });
  1627. this.loadData();
  1628. }}
  1629. >
  1630. <Spin spinning={this.state.loading}>
  1631. <div
  1632. className="patent-table"
  1633. style={{
  1634. // width: 900,
  1635. // position: "relative",
  1636. // left: "50%",
  1637. // transform: "translate(-50%)",
  1638. padding: "25px 30px 30px 30px"
  1639. }}
  1640. ref={e => {
  1641. this.refs.all = e;
  1642. }}
  1643. >
  1644. <Table
  1645. columns={this.state.columns}
  1646. dataSource={this.state.dataSource}
  1647. pagination={false}
  1648. bordered
  1649. size="small"
  1650. />
  1651. </div>
  1652. </Spin>
  1653. <ReactToPrint
  1654. trigger={() => (
  1655. <Button
  1656. type="primary"
  1657. style={{
  1658. float: "right",
  1659. marginTop: 10,
  1660. position: "absolute",
  1661. top: 0,
  1662. right: 30
  1663. }}
  1664. >
  1665. 打印
  1666. </Button>
  1667. )}
  1668. content={() => this.refs.all}
  1669. />
  1670. </Modal>
  1671. </div>
  1672. </div>
  1673. );
  1674. }
  1675. })
  1676. );
  1677. export default contractChange;