58 lines
2.4 KiB
Plaintext
58 lines
2.4 KiB
Plaintext
<%@page import="jbo.app.tenwa.customer.CUSTOMER_INFO"%>
|
|
<%@ page contentType="text/html; charset=GBK"%>
|
|
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
|
|
String customer_id = CurPage.getParameter("customerId");
|
|
if(customer_id == null)customer_id="";
|
|
String customerId = CurPage.getParameter("customerId");
|
|
BizObjectManager bom =JBOFactory.getBizObjectManager(CUSTOMER_INFO.CLASS_NAME);
|
|
BizObject cust=bom.createQuery("customerid=:customerid").setParameter("customerid", customerId).getSingleResult(false);
|
|
String custkind=cust.getAttribute("custkind").toString();
|
|
String TempNo="";//--模板号--
|
|
if("medical".equals(custkind)){
|
|
TempNo="CustomerMedicalInfo";
|
|
}
|
|
String rightType = CurPage.getParameter("rightType");
|
|
if(rightType ==null)rightType="";
|
|
ASObjectModel doTemp = new ASObjectModel(TempNo);
|
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
|
dwTemp.Style = "2";//freeform
|
|
if(rightType.equals("ReadOnly")){
|
|
dwTemp.ReadOnly = "1";//只读模式
|
|
}
|
|
dwTemp.genHTMLObjectWindow(CurPage.getParameter("id"));
|
|
CurPage.getCurComp().setAttribute("RightType", rightType);
|
|
|
|
String sButtons[][] = {
|
|
{"true","All","Button","保存","保存所有修改","saveRecord()","","","","btn_icon_save"},
|
|
{"true","All","Button","保存并新增","保存所有修改并新增","saveAndAdd()","","","","btn_icon_save"},
|
|
{"true","","Button","返回","返回列表页面","goBack()","","","","btn_icon_return"}
|
|
};
|
|
sButtonPosition = "north";
|
|
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
|
<script type="text/javascript">
|
|
function newRecord(){
|
|
CHANGED=false; //跳转新页面时是否弹框提示已修改本页。
|
|
AsControl.OpenView("/Tenwa/Customer/Lessee/Comm/Medical/CustomerMedical.jsp","customerId="+"<%=customer_id%>","_self","");
|
|
}
|
|
//保存
|
|
function saveRecord(){
|
|
if(!iV_all("0")) return;//先检查填写完整性
|
|
setItemValue(0,0,"customer_id","<%=customer_id%>");
|
|
as_save("myiframe0","");
|
|
}
|
|
//保存并新增
|
|
function saveAndAdd(){
|
|
if(!iV_all("0")) return;//先检查填写完整性
|
|
setItemValue(0,0,"customer_id","<%=customer_id%>");
|
|
as_save("myiframe0","newRecord()");
|
|
}
|
|
//返回
|
|
function goBack(){
|
|
CHANGED=false;//跳转新页面时是否弹框提示已修改本页。
|
|
var customer_id='<%=customer_id%>';
|
|
AsControl.OpenView("/Tenwa/Customer/Lessee/Comm/Medical/CustomerMedicalList.jsp","customerId="+customer_id,"_self","");
|
|
|
|
}
|
|
|
|
</script>
|
|
<%@ include file="/Frame/resources/include/include_end.jspf"%> |