📄 updateroutes_thong.jsp
字号:
<%--
Created by IntelliJ IDEA.
User: jtgao
Date: 2006-5-18
Time: 11:59:30
To change this template use File | Settings | File Templates. //
更新操作
成功后返回入口页面
--%>
<%@ page contentType="text/html; charset=GBK"%>
<%@ page import="com.hexiesoft.utils.StringUtils" %>
<%@ include file="/IncludeBegin.jsp"%>
<%
String sSql = "",PG_TITLE="",PG_CONTNET_TEXT="",sTravelValidation="",sInvcopiesValidation="";
String sTitle = (String)Configure.getConfigure(sIe_Language,"Shipping_TurckingRoutes").get("Title");
String sLabel1 = (String)Configure.getConfigure(sIe_Language,"Shipping_TurckingRoutes").get("tabLabel_1");
String sLabel2 = (String)Configure.getConfigure(sIe_Language,"Shipping_TurckingRoutes").get("tabLabel_2");
String sLabel3 = (String)Configure.getConfigure(sIe_Language,"Shipping_TurckingRoutes").get("tabLabel_3");
String sLabel4 = (String)Configure.getConfigure(sIe_Language,"Shipping_TurckingRoutes").get("tabLabel_4");
String sLabel5 = (String)Configure.getConfigure(sIe_Language,"Shipping_TurckingRoutes").get("tabLabel_5");
String sLabel6 = (String)Configure.getConfigure(sIe_Language,"Shipping_TurckingRoutes").get("tabLabel_6");
String sLabel7 = (String)Configure.getConfigure(sIe_Language,"Shipping_TurckingRoutes").get("tabLabel_7");
String sLabel8 = (String)Configure.getConfigure(sIe_Language,"Shipping_TurckingRoutes").get("tabLabel_8");
String sLabel9 = (String)Configure.getConfigure(sIe_Language,"Shipping_TurckingRoutes").get("ButLabel_1");
String sLabel10 = (String)Configure.getConfigure(sIe_Language,"Shipping_TurckingRoutes").get("ButLabel_2");
String sLabel11 = (String)Configure.getConfigure(sIe_Language,"Shipping_TurckingRoutes").get("ButLabel_3");
String alert_5 = (String)Configure.getConfigure(sIe_Language,"Shipping_TurckingRoutes").get("ALERT_5");
String alert_6 = (String)Configure.getConfigure(sIe_Language,"Shipping_TurckingRoutes").get("ALERT_6");
String sAccount = DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("Account"));
String sSubacct = DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("Subacct"));
%>
<script language=javascript>
function pressSubmit() {
ssAccount = document.all.Account.value;
ssSubacct = document.all.Subacct.value;
ssTitle = document.all.Title.value;
sgeocode=document.all.geocode.value;
sgeomiles=document.all.geomiles.value;
sroute=document.all.route.value;
stravel=document.all.travel.value;
slabcopies=document.all.labcopies.value;
//alert(sAccount) ;
//alert(sSubacct) ;
sReturn_isEmpty = PopPage("/ShippingManager/TurckingRoutes/UpdateRoutesOption.jsp?Account="
+ssAccount
+"&Subacct="+ssSubacct
+"&geocode="+sgeocode
+"&geomiles="+sgeomiles
+"&route="+sroute
+"&travel="+stravel
+"&labcopies="+slabcopies
+"&rand="+randomNumber(),"","");
//alert(sReturn_isEmpty);
if(sReturn_isEmpty == "true")
{
alert('<%=alert_5%>');
//OpenComp("","/ShippingManager/TurckingRoutes/blank.jsp","&rand="+randomNumber(),"right","");
self.close();
return;
}else{
alert('<%=alert_6%>');
OpenComp(sTitle,"/ShippingManager/TurckingRoutes/UpdateRoutes.jsp","Account="+sAccount+"&Subacct="+sSubacct+"&rand="+randomNumber(),"right","");
return;
}
/*
OpenComp(ssTitle,"/ShippingManager/TurckingRoutes/UpdateRoutesOption.jsp",
"Account="+ssAccount
+"&Subacct="+ssSubacct
+"&geocode="+sgeocode
+"&geomiles="+sgeomiles
+"&route="+sroute
+"&travel="+stravel
+"&labcopies="+slabcopies
+"&rand="+randomNumber(),"right","");
*/
//self.close();
}
//press abort button
function pressReedit(){
sAccount = document.all.Account.value;
sSubacct = document.all.Subacct.value;
sTitle = document.all.Title.value;
OpenComp(sTitle,"/ShippingManager/TurckingRoutes/UpdateRoutes.jsp","Account="+sAccount+"&Subacct="+sSubacct+"&rand="+randomNumber(),"right","");
}
//press abort button
function pressAbort(){
OpenComp("","/ShippingManager/TurckingRoutes/blank.jsp","&rand="+randomNumber(),"right","");
//PopPage("/ShippingManager/TurckingRoutes/EnterCode.jsp?rand="+randomNumber(),"","dialogWidth=30;dialogHeight=8;center:yes;status:no;statusbar:no");
}
</script>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info03;Describe=定义数据对象;]~*/%>
<%
String sHeaders[][] = { {"CustomerCode", "Customer Code"},
{"sh","wertyuiop"}
//bit invisible
};
/**********
for (int i = 0; i < sHeaders.length; i++) {
sHeaders[i][1] = (String)Configure.getConfigure(sIe_Language,"Cust_custmanager_Info").get(sHeaders[i][0].toUpperCase());
}
String sAllColumns = "";
for (int i = 0; i < sHeaders.length; i++) {
sAllColumns += sHeaders[i][0];
if (i != sHeaders.length - 1)
sAllColumns += ",";
}
*/
sSql = "select Account+' '+Subacct+' '+name as CustomerCode,bladd1+'\t '+blcity as sh from Customer where Account = 'LONG' and Subacct = '1'";
ASDataObject doTemp = new ASDataObject(sSql);
doTemp.UpdateTable = "Customer";
doTemp.setHeader(sHeaders);
doTemp.setKey("Account", true);
doTemp.setReadOnly("CustomerCode",true);
doTemp.appendHTMLStyle("sh", "style={height:150px;width:400px;overflow:scroll}");
ASDataWindow dwTemp = new ASDataWindow(CurPage, doTemp, Sqlca);
dwTemp.Style = "2"; //设置DW风格 1:Grid 2:Freeform
dwTemp.ReadOnly = "0"; //设置是否只读 1:只读 0:可写
//生成HTMLDataWindow
Vector vTemp = dwTemp.genHTMLDataWindow("%");
for(int i=0;i<vTemp.size();i++) out.print((String)vTemp.get(i));
%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info04;Describe=定义按钮;]~*/%>
<%
//依次为:
//0.是否显示
//1.注册目标组件号(为空则自动取当前组件)
//2.类型(Button/ButtonWithNoAction/HyperLinkText/TreeviewItem/PlainText/Blank)
//3.按钮文字
//4.说明文字
//5.事件
//6.资源图片路径
String sButtons[][] = {
{"true","","Button","保存","保存所有修改","saveRecord()",sResourcesPath},
{"true","","Button","返回","返回列表页面","goBack()",sResourcesPath}
};
%>
<%/*~END~*/%>
<%/*~BEGIN~不可编辑区~[Editable=false;CodeAreaID=Info05;Describe=主体页面;]~*/%>
<%@include file="/Resources/CodeParts/Info05.jsp"%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=Info06;Describe=定义按钮事件;]~*/%>
<script language=javascript>
var bIsInsert = false; //标记DW是否处于“新增状态”
//---------------------定义按钮事件------------------------------------
/*~[Describe=保存;InputParam=后续事件;OutPutParam=无;]~*/
function saveRecord(sPostEvents)
{
as_save("myiframe0");
}
/*~[Describe=返回列表页面;InputParam=无;OutPutParam=无;]~*/
function goBack()
{
parent.OpenPage("/Blank.jsp?TextToShow=<%=PG_CONTNET_TEXT%>", "right", "");
}
</script>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=Info07;Describe=自定义函数;]~*/%>
<script language=javascript>
/*~[Describe=页面装载时,对DW进行初始化;InputParam=无;OutPutParam=无;]~*/
function initRow()
{
if (getRowCount(0) == 0) //如果没有找到对应记录,则新增一条,并设置字段默认值
{
as_add("myiframe0");//新增记录
setItemValue(0, 0, "account", "<%=sAccount%>");
setItemValue(0, 0, "subacct", "<%=sSubacct%>");
bIsInsert = true;
}
}
function TravelValidation()
{
var value = getItemValue(0, getRow(), "travel");
if (value < 1 || value > 99) {
alert("<%=sTravelValidation%>");
setItemValue(0, getRow(), "1");
}
}
function InvcopiesValidation()
{
var value = getItemValue(0, getRow(), "invcopies");
if (value < 1 || value > 9) {
alert("<%=sInvcopiesValidation%>");
setItemValue(0, getRow(), "1");
}
}
function CountryAppendix()
{
var value = getItemValue(0, getRow(), "country");
switch (value)
{
case "O" :
setItemValue(0, getRow(), "isexport", "1");
setItemValue(0, getRow(), "geocode", "EXP");
setItemValue(0, getRow(), "b13", "1");
break;
case "U" :
setItemValue(0, getRow(), "isexport", "1");
setItemValue(0, getRow(), "b13", "0");
break;
case "C" :
setItemValue(0, getRow(), "isexport", "0");
setItemValue(0, getRow(), "b13", "0");
break;
}
}
</script>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=Info08;Describe=页面装载时,进行初始化;]~*/%>
<script language=javascript>
AsOne.AsInit();
init();
my_load(2,0,'myiframe0');
initRow(); //页面装载时,对DW当前记录进行初始化
</script>
<%/*~END~*/%>
<%@ include file="/IncludeEnd.jsp" %>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -