123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- //加载
- $(function () {
- //非负浮点数(/^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$/)
- var reg = /^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$/;
- //建筑层数
- var buildingsLevel = $("#BuildingsLevel").val();
- if (buildingsLevel == "" || buildingsLevel == null) {
- $("#BuildingsLevel").val("");
- }
- else {
- if (!reg.test(buildingsLevel)) {
- $("#BuildingsLevel").val("");
- }
- else {
- $("#BuildingsLevel").val(parseFloat(buildingsLevel).toFixed(1));
- }
- }
- //建筑面积
- var buildingsArea = $("#BuildingsArea").val();
- if (buildingsArea == "" || buildingsArea == null) {
- $("#BuildingsArea").val("");
- }
- else {
- if (!reg.test(buildingsArea)) {
- $("#BuildingsArea").val("");
- }
- else {
- $("#BuildingsArea").val(parseFloat(buildingsArea).toFixed(1));
- }
- }
- //使用面积
- var useArea = $("#UseArea").val();
- if (useArea == "" || useArea == null) {
- $("#UseArea").val("");
- }
- else {
- if (!reg.test(useArea)) {
- $("#UseArea").val("");
- }
- else {
- $("#UseArea").val(parseFloat(useArea).toFixed(1));
- }
- }
- });
- //保存
- function Buildings_Save() {
- $(document.forms[0]).submit();
- }
- //联动(暂不考虑)
- function QueryCampus() {
- var campusID = $("#CampusID").combogridX("getValue");
- if (campusID == "" || campusID == "-1" || campusID == null) {
- $("#CollegeID").combogridX("setValue", "-1");
- }
- else {
- $("#CollegeID").combogridX("setValue", "-1");
- }
- if (campusID != nonSelect) {
- var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
- $("#CollegeID").combogridX("reload", eval(jsonString));
- }
- }
- function QueryCollege() {
- var collegeID = $("#CollegeID").combogridX("getValue");
- //注:暂时不支持通过院系所联动校区信息,后续考虑
- }
|