labelEdit.html
2.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<!DOCTYPE html>
<div id="tt" class="easyui-layout" fit="true" style="overflow-y: scroll">
<form name="activityAddForm" id="activityAddForm" method="post" enctype="multipart/form-data">
<div style="margin-top: 20px;margin-left: 30px">
<table border="0" style="width:95%;margin-top:5px;line-height:30px;" id="tab">
<tr style="height: 60px">
<td >
<span style="color:red">*</span><label>标签名称</label> <br>
<input id="labelName" name="labelName" class="easyui-textbox" style="width: 380px;"/>
</td>
</tr>
<tr style="height: 60px">
<td >
<span style="color:red">*</span><label>分组名称</label> <br>
<input id="groupId" name="groupId" class="easyui-textbox" style="width: 380px;"/>
<span id="groupIdInfo" style="color:red; display: none">请选择分组!</span>
</td>
</tr>
<tr style="height: 60px">
<td>
<span style="color:red">*</span><label>标签状态</label> <br>
<input type="radio" value="1" checked name="status" style="width:30px">开启</input>
<input type="radio" value="0" name="status" style="width:30px">关闭</input>
</td>
</tr>
</table>
</div>
</form>
</div>
<script>
$(function () {
$("#labelName").textbox({
required: true,
missingMessage: "标签名称不能为空",
prompt: "请输入标签名称"
});
$("#groupId").combobox({
valueField : "id",
textField : "groupName",
required:false,
prompt: "请选择分组",
url : serverContextPath + "/labelGroupManage/getAllLabelGroupInfo",
loadFilter: function (data) {
var data = defaultLoadFilter(data);
data.unshift({'id': '', 'groupName': '--请选择分组--'});
return data;
}
});
var data = paramObject.mkData;
if (data){
$("#labelName").textbox("setValue", data.labelName);
if(data.status == 0){
$(":radio[name='status'][value='0']").prop("checked",true);
}else if(data.status == 1){
$(":radio[name='status'][value='1']").prop("checked",true);
}
$("#groupId").combobox('setValue', data.groupId);
}
});
</script>