379 lines
19 KiB
Plaintext
379 lines
19 KiB
Plaintext
<%@ page language="java" pageEncoding="UTF-8" %>
|
||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||
|
||
<jsp:include page="/jsp/process/processAdjustmentContentList.jsp"></jsp:include>
|
||
|
||
<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 = '${scrapApply.id}';//业务Id
|
||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||
var nameSpace_process = 'ProcessUploadFile';//保存文件夹
|
||
var status = 'delete';//有删除权限
|
||
|
||
function doSubmit() {
|
||
$('#subForm').data('bootstrapValidator')
|
||
.updateStatus('targetUsersName', 'NOT_VALIDATED', null)
|
||
.validateField('targetUsersName');
|
||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||
|
||
//修改得分工时等
|
||
var evaluateScore = $('#evaluateScore').val();//质量验收评价得分
|
||
var evaluateWeight = $('#evaluateWeight').val();//质量验收评价权重
|
||
var coordinationScore = $('#coordinationScore').val();//协同满意度评价得分
|
||
var coordinationWeight = $('#coordinationWeight').val();//协同评价权重
|
||
var baseHours = $('#baseHours').val();//工单工时
|
||
var totalScore = $('#totalScore').val();
|
||
var workingHours = $('#workingHours').val();
|
||
var checkExplain = $('#checkExplain').val();
|
||
$.post(ext.contextPath + '/process/processAdjustment/updateData.do', {
|
||
id: '${entity.id}',
|
||
evaluateScore: evaluateScore,
|
||
evaluateWeight: evaluateWeight,
|
||
coordinationScore: coordinationScore,
|
||
coordinationWeight: coordinationWeight,
|
||
baseHours: baseHours,
|
||
totalScore: totalScore,
|
||
workingHours: workingHours,
|
||
checkExplain: checkExplain
|
||
}, function (data) {
|
||
$.post(ext.contextPath + "/process/processAdjustment/doAuditProcess.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');
|
||
});
|
||
}
|
||
}
|
||
|
||
var showUser4SelectsFun = function () {
|
||
var userIds = $("#targetusers").val();
|
||
var jobIds = $("#targetjobs").val();
|
||
$.post(ext.contextPath + '/user/userForSelectByCompany.do', {
|
||
formId: "subForm",
|
||
hiddenId: "targetusers",
|
||
textId: "targetUsersName",
|
||
userIds: userIds,
|
||
jobIds: jobIds
|
||
}, function (data) {
|
||
$("#user4SelectDiv").html(data);
|
||
openModal("user4SelectModal");
|
||
});
|
||
};
|
||
$(function () {
|
||
//初始化文件显示
|
||
getFileList_process();
|
||
//初始化选择框,方法在workflow.js里
|
||
processSelectNode("${businessUnitAudit.taskid}");
|
||
//输入框验证
|
||
$("#subForm").bootstrapValidator({
|
||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||
fields: {
|
||
targetUsersName: {
|
||
validators: {
|
||
notEmpty: {
|
||
message: '提交人员不能为空'
|
||
}
|
||
}
|
||
},
|
||
}
|
||
});
|
||
|
||
//显示流程详情
|
||
var id = '${entity.id}';
|
||
$.post(ext.contextPath + '/process/processAdjustment/showProcessView.do', {
|
||
id: id,
|
||
inModal: 'inModal'
|
||
}, function (data) {
|
||
$("#showView").html(data);
|
||
});
|
||
|
||
//加载调整内容
|
||
getContent('${entity.id}', '${entity.status}');
|
||
//加载资料
|
||
getContentForFile('${entity.id}', '${entity.status}');
|
||
|
||
//如果任意权重为0 则赋值百分之50
|
||
var evaluateWeight = $('#evaluateWeight').val();//质量验收评价权重
|
||
var coordinationWeight = $('#coordinationWeight').val();//协同评价权重
|
||
if (evaluateWeight == 0 || coordinationWeight == 0) {
|
||
$('#evaluateWeight').val(50);
|
||
$('#coordinationWeight').val(50);
|
||
}
|
||
|
||
//查询工单工时
|
||
$.post(ext.contextPath + '/process/processAdjustment/selectBaseHours.do', {
|
||
id: id
|
||
}, function (data) {
|
||
$('#baseHours').val(data);
|
||
// $('#baseHours_p').html(data);
|
||
});
|
||
|
||
})
|
||
|
||
//evaluateScore 质量验收评价得分
|
||
//evaluateWeight 质量验收评价权重
|
||
//coordinationScore 协同满意度评价得分
|
||
//coordinationWeight 协同评价权重
|
||
//totalScore 总得分
|
||
//baseHours 工单工时
|
||
//workingHours 绩效工时
|
||
|
||
/**
|
||
* 计算工时方法
|
||
*/
|
||
function timefuc() {
|
||
var evaluateScore = $('#evaluateScore').val();//质量验收评价得分
|
||
var evaluateWeight = parseFloat($('#evaluateWeight').val());//质量验收评价权重
|
||
var coordinationScore = $('#coordinationScore').val();//协同满意度评价得分
|
||
var coordinationWeight = parseFloat($('#coordinationWeight').val());//协同评价权重
|
||
var baseHours = $('#baseHours').val();//工单工时
|
||
var totalScore = (evaluateScore * evaluateWeight / 100 + coordinationScore * coordinationWeight / 100)
|
||
var workingHours = totalScore * baseHours / 100
|
||
|
||
//权重总和
|
||
var allweight = evaluateWeight + coordinationWeight;
|
||
if (allweight > 100) {
|
||
alert('权重总和不得大于100');
|
||
$('#evaluateWeight').val(50);
|
||
$('#coordinationWeight').val(50);
|
||
return false;
|
||
}
|
||
//总得分
|
||
$('#totalScore').val(totalScore);
|
||
//绩效工时
|
||
$('#workingHours').val(workingHours);
|
||
}
|
||
|
||
</script>
|
||
<div class="modal fade" id="subModal">
|
||
<div class="modal-dialog modal-xlg">
|
||
<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">工艺调整(${taskName})</h4>
|
||
</div>
|
||
<div class="modal-body">
|
||
<div class="row">
|
||
<div class="col-md-7 col-xs-12">
|
||
<!-- 新增界面formid强制为subForm -->
|
||
<form class="form-horizontal" id="subForm" enctype="multipart/form-data">
|
||
<!-- 界面提醒div强制id为alertDiv -->
|
||
<div id="alertDiv"></div>
|
||
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">工单号</label>
|
||
<div class="col-sm-4">
|
||
<p class="form-control-static">${entity.jobNumber}</p>
|
||
</div>
|
||
<label class="col-sm-2 control-label">申请人</label>
|
||
<div class="col-sm-4">
|
||
<p class="form-control-static">${entity.user.caption}</p>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">工艺调整类型</label>
|
||
<div class="col-sm-4">
|
||
<p class="form-control-static">${entity.processAdjustmentType.name}</p>
|
||
</div>
|
||
<label class="col-sm-2 control-label">厂区</label>
|
||
<div class="col-sm-4">
|
||
<p class="form-control-static">${entity.company.sname}</p>
|
||
</div>
|
||
</div>
|
||
|
||
<%--<div class="form-group">
|
||
<label class="col-sm-2 control-label">异常编号</label>
|
||
<div class="col-sm-4">
|
||
<p class="form-control-static">${entity.abnormalCode}</p>
|
||
</div>
|
||
<label class="col-sm-2 control-label">异常名称</label>
|
||
<div class="col-sm-4">
|
||
<p class="form-control-static">${entity.abnormalName}</p>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">异常现象分析</label>
|
||
<div class="col-sm-10">
|
||
<p class="form-control-static">${entity.abnormalAnalysis}</p>
|
||
</div>
|
||
</div>--%>
|
||
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">备注</label>
|
||
<div class="col-sm-10">
|
||
<p class="form-control-static">${entity.remarks}</p>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">*质量验收评价得分</label>
|
||
<div class="col-sm-4">
|
||
<input type="number" class="form-control" id="evaluateScore" name="evaluateScore"
|
||
placeholder="质量验收评价得分" value="${entity.evaluateScore}" step="0.01"
|
||
onblur="timefuc();">
|
||
</div>
|
||
<label class="col-sm-2 control-label">*质量验收评价权重</label>
|
||
<div class="col-sm-4">
|
||
<input type="number" class="form-control" id="evaluateWeight" name="evaluateWeight"
|
||
placeholder="质量验收评价权重" value="${entity.evaluateWeight}" step="0.01"
|
||
onblur="timefuc();">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">*协同满意度评价得分</label>
|
||
<div class="col-sm-4">
|
||
<input type="number" class="form-control" id="coordinationScore"
|
||
name="coordinationScore"
|
||
placeholder="协同满意度评价得分" value="${entity.coordinationScore}" step="0.01"
|
||
onblur="timefuc();">
|
||
</div>
|
||
<label class="col-sm-2 control-label">*协同评价权重</label>
|
||
<div class="col-sm-4">
|
||
<input type="number" class="form-control" id="coordinationWeight"
|
||
name="coordinationWeight"
|
||
placeholder="协同评价权重" value="${entity.coordinationWeight}" step="0.01"
|
||
onblur="timefuc();">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">*总得分</label>
|
||
<div class="col-sm-4">
|
||
<input type="number" class="form-control" id="totalScore" name="totalScore"
|
||
placeholder="总得分"
|
||
value="${entity.totalScore}" step="0.01" readonly>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">*工单工时</label>
|
||
<div class="col-sm-4">
|
||
<input type="number" class="form-control" id="baseHours" name="baseHours"
|
||
value="${entity.baseHours}" step="0.01" readonly>
|
||
<%-- <p class="form-control-static" id="baseHours_p">${entity.baseHours}</p>--%>
|
||
</div>
|
||
<label class="col-sm-2 control-label">*绩效工时</label>
|
||
<div class="col-sm-4">
|
||
<input type="number" class="form-control" id="workingHours" name="workingHours"
|
||
placeholder="绩效工时"
|
||
value="${entity.workingHours}" step="0.01" readonly>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">*验收说明</label>
|
||
<div class="col-sm-10">
|
||
<textarea class="form-control" rows="2" id="checkExplain" name="checkExplain"
|
||
placeholder="处理意见">${entity.checkExplain}</textarea>
|
||
</div>
|
||
</div>
|
||
|
||
<input type="hidden" class="form-control" name="id" value="${businessUnitAudit.id}">
|
||
<input type="hidden" class="form-control" name="processid"
|
||
value="${businessUnitAudit.processid}">
|
||
<input type="hidden" class="form-control" name="taskid" value="${businessUnitAudit.taskid}">
|
||
<input type="hidden" class="form-control" name="businessid"
|
||
value="${businessUnitAudit.businessid}">
|
||
<input type="hidden" class="form-control" name=unitid value="${businessUnitAudit.unitid}">
|
||
<input type="hidden" class="form-control" name="taskdefinitionkey"
|
||
value="${businessUnitAudit.taskdefinitionkey}">
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">*审核结果</label>
|
||
<div class="col-sm-6">
|
||
<select class="form-control select2" id="passstatus" name="passstatus"
|
||
style="width: 270px;">
|
||
<option value=true>通过</option>
|
||
<option value=false>驳回</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">*下一节点</label>
|
||
<div class="col-sm-6">
|
||
<select class="form-control select2" id="routeNum" name="routeNum"
|
||
style="width: 270px;">
|
||
</select>
|
||
</div>
|
||
</div>
|
||
<div id="reject" class="form-group">
|
||
<label class="col-sm-2 control-label">*处理意见</label>
|
||
<div class="col-sm-10">
|
||
<textarea class="form-control" rows="2" id="auditopinion" name="auditopinion"
|
||
placeholder="处理意见"></textarea>
|
||
</div>
|
||
</div>
|
||
<div id="selectUsers" class="form-group">
|
||
<label class="col-sm-2 control-label">提交至:</label>
|
||
<div class="col-sm-10">
|
||
<input type="text" class="form-control" id="targetUsersName" name="targetUsersName"
|
||
placeholder="下一级人员" onclick="showUser4SelectsFun();">
|
||
<input id="targetusers" name="targetusers" type="hidden" value=""/>
|
||
<input class="form-control" id="targetjobs" name="targetjobs" type="hidden"
|
||
value=""/>
|
||
</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>-->
|
||
|
||
<div class="box box-primary">
|
||
<div class="box-header with-border">
|
||
<h3 class="box-title">调整内容</h3>
|
||
</div>
|
||
<div class="box-body ">
|
||
<table id="table_content" style="table-layout:fixed;"></table>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="box box-primary">
|
||
<div class="box-header with-border">
|
||
<h3 class="box-title">相关资料</h3>
|
||
</div>
|
||
<div class="box-body ">
|
||
<table id="table_contentFile" style="table-layout:fixed;"></table>
|
||
</div>
|
||
</div>
|
||
|
||
</form>
|
||
</div>
|
||
|
||
<div class="col-md-5 col-xs-12" id="showView"></div>
|
||
|
||
</div>
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||
<button type="button" class="btn btn-primary" onclick="doSubmit()" id="btn_update">提交</button>
|
||
</div>
|
||
</div>
|
||
<!-- /.modal-content -->
|
||
</div>
|
||
<!-- /.modal-dialog -->
|
||
</div> |