Compare commits

...

6 Commits

Author SHA1 Message Date
Lei OT d0b9c83d45 perf: 地接首页先选年份再展示 10 hours ago
LiaoYijun 679d4e5bb4 2.1.0 11 hours ago
LiaoYijun 32b04d47e4 2.1.0-0 11 hours ago
Ycc f87e4a0b36 关闭打印输出 3 days ago
Ycc 21bda12098 Merge branch 'main' of github.com:hainatravel/GHHub 3 days ago
Ycc 6077c6b5ed 解决页面刷新表单重置问题
添加记录改为同步
3 days ago

@ -1,7 +1,7 @@
{
"name": "global-highlights-hub",
"private": true,
"version": "2.0.20",
"version": "2.1.0",
"type": "module",
"scripts": {
"dev": "vite",

@ -62,7 +62,7 @@ const SearchForm = ({ initialValue, onSubmit, onReset, onMounted, confirmText, f
dept: {
key: "dept",
transform: value => {
console.log(value);
//console.log(value);
return Array.isArray(value) ? value.map(ele => ele.key).join(",") : value ? value.value : "";
},
},

@ -145,13 +145,13 @@ const AirticketPlan = props => {
},
];
const Airticket_form = props => {
const airInfo = props.airInfo;
const [airinfo_form] = Form.useForm();
const Airticket_form = airInfo => {
// const airInfo = props.airInfo;
// const [airinfo_form] = Form.useForm();
return (
<>
<Form
form={airinfo_form}
// form={airinfo_form}
name={"ticket_form_" + airInfo.id}
labelCol={{
span: 6,
@ -277,6 +277,39 @@ const AirticketPlan = props => {
</Space>
</Col>
</Row>
</Form>
<Form
labelCol={{
span: 6,
}}
wrapperCol={{
span: 16,
}}
initialValues={{ ...airInfo }}
onFinish={values => {
ticketIssuedNotifications(userId, airInfo.CLF_SN, airInfo.OPI_SN, values.FlightMemo_messages)
.then(() => {
notification.success({
message: `成功`,
description: "提醒信息已发出!",
placement: "top",
duration: 4,
icon: <LikeTwoTone />,
});
//airinfo_form.setFieldValue('FlightMemo_messages','')
})
.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}>
@ -284,34 +317,11 @@ const AirticketPlan = props => {
<Input placeholder="没有提醒请留空,信息会抄送给上下站地接" />
</Form.Item>
<Form.Item label="已发提醒" name="FlightMemo">
<Input.TextArea rows={4} readOnly disabled />
<Input.TextArea rows={4} readOnly disabled />
</Form.Item>
</Col>
<Col md={24} lg={4} xxl={4}>
<Button
type="primary"
onClick={() => {
ticketIssuedNotifications(userId,airInfo.CLF_SN, airInfo.OPI_SN,airinfo_form.getFieldValue('FlightMemo_messages'))
.then(() => {
notification.success({
message: `成功`,
description: "提醒信息已发出!",
placement: "top",
duration: 4,
icon: <LikeTwoTone />,
});
airinfo_form.setFieldValue('FlightMemo_messages','')
})
.catch(() => {
notification.error({
message: `错误`,
description: "提醒失败",
placement: "top",
duration: 4,
icon: <FrownTwoTone />,
});
});
}}>
<Button type="primary" htmlType="submit">
3. 通知顾问
</Button>
</Col>
@ -342,7 +352,7 @@ const AirticketPlan = props => {
</Button>
</Popconfirm>
),
children: <Airticket_form airInfo={item} />,
children: Airticket_form(item),
};
})
: [];
@ -518,8 +528,8 @@ const AirticketPlan = props => {
<Popconfirm
title="请确认要增加航班记录"
description=""
onConfirm={() => {
postFlightDetail("", gri_sn, travelAgencyId, { FlightNo: "新的记录", FlightStatus: 1 }, []); //
onConfirm={async () => {
await postFlightDetail("", gri_sn, travelAgencyId, { FlightNo: "新的记录", FlightStatus: 1 }, []); //
getPlanDetail(travelAgencyId, gri_sn); //
}}
okText="是"

@ -136,7 +136,7 @@ function Detail() {
};
const handleChange = info => {
console.log(info);
//console.log(info);
let newFileList = [...info.fileList];
newFileList = newFileList.map(file => {
if (file.response && file.response.result) {
@ -148,7 +148,7 @@ function Detail() {
};
const handRemove = info => {
console.log(info);
//console.log(info);
removeFeedbackImages(info.url);
return true;
};

@ -21,11 +21,15 @@ function Detail() {
const { travelAgencyId } = usingStorage();
const handleGetAgencyProducts = async ({ pick_year, pick_agency, pick_state } = {}) => {
const year = pick_year || use_year || switchParams.use_year || dayjs().year();
const year = pick_year || use_year || switchParams.use_year ; //|| dayjs().year();
const agency = pick_agency || travel_agency_id || travelAgencyId;
const state = pick_state ?? audit_state;
const param = { travel_agency_id: agency, use_year: year, audit_state: state };
// console.log('', param)
// setEditingProduct({});
if (isEmpty(param.travel_agency_id) || isEmpty(param.use_year)) {
return false;
}
getAgencyProducts(param).catch((ex) => {
setLoading(false);
notification.error({

@ -1,6 +1,6 @@
import { useEffect, useState } from "react";
import { useParams, Link, useNavigate, useLocation } from "react-router-dom";
import { App, Button, Divider, Popconfirm, Select } from "antd";
import { App, Button, Divider, Popconfirm, Select, Typography } from "antd";
import { ReloadOutlined } from "@ant-design/icons";
import { useProductsAuditStatesMapVal } from "@/hooks/useProductsSets";
import { useTranslation } from "react-i18next";
@ -30,6 +30,7 @@ const Header = ({ refresh, ...props }) => {
const showEditA = !location.pathname.includes("edit");
const showAuditA = !location.pathname.includes("audit");
const { travel_agency_id, use_year, audit_state } = useParams();
// console.log('📕', travel_agency_id, use_year, audit_state )
const { travelAgencyId } = usingStorage();
const { t } = useTranslation();
const isPermitted = useAuthStore((state) => state.isPermitted);
@ -48,11 +49,12 @@ const Header = ({ refresh, ...props }) => {
const navigate = useNavigate();
const yearOptions = [];
const currentYear = switchParams.use_year || dayjs().year();
const currentYear = dayjs().year();
const baseYear = use_year
? Number(use_year === "all" ? currentYear : use_year)
: currentYear;
for (let i = currentYear - 5; i <= baseYear + 5; i++) {
? Number(use_year === "all" ? switchParams.use_year : use_year)
: switchParams.use_year;
// console.log('🔰', baseYear, )
for (let i = currentYear - 5; i <= (currentYear + 2); i++) {
yearOptions.push({ label: i, value: i });
}
@ -190,8 +192,8 @@ const Header = ({ refresh, ...props }) => {
return (
<div className="flex justify-end items-center gap-4 h-full">
<div className="grow">
<h2 className="m-0 leading-tight">
{/* <div className="grow"> */}
<h2 className="m-0 leading-tight me-auto flex items-center">
{isPermitted(PERM_PRODUCTS_OFFER_AUDIT) ? (
<VendorSelector
value={{
@ -212,10 +214,11 @@ const Header = ({ refresh, ...props }) => {
<Select
options={yearOptions}
variant={"borderless"}
className="w-24"
className={"w-24"}
size="large"
value={pickYear}
onChange={handleYearChange}
placeholder="年份"
/>
<Divider type={"vertical"} />
<AuditStateSelector
@ -233,8 +236,9 @@ const Header = ({ refresh, ...props }) => {
className="text-primary round-none"
icon={<ReloadOutlined />}
/>
{isEmpty(pickYear) && <Typography.Text type="danger" className="font-normal text-sm ms-1">请选择年份</Typography.Text>}
</h2>
</div>
{/* </div> */}
{/* todo: export, 审核完成之后才能导出 */}
<RequireAuth subject={PERM_PRODUCTS_OFFER_AUDIT}>
<Button size="small" onClick={handleDownload}>

@ -129,7 +129,7 @@ const Trainticket = props => {
<Row gutter={16}>
<Col md={24} lg={24} xxl={24}>
<Table bordered={true} rowKey="id" columns={planListColumns} dataSource={planList} loading={loading} pagination={{ defaultPageSize: 20, showTotal: showTotal }} />
<Table bordered={true} rowKey={record => `${record.id}-${record.GRI_SN}`} columns={planListColumns} dataSource={planList} loading={loading} pagination={{ defaultPageSize: 20, showTotal: showTotal }} />
<TableExportBtn btnTxt="导出计划" label={`出票计划`} {...{ columns: planListColumns, dataSource: planList }} />
</Col>
<Col md={24} lg={24} xxl={24}></Col>

@ -206,7 +206,7 @@ const Invoice = props => {
}}
onSubmit={(err, formVal, filedsVal) => {
getVEIFlightBill(travelAgencyId, formVal.referenceNo, formVal.invoiceCheckStatus, formVal.startdate, formVal.endtime);
console.log(vEIFlightBill);
//console.log(vEIFlightBill);
}}
/>

@ -46,7 +46,7 @@ const TrainticketPlan = props => {
]);
const reservationUrl = `https://p9axztuwd7x8a7.mycht.cn/Service_BaseInfoWeb/FlightPlanDocx?GRI_SN=${gri_sn}&VEI_SN=${travelAgencyId}&token=${loginToken}`;
const reservationPreviewUrl = OFFICEWEBVIEWERURL + encodeURIComponent(reservationUrl);
const [form] = Form.useForm();
// const [form] = Form.useForm();
const { notification } = App.useApp();
//
@ -74,7 +74,7 @@ const TrainticketPlan = props => {
city, //
] = record.split("|");
return {
value: name + "-" + pinyin,
value: name + "(" + pinyin + ")",
label: name,
};
});
@ -155,13 +155,10 @@ const TrainticketPlan = props => {
},
];
const Trainticket_form = props => {
const trainInfo = props.airInfo;
const [traininfo_form] = Form.useForm();
const Trainticket_form = trainInfo => {
return (
<>
<Form
form={traininfo_form}
name={"ticket_form_" + trainInfo.id}
labelCol={{
span: 6,
@ -273,7 +270,40 @@ const TrainticketPlan = props => {
</Space>
</Col>
</Row>
<Divider orientation="left"></Divider>
</Form>
<Form
labelCol={{
span: 6,
}}
wrapperCol={{
span: 16,
}}
initialValues={{ ...trainInfo }}
onFinish={values => {
ticketIssuedNotifications(userId, trainInfo.CLF_SN, trainInfo.OPI_SN, values.FlightMemo_messages)
.then(() => {
notification.success({
message: `成功`,
description: "提醒信息已发出!",
placement: "top",
duration: 4,
icon: <LikeTwoTone />,
});
//todo: values.FlightMemo_messages = "";
})
.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="上下站提醒信息" name="FlightMemo_messages">
@ -284,30 +314,7 @@ const TrainticketPlan = props => {
</Form.Item>
</Col>
<Col md={24} lg={4} xxl={4}>
<Button
type="primary"
onClick={() => {
ticketIssuedNotifications(userId, trainInfo.CLF_SN, trainInfo.OPI_SN, traininfo_form.getFieldValue("FlightMemo_messages"))
.then(() => {
notification.success({
message: `成功`,
description: "提醒信息已发出!",
placement: "top",
duration: 4,
icon: <LikeTwoTone />,
});
traininfo_form.setFieldValue("FlightMemo_messages", "");
})
.catch(() => {
notification.error({
message: `错误`,
description: "提醒失败",
placement: "top",
duration: 4,
icon: <FrownTwoTone />,
});
});
}}>
<Button type="primary" htmlType="submit">
3. 通知顾问
</Button>
</Col>
@ -338,7 +345,7 @@ const TrainticketPlan = props => {
</Button>
</Popconfirm>
),
children: <Trainticket_form airInfo={item} />,
children: Trainticket_form(item),
};
})
: [];
@ -449,7 +456,7 @@ const TrainticketPlan = props => {
confirmInfo_form
.validateFields()
.then(values => {
console.log("Received values of form: ", values.ConfirmInfo);
//console.log("Received values of form: ", values.ConfirmInfo);
postVeiFlightPlanConfirm(travelAgencyId, gri_sn, userId, values.ConfirmInfo)
.then(() => {
notification.success({
@ -516,8 +523,9 @@ const TrainticketPlan = props => {
<Popconfirm
title="请确认要增加车票记录"
description=""
onConfirm={() => {
postFlightDetail("", gri_sn, travelAgencyId, { FlightNo: "新的记录", FlightStatus: 1, ServiceType: 2 }, []); //
onConfirm={async () => {
const startDate = planDetail && planDetail.length > 0 && planDetail[planDetail.length - 1].StartDate ? planDetail[planDetail.length - 1].StartDate : "";
await postFlightDetail("", gri_sn, travelAgencyId, { FlightNo: "新的记录", FlightStatus: 1, ServiceType: 2 }, { StartDate: startDate }); //
getPlanDetail(travelAgencyId, gri_sn); //
}}
okText="是"
@ -529,11 +537,12 @@ const TrainticketPlan = props => {
</p>
</Col>
</Row>
<Row>
<Divider orientation="left">计划变更</Divider>
<Col md={24} lg={12} xxl={12}>
<Space direction="vertical" style={{ width: "90%" }}>
<Input.TextArea rows={16} readOnly value={veiPlanChangeTxt && veiPlanChangeTxt.ChangeText} />
<Input.TextArea rows={16} value={veiPlanChangeTxt && veiPlanChangeTxt.ChangeText} />
<Button
type="primary"
onClick={() => {
@ -560,7 +569,6 @@ const TrainticketPlan = props => {
</Form.Item>
</Form>
</Modal>
<Modal
title="费用信息"
open={isModalOpen}

Loading…
Cancel
Save