239 lines
12 KiB
Plaintext
239 lines
12 KiB
Plaintext
<%@ page language="java" pageEncoding="UTF-8"%>
|
||
<%@page import="com.sipai.entity.activiti.ActivitiCommStr"%>
|
||
<%request.setAttribute("AUDIT", ActivitiCommStr.Activiti_AUDIT); %>
|
||
<%request.setAttribute("HANDLE", ActivitiCommStr.Activiti_HANDLE); %>
|
||
<%request.setAttribute("START", ActivitiCommStr.Ativiti_START); %>
|
||
<%request.setAttribute("FINISH", ActivitiCommStr.Activiti_FINISH); %>
|
||
<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 = '${organization.id}';//业务Id
|
||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||
var nameSpace_process ='ProcessUploadFile';//保存文件夹
|
||
var status = 'delete';//有删除权限
|
||
|
||
function doupdate() {
|
||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||
$.post(ext.contextPath + "/administration/organization/update.do", $("#subForm").serialize(), function(data) {
|
||
if (data.res == 1){
|
||
closeModal('subModal');
|
||
$("#table").bootstrapTable('refresh');
|
||
}else if(data.res == 0){
|
||
showAlert('d','保存失败');
|
||
}else{
|
||
showAlert('d',data.res);
|
||
}
|
||
},'json');
|
||
}
|
||
}
|
||
function dosubmit(){
|
||
$("#processStatus").val('${HANDLE}');
|
||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||
$.post(ext.contextPath +"/administration/organization/startProcess.do", $("#subForm").serialize(), function(data) {
|
||
if (data.res == 1) {
|
||
$("#table").bootstrapTable('refresh');
|
||
closeModal('subModal');
|
||
}else if(data.res == 0){
|
||
showAlert('d','保存失败');
|
||
}else if(data.res == 2){
|
||
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();
|
||
//加载人员绩效table
|
||
//getWorkAchievements(masterId_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');
|
||
});
|
||
};
|
||
|
||
//初始化计划开始时间
|
||
$('#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');
|
||
});
|
||
//关闭模态框时刷新表格数据
|
||
function closeModel(){
|
||
closeModal('subModal');
|
||
$("#table").bootstrapTable('refresh');
|
||
}
|
||
</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 id="processStatus" name="processStatus" type="hidden" value="${organization.processStatus}"/>
|
||
|
||
<input name="unitId" type="hidden" value="${organization.unitId}"/>
|
||
<input id="typeid" name="typeid" type="hidden" value="${organization.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="${organization.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="${organization.projectName}">
|
||
</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="${organization.organizationClass.code}" readonly>
|
||
<input id="classid" name="classid" type="hidden" value="${organization.classid}"/>
|
||
</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="${organization.organizationClass.name}" 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="工作内容...">${organization.projectCont}</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" value="${organization.planStartDate}" style="width: 132px;" autocomplete="off" placeholder="请选择开始时间" readonly>
|
||
</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="评价标准...">${organization.enclosure}</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="${organization.quotaHours}" >
|
||
</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="${organization.quotaCost}">
|
||
</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" value="${organization.receiveUser}" placeholder="点击选择" onclick="showUser4AuditSelectsFun();" >
|
||
<input id="auditManId" name="receiveUserId" type="hidden" value="${organization.receiveUserId}"/>
|
||
</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 class="box box-primary">
|
||
<div class="box-header with-border">
|
||
<h3 class="box-title">参与人员绩效 </h3>
|
||
<span style="color: #6495ED;">工单工时:</span><span style="color: #6495ED;" id="workAlltime">0</span>
|
||
<span style="color: #6495ED;">绩效工时:</span><span style="color: #6495ED;" id="actAlltime">0</span>
|
||
<span style="color: #6495ED;">剩余工时:</span><span style="color: #6495ED;" id="surplustime">0</span>
|
||
<div class="box-tools pull-right">
|
||
<a onclick="doAchievementAdd('${organization.id}')" class="btn btn-box-tool" data-toggle="tooltip" title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
||
<a onclick="deleteAchievementFun()" class="btn btn-box-tool" data-toggle="tooltip" title="删除"><i class="glyphicon glyphicon-minus"></i></a>
|
||
</div>
|
||
</div>
|
||
<div class="box-body ">
|
||
<table id="table_achievements" style="table-layout:fixed;"></table>
|
||
</div>
|
||
</div> --%>
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-default" onclick="closeModel()" >关闭</button>
|
||
<button type="button" class="btn btn-primary" onclick="doupdate()" id="btn_save">保存</button>
|
||
<button type="button" class="btn btn-primary" onclick="dosubmit()" id="btn_save">提交</button>
|
||
</div>
|
||
</div>
|
||
<!-- /.modal-content -->
|
||
</div>
|
||
<!-- /.modal-dialog -->
|
||
</div>
|