代码优化

This commit is contained in:
thinkgem
2021-11-26 11:41:04 +08:00
parent f5fa369b97
commit f5d5b16a16
4 changed files with 16 additions and 18 deletions

View File

@@ -85,12 +85,11 @@
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> ${text('包含机构')}<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<#form:treeselect id="companyOfficeList" title="${text('机构选择')}"
value="${@ListUtils.extractToString(officeList!, 'officeCode', ',')}"
labelValue="${@ListUtils.extractToString(officeList!, 'officeName', ',')}"
<#form:treeselect id="office" title="${text('机构选择')}"
name="officeCodes" value="${officeCodes!}"
labelName="officeNames" labelValue="${officeNames!}"
url="${ctx}/sys/office/treeData" checkbox="true"
class="" allowClear="true"/>
<#form:hidden name="companyOfficeListJson"/>
</div>
</div>
</div>
@@ -125,8 +124,6 @@
<script>
$("#inputForm").validate({
submitHandler: function(form){
var companyOfficeData = $('#companyOfficeListCode').val().split(',');
$("#companyOfficeListJson").val(JSON.stringify(companyOfficeData));
js.ajaxSubmitForm($(form), function(data){
js.showMessage(data.message);
if(data.result == Global.TRUE){

View File

@@ -16,18 +16,18 @@
<div class="box-body">
<#form:form id="searchForm" model="${post}" action="${ctx}/sys/post/listData" method="post" class="form-inline hide"
data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
<div class="form-group">
<label class="control-label">${text('岗位编码')}</label>
<div class="control-inline">
<#form:input path="postCode" maxlength="64" class="form-control width-120"/>
</div>
</div>
<div class="form-group">
<label class="control-label">${text('岗位名称')}</label>
<div class="control-inline">
<#form:input path="postName_like" maxlength="100" class="form-control width-120"/>
</div>
</div>
<div class="form-group">
<label class="control-label">${text('岗位代码')}</label>
<div class="control-inline">
<#form:input path="viewCode" maxlength="64" class="form-control width-120"/>
</div>
</div>
<div class="form-group">
<label class="control-label">${text('岗位分类')}</label>
<div class="control-inline width-90">
@@ -59,7 +59,7 @@ $('#dataGrid').dataGrid({
{header:'${text("岗位名称")}', name:'postName', index:'a.post_name', width:200, align:"center", frozen:true, formatter: function(val, obj, row, act){
return '<a href="${ctx}/sys/post/form?postCode='+row.postCode+'" class="btnList" data-title="${text("编辑岗位")}">'+(val||row.id)+'</a>';
}},
{header:'${text("岗位码")}', name:'postCode', index:'a.post_code', width:200, align:"center"},
{header:'${text("岗位码")}', name:'viewCode', index:'a.view_code', width:200, align:"center"},
{header:'${text("排序号")}', name:'postSort', index:'a.post_sort', width:80, align:"center"},
{header:'${text("岗位分类")}', name:'postType', index:'a.post_type', width:100, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_post_type')}, val, '未知', true);