zhangsiqi
6 months ago
12 changed files with 563 additions and 257 deletions
@ -0,0 +1,167 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('配置技术团队')" /> |
|||
<th:block th:include="include :: select2-css" /> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-materialTechnologyTeam"> |
|||
<div class="container"> |
|||
<div class="form-row"> |
|||
<div class="content-header" role="group"> |
|||
<h3>技术团队配置</h3> |
|||
</div> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-sm-6"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-4 control-label">料号:</label> |
|||
<div class="col-sm-8"> |
|||
<input type="text" class="form-control" value="team001" disabled /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-sm-6"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-4 control-label">物料名称:</label> |
|||
<div class="col-sm-8"> |
|||
<input type="text" class="form-control" value="" disabled /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-sm-6"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-4 control-label">团队ID:</label> |
|||
<div class="col-sm-8"> |
|||
<select class="form-control" name="teamCode"></select> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-sm-6"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-4 control-label">团队名称:</label> |
|||
<div class="col-sm-8"> |
|||
<select class="form-control" name="teamName"> |
|||
<option value="">请选择</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="row"> |
|||
<table class="table table-bordered"> |
|||
<thead> |
|||
<tr> |
|||
<th>职能</th> |
|||
<th>电气</th> |
|||
<th>结构</th> |
|||
<th>软件</th> |
|||
<th>测试</th> |
|||
<th>主管1</th> |
|||
<th>主管2</th> |
|||
<th>经理</th> |
|||
<th>总监</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<tr id="add_teachnologyTeamList"> |
|||
<td>人员</td> |
|||
<td>张三</td> |
|||
<td>李四</td> |
|||
<td>王五</td> |
|||
<td>张飞</td> |
|||
<td>佛山</td> |
|||
<td>朱一</td> |
|||
<td>朱明</td> |
|||
<td>祝福</td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: select2-js" /> |
|||
<script th:inline="javascript"> |
|||
$("#form-materialTechnologyTeam").validate({focusCleanup: true}); |
|||
$(function () { |
|||
$("select[name='teamCode']").select2({ |
|||
placeholder: "请选择", |
|||
ajax: { |
|||
url: ctx + "system/technicalTeam/list", |
|||
dataType: 'json', |
|||
delay: 250, |
|||
processResults: function (res, params) { |
|||
var resultList = res.rows; |
|||
var options = []; |
|||
for (let i in resultList) { |
|||
var option = resultList[i]; |
|||
option.id = resultList[i]["technicalTeamId"]; |
|||
option.text = resultList[i]["technicalTeamId"]; |
|||
options.push(option); |
|||
} |
|||
return {results: options,} |
|||
}, |
|||
escapeMarkup: function (markup) {return markup;}, |
|||
} |
|||
}); |
|||
$("select[name='teamName']").select2({ |
|||
placeholder: "请选择", |
|||
ajax: { |
|||
url: ctx + "system/technicalTeam/list", |
|||
dataType: 'json', |
|||
delay: 250, |
|||
processResults: function (res, params) { |
|||
var resultList = res.rows; |
|||
var options = []; |
|||
for (let i in resultList) { |
|||
var option = resultList[i]; |
|||
option.id = resultList[i]["technicalTeamName"]; |
|||
option.text = resultList[i]["technicalTeamName"]; |
|||
options.push(option); |
|||
} |
|||
return {results: options,} |
|||
}, |
|||
escapeMarkup: function (markup) {return markup;}, |
|||
} |
|||
}); |
|||
}); |
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(ctx + "material/materialTechnologyTeam/edit", $('#form-materialTechnologyTeam').serialize()); |
|||
} |
|||
} |
|||
|
|||
|
|||
$("select[name='teamCode']").on("select2:select", function (e) { |
|||
var selectData = e.params.data; |
|||
var teamCode = $(this).val(); |
|||
$("select[name='teamName']").val(selectData.technicalTeamName); |
|||
$("#add_teachnologyTeamList").find("td:eq(2)").text(selectData.dianqi); |
|||
$("#add_teachnologyTeamList").find("td:eq(3)").text(selectData.struct); |
|||
$("#add_teachnologyTeamList").find("td:eq(4)").text(selectData.soft); |
|||
$("#add_teachnologyTeamList").find("td:eq(5)").text(selectData.test); |
|||
$("#add_teachnologyTeamList").find("td:eq(6)").text(selectData.zhuguan1); |
|||
$("#add_teachnologyTeamList").find("td:eq(7)").text(selectData.zhuguan2); |
|||
$("#add_teachnologyTeamList").find("td:eq(8)").text(selectData.manger); |
|||
$("#add_teachnologyTeamList").find("td:eq(9)").text(selectData.director); |
|||
}); |
|||
$("select[name='teamName']").on("select2:select", function (e) { |
|||
var selectData = e.params.data; |
|||
$("select[name='teamCode']").val(selectData.technicalTeamId); |
|||
$("#add_teachnologyTeamList").find("td:eq(2)").text(selectData.dianqi); |
|||
$("#add_teachnologyTeamList").find("td:eq(3)").text(selectData.struct); |
|||
$("#add_teachnologyTeamList").find("td:eq(4)").text(selectData.soft); |
|||
$("#add_teachnologyTeamList").find("td:eq(5)").text(selectData.test); |
|||
$("#add_teachnologyTeamList").find("td:eq(6)").text(selectData.zhuguan1); |
|||
$("#add_teachnologyTeamList").find("td:eq(7)").text(selectData.zhuguan2); |
|||
$("#add_teachnologyTeamList").find("td:eq(8)").text(selectData.manger); |
|||
$("#add_teachnologyTeamList").find("td:eq(9)").text(selectData.director); |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
Loading…
Reference in new issue