287 lines
12 KiB
Plaintext
287 lines
12 KiB
Plaintext
<%@page import="com.amarsoft.app.base.util.ObjectWindowHelper"%>
|
|
<%@page import="com.amarsoft.app.base.businessobject.*,com.amarsoft.app.als.businesscomponent.config.processor.BusinessComponentRuleDW"%>
|
|
<%@ page contentType="text/html; charset=GBK"%>
|
|
<%@include file="/Frame/page/jspf/include/jsp_runtime_context.jspf"
|
|
%><%@page import="com.amarsoft.awe.dw.*"%><%@include file="/Frame/page/jspf/include/jsp_sqlca_head.jspf"
|
|
%><html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
|
|
<%@include file="/Frame/page/jspf/include/jsp_head_res_dw.jspf"%>
|
|
</head>
|
|
<%
|
|
|
|
BusinessComponentRuleDW bcrd = new BusinessComponentRuleDW();
|
|
BusinessObject inputParameters = BusinessObject.createBusinessObject();
|
|
inputParameters.setAttributeValue("DWName", "0");
|
|
|
|
String format = CurPage.getParameter("Format");
|
|
if(!"1".equals(format) && !"2".equals(format)) return;
|
|
boolean isShowFilter = true;
|
|
boolean isShowButton = true;
|
|
String sBrowserTitle = "";
|
|
String sButtonPosition = "north";
|
|
String sASNavigatorHtml ="";
|
|
String sASWizardHtml = "";
|
|
if("2".equals(format))//¾ö²ß±í
|
|
{
|
|
inputParameters.setAttributeValue("DWStyle", "1");
|
|
%>
|
|
<script>var G_FromFormatDoc = false;var G_SearchArea_Selection="";var sButtonPosition="north";</script>
|
|
<script type="text/javascript" src="<%=sWebRootPath%>/Frame/resources/js/jquery/plugins/jquery.validate.min.js"></script>
|
|
<script type="text/javascript" src="<%=sWebRootPath%>/Frame/resources/js/jquery/plugins/jquery.validate.extend.js"></script>
|
|
<script type="text/javascript" src="<%=sWebRootPath%>/Frame/resources/js/as_stringbuffer.js"></script>
|
|
<script type="text/javascript" src="<%=sWebRootPath%>/Frame/resources/js/as_autoScan.js"> </script>
|
|
<script type="text/javascript" src="<%=sWebRootPath%>/Frame/page/js/as_contextmenu.js"></script>
|
|
<script type="text/javascript" src="<%=sWebRootPath%>/Frame/page/js/as_webcalendar.js"></script>
|
|
<script type="text/javascript" src="<%=sWebRootPath%>/Frame/page/js/ow/as_dw_common.js"></script>
|
|
<script type="text/javascript" src="<%=sWebRootPath%>/Frame/page/js/ow/as_dw_list_table.js"></script>
|
|
<script type="text/javascript" src="<%=sWebRootPath%>/Frame/page/js/ow/as_dw_list_drag.js"></script>
|
|
<script type="text/javascript" src="<%=sWebRootPath%>/Frame/page/js/ow/as_dw_list_page.js"></script>
|
|
<script type="text/javascript" src="<%=sWebRootPath%>/Frame/page/js/ow/as_dw_list.js"></script>
|
|
<script type="text/javascript" src="<%=sWebRootPath%>/Frame/page/js/ow/color.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="<%=sWebRootPath%>/Frame/page/resources/css/date.css"></link>
|
|
<link rel="stylesheet" type="text/css" href="<%=sWebRootPath%>/Frame/page/resources/css/ow/color.css"></link>
|
|
<link rel="stylesheet" type="text/css" href="<%=sWebRootPath%><%=sSkinPath%>/css/ow/color.css"></link>
|
|
<link rel="stylesheet" type="text/css" href="<%=sWebRootPath%>/Frame/page/resources/css/ow/list.css"></link>
|
|
<link rel="stylesheet" type="text/css" href="<%=sWebRootPath%><%=sSkinPath%>/css/ow/list.css"></link>
|
|
<%
|
|
if(CurConfig.getConfigure("ListQuerySelection")!=null){
|
|
%>
|
|
<script>G_SearchArea_Selection="<%=CurConfig.getConfigure("ListQuerySelection").toString()%>";</script>
|
|
<%}
|
|
}else
|
|
{
|
|
inputParameters.setAttributeValue("DWStyle", "2");
|
|
%>
|
|
<script>var G_FromFormatDoc = false;</script>
|
|
<script type="text/javascript" src="<%=sWebRootPath%>/Frame/resources/js/jquery/plugins/jquery.validate.min.js"></script>
|
|
<script type="text/javascript" src="<%=sWebRootPath%>/Frame/resources/js/jquery/plugins/jquery.validate.extend.js"></script>
|
|
<script type="text/javascript" src="<%=sWebRootPath%>/Frame/resources/js/jquery/plugins/jquery.watermark.js"></script>
|
|
<script type="text/javascript" src="<%=sWebRootPath%>/Frame/page/js/as_contextmenu.js"></script>
|
|
<script type="text/javascript" src="<%=sWebRootPath%>/Frame/page/js/as_webcalendar.js"></script>
|
|
<script type="text/javascript" src="<%=sWebRootPath%>/Frame/page/js/ow/as_dw_autocomplete.js"></script>
|
|
<script type="text/javascript" src="<%=sWebRootPath%>/Frame/page/js/ow/as_dw_common.js"></script>
|
|
<script type="text/javascript" src="<%=sWebRootPath%>/Frame/page/js/ow/as_dw_info.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="<%=sWebRootPath%>/Frame/page/resources/css/date.css">
|
|
<link rel="stylesheet" type="text/css" href="<%=sWebRootPath%>/Frame/page/resources/css/ow/autocomplete.css">
|
|
<link rel="stylesheet" type="text/css" href="<%=sWebRootPath%>/Frame/page/resources/css/ow/info.css">
|
|
<link rel="stylesheet" type="text/css" href="<%=sWebRootPath%>/Frame/page/resources/css/ow/info_pradio.css">
|
|
<link rel="stylesheet" type="text/css" href="<%=sWebRootPath%><%=sSkinPath%>/css/ow/info.css">
|
|
<link rel="stylesheet" type="text/css" href="<%=sWebRootPath%><%=sSkinPath%>/css/ow/info_pradio.css">
|
|
<%
|
|
}
|
|
String xmlFile = CurPage.getParameter("XMLFile");
|
|
String xmlTags = CurPage.getParameter("XMLTags");
|
|
String keys = CurPage.getParameter("Keys");
|
|
String componentID = CurPage.getParameter("ComponentID");
|
|
String productID = CurPage.getParameter("productid");
|
|
if(StringX.isEmpty(componentID)) return;
|
|
String componentRightType = CurPage.getParameter("ComponentRightType");
|
|
String PG_TITLE = "²úÆ·×é¼þ²ÎÊý¶¨Òå";
|
|
|
|
inputParameters.setAttributeValue("XMLFile", xmlFile);
|
|
inputParameters.setAttributeValue("XMLTags", xmlTags);
|
|
inputParameters.setAttributeValue("Keys", keys);
|
|
inputParameters.setAttributeValue("ComponentID", componentID);
|
|
inputParameters.setAttributeValue("Format", format);
|
|
inputParameters.setAttributeValue("ComponentRightType", componentRightType);
|
|
|
|
|
|
ASObjectWindow dwTemp = bcrd.createObjectWindow(inputParameters, CurPage, request);
|
|
|
|
ASDataObject doTemp=dwTemp.getDataObject();
|
|
dwTemp.ReadOnly = "0"; //ÉèÖÃÊÇ·ñÖ»¶Á 1:Ö»¶Á 0:¿Éд
|
|
dwTemp.genHTMLObjectWindow("");
|
|
CurPage.setObjectWindowOutput(dwTemp.CurPage.getObjectWindowOutput());
|
|
|
|
if("2".equals(format))//¾ö²ß±í
|
|
{
|
|
CurPage.getObjectWindowOutput().add("<script type=\"text/javascript\"> DZ[0][1][0][2]=0;DZ[0][1][1][2]=0; </script>");
|
|
String sButtons[][] = {
|
|
{"true","All","Button","ÐÂÔö","ÐÂÔö","addRow(0)","","","","",""},
|
|
{"true","All","Button","±£´æ","±£´æ","save()","","","","",""},
|
|
{"true","All","Button","ɾ³ý","ɾ³ý","deleteParam()","","","","",""}
|
|
};
|
|
%>
|
|
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
|
<%
|
|
}
|
|
else
|
|
{
|
|
String sButtons[][] = {
|
|
{"true","All","Button","±£´æ","±£´æ","as_save(0,'hideSingle()')","","","","",""},
|
|
};
|
|
%>
|
|
<%@include file="/Frame/resources/include/ui/include_info.jspf"%>
|
|
<%
|
|
}
|
|
%>
|
|
<script type="text/javascript">
|
|
$(function(){
|
|
if("<%=productID%>"!="null"){
|
|
hideSingle();
|
|
if("<%=xmlTags%>".indexOf("PENALTY_RATE_DAY") != -1){
|
|
$("#VALUE_PENALTY_RATE_DAY").after($("<span style='display:inline-block;width:30px;height:16px;position:relative;bottom:-4' class='tenthousand'></span>"));
|
|
}
|
|
}
|
|
})
|
|
|
|
function save(){
|
|
if("<%=productID%>"=="null"){
|
|
as_save(0);
|
|
}else{
|
|
console.log(ALSObjectWindowFunctions.ObjectWindowData);
|
|
as_save(0,'hideSingle()');
|
|
}
|
|
}
|
|
|
|
function hideSingle(){
|
|
var sel = $("select");
|
|
for(var i=0;i<sel.length;i++){
|
|
var idVal = $(sel[i]).attr("id");
|
|
if(idVal.indexOf("VALUE_TYPE") != -1){
|
|
var position = idVal.substring(idVal.indexOf("VALUE_TYPE")+11,idVal.length-2);
|
|
var val = $(sel[i]).val();
|
|
var $dlTd = $("#INPUT_myiframe0_OPTIONALVALUENAME_DOCLIST_"+position+"_2").parent().parent().parent();
|
|
if("Combination" == val){
|
|
$("#TR_Left_myiframe0_"+position).attr("onclick","showMainDoc("+position+")");
|
|
$dlTd.hide();
|
|
$dlTd.parent().attr("onclick","showMainDoc("+position+")");
|
|
}else if("SingleRow" == val){
|
|
$("#TR_Left_myiframe0_"+position).attr("onclick","showMainDoc(' ')");
|
|
$dlTd.show();
|
|
$dlTd.parent().attr("onclick","showMainDoc(' ')");
|
|
}
|
|
if($("#INPUT_myiframe0_VALUE_TYPE_"+position+"_1")[0]){
|
|
$("#INPUT_myiframe0_VALUE_TYPE_"+position+"_1")[0].removeAttribute("onchange");
|
|
$("#INPUT_myiframe0_VALUE_TYPE_"+position+"_1").attr("onchange","changeType(this,"+position+")");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
//ÐÂÔö¾ö²ß±íÊý¾ÝĬÈÏÖµ
|
|
function addRow(dwname){
|
|
var position= getRowCount(dwname);
|
|
as_add(dwname);
|
|
setItemValue(dwname,position,'ID',position+"");
|
|
setItemValue(dwname,position,'OLDVALUEBACKUPID',position+"");
|
|
if($("#INPUT_myiframe0_VALUE_TYPE_"+position+"_1")[0]){
|
|
$("#INPUT_myiframe0_VALUE_TYPE_"+position+"_1")[0].removeAttribute("onchange");
|
|
$("#INPUT_myiframe0_VALUE_TYPE_"+position+"_1").attr("onchange","changeType(this,"+position+")");
|
|
}
|
|
}
|
|
|
|
function deleteParam(){
|
|
if(confirm('ȷʵҪɾ³ýÂð?')){
|
|
if("<%=productID%>"=="null"){
|
|
as_delete(0);
|
|
}else{
|
|
if(deleteRelativeParam())as_delete(0);
|
|
}
|
|
}
|
|
}
|
|
|
|
function deleteRelativeParam(){
|
|
var postion = getRow(0);
|
|
var result = RunJavaMethodTrans("com.tenwa.util.ProductRelativeParamDelete","deleteRelativeParam","productID=<%=productID%>,position="+postion);
|
|
if("SUCCESS" == result){
|
|
showMainDoc(" ");
|
|
return true;
|
|
}else{
|
|
alert("²Ù×÷ʧ°Ü£¡");
|
|
return false;
|
|
}
|
|
}
|
|
|
|
function changeType(e,position){
|
|
tableDatas['myiframe0'][position][1] = e.value;
|
|
var $dlTd = $("#INPUT_myiframe0_OPTIONALVALUENAME_DOCLIST_"+position+"_2").parent().parent().parent();
|
|
if("Combination" == e.value){
|
|
$("#TR_Left_myiframe0_"+position).attr("onclick","showMainDoc("+position+")");
|
|
$dlTd.hide();
|
|
$dlTd.parent().attr("onclick","showMainDoc("+position+")");
|
|
}else if("SingleRow" == e.value){
|
|
$("#TR_Left_myiframe0_"+position).attr("onclick","showMainDoc(' ')");
|
|
$dlTd.show();
|
|
$dlTd.parent().attr("onclick","showMainDoc(' ')");
|
|
var xmlTags = "Component||ID='DOC_GROUP_CONFIG'";
|
|
//parent.OpenInfo(" ",xmlTags);
|
|
}
|
|
}
|
|
|
|
function showMainDoc(position){
|
|
var xmlTags = "Component||ID='DOC_GROUP_CONFIG'";
|
|
parent.OpenInfo(position,xmlTags);
|
|
}
|
|
|
|
function popSelectParameterValues(selectType,selectString,parameterID,dwName,idColumn,nameColumn,multiFlag,style){
|
|
if(!style)style = "dialogWidth:680px;dialogHeight:540px;resizable:yes;scrollbars:no;status:no;help:no";
|
|
var returnValue = "";
|
|
if(selectType=="01"){//ÁбíÑ¡Ôñ
|
|
selectString = selectString.split(",");
|
|
var templetNo = selectString[0];
|
|
var returnColumns = selectString[1];
|
|
var inputParameters = "";
|
|
var selectedValues="";
|
|
if(selectString[2])inputParameters=selectString[2];
|
|
AsDialog.SelectGridValue(templetNo,inputParameters, returnColumns,selectedValues, multiFlag,"",function(returnValue){
|
|
if(typeof(returnValue)=="undefined" || returnValue=="null" ||returnValue==""|| returnValue==null
|
|
||!returnValue || returnValue == "_CANCEL_" || returnValue == "_CLEAR_"){
|
|
return;
|
|
}
|
|
var items = returnValue.split("~");
|
|
var ids = "";
|
|
var names = "";
|
|
for(var i = 0 ; i < items.length; i++){
|
|
if(items[i].length==0) continue;
|
|
ids += "," + items[i].split("@")[0] ;
|
|
names += "," + items[i].split("@")[1] ;
|
|
}
|
|
|
|
setItemValue(dwName, getRow(dwName), idColumn, ids.substring(1));
|
|
setItemValue(dwName, getRow(dwName), nameColumn, names.substring(1));
|
|
});
|
|
}
|
|
else if(selectType=="02"){//Ê÷ͼѡÔñ
|
|
var selectedValues=getItemValue(dwName, getRow(dwName), idColumn);
|
|
if(typeof(selectedValues)=="undefined")selectedValues="";
|
|
AsDialog.PopView("/ProductManage/ParameterConfig/ParameterSqlCodeSelector.jsp","MultiFlag="+multiFlag+"&SelectedValues="+selectedValues+"&ParameterID="+parameterID,style,function(returnValue){
|
|
if(typeof(returnValue)=="undefined" || returnValue=="null" ||returnValue==""|| returnValue==null
|
|
||!returnValue || returnValue == "_CANCEL_" || returnValue == "_CLEAR_"){
|
|
return;
|
|
}
|
|
var items = returnValue.split("~");
|
|
var ids = "";
|
|
var names = "";
|
|
for(var i = 0 ; i < items.length; i++){
|
|
if(items[i].length==0) continue;
|
|
ids += "," + items[i].split("@")[0] ;
|
|
names += "," + items[i].split("@")[1] ;
|
|
}
|
|
setItemValue(dwName, getRow(dwName), idColumn, ids.substring(1));
|
|
setItemValue(dwName, getRow(dwName), nameColumn, names.substring(1));
|
|
});
|
|
}
|
|
else if(selectType=="03"){//×Ô¶¨ÒåÑ¡Ôñ
|
|
alert("²»Ö§³ÖµÄ·½Ê½");
|
|
return;
|
|
}
|
|
else {
|
|
alert("²»Ö§³ÖµÄ·½Ê½");
|
|
return;
|
|
}
|
|
};
|
|
|
|
|
|
$(document).ready(function(){
|
|
//·ÇÊý¾Ý¿â±íÊý¾Ý²Ù×÷£¬Çë¼ÓÈëÒÔÏ´úÂë
|
|
if("2" == <%=format%>){//¾ö²ß±í
|
|
for(var i=0;i<DZ[0][1].length;i++){
|
|
TableFactory.ColKeyIndexs[TableFactory.ColKeyIndexs.length] = i;
|
|
}
|
|
}
|
|
});
|
|
</script>
|
|
<%@include file="/Frame/resources/include/include_end.jspf"%> |