228 lines
8.7 KiB
HTML
228 lines
8.7 KiB
HTML
|
|
<!DOCTYPE html>
|
||
|
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||
|
|
<head>
|
||
|
|
<th:block th:include="include :: header('修改商品参数')" />
|
||
|
|
</head>
|
||
|
|
<body class="white-bg">
|
||
|
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||
|
|
<form class="form-horizontal m" id="form-itemparamters-edit" th:object="${itemParamters}">
|
||
|
|
<input type="hidden" name="createBy" id="createBy" th:field="*{createBy}"/>
|
||
|
|
<input type="hidden" name="updateBy" id="updateBy" th:field="*{updateBy}"/>
|
||
|
|
|
||
|
|
<h4 class="form-header h4">商品参数信息</h4>
|
||
|
|
<input name="itemParamtersId" th:field="*{itemParamtersId}" type="hidden">
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<div class="row mt10">
|
||
|
|
<div class="col-sm-6">
|
||
|
|
<label class="col-sm-4 control-label is-required">名称:</label>
|
||
|
|
<div class="col-sm-8">
|
||
|
|
<input id="itemParamtersName" name="itemParamtersName" th:value="*{itemParamtersName}" class="form-control" type="text" required>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<div class="col-sm-6">
|
||
|
|
<label class="col-sm-4 control-label">单据号:</label>
|
||
|
|
<div class="col-sm-8">
|
||
|
|
<input id="docNum" name="docNum" disabled th:value="*{docNum}" class="form-control" type="text">
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<div class="row mt10">
|
||
|
|
<div class="col-sm-6">
|
||
|
|
<label class="col-sm-4 control-label is-required">资料状态:</label>
|
||
|
|
<div class="col-sm-8">
|
||
|
|
<div class="radio-box" th:each="dict : ${@dict.getType('platf_doc_statu')}">
|
||
|
|
<input type="radio" th:id="${'status_' + dict.dictCode}" id="status" name="status" th:value="${dict.dictValue}" th:field="*{status}" required>
|
||
|
|
<label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<div class="row mt10">
|
||
|
|
<div class="col-sm-12">
|
||
|
|
<div class="form-group">
|
||
|
|
<label class="col-sm-2 control-label">备注:</label>
|
||
|
|
<div class="col-sm-10">
|
||
|
|
<textarea id="remark" name="remark" maxlength="500" class="form-control" rows="3" >[[*{remark}]]</textarea>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<div class="col-sm-6">
|
||
|
|
<label class="col-sm-4 control-label is-required">制单人:</label>
|
||
|
|
<div class="col-sm-8">
|
||
|
|
<input id="createByuserName" name="createByuserName" disabled th:value="*{createByuserName}" class="form-control" type="text" required>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<div class="row mt10">
|
||
|
|
<div class="col-sm-6">
|
||
|
|
<label class="col-sm-4 control-label is-required">制单时间:</label>
|
||
|
|
<div class="col-sm-8">
|
||
|
|
<input id="createTime" name="createTime" disabled th:value="${#dates.format(itemParamters.createTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text" required>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<div class="col-sm-6">
|
||
|
|
<label class="col-sm-4 control-label">修改人:</label>
|
||
|
|
<div class="col-sm-8">
|
||
|
|
<input id="updateByuserName" name="updateByuserName" disabled th:value="*{updateByuserName}" class="form-control" type="text">
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<div class="row mt10">
|
||
|
|
<div class="col-sm-6">
|
||
|
|
<label class="col-sm-4 control-label">修改时间:</label>
|
||
|
|
<div class="col-sm-8">
|
||
|
|
<input id="updateTime" name="updateTime" disabled th:value="${#dates.format(itemParamters.updateTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<h4 class="form-header h4">商品参数_计量单位信息</h4>
|
||
|
|
<div class="row mt10">
|
||
|
|
<div class="col-sm-12">
|
||
|
|
<button type="button" class="btn btn-white btn-sm" onclick="addColumn()"><i class="fa fa-plus"> 增加</i></button>
|
||
|
|
<button type="button" class="btn btn-white btn-sm" onclick="sub.delColumn()"><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" />
|
||
|
|
<script th:inline="javascript">
|
||
|
|
var prefix = ctx + "platform/itemparamters";
|
||
|
|
$("#form-itemparamters-edit").validate({
|
||
|
|
onkeyup: false,
|
||
|
|
rules:{
|
||
|
|
econName:{
|
||
|
|
remote: {
|
||
|
|
url: prefix + "/checkItemParamtersUnique",
|
||
|
|
type: "post",
|
||
|
|
dataType: "json",
|
||
|
|
data: {
|
||
|
|
"ItemParamtersName" : function() {
|
||
|
|
return $.common.trim($("#ItemParamtersName").val());
|
||
|
|
}
|
||
|
|
},
|
||
|
|
dataFilter: function(data, type) {
|
||
|
|
return $.validate.unique(data);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
},
|
||
|
|
messages: {
|
||
|
|
"ItemParamtersName": {
|
||
|
|
remote: "商品参数 名称已经存在"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
focusCleanup: true
|
||
|
|
});
|
||
|
|
|
||
|
|
function submitHandler() {
|
||
|
|
if ($.validate.form()) {
|
||
|
|
$.operate.save(prefix + "/edit", $('#form-itemparamters-edit').serialize());
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
$(function() {
|
||
|
|
var options = {
|
||
|
|
data: [[${itemParamters.itemParamtersUnitList}]],
|
||
|
|
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: 'unit',
|
||
|
|
align: 'center',
|
||
|
|
title: '计量单位',
|
||
|
|
formatter: function(value, row, index) {
|
||
|
|
var html = $.common.sprintf("<input class='form-control' type='text' name='itemParamtersUnitList[%s].unit' value='%s'>", index, value);
|
||
|
|
return html;
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{
|
||
|
|
field: 'unitStatus',
|
||
|
|
align: 'center',
|
||
|
|
title: '计量单位状态',
|
||
|
|
formatter: function(value, row, index) {
|
||
|
|
var html = $.common.sprintf("<input class='form-control' type='text' name='itemParamtersUnitList[%s].unitStatus' value='%s'>", index, value);
|
||
|
|
return html;
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{
|
||
|
|
field: 'fmemo',
|
||
|
|
align: 'center',
|
||
|
|
title: '计量单位描述',
|
||
|
|
formatter: function(value, row, index) {
|
||
|
|
var html = $.common.sprintf("<input class='form-control' type='text' name='itemParamtersUnitList[%s].fmemo' value='%s'>", index, value);
|
||
|
|
return html;
|
||
|
|
}
|
||
|
|
|
||
|
|
}]
|
||
|
|
};
|
||
|
|
$.table.init(options);
|
||
|
|
});
|
||
|
|
|
||
|
|
function addColumn() {
|
||
|
|
var count = $("#" + table.options.id).bootstrapTable('getData').length;
|
||
|
|
sub.editColumn();
|
||
|
|
|
||
|
|
$("#" + table.options.id).bootstrapTable('insertRow', {
|
||
|
|
index: count,
|
||
|
|
row: {
|
||
|
|
index: $.table.serialNumber(count),
|
||
|
|
unit: "",
|
||
|
|
unitStatus: "",
|
||
|
|
fmemo: ""
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
</script>
|
||
|
|
</body>
|
||
|
|
</html>
|