contractCwjl.js 51 KB

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