When you save, check the required field is empty, the form data acquisition

In sub-page write function 

// 检查必填项	
	function CheckRequires(){
		if ($("#plId").combobox("getValue").length==0){
			top.messageShow("请选择线路名称!","提示!");
			return false;	
		}
		if ($("#partCode").textbox("getValue").length==0){
			top.messageShow("请填写部件编号!","提示!");
			return false;	
		}
		if ($("#ppName").textbox("getValue").length==0){
			top.messageShow("请填写部件名称!","提示!");
			return false;	
		}
		return true;
	}
	// 获取表单数据
	function getDialogValues(){
		var retValue= $("objForm").serialize();
		return retValue;
	}

In the Save method call a method in the parent page

var Value;
		if (top.CheckRequires()) {
						//获取子页面数据
			var Value = top.getDialogValues();
		}

 

Guess you like

Origin blog.csdn.net/qq_40216244/article/details/82215575