inSpecial.jsx 30 KB

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