import { NavLink } from "react-router-dom"; import { useEffect, useState } from "react"; import { observer } from "mobx-react"; import { toJS } from "mobx"; import { Row, Col, Space, Button, Table, Divider, Typography, List, Descriptions, DatePicker, Card } from "antd"; import { useStore } from "@/stores/StoreContext.js"; import * as config from "@/config"; import * as comm from "@/utils/commons"; import dayjs from "dayjs"; import { usePDF } from "react-to-pdf"; const { Title } = Typography; function Index() { const { reportStore, authStore } = useStore(); const { search_date_start, search_date_end, vendorScoresData, productScoresData, commendScoresData } = reportStore; const evaluationScores = vendorScoresData.EvaluationScores ? vendorScoresData.EvaluationScores[0] : []; useEffect(() => {}, []); const columns_month = [ { title: "Date", dataIndex: "VMonth", key: "VMonth", }, { title: "Groups", dataIndex: "GroupsNum", key: "GroupsNum", }, { title: "Number of People", dataIndex: "PersonNum", key: "PersonNum", }, { title: "Transaction Amount(USD)", dataIndex: "AmountUSD", key: "AmountUSD", }, { title: "Evaluation Score", dataIndex: "EvaluationScore", key: "EvaluationScore", }, { title: "TP Reviews", dataIndex: "TPReviews", key: "TPReviews", }, { title: "TP Reviews Rate", dataIndex: "TPReviewRate", key: "TPReviewRate", }, { title: "Complaints", dataIndex: "Complaints", key: "Complaints", }, { title: "Complaint Rate", dataIndex: "ComplaintRate", key: "ComplaintRate", }, ]; const columns_dmc = [ { title: "Category", dataIndex: "Category", key: "Category", onCell: (_, index) => { if (index === 0) { return { rowSpan: 3, //colSpan:0, }; } if (index >= 1 && index <= 2) { return { rowSpan: 0, colSpan: 0, }; } }, }, { title: "Item", dataIndex: "Item", key: "Item", }, { title: "Your Scores", dataIndex: "Your Scores", key: "Your Scores", }, { title: "Final Scores", dataIndex: "Final Scores", key: "Final Scores", onCell: (_, index) => { if (index === 0) { return { rowSpan: 5, //合并五行 //colSpan: 5, }; } else { return { rowSpan: 0, //不显示其他数据 colSpan: 0, }; } }, }, ]; const columns_guide = [ { title: "导游", dataIndex: "TGI2_Name", key: "TGI2_Name", }, { title: "平均分", dataIndex: "VAverage", key: "VAverage", }, { title: "接团数", dataIndex: "ReceptionGroups", key: "ReceptionGroups", }, { title: "表扬数", dataIndex: "CommendNum", key: "CommendNum", }, { title: "表扬率", dataIndex: "CommendRate", key: "CommendRate", }, { title: "投诉数", dataIndex: "Complaints", key: "Complaints", }, { title: "投诉率", dataIndex: "ComplaintRate", key: "ComplaintRate", }, ]; const columns_commend = [ { title: "团号", dataIndex: "GRI_NO", key: "GRI_NO", }, { title: "对象", dataIndex: "ObjectName", key: "ObjectName", }, { title: "客人评论", dataIndex: "ECI_Content", key: "ECI_Content", }, ]; const dataSource_dmc = [ { key: "1", Category: "Category1", Item: "Item1", "Your Scores": "Your Scores1", "Final Scores": "Final Scores1", }, { key: "2", Category: "Category2", Item: "Item2", "Your Scores": "Your Scores2", "Final Scores": "Final Scores2", }, { key: "3", Category: "Category3", Item: "Item3", "Your Scores": "Your Scores3", "Final Scores": "Final Scores3", }, { key: "4", Category: "Category4", Item: "Item4", "Your Scores": "Your Scores4", "Final Scores": "Final Scores4", }, { key: "5", Category: "Category5", Item: "Item5", "Your Scores": "Your Scores5", "Final Scores": "Final Scores5", }, ]; const { toPDF, targetRef } = usePDF({ method: "save", filename: "GHH-Report.pdf", page: { margin: "3", format: "letter" }, //margin: Margin.SMALL, canvas: { mimeType: "image/jpeg", qualityRatio: 1 }, overrides: { pdf: { compress: true }, canvas: { useCORS: true } }, }); return ( <div></div> Select Date {evaluationScores.Groups} {evaluationScores.PersonNum} {evaluationScores.AmountUSD} {evaluationScores.EvaluationScore} {evaluationScores.TPReviews} {evaluationScores.TPReviewRate} {evaluationScores.Complaints} {evaluationScores.ComplaintRate} Monthly Data 地接考核分数 Final Scores: {evaluationScores.FinalScores}
Customer Satisfaction 3 scores 4 scores 5 scores Your Scores Final Scores 备注
TP review rating \ 30% 60% {evaluationScores.TPReviewRating} {evaluationScores.AvgCusSatisfaction} {evaluationScores.TPReviewRatingText}
Post tour complaints 1 0 0 {evaluationScores.PostTourComplaints} {evaluationScores.PostTourComplaintsText}
Complaints resolved during the tour 3 {evaluationScores.ComplaintsDuringTour} {evaluationScores.ComplaintsDuringTourText}
Customer photos \ 30% 50% {evaluationScores.CustomerPhotoRate} {evaluationScores.CustomerPhotoRateText}
Evaluation scores 4.5 {evaluationScores.EvaluationFormScore} {evaluationScores.EvaluationFormScoreText}

Operator Support & Local resources 3 scores 4 scores 5 scores Your Scores Final Scores 备注
Response efficiency 1d 6hrs 3hrs {evaluationScores.ResponseEfficiency} {evaluationScores.AvgLocalResources} {evaluationScores.ResponseEfficiencyText}
Provide suggestions and alternatives \ {evaluationScores.ProvideSuggestions} {evaluationScores.ProvideSuggestionsText}
Provide local tourism information \ {evaluationScores.ProvideLocalInfo} {evaluationScores.ProvideLocalInfoText}
Assist in developing exclusive products \ \ {evaluationScores.ExclusiveProducts} {evaluationScores.ExclusiveProductsText}
Dedicated tour guide team for AH \ {evaluationScores.DedicatedTourGuide} {evaluationScores.DedicatedTourGuideText}
Partner hotels with contracted rate \ {evaluationScores.PartnerHotels} {evaluationScores.PartnerHotelsText}

Pricing & Settlement (20%) 3 scores 4 scores 5 scores Your Scores Final Scores 备注
Quotation Package Day tours Individual services {evaluationScores.Quotation} {evaluationScores.AvgPricingAndSettlement} {evaluationScores.QuotationText}
Settlement Prepayment Monthly Prepayment Monthly settlement after the tours {evaluationScores.Settlement} {evaluationScores.SettlementText}
Cancellation policy 30 days 21 days 1 day {evaluationScores.CancellationPolicy} {evaluationScores.CancellationPolicyText}

Scoring Rules} bordered> 1. The maximum score is 5 2. The three categories are: 1). Customer satisfaction (40%) 2). Operator support & local resources (40%) 3). Pricing & settlement (20%) 3. For each category, you can only get the corresponding score if you meet the standards of all items under the score. 4. The final score is the sum of the scores of each category multiplied by the proportion of the category.
反馈表分析
项目 产品 得分 备注说明
地接接待 导游 {evaluationScores.FRTGuide} {evaluationScores.FRTText}
司机+车 {evaluationScores.FRTGriver}
{evaluationScores.FRTMeal}
产品体验 {evaluationScores.FRTProduct}
线路安排 酒店 {evaluationScores.FRTHotel}
游船 {evaluationScores.FRTCruise}
顾问服务 {evaluationScores.FRTAdvisor}
导游接待情况 表扬情况
投诉情况
批评建议
); } export default observer(Index);