<!DOCTYPE html>
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
<head>
|
<th:block th:include="include :: header('新增测试包')"/>
|
<th:block th:include="include :: datetimepicker-css"/>
|
<th:block th:include="include :: select2-css" />
|
<th:block th:include="include :: bootstrap-select-css" />
|
</head>
|
<body class="white-bg">
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
<form class="form-horizontal m" id="form-test_package-add">
|
<div class="form-group">
|
<label class="col-sm-3 control-label">[[#{jsp.exam.report.006}]]:</label>
|
<div class="col-sm-8">
|
<input name="testName" class="form-control" type="text" required>
|
</div>
|
</div>
|
<div class="form-group">
|
<label class="col-sm-3 control-label">[[#{basis.type}]]:</label>
|
<div class="col-sm-8">
|
<select name="testType" class="form-control m-b"
|
th:with="type=${@dict.getType('test_type')}" onchange="testTypeChange()">
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
th:value="${dict.dictValue}"></option>
|
</select>
|
</div>
|
</div>
|
<div class="form-group">
|
<label class="col-sm-3 control-label">[[#{basis.area}]]:</label>
|
<div class="col-sm-8">
|
<select name="testArea" class="form-control m-b"
|
th:with="type=${@dict.getType('test_area')}">
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
th:value="${dict.dictValue}"></option>
|
</select>
|
</div>
|
</div>
|
<!-- <div class="form-group">-->
|
<!-- <label class="col-sm-3 control-label">[[#{jsp.exam.test_package.001}]]:</label>-->
|
<!-- <div class="col-sm-8">-->
|
<!-- <select name="langType" class="form-control m-b"-->
|
<!-- th:with="type=${@dict.getType('lang_type')}">-->
|
<!-- <option th:each="dict : ${type}" th:text="${dict.dictLabel}"-->
|
<!-- th:value="${dict.dictValue}"></option>-->
|
<!-- </select>-->
|
<!-- </div>-->
|
<!-- </div>-->
|
<div class="form-group">
|
<label class="col-sm-3 control-label">[[#{jsp.exam.test_package.002}]]:</label>
|
<div class="col-sm-8">
|
<div class='input-group'>
|
<input name="prodId" id="prodId" class="form-control" type="hidden">
|
<input name="prodName" id="prodName" class="form-control" readonly type="text" required>
|
<span class='input-group-addon input-sm' onclick='selectProdTree()'><i class='fa fa-search'></i></span>
|
</div>
|
</div>
|
</div>
|
<div class="form-group">
|
<label class="col-sm-3 control-label">[[#{jsp.exam.test_package.003}]]:</label>
|
<div class="col-sm-8">
|
<input name="testEmail" class="form-control" type="text" th:placeholder="#{jsp.exam.distributor.hrEmail.warn}">
|
</div>
|
</div>
|
<!-- <div class="form-group">-->
|
<!-- <label class="col-sm-3 control-label">任务框架:</label>-->
|
<!-- <div class="col-sm-8">-->
|
<!-- <input name="frameTextContentId" class="form-control" type="text">-->
|
<!-- </div>-->
|
<!-- </div>-->
|
<div class="form-group">
|
<label class="col-sm-3 control-label">[[#{jsp.exam.test_package.004}]]:</label>
|
<div class="col-sm-8">
|
<div class="input-group date">
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<input name="invalidTime" class="form-control" placeholder="yyyy-MM-dd"
|
type="text">
|
</div>
|
</div>
|
</div>
|
<div class="form-group">
|
<label class="col-sm-3 control-label">[[#{jsp.exam.test_package.005}]]:</label>
|
<div class="col-sm-8">
|
<textarea id="template" name="template" th:text="${template}" class="form-control" rows="10" cols="60"></textarea>
|
</div>
|
</div>
|
|
<div class="form-group">
|
<label class="col-sm-3 control-label">[[#{jsp.exam.test_package.hrinvitationEmailContent}]]:</label>
|
<div class="col-sm-8">
|
<textarea id="hrTemplate" name="hrTemplate" th:text="${hrTemplate}" class="form-control" rows="10" cols="60"></textarea>
|
</div>
|
</div>
|
|
<!--报告大类-->
|
<div class="form-group">
|
<label class="col-sm-3 control-label">[[#{jsp.exam.productReportTemplate}]]:</label>
|
<div class="col-sm-8">
|
<select id="reportTemplateId" name="reportTemplateId" class="form-control noselect2 selectpicker" multiple required>
|
<option th:each="dict : ${templateList}" th:text="${dict['reportType']}"
|
th:value="${dict['id']}" ></option>
|
</select>
|
</div>
|
</div>
|
|
<!--岗位-->
|
<div class="form-group jaq-div" hidden>
|
<label class="col-sm-3 control-label">[[#{jsp.exam.testPackage.position}]]:</label>
|
<div class="col-sm-8">
|
<input name="position" class="form-control" type="text">
|
</div>
|
</div>
|
|
<div class="form-group jaq-div" hidden>
|
<label class="col-sm-3 control-label">[[#{jsp.exam.testPackage.professionalCategory}]]:</label>
|
<div class="col-sm-8">
|
<input name="professionalCategory" class="form-control" type="text">
|
</div>
|
</div>
|
|
<div class="form-group jaq-div" hidden>
|
<label class="col-sm-3 control-label">[[#{jsp.exam.testPackage.superiorPosition}]]:</label>
|
<div class="col-sm-8">
|
<input name="superiorPosition" class="form-control" type="text">
|
</div>
|
</div>
|
|
<div class="form-group">
|
<label class="col-sm-3 control-label">[[#{jsp.exam.testPackage.autoSendReport}]]:</label>
|
<div class="col-sm-8">
|
<label class='check-box'><input th:type="checkbox" id="autoSendReport" name="autoSendReport"></label>
|
</div>
|
</div>
|
|
<div class="row">
|
<div class="col-sm-12">
|
<div class="form-group">
|
<label class="col-xs-2 control-label">[[#{jsp.exam.demographyParam.demographicname}]]:</label>
|
<div class="col-xs-10">
|
<label th:each="role:${roles}" class="check-box">
|
<input name="paramCodes" id="paramCodes" type="checkbox" th:value="${role.paramId}" th:text="${role.paramCode}" th:disabled="${role.paramStatus == '0'}" th:checked="${role.flag}">
|
</label>
|
</div>
|
</div>
|
</div>
|
</div>
|
</form>
|
</div>
|
<th:block th:include="include :: footer"/>
|
<th:block th:include="include :: datetimepicker-js"/>
|
<th:block th:include="include :: select2-js" />
|
<th:block th:include="include :: bootstrap-select-js" />
|
<script type="text/javascript">
|
var prefix = ctx + "exam/test_package"
|
$("#form-test_package-add").validate({
|
focusCleanup: true
|
});
|
|
function submitHandler() {
|
if ($.validate.form()) {
|
if (!$.validate.verifyEmails($('[name="testEmail"]').val())) {
|
return;
|
}
|
if (!verifyCharacter($('[name="position"]').val())) {
|
return;
|
}
|
$.operate.save(prefix + "/add", $('#form-test_package-add').serialize());
|
}
|
}
|
|
$("input[name='invalidTime']").datetimepicker({
|
format: "yyyy-mm-dd",
|
minView: "month",
|
autoclose: true
|
});
|
function verifyCharacter (text) {
|
if (text == null || text == undefined || text.trim() == "") {
|
return true;
|
}
|
var regEn = /[`~!@#$%^&*()_+<>?:"{},.\/;'[\]]/im,
|
regCn = /[·!#¥(——):;“”‘、,|《。》?、【】[\]]/im
|
if(regEn.test(text) || regCn.test(text)) {
|
$.modal.alertWarning('[[#{the.name.cannot.contain.special.characters}]]');
|
return false;
|
}
|
return true;
|
}
|
|
// 选择字典处理函数
|
function selectProdTree() {
|
var url = ctx + "exam/product/getProdList?langType=" + $('[name="langType"]').val() + "&testType=" + $('[name="testType"]').val();
|
var options = {
|
title: 'select',
|
width: "380",
|
url: url,
|
callBack: doSubmit
|
};
|
$.modal.openOptions(options);
|
}
|
|
function testTypeChange() {
|
$('[name="prodId"]').val("")
|
$('[name="prodName"]').val("")
|
}
|
|
function doSubmit(index, layero){
|
var body = layer.getChildFrame('body', index);
|
var dictType = body.find('#dictType').val();
|
var prodName = body.find('#prodName').val();
|
layer.close(index);
|
$("#prodId").val(dictType);
|
$("#prodName").val(prodName);
|
$.ajax({
|
url: prefix + "/prodTemplate",
|
data: {"prodId":dictType},
|
type: "post",
|
success: function(result) {
|
if (result.code == 0) {
|
var modelList = result.data;
|
if (modelList && modelList.length != 0) {
|
$("#reportTemplateId").empty();
|
for (var i = 0; i < modelList.length; i++) {
|
var option = "<option value=\"" + modelList[i].id + "\"";
|
option += ">" + modelList[i].reportType + "</option>"; //动态添加数据
|
$('#reportTemplateId').append(option);
|
}
|
//使用refresh方法更新UI以匹配新状态。
|
$('#reportTemplateId').selectpicker('refresh');
|
//render方法强制重新渲染引导程序 - 选择ui。
|
$('#reportTemplateId').selectpicker('render');
|
}
|
}
|
}
|
})
|
}
|
|
$(function () {
|
$.table.testPackDefault();
|
});
|
</script>
|
</body>
|
</html>
|