Files
SIPAIIS_WMS_JSSW/WebRoot/jsp/user/viewPersonalInformation.jsp
2026-01-16 14:13:44 +08:00

174 lines
7.8 KiB
Plaintext

<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<style type="text/css">
.select2-container .select2-selection--single{
height:34px;
line-height: 34px;
}
.select2-selection__arrow{
margin-top:3px;
}
</style>
<script type="text/javascript">
function linkWeChat() {
$("#btn_wechat").attr('href','http://wx.sipaiis.com/wxAuth/wxLogin?systemFlag='+ext.contextPath.substring(1,ext.contextPath.length)+'&id=${user.id}');
//closeModal('subPasswordModal');
/* $.ajax({
type: "GET",
url: 'http://wx.sipaiis.com/wxAuth/wxLogin?systemFlag=SSMBootstrap'+'&id='+'${user.id}',
//data: {username:$("#username").val(), content:$("#content").val()},
dataType: "json",
success: function(data){
alert()
}
}); */
}
function showBonusPoints(){
$.post(ext.contextPath + '/bonuspoint/showBonusPoints.do', {} , function(data) {
$("#bonusPointDiv").html(data);
openModal('bonusPointModal');
});
}
$(function(){
var sex='${user.sex}';
console.info(sex);
if(sex== '0'){
$('#sex').html('女');
}else if(sex == '1'){
$('#sex').html('男');
}else{
$('#sex').html('未知');
}
var openid = '${user.wechatid}';
if(openid==null || openid==''){
$('#wechatid').html('未绑定');
$('#wechatid').css('color','red');
}else{
$('#wechatid').html('已绑定');
$('#wechatid').css('color','green');
$('#link').hide();
}
$.post(ext.contextPath + "/bonuspoint/getCurrentPoints.do", function(data) {
$('#currentBonusPoint').text(data.res)
},'json');
})
//上传头像界面
var fileinput = function() {
$.post(ext.contextPath + '/user/fileinputHeadPortrait.do', {} , function(data) {
$("#fileinputHeadPortraitDiv").html(data);
openModal('fileinputHeadPortraitModal');
});
};
//上传头像界面
var userHeadPortrait = function() {
$.post(ext.contextPath + '/user/userHeadPortrait.do', {} , function(data) {
$("#fileinputHeadPortraitDiv").html(data);
openModal('userHeadPortraitModal');
});
};
var recoverMainPage = function(){
$.post(ext.contextPath + '/base/mainPageTypeUser/clearRecord.do', {} , function(data) {
if(data>=0){
goToMainPage();
}else{
showAlert('d','尝试恢复默认首页显示失败,请稍后重试!','alertDiv_userInfo');
}
},'json');
}
</script>
<div class="modal fade" id="subPasswordModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">个人信息</h4>
</div>
<div class="modal-body">
<!-- 新增界面formid强制为subForm -->
<form class="form-horizontal" id="subForm" enctype="multipart/form-data" >
<!-- 界面提醒div强制id为alertDiv -->
<div id="alertDiv"></div>
<table>
<tr style="height:50px">
<th style="width: 80px; text-align:left" >头像</th>
<td style="width: 80px;" align="center">
<c:if test="${not empty cu.userDetail}">
<c:choose>
<c:when test="${not empty cu.userDetail.icon}">
<img src="${cu.userDetail.icon}"class="img-circle" style="width: 60px; height:60px" alt="User Image">
</c:when>
<c:otherwise>
<c:choose>
<c:when test="${cu.sex=='0'}">
<img src="<%=request.getContextPath()%>/plugins/AdminLTE/img/avatar2.png" class="img-circle" style="width: 60px;" alt="User Image">
</c:when>
<c:otherwise>
<img src="<%=request.getContextPath()%>/plugins/AdminLTE/img/avatar5.png" style="width: 60px;" class="img-circle" alt="User Image">
</c:otherwise>
</c:choose>
</c:otherwise>
</c:choose>
</c:if>
<!--如果用户没有上传过头像,显示系统默认头像 -->
<c:if test="${empty cu.userDetail}">
<c:choose>
<c:when test="${cu.sex=='0'}">
<img src="<%=request.getContextPath()%>/plugins/AdminLTE/img/avatar2.png" class="img-circle" style="width: 60px;" alt="User Image">
</c:when>
<c:otherwise>
<img src="<%=request.getContextPath()%>/plugins/AdminLTE/img/avatar5.png" style="width: 60px;" class="img-circle" alt="User Image">
</c:otherwise>
</c:choose>
</c:if>
</td>
<td><a class="pull-right " onclick="userHeadPortrait();" style="cursor:pointer ">更换</a>
</td>
</tr>
<tr style="height:50px">
<th style="width: 80px; text-align:left" >用户名</th>
<td style="width: 420px;" align="center">${user.name}</td>
</tr>
<tr style="height:50px">
<th style="text-align:left" >姓名</th>
<td style="width: 420px;" align="center">${user.caption}</td>
</tr>
<tr style="height:50px">
<th style="text-align:left" >性别</th>
<td id="sex" style="width: 420px;" align="center"></td>
</tr>
<tr style="height:50px">
<th style="text-align:left" >手机号</th>
<td style="width: 420px;" align="center">${user.mobile}</td>
</tr>
<tr style="height:50px">
<th style="text-align:left; width: 50px;" >公司</th>
<td style="width: 420px;" align="center">${company.name}</td>
</tr>
<tr style="height:50px">
<th style="text-align:left; width: 50px;" >微信</th>
<td id="wechatid" style="width: 420px;" align="center"></td>
<td id="link" style="width: 60px;"><a id="btn_wechat" class=" pull-right" style="cursor:pointer" onclick="linkWeChat()">绑定</a></td>
</tr>
<tr style="height:50px">
<th style="text-align:left; width: 50px;" >当前积分</th>
<td style="width: 420px;" align="center" id ="currentBonusPoint">0</td>
<td style="width: 120px;"><a class="pull-right " onclick="showBonusPoints();" style="cursor:pointer ">查看详情
</a></td>
</tr>
</table>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" onclick="recoverMainPage();">恢复默认首页</button>
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>