diff --git a/src/stores/Trainticket.js b/src/stores/Trainticket.js index 8f0a1bf..247649e 100644 --- a/src/stores/Trainticket.js +++ b/src/stores/Trainticket.js @@ -45,6 +45,8 @@ const trainTicketStore = create((set, get) => ({ }, async postFlightDetail(CLF_SN, GRI_SN, VEI_SN, original_values, info_object) { + console.log(original_values); + const formData = new FormData(); formData.append("CLF_SN", CLF_SN ? CLF_SN : ""); formData.append("GRI_SN", GRI_SN); diff --git a/src/views/airticket/Plan.jsx b/src/views/airticket/Plan.jsx index ee87d93..bd61d85 100644 --- a/src/views/airticket/Plan.jsx +++ b/src/views/airticket/Plan.jsx @@ -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 ( <>
{ +
+ +
{ + ticketIssuedNotifications(userId, airInfo.CLF_SN, airInfo.OPI_SN, values.FlightMemo_messages) + .then(() => { + notification.success({ + message: `成功`, + description: "提醒信息已发出!", + placement: "top", + duration: 4, + icon: , + }); + //airinfo_form.setFieldValue('FlightMemo_messages','') + }) + .catch(() => { + notification.error({ + message: `错误`, + description: "提醒失败", + placement: "top", + duration: 4, + icon: , + }); + }); + }} + autoComplete="off"> @@ -284,34 +317,11 @@ const AirticketPlan = props => { - + - @@ -342,7 +352,7 @@ const AirticketPlan = props => { ), - children: , + children: Airticket_form(item), }; }) : []; @@ -518,8 +528,8 @@ const AirticketPlan = props => { { - postFlightDetail("", gri_sn, travelAgencyId, { FlightNo: "新的记录", FlightStatus: 1 }, []); //新增加一条记录 + onConfirm={async () => { + await postFlightDetail("", gri_sn, travelAgencyId, { FlightNo: "新的记录", FlightStatus: 1 }, []); //新增加一条记录 getPlanDetail(travelAgencyId, gri_sn); //计划详情,含费用列表 }} okText="是" diff --git a/src/views/trainticket/index.jsx b/src/views/trainticket/index.jsx index cc6a295..b77c282 100644 --- a/src/views/trainticket/index.jsx +++ b/src/views/trainticket/index.jsx @@ -129,7 +129,7 @@ const Trainticket = props => { - +
`${record.id}-${record.GRI_SN}`} columns={planListColumns} dataSource={planList} loading={loading} pagination={{ defaultPageSize: 20, showTotal: showTotal }} /> diff --git a/src/views/trainticket/plan.jsx b/src/views/trainticket/plan.jsx index c8b978a..bdb2e50 100644 --- a/src/views/trainticket/plan.jsx +++ b/src/views/trainticket/plan.jsx @@ -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 ( <> { - + + + { + ticketIssuedNotifications(userId, trainInfo.CLF_SN, trainInfo.OPI_SN, values.FlightMemo_messages) + .then(() => { + notification.success({ + message: `成功`, + description: "提醒信息已发出!", + placement: "top", + duration: 4, + icon: , + }); + //todo: 在这里情况输入框的内容,还未实现 values.FlightMemo_messages = ""; + }) + .catch(() => { + notification.error({ + message: `错误`, + description: "提醒失败", + placement: "top", + duration: 4, + icon: , + }); + }); + }} + autoComplete="off"> + 出票完成通知 @@ -284,30 +314,7 @@ const TrainticketPlan = props => { - @@ -338,7 +345,7 @@ const TrainticketPlan = props => { ), - children: , + children: Trainticket_form(item), }; }) : []; @@ -516,8 +523,9 @@ const TrainticketPlan = props => { { - 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 => {

+ 计划变更
- +