|
|
|
|
<!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>方位Webservices</title>
|
|
|
|
|
<link href="../../../../DataUser/Style/ccbpm.css" rel="stylesheet" type="text/css" />
|
|
|
|
|
<link href="../../../Scripts/easyUI/themes/default/easyui.css" rel="stylesheet" type="text/css" />
|
|
|
|
|
<link href="../../../Scripts/easyUI/themes/icon.css" rel="stylesheet" type="text/css" />
|
|
|
|
|
<script src="../../../Scripts/easyUI/jquery-1.8.0.min.js" type="text/javascript"></script>
|
|
|
|
|
<script src="../../../Scripts/easyUI/jquery.easyui.min.js" type="text/javascript"></script>
|
|
|
|
|
<script src="../../../Scripts/QueryString.js" type="text/javascript"></script>
|
|
|
|
|
<script src="../../../Scripts/config.js" type="text/javascript"></script>
|
|
|
|
|
<script src="../../../Scripts/PinYin.js" type="text/javascript" > </script>
|
|
|
|
|
<script src="../../../Comm/Gener.js" type="text/javascript"></script>
|
|
|
|
|
<base target="_self" />
|
|
|
|
|
<style type="text/css">
|
|
|
|
|
.style1
|
|
|
|
|
{
|
|
|
|
|
width: 184px;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<script type="text/javascript" language="javascript">
|
|
|
|
|
|
|
|
|
|
var CONST_STRUCTS = [{ No: '0', Name: '普通的编码表(具有No,Name)' }, { No: '1', Name: '树结构(具有No,Name,ParentNo)'}];
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 数据格式切换
|
|
|
|
|
*/
|
|
|
|
|
function loadStructSet(value, text) {
|
|
|
|
|
if (value == CONST_STRUCTS[0].No) {
|
|
|
|
|
$("#rootTr").hide();
|
|
|
|
|
} else {
|
|
|
|
|
$("#rootTr").show();
|
|
|
|
|
// 根节点值
|
|
|
|
|
$("#TB_RootValue").val("0");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//页面启动函数.
|
|
|
|
|
$(function () {
|
|
|
|
|
|
|
|
|
|
//绑定数据源.
|
|
|
|
|
GenerBindEntities("DDL_FK_DBSrc", "BP.Sys.SFDBSrcs", "local");
|
|
|
|
|
|
|
|
|
|
var mytb = document.getElementById("TB_Name");
|
|
|
|
|
mytb.focus();
|
|
|
|
|
$('#TB_Name').blur(function () //文本失去焦点时触发的事件
|
|
|
|
|
{
|
|
|
|
|
var TB_Name = document.getElementById("TB_Name").value;
|
|
|
|
|
var val = $('input:radio[name="RB_QPJP"]:checked').val();
|
|
|
|
|
if (TB_Name == "") {
|
|
|
|
|
document.getElementById("TB_No").value = "";
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (val == "ziduanquanpin") {
|
|
|
|
|
ParsePinYin(TB_Name, true, "TB_No");
|
|
|
|
|
// ParseStringToPinYin(TB_Name, true);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
ParsePinYin(TB_Name, false, "TB_No");
|
|
|
|
|
// ParseStringToPinYin(TB_Name, false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
//点击全拼
|
|
|
|
|
$('input[id=RB_QP]').change(function () {
|
|
|
|
|
var TB_Name = document.getElementById("TB_Name").value;
|
|
|
|
|
ParsePinYin(TB_Name, true, "TB_No");
|
|
|
|
|
// ParseStringToPinYin(TB_Name, true);
|
|
|
|
|
});
|
|
|
|
|
//点击简拼
|
|
|
|
|
$('input[id=RB_JP]').change(function () {
|
|
|
|
|
var TB_Name = document.getElementById("TB_Name").value;
|
|
|
|
|
ParsePinYin(TB_Name, false, "TB_No");
|
|
|
|
|
// ParseStringToPinYin(TB_Name, false);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//转拼音,并去除开头为数字的字符
|
|
|
|
|
// function ParseStringToPinYin(parseString, parseModel) {
|
|
|
|
|
|
|
|
|
|
// parseString = $.trim(parseString);
|
|
|
|
|
|
|
|
|
|
// var handler = new HttpHandler("BP.WF.HttpHandler.WF_Admin_FoolFormDesigner");
|
|
|
|
|
|
|
|
|
|
// handler.AddPara("name", parseString);
|
|
|
|
|
// handler.AddPara("flag", parseModel);
|
|
|
|
|
|
|
|
|
|
// var data = handler.DoMethodReturnString("ParseStringToPinyin");
|
|
|
|
|
// document.getElementById("TB_No").value = "SQL_" + data;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// 保存
|
|
|
|
|
function Save() {
|
|
|
|
|
|
|
|
|
|
var no = $("#TB_No").val() || "";
|
|
|
|
|
var name = $("#TB_Name").val() || "";
|
|
|
|
|
if (no == "" || name == "") {
|
|
|
|
|
alert('请输入编号名称.');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($("#DDL_CodeStruct").val() == CONST_STRUCTS[1].No) {
|
|
|
|
|
|
|
|
|
|
var rootValue = $("#TB_RootValue").val() || "";
|
|
|
|
|
if (rootValue == "") {
|
|
|
|
|
alert("根节点值必须填写!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!$("#TB_SelectStatement").val() || $("#TB_SelectStatement").val().length == 0) {
|
|
|
|
|
alert("SQL语句必须填写!");
|
|
|
|
|
$("#TB_SelectStatement").focus();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var en = new Entity("BP.Sys.SFTable");
|
|
|
|
|
en.CopyForm();
|
|
|
|
|
|
|
|
|
|
if (en.IsExits() == true) {
|
|
|
|
|
alert("编号已经存在[" + en.No + "]请使用其他的编号.");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
en.SrcType = 3; //自定义数据表.
|
|
|
|
|
en.FK_Val = "FK_" + en.No;
|
|
|
|
|
en.Insert();
|
|
|
|
|
|
|
|
|
|
alert("保存成功.");
|
|
|
|
|
SetHref( "Default.htm");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
<form action="" id="cc">
|
|
|
|
|
<table style="width: 95%; margin: 5px; padding: 5px;">
|
|
|
|
|
<caption>
|
|
|
|
|
<a href="./Default.htm">返回</a> - WS功能已经取消,请使用微服务取代该功能.
|
|
|
|
|
</caption>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>项目</th>
|
|
|
|
|
<th class="style1">值</th>
|
|
|
|
|
<th>备注</th>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
</form>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|