|
|
|
@ -1,10 +1,10 @@
|
|
|
|
|
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 { Checkbox, Divider, DatePicker, Modal, Form, Input, Col, Row, Space, Collapse, Table, Button, Select, App, Popconfirm, Switch, Radio, List } from "antd";
|
|
|
|
|
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";
|
|
|
|
|
|
|
|
|
|
import dayjs from "dayjs";
|
|
|
|
|
import airTicketStore from "@/stores/Airticket";
|
|
|
|
|
import { usingStorage } from "@/hooks/usingStorage";
|
|
|
|
|
import BackBtn from "@/components/BackBtn";
|
|
|
|
@ -12,7 +12,24 @@ 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 => [
|
|
|
|
|
const [
|
|
|
|
|
getPlanDetail,
|
|
|
|
|
planDetail,
|
|
|
|
|
getGuestList,
|
|
|
|
|
guestList,
|
|
|
|
|
loading,
|
|
|
|
|
postFlightDetail,
|
|
|
|
|
postFlightCost,
|
|
|
|
|
deleteFlightCost,
|
|
|
|
|
getVeiPlanChange,
|
|
|
|
|
veiPlanChangeTxt,
|
|
|
|
|
postVeiFlightPlanConfirm,
|
|
|
|
|
ticketIssuedNotifications,
|
|
|
|
|
delete_flight_info,
|
|
|
|
|
getAirPortList,
|
|
|
|
|
airPortList,
|
|
|
|
|
airLineList,
|
|
|
|
|
] = airTicketStore(state => [
|
|
|
|
|
state.getPlanDetail,
|
|
|
|
|
state.planDetail,
|
|
|
|
|
state.getGuestList,
|
|
|
|
@ -25,6 +42,10 @@ const AirticketPlan = props => {
|
|
|
|
|
state.veiPlanChangeTxt,
|
|
|
|
|
state.postVeiFlightPlanConfirm,
|
|
|
|
|
state.ticketIssuedNotifications,
|
|
|
|
|
state.delete_flight_info,
|
|
|
|
|
state.getAirPortList,
|
|
|
|
|
state.airPortList,
|
|
|
|
|
state.airLineList,
|
|
|
|
|
]);
|
|
|
|
|
const reservationUrl = `https://p9axztuwd7x8a7.mycht.cn/Service_BaseInfoWeb/FlightPlanDocx?GRI_SN=${gri_sn}&VEI_SN=${travelAgencyId}&token=${loginToken}`;
|
|
|
|
|
const reservationPreviewUrl = OFFICEWEBVIEWERURL + encodeURIComponent(reservationUrl);
|
|
|
|
@ -32,7 +53,7 @@ const AirticketPlan = props => {
|
|
|
|
|
const { notification } = App.useApp();
|
|
|
|
|
//console.log(reservationPreviewUrl);
|
|
|
|
|
|
|
|
|
|
//乘客列表
|
|
|
|
|
//乘客下拉列表
|
|
|
|
|
const guestList_select = () => {
|
|
|
|
|
return (
|
|
|
|
|
guestList &&
|
|
|
|
@ -42,21 +63,36 @@ const AirticketPlan = props => {
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const guestList_OnChange = value => {
|
|
|
|
|
ticket_form.setFieldsValue({ Memo: `${value}` });
|
|
|
|
|
const guestList_OnChange = e => {
|
|
|
|
|
ticket_form.setFieldsValue({ Memo: `${e.target.value}` });
|
|
|
|
|
};
|
|
|
|
|
//机场下拉列表
|
|
|
|
|
const airPortList_select = () => {
|
|
|
|
|
return (
|
|
|
|
|
airPortList &&
|
|
|
|
|
airPortList.map(item => {
|
|
|
|
|
return { label: `${item.AirPort_Code} - ${item.AirPort_Name}`, value: item.AirPort_Name };
|
|
|
|
|
})
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//费用列表
|
|
|
|
|
const costListColumns = [
|
|
|
|
|
{
|
|
|
|
|
title: "费用类型",
|
|
|
|
|
title: "客人信息/备注",
|
|
|
|
|
key: "Memo",
|
|
|
|
|
dataIndex: "Memo",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "状态",
|
|
|
|
|
key: "CostType",
|
|
|
|
|
dataIndex: "CostType",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "手续费",
|
|
|
|
|
key: "ServiceFee",
|
|
|
|
|
dataIndex: "ServiceFee",
|
|
|
|
|
title: "票号",
|
|
|
|
|
key: "TicketNo",
|
|
|
|
|
dataIndex: "TicketNo",
|
|
|
|
|
render: (text, record) => (record.CostType == "出票" ? text : "-"),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "PNR",
|
|
|
|
@ -64,12 +100,7 @@ const AirticketPlan = props => {
|
|
|
|
|
dataIndex: "PNR",
|
|
|
|
|
render: (text, record) => (record.CostType == "出票" ? text : "-"),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "票号",
|
|
|
|
|
key: "TicketNo",
|
|
|
|
|
dataIndex: "TicketNo",
|
|
|
|
|
render: (text, record) => (record.CostType == "出票" ? text : "-"),
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
title: "机票类型",
|
|
|
|
|
key: "FlightType",
|
|
|
|
@ -82,17 +113,18 @@ const AirticketPlan = props => {
|
|
|
|
|
dataIndex: "Cost",
|
|
|
|
|
render: (text, record) => (record.CostType == "出票" ? text : "-"),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "服务费",
|
|
|
|
|
key: "ServiceFee",
|
|
|
|
|
dataIndex: "ServiceFee",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "折扣",
|
|
|
|
|
key: "Discount",
|
|
|
|
|
dataIndex: "Discount",
|
|
|
|
|
render: (text, record) => (record.CostType == "出票" ? text : "-"),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "备注",
|
|
|
|
|
key: "Memo",
|
|
|
|
|
dataIndex: "Memo",
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
title: "编辑",
|
|
|
|
|
key: "CLC_SN",
|
|
|
|
@ -115,160 +147,176 @@ const AirticketPlan = props => {
|
|
|
|
|
|
|
|
|
|
const Airticket_form = props => {
|
|
|
|
|
const airInfo = props.airInfo;
|
|
|
|
|
const [airinfo_form] = Form.useForm();
|
|
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
|
<Row>
|
|
|
|
|
<Col md={4} lg={4} xxl={4}></Col>
|
|
|
|
|
<Col md={16} lg={16} xxl={16}>
|
|
|
|
|
<Divider orientation="left">航班信息</Divider>
|
|
|
|
|
<Form
|
|
|
|
|
name={"ticket_form_" + airInfo.id}
|
|
|
|
|
labelCol={{
|
|
|
|
|
span: 6,
|
|
|
|
|
}}
|
|
|
|
|
wrapperCol={{
|
|
|
|
|
span: 16,
|
|
|
|
|
}}
|
|
|
|
|
initialValues={airInfo}
|
|
|
|
|
onFinish={values => {
|
|
|
|
|
postFlightDetail(airInfo.CLF_SN, airInfo.GRI_SN, airInfo.VEI_SN, airInfo, values)
|
|
|
|
|
.then(() => {
|
|
|
|
|
notification.success({
|
|
|
|
|
message: `成功`,
|
|
|
|
|
description: "机票信息保存成功!",
|
|
|
|
|
placement: "top",
|
|
|
|
|
duration: 4,
|
|
|
|
|
icon: <LikeTwoTone />,
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
notification.error({
|
|
|
|
|
message: `错误`,
|
|
|
|
|
description: "保存失败",
|
|
|
|
|
placement: "top",
|
|
|
|
|
duration: 4,
|
|
|
|
|
icon: <FrownTwoTone />,
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}}
|
|
|
|
|
autoComplete="off">
|
|
|
|
|
<Form.Item label="城市">
|
|
|
|
|
<Form
|
|
|
|
|
form={airinfo_form}
|
|
|
|
|
name={"ticket_form_" + airInfo.id}
|
|
|
|
|
labelCol={{
|
|
|
|
|
span: 6,
|
|
|
|
|
}}
|
|
|
|
|
wrapperCol={{
|
|
|
|
|
span: 16,
|
|
|
|
|
}}
|
|
|
|
|
initialValues={{ ...airInfo, StartDate: dayjs(airInfo.StartDate) }}
|
|
|
|
|
onFinish={values => {
|
|
|
|
|
postFlightDetail(airInfo.CLF_SN, airInfo.GRI_SN, airInfo.VEI_SN, airInfo, values)
|
|
|
|
|
.then(() => {
|
|
|
|
|
notification.success({
|
|
|
|
|
message: `成功`,
|
|
|
|
|
description: "机票信息保存成功!",
|
|
|
|
|
placement: "top",
|
|
|
|
|
duration: 4,
|
|
|
|
|
icon: <LikeTwoTone />,
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
notification.error({
|
|
|
|
|
message: `错误`,
|
|
|
|
|
description: "保存失败",
|
|
|
|
|
placement: "top",
|
|
|
|
|
duration: 4,
|
|
|
|
|
icon: <FrownTwoTone />,
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}}
|
|
|
|
|
autoComplete="off">
|
|
|
|
|
<Divider orientation="left">航班信息</Divider>
|
|
|
|
|
<Row gutter={16}>
|
|
|
|
|
<Col md={24} lg={20} xxl={20}>
|
|
|
|
|
<Form.Item label="出发日期、航班、城市、时间" required>
|
|
|
|
|
<Space>
|
|
|
|
|
<Form.Item name="FromCity" noStyle>
|
|
|
|
|
<Input placeholder="出发" prefix={<ArrowUpOutlined />} />
|
|
|
|
|
<Form.Item name="StartDate" noStyle rules={[{ required: true, message: "请输入出发日期!" }]}>
|
|
|
|
|
<DatePicker
|
|
|
|
|
style={{
|
|
|
|
|
minWidth: 160,
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item name="ToCity" noStyle>
|
|
|
|
|
<Input placeholder="抵达" prefix={<ArrowDownOutlined />} />
|
|
|
|
|
<Form.Item name="FlightNo" noStyle rules={[{ required: true, message: "请输入航班号!" }]}>
|
|
|
|
|
<Input placeholder="航班号" />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Space>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
|
|
|
|
|
<Form.Item label="出发日期、航司、航班">
|
|
|
|
|
<Space>
|
|
|
|
|
<Form.Item name="StartDate" noStyle>
|
|
|
|
|
<Input placeholder="出发日期" />
|
|
|
|
|
<Form.Item name="FromCity" noStyle rules={[{ required: true, message: "请输入出发城市!" }]}>
|
|
|
|
|
<Input placeholder="出发" />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item name="FlightCompany" noStyle>
|
|
|
|
|
<Input placeholder="航空公司" />
|
|
|
|
|
<Form.Item name="FlightStart" noStyle rules={[{ required: true, message: "请输入出发时间!" }]}>
|
|
|
|
|
<Input placeholder="出发时间" />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item name="FlightNo" noStyle>
|
|
|
|
|
<Input placeholder="航班号" />
|
|
|
|
|
-
|
|
|
|
|
<Form.Item name="ToCity" noStyle rules={[{ required: true, message: "请输入抵达城市!" }]}>
|
|
|
|
|
<Input placeholder="抵达" />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item name="FlightEnd" noStyle rules={[{ required: true, message: "请输入抵达时间!" }]}>
|
|
|
|
|
<Input placeholder="抵达时间" />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Space>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item label="出发">
|
|
|
|
|
<Form.Item label="机场、航站楼、仓位、行李重量" required>
|
|
|
|
|
<Space>
|
|
|
|
|
<Form.Item name="FromAirport" noStyle>
|
|
|
|
|
<Input placeholder="机场" />
|
|
|
|
|
<Form.Item name="FromAirport" noStyle rules={[{ required: true, message: "请输入出发机场!" }]}>
|
|
|
|
|
<Select
|
|
|
|
|
showSearch
|
|
|
|
|
placeholder="出发机场"
|
|
|
|
|
style={{
|
|
|
|
|
minWidth: 160,
|
|
|
|
|
}}
|
|
|
|
|
filterOption={(input, option) => (option?.label ?? "").toLowerCase().includes(input.toLowerCase())}
|
|
|
|
|
options={airPortList_select()}
|
|
|
|
|
/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item name="FromTerminal" noStyle>
|
|
|
|
|
<Form.Item name="FromTerminal" noStyle rules={[{ required: true, message: "请输入出发航站楼!" }]}>
|
|
|
|
|
<Input placeholder="航站楼" />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item name="FlightStart" noStyle>
|
|
|
|
|
<Input placeholder="出发时间" />
|
|
|
|
|
-
|
|
|
|
|
<Form.Item name="ToAirport" noStyle rules={[{ required: true, message: "请输入抵达机场!" }]}>
|
|
|
|
|
<Select
|
|
|
|
|
showSearch
|
|
|
|
|
placeholder="抵达机场"
|
|
|
|
|
style={{
|
|
|
|
|
minWidth: 160,
|
|
|
|
|
}}
|
|
|
|
|
filterOption={(input, option) => (option?.label ?? "").toLowerCase().includes(input.toLowerCase())}
|
|
|
|
|
options={airPortList_select()}
|
|
|
|
|
/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Space>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item label="抵达">
|
|
|
|
|
<Space>
|
|
|
|
|
<Form.Item name="ToAirport" noStyle>
|
|
|
|
|
<Input placeholder="机场" />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item name="ToTerminal" noStyle>
|
|
|
|
|
<Form.Item name="ToTerminal" noStyle rules={[{ required: true, message: "请输入抵达航站楼!" }]}>
|
|
|
|
|
<Input placeholder="航站楼" />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item name="FlightEnd" noStyle>
|
|
|
|
|
<Input placeholder="抵达时间" />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Space>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
|
|
|
|
|
<Form.Item label="仓位和行李">
|
|
|
|
|
<Space>
|
|
|
|
|
<Form.Item name="FlightCabin" noStyle>
|
|
|
|
|
<Form.Item name="FlightCabin" noStyle rules={[{ required: true, message: "请输入仓位!" }]}>
|
|
|
|
|
<Input placeholder="仓位" />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item name="Baggage" noStyle>
|
|
|
|
|
<Input placeholder="行李说明" />
|
|
|
|
|
<Input placeholder="行李说明 20KG" />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Space>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item label="备注" name="FlightMemo">
|
|
|
|
|
<Input.TextArea rows={5} />
|
|
|
|
|
</Col>
|
|
|
|
|
<Col md={24} lg={4} xxl={4}>
|
|
|
|
|
<Space direction="vertical">
|
|
|
|
|
<Form.Item name="TicketIssued">
|
|
|
|
|
<Switch checkedChildren="已处理" unCheckedChildren="未处理" />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Button type="primary" htmlType="submit">
|
|
|
|
|
1. 保存机票信息
|
|
|
|
|
</Button>
|
|
|
|
|
</Space>
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
|
|
<Divider orientation="left">出票信息</Divider>
|
|
|
|
|
<Row gutter={16}>
|
|
|
|
|
<Col md={24} lg={20} xxl={20}>
|
|
|
|
|
<Table bordered={true} rowKey="CLC_SN" columns={costListColumns} dataSource={airInfo.Flightcost_AsJOSN} loading={loading} pagination={false} />
|
|
|
|
|
</Col>
|
|
|
|
|
<Col md={24} lg={4} xxl={4}>
|
|
|
|
|
<Space direction="vertical">
|
|
|
|
|
<Button type="primary" onClick={() => showModal(airInfo)}>
|
|
|
|
|
2. 添加出票信息
|
|
|
|
|
</Button>
|
|
|
|
|
</Space>
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
<Divider orientation="left"></Divider>
|
|
|
|
|
<Row gutter={16}>
|
|
|
|
|
<Col md={24} lg={20} xxl={20}>
|
|
|
|
|
<Form.Item label="提醒信息" name="FlightMemo_messages">
|
|
|
|
|
<Input placeholder="没有提醒请留空,信息会抄送给上下站地接" />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item label="已出票" name="TicketIssued">
|
|
|
|
|
<Switch checkedChildren="是" unCheckedChildren="否" />
|
|
|
|
|
<Form.Item label="已发提醒" name="FlightMemo">
|
|
|
|
|
<Input.TextArea rows={4} readOnly disabled />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
|
|
|
|
|
<Form.Item
|
|
|
|
|
wrapperCol={{
|
|
|
|
|
offset: 10,
|
|
|
|
|
span: 16,
|
|
|
|
|
</Col>
|
|
|
|
|
<Col md={24} lg={4} xxl={4}>
|
|
|
|
|
<Button
|
|
|
|
|
type="primary"
|
|
|
|
|
onClick={() => {
|
|
|
|
|
ticketIssuedNotifications(userId,airInfo.CLF_SN, airInfo.OPI_SN,airinfo_form.getFieldValue('FlightMemo_messages'))
|
|
|
|
|
.then(() => {
|
|
|
|
|
notification.success({
|
|
|
|
|
message: `成功`,
|
|
|
|
|
description: "提醒信息已发出!",
|
|
|
|
|
placement: "top",
|
|
|
|
|
duration: 4,
|
|
|
|
|
icon: <LikeTwoTone />,
|
|
|
|
|
});
|
|
|
|
|
airinfo_form.setFieldValue('FlightMemo_messages','')
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
notification.error({
|
|
|
|
|
message: `错误`,
|
|
|
|
|
description: "提醒失败",
|
|
|
|
|
placement: "top",
|
|
|
|
|
duration: 4,
|
|
|
|
|
icon: <FrownTwoTone />,
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}}>
|
|
|
|
|
<Space>
|
|
|
|
|
<Button type="primary" htmlType="submit">
|
|
|
|
|
1. 保存机票信息
|
|
|
|
|
</Button>
|
|
|
|
|
<Button type="primary" onClick={() => showModal(airInfo)}>
|
|
|
|
|
2. 添加出票信息或费用
|
|
|
|
|
</Button>
|
|
|
|
|
<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>
|
|
|
|
|
</Form>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col md={4} lg={4} xxl={4}></Col>
|
|
|
|
|
</Row>
|
|
|
|
|
<Row>
|
|
|
|
|
<Col md={24} lg={24} xxl={24}>
|
|
|
|
|
<Divider orientation="left">费用列表</Divider>
|
|
|
|
|
<Table bordered={true} rowKey="CLC_SN" columns={costListColumns} dataSource={airInfo.Flightcost_AsJOSN} loading={loading} pagination={false} />
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
3. 通知顾问
|
|
|
|
|
</Button>
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
</Form>
|
|
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
@ -279,7 +327,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,20 +349,25 @@ const AirticketPlan = props => {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 机票信息编辑表单 begin
|
|
|
|
|
|
|
|
|
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
|
|
|
const [isModalOpen_confirmInfo, setisModalOpen_confirmInfo] = useState(false);
|
|
|
|
|
const [isTicketType, setisTicketType] = useState(true);
|
|
|
|
|
const [isAddNew, setisAddNew] = useState(true); //是否是在新增费用信息
|
|
|
|
|
const [ticket_form] = Form.useForm();
|
|
|
|
|
const [confirmInfo_form] = Form.useForm();
|
|
|
|
|
|
|
|
|
|
const showModal = ticket => {
|
|
|
|
|
setIsModalOpen(true);
|
|
|
|
|
ticket_form.resetFields();
|
|
|
|
|
if (isEmpty(ticket.CostType)) ticket.CostType = "出票";
|
|
|
|
|
ticket.CostType == "出票" ? setisTicketType(true) : setisTicketType(false); //如果是出票类型,显示票号、折扣等选项
|
|
|
|
|
isEmpty(ticket.CLC_SN) ? setisAddNew(true) : setisAddNew(false); //如果是新增窗口
|
|
|
|
|
ticket_form.setFieldsValue(ticket);
|
|
|
|
|
if (isEmpty(ticket.Memo)) ticket_form.setFieldsValue({ Memo: "" });
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const handleOk = () => {
|
|
|
|
|
const handleOk = (close_modal = true) => {
|
|
|
|
|
ticket_form
|
|
|
|
|
.validateFields()
|
|
|
|
|
.then(values => {
|
|
|
|
@ -326,8 +393,7 @@ const AirticketPlan = props => {
|
|
|
|
|
icon: <FrownTwoTone />,
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
ticket_form.resetFields();
|
|
|
|
|
setIsModalOpen(false);
|
|
|
|
|
if (close_modal) setIsModalOpen(false);
|
|
|
|
|
})
|
|
|
|
|
.catch(info => {
|
|
|
|
|
console.log("Validate Failed:", info);
|
|
|
|
@ -370,120 +436,6 @@ const AirticketPlan = props => {
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const TicketModal = () => {
|
|
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
|
<Modal title="费用信息" open={isModalOpen} onOk={handleOk} onCancel={handleCancel}>
|
|
|
|
|
<Form
|
|
|
|
|
form={ticket_form}
|
|
|
|
|
labelCol={{
|
|
|
|
|
span: 5,
|
|
|
|
|
}}>
|
|
|
|
|
<Form.Item label="费用类型" name="CostType">
|
|
|
|
|
<Select
|
|
|
|
|
style={{
|
|
|
|
|
width: 160,
|
|
|
|
|
}}
|
|
|
|
|
onChange={onChangeType}
|
|
|
|
|
options={[
|
|
|
|
|
{
|
|
|
|
|
value: "出票",
|
|
|
|
|
label: "出票",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: "改签",
|
|
|
|
|
label: "改签",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: "退票",
|
|
|
|
|
label: "退票",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: "其它",
|
|
|
|
|
label: "其它",
|
|
|
|
|
},
|
|
|
|
|
]}
|
|
|
|
|
/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item label="手续费/费用" name="ServiceFee" rules={[{ required: true }]}>
|
|
|
|
|
<Input
|
|
|
|
|
prefix="¥"
|
|
|
|
|
style={{
|
|
|
|
|
width: 160,
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
{isTicketType && (
|
|
|
|
|
<>
|
|
|
|
|
<Form.Item label="PNR" name="PNR">
|
|
|
|
|
<Input />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item label="票号" name="TicketNo">
|
|
|
|
|
<Input />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item label="机票类型" name="FlightType">
|
|
|
|
|
<Select
|
|
|
|
|
style={{
|
|
|
|
|
width: 160,
|
|
|
|
|
}}
|
|
|
|
|
options={[
|
|
|
|
|
{
|
|
|
|
|
value: "成人",
|
|
|
|
|
label: "成人",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: "儿童",
|
|
|
|
|
label: "儿童",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: "婴儿",
|
|
|
|
|
label: "婴儿",
|
|
|
|
|
},
|
|
|
|
|
]}
|
|
|
|
|
/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item label="机票价格" name="Cost">
|
|
|
|
|
<Input
|
|
|
|
|
placeholder="含基建和税"
|
|
|
|
|
prefix="¥"
|
|
|
|
|
style={{
|
|
|
|
|
width: 160,
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item label="折扣" name="Discount">
|
|
|
|
|
<Input
|
|
|
|
|
style={{
|
|
|
|
|
width: 160,
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item label="选择客人" name="MEI_Name66">
|
|
|
|
|
<Select onChange={value => guestList_OnChange(value)} options={guestList_select()} />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</>
|
|
|
|
|
)}
|
|
|
|
|
<Form.Item label="备注" name="Memo">
|
|
|
|
|
<Input.TextArea rows={4} />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item name="CLF_SN" hidden>
|
|
|
|
|
<input />{" "}
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item name="GRI_SN" hidden>
|
|
|
|
|
<input />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item name="VEI_SN" hidden>
|
|
|
|
|
<input />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item name="CLC_SN" hidden>
|
|
|
|
|
<input />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Form>
|
|
|
|
|
</Modal>
|
|
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//变更确认表单
|
|
|
|
|
const showModal_confirmInfo = ConfirmInfo => {
|
|
|
|
|
setisModalOpen_confirmInfo(true);
|
|
|
|
@ -526,24 +478,6 @@ const AirticketPlan = props => {
|
|
|
|
|
console.log("Validate Failed:", info);
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
//确认变更的界面
|
|
|
|
|
const ConfirmInfoModal = () => {
|
|
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
|
<Modal title="变更" open={isModalOpen_confirmInfo} onOk={handleOk_confirmInfo} onCancel={handleCancel_confirmInfo}>
|
|
|
|
|
<Form
|
|
|
|
|
form={confirmInfo_form}
|
|
|
|
|
labelCol={{
|
|
|
|
|
span: 5,
|
|
|
|
|
}}>
|
|
|
|
|
<Form.Item label="确认信息" name="ConfirmInfo" rules={[{ required: true }]}>
|
|
|
|
|
<Input.TextArea rows={4} />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Form>
|
|
|
|
|
</Modal>
|
|
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 机票信息编辑表单 end
|
|
|
|
|
|
|
|
|
@ -551,6 +485,7 @@ const AirticketPlan = props => {
|
|
|
|
|
getPlanDetail(travelAgencyId, gri_sn); //计划详情,含费用列表
|
|
|
|
|
getGuestList(coli_sn); //客人列表
|
|
|
|
|
getVeiPlanChange(travelAgencyId, gri_sn); //计划变更信息
|
|
|
|
|
getAirPortList(); //获取机场信息
|
|
|
|
|
}, []);
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
@ -564,7 +499,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 + "&v=" + Math.random()} style={{ width: "100%", height: "600px" }}></iframe>
|
|
|
|
|
<Button type="link" target="_blank" href={reservationUrl}>
|
|
|
|
|
下载
|
|
|
|
|
</Button>
|
|
|
|
@ -572,16 +507,35 @@ 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}>
|
|
|
|
|
<br />
|
|
|
|
|
<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>
|
|
|
|
|
<Col md={24} lg={12} xxl={12}>
|
|
|
|
|
<Space direction="vertical" style={{ width: "90%" }}>
|
|
|
|
|
<Input.TextArea rows={4} readOnly value={veiPlanChangeTxt && veiPlanChangeTxt.ChangeText} />
|
|
|
|
|
<Input.TextArea rows={16} readOnly value={veiPlanChangeTxt && veiPlanChangeTxt.ChangeText} />
|
|
|
|
|
<Button
|
|
|
|
|
type="primary"
|
|
|
|
|
onClick={() => {
|
|
|
|
@ -597,8 +551,170 @@ const AirticketPlan = props => {
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
|
|
<TicketModal />
|
|
|
|
|
<ConfirmInfoModal />
|
|
|
|
|
<Modal title="变更" open={isModalOpen_confirmInfo} onOk={handleOk_confirmInfo} onCancel={handleCancel_confirmInfo}>
|
|
|
|
|
<Form
|
|
|
|
|
form={confirmInfo_form}
|
|
|
|
|
labelCol={{
|
|
|
|
|
span: 5,
|
|
|
|
|
}}>
|
|
|
|
|
<Form.Item label="确认信息" name="ConfirmInfo" rules={[{ required: true }]}>
|
|
|
|
|
<Input.TextArea rows={4} />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Form>
|
|
|
|
|
</Modal>
|
|
|
|
|
|
|
|
|
|
<Modal
|
|
|
|
|
title="费用信息"
|
|
|
|
|
open={isModalOpen}
|
|
|
|
|
onOk={handleOk}
|
|
|
|
|
onCancel={handleCancel}
|
|
|
|
|
okText="保存"
|
|
|
|
|
cancelText="关闭"
|
|
|
|
|
footer={(_, { OkBtn, CancelBtn }) => (
|
|
|
|
|
<>
|
|
|
|
|
<CancelBtn />
|
|
|
|
|
{isAddNew ? (
|
|
|
|
|
<>
|
|
|
|
|
<Button type="primary" onClick={() => handleOk(false)}>
|
|
|
|
|
添加并继续新增
|
|
|
|
|
</Button>{" "}
|
|
|
|
|
<Button type="primary" onClick={() => handleOk(true)}>
|
|
|
|
|
添加并关闭
|
|
|
|
|
</Button>
|
|
|
|
|
</>
|
|
|
|
|
) : (
|
|
|
|
|
<OkBtn />
|
|
|
|
|
)}
|
|
|
|
|
</>
|
|
|
|
|
)}>
|
|
|
|
|
<Form
|
|
|
|
|
form={ticket_form}
|
|
|
|
|
labelCol={{
|
|
|
|
|
span: 5,
|
|
|
|
|
}}>
|
|
|
|
|
<Form.Item label="状态" name="CostType">
|
|
|
|
|
<Select
|
|
|
|
|
style={{
|
|
|
|
|
width: 160,
|
|
|
|
|
}}
|
|
|
|
|
onChange={onChangeType}
|
|
|
|
|
options={[
|
|
|
|
|
{
|
|
|
|
|
value: "出票",
|
|
|
|
|
label: "出票",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: "改签",
|
|
|
|
|
label: "改签",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: "退票",
|
|
|
|
|
label: "退票",
|
|
|
|
|
},
|
|
|
|
|
]}
|
|
|
|
|
/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
|
|
|
|
|
{isTicketType && (
|
|
|
|
|
<>
|
|
|
|
|
<Form.Item label="PNR" name="PNR" rules={[{ required: true }]}>
|
|
|
|
|
<Input />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item label="票号" name="TicketNo" rules={[{ required: true }]}>
|
|
|
|
|
<Input
|
|
|
|
|
style={{
|
|
|
|
|
width: 160,
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item label="机票类型" name="FlightType" rules={[{ required: true }]}>
|
|
|
|
|
<Select
|
|
|
|
|
style={{
|
|
|
|
|
width: 160,
|
|
|
|
|
}}
|
|
|
|
|
options={[
|
|
|
|
|
{
|
|
|
|
|
value: "成人",
|
|
|
|
|
label: "成人",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: "儿童",
|
|
|
|
|
label: "儿童",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: "婴儿",
|
|
|
|
|
label: "婴儿",
|
|
|
|
|
},
|
|
|
|
|
]}
|
|
|
|
|
/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item label="机票价格" name="Cost" rules={[{ required: true }]}>
|
|
|
|
|
<Input
|
|
|
|
|
placeholder="含基建和税"
|
|
|
|
|
prefix="¥"
|
|
|
|
|
style={{
|
|
|
|
|
width: 160,
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</>
|
|
|
|
|
)}
|
|
|
|
|
<Form.Item label="服务费" name="ServiceFee" rules={[{ required: true }]}>
|
|
|
|
|
<Input
|
|
|
|
|
prefix="¥"
|
|
|
|
|
style={{
|
|
|
|
|
width: 160,
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
{isTicketType && (
|
|
|
|
|
<>
|
|
|
|
|
<Form.Item label="折扣" name="Discount" rules={[{ required: true }]}>
|
|
|
|
|
<Input
|
|
|
|
|
style={{
|
|
|
|
|
width: 160,
|
|
|
|
|
}}
|
|
|
|
|
placeholder="如 0.9"
|
|
|
|
|
/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item label="选择客人" name="MEI_Name66">
|
|
|
|
|
<Radio.Group
|
|
|
|
|
onChange={e => guestList_OnChange(e)}
|
|
|
|
|
style={{
|
|
|
|
|
minWidth: 320,
|
|
|
|
|
}}>
|
|
|
|
|
<List
|
|
|
|
|
bordered
|
|
|
|
|
dataSource={guestList_select()}
|
|
|
|
|
renderItem={item => (
|
|
|
|
|
<List.Item>
|
|
|
|
|
<Radio value={item.value}>{item.label}</Radio>
|
|
|
|
|
</List.Item>
|
|
|
|
|
)}></List>
|
|
|
|
|
</Radio.Group>
|
|
|
|
|
{/* <Select onChange={value => guestList_OnChange(value)} options={guestList_select()} placeholder="如果列表里面没有客人信息,请手动录到备注里" /> */}
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
<Form.Item label="客人信息/备注" name="Memo">
|
|
|
|
|
<Input.TextArea rows={4} disabled={isTicketType} />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
|
|
|
|
|
<Form.Item name="CLF_SN" hidden>
|
|
|
|
|
<input />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item name="GRI_SN" hidden>
|
|
|
|
|
<input />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item name="VEI_SN" hidden>
|
|
|
|
|
<input />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item name="CLC_SN" hidden>
|
|
|
|
|
<input />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Form>
|
|
|
|
|
</Modal>
|
|
|
|
|
</Space>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|