shouKuang.jsx 31 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136
  1. import React from "react";
  2. import $ from "jquery/src/ajax";
  3. import moment from "moment";
  4. import "./public.less";
  5. import {
  6. Button,
  7. Form,
  8. Input,
  9. Spin,
  10. Table,
  11. Select,
  12. message,
  13. DatePicker,
  14. Modal,
  15. Tabs
  16. } from "antd";
  17. import OrderDesc from "../orderDetail/orderDesc";
  18. import Receivable from "./receivable";
  19. import Assign from "@/manageCenter/publicComponent/assign";
  20. import {
  21. getLiquidationStatus,
  22. getProcessStatus,
  23. getApproval,
  24. getInvoiceStatus,
  25. getTransactionProject
  26. } from "@/tools";
  27. import { ChooseList } from "../../order/orderNew/chooseList"
  28. const FormItem = Form.Item;
  29. const { TabPane } = Tabs;
  30. const ShouKuang = React.createClass({
  31. departmentList() {
  32. this.setState({
  33. loading: true
  34. });
  35. $.ajax({
  36. method: "get",
  37. dataType: "json",
  38. crossDomain: false,
  39. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  40. data: {},
  41. success: function(data) {
  42. let thedata = data.data;
  43. let theArr = [];
  44. if (!thedata) {
  45. if (data.error && data.error.length) {
  46. message.warning(data.error[0].message);
  47. }
  48. } else {
  49. thedata.map(function(item, index) {
  50. theArr.push({
  51. key: index,
  52. name: item.name,
  53. id: item.id
  54. });
  55. });
  56. }
  57. this.setState({
  58. departmentArr: theArr
  59. });
  60. }.bind(this)
  61. }).always(
  62. function() {
  63. this.setState({
  64. loading: false
  65. });
  66. }.bind(this)
  67. );
  68. },
  69. loadData(pageNo,pageSize) {
  70. this.state.data = [];
  71. this.setState({
  72. selectedRowKeys: [],
  73. selectedRowKey: [],
  74. page: pageNo,
  75. loading: true
  76. });
  77. $.ajax({
  78. method: "get",
  79. dataType: "json",
  80. crossDomain: false,
  81. url: globalConfig.context + "/api/admin/financial/financeList",
  82. data: {
  83. pageNo: pageNo || 1,
  84. pageSize: pageSize || this.state.pagination.pageSize,
  85. buyerName: this.state.nameSearch, //客户名称
  86. orderNo: this.state.orderNoSearch,
  87. startTime: this.state.releaseDate[0],
  88. endTime: this.state.releaseDate[1],
  89. departmentId: this.state.departmenttList,
  90. processStatus: this.state.processStatusSearch,
  91. contractNo: this.state.contractNoSearch
  92. },
  93. success: function(data) {
  94. let theArr = [];
  95. if (!data.data || !data.data.list) {
  96. if (data.error && data.error.length) {
  97. message.warning(data.error[0].message);
  98. }
  99. } else {
  100. for (let i = 0; i < data.data.list.length; i++) {
  101. let thisdata = data.data.list[i];
  102. theArr.push({
  103. key: thisdata.orderNo,
  104. orderNo: thisdata.orderNo,
  105. orderType: thisdata.orderType,
  106. orderStatus: thisdata.orderStatus,
  107. sellerName: thisdata.sellerName,
  108. processStatus: thisdata.processStatus,
  109. liquidationStatus: thisdata.liquidationStatus,
  110. approval: thisdata.approval,
  111. buyerName: thisdata.buyerName,
  112. actuallyTotalAmount: thisdata.actuallyTotalAmount,
  113. signTime: thisdata.signTime,
  114. companyId: thisdata.companyId,
  115. companyName: thisdata.companyName,
  116. buyerId: thisdata.buyerId,
  117. buyerName: thisdata.buyerName,
  118. contractNo: thisdata.contractNo,
  119. createTime: thisdata.createTime,
  120. departmentName: thisdata.departmentName
  121. });
  122. }
  123. }
  124. this.state.pagination.current = data.data.pageNo;
  125. this.state.pagination.total = data.data.totalCount;
  126. if (data.data && data.data.list && !data.data.list.length) {
  127. this.state.pagination.current = 0;
  128. this.state.pagination.total = 0;
  129. }
  130. this.setState({
  131. totalPage: data.data.totalPage,
  132. dataSource: theArr,
  133. pagination: this.state.pagination
  134. });
  135. }.bind(this)
  136. }).always(
  137. function() {
  138. this.setState({
  139. loading: false
  140. });
  141. }.bind(this)
  142. );
  143. },
  144. getInitialState() {
  145. return {
  146. searchMore: true,
  147. dvisible: false,
  148. assignVisibleX: false,
  149. assignVisibleY: false,
  150. releaseDate: [],
  151. assignDataX: [],
  152. assignDataY: [],
  153. totalPage: 0,
  154. processStatusSearch: "3",
  155. boHuivisible: false,
  156. selectedRowKeys: [],
  157. selectedRows: [],
  158. loading: false,
  159. pagination: {
  160. defaultCurrent: 1,
  161. defaultPageSize: 10,
  162. showQuickJumper: true,
  163. pageSize: 10,
  164. onChange: function(page) {
  165. this.loadData(page);
  166. }.bind(this),
  167. showTotal: function(total) {
  168. return "共" + total + "条数据";
  169. }
  170. },
  171. // 子组件改变的表格title数组
  172. changeList: undefined,
  173. printColumns: [
  174. {
  175. title: "订单编号",
  176. dataIndex: "orderNo",
  177. key: "orderNo"
  178. // fixed: "left"
  179. },
  180. {
  181. title: "签单日期",
  182. dataIndex: "signTime",
  183. key: "signTime"
  184. },
  185. {
  186. title: "下单日期",
  187. dataIndex: "createTime",
  188. key: "createTime"
  189. },
  190. {
  191. title: "已收款(万元)",
  192. dataIndex: "actuallyTotalAmount",
  193. key: "actuallyTotalAmount"
  194. },
  195. {
  196. title: "客户名称",
  197. dataIndex: "buyerName",
  198. key: "buyerName"
  199. },
  200. {
  201. title: "流程状态",
  202. dataIndex: "processStatus",
  203. key: "processStatus",
  204. render: text => {
  205. return getProcessStatus(text);
  206. }
  207. },
  208. {
  209. title: "订单部门",
  210. dataIndex: "departmentName",
  211. key: "departmentName"
  212. },
  213. {
  214. title: "特批状态",
  215. dataIndex: "approval",
  216. key: "approval",
  217. render: text => {
  218. return getApproval(text);
  219. }
  220. },
  221. {
  222. title: "合同编号",
  223. dataIndex: "contractNo",
  224. key: "contractNo"
  225. },
  226. {
  227. title: "订单负责人",
  228. dataIndex: "sellerName",
  229. key: "sellerName"
  230. },
  231. {
  232. title: "结算状态",
  233. dataIndex: "liquidationStatus",
  234. key: "liquidationStatus",
  235. render: text => {
  236. return getLiquidationStatus(text);
  237. }
  238. }
  239. ],
  240. columns: [
  241. {
  242. title: "订单编号",
  243. dataIndex: "orderNo",
  244. key: "orderNo"
  245. // fixed: "left"
  246. },
  247. {
  248. title: "签单日期",
  249. dataIndex: "signTime",
  250. key: "signTime"
  251. },
  252. {
  253. title: "下单日期",
  254. dataIndex: "createTime",
  255. key: "createTime"
  256. },
  257. {
  258. title: "已收款(万元)",
  259. dataIndex: "actuallyTotalAmount",
  260. key: "actuallyTotalAmount"
  261. },
  262. {
  263. title: "客户名称",
  264. dataIndex: "buyerName",
  265. key: "buyerName"
  266. },
  267. {
  268. title: "流程状态",
  269. dataIndex: "processStatus",
  270. key: "processStatus",
  271. render: text => {
  272. return getProcessStatus(text);
  273. }
  274. },
  275. {
  276. title: "订单部门",
  277. dataIndex: "departmentName",
  278. key: "departmentName"
  279. },
  280. {
  281. title: "特批状态",
  282. dataIndex: "approval",
  283. key: "approval",
  284. render: text => {
  285. return getApproval(text);
  286. }
  287. },
  288. {
  289. title: "合同编号",
  290. dataIndex: "contractNo",
  291. key: "contractNo"
  292. },
  293. // {
  294. // title: '订单状态',
  295. // dataIndex: 'orderStatus',
  296. // key: 'orderStatus',
  297. // render: text => { return getNewOrderStatus(text)}
  298. // },
  299. {
  300. title: "订单负责人",
  301. dataIndex: "sellerName",
  302. key: "sellerName"
  303. },
  304. {
  305. title: "结算状态",
  306. dataIndex: "liquidationStatus",
  307. key: "liquidationStatus",
  308. render: text => {
  309. return getLiquidationStatus(text);
  310. }
  311. },
  312. {
  313. title: "操作",
  314. dataIndex: "caozuo",
  315. key: "caouzo",
  316. render: (text, recard) => {
  317. return (
  318. <div>
  319. {recard.liquidationStatus < 2 &&
  320. (recard.approval === 1 || recard.approval === 2) ? (
  321. <Button
  322. style={{ background: "rgb(192,192,192)" }}
  323. onClick={e => {
  324. e.stopPropagation(), this.evaluateX(recard);
  325. }}
  326. >
  327. 收款
  328. </Button>
  329. ) : (
  330. <Button
  331. type="primary"
  332. onClick={e => {
  333. e.stopPropagation(), this.evaluateX(recard);
  334. }}
  335. >
  336. 收款
  337. </Button>
  338. )}
  339. {recard.approval === 2 && recard.processStatus < 4 ? (
  340. <Button
  341. type="primary"
  342. onClick={e => {
  343. e.stopPropagation(), this.evaluateZ(recard);
  344. }}
  345. style={{ marginLeft: "5px" }}
  346. >
  347. 通过
  348. </Button>
  349. ) : (
  350. ""
  351. )}
  352. {!(
  353. recard.actuallyTotalAmount &&
  354. Number(recard.actuallyTotalAmount) > 0
  355. ) && (
  356. <Button
  357. type="danger"
  358. style={{ marginLeft: "5px" }}
  359. onClick={e => {
  360. e.stopPropagation(), this.reject(recard);
  361. }}
  362. >
  363. 驳回
  364. </Button>
  365. )}
  366. {
  367. <Button
  368. type="primary"
  369. style={{ marginLeft: "5px" }}
  370. onClick={e => {
  371. e.stopPropagation(), this.evaluateY(recard, "财务专员");
  372. }}
  373. >
  374. 转交
  375. </Button>
  376. }
  377. </div>
  378. );
  379. }
  380. }
  381. ],
  382. dataSource: [],
  383. searchTime: [],
  384. columnsDate: [
  385. {
  386. title: "编号",
  387. dataIndex: "id",
  388. key: "id"
  389. },
  390. {
  391. title: "订单编号",
  392. dataIndex: "orderno",
  393. key: "orderno"
  394. },
  395. {
  396. title: "开票金额(万元)",
  397. dataIndex: "amount",
  398. key: "amount"
  399. },
  400. {
  401. title: "申请时间",
  402. dataIndex: "createTime",
  403. key: "createTime"
  404. },
  405. {
  406. title: "开票状态",
  407. dataIndex: "status",
  408. key: "status",
  409. render: text => {
  410. return getInvoiceStatus(text);
  411. }
  412. }
  413. ],
  414. waterlistDate: [
  415. {
  416. title: "平台流水号",
  417. dataIndex: "billNo",
  418. key: "billNo"
  419. // fixed: "left"
  420. },
  421. {
  422. title: "金额(万元)",
  423. dataIndex: "transactionAmount",
  424. key: "transactionAmount"
  425. },
  426. {
  427. title: "收款方",
  428. dataIndex: "payeeName",
  429. key: "payeeName"
  430. },
  431. {
  432. title: "付款方",
  433. dataIndex: "payerName",
  434. key: "payerName"
  435. },
  436. {
  437. title: "流水科目",
  438. dataIndex: "transactionSubject",
  439. key: "transactionSubject",
  440. render: text => {
  441. return getTransactionProject(text);
  442. }
  443. },
  444. {
  445. title: "收款类型",
  446. dataIndex: "type",
  447. key: "type"
  448. },
  449. {
  450. title: "财务流水时间",
  451. dataIndex: "financialPayTimes",
  452. key: "financialPayTimes"
  453. },
  454. {
  455. title: "财务流水号",
  456. dataIndex: "financialPayNo",
  457. key: "financialPayNo"
  458. },
  459. {
  460. title: "订单编号",
  461. dataIndex: "orderNo",
  462. key: "orderNo"
  463. },
  464. {
  465. title: "订单负责人",
  466. dataIndex: "saleName",
  467. key: "saleName"
  468. },
  469. {
  470. title: "创建时间",
  471. dataIndex: "createTimes",
  472. key: "createTimes"
  473. }
  474. ],
  475. waterData: []
  476. };
  477. },
  478. // 特批通过
  479. evaluateZ(record) {
  480. $.ajax({
  481. method: "POST",
  482. dataType: "json",
  483. crossDomain: false,
  484. url: globalConfig.context + "/api/admin/financial/financeApproval",
  485. data: {
  486. orderNo: record.orderNo
  487. }
  488. }).done(
  489. function(data) {
  490. if (!data.error.length) {
  491. message.success("通过成功!");
  492. this.setState({
  493. loading: false
  494. });
  495. this.loadData();
  496. } else {
  497. message.warning(data.error[0].message);
  498. }
  499. }.bind(this)
  500. );
  501. },
  502. /* 收款 */
  503. evaluateX(recard) {
  504. this.state.assignDataX = recard;
  505. this.setState({
  506. assignVisibleX: true
  507. });
  508. },
  509. /* 转交 */
  510. evaluateY(recard, nub) {
  511. this.state.assignDataY = recard;
  512. this.setState({
  513. nub,
  514. assignVisibleY: true
  515. });
  516. },
  517. /* 驳回 */
  518. reject(recard) {
  519. this.setState({
  520. bohuiData: recard,
  521. boHuiVisible: true,
  522. content: ""
  523. });
  524. },
  525. boHuiOk() {
  526. this.setState({
  527. boHuiVisible: false
  528. });
  529. if (
  530. this.state.pagination.current == this.state.totalPage &&
  531. this.state.pagination.total % 10 == 1
  532. ) {
  533. this.loadData(this.state.page - 1);
  534. } else {
  535. this.loadData(this.state.page);
  536. }
  537. },
  538. boHuiCancel() {
  539. this.setState({
  540. boHuiVisible: false
  541. });
  542. },
  543. componentWillMount() {
  544. this.loadData();
  545. this.departmentList();
  546. },
  547. tableRowClick(record) {
  548. this.state.RowData = record;
  549. this.setState({
  550. showDesc: true
  551. });
  552. },
  553. closeDesc(e, s) {
  554. this.state.showDesc = e;
  555. if (s) {
  556. this.loadData(this.state.page);
  557. }
  558. },
  559. closeAssignX(e, s) {
  560. this.state.assignDataX = {};
  561. this.state.assignVisibleX = e;
  562. if (s) {
  563. this.loadData(this.state.page);
  564. }
  565. },
  566. closeAssignY(e, s) {
  567. this.state.assignDataY = {};
  568. this.state.assignVisibleY = e;
  569. if (s) {
  570. this.loadData(this.state.page);
  571. }
  572. },
  573. search() {
  574. this.loadData();
  575. },
  576. reset() {
  577. this.state.nameSearch = "";
  578. this.state.releaseDate = [];
  579. this.state.orderNoSearch = "";
  580. this.state.departmenttList = undefined;
  581. this.state.processStatus = [];
  582. this.state.contractNoSearch = "";
  583. this.loadData();
  584. },
  585. //驳回
  586. boHuiSubmit(e) {
  587. e.preventDefault();
  588. if (!this.state.content) {
  589. message.warning("请填写驳回原因");
  590. return false;
  591. }
  592. this.setState({
  593. loading: true
  594. });
  595. $.ajax({
  596. method: "POST",
  597. dataType: "json",
  598. crossDomain: false,
  599. url: globalConfig.context + "/api/admin/financial/reject",
  600. data: {
  601. orderNo: this.state.bohuiData.orderNo,
  602. reason: this.state.content
  603. }
  604. }).done(
  605. function(data) {
  606. if (!data.error.length) {
  607. message.success("驳回成功!");
  608. this.setState({
  609. loading: false
  610. });
  611. this.boHuiOk();
  612. } else {
  613. message.warning(data.error[0].message);
  614. }
  615. }.bind(this)
  616. );
  617. },
  618. searchSwitch() {
  619. this.setState({
  620. searchMore: !this.state.searchMore
  621. });
  622. },
  623. changeList(arr) {
  624. const newArr = [];
  625. this.state.columns.forEach(item => {
  626. arr.forEach(val => {
  627. if (val === item.title) {
  628. newArr.push(item);
  629. }
  630. });
  631. });
  632. this.setState({
  633. changeList: newArr
  634. });
  635. },
  636. callback(key) {
  637. console.log(key);
  638. },
  639. onSelectChange(selectedRowKeys) {
  640. // for(var i=0; i<selectedRowKeys.length; i++){
  641. // for(var j=i+1; j<selectedRowKeys.length; j++){
  642. // if(selectedRowKeys[i]==selectedRowKeys[j]){
  643. // selectedRowKeys.splice(j,1);
  644. // j--;
  645. // }
  646. // }
  647. // }
  648. this.setState({ selectedRowKeys });
  649. },
  650. inRecordCanl() {
  651. this.setState({
  652. bvisible: false
  653. });
  654. },
  655. inRecordData() {
  656. this.setState({
  657. loading: true
  658. });
  659. $.ajax({
  660. method: "get",
  661. dataType: "json",
  662. crossDomain: false,
  663. url:
  664. globalConfig.context +
  665. "/api/admin/orderInvoice/salesmanOrderInvoiceList",
  666. data: {
  667. orderNo: this.state.selectedRowKeys[0]
  668. },
  669. success: function(data) {
  670. let theArr = [];
  671. let sum = 0;
  672. if (!data.data) {
  673. if (data.error && data.error.length) {
  674. message.warning(data.error[0].message);
  675. }
  676. } else {
  677. for (let i = 0; i < data.data.list.length; i++) {
  678. let thisdata = data.data.list[i];
  679. sum += parseFloat(thisdata.amount);
  680. theArr.push({
  681. id: thisdata.id,
  682. orderno: thisdata.orderno, //订单编号
  683. amount: thisdata.amount, //签单金额
  684. createTime: thisdata.createTime, //流程状态
  685. status: thisdata.status, //结算状态
  686. rejectReason: thisdata.rejectReason
  687. });
  688. }
  689. }
  690. this.setState({
  691. recordData: theArr,
  692. sum: sum.toFixed(4)
  693. });
  694. }.bind(this)
  695. }).done(
  696. function() {
  697. this.setState({
  698. loading: false
  699. });
  700. }.bind(this)
  701. );
  702. },
  703. waterData() {
  704. this.state.data = [];
  705. this.setState({
  706. loading: true
  707. });
  708. $.ajax({
  709. method: "get",
  710. dataType: "json",
  711. crossDomain: false,
  712. url: globalConfig.context + "/api/admin/financial/myBillList",
  713. data: {
  714. orderNo: this.state.selectedRowKeys[0]
  715. },
  716. success: function(data) {
  717. let theArr = [];
  718. let waterSum = 0;
  719. if (!data.data || !data.data.list) {
  720. if (data.error && data.error.length) {
  721. message.warning(data.error[0].message);
  722. }
  723. } else {
  724. for (let i = 0; i < data.data.list.length; i++) {
  725. let thisdata = data.data.list[i];
  726. waterSum += parseFloat(thisdata.transactionAmount);
  727. theArr.push({
  728. key: i,
  729. orderNo: thisdata.orderNo,
  730. billNo: thisdata.billNo,
  731. transactionAmount: thisdata.transactionAmount,
  732. payeeName: thisdata.payeeName,
  733. payerName: thisdata.payerName,
  734. transactionSubject: thisdata.transactionSubject,
  735. transactionChannel: thisdata.transactionChannel,
  736. financialPayTimes: thisdata.financialPayTimes,
  737. financialPayNo: thisdata.financialPayNo,
  738. createrName: thisdata.createrName,
  739. saleName: thisdata.saleName,
  740. createTimes: thisdata.createTimes,
  741. type: thisdata.type == 0 ? "手工" : "批量"
  742. });
  743. }
  744. }
  745. this.setState({
  746. waterData: theArr,
  747. waterSum: waterSum.toFixed(4)
  748. });
  749. }.bind(this)
  750. }).always(
  751. function() {
  752. this.setState({
  753. loading: false
  754. });
  755. }.bind(this)
  756. );
  757. },
  758. waterCanl() {
  759. this.setState({
  760. cvisible: false
  761. });
  762. },
  763. exportKaip() {
  764. window.location.href =
  765. globalConfig.context +
  766. "/api/admin/receivables/exportInvoice?" +
  767. `orderNo=${this.state.selectedRowKeys}`;
  768. },
  769. exportAll() {
  770. window.location.href =
  771. globalConfig.context + "/api/admin/receivables/exportReceivables";
  772. },
  773. exportWater() {
  774. window.location.href =
  775. globalConfig.context +
  776. "/api/admin/receivables/exportMyBill?" +
  777. `orderNo=${this.state.selectedRowKeys}`;
  778. },
  779. printAll() {
  780. this.setState({
  781. dvisible: true,
  782. // loading: true
  783. });
  784. this.loadData(1,9999)
  785. this.setState({
  786. dataSourcePrint: this.state.dataSource
  787. })
  788. },
  789. render() {
  790. const formItemLayout = {
  791. labelCol: { span: 8 },
  792. wrapperCol: { span: 14 }
  793. };
  794. const { RangePicker } = DatePicker;
  795. var departmentArr = this.state.departmentArr || [];
  796. const { loading, selectedRowKeys, visible } = this.state;
  797. const rowSelection = {
  798. selectedRowKeys,
  799. onChange: this.onSelectChange,
  800. hideDefaultSelections: true,
  801. type: "radio"
  802. };
  803. return (
  804. <div className="user-content">
  805. <div className="content-title" style={{ marginBottom: 10 }}>
  806. <span style={{ fontWeight: 900, fontSize: 16 }}>收款结算</span>
  807. </div>
  808. <Tabs defaultActiveKey="1" onChange={this.callback}>
  809. <TabPane tab="更改表格显示数据" key="1">
  810. <div style={{ marginLeft: 10 }}>
  811. <ChooseList
  812. columns={this.state.columns}
  813. changeFn={this.changeList}
  814. changeList={this.state.changeList}
  815. top={55}
  816. />
  817. </div>
  818. </TabPane>
  819. <TabPane tab="搜索" key="2">
  820. <div className="user-search" style={{ marginLeft: 10 }}>
  821. <Input
  822. placeholder="订单编号"
  823. value={this.state.orderNoSearch}
  824. onChange={e => {
  825. this.setState({ orderNoSearch: e.target.value });
  826. }}
  827. />
  828. <Input
  829. placeholder="客户名称"
  830. value={this.state.nameSearch}
  831. onChange={e => {
  832. this.setState({ nameSearch: e.target.value });
  833. }}
  834. />
  835. <Select
  836. placeholder="订单部门"
  837. style={{ width: 150, marginRight: 10 }}
  838. value={this.state.departmenttList}
  839. onChange={e => {
  840. this.setState({ departmenttList: e });
  841. }}
  842. >
  843. {departmentArr.map(function(item) {
  844. return (
  845. <Select.Option key={item.id}>{item.name}</Select.Option>
  846. );
  847. })}
  848. </Select>
  849. <Input
  850. placeholder="合同编号"
  851. value={this.state.contractNoSearch}
  852. onChange={e => {
  853. this.setState({
  854. contractNoSearch: e.target.value
  855. });
  856. }}
  857. />
  858. <Select
  859. placeholder="流程状态"
  860. onChange={e => {
  861. this.setState({ processStatusSearch: e });
  862. }}
  863. style={{ width: 160, marginRight: 5 }}
  864. value={this.state.processStatusSearch}
  865. >
  866. <Option value="3">未分配</Option>
  867. <Option value="4">已分配</Option>
  868. </Select>
  869. <span style={{ marginRight: 10 }}>下单日期:</span>
  870. <RangePicker
  871. value={[
  872. this.state.releaseDate[0]
  873. ? moment(this.state.releaseDate[0])
  874. : null,
  875. this.state.releaseDate[1]
  876. ? moment(this.state.releaseDate[1])
  877. : null
  878. ]}
  879. onChange={(data, dataString) => {
  880. this.setState({ releaseDate: dataString });
  881. }}
  882. />
  883. <Button
  884. type="primary"
  885. onClick={this.search}
  886. style={{ marginLeft: 10 }}
  887. >
  888. 搜索
  889. </Button>
  890. <Button onClick={this.reset}>重置</Button>
  891. </div>
  892. </TabPane>
  893. <TabPane tab="打印" key="3">
  894. <Button
  895. type="primary"
  896. style={{ margin: "0px 0px 10px 10px" }}
  897. onClick={this.printAll}
  898. >
  899. 打印所有列表信息
  900. </Button>
  901. </TabPane>
  902. <TabPane tab="导出Excel" key="4">
  903. <Button
  904. type="primary"
  905. style={{ margin: "0px 0px 10px 10px" }}
  906. onClick={this.exportAll}
  907. >
  908. 导出当前列表
  909. </Button>
  910. <Button
  911. type="primary"
  912. disabled={!this.state.selectedRowKeys.length}
  913. style={{ margin: "0px 0px 10px 10px" }}
  914. onClick={this.exportKaip}
  915. >
  916. 导出所选开票详情
  917. </Button>
  918. <Button
  919. type="primary"
  920. disabled={!this.state.selectedRowKeys.length}
  921. style={{ margin: "0px 0px 10px 10px" }}
  922. onClick={this.exportWater}
  923. >
  924. 导出所选收款详情流水
  925. </Button>
  926. </TabPane>
  927. <TabPane tab="查看" key="5">
  928. <Button
  929. type="primary"
  930. disabled={this.state.selectedRowKeys.length != 1}
  931. style={{ margin: "0px 0px 10px 10px" }}
  932. onClick={() => {
  933. this.inRecordData();
  934. this.setState({
  935. bvisible: true
  936. });
  937. }}
  938. >
  939. 查看开票详情
  940. </Button>
  941. <Button
  942. type="primary"
  943. disabled={this.state.selectedRowKeys.length != 1}
  944. style={{ margin: "0px 0px 10px 10px" }}
  945. onClick={() => {
  946. this.waterData();
  947. this.setState({
  948. cvisible: true
  949. });
  950. }}
  951. >
  952. 详情收款流水
  953. </Button>
  954. </TabPane>
  955. </Tabs>
  956. <div className="patent-table">
  957. <Spin spinning={this.state.loading}>
  958. <Table
  959. bordered
  960. columns={
  961. this.state.changeList == undefined
  962. ? this.state.columns
  963. : this.state.changeList
  964. }
  965. dataSource={this.state.dataSource}
  966. rowSelection={rowSelection}
  967. scroll={{ x: true, y: 0 }}
  968. pagination={this.state.pagination}
  969. onRowClick={this.tableRowClick.bind(this)}
  970. />
  971. </Spin>
  972. </div>
  973. <Assign
  974. title="任务"
  975. selApi={"/api/admin/newOrder/updateFinance"}
  976. data={this.state.assignDataY}
  977. showDesc={this.state.assignVisibleY}
  978. closeDesc={this.closeAssignY.bind(this)}
  979. // fenpaiData={8}
  980. specially={0}
  981. roleName={this.state.nub}
  982. requestMethod={"get"}
  983. />
  984. <OrderDesc
  985. data={this.state.RowData}
  986. showDesc={this.state.showDesc}
  987. closeDesc={this.closeDesc.bind(this)}
  988. />
  989. <Receivable
  990. title="收款记录"
  991. api="/api/admin/financial/addReceiptsFlow"
  992. data={this.state.assignDataX}
  993. showDesc={this.state.assignVisibleX}
  994. closeDesc={this.closeAssignX.bind(this)}
  995. />
  996. <Modal
  997. visible={this.state.boHuiVisible}
  998. width="400px"
  999. title="驳回备注"
  1000. footer=""
  1001. onOk={this.boHuiOk}
  1002. onCancel={this.boHuiCancel}
  1003. >
  1004. <Form layout="horizontal" onSubmit={this.boHuiSubmit}>
  1005. <Spin spinning={this.state.loading}>
  1006. <FormItem
  1007. labelCol={{ span: 5 }}
  1008. wrapperCol={{ span: 16 }}
  1009. label={
  1010. <span>
  1011. <strong style={{ color: "#f00" }}>*</strong>驳回原因
  1012. </span>
  1013. }
  1014. >
  1015. <Input
  1016. type="textarea"
  1017. rows={4}
  1018. placeholder="请输入驳回原因"
  1019. value={this.state.content}
  1020. onChange={e => {
  1021. this.setState({ content: e.target.value });
  1022. }}
  1023. />
  1024. </FormItem>
  1025. <FormItem wrapperCol={{ span: 12, offset: 5 }}>
  1026. <Button
  1027. type="primary"
  1028. htmlType="submit"
  1029. style={{ marginRight: 20 }}
  1030. >
  1031. 驳回
  1032. </Button>
  1033. <Button
  1034. type="default"
  1035. onClick={() => {
  1036. this.boHuiCancel();
  1037. }}
  1038. >
  1039. 取消
  1040. </Button>
  1041. </FormItem>
  1042. </Spin>
  1043. </Form>
  1044. </Modal>
  1045. <Modal
  1046. visible={this.state.bvisible}
  1047. footer=""
  1048. title="开票历史记录"
  1049. className="admin-desc-content"
  1050. width="900px"
  1051. onCancel={this.inRecordCanl}
  1052. >
  1053. <Spin spinning={this.state.loading}>
  1054. <div className="patent-table">
  1055. <Table
  1056. columns={this.state.columnsDate}
  1057. dataSource={this.state.recordData}
  1058. pagination={false}
  1059. bordered
  1060. />
  1061. <div className="clearfix" style={{ marginTop: "20px" }}>
  1062. <FormItem
  1063. className="half-item"
  1064. {...formItemLayout}
  1065. label={<span style={{ fontSize: "14px" }}>开票总计</span>}
  1066. >
  1067. <span>{this.state.sum + "(万元)"}</span>
  1068. </FormItem>
  1069. </div>
  1070. </div>
  1071. </Spin>
  1072. </Modal>
  1073. <Modal
  1074. visible={this.state.cvisible}
  1075. footer=""
  1076. title="详细收款流水"
  1077. className="admin-desc-content"
  1078. width="1300px"
  1079. onCancel={this.waterCanl}
  1080. >
  1081. <Spin spinning={this.state.loading}>
  1082. <div className="patent-table">
  1083. <Table
  1084. columns={this.state.waterlistDate}
  1085. dataSource={this.state.waterData}
  1086. pagination={false}
  1087. bordered
  1088. />
  1089. <div className="clearfix" style={{ marginTop: "20px" }}>
  1090. <FormItem
  1091. className="half-item"
  1092. {...formItemLayout}
  1093. label={<span style={{ fontSize: "14px" }}>总计金额</span>}
  1094. >
  1095. <span>{this.state.waterSum + "(万元)"}</span>
  1096. </FormItem>
  1097. </div>
  1098. </div>
  1099. </Spin>
  1100. </Modal>
  1101. <Modal
  1102. visible={this.state.dvisible}
  1103. footer=""
  1104. title="所有列表信息"
  1105. className="admin-desc-content"
  1106. width="1300px"
  1107. onCancel={() => {
  1108. this.loadData()
  1109. this.setState({
  1110. dvisible: false
  1111. });
  1112. }}
  1113. >
  1114. <Spin spinning={this.state.loading}>
  1115. <div className="patent-table">
  1116. <Table
  1117. columns={this.state.printColumns}
  1118. dataSource={this.state.dataSourcePrint}
  1119. bordered
  1120. />
  1121. </div>
  1122. </Spin>
  1123. </Modal>
  1124. </div>
  1125. );
  1126. }
  1127. });
  1128. export default ShouKuang;