";
html_string += "
";
}
if (attr.UIIsEnable == "0" || isReadonly == "1") {
html_string += "
";
} else {
html_string += "
";
}
return html_string;
},
CreateTBInt: function (attr, frmData, isReadonly, type, dtlIndx) {
var elementId = "TB_" + attr.KeyOfEn;
if (type == "dtls")
elementId = "TB_" + dtlIndx + "_" + attr.KeyOfEn;
var mustInput = attr.UIIsInput == 1 ? '
*' : "";
var inputHtml = "
";
if (attr.UIIsEnable == "0" || isReadonly == "1")
inputHtml += "
";
else {
inputHtml += "
";
}
return inputHtml;
},
CreateTBFloat: function (attr, frmData, isReadonly, type, dtlIndx) {
var elementId = "TB_" + attr.KeyOfEn;
if (type == "dtls")
elementId = "TB_" + dtlIndx + "_" + attr.KeyOfEn;
var attrdefVal = attr.DefVal;
var bit;
if (attrdefVal != null && attrdefVal !== "" && attrdefVal.indexOf(".") >= 0)
bit = attrdefVal.substring(attrdefVal.indexOf(".") + 1).length;
else
bit = 2;
var event = "";
if (attr.UIIsEnable == "1") {
if (attr.MyDataType == 8)
event = " onkeyup=\"valitationAfter(this, 'money');limitLength(this," + bit + "); FormatMoney(this, " + bit + ", ',')\"";
else
event = " onkeyup=\"valitationAfter(this, 'float');if(isNaN(value)) execCommand('undo');limitLength(this," + bit + ");\"" + " onafterpaste=\"valitationAfter(this, 'float');if(isNaN(value))execCommand('undo');\"";
}
var mustInput = attr.UIIsInput == 1 ? '
*' : "";
var inputHtml = "
";
if (attr.UIIsEnable == "0" || isReadonly == "1")
inputHtml += "
";
else
inputHtml += "
";
return inputHtml;
},
CreateTBDate: function (attr, frmData, isReadonly, type, dtlIndx) {
var elementId = "TB_" + attr.KeyOfEn;
if (type == "dtls")
elementId = "TB_" + dtlIndx + "_" + attr.KeyOfEn;
var labID = "LAB_" + attr.KeyOfEn;
if (type == "dtls")
labID = "LAB_" + dtlIndx + "_" + attr.KeyOfEn;
var mustInput = attr.UIIsInput == 1 ? '
*' : "";
var inputHtml = "
";
if (attr.UIIsEnable == "0" || isReadonly == 1) {
inputHtml += "
";
}
else {
inputHtml += "
";
inputHtml += " 请选择日期
";
inputHtml += "";
inputHtml += "
";
}
return inputHtml;
},
CreateTBDateTime: function (attr, frmData, isReadonly, type, dtlIndx) {
var elementId = "TB_" + attr.KeyOfEn;
if (type == "dtls")
elementId = "TB_" + dtlIndx + "_" + attr.KeyOfEn;
var labID = "LAB_" + attr.KeyOfEn;
if (type == "dtls")
labID = "LAB_" + dtlIndx + "_" + attr.KeyOfEn;
var mustInput = attr.UIIsInput == 1 ? '
*' : "";
var inputHtml = "
";
if (attr.UIIsEnable == "0" || isReadonly == 1) {
inputHtml += "
";
}
else {
inputHtml += "
";
inputHtml += " ";
inputHtml += "";
inputHtml += "
";
}
return inputHtml;
},
CreateCBBoolean: function (attr, frmData, isReadonly, type, dtlIndx) {
var elementId = "CB_" + attr.KeyOfEn;
if (type == "dtls")
elementId = "CB_" + dtlIndx + "_" + attr.KeyOfEn;
var switchId = "SW_" + attr.KeyOfEn;
if (type == "dtls")
switchId = "SW_" + dtlIndx + "_" + attr.KeyOfEn;
var checkBoxVal = "";
var keyOfEn = attr.KeyOfEn;
var CB_Html = "";
CB_Html += "
";
CB_Html += "
";
if (attr.UIIsEnable == "0" || isReadonly == "1")
CB_Html += "
";
else
CB_Html += "
";
CB_Html += "
";
CB_Html += "
";
return CB_Html;
//var checkBoxVal = "";
//var keyOfEn = attr.KeyOfEn;
//var CB_Html = "";
//CB_Html += "
";
//CB_Html += "
";
//CB_Html += "
";
//CB_Html += "
";
//CB_Html += "
";
////CB_Html += "
";
//return CB_Html;
},
CreateDDLEnum: function (attr, frmData, isReadonly, type, dtlIndx) {
//下拉框和单选都使用下拉框实现
var mustInput = attr.UIIsInput == 1 ? '
*' : "";
var ctrl_ID = "DDL_" + attr.KeyOfEn;
if (type == "dtls")
ctrl_ID = "DDL_" + dtlIndx + "_" + attr.KeyOfEn;
var html_Select = "
";
html_Select += "
";
return html_Select;
},
CreateDDLPK: function (attr, frmData, isReadonly, type, dtlIndx) {
var ctrl_ID = "DDL_" + attr.KeyOfEn;
if (type == "dtls")
ctrl_ID = "DDL_" + dtlIndx + "_" + attr.KeyOfEn;
var mustInput = attr.UIIsInput == 1 ? '
*' : "";
var html_Select = "
";
html_Select += "
";
return html_Select;
},
CreateMapPin: function (attr, frmData, isReadonly, type, dtlIndx) {
var html_MapPin = "
";
//展示内容
html_MapPin += "
";
if (this.Enable == false) {
html_MapPin += "
";
} else {
html_MapPin += "
";
}
html_MapPin += "
";
html_MapPin += "
";
//数据控件
html_MapPin += "
";
//地图定位
return html_MapPin;
},
CreateMicHot: function (attr, frmData, isReadonly, type, dtlIndx) {
var html_MicHot = "
";
var bDelete = this.Enable;
//展示内容
html_MicHot += "
";
if (this.Enable == false) {
html_MicHot += "
";
} else {
html_MicHot += "
";
}
html_MicHot += "
";
html_MicHot += "
";
html_MicHot += "
";
html_MicHot += "
";
//获取历史语音
var args = new RequestArgs();
var keyOfEn = attr.KeyOfEn;
html_MicHot += "
";
//语音
return html_MicHot;
}
};
//初始化下拉列表框的OPERATION
function InitDDLOperation1(frmData, mapAttr, defVal) {
var operations = '';
var data = frmData[mapAttr.KeyOfEn];
if (data == undefined)
data = frmData[mapAttr.UIBindKey];
if (data == undefined) {
//枚举类型的.
if (mapAttr.LGType == 1) {
var enums = frmData.Sys_Enum;
enums = $.grep(enums, function (value) {
return value.EnumKey == mapAttr.UIBindKey;
});
$.each(enums, function (i, obj) {
operations += "
";
});
}
return operations;
}
if (data == undefined) {
return operations;
}
$.each(data, function (i, obj) {
operations += "
";
});
return operations;
}