contractCwzy.js 51 KB

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