invoiceApplyListQuery.jsx 33 KB

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