contractCwjl.js 51 KB

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