inSpecial.jsx 29 KB

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