Files
2026-01-16 14:13:44 +08:00

199 lines
9.2 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@page import="com.sipai.entity.activiti.ActivitiCommStr"%>
<%@ page language="java" pageEncoding="UTF-8"%>
<%request.setAttribute("START", ActivitiCommStr.Ativiti_START); %>
<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">
//流程审核文件上传所需参数
var masterId_process = '${id}';//业务Id
var tbName_process = 'TB_Process_UploadFile'; //数据表
var nameSpace_process ='ProcessUploadFile';//保存文件夹
var status = 'delete';//有删除权限
function dosave() {
/* $('#subForm').data('bootstrapValidator')
.updateStatus('auditManName', 'NOT_VALIDATED',null)
.validateField('auditManName'); */
$("#subForm").bootstrapValidator('validate');//提交验证
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
$.post(ext.contextPath + "/administration/indexWork/save.do", $("#subForm").serialize(), function(data) {
if (data.res == 1){
closeModal('subModal');
$("#table").bootstrapTable('refresh');
//editFun('${id}');
}else if(data.res == 0){
showAlert('d','保存失败');
}else{
showAlert('d',data.res);
}
},'json');
}
}
//输入框验证
$("#subForm").bootstrapValidator({
live: 'disabled',//验证时机enabled是内容有变化就验证默认disabled和submitted是提交再验证
fields: {
indexid: {
validators: {
notEmpty: {
message: '指标控制编号不能为空'
}
}
},
receiveUserId: {
validators: {
notEmpty: {
message: '接单人不能为空'
}
}
},
}
});
$(function(){
//初始化文件显示
getFileList_process();
});
//初始化指标周期
var showIndexCycle4SelectFun = function() {
var pid = $("#indexid").val();
$.post(ext.contextPath + "/administration/indexCycle/getIndexCycle4Select.do", {pid:pid}, function(data) {
var selelct_ =$("#cycle").select2({
data: data,
placeholder:'请选择',//默认文字提示
allowClear: false,//允许清空
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
language: "zh-CN",
minimumInputLength: 0,
minimumResultsForSearch: 10,//数据超过十个启用搜索框
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
});
selelct_.val('').trigger("change");
},'json');
};
//选择指标控制负责人
var showUser4SelectsFun = function() {
var userIds= $("#indexWorkManId").val();
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"indexWorkManId",textId:"indexWorkManName",userIds:userIds} , function(data) {
$("#user4SelectDiv").html(data);
openModal("user4SelectModal");
});
};
//选择指标控制审核人
var showUser4AuditSelectsFun = function() {
var userIds= $("#auditManId").val();
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"auditManId",textId:"auditManName",userIds:userIds} , function(data) {
$("#user4SelectDiv").html(data);
openModal("user4SelectModal");
});
};
//选择指标
var showIndex4SelectFun = function() {
$.post(ext.contextPath + '/administration/index/showList4Select.do', {formId:"subForm",hiddenId:"indexid",textId:"indexcode"
,text2Id:"indexname",text3Id:"indexclassname",text4Id:"indexclasscode"} , function(data) {
$("#fault4SelectDiv").html(data);
openModal('fault4SelectModal');
});
};
</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">&times;</span></button>
<h4 class="modal-title">新增指标控制记录</h4>
</div>
<div class="modal-body">
<!-- 新增界面formid强制为subForm -->
<form class="form-horizontal" id="subForm">
<!-- 界面提醒div强制id为alertDiv -->
<div id="alertDiv"></div>
<input name="processStatus" type="hidden" value="${START}"/>
<input id="unitId" name="unitId" type="hidden" value="${param.companyId}">
<input name="id" type="hidden" value="${id}"/>
<div class="form-group">
<label class="col-sm-2 control-label">*指标编号</label>
<div class="col-sm-6">
<input type="text" class="form-control" id="indexcode" name ="indexcode" placeholder="点击选择" onclick="showIndex4SelectFun();" value="" readonly>
<input id="indexid" name="indexid" type="hidden" value=""/>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">*指标名称</label>
<div class="col-sm-6">
<input type="text" class="form-control" id="indexname" name ="indexname" placeholder="点击选择" onclick="showIndex4SelectFun();" value="" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">*指标类型编号</label>
<div class="col-sm-6">
<input type="text" class="form-control" id="indexclasscode" name ="indexclasscode" placeholder="点击选择" onclick="showIndex4SelectFun();" value="" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">*指标类型名称</label>
<div class="col-sm-6">
<input type="text" class="form-control" id="indexclassname" name ="indexclassname" placeholder="点击选择" onclick="showIndex4SelectFun();" value="" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">*指标周期</label>
<div class="col-sm-6">
<select class="form-control" id="cycle" name ="cycle" style="width: 100%;" onclick="showIndexCycle4SelectFun();" ></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">*单位</label>
<div class="col-sm-6">
<input type="text" class="form-control" id="unit" name ="unit" value="" >
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">*最大值</label>
<div class="col-sm-6">
<input type="text" class="form-control" id="max" name ="max" value="" >
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">*最小值</label>
<div class="col-sm-6">
<input type="text" class="form-control" id="min" name ="min" value="" >
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">*接单人</label>
<div class="col-sm-6">
<input type="text" class="form-control" id="auditManName" name="auditManName" placeholder="点击选择" onclick="showUser4AuditSelectsFun();" >
<input id="auditManId" name="receiveUserId" type="hidden" />
</div>
</div>
<!-- 文件上传,显示 -->
<div class="form-group" style="margin:8px">
<label class="col-sm-2 control-label"></label>
<button type="button" class="btn btn-default btn-file" onclick="fileinput_process()" id="btn_save"><i class="fa fa-paperclip"></i>上传文件</button>
</div>
<div id="fileArea">
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" onclick="dosave()" id="btn_save">保存</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>