|
|
@ -8,6 +8,7 @@ import dayjs from "dayjs";
|
|
|
|
import trainTicketStore from "@/stores/Trainticket";
|
|
|
|
import trainTicketStore from "@/stores/Trainticket";
|
|
|
|
import { usingStorage } from "@/hooks/usingStorage";
|
|
|
|
import { usingStorage } from "@/hooks/usingStorage";
|
|
|
|
import BackBtn from "@/components/BackBtn";
|
|
|
|
import BackBtn from "@/components/BackBtn";
|
|
|
|
|
|
|
|
import { station_names } from "@/views/trainticket/station_name";
|
|
|
|
|
|
|
|
|
|
|
|
const TrainticketPlan = props => {
|
|
|
|
const TrainticketPlan = props => {
|
|
|
|
const { coli_sn, gri_sn } = useParams();
|
|
|
|
const { coli_sn, gri_sn } = useParams();
|
|
|
@ -58,6 +59,27 @@ const TrainticketPlan = props => {
|
|
|
|
);
|
|
|
|
);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const station_name_select = rawStr => {
|
|
|
|
|
|
|
|
const records = rawStr.split("@").filter(item => item); // 1. 按@分割记录(过滤空的首元素)
|
|
|
|
|
|
|
|
return records.map(record => {
|
|
|
|
|
|
|
|
// 按|分割字段(最多取前8个有效字段,忽略末尾空字段)
|
|
|
|
|
|
|
|
const [
|
|
|
|
|
|
|
|
abbreviation, // 缩写(如bjb)
|
|
|
|
|
|
|
|
name, // 站名(如北京北)
|
|
|
|
|
|
|
|
code, // 代码(如VAP)
|
|
|
|
|
|
|
|
pinyin, // 拼音(如beijingbei)
|
|
|
|
|
|
|
|
shortPinyin, // 简拼(如bjb)
|
|
|
|
|
|
|
|
sequence, // 序号(如0)
|
|
|
|
|
|
|
|
areaCode, // 区域代码(如0357)
|
|
|
|
|
|
|
|
city, // 城市(如北京)
|
|
|
|
|
|
|
|
] = record.split("|");
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
value: name + "-" + pinyin,
|
|
|
|
|
|
|
|
label: name,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const guestList_OnChange = e => {
|
|
|
|
const guestList_OnChange = e => {
|
|
|
|
ticket_form.setFieldsValue({ Memo: `${e.target.value}` });
|
|
|
|
ticket_form.setFieldsValue({ Memo: `${e.target.value}` });
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -194,14 +216,30 @@ const TrainticketPlan = props => {
|
|
|
|
<Form.Item label="出发站、抵达站" required>
|
|
|
|
<Form.Item label="出发站、抵达站" required>
|
|
|
|
<Space>
|
|
|
|
<Space>
|
|
|
|
<Form.Item name="FromAirport" noStyle rules={[{ required: true, message: "请输入出发站!" }]}>
|
|
|
|
<Form.Item name="FromAirport" noStyle rules={[{ required: true, message: "请输入出发站!" }]}>
|
|
|
|
<Input placeholder="出发" />
|
|
|
|
{/* <Input placeholder="出发" /> */}
|
|
|
|
|
|
|
|
<Select
|
|
|
|
|
|
|
|
placeholder="出发"
|
|
|
|
|
|
|
|
showSearch
|
|
|
|
|
|
|
|
style={{
|
|
|
|
|
|
|
|
minWidth: 160,
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
options={station_name_select(station_names)}
|
|
|
|
|
|
|
|
/>
|
|
|
|
</Form.Item>
|
|
|
|
</Form.Item>
|
|
|
|
<Form.Item name="FlightStart" noStyle rules={[{ required: true, message: "请输入出发时间!" }]}>
|
|
|
|
<Form.Item name="FlightStart" noStyle rules={[{ required: true, message: "请输入出发时间!" }]}>
|
|
|
|
<Input placeholder="出发时间" />
|
|
|
|
<Input placeholder="出发时间" />
|
|
|
|
</Form.Item>
|
|
|
|
</Form.Item>
|
|
|
|
-
|
|
|
|
-
|
|
|
|
<Form.Item name="ToAirport" noStyle rules={[{ required: true, message: "请输入抵达站!" }]}>
|
|
|
|
<Form.Item name="ToAirport" noStyle rules={[{ required: true, message: "请输入抵达站!" }]}>
|
|
|
|
<Input placeholder="抵达" />
|
|
|
|
{/* <Input placeholder="抵达" /> */}
|
|
|
|
|
|
|
|
<Select
|
|
|
|
|
|
|
|
placeholder="抵达"
|
|
|
|
|
|
|
|
showSearch
|
|
|
|
|
|
|
|
style={{
|
|
|
|
|
|
|
|
minWidth: 160,
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
options={station_name_select(station_names)}
|
|
|
|
|
|
|
|
/>
|
|
|
|
</Form.Item>
|
|
|
|
</Form.Item>
|
|
|
|
<Form.Item name="FlightEnd" noStyle rules={[{ required: true, message: "请输入抵达时间!" }]}>
|
|
|
|
<Form.Item name="FlightEnd" noStyle rules={[{ required: true, message: "请输入抵达时间!" }]}>
|
|
|
|
<Input placeholder="抵达时间" />
|
|
|
|
<Input placeholder="抵达时间" />
|
|
|
|