contractCwzy.js 51 KB

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