|
|
|
@ -430,9 +430,133 @@ const AirticketPlan = props => {
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const TicketModal = () => {
|
|
|
|
|
//变更确认表单
|
|
|
|
|
const showModal_confirmInfo = ConfirmInfo => {
|
|
|
|
|
setisModalOpen_confirmInfo(true);
|
|
|
|
|
confirmInfo_form.setFieldsValue({ ConfirmInfo: ConfirmInfo });
|
|
|
|
|
};
|
|
|
|
|
const handleCancel_confirmInfo = () => {
|
|
|
|
|
setisModalOpen_confirmInfo(false);
|
|
|
|
|
confirmInfo_form.resetFields();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const handleOk_confirmInfo = () => {
|
|
|
|
|
confirmInfo_form
|
|
|
|
|
.validateFields()
|
|
|
|
|
.then(values => {
|
|
|
|
|
console.log("Received values of form: ", values.ConfirmInfo);
|
|
|
|
|
postVeiFlightPlanConfirm(travelAgencyId, gri_sn, userId, values.ConfirmInfo)
|
|
|
|
|
.then(() => {
|
|
|
|
|
notification.success({
|
|
|
|
|
message: `成功`,
|
|
|
|
|
description: "保存成功!",
|
|
|
|
|
placement: "top",
|
|
|
|
|
duration: 4,
|
|
|
|
|
icon: <LikeTwoTone />,
|
|
|
|
|
});
|
|
|
|
|
getVeiPlanChange(travelAgencyId, gri_sn);
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
notification.error({
|
|
|
|
|
message: `错误`,
|
|
|
|
|
description: "保存失败",
|
|
|
|
|
placement: "top",
|
|
|
|
|
duration: 4,
|
|
|
|
|
icon: <FrownTwoTone />,
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
confirmInfo_form.resetFields();
|
|
|
|
|
setisModalOpen_confirmInfo(false);
|
|
|
|
|
})
|
|
|
|
|
.catch(info => {
|
|
|
|
|
console.log("Validate Failed:", info);
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 机票信息编辑表单 end
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
getPlanDetail(travelAgencyId, gri_sn); //计划详情,含费用列表
|
|
|
|
|
getGuestList(coli_sn); //客人列表
|
|
|
|
|
getVeiPlanChange(travelAgencyId, gri_sn); //计划变更信息
|
|
|
|
|
getAirPortList(); //获取机场信息
|
|
|
|
|
}, []);
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
|
<Space direction="vertical" style={{ width: "100%" }}>
|
|
|
|
|
<Row>
|
|
|
|
|
<Col md={20} lg={20} xxl={20}></Col>
|
|
|
|
|
<Col md={4} lg={4} xxl={4}>
|
|
|
|
|
<BackBtn to={"/airticket"} />
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
|
|
<Row>
|
|
|
|
|
<Col md={24} lg={24} xxl={24} style={{ height: "100%" }}>
|
|
|
|
|
{/* <iframe id="msdoc-iframe-reservation" title="msdoc-iframe-reservation" src={reservationPreviewUrl + "&v=" + Math.random()} style={{ width: "100%", height: "600px" }}></iframe> */}
|
|
|
|
|
<Button type="link" target="_blank" href={reservationUrl}>
|
|
|
|
|
下载
|
|
|
|
|
</Button>
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
|
|
<Row>
|
|
|
|
|
<Divider orientation="center">{planDetail ? `${planDetail[0].GRI_No} - ${planDetail[0].WL}` : ""}</Divider>
|
|
|
|
|
<Col md={24} lg={24} xxl={24}>
|
|
|
|
|
<Collapse items={detail_items()} />
|
|
|
|
|
</Col>
|
|
|
|
|
|
|
|
|
|
<Col md={24} lg={24} xxl={24}>
|
|
|
|
|
<br />
|
|
|
|
|
<p style={{ textAlign: "right" }}>
|
|
|
|
|
<Popconfirm
|
|
|
|
|
title="请确认要增加航班记录"
|
|
|
|
|
description=""
|
|
|
|
|
onConfirm={() => {
|
|
|
|
|
postFlightDetail("", gri_sn, travelAgencyId, { FlightNo: "新的记录", FlightStatus: 1 }, []); //新增加一条记录
|
|
|
|
|
getPlanDetail(travelAgencyId, gri_sn); //计划详情,含费用列表
|
|
|
|
|
}}
|
|
|
|
|
okText="是"
|
|
|
|
|
cancelText="否">
|
|
|
|
|
<Button type="dashed" icon={<PlusOutlined />}>
|
|
|
|
|
新增航班记录
|
|
|
|
|
</Button>
|
|
|
|
|
</Popconfirm>
|
|
|
|
|
</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} />
|
|
|
|
|
<Button
|
|
|
|
|
type="primary"
|
|
|
|
|
onClick={() => {
|
|
|
|
|
showModal_confirmInfo(veiPlanChangeTxt && veiPlanChangeTxt.ChangeText);
|
|
|
|
|
}}
|
|
|
|
|
disabled={isEmpty(veiPlanChangeTxt) || isEmpty(veiPlanChangeTxt.ChangeText)}>
|
|
|
|
|
确认变更
|
|
|
|
|
</Button>
|
|
|
|
|
</Space>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col md={24} lg={12} xxl={12}>
|
|
|
|
|
<Input.TextArea rows={16} readOnly value={veiPlanChangeTxt && veiPlanChangeTxt.ConfirmInfo} />
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
|
|
<Modal title="变更" open={isModalOpen_confirmInfo} onOk={handleOk_confirmInfo} onCancel={handleCancel_confirmInfo}>
|
|
|
|
|
<Form
|
|
|
|
|
form={confirmInfo_form}
|
|
|
|
|
labelCol={{
|
|
|
|
|
span: 5,
|
|
|
|
|
}}>
|
|
|
|
|
<Form.Item label="确认信息" name="ConfirmInfo" rules={[{ required: true }]}>
|
|
|
|
|
<Input.TextArea rows={4} />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Form>
|
|
|
|
|
</Modal>
|
|
|
|
|
|
|
|
|
|
<Modal
|
|
|
|
|
title="费用信息"
|
|
|
|
|
open={isModalOpen}
|
|
|
|
@ -585,145 +709,6 @@ const AirticketPlan = props => {
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Form>
|
|
|
|
|
</Modal>
|
|
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//变更确认表单
|
|
|
|
|
const showModal_confirmInfo = ConfirmInfo => {
|
|
|
|
|
setisModalOpen_confirmInfo(true);
|
|
|
|
|
confirmInfo_form.setFieldsValue({ ConfirmInfo: ConfirmInfo });
|
|
|
|
|
};
|
|
|
|
|
const handleCancel_confirmInfo = () => {
|
|
|
|
|
setisModalOpen_confirmInfo(false);
|
|
|
|
|
confirmInfo_form.resetFields();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const handleOk_confirmInfo = () => {
|
|
|
|
|
confirmInfo_form
|
|
|
|
|
.validateFields()
|
|
|
|
|
.then(values => {
|
|
|
|
|
console.log("Received values of form: ", values.ConfirmInfo);
|
|
|
|
|
postVeiFlightPlanConfirm(travelAgencyId, gri_sn, userId, values.ConfirmInfo)
|
|
|
|
|
.then(() => {
|
|
|
|
|
notification.success({
|
|
|
|
|
message: `成功`,
|
|
|
|
|
description: "保存成功!",
|
|
|
|
|
placement: "top",
|
|
|
|
|
duration: 4,
|
|
|
|
|
icon: <LikeTwoTone />,
|
|
|
|
|
});
|
|
|
|
|
getVeiPlanChange(travelAgencyId, gri_sn);
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
notification.error({
|
|
|
|
|
message: `错误`,
|
|
|
|
|
description: "保存失败",
|
|
|
|
|
placement: "top",
|
|
|
|
|
duration: 4,
|
|
|
|
|
icon: <FrownTwoTone />,
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
confirmInfo_form.resetFields();
|
|
|
|
|
setisModalOpen_confirmInfo(false);
|
|
|
|
|
})
|
|
|
|
|
.catch(info => {
|
|
|
|
|
console.log("Validate Failed:", info);
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
//确认变更的界面
|
|
|
|
|
const ConfirmInfoModal = () => {
|
|
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
|
<Modal title="变更" open={isModalOpen_confirmInfo} onOk={handleOk_confirmInfo} onCancel={handleCancel_confirmInfo}>
|
|
|
|
|
<Form
|
|
|
|
|
form={confirmInfo_form}
|
|
|
|
|
labelCol={{
|
|
|
|
|
span: 5,
|
|
|
|
|
}}>
|
|
|
|
|
<Form.Item label="确认信息" name="ConfirmInfo" rules={[{ required: true }]}>
|
|
|
|
|
<Input.TextArea rows={4} />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Form>
|
|
|
|
|
</Modal>
|
|
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 机票信息编辑表单 end
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
getPlanDetail(travelAgencyId, gri_sn); //计划详情,含费用列表
|
|
|
|
|
getGuestList(coli_sn); //客人列表
|
|
|
|
|
getVeiPlanChange(travelAgencyId, gri_sn); //计划变更信息
|
|
|
|
|
getAirPortList(); //获取机场信息
|
|
|
|
|
}, []);
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Space direction="vertical" style={{ width: "100%" }}>
|
|
|
|
|
<Row>
|
|
|
|
|
<Col md={20} lg={20} xxl={20}></Col>
|
|
|
|
|
<Col md={4} lg={4} xxl={4}>
|
|
|
|
|
<BackBtn to={"/airticket"} />
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
|
|
<Row>
|
|
|
|
|
<Col md={24} lg={24} xxl={24} style={{ height: "100%" }}>
|
|
|
|
|
{/* <iframe id="msdoc-iframe-reservation" title="msdoc-iframe-reservation" src={reservationPreviewUrl + "&v=" + Math.random()} style={{ width: "100%", height: "600px" }}></iframe> */}
|
|
|
|
|
<Button type="link" target="_blank" href={reservationUrl}>
|
|
|
|
|
下载
|
|
|
|
|
</Button>
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
|
|
<Row>
|
|
|
|
|
<Divider orientation="center">{planDetail ? `${planDetail[0].GRI_No} - ${planDetail[0].WL}` : ""}</Divider>
|
|
|
|
|
<Col md={24} lg={24} xxl={24}>
|
|
|
|
|
<Collapse items={detail_items()} />
|
|
|
|
|
</Col>
|
|
|
|
|
|
|
|
|
|
<Col md={24} lg={24} xxl={24}>
|
|
|
|
|
<br />
|
|
|
|
|
<p style={{ textAlign: "right" }}>
|
|
|
|
|
<Popconfirm
|
|
|
|
|
title="请确认要增加航班记录"
|
|
|
|
|
description=""
|
|
|
|
|
onConfirm={() => {
|
|
|
|
|
postFlightDetail("", gri_sn, travelAgencyId, { FlightNo: "新的记录", FlightStatus: 1 }, []); //新增加一条记录
|
|
|
|
|
getPlanDetail(travelAgencyId, gri_sn); //计划详情,含费用列表
|
|
|
|
|
}}
|
|
|
|
|
okText="是"
|
|
|
|
|
cancelText="否">
|
|
|
|
|
<Button type="dashed" icon={<PlusOutlined />}>
|
|
|
|
|
新增航班记录
|
|
|
|
|
</Button>
|
|
|
|
|
</Popconfirm>
|
|
|
|
|
</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} />
|
|
|
|
|
<Button
|
|
|
|
|
type="primary"
|
|
|
|
|
onClick={() => {
|
|
|
|
|
showModal_confirmInfo(veiPlanChangeTxt && veiPlanChangeTxt.ChangeText);
|
|
|
|
|
}}
|
|
|
|
|
disabled={isEmpty(veiPlanChangeTxt) || isEmpty(veiPlanChangeTxt.ChangeText)}>
|
|
|
|
|
确认变更
|
|
|
|
|
</Button>
|
|
|
|
|
</Space>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col md={24} lg={12} xxl={12}>
|
|
|
|
|
<Input.TextArea rows={16} readOnly value={veiPlanChangeTxt && veiPlanChangeTxt.ConfirmInfo} />
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
|
|
<TicketModal />
|
|
|
|
|
<ConfirmInfoModal />
|
|
|
|
|
</Space>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|