|
|
|
@ -1,9 +1,8 @@
|
|
|
|
|
import { useParams, useNavigate } from "react-router-dom";
|
|
|
|
|
import { useEffect, useState } from "react";
|
|
|
|
|
import { useEffect } from "react";
|
|
|
|
|
import { observer } from "mobx-react";
|
|
|
|
|
import { toJS, runInAction } from "mobx";
|
|
|
|
|
import moment from "moment";
|
|
|
|
|
import { Row, Col, Space, Button, Divider, Form, Typography, Rate, Radio, Modal, Upload, Input } from "antd";
|
|
|
|
|
import { Row, Col, Space, Button, Divider, Form, Typography, Rate, Radio, Upload, Input, App } from "antd";
|
|
|
|
|
import { useStore } from "../../stores/StoreContext.js";
|
|
|
|
|
import { PlusOutlined } from "@ant-design/icons";
|
|
|
|
|
const { Title, Text, Paragraph } = Typography;
|
|
|
|
@ -13,14 +12,18 @@ function Detail() {
|
|
|
|
|
const navigate = useNavigate();
|
|
|
|
|
const { GRI_SN } = useParams();
|
|
|
|
|
const { feedbackStore, authStore } = useStore();
|
|
|
|
|
const { feedbackRate, feedbackReview, feedbackImages } = feedbackStore;
|
|
|
|
|
const [value, setValue] = useState(3);
|
|
|
|
|
const { feedbackRate, feedbackReview, feedbackImages, feedbackInfo } = feedbackStore;
|
|
|
|
|
const desc = ["none", "Unacceptable", "Poor", "Fair", "Very Good", "Excellent"];
|
|
|
|
|
const { notification } = App.useApp();
|
|
|
|
|
const [form] = Form.useForm();
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
console.info("Detail.useEffect: " + GRI_SN);
|
|
|
|
|
feedbackStore.getFeedbackDetail(authStore.login.travelAgencyId, GRI_SN);
|
|
|
|
|
feedbackStore.getFeedbackImages(authStore.login.travelAgencyId, GRI_SN);
|
|
|
|
|
feedbackStore.getFeedbackInfo(authStore.login.travelAgencyId, GRI_SN).then(v => {
|
|
|
|
|
form.setFieldsValue({ info_content: v.EEF_Content });
|
|
|
|
|
});
|
|
|
|
|
}, [GRI_SN]);
|
|
|
|
|
|
|
|
|
|
const HWO_Guide = feedbackRate && feedbackRate.HWO_Guide ? feedbackRate.HWO_Guide : 0;
|
|
|
|
@ -53,6 +56,20 @@ function Detail() {
|
|
|
|
|
return true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const onFinish = values => {
|
|
|
|
|
console.log("Success:", values);
|
|
|
|
|
if (values) {
|
|
|
|
|
feedbackStore.postFeedbackInfo(feedbackInfo.EEF_VEI_SN, feedbackInfo.EEF_GRI_SN, feedbackInfo.EEF_EOI_SN, values.info_content).then(() => {
|
|
|
|
|
notification.success({
|
|
|
|
|
message: `Notification`,
|
|
|
|
|
description: "提交成功",
|
|
|
|
|
placement: "top",
|
|
|
|
|
duration: 4,
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Space direction="vertical" style={{ width: "100%" }}>
|
|
|
|
|
<Row gutter={16}>
|
|
|
|
@ -148,7 +165,7 @@ function Detail() {
|
|
|
|
|
<Row gutter={16}>
|
|
|
|
|
<Col span={4}></Col>
|
|
|
|
|
<Col span={18}>
|
|
|
|
|
<Form name="feedback_detail_from" labelCol={{ span: 5 }}>
|
|
|
|
|
<Form name="feedback_detail_from" onFinish={onFinish} labelCol={{ span: 5 }} form={form}>
|
|
|
|
|
<Divider orientation="left">上传照片</Divider>
|
|
|
|
|
<Form.Item>
|
|
|
|
|
<Upload
|
|
|
|
@ -166,19 +183,19 @@ function Detail() {
|
|
|
|
|
</div>
|
|
|
|
|
</Upload>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
|
|
|
|
|
<Divider orientation="left">地接社反馈信息</Divider>
|
|
|
|
|
<Form.Item
|
|
|
|
|
name="info_content"
|
|
|
|
|
rules={[
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: 'Please input your messages!',
|
|
|
|
|
message: "Please input your messages!",
|
|
|
|
|
},
|
|
|
|
|
]}>
|
|
|
|
|
<Input.TextArea name="info_content" rows={6}></Input.TextArea>
|
|
|
|
|
<Input.TextArea rows={6}></Input.TextArea>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item>
|
|
|
|
|
<Button type="primary" onClick={() =>feedbackStore.postFeedbackInfo()}>
|
|
|
|
|
<Button type="primary" htmlType="submit">
|
|
|
|
|
Submit
|
|
|
|
|
</Button>
|
|
|
|
|
</Form.Item>
|
|
|
|
|