|
|
|
|
@ -1,19 +1,19 @@
|
|
|
|
|
import { useState, useEffect } from "react";
|
|
|
|
|
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";
|
|
|
|
|
import useFormStore from "@/stores/Form";
|
|
|
|
|
import { useState, useEffect } from 'react';
|
|
|
|
|
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';
|
|
|
|
|
import useFormStore from '@/stores/Form';
|
|
|
|
|
const AirticketPlan = props => {
|
|
|
|
|
const [{agency, ...formValuesToSub}] = useFormStore(state => [state.formValuesToSub]);
|
|
|
|
|
const [{ agency, ...formValuesToSub }] = useFormStore(state => [state.formValuesToSub]);
|
|
|
|
|
const { coli_sn, gri_sn } = useParams();
|
|
|
|
|
const { travelAgencyId: myAgencyId, loginToken, userId } = usingStorage();
|
|
|
|
|
const travelAgencyId = agency; // || myAgencyId;
|
|
|
|
|
const travelAgencyId = agency; // || myAgencyId;
|
|
|
|
|
const [
|
|
|
|
|
getPlanDetail,
|
|
|
|
|
planDetail,
|
|
|
|
|
@ -60,7 +60,7 @@ const AirticketPlan = props => {
|
|
|
|
|
return (
|
|
|
|
|
guestList &&
|
|
|
|
|
guestList.map(item => {
|
|
|
|
|
return { label: `${item.MEI_Name} , ${item.MEI_PassportNo}`, value: `${item.MEI_Name} , ${item.MEI_PassportNo} , ${item.MEI_Country} , ${item.MEI_Gender} , ${item.MEI_age} , ${item.MEI_Birthday}` };
|
|
|
|
|
return { label: `${item.MEI_Name} , ${item.MEI_PassportNo}`, value: `${item.MEI_Name} , ${item.MEI_PassportNo} , ${item.MEI_Country} , ${item.MEI_Gender} , ${item.MEI_age} age , ${item.MEI_Birthday}(YYYY-MM-DD)` };
|
|
|
|
|
})
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
@ -81,62 +81,62 @@ const AirticketPlan = props => {
|
|
|
|
|
//费用列表
|
|
|
|
|
const costListColumns = [
|
|
|
|
|
{
|
|
|
|
|
title: "客人信息/备注",
|
|
|
|
|
key: "Memo",
|
|
|
|
|
dataIndex: "Memo",
|
|
|
|
|
title: '客人信息/备注',
|
|
|
|
|
key: 'Memo',
|
|
|
|
|
dataIndex: 'Memo',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "状态",
|
|
|
|
|
key: "CostType",
|
|
|
|
|
dataIndex: "CostType",
|
|
|
|
|
title: '状态',
|
|
|
|
|
key: 'CostType',
|
|
|
|
|
dataIndex: 'CostType',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "票号",
|
|
|
|
|
key: "TicketNo",
|
|
|
|
|
dataIndex: "TicketNo",
|
|
|
|
|
render: (text, record) => (record.CostType == "出票" ? text : "-"),
|
|
|
|
|
title: '票号',
|
|
|
|
|
key: 'TicketNo',
|
|
|
|
|
dataIndex: 'TicketNo',
|
|
|
|
|
render: (text, record) => (record.CostType == '出票' ? text : '-'),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "PNR",
|
|
|
|
|
key: "PNR",
|
|
|
|
|
dataIndex: "PNR",
|
|
|
|
|
render: (text, record) => (record.CostType == "出票" ? text : "-"),
|
|
|
|
|
title: 'PNR',
|
|
|
|
|
key: 'PNR',
|
|
|
|
|
dataIndex: 'PNR',
|
|
|
|
|
render: (text, record) => (record.CostType == '出票' ? text : '-'),
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
title: "机票类型",
|
|
|
|
|
key: "FlightType",
|
|
|
|
|
dataIndex: "FlightType",
|
|
|
|
|
render: (text, record) => (record.CostType == "出票" ? text : "-"),
|
|
|
|
|
title: '机票类型',
|
|
|
|
|
key: 'FlightType',
|
|
|
|
|
dataIndex: 'FlightType',
|
|
|
|
|
render: (text, record) => (record.CostType == '出票' ? text : '-'),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "机票价格",
|
|
|
|
|
key: "Cost",
|
|
|
|
|
dataIndex: "Cost",
|
|
|
|
|
render: (text, record) => (record.CostType == "出票" ? text : "-"),
|
|
|
|
|
title: '机票价格',
|
|
|
|
|
key: 'Cost',
|
|
|
|
|
dataIndex: 'Cost',
|
|
|
|
|
render: (text, record) => (record.CostType == '出票' ? text : '-'),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "服务费",
|
|
|
|
|
key: "ServiceFee",
|
|
|
|
|
dataIndex: "ServiceFee",
|
|
|
|
|
title: '服务费',
|
|
|
|
|
key: 'ServiceFee',
|
|
|
|
|
dataIndex: 'ServiceFee',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "折扣",
|
|
|
|
|
key: "Discount",
|
|
|
|
|
dataIndex: "Discount",
|
|
|
|
|
render: (text, record) => (record.CostType == "出票" ? text : "-"),
|
|
|
|
|
title: '折扣',
|
|
|
|
|
key: 'Discount',
|
|
|
|
|
dataIndex: 'Discount',
|
|
|
|
|
render: (text, record) => (record.CostType == '出票' ? text : '-'),
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
title: "编辑",
|
|
|
|
|
key: "CLC_SN",
|
|
|
|
|
dataIndex: "CLC_SN",
|
|
|
|
|
title: '编辑',
|
|
|
|
|
key: 'CLC_SN',
|
|
|
|
|
dataIndex: 'CLC_SN',
|
|
|
|
|
render: (text, record) =>
|
|
|
|
|
record.CheckStatus <= 2 ? (
|
|
|
|
|
<Space>
|
|
|
|
|
<a onClick={() => showModal(record)}>编辑</a>
|
|
|
|
|
<Popconfirm title="删除" description="请确认是否删除?" onConfirm={() => handleDelete(record.CLC_SN)} okText="是" cancelText="否">
|
|
|
|
|
<Button danger type="link">
|
|
|
|
|
<Popconfirm title='删除' description='请确认是否删除?' onConfirm={() => handleDelete(record.CLC_SN)} okText='是' cancelText='否'>
|
|
|
|
|
<Button danger type='link'>
|
|
|
|
|
删除
|
|
|
|
|
</Button>
|
|
|
|
|
</Popconfirm>
|
|
|
|
|
@ -154,7 +154,7 @@ const AirticketPlan = props => {
|
|
|
|
|
<>
|
|
|
|
|
<Form
|
|
|
|
|
// form={airinfo_form}
|
|
|
|
|
name={"ticket_form_" + airInfo.id}
|
|
|
|
|
name={'ticket_form_' + airInfo.id}
|
|
|
|
|
labelCol={{
|
|
|
|
|
span: 6,
|
|
|
|
|
}}
|
|
|
|
|
@ -167,8 +167,8 @@ const AirticketPlan = props => {
|
|
|
|
|
.then(() => {
|
|
|
|
|
notification.success({
|
|
|
|
|
message: `成功`,
|
|
|
|
|
description: "机票信息保存成功!",
|
|
|
|
|
placement: "top",
|
|
|
|
|
description: '机票信息保存成功!',
|
|
|
|
|
placement: 'top',
|
|
|
|
|
duration: 4,
|
|
|
|
|
icon: <LikeTwoTone />,
|
|
|
|
|
});
|
|
|
|
|
@ -176,104 +176,133 @@ const AirticketPlan = props => {
|
|
|
|
|
.catch(() => {
|
|
|
|
|
notification.error({
|
|
|
|
|
message: `错误`,
|
|
|
|
|
description: "保存失败",
|
|
|
|
|
placement: "top",
|
|
|
|
|
description: '保存失败',
|
|
|
|
|
placement: 'top',
|
|
|
|
|
duration: 4,
|
|
|
|
|
icon: <FrownTwoTone />,
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}}
|
|
|
|
|
autoComplete="off">
|
|
|
|
|
<Divider orientation="left">航班信息</Divider>
|
|
|
|
|
autoComplete='off'>
|
|
|
|
|
<Divider orientation='left'>航班信息</Divider>
|
|
|
|
|
<Row gutter={16}>
|
|
|
|
|
<Col md={24} lg={20} xxl={20}>
|
|
|
|
|
<Form.Item label="出发日期、航班、城市、时间" required>
|
|
|
|
|
<Form.Item label='出发日期、航班、城市、时间' required>
|
|
|
|
|
<Space>
|
|
|
|
|
<Form.Item name="StartDate" noStyle rules={[{ required: true, message: "请输入出发日期!" }]}>
|
|
|
|
|
<Form.Item name='StartDate' noStyle rules={[{ required: true, message: '请输入出发日期!' }]}>
|
|
|
|
|
<DatePicker
|
|
|
|
|
style={{
|
|
|
|
|
minWidth: 160,
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item name="FlightNo" noStyle rules={[{ required: true, message: "请输入航班号!" }]}>
|
|
|
|
|
<Input placeholder="航班号" />
|
|
|
|
|
<Form.Item name='FlightNo' noStyle rules={[{ required: true, message: '请输入航班号!' }]}>
|
|
|
|
|
<Input placeholder='航班号' />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item name="FromCity" noStyle rules={[{ required: true, message: "请输入出发城市!" }]}>
|
|
|
|
|
<Input placeholder="出发" />
|
|
|
|
|
<Form.Item name='FromCity' noStyle rules={[{ required: true, message: '请输入出发城市!' }]}>
|
|
|
|
|
<Input placeholder='出发' />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item name="FlightStart" noStyle rules={[{ required: true, message: "请输入出发时间!" }]}>
|
|
|
|
|
<Input placeholder="出发时间" />
|
|
|
|
|
<Form.Item name='FlightStart' noStyle rules={[{ required: true, message: '请输入出发时间!' }]}>
|
|
|
|
|
<Input placeholder='出发时间' />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
-
|
|
|
|
|
<Form.Item name="ToCity" noStyle rules={[{ required: true, message: "请输入抵达城市!" }]}>
|
|
|
|
|
<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 name='FlightEnd' noStyle rules={[{ required: true, message: '请输入抵达时间!' }]}>
|
|
|
|
|
<Input placeholder='抵达时间' />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Space>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item label="机场、航站楼、仓位、行李重量" required>
|
|
|
|
|
<Form.Item label='机场、航站楼、仓位、行李重量' required>
|
|
|
|
|
<Space>
|
|
|
|
|
<Form.Item name="FromAirport" noStyle rules={[{ required: true, message: "请输入出发机场!" }]}>
|
|
|
|
|
<Form.Item name='FromAirport' noStyle rules={[{ required: true, message: '请输入出发机场!' }]}>
|
|
|
|
|
<Select
|
|
|
|
|
showSearch
|
|
|
|
|
placeholder="出发机场"
|
|
|
|
|
placeholder='出发机场'
|
|
|
|
|
style={{
|
|
|
|
|
minWidth: 160,
|
|
|
|
|
}}
|
|
|
|
|
filterOption={(input, option) => (option?.label ?? "").toLowerCase().includes(input.toLowerCase())}
|
|
|
|
|
filterOption={(input, option) => (option?.label ?? '').toLowerCase().includes(input.toLowerCase())}
|
|
|
|
|
options={airPortList_select()}
|
|
|
|
|
/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item name="FromTerminal" noStyle rules={[{ required: true, message: "请输入出发航站楼!" }]}>
|
|
|
|
|
<Input placeholder="航站楼" />
|
|
|
|
|
<Form.Item name='FromTerminal' noStyle rules={[{ required: true, message: '请输入出发航站楼!' }]}>
|
|
|
|
|
<Input placeholder='航站楼' />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
-
|
|
|
|
|
<Form.Item name="ToAirport" noStyle rules={[{ required: true, message: "请输入抵达机场!" }]}>
|
|
|
|
|
<Form.Item name='ToAirport' noStyle rules={[{ required: true, message: '请输入抵达机场!' }]}>
|
|
|
|
|
<Select
|
|
|
|
|
showSearch
|
|
|
|
|
placeholder="抵达机场"
|
|
|
|
|
placeholder='抵达机场'
|
|
|
|
|
style={{
|
|
|
|
|
minWidth: 160,
|
|
|
|
|
}}
|
|
|
|
|
filterOption={(input, option) => (option?.label ?? "").toLowerCase().includes(input.toLowerCase())}
|
|
|
|
|
filterOption={(input, option) => (option?.label ?? '').toLowerCase().includes(input.toLowerCase())}
|
|
|
|
|
options={airPortList_select()}
|
|
|
|
|
/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item name="ToTerminal" noStyle rules={[{ required: true, message: "请输入抵达航站楼!" }]}>
|
|
|
|
|
<Input placeholder="航站楼" />
|
|
|
|
|
<Form.Item name='ToTerminal' noStyle rules={[{ required: true, message: '请输入抵达航站楼!' }]}>
|
|
|
|
|
<Input placeholder='航站楼' />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item name="FlightCabin" noStyle rules={[{ required: true, message: "请输入仓位!" }]}>
|
|
|
|
|
<Input placeholder="仓位" />
|
|
|
|
|
<Form.Item name='FlightCabin' noStyle rules={[{ required: true, message: '请输入仓位!' }]}>
|
|
|
|
|
{/* <Input placeholder="仓位" /> */}
|
|
|
|
|
<Select
|
|
|
|
|
showSearch
|
|
|
|
|
placeholder='仓位'
|
|
|
|
|
style={{
|
|
|
|
|
minWidth: 160,
|
|
|
|
|
}}
|
|
|
|
|
options={[
|
|
|
|
|
{
|
|
|
|
|
value: '经济舱 Economy class',
|
|
|
|
|
label: '经济舱 Economy class',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: '头等舱 first-class',
|
|
|
|
|
label: '头等舱 first-class',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: '高端经济舱 PremiumEconomy Class',
|
|
|
|
|
label: '高端经济舱 PremiumEconomy Class',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: '公务舱 Business class',
|
|
|
|
|
label: '公务舱 Business class',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: '来回程 round trip',
|
|
|
|
|
label: '来回程 round trip',
|
|
|
|
|
},
|
|
|
|
|
]}
|
|
|
|
|
/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item name="Baggage" noStyle>
|
|
|
|
|
<Input placeholder="行李说明 20KG" />
|
|
|
|
|
<Form.Item name='Baggage' noStyle>
|
|
|
|
|
<Input placeholder='行李说明 20KG' />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Space>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col md={24} lg={4} xxl={4}>
|
|
|
|
|
<Space direction="vertical">
|
|
|
|
|
<Form.Item name="TicketIssued">
|
|
|
|
|
<Switch checkedChildren="已处理" unCheckedChildren="未处理" />
|
|
|
|
|
<Space direction='vertical'>
|
|
|
|
|
<Form.Item name='TicketIssued'>
|
|
|
|
|
<Switch checkedChildren='已处理' unCheckedChildren='未处理' />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Button type="primary" htmlType="submit">
|
|
|
|
|
<Button type='primary' htmlType='submit'>
|
|
|
|
|
1. 保存机票信息
|
|
|
|
|
</Button>
|
|
|
|
|
</Space>
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
|
|
<Divider orientation="left">出票信息</Divider>
|
|
|
|
|
<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} />
|
|
|
|
|
<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)}>
|
|
|
|
|
<Space direction='vertical'>
|
|
|
|
|
<Button type='primary' onClick={() => showModal(airInfo)}>
|
|
|
|
|
2. 添加出票信息
|
|
|
|
|
</Button>
|
|
|
|
|
</Space>
|
|
|
|
|
@ -294,8 +323,8 @@ const AirticketPlan = props => {
|
|
|
|
|
.then(() => {
|
|
|
|
|
notification.success({
|
|
|
|
|
message: `成功`,
|
|
|
|
|
description: "提醒信息已发出!",
|
|
|
|
|
placement: "top",
|
|
|
|
|
description: '提醒信息已发出!',
|
|
|
|
|
placement: 'top',
|
|
|
|
|
duration: 4,
|
|
|
|
|
icon: <LikeTwoTone />,
|
|
|
|
|
});
|
|
|
|
|
@ -304,26 +333,26 @@ const AirticketPlan = props => {
|
|
|
|
|
.catch(() => {
|
|
|
|
|
notification.error({
|
|
|
|
|
message: `错误`,
|
|
|
|
|
description: "提醒失败",
|
|
|
|
|
placement: "top",
|
|
|
|
|
description: '提醒失败',
|
|
|
|
|
placement: 'top',
|
|
|
|
|
duration: 4,
|
|
|
|
|
icon: <FrownTwoTone />,
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}}
|
|
|
|
|
autoComplete="off">
|
|
|
|
|
<Divider orientation="left"></Divider>
|
|
|
|
|
autoComplete='off'>
|
|
|
|
|
<Divider orientation='left'></Divider>
|
|
|
|
|
<Row gutter={16}>
|
|
|
|
|
<Col md={24} lg={20} xxl={20}>
|
|
|
|
|
<Form.Item label="提醒信息" name="FlightMemo_messages">
|
|
|
|
|
<Input placeholder="没有提醒请留空,信息会抄送给上下站地接" />
|
|
|
|
|
<Form.Item label='提醒信息' name='FlightMemo_messages'>
|
|
|
|
|
<Input placeholder='没有提醒请留空,信息会抄送给上下站地接' />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item label="已发提醒" name="FlightMemo">
|
|
|
|
|
<Form.Item label='已发提醒' name='FlightMemo'>
|
|
|
|
|
<Input.TextArea rows={4} readOnly disabled />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col md={24} lg={4} xxl={4}>
|
|
|
|
|
<Button type="primary" htmlType="submit">
|
|
|
|
|
<Button type='primary' htmlType='submit'>
|
|
|
|
|
3. 通知顾问
|
|
|
|
|
</Button>
|
|
|
|
|
</Col>
|
|
|
|
|
@ -341,15 +370,15 @@ const AirticketPlan = props => {
|
|
|
|
|
label: `${item.StartDate} ${item.FlightNo}(${item.FromAirport}${item.FlightStart}-${item.ToAirport}${item.FlightEnd})(${item.FlightCabin})`,
|
|
|
|
|
extra: (
|
|
|
|
|
<Popconfirm
|
|
|
|
|
title="请确认要删除航班记录"
|
|
|
|
|
description=""
|
|
|
|
|
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}>
|
|
|
|
|
okText='是'
|
|
|
|
|
cancelText='否'>
|
|
|
|
|
<Button type='dashed' size='small' disabled={item.Flightcost_AsJOSN.length == 0 ? false : true}>
|
|
|
|
|
删除
|
|
|
|
|
</Button>
|
|
|
|
|
</Popconfirm>
|
|
|
|
|
@ -372,11 +401,11 @@ const AirticketPlan = props => {
|
|
|
|
|
const showModal = ticket => {
|
|
|
|
|
setIsModalOpen(true);
|
|
|
|
|
ticket_form.resetFields();
|
|
|
|
|
if (isEmpty(ticket.CostType)) ticket.CostType = "出票";
|
|
|
|
|
ticket.CostType == "出票" ? setisTicketType(true) : setisTicketType(false); //如果是出票类型,显示票号、折扣等选项
|
|
|
|
|
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: "" });
|
|
|
|
|
if (isEmpty(ticket.Memo)) ticket_form.setFieldsValue({ Memo: '' });
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const handleOk = (close_modal = true) => {
|
|
|
|
|
@ -384,13 +413,13 @@ const AirticketPlan = props => {
|
|
|
|
|
.validateFields()
|
|
|
|
|
.then(values => {
|
|
|
|
|
// 在这里处理表单提交逻辑,例如发送数据到服务器
|
|
|
|
|
console.log("Received values of form: ", values);
|
|
|
|
|
console.log('Received values of form: ', values);
|
|
|
|
|
postFlightCost(values)
|
|
|
|
|
.then(() => {
|
|
|
|
|
notification.success({
|
|
|
|
|
message: `成功`,
|
|
|
|
|
description: "保存成功!",
|
|
|
|
|
placement: "top",
|
|
|
|
|
description: '保存成功!',
|
|
|
|
|
placement: 'top',
|
|
|
|
|
duration: 4,
|
|
|
|
|
icon: <LikeTwoTone />,
|
|
|
|
|
});
|
|
|
|
|
@ -399,8 +428,8 @@ const AirticketPlan = props => {
|
|
|
|
|
.catch(() => {
|
|
|
|
|
notification.error({
|
|
|
|
|
message: `错误`,
|
|
|
|
|
description: "保存失败",
|
|
|
|
|
placement: "top",
|
|
|
|
|
description: '保存失败',
|
|
|
|
|
placement: 'top',
|
|
|
|
|
duration: 4,
|
|
|
|
|
icon: <FrownTwoTone />,
|
|
|
|
|
});
|
|
|
|
|
@ -408,7 +437,7 @@ const AirticketPlan = props => {
|
|
|
|
|
if (close_modal) setIsModalOpen(false);
|
|
|
|
|
})
|
|
|
|
|
.catch(info => {
|
|
|
|
|
console.log("Validate Failed:", info);
|
|
|
|
|
console.log('Validate Failed:', info);
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
@ -422,8 +451,8 @@ const AirticketPlan = props => {
|
|
|
|
|
.then(() => {
|
|
|
|
|
notification.success({
|
|
|
|
|
message: `成功`,
|
|
|
|
|
description: "删除成功!",
|
|
|
|
|
placement: "top",
|
|
|
|
|
description: '删除成功!',
|
|
|
|
|
placement: 'top',
|
|
|
|
|
duration: 4,
|
|
|
|
|
icon: <LikeTwoTone />,
|
|
|
|
|
});
|
|
|
|
|
@ -432,8 +461,8 @@ const AirticketPlan = props => {
|
|
|
|
|
.catch(() => {
|
|
|
|
|
notification.error({
|
|
|
|
|
message: `错误`,
|
|
|
|
|
description: "删除失败",
|
|
|
|
|
placement: "top",
|
|
|
|
|
description: '删除失败',
|
|
|
|
|
placement: 'top',
|
|
|
|
|
duration: 4,
|
|
|
|
|
icon: <FrownTwoTone />,
|
|
|
|
|
});
|
|
|
|
|
@ -441,7 +470,7 @@ const AirticketPlan = props => {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const onChangeType = value => {
|
|
|
|
|
if (value == "出票") {
|
|
|
|
|
if (value == '出票') {
|
|
|
|
|
setisTicketType(true);
|
|
|
|
|
} else {
|
|
|
|
|
setisTicketType(false);
|
|
|
|
|
@ -462,13 +491,13 @@ const AirticketPlan = props => {
|
|
|
|
|
confirmInfo_form
|
|
|
|
|
.validateFields()
|
|
|
|
|
.then(values => {
|
|
|
|
|
console.log("Received values of form: ", values.ConfirmInfo);
|
|
|
|
|
console.log('Received values of form: ', values.ConfirmInfo);
|
|
|
|
|
postVeiFlightPlanConfirm(travelAgencyId, gri_sn, userId, values.ConfirmInfo)
|
|
|
|
|
.then(() => {
|
|
|
|
|
notification.success({
|
|
|
|
|
message: `成功`,
|
|
|
|
|
description: "保存成功!",
|
|
|
|
|
placement: "top",
|
|
|
|
|
description: '保存成功!',
|
|
|
|
|
placement: 'top',
|
|
|
|
|
duration: 4,
|
|
|
|
|
icon: <LikeTwoTone />,
|
|
|
|
|
});
|
|
|
|
|
@ -477,8 +506,8 @@ const AirticketPlan = props => {
|
|
|
|
|
.catch(() => {
|
|
|
|
|
notification.error({
|
|
|
|
|
message: `错误`,
|
|
|
|
|
description: "保存失败",
|
|
|
|
|
placement: "top",
|
|
|
|
|
description: '保存失败',
|
|
|
|
|
placement: 'top',
|
|
|
|
|
duration: 4,
|
|
|
|
|
icon: <FrownTwoTone />,
|
|
|
|
|
});
|
|
|
|
|
@ -487,7 +516,7 @@ const AirticketPlan = props => {
|
|
|
|
|
setisModalOpen_confirmInfo(false);
|
|
|
|
|
})
|
|
|
|
|
.catch(info => {
|
|
|
|
|
console.log("Validate Failed:", info);
|
|
|
|
|
console.log('Validate Failed:', info);
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
@ -501,42 +530,42 @@ const AirticketPlan = props => {
|
|
|
|
|
}, []);
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Space direction="vertical" style={{ width: "100%" }}>
|
|
|
|
|
<Space direction='vertical' style={{ width: '100%' }}>
|
|
|
|
|
<Row>
|
|
|
|
|
<Col md={20} lg={20} xxl={20}></Col>
|
|
|
|
|
<Col md={4} lg={4} xxl={4}>
|
|
|
|
|
<BackBtn to={"/airticket"} />
|
|
|
|
|
<BackBtn to={'/airticket'} />
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
|
|
<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>
|
|
|
|
|
<Button type="link" target="_blank" href={reservationUrl}>
|
|
|
|
|
<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>
|
|
|
|
|
<Button type='link' target='_blank' href={reservationUrl}>
|
|
|
|
|
下载
|
|
|
|
|
</Button>
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
|
|
<Row>
|
|
|
|
|
<Divider orientation="center">{planDetail ? `${planDetail[0]?.GRI_No} - ${planDetail[0]?.WL}` : ""}</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" }}>
|
|
|
|
|
<p style={{ textAlign: 'right' }}>
|
|
|
|
|
<Popconfirm
|
|
|
|
|
title="请确认要增加航班记录"
|
|
|
|
|
description=""
|
|
|
|
|
title='请确认要增加航班记录'
|
|
|
|
|
description=''
|
|
|
|
|
onConfirm={async () => {
|
|
|
|
|
await postFlightDetail("", gri_sn, travelAgencyId, { FlightNo: "新的记录", FlightStatus: 1 }, []); //新增加一条记录
|
|
|
|
|
await postFlightDetail('', gri_sn, travelAgencyId, { FlightNo: '新的记录', FlightStatus: 1 }, []); //新增加一条记录
|
|
|
|
|
getPlanDetail(travelAgencyId, gri_sn); //计划详情,含费用列表
|
|
|
|
|
}}
|
|
|
|
|
okText="是"
|
|
|
|
|
cancelText="否">
|
|
|
|
|
<Button type="dashed" icon={<PlusOutlined />}>
|
|
|
|
|
okText='是'
|
|
|
|
|
cancelText='否'>
|
|
|
|
|
<Button type='dashed' icon={<PlusOutlined />}>
|
|
|
|
|
新增航班记录
|
|
|
|
|
</Button>
|
|
|
|
|
</Popconfirm>
|
|
|
|
|
@ -544,12 +573,12 @@ const AirticketPlan = props => {
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
<Row>
|
|
|
|
|
<Divider orientation="left">计划变更</Divider>
|
|
|
|
|
<Divider orientation='left'>计划变更</Divider>
|
|
|
|
|
<Col md={24} lg={12} xxl={12}>
|
|
|
|
|
<Space direction="vertical" style={{ width: "90%" }}>
|
|
|
|
|
<Space direction='vertical' style={{ width: '90%' }}>
|
|
|
|
|
<Input.TextArea rows={16} readOnly value={veiPlanChangeTxt && veiPlanChangeTxt.ChangeText} />
|
|
|
|
|
<Button
|
|
|
|
|
type="primary"
|
|
|
|
|
type='primary'
|
|
|
|
|
onClick={() => {
|
|
|
|
|
showModal_confirmInfo(veiPlanChangeTxt && veiPlanChangeTxt.ChangeText);
|
|
|
|
|
}}
|
|
|
|
|
@ -563,34 +592,34 @@ const AirticketPlan = props => {
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
|
|
<Modal title="变更" open={isModalOpen_confirmInfo} onOk={handleOk_confirmInfo} onCancel={handleCancel_confirmInfo}>
|
|
|
|
|
<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 }]}>
|
|
|
|
|
<Form.Item label='确认信息' name='ConfirmInfo' rules={[{ required: true }]}>
|
|
|
|
|
<Input.TextArea rows={4} />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Form>
|
|
|
|
|
</Modal>
|
|
|
|
|
|
|
|
|
|
<Modal
|
|
|
|
|
title="费用信息"
|
|
|
|
|
title='费用信息'
|
|
|
|
|
open={isModalOpen}
|
|
|
|
|
onOk={handleOk}
|
|
|
|
|
onCancel={handleCancel}
|
|
|
|
|
okText="保存"
|
|
|
|
|
cancelText="关闭"
|
|
|
|
|
okText='保存'
|
|
|
|
|
cancelText='关闭'
|
|
|
|
|
footer={(_, { OkBtn, CancelBtn }) => (
|
|
|
|
|
<>
|
|
|
|
|
<CancelBtn />
|
|
|
|
|
{isAddNew ? (
|
|
|
|
|
<>
|
|
|
|
|
<Button type="primary" onClick={() => handleOk(false)}>
|
|
|
|
|
<Button type='primary' onClick={() => handleOk(false)}>
|
|
|
|
|
添加并继续新增
|
|
|
|
|
</Button>{" "}
|
|
|
|
|
<Button type="primary" onClick={() => handleOk(true)}>
|
|
|
|
|
</Button>{' '}
|
|
|
|
|
<Button type='primary' onClick={() => handleOk(true)}>
|
|
|
|
|
添加并关闭
|
|
|
|
|
</Button>
|
|
|
|
|
</>
|
|
|
|
|
@ -604,7 +633,7 @@ const AirticketPlan = props => {
|
|
|
|
|
labelCol={{
|
|
|
|
|
span: 5,
|
|
|
|
|
}}>
|
|
|
|
|
<Form.Item label="状态" name="CostType">
|
|
|
|
|
<Form.Item label='状态' name='CostType'>
|
|
|
|
|
<Select
|
|
|
|
|
style={{
|
|
|
|
|
width: 160,
|
|
|
|
|
@ -612,16 +641,16 @@ const AirticketPlan = props => {
|
|
|
|
|
onChange={onChangeType}
|
|
|
|
|
options={[
|
|
|
|
|
{
|
|
|
|
|
value: "出票",
|
|
|
|
|
label: "出票",
|
|
|
|
|
value: '出票',
|
|
|
|
|
label: '出票',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: "改签",
|
|
|
|
|
label: "改签",
|
|
|
|
|
value: '改签',
|
|
|
|
|
label: '改签',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: "退票",
|
|
|
|
|
label: "退票",
|
|
|
|
|
value: '退票',
|
|
|
|
|
label: '退票',
|
|
|
|
|
},
|
|
|
|
|
]}
|
|
|
|
|
/>
|
|
|
|
|
@ -629,41 +658,41 @@ const AirticketPlan = props => {
|
|
|
|
|
|
|
|
|
|
{isTicketType && (
|
|
|
|
|
<>
|
|
|
|
|
<Form.Item label="PNR" name="PNR" rules={[{ required: true }]}>
|
|
|
|
|
<Form.Item label='PNR' name='PNR' rules={[{ required: true }]}>
|
|
|
|
|
<Input />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item label="票号" name="TicketNo" rules={[{ required: true }]}>
|
|
|
|
|
<Form.Item label='票号' name='TicketNo' rules={[{ required: true }]}>
|
|
|
|
|
<Input
|
|
|
|
|
style={{
|
|
|
|
|
width: 160,
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item label="机票类型" name="FlightType" rules={[{ required: true }]}>
|
|
|
|
|
<Form.Item label='机票类型' name='FlightType' rules={[{ required: true }]}>
|
|
|
|
|
<Select
|
|
|
|
|
style={{
|
|
|
|
|
width: 160,
|
|
|
|
|
}}
|
|
|
|
|
options={[
|
|
|
|
|
{
|
|
|
|
|
value: "成人",
|
|
|
|
|
label: "成人",
|
|
|
|
|
value: '成人',
|
|
|
|
|
label: '成人',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: "儿童",
|
|
|
|
|
label: "儿童",
|
|
|
|
|
value: '儿童',
|
|
|
|
|
label: '儿童',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: "婴儿",
|
|
|
|
|
label: "婴儿",
|
|
|
|
|
value: '婴儿',
|
|
|
|
|
label: '婴儿',
|
|
|
|
|
},
|
|
|
|
|
]}
|
|
|
|
|
/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item label="机票价格" name="Cost" rules={[{ required: true }]}>
|
|
|
|
|
<Form.Item label='机票价格' name='Cost' rules={[{ required: true }]}>
|
|
|
|
|
<Input
|
|
|
|
|
placeholder="含基建和税"
|
|
|
|
|
prefix="¥"
|
|
|
|
|
placeholder='含基建和税'
|
|
|
|
|
prefix='¥'
|
|
|
|
|
style={{
|
|
|
|
|
width: 160,
|
|
|
|
|
}}
|
|
|
|
|
@ -671,9 +700,9 @@ const AirticketPlan = props => {
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</>
|
|
|
|
|
)}
|
|
|
|
|
<Form.Item label="服务费" name="ServiceFee" rules={[{ required: true }]}>
|
|
|
|
|
<Form.Item label='服务费' name='ServiceFee' rules={[{ required: true }]}>
|
|
|
|
|
<Input
|
|
|
|
|
prefix="¥"
|
|
|
|
|
prefix='¥'
|
|
|
|
|
style={{
|
|
|
|
|
width: 160,
|
|
|
|
|
}}
|
|
|
|
|
@ -681,15 +710,15 @@ const AirticketPlan = props => {
|
|
|
|
|
</Form.Item>
|
|
|
|
|
{isTicketType && (
|
|
|
|
|
<>
|
|
|
|
|
<Form.Item label="折扣" name="Discount" rules={[{ required: true }]}>
|
|
|
|
|
<Form.Item label='折扣' name='Discount' rules={[{ required: true }]}>
|
|
|
|
|
<Input
|
|
|
|
|
style={{
|
|
|
|
|
width: 160,
|
|
|
|
|
}}
|
|
|
|
|
placeholder="如 0.9"
|
|
|
|
|
placeholder='如 0.9'
|
|
|
|
|
/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item label="选择客人" name="MEI_Name66">
|
|
|
|
|
<Form.Item label='选择客人' name='MEI_Name66'>
|
|
|
|
|
<Radio.Group
|
|
|
|
|
onChange={e => guestList_OnChange(e)}
|
|
|
|
|
style={{
|
|
|
|
|
@ -709,20 +738,20 @@ const AirticketPlan = props => {
|
|
|
|
|
</>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
<Form.Item label="客人信息/备注" name="Memo">
|
|
|
|
|
<Form.Item label='客人信息/备注' name='Memo'>
|
|
|
|
|
<Input.TextArea rows={4} disabled={isTicketType} />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
|
|
|
|
|
<Form.Item name="CLF_SN" hidden>
|
|
|
|
|
<Form.Item name='CLF_SN' hidden>
|
|
|
|
|
<input />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item name="GRI_SN" hidden>
|
|
|
|
|
<Form.Item name='GRI_SN' hidden>
|
|
|
|
|
<input />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item name="VEI_SN" hidden>
|
|
|
|
|
<Form.Item name='VEI_SN' hidden>
|
|
|
|
|
<input />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item name="CLC_SN" hidden>
|
|
|
|
|
<Form.Item name='CLC_SN' hidden>
|
|
|
|
|
<input />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Form>
|
|
|
|
|
|