contractCwjl.js 52 KB

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