contractCwzy.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/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. // console.log("888",data);
  432. this.setState({
  433. contractData: thisdata,
  434. voucherUrl: thisdata.voucherUrl
  435. ? splitUrl(
  436. thisdata.voucherUrl,
  437. ",",
  438. globalConfig.avatarHost + "/upload",
  439. url
  440. )
  441. : []
  442. });
  443. console.log("url", this.state.voucherUrl);
  444. }
  445. }.bind(this)
  446. });
  447. $.ajax({
  448. method: "get",
  449. dataType: "json",
  450. crossDomain: false,
  451. url:
  452. globalConfig.context +
  453. "/api/admin/orderChange/listOrderInvoiceAndBill",
  454. data: {
  455. orderNo: this.state.orderNo
  456. },
  457. success: function(data) {
  458. if (!data.data) return;
  459. let proTotal = 0;
  460. let invTotal = 0;
  461. data.data.bill.forEach(item => {
  462. proTotal += item.transactionAmount;
  463. });
  464. data.data.invoice.forEach(item => {
  465. invTotal += item.amount;
  466. });
  467. this.setState({
  468. proceedsData: data.data,
  469. proTotal,
  470. invTotal
  471. });
  472. }.bind(this)
  473. });
  474. $.ajax({
  475. method: "get",
  476. dataType: "json",
  477. crossDomain: false,
  478. url:
  479. globalConfig.context +
  480. "/api/admin/orderChange/listOrderRefundInvoice",
  481. data: {
  482. orderNo: this.state.orderNo
  483. },
  484. success: data => {
  485. if (!data) return;
  486. data.data.forEach(item => {
  487. item.load = true;
  488. });
  489. this.setState({
  490. refundInvoice: data.data
  491. });
  492. }
  493. });
  494. },
  495. //订单详情
  496. xiangqing(orderNos) {
  497. $.ajax({
  498. method: "get",
  499. dataType: "json",
  500. crossDomain: false,
  501. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  502. data: {
  503. orderNo: orderNos
  504. },
  505. success: function(data) {
  506. if (data.error.length || data.data.list == "") {
  507. if (data.error && data.error.length) {
  508. message.warning(data.error[0].message);
  509. }
  510. } else {
  511. let thisdata = data.data;
  512. this.setState({
  513. userName: thisdata.userName,
  514. primaryOrderNo: thisdata.primaryOrder,
  515. additionalOrder: thisdata.additionalOrder,
  516. contractNo: thisdata.contractNo,
  517. // arrears: thisdata.arrears,
  518. orderData: thisdata,
  519. isAddition: thisdata.additionalOrder ? true : false,
  520. contractPictureUrl: thisdata.contractPictureUrl
  521. ? splitUrl(
  522. thisdata.contractPictureUrl,
  523. ",",
  524. globalConfig.avatarHost + "/upload"
  525. )
  526. : []
  527. });
  528. // console.log(thisdata.contractPictureUrl);
  529. }
  530. }.bind(this)
  531. });
  532. },
  533. // 原订单数据
  534. primaryOrder(primaryOrder) {
  535. $.ajax({
  536. method: "get",
  537. dataType: "json",
  538. crossDomain: false,
  539. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  540. data: {
  541. orderNo: primaryOrder
  542. },
  543. success: function(data) {
  544. if (data.error.length || data.data.list == "") {
  545. if (data.error && data.error.length) {
  546. message.warning(data.error[0].message);
  547. }
  548. } else {
  549. let thisdata = data.data;
  550. this.setState({
  551. primaryOrderData: thisdata
  552. });
  553. }
  554. }.bind(this)
  555. });
  556. },
  557. // 附加订单数据
  558. additionalOrder(additionalOrder) {
  559. $.ajax({
  560. method: "get",
  561. dataType: "json",
  562. crossDomain: false,
  563. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  564. data: {
  565. orderNo: additionalOrder
  566. },
  567. success: function(data) {
  568. if (data.error.length || data.data.list == "") {
  569. if (data.error && data.error.length) {
  570. message.warning(data.error[0].message);
  571. }
  572. } else {
  573. let thisdata = data.data;
  574. this.setState({
  575. additionalOrderData: thisdata
  576. });
  577. }
  578. }.bind(this)
  579. });
  580. },
  581. //项目列表
  582. xiangmu(orderNos) {
  583. $.ajax({
  584. method: "get",
  585. dataType: "json",
  586. crossDomain: false,
  587. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  588. data: {
  589. orderNo: orderNos
  590. },
  591. success: function(data) {
  592. let theArr = [];
  593. if (data.error.length || data.data.list == "") {
  594. if (data.error && data.error.length) {
  595. message.warning(data.error[0].message);
  596. }
  597. } else {
  598. for (let i = 0; i < data.data.length; i++) {
  599. let thisdata = data.data[i];
  600. theArr.push({
  601. key: i,
  602. id: thisdata.id,
  603. orderNo: thisdata.orderNo, //订单编号
  604. commodityId: thisdata.commodityId, //项目ID
  605. commodityName: thisdata.commodityName, //项目名称
  606. cname: thisdata.cname, //项目类别
  607. commodityPrice: thisdata.commodityPrice, //项目价格
  608. commodityQuantity: thisdata.commodityQuantity, //项目数量
  609. main: thisdata.main, //是否为主要任务
  610. taskComment: thisdata.taskComment, //任务说明
  611. contacts: thisdata.contacts, //联系人
  612. contactsMobile: thisdata.contactsMobile, //联系人电话
  613. projectStatus: thisdata.projectStatus, //项目状态
  614. sort: thisdata.cSort
  615. });
  616. }
  617. }
  618. this.setState({
  619. dataSourceX: theArr
  620. });
  621. }.bind(this)
  622. });
  623. },
  624. // 查看收款金额
  625. getProceeds(id) {
  626. $.ajax({
  627. method: "get",
  628. dataType: "json",
  629. crossDomain: false,
  630. url:
  631. globalConfig.context +
  632. "/api/admin/orderChange/orderChangeDetailsById",
  633. data: {
  634. id: id
  635. },
  636. success: function(data) {
  637. if (data.error.length || data.data.list == "") {
  638. if (data.error && data.error.length) {
  639. message.warning(data.error[0].message);
  640. }
  641. } else {
  642. // let thisdata = data.data;
  643. }
  644. }.bind(this)
  645. });
  646. },
  647. search(obj) {
  648. this.setState(
  649. {
  650. searchData: obj
  651. },
  652. () => {
  653. this.loadData(1);
  654. }
  655. );
  656. },
  657. rizhi(orderNo) {
  658. $.ajax({
  659. method: "get",
  660. dataType: "json",
  661. crossDomain: false,
  662. url: "/api/admin/newOrder/selectOrderLog",
  663. data: {
  664. orderNo: orderNo
  665. },
  666. success: function(data) {
  667. let theArr = [];
  668. let thisData = data.data;
  669. if (!thisData.length) {
  670. if (data.error && data.error.length) {
  671. message.warning(data.error[0].message);
  672. }
  673. thisData = {};
  674. } else {
  675. for (let i = 0; i < data.data.length; i++) {
  676. let thisdata = data.data[i];
  677. theArr.push({
  678. processName: thisdata.processName,
  679. adminName: thisdata.adminName,
  680. createDate: thisdata.createDate,
  681. remarks: thisdata.remarks
  682. });
  683. }
  684. }
  685. this.setState({
  686. dataSourcerizhi: theArr
  687. });
  688. }.bind(this)
  689. });
  690. },
  691. getOrderLog(orderNo) {
  692. this.setState({
  693. rizhivisible: true
  694. });
  695. this.rizhi(orderNo);
  696. },
  697. closeOrderLog() {
  698. this.setState({
  699. rizhivisible: false
  700. });
  701. },
  702. //节点列表
  703. jiedian(orderNos) {
  704. $.ajax({
  705. method: "get",
  706. dataType: "json",
  707. crossDomain: false,
  708. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  709. data: {
  710. orderNo: orderNos
  711. },
  712. success: function(data) {
  713. let theArr = [];
  714. let thisData = [];
  715. if (data.error.length || data.data.list == "") {
  716. if (data.error && data.error.length) {
  717. message.warning(data.error[0].message);
  718. }
  719. } else {
  720. for (let i = 0; i < data.data.length; i++) {
  721. thisData = data.data[i];
  722. theArr.push({
  723. key: i,
  724. dunSubject: thisData.dunSubject
  725. ? thisData.dunSubject.toString()
  726. : "", //催款科目
  727. id: thisData.id, //节点Id
  728. money: thisData.money, //催款金额
  729. dunStatus: thisData.dunStatus //催款状态
  730. });
  731. }
  732. this.setState({
  733. contactList: theArr
  734. });
  735. }
  736. }.bind(this)
  737. });
  738. },
  739. jiedianNew(orderNos) {
  740. $.ajax({
  741. method: "get",
  742. dataType: "json",
  743. crossDomain: false,
  744. url:
  745. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  746. data: {
  747. orderNo: orderNos
  748. },
  749. success: function(data) {
  750. if (data.error && data.error.length) {
  751. message.warning(data.error[0].message);
  752. } else {
  753. let theArr = [];
  754. let thisData = [];
  755. let arr = data.data || [];
  756. let totalCui = 0;
  757. for (let i = 0; i < arr.length; i++) {
  758. thisData = arr[i];
  759. totalCui += +thisData.money;
  760. theArr.push({
  761. key: i,
  762. dunSubject: thisData.dunSubject
  763. ? thisData.dunSubject.toString()
  764. : "", //催款科目
  765. id: thisData.id, //节点Id
  766. money: thisData.money, //催款金额
  767. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  768. commodityName: thisData.commodityName,
  769. projectType: thisData.projectType,
  770. dunTypeName: thisData.dunTypeName,
  771. status: thisData.status,
  772. waitDay: thisData.waitDay,
  773. effectiveCount: thisData.effectiveCount,
  774. startDate: thisData.startDate,
  775. dunType: thisData.dunType,
  776. appropriationRatio: thisData.appropriationRatio
  777. });
  778. }
  779. if (!totalCui) {
  780. totalCui = 0;
  781. }
  782. totalCui = (Math.round(totalCui * 10000) / 10000).toFixed(4);
  783. this.setState({
  784. contactListNew: theArr,
  785. totalCui
  786. });
  787. }
  788. }.bind(this)
  789. }).always(
  790. function() {
  791. this.setState({
  792. loading: false
  793. });
  794. }.bind(this)
  795. );
  796. },
  797. //审核通过
  798. examOk() {
  799. $.ajax({
  800. method: "post",
  801. dataType: "json",
  802. crossDomain: false,
  803. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  804. data: {
  805. orderNo: this.state.orderNo,
  806. orderStatus: 2
  807. },
  808. success: function(data) {
  809. if (data.error.length || data.data.list == "") {
  810. if (data.error && data.error.length) {
  811. message.warning(data.error[0].message);
  812. }
  813. } else {
  814. message.success("该订单已通过审核~");
  815. this.setState({
  816. visible: false
  817. });
  818. this.reset();
  819. }
  820. }.bind(this)
  821. }).always(
  822. function() {
  823. this.setState({
  824. loading: false
  825. });
  826. }.bind(this)
  827. );
  828. },
  829. //通过发给外包
  830. outsourcing() {
  831. $.ajax({
  832. method: "post",
  833. dataType: "json",
  834. crossDomain: false,
  835. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  836. data: {
  837. orderNo: this.state.orderNo,
  838. orderStatus: 2,
  839. outsource: 1
  840. },
  841. success: function(data) {
  842. if (data.error.length || data.data.list == "") {
  843. if (data.error && data.error.length) {
  844. message.warning(data.error[0].message);
  845. }
  846. } else {
  847. message.success("该订单已通过审核~");
  848. this.setState({
  849. visible: false
  850. });
  851. this.reset();
  852. }
  853. }.bind(this)
  854. }).always(
  855. function() {
  856. this.setState({
  857. loading: false
  858. });
  859. }.bind(this)
  860. );
  861. },
  862. //审核不通过
  863. examOks() {
  864. this.setState({
  865. aloading: true
  866. });
  867. $.ajax({
  868. method: "post",
  869. dataType: "json",
  870. crossDomain: false,
  871. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  872. data: {
  873. orderNo: this.state.orderNo,
  874. orderStatus: 3,
  875. reason: this.state.reason
  876. },
  877. success: function(data) {
  878. if (data.error.length || data.data.list == "") {
  879. if (data.error && data.error.length) {
  880. message.warning(data.error[0].message);
  881. this.setState({
  882. aloading: true
  883. });
  884. }
  885. } else {
  886. message.success("该订单已被拒绝~");
  887. this.setState({
  888. visible: false,
  889. aloading: false,
  890. noVisible: false,
  891. reason: ""
  892. });
  893. this.reset();
  894. }
  895. }.bind(this)
  896. }).always(
  897. function() {
  898. this.setState({
  899. loading: false
  900. });
  901. }.bind(this)
  902. );
  903. },
  904. //点击拒绝
  905. examNo() {
  906. this.setState({
  907. noVisible: true
  908. });
  909. },
  910. loadDataChange() {
  911. $.ajax({
  912. method: "get",
  913. dataType: "json",
  914. async: false,
  915. crossDomain: false,
  916. url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
  917. data: {
  918. changeId: this.state.id
  919. },
  920. success: function(data) {
  921. if (data.error.length || data.data.list == "") {
  922. if (data.error && data.error.length) {
  923. message.warning(data.error[0].message);
  924. }
  925. } else {
  926. // console.log("拿到历史", data);
  927. this.setState({
  928. dataProps: data.data
  929. });
  930. }
  931. }.bind(this)
  932. });
  933. },
  934. callback(key) {
  935. this.setState(
  936. {
  937. activeKey: key
  938. },
  939. () => {
  940. if (key != "a" && key != "c" && key.length < 10) {
  941. this.ChangeDetail(key);
  942. this.loadDataChange(key);
  943. this.getProceeds(key);
  944. } else if (key != "a" && key != "c" && key.length > 10) {
  945. this.primaryOrder(key);
  946. this.xiangmu(key);
  947. this.jiedian(key);
  948. this.jiedianNew(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. txt={this.state.processStateText}
  1383. pictureUrl={this.state.voucherUrl}
  1384. processState={this.props.processState}
  1385. loadData={this.callback}
  1386. reset={this.state.visible}
  1387. dataSource={this.state.dataProps}
  1388. proceedsData={this.state.proceedsData}
  1389. proceedsTotal={this.state.proTotal}
  1390. invoiceTotal={this.state.invTotal}
  1391. contactList={this.state.refundInvoice}
  1392. onCancel={this.visitCancel}
  1393. />
  1394. </TabPane>
  1395. );
  1396. })}
  1397. {/* {this.state.status === 4 ? (
  1398. <TabPane tab="原订单" key="3">
  1399. <Form
  1400. layout="horizontal"
  1401. onSubmit={this.handleSubmit}
  1402. id="demand-form"
  1403. style={{ paddingBottom: "40px" }}
  1404. >
  1405. <Spin spinning={this.state.loading}>
  1406. <OrderDetail
  1407. orderData={this.state.primaryOrderData}
  1408. getOrderLog={this.getOrderLog}
  1409. dataSourceX={this.state.dataSourceX}
  1410. contactList={this.state.contactList}
  1411. orderNo={this.state.primaryOrderNo}
  1412. totalCui={this.state.totalCui}
  1413. contactListNew={this.state.contactListNew}
  1414. isCaiWu={true}
  1415. />
  1416. </Spin>
  1417. </Form>
  1418. </TabPane>
  1419. ) : (
  1420. ""
  1421. )} */}
  1422. {tabList.map((item, index) => {
  1423. if (item.usedOrder) {
  1424. return (
  1425. <TabPane
  1426. tab={"原订单" + (index + 1)}
  1427. key={item.usedOrder}
  1428. >
  1429. <Form
  1430. layout="horizontal"
  1431. onSubmit={this.handleSubmit}
  1432. id="demand-form"
  1433. style={{ paddingBottom: "40px" }}
  1434. >
  1435. <Spin spinning={this.state.loading}>
  1436. <OrderDetail
  1437. orderData={this.state.primaryOrderData}
  1438. getOrderLog={this.getOrderLog}
  1439. dataSourceX={this.state.dataSourceX}
  1440. contactList={this.state.contactList}
  1441. orderNo={this.state.primaryOrderNo}
  1442. totalCui={this.state.totalCui}
  1443. contactListNew={this.state.contactListNew}
  1444. isCaiWu={true}
  1445. />
  1446. </Spin>
  1447. </Form>
  1448. </TabPane>
  1449. );
  1450. } else {
  1451. return "";
  1452. }
  1453. })}
  1454. {this.state.status === 4 && this.state.isAddition ? (
  1455. this.state.type === 4 || this.state.type === 5 ? (
  1456. <TabPane tab="附加订单" key="c">
  1457. <OrderDetail
  1458. orderData={this.state.additionalOrderData}
  1459. getOrderLog={this.getOrderLog}
  1460. dataSourceX={this.state.dataSourceX}
  1461. contactList={this.state.contactList}
  1462. totalCui={this.state.totalCui}
  1463. contactListNew={this.state.contactListNew}
  1464. orderNo={this.state.additionalOrder}
  1465. isCaiWu={true}
  1466. />
  1467. </TabPane>
  1468. ) : (
  1469. ""
  1470. )
  1471. ) : (
  1472. ""
  1473. )}
  1474. </Tabs>
  1475. </Modal>
  1476. <Modal
  1477. maskClosable={false}
  1478. visible={this.state.addnextVisible}
  1479. onOk={this.nextCancel}
  1480. onCancel={this.nextCancel}
  1481. confirmLoading={this.state.confirmLoading}
  1482. width="800px"
  1483. title={"项目任务详情"}
  1484. footer=""
  1485. className="admin-desc-content"
  1486. >
  1487. <Form layout="horizontal" id="demand-form">
  1488. <Spin spinning={this.state.loading}>
  1489. <div className="clearfix">
  1490. <FormItem
  1491. className="half-item"
  1492. {...formItemLayout}
  1493. label="项目名称"
  1494. >
  1495. <span>{this.state.commodityName}</span>
  1496. </FormItem>
  1497. <FormItem
  1498. className="half-item"
  1499. {...formItemLayout}
  1500. label="项目数量"
  1501. >
  1502. <span>{this.state.commodityQuantity}</span>
  1503. </FormItem>
  1504. <FormItem
  1505. className="half-item"
  1506. {...formItemLayout}
  1507. label="金额(万元)"
  1508. >
  1509. <span>{this.state.commodityPrice}</span>
  1510. </FormItem>
  1511. <FormItem
  1512. className="half-item"
  1513. {...formItemLayout}
  1514. label="主要项目"
  1515. >
  1516. <span>{getboutique(this.state.main)}</span>
  1517. </FormItem>
  1518. <div className="clearfix">
  1519. <FormItem
  1520. labelCol={{ span: 4 }}
  1521. wrapperCol={{ span: 16 }}
  1522. label="服务说明"
  1523. >
  1524. <span>{this.state.taskComment}</span>
  1525. </FormItem>
  1526. </div>
  1527. </div>
  1528. </Spin>
  1529. </Form>
  1530. </Modal>
  1531. <Modal
  1532. maskClosable={false}
  1533. visible={this.state.noVisible}
  1534. onOk={this.handleOk}
  1535. onCancel={this.noCancel}
  1536. width="400px"
  1537. title={"拒绝理由"}
  1538. footer=""
  1539. className="admin-desc-content"
  1540. confirmLoading={this.state.confirmLoading}
  1541. >
  1542. <Form layout="horizontal" id="demand-form">
  1543. <Spin spinning={this.state.loading}>
  1544. <div className="clearfix">
  1545. <FormItem
  1546. labelCol={{ span: 4 }}
  1547. wrapperCol={{ span: 16 }}
  1548. label="拒绝理由"
  1549. >
  1550. <Input
  1551. type="textarea"
  1552. placeholder="请输入拒绝理由"
  1553. rows={4}
  1554. value={this.state.reason}
  1555. onChange={e => {
  1556. this.setState({ reason: e.target.value });
  1557. }}
  1558. />
  1559. </FormItem>
  1560. </div>
  1561. <div className="clearfix">
  1562. <Button
  1563. className="cancel"
  1564. type="primary"
  1565. onClick={this.examOks}
  1566. style={{ marginLeft: "50px" }}
  1567. htmlType="submit"
  1568. loading={this.state.aloading}
  1569. >
  1570. 确定
  1571. </Button>
  1572. <Button
  1573. className="cancel"
  1574. type="ghost"
  1575. onClick={this.noCancel}
  1576. style={{ marginLeft: "50px" }}
  1577. >
  1578. 取消
  1579. </Button>
  1580. </div>
  1581. </Spin>
  1582. </Form>
  1583. </Modal>
  1584. {/* <Modal
  1585. visible={this.state.rizhivisible}
  1586. className="admin-desc-content"
  1587. width="800px"
  1588. maskClosable={false}
  1589. title="订单日志"
  1590. footer={null}
  1591. onCancel={this.closeOrderLog}
  1592. >
  1593. <div className="patent-table">
  1594. <Spin spinning={this.state.loading}>
  1595. <Table
  1596. bordered
  1597. columns={this.state.columnsrizhi}
  1598. dataSource={this.state.dataSourcerizhi}
  1599. pagination={false}
  1600. />
  1601. </Spin>
  1602. </div>
  1603. </Modal> */}
  1604. <OrderRiZi
  1605. dataSourcerizhi={this.state.dataSourcerizhi}
  1606. closeOrderLog={this.closeOrderLog}
  1607. visible={this.state.rizhivisible}
  1608. loading={this.state.loading}
  1609. />
  1610. <Modal
  1611. visible={this.state.dvisible}
  1612. footer=""
  1613. title="所有列表信息"
  1614. className="admin-desc-content"
  1615. width="1300px"
  1616. onCancel={() => {
  1617. this.setState({
  1618. dvisible: false
  1619. });
  1620. this.state.pagination.pageSize = 10;
  1621. this.setState({
  1622. pagination: this.state.pagination
  1623. });
  1624. this.loadData();
  1625. }}
  1626. >
  1627. <Spin spinning={this.state.loading}>
  1628. <div
  1629. className="patent-table"
  1630. style={{
  1631. // width: 900,
  1632. // position: "relative",
  1633. // left: "50%",
  1634. // transform: "translate(-50%)",
  1635. padding: "25px 30px 30px 30px"
  1636. }}
  1637. ref={e => {
  1638. this.refs.all = e;
  1639. }}
  1640. >
  1641. <Table
  1642. columns={this.state.columns}
  1643. dataSource={this.state.dataSource}
  1644. pagination={false}
  1645. bordered
  1646. size="small"
  1647. />
  1648. </div>
  1649. </Spin>
  1650. <ReactToPrint
  1651. trigger={() => (
  1652. <Button
  1653. type="primary"
  1654. style={{
  1655. float: "right",
  1656. marginTop: 10,
  1657. position: "absolute",
  1658. top: 0,
  1659. right: 30
  1660. }}
  1661. >
  1662. 打印
  1663. </Button>
  1664. )}
  1665. content={() => this.refs.all}
  1666. />
  1667. </Modal>
  1668. </div>
  1669. </div>
  1670. );
  1671. }
  1672. })
  1673. );
  1674. export default contractChange;