inSpecial.jsx 31 KB

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