contractCwzy.js 51 KB

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