invoiceApplyListWai.jsx 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182
  1. import React from "react";
  2. import $ from "jquery/src/ajax";
  3. import "./public.less";
  4. import {
  5. Form,
  6. Button,
  7. Input,
  8. Select,
  9. Spin,
  10. Table,
  11. message,
  12. Modal,
  13. Upload,
  14. Tabs,
  15. Popconfirm,
  16. Tooltip,
  17. DatePicker,
  18. } from "antd";
  19. import {
  20. getProvinceA,
  21. getInvoiceStatus,
  22. getProcessStatus,
  23. getprovince,
  24. getStatus,
  25. getPeople,
  26. splitUrl,
  27. } from "@/tools";
  28. import moment from 'moment';
  29. import OrderDesc from "../orderDetail/orderDesc";
  30. import { ChooseList } from "../../order/orderNew/chooseList";
  31. import { getProjectName } from "../../../tools";
  32. import DepartmentList from "../../../common/departmentList";
  33. import LogPopup from "../../../common/logPopup";
  34. import Cascaders from "../../../common/cascaders";
  35. const FormItem = Form.Item;
  36. const { TabPane } = Tabs;
  37. const { RangePicker } = DatePicker;
  38. const invoiceApplyListWai = React.createClass({
  39. loadData(pageNo) {
  40. this.state.data = [];
  41. this.setState({
  42. loading: true,
  43. });
  44. $.ajax({
  45. method: "get",
  46. dataType: "json",
  47. crossDomain: false,
  48. url:
  49. globalConfig.context +
  50. "/api/admin/orderInvoice/financeOrderInvoiceList",
  51. data: {
  52. pageNo: pageNo || 1,
  53. pageSize: this.state.pagination.pageSize,
  54. name: this.state.nameSearch, //客户名称
  55. orderNo: this.state.orderNoSearch,
  56. deps: this.state.departmenttList,
  57. type: 1,
  58. contractNo: this.state.contractNo, // 合同编号
  59. userName: this.state.userName, // 客户名称
  60. invoiceType: this.state.invoiceType, // 开票状态 1处理中 2通过 3驳回
  61. startTime: this.state.releaseDate[0],
  62. endTime: this.state.releaseDate[1],
  63. },
  64. success: function (data) {
  65. let theArr = [];
  66. if (!data.data || !data.data.list) {
  67. if (data.error && data.error.length) {
  68. message.warning(data.error[0].message);
  69. }
  70. } else {
  71. for (let i = 0; i < data.data.list.length; i++) {
  72. let thisdata = data.data.list[i];
  73. theArr.push({
  74. userName: thisdata.userName,
  75. contractNo: thisdata.contractNo,
  76. key: i,
  77. id: thisdata.id,
  78. status: thisdata.status,
  79. unitName: thisdata.unitName,
  80. orderNo: thisdata.orderNo,
  81. name: thisdata.name,
  82. projectStatus: thisdata.projectStatus,
  83. examineName: thisdata.examineName,
  84. processStatus: thisdata.processStatus,
  85. amount: thisdata.amount,
  86. sumAmount: thisdata.sumAmount,
  87. createTime: thisdata.createTime
  88. ? new Date(thisdata.createTime).toLocaleString()
  89. : "",
  90. settlementAmount: thisdata.settlementAmount,
  91. notAmount: thisdata.notAmount,
  92. });
  93. }
  94. }
  95. this.state.pagination.current = data.data.pageNo;
  96. this.state.pagination.total = data.data.totalCount;
  97. if (data.data && data.data.list && !data.data.list.length) {
  98. this.state.pagination.current = 0;
  99. this.state.pagination.total = 0;
  100. }
  101. this.setState({
  102. totalPage: data.data.totalPage,
  103. dataSource: theArr,
  104. pagination: this.state.pagination,
  105. });
  106. }.bind(this),
  107. }).always(
  108. function () {
  109. this.setState({
  110. loading: false,
  111. });
  112. }.bind(this)
  113. );
  114. },
  115. tableRowClick(record) {
  116. // 要求 营销管理员不允许查看 详情(省外开票审核详情)
  117. let newShiroList = window.adminData.shiroList == "" ? [] : window.adminData.shiroList.split(",");
  118. if (!newShiroList.includes("3")) {
  119. this.state.RowData = record;
  120. this.setState({
  121. showDesc: true,
  122. });
  123. } else {
  124. // message.warn("暂无权限查看")
  125. }
  126. },
  127. closeDesc(e, s) {
  128. this.state.showDesc = e;
  129. if (s) {
  130. this.loadData(this.state.page);
  131. }
  132. },
  133. invoiceData() {
  134. this.setState({
  135. loading: true,
  136. });
  137. $.ajax({
  138. method: "get",
  139. dataType: "json",
  140. crossDomain: false,
  141. url:
  142. globalConfig.context + "/api/admin/orderInvoice/selectByIdOrderInvoice",
  143. data: {
  144. id: this.state.id,
  145. },
  146. success: function (data) {
  147. let thisdata = data.data;
  148. this.setState({
  149. contractNo: thisdata.contractNo,
  150. orderNo: thisdata.orderNo,
  151. approval: thisdata.approval,
  152. type: thisdata.type,
  153. status: thisdata.status,
  154. remarks: thisdata.remarks,
  155. invoiceType: thisdata.invoiceType,
  156. unitName: thisdata.unitName,
  157. taxNumber: thisdata.taxNumber,
  158. amount: thisdata.amount,
  159. banks: thisdata.banks,
  160. content: thisdata.content,
  161. unitAddress: thisdata.unitAddress,
  162. invoiceRemarks: thisdata.invoiceRemarks,
  163. unitMobile: thisdata.unitMobile,
  164. post: thisdata.post,
  165. addressee: thisdata.addressee,
  166. addresseeMobile: thisdata.addresseeMobile,
  167. addresseeProvince: thisdata.addresseeProvince,
  168. addresseeCity: thisdata.addresseeCity,
  169. addresseeArea: thisdata.addresseeArea,
  170. alreadyAmount: thisdata.alreadyAmount,
  171. recipientAddress: thisdata.recipientAddress,
  172. orgCodeUrl: thisdata.voucherUrl
  173. ? splitUrl(
  174. thisdata.voucherUrl,
  175. ",",
  176. globalConfig.avatarHost + "/upload"
  177. )
  178. : [],
  179. });
  180. }.bind(this),
  181. }).done(
  182. function () {
  183. this.setState({
  184. loading: false,
  185. });
  186. }.bind(this)
  187. );
  188. },
  189. getInitialState() {
  190. return {
  191. searchMore: true,
  192. assignVisible: false,
  193. releaseDate: [],
  194. totalPage: 0,
  195. boHuivisible: false,
  196. selectedRowKeys: [],
  197. selectedRows: [],
  198. loading: false,
  199. reason: "",
  200. foo: 0,
  201. pagination: {
  202. defaultCurrent: 1,
  203. defaultPageSize: 10,
  204. showQuickJumper: true,
  205. pageSize: 10,
  206. onChange: function (page) {
  207. this.loadData(page);
  208. }.bind(this),
  209. showTotal: function (total) {
  210. return "共" + total + "条数据";
  211. },
  212. },
  213. columns: [
  214. {
  215. title: "编号",
  216. dataIndex: "id",
  217. key: "id",
  218. },
  219. {
  220. title: "客户名称",
  221. dataIndex: "userName",
  222. key: "userName",
  223. render: text => {
  224. return (
  225. <Tooltip title={text}>
  226. <div style={{
  227. }}>{text}</div>
  228. </Tooltip>
  229. )
  230. }
  231. },
  232. {
  233. title: "开票单位名称",
  234. dataIndex: "unitName",
  235. key: "unitName",
  236. render: text => {
  237. return (
  238. <Tooltip title={text}>
  239. <div style={{
  240. }}>{text}</div>
  241. </Tooltip>
  242. )
  243. }
  244. },
  245. {
  246. title: "合同编号",
  247. dataIndex: "contractNo",
  248. key: "contractNo"
  249. },
  250. {
  251. title: "跟单人/签单人",
  252. dataIndex: "name",
  253. key: "name",
  254. },
  255. {
  256. title: "开票状态",
  257. dataIndex: "status",
  258. key: "status",
  259. render: (text, record) => {
  260. // return getStatus(text);
  261. return getInvoiceStatus(text, record);
  262. },
  263. },
  264. {
  265. title: "流程状态",
  266. dataIndex: "processStatus",
  267. key: "processStatus",
  268. render: (text, record) => {
  269. return getProcessStatus(text, record.examineName, record.approval);
  270. },
  271. },
  272. {
  273. title: "项目状态",
  274. dataIndex: "projectStatus",
  275. key: "projectStatus",
  276. render: (text) => {
  277. return getProjectName(text);
  278. },
  279. },
  280. {
  281. title: "申请开票(万)",
  282. dataIndex: "amount",
  283. key: "amount",
  284. },
  285. {
  286. title: "已开票(万)",
  287. dataIndex: "sumAmount",
  288. key: "sumAmount",
  289. },
  290. {
  291. title: "已收款",
  292. dataIndex: "settlementAmount",
  293. key: "settlementAmount",
  294. },
  295. {
  296. title: "未收款",
  297. dataIndex: "notAmount",
  298. key: "notAmount",
  299. },
  300. {
  301. title: "申请时间",
  302. dataIndex: "createTime",
  303. key: "createTime",
  304. },
  305. {
  306. title: "操作",
  307. dataIndex: "caozuo",
  308. key: "caouzo",
  309. render: (_text, record, index) => {
  310. return (
  311. <div>
  312. {
  313. <Button
  314. type="primary"
  315. onClick={(e) => {
  316. e.stopPropagation(), this.visit(index);
  317. }}
  318. style={{ margin: "4px 5px", background: "deepskyblue", border: "none" }}
  319. >
  320. 申请内容
  321. </Button>
  322. }
  323. {
  324. record.status !== 2 ? (
  325. <Popconfirm
  326. placement="top"
  327. title="确定要通过吗?"
  328. onConfirm={(e) => {
  329. e.stopPropagation();
  330. this.setState({ examine: 2 }, () => {
  331. this.sende(record);
  332. });
  333. }}
  334. okText="确定"
  335. cancelText="取消"
  336. >
  337. <Button
  338. type="primary"
  339. style={{ margin: "4px 5px" }}
  340. onClick={(e) => {
  341. e.stopPropagation();
  342. }}
  343. >
  344. 通过
  345. </Button>
  346. </Popconfirm>
  347. ) : (
  348. ""
  349. )
  350. }
  351. {
  352. record.status !== 2 ? (
  353. <Popconfirm
  354. placement="top"
  355. title="确定要拒绝吗?"
  356. onConfirm={(e) => {
  357. e.stopPropagation();
  358. this.setState({ examine: 3 }, () => {
  359. this.reject(record);
  360. });
  361. }}
  362. okText="确定"
  363. cancelText="取消"
  364. >
  365. <Button
  366. type="danger"
  367. onClick={(e) => {
  368. e.stopPropagation();
  369. }}
  370. style={{ margin: "4px 5px" }}
  371. >
  372. 拒绝
  373. </Button>
  374. </Popconfirm>
  375. ) : (
  376. ""
  377. )
  378. }
  379. {
  380. record.status === 2 ? (
  381. <Button
  382. style={{ margin: "4px 5px", color: "black" }}
  383. disabled={true}
  384. >
  385. 已通过
  386. </Button>
  387. ) : (
  388. ""
  389. )
  390. }
  391. {
  392. < Button
  393. type="primary"
  394. style={{
  395. margin: "4px 5px",
  396. background: "orangered",
  397. border: "none",
  398. }}
  399. onClick={(e) => {
  400. e.stopPropagation(), this.inRecord(record, index);
  401. }}
  402. >
  403. 开票记录
  404. </Button >
  405. }
  406. </div >
  407. );
  408. },
  409. },
  410. ],
  411. columnsDate: [
  412. {
  413. title: "编号",
  414. dataIndex: "id",
  415. key: "id",
  416. },
  417. {
  418. title: "订单编号",
  419. dataIndex: "orderNo",
  420. key: "orderNo",
  421. },
  422. {
  423. title: "开票金额(万元)",
  424. dataIndex: "amount",
  425. key: "amount",
  426. },
  427. {
  428. title: "申请时间",
  429. dataIndex: "createTime",
  430. key: "createTime",
  431. },
  432. {
  433. title: "开票状态",
  434. dataIndex: "status",
  435. key: "status",
  436. render: (text, record) => {
  437. return (
  438. <div>
  439. {getInvoiceStatus(text, record)} <LogPopup id={record.id} />
  440. </div>
  441. );
  442. },
  443. },
  444. ],
  445. dataSource: [],
  446. searchTime: [,],
  447. };
  448. },
  449. loadSend(record) {
  450. this.setState({
  451. loading: true,
  452. });
  453. if (this.state.examine === 3 && this.state.reason === "") {
  454. message.warning("拒绝理由不能为空!");
  455. this.setState({
  456. loading: false,
  457. })
  458. return;
  459. }
  460. $.ajax({
  461. method: "post",
  462. dataType: "json",
  463. crossDomain: false,
  464. url: globalConfig.context + "/api/admin/orderInvoice/financeExamine",
  465. data: {
  466. id: this.state.examine === 2 ? record.id : this.state.id,
  467. examine: this.state.examine,
  468. reason: this.state.reason,
  469. },
  470. success: function () { }.bind(this),
  471. }).done(
  472. function () {
  473. this.setState({
  474. loading: false,
  475. });
  476. if (this.state.examine === 2) {
  477. message.success("通过成功!");
  478. // this.state.pagination.current
  479. this.loadData();
  480. } else {
  481. message.success("拒绝成功!");
  482. this.resetReason();
  483. this.rejectCancels();
  484. this.loadData();
  485. }
  486. }.bind(this)
  487. );
  488. },
  489. //重置拒绝理由
  490. resetReason() {
  491. this.setState({
  492. reason: "",
  493. });
  494. },
  495. sende(record) {
  496. this.loadSend(record);
  497. },
  498. commit() {
  499. this.loadSend();
  500. this.setState({
  501. avisible: false,
  502. });
  503. },
  504. visit(index) {
  505. this.setState(
  506. {
  507. id: this.state.dataSource[index].id,
  508. avisible: true,
  509. },
  510. () => {
  511. this.invoiceData();
  512. }
  513. );
  514. },
  515. visitCancels() {
  516. this.setState({
  517. avisible: false,
  518. });
  519. },
  520. reject(record) {
  521. this.setState({
  522. visibleR: true,
  523. id: record.id,
  524. });
  525. },
  526. rejectCancels() {
  527. this.setState({
  528. visibleR: false,
  529. });
  530. },
  531. inRecordData() {
  532. this.setState({
  533. loading: true,
  534. });
  535. $.ajax({
  536. method: "get",
  537. dataType: "json",
  538. crossDomain: false,
  539. url:
  540. globalConfig.context +
  541. "/api/admin/orderInvoice/salesmanOrderInvoiceList",
  542. data: {
  543. orderNo: this.state.orderNo2,
  544. },
  545. success: function (data) {
  546. let theArr = [];
  547. let sum = 0;
  548. if (!data.data) {
  549. if (data.error && data.error.length) {
  550. message.warning(data.error[0].message);
  551. }
  552. } else {
  553. for (let i = 0; i < data.data.list.length; i++) {
  554. let thisdata = data.data.list[i];
  555. sum += parseFloat(thisdata.amount);
  556. theArr.push({
  557. id: thisdata.id,
  558. orderNo: thisdata.orderNo, //订单编号
  559. amount: thisdata.amount, //签单金额
  560. createTime: thisdata.createTime, //流程状态
  561. status: thisdata.status, //结算状态
  562. rejectReason: thisdata.rejectReason,
  563. approval: thisdata.approval, //0非特批 1待审核 2审核通过
  564. examineName: !thisdata.examineName ? undefined : thisdata.examineName,
  565. });
  566. }
  567. }
  568. this.setState({
  569. recordData: theArr,
  570. sum: sum.toFixed(6),
  571. });
  572. }.bind(this),
  573. }).done(
  574. function () {
  575. this.setState({
  576. loading: false,
  577. });
  578. }.bind(this)
  579. );
  580. },
  581. inRecord(record) {
  582. this.setState(
  583. {
  584. bvisible: true,
  585. orderNo2: record.orderNo,
  586. },
  587. () => {
  588. this.inRecordData();
  589. }
  590. );
  591. },
  592. inRecordCanl() {
  593. this.setState({
  594. bvisible: false,
  595. });
  596. },
  597. search() {
  598. this.loadData();
  599. },
  600. componentWillMount() {
  601. this.loadData();
  602. },
  603. exportExec() {
  604. message.config({
  605. duration: 20,
  606. });
  607. let loading = message.loading("下载中...");
  608. this.setState({
  609. exportPendingLoading: true,
  610. });
  611. $.ajax({
  612. method: "get",
  613. dataType: "json",
  614. crossDomain: false,
  615. url: "/api/admin/orderInvoice/financeOrderInvoiceList/export",
  616. data: {
  617. name: this.state.nameSearch, //客户名称
  618. orderNo: this.state.orderNoSearch,
  619. deps: this.state.departmenttList,
  620. type: 1,
  621. contractNo: this.state.contractNo, // 合同编号
  622. userName: this.state.userName, // 客户名称
  623. invoiceType: this.state.invoiceType, // 开票状态 1处理中 2通过 3驳回
  624. startTime: this.state.releaseDate[0],
  625. endTime: this.state.releaseDate[1],
  626. },
  627. success: function (data) {
  628. if (data.error.length === 0) {
  629. this.download(data.data);
  630. } else {
  631. message.warning(data.error[0].message);
  632. }
  633. }.bind(this),
  634. }).always(
  635. function () {
  636. loading();
  637. this.setState({
  638. exportPendingLoading: false,
  639. });
  640. }.bind(this)
  641. );
  642. },
  643. download(fileName) {
  644. window.location.href =
  645. globalConfig.context + "/open/download?fileName=" + fileName;
  646. },
  647. reset() {
  648. this.state.invoiceType = undefined;
  649. this.state.userName = undefined;
  650. this.state.contractNo = undefined;
  651. this.state.nameSearch = undefined;
  652. this.state.releaseDate = [];
  653. this.state.orderNoSearch = undefined;
  654. this.state.processStatus = undefined;
  655. this.state.departmenttList = undefined;
  656. this.Cascaders.empty();
  657. this.loadData();
  658. },
  659. changeList(arr) {
  660. const newArr = [];
  661. this.state.columns.forEach((item) => {
  662. arr.forEach((val) => {
  663. if (val === item.title) {
  664. newArr.push(item);
  665. }
  666. });
  667. });
  668. this.setState({
  669. changeList: newArr,
  670. });
  671. },
  672. render() {
  673. const newShiroList = window.adminData.shiroList == "" ? [] : window.adminData.shiroList.split(",");
  674. const formItemLayout = {
  675. labelCol: { span: 8 },
  676. wrapperCol: { span: 14 },
  677. };
  678. return (
  679. <div className="user-content">
  680. <div className="content-title" style={{ marginBottom: 10 }}>
  681. <span style={{ fontWeight: 900, fontSize: 16 }}>省外开票审核</span>
  682. </div>
  683. <Tabs defaultActiveKey="1" className="test">
  684. <TabPane tab="搜索" key="1">
  685. <div className="user-search" style={{ padding: "0 10px" }}>
  686. <Input
  687. placeholder="订单编号"
  688. value={this.state.orderNoSearch}
  689. onChange={(e) => {
  690. this.setState({ orderNoSearch: e.target.value });
  691. }}
  692. />
  693. <Input
  694. placeholder="合同编号"
  695. value={this.state.contractNo}
  696. onChange={e => {
  697. this.setState({ contractNo: e.target.value });
  698. }}
  699. />
  700. <Input
  701. placeholder="客户名称"
  702. value={this.state.userName}
  703. onChange={e => {
  704. this.setState({ userName: e.target.value });
  705. }}
  706. />
  707. <Input
  708. placeholder="营销员名称"
  709. value={this.state.nameSearch}
  710. onChange={e => {
  711. this.setState({ nameSearch: e.target.value });
  712. }}
  713. />
  714. <Select placeholder="开票状态"
  715. style={{ width: 120, }}
  716. value={this.state.invoiceType}
  717. onChange={(e) => { this.setState({ invoiceType: e }) }}
  718. >
  719. <Select.Option value="1" >处理中</Select.Option>
  720. <Select.Option value="2" >通过</Select.Option>
  721. <Select.Option value="3" >驳回</Select.Option>
  722. </Select>
  723. <Cascaders
  724. ref={node => this.Cascaders = node}
  725. placeholder="订单部门"
  726. id="id"
  727. name="name"
  728. children="list"
  729. height={28}
  730. onSel={(e) => {
  731. this.setState({
  732. departmenttList: JSON.stringify(e),
  733. });
  734. }}
  735. />
  736. {/* <DepartmentList
  737. value={this.state.departmenttList}
  738. onChange={(e) => {
  739. this.setState({ departmenttList: e });
  740. }}
  741. /> */}
  742. <span style={{ marginRight: "10px" }}>申请时间 :</span>
  743. <RangePicker
  744. value={[
  745. this.state.releaseDate[0]
  746. ? moment(this.state.releaseDate[0])
  747. : null,
  748. this.state.releaseDate[1]
  749. ? moment(this.state.releaseDate[1])
  750. : null,
  751. ]}
  752. onChange={(data, dataString) => {
  753. this.setState({ releaseDate: dataString });
  754. }}
  755. />
  756. <Button
  757. type="primary"
  758. onClick={this.search}
  759. style={{ marginLeft: 10 }}
  760. >
  761. 搜索
  762. </Button>
  763. <Button onClick={this.reset}>重置</Button>
  764. </div>
  765. </TabPane>
  766. <TabPane tab="更改表格显示数据" key="2">
  767. <div style={{ marginLeft: 10 }}>
  768. <ChooseList
  769. columns={this.state.columns}
  770. changeFn={this.changeList}
  771. changeList={this.state.changeList}
  772. top={55}
  773. margin={11}
  774. />
  775. </div>
  776. </TabPane>
  777. {/* 管理员才能导出 */}
  778. <TabPane tab="导出" key="3" disabled={!newShiroList.includes("99")}>
  779. <div>
  780. <Button
  781. loading={this.state.exportPendingLoading}
  782. onClick={() => { this.exportExec() }}
  783. style={{ margin: 10 }}
  784. >
  785. 导出excel
  786. </Button>
  787. </div>
  788. </TabPane>
  789. </Tabs>
  790. <div className="patent-table">
  791. <Spin spinning={this.state.loading}>
  792. <Table
  793. columns={
  794. this.state.changeList
  795. ? this.state.changeList
  796. : this.state.columns
  797. }
  798. scroll={{ x: 1500, y: 0 }}
  799. onRowClick={this.tableRowClick}
  800. dataSource={this.state.dataSource}
  801. pagination={this.state.pagination}
  802. bordered
  803. size="small"
  804. />
  805. </Spin>
  806. </div>
  807. <Modal
  808. visible={this.state.visibleR}
  809. className="admin-desc-content"
  810. footer=""
  811. title="拒绝理由"
  812. width="400px"
  813. onCancel={this.rejectCancels}
  814. >
  815. <Input.TextArea
  816. placeholder="请输入拒绝理由"
  817. rows={4}
  818. value={this.state.reason}
  819. onChange={(e) => {
  820. this.setState({ reason: e.target.value });
  821. }}
  822. />
  823. <div className="clearfix" style={{ marginTop: "20px" }}>
  824. <Button
  825. loading={this.state.loading}
  826. type="primary"
  827. onClick={(e) => {
  828. e.stopPropagation();
  829. this.commit();
  830. }}
  831. style={{ float: "right" }}
  832. >
  833. 提交
  834. </Button>
  835. </div>
  836. </Modal>
  837. <Modal
  838. className="admin-desc-content"
  839. footer=""
  840. title="开具发票申请单"
  841. width="1200px"
  842. visible={this.state.avisible}
  843. onOk={this.visitOks}
  844. onCancel={this.visitCancels}
  845. >
  846. <Form
  847. layout="horizontal"
  848. id="demand-form"
  849. style={{ paddingBottom: "40px" }}
  850. >
  851. <Spin spinning={this.state.loading}>
  852. <div className="clearfix">
  853. <div className="clearfix">
  854. <FormItem
  855. className="half-item"
  856. {...formItemLayout}
  857. label="合同编号"
  858. >
  859. <span>{this.state.contractNo}</span>
  860. </FormItem>
  861. <FormItem
  862. className="half-item"
  863. {...formItemLayout}
  864. label="备注"
  865. >
  866. <span>{this.state.remarks}</span>
  867. </FormItem>
  868. </div>
  869. <div className="clearfix">
  870. <FormItem
  871. className="half-item"
  872. {...formItemLayout}
  873. label={
  874. <span>
  875. <strong style={{ color: "#f00" }}>*</strong>省内/外
  876. </span>
  877. }
  878. >
  879. <span>{getProvinceA(this.state.type)}</span>
  880. </FormItem>
  881. <FormItem
  882. className="half-item"
  883. {...formItemLayout}
  884. label={
  885. <span>
  886. <strong style={{ color: "#f00" }}>*</strong>特批
  887. </span>
  888. }
  889. >
  890. <span>{this.state.approval === 0 ? "否" : "是"}</span>
  891. </FormItem>
  892. </div>
  893. <hr
  894. style={{
  895. border: "1px dashed #aaa",
  896. width: "90%",
  897. margin: "auto",
  898. }}
  899. />
  900. <div style={{ marginTop: "13px", marginLeft: "16px" }}>
  901. <span style={{ fontSize: "14px" }}>发票内容</span>
  902. </div>
  903. <div className="clearfix">
  904. <FormItem
  905. className="half-item"
  906. {...formItemLayout}
  907. label={
  908. <span>
  909. <strong style={{ color: "#f00" }}>*</strong>发票类型
  910. </span>
  911. }
  912. >
  913. <span>
  914. {this.state.invoiceType === 0
  915. ? "增值税专用发票"
  916. : this.state.invoiceType === 1
  917. ? "增值税普通发票"
  918. : "其他"}
  919. </span>
  920. </FormItem>
  921. </div>
  922. <div className="clearfix">
  923. <FormItem
  924. className="half-item"
  925. {...formItemLayout}
  926. label={
  927. <span>
  928. <strong style={{ color: "#f00" }}>*</strong>单位名称
  929. </span>
  930. }
  931. >
  932. <span>{this.state.unitName}</span>
  933. </FormItem>
  934. <FormItem
  935. className="half-item"
  936. {...formItemLayout}
  937. label={
  938. <span>
  939. <strong style={{ color: "#f00" }}>*</strong>税号
  940. </span>
  941. }
  942. >
  943. <span>{this.state.taxNumber}</span>
  944. </FormItem>
  945. <FormItem
  946. className="half-item"
  947. {...formItemLayout}
  948. label={
  949. <span>
  950. <strong style={{ color: "#f00" }}>*</strong>
  951. 开票金额(万元)
  952. </span>
  953. }
  954. >
  955. <span>{this.state.amount}</span>
  956. </FormItem>
  957. <FormItem
  958. className="half-item"
  959. {...formItemLayout}
  960. label={
  961. <span>
  962. <strong style={{ color: "#f00" }}>*</strong>
  963. 开户行银行账号
  964. </span>
  965. }
  966. >
  967. <span>{this.state.banks}</span>
  968. </FormItem>
  969. <FormItem
  970. className="half-item"
  971. {...formItemLayout}
  972. label={
  973. <span>
  974. <strong style={{ color: "#f00" }}>*</strong>
  975. 开票内容及说明
  976. </span>
  977. }
  978. >
  979. <span>{this.state.content}</span>
  980. </FormItem>
  981. <FormItem
  982. className="half-item"
  983. {...formItemLayout}
  984. label={
  985. <span>
  986. <strong style={{ color: "#f00" }}>*</strong>单位地址
  987. </span>
  988. }
  989. >
  990. <span>{this.state.unitAddress}</span>
  991. </FormItem>
  992. <FormItem
  993. className="half-item"
  994. {...formItemLayout}
  995. label="备注"
  996. >
  997. <span>{this.state.invoiceRemarks}</span>
  998. </FormItem>
  999. <FormItem
  1000. className="half-item"
  1001. {...formItemLayout}
  1002. label={
  1003. <span>
  1004. <strong style={{ color: "#f00" }}>*</strong>单位电话
  1005. </span>
  1006. }
  1007. >
  1008. <span>{this.state.unitMobile}</span>
  1009. </FormItem>
  1010. </div>
  1011. <div className="clearfix">
  1012. <FormItem
  1013. labelCol={{ span: 4 }}
  1014. wrapperCol={{ span: 18 }}
  1015. label={
  1016. <span>
  1017. <strong style={{ color: "#f00" }}>*</strong>附件
  1018. </span>
  1019. }
  1020. >
  1021. <Upload
  1022. className="demandDetailShow-upload"
  1023. listType="picture-card"
  1024. fileList={this.state.orgCodeUrl}
  1025. onPreview={(file) => {
  1026. this.setState({
  1027. previewImage: file.url || file.thumbUrl,
  1028. previewVisible: true,
  1029. });
  1030. }}
  1031. ></Upload>
  1032. <Modal
  1033. maskClosable={false}
  1034. footer={null}
  1035. visible={this.state.previewVisible}
  1036. onCancel={() => {
  1037. this.setState({ previewVisible: false });
  1038. }}
  1039. >
  1040. <img
  1041. alt=""
  1042. style={{ width: "100%" }}
  1043. src={this.state.previewImage || ""}
  1044. />
  1045. </Modal>
  1046. </FormItem>
  1047. </div>
  1048. <hr
  1049. style={{
  1050. border: "1px dashed #aaa",
  1051. width: "90%",
  1052. margin: "auto",
  1053. }}
  1054. />
  1055. <div className="clearfix" style={{ marginTop: "10px" }}>
  1056. <FormItem
  1057. className="half-item"
  1058. {...formItemLayout}
  1059. label="发票是否邮寄:"
  1060. >
  1061. <span>{this.state.post === 0 ? "是" : "否"}</span>
  1062. </FormItem>
  1063. </div>
  1064. {this.state.post === 0 ? (
  1065. <div>
  1066. <div className="clearfix">
  1067. <FormItem
  1068. className="half-item"
  1069. {...formItemLayout}
  1070. label="收信人姓名"
  1071. >
  1072. <span>{this.state.addressee}</span>
  1073. </FormItem>
  1074. <FormItem
  1075. className="half-item"
  1076. {...formItemLayout}
  1077. label="电话"
  1078. >
  1079. <span>{this.state.addresseeMobile}</span>
  1080. </FormItem>
  1081. </div>
  1082. <div className="clearfix">
  1083. <FormItem
  1084. className="half-item"
  1085. {...formItemLayout}
  1086. label="省-市-区"
  1087. >
  1088. <span>
  1089. {getprovince(this.state.addresseeProvince)}/
  1090. {getprovince(this.state.addresseeCity)}/
  1091. {getprovince(this.state.addresseeArea)}
  1092. </span>
  1093. </FormItem>
  1094. </div>
  1095. <div className="clearfix">
  1096. <FormItem
  1097. className="half-item"
  1098. {...formItemLayout}
  1099. label="详细地址"
  1100. >
  1101. <span>{this.state.recipientAddress}</span>
  1102. </FormItem>
  1103. </div>
  1104. </div>
  1105. ) : (
  1106. ""
  1107. )}
  1108. {/* <FormItem
  1109. className="half-item"
  1110. {...formItemLayout}
  1111. label={
  1112. <span>
  1113. <strong style={{ color: "#f00" }}>*</strong>开票金额总计
  1114. </span>
  1115. }
  1116. >
  1117. <span>{this.state.alreadyAmount}万元</span>
  1118. </FormItem> */}
  1119. </div>
  1120. </Spin>
  1121. </Form>
  1122. </Modal>
  1123. <Modal
  1124. visible={this.state.bvisible}
  1125. footer=""
  1126. title="开票历史记录"
  1127. className="admin-desc-content"
  1128. width="1200px"
  1129. onCancel={this.inRecordCanl}
  1130. >
  1131. <Spin spinning={this.state.loading}>
  1132. <div className="patent-table">
  1133. <Table
  1134. columns={this.state.columnsDate}
  1135. dataSource={this.state.recordData}
  1136. pagination={false}
  1137. bordered
  1138. size="small"
  1139. />
  1140. <div className="clearfix" style={{ marginTop: "20px" }}>
  1141. <FormItem
  1142. className="half-item"
  1143. {...formItemLayout}
  1144. label={<span style={{ fontSize: "14px" }}>开票总计</span>}
  1145. >
  1146. <span>{this.state.sum + "(万元)"}</span>
  1147. </FormItem>
  1148. </div>
  1149. </div>
  1150. </Spin>
  1151. </Modal>
  1152. <OrderDesc
  1153. data={this.state.RowData}
  1154. showDesc={this.state.showDesc}
  1155. closeDesc={this.closeDesc.bind(this)}
  1156. />
  1157. </div>
  1158. );
  1159. },
  1160. });
  1161. export default invoiceApplyListWai;