112 lines
4.4 KiB
Plaintext
112 lines
4.4 KiB
Plaintext
<!DOCTYPE html
|
||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
<%@ 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" %>
|
||
|
||
<%@page import="com.sipai.entity.kpi.KpiActivitiRequest" %>
|
||
<%request.setAttribute("Type_PLAN", KpiActivitiRequest.Type_PLAN); %>
|
||
<%request.setAttribute("Type_MARK", KpiActivitiRequest.Type_MARK); %>
|
||
|
||
<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 () {
|
||
$("#unitId").val(unitId);
|
||
});
|
||
|
||
// 提交审核
|
||
function submitApplyFun() {
|
||
$("#applyForm").bootstrapValidator('validate');//提交验证
|
||
if ($("#applyForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||
$.post(ext.contextPath + "/kpi/KpiApplyBiz/apply.do", $("#applyForm").serialize(), function (data) {
|
||
// alert(data);
|
||
if (data.code == 1) {
|
||
window.location.href = ext.contextPath
|
||
+ "/kpi/KpiPeriodInstance/showList.do";
|
||
} else {
|
||
showAlert('d', data.msg);
|
||
}
|
||
}, 'json');
|
||
}
|
||
}
|
||
|
||
$("#applyForm").bootstrapValidator({
|
||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||
fields: {
|
||
auditorId: {
|
||
validators: {
|
||
notEmpty: {
|
||
message: '审批人不能为空'
|
||
}
|
||
}
|
||
}
|
||
}
|
||
});
|
||
|
||
|
||
//选人
|
||
var showUser4Handle = function () {
|
||
var userIds = $("#auditorId").val();
|
||
// $.post(ext.contextPath + '/user/userForSelect4FirstActiviti.do', {
|
||
$.post(ext.contextPath + '/user/layerUser.do', {
|
||
formId: "applyForm",
|
||
hiddenId: "auditorId",
|
||
textId: "auditorName",
|
||
userIds: userIds,
|
||
unitId: unitId, //获取右上角的厂id
|
||
//type:'${Type_PLAN}'
|
||
type: 'KPI_MAKE_PLAN'
|
||
}, function (data) {
|
||
$("#user4SelectDiv").html(data);
|
||
openModal("user4SelectModal");
|
||
});
|
||
};
|
||
|
||
|
||
</script>
|
||
<div class="modal fade" id="subModal">
|
||
<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">×</span></button>
|
||
<h4 class="modal-title">审批人选择</h4>
|
||
</div>
|
||
<div class="modal-body">
|
||
<!-- 新增界面formid强制为addForm -->
|
||
<form class="form-horizontal" id="applyForm">
|
||
<input type="hidden" name="bizId" value="${applyBizId}"/>
|
||
<input type="hidden" id="unitId" name="unitId" value=""/>
|
||
<div id="alertDiv"></div>
|
||
<!-- 界面提醒div强制id为alertdiv -->
|
||
<div class="form-group">
|
||
<label class="col-sm-3 control-label">审批人:</label>
|
||
<div class="col-sm-9">
|
||
<input type="text" id="auditorName" name="auditorName" class="form-control"
|
||
placeholder="请输入文本" onclick="showUser4Handle()" autocomplete="off">
|
||
<input type="hidden" id="auditorId" name="auditorId" class="form-control"
|
||
placeholder="请输入文本">
|
||
</div>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||
<security:authorize buttonUrl="kpi/KpiPlanStaff/apply.do">
|
||
<button type="button" class="btn btn-primary" onclick="submitApplyFun()">提交</button>
|
||
</security:authorize>
|
||
</div>
|
||
</div>
|
||
<!-- /.modal-content -->
|
||
</div>
|
||
<!-- /.modal-dialog -->
|
||
</div> |