invoiceApplyListQuery.jsx 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140
  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. <strong style={{ color: "#f00" }}>*</strong>
  918. 开户行银行账号
  919. </span>
  920. }
  921. >
  922. <span>{this.state.banks}</span>
  923. </FormItem>
  924. <FormItem
  925. className="half-item"
  926. {...formItemLayout}
  927. label={
  928. <span>
  929. <strong style={{ color: "#f00" }}>*</strong>
  930. 开票内容及说明
  931. </span>
  932. }
  933. >
  934. <span>{this.state.content}</span>
  935. </FormItem>
  936. <FormItem
  937. className="half-item"
  938. {...formItemLayout}
  939. label={
  940. <span>
  941. <strong style={{ color: "#f00" }}>*</strong>单位地址
  942. </span>
  943. }
  944. >
  945. <span>{this.state.unitAddress}</span>
  946. </FormItem>
  947. <FormItem
  948. className="half-item"
  949. {...formItemLayout}
  950. label="备注"
  951. >
  952. <span>{this.state.invoiceRemarks}</span>
  953. </FormItem>
  954. <FormItem
  955. className="half-item"
  956. {...formItemLayout}
  957. label={
  958. <span>
  959. <strong style={{ color: "#f00" }}>*</strong>单位电话
  960. </span>
  961. }
  962. >
  963. <span>{this.state.unitMobile}</span>
  964. </FormItem>
  965. </div>
  966. <div className="clearfix">
  967. <FormItem
  968. labelCol={{ span: 4 }}
  969. wrapperCol={{ span: 18 }}
  970. label={
  971. <span>
  972. <strong style={{ color: "#f00" }}>*</strong>附件
  973. </span>
  974. }
  975. >
  976. <Upload
  977. className="demandDetailShow-upload"
  978. listType="picture-card"
  979. fileList={this.state.orgCodeUrl}
  980. onPreview={file => {
  981. this.setState({
  982. previewImage: file.url || file.thumbUrl,
  983. previewVisible: true
  984. });
  985. }}
  986. ></Upload>
  987. <Modal
  988. maskClosable={false}
  989. footer={null}
  990. visible={this.state.previewVisible}
  991. onCancel={() => {
  992. this.setState({ previewVisible: false });
  993. }}
  994. >
  995. <img
  996. alt=""
  997. style={{ width: "100%" }}
  998. src={this.state.previewImage || ""}
  999. />
  1000. </Modal>
  1001. </FormItem>
  1002. </div>
  1003. <hr
  1004. style={{
  1005. border: "1px dashed #aaa",
  1006. width: "90%",
  1007. margin: "auto"
  1008. }}
  1009. />
  1010. <div className="clearfix" style={{ marginTop: "10px" }}>
  1011. <FormItem
  1012. className="half-item"
  1013. {...formItemLayout}
  1014. label="发票是否邮寄:"
  1015. >
  1016. <span>{this.state.post === 0 ? "是" : "否"}</span>
  1017. </FormItem>
  1018. </div>
  1019. {this.state.post === 0 ? (
  1020. <div>
  1021. <div className="clearfix">
  1022. <FormItem
  1023. className="half-item"
  1024. {...formItemLayout}
  1025. label="收信人姓名"
  1026. >
  1027. <span>{this.state.addressee}</span>
  1028. </FormItem>
  1029. <FormItem
  1030. className="half-item"
  1031. {...formItemLayout}
  1032. label="电话"
  1033. >
  1034. <span>{this.state.addresseeMobile}</span>
  1035. </FormItem>
  1036. </div>
  1037. <div className="clearfix">
  1038. <FormItem
  1039. className="half-item"
  1040. {...formItemLayout}
  1041. label="省-市-区"
  1042. >
  1043. <span>
  1044. {getprovince(this.state.addresseeProvince)}/
  1045. {getprovince(this.state.addresseeCity)}/
  1046. {getprovince(this.state.addresseeArea)}
  1047. </span>
  1048. </FormItem>
  1049. </div>
  1050. <div className="clearfix">
  1051. <FormItem
  1052. className="half-item"
  1053. {...formItemLayout}
  1054. label="详细地址"
  1055. >
  1056. <span>{this.state.recipientAddress}</span>
  1057. </FormItem>
  1058. </div>
  1059. </div>
  1060. ) : (
  1061. ""
  1062. )}
  1063. {/* <FormItem
  1064. className="half-item"
  1065. {...formItemLayout}
  1066. label={
  1067. <span>
  1068. <strong style={{ color: "#f00" }}>*</strong>开票金额总计
  1069. </span>
  1070. }
  1071. >
  1072. <span>{this.state.alreadyAmount}万元</span>
  1073. </FormItem> */}
  1074. </div>
  1075. </Spin>
  1076. </Form>
  1077. </Modal>
  1078. <Modal
  1079. visible={this.state.bvisible}
  1080. footer=""
  1081. title="开票历史记录"
  1082. className="admin-desc-content"
  1083. width="1200px"
  1084. onCancel={this.inRecordCanl}
  1085. >
  1086. <Spin spinning={this.state.loading}>
  1087. <div className="patent-table">
  1088. <Table
  1089. columns={this.state.columnsDate}
  1090. dataSource={this.state.recordData}
  1091. pagination={false}
  1092. bordered
  1093. size="small"
  1094. />
  1095. <div className="clearfix" style={{ marginTop: "20px" }}>
  1096. <FormItem
  1097. className="half-item"
  1098. {...formItemLayout}
  1099. label={<span style={{ fontSize: "14px" }}>开票总计</span>}
  1100. >
  1101. <span>{this.state.sum + "(万元)"}</span>
  1102. </FormItem>
  1103. </div>
  1104. </div>
  1105. </Spin>
  1106. </Modal>
  1107. <OrderDesc
  1108. data={this.state.RowData}
  1109. showDesc={this.state.showDesc}
  1110. closeDesc={this.closeDesc.bind(this)}
  1111. />
  1112. </div>
  1113. );
  1114. }
  1115. });
  1116. export default invoiceApplyListQuery;