|
|
|
@ -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);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//获取供应商提交的图片
|
|
|
|
|