invoiceApplyListWai.jsx 35 KB

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