<!doctype html>
|
<html class="no-js">
|
<head>
|
<meta charset="utf-8">
|
<title>新增领域DSL</title>
|
|
[#include "/business/pages/include/static.html" /]
|
</head>
|
<body>
|
<script type="text/javascript">
|
$(function() {
|
$.formValidator.initConfig({formID:"myform",onError:function(msg){popupTips(msg)},onSuccess:function(){
|
document.getElementById("myform").target = window.top.openDialog("1","操作",
|
{},
|
{"width":40,"height":40},[{btnId:"tipBtnSure", btnName:"确定", btnStyle:"bluebtn"}]);
|
return true;
|
}});
|
|
|
$("#dsl_name").formValidator({empty:false,onFocus:"DSL名称不能为空",onShow:"请输入DSL名称!"}).inputValidator({min:1,max:200,onError:"DSL名称为1到200个字符"});
|
$("#dslCateId").formValidator({empty:false,onFocus:"DSL分类不能为空",onShow:"请选择DSL分类!",onFocus:"DSL分类不能为空"}).inputValidator({min:1,onError:"DSL分类不能为空"});
|
$("#order_num").formValidator({empty:false,onShow:"请输入顺序号!",onFocus:"请输入顺序号!"})
|
.regexValidator({regExp:"intege1", dataType:"enum", onError:"顺序号格式不正确"});
|
})
|
</script>
|
|
[#if dsl?? && dsl?size>0]
|
<div class="edit_txt">
|
<form id="myform" action="${base}/business/pages/servicelist/dsl/updateDsl.html" method="post">
|
<input type="hidden" value="${id}" name="id" />
|
<table class="edit_layout">
|
[#if dsl.type==1]
|
<tr><th width="20%"><label class="required">DSL名称:</label></th>
|
<td style="width:160px;">
|
<label>${dsl.DSL_NAME}</label>
|
<input class="general" type="hidden" name="dsl_name" id="dsl_name" value="${dsl.DSL_NAME}"/>
|
</td>
|
</tr>
|
<tr><th><label class="required">DSL分类:</label></th>
|
<td style="width:160px;">
|
<label>${dsl.DSL_FIRST_CATEGORY_NAME}-${dsl.DSL_SECOND_CATEGORY_NAME}-${dsl.DSL_THIRD_CATEGORY_NAME}</label>
|
<input type="hidden" id="dslCateName" readonly name="dslCateName" class="general" onclick="showDslCate();" style="width:300px;" value="${dsl.DSL_FIRST_CATEGORY_NAME}-${dsl.DSL_SECOND_CATEGORY_NAME}-${dsl.DSL_THIRD_CATEGORY_NAME}"/>
|
<input type="hidden" id="dslCateId" name="dslCateId" value="${dsl.DSL_FIRST_CATEGORY_ID}-${dsl.DSL_SECOND_CATEGORY_ID}-${dsl.DSL_THIRD_CATEGORY_ID}"/>
|
</td>
|
</tr>
|
[#else]
|
<tr><th width="20%"><label class="required">DSL名称:</label></th>
|
<td style="width:160px;"><input class="general" type="text" name="dsl_name" id="dsl_name" value="${dsl.DSL_NAME}"/>
|
<font color="red">*</font><div id="dsl_nameTip" style="display:inline-block;"></div>
|
</td>
|
</tr>
|
<tr><th><label class="required">DSL分类:</label></th>
|
<td style="width:160px;">
|
<input type="text" id="dslCateName" readonly name="dslCateName" class="general" onclick="showDslCate();" style="width:300px;" value="${dsl.DSL_FIRST_CATEGORY_NAME}-${dsl.DSL_SECOND_CATEGORY_NAME}-${dsl.DSL_THIRD_CATEGORY_NAME}"/>
|
<input type="hidden" id="dslCateId" name="dslCateId" value="${dsl.DSL_FIRST_CATEGORY_ID}-${dsl.DSL_SECOND_CATEGORY_ID}-${dsl.DSL_THIRD_CATEGORY_ID}"/>
|
<font color="red">*</font><div id="dslCateIdTip" style="display:inline-block;"></div>
|
</td>
|
</tr>
|
[/#if]
|
|
<tr><th width="20%"><label class="required">顺序号:</label></th>
|
<td style="width:160px;"><input class="general" type="text" name="order_num" id="order_num" value="${dsl.ORDER_NUM}"/>
|
<font color="red">*</font><div id="order_numTip" style="display:inline-block;"></div>
|
</td>
|
</tr>
|
|
<tr><th><label >备注:</label></th>
|
<td ><textarea class="general" name="note" id="note" />${dsl.NOTE}</textarea>
|
</td>
|
</tr>
|
</table>
|
</form>
|
</div>
|
[/#if]
|
|
|
|
<script type="text/javascript">
|
function onDialogBtnClick(btnID, dialogID, config){
|
if(btnID == "btnSure"){
|
$("#myform").submit();
|
}
|
}
|
|
|
function showDslCate() {
|
var dslCateName = $("#dslCateName").val();
|
var dslCateId = $("#dslCateId").val();
|
var url = "${base}/business/pages/servicelist/dsl/dslLevelTree.html";
|
if(!$.util.isEmpty(dslCateId)&&!$.util.isEmpty(dslCateName)) {
|
var names = dslCateName.split("-");
|
var ids = dslCateId.split("-");
|
if(ids.length==3) {
|
url += "?cates="+ids[2];
|
}
|
}
|
|
window.top.openDialog("selectDslCate","选择DSL分类",
|
{},
|
{"width":80,"height":80},
|
[{btnId:"btnSure", btnName:"确定", btnStyle:"bluebtn"}],url);
|
}
|
|
|
function showName(labelId,labelName) {
|
$("#dslCateName").val(labelName);
|
$("#dslCateId").val(labelId);
|
}
|
</script>
|
|
</body>
|
</html>
|