You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
information-system/gys_system/views/export_feedback_word.php

488 lines
24 KiB
PHP

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title><?php echo $group_info->GRI_No; ?> 质量调查表</title>
<style>
/* Word文档专用样式 */
body {
font-family: SimSun, '宋体', Arial, sans-serif;
margin: 1.5cm 1.5cm 1.5cm 1.5cm;
line-height: 1.5;
color: #000000;
}
h1 {
font-size: 20pt;
color: #2E74B5;
border-bottom: 1px solid #CCCCCC;
padding-bottom: 8px;
}
h1 small {
font-size: 12pt;
color: #666666;
font-weight: normal;
}
h3 {
font-size: 14pt;
color: #1F4E79;
margin-top: 20px;
margin-bottom: 10px;
background-color: #F2F2F2;
padding: 5px;
}
legend {
font-size: 16pt;
color: #2E74B5;
font-weight: bold;
border-bottom: 2px solid #2E74B5;
margin-bottom: 15px;
padding-bottom: 5px;
}
.simple-info-table {
width: 100%;
border-collapse: collapse;
margin: 15px 0;
font-family: SimSun, '宋体';
}
.simple-info-table td {
padding: 6px 8px;
vertical-align: top;
}
.simple-info-table .label {
font-weight: bold;
width: 80px;
white-space: nowrap;
background-color: #f5f5f5;
}
.simple-info-table .content {
word-break: break-word;
}
table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
page-break-inside: avoid;
}
th {
background-color: #2E74B5;
color: white;
font-weight: bold;
text-align: center;
padding: 10px;
border: 1px solid #1F4E79;
}
td {
border: 1px solid #999999;
padding: 8px;
vertical-align: middle;
}
.rating-header td {
text-align: center;
background-color: #E6F0FA;
}
.rating-label {
display: inline-block;
padding: 3px 8px;
background-color: #00bcd4;
border-radius: 3px;
font-size: 11pt;
}
.feedback_home_list {
background-color: #F9F9F9;
padding: 10px;
border-left: 4px solid #2E74B5;
margin: 15px 0;
}
.feedback_home_list span {
display: inline-block;
margin-right: 15px;
color: #0066CC;
}
.feedback_home_list span.active {
font-weight: bold;
color: #2E74B5;
border-bottom: 2px solid #2E74B5;
}
.comment-box {
background-color: #F9F9F9;
border: 1px solid #DDDDDD;
padding: 15px;
margin: 10px 0;
border-radius: 5px;
}
.comment-content {
font-size: 12pt;
line-height: 1.6;
white-space: pre-wrap;
}
.warning-note {
background-color: #FFF3CD;
border: 1px solid #FFE69C;
color: #856404;
padding: 12px;
border-radius: 5px;
margin: 15px 0;
font-weight: bold;
}
.text-muted {
color: #666666;
}
.row {
margin: 15px 0;
page-break-inside: avoid;
}
hr {
border: none;
border-top: 2px solid #CCCCCC;
margin: 30px 0;
}
/* 打印优化 */
@media print {
body {
margin: 0.5cm;
}
}
</style>
</head>
<body>
<div class="container-fluid">
<!-- 标题和统计信息 -->
<div class="row">
<div class="col-md-24">
<?php
$count_rate = 0; //总分平均分
$count_rate_index = 0;
$guide_rate = 0; //导游平均分
$guide_rate_index = 0;
if (!empty($service_item_info)) {
foreach ($service_item_info as $key => $item) {
$count_rate_index++;
$count_rate = $count_rate + $item->ESI_Rate;
if ($item->ESI_ServiceType == 'W') {
$guide_rate_index++;
$guide_rate = $guide_rate + $item->ESI_Rate;
}
}
$count_rate = $count_rate_index > 0 ? round($count_rate / $count_rate_index, 2) : 0;
$guide_rate = $guide_rate_index > 0 ? round($guide_rate / $guide_rate_index, 2) : 0;
}
?>
<h1><?php echo isset($group_info->GRI_No) ? $group_info->GRI_No : ''; ?>
<small>时间: <?php echo isset($object_info->EOI_Date) ? date('Y-m-d', strtotime($object_info->EOI_Date)) : ''; ?></small>
</h1>
</div>
</div>
<!-- 反馈表信息标题 -->
<div class="row">
<div class="col-md-24">
<legend>反馈表信息</legend>
</div>
</div>
<!-- 多家庭反馈表链接(仅显示,不可点击) -->
<?php if (!empty($many_family)) { ?>
<div class="row">
<div class="col-md-24 feedback_home_list">
<strong>多家庭反馈表:</strong>
<?php foreach ($many_family as $k => $v) { ?>
<span <?php if (isset($esi_mei_sn) && $esi_mei_sn == $v->ESI_MEI_SN) { ?>class="active"<?php } ?>>
<?php echo isset($v->esiname) ? $v->esiname : ''; ?>
</span>
<?php } ?>
</div>
</div>
<?php } ?>
<!-- 基本信息展示 -->
<table class="simple-info-table">
<tr>
<td class="label">客人:</td>
<td class="content" colspan="3">
<?php
$guest_name = '';
if (isset($group_info)) {
$guest_name = (isset($group_info->CusCW) ? $group_info->CusCW . ' ' : '') .
(isset($group_info->CusFirstName) ? $group_info->CusFirstName . ' ' : '') .
(isset($group_info->CusLastName) ? $group_info->CusLastName : '');
}
echo $guest_name ? $guest_name . ' \'s China Tour' : '';
?>
</td>
</tr>
<tr>
<td class="label">团号:</td>
<td class="content" colspan="3">
<?php echo isset($group_info->VGroupInfo) ? $group_info->VGroupInfo : ''; ?> 质量调查表
</td>
</tr>
<tr>
<td class="label">地接社:</td>
<td class="content" colspan="3">
<?php echo isset($object_info->VendorName) ? $object_info->VendorName : ''; ?>
</td>
</tr>
<tr>
<td class="label">外联:</td>
<td class="content" colspan="3">
<?php
$wl_name = '';
if (isset($group_info)) {
$wl_name = (isset($group_info->WLCW) ? $group_info->WLCW . ' , ' : '') .
(isset($group_info->WLFirstName) ? $group_info->WLFirstName . ' , ' : '') .
(isset($group_info->WLLastName) ? $group_info->WLLastName : '');
}
echo $wl_name ?: '';
?>
</td>
</tr>
<tr>
<td class="label">联系方式:</td>
<td class="content" colspan="3">
Tel:<?php echo isset($group_info->WLTel) ? $group_info->WLTel : ''; ?> ,
Fax:<?php echo isset($group_info->WLFax) ? $group_info->WLFax : ''; ?>,
手机:<?php echo isset($group_info->WLMobile) ? $group_info->WLMobile : ''; ?> ,
Email:<?php echo isset($group_info->WLEmail) ? $group_info->WLEmail : ''; ?>
</td>
</tr>
<tr>
<td class="label">导游:</td>
<td class="content" colspan="3">
<?php
if (!empty($guide_list) && isset($guide_sn)) {
foreach ($guide_list as $item) {
if (isset($item->TGI_SN) && $item->TGI_SN == $guide_sn) {
echo (isset($item->TGI2_Name) ? $item->TGI2_Name . ' ' : '') .
(isset($item->TGI2_Name2) ? $item->TGI2_Name2 . ' ' : '') .
(isset($item->TGI_Mobile) ? $item->TGI_Mobile : '');
break;
}
}
}
?>
</td>
</tr>
</table>
<!-- 评分表格 -->
<div class="table-responsive col-md-24">
<table class="table table-striped">
<thead>
<tr>
<th class="col-md-5"></th>
<th class="col-md-3">优秀<br><span class="rating-label">Excellent</span></th>
<th class="col-md-3">很好<br><span class="rating-label">Very Good</span></th>
<th class="col-md-3">一般<br><span class="rating-label">Fair</span></th>
<th class="col-md-3">差<br><span class="rating-label">Poor</span></th>
<th class="col-md-3">不可接受<br><span class="rating-label">Unacceptable</span></th>
</tr>
</thead>
<!-- 导游服务 -->
<tr>
<td colspan="6"><h3><?php echo function_exists('getLanguageText') ? getLanguageText($language, 'feedback_question_1') : '导游服务'; ?></h3></td>
</tr>
<?php
if (!empty($service_item_info)) {
foreach ($service_item_info as $item) {
if (isset($item->ESI_ServiceType) && $item->ESI_ServiceType == 'W') {
?>
<tr>
<td><?php echo empty($item->ESI_Describe) ? (isset($item->ESI_ServiceName) ? $item->ESI_ServiceName : '') : $item->ESI_Describe; ?></td>
<td <?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 5) echo 'style="background-color: #E8F5E8;"'; ?>>
<?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 5) echo '✓ '; ?><?php echo function_exists('getLanguageText') ? getLanguageText($language, 'rate_excellent') : '优秀'; ?>
</td>
<td <?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 4) echo 'style="background-color: #E8F5E8;"'; ?>>
<?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 4) echo '✓ '; ?><?php echo function_exists('getLanguageText') ? getLanguageText($language, 'rate_very_good') : '很好'; ?>
</td>
<td <?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 3) echo 'style="background-color: #E8F5E8;"'; ?>>
<?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 3) echo '✓ '; ?><?php echo function_exists('getLanguageText') ? getLanguageText($language, 'rate_fair') : '一般'; ?>
</td>
<td <?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 2) echo 'style="background-color: #E8F5E8;"'; ?>>
<?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 2) echo '✓ '; ?><?php echo function_exists('getLanguageText') ? getLanguageText($language, 'rate_poor') : '差'; ?>
</td>
<td <?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 1) echo 'style="background-color: #E8F5E8;"'; ?>>
<?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 1) echo '✓ '; ?><?php echo function_exists('getLanguageText') ? getLanguageText($language, 'rate_unacceptable') : '不可接受'; ?>
</td>
</tr>
<?php
}
}
}
?>
<!-- 酒店服务 -->
<tr>
<td colspan="6"><h3><?php echo function_exists('getLanguageText') ? getLanguageText($language, 'feedback_question_2') : '酒店服务'; ?></h3></td>
</tr>
<?php
if (!empty($service_item_info)) {
foreach ($service_item_info as $item) {
if (isset($item->ESI_ServiceType) && $item->ESI_ServiceType == 'Y') {
?>
<tr>
<td><?php echo empty($item->ESI_Describe) ? (isset($item->ESI_ServiceName) ? $item->ESI_ServiceName : '') : $item->ESI_Describe; ?></td>
<td <?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 5) echo 'style="background-color: #E8F5E8;"'; ?>>
<?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 5) echo '✓ '; ?><?php echo function_exists('getLanguageText') ? getLanguageText($language, 'rate_excellent') : '优秀'; ?>
</td>
<td <?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 4) echo 'style="background-color: #E8F5E8;"'; ?>>
<?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 4) echo '✓ '; ?><?php echo function_exists('getLanguageText') ? getLanguageText($language, 'rate_very_good') : '很好'; ?>
</td>
<td <?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 3) echo 'style="background-color: #E8F5E8;"'; ?>>
<?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 3) echo '✓ '; ?><?php echo function_exists('getLanguageText') ? getLanguageText($language, 'rate_fair') : '一般'; ?>
</td>
<td <?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 2) echo 'style="background-color: #E8F5E8;"'; ?>>
<?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 2) echo '✓ '; ?><?php echo function_exists('getLanguageText') ? getLanguageText($language, 'rate_poor') : '差'; ?>
</td>
<td <?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 1) echo 'style="background-color: #E8F5E8;"'; ?>>
<?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 1) echo '✓ '; ?><?php echo function_exists('getLanguageText') ? getLanguageText($language, 'rate_unacceptable') : '不可接受'; ?>
</td>
</tr>
<?php
}
}
}
?>
<!-- 餐饮/交通/其它服务 -->
<tr>
<td colspan="6"><h3><?php echo function_exists('getLanguageText') ? getLanguageText($language, 'feedback_question_3') : '餐饮/交通/其它服务'; ?></h3></td>
</tr>
<?php
if (!empty($service_item_info)) {
foreach ($service_item_info as $item) {
if (isset($item->ESI_ServiceType) && ($item->ESI_ServiceType == 'A' || $item->ESI_ServiceType == 'C' || ($item->ESI_ServiceType == '7' && isset($item->ESI_ServiceSN) && $item->ESI_ServiceSN == 0))) {
?>
<tr>
<td><?php echo empty($item->ESI_Describe) ? (isset($item->ESI_ServiceName) ? $item->ESI_ServiceName : '') : $item->ESI_Describe; ?></td>
<td <?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 5) echo 'style="background-color: #E8F5E8;"'; ?>>
<?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 5) echo '✓ '; ?><?php echo function_exists('getLanguageText') ? getLanguageText($language, 'rate_excellent') : '优秀'; ?>
</td>
<td <?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 4) echo 'style="background-color: #E8F5E8;"'; ?>>
<?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 4) echo '✓ '; ?><?php echo function_exists('getLanguageText') ? getLanguageText($language, 'rate_very_good') : '很好'; ?>
</td>
<td <?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 3) echo 'style="background-color: #E8F5E8;"'; ?>>
<?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 3) echo '✓ '; ?><?php echo function_exists('getLanguageText') ? getLanguageText($language, 'rate_fair') : '一般'; ?>
</td>
<td <?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 2) echo 'style="background-color: #E8F5E8;"'; ?>>
<?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 2) echo '✓ '; ?><?php echo function_exists('getLanguageText') ? getLanguageText($language, 'rate_poor') : '差'; ?>
</td>
<td <?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 1) echo 'style="background-color: #E8F5E8;"'; ?>>
<?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 1) echo '✓ '; ?><?php echo function_exists('getLanguageText') ? getLanguageText($language, 'rate_unacceptable') : '不可接受'; ?>
</td>
</tr>
<?php
}
}
}
?>
<!-- 行程安排服务 -->
<tr>
<td colspan="6"><h3><?php echo function_exists('getLanguageText') ? getLanguageText($language, 'feedback_question_4') : '行程安排'; ?></h3></td>
</tr>
<?php
if (!empty($service_item_info)) {
foreach ($service_item_info as $item) {
if (isset($item->ESI_ServiceType) && $item->ESI_ServiceType == '7' && isset($item->ESI_ServiceSN) && $item->ESI_ServiceSN > 0) {
?>
<tr>
<td><?php echo empty($item->ESI_Describe) ? (isset($item->ESI_ServiceName) ? $item->ESI_ServiceName : '') : $item->ESI_Describe; ?></td>
<td <?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 5) echo 'style="background-color: #E8F5E8;"'; ?>>
<?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 5) echo '✓ '; ?><?php echo function_exists('getLanguageText') ? getLanguageText($language, 'rate_excellent') : '优秀'; ?>
</td>
<td <?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 4) echo 'style="background-color: #E8F5E8;"'; ?>>
<?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 4) echo '✓ '; ?><?php echo function_exists('getLanguageText') ? getLanguageText($language, 'rate_very_good') : '很好'; ?>
</td>
<td <?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 3) echo 'style="background-color: #E8F5E8;"'; ?>>
<?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 3) echo '✓ '; ?><?php echo function_exists('getLanguageText') ? getLanguageText($language, 'rate_fair') : '一般'; ?>
</td>
<td <?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 2) echo 'style="background-color: #E8F5E8;"'; ?>>
<?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 2) echo '✓ '; ?><?php echo function_exists('getLanguageText') ? getLanguageText($language, 'rate_poor') : '差'; ?>
</td>
<td <?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 1) echo 'style="background-color: #E8F5E8;"'; ?>>
<?php if (isset($item->ESI_Rate) && $item->ESI_Rate == 1) echo '✓ '; ?><?php echo function_exists('getLanguageText') ? getLanguageText($language, 'rate_unacceptable') : '不可接受'; ?>
</td>
</tr>
<?php
}
}
}
?>
</table>
</div>
<!-- 问题4开放性问题 -->
<div class="row">
<div class="col-md-24">
<?php
if (isset($group_service) && isset($group_service->QSFour)) {
switch ($group_service->QSFour) {
case 223005:
?>
<h3>5. What do you think of #<?php echo isset($group_service->QSFourServiceName) ? $group_service->QSFourServiceName : ''; ?>#?</h3>
<div class="comment-box">
<div class="comment-content">
<?php echo empty($service_question_four) ? '' : (isset($service_question_four->EEF_Content) ? nl2br(htmlspecialchars($service_question_four->EEF_Content)) : ''); ?>
</div>
</div>
<?php
break;
case 223006:
?>
<h3><?php echo function_exists('getLanguageText') ? getLanguageText($language, 'please_share_your_experience') : '请分享您的体验'; ?></h3>
<div class="comment-box">
<div class="comment-content">
<?php echo empty($service_question_four) ? '' : (isset($service_question_four->EEF_Content) ? nl2br(htmlspecialchars($service_question_four->EEF_Content)) : ''); ?>
</div>
</div>
<?php
break;
case 223007:
?>
<h3>5. If you could take your trip again, what would you do differently?</h3>
<div class="comment-box">
<div class="comment-content">
<?php echo empty($service_question_four) ? '' : (isset($service_question_four->EEF_Content) ? nl2br(htmlspecialchars($service_question_four->EEF_Content)) : ''); ?>
</div>
</div>
<?php
break;
}
}
?>
</div>
</div>
<!-- 问题6如果启用 -->
<?php if (isset($CheckLastCity) && $CheckLastCity) { ?>
<div class="row">
<div class="col-md-24">
<h3><?php echo function_exists('getLanguageText') ? getLanguageText($language, 'feedback_question_last') : '其他建议'; ?></h3>
<div class="comment-box">
<div class="comment-content">
<?php echo empty($service_question_six) ? '' : (isset($service_question_six->EEF_Content) ? nl2br(htmlspecialchars($service_question_six->EEF_Content)) : ''); ?>
</div>
</div>
</div>
</div>
<?php } ?>
<!-- 状态提示(如果已提交) -->
<?php if (isset($CheckXzsSubmit) && $CheckXzsSubmit) { ?>
<div class="row">
<div class="col-md-24">
<div class="warning-note">
⚠ 此团已提交电子反馈表(导游小助手提交),此文档为只读版本。
</div>
</div>
</div>
<?php } ?>
</div>
</body>
</html>