perf: 切换供应商: trainticket

main
Lei OT 7 months ago
parent bc4bd24fca
commit f6ffed8607

@ -9,6 +9,7 @@ import { DATE_FORMAT } from "@/config";
import { TableExportBtn } from "@/components/Data";
import trainTicketStore from "@/stores/Trainticket";
import { usingStorage } from "@/hooks/usingStorage";
import useFormStore from "@/stores/Form";
const planListColumns = [
{
@ -87,7 +88,9 @@ const planListColumns = [
const Trainticket = props => {
const navigate = useNavigate();
const { travelAgencyId } = usingStorage();
const [{agency, ...formValues}] = useFormStore(state => [state.formValuesToSub]);
const { travelAgencyId: myAgencyId } = usingStorage();
const travelAgencyId = agency || myAgencyId;
const [getPlanList, planList, loading] = trainTicketStore(state => [state.getPlanList, state.planList, state.loading]);
const showTotal = total => `合计 ${total} `;
@ -111,7 +114,7 @@ const Trainticket = props => {
},
}}
onSubmit={(err, formVal, filedsVal) => {
getPlanList(travelAgencyId, formVal.referenceNo, formVal.startdate, formVal.endtime, formVal.plan_state, formVal.airticket_state);
getPlanList(formVal.agency || travelAgencyId, formVal.referenceNo, formVal.startdate, formVal.endtime, formVal.plan_state, formVal.airticket_state);
}}
/>
</Col>

@ -10,11 +10,14 @@ import { TableExportBtn } from "@/components/Data";
import trainTicketStore from "@/stores/Trainticket";
import { usingStorage } from "@/hooks/usingStorage";
import useFormStore from "@/stores/Form";
const Invoice = props => {
const navigate = useNavigate();
const { notification } = App.useApp();
const { travelAgencyId } = usingStorage();
const [{agency, ...formValues}] = useFormStore(state => [state.formValuesToSub]);
const { travelAgencyId: myAgencyId } = usingStorage();
const travelAgencyId = agency || myAgencyId;
const [getVEIFlightBill, vEIFlightBill, loading, postVEIFlightBillSubmit] = trainTicketStore(state => [state.getVEIFlightBill, state.vEIFlightBill, state.loading, state.postVEIFlightBillSubmit]);
const showTotal = total => `合计 ${total} `;
const [selectedValues, setSelectedValues] = useState([]);
@ -205,9 +208,9 @@ const Invoice = props => {
},
}}
onSubmit={(err, formVal, filedsVal) => {
getVEIFlightBill(travelAgencyId, formVal.referenceNo, formVal.invoiceCheckStatus, formVal.startdate, formVal.endtime);
getVEIFlightBill(formVal.agency || travelAgencyId, formVal.referenceNo, formVal.invoiceCheckStatus, formVal.startdate, formVal.endtime);
//console.log(vEIFlightBill);
}}
/>
</Col>

@ -12,11 +12,14 @@ import useInvoiceStore from "@/stores/Invoice";
import { fetchInvoicePaidDetail } from "@/stores/Invoice";
import { usingStorage } from "@/hooks/usingStorage";
import useFormStore from "@/stores/Form";
const InvoicePaid = props => {
const navigate = useNavigate();
const { notification } = App.useApp();
const { travelAgencyId } = usingStorage();
const [{agency, ...formValues}] = useFormStore(state => [state.formValuesToSub]);
const { travelAgencyId: myAgencyId } = usingStorage();
const travelAgencyId = agency || myAgencyId;
const [invoicePaidDetail, setInvoicePaidDetail] = useState([]);
const [invoiceNO, setInvoiceNO] = useState([]); //
const [loading, invoicePaid, fetchInvoicePaid] = useInvoiceStore(state => [state.loading, state.invoicePaid, state.fetchInvoicePaid]);

@ -11,10 +11,13 @@ import BackBtn from "@/components/BackBtn";
import { station_names } from "@/views/trainticket/station_name";
import { Upload } from "antd";
import { ImageUploader, ImageViewer,simple_encrypt } from "@/components/ImageUploader";
import useFormStore from "@/stores/Form";
const TrainticketPlan = props => {
const { coli_sn, gri_sn } = useParams();
const { travelAgencyId, loginToken, userId } = usingStorage();
const [{agency, ...formValues}] = useFormStore(state => [state.formValuesToSub]);
const { travelAgencyId: myAgencyId, loginToken, userId } = usingStorage();
const travelAgencyId = agency || myAgencyId;
const [
getPlanDetail,
planDetail,

Loading…
Cancel
Save