Function Description:
From the main page, TanTousyAid, EDABAN, TORIKISAKITANTOUSYYAMEI passed the three fields to the reference sub-screen. The reference sub-picture is retrieved with these three keywords to retrieve the conditions for the retrieval conditions. When the optical label is fixed, the selected record value is filled to the main screen.
// ******************************************************** ************
// The main screen passes the parameter value TantousyAID, EDABAN, TORIHIKISAKITANTOMEI to the reference page
// author: zhenghy
// 2005/02/21
// ******************************************************** ************
Function doeference () {
Var doc = window.document.forms [0];
Var forcus_name = DOC.FOCUS_NAME.VALUE;
Switch (forcus_name) {
Case "tantousyaid": // assumes that the cursor is targeted when TanTousyAID is valid, and it can be set according to it.
Var url = doc.context_path.value "/contents/app/common/torihikisakitantosyasansyou/cmn080ol.jsp";
// Refer to the page address
// get tantousyaid
Var stratantousyacd = doc.tanyyaid.value;
// get EDABAN
Var strataban = doc.edain.value;
Take Torikisakitanceyameii
Var startihikisakitousyamei = doc.torihihikisakitanceyamei.value;
Var array = new array; // Save the parameters obtained by the main page in a population
Array ["torikisakiheadcode"] = startANTOACD;
Array ["AccountAdbanhead"] = STREDABAN;
Array ["TANTONAMEHEAD"] = startihikisakitanceyamei;
// Refer to page property settings
VAR TOPIS = (Screen.height - 700) / 2;
Var Leftis = (Screen.width - 300) / 2;
Var option = " Leftis " PX; Dialogtop: " TOPIS " PX; DialogHeight: 600px; DialogWidth: 600px; status: no; help: no; scroll: false; ";
// From the reference page acquire the corresponding value and place the corresponding item in the main page
Var resdataaarray = Window.ShowModalDialog (URL, Array, Option);
Doc.torihikisakicd.value = resdataarray ["torikisakilinecode";
Doc.edaban.value = resdataArray ["AccountAdbanline"];
Doc.torihikisakitanceyamei.value = resdataArray ["tantonamelineline"];
}
// ******************************************************** ************
// Reference page
// author: zhenghy
// 2005/02/19
// ******************************************************** ************
Function douserload () {
/ / Accomually take the data from the main page and set to the corresponding query conditions of the reference page
Var dataArray = window.dialogarguments;
Var modalform = window.document.forms [0];
IF (MODALMM.CHANGE_FLAG.VALUE! = "LOAD") {
Modalform.torihikisakiheadcode.value = DataArray ["Torihikisakiheadcode";
MODALFORM.ACCOUNTADBANHEAD.VALUE = DataArray ["AccountAdbanhead"];
MODALMM.TANTONAMEHEAD.VALUE = DataArray ["TANTONAMEHEAD"];
MODALFORM.CHANGE_FLAG.VALUE = "LOAD";
MODALFORM.SUBMIT ();
}
}
// ******************************************************** ************
// Select the action made after a query result
// author: zhenghy
// 2005/02/19
// ******************************************************** ************
Function doselect () {
Var doc = window.document.forms [0];
Var forcus_name = DOC.FOCUS_NAME.VALUE;
Switch (forcus_name) {
Case "Torihikisakilinecode":
// Get the selected Torihikisakilinecode
Var startihikisakilinecode = "doc." "Torikisakilinecode" "[" doc.list_start_index.value "]" ".value";
Var Torihikisakilinecode = evAl (Strtorihikisakilinecode);
// Get the selected AccountAdbanline
Var straccountadbanline = "doc." "AccountAdbanline" "[" doc.list_start_index.value "]" ".value";
Var AccountAdbanline = evAl (straccountadbanline);
// Get the selected TANTONAMELINE
Var stratantonameline = "doc." "Tantonameline" "[ doc.list_start_index.value "] " " .value "; var tantonameline = evAl (strtantonameline);
// Save the value of the selected records in a population
Var array = new arch;
Array ["torikisakilinecode"] = torikisakilinecode;
Array ["Accentadbanline"] = AccountAdbanline;
Array [TANTONAMELINE "] = TANTONAMELINE
ReturnValue = array;
WINDOW.CLOSE ();
Break;
DEFAULT:
Alert ("Please select torikisakilinecode.");
}
}
}