feat: 海外反馈表. 版本和填写提示

release
Lei OT 2 years ago
parent ee640a1891
commit 82bca7b591

@ -1,7 +1,7 @@
import React from "react";
import dayjs from "dayjs";
export const HT_HOST = process.env.NODE_ENV == "production" ? "https://p9axztuwd7x8a7.mycht.cn" : "http://202.103.68.100:890";
export const HT_HOST = process.env.NODE_ENV == "production" ? "https://p9axztuwd7x8a7.mycht.cn" : "http://202.103.68.144:890";
export const DATE_FORMAT = "YYYY-MM-DD";
export const DATE_PRESETS = [
{
@ -36,4 +36,4 @@ export const DATE_PRESETS = [
// 今年: [dayjs().startOf("year"), moment().endOf("year")],
// 去年: [dayjs().subtract(1, "year").startOf("year"), moment().subtract(1, "year").endOf("year")],
];
export const arrManager = ["testzp","testzac","testycc","testlyj","testqqs","testjjh","testhn"];//特定账号加修改所属供应商的菜单 zp
export const arrManager = ["testzp","testzac","testycc","testlyj","testqqs","testjjh","testhn"];//特定账号加修改所属供应商的菜单 zp

@ -37,8 +37,14 @@ class Feedback {
url += `?PageSize=2000&PageIndex=1&PageTotal=0&veisn=${veisn}&GruopNo=${EOI_Group_Name}&TimeStart=${TimeStart}&TimeEnd=${TimeEnd}`;
url += `&token=${this.root.authStore.login.token}`;
return fetchJSON(config.HT_HOST + url).then(json => {
// 反馈表, 有新版就用新版
const allGroup = groupBy(json.Result, "EOI_GRI_SN");
const filterV = Object.keys(allGroup).reduce((r, gsn) => {
const v2 = allGroup[gsn].filter(v => v.EOI_CII_SN);
return r.concat(v2.length > 0 ? v2 : allGroup[gsn]);
}, [])
runInAction(() => {
this.feedbackList = json.Result;
this.feedbackList = filterV;
this.loading = false;
});
if (json.errcode !== 0) {
@ -78,20 +84,21 @@ class Feedback {
*/
getCustomerFeedbackDetail(VEI_SN, GRI_SN, CII_SN) {
let url = `/service-CooperateSOA/get_feedback_service_item`;
url += `?GRI_SN=${GRI_SN}&VEI_SN=${VEI_SN}&city_sn=${CII_SN}&lgc=1`;
url += `&token=${this.root.authStore.login.token}`;
fetch(config.HT_HOST + url)
.then(response => response.json())
.then(json => {
const itemGroup = groupBy(json.feedbackItemList, ele => ele.type);
url += `?GRI_SN=${GRI_SN}&VEI_SN=${VEI_SN}&city_sn=${CII_SN}&lgc=1`;
url += `&token=${this.root.authStore.login.token}`;
fetch(config.HT_HOST + url)
.then((response) => response.json())
.then((json) => {
const itemGroup = groupBy(json.feedbackItemList, 'type');
const serviceItem = {
HWO_Guide: itemGroup?.W || [],
HWO_Driver: itemGroup?.Y || [],
HWO_Activity: [
...(itemGroup['7'] || []),
...(itemGroup.G || []),
...(itemGroup.C || []),
...(itemGroup.A || []).map(ele => ({ ...ele, Describe: 'Hotel ' + ele.name })),],
...(itemGroup['7'] || []),
...(itemGroup.G || []),
...(itemGroup.C || []),
...(itemGroup.A || []).map((ele) => ({ ...ele, Describe: ele.name })),
],
};
const OtherThoughts = json.feedbackEvaluation[0]?.otherComments || '';
const PhotoPermission = json.feedbackEvaluation[0]?.usePhotos || '';
@ -99,12 +106,12 @@ class Feedback {
const cityName = json.group[0]?.cityName || '';
runInAction(() => {
this.feedbackServiceRate = {...serviceItem, OtherThoughts, PhotoPermission, signatureData, cityName };
});
})
.catch(error => {
console.log("fetch data failed", error);
});
this.feedbackServiceRate = { ...serviceItem, OtherThoughts, PhotoPermission, signatureData, cityName };
});
})
.catch((error) => {
console.log('fetch data failed', error);
});
}
//获取供应商提交的图片

@ -132,7 +132,7 @@ function Detail() {
<Divider orientation="left">Other thoughts you want to share with us:</Divider>
<Text>{OtherThoughts}</Text>
<Divider orientation="left">Signature:</Divider>
<img id="signature-img" alt="customer signature" title="customer signature" src={signatureData} />
{signatureData ? <img id="signature-img" alt="customer signature" title="customer signature" src={signatureData} /> : null}
</Form></Card>
</Col>

Loading…
Cancel
Save