inSpecial.jsx 30 KB

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