You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
277 lines
11 KiB
Plaintext
277 lines
11 KiB
Plaintext
11 months ago
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
|
<head>
|
||
|
<title></title>
|
||
|
<script type="text/javascript" src="../../../Scripts/jquery-1.7.2.min.js"></script>
|
||
|
<script type="text/javascript" src="../../../Scripts/QueryString.js"></script>
|
||
|
<script type="text/javascript" src="../../../Scripts/config.js"></script>
|
||
|
<script type="text/javascript" src="../../../Comm/Gener.js"></script>
|
||
|
|
||
|
<link href="../../../../DataUser/Style/ccbpm.css" rel="stylesheet" />
|
||
|
<script type="text/javascript">
|
||
|
var sys_mapExt = null;
|
||
|
var RE = null;
|
||
|
var REDtl = null;
|
||
|
var fk_mapdata = GetQueryString("FK_MapData"); //表单id.
|
||
|
var keyOfEn = GetQueryString("KeyOfEn"); //字段
|
||
|
|
||
|
|
||
|
//初始加载
|
||
|
$(function () {
|
||
|
|
||
|
var handler = new HttpHandler("BP.WF.HttpHandler.WF_Admin_FoolFormDesigner_MapExt");
|
||
|
handler.AddUrlData();
|
||
|
var data = handler.DoMethodReturnString("RegularExpression_Init");
|
||
|
|
||
|
data = JSON.parse(data);
|
||
|
sys_mapExt = data['Sys_MapExt']; // 已经保存的模版.
|
||
|
for (var j = 0; j < sys_mapExt.length; j++) {
|
||
|
$("#TB_Doc_" + sys_mapExt[j].Tag).val(sys_mapExt[j].Doc);
|
||
|
$("#TB_Tag1_" + sys_mapExt[j].Tag).val(sys_mapExt[j].Tag1);
|
||
|
}
|
||
|
|
||
|
RE = data['RE']; //模版列表.
|
||
|
REDtl = data['REDtl']; //模版的详细信息.
|
||
|
for (var i = 0; i < RE.length; i++) {
|
||
|
var xh = i + 1;
|
||
|
var newRow = "<tr><td>" + xh + "</td><td style='bgcolor:red'>" + RE[i].No + "</td><td class=BigDoc><a href=\"javascript:Select('" + RE[i].No + "')\" >" + RE[i].Name + "</a> </td></tr>";
|
||
|
$("#Table1 tr:last").after(newRow);
|
||
|
}
|
||
|
|
||
|
$(".event").hide();
|
||
|
|
||
|
var FK_Event = GetQueryString("FK_Event");
|
||
|
$("#" + FK_Event).show();
|
||
|
|
||
|
|
||
|
})
|
||
|
//选择模板
|
||
|
function Select(id) {
|
||
|
|
||
|
for (var i = 0; i < REDtl.length; i++) {
|
||
|
|
||
|
if (REDtl[i].ItemNo != id)
|
||
|
continue;
|
||
|
|
||
|
var ev = REDtl[i].ForEvent;
|
||
|
var test = $("#TB_Doc_" + ev).val();
|
||
|
if (test == undefined) {
|
||
|
alert("模板没有找到对应事件类型,请手输");
|
||
|
continue;
|
||
|
// $("#TB_Doc_onblur").val(REDtl[i].Exp);
|
||
|
// $("#TB_Doc_onblur").val(REDtl[i].Msg);
|
||
|
}
|
||
|
|
||
|
$("#TB_Doc_" + ev).val(REDtl[i].Exp);
|
||
|
$("#TB_Tag1_" + ev).val(REDtl[i].Msg);
|
||
|
}
|
||
|
}
|
||
|
//保存
|
||
|
function Save() {
|
||
|
|
||
|
var handler = new HttpHandler("BP.WF.HttpHandler.WF_Admin_FoolFormDesigner_MapExt");
|
||
|
handler.AddUrlData();
|
||
|
handler.AddFormData();
|
||
|
var data = handler.DoMethodReturnString("RegularExpression_Save");
|
||
|
if (data.indexOf('err@') == 0) {
|
||
|
alert(data);
|
||
|
return;
|
||
|
}
|
||
|
alert(data);
|
||
|
}
|
||
|
function BackTo() {
|
||
|
var FK_MapData = GetQueryString("FK_MapData");
|
||
|
var AttrOfOper = GetQueryString("KeyOfEn");
|
||
|
SetHref( "RegularExpression.htm?FK_MapData=" + FK_MapData + "&KeyOfEn=" + AttrOfOper);
|
||
|
}
|
||
|
</script>
|
||
|
<style type="text/css">
|
||
|
.style1 {
|
||
|
padding: 4px;
|
||
|
margin: 4px;
|
||
|
background-color: #e0ecff;
|
||
|
font-size: 12px;
|
||
|
border: 1px solid #ccc;
|
||
|
text-align: left;
|
||
|
word-break: keep-all;
|
||
|
font-weight: bold;
|
||
|
color: #0e2d5f;
|
||
|
width: 90px;
|
||
|
}
|
||
|
|
||
|
.style2 {
|
||
|
width: 90px;
|
||
|
}
|
||
|
</style>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div class="container-full">
|
||
|
<div class="attrnode-bar-header">
|
||
|
<span class="pull-right">
|
||
|
<input type="button" id="Btn_Save" name="Btn_Save" class="cc-btn-tab" value="保存" onclick="Save()" />
|
||
|
<input type="button" id="Btn_LoadTemplate" name="Btn_LoadTemplate" class="cc-btn-tab" value="加载模版" onclick="LoadTemplate()" />
|
||
|
<input type="button" value="返回" id="Back" name="Back" class="cc-btn-tab" onclick="BackTo();" />
|
||
|
<a href="http://ccform.mydoc.io/?v=5769&t=36728" target="_blank" class="cc-btn-tab" style="padding:6px 10px "> 帮助</a>
|
||
|
</span>
|
||
|
<strong>为字段设置正则表达式</strong>
|
||
|
</div>
|
||
|
<form id="cc">
|
||
|
<table class='table'>
|
||
|
|
||
|
<tr>
|
||
|
<th>
|
||
|
序
|
||
|
</th>
|
||
|
<th >
|
||
|
事件
|
||
|
</th>
|
||
|
<th>
|
||
|
事件内容
|
||
|
</th>
|
||
|
<th >
|
||
|
提示信息
|
||
|
</th>
|
||
|
</tr>
|
||
|
<tr class="event" id="onblur">
|
||
|
<td class='Idx'>
|
||
|
1
|
||
|
</td>
|
||
|
<td style='font-size: 12px' class="style2">
|
||
|
<a href="javascript:alert('元素失去焦点')">onblur</a>
|
||
|
</td>
|
||
|
<td>
|
||
|
<textarea name="TB_Doc_onblur" rows="1" cols="50" id="TB_Doc_onblur" style="width: 93%;"></textarea>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input name="TB_Tag1_onblur" type="text" value="" size="20" id="TB_Tag1_onblur" style="width: 99%;" />
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr class="event" id="onchange">
|
||
|
<td class='Idx'>
|
||
|
2
|
||
|
</td>
|
||
|
<td style='font-size: 12px' class="style2">
|
||
|
<a href="javascript:alert('用户改变域的内容')">onchange</a>
|
||
|
</td>
|
||
|
<td>
|
||
|
<textarea name="TB_Doc_onchange" rows="1" cols="50" id="TB_Doc_onchange" style="width: 93%;">
|
||
|
</textarea>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input name="TB_Tag1_onchange" type="text" size="20" id="TB_Tag1_onchange" style="width: 99%;" />
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr class="event" id="onclick">
|
||
|
<td class='Idx'>
|
||
|
3
|
||
|
</td>
|
||
|
<td style='font-size: 12px' class="style2">
|
||
|
<a href="javascript:alert('鼠标点击某个对象')">onclick</a>
|
||
|
</td>
|
||
|
<td>
|
||
|
<textarea name="TB_Doc_onclick" rows="1" cols="50" id="TB_Doc_onclick" style="width: 93%;">
|
||
|
</textarea>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input name="TB_Tag1_onclick" type="text" size="20" id="TB_Tag1_onclick" style="width: 99%;" />
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr class="event" id="ondblclick">
|
||
|
<td class='Idx'>
|
||
|
4
|
||
|
</td>
|
||
|
<td style='font-size: 12px' class="style2">
|
||
|
<a href="javascript:alert('鼠标双击某个对象')">
|
||
|
ondblclick
|
||
|
</a>
|
||
|
</td>
|
||
|
<td>
|
||
|
<textarea name="TB_Doc_ondblclick" rows="1" cols="50" id="TB_Doc_ondblclick" style="width: 93%;">
|
||
|
</textarea>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input name="TB_Tag1_ondblclick" type="text" size="20" id="TB_Tag1_ondblclick" style="width: 99%;" />
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr class="event" id="onkeypress">
|
||
|
<td class='Idx'>
|
||
|
5
|
||
|
</td>
|
||
|
<td style='font-size: 12px' class="style2">
|
||
|
<a href="javascript:alert('某个键盘的键被按下或按住')">
|
||
|
onkeypress
|
||
|
</a>
|
||
|
</td>
|
||
|
<td>
|
||
|
<textarea name="TB_Doc_onkeypress" rows="1" cols="50" id="TB_Doc_onkeypress" style="width: 93%;">
|
||
|
</textarea>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input name="TB_Tag1_onkeypress" type="text" size="20" id="TB_Tag1_onkeypress" style="width: 99%;" />
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr class="event" id="onkeyup">
|
||
|
<td class='Idx'>
|
||
|
6
|
||
|
</td>
|
||
|
<td style='font-size: 12px' class="style2">
|
||
|
<a href="javascript:alert('某个键盘的键被松开')">
|
||
|
onkeyup
|
||
|
</a>
|
||
|
</td>
|
||
|
<td>
|
||
|
<textarea name="TB_Doc_onkeyup" rows="1" cols="50" id="TB_Doc_onkeyup" style="width: 93%;">
|
||
|
</textarea>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input name="TB_Tag1_onkeyup" type="text" size="20" id="TB_Tag1_onkeyup" style="width: 99%;" />
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr class="event" id="onsubmit">
|
||
|
<td class='Idx'>
|
||
|
7
|
||
|
</td>
|
||
|
<td style='font-size: 12px' class="style2">
|
||
|
<a href="javascript:alert('提交按钮被点击')">
|
||
|
onsubmit
|
||
|
</a>
|
||
|
</td>
|
||
|
<td>
|
||
|
<textarea name="TB_Doc_onsubmit" rows="1" cols="50" id="TB_Doc_onsubmit" style="width: 93%;">
|
||
|
</textarea>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input name="TB_Tag1_onsubmit" type="text" value="" size="20" id="TB_Tag1_onsubmit"
|
||
|
style="width: 99%;" />
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<script type="text/javascript">
|
||
|
//加载模板
|
||
|
function LoadTemplate() {
|
||
|
var Table1 = $("#Btn_LoadTemplate").val();
|
||
|
|
||
|
if (Table1 == "加载模版") {
|
||
|
$("#Table1").show();
|
||
|
$("#Btn_LoadTemplate").val("关闭模板");
|
||
|
} else {
|
||
|
$("#Table1").hide();
|
||
|
$("#Btn_LoadTemplate").val("加载模版");
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
<div id="div01">
|
||
|
<table id="Table1" class='table' style=" display: none">
|
||
|
<tr>
|
||
|
<th># </th>
|
||
|
<th>名称 </th>
|
||
|
<th>内容 </th>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
</form>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|