From 395e2e44db1e55deb3f87a5b7ba4688e5c58173c Mon Sep 17 00:00:00 2001 From: Jimmy Liow Date: Tue, 9 Jul 2024 14:43:38 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=9B=A2=E8=AE=A1=E5=88=92=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E3=80=90=E6=9C=AA=E7=A1=AE=E8=AE=A4=E3=80=91=E6=90=9C?= =?UTF-8?q?=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/locales/en/group.json | 1 + public/locales/zh/group.json | 2 +- src/components/SearchForm.jsx | 10 +++++++++- src/stores/Reservation.js | 13 +++++++------ src/views/reservation/Newest.jsx | 3 ++- 5 files changed, 20 insertions(+), 9 deletions(-) diff --git a/public/locales/en/group.json b/public/locales/en/group.json index 4286b80..2083c6e 100644 --- a/public/locales/en/group.json +++ b/public/locales/en/group.json @@ -1,6 +1,7 @@ { "ArrivalDate": "Arrival Date", "RefNo": "Reference number", + "unconfirmed": "Unconfirmed", "Pax": "Pax", "Status": "Status", "City": "City", diff --git a/public/locales/zh/group.json b/public/locales/zh/group.json index 2f25071..5b18f89 100644 --- a/public/locales/zh/group.json +++ b/public/locales/zh/group.json @@ -1,6 +1,7 @@ { "ArrivalDate": "抵达日期", "RefNo": "团号", + "unconfirmed": "未确认", "Pax": "人数", "Status": "状态", "City": "城市", @@ -11,6 +12,5 @@ "ConfirmationDate": "确认日期", "ConfirmationDetails": "确认信息", "PNR": "旅客订座记录", - "#": "#" } diff --git a/src/components/SearchForm.jsx b/src/components/SearchForm.jsx index 1dcafe2..153677d 100644 --- a/src/components/SearchForm.jsx +++ b/src/components/SearchForm.jsx @@ -1,5 +1,5 @@ import { useEffect } from 'react'; -import { Form, Input, Row, Col, Select, DatePicker, Space, Button } from 'antd'; +import { Form, Input, Row, Col, Select, DatePicker, Space, Button, Checkbox } from 'antd'; import { objectMapper, at } from '@/utils/commons'; import { DATE_FORMAT, SMALL_DATETIME_FORMAT } from '@/config'; import useFormStore from '@/stores/Form'; @@ -301,6 +301,14 @@ function getFields(props) { , fieldProps?.dept?.col || 6 ), + item( + 'unconfirmed', + 99, + + {t('group:unconfirmed')} + , + fieldProps?.unconfirmed?.col || 2 + ), ]; baseChildren = baseChildren .map((x) => { diff --git a/src/stores/Reservation.js b/src/stores/Reservation.js index 8990ae7..f777162 100644 --- a/src/stores/Reservation.js +++ b/src/stores/Reservation.js @@ -91,17 +91,18 @@ const useReservationStore = create((set, get) => ({ })) }, - fetchReservationList: (formVal, current=1) => { + fetchReservationList: (formValues, current=1) => { const { travelAgencyId } = usingStorage() const { reservationPage } = get() // 设置为 0,后端会重新计算总数,当跳转第 X 页时可用原来的总数。 - const totalNum = current == 1 ? 0 : reservationPage.total; + const totalNum = current == 1 ? 0 : reservationPage.total + const notConfirmValue = formValues.notConfirm ? 1 : 0 const fetchUrl = prepareUrl(HT_HOST + '/service-cusservice/GetPlanSearchList') .append('VEI_SN', travelAgencyId) - .append('GroupNo', formVal.referenceNo) - .append('DateStart', formVal.startdate) - .append('DateEnd', formVal.enddate) - .append('NotConfirm', '')//status)// Todo: 待解决 + .append('GroupNo', formValues.referenceNo) + .append('DateStart', formValues.startdate) + .append('DateEnd', formValues.enddate) + .append('NotConfirm', notConfirmValue) .append('TotalNum', totalNum) .append('PageSize', reservationPage.size) .append('PageIndex', current) diff --git a/src/views/reservation/Newest.jsx b/src/views/reservation/Newest.jsx index b2330ab..9a02816 100644 --- a/src/views/reservation/Newest.jsx +++ b/src/views/reservation/Newest.jsx @@ -201,8 +201,9 @@ function Newest() {