From bde0e82ece382e9a78f98bdb9ef4407bda59d43f Mon Sep 17 00:00:00 2001 From: Ycc Date: Thu, 12 Sep 2024 15:38:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E4=B8=BA=E6=97=A5=E6=9C=9F=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/Airticket.js | 1 + src/views/airticket/Plan.jsx | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/stores/Airticket.js b/src/stores/Airticket.js index 6890a0e..454ebf4 100644 --- a/src/stores/Airticket.js +++ b/src/stores/Airticket.js @@ -53,6 +53,7 @@ const airTicketStore = create((set, get) => ({ for (const [key, value] of Object.entries(info_object)) { formData.set(key, value); //再用新值覆盖 } + formData.set('StartDate', dayjs(info_object.StartDate).format(DATE_FORMAT)); //再用新值覆盖 //是否出票的值,true、false变为1或0 formData.set("TicketIssued", info_object.TicketIssued ? 1 : 0); const postUrl = HT_HOST + "/Service_BaseInfoWeb/edit_or_new_flight_info"; diff --git a/src/views/airticket/Plan.jsx b/src/views/airticket/Plan.jsx index 90fe773..4e52fba 100644 --- a/src/views/airticket/Plan.jsx +++ b/src/views/airticket/Plan.jsx @@ -4,7 +4,7 @@ import { PhoneOutlined, FrownTwoTone, LikeTwoTone, ArrowUpOutlined, ArrowDownOut 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"; @@ -131,7 +131,7 @@ const AirticketPlan = props => { wrapperCol={{ span: 16, }} - initialValues={airInfo} + initialValues={{...airInfo,StartDate:dayjs(airInfo.StartDate)}} onFinish={values => { postFlightDetail(airInfo.CLF_SN, airInfo.GRI_SN, airInfo.VEI_SN, airInfo, values) .then(() => { @@ -168,7 +168,8 @@ const AirticketPlan = props => { - + {/* */} +