83 lines
3.2 KiB
Plaintext
83 lines
3.2 KiB
Plaintext
<%@page import="com.amarsoft.app.base.util.SystemHelper"%>
|
|
<%@page import="com.amarsoft.app.base.util.ObjectWindowHelper"%>
|
|
<%@page import="com.amarsoft.app.base.businessobject.*"%>
|
|
<%@ page contentType="text/html; charset=GBK"%><%@
|
|
include file="/Frame/resources/include/include_begin_info.jspf"%>
|
|
<%
|
|
/*
|
|
页面说明: 示例列表页面
|
|
*/
|
|
String PG_TITLE = "产品详情";
|
|
String type = CurPage.getAttribute("type");
|
|
BusinessObject inputParameter=SystemHelper.getPageComponentParameters(CurPage);
|
|
Map<String,Object> map =inputParameter.convertToMap();
|
|
String catalogNo = (String)map.get("SortNo");
|
|
ASObjectWindow dwTemp =ObjectWindowHelper.createObjectWindow_Info("PRD_ProductInfo", inputParameter, CurPage, request);
|
|
ASDataObject doTemp=dwTemp.getDataObject();
|
|
//将ParaID作为参数传给显示模板
|
|
dwTemp.genHTMLObjectWindow("");
|
|
String sButtons[][] = {
|
|
{"true","All","Button","保存","保存所有修改","saveRecord()","","","","btn_icon_save"},
|
|
{"false","","Button","返回","返回","parent.AsDialog.ClosePage()","","","","btn_icon_return"}
|
|
};
|
|
%><%@
|
|
include file="/Frame/resources/include/ui/include_info.jspf"%>
|
|
<script type="text/javascript">
|
|
var oldTypeNo;
|
|
function saveRecord(){
|
|
if(!iV_all(0)) return;
|
|
var typeNo = getItemValue(0,getRow(),"TypeNo");
|
|
var sortNo = getItemValue(0,getRow(),"SortNo");
|
|
var result = AsControl.RunJavaMethodTrans("com.amarsoft.app.als.prd.manager.ProductManager","checkTypeNo","newProductID="+typeNo+",catalogNo=<%=catalogNo%>,type=<%=type%>,sortNo="+sortNo);
|
|
var results = result.split('@');
|
|
setItemValue(0,getRow(),"sortno",results[1]);
|
|
as_save(0);
|
|
}
|
|
|
|
function specificInfo(){
|
|
var typeNo = getItemValue(0,getRow(),"TypeNo");
|
|
var productType1 = getItemValue(0,getRow(),"Attribute1");//产品类型
|
|
var productType2 = getItemValue(0,getRow(),"Attribute2");//产品类型
|
|
if(!typeNo){
|
|
//隐藏规格信息
|
|
document.all("A_Group_0020").style.display = "none";
|
|
return;
|
|
}
|
|
if(!productType1) return;
|
|
if(oldTypeNo && typeNo != oldTypeNo){
|
|
var result = AsControl.RunJavaMethodTrans("com.amarsoft.app.als.prd.manager.ProductManager","updateProduct","ProductID="+oldTypeNo+",NewProductID="+typeNo);
|
|
if(result.split("@")[0] == "false")
|
|
{
|
|
alert(result.split("@")[1]);
|
|
return;
|
|
}
|
|
}
|
|
document.all("A_Group_0020").style.display = "";
|
|
AsControl.OpenView("/ProductManage/ProductConfig/ProductSpecificList.jsp","ProductID="+typeNo+"&ProductType1="+productType1+"&ProductType2="+productType2,"sys_sub_page_frame_GGDY","");
|
|
}
|
|
|
|
//打开规格页面
|
|
function openSpecificInfo(para){
|
|
AsControl.OpenView("/ProductManage/ProductConfig/ProductSpecificInfo.jsp",para,"sys_sub_page_frame_GGXX","");
|
|
}
|
|
|
|
|
|
$().ready(function(){
|
|
oldTypeNo = getItemValue(0,getRow(),"TypeNo");
|
|
if(oldTypeNo != null && oldTypeNo != ""){
|
|
setItemReadOnly(0,getRow(),"TypeNo",true);
|
|
}else{
|
|
setItemRequired(0,"ISINUSE",false);
|
|
setItemValue(0, getRow(), "ISINUSE", "");
|
|
}
|
|
if(getItemValue(0,getRow(),"ISINUSE") == ""){
|
|
setItemRequired(0,"ISINUSE",false);
|
|
}
|
|
if('<%=type%>' == 'add'){
|
|
setItemValue(0, getRow(), "ISINUSE", "2");
|
|
}
|
|
//setItemReadOnly(0,getRow(),"ISINUSE",true);
|
|
specificInfo();
|
|
});
|
|
</script>
|
|
<%@ include file="/Frame/resources/include/include_end.jspf"%> |