inSpecial.jsx 30 KB

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