<!-- #include file="../../../include.asp" --> <% '<!-- '################################################ ' 名称 :集計マスター入力 ' 作成日:2002/11/27 ' 作成者:徳田 ' 目的 :集計マスター入力画面を表示する。 ' 概要 : ' <<表示>> ' ・集計マスターの画面 ' 履歴 : ' '################################################ '--> ' %> <% main() Sub main() If Not(SessionCheck()) Then Exit Sub End If Dim Cnt Dim RouteType RouteType = Request("RouteType") Dim TyohyoKubun Dim KanriKubun KanriKubun = Request("KanriKubun") TyohyoKubun = Request("TyohyoKubun") Dim ToukiSoneki ToukiSoneki = GetEnshuParam(EnshuCD, "整理記入当期損益挿入先") %> <html> <% = HtmlHeader("") %> <SCRIPT LANGUAGE="JavaScript"> <!-- HomeAlias = "<% = HomeAlias %>"; HomeAliasSL = "<% = HomeAliasSL %>"; ExitFlg = 2; --> </SCRIPT> <body onkeydown="if(ExitFlg==2)ExitFlg=3;" onBeforeUnload="if(ExitFlg!=0)window.event.returnValue = ExitMsg(ExitFlg)" bgcolor="#5C70B6" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <form OnKeyDown="FormKeyDown(this)" method="POST" action="fm_syukei_bin.asp" name="form1" autocomplete="off"> <input type="hidden" name="TyohyoKubun" value="<%= TyohyoKubun %>"> <input type="hidden" name="SendValue" value=""> <% Response.Write(HtmlDesign(1)) Response.Write(HttpL1(4)) If GB_Admin >= 1 Then Response.Write(HttpL2("運用管理メニュー" ,"tblbtn( '/" & HomeAlias & "/admin/admenu_w.asp')", "マスター管理", "tblbtn( '/" & HomeAlias & "/admin/master/fm_master_select.asp')", "集計マスター", "", "", "", "", "", "", "")) Response.Write(HttpL3("", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "")) 'マスター編集のため一時許可 ' If EnshuCD <> "SYSORIGN" Then 'Response.Write(HttpL3_1("保存", "SubmitCheck()", "行の追加", "SpreadAddItem2(document.vaSpread1);", "行の挿入", "SpreadInsertItem(document.vaSpread1);", "行の削除", "SpreadDelItem(document.vaSpread1);", "", "")) If GB_IEmode = "1" Then Response.Write(HttpL3_1("保存", "SubmitCheck()", "行の追加", "SpreadAddItem2(document.vaSpread1);", "行の挿入", "SpreadInsertItem(document.vaSpread1);", "行の削除", "SpreadDelItem(document.vaSpread1);", "", "")) Else '※HttpL3_1にボタンを追加する事前処理(210107小野) Call HttpL3_1_AddBtn( "", "", "", "", "", "", "", "", "", "") Response.Write(HttpL3_1("保存", "SubmitCheck()", "行挿入", "SpRowInsert();", "行削除", "SpRowDelete();", "行↑", "SpRowShift('Up');", "行↓", "SpRowShift('Dn');")) End If ' End If Response.Write(HttpL3_2("照会", "tblbtn('fm_syukei_view.asp?TyohyoKubun=" & TyohyoKubun & "')", "", "", "", "", "", "", "", "")) ElseIf InStr(KanriKubun, "kanri") > 0 Then Response.Write(HttpL2("運用管理メニュー" ,"tblbtn( '/" & HomeAlias & "/admin/admenu_w.asp')", "マスター管理", "tblbtn( '/" & HomeAlias & "/admin/master/fm_master_select.asp')", "集計マスター", "", "", "", "", "", "", "")) Response.Write(HttpL3("", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "")) 'マスター編集のため一時許可 ' If EnshuCD <> "SYSORIGN" Then 'Response.Write(HttpL3_1("保存", "SubmitCheck()", "行の追加", "SpreadAddItem2(document.vaSpread1);", "行の挿入", "SpreadInsertItem(document.vaSpread1);", "行の削除", "SpreadDelItem(document.vaSpread1);", "", "")) If GB_IEmode = "1" Then Response.Write(HttpL3_1("保存", "SubmitCheck()", "行の追加", "SpreadAddItem2(document.vaSpread1);", "行の挿入", "SpreadInsertItem(document.vaSpread1);", "行の削除", "SpreadDelItem(document.vaSpread1);", "", "")) Else '※HttpL3_1にボタンを追加する事前処理(210107小野) Call HttpL3_1_AddBtn( "", "", "", "", "", "", "", "", "", "") Response.Write(HttpL3_1("保存", "SubmitCheck()", "行挿入", "SpRowInsert();", "行削除", "SpRowDelete();", "行↑", "SpRowShift('Up');", "行↓", "SpRowShift('Dn');")) End If ' End If Response.Write(HttpL3_2("照会", "tblbtn('fm_syukei_view.asp?TyohyoKubun=" & TyohyoKubun & "')", "", "", "", "", "", "", "", "")) Else Response.Write(HttpL2("会社選択" ,"tblbtn( '/" & HomeAlias & "/user/bk/')", GB_GyosyuMeisyo, "tblbtn( '/" & HomeAlias & "/user/bk/menu_" & GB_Gyosyu & ".asp')", "社長室・総務部", "tblbtn( '/" & HomeAlias & "/user/bk/menu_s4.asp')", "マスター照会", "tblbtn( '/" & HomeAlias & "/user/bk/menu_s43.asp')", "集計マスター", "", "", "")) Response.Write(HttpL3("", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "")) Response.Write(HttpL3_1("", "", "", "", "", "", "", "", "", "")) Response.Write(HttpL3_2("", "", "", "", "", "", "", "", "", "")) End If If TyohyoKubun = "G" Then Response.Write(HttpL4("製造原価報告書集計マスター", "")) ElseIf InStr(TyohyoKubun, "P") > 0 Then Response.Write(HttpL4("損益計算書集計マスター", "")) ElseIf InStr(TyohyoKubun, "B") > 0 Then Response.Write(HttpL4("貸借対照表集計マスター", "")) Else Response.Write(HttpL4("<span class=""tx1416"">キャッシュフロー計算書集計マスター</span>", "")) End If If EnshuCD = "SYSORIGN" Then Response.Write(HttpL5("演習コード SYSORIGN の演習は修正出来ません")) End If %> <div id="L0" style="position: absolute; visibility: hidden; left: 0px; top: -2000px;"> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="5"> <tr> <td align="center" valign="middle"> <table width="720" height="100%" border="0" cellspacing="5" cellpadding="15" bgcolor="#ffffff" style="border:1px solid #000000"> <tr> <td align="center" background="/<% = HomeAlias %>/images/window_bk.gif"> <table width="700" height="100%" border="0" cellspacing="0" cellpadding="0"> <% If GB_IEmode = "1" Then %> <tr> <td valign="middle"> <object classid="clsid:5220cb21-c88d-11cf-b347-00aa00a28331"> <param name="lpkpath" value="spread6.lpk"> </object> <object width="711" height="100%" onMouseOver="SubmitFlg=1" classid="clsid:41f841c1-ae16-11d5-8817-0050da6ef5e5" codebase="/<% = HomeAlias %>/binx/spr32x60.cab" id="vaSpread1" border="0"> </object> </td> </tr> <% Else %> <% Dim WidthCell1, WidthCell2, WidthCell3, WidthCell4, WidthCell5, WidthCell6, WidthCell7, WidthCell8, WidthCell9, WidthParent Dim HeightCell HeightCell = 23 WidthCell1 = 66 WidthCell2 = 270 WidthCell3 = 42 WidthCell4 = 66 WidthCell5 = 42 WidthCell6 = 42 WidthCell7 = 42 WidthCell8 = 42 WidthCell9 = 42 WidthParent = 686 %> <TR> <TD HEIGHT="<% = HeightCell %>" VALIGN="BOTTOM"> <TABLE HEIGHT="<% = HeightCell %>" BORDER="1" CELLPADDING="0" CELLSPACING="0" BORDERCOLOR="#000000" BGCOLOR="#DDDDDD" CLASS="tx1214" STYLE="border-collapse: collapse"> <TR ALIGN="CENTER" HEIGHT="<% = HeightCell %>"> <TD WIDTH="<% = WidthCell1 %>">集計コード</TD> <TD WIDTH="<% = WidthCell2 %>">集計名称</TD> <TD WIDTH="<% = WidthCell3 %>">貸借<br>区分</TD> <TD WIDTH="<% = WidthCell4 %>">集計先<br>コード</TD> <TD WIDTH="<% = WidthCell5 %>">(+-)</TD> <TD WIDTH="<% = WidthCell6 %>">行間</TD> <TD WIDTH="<% = WidthCell7 %>">下線</TD> <TD WIDTH="<% = WidthCell8 %>">表示<br>位置</TD> <TD WIDTH="<% = WidthCell9 %>">構成<br>表示</TD> </TR> </TABLE> </TD> </TR> <TR> <TD HEIGHT="1" VALIGN="BOTTOM"></TD><!--これがないと見出しのボトムラインが消える--> </TR> <TR> <TD VALIGN="TOP"> <DIV ID="Layer1" STYLE="position:relative; left:0px; top:-1px; width:<% = WidthParent %>px; height:100%; z-index:1; border: 1px none #000000; overflow: auto;"> <TABLE ID="SyoukaiList" BORDER="1" CELLSPACING="0" CELLPADDING="0" BORDERCOLOR="#000000" BGCOLOR="#FFFFFF" CLASS="tx1416" STYLE="border-collapse: collapse"> <% 'スプレッドシート定義 ※全行共通なのでループ外 Dim SpMaxRow Dim SpRowCnt Dim SpMaxCol SpRowCnt = 0 SpMaxRow = SpRowCnt 'フォーム名 SpFormName = "SpCell" ' '行定義 SpRowHeight = HeightCell '高さ(pixel指定) SpRowCls = "" '行スタイルclass SpRowStyle = "" '行スタイル '列1定義 SpCellType(1) = "2" '形式指定(0:日付・1:文字列・2:英数字・3:通貨) SpCellWidth(1) = WidthCell1 'セル幅(pixel指定) ※フォーム幅は自動計算 SpCellCls(1) = "" 'セルスタイルclass SpCellStyle(1) = "border:1px solid #000000;" 'セルスタイル SpInputCls(1) = "Spread5L" 'フォームスタイルclass SpInputStyle(1) = "" 'フォームスタイル SpInputFocus(1) = "" 'onFocusで作動させるスクリプト SpInputBlur(1) = "FormStrLeftEdge(this,4,true,false);FormStrTrim(this,true);" 'onBlurで作動させるスクリプト SpInputChange(1) = "" 'onChangeで作動させるスクリプト SpInputRO(1) = "" 'フォームreadonlyフラグ("1") '列2定義 SpCellType(2) = "1" '形式指定(0:日付・1:文字列・2:英数字・3:通貨) SpCellWidth(2) = WidthCell2 'セル幅(pixel指定) ※フォーム幅は自動計算 SpCellCls(2) = "" 'セルスタイルclass SpCellStyle(2) = "border:1px solid #000000;" 'セルスタイル SpInputCls(2) = "Spread5L" 'フォームスタイルclass SpInputStyle(2) = "" 'フォームスタイル SpInputFocus(2) = "" 'onFocusで作動させるスクリプト SpInputBlur(2) = "FormStrLeftIME(this,100,true,true);" 'onBlurで作動させるスクリプト SpInputRO(2) = "" 'フォームreadonlyフラグ("1") '列3定義 SpCellType(3) = "9" '形式指定(0:日付・1:文字列・2:英数字・3:通貨 9:プルダウン) SpCellWidth(3) = WidthCell3 'セル幅(pixel指定) ※フォーム幅は自動計算 SpCellCls(3) = "" 'セルスタイルclass SpCellStyle(3) = "border:1px solid #000000;" 'セルスタイル SpInputCls(3) = "Spread5L" 'フォームスタイルclass SpInputStyle(3) = "" 'フォームスタイル SpInputFocus(3) = "" 'onFocusで作動させるスクリプト SpInputBlur(3) = "" 'onBlurで作動させるスクリプト SpInputChange(3) = "" 'onChangeで作動させるスクリプト SpInputRO(3) = "" 'フォームreadonlyフラグ("1") '列4定義 SpCellType(4) = "2" '形式指定(0:日付・1:文字列・2:英数字・3:通貨) SpCellWidth(4) = WidthCell4 'セル幅(pixel指定) ※フォーム幅は自動計算 SpCellCls(4) = "" 'セルスタイルclass SpCellStyle(4) = "border:1px solid #000000;" 'セルスタイル SpInputCls(4) = "Spread5L" 'フォームスタイルclass SpInputStyle(4) = "" 'フォームスタイル SpInputFocus(4) = "" 'onFocusで作動させるスクリプト SpInputBlur(4) = "FormStrLeftEdge(this,4,true,false);FormStrTrim(this,true);" 'onBlurで作動させるスクリプト SpInputChange(4) = "" 'onChangeで作動させるスクリプト SpInputRO(4) = "" 'フォームreadonlyフラグ("1") '列5定義 SpCellType(5) = "9" '形式指定(0:日付・1:文字列・2:英数字・3:通貨 9:プルダウン) SpCellWidth(5) = WidthCell5 'セル幅(pixel指定) ※フォーム幅は自動計算 SpCellCls(5) = "" 'セルスタイルclass SpCellStyle(5) = "border:1px solid #000000;" 'セルスタイル SpInputCls(5) = "Spread5L" 'フォームスタイルclass SpInputStyle(5) = "" 'フォームスタイル SpInputFocus(5) = "" 'onFocusで作動させるスクリプト SpInputBlur(5) = "" 'onBlurで作動させるスクリプト SpInputChange(5) = "" 'onChangeで作動させるスクリプト SpInputRO(5) = "" 'フォームreadonlyフラグ("1") '列6定義 SpCellType(6) = "2" '形式指定(0:日付・1:文字列・2:英数字・3:通貨) SpCellWidth(6) = WidthCell6 'セル幅(pixel指定) ※フォーム幅は自動計算 SpCellCls(6) = "" 'セルスタイルclass SpCellStyle(6) = "border:1px solid #000000;" 'セルスタイル SpInputCls(6) = "Spread5C" 'フォームスタイルclass SpInputStyle(6) = "" 'フォームスタイル SpInputFocus(6) = "" 'onFocusで作動させるスクリプト SpInputBlur(6) = "FormStrFloatEdge(this,1,0,true);FormStrFloatCutoff(this,true);" 'onBlurで作動させるスクリプト SpInputChange(6) = "" 'onChangeで作動させるスクリプト SpInputRO(6) = "" 'フォームreadonlyフラグ("1") '列7定義 SpCellType(7) = "9" '形式指定(0:日付・1:文字列・2:英数字・3:通貨 9:プルダウン) SpCellWidth(7) = WidthCell7 'セル幅(pixel指定) ※フォーム幅は自動計算 SpCellCls(7) = "" 'セルスタイルclass SpCellStyle(7) = "border:1px solid #000000;" 'セルスタイル SpInputCls(7) = "Spread5L" 'フォームスタイルclass SpInputStyle(7) = "" 'フォームスタイル SpInputFocus(7) = "" 'onFocusで作動させるスクリプト SpInputBlur(7) = "" 'onBlurで作動させるスクリプト SpInputChange(7) = "" 'onChangeで作動させるスクリプト SpInputRO(7) = "" 'フォームreadonlyフラグ("1") '列8定義 SpCellType(8) = "9" '形式指定(0:日付・1:文字列・2:英数字・3:通貨 9:プルダウン) SpCellWidth(8) = WidthCell8 'セル幅(pixel指定) ※フォーム幅は自動計算 SpCellCls(8) = "" 'セルスタイルclass SpCellStyle(8) = "border:1px solid #000000;" 'セルスタイル SpInputCls(8) = "Spread5L" 'フォームスタイルclass SpInputStyle(8) = "" 'フォームスタイル SpInputFocus(8) = "" 'onFocusで作動させるスクリプト SpInputBlur(8) = "" 'onBlurで作動させるスクリプト SpInputChange(8) = "" 'onChangeで作動させるスクリプト SpInputRO(8) = "" 'フォームreadonlyフラグ("1") '列9定義 SpCellType(9) = "9" '形式指定(0:日付・1:文字列・2:英数字・3:通貨 9:プルダウン) SpCellWidth(9) = WidthCell9 'セル幅(pixel指定) ※フォーム幅は自動計算 SpCellCls(9) = "" 'セルスタイルclass SpCellStyle(9) = "border:1px solid #000000;" 'セルスタイル SpInputCls(9) = "Spread5L" 'フォームスタイルclass SpInputStyle(9) = "" 'フォームスタイル SpInputFocus(9) = "" 'onFocusで作動させるスクリプト SpInputBlur(9) = "" 'onBlurで作動させるスクリプト SpInputChange(9) = "" 'onChangeで作動させるスクリプト SpInputRO(9) = "" 'フォームreadonlyフラグ("1") Query = "exec SPM報告書書式一覧 '" & GB_SystemCD & "','" & EnshuCD & "', '" & TyohyoKubun & "'" Set Content = OpenQuery(Query) Do While Not(Content.BOF Or Content.EOF) 'スプレッドシート行生成 ※此処で値のみ代入 SpRowCnt = SpRowCnt + 1 '行番号(フォーム名に反映) SpMaxRow = SpRowCnt SpInputValue(1) = Content.Fields("集計CD") 'フォーム初期値 SpInputValue(2) = Content.Fields("集計名称") 'フォーム初期値 SpInputOption(3) = "" 'フォーム初期値(selectプルダウンのoptionタグ) SpInputOption(3) = SpInputOption(3) & "<option value=""""></option>"' & vbCrLf SpInputOption(3) = SpInputOption(3) & "<option value=""借方""" If "" & Content.Fields("貸借") = "D" Then SpInputOption(3) = SpInputOption(3) & " selected" End If SpInputOption(3) = SpInputOption(3) & ">借</option>"' & vbCrLf SpInputOption(3) = SpInputOption(3) & "<option value=""貸方""" If "" & Content.Fields("貸借") = "C" Then SpInputOption(3) = SpInputOption(3) & " selected" End If SpInputOption(3) = SpInputOption(3) & ">貸</option>"' & vbCrLf SpInputValue(4) = Content.Fields("集計先") 'フォーム初期値 SpInputOption(5) = "" 'フォーム初期値(selectプルダウンのoptionタグ) SpInputOption(5) = SpInputOption(5) & "<option value=""""></option>"' & vbCrLf SpInputOption(5) = SpInputOption(5) & "<option value=""+""" If "" & Content.Fields("加減区分") = "+" Then SpInputOption(5) = SpInputOption(5) & " selected" End If SpInputOption(5) = SpInputOption(5) & ">+</option>"' & vbCrLf SpInputOption(5) = SpInputOption(5) & "<option value=""-""" If "" & Content.Fields("加減区分") = "-" Then SpInputOption(5) = SpInputOption(5) & " selected" End If SpInputOption(5) = SpInputOption(5) & ">-</option>"' & vbCrLf SpInputValue(6) = Content.Fields("ラインコントロール") 'フォーム初期値 SpInputOption(7) = "" 'フォーム初期値(selectプルダウンのoptionタグ) SpInputOption(7) = SpInputOption(7) & "<option value=""""></option>"' & vbCrLf SpInputOption(7) = SpInputOption(7) & "<option value=""有""" If "" & Content.Fields("アンダーライン") = "1" Then SpInputOption(7) = SpInputOption(7) & " selected" End If SpInputOption(7) = SpInputOption(7) & ">有</option>"' & vbCrLf SpInputOption(8) = "" 'フォーム初期値(selectプルダウンのoptionタグ) SpInputOption(8) = SpInputOption(8) & "<option value=""""></option>"' & vbCrLf SpInputOption(8) = SpInputOption(8) & "<option value=""右""" If "" & Content.Fields("右方表示") = "R" Then SpInputOption(8) = SpInputOption(8) & " selected" End If SpInputOption(8) = SpInputOption(8) & ">右</option>"' & vbCrLf SpInputOption(8) = SpInputOption(8) & "<option value=""左""" If "" & Content.Fields("右方表示") = "L" Then SpInputOption(8) = SpInputOption(8) & " selected" End If SpInputOption(8) = SpInputOption(8) & ">左</option>"' & vbCrLf SpInputOption(9) = "" 'フォーム初期値(selectプルダウンのoptionタグ) SpInputOption(9) = SpInputOption(9) & "<option value=""""></option>"' & vbCrLf SpInputOption(9) = SpInputOption(9) & "<option value=""有""" If "" & Content.Fields("構成表示") = "1" Then SpInputOption(9) = SpInputOption(9) & " selected" End If SpInputOption(9) = SpInputOption(9) & ">有</option>"' & vbCrLf 'Response.Write(SpreadRow(SpRowCnt)) '引数の行番号がフォーム名に付加される Call SpreadRow(SpRowCnt) '引数の行番号がフォーム名に付加される If 0=1 Then Response.Write("<TR ALIGN=""CENTER"">" & vbCrLf) Response.Write("<TD WIDTH=""60"" HEIGHT=""20"" ALIGN=""CENTER"">" & Content.Fields("集計CD") & "</TD>" & vbCrLf) Response.Write("<TD HEIGHT=""20"" ALIGN=""LEFT"">" & Content.Fields("集計名称") & "</TD>" & vbCrLf) Response.Write("<TD WIDTH=""40"" HEIGHT=""20"" ALIGN=""CENTER"">" & ConvKubunMeisyo("貸借略区分", Content.Fields("貸借")) & "</TD>" & vbCrLf) Response.Write("<TD WIDTH=""60"" HEIGHT=""20"" ALIGN=""CENTER"">" & Content.Fields("集計先") & "</TD>" & vbCrLf) Response.Write("<TD WIDTH=""40"" HEIGHT=""20"" ALIGN=""CENTER"">" & Content.Fields("加減区分") & "</TD>" & vbCrLf) Response.Write("<TD WIDTH=""40"" HEIGHT=""20"" ALIGN=""CENTER"">" & Content.Fields("ラインコントロール") & "</TD>" & vbCrLf) Response.Write("<TD WIDTH=""40"" HEIGHT=""20"" ALIGN=""CENTER"">" & ConvKubunMeisyo("アンダーライン", Content.Fields("アンダーライン")) & "</TD>" & vbCrLf) Response.Write("<TD WIDTH=""40"" HEIGHT=""20"" ALIGN=""CENTER"">" & ConvKubunMeisyo("右方表示", Content.Fields("右方表示")) & "</TD>" & vbCrLf) Response.Write("<TD WIDTH=""40"" HEIGHT=""20"" ALIGN=""CENTER"">" & ConvKubunMeisyo("構成表示", Content.Fields("構成表示")) & "</TD>" & vbCrLf) Response.Write("</TR>") End If Content.MoveNext Loop 'スプレッドシートの空白行を発生させる SpInputValue(1) = "" 'フォーム初期値 SpInputValue(2) = "" 'フォーム初期値 SpInputOption(3) = "" 'フォーム初期値(selectプルダウンのoptionタグ) SpInputOption(3) = SpInputOption(3) & "<option value=""""></option>"' & vbCrLf SpInputOption(3) = SpInputOption(3) & "<option value=""借方"">借</option>"' & vbCrLf SpInputOption(3) = SpInputOption(3) & "<option value=""貸方"">貸</option>"' & vbCrLf SpInputValue(4) = "" 'フォーム初期値 SpInputOption(5) = "" 'フォーム初期値(selectプルダウンのoptionタグ) SpInputOption(5) = SpInputOption(5) & "<option value=""""></option>"' & vbCrLf SpInputOption(5) = SpInputOption(5) & "<option value=""+"">+</option>"' & vbCrLf SpInputOption(5) = SpInputOption(5) & "<option value=""-"">-</option>"' & vbCrLf SpInputValue(6) = "" 'フォーム初期値 SpInputOption(7) = "" 'フォーム初期値(selectプルダウンのoptionタグ) SpInputOption(7) = SpInputOption(7) & "<option value=""""></option>"' & vbCrLf SpInputOption(7) = SpInputOption(7) & "<option value=""有"">有</option>"' & vbCrLf SpInputOption(8) = "" 'フォーム初期値(selectプルダウンのoptionタグ) SpInputOption(8) = SpInputOption(8) & "<option value=""""></option>"' & vbCrLf SpInputOption(8) = SpInputOption(8) & "<option value=""右"">右</option>"' & vbCrLf SpInputOption(8) = SpInputOption(8) & "<option value=""左"">左</option>"' & vbCrLf SpInputOption(9) = "" 'フォーム初期値(selectプルダウンのoptionタグ) SpInputOption(9) = SpInputOption(9) & "<option value=""""></option>"' & vbCrLf SpInputOption(9) = SpInputOption(9) & "<option value=""有"">有</option>"' & vbCrLf For Cnt = SpRowCnt + 1 To SpRowCnt + SpBlankRow 'Response.Write(SpreadRow(SpRowCnt)) '引数の行番号がフォーム名に付加される Call SpreadRow(Cnt) '引数の行番号がフォーム名に付加される SpMaxRow = Cnt Next %> </TABLE> </DIV> </TD> </TR> <% End If %> <% If TyohyoKubun = "P" Then %> <tr> <td valign="middle" height="30" class="tx1214"> *期末修正記入後は「売上原価(期首商品棚卸高・期末商品棚卸高)を仕入高にまとめて表示」することが可能です。<br> それを利用する場合は、集計マスターのP200番台は変更しないでください。 </td> </tr> <% End If %> <% If TyohyoKubun = "B" Then %> <tr><td height="8"><% = Spacer(1,8) %></td></tr> <tr> <td valign="middle" height="24" class="tx1416"> 仕訳集計により生じた当期損益の挿入先 <input type="text" name="ToukiSoneki" size="5" value="<% = ToukiSoneki %>" class="tbox4" onkeyup="FormStrLeft(this,4,false,false);" onKeypress="FormStrLeft(this,4,false,false);" onBlur="FormStrLeftEdge(this,4,true,false);FormStrTrim(this,true);"> </td> </tr> <% Else %> <input type="hidden" name="ToukiSoneki" value="<% = ToukiSoneki %>"> <% End IF %> </table> </td> </tr> </table> </td> </tr> </table> </div> </form> </body> <% If GB_IEmode <> "1" Then %> <SCRIPT LANGUAGE="JavaScript"> SpMinRow = 1; SpMaxRow = <% = SpMaxRow %>; <% '最大セル番号を取得 SpMaxCol = 0 For Cnt = 1 To UBound(SpCellType) If "" & SpCellType(Cnt) <> "" Then SpMaxCol = Cnt End If Next %> SpMaxCol = <% = SpMaxCol %>; function SubmitCheck() { document.getElementById("BaseL5").innerHTML = "更新中です。しばらくお待ちください。"; //集計先存在チェック用集計コード羅列文字列作成 var SyukeiCDStr = ""; for (jj = SpMinRow; jj <= SpMaxRow; jj++) { Target = "SpCell" + jj + "_1" //セル番号を除くフォーム名 SyukeiCDStr = SyukeiCDStr + ":::" + form1[Target].value.toUpperCase() + ":::"; } //alert(SyukeiCDStr); //return; var PreSyukeiCDStr = ""; //集計CD重複チェック用羅列文字列 form1.SendValue.value = ""; for (jj = SpMinRow; jj <= SpMaxRow; jj++) { Target = "SpCell" + jj + "_" //セル番号を除くフォーム名 var RowText; var bCheck; bCheck = new Array(); RowText = ""; for (ii = 1; ii <= SpMaxCol; ii++) { var Text1; Text1 = form1[Target + ii].value; if (ii == 1 && Text1 != "") { if (PreSyukeiCDStr.indexOf(':::' + Text1.toUpperCase() + ':::', 0) >= 0) { alert("集計コードが重複しています "); form1[Target + ii].focus(); return; } PreSyukeiCDStr = PreSyukeiCDStr + ":::" + Text1.toUpperCase() + ":::"; } if (ii == 4 && Text1 != "") { if (SyukeiCDStr.indexOf(':::' + Text1.toUpperCase() + ':::', 0) < 0) { alert("指定された集計先コードに対応する集計コード(" + Text1 + ")が存在しません "); form1[Target + ii].focus(); return; } } //文字型フィールドの半角カンマ・セミコロンを代替文字に変換する処理 Text1 = ReplaceStr(Text1, ",", "CommammoC") Text1 = ReplaceStr(Text1, ";", "SemicolonolocimeS") //カンマ区切りで列結合 RowText = RowText + Text1; RowText = RowText + ","; //NULL文字なら当該列のフラグを立てる bCheck[ii] = 0; if(Text1 == "") { bCheck[ii] = 1; } } //alert("RowText:" + RowText); //return; //行に内容が存在する場合 if (ReplaceStr(RowText, ",", "") != "") { if (bCheck[1] == 1) { alert("集計コードを入力してください "); form1[Target + 1].focus(); return; } //セミコロン区切りで行結合 form1.SendValue.value = form1.SendValue.value + RowText + ";"; } } //alert("SendValue:" + form1.SendValue.value); //return; SubmitReal(form1); return true; } window.onload = function() { form1.SpCell1_1.focus(); } </SCRIPT> <% Else %> <SCRIPT LANGUAGE="JavaScript"> function SubmitCheck() { document.all.item("BaseL5").innerHTML = "更新中です。しばらくお待ちください。"; form1.SendValue.value = ""; //集計先存在チェック用集計コード羅列文字列作成 var SyukeiCDStr = ""; document.vaSpread1.Col = 1; for (jj = 1; jj <= document.vaSpread1.MaxRows; jj++) { document.vaSpread1.Row = jj; SyukeiCDStr = SyukeiCDStr + ":::" + document.vaSpread1.Text.toUpperCase() + ":::"; } // alert(SyukeiCDStr); for(jj = 1; jj <= document.vaSpread1.MaxRows; jj++) { document.vaSpread1.Row = jj; for(ii = 1; ii <= document.vaSpread1.MaxCols - 2; ii++) //表示順入れ替えボタン増設につきMaxColsを変更 { document.vaSpread1.Col = ii; var Text1; Text1 = document.vaSpread1.Text; if(document.vaSpread1.ColID == 12) { Text1 = ReplaceStr(Text1, ",", "") } form1.SendValue.value = form1.SendValue.value + Text1; form1.SendValue.value = form1.SendValue.value + ","; if(ii == 1) { if(Text1 == "") { alert("集計コードを入力して下さい "); document.vaSpread1.SetActiveCell(ii, jj); document.vaSpread1.focus(); document.vaSpread1.EditMode = true; document.all.item("BaseL5").innerHTML = ""; return; } else { var kk; document.vaSpread1.Col = 1; //速度向上のため重複チェックは次行以下にのみ行うよう変更(080324小野) for (kk = jj + 1; kk <= document.vaSpread1.MaxRows; kk++) { document.vaSpread1.Row = kk; if (Text1 == document.vaSpread1.text) { alert("集計コードが重複しています "); document.vaSpread1.SetActiveCell(ii, jj); document.vaSpread1.focus(); document.vaSpread1.EditMode = true; document.all.item("BaseL5").innerHTML = ""; return; } } //ループ処理後は戻しておかないとダメ document.vaSpread1.Col = ii; document.vaSpread1.Row = jj; } } // else if(ii == 2) // { // // if(Text1 == "") // { // alert("集計名称を入力して下さい"); // document.vaSpread1.SetActiveCell(ii, jj); // document.vaSpread1.focus(); // document.vaSpread1.EditMode = true; // document.all.item("BaseL5").innerHTML = "" // return; // } // } else if(ii == 4) { if (Text1 != "") { // var rsts; // rsts = sonzai_check (Text1); // document.vaSpread1.Row = jj; // if (rsts == false) // { //速度向上のため存在チェックは羅列文字列検索方式に変更(080324小野) if (SyukeiCDStr.indexOf(':::' + Text1.toUpperCase() + ':::', 0) < 0) { alert("指定された集計先コードに対応する集計コードが存在しません "); document.vaSpread1.SetActiveCell(ii, jj); document.vaSpread1.focus(); document.vaSpread1.EditMode = true; document.all.item("BaseL5").innerHTML = ""; return; } } } } form1.SendValue.value = form1.SendValue.value + ";" } //alert("SendValue:" + form1.SendValue.value); //return; SubmitReal(form1); return true; } //この関数は使用中止(080324小野) function daburi_check(ichi,siteiCD) { document.vaSpread1.col = 1; for(kk = 1; kk <= document.vaSpread1.MaxRows; kk++) { if (kk != ichi) { document.vaSpread1.Row = kk; if ((document.vaSpread1.text != "") && (document.vaSpread1.text == siteiCD)) { return false; } } } return true; } //この関数は使用中止(080324小野) function sonzai_check(siteiCD) { document.vaSpread1.col = 1; for (kk = 1; kk <= document.vaSpread1.MaxRows; kk++) { document.vaSpread1.Row = kk; if (document.vaSpread1.text == siteiCD) { return true; } } return false; } </SCRIPT> <SCRIPT LANGUAGE="JavaScript"> function SpreadInit(fpSpread) { fpSpread.MaxRows = 0; <% Dim Query Dim Content Dim ii Dim wtaisyaku , wline , wkosei ii = 1 Query = "exec SPM報告書書式一覧 '" & GB_SystemCD & "','" & EnshuCD & "', '" & TyohyoKubun & "'" Set Content = OpenQuery(Query) Response.Write(" SpreadRowColorMode = false;" & vbCrLf) '選択行の色を変える動作を停止(090624小野) Do While Not(Content.BOF Or Content.EOF) Response.Write(" SpreadAddItem(fpSpread);" & vbCrLf) Response.Write(" fpSpread.Row = " & ii & ";" & vbCrLf) Response.Write(" fpSpread.Col = 1;" & vbCrLf) Response.Write(" fpSpread.Text = """ & Content.Fields("集計CD") & """;" & vbCrLf) Response.Write(" fpSpread.Col = 2;" & vbCrLf) Response.Write(" fpSpread.Text = """ & Replace(Replace(Content.Fields("集計名称"), "\", "\\"), """", "”") & """;" & vbCrLf) Response.Write(" fpSpread.Col = 3;" & vbCrLf) Response.Write(" fpSpread.Text = """ & ConvKubunMeisyo("貸借区分", Content.Fields("貸借")) & """;" & vbCrLf) Response.Write(" fpSpread.Col = 4;" & vbCrLf) Response.Write(" fpSpread.Text = """ & Content.Fields("集計先") & """;" & vbCrLf) Response.Write(" fpSpread.Col = 5;" & vbCrLf) Response.Write(" fpSpread.Text = """ & Content.Fields("加減区分") & """;" & vbCrLf) Response.Write(" fpSpread.Col = 6;" & vbCrLf) Response.Write(" fpSpread.Text = """ & Content.Fields("ラインコントロール") & """;" & vbCrLf) Response.Write(" fpSpread.Col = 7;" & vbCrLf) Response.Write(" fpSpread.Text = """ & ConvKubunMeisyo("アンダーライン", Content.Fields("アンダーライン")) & """;" & vbCrLf) Response.Write(" fpSpread.Col = 8;" & vbCrLf) Response.Write(" fpSpread.Text = """ & ConvKubunMeisyo("右方表示", Content.Fields("右方表示")) & """;" & vbCrLf) Response.Write(" fpSpread.Col = 9;" & vbCrLf) Response.Write(" fpSpread.Text = """ & ConvKubunMeisyo("構成表示", Content.Fields("構成表示")) & """;" & vbCrLf) Response.Write(" fpSpread.Col = 0;" & vbCrLf) Response.Write(" fpSpread.Text = "" "";" & vbCrLf) ii = ii + 1 Content.MoveNext Loop Response.Write(" SpreadRowColorMode = true;" & vbCrLf) '選択行の色を変える動作を再開(090624小野) Response.Write(" SpreadRowColor(fpSpread);") '選択行の色を変える(090624小野) %> } </SCRIPT> <SCRIPT FOR="vaSpread1" EVENT="KeyDown(KeyAsciiCode, KeyShift)" LANGUAGE="JavaScript"> // SpreadKeyDown(this, KeyAsciiCode, KeyShift); </SCRIPT> <SCRIPT FOR="vaSpread1" EVENT="KeyUp(KeyAsciiCode, KeyShift)" LANGUAGE="JavaScript"> SpreadKeyUp(this, KeyAsciiCode, KeyShift); </SCRIPT> <SCRIPT FOR="vaSpread1" EVENT="ScriptLeaveCell(ColNo, RowNo, NewColNo, NewRowNo, Cancel)" LANGUAGE="VBScript"> Dim tmp tmp = SpreadChange(Me, ColNo, RowNo) If tmp = "ERR" Then Cancel = true SpreadReFocus(Me) End If </SCRIPT> <SCRIPT FOR="vaSpread1" EVENT="Click(ColNo, RowNo)" LANGUAGE="JavaScript"> // ヘッダー列クリック時にソートしない場合にはコメントアウトする // SpreadClick(this, ColNo, RowNo); // 表示順入れ替えボタン用拡張(080322小野) if (ColNo == 10 || ColNo == 11) { SpreadHyojijun(this, ColNo, RowNo); } this.Col = this.ActiveCol; this.Row = this.ActiveRow; this.EditMode = true; SpreadRowColor(this); //選択行の色を変える(090624小野) </SCRIPT> <SCRIPT FOR="vaSpread1" EVENT="ComboCloseUp(ColNo, RowNo)" LANGUAGE="JavaScript"> SpreadRowColor(this); //選択行の色を変える(090624小野) this.focus(); </SCRIPT> <SCRIPT FOR="vaSpread1" EVENT="EditMode(Col, Row, Mode, ChangeMade)" LANGUAGE="JavaScript"> this.Col = Col; this.Row = Row; if(this.CellType == 12) { if(!Mode) { this.TypeCurrencyLeadingZero = 2; } } this.focus(); </SCRIPT> <SCRIPT FOR="window" EVENT="onload" LANGUAGE="JavaScript"> if(typeof(form1.dummy) == "object")form1.dummy.focus(); // SpreadInit 第 3n + 1 引数 (nは整数) // 0:日付型 1:文字型 8:コンボボックス型 10:チェックボックス型 12:通貨型 13:数値型 21:勘定科目 22:摘要 document.vaSpread1.Redraw = false; SpreadLoad(document.vaSpread1, "集計コード", 18, 10, "集計名称", 1, 22, "貸借区分", 8, 8, "集計先コード", 18, 10, "(+-)", 8, 4, "行間", 18, 4, "下線", 8, 4, "表示位置", 8, 8, "構成表示", 8, 8, "HyojijunujijoyH", -1, -1); document.vaSpread1.ScriptEnhanced = true; //その他の Spread に関する設定はここに入れる document.vaSpread1.Row = -1; document.vaSpread1.Col = -1; document.vaSpread1.fontsize = 10; document.vaSpread1.Row = 0; document.vaSpread1.Col = -1; document.vaSpread1.fontsize = 10; document.vaSpread1.Row = -1; document.vaSpread1.Col = 3; document.vaSpread1.TypeComboBoxList = "借方\t貸方" document.vaSpread1.Col = 5; document.vaSpread1.TypeComboBoxList = "\t+\t-" document.vaSpread1.Col = 7; document.vaSpread1.TypeComboBoxList = "\t有" document.vaSpread1.Col = 8; document.vaSpread1.TypeComboBoxList = "\t右\t左" document.vaSpread1.Col = 9; document.vaSpread1.TypeComboBoxList = "\t有" document.vaSpread1.RetainSelBlock = false; SpreadInit(document.vaSpread1); SpreadCharLen(document.vaSpread1, 1, 0, 4) SpreadCharLen(document.vaSpread1, 4, 0, 4) SpreadCharLen(document.vaSpread1, 6, 3, 1) document.vaSpread1.Redraw = true; </SCRIPT> <% End IF %> <% = HtmlFooter %> </html> <% End Sub %>