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.
206 lines
9.4 KiB
206 lines
9.4 KiB
10 months ago
|
<!DOCTYPE html>
|
||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||
|
<head>
|
||
|
<th:block th:insert="~{include :: header('打印模版设置列表')}" />
|
||
|
</head>
|
||
|
<body class="white-bg">
|
||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||
|
<form class="form-horizontal m" id="form-modelmanager-add">
|
||
|
<h4 class="form-header h4">打印模版设置信息</h4>
|
||
|
<div class="col-xs-12">
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label is-required">模版编号:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<input name="mCode" class="form-control" type="text" required>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="col-xs-12">
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label is-required">模版名称:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<input name="mName" class="form-control" type="text" required>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="col-xs-12">
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label is-required">模版类型:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<select name="mType" class="form-control" th:with="type=${@dict.getType('model_type')}" required>
|
||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="col-xs-12">
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label is-required">模版来源:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<select name="mTypeSrc" class="form-control" th:with="type=${@dict.getType('model_type_src')}" required>
|
||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="col-xs-12">
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">文件名称:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<input name="mFilename" class="form-control" type="text">
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="col-xs-12">
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">模版内容:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<script id="editor" name="mData" type="text/plain" style="height: 300px;"></script>
|
||
|
<textarea id="mData" style="display: none;">[[*{mData}]]</textarea>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="col-xs-12">
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label is-required">纸张类型:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<select name="mPageSize" class="form-control" th:with="type=${@dict.getType('model_page_type')}" required>
|
||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="col-xs-12">
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">纸张尺寸:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<input name="mPageValue" class="form-control" type="text" th:disabled="${mPageSize}!='UESR'">
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="col-xs-12">
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">是否横向:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<select name="isPageRotate" class="form-control" th:with="type=${@dict.getType('sys_yes_no')}" required>
|
||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<!-- <div class="col-xs-12">-->
|
||
|
<!-- <div class="form-group">-->
|
||
|
<!-- <label class="col-sm-3 control-label is-required">是否动态参数:</label>-->
|
||
|
<!-- <div class="col-sm-8">-->
|
||
|
<!-- <select name="isDyparam" class="form-control" th:with="type=${@dict.getType('sys_yes_no')}" required>-->
|
||
|
<!-- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
|
||
|
<!-- </select>-->
|
||
|
<!-- </div>-->
|
||
|
<!-- </div>-->
|
||
|
<!-- </div>-->
|
||
|
<h4 class="form-header h4">模版参数管理信息</h4>
|
||
|
<div class="row">
|
||
|
<div class="col-xs-12">
|
||
|
<button type="button" class="btn btn-white btn-sm" onclick="addRow()"><i class="fa fa-plus"> 增加</i></button>
|
||
|
<button type="button" class="btn btn-white btn-sm" onclick="sub.delRow()"><i class="fa fa-minus"> 删除</i></button>
|
||
|
<div class="col-sm-12 select-table table-striped">
|
||
|
<table id="bootstrap-table"></table>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</form>
|
||
|
</div>
|
||
|
<th:block th:include="~{include :: footer}" />
|
||
|
<th:block th:include="~{include :: ueditor-js}" />
|
||
|
<script th:inline="javascript">
|
||
|
var prefix = ctx + "print/modelmanager"
|
||
|
var paramTypeDatas = [[${@dict.getType('param_type')}]];
|
||
|
$("#form-modelmanager-add").validate({
|
||
|
focusCleanup: true
|
||
|
});
|
||
|
$(function () {
|
||
|
var text = $("#mData").text();
|
||
|
var ue = UE.getEditor('editor');
|
||
|
ue.ready(function () {
|
||
|
ue.setContent(text);
|
||
|
});
|
||
|
})
|
||
|
function submitHandler() {
|
||
|
if ($.validate.form()) {
|
||
|
$.operate.save(prefix + "/add", $('#form-modelmanager-add').serialize());
|
||
|
}
|
||
|
}
|
||
|
|
||
|
$(function() {
|
||
|
var options = {
|
||
|
pagination: false,
|
||
|
showSearch: false,
|
||
|
showRefresh: false,
|
||
|
showToggle: false,
|
||
|
showColumns: false,
|
||
|
sidePagination: "client",
|
||
|
columns: [{
|
||
|
checkbox: true
|
||
|
},
|
||
|
{
|
||
|
field: 'index',
|
||
|
align: 'center',
|
||
|
title: "序号",
|
||
|
formatter: function (value, row, index) {
|
||
|
var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index));
|
||
|
return columnIndex + $.table.serialNumber(index);
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
field: 'paramCode',
|
||
|
align: 'center',
|
||
|
title: '参数名',
|
||
|
formatter: function(value, row, index) {
|
||
|
var html = $.common.sprintf("<input class='form-control' type='text' name='winPrintModelParamsList[%s].paramCode' value='%s'>", index, value);
|
||
|
return html;
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
field: 'paramDesc',
|
||
|
align: 'center',
|
||
|
title: '参数描述',
|
||
|
formatter: function(value, row, index) {
|
||
|
var html = $.common.sprintf("<input class='form-control' type='text' name='winPrintModelParamsList[%s].paramDesc' value='%s'>", index, value);
|
||
|
return html;
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
field: 'paramType',
|
||
|
align: 'center',
|
||
|
title: '参数类型',
|
||
|
formatter: function(value, row, index) {
|
||
|
var name = $.common.sprintf("winPrintModelParamsList[%s].paramType", index);
|
||
|
return $.common.dictToSelect(paramTypeDatas, value, name);
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
title: '操作',
|
||
|
align: 'center',
|
||
|
formatter: function(value, row, index) {
|
||
|
var value = $.common.isNotEmpty(row.index) ? row.index : $.table.serialNumber(index);
|
||
|
return '<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="sub.delRowByIndex(\'' + value + '\')"><i class="fa fa-remove"></i>删除</a>';
|
||
|
}
|
||
|
}]
|
||
|
};
|
||
|
$.table.init(options);
|
||
|
});
|
||
|
|
||
|
function addRow() {
|
||
|
var count = $("#" + table.options.id).bootstrapTable('getData').length;
|
||
|
var row = {
|
||
|
index: $.table.serialNumber(count),
|
||
|
paramCode: "",
|
||
|
paramDesc: "",
|
||
|
paramType: "",
|
||
|
}
|
||
|
sub.addRow(row);
|
||
|
}
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|