outSpecial.jsx 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031
  1. import React from "react";
  2. import $ from "jquery/src/ajax";
  3. import "./public.less";
  4. import {
  5. Form,
  6. Button,
  7. Input,
  8. Spin,
  9. Table,
  10. message,
  11. Modal,
  12. Upload,
  13. Tabs,
  14. Popconfirm,
  15. Tooltip,
  16. } from "antd";
  17. import {
  18. getProvinceA,
  19. getInvoiceStatus,
  20. getprovince,
  21. getStatus,
  22. getProcessStatus,
  23. getPeople,
  24. splitUrl,
  25. } from "@/tools";
  26. const FormItem = Form.Item;
  27. import OrderDesc from "../orderDetail/orderDesc";
  28. import { ChooseList } from "../../order/orderNew/chooseList";
  29. import { getProjectName } from "../../../tools";
  30. import LogPopup from "../../../common/logPopup";
  31. const outSpecial = React.createClass({
  32. loadData(pageNo) {
  33. this.state.data = [];
  34. this.setState({
  35. loading: true,
  36. });
  37. $.ajax({
  38. method: "get",
  39. dataType: "json",
  40. crossDomain: false,
  41. url:
  42. globalConfig.context +
  43. "/api/admin/orderInvoice/approvalOrderInvoiceList",
  44. data: {
  45. pageNo: pageNo || 1,
  46. pageSize: this.state.pagination.pageSize,
  47. name: this.state.nameSearch, //客户名称
  48. orderNo: this.state.orderNoSearch,
  49. orderDep: this.state.departmenttList,
  50. type: 1,
  51. },
  52. success: function (data) {
  53. let theArr = [];
  54. if (!data.data || !data.data.list) {
  55. if (data.error && data.error.length) {
  56. message.warning(data.error[0].message);
  57. }
  58. } else {
  59. for (let i = 0; i < data.data.list.length; i++) {
  60. let thisdata = data.data.list[i];
  61. theArr.push({
  62. key: i,
  63. id: thisdata.id,
  64. status: thisdata.status,
  65. unitName: thisdata.unitName,
  66. orderNo: thisdata.orderno,
  67. name: thisdata.name,
  68. projectStatus: thisdata.projectStatus,
  69. processStatus: thisdata.processStatus,
  70. amount: thisdata.amount,
  71. sumAmount: thisdata.sumAmount,
  72. createTime: thisdata.createTime
  73. ? new Date(thisdata.createTime).toLocaleString()
  74. : "",
  75. settlementAmount: thisdata.settlementAmount,
  76. notAmount: thisdata.notAmount,
  77. approval: thisdata.approval,
  78. });
  79. }
  80. }
  81. this.state.pagination.current = data.data.pageNo;
  82. this.state.pagination.total = data.data.totalCount;
  83. if (data.data && data.data.list && !data.data.list.length) {
  84. this.state.pagination.current = 0;
  85. this.state.pagination.total = 0;
  86. }
  87. this.setState({
  88. totalPage: data.data.totalPage,
  89. dataSource: theArr,
  90. pagination: this.state.pagination,
  91. });
  92. }.bind(this),
  93. }).always(
  94. function () {
  95. this.setState({
  96. loading: false,
  97. });
  98. }.bind(this)
  99. );
  100. },
  101. invoiceData() {
  102. this.setState({
  103. loading: true,
  104. });
  105. $.ajax({
  106. method: "get",
  107. dataType: "json",
  108. crossDomain: false,
  109. url:
  110. globalConfig.context + "/api/admin/orderInvoice/selectByIdOrderInvoice",
  111. data: {
  112. id: this.state.id,
  113. },
  114. success: function (data) {
  115. let thisdata = data.data;
  116. this.setState({
  117. orderNo: thisdata.orderNo,
  118. type: thisdata.type,
  119. status: thisdata.status,
  120. remarks: thisdata.remarks,
  121. invoiceType: thisdata.invoiceType,
  122. unitName: thisdata.unitName,
  123. taxNumber: thisdata.taxNumber,
  124. amount: thisdata.amount,
  125. banks: thisdata.banks,
  126. content: thisdata.content,
  127. unitAddress: thisdata.unitAddress,
  128. invoiceRemarks: thisdata.invoiceRemarks,
  129. unitMobile: thisdata.unitMobile,
  130. contractNo: thisdata.contractNo,
  131. post: thisdata.post,
  132. addressee: thisdata.addressee,
  133. addresseeMobile: thisdata.addresseeMobile,
  134. addresseeProvince: thisdata.addresseeProvince,
  135. addresseeCity: thisdata.addresseeCity,
  136. addresseeArea: thisdata.addresseeArea,
  137. alreadyAmount: thisdata.alreadyAmount,
  138. recipientAddress: thisdata.recipientAddress,
  139. orgCodeUrl: thisdata.voucherUrl
  140. ? splitUrl(
  141. thisdata.voucherUrl,
  142. ",",
  143. globalConfig.avatarHost + "/upload"
  144. )
  145. : [],
  146. });
  147. }.bind(this),
  148. }).done(
  149. function () {
  150. this.setState({
  151. loading: false,
  152. });
  153. }.bind(this)
  154. );
  155. },
  156. getInitialState() {
  157. return {
  158. searchMore: true,
  159. assignVisible: false,
  160. releaseDate: [],
  161. totalPage: 0,
  162. boHuivisible: false,
  163. selectedRowKeys: [],
  164. selectedRows: [],
  165. contractNo: "",
  166. loading: false,
  167. reason: "",
  168. foo: 0,
  169. pagination: {
  170. defaultCurrent: 1,
  171. defaultPageSize: 10,
  172. showQuickJumper: true,
  173. pageSize: 10,
  174. onChange: function (page) {
  175. this.loadData(page);
  176. }.bind(this),
  177. showTotal: function (total) {
  178. return "共" + total + "条数据";
  179. },
  180. },
  181. columns: [
  182. {
  183. title: "编号",
  184. dataIndex: "id",
  185. key: "id",
  186. },
  187. {
  188. title: "客户",
  189. dataIndex: "unitName",
  190. key: "unitName",
  191. width: 100,
  192. render: (text) => {
  193. return (
  194. <Tooltip title={text}>
  195. <div
  196. style={{
  197. maxWidth: "100px",
  198. overflow: "hidden",
  199. textOverflow: "ellipsis",
  200. whiteSpace: "nowrap",
  201. }}
  202. >
  203. {text}
  204. </div>
  205. </Tooltip>
  206. );
  207. },
  208. },
  209. {
  210. title: "跟单人/签单人",
  211. dataIndex: "name",
  212. key: "name",
  213. },
  214. {
  215. title: "开票状态",
  216. dataIndex: "status",
  217. key: "status",
  218. render: (text, record) => {
  219. // return getStatus(text);
  220. return getInvoiceStatus(text, record);
  221. },
  222. },
  223. {
  224. title: "流程状态",
  225. dataIndex: "processStatus",
  226. key: "processStatus",
  227. render: (text) => {
  228. return getProcessStatus(text);
  229. },
  230. },
  231. {
  232. title: "项目状态",
  233. dataIndex: "projectStatus",
  234. key: "projectStatus",
  235. render: (text) => {
  236. return getProjectName(text);
  237. },
  238. },
  239. {
  240. title: "申请开票(万)",
  241. dataIndex: "amount",
  242. key: "amount",
  243. },
  244. {
  245. title: "已开票(万)",
  246. dataIndex: "sumAmount",
  247. key: "sumAmount",
  248. },
  249. {
  250. title: "已收款",
  251. dataIndex: "settlementAmount",
  252. key: "settlementAmount",
  253. },
  254. {
  255. title: "未收款",
  256. dataIndex: "notAmount",
  257. key: "notAmount",
  258. },
  259. {
  260. title: "申请时间",
  261. dataIndex: "createTime",
  262. key: "createTime",
  263. },
  264. {
  265. title: "操作",
  266. dataIndex: "caozuo",
  267. key: "caouzo",
  268. render: (text, record, index) => {
  269. return (
  270. <div>
  271. {
  272. <Button
  273. type="primary"
  274. onClick={(e) => {
  275. e.stopPropagation(), this.visit(index);
  276. }}
  277. style={{ background: "deepskyblue", border: "none" }}
  278. >
  279. 申请内容
  280. </Button>
  281. }
  282. {record.approval !== 2 ? (
  283. <Popconfirm
  284. placement="top"
  285. title="确定要通过吗?"
  286. onConfirm={(e) => {
  287. e.stopPropagation();
  288. this.setState({ examine: 2 }, () => {
  289. this.sende(record);
  290. });
  291. }}
  292. okText="确定"
  293. cancelText="取消"
  294. >
  295. <Button
  296. type="primary"
  297. style={{ marginLeft: "10px" }}
  298. onClick={(e) => {
  299. e.stopPropagation();
  300. }}
  301. >
  302. 通过
  303. </Button>
  304. </Popconfirm>
  305. ) : (
  306. ""
  307. )}
  308. {record.approval !== 2 ? (
  309. <Popconfirm
  310. placement="top"
  311. title="确定要拒绝吗?"
  312. onConfirm={(e) => {
  313. e.stopPropagation();
  314. this.setState({ examine: 3 }, () => {
  315. this.reject(record);
  316. });
  317. }}
  318. okText="确定"
  319. cancelText="取消"
  320. >
  321. <Button
  322. type="danger"
  323. onClick={(e) => {
  324. e.stopPropagation();
  325. }}
  326. style={{ marginLeft: "10px" }}
  327. >
  328. 拒绝
  329. </Button>
  330. </Popconfirm>
  331. ) : (
  332. ""
  333. )}
  334. {record.approval === 2 ? (
  335. <Button
  336. style={{ marginLeft: "10px", color: "black" }}
  337. disabled={true}
  338. >
  339. 已通过
  340. </Button>
  341. ) : (
  342. ""
  343. )}
  344. {
  345. <Button
  346. type="primary"
  347. style={{
  348. marginLeft: "10px",
  349. background: "orangered",
  350. border: "none",
  351. }}
  352. onClick={(e) => {
  353. e.stopPropagation(), this.inRecord(record, index);
  354. }}
  355. >
  356. 开票记录
  357. </Button>
  358. }
  359. </div>
  360. );
  361. },
  362. },
  363. ],
  364. columnsDate: [
  365. {
  366. title: "编号",
  367. dataIndex: "id",
  368. key: "id",
  369. },
  370. {
  371. title: "订单编号",
  372. dataIndex: "orderno",
  373. key: "orderno",
  374. },
  375. {
  376. title: "开票金额(万元)",
  377. dataIndex: "amount",
  378. key: "amount",
  379. },
  380. {
  381. title: "申请时间",
  382. dataIndex: "createTime",
  383. key: "createTime",
  384. },
  385. {
  386. title: "开票状态",
  387. dataIndex: "status",
  388. key: "status",
  389. render: (text, record) => {
  390. return (
  391. <div>
  392. {getInvoiceStatus(text, record)} <LogPopup id={record.id} />
  393. </div>
  394. );
  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. approval: thisdata.approval, //0非特批 1待审核 2审核通过
  513. });
  514. }
  515. }
  516. this.setState({
  517. recordData: theArr,
  518. sum: sum.toFixed(6),
  519. });
  520. }.bind(this),
  521. }).done(
  522. function () {
  523. this.setState({
  524. loading: false,
  525. });
  526. }.bind(this)
  527. );
  528. },
  529. inRecord(record) {
  530. this.setState(
  531. {
  532. bvisible: true,
  533. orderNo2: record.orderNo,
  534. },
  535. () => {
  536. this.inRecordData();
  537. }
  538. );
  539. },
  540. inRecordCanl() {
  541. this.setState({
  542. bvisible: false,
  543. });
  544. },
  545. search() {
  546. this.loadData();
  547. },
  548. componentWillMount() {
  549. this.loadData();
  550. },
  551. // componentDidMount() {
  552. // window.setTimeout(() => {
  553. // console.log("321", this.state);
  554. // },100)
  555. // },
  556. reset() {
  557. this.state.nameSearch = "";
  558. this.state.releaseDate = [];
  559. this.state.orderNoSearch = "";
  560. this.state.processStatus = [];
  561. this.state.departmenttList = [];
  562. this.loadData();
  563. },
  564. tableRowClick(record) {
  565. this.state.RowData = record;
  566. this.setState({
  567. showDesc: true,
  568. });
  569. },
  570. closeDesc(e, s) {
  571. this.state.showDesc = e;
  572. if (s) {
  573. this.loadData(this.state.page);
  574. }
  575. },
  576. changeList(arr) {
  577. const newArr = [];
  578. this.state.columns.forEach((item) => {
  579. arr.forEach((val) => {
  580. if (val === item.title) {
  581. newArr.push(item);
  582. }
  583. });
  584. });
  585. this.setState({
  586. changeList: newArr,
  587. });
  588. },
  589. render() {
  590. const formItemLayout = {
  591. labelCol: { span: 8 },
  592. wrapperCol: { span: 14 },
  593. };
  594. const { TabPane } = Tabs;
  595. return (
  596. <div className="user-content">
  597. <div className="content-title">
  598. <span>省外特批</span>
  599. </div>
  600. <Tabs defaultActiveKey="1" onChange={this.callback} className="test">
  601. <TabPane tab="搜索" key="1">
  602. <div className="user-search">
  603. <Input
  604. placeholder="营销员名称"
  605. value={this.state.nameSearch}
  606. style={{ marginLeft: 10 }}
  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. {/*<Select placeholder="订单部门"
  619. style={{ width: 150 ,marginRight:10}}
  620. value={this.state.departmenttList}
  621. onChange={(e) => { this.setState({ departmenttList: e }) }}>
  622. {
  623. departmentArr.map(function (item) {
  624. return <Select.Option key={item.id} >{item.name}</Select.Option>
  625. })
  626. }
  627. </Select>*/}
  628. <Button
  629. type="primary"
  630. onClick={this.search}
  631. style={{ marginLeft: 10 }}
  632. >
  633. 搜索
  634. </Button>
  635. <Button onClick={this.reset}>重置</Button>
  636. </div>
  637. </TabPane>
  638. <TabPane tab="更改表格显示数据" key="2">
  639. <div style={{ marginLeft: 10 }}>
  640. <ChooseList
  641. columns={this.state.columns}
  642. changeFn={this.changeList}
  643. changeList={this.state.changeList}
  644. top={55}
  645. margin={11}
  646. />
  647. </div>
  648. </TabPane>
  649. </Tabs>
  650. <div className="patent-table">
  651. <Spin spinning={this.state.loading}>
  652. <Table
  653. columns={
  654. this.state.changeList
  655. ? this.state.changeList
  656. : this.state.columns
  657. }
  658. style={{
  659. cursor: "pointer",
  660. }}
  661. scroll={{ x: 1500, y: 0 }}
  662. onRowClick={this.tableRowClick}
  663. dataSource={this.state.dataSource}
  664. pagination={this.state.pagination}
  665. bordered
  666. size="small"
  667. />
  668. </Spin>
  669. </div>
  670. <Modal
  671. visible={this.state.visibleR}
  672. className="admin-desc-content"
  673. footer=""
  674. title="拒绝理由"
  675. width="400px"
  676. onCancel={this.rejectCancels}
  677. >
  678. <Input.TextArea
  679. placeholder="请输入拒绝理由"
  680. rows={4}
  681. value={this.state.reason}
  682. onChange={(e) => {
  683. this.setState({ reason: e.target.value });
  684. }}
  685. />
  686. <div className="clearfix" style={{ marginTop: "20px" }}>
  687. <Button
  688. type="primary"
  689. loading={this.state.loading}
  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="1200px"
  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="1200px"
  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. size="small"
  990. />
  991. <div className="clearfix" style={{ marginTop: "20px" }}>
  992. <FormItem
  993. className="half-item"
  994. {...formItemLayout}
  995. label={<span style={{ fontSize: "14px" }}>开票总计</span>}
  996. >
  997. <span>{this.state.sum}</span>
  998. </FormItem>
  999. </div>
  1000. </div>
  1001. </Spin>
  1002. </Modal>
  1003. <OrderDesc
  1004. data={this.state.RowData}
  1005. showDesc={this.state.showDesc}
  1006. closeDesc={this.closeDesc.bind(this)}
  1007. />
  1008. </div>
  1009. );
  1010. },
  1011. });
  1012. export default outSpecial;