From cbf99e271829f266301d4962fa679e892186354a Mon Sep 17 00:00:00 2001 From: YCC Date: Thu, 27 Jun 2024 16:11:39 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=94=B9=E4=B8=BAmodal=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E8=A1=A8=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/Airticket.js | 4 +- src/views/airticket/Plan.jsx | 327 ++++++++++++++++++++++++++--------- 2 files changed, 246 insertions(+), 85 deletions(-) diff --git a/src/stores/Airticket.js b/src/stores/Airticket.js index 6a393b9..e73711a 100644 --- a/src/stores/Airticket.js +++ b/src/stores/Airticket.js @@ -30,8 +30,8 @@ const airTicketStore = create((set, get) => ({ async getPlanDetail(vei_sn, gri_sn) { const { setPlanDetail } = get(); const searchParams = { - vei_sn: 6376, //vei_sn, - gri_sn: 369040, //gri_sn + vei_sn: 4272, //vei_sn, + gri_sn: 372928, //gri_sn }; const { errcode, result } = await fetchJSON(`${HT_HOST}/Service_BaseInfoWeb/GetFlightPlanDetail`, searchParams); const _result = errcode !== 0 ? [] : result; diff --git a/src/views/airticket/Plan.jsx b/src/views/airticket/Plan.jsx index 29ba956..02ed1ee 100644 --- a/src/views/airticket/Plan.jsx +++ b/src/views/airticket/Plan.jsx @@ -1,5 +1,5 @@ import { useState, useEffect } from "react"; -import { Grid, Divider, Layout, Form, Input, Col, Row, Space, Collapse, Table, Button } from "antd"; +import { Grid, Divider, Layout, Modal, Form, Input, Col, Row, Space, Collapse, Table, Button, Select, InputNumber, Typography } from "antd"; import { PhoneOutlined, CustomerServiceOutlined, AudioOutlined, ArrowUpOutlined, ArrowDownOutlined } from "@ant-design/icons"; import { useParams, useHref, useNavigate, NavLink } from "react-router-dom"; import { isEmpty, formatColonTime } from "@/utils/commons"; @@ -15,14 +15,96 @@ const AirticketPlan = props => { const reservationUrl = `https://p9axztuwd7x8a7.mycht.cn/Service_BaseInfoWeb/FlightPlanDocx?GRI_SN=${coli_sn}&VEI_SN=${travelAgencyId}`; const reservationPreviewUrl = OFFICEWEBVIEWERURL + encodeURIComponent(reservationUrl); - console.log(reservationPreviewUrl); + // console.log(reservationPreviewUrl); + + //乘客列表 + const guestListColumns = [ + { + title: "姓名", + key: "MEI_Name", + dataIndex: "MEI_Name", + }, + { + title: "证件类型", + key: "MEI_PassportType", + dataIndex: "MEI_PassportType", + }, + { + title: "证件号", + key: "MEI_PassportNo", + dataIndex: "MEI_PassportNo", + }, + { + title: "证件有效期", + key: "MEI_PassportValidDate", + dataIndex: "MEI_PassportValidDate", + }, + { + title: "性别", + key: "MEI_Gender", + dataIndex: "MEI_Gender", + }, + { + title: "年龄", + key: "MEI_age", + dataIndex: "MEI_age", + }, + { + title: "国籍", + key: "MEI_Country", + dataIndex: "MEI_Country", + }, + { + title: "票号", + key: "MEI_SN", + dataIndex: "MEI_SN", + }, + { + title: "PNR", + key: "MEI_SN", + dataIndex: "MEI_SN", + }, + { + title: "机票费用(RMB)含基建和税", + key: "MEI_SN", + dataIndex: "MEI_SN", + }, + { + title: "折扣", + key: "MEI_SN", + dataIndex: "MEI_SN", + }, + { + title: "手续费", + key: "MEI_SN", + dataIndex: "MEI_SN", + }, + { + title: "机票类型(成人/儿童/婴儿)", + key: "MEI_SN", + dataIndex: "MEI_SN", + }, + { + title: "操作", + key: "MEI_SN", + dataIndex: "MEI_SN", + render: (_, record) => { + return ( + + showModal(record)}>编辑 | console.log("del")}>删除 + + ); + }, + }, + ]; const Airticket_form = props => { const aitInfo = props.airInfo; return ( <>
{ // onFinish={onFinish} // onFinishFailed={onFinishFailed} autoComplete="off"> - - - - } value={aitInfo.FromCity} /> } value={aitInfo.ToCity} /> - + + @@ -74,18 +153,24 @@ const AirticketPlan = props => { - {/* - - */} + + + + + + + 费用列表 + - -
); }; @@ -102,73 +187,147 @@ const AirticketPlan = props => { : []; }; - const guestListColumns = [ - { - title: "姓名", - key: "MEI_Name", - dataIndex: "MEI_Name", - }, - { - title: "证件类型", - key: "MEI_PassportType", - dataIndex: "MEI_PassportType", - }, - { - title: "证件号", - key: "MEI_PassportNo", - dataIndex: "MEI_PassportNo", - }, - { - title: "证件有效期", - key: "MEI_PassportValidDate", - dataIndex: "MEI_PassportValidDate", - }, - { - title: "性别", - key: "MEI_Gender", - dataIndex: "MEI_Gender", - }, - { - title: "年龄", - key: "MEI_age", - dataIndex: "MEI_age", - }, - { - title: "国籍", - key: "MEI_Country", - dataIndex: "MEI_Country", - }, - { - title: "票号", - key: "MEI_SN", - dataIndex: "MEI_SN", - }, - { - title: "PNR", - key: "MEI_SN", - dataIndex: "MEI_SN", - }, - { - title: "机票费用(RMB)含基建和税", - key: "MEI_SN", - dataIndex: "MEI_SN", - }, - { - title: "折扣", - key: "MEI_SN", - dataIndex: "MEI_SN", - }, - { - title: "手续费", - key: "MEI_SN", - dataIndex: "MEI_SN", - }, - { - title: "机票类型(成人/儿童/婴儿)", - key: "MEI_SN", - dataIndex: "MEI_SN", - }, - ]; + // 机票信息编辑表单 begin + const [isModalOpen, setIsModalOpen] = useState(false); + const [ticket_form] = Form.useForm(); + + const showModal = ticket => { + setIsModalOpen(true); + ticket_form.setFieldsValue(ticket); + }; + + const handleOk = () => { + ticket_form + .validateFields() + .then(values => { + // 在这里处理表单提交逻辑,例如发送数据到服务器 + console.log("Received values of form: ", values); + ticket_form.resetFields(); + setIsModalOpen(false); + }) + .catch(info => { + console.log("Validate Failed:", info); + }); + }; + + const handleCancel = () => { + ticket_form.resetFields(); + setIsModalOpen(false); + }; + + const onChangeType = value => { + console.log(value); + }; + + const TicketModal = () => { + return ( + <> + +
+ + console.log("dsads")} + options={[ + { + value: "jack", + label: "成人", + }, + { + value: "lucy", + label: "儿童", + }, + { + value: "Yiminghe", + label: "婴儿", + }, + ]} + /> + + + + + + + + + + + + + + + + + + + + + + +
+ + ); + }; + + // 机票信息编辑表单 end useEffect(() => { getPlanDetail(travelAgencyId, coli_sn); @@ -190,7 +349,9 @@ const AirticketPlan = props => { + ); }; + export default AirticketPlan; From e5407d6fa0448bfd77314045cb4bfad27a1266c4 Mon Sep 17 00:00:00 2001 From: YCC Date: Thu, 27 Jun 2024 16:52:51 +0800 Subject: [PATCH 2/4] fix --- src/views/airticket/Plan.jsx | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/src/views/airticket/Plan.jsx b/src/views/airticket/Plan.jsx index 02ed1ee..ea193fa 100644 --- a/src/views/airticket/Plan.jsx +++ b/src/views/airticket/Plan.jsx @@ -257,7 +257,6 @@ const AirticketPlan = props => { + + + + + + + + + + + + + + + - - - - - - - - - - - - - - From 2e49c01dac0be6ab83883221f752d8069e05d57a Mon Sep 17 00:00:00 2001 From: Jimmy Liow Date: Thu, 11 Jul 2024 16:45:49 +0800 Subject: [PATCH 3/4] =?UTF-8?q?fix:=20=E8=B4=A6=E5=8F=B7=E3=80=81=E8=A7=92?= =?UTF-8?q?=E8=89=B2=E4=BF=9D=E5=AD=98=E5=87=BA=E9=94=99=E4=B8=8D=E5=85=B3?= =?UTF-8?q?=E9=97=AD=E8=A1=A8=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/account/Management.jsx | 3 ++- src/views/account/RoleList.jsx | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/views/account/Management.jsx b/src/views/account/Management.jsx index 7081be3..f495de5 100644 --- a/src/views/account/Management.jsx +++ b/src/views/account/Management.jsx @@ -128,6 +128,7 @@ function Management() { const onAccountFinish = (values) => { saveOrUpdateAccount(values) .then(() => { + setAccountModalOpen(false) handelAccountSearch() }) .catch(ex => { @@ -224,7 +225,7 @@ function Management() { htmlType: 'submit', }} title={t('account:detail')} - open={isAccountModalOpen} onOk={() => setAccountModalOpen(false)} onCancel={() => setAccountModalOpen(false)} + open={isAccountModalOpen} onCancel={() => setAccountModalOpen(false)} destroyOnClose forceRender modalRender={(dom) => ( diff --git a/src/views/account/RoleList.jsx b/src/views/account/RoleList.jsx index 796aafe..5143081 100644 --- a/src/views/account/RoleList.jsx +++ b/src/views/account/RoleList.jsx @@ -132,6 +132,7 @@ function RoleList() { const onRoleFinish = (values) => { saveOrUpdateRole(values) .then(() => { + setRoleModalOpen(false) fetchRoleList() .then(r => { setRoleAllList(r) @@ -148,6 +149,7 @@ function RoleList() { } const onRoleFailed = (error) => { + console.log('Failed:', error) // form.resetFields() } @@ -160,7 +162,7 @@ function RoleList() { htmlType: 'submit', }} title={t('account:detail')} - open={isRoleModalOpen} onOk={() => setRoleModalOpen(false)} onCancel={() => setRoleModalOpen(false)} + open={isRoleModalOpen} onCancel={() => setRoleModalOpen(false)} destroyOnClose forceRender modalRender={(dom) => ( From 96c0e9f5169cd59535534c2045d9661cd7b46f1a Mon Sep 17 00:00:00 2001 From: Jimmy Liow Date: Thu, 11 Jul 2024 16:49:58 +0800 Subject: [PATCH 4/4] 2.0.0-alpha.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ac1a9b2..f2ea881 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "global-highlights-hub", "private": true, - "version": "2.0.0-alpha.0", + "version": "2.0.0-alpha.1", "type": "module", "scripts": { "dev": "vite",