You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
89 lines
3.5 KiB
89 lines
3.5 KiB
2 years ago
|
<!DOCTYPE html>
|
||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||
|
<head>
|
||
|
<th:block th:include="include :: header('修改图纸资料')" />
|
||
|
<th:block th:include="include :: bootstrap-fileinput-css"/>
|
||
|
</head>
|
||
|
<style>
|
||
|
.m{
|
||
|
display: block;
|
||
|
}
|
||
|
.m .form-group{
|
||
|
width: 100%;
|
||
|
}
|
||
|
.col-sm-3 {
|
||
|
width: 20%;
|
||
|
}
|
||
|
</style>
|
||
|
<body class="white-bg">
|
||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||
|
<form class="form-horizontal m" id="form-drawing-edit" th:object="${sysDrawing}">
|
||
|
<input name="drawingId" th:field="*{drawingId}" type="hidden">
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">图纸编码:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<input name="drawingCode" th:field="*{drawingCode}" class="form-control" type="text">
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">图纸类别:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<input name="drawingMaterialCategory" th:field="*{drawingMaterialCategory}" 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="drawingRemarks" class="form-control">[[*{drawingRemarks}]]</textarea>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">上传人:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<input name="uploadPerson" th:field="*{uploadPerson}" class="form-control" type="text">
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">图纸上传:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<input type="hidden" name="drawingUpload" th:field="*{drawingUpload}">
|
||
|
<div class="file-loading">
|
||
|
<input class="form-control file-upload" id="drawingUpload" name="file" type="file">
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</form>
|
||
|
</div>
|
||
|
<th:block th:include="include :: footer" />
|
||
|
<th:block th:include="include :: bootstrap-fileinput-js"/>
|
||
|
<script th:inline="javascript">
|
||
|
var prefix = ctx + "system/drawing";
|
||
|
$("#form-drawing-edit").validate({
|
||
|
focusCleanup: true
|
||
|
});
|
||
|
|
||
|
function submitHandler() {
|
||
|
if ($.validate.form()) {
|
||
|
$.operate.save(prefix + "/edit", $('#form-drawing-edit').serialize());
|
||
|
}
|
||
|
}
|
||
|
|
||
|
$(".file-upload").each(function (i) {
|
||
|
var val = $("input[name='" + this.id + "']").val()
|
||
|
$(this).fileinput({
|
||
|
'uploadUrl': prefix + '/upload',
|
||
|
initialPreviewAsData: true,
|
||
|
initialPreview: [val],
|
||
|
maxFileCount: 1,
|
||
|
autoReplace: true,
|
||
|
showPreview: true,
|
||
|
}).on('fileuploaded', function (event, data, previewId, index) {
|
||
|
$("input[name='" + event.currentTarget.id + "']").val(data.response.url)
|
||
|
}).on('fileremoved', function (event, id, index) {
|
||
|
$("input[name='" + event.currentTarget.id + "']").val('')
|
||
|
})
|
||
|
$(this).fileinput('_initFileActions');
|
||
|
});
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|