diff --git a/src/main.jsx b/src/main.jsx
index 65bc461..ae01c95 100644
--- a/src/main.jsx
+++ b/src/main.jsx
@@ -42,7 +42,7 @@ const router = createBrowserRouter([
{ path: "reservation/:reservationId/print", element: },
{ path: "reservation/:reservationId/name-card", element: },
{ path: "feedback", element: },
- { path: "feedback/:feedbackId", element: },
+ { path: "feedback/:GRI_SN", element: },
]
},
{
diff --git a/src/stores/Feedback.js b/src/stores/Feedback.js
index a2c162d..45a34ec 100644
--- a/src/stores/Feedback.js
+++ b/src/stores/Feedback.js
@@ -9,6 +9,11 @@ class Feedback {
this.root = root;
}
+ loading = false;
+ feedbackList = []; //反馈列表
+ feedbackRate = []; //反馈评分
+ feedbackReview = []; //站外好评
+
/* 查询地接社的团列表
地接社sn
团名
@@ -24,7 +29,7 @@ class Feedback {
console.log(json);
runInAction(() => {
this.feedbackList = json.Result;
- this.loading = false;
+ this.loading = false;
});
})
.catch(error => {
@@ -33,8 +38,26 @@ class Feedback {
});
}
- loading = false;
- feedbackList = []; //反馈列表
+ /* 查询反馈表信息
+ GRI_SN 团SN
+ VEI_SN 供应商SN
+ */
+ getFeedbackDetail(VEI_SN, GRI_SN) {
+ let url = `/service-Cooperate/Cooperate/getFeedbackDetail`;
+ url += `?GRI_SN=${GRI_SN}&VEI_SN=${VEI_SN}`;
+ fetch(config.HT_HOST + url)
+ .then(response => response.json())
+ .then(json => {
+ console.log(json);
+ runInAction(() => {
+ this.feedbackRate = json.Result[0];
+ this.feedbackReview = json.Result1[0];
+ });
+ })
+ .catch(error => {
+ console.log("fetch data failed", error);
+ });
+ }
}
export default Feedback;
diff --git a/src/views/feedback/Detail.jsx b/src/views/feedback/Detail.jsx
index 7018bfe..2c5c07c 100644
--- a/src/views/feedback/Detail.jsx
+++ b/src/views/feedback/Detail.jsx
@@ -1,102 +1,136 @@
import { useParams, useNavigate } from "react-router-dom";
-import { useEffect } from "react";
+import { useEffect, useState } from "react";
import { observer } from "mobx-react";
import { toJS } from "mobx";
import moment from "moment";
-import { Row, Col, Space, Button, Table, Tag, Typography, DatePicker } from "antd";
+import { Row, Col, Space, Button, Divider, Form, Typography, Rate, Radio, Modal, Upload, Input } from "antd";
import { useStore } from "../../stores/StoreContext.js";
-const { Title } = Typography;
-
-const dataSource = [
- {
- key: "1",
- name: "2",
- age: "二",
- address: "5月2日",
- },
- {
- key: "2",
- name: "胡彦祖",
- age: 42,
- address: "西湖区湖底公园1号",
- },
-];
-
-const columns = [
- {
- title: "天数",
- dataIndex: "name",
- key: "name",
- },
- {
- title: "星期",
- dataIndex: "age",
- key: "age",
- },
- {
- title: "日期",
- dataIndex: "address",
- key: "address",
- },
- {
- title: "始发城市",
- dataIndex: "address",
- key: "address",
- },
- {
- title: "抵达城市",
- dataIndex: "address",
- key: "address",
- },
- {
- title: "交通",
- dataIndex: "address",
- key: "address",
- },
- {
- title: "酒店",
- dataIndex: "address",
- key: "address",
- },
- {
- title: "餐饮 [午、晚]",
- dataIndex: "address",
- key: "address",
- },
- {
- title: "景点及旅游服务安排",
- dataIndex: "address",
- key: "address",
- },
-];
+const { Title, Text, Paragraph } = Typography;
function Detail() {
const navigate = useNavigate();
- const { reservationId } = useParams();
- const { reservationStore } = useStore();
- const { reservationList } = reservationStore;
+ const { GRI_SN } = useParams();
+ const { feedbackStore } = useStore();
+ const { feedbackRate, feedbackReview } = feedbackStore;
+ const [value, setValue] = useState(3);
+ const desc = ["none", "Unacceptable", "Poor", "Fair", "Very Good", "Excellent"];
useEffect(() => {
- console.info("Detail.useEffect: " + reservationId);
- }, [reservationId]);
+ console.info("Detail.useEffect: " + GRI_SN);
+ feedbackStore.getFeedbackDetail(30008, GRI_SN);
+ }, [GRI_SN]);
+
+ const HWO_Guide = feedbackRate && feedbackRate.HWO_Guide ? feedbackRate.HWO_Guide : 0;
+ const HWO_Driver = feedbackRate && feedbackRate.HWO_Driver ? feedbackRate.HWO_Driver : 0;
+ const HWO_Car = feedbackRate && feedbackRate.HWO_Car ? feedbackRate.HWO_Car : 0;
+ const HWO_Hotel = feedbackRate && feedbackRate.HWO_Hotel ? feedbackRate.HWO_Hotel : 0;
+ const HWO_Activity = feedbackRate && feedbackRate.HWO_Activity ? feedbackRate.HWO_Activity : 0;
+ const OtherThoughts = feedbackRate && feedbackRate.OtherThoughts ? feedbackRate.OtherThoughts : "";
+ const PhotoPermission = feedbackRate && feedbackRate.PhotoPermission && feedbackRate.PhotoPermission == "YES" ? true : false;
return (
-
+
- Reservation Detail 中华游111029-N111025076
+ Post Survey - Albee221228017
navigate("/feedback")}>
- Return
+ Back
-
-
-
+
+
+
+
+
+
+ {desc[HWO_Guide]}
+
+
+
+
+
+
+ {desc[HWO_Driver]}
+
+
+
+
+
+
+ {desc[HWO_Car]}
+
+
+
+
+
+
+ {desc[HWO_Hotel]}
+
+
+
+
+
+ {desc[HWO_Activity]}
+
+
+ Would you like to give us permission to use the photos taken by the tour guide(s) during your trip which contain your portrait?
+
+ {PhotoPermission ? (
+ <>
+ Yes
+ No
+ >
+ ) : (
+ <>
+ Yes
+ No
+ >
+ )}
+
+ Other thoughts you want to share with us:
+ {OtherThoughts}
+
+
+
+
+
+
+ 地接社的反馈
+
+
+
+
+
+
+
+
+
+
+ 上传照片
+
+
+
+ {desc[HWO_Guide]}
+
+
+
+
+
+
+ {desc[HWO_Driver]}
+
+
+
+
);
diff --git a/src/views/feedback/Index.jsx b/src/views/feedback/Index.jsx
index 901fafa..29d4fee 100644
--- a/src/views/feedback/Index.jsx
+++ b/src/views/feedback/Index.jsx
@@ -5,6 +5,7 @@ import { toJS } from "mobx";
import { Row, Col, Space, Button, Table, Input, Typography, DatePicker, Radio } from "antd";
import { useStore } from "@/stores/StoreContext.js";
import * as config from "@/config";
+import * as comm from "@/utils/commons";
import dayjs from "dayjs";
const { Title } = Typography;
@@ -17,6 +18,7 @@ const feedbackListColumns = [
{
title: "离团日期",
dataIndex: "EOI_Date",
+ render: (text, record) => text,
},
{
title: "城市",
@@ -69,7 +71,7 @@ function Index() {
/>
- feedbackStore.searchFeedbackList(32531, referenceNo, selectedDateRange[0], selectedDateRange[1] + " 23:59")}>
+ feedbackStore.searchFeedbackList(30008, referenceNo, selectedDateRange[0], selectedDateRange[1] + " 23:59")}>
搜索