contractCwjl.js 50 KB

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