inSpecial.jsx 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061
  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. this.state.RowData = record;
  583. this.setState({
  584. showDesc: true
  585. });
  586. },
  587. closeDesc(e, s) {
  588. this.state.showDesc = e;
  589. if (s) {
  590. this.loadData(this.state.page);
  591. }
  592. },
  593. render() {
  594. const formItemLayout = {
  595. labelCol: { span: 8 },
  596. wrapperCol: { span: 14 }
  597. };
  598. var departmentArr = this.state.departmentArr || [];
  599. return (
  600. <div className="user-content" style={{ position: "relative" }}>
  601. <ShowModalDiv ShowModal={this.state.showModal} />
  602. <div className="content-title">
  603. <span>省内特批</span>
  604. </div>
  605. <Tabs
  606. defaultActiveKey="1"
  607. onChange={this.callback}
  608. className="test">
  609. <TabPane tab="搜索" key="1">
  610. <div className="user-search">
  611. <Input
  612. placeholder="营销员名称"
  613. value={this.state.nameSearch}
  614. style={{marginLeft:10}}
  615. onChange={e => {
  616. this.setState({ nameSearch: e.target.value });
  617. }}
  618. />
  619. <Input
  620. placeholder="订单编号"
  621. value={this.state.orderNoSearch}
  622. onChange={e => {
  623. this.setState({ orderNoSearch: e.target.value });
  624. }}
  625. />
  626. <Input
  627. placeholder="客户名称"
  628. value={this.state.userName}
  629. onChange={e => {
  630. this.setState({ userName: e.target.value });
  631. }}
  632. />
  633. <Select
  634. placeholder="开票状态"
  635. onChange={e => {
  636. this.setState({ status: e });
  637. }}
  638. style={{ width: 160, marginRight: 5 }}
  639. value={this.state.status}
  640. >
  641. <Option value="1">处理中</Option>
  642. <Option value="2">通过</Option>
  643. </Select>
  644. <Select
  645. placeholder="订单部门"
  646. style={{ width: 150, marginRight: 10 }}
  647. value={this.state.departmenttList}
  648. onChange={e => {
  649. this.setState({ departmenttList: e });
  650. }}
  651. >
  652. {departmentArr.map(function(item) {
  653. return <Select.Option key={item.id}>{item.name}</Select.Option>;
  654. })}
  655. </Select>
  656. <Select
  657. placeholder="特批状态"
  658. onChange={e => {
  659. this.setState({ processStatus: e });
  660. }}
  661. style={{ width: 160, marginRight: 5 }}
  662. value={this.state.processStatus}
  663. >
  664. <Option value="1">特批未审核</Option>
  665. <Option value="2">特批已审核</Option>
  666. </Select>
  667. <Button
  668. type="primary"
  669. onClick={this.search}
  670. style={{ marginLeft: 10 }}
  671. >
  672. 搜索
  673. </Button>
  674. <Button onClick={this.reset}>重置</Button>
  675. </div>
  676. </TabPane>
  677. <TabPane tab="更改表格数据" key="2">
  678. <div style={{margin:10,marginBottom:0}}>
  679. <ChooseList
  680. columns={this.state.columns}
  681. changeFn={this.changeList}
  682. changeList={this.state.changeList}
  683. top={55}
  684. />
  685. </div>
  686. </TabPane>
  687. </Tabs>
  688. <div className="patent-table">
  689. <Spin spinning={this.state.loading}>
  690. <Table
  691. columns={
  692. this.state.changeList == undefined
  693. ? this.state.columns
  694. : this.state.changeList
  695. }
  696. scroll={{ x: 1500, y: 0 }}
  697. onRowClick={this.tableRowClick}
  698. dataSource={this.state.dataSource}
  699. pagination={this.state.pagination}
  700. bordered
  701. size="small"
  702. />
  703. </Spin>
  704. </div>
  705. <Modal
  706. visible={this.state.visibleR}
  707. className="admin-desc-content"
  708. footer=""
  709. title="拒绝理由"
  710. width="400px"
  711. onCancel={this.rejectCancels}
  712. >
  713. <Input.TextArea
  714. placeholder="请输入拒绝理由"
  715. rows={4}
  716. value={this.state.reason}
  717. onChange={e => {
  718. this.setState({ reason: e.target.value });
  719. }}
  720. ></Input.TextArea>
  721. <div className="clearfix" style={{ marginTop: "20px" }}>
  722. <Button
  723. type="primary"
  724. onClick={e => {
  725. e.stopPropagation(), this.commit();
  726. }}
  727. style={{ float: "right" }}
  728. >
  729. 提交
  730. </Button>
  731. </div>
  732. </Modal>
  733. <Modal
  734. className="admin-desc-content"
  735. footer=""
  736. title="开具发票申请单"
  737. width="900px"
  738. visible={this.state.avisible}
  739. onOk={this.visitOks}
  740. onCancel={this.visitCancels}
  741. >
  742. <Form
  743. layout="horizontal"
  744. id="demand-form"
  745. style={{ paddingBottom: "40px" }}
  746. >
  747. <Spin spinning={this.state.loading}>
  748. <div className="clearfix">
  749. <div className="clearfix">
  750. <FormItem
  751. className="half-item"
  752. {...formItemLayout}
  753. label="合同编号"
  754. >
  755. <span>{this.state.contractNo}</span>
  756. </FormItem>
  757. <FormItem
  758. className="half-item"
  759. {...formItemLayout}
  760. label="备注"
  761. >
  762. <span>{this.state.remarks}</span>
  763. </FormItem>
  764. </div>
  765. <div className="clearfix">
  766. <FormItem
  767. className="half-item"
  768. {...formItemLayout}
  769. label={
  770. <span>
  771. <strong style={{ color: "#f00" }}>*</strong>省内/外
  772. </span>
  773. }
  774. >
  775. <span>{getProvinceA(this.state.type)}</span>
  776. </FormItem>
  777. </div>
  778. <hr
  779. style={{
  780. border: "1px dashed #aaa",
  781. width: "90%",
  782. margin: "auto"
  783. }}
  784. />
  785. <div style={{ marginTop: "13px", marginLeft: "16px" }}>
  786. <span style={{ fontSize: "14px" }}>发票内容</span>
  787. </div>
  788. <div className="clearfix">
  789. <FormItem
  790. className="half-item"
  791. {...formItemLayout}
  792. label={
  793. <span>
  794. <strong style={{ color: "#f00" }}>*</strong>发票类型
  795. </span>
  796. }
  797. >
  798. <span>
  799. {this.state.invoiceType === 0
  800. ? "增值税专用发票"
  801. : this.state.invoiceType === 1
  802. ? "增值税普通发票"
  803. : "其他"}
  804. </span>
  805. </FormItem>
  806. </div>
  807. <div className="clearfix">
  808. <FormItem
  809. className="half-item"
  810. {...formItemLayout}
  811. label={
  812. <span>
  813. <strong style={{ color: "#f00" }}>*</strong>单位名称
  814. </span>
  815. }
  816. >
  817. <span>{this.state.unitName}</span>
  818. </FormItem>
  819. <FormItem
  820. className="half-item"
  821. {...formItemLayout}
  822. label={
  823. <span>
  824. <strong style={{ color: "#f00" }}>*</strong>税号
  825. </span>
  826. }
  827. >
  828. <span>{this.state.taxNumber}</span>
  829. </FormItem>
  830. <FormItem
  831. className="half-item"
  832. {...formItemLayout}
  833. label={
  834. <span>
  835. <strong style={{ color: "#f00" }}>*</strong>
  836. 开票金额(万元)
  837. </span>
  838. }
  839. >
  840. <span>{this.state.amount}</span>
  841. </FormItem>
  842. <FormItem
  843. className="half-item"
  844. {...formItemLayout}
  845. label={
  846. <span>
  847. <strong style={{ color: "#f00" }}>*</strong>
  848. 开户行银行账号
  849. </span>
  850. }
  851. >
  852. <span>{this.state.banks}</span>
  853. </FormItem>
  854. <FormItem
  855. className="half-item"
  856. {...formItemLayout}
  857. label={
  858. <span>
  859. <strong style={{ color: "#f00" }}>*</strong>
  860. 开票内容及说明
  861. </span>
  862. }
  863. >
  864. <span>{this.state.content}</span>
  865. </FormItem>
  866. <FormItem
  867. className="half-item"
  868. {...formItemLayout}
  869. label={
  870. <span>
  871. <strong style={{ color: "#f00" }}>*</strong>单位地址
  872. </span>
  873. }
  874. >
  875. <span>{this.state.unitAddress}</span>
  876. </FormItem>
  877. <FormItem
  878. className="half-item"
  879. {...formItemLayout}
  880. label="备注"
  881. >
  882. <span>{this.state.invoiceRemarks}</span>
  883. </FormItem>
  884. <FormItem
  885. className="half-item"
  886. {...formItemLayout}
  887. label={
  888. <span>
  889. <strong style={{ color: "#f00" }}>*</strong>单位电话
  890. </span>
  891. }
  892. >
  893. <span>{this.state.unitMobile}</span>
  894. </FormItem>
  895. </div>
  896. <div className="clearfix">
  897. <FormItem
  898. labelCol={{ span: 4 }}
  899. wrapperCol={{ span: 18 }}
  900. label={
  901. <span>
  902. <strong style={{ color: "#f00" }}>*</strong>附件
  903. </span>
  904. }
  905. >
  906. <Upload
  907. className="demandDetailShow-upload"
  908. listType="picture-card"
  909. fileList={this.state.orgCodeUrl}
  910. onPreview={file => {
  911. this.setState({
  912. previewImage: file.url || file.thumbUrl,
  913. previewVisible: true
  914. });
  915. }}
  916. ></Upload>
  917. <Modal
  918. maskClosable={false}
  919. footer={null}
  920. visible={this.state.previewVisible}
  921. onCancel={() => {
  922. this.setState({ previewVisible: false });
  923. }}
  924. >
  925. <img
  926. alt=""
  927. style={{ width: "100%" }}
  928. src={this.state.previewImage || ""}
  929. />
  930. </Modal>
  931. </FormItem>
  932. </div>
  933. <hr
  934. style={{
  935. border: "1px dashed #aaa",
  936. width: "90%",
  937. margin: "auto"
  938. }}
  939. />
  940. <div className="clearfix" style={{ marginTop: "10px" }}>
  941. <FormItem
  942. className="half-item"
  943. {...formItemLayout}
  944. label="发票是否邮寄:"
  945. >
  946. <span>{this.state.post === 0 ? "是" : "否"}</span>
  947. </FormItem>
  948. </div>
  949. {this.state.post === 0 ? (
  950. <div>
  951. <div className="clearfix">
  952. <FormItem
  953. className="half-item"
  954. {...formItemLayout}
  955. label="收信人姓名"
  956. >
  957. <span>{this.state.addressee}</span>
  958. </FormItem>
  959. <FormItem
  960. className="half-item"
  961. {...formItemLayout}
  962. label="电话"
  963. >
  964. <span>{this.state.addresseeMobile}</span>
  965. </FormItem>
  966. </div>
  967. <div className="clearfix">
  968. <FormItem
  969. className="half-item"
  970. {...formItemLayout}
  971. label="省-市-区"
  972. >
  973. <span>
  974. {getprovince(this.state.addresseeProvince)}/
  975. {getprovince(this.state.addresseeCity)}/
  976. {getprovince(this.state.addresseeArea)}
  977. </span>
  978. </FormItem>
  979. </div>
  980. <div className="clearfix">
  981. <FormItem
  982. className="half-item"
  983. {...formItemLayout}
  984. label="详细地址"
  985. >
  986. <span>{this.state.recipientAddress}</span>
  987. </FormItem>
  988. </div>
  989. </div>
  990. ) : (
  991. ""
  992. )}
  993. <FormItem
  994. className="half-item"
  995. {...formItemLayout}
  996. label={
  997. <span>
  998. <strong style={{ color: "#f00" }}>*</strong>开票金额总计
  999. </span>
  1000. }
  1001. >
  1002. <span>{this.state.alreadyAmount}万元</span>
  1003. </FormItem>
  1004. </div>
  1005. </Spin>
  1006. </Form>
  1007. </Modal>
  1008. <Modal
  1009. visible={this.state.bvisible}
  1010. footer=""
  1011. title="开票历史记录"
  1012. className="admin-desc-content"
  1013. width="900px"
  1014. onCancel={this.inRecordCanl}
  1015. >
  1016. <Spin spinning={this.state.loading}>
  1017. <div className="patent-table">
  1018. <Table
  1019. columns={this.state.columnsDate}
  1020. dataSource={this.state.recordData}
  1021. pagination={false}
  1022. bordered
  1023. size="small"
  1024. />
  1025. <div className="clearfix" style={{ marginTop: "20px" }}>
  1026. <FormItem
  1027. className="half-item"
  1028. {...formItemLayout}
  1029. label={<span style={{ fontSize: "14px" }}>开票总计</span>}
  1030. >
  1031. <span>{this.state.sum}</span>
  1032. </FormItem>
  1033. </div>
  1034. </div>
  1035. </Spin>
  1036. </Modal>
  1037. <OrderDesc
  1038. data={this.state.RowData}
  1039. showDesc={this.state.showDesc}
  1040. closeDesc={this.closeDesc.bind(this)}
  1041. />
  1042. </div>
  1043. );
  1044. }
  1045. });
  1046. export default inSpecial;