inSpecial.jsx 29 KB

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