inSpecial.jsx 30 KB

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