shouKuang.jsx 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984
  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) {
  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: 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. assignVisibleX: false,
  148. assignVisibleY: false,
  149. releaseDate: [],
  150. assignDataX: [],
  151. assignDataY: [],
  152. totalPage: 0,
  153. processStatusSearch: "3",
  154. boHuivisible: false,
  155. selectedRowKeys: [],
  156. selectedRows: [],
  157. loading: false,
  158. pagination: {
  159. defaultCurrent: 1,
  160. defaultPageSize: 10,
  161. showQuickJumper: true,
  162. pageSize: 10,
  163. onChange: function(page) {
  164. this.loadData(page);
  165. }.bind(this),
  166. showTotal: function(total) {
  167. return "共" + total + "条数据";
  168. }
  169. },
  170. // 子组件改变的表格title数组
  171. changeList: undefined,
  172. columns: [
  173. {
  174. title: "订单编号",
  175. dataIndex: "orderNo",
  176. key: "orderNo"
  177. // fixed: "left"
  178. },
  179. {
  180. title: "签单日期",
  181. dataIndex: "signTime",
  182. key: "signTime"
  183. },
  184. {
  185. title: "下单日期",
  186. dataIndex: "createTime",
  187. key: "createTime"
  188. },
  189. {
  190. title: "已收款(万元)",
  191. dataIndex: "actuallyTotalAmount",
  192. key: "actuallyTotalAmount"
  193. },
  194. {
  195. title: "客户名称",
  196. dataIndex: "buyerName",
  197. key: "buyerName"
  198. },
  199. {
  200. title: "流程状态",
  201. dataIndex: "processStatus",
  202. key: "processStatus",
  203. render: text => {
  204. return getProcessStatus(text);
  205. }
  206. },
  207. {
  208. title: "订单部门",
  209. dataIndex: "departmentName",
  210. key: "departmentName"
  211. },
  212. {
  213. title: "特批状态",
  214. dataIndex: "approval",
  215. key: "approval",
  216. render: text => {
  217. return getApproval(text);
  218. }
  219. },
  220. {
  221. title: "合同编号",
  222. dataIndex: "contractNo",
  223. key: "contractNo"
  224. },
  225. // {
  226. // title: '订单状态',
  227. // dataIndex: 'orderStatus',
  228. // key: 'orderStatus',
  229. // render: text => { return getNewOrderStatus(text)}
  230. // },
  231. {
  232. title: "订单负责人",
  233. dataIndex: "sellerName",
  234. key: "sellerName"
  235. },
  236. {
  237. title: "结算状态",
  238. dataIndex: "liquidationStatus",
  239. key: "liquidationStatus",
  240. render: text => {
  241. return getLiquidationStatus(text);
  242. }
  243. },
  244. {
  245. title: "操作",
  246. dataIndex: "caozuo",
  247. key: "caouzo",
  248. render: (text, recard) => {
  249. return (
  250. <div>
  251. {recard.liquidationStatus < 2 &&
  252. (recard.approval === 1 || recard.approval === 2) ? (
  253. <Button
  254. style={{ background: "rgb(192,192,192)" }}
  255. onClick={e => {
  256. e.stopPropagation(), this.evaluateX(recard);
  257. }}
  258. >
  259. 收款
  260. </Button>
  261. ) : (
  262. <Button
  263. type="primary"
  264. onClick={e => {
  265. e.stopPropagation(), this.evaluateX(recard);
  266. }}
  267. >
  268. 收款
  269. </Button>
  270. )}
  271. {recard.approval === 2 && recard.processStatus < 4 ? (
  272. <Button
  273. type="primary"
  274. onClick={e => {
  275. e.stopPropagation(), this.evaluateZ(recard);
  276. }}
  277. style={{ marginLeft: "5px" }}
  278. >
  279. 通过
  280. </Button>
  281. ) : (
  282. ""
  283. )}
  284. {!(
  285. recard.actuallyTotalAmount &&
  286. Number(recard.actuallyTotalAmount) > 0
  287. ) && (
  288. <Button
  289. type="danger"
  290. style={{ marginLeft: "5px" }}
  291. onClick={e => {
  292. e.stopPropagation(), this.reject(recard);
  293. }}
  294. >
  295. 驳回
  296. </Button>
  297. )}
  298. {
  299. <Button
  300. type="primary"
  301. style={{ marginLeft: "5px" }}
  302. onClick={e => {
  303. e.stopPropagation(), this.evaluateY(recard, "财务专员");
  304. }}
  305. >
  306. 转交
  307. </Button>
  308. }
  309. </div>
  310. );
  311. }
  312. }
  313. ],
  314. dataSource: [],
  315. searchTime: [],
  316. columnsDate: [
  317. {
  318. title: "编号",
  319. dataIndex: "id",
  320. key: "id"
  321. },
  322. {
  323. title: "订单编号",
  324. dataIndex: "orderno",
  325. key: "orderno"
  326. },
  327. {
  328. title: "开票金额(万元)",
  329. dataIndex: "amount",
  330. key: "amount"
  331. },
  332. {
  333. title: "申请时间",
  334. dataIndex: "createTime",
  335. key: "createTime"
  336. },
  337. {
  338. title: "开票状态",
  339. dataIndex: "status",
  340. key: "status",
  341. render: text => {
  342. return getInvoiceStatus(text);
  343. }
  344. }
  345. ],
  346. waterlistDate: [
  347. {
  348. title: "平台流水号",
  349. dataIndex: "billNo",
  350. key: "billNo"
  351. // fixed: "left"
  352. },
  353. {
  354. title: "金额(万元)",
  355. dataIndex: "transactionAmount",
  356. key: "transactionAmount"
  357. },
  358. {
  359. title: "收款方",
  360. dataIndex: "payeeName",
  361. key: "payeeName"
  362. },
  363. {
  364. title: "付款方",
  365. dataIndex: "payerName",
  366. key: "payerName"
  367. },
  368. {
  369. title: "流水科目",
  370. dataIndex: "transactionSubject",
  371. key: "transactionSubject",
  372. render: text => {
  373. return getTransactionProject(text);
  374. }
  375. },
  376. {
  377. title: "收款类型",
  378. dataIndex: "type",
  379. key: "type"
  380. },
  381. {
  382. title: "财务流水时间",
  383. dataIndex: "financialPayTimes",
  384. key: "financialPayTimes"
  385. },
  386. {
  387. title: "财务流水号",
  388. dataIndex: "financialPayNo",
  389. key: "financialPayNo"
  390. },
  391. {
  392. title: "订单编号",
  393. dataIndex: "orderNo",
  394. key: "orderNo"
  395. },
  396. {
  397. title: "订单负责人",
  398. dataIndex: "saleName",
  399. key: "saleName"
  400. },
  401. {
  402. title: "创建时间",
  403. dataIndex: "createTimes",
  404. key: "createTimes"
  405. }
  406. ],
  407. waterData: []
  408. };
  409. },
  410. // 特批通过
  411. evaluateZ(record) {
  412. $.ajax({
  413. method: "POST",
  414. dataType: "json",
  415. crossDomain: false,
  416. url: globalConfig.context + "/api/admin/financial/financeApproval",
  417. data: {
  418. orderNo: record.orderNo
  419. }
  420. }).done(
  421. function(data) {
  422. if (!data.error.length) {
  423. message.success("通过成功!");
  424. this.setState({
  425. loading: false
  426. });
  427. this.loadData();
  428. } else {
  429. message.warning(data.error[0].message);
  430. }
  431. }.bind(this)
  432. );
  433. },
  434. /* 收款 */
  435. evaluateX(recard) {
  436. this.state.assignDataX = recard;
  437. this.setState({
  438. assignVisibleX: true
  439. });
  440. },
  441. /* 转交 */
  442. evaluateY(recard, nub) {
  443. this.state.assignDataY = recard;
  444. this.setState({
  445. nub,
  446. assignVisibleY: true
  447. });
  448. },
  449. /* 驳回 */
  450. reject(recard) {
  451. this.setState({
  452. bohuiData: recard,
  453. boHuiVisible: true,
  454. content: ""
  455. });
  456. },
  457. boHuiOk() {
  458. this.setState({
  459. boHuiVisible: false
  460. });
  461. if (
  462. this.state.pagination.current == this.state.totalPage &&
  463. this.state.pagination.total % 10 == 1
  464. ) {
  465. this.loadData(this.state.page - 1);
  466. } else {
  467. this.loadData(this.state.page);
  468. }
  469. },
  470. boHuiCancel() {
  471. this.setState({
  472. boHuiVisible: false
  473. });
  474. },
  475. componentWillMount() {
  476. this.loadData();
  477. this.departmentList();
  478. },
  479. tableRowClick(record) {
  480. this.state.RowData = record;
  481. this.setState({
  482. showDesc: true
  483. });
  484. },
  485. closeDesc(e, s) {
  486. this.state.showDesc = e;
  487. if (s) {
  488. this.loadData(this.state.page);
  489. }
  490. },
  491. closeAssignX(e, s) {
  492. this.state.assignDataX = {};
  493. this.state.assignVisibleX = e;
  494. if (s) {
  495. this.loadData(this.state.page);
  496. }
  497. },
  498. closeAssignY(e, s) {
  499. this.state.assignDataY = {};
  500. this.state.assignVisibleY = e;
  501. if (s) {
  502. this.loadData(this.state.page);
  503. }
  504. },
  505. search() {
  506. this.loadData();
  507. },
  508. reset() {
  509. this.state.nameSearch = "";
  510. this.state.releaseDate = [];
  511. this.state.orderNoSearch = "";
  512. this.state.departmenttList = undefined;
  513. this.state.processStatus = [];
  514. this.state.contractNoSearch = "";
  515. this.loadData();
  516. },
  517. //驳回
  518. boHuiSubmit(e) {
  519. e.preventDefault();
  520. if (!this.state.content) {
  521. message.warning("请填写驳回原因");
  522. return false;
  523. }
  524. this.setState({
  525. loading: true
  526. });
  527. $.ajax({
  528. method: "POST",
  529. dataType: "json",
  530. crossDomain: false,
  531. url: globalConfig.context + "/api/admin/financial/reject",
  532. data: {
  533. orderNo: this.state.bohuiData.orderNo,
  534. reason: this.state.content
  535. }
  536. }).done(
  537. function(data) {
  538. if (!data.error.length) {
  539. message.success("驳回成功!");
  540. this.setState({
  541. loading: false
  542. });
  543. this.boHuiOk();
  544. } else {
  545. message.warning(data.error[0].message);
  546. }
  547. }.bind(this)
  548. );
  549. },
  550. searchSwitch() {
  551. this.setState({
  552. searchMore: !this.state.searchMore
  553. });
  554. },
  555. changeList(arr) {
  556. const newArr = [];
  557. this.state.columns.forEach(item => {
  558. arr.forEach(val => {
  559. if (val === item.title) {
  560. newArr.push(item);
  561. }
  562. });
  563. });
  564. this.setState({
  565. changeList: newArr
  566. });
  567. },
  568. callback(key) {
  569. console.log(key);
  570. },
  571. onSelectChange(selectedRowKeys) {
  572. console.log("selectedRowKeys changed: ", selectedRowKeys);
  573. this.setState({ selectedRowKeys });
  574. },
  575. inRecordCanl() {
  576. this.setState({
  577. bvisible: false
  578. });
  579. },
  580. inRecordData() {
  581. this.setState({
  582. loading: true
  583. });
  584. $.ajax({
  585. method: "get",
  586. dataType: "json",
  587. crossDomain: false,
  588. url:
  589. globalConfig.context +
  590. "/api/admin/orderInvoice/salesmanOrderInvoiceList",
  591. data: {
  592. orderNo: this.state.selectedRowKeys[0]
  593. },
  594. success: function(data) {
  595. let theArr = [];
  596. let sum = 0;
  597. if (!data.data) {
  598. if (data.error && data.error.length) {
  599. message.warning(data.error[0].message);
  600. }
  601. } else {
  602. for (let i = 0; i < data.data.list.length; i++) {
  603. let thisdata = data.data.list[i];
  604. sum += parseFloat(thisdata.amount);
  605. theArr.push({
  606. id: thisdata.id,
  607. orderno: thisdata.orderno, //订单编号
  608. amount: thisdata.amount, //签单金额
  609. createTime: thisdata.createTime, //流程状态
  610. status: thisdata.status, //结算状态
  611. rejectReason: thisdata.rejectReason
  612. });
  613. }
  614. }
  615. this.setState({
  616. recordData: theArr,
  617. sum: sum.toFixed(4)
  618. });
  619. }.bind(this)
  620. }).done(
  621. function() {
  622. this.setState({
  623. loading: false
  624. });
  625. }.bind(this)
  626. );
  627. },
  628. waterData() {
  629. this.state.data = [];
  630. this.setState({
  631. loading: true
  632. });
  633. $.ajax({
  634. method: "get",
  635. dataType: "json",
  636. crossDomain: false,
  637. url: globalConfig.context + "/api/admin/financial/myBillList",
  638. data: {
  639. orderNo: this.state.selectedRowKeys[0],
  640. },
  641. success: function(data) {
  642. let theArr = [];
  643. let waterSum = 0;
  644. if (!data.data || !data.data.list) {
  645. if (data.error && data.error.length) {
  646. message.warning(data.error[0].message);
  647. }
  648. } else {
  649. for (let i = 0; i < data.data.list.length; i++) {
  650. let thisdata = data.data.list[i];
  651. waterSum += parseFloat(thisdata.transactionAmount);
  652. theArr.push({
  653. key: i,
  654. orderNo: thisdata.orderNo,
  655. billNo: thisdata.billNo,
  656. transactionAmount: thisdata.transactionAmount,
  657. payeeName: thisdata.payeeName,
  658. payerName: thisdata.payerName,
  659. transactionSubject: thisdata.transactionSubject,
  660. transactionChannel: thisdata.transactionChannel,
  661. financialPayTimes: thisdata.financialPayTimes,
  662. financialPayNo: thisdata.financialPayNo,
  663. createrName: thisdata.createrName,
  664. saleName: thisdata.saleName,
  665. createTimes: thisdata.createTimes,
  666. type: thisdata.type == 0 ? "手工" : "批量"
  667. });
  668. }
  669. }
  670. this.setState({
  671. waterData: theArr,
  672. waterSum: waterSum.toFixed(4)
  673. });
  674. }.bind(this)
  675. }).always(
  676. function() {
  677. this.setState({
  678. loading: false
  679. });
  680. }.bind(this)
  681. );
  682. },
  683. waterCanl() {
  684. this.setState({
  685. cvisible: false
  686. });
  687. },
  688. render() {
  689. const formItemLayout = {
  690. labelCol: { span: 8 },
  691. wrapperCol: { span: 14 }
  692. };
  693. const { RangePicker } = DatePicker;
  694. var departmentArr = this.state.departmentArr || [];
  695. const { loading, selectedRowKeys, visible } = this.state;
  696. const rowSelection = {
  697. selectedRowKeys,
  698. onChange: this.onSelectChange,
  699. hideDefaultSelections: true
  700. };
  701. return (
  702. <div className="user-content">
  703. <div
  704. className="content-title"
  705. style={{ marginBottom: 10 }}
  706. >
  707. <span style={{ fontWeight: 900, fontSize: 16 }}>收款结算</span>
  708. </div>
  709. <Tabs defaultActiveKey="1" onChange={this.callback}>
  710. <TabPane tab="更改表格显示数据" key="1">
  711. <div style={{ marginLeft: 10 }}>
  712. <ChooseList
  713. columns={this.state.columns}
  714. changeFn={this.changeList}
  715. changeList={this.state.changeList}
  716. top={55}
  717. />
  718. </div>
  719. </TabPane>
  720. <TabPane tab="搜索" key="2">
  721. <div className="user-search" style={{ marginLeft: 10 }}>
  722. <Input
  723. placeholder="订单编号"
  724. value={this.state.orderNoSearch}
  725. onChange={e => {
  726. this.setState({ orderNoSearch: e.target.value });
  727. }}
  728. />
  729. <Input
  730. placeholder="客户名称"
  731. value={this.state.nameSearch}
  732. onChange={e => {
  733. this.setState({ nameSearch: e.target.value });
  734. }}
  735. />
  736. <Select
  737. placeholder="订单部门"
  738. style={{ width: 150, marginRight: 10 }}
  739. value={this.state.departmenttList}
  740. onChange={e => {
  741. this.setState({ departmenttList: e });
  742. }}
  743. >
  744. {departmentArr.map(function(item) {
  745. return (
  746. <Select.Option key={item.id}>{item.name}</Select.Option>
  747. );
  748. })}
  749. </Select>
  750. <Input
  751. placeholder="合同编号"
  752. value={this.state.contractNoSearch}
  753. onChange={e => {
  754. this.setState({
  755. contractNoSearch: e.target.value
  756. });
  757. }}
  758. />
  759. <Select
  760. placeholder="流程状态"
  761. onChange={e => {
  762. this.setState({ processStatusSearch: e });
  763. }}
  764. style={{ width: 160, marginRight: 5 }}
  765. value={this.state.processStatusSearch}
  766. >
  767. <Option value="3">未分配</Option>
  768. <Option value="4">已分配</Option>
  769. </Select>
  770. <span style={{ marginRight: 10 }}>下单日期:</span>
  771. <RangePicker
  772. value={[
  773. this.state.releaseDate[0]
  774. ? moment(this.state.releaseDate[0])
  775. : null,
  776. this.state.releaseDate[1]
  777. ? moment(this.state.releaseDate[1])
  778. : null
  779. ]}
  780. onChange={(data, dataString) => {
  781. this.setState({ releaseDate: dataString });
  782. }}
  783. />
  784. <Button
  785. type="primary"
  786. onClick={this.search}
  787. style={{ marginLeft: 10 }}
  788. >
  789. 搜索
  790. </Button>
  791. <Button onClick={this.reset}>重置</Button>
  792. </div>
  793. </TabPane>
  794. <TabPane tab="打印" key="3">
  795. Content of Tab Pane 3
  796. </TabPane>
  797. <TabPane tab="导出Excel" key="4">
  798. Content of Tab Pane 3
  799. </TabPane>
  800. <TabPane tab="查看" key="5">
  801. <Button
  802. type="primary"
  803. disabled={this.state.selectedRowKeys.length != 1}
  804. style={{ margin: "0px 0px 10px 10px" }}
  805. onClick={() => {
  806. this.inRecordData();
  807. this.setState({
  808. bvisible: true
  809. });
  810. }}
  811. >
  812. 查看开票详情
  813. </Button>
  814. <Button
  815. type="primary"
  816. disabled={this.state.selectedRowKeys.length != 1}
  817. style={{ margin: "0px 0px 10px 10px" }}
  818. onClick={() => {
  819. this.waterData();
  820. this.setState({
  821. cvisible: true
  822. });
  823. }}
  824. >
  825. 详情收款流水
  826. </Button>
  827. </TabPane>
  828. </Tabs>
  829. <div className="patent-table">
  830. <Spin spinning={this.state.loading}>
  831. <Table
  832. bordered
  833. columns={
  834. this.state.changeList == undefined
  835. ? this.state.columns
  836. : this.state.changeList
  837. }
  838. dataSource={this.state.dataSource}
  839. rowSelection={rowSelection}
  840. scroll={{ x: true, y: 0 }}
  841. pagination={this.state.pagination}
  842. onRowClick={this.tableRowClick.bind(this)}
  843. />
  844. </Spin>
  845. </div>
  846. <Assign
  847. title="任务"
  848. selApi={"/api/admin/newOrder/updateFinance"}
  849. data={this.state.assignDataY}
  850. showDesc={this.state.assignVisibleY}
  851. closeDesc={this.closeAssignY.bind(this)}
  852. // fenpaiData={8}
  853. specially={0}
  854. roleName={this.state.nub}
  855. requestMethod={"get"}
  856. />
  857. <OrderDesc
  858. data={this.state.RowData}
  859. showDesc={this.state.showDesc}
  860. closeDesc={this.closeDesc.bind(this)}
  861. />
  862. <Receivable
  863. title="收款记录"
  864. api="/api/admin/financial/addReceiptsFlow"
  865. data={this.state.assignDataX}
  866. showDesc={this.state.assignVisibleX}
  867. closeDesc={this.closeAssignX.bind(this)}
  868. />
  869. <Modal
  870. visible={this.state.boHuiVisible}
  871. width="400px"
  872. title="驳回备注"
  873. footer=""
  874. onOk={this.boHuiOk}
  875. onCancel={this.boHuiCancel}
  876. >
  877. <Form layout="horizontal" onSubmit={this.boHuiSubmit}>
  878. <Spin spinning={this.state.loading}>
  879. <FormItem
  880. labelCol={{ span: 5 }}
  881. wrapperCol={{ span: 16 }}
  882. label={
  883. <span>
  884. <strong style={{ color: "#f00" }}>*</strong>驳回原因
  885. </span>
  886. }
  887. >
  888. <Input
  889. type="textarea"
  890. rows={4}
  891. placeholder="请输入驳回原因"
  892. value={this.state.content}
  893. onChange={e => {
  894. this.setState({ content: e.target.value });
  895. }}
  896. />
  897. </FormItem>
  898. <FormItem wrapperCol={{ span: 12, offset: 5 }}>
  899. <Button
  900. type="primary"
  901. htmlType="submit"
  902. style={{ marginRight: 20 }}
  903. >
  904. 驳回
  905. </Button>
  906. <Button
  907. type="default"
  908. onClick={() => {
  909. this.boHuiCancel();
  910. }}
  911. >
  912. 取消
  913. </Button>
  914. </FormItem>
  915. </Spin>
  916. </Form>
  917. </Modal>
  918. <Modal
  919. visible={this.state.bvisible}
  920. footer=""
  921. title="开票历史记录"
  922. className="admin-desc-content"
  923. width="900px"
  924. onCancel={this.inRecordCanl}
  925. >
  926. <Spin spinning={this.state.loading}>
  927. <div className="patent-table">
  928. <Table
  929. columns={this.state.columnsDate}
  930. dataSource={this.state.recordData}
  931. pagination={false}
  932. bordered
  933. />
  934. <div className="clearfix" style={{ marginTop: "20px" }}>
  935. <FormItem
  936. className="half-item"
  937. {...formItemLayout}
  938. label={<span style={{ fontSize: "14px" }}>开票总计</span>}
  939. >
  940. <span>{this.state.sum + "(万元)"}</span>
  941. </FormItem>
  942. </div>
  943. </div>
  944. </Spin>
  945. </Modal>
  946. <Modal
  947. visible={this.state.cvisible}
  948. footer=""
  949. title="详细收款流水"
  950. className="admin-desc-content"
  951. width="1300px"
  952. onCancel={this.waterCanl}
  953. >
  954. <Spin spinning={this.state.loading}>
  955. <div className="patent-table">
  956. <Table
  957. columns={this.state.waterlistDate}
  958. dataSource={this.state.waterData}
  959. pagination={false}
  960. bordered
  961. />
  962. <div className="clearfix" style={{ marginTop: "20px" }}>
  963. <FormItem
  964. className="half-item"
  965. {...formItemLayout}
  966. label={<span style={{ fontSize: "14px" }}>总计金额</span>}
  967. >
  968. <span>{this.state.waterSum + "(万元)"}</span>
  969. </FormItem>
  970. </div>
  971. </div>
  972. </Spin>
  973. </Modal>
  974. </div>
  975. );
  976. }
  977. });
  978. export default ShouKuang;