inSpecial.jsx 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049
  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. size="small"
  688. />
  689. </Spin>
  690. </div>
  691. <Modal
  692. visible={this.state.visibleR}
  693. className="admin-desc-content"
  694. footer=""
  695. title="拒绝理由"
  696. width="400px"
  697. onCancel={this.rejectCancels}
  698. >
  699. <Input.TextArea
  700. placeholder="请输入拒绝理由"
  701. rows={4}
  702. value={this.state.reason}
  703. onChange={e => {
  704. this.setState({ reason: e.target.value });
  705. }}
  706. ></Input.TextArea>
  707. <div className="clearfix" style={{ marginTop: "20px" }}>
  708. <Button
  709. type="primary"
  710. onClick={e => {
  711. e.stopPropagation(), this.commit();
  712. }}
  713. style={{ float: "right" }}
  714. >
  715. 提交
  716. </Button>
  717. </div>
  718. </Modal>
  719. <Modal
  720. className="admin-desc-content"
  721. footer=""
  722. title="开具发票申请单"
  723. width="900px"
  724. visible={this.state.avisible}
  725. onOk={this.visitOks}
  726. onCancel={this.visitCancels}
  727. >
  728. <Form
  729. layout="horizontal"
  730. id="demand-form"
  731. style={{ paddingBottom: "40px" }}
  732. >
  733. <Spin spinning={this.state.loading}>
  734. <div className="clearfix">
  735. <div className="clearfix">
  736. <FormItem
  737. className="half-item"
  738. {...formItemLayout}
  739. label="合同编号"
  740. >
  741. <span>{this.state.contractNo}</span>
  742. </FormItem>
  743. <FormItem
  744. className="half-item"
  745. {...formItemLayout}
  746. label="备注"
  747. >
  748. <span>{this.state.remarks}</span>
  749. </FormItem>
  750. </div>
  751. <div className="clearfix">
  752. <FormItem
  753. className="half-item"
  754. {...formItemLayout}
  755. label={
  756. <span>
  757. <strong style={{ color: "#f00" }}>*</strong>省内/外
  758. </span>
  759. }
  760. >
  761. <span>{getProvinceA(this.state.type)}</span>
  762. </FormItem>
  763. </div>
  764. <hr
  765. style={{
  766. border: "1px dashed #aaa",
  767. width: "90%",
  768. margin: "auto"
  769. }}
  770. />
  771. <div style={{ marginTop: "13px", marginLeft: "16px" }}>
  772. <span style={{ fontSize: "14px" }}>发票内容</span>
  773. </div>
  774. <div className="clearfix">
  775. <FormItem
  776. className="half-item"
  777. {...formItemLayout}
  778. label={
  779. <span>
  780. <strong style={{ color: "#f00" }}>*</strong>发票类型
  781. </span>
  782. }
  783. >
  784. <span>
  785. {this.state.invoiceType === 0
  786. ? "增值税专用发票"
  787. : this.state.invoiceType === 1
  788. ? "增值税普通发票"
  789. : "其他"}
  790. </span>
  791. </FormItem>
  792. </div>
  793. <div className="clearfix">
  794. <FormItem
  795. className="half-item"
  796. {...formItemLayout}
  797. label={
  798. <span>
  799. <strong style={{ color: "#f00" }}>*</strong>单位名称
  800. </span>
  801. }
  802. >
  803. <span>{this.state.unitName}</span>
  804. </FormItem>
  805. <FormItem
  806. className="half-item"
  807. {...formItemLayout}
  808. label={
  809. <span>
  810. <strong style={{ color: "#f00" }}>*</strong>税号
  811. </span>
  812. }
  813. >
  814. <span>{this.state.taxNumber}</span>
  815. </FormItem>
  816. <FormItem
  817. className="half-item"
  818. {...formItemLayout}
  819. label={
  820. <span>
  821. <strong style={{ color: "#f00" }}>*</strong>
  822. 开票金额(万元)
  823. </span>
  824. }
  825. >
  826. <span>{this.state.amount}</span>
  827. </FormItem>
  828. <FormItem
  829. className="half-item"
  830. {...formItemLayout}
  831. label={
  832. <span>
  833. <strong style={{ color: "#f00" }}>*</strong>
  834. 开户行银行账号
  835. </span>
  836. }
  837. >
  838. <span>{this.state.banks}</span>
  839. </FormItem>
  840. <FormItem
  841. className="half-item"
  842. {...formItemLayout}
  843. label={
  844. <span>
  845. <strong style={{ color: "#f00" }}>*</strong>
  846. 开票内容及说明
  847. </span>
  848. }
  849. >
  850. <span>{this.state.content}</span>
  851. </FormItem>
  852. <FormItem
  853. className="half-item"
  854. {...formItemLayout}
  855. label={
  856. <span>
  857. <strong style={{ color: "#f00" }}>*</strong>单位地址
  858. </span>
  859. }
  860. >
  861. <span>{this.state.unitAddress}</span>
  862. </FormItem>
  863. <FormItem
  864. className="half-item"
  865. {...formItemLayout}
  866. label="备注"
  867. >
  868. <span>{this.state.invoiceRemarks}</span>
  869. </FormItem>
  870. <FormItem
  871. className="half-item"
  872. {...formItemLayout}
  873. label={
  874. <span>
  875. <strong style={{ color: "#f00" }}>*</strong>单位电话
  876. </span>
  877. }
  878. >
  879. <span>{this.state.unitMobile}</span>
  880. </FormItem>
  881. </div>
  882. <div className="clearfix">
  883. <FormItem
  884. labelCol={{ span: 4 }}
  885. wrapperCol={{ span: 18 }}
  886. label={
  887. <span>
  888. <strong style={{ color: "#f00" }}>*</strong>附件
  889. </span>
  890. }
  891. >
  892. <Upload
  893. className="demandDetailShow-upload"
  894. listType="picture-card"
  895. fileList={this.state.orgCodeUrl}
  896. onPreview={file => {
  897. this.setState({
  898. previewImage: file.url || file.thumbUrl,
  899. previewVisible: true
  900. });
  901. }}
  902. ></Upload>
  903. <Modal
  904. maskClosable={false}
  905. footer={null}
  906. visible={this.state.previewVisible}
  907. onCancel={() => {
  908. this.setState({ previewVisible: false });
  909. }}
  910. >
  911. <img
  912. alt=""
  913. style={{ width: "100%" }}
  914. src={this.state.previewImage || ""}
  915. />
  916. </Modal>
  917. </FormItem>
  918. </div>
  919. <hr
  920. style={{
  921. border: "1px dashed #aaa",
  922. width: "90%",
  923. margin: "auto"
  924. }}
  925. />
  926. <div className="clearfix" style={{ marginTop: "10px" }}>
  927. <FormItem
  928. className="half-item"
  929. {...formItemLayout}
  930. label="发票是否邮寄:"
  931. >
  932. <span>{this.state.post === 0 ? "是" : "否"}</span>
  933. </FormItem>
  934. </div>
  935. {this.state.post === 0 ? (
  936. <div>
  937. <div className="clearfix">
  938. <FormItem
  939. className="half-item"
  940. {...formItemLayout}
  941. label="收信人姓名"
  942. >
  943. <span>{this.state.addressee}</span>
  944. </FormItem>
  945. <FormItem
  946. className="half-item"
  947. {...formItemLayout}
  948. label="电话"
  949. >
  950. <span>{this.state.addresseeMobile}</span>
  951. </FormItem>
  952. </div>
  953. <div className="clearfix">
  954. <FormItem
  955. className="half-item"
  956. {...formItemLayout}
  957. label="省-市-区"
  958. >
  959. <span>
  960. {getprovince(this.state.addresseeProvince)}/
  961. {getprovince(this.state.addresseeCity)}/
  962. {getprovince(this.state.addresseeArea)}
  963. </span>
  964. </FormItem>
  965. </div>
  966. <div className="clearfix">
  967. <FormItem
  968. className="half-item"
  969. {...formItemLayout}
  970. label="详细地址"
  971. >
  972. <span>{this.state.recipientAddress}</span>
  973. </FormItem>
  974. </div>
  975. </div>
  976. ) : (
  977. ""
  978. )}
  979. <FormItem
  980. className="half-item"
  981. {...formItemLayout}
  982. label={
  983. <span>
  984. <strong style={{ color: "#f00" }}>*</strong>开票金额总计
  985. </span>
  986. }
  987. >
  988. <span>{this.state.alreadyAmount}万元</span>
  989. </FormItem>
  990. </div>
  991. </Spin>
  992. </Form>
  993. </Modal>
  994. <Modal
  995. visible={this.state.bvisible}
  996. footer=""
  997. title="开票历史记录"
  998. className="admin-desc-content"
  999. width="900px"
  1000. onCancel={this.inRecordCanl}
  1001. >
  1002. <Spin spinning={this.state.loading}>
  1003. <div className="patent-table">
  1004. <Table
  1005. columns={this.state.columnsDate}
  1006. dataSource={this.state.recordData}
  1007. pagination={false}
  1008. bordered
  1009. size="small"
  1010. />
  1011. <div className="clearfix" style={{ marginTop: "20px" }}>
  1012. <FormItem
  1013. className="half-item"
  1014. {...formItemLayout}
  1015. label={<span style={{ fontSize: "14px" }}>开票总计</span>}
  1016. >
  1017. <span>{this.state.sum}</span>
  1018. </FormItem>
  1019. </div>
  1020. </div>
  1021. </Spin>
  1022. </Modal>
  1023. <OrderDesc
  1024. data={this.state.RowData}
  1025. showDesc={this.state.showDesc}
  1026. closeDesc={this.closeDesc.bind(this)}
  1027. />
  1028. </div>
  1029. );
  1030. }
  1031. });
  1032. export default inSpecial;