|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
import { useState, useEffect } from "react";
|
|
|
|
|
import { Grid, Divider, Layout, Modal, Form, Input, Col, Row, Space, Collapse, Table, Button, Select, App, Popconfirm, Switch } from "antd";
|
|
|
|
|
import { PhoneOutlined, FrownTwoTone, LikeTwoTone, ArrowUpOutlined, ArrowDownOutlined } from "@ant-design/icons";
|
|
|
|
|
import { PhoneOutlined, FrownTwoTone, LikeTwoTone, ArrowUpOutlined, ArrowDownOutlined, PlusOutlined } from "@ant-design/icons";
|
|
|
|
|
import { useParams, useHref, useNavigate, NavLink } from "react-router-dom";
|
|
|
|
|
import { isEmpty, formatColonTime } from "@/utils/commons";
|
|
|
|
|
import { OFFICEWEBVIEWERURL } from "@/config";
|
|
|
|
@ -12,20 +12,22 @@ import BackBtn from "@/components/BackBtn";
|
|
|
|
|
const AirticketPlan = props => {
|
|
|
|
|
const { coli_sn, gri_sn } = useParams();
|
|
|
|
|
const { travelAgencyId, loginToken, userId } = usingStorage();
|
|
|
|
|
const [getPlanDetail, planDetail, getGuestList, guestList, loading, postFlightDetail, postFlightCost, deleteFlightCost, getVeiPlanChange, veiPlanChangeTxt, postVeiFlightPlanConfirm, ticketIssuedNotifications] = airTicketStore(state => [
|
|
|
|
|
state.getPlanDetail,
|
|
|
|
|
state.planDetail,
|
|
|
|
|
state.getGuestList,
|
|
|
|
|
state.guestList,
|
|
|
|
|
state.loading,
|
|
|
|
|
state.postFlightDetail,
|
|
|
|
|
state.postFlightCost,
|
|
|
|
|
state.deleteFlightCost,
|
|
|
|
|
state.getVeiPlanChange,
|
|
|
|
|
state.veiPlanChangeTxt,
|
|
|
|
|
state.postVeiFlightPlanConfirm,
|
|
|
|
|
state.ticketIssuedNotifications,
|
|
|
|
|
]);
|
|
|
|
|
const [getPlanDetail, planDetail, getGuestList, guestList, loading, postFlightDetail, postFlightCost, deleteFlightCost, getVeiPlanChange, veiPlanChangeTxt, postVeiFlightPlanConfirm, ticketIssuedNotifications, delete_flight_info] =
|
|
|
|
|
airTicketStore(state => [
|
|
|
|
|
state.getPlanDetail,
|
|
|
|
|
state.planDetail,
|
|
|
|
|
state.getGuestList,
|
|
|
|
|
state.guestList,
|
|
|
|
|
state.loading,
|
|
|
|
|
state.postFlightDetail,
|
|
|
|
|
state.postFlightCost,
|
|
|
|
|
state.deleteFlightCost,
|
|
|
|
|
state.getVeiPlanChange,
|
|
|
|
|
state.veiPlanChangeTxt,
|
|
|
|
|
state.postVeiFlightPlanConfirm,
|
|
|
|
|
state.ticketIssuedNotifications,
|
|
|
|
|
state.delete_flight_info,
|
|
|
|
|
]);
|
|
|
|
|
const reservationUrl = `https://p9axztuwd7x8a7.mycht.cn/Service_BaseInfoWeb/FlightPlanDocx?GRI_SN=${gri_sn}&VEI_SN=${travelAgencyId}&token=${loginToken}`;
|
|
|
|
|
const reservationPreviewUrl = OFFICEWEBVIEWERURL + encodeURIComponent(reservationUrl);
|
|
|
|
|
const [form] = Form.useForm();
|
|
|
|
@ -279,7 +281,21 @@ const AirticketPlan = props => {
|
|
|
|
|
return {
|
|
|
|
|
key: item.id,
|
|
|
|
|
label: `${item.StartDate} ${item.FlightNo}(${item.FromAirport}${item.FlightStart}-${item.ToAirport}${item.FlightEnd})(${item.FlightCabin})`,
|
|
|
|
|
extra: `${item.GRI_No}-${item.WL}`,
|
|
|
|
|
extra: (
|
|
|
|
|
<Popconfirm
|
|
|
|
|
title="请确认要删除航班记录"
|
|
|
|
|
description=""
|
|
|
|
|
onConfirm={() => {
|
|
|
|
|
delete_flight_info(item.CLF_SN); //删除记录
|
|
|
|
|
getPlanDetail(travelAgencyId, gri_sn); //更新页面计划详情,含费用列表
|
|
|
|
|
}}
|
|
|
|
|
okText="是"
|
|
|
|
|
cancelText="否">
|
|
|
|
|
<Button type="dashed" size="small" disabled={item.Flightcost_AsJOSN.length == 0 ? false : true}>
|
|
|
|
|
删除
|
|
|
|
|
</Button>
|
|
|
|
|
</Popconfirm>
|
|
|
|
|
),
|
|
|
|
|
children: <Airticket_form airInfo={item} />,
|
|
|
|
|
};
|
|
|
|
|
})
|
|
|
|
@ -287,6 +303,7 @@ const AirticketPlan = props => {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 机票信息编辑表单 begin
|
|
|
|
|
|
|
|
|
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
|
|
|
const [isModalOpen_confirmInfo, setisModalOpen_confirmInfo] = useState(false);
|
|
|
|
|
const [isTicketType, setisTicketType] = useState(true);
|
|
|
|
@ -564,7 +581,7 @@ const AirticketPlan = props => {
|
|
|
|
|
|
|
|
|
|
<Row>
|
|
|
|
|
<Col md={24} lg={24} xxl={24} style={{ height: "100%" }}>
|
|
|
|
|
<iframe id="msdoc-iframe-reservation" title="msdoc-iframe-reservation" src={reservationPreviewUrl+'&v='+Math.random()} style={{ width: "100%", height: "600px" }}></iframe>
|
|
|
|
|
<iframe id="msdoc-iframe-reservation" title="msdoc-iframe-reservation" src={reservationPreviewUrl + "&v=" + Math.random()} style={{ width: "100%", height: "600px" }}></iframe>
|
|
|
|
|
<Button type="link" target="_blank" href={reservationUrl}>
|
|
|
|
|
下载
|
|
|
|
|
</Button>
|
|
|
|
@ -572,10 +589,27 @@ const AirticketPlan = props => {
|
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
|
|
<Row>
|
|
|
|
|
<Divider orientation="left">出票信息</Divider>
|
|
|
|
|
<Divider orientation="center">出票信息 {planDetail ? `${planDetail[0].GRI_No} - ${planDetail[0].WL}` : ""}</Divider>
|
|
|
|
|
<Col md={24} lg={24} xxl={24}>
|
|
|
|
|
<Collapse items={detail_items()} />
|
|
|
|
|
</Col>
|
|
|
|
|
<Col md={24} lg={24} xxl={24}>
|
|
|
|
|
<p style={{ textAlign: "right" }}>
|
|
|
|
|
<Popconfirm
|
|
|
|
|
title="请确认要增加航班记录"
|
|
|
|
|
description=""
|
|
|
|
|
onConfirm={() => {
|
|
|
|
|
postFlightDetail("", gri_sn, travelAgencyId, { FlightNo: "新的记录", FlightStatus: 1 }, []); //新增加一条记录
|
|
|
|
|
getPlanDetail(travelAgencyId, gri_sn); //计划详情,含费用列表
|
|
|
|
|
}}
|
|
|
|
|
okText="是"
|
|
|
|
|
cancelText="否">
|
|
|
|
|
<Button type="dashed" icon={<PlusOutlined />}>
|
|
|
|
|
新增航班记录
|
|
|
|
|
</Button>
|
|
|
|
|
</Popconfirm>
|
|
|
|
|
</p>
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
<Row>
|
|
|
|
|
<Divider orientation="left">计划变更</Divider>
|
|
|
|
|