202 lines
8.9 KiB
Plaintext
202 lines
8.9 KiB
Plaintext
|
||
<%@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/organization/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: {
|
||
classid: {
|
||
validators: {
|
||
notEmpty: {
|
||
message: '工作类型编号不能为空'
|
||
}
|
||
}
|
||
},
|
||
receiveUserId: {
|
||
validators: {
|
||
notEmpty: {
|
||
message: '接单人不能为空'
|
||
}
|
||
}
|
||
},
|
||
}
|
||
});
|
||
$(function(){
|
||
//初始化文件显示
|
||
getFileList_process();
|
||
|
||
});
|
||
|
||
|
||
//选择工作控制审核人
|
||
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 showOrganizationClass4SelectFun = function() {
|
||
$.post(ext.contextPath + '/administration/organizationClass/showList4Select.do', {formId:"subForm",hiddenId:"classid",textId:"classcode"
|
||
,text2Id:"classname"} , function(data) {
|
||
$("#fault4SelectDiv").html(data);
|
||
openModal('fault4SelectModal');
|
||
});
|
||
};
|
||
|
||
//关闭模态框时刷新表格数据
|
||
function closeModel(){
|
||
closeModal('subModal');
|
||
$("#table").bootstrapTable('refresh');
|
||
}
|
||
//初始化计划开始时间
|
||
$('#planStartDate').datepicker({
|
||
language: 'zh-CN',
|
||
autoclose: true,
|
||
todayHighlight: true,
|
||
format:'yyyy-mm-dd',
|
||
}).on('hide',function(e) {
|
||
$('#subForm').data('bootstrapValidator')
|
||
.updateStatus('planStartDate', 'NOT_VALIDATED',null)
|
||
.validateField('planStartDate');
|
||
});
|
||
</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强制为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 id="typeid" name="typeid" type="hidden" value="${param.typeid}" >
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">*工单号</label>
|
||
<div class="col-sm-6">
|
||
<input type="text" class="form-control" id="id" name ="id" value="${id}" 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="projectName" name ="projectName" 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="classcode" name ="classcode" placeholder="点击选择" onclick="showOrganizationClass4SelectFun();" value="" readonly>
|
||
<input id="classid" name="classid" 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="classname" name ="classname" placeholder="点击选择" onclick="showOrganizationClass4SelectFun();" value="" readonly>
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">*工作内容</label>
|
||
<div class="col-sm-6">
|
||
<textarea class="form-control" rows="2" id ="projectCont" name ="projectCont" placeholder="工作内容..."></textarea>
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">*计划开始时间</label>
|
||
<div class="col-sm-6">
|
||
<div class="input-group date">
|
||
<div class="input-group-addon">
|
||
<i class="fa fa-calendar"></i>
|
||
</div>
|
||
<input type="text" class="form-control" id="planStartDate" name="planStartDate" style="width: 132px;" autocomplete="off" placeholder="请选择开始时间">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">*评价标准</label>
|
||
<div class="col-sm-6">
|
||
<textarea class="form-control" rows="2" id ="enclosure" name ="enclosure" placeholder="评价标准..."></textarea>
|
||
</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="quotaHours" name ="quotaHours" 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="quotaCost" name ="quotaCost" 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>
|