界面优化

perf/2025b
Ycc 1 year ago
parent 001ce6740d
commit 9c3cdd6ea6

@ -65,7 +65,7 @@ const planListColumns = [
render: text => formatColonTime(text),
},
{
title: "是否出票",
title: "是否处理",
key: "TicketIssued",
dataIndex: "TicketIssued",
render: (text, record) => record.TicketIssuedName,

@ -27,7 +27,7 @@ const Invoice = props => {
render: (text, record) => `${record.GRI_No} ${record.WL}`,
},
{
title: "费用类型",
title: "状态",
key: "CostType",
dataIndex: "CostType",
},
@ -98,7 +98,7 @@ const Invoice = props => {
render: (text, record) => (record.CostType == "出票" ? text : "-"),
},
{
title: "备注",
title: "客人信息/备注",
key: "Memo",
dataIndex: "Memo",
},

@ -1,5 +1,5 @@
import { useState, useEffect } from "react";
import { Grid, Divider, DatePicker, Modal, Form, Input, Col, Row, Space, Collapse, Table, Button, Select, App, Popconfirm, Switch } from "antd";
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";
@ -63,8 +63,8 @@ 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 = () => {
@ -79,15 +79,14 @@ const AirticketPlan = props => {
//
const costListColumns = [
{
title: "费用类型",
key: "CostType",
dataIndex: "CostType",
title: "客人信息/备注",
key: "Memo",
dataIndex: "Memo",
},
{
title: "PNR",
key: "PNR",
dataIndex: "PNR",
render: (text, record) => (record.CostType == "出票" ? text : "-"),
title: "状态",
key: "CostType",
dataIndex: "CostType",
},
{
title: "票号",
@ -95,6 +94,13 @@ const AirticketPlan = props => {
dataIndex: "TicketNo",
render: (text, record) => (record.CostType == "出票" ? text : "-"),
},
{
title: "PNR",
key: "PNR",
dataIndex: "PNR",
render: (text, record) => (record.CostType == "出票" ? text : "-"),
},
{
title: "机票类型",
key: "FlightType",
@ -118,11 +124,7 @@ const AirticketPlan = props => {
dataIndex: "Discount",
render: (text, record) => (record.CostType == "出票" ? text : "-"),
},
{
title: "备注",
key: "Memo",
dataIndex: "Memo",
},
{
title: "编辑",
key: "CLC_SN",
@ -147,74 +149,68 @@ const AirticketPlan = props => {
const airInfo = props.airInfo;
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, 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">
<Form.Item label="城市">
<Space>
<Form.Item name="FromCity" noStyle>
<Input placeholder="出发" prefix={<ArrowUpOutlined />} />
</Form.Item>
<Form.Item name="ToCity" noStyle>
<Input placeholder="抵达" prefix={<ArrowDownOutlined />} />
</Form.Item>
</Space>
</Form.Item>
<Form.Item label="出发日期、航班、航司" required>
<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="StartDate" noStyle rules={[{ required: true, message: "请输入出发日期!" }]}>
<DatePicker />
</Form.Item>
<Form.Item name="FlightNo" noStyle rules={[{ required: true, message: "请输入航班号!" }]}>
<Input placeholder="航班号" />
</Form.Item>
<Form.Item name="FlightCompany" noStyle>
<Select
showSearch
placeholder="航空公司"
<DatePicker
style={{
minWidth: 160,
}}
filterOption={(input, option) => (option?.label ?? "").toLowerCase().includes(input.toLowerCase())}
options={airLineList}
/>
</Form.Item>
<Form.Item name="FlightNo" noStyle rules={[{ required: true, message: "请输入航班号!" }]}>
<Input placeholder="航班号" />
</Form.Item>
<Form.Item name="FromCity" noStyle>
<Input placeholder="出发" />
</Form.Item>
<Form.Item name="FlightStart" noStyle rules={[{ required: true, message: "请输入出发时间!" }]}>
<Input placeholder="出发时间" />
</Form.Item>
-
<Form.Item name="ToCity" noStyle>
<Input placeholder="抵达" />
</Form.Item>
<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: "请输入出发机场!" }]}>
<Select
@ -230,13 +226,7 @@ const AirticketPlan = props => {
<Form.Item name="FromTerminal" noStyle>
<Input placeholder="航站楼" />
</Form.Item>
<Form.Item name="FlightStart" noStyle rules={[{ required: true, message: "请输入出发时间!" }]}>
<Input placeholder="出发时间" />
</Form.Item>
</Space>
</Form.Item>
<Form.Item label="抵达" required>
<Space>
-
<Form.Item name="ToAirport" noStyle rules={[{ required: true, message: "请输入抵达机场!" }]}>
<Select
showSearch
@ -251,14 +241,6 @@ const AirticketPlan = props => {
<Form.Item name="ToTerminal" noStyle>
<Input placeholder="航站楼" />
</Form.Item>
<Form.Item name="FlightEnd" noStyle rules={[{ required: true, message: "请输入抵达时间!" }]}>
<Input placeholder="抵达时间" />
</Form.Item>
</Space>
</Form.Item>
<Form.Item label="仓位和行李" required>
<Space>
<Form.Item name="FlightCabin" noStyle rules={[{ required: true, message: "请输入仓位!" }]}>
<Input placeholder="仓位" />
</Form.Item>
@ -267,62 +249,68 @@ const AirticketPlan = props => {
</Form.Item>
</Space>
</Form.Item>
<Form.Item label="备注" name="FlightMemo">
<Input.TextArea rows={5} />
</Form.Item>
<Form.Item label="已出票" name="TicketIssued">
<Switch checkedChildren="是" unCheckedChildren="否" />
<Input />
</Form.Item>
</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>
<Form.Item
wrapperCol={{
offset: 10,
span: 16,
<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}></Col>
<Col md={24} lg={4} xxl={4}>
<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 />,
});
});
}}>
<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>
</>
);
};
@ -474,7 +462,7 @@ const AirticketPlan = props => {
labelCol={{
span: 5,
}}>
<Form.Item label="费用类型" name="CostType">
<Form.Item label="状态" name="CostType">
<Select
style={{
width: 160,
@ -493,14 +481,6 @@ const AirticketPlan = props => {
value: "退票",
label: "退票",
},
{
value: "换开",
label: "换开",
},
{
value: "其它",
label: "其它",
},
]}
/>
</Form.Item>
@ -568,14 +548,29 @@ const AirticketPlan = props => {
/>
</Form.Item>
<Form.Item label="选择客人" name="MEI_Name66">
<Select onChange={value => guestList_OnChange(value)} options={guestList_select()} placeholder="如果列表里面没有客人信息,请手动录到备注里" />
<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} />
<Form.Item label="客人信息/备注" name="Memo">
<Input.TextArea rows={4} disabled={isTicketType} />
</Form.Item>
<Form.Item name="CLF_SN" hidden>
<input />
</Form.Item>
@ -675,7 +670,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>
@ -683,7 +678,7 @@ const AirticketPlan = props => {
</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>

Loading…
Cancel
Save