|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
import { useState, useEffect } from "react";
|
|
|
|
|
import { Grid, Divider, Layout, Modal, Form, Input, Col, Row, Space, Collapse, Table, Button, Select, App, Popconfirm } from "antd";
|
|
|
|
|
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 { useParams, useHref, useNavigate, NavLink } from "react-router-dom";
|
|
|
|
|
import { isEmpty, formatColonTime } from "@/utils/commons";
|
|
|
|
@ -12,7 +12,7 @@ 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] = airTicketStore(state => [
|
|
|
|
|
const [getPlanDetail, planDetail, getGuestList, guestList, loading, postFlightDetail, postFlightCost, deleteFlightCost, getVeiPlanChange, veiPlanChangeTxt, postVeiFlightPlanConfirm, ticketIssuedNotifications] = airTicketStore(state => [
|
|
|
|
|
state.getPlanDetail,
|
|
|
|
|
state.planDetail,
|
|
|
|
|
state.getGuestList,
|
|
|
|
@ -24,6 +24,7 @@ const AirticketPlan = props => {
|
|
|
|
|
state.getVeiPlanChange,
|
|
|
|
|
state.veiPlanChangeTxt,
|
|
|
|
|
state.postVeiFlightPlanConfirm,
|
|
|
|
|
state.ticketIssuedNotifications,
|
|
|
|
|
]);
|
|
|
|
|
const reservationUrl = `https://p9axztuwd7x8a7.mycht.cn/Service_BaseInfoWeb/FlightPlanDocx?GRI_SN=${gri_sn}&VEI_SN=${travelAgencyId}&token=${loginToken}`;
|
|
|
|
|
const reservationPreviewUrl = OFFICEWEBVIEWERURL + encodeURIComponent(reservationUrl);
|
|
|
|
@ -42,7 +43,6 @@ const AirticketPlan = props => {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const guestList_OnChange = value => {
|
|
|
|
|
console.log(value);
|
|
|
|
|
ticket_form.setFieldsValue({ Memo: `${value}` });
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
@ -54,7 +54,7 @@ const AirticketPlan = props => {
|
|
|
|
|
dataIndex: "CostType",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "手续费/费用",
|
|
|
|
|
title: "手续费",
|
|
|
|
|
key: "ServiceFee",
|
|
|
|
|
dataIndex: "ServiceFee",
|
|
|
|
|
},
|
|
|
|
@ -97,8 +97,8 @@ const AirticketPlan = props => {
|
|
|
|
|
title: "编辑",
|
|
|
|
|
key: "CLC_SN",
|
|
|
|
|
dataIndex: "CLC_SN",
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<>
|
|
|
|
|
render: (text, record) =>
|
|
|
|
|
record.CheckStatus <= 2 ? (
|
|
|
|
|
<Space>
|
|
|
|
|
<a onClick={() => showModal(record)}>编辑</a>
|
|
|
|
|
<Popconfirm title="删除" description="请确认是否删除?" onConfirm={() => handleDelete(record.CLC_SN)} okText="是" cancelText="否">
|
|
|
|
@ -107,8 +107,9 @@ const AirticketPlan = props => {
|
|
|
|
|
</Button>
|
|
|
|
|
</Popconfirm>
|
|
|
|
|
</Space>
|
|
|
|
|
</>
|
|
|
|
|
),
|
|
|
|
|
) : (
|
|
|
|
|
record.CheckStatusName
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
@ -215,18 +216,46 @@ const AirticketPlan = props => {
|
|
|
|
|
<Form.Item label="备注" name="FlightMemo">
|
|
|
|
|
<Input.TextArea rows={5} />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item label="已出票" name="TicketIssued">
|
|
|
|
|
<Switch checkedChildren="是" unCheckedChildren="否" />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
|
|
|
|
|
<Form.Item
|
|
|
|
|
wrapperCol={{
|
|
|
|
|
offset: 14,
|
|
|
|
|
offset: 10,
|
|
|
|
|
span: 16,
|
|
|
|
|
}}>
|
|
|
|
|
<Space>
|
|
|
|
|
<Button type="primary" htmlType="submit">
|
|
|
|
|
保存机票信息
|
|
|
|
|
1. 保存机票信息
|
|
|
|
|
</Button>
|
|
|
|
|
<Button type="primary" onClick={() => showModal(airInfo)}>
|
|
|
|
|
2. 添加出票信息或费用
|
|
|
|
|
</Button>
|
|
|
|
|
<Button type="dashed" onClick={() => showModal(airInfo)}>
|
|
|
|
|
添加出票信息或费用
|
|
|
|
|
<Button
|
|
|
|
|
type="primary"
|
|
|
|
|
onClick={() => {
|
|
|
|
|
ticketIssuedNotifications(airInfo.CLF_SN, airInfo.OPI_SN)
|
|
|
|
|
.then(() => {
|
|
|
|
|
notification.success({
|
|
|
|
|
message: `成功`,
|
|
|
|
|
description: "提醒信息已发出!",
|
|
|
|
|
placement: "top",
|
|
|
|
|
duration: 4,
|
|
|
|
|
icon: <LikeTwoTone />,
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
notification.error({
|
|
|
|
|
message: `错误`,
|
|
|
|
|
description: "提醒失败",
|
|
|
|
|
placement: "top",
|
|
|
|
|
duration: 4,
|
|
|
|
|
icon: <FrownTwoTone />,
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}}>
|
|
|
|
|
3. 通知顾问
|
|
|
|
|
</Button>
|
|
|
|
|
</Space>
|
|
|
|
|
</Form.Item>
|
|
|
|
@ -250,6 +279,7 @@ 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}`,
|
|
|
|
|
children: <Airticket_form airInfo={item} />,
|
|
|
|
|
};
|
|
|
|
|
})
|
|
|
|
@ -534,7 +564,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} style={{ width: "100%", height: "600px" }}></iframe> */}
|
|
|
|
|
<iframe id="msdoc-iframe-reservation" title="msdoc-iframe-reservation" src={reservationPreviewUrl} style={{ width: "100%", height: "600px" }}></iframe>
|
|
|
|
|
<Button type="link" target="_blank" href={reservationUrl}>
|
|
|
|
|
下载
|
|
|
|
|
</Button>
|
|
|
|
@ -557,7 +587,7 @@ const AirticketPlan = props => {
|
|
|
|
|
onClick={() => {
|
|
|
|
|
showModal_confirmInfo(veiPlanChangeTxt && veiPlanChangeTxt.ChangeText);
|
|
|
|
|
}}
|
|
|
|
|
disabled={veiPlanChangeTxt && (isEmpty(veiPlanChangeTxt.ChangeText) ? true : false)}>
|
|
|
|
|
disabled={isEmpty(veiPlanChangeTxt) || isEmpty(veiPlanChangeTxt.ChangeText)}>
|
|
|
|
|
确认变更
|
|
|
|
|
</Button>
|
|
|
|
|
</Space>
|
|
|
|
|