jquery-easyui-datagrid,弹框

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>
<%
String base = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>总部复核</title>
<link href="<%=base%>/resources/bootstrap/bootstrap.min.css" rel="stylesheet">
    <link href="<%=base%>/resources/css/main.css" rel="stylesheet">
    <link href="<%=base%>/resources/css/layout.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="<%=base%>/resources/js/easyui/themes/bootstrap/easyui.css">
    <script type="text/javascript" src="<%=base%>/resources/js/2011-jquery.js"></script>
<script type="text/javascript" src="<%=base%>/resources/js/easyui/jquery.min.js"></script>
    <script type="text/javascript" src="<%=base%>/resources/js/easyui/jquery.easyui.min.js"></script>    
    <script type="text/javascript" src="<%=base%>/resources/js/common.js"></script>
<script type="text/javascript" src="<%=base%>/resources/js/list.js"></script>
<script type="text/javascript" src="<%=base%>/resources/js/js.js"></script>
<script type="text/javascript" src="<%=base %>/resources/js/date/fomatDate.js"></script>
<script type="text/javascript" src="<%=base%>/resources/datePicker/WdatePicker.js"></script>
<style type="text/css">
</style>
<script type="text/javascript">


function rejectHandle() {
$('#rejectNoPassReason').html(
"<table style='margin-top: 10px;'><input type='hidden' id='reasonCategory'/><input type='hidden' id='reasonCode'/>"
+"<tr style='padding-left: 10px;'><th style='width: 80px;font-size: 15px;padding-left: 20px;'>原因</th>"
+"<td style='padding-left: 10px;'><select style='width: 150px; height: 30px;' id='reasonCodeSelectd'></select></td></tr>"
+"<tr style='padding-left: 10px;'><th style='width: 80px;font-size: 15px;padding-left: 20px;'>备注</th>"
+"<td style='padding-left: 10px;padding-top: 10px;'><textarea rows='6' cols='42' id='approvalreason'></textarea></td></tr>"
+"</table>");
$.post("<%=base%>/task/getDatadictry?r="+ Math.random(),
  {'reasonType':'usertask_recheck'},
  function(data){
  var ops="<option value=''>所有</option>";
  for(var d in data){
  $("#reasonCodeSelectd").append("<option value='"+data[d].valueCode+"'>"+data[d].valueName+"</option>");
  }
  },
  'json');
var scrollHight = $("#trailPanel")[0].scrollHeight; //滚动距离总长
var divHeight = scrollHight - 800;
$('#rejectNoPassReason').dialog({
title : '拒绝原因',
width : 400,
height : 260,
modal : true,
buttons : [ {
text : ' 确 定 ',
//iconCls:'icon-oK',
handler : function() {
$('#selectBtn').attr("disabled", "disabled"); 
$('#saveBut').attr("disabled","disabled"); 
var approvalreason = $("#approvalreason").val();
var reasonCode = $("#reasonCodeSelectd").val();
var reasonCategory = $("#reasonCategory").val();
if (approvalreason == '') {
$('#selectBtn').removeAttr("disabled");  
$('#saveBut').removeAttr("disabled"); 
alert( '原因不能为空!');
return;
}
rejectTask(approvalreason,reasonCategory,reasonCode);
}
}, {
text : ' 取 消 ',
handler : function() {
$('#rejectNoPassReason').html('');
$('#rejectNoPassReason').dialog('close');
$('#selectBtn').removeAttr("disabled");  
$('#saveBut').removeAttr("disabled"); 
}
} ],
onMove : function() {
}
});


$('#rejectNoPassReason').parent().css("top", divHeight);
$('.window-shadow').css("top", divHeight);
}


function rejectTask(reason) {
var taskId =$("#taskId").val();
var reasonCode = $("#reasonCodeSelectd").val();
var businessId =$("#businessId").val();
var taskName = $("#approvalProcess").val();
var custId=$("#custId").val();
var data = {
taskId : taskId,
businessId :businessId,
reason:'',
custId:custId,
reasonCategory:'applyLoan',
reasonCode:reasonCode,
type:'applyLoan',
taskName:taskName
};
data.reason = reason;
$.ajax({
url : '<%=base%>/approval/process/reject?r=' + Math.random(),
type : "post",
dataType : "json",
data : data,
async : false,
success : function(data) {
if (!data.success) {
$('#selectBtn').removeAttr("disabled");  
$('#saveBut').removeAttr("disabled"); 
alert( data.msg);
return;
}
if (data.success) {
$('#rejectNoPassReason').dialog('close');
alert( '拒绝成功!');
parent.location='<%=base%>/task/myTask/review';
} else {
alert('拒绝失败!');
}
},
error : function(data) {
$('#selectBtn').removeAttr("disabled");  
$('#saveBut').removeAttr("disabled"); 
alert( '请求失败!');
}
});
}


function submitForm(type) {
var $val = $('input[name="approvalQuota1"]').val();
console.log('总部复核,获取到的额度值:' + $val);
if($val =='' || $val <= 0){
common_alert_text("授信额度值不正确!");
return false;
}

$('#fhApprovalQuota').val($val);
var businessid=$("#businessId").val();
if(businessid == ""){
alert("申请号不能为空");
return ;
}

//如果正在提交则直接返回,停止执行
   $('#selectBtn').attr("disabled", "disabled"); 
   $('#saveBut').attr("disabled","disabled"); 
$("#operationFlag").val(type);

var audiResult = $('input[name="apvResult"]:checked').val();
if(!audiResult){
alert("操作状态不能为空");
$('#selectBtn').removeAttr("disabled");  
$('#saveBut').removeAttr("disabled"); 
return ;
}
if(audiResult == 'reject' && type == "submit"){
rejectHandle();
$('#selectBtn').removeAttr("disabled");  
$('#saveBut').removeAttr("disabled");
return ;
}
if(audiResult == 'cancel' && type == "submit"){
cancelLoan();
$('#selectBtn').removeAttr("disabled");  
$('#saveBut').removeAttr("disabled");
return ;
}
if(type == "submit" && audiResult !="pass"){
alert("提交必须选择通过");
$('#selectBtn').removeAttr("disabled");  
$('#saveBut').removeAttr("disabled");
return ;
}
$('#firstTrailForm').form( 'submit', {
url :  "<%=base%>/approval/process/headquartersReview?r="+ Math.random(),
onSubmit : function(param) {
var validate = $("#firstTrailForm").form('validate');
if (!validate){
alert('请输入必填项!');
$('#selectBtn').removeAttr("disabled");  
$('#saveBut').removeAttr("disabled");
}
return validate;
},
success : function(data) {
data = eval('[' + data + ']')[0];
if(data.success){
alert(data.msg);
if(type == "submit"){
parent.location='<%=base%>/task/myTask/review';
}else{
location.reload();
}
}else{
alert(data.msg);
}
$('#selectBtn').removeAttr("disabled");  
$('#saveBut').removeAttr("disabled");
},
error : function(data) {
$('#selectBtn').removeAttr("disabled");  
$('#saveBut').removeAttr("disabled");
alert( '请求失败');
}
});
}


function cancelLoan() {
var taskId =$("#taskId").val();
var businessId =$("#businessId").val();
$('#backNoPassReason').html(
"<table style='margin-top: 10px;'><input type='hidden' id='reasonCategory'/><input type='hidden' id='reasonCode'/>"
+"<tr style='padding-left: 10px;'><th style='width: 80px;font-size: 15px;padding-left: 20px;'>原因</th>"
+"<td style='padding-left: 10px;'><select style='width: 150px; height: 30px;' id='reasonCodeSelectd'></select></td></tr>"
+"<tr style='padding-left: 10px;'><th style='width: 80px;font-size: 15px;padding-left: 20px;'>备注</th>"
+"<td style='padding-left: 10px;padding-top: 10px;'><textarea rows='6' cols='42' id='approvalreason'></textarea></td></tr>"
+"</table>");
$.post("<%=base%>/task/getDatadictry?r="+ Math.random(),
{'reasonType':'usertask_recheck'},
function(data){
var ops="<option value=''>所有</option>";
for(var d in data){
$("#reasonCodeSelectd").append("<option value='"+data[d].valueCode+"'>"+data[d].valueName+"</option>");
}
},
'json');
var scrollHight = $("#trailPanel")[0].scrollHeight; //滚动距离总长
var divHeight = scrollHight - 800;
$('#backNoPassReason').dialog(
{
title : '取消原因',
width : 400,
height : 260,
modal : true,
buttons : [
{
text : ' 确 定 ',
//iconCls:'icon-oK',
handler : function() {
$('#selectBtn').attr("disabled", "disabled"); 
$('#saveBut').attr("disabled","disabled"); 
var approvalreason = $("#approvalreason").val();
var reasonCode = $("#reasonCodeSelectd").val();
var reasonCategory = $("#reasonCategory").val();
var taskName = $("#approvalProcess").val();
var custId=$("#custId").val();
if (approvalreason == "") {
alert('内容不能为空!');
$('#selectBtn').removeAttr("disabled");  
$('#saveBut').removeAttr("disabled");
return;
}
$(this).linkbutton('disable');
$.ajax({
url : '<%=base%>/approval/process/cancel',
type : "post",
dataType : "json",
data : {
reasonCode:reasonCode,
businessId :businessId,
taskName:taskName,
type:'applyLoan',
custId:custId,
reasonCategory:'applyLoan',
taskId:taskId,r: Math.random(),
reason: approvalreason},
async : false,
success : function(data) {
$('#selectBtn').removeAttr("disabled");  
$('#saveBut').removeAttr("disabled");
if (!data.success) {
alert(data.msg);
return;
}
if (data.success) {
$('#backNoPassReason').dialog('close');
alert('取消成功!');
parent.location='<%=base%>/task/myTask/review';
}
},
error : function(data) {
$('#selectBtn').removeAttr("disabled");  
$('#saveBut').removeAttr("disabled");
alert('请求失败!');
}
});


}
}, {
text : ' 取 消 ',
handler : function() {
$('#backNoPassReason').html('');
$('#backNoPassReason').dialog('close');
$('#selectBtn').removeAttr("disabled");  
$('#saveBut').removeAttr("disabled"); 
}
} ],
onMove : function() {
}
});
$('#backNoPassReason').parent().css("top", divHeight);
$('.window-shadow').css("top", divHeight);


}
</script>
</head>
<body>
<div class="easyui-panel" style="height: 100%;width: 100%; border: 0px;" id="trailPanel">
<div style="margin: 20px 0;"></div>
<div id="trailHistoryList" class="easyui-panel" title="审核历史" style="width: 100%; height: 180px; border: 0px;" >
<table id="listTable0" style="width: 98%;" class="table table-bordered table-hover">
<tbody style="text-align: center;">
<tr>
<th>审批环节</th>
<th>贷款期限</th>
        <th>贷款金额</th>
<th>审批结果</th>
<th>操作时间</th>
<th>经办人</th>
<!-- <th>意见备注</th> -->
</tr>
</tbody>
<c:forEach items="${page}" var="task" varStatus="status">
<tr>
<td>${task.taskName}</td>
<td>${task.loanTerm}</td>
<td><c:if test="${task.applicationsAmount > task.approvalQuota }">${task.approvalQuota}</c:if>
<c:if test="${task.applicationsAmount <= task.approvalQuota }">${task.applicationsAmount }</c:if>
</td>
<td><c:if test="${task.apvResult eq 'waitingdistributed'}">待分配</c:if>
    <c:if test="${task.apvResult eq 'inprocess'}">审批处理中</c:if>
    <c:if test="${task.apvResult eq 'complete'}">完成</c:if>
    <c:if test="${task.apvResult eq 'back'}">审批已回退</c:if>
    <c:if test="${task.apvResult eq 'reject'}">审批已拒绝</c:if>
    <c:if test="${task.apvResult eq 'cancel'}">审批已取消</c:if>
    <c:if test="${task.apvResult eq 'save'}">审批已保存</c:if>
    <c:if test="${task.apvResult eq 'pass'}">审批已通过</c:if></td>
<td><fmt:formatDate value="${task.createdDate}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
<td>${task.handleUser}</td>
<!--<td>${task.opinion}</td>-->
</tr>
</c:forEach>
</table>
</div>

<div style="margin: 20px 0;"></div>
<form action="" id="firstTrailForm" method="post">
<input type="hidden" name="taskId" id="taskId" value="${taskId}" >
<input type="hidden" name="businessId" id="businessId" value="${businessId}" >
<input type="hidden" name="custId" id="custId" value="${custId}" >
<input type="hidden" name="taskName" id="approvalProcess" value="${taskName}" >
<input type="hidden" name="operationFlag" id="operationFlag" >
<input type="hidden" name="isFirstLoan" id="isFirstLoan" value="${isFirstLoan}" >
<input type="hidden" name="approvalQuota" id="fhApprovalQuota">
<input type="hidden" name="oid" id="oldoid" value="${oldoid}">

<div style="margin: 20px 0;"></div>
<div id="firstTrail" class="easyui-panel" title="审批意见" style="width: 100%; height: 320px; border: 0px;" data-options="collapsible:true">
<table  id="listTable" style="width: 96%;" class="table table-bordered table-hover">
<tr>
<th>
<span><font size="3" color="red">*</font>拟批授信金额&nbsp;&nbsp;</span>
</th>
<td>
<%--二次贷款输入框禁用--%>
<input class="easyui-numberbox numberbox-width fb"  <c:if test="${optype eq 'c' }"> disabled="disabled"</c:if>  maxlength="10" name="approvalQuota1" data-options="missingMessage:'金额为必填项'" <c:if test="${isFirstLoan eq false}">disabled="disabled"</c:if> type="text" value="${quotaAudiProcessDTO.approvalQuota}" οnkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')">
</td>
</tr>
<tr><th>
<span><font size="3" color="red">*</font>审批意见&nbsp;&nbsp;</span>
</th>
<td>
<textarea class="easyui-validatebox fb"  disabled="disabled"
   data-options="missingMessage:'备注为必填项'" rows="10" cols="140">${quotaAudi.opinion}</textarea>
</td></tr>

</table>
</div>
<div style="margin: 20px 0;"></div>
<div id="firstTrail" class="easyui-panel" title="车辆状态" style="width: 100%; height: 100px; border: 0px;" data-options="collapsible:true">
<table id="listTable2" style="width: 96%;" class="table table-bordered table-hover">
<tr>
<th>车辆GPS状态</th>
<td>
<select name="carGpsState" class="fb"  id="carGpsState" disabled="disabled"> 
<option <c:if test="${carInfo.carGpsState eq 0}">selected</c:if> value="0">正常</option>
<option <c:if test="${carInfo.carGpsState eq 1}">selected</c:if>  value="1">异常</option>
</select>

</td>
<th>抵押状态</th>
<td>
<select name="mortgageState" class="fb" id="mortgageState" disabled="disabled"> 
<option <c:if test="${carInfo.mortgageState eq 0}">selected</c:if>  value="0">已抵押</option>
<option <c:if test="${carInfo.mortgageState eq 1}">selected</c:if>  value="1">未抵押</option>
</select>
</td>
<th>车辆状态</th>
<td>
<select name="carState" class="fb" id="" disabled="disabled"> 
<option <c:if test="${carInfo.carState eq 0}">selected</c:if> value="0">启动</option>
<option <c:if test="${carInfo.carState eq 1}">selected</c:if>  value="1">停止</option>
</select>
</td>
</tr>
</table>
</div>
<div style="margin: 20px 0;"></div>
<div id="firstTrail2" class="easyui-panel" title="复核意见" style="width: 100%; height: 250px; border: 0px;" data-options="collapsible:true">
<table id="listTable3" style="width: 96%;" class="table table-bordered table-hover">
<tr>
<tr><th>
<span><font size="3" color="red">*</font>复核意见&nbsp;&nbsp;</span>
</th>
<td>
<textarea class="easyui-validatebox fb" required="true" <c:if test="${optype eq 'c' }"> disabled="disabled"</c:if>  data-options="missingMessage:'备注为必填项'" rows="10" cols="140" name="opinion" >${quotaAudiProcessDTO.opinion}</textarea>
</td></tr>
</tr>
</table>
</div>
<div style="margin: 20px 0;"></div>
<div id="firstTrail2" class="easyui-panel" title="流程操作" style="width: 100%; height: 150px; border: 0px;" data-options="collapsible:true">
<table id="listTable3" style="width: 96%;" class="table table-bordered table-hover">
<tr>
<th>流程操作</th>
<td>
<div class="easyui-radio" id="audiResult">
<input type="radio" name="apvResult"  <c:if test="${optype eq 'c' }"> disabled="disabled"</c:if>   <c:if test="${quotaAudiProcessDTO.apvResult eq 'reject'}">checked="checked"</c:if>  value="reject"  οnclick="rejectHandle();"><label>拒绝</label>
<!-- <input type="radio" name="apvResult"   value="cancel"  οnclick="cancelLoan();"><label>取消</label> -->
<input type="radio" name="apvResult"   <c:if test="${optype eq 'c' }"> disabled="disabled"</c:if>  <c:if test="${empty quotaAudiProcessDTO.apvResult  or quotaAudiProcessDTO.apvResult  eq 'pass' or quotaAudiProcessDTO.apvResult  eq '' or quotaAudiProcessDTO.apvResult  eq 'savePass'}">checked="checked"</c:if>  value="pass"  ><label>通过</label></div>
</td>
</tr>
</table>
</div>
<div id="backNoPassReason" style="padding: 10px;"></div>
<div id="rejectNoPassReason" style="top: -100px;"></div>
<div id="submitButton"  style="width: 100%; height: 200px; border: 0px;" >
<c:if test="${optype ne 'c' }">
                <button type="button" id="selectBtn" class="btn btn-primary mr10" οnclick="submitForm('submit')" >提交</button>
                <button type="button" id="saveBut"  οnclick="submitForm('save')" class="btn btn-primary mr10 ">保存</button>
                </c:if>
</div>
</div>
</form>
</div>
</body>
</html>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

NEOU2

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值