From 8330244008b3a334232cae3574fb531e3cc9d98e Mon Sep 17 00:00:00 2001 From: Ycc Date: Tue, 15 Oct 2024 16:50:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=BA=E7=A5=A8=E6=B1=87=E6=AC=BE=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E6=9F=A5=E8=AF=A2=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.jsx | 2 + src/views/airticket/Index.jsx | 13 ++- src/views/airticket/InvoicePaid.jsx | 137 ++++++++++++++++++++++++++++ 3 files changed, 148 insertions(+), 4 deletions(-) create mode 100644 src/views/airticket/InvoicePaid.jsx diff --git a/src/main.jsx b/src/main.jsx index f9961a1..7c6c9f8 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -29,6 +29,7 @@ import InvoicePaidDetail from '@/views/invoice/PaidDetail' import Airticket from '@/views/airticket/Index' import AirticketPlan from '@/views/airticket/Plan' import AirticketInvoice from '@/views/airticket/Invoice' +import AirticketInvoicePaid from '@/views/airticket/InvoicePaid' import { ThemeContext } from '@/stores/ThemeContext' import { usingStorage } from '@/hooks/usingStorage' import useAuthStore from './stores/Auth' @@ -68,6 +69,7 @@ const initRouter = async () => { { path: 'airticket',element: }, { path: 'airticket/plan/:coli_sn/:gri_sn',element:}, { path: 'airticket/invoice',element:}, + { path: 'airticket/invoicepaid',element:}, { path: "products",element: }, { path: "products/:travel_agency_id/:use_year/:audit_state/audit",element:}, diff --git a/src/views/airticket/Index.jsx b/src/views/airticket/Index.jsx index 61754e0..b29499a 100644 --- a/src/views/airticket/Index.jsx +++ b/src/views/airticket/Index.jsx @@ -91,7 +91,7 @@ const Airticket = props => { const showTotal = total => `合计 ${total} `; useEffect(() => { - getPlanList(travelAgencyId, "", dayjs().startOf("M").format(DATE_FORMAT), dayjs().add(3, "M").endOf("M").format(DATE_FORMAT),'-1','-1'); + //getPlanList(travelAgencyId, "", dayjs().startOf("M").format(DATE_FORMAT), dayjs().add(3, "M").endOf("M").format(DATE_FORMAT), "-1", "-1"); }, []); return ( @@ -115,9 +115,14 @@ const Airticket = props => { /> - + + + + diff --git a/src/views/airticket/InvoicePaid.jsx b/src/views/airticket/InvoicePaid.jsx new file mode 100644 index 0000000..9048aa9 --- /dev/null +++ b/src/views/airticket/InvoicePaid.jsx @@ -0,0 +1,137 @@ +import { useState, useEffect } from "react"; +import { Grid, Divider, Layout, Spin, Input, Col, Row, Space, Checkbox, Table, Button, App } from "antd"; +import { PhoneOutlined, CustomerServiceOutlined, FrownTwoTone, LikeTwoTone } from "@ant-design/icons"; +import { useParams, useHref, useNavigate, NavLink } from "react-router-dom"; +import { isEmpty, formatColonTime, formatDate, isNotEmpty } from "@/utils/commons"; +import { DATE_FORMAT } from "@/config"; +import dayjs from "dayjs"; +import SearchForm from "@/components/SearchForm"; +import BackBtn from "@/components/BackBtn"; +import { TableExportBtn } from "@/components/Data"; +import useInvoiceStore from "@/stores/Invoice"; +import { fetchInvoicePaidDetail } from "@/stores/Invoice"; + +import airTicketStore from "@/stores/Airticket"; +import { usingStorage } from "@/hooks/usingStorage"; + +const InvoicePaid = props => { + const navigate = useNavigate(); + const { notification } = App.useApp(); + const { travelAgencyId } = usingStorage(); + const [invoicePaidDetail, setInvoicePaidDetail] = useState([]); + const [invoiceNO, setInvoiceNO] = useState([]); //显示账单编号 + const [loading, invoicePaid, fetchInvoicePaid] = useInvoiceStore(state => [state.loading, state.invoicePaid, state.fetchInvoicePaid]); + const showTotal = total => `Total ${total} items`; + const showTotal_detail = total => `Total ${total} items`; + useEffect(() => { + //fetchInvoicePaid(travelAgencyId, "", dayjs().subtract(2, "M").startOf("M").format(DATE_FORMAT), dayjs().endOf("M").format(DATE_FORMAT)); + }, []); + + const invoicePaidColumns = [ + { + title: "编号", + dataIndex: "fl_finaceNo", + key: "fl_finaceNo", + }, + { + title: "报账日期", + key: "fl_adddate", + dataIndex: "fl_adddate", + render: (text, record) => (isNotEmpty(text) ? formatDate(new Date(text)) : ""), + }, + { + title: "团数", + key: "fcount", + dataIndex: "fcount", + }, + { + title: "总额", + key: "pSum", + dataIndex: "pSum", + //render: (text, record) => (isNotEmpty(record.GMD_Currency) ? record.GMD_Currency + " " + text : text), + }, + { + title: "查看", + key: "pSum", + dataIndex: "pSum", + render: (text, record) => ( + + ), + }, + ]; + + const invoicePaidDetailColumns = [ + { + title: "团号", + dataIndex: "fl2_GroupName", + key: "fl2_GroupName", + }, + { + title: "金额", + key: "fl2_price", + dataIndex: "fl2_price", + }, + { + title: "报账日期", + key: "fl2_ArriveDate", + dataIndex: "fl2_ArriveDate", + render: (text, record) => (isNotEmpty(text) ? formatDate(new Date(text)) : ""), + }, + { + title: "顾问", + dataIndex: "fl2_wl", + key: "fl2_wl", + }, + ]; + + return ( + + + + { + fetchInvoicePaid(travelAgencyId, "", formVal.startdate, formVal.enddate); + setInvoicePaidDetail([]); + }} + /> + + + + + + + + + 汇款列表 + + + + + + + 账单明细 {invoiceNO} +
+ + + + + + ); +}; +export default InvoicePaid;