<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="sitemesh" uri="http://www.opensymphony.com/sitemesh/decorator"%>
<%@ include file="/include.jsp"%>
<%@ taglib prefix="p" uri="/paging"%>
<head>
<script type="text/javascript" src="${basePath}/static/js/ymPrompt.js"></script>
<script type="text/javascript" src="${basePath}/static/js/openchart.js"></script>
<link rel="stylesheet" id=‘skin‘ type="text/css" href="${basePath}/static/skin/bluebar/ymPrompt.css" />
<script type="text/javascript">
$(document).ready(function(){
var plArray=$("#pj_form").find("[name=‘d3‘]");
var pl=null;
plArray.bind("change",function (){
plArray.each(function (index){
pl=plArray.eq(index);
if(pl.val()!=‘‘&&pl.val()!=null){
$(pl).parent().find(‘span[class="msg"]‘).text("");
}
});
})
});
function pj(){
var plArray=$("#pj_form").find("[name=‘d3‘]");
var scoreArray=$("#pj_form").find("[name=‘score‘]");
var pl=null;
var score=null;
var flag=true;
if(scoreArray.size()>0){
scoreArray.each(function (index){
score=scoreArray.eq(index);
if(score.val()==‘‘||score.val()==null){
$(score).parent().find(‘span[class="msg"]‘).text("*:请先评价!");
flag= false ;
}
pl=plArray.eq(index);
if(pl.val()==‘‘||pl.val()==null){
$(pl).parent().find(‘span[class="msg"]‘).text("*:请输入评论内容!");
flag= false;
}
});
}
if(flag){
$.ajax({
url : "${basePath}/personal/evaluat/add",
data: decodeURIComponent($("#pj_form").serialize(),true),
dataType : "json",
type : "post",
success : function(data) {
alert(data.message);
if(data.code==0){
window.location.href="${basePath}/personal/evaluationmanager";
}
},
error : function() {
alert("对不起,网络繁忙,稍后重试...");
return false;
}
});
}
}
function fuzhi(tag){
$(tag).parent().parent().find(‘span[class="msg"]‘).text("");
$(tag).parent().parent().find(‘input[type="hidden"]‘).val($(tag).val());
}
</script>
</head>
<body>
<div class="right">
<div class="body">
<div class="title3">
<span class="left cover" style="width:140px;">服务评价</span>
</div>
<!-- ---------------------------------内容开始---------------------------------->
<div class="pingjia_box">
<div class="serpj">
<div class="serpj_font">${zsTitle}<a href="#" onclick="message_show2(‘${hsYszD2}‘,‘${user.uuid}‘,‘${basePath}‘)"><img src="${basePath}/static/images/duihua.png" width="18" height="17" style="margin-left:5px;"/></a></div>
<div class="serpj_bg"><div class="bgtable"><table><tr><td>服务项目 </td><td class="td_f">评价详情</td></tr></table></div></div>
<form id="pj_form">
<input type="hidden" name="orderId" value="${order.uuid }"/>
<input type="hidden" name="hsYszD2" value="${hsYszD2}"/>
<input type="hidden" name="hsYszD1" value="${hsYszD1}"/>
<c:forEach items="${order.orderDetailList }" var="orderetail" varStatus="st">
<div class="pj_text">
<div class="pj_l">
<input type="hidden" name="hsYszD23" value="${orderetail.uuid}">
<input type="hidden" name="hsYszD9" value="${orderetail.hsYszD9d10}">
<div class="yyimg"> <img src="${orderetail.servicePic}" style="width:100px;height:99px;"
alt="${orderetail.servicePic}" /></div>
<div class="zt"><nobr><p>${orderetail.serviceTitle}</p></nobr></div>
<div class="cztime"><p><span class="s_time">有效期:<fmt:formatDate value="${orderetail.serviceTime}" pattern="yyyy-MM-dd" /> </span></p></div>
</div>
<div class="pj_r">
<div class="pjbz">
<div class="good"><input type="radio" name="d2_${st.index}" onclick="fuzhi(this);" value="1" style="margin-top: 10px;"/><span>好评!</span></div>
<div class="center"><input type="radio" name="d2_${st.index}" onclick="fuzhi(this);" value="2" style="margin-top: 10px;"/><span>中评!</span></div>
<div class="bad"><input type="radio" name="d2_${st.index}" onclick="fuzhi(this);" value="3" style="margin-top: 10px;"/><span>差评!</span></div>
<div style="float:left;margin-left:50px;"><span class="msg" style="color:red;"></span></div>
<input type="hidden" name="score"/>
</div>
<div class="srtext"><span class="msg" style="color:red;"></span><textarea name="d3" cols="" rows="" class="area" placeholder="请输入评价内容"></textarea></div>
</div>
</div>
</c:forEach>
<div class="tjpj"><input type="button" onclick="pj();" class="btn_tjpj" value="提交评价内容"/></div>
</form>
</div>
</div>
<!-- ---------------------------------内容结束---------------------------------->
</div>
</div>
</body>