zhangsiqi
5 months ago
3 changed files with 191 additions and 78 deletions
@ -0,0 +1,145 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('生产加工工序明细详情')" /> |
|||
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet"> |
|||
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet"> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-procedure-detail" th:object="${sysProcedure}"> |
|||
<input name="id" th:field="*{id}" type="hidden"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">工序id:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="procedureId" th:field="*{procedureId}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">生产设备型号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="produceEquipModel" th:field="*{produceEquipModel}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">工序编号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="procedureCode" th:field="*{procedureCode}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<!--<div class="form-group"> |
|||
<label class="col-sm-3 control-label">车间名称:</label> |
|||
<div class="col-sm-8"> |
|||
<!– <input name="workshopName" th:field="*{workshopName}" class="form-control" type="text">–> |
|||
<select name="workshopName" class="form-control select-list js-example-tags" th:field="*{workshopName}" th:with="type=${@dict.getType('sys_procedure_workshopName')}"> |
|||
<option value="">请选择车间名称</option> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"></option> |
|||
</select> |
|||
</div> |
|||
</div>--> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">工序名称:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="procedureName" th:field="*{procedureName}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">先后次序:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="sequence" th:field="*{sequence}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">单间加工成本:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="eachCost" th:field="*{eachCost}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">加工工时:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="procedureWorkhour" th:field="*{procedureWorkhour}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<!--<div class="form-group"> |
|||
<label class="col-sm-3 control-label">核算数量关联项:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="associatedItem" class="form-control select-list js-example-tags" th:field="*{associatedItem}" th:with="type=${@dict.getType('sys_procedure_associatedItem')}"> |
|||
<option value="">请选择核算数量关联项</option> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"></option> |
|||
</select> |
|||
<!– <input name="associatedItem" th:field="*{associatedItem}" class="form-control" type="text">–> |
|||
</div> |
|||
</div>--> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">工序备注:</label> |
|||
<div class="col-sm-8"> |
|||
<textarea name="procedureRemark" th:field="*{procedureRemark}" class="form-control" readonly></textarea> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:src="@{/ajax/libs/select2/select2.js}"></script> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "system/procedure"; |
|||
|
|||
var getData = [[${sysProcedure}]] |
|||
$("#form-procedure-detail").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/detail", $('#form-procedure-detail').serialize()); |
|||
} |
|||
} |
|||
|
|||
// $(document).ready(function(){ |
|||
// $('.js-example-tags').select2({ |
|||
// tags: true, |
|||
// insertTag: function (data, tag) { |
|||
// // Insert the tag at the end of the results |
|||
// data.push(tag); |
|||
// } |
|||
// }); |
|||
// }); |
|||
|
|||
$(function () { |
|||
var workshopNameData = { |
|||
id: getData.workshopName, |
|||
text: getData.workshopName |
|||
}; |
|||
if ($("#form-procedure-detail select[name='workshopName']").find("option[value='" + workshopNameData.id + "']").length) { |
|||
$("#form-procedure-detail select[name='workshopName']").val(workshopNameData.id).trigger('change'); |
|||
} else { |
|||
// Create a DOM Option and pre-select by default |
|||
var newOption = new Option(workshopNameData.text, workshopNameData.id, true, true); |
|||
// Append it to the select |
|||
$("#form-procedure-detail select[name='workshopName']").append(newOption).trigger('change'); |
|||
} |
|||
$("#form-procedure-detail select[name='workshopName']").select2({ |
|||
tags: true |
|||
}); |
|||
var associatedItemData = { |
|||
id: getData.associatedItem, |
|||
text: getData.associatedItem |
|||
}; |
|||
if ($("#form-procedure-detail select[name='associatedItem']").find("option[value='" + associatedItemData.id + "']").length) { |
|||
$("#form-procedure-detail select[name='associatedItem']").val(associatedItemData.id).trigger('change'); |
|||
} else { |
|||
// Create a DOM Option and pre-select by default |
|||
var newOption = new Option(associatedItemData.text, associatedItemData.id, true, true); |
|||
// Append it to the select |
|||
$("#form-procedure-detail select[name='associatedItem']").append(newOption).trigger('change'); |
|||
} |
|||
$("#form-procedure-detail select[name='associatedItem']").select2({ |
|||
tags: true |
|||
}); |
|||
}) |
|||
|
|||
|
|||
|
|||
</script> |
|||
</body> |
|||
</html> |
Loading…
Reference in new issue