invoiceApplyListWai.jsx 35 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190
  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 (data) {
  471. this.setState({
  472. loading: false,
  473. });
  474. if (data.error && data.error.length) {
  475. message.warning(data.error[0].message);
  476. } else {
  477. if (this.state.examine === 2) {
  478. message.success("通过成功!");
  479. // this.state.pagination.current
  480. this.loadData();
  481. } else {
  482. message.success("拒绝成功!");
  483. this.resetReason();
  484. this.rejectCancels();
  485. this.loadData();
  486. }
  487. }
  488. }.bind(this),
  489. }).always(
  490. function () {
  491. this.setState({
  492. loading: false,
  493. });
  494. }.bind(this)
  495. );
  496. },
  497. //重置拒绝理由
  498. resetReason() {
  499. this.setState({
  500. reason: "",
  501. });
  502. },
  503. sende(record) {
  504. this.loadSend(record);
  505. },
  506. commit() {
  507. this.loadSend();
  508. this.setState({
  509. avisible: false,
  510. });
  511. },
  512. visit(index) {
  513. this.setState(
  514. {
  515. id: this.state.dataSource[index].id,
  516. avisible: true,
  517. },
  518. () => {
  519. this.invoiceData();
  520. }
  521. );
  522. },
  523. visitCancels() {
  524. this.setState({
  525. avisible: false,
  526. });
  527. },
  528. reject(record) {
  529. this.setState({
  530. visibleR: true,
  531. id: record.id,
  532. });
  533. },
  534. rejectCancels() {
  535. this.setState({
  536. visibleR: false,
  537. });
  538. },
  539. inRecordData() {
  540. this.setState({
  541. loading: true,
  542. });
  543. $.ajax({
  544. method: "get",
  545. dataType: "json",
  546. crossDomain: false,
  547. url:
  548. globalConfig.context +
  549. "/api/admin/orderInvoice/salesmanOrderInvoiceList",
  550. data: {
  551. orderNo: this.state.orderNo2,
  552. },
  553. success: function (data) {
  554. let theArr = [];
  555. let sum = 0;
  556. if (!data.data) {
  557. if (data.error && data.error.length) {
  558. message.warning(data.error[0].message);
  559. }
  560. } else {
  561. for (let i = 0; i < data.data.list.length; i++) {
  562. let thisdata = data.data.list[i];
  563. sum += parseFloat(thisdata.amount);
  564. theArr.push({
  565. id: thisdata.id,
  566. orderNo: thisdata.orderNo, //订单编号
  567. amount: thisdata.amount, //签单金额
  568. createTime: thisdata.createTime, //流程状态
  569. status: thisdata.status, //结算状态
  570. rejectReason: thisdata.rejectReason,
  571. approval: thisdata.approval, //0非特批 1待审核 2审核通过
  572. examineName: !thisdata.examineName ? undefined : thisdata.examineName,
  573. });
  574. }
  575. }
  576. this.setState({
  577. recordData: theArr,
  578. sum: sum.toFixed(6),
  579. });
  580. }.bind(this),
  581. }).done(
  582. function () {
  583. this.setState({
  584. loading: false,
  585. });
  586. }.bind(this)
  587. );
  588. },
  589. inRecord(record) {
  590. this.setState(
  591. {
  592. bvisible: true,
  593. orderNo2: record.orderNo,
  594. },
  595. () => {
  596. this.inRecordData();
  597. }
  598. );
  599. },
  600. inRecordCanl() {
  601. this.setState({
  602. bvisible: false,
  603. });
  604. },
  605. search() {
  606. this.loadData();
  607. },
  608. componentWillMount() {
  609. this.loadData();
  610. },
  611. exportExec() {
  612. message.config({
  613. duration: 20,
  614. });
  615. let loading = message.loading("下载中...");
  616. this.setState({
  617. exportPendingLoading: true,
  618. });
  619. $.ajax({
  620. method: "get",
  621. dataType: "json",
  622. crossDomain: false,
  623. url: "/api/admin/orderInvoice/financeOrderInvoiceList/export",
  624. data: {
  625. name: this.state.nameSearch, //客户名称
  626. orderNo: this.state.orderNoSearch,
  627. deps: this.state.departmenttList,
  628. type: 1,
  629. contractNo: this.state.contractNo, // 合同编号
  630. userName: this.state.userName, // 客户名称
  631. invoiceType: this.state.invoiceType, // 开票状态 1处理中 2通过 3驳回
  632. startTime: this.state.releaseDate[0],
  633. endTime: this.state.releaseDate[1],
  634. },
  635. success: function (data) {
  636. if (data.error.length === 0) {
  637. this.download(data.data);
  638. } else {
  639. message.warning(data.error[0].message);
  640. }
  641. }.bind(this),
  642. }).always(
  643. function () {
  644. loading();
  645. this.setState({
  646. exportPendingLoading: false,
  647. });
  648. }.bind(this)
  649. );
  650. },
  651. download(fileName) {
  652. window.location.href =
  653. globalConfig.context + "/open/download?fileName=" + fileName;
  654. },
  655. reset() {
  656. this.state.invoiceType = undefined;
  657. this.state.userName = undefined;
  658. this.state.contractNo = undefined;
  659. this.state.nameSearch = undefined;
  660. this.state.releaseDate = [];
  661. this.state.orderNoSearch = undefined;
  662. this.state.processStatus = undefined;
  663. this.state.departmenttList = undefined;
  664. this.Cascaders.empty();
  665. this.loadData();
  666. },
  667. changeList(arr) {
  668. const newArr = [];
  669. this.state.columns.forEach((item) => {
  670. arr.forEach((val) => {
  671. if (val === item.title) {
  672. newArr.push(item);
  673. }
  674. });
  675. });
  676. this.setState({
  677. changeList: newArr,
  678. });
  679. },
  680. render() {
  681. const newShiroList = window.adminData.shiroList == "" ? [] : window.adminData.shiroList.split(",");
  682. const formItemLayout = {
  683. labelCol: { span: 8 },
  684. wrapperCol: { span: 14 },
  685. };
  686. return (
  687. <div className="user-content">
  688. <div className="content-title" style={{ marginBottom: 10 }}>
  689. <span style={{ fontWeight: 900, fontSize: 16 }}>省外开票审核</span>
  690. </div>
  691. <Tabs defaultActiveKey="1" className="test">
  692. <TabPane tab="搜索" key="1">
  693. <div className="user-search" style={{ padding: "0 10px" }}>
  694. <Input
  695. placeholder="订单编号"
  696. value={this.state.orderNoSearch}
  697. onChange={(e) => {
  698. this.setState({ orderNoSearch: e.target.value });
  699. }}
  700. />
  701. <Input
  702. placeholder="合同编号"
  703. value={this.state.contractNo}
  704. onChange={e => {
  705. this.setState({ contractNo: e.target.value });
  706. }}
  707. />
  708. <Input
  709. placeholder="客户名称"
  710. value={this.state.userName}
  711. onChange={e => {
  712. this.setState({ userName: e.target.value });
  713. }}
  714. />
  715. <Input
  716. placeholder="营销员名称"
  717. value={this.state.nameSearch}
  718. onChange={e => {
  719. this.setState({ nameSearch: e.target.value });
  720. }}
  721. />
  722. <Select placeholder="开票状态"
  723. style={{ width: 120, }}
  724. value={this.state.invoiceType}
  725. onChange={(e) => { this.setState({ invoiceType: e }) }}
  726. >
  727. <Select.Option value="1" >处理中</Select.Option>
  728. <Select.Option value="2" >通过</Select.Option>
  729. <Select.Option value="3" >驳回</Select.Option>
  730. </Select>
  731. <Cascaders
  732. ref={node => this.Cascaders = node}
  733. placeholder="订单部门"
  734. id="id"
  735. name="name"
  736. children="list"
  737. height={28}
  738. onSel={(e) => {
  739. this.setState({
  740. departmenttList: JSON.stringify(e),
  741. });
  742. }}
  743. />
  744. {/* <DepartmentList
  745. value={this.state.departmenttList}
  746. onChange={(e) => {
  747. this.setState({ departmenttList: e });
  748. }}
  749. /> */}
  750. <span style={{ marginRight: "10px" }}>申请时间 :</span>
  751. <RangePicker
  752. value={[
  753. this.state.releaseDate[0]
  754. ? moment(this.state.releaseDate[0])
  755. : null,
  756. this.state.releaseDate[1]
  757. ? moment(this.state.releaseDate[1])
  758. : null,
  759. ]}
  760. onChange={(data, dataString) => {
  761. this.setState({ releaseDate: dataString });
  762. }}
  763. />
  764. <Button
  765. type="primary"
  766. onClick={this.search}
  767. style={{ marginLeft: 10 }}
  768. >
  769. 搜索
  770. </Button>
  771. <Button onClick={this.reset}>重置</Button>
  772. </div>
  773. </TabPane>
  774. <TabPane tab="更改表格显示数据" key="2">
  775. <div style={{ marginLeft: 10 }}>
  776. <ChooseList
  777. columns={this.state.columns}
  778. changeFn={this.changeList}
  779. changeList={this.state.changeList}
  780. top={55}
  781. margin={11}
  782. />
  783. </div>
  784. </TabPane>
  785. {/* 管理员才能导出 */}
  786. <TabPane tab="导出" key="3" disabled={!newShiroList.includes("99")}>
  787. <div>
  788. <Button
  789. loading={this.state.exportPendingLoading}
  790. onClick={() => { this.exportExec() }}
  791. style={{ margin: 10 }}
  792. >
  793. 导出excel
  794. </Button>
  795. </div>
  796. </TabPane>
  797. </Tabs>
  798. <div className="patent-table">
  799. <Spin spinning={this.state.loading}>
  800. <Table
  801. columns={
  802. this.state.changeList
  803. ? this.state.changeList
  804. : this.state.columns
  805. }
  806. scroll={{ x: 1500, y: 0 }}
  807. onRowClick={this.tableRowClick}
  808. dataSource={this.state.dataSource}
  809. pagination={this.state.pagination}
  810. bordered
  811. size="small"
  812. />
  813. </Spin>
  814. </div>
  815. <Modal
  816. visible={this.state.visibleR}
  817. className="admin-desc-content"
  818. footer=""
  819. title="拒绝理由"
  820. width="400px"
  821. onCancel={this.rejectCancels}
  822. >
  823. <Input.TextArea
  824. placeholder="请输入拒绝理由"
  825. rows={4}
  826. value={this.state.reason}
  827. onChange={(e) => {
  828. this.setState({ reason: e.target.value });
  829. }}
  830. />
  831. <div className="clearfix" style={{ marginTop: "20px" }}>
  832. <Button
  833. loading={this.state.loading}
  834. type="primary"
  835. onClick={(e) => {
  836. e.stopPropagation();
  837. this.commit();
  838. }}
  839. style={{ float: "right" }}
  840. >
  841. 提交
  842. </Button>
  843. </div>
  844. </Modal>
  845. <Modal
  846. className="admin-desc-content"
  847. footer=""
  848. title="开具发票申请单"
  849. width="1200px"
  850. visible={this.state.avisible}
  851. onOk={this.visitOks}
  852. onCancel={this.visitCancels}
  853. >
  854. <Form
  855. layout="horizontal"
  856. id="demand-form"
  857. style={{ paddingBottom: "40px" }}
  858. >
  859. <Spin spinning={this.state.loading}>
  860. <div className="clearfix">
  861. <div className="clearfix">
  862. <FormItem
  863. className="half-item"
  864. {...formItemLayout}
  865. label="合同编号"
  866. >
  867. <span>{this.state.contractNo}</span>
  868. </FormItem>
  869. <FormItem
  870. className="half-item"
  871. {...formItemLayout}
  872. label="备注"
  873. >
  874. <span>{this.state.remarks}</span>
  875. </FormItem>
  876. </div>
  877. <div className="clearfix">
  878. <FormItem
  879. className="half-item"
  880. {...formItemLayout}
  881. label={
  882. <span>
  883. <strong style={{ color: "#f00" }}>*</strong>省内/外
  884. </span>
  885. }
  886. >
  887. <span>{getProvinceA(this.state.type)}</span>
  888. </FormItem>
  889. <FormItem
  890. className="half-item"
  891. {...formItemLayout}
  892. label={
  893. <span>
  894. <strong style={{ color: "#f00" }}>*</strong>特批
  895. </span>
  896. }
  897. >
  898. <span>{this.state.approval === 0 ? "否" : "是"}</span>
  899. </FormItem>
  900. </div>
  901. <hr
  902. style={{
  903. border: "1px dashed #aaa",
  904. width: "90%",
  905. margin: "auto",
  906. }}
  907. />
  908. <div style={{ marginTop: "13px", marginLeft: "16px" }}>
  909. <span style={{ fontSize: "14px" }}>发票内容</span>
  910. </div>
  911. <div className="clearfix">
  912. <FormItem
  913. className="half-item"
  914. {...formItemLayout}
  915. label={
  916. <span>
  917. <strong style={{ color: "#f00" }}>*</strong>发票类型
  918. </span>
  919. }
  920. >
  921. <span>
  922. {this.state.invoiceType === 0
  923. ? "增值税专用发票"
  924. : this.state.invoiceType === 1
  925. ? "增值税普通发票"
  926. : "其他"}
  927. </span>
  928. </FormItem>
  929. </div>
  930. <div className="clearfix">
  931. <FormItem
  932. className="half-item"
  933. {...formItemLayout}
  934. label={
  935. <span>
  936. <strong style={{ color: "#f00" }}>*</strong>单位名称
  937. </span>
  938. }
  939. >
  940. <span>{this.state.unitName}</span>
  941. </FormItem>
  942. <FormItem
  943. className="half-item"
  944. {...formItemLayout}
  945. label={
  946. <span>
  947. <strong style={{ color: "#f00" }}>*</strong>税号
  948. </span>
  949. }
  950. >
  951. <span>{this.state.taxNumber}</span>
  952. </FormItem>
  953. <FormItem
  954. className="half-item"
  955. {...formItemLayout}
  956. label={
  957. <span>
  958. <strong style={{ color: "#f00" }}>*</strong>
  959. 开票金额(万元)
  960. </span>
  961. }
  962. >
  963. <span>{this.state.amount}</span>
  964. </FormItem>
  965. <FormItem
  966. className="half-item"
  967. {...formItemLayout}
  968. label={
  969. <span>
  970. <strong style={{ color: "#f00" }}>*</strong>
  971. 开户行银行账号
  972. </span>
  973. }
  974. >
  975. <span>{this.state.banks}</span>
  976. </FormItem>
  977. <FormItem
  978. className="half-item"
  979. {...formItemLayout}
  980. label={
  981. <span>
  982. <strong style={{ color: "#f00" }}>*</strong>
  983. 开票内容及说明
  984. </span>
  985. }
  986. >
  987. <span>{this.state.content}</span>
  988. </FormItem>
  989. <FormItem
  990. className="half-item"
  991. {...formItemLayout}
  992. label={
  993. <span>
  994. <strong style={{ color: "#f00" }}>*</strong>单位地址
  995. </span>
  996. }
  997. >
  998. <span>{this.state.unitAddress}</span>
  999. </FormItem>
  1000. <FormItem
  1001. className="half-item"
  1002. {...formItemLayout}
  1003. label="备注"
  1004. >
  1005. <span>{this.state.invoiceRemarks}</span>
  1006. </FormItem>
  1007. <FormItem
  1008. className="half-item"
  1009. {...formItemLayout}
  1010. label={
  1011. <span>
  1012. <strong style={{ color: "#f00" }}>*</strong>单位电话
  1013. </span>
  1014. }
  1015. >
  1016. <span>{this.state.unitMobile}</span>
  1017. </FormItem>
  1018. </div>
  1019. <div className="clearfix">
  1020. <FormItem
  1021. labelCol={{ span: 4 }}
  1022. wrapperCol={{ span: 18 }}
  1023. label={
  1024. <span>
  1025. <strong style={{ color: "#f00" }}>*</strong>附件
  1026. </span>
  1027. }
  1028. >
  1029. <Upload
  1030. className="demandDetailShow-upload"
  1031. listType="picture-card"
  1032. fileList={this.state.orgCodeUrl}
  1033. onPreview={(file) => {
  1034. this.setState({
  1035. previewImage: file.url || file.thumbUrl,
  1036. previewVisible: true,
  1037. });
  1038. }}
  1039. ></Upload>
  1040. <Modal
  1041. maskClosable={false}
  1042. footer={null}
  1043. visible={this.state.previewVisible}
  1044. onCancel={() => {
  1045. this.setState({ previewVisible: false });
  1046. }}
  1047. >
  1048. <img
  1049. alt=""
  1050. style={{ width: "100%" }}
  1051. src={this.state.previewImage || ""}
  1052. />
  1053. </Modal>
  1054. </FormItem>
  1055. </div>
  1056. <hr
  1057. style={{
  1058. border: "1px dashed #aaa",
  1059. width: "90%",
  1060. margin: "auto",
  1061. }}
  1062. />
  1063. <div className="clearfix" style={{ marginTop: "10px" }}>
  1064. <FormItem
  1065. className="half-item"
  1066. {...formItemLayout}
  1067. label="发票是否邮寄:"
  1068. >
  1069. <span>{this.state.post === 0 ? "是" : "否"}</span>
  1070. </FormItem>
  1071. </div>
  1072. {this.state.post === 0 ? (
  1073. <div>
  1074. <div className="clearfix">
  1075. <FormItem
  1076. className="half-item"
  1077. {...formItemLayout}
  1078. label="收信人姓名"
  1079. >
  1080. <span>{this.state.addressee}</span>
  1081. </FormItem>
  1082. <FormItem
  1083. className="half-item"
  1084. {...formItemLayout}
  1085. label="电话"
  1086. >
  1087. <span>{this.state.addresseeMobile}</span>
  1088. </FormItem>
  1089. </div>
  1090. <div className="clearfix">
  1091. <FormItem
  1092. className="half-item"
  1093. {...formItemLayout}
  1094. label="省-市-区"
  1095. >
  1096. <span>
  1097. {getprovince(this.state.addresseeProvince)}/
  1098. {getprovince(this.state.addresseeCity)}/
  1099. {getprovince(this.state.addresseeArea)}
  1100. </span>
  1101. </FormItem>
  1102. </div>
  1103. <div className="clearfix">
  1104. <FormItem
  1105. className="half-item"
  1106. {...formItemLayout}
  1107. label="详细地址"
  1108. >
  1109. <span>{this.state.recipientAddress}</span>
  1110. </FormItem>
  1111. </div>
  1112. </div>
  1113. ) : (
  1114. ""
  1115. )}
  1116. {/* <FormItem
  1117. className="half-item"
  1118. {...formItemLayout}
  1119. label={
  1120. <span>
  1121. <strong style={{ color: "#f00" }}>*</strong>开票金额总计
  1122. </span>
  1123. }
  1124. >
  1125. <span>{this.state.alreadyAmount}万元</span>
  1126. </FormItem> */}
  1127. </div>
  1128. </Spin>
  1129. </Form>
  1130. </Modal>
  1131. <Modal
  1132. visible={this.state.bvisible}
  1133. footer=""
  1134. title="开票历史记录"
  1135. className="admin-desc-content"
  1136. width="1200px"
  1137. onCancel={this.inRecordCanl}
  1138. >
  1139. <Spin spinning={this.state.loading}>
  1140. <div className="patent-table">
  1141. <Table
  1142. columns={this.state.columnsDate}
  1143. dataSource={this.state.recordData}
  1144. pagination={false}
  1145. bordered
  1146. size="small"
  1147. />
  1148. <div className="clearfix" style={{ marginTop: "20px" }}>
  1149. <FormItem
  1150. className="half-item"
  1151. {...formItemLayout}
  1152. label={<span style={{ fontSize: "14px" }}>开票总计</span>}
  1153. >
  1154. <span>{this.state.sum + "(万元)"}</span>
  1155. </FormItem>
  1156. </div>
  1157. </div>
  1158. </Spin>
  1159. </Modal>
  1160. <OrderDesc
  1161. data={this.state.RowData}
  1162. showDesc={this.state.showDesc}
  1163. closeDesc={this.closeDesc.bind(this)}
  1164. />
  1165. </div>
  1166. );
  1167. },
  1168. });
  1169. export default invoiceApplyListWai;