1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825 |
- $PBExportHeader$w_subjectdef_edit.srw
- forward
- global type w_subjectdef_edit from w_publ_base
- end type
- type tab_subject from tab within w_subjectdef_edit
- end type
- type tabpage_1 from userobject within tab_subject
- end type
- type tv_1 from treeview within tabpage_1
- end type
- type tabpage_1 from userobject within tab_subject
- tv_1 tv_1
- end type
- type tabpage_2 from userobject within tab_subject
- end type
- type tv_2 from treeview within tabpage_2
- end type
- type tabpage_2 from userobject within tab_subject
- tv_2 tv_2
- end type
- type tabpage_6 from userobject within tab_subject
- end type
- type tv_6 from treeview within tabpage_6
- end type
- type tabpage_6 from userobject within tab_subject
- tv_6 tv_6
- end type
- type tabpage_3 from userobject within tab_subject
- end type
- type tv_3 from treeview within tabpage_3
- end type
- type tabpage_3 from userobject within tab_subject
- tv_3 tv_3
- end type
- type tabpage_4 from userobject within tab_subject
- end type
- type tv_4 from treeview within tabpage_4
- end type
- type tabpage_4 from userobject within tab_subject
- tv_4 tv_4
- end type
- type tabpage_5 from userobject within tab_subject
- end type
- type tv_5 from treeview within tabpage_5
- end type
- type tabpage_5 from userobject within tab_subject
- tv_5 tv_5
- end type
- type tab_subject from tab within w_subjectdef_edit
- tabpage_1 tabpage_1
- tabpage_2 tabpage_2
- tabpage_6 tabpage_6
- tabpage_3 tabpage_3
- tabpage_4 tabpage_4
- tabpage_5 tabpage_5
- end type
- type cb_add from uo_imflatbutton within w_subjectdef_edit
- end type
- type cb_add_next from uo_imflatbutton within w_subjectdef_edit
- end type
- type cb_mod from uo_imflatbutton within w_subjectdef_edit
- end type
- type cb_del from uo_imflatbutton within w_subjectdef_edit
- end type
- type cb_print from uo_imflatbutton within w_subjectdef_edit
- end type
- type cb_refresh from uo_imflatbutton within w_subjectdef_edit
- end type
- type cb_ok from uo_imflatbutton within w_subjectdef_edit
- end type
- type cb_3 from uo_imflatbutton within w_subjectdef_edit
- end type
- type cb_6 from uo_imflatbutton within w_subjectdef_edit
- end type
- type cb_11 from uo_imflatbutton within w_subjectdef_edit
- end type
- type cb_tab from commandbutton within w_subjectdef_edit
- end type
- end forward
- global type w_subjectdef_edit from w_publ_base
- integer width = 2697
- integer height = 1964
- string title = "会计科目"
- boolean minbox = false
- windowtype windowtype = response!
- long backcolor = 81324524
- tab_subject tab_subject
- cb_add cb_add
- cb_add_next cb_add_next
- cb_mod cb_mod
- cb_del cb_del
- cb_print cb_print
- cb_refresh cb_refresh
- cb_ok cb_ok
- cb_3 cb_3
- cb_6 cb_6
- cb_11 cb_11
- cb_tab cb_tab
- end type
- global w_subjectdef_edit w_subjectdef_edit
- type variables
- Long il_hand
- treeviewitem itvi
- Long uo_deep
- Boolean ib_mod = FALSE
- treeview tv_1,tv_2,tv_3,tv_4,tv_5,tv_6
- String ins_subidstr,ins_subidname
- uo_subject uo_sub
- Int dw_editfocus = 0
- //1:新建下级,2:新建同级,3:修改
- s_subject s_rt_subject
- Int if_check_ifmx = 0 //0:检查是否明细科目
- s_subid_tree is_subtree_arr1[]
- s_subid_tree is_subtree_arr2[]
- s_subid_tree is_subtree_arr3[]
- s_subid_tree is_subtree_arr4[]
- s_subid_tree is_subtree_arr5[]
- s_subid_tree is_subtree_arr6[]
- Long il_p1,il_p2,il_p3,il_p4,il_p5,il_p6
- end variables
- forward prototypes
- public function integer wf_dssubtree_retrieve ()
- public function integer wf_maketree ()
- public function integer pf_treegrowth (long arg_handl, string arg_subid)
- public function integer wf_tree1 ()
- public function integer wf_tree2 ()
- public function integer wf_tree3 ()
- public function integer wf_tree4 ()
- public function integer wf_tree5 ()
- public function integer wf_tree6 ()
- end prototypes
- public function integer wf_dssubtree_retrieve ();DESTROY ds_subjecttree
- f_init_ds_subjecttree()
- RETURN 1
- end function
- public function integer wf_maketree ();il_p1 = 0
- il_p2 = 0
- il_p3 = 0
- il_p4 = 0
- il_p5 = 0
- il_p6 = 0
- CHOOSE CASE tab_subject.SelectedTab
- CASE 1
- wf_tree1()
- CASE 2
- wf_tree2()
- CASE 4
- wf_tree3()
- CASE 5
- wf_tree4()
- CASE 6
- wf_tree5()
- CASE 3
- wf_tree6()
- END CHOOSE
- RETURN 1
- end function
- public function integer pf_treegrowth (long arg_handl, string arg_subid);String ls_subid,ls_subid_arr[]
- String ls_name,ls_name_arr[]
- Long ll_count = 0,ll_i
- Int li_detailflag,li_detailflag_arr[]
- String ls_subid_name
- Long li_handl
- TreeViewItem l_tvi
- treeview lt_tv
- Int len_1,len_2,len_3,len_4,len_5,len_6
- Int arg_son_len,arg_parent_len
- len_1 = s_sys_accset.step1
- len_2 = s_sys_accset.step1+s_sys_accset.step2
- len_3 = s_sys_accset.step1+s_sys_accset.step2+s_sys_accset.step3
- len_4 = s_sys_accset.step1+s_sys_accset.step2+s_sys_accset.step3+s_sys_accset.step4
- len_5 = s_sys_accset.step1+s_sys_accset.step2+s_sys_accset.step3+s_sys_accset.step4+s_sys_accset.step5
- len_6 = s_sys_accset.step1+s_sys_accset.step2+s_sys_accset.step3+s_sys_accset.step4+s_sys_accset.step5+s_sys_accset.step6
- arg_parent_len = Len(Trim(arg_subid))
- CHOOSE CASE arg_parent_len
- CASE 1
- arg_son_len = len_1
- CASE len_1
- arg_son_len = len_2
- CASE len_2
- arg_son_len = len_3
- CASE len_3
- arg_son_len = len_4
- CASE len_4
- arg_son_len = len_5
- CASE len_5
- arg_son_len = len_6
- CASE len_5
- arg_son_len = len_6 + 1
- END CHOOSE
- uo_deep++
- IF uo_deep > 100000 THEN //防止死递归
- RETURN 0
- END IF
- //用ds取下级科目
- String ls_filter
- ls_filter = "subid like '" + arg_subid + "%'"
- ds_subjecttree.SetFilter(ls_filter)
- ds_subjecttree.Filter()
- Long RowCount,ll_k
- ds_subjecttree.AcceptText()
- RowCount = ds_subjecttree.RowCount()
- IF RowCount = 0 THEN RETURN 0
- FOR ll_k = 1 TO RowCount
- ls_subid = ds_subjecttree.Object.subid[ll_k]
- ls_name = ds_subjecttree.Object.Name[ll_k]
- li_detailflag = ds_subjecttree.Object.detailflag[ll_k]
-
- IF Len(Trim(ls_subid)) = arg_son_len AND Left(Trim(ls_subid),arg_parent_len ) = arg_subid THEN
- ll_count++
- ls_subid_arr[ll_count] = ls_subid
- ls_name_arr[ll_count] = ls_name
- li_detailflag_arr[ll_count] = li_detailflag
- END IF
- NEXT
- //
- //用游标取下级科目
- //DECLARE pf_cur CURSOR FOR
- // SELECT subid,
- // name,
- // detailflag
- // FROM cw_subject
- // WHERE ( accsetid = :sys_accsetid )
- // And ( Len(ltrim(rtrim(subid))) = :arg_son_len )
- // and ( left(ltrim(rtrim(subid)),:arg_parent_len ) = :arg_subid );
- //OPEN pf_cur;
- //
- //FETCH pf_cur INTO :ls_subid,:ls_name,:li_detailflag;
- //
- //DO WHILE sqlca.SQLCode = 0
- // ll_count++
- // ls_subid_arr[ll_count] = ls_subid
- // ls_name_arr[ll_count] = ls_name
- // li_detailflag_arr[ll_count] = li_detailflag
- // FETCH pf_cur INTO :ls_subid,:ls_name,:li_detailflag;
- //LOOP
- //
- //CLOSE pf_cur;
- //
- FOR ll_i = 1 TO ll_count
- ls_subid_name = ls_subid_arr[ll_i] + ' ' + ls_name_arr[ll_i]
-
- CHOOSE CASE Left(arg_subid,1)
- CASE '1'
- lt_tv = tv_1
- CASE '2'
- lt_tv = tv_2
- CASE '3'
- IF s_sys_accset.ifnewsubid = 0 THEN
- lt_tv = tv_3
- ELSE
- lt_tv = tv_6
- END IF
- CASE '4'
- IF s_sys_accset.ifnewsubid = 0 THEN
- lt_tv = tv_4
- ELSE
- lt_tv = tv_3
- END IF
- CASE '5'
- IF s_sys_accset.ifnewsubid = 0 THEN
- lt_tv = tv_5
- ELSE
- lt_tv = tv_4
- END IF
- CASE '6'
- IF s_sys_accset.ifnewsubid = 0 THEN
- lt_tv = tv_6
- ELSE
- lt_tv = tv_5
- END IF
- END CHOOSE
-
- li_handl = lt_tv.InsertItemSort(arg_handl,ls_subid_name,li_detailflag_arr[ll_i] + 1)
-
-
- CHOOSE CASE Left(arg_subid,1)
- CASE '1'
- il_p1++
- is_subtree_arr1[il_p1].subid = ls_subid_arr[ll_i]
- is_subtree_arr1[il_p1].Handle = li_handl
- CASE '2'
- il_p2++
- is_subtree_arr2[il_p2].subid = ls_subid_arr[ll_i]
- is_subtree_arr2[il_p2].Handle = li_handl
- CASE '3'
- il_p3++
- is_subtree_arr3[il_p3].subid = ls_subid_arr[ll_i]
- is_subtree_arr3[il_p3].Handle = li_handl
- CASE '4'
- il_p4++
- is_subtree_arr4[il_p4].subid = ls_subid_arr[ll_i]
- is_subtree_arr4[il_p4].Handle = li_handl
- CASE '5'
- il_p5++
- is_subtree_arr5[il_p5].subid = ls_subid_arr[ll_i]
- is_subtree_arr5[il_p5].Handle = li_handl
- CASE '6'
- il_p6++
- is_subtree_arr6[il_p6].subid = ls_subid_arr[ll_i]
- is_subtree_arr6[il_p6].Handle = li_handl
- END CHOOSE
-
- IF lt_tv.GetItem ( li_handl, l_tvi) = 1 THEN
- l_tvi.Label = ls_subid_name
- l_tvi.Data = ls_subid_arr[ll_i]
- lt_tv.SetItem( li_handl, l_tvi )
- END IF
-
- pf_treegrowth(li_handl,ls_subid_arr[ll_i])
- NEXT
- RETURN 1
- end function
- public function integer wf_tree1 ();Long ll_hand
- Long tvi_hdl = 0
- tv_1.SetRedraw(FALSE)
- DO UNTIL tv_1.FindItem(RootTreeItem!, 0) = -1
- tv_1.DeleteItem(tvi_hdl)
- LOOP
- ll_hand = tv_1.InsertItemLast(0,'资产类科目',0)
- pf_treegrowth(ll_hand,'1')
- tv_1.ExpandItem(ll_hand)
- tv_1.SetRedraw(TRUE)
- ds_subjecttree.SetFilter('')
- ds_subjecttree.Filter()
- RETURN 1
- end function
- public function integer wf_tree2 ();long ll_hand
- long tvi_hdl = 0
- tv_2.setredraw(false)
-
- DO UNTIL tv_2.FindItem(RootTreeItem!, 0) = -1
- tv_2.DeleteItem(tvi_hdl)
- LOOP
- ll_hand = tv_2.insertitemlast(0,'负债类科目',0)
- pf_treegrowth(ll_hand,'2')
- tv_2.expanditem(ll_hand)
- tv_2.setredraw(true)
- ds_subjecttree.setfilter('')
- ds_subjecttree.filter()
- return 1
- end function
- public function integer wf_tree3 ();Long ll_hand
- Long tvi_hdl = 0
- tv_3.SetRedraw(FALSE)
- DO UNTIL tv_3.FindItem(RootTreeItem!, 0) = -1
- tv_3.DeleteItem(tvi_hdl)
- LOOP
- ll_hand = tv_3.InsertItemLast(0,'权益类科目',0)
- IF s_sys_accset.ifnewsubid = 0 THEN
- pf_treegrowth(ll_hand,'3')
- ELSE
- pf_treegrowth(ll_hand,'4')
- END IF
- tv_3.ExpandItem(ll_hand)
- tv_3.SetRedraw(TRUE)
- ds_subjecttree.SetFilter('')
- ds_subjecttree.Filter()
- RETURN 1
- end function
- public function integer wf_tree4 ();long ll_hand
- long tvi_hdl = 0
- tv_4.setredraw(false)
-
- DO UNTIL tv_4.FindItem(RootTreeItem!, 0) = -1
- tv_4.DeleteItem(tvi_hdl)
- LOOP
- ll_hand = tv_4.insertitemlast(0,'成本类科目',0)
- IF s_sys_accset.ifnewsubid = 0 THEN
- pf_treegrowth(ll_hand,'4')
- ELSE
- pf_treegrowth(ll_hand,'5')
- END IF
- tv_4.expanditem(ll_hand)
- tv_4.setredraw(true)
- ds_subjecttree.setfilter('')
- ds_subjecttree.filter()
- return 1
- end function
- public function integer wf_tree5 ();long ll_hand
- long tvi_hdl = 0
- tv_5.setredraw(false)
- DO UNTIL tv_5.FindItem(RootTreeItem!, 0) = -1
- tv_5.DeleteItem(tvi_hdl)
- LOOP
- ll_hand = tv_5.insertitemlast(0,'损益类科目',0)
- IF s_sys_accset.ifnewsubid = 0 THEN
- pf_treegrowth(ll_hand,'5')
- ELSE
- pf_treegrowth(ll_hand,'6')
- END IF
- tv_5.expanditem(ll_hand)
- tv_5.setredraw(true)
- ds_subjecttree.setfilter('')
- ds_subjecttree.filter()
- return 1
- end function
- public function integer wf_tree6 ();long ll_hand
- long tvi_hdl = 0
- tv_6.setredraw(false)
- DO UNTIL tv_6.FindItem(RootTreeItem!, 0) = -1
- tv_6.DeleteItem(tvi_hdl)
- LOOP
- ll_hand = tv_6.insertitemlast(0,'共同类科目',0)
- pf_treegrowth(ll_hand,'3')
- tv_6.expanditem(ll_hand)
- tv_6.setredraw(true)
- ds_subjecttree.setfilter('')
- ds_subjecttree.filter()
- return 1
- end function
- on w_subjectdef_edit.create
- int iCurrent
- call super::create
- this.tab_subject=create tab_subject
- this.cb_add=create cb_add
- this.cb_add_next=create cb_add_next
- this.cb_mod=create cb_mod
- this.cb_del=create cb_del
- this.cb_print=create cb_print
- this.cb_refresh=create cb_refresh
- this.cb_ok=create cb_ok
- this.cb_3=create cb_3
- this.cb_6=create cb_6
- this.cb_11=create cb_11
- this.cb_tab=create cb_tab
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.tab_subject
- this.Control[iCurrent+2]=this.cb_add
- this.Control[iCurrent+3]=this.cb_add_next
- this.Control[iCurrent+4]=this.cb_mod
- this.Control[iCurrent+5]=this.cb_del
- this.Control[iCurrent+6]=this.cb_print
- this.Control[iCurrent+7]=this.cb_refresh
- this.Control[iCurrent+8]=this.cb_ok
- this.Control[iCurrent+9]=this.cb_3
- this.Control[iCurrent+10]=this.cb_6
- this.Control[iCurrent+11]=this.cb_11
- this.Control[iCurrent+12]=this.cb_tab
- end on
- on w_subjectdef_edit.destroy
- call super::destroy
- destroy(this.tab_subject)
- destroy(this.cb_add)
- destroy(this.cb_add_next)
- destroy(this.cb_mod)
- destroy(this.cb_del)
- destroy(this.cb_print)
- destroy(this.cb_refresh)
- destroy(this.cb_ok)
- destroy(this.cb_3)
- destroy(this.cb_6)
- destroy(this.cb_11)
- destroy(this.cb_tab)
- end on
- event open;call super::open;if_check_ifmx = Message.DoubleParm
- tv_1 = tab_subject.tabpage_1.tv_1
- tv_2 = tab_subject.tabpage_2.tv_2
- tv_3 = tab_subject.tabpage_3.tv_3
- tv_4 = tab_subject.tabpage_4.tv_4
- tv_5 = tab_subject.tabpage_5.tv_5
- tv_6 = tab_subject.tabpage_6.tv_6
- IF sys_last_selected_subid <> '' THEN cb_tab.PostEvent(Clicked!)
- wf_maketree()
- uo_sub = CREATE uo_subject
- end event
- event close;destroy uo_sub
- closewithreturn(this,s_rt_subject)
- end event
- type cb_func from w_publ_base`cb_func within w_subjectdef_edit
- end type
- type cb_exit from w_publ_base`cb_exit within w_subjectdef_edit
- integer x = 2254
- integer y = 204
- integer width = 384
- end type
- type tab_subject from tab within w_subjectdef_edit
- integer width = 2226
- integer height = 1864
- integer taborder = 20
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long backcolor = 80269524
- boolean raggedright = true
- integer selectedtab = 1
- tabpage_1 tabpage_1
- tabpage_2 tabpage_2
- tabpage_6 tabpage_6
- tabpage_3 tabpage_3
- tabpage_4 tabpage_4
- tabpage_5 tabpage_5
- end type
- on tab_subject.create
- this.tabpage_1=create tabpage_1
- this.tabpage_2=create tabpage_2
- this.tabpage_6=create tabpage_6
- this.tabpage_3=create tabpage_3
- this.tabpage_4=create tabpage_4
- this.tabpage_5=create tabpage_5
- this.Control[]={this.tabpage_1,&
- this.tabpage_2,&
- this.tabpage_6,&
- this.tabpage_3,&
- this.tabpage_4,&
- this.tabpage_5}
- end on
- on tab_subject.destroy
- destroy(this.tabpage_1)
- destroy(this.tabpage_2)
- destroy(this.tabpage_6)
- destroy(this.tabpage_3)
- destroy(this.tabpage_4)
- destroy(this.tabpage_5)
- end on
- event selectionchanged;wf_maketree()
- end event
- type tabpage_1 from userobject within tab_subject
- event create ( )
- event destroy ( )
- integer x = 18
- integer y = 96
- integer width = 2190
- integer height = 1752
- long backcolor = 80269524
- string text = "资产类"
- long tabtextcolor = 33554432
- long tabbackcolor = 80269524
- long picturemaskcolor = 553648127
- tv_1 tv_1
- end type
- on tabpage_1.create
- this.tv_1=create tv_1
- this.Control[]={this.tv_1}
- end on
- on tabpage_1.destroy
- destroy(this.tv_1)
- end on
- type tv_1 from treeview within tabpage_1
- integer width = 2185
- integer height = 1748
- integer taborder = 20
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- borderstyle borderstyle = stylelowered!
- string picturename[] = {"RegistrationDir5!","NestedReport!","NestedReport!","NestedReport!"}
- long picturemaskcolor = 553648127
- long statepicturemaskcolor = 536870912
- end type
- event selectionchanged;long ll_hand
- treeviewitem tvi
- il_hand=this.finditem(CurrentTreeItem!,0)
- ll_hand=il_hand
- this.getitem(ll_hand,itvi)
- tvi=itvi
- ins_subidstr = left(tvi.label,pos(tvi.label,' ') -1 )
- ins_subidname = tvi.label
- tv_1.expanditem(ll_hand)
- end event
- event doubleclicked;cb_ok.triggerevent(clicked!)
- end event
- event clicked;this.triggerevent(selectionchanged!)
- end event
- type tabpage_2 from userobject within tab_subject
- event create ( )
- event destroy ( )
- integer x = 18
- integer y = 96
- integer width = 2190
- integer height = 1752
- long backcolor = 80269524
- string text = "负债类"
- long tabtextcolor = 33554432
- long tabbackcolor = 80269524
- long picturemaskcolor = 553648127
- tv_2 tv_2
- end type
- on tabpage_2.create
- this.tv_2=create tv_2
- this.Control[]={this.tv_2}
- end on
- on tabpage_2.destroy
- destroy(this.tv_2)
- end on
- type tv_2 from treeview within tabpage_2
- integer width = 2185
- integer height = 1748
- integer taborder = 50
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- borderstyle borderstyle = stylelowered!
- string picturename[] = {"RegistrationDir5!","NestedReport!","NestedReport!"}
- long picturemaskcolor = 553648127
- long statepicturemaskcolor = 553648127
- end type
- event selectionchanged;long ll_hand
- treeviewitem tvi
- il_hand=this.finditem(CurrentTreeItem!,0)
- ll_hand=il_hand
- this.getitem(ll_hand,itvi)
- tvi=itvi
- ins_subidstr=left(tvi.label,pos(tvi.label,' ') -1 )
- ins_subidname = tvi.label
- tv_2.expanditem(ll_hand)
- end event
- event doubleclicked;cb_ok.triggerevent(clicked!)
- end event
- event clicked;this.triggerevent(selectionchanged!)
- end event
- type tabpage_6 from userobject within tab_subject
- integer x = 18
- integer y = 96
- integer width = 2190
- integer height = 1752
- long backcolor = 80269524
- string text = "共同类"
- long tabtextcolor = 33554432
- long tabbackcolor = 80269524
- long picturemaskcolor = 536870912
- tv_6 tv_6
- end type
- on tabpage_6.create
- this.tv_6=create tv_6
- this.Control[]={this.tv_6}
- end on
- on tabpage_6.destroy
- destroy(this.tv_6)
- end on
- type tv_6 from treeview within tabpage_6
- integer width = 2185
- integer height = 1748
- integer taborder = 10
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- borderstyle borderstyle = stylelowered!
- string picturename[] = {"RegistrationDir5!","NestedReport!","NestedReport!"}
- long picturemaskcolor = 553648127
- long statepicturemaskcolor = 553648127
- end type
- event clicked;this.triggerevent(selectionchanged!)
- end event
- event doubleclicked;cb_ok.triggerevent(clicked!)
- end event
- event selectionchanged;Long ll_hand
- treeviewitem tvi
- il_hand = THIS.FindItem(CurrentTreeItem!,0)
- ll_hand = il_hand
- THIS.GetItem(ll_hand,itvi)
- tvi = itvi
- ins_subidstr = Left(tvi.Label,Pos(tvi.Label,' ') -1 )
- ins_subidname = tvi.Label
- tv_5.ExpandItem(ll_hand)
- end event
- type tabpage_3 from userobject within tab_subject
- event create ( )
- event destroy ( )
- integer x = 18
- integer y = 96
- integer width = 2190
- integer height = 1752
- long backcolor = 80269524
- string text = "权益类"
- long tabtextcolor = 33554432
- long tabbackcolor = 80269524
- long picturemaskcolor = 553648127
- tv_3 tv_3
- end type
- on tabpage_3.create
- this.tv_3=create tv_3
- this.Control[]={this.tv_3}
- end on
- on tabpage_3.destroy
- destroy(this.tv_3)
- end on
- type tv_3 from treeview within tabpage_3
- integer width = 2185
- integer height = 1748
- integer taborder = 50
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- borderstyle borderstyle = stylelowered!
- string picturename[] = {"RegistrationDir5!","NestedReport!","NestedReport!"}
- long picturemaskcolor = 553648127
- long statepicturemaskcolor = 536870912
- end type
- event selectionchanged;long ll_hand
- treeviewitem tvi
- il_hand=this.finditem(CurrentTreeItem!,0)
- ll_hand=il_hand
- this.getitem(ll_hand,itvi)
- tvi=itvi
- ins_subidstr=left(tvi.label,pos(tvi.label,' ') -1 )
- ins_subidname = tvi.label
- tv_3.expanditem(ll_hand)
- end event
- event doubleclicked;cb_ok.triggerevent(clicked!)
- end event
- event clicked;this.triggerevent(selectionchanged!)
- end event
- type tabpage_4 from userobject within tab_subject
- event create ( )
- event destroy ( )
- integer x = 18
- integer y = 96
- integer width = 2190
- integer height = 1752
- long backcolor = 80269524
- string text = "成本类"
- long tabtextcolor = 33554432
- long tabbackcolor = 80269524
- long picturemaskcolor = 553648127
- tv_4 tv_4
- end type
- on tabpage_4.create
- this.tv_4=create tv_4
- this.Control[]={this.tv_4}
- end on
- on tabpage_4.destroy
- destroy(this.tv_4)
- end on
- type tv_4 from treeview within tabpage_4
- integer width = 2185
- integer height = 1748
- integer taborder = 20
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- borderstyle borderstyle = stylelowered!
- string picturename[] = {"RegistrationDir5!","NestedReport!","NestedReport!"}
- long picturemaskcolor = 553648127
- long statepicturemaskcolor = 536870912
- end type
- event selectionchanged;long ll_hand
- treeviewitem tvi
- il_hand=this.finditem(CurrentTreeItem!,0)
- ll_hand=il_hand
- this.getitem(ll_hand,itvi)
- tvi=itvi
- ins_subidstr=left(tvi.label,pos(tvi.label,' ') -1 )
- ins_subidname = tvi.label
- tv_4.expanditem(ll_hand)
- end event
- event doubleclicked;cb_ok.triggerevent(clicked!)
- end event
- event clicked;this.triggerevent(selectionchanged!)
- end event
- type tabpage_5 from userobject within tab_subject
- event create ( )
- event destroy ( )
- integer x = 18
- integer y = 96
- integer width = 2190
- integer height = 1752
- long backcolor = 80269524
- string text = "损益类"
- long tabtextcolor = 33554432
- long tabbackcolor = 80269524
- long picturemaskcolor = 553648127
- tv_5 tv_5
- end type
- on tabpage_5.create
- this.tv_5=create tv_5
- this.Control[]={this.tv_5}
- end on
- on tabpage_5.destroy
- destroy(this.tv_5)
- end on
- type tv_5 from treeview within tabpage_5
- integer width = 2185
- integer height = 1748
- integer taborder = 50
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- borderstyle borderstyle = stylelowered!
- string picturename[] = {"RegistrationDir5!","NestedReport!","NestedReport!"}
- long picturemaskcolor = 553648127
- long statepicturemaskcolor = 553648127
- end type
- event selectionchanged;Long ll_hand
- treeviewitem tvi
- il_hand = THIS.FindItem(CurrentTreeItem!,0)
- ll_hand = il_hand
- THIS.GetItem(ll_hand,itvi)
- tvi = itvi
- ins_subidstr = Left(tvi.Label,Pos(tvi.Label,' ') -1 )
- ins_subidname = tvi.Label
- tv_5.ExpandItem(ll_hand)
- end event
- event doubleclicked;cb_ok.triggerevent(clicked!)
- end event
- event clicked;this.triggerevent(selectionchanged!)
- end event
- type cb_add from uo_imflatbutton within w_subjectdef_edit
- integer x = 2254
- integer y = 380
- integer width = 384
- integer height = 96
- integer taborder = 50
- boolean bringtotop = true
- string text = "增加同级科目"
- end type
- event clicked;IF NOT (f_power_ind(1952,sys_msg_pow) OR f_power_ind(1966,sys_msg_pow)) THEN
- MessageBox(publ_operator,'你没有使用权限!')
- RETURN
- END IF
- String p_subid,c_subid
- String arg_msg
- Int ls_dcflag
- IF Len(ins_subidstr) = 0 THEN
- MessageBox(publ_operator,'请选择要增加同级科目的科目')
- RETURN
- END IF
- p_subid = ins_subidstr
- //***查询余额方向
- ls_dcflag = f_get_dcflag(p_subid,arg_msg)
- IF ls_dcflag = -1 THEN
- MessageBox(publ_operator,'增加同级科目失败,'+arg_msg)
- RETURN
- END IF
- IF uo_sub.new_begin(0,p_subid,arg_msg) = 0 THEN
- MessageBox(publ_operator,'增加同级科目失败,'+arg_msg)
- RETURN
- END IF
- c_subid = uo_sub.get_subid(0,p_subid,arg_msg)
- IF c_subid = 'err' THEN
- MessageBox(publ_operator,'增加同级科目失败,'+arg_msg)
- RETURN
- END IF
- s_sub_edit s_edit
- s_edit.openparm = 2
- s_edit.editflag = 1
- s_edit.subflag = 0
- s_edit.dcflag = ls_dcflag
- s_edit.subid = c_subid
- s_edit.subsubid = ''
- OpenWithParm(w_subjectdef_edit_input,s_edit)
- //****刷新树
- s_sub_edit s_rst_subid
- Long ll_hand,ll_handl
- s_rst_subid = Message.PowerObjectParm
- IF s_rst_subid.subid = '' THEN RETURN
- CHOOSE CASE tab_subject.SelectedTab
- CASE 1
- ll_hand = tv_1.FindItem(parenttreeitem!,il_hand)
- ll_handl = tv_1.InsertItemSort(ll_hand,s_rst_subid.subid+' '+s_rst_subid.subname,2)
- tv_1.SetFocus()
- tv_1.SelectItem ( ll_handl )
- CASE 2
- ll_hand = tv_2.FindItem(parenttreeitem!,il_hand)
- ll_handl = tv_2.InsertItemSort(ll_hand,s_rst_subid.subid+' '+s_rst_subid.subname,2)
- tv_2.SetFocus()
- tv_2.SelectItem ( ll_handl )
- CASE 3
- IF s_sys_accset.ifnewsubid = 0 THEN
- ll_hand = tv_3.FindItem(parenttreeitem!,il_hand)
- ll_handl = tv_3.InsertItemSort(ll_hand,s_rst_subid.subid+' '+s_rst_subid.subname,2)
- tv_3.SetFocus()
- tv_3.SelectItem ( ll_handl )
- ELSE
- ll_hand = tv_6.FindItem(parenttreeitem!,il_hand)
- ll_handl = tv_6.InsertItemSort(ll_hand,s_rst_subid.subid+' '+s_rst_subid.subname,2)
- tv_6.SetFocus()
- tv_6.SelectItem ( ll_handl )
- END IF
- CASE 4
- IF s_sys_accset.ifnewsubid = 0 THEN
- ll_hand = tv_4.FindItem(parenttreeitem!,il_hand)
- ll_handl = tv_4.InsertItemSort(ll_hand,s_rst_subid.subid+' '+s_rst_subid.subname,2)
- tv_4.SetFocus()
- tv_4.SelectItem ( ll_handl )
- ELSE
- ll_hand = tv_3.FindItem(parenttreeitem!,il_hand)
- ll_handl = tv_3.InsertItemSort(ll_hand,s_rst_subid.subid+' '+s_rst_subid.subname,2)
- tv_3.SetFocus()
- tv_3.SelectItem ( ll_handl )
- END IF
- CASE 5
- IF s_sys_accset.ifnewsubid = 0 THEN
- ll_hand = tv_5.FindItem(parenttreeitem!,il_hand)
- ll_handl = tv_5.InsertItemSort(ll_hand,s_rst_subid.subid+' '+s_rst_subid.subname,2)
- tv_5.SetFocus()
- tv_5.SelectItem ( ll_handl )
- ELSE
- ll_hand = tv_4.FindItem(parenttreeitem!,il_hand)
- ll_handl = tv_4.InsertItemSort(ll_hand,s_rst_subid.subid+' '+s_rst_subid.subname,2)
- tv_4.SetFocus()
- tv_4.SelectItem ( ll_handl )
- END IF
- CASE 6
- ll_hand = tv_5.FindItem(parenttreeitem!,il_hand)
- ll_handl = tv_5.InsertItemSort(ll_hand,s_rst_subid.subid+' '+s_rst_subid.subname,2)
- tv_5.SetFocus()
- tv_5.SelectItem ( ll_handl )
- END CHOOSE
- ins_subidstr = s_rst_subid.subid
- wf_dssubtree_retrieve()
- end event
- type cb_add_next from uo_imflatbutton within w_subjectdef_edit
- integer x = 2254
- integer y = 480
- integer width = 384
- integer height = 96
- integer taborder = 60
- boolean bringtotop = true
- string text = "增加下级科目"
- end type
- event clicked;IF NOT (f_power_ind(1952,sys_msg_pow) OR f_power_ind(1966,sys_msg_pow)) THEN
- MessageBox(publ_operator,'你没有使用权限!')
- RETURN
- END IF
- String p_subid,c_subid
- String arg_msg
- Int ls_dcflag
- IF Len(ins_subidstr) = 0 THEN
- MessageBox(publ_operator,'请选择要增加同级科目的科目')
- RETURN
- END IF
- p_subid = ins_subidstr
- //***查询余额方向
- ls_dcflag = f_get_dcflag(p_subid,arg_msg)
- IF ls_dcflag = -1 THEN
- MessageBox(publ_operator,'增加同级科目失败,'+arg_msg)
- RETURN
- END IF
- IF uo_sub.new_begin(1,p_subid,arg_msg) = 0 THEN
- MessageBox(publ_operator,'增加下级科目失败,'+arg_msg)
- RETURN
- END IF
- c_subid = uo_sub.get_subid(1,p_subid,arg_msg)
- IF c_subid = 'err' THEN
- MessageBox(publ_operator,'增加下级科目失败,'+arg_msg)
- RETURN
- END IF
- s_sub_edit s_edit
- s_edit.openparm = 1
- s_edit.editflag = 1
- s_edit.subflag = 1
- s_edit.dcflag = ls_dcflag
- s_edit.subid = p_subid
- s_edit.subsubid = Right(c_subid,Len(c_subid) - Len(p_subid))
- OpenWithParm(w_subjectdef_edit_input,s_edit)
- //****刷新树
- s_sub_edit s_rst_subid
- Long ll_handl
- s_rst_subid = Message.PowerObjectParm
- IF s_rst_subid.subid = '' THEN RETURN
- CHOOSE CASE tab_subject.SelectedTab
- CASE 1
- ll_handl = tv_1.InsertItemSort(il_hand,s_rst_subid.subid+' '+s_rst_subid.subname,2)
- tv_1.SetFocus()
- tv_1.SelectItem ( ll_handl )
- CASE 2
- ll_handl = tv_2.InsertItemSort(il_hand,s_rst_subid.subid+' '+s_rst_subid.subname,2)
- tv_2.SetFocus()
- tv_2.SelectItem ( ll_handl )
- CASE 3
- IF s_sys_accset.ifnewsubid = 0 THEN
- ll_handl = tv_3.InsertItemSort(il_hand,s_rst_subid.subid+' '+s_rst_subid.subname,2)
- tv_3.SetFocus()
- tv_3.SelectItem ( ll_handl )
- ELSE
- ll_handl = tv_6.InsertItemSort(il_hand,s_rst_subid.subid+' '+s_rst_subid.subname,2)
- tv_6.SetFocus()
- tv_6.SelectItem ( ll_handl )
- END IF
- CASE 4
- IF s_sys_accset.ifnewsubid = 0 THEN
- ll_handl = tv_4.InsertItemSort(il_hand,s_rst_subid.subid+' '+s_rst_subid.subname,2)
- tv_4.SetFocus()
- tv_4.SelectItem ( ll_handl )
- ELSE
- ll_handl = tv_3.InsertItemSort(il_hand,s_rst_subid.subid+' '+s_rst_subid.subname,2)
- tv_3.SetFocus()
- tv_3.SelectItem ( ll_handl )
- END IF
- CASE 5
- IF s_sys_accset.ifnewsubid = 0 THEN
- ll_handl = tv_5.InsertItemSort(il_hand,s_rst_subid.subid+' '+s_rst_subid.subname,2)
- tv_5.SetFocus()
- tv_5.SelectItem ( ll_handl )
- ELSE
- ll_handl = tv_4.InsertItemSort(il_hand,s_rst_subid.subid+' '+s_rst_subid.subname,2)
- tv_4.SetFocus()
- tv_4.SelectItem ( ll_handl )
- END IF
- CASE 6
- ll_handl = tv_5.InsertItemSort(il_hand,s_rst_subid.subid+' '+s_rst_subid.subname,2)
- tv_5.SetFocus()
- tv_5.SelectItem ( ll_handl )
- END CHOOSE
- ins_subidstr = s_rst_subid.subid
- wf_dssubtree_retrieve()
- end event
- type cb_mod from uo_imflatbutton within w_subjectdef_edit
- integer x = 2254
- integer y = 676
- integer width = 384
- integer height = 96
- integer taborder = 80
- boolean bringtotop = true
- string text = "修改"
- string normalpicname = "open.bmp"
- end type
- event clicked;IF NOT (f_power_ind(1952,sys_msg_pow) OR f_power_ind(1966,sys_msg_pow)) THEN
- MessageBox(publ_operator,'你没有使用权限!')
- RETURN
- END IF
- Long uc_row
- String arg_msg
- IF Len(ins_subidstr) = 0 THEN
- MessageBox(publ_operator,'请选择要修改的科目')
- RETURN
- END IF
- IF uo_sub.update_begin(ins_subidstr,arg_msg) = 0 THEN
- MessageBox(publ_operator,arg_msg)
- RETURN
- END IF
- s_sub_edit s_edit
- s_edit.openparm = 3
- s_edit.editflag = 1
- s_edit.subflag = 0
- s_edit.dcflag = 0
- s_edit.subid = ins_subidstr
- s_edit.subsubid = ''
- OpenWithParm(w_subjectdef_edit_input,s_edit)
- //****刷新树
- s_sub_edit s_rst_subid
- TreeViewItem l_tvi
- s_rst_subid = Message.PowerObjectParm
- IF s_rst_subid.subid = '' THEN RETURN
- CHOOSE CASE tab_subject.SelectedTab
- CASE 1
- IF tv_1.GetItem(il_hand,l_tvi) > 0 THEN
- l_tvi.Label = s_rst_subid.subid+' '+s_rst_subid.subname
- tv_1.SetItem(il_hand, l_tvi)
- END IF
- tv_1.SetFocus()
- tv_1.SelectItem ( il_hand )
- CASE 2
- IF tv_2.GetItem(il_hand,l_tvi) > 0 THEN
- l_tvi.Label = s_rst_subid.subid+' '+s_rst_subid.subname
- tv_2.SetItem(il_hand, l_tvi)
- END IF
- tv_1.SetFocus()
- tv_2.SelectItem ( il_hand )
- CASE 3
- IF s_sys_accset.ifnewsubid = 0 THEN
- IF tv_3.GetItem(il_hand,l_tvi) > 0 THEN
- l_tvi.Label = s_rst_subid.subid+' '+s_rst_subid.subname
- tv_3.SetItem(il_hand, l_tvi)
- END IF
- tv_3.SetFocus()
- tv_3.SelectItem ( il_hand )
- ELSE
- IF tv_6.GetItem(il_hand,l_tvi) > 0 THEN
- l_tvi.Label = s_rst_subid.subid+' '+s_rst_subid.subname
- tv_6.SetItem(il_hand, l_tvi)
- END IF
- tv_6.SetFocus()
- tv_6.SelectItem ( il_hand )
- END IF
- CASE 4
- IF s_sys_accset.ifnewsubid = 0 THEN
- IF tv_4.GetItem(il_hand,l_tvi) > 0 THEN
- l_tvi.Label = s_rst_subid.subid+' '+s_rst_subid.subname
- tv_4.SetItem(il_hand, l_tvi)
- END IF
- tv_4.SetFocus()
- tv_4.SelectItem ( il_hand )
- ELSE
- IF tv_3.GetItem(il_hand,l_tvi) > 0 THEN
- l_tvi.Label = s_rst_subid.subid+' '+s_rst_subid.subname
- tv_3.SetItem(il_hand, l_tvi)
- END IF
- tv_3.SetFocus()
- tv_3.SelectItem ( il_hand )
- END IF
- CASE 5
- IF s_sys_accset.ifnewsubid = 0 THEN
- IF tv_5.GetItem(il_hand,l_tvi) > 0 THEN
- l_tvi.Label = s_rst_subid.subid+' '+s_rst_subid.subname
- tv_5.SetItem(il_hand, l_tvi)
- END IF
- tv_5.SetFocus()
- tv_5.SelectItem ( il_hand )
- ELSE
- IF tv_4.GetItem(il_hand,l_tvi) > 0 THEN
- l_tvi.Label = s_rst_subid.subid+' '+s_rst_subid.subname
- tv_4.SetItem(il_hand, l_tvi)
- END IF
- tv_4.SetFocus()
- tv_4.SelectItem ( il_hand )
- END IF
- CASE 6
- IF tv_5.GetItem(il_hand,l_tvi) > 0 THEN
- l_tvi.Label = s_rst_subid.subid+' '+s_rst_subid.subname
- tv_5.SetItem(il_hand, l_tvi)
- END IF
- tv_5.SetFocus()
- tv_5.SelectItem ( il_hand )
- END CHOOSE
- ins_subidstr = s_rst_subid.subid
- wf_dssubtree_retrieve()
- end event
- type cb_del from uo_imflatbutton within w_subjectdef_edit
- integer x = 2254
- integer y = 776
- integer width = 384
- integer height = 96
- integer taborder = 100
- boolean bringtotop = true
- string text = "删除"
- string normalpicname = "delete.bmp"
- end type
- event clicked;IF NOT (f_power_ind(1952,sys_msg_pow) OR f_power_ind(1966,sys_msg_pow)) THEN
- MessageBox(publ_operator,'你没有使用权限!')
- RETURN
- END IF
- String arg_msg = '',msg_str,ls_subid
- Boolean if_only = FALSE
- msg_str = '是否删除科目 '+ins_subidname
- IF MessageBox(publ_operator,msg_str, Exclamation!, YesNo!, 2) = 2 THEN
- RETURN
- END IF
- IF uo_sub.getinfo(Trim(ins_subidstr),arg_msg) = 0 THEN
- MessageBox(publ_operator,arg_msg)
- RETURN
- END IF
- IF uo_sub.check_ifmxsub(arg_msg) = 0 THEN
- MessageBox(publ_operator,arg_msg+',不能删除')
- RETURN
- ELSE
- IF uo_sub.check_suboperation(0,arg_msg) = 1 THEN
- IF uo_sub.check_onlyonesub() = 0 THEN
- MessageBox(publ_operator,arg_msg+',不能删除')
- RETURN
- ELSE
- msg_str = ins_subidstr +' 科目已经有业务发生,但它是它的上级科目的唯一一个下级科目,如果将 ~n'
- msg_str = msg_str+'该科目删除,则其上级科目将成为明细科目,但要将该科目所发生业务及币 ~n'
- msg_str = msg_str+'种、核算内容等属性都将转移到其上级科目中去。~n~n'
- msg_str = msg_str+'是否确认这种引起科目级别发生的修改? ~n'
- IF MessageBox(publ_operator,msg_str, Exclamation!, YesNo!, 2) = 2 THEN
- RETURN
- ELSE
- IF uo_sub.update_add_del(0,uo_sub.subid,arg_msg,FALSE) = 0 THEN
- MessageBox(publ_operator,arg_msg)
- RETURN
- END IF
- END IF
- END IF
- ELSEIF uo_sub.check_suboperation(0,arg_msg) = 0 THEN
- MessageBox(publ_operator,arg_msg+',不能删除')
- RETURN
- END IF
- END IF
- IF uo_sub.del_sub(arg_msg,TRUE) = 0 THEN
- MessageBox(publ_operator,arg_msg)
- RETURN
- ELSE
- MessageBox(publ_operator,'删除科目成功')
-
-
-
- CHOOSE CASE tab_subject.SelectedTab
- CASE 1
- tv_1.DeleteItem(il_hand)
- CASE 2
- tv_2.DeleteItem(il_hand)
- CASE 3
- IF s_sys_accset.ifnewsubid = 0 THEN
- tv_3.DeleteItem(il_hand)
- ELSE
- tv_6.DeleteItem(il_hand)
- END IF
- CASE 4
- IF s_sys_accset.ifnewsubid = 0 THEN
- tv_4.DeleteItem(il_hand)
- ELSE
- tv_3.DeleteItem(il_hand)
- END IF
- CASE 5
- IF s_sys_accset.ifnewsubid = 0 THEN
- tv_5.DeleteItem(il_hand)
- ELSE
- tv_4.DeleteItem(il_hand)
- END IF
- CASE 6
- tv_5.DeleteItem(il_hand)
- END CHOOSE
- wf_dssubtree_retrieve()
- END IF
- end event
- type cb_print from uo_imflatbutton within w_subjectdef_edit
- integer x = 2254
- integer y = 1184
- integer width = 384
- integer height = 96
- integer taborder = 70
- boolean bringtotop = true
- string text = "打印"
- string normalpicname = "print.bmp"
- end type
- event clicked;IF NOT (f_power_ind(1953,sys_msg_pow) OR f_power_ind(1967,sys_msg_pow)) THEN
- MessageBox(publ_operator,'你没有使用权限!')
- RETURN
- END IF
- OPEN(w_rp_subject)
- end event
- type cb_refresh from uo_imflatbutton within w_subjectdef_edit
- integer x = 2254
- integer y = 1080
- integer width = 384
- integer height = 96
- integer taborder = 30
- boolean bringtotop = true
- string text = "刷新"
- string normalpicname = "refresh.bmp"
- end type
- event clicked;wf_dssubtree_retrieve()
- wf_maketree()
- end event
- type cb_ok from uo_imflatbutton within w_subjectdef_edit
- integer x = 2254
- integer y = 104
- integer width = 384
- integer height = 96
- integer taborder = 40
- string normalpicname = "ok.bmp"
- end type
- event clicked;String arg_msg
- IF Len(ins_subidstr) = 0 THEN
- MessageBox('系统提示','请先选择目标会计科目!',StopSign!)
- RETURN
- END IF
- s_rt_subject.subid = ins_subidstr
- IF uo_sub.getinfo(Trim(ins_subidstr),arg_msg) = 0 THEN
- MessageBox(publ_operator,arg_msg)
- RETURN
- END IF
- IF if_check_ifmx = 0 THEN
- IF uo_sub.check_ifmxsub(arg_msg) = 0 THEN
- MessageBox(publ_operator,arg_msg+',不能选择')
- RETURN
- END IF
- ELSEIF if_check_ifmx = 1 THEN
- IF uo_sub.check_ifmxsub(arg_msg) = 1 THEN
- MessageBox(publ_operator,'明细科目,不能选择')
- RETURN
- END IF
- END IF
- String ls_name,ls_unit
- Int ls_dcflag,ls_detailflag,ls_hswb,ls_hsqty,ls_hsdept,ls_hsemp,ls_hsitem,ls_hscust,ls_hsspt
- int ls_hstrader
- Long ls_moneyid
- SELECT name,dcflag,detailflag,hswb,moneyid,hsqty,unit,hsdept,hsemp,hsitem,hscust,hsspt,hstrader
- INTO :ls_name,:ls_dcflag,:ls_detailflag,:ls_hswb,:ls_moneyid,:ls_hsqty,:ls_unit,:ls_hsdept,:ls_hsemp,:ls_hsitem,
- :ls_hscust,:ls_hsspt,:ls_hstrader
- FROM cw_subject
- WHERE accsetid = :sys_accsetid
- AND subid = :ins_subidstr;
- IF sqlca.SQLCode <> 0 THEN
- MessageBox(publ_operator,'查询会计科目:'+ins_subidstr+'资料失败,不能选择')
- RETURN
- END IF
- s_rt_subject.Name = ls_name
- s_rt_subject.dcflag = ls_dcflag
- s_rt_subject.detailflag = ls_detailflag
- s_rt_subject.hswb = ls_hswb
- s_rt_subject.moneyid = ls_moneyid
- s_rt_subject.hsqty = ls_hsqty
- s_rt_subject.unit = ls_unit
- s_rt_subject.hsdept = ls_hsdept
- s_rt_subject.hsemp = ls_hsemp
- s_rt_subject.hsitem = ls_hsitem
- s_rt_subject.hscust = ls_hscust
- s_rt_subject.hsspt = ls_hsspt
- s_rt_subject.hstrader = ls_hstrader
- sys_last_selected_subid = ins_subidstr
- Close(PARENT)
- //subid
- //name
- //dcflag
- //detailflag
- //hswb
- //moneyid
- //hsqty
- //unit
- //hsdept
- //hsemp
- //hsitem
- //specialcode
- end event
- type cb_3 from uo_imflatbutton within w_subjectdef_edit
- integer x = 2254
- integer y = 1668
- integer width = 384
- integer height = 96
- integer taborder = 110
- boolean bringtotop = true
- string text = "调整科目标记"
- end type
- event clicked;String subid[],Name[],ls_subid,ls_name,ls_displaycode
- Long accsetid[],mxt,ls_accsetid,i,cnt
- Int len_subid
- DECLARE sub_cur CURSOR FOR
- SELECT cw_subject.accsetid,
- cw_subject.subid,
- cw_subject.name
- FROM cw_subject
- Where accsetid = :sys_accsetid;
- OPEN sub_cur;
- FETCH sub_cur INTO :ls_accsetid,:ls_subid,:ls_name;
- DO WHILE sqlca.SQLCode = 0
- mxt++
- accsetid[mxt] = ls_accsetid
- subid[mxt] = ls_subid
- Name[mxt] = ls_name
- FETCH sub_cur INTO :ls_accsetid,:ls_subid,:ls_name;
- LOOP
- CLOSE sub_cur;
- FOR i = 1 TO mxt
-
- len_subid = Len(subid[i])
- cnt = 0
- SELECT count(*) INTO :cnt
- FROM cw_subject
- WHERE accsetid = :accsetid[i]
- AND len(subid) > :len_subid
- AND Left(subid,:len_subid) = :subid[i];
-
- IF sqlca.SQLCode <> 0 THEN
- ROLLBACK;
- MessageBox("","select error!")
- RETURN
- END IF
-
-
- Int li_detailflag
- IF cnt = 0 THEN
- li_detailflag = 1
- ELSE
- li_detailflag = 0
- END IF
-
- UPDATE cw_subject SET detailflag = :li_detailflag
- WHERE accsetid = :accsetid[i]
- AND subid = :subid[i];
- IF sqlca.SQLCode <> 0 THEN
- String ls_err
- ls_err = sqlca.SQLErrText
- ROLLBACK;
- MessageBox("提示","更新失败,"+ls_err)
- RETURN
- END IF
- NEXT
- COMMIT;
- MessageBox("提示",'修改成功')
- wf_dssubtree_retrieve()
- wf_maketree()
- end event
- type cb_6 from uo_imflatbutton within w_subjectdef_edit
- integer x = 2254
- integer y = 1768
- integer width = 384
- integer height = 88
- integer taborder = 120
- boolean bringtotop = true
- string text = "更新科目名称"
- end type
- event clicked;String subid[],Name[],ls_subid,ls_name,ls_displaycode
- Long accsetid[],mxt,ls_accsetid,i
- DECLARE sub_cur CURSOR FOR
- SELECT cw_subject.accsetid,
- cw_subject.subid,
- cw_subject.name
- FROM cw_subject
- Where accsetid = :sys_accsetid;
- OPEN sub_cur;
- FETCH sub_cur INTO :ls_accsetid,:ls_subid,:ls_name;
- DO WHILE sqlca.SQLCode = 0
- mxt++
- accsetid[mxt] = ls_accsetid
- subid[mxt] = ls_subid
- Name[mxt] = ls_name
- FETCH sub_cur INTO :ls_accsetid,:ls_subid,:ls_name;
- LOOP
- CLOSE sub_cur;
- FOR i = 1 TO mxt
- ls_displaycode = f_rst_subdisplay(subid[i],Name[i])
- UPDATE cw_subject SET displaycode = :ls_displaycode
- WHERE accsetid = :accsetid[i]
- AND subid = :subid[i];
- IF sqlca.SQLCode <> 0 THEN
- String ls_err
- ls_err = sqlca.SQLErrText
- ROLLBACK;
- MessageBox("提示","更新失败,"+ls_err)
- RETURN
- END IF
- NEXT
- COMMIT;
- MessageBox("提示",'修改成功')
- wf_dssubtree_retrieve()
- wf_maketree()
- end event
- type cb_11 from uo_imflatbutton within w_subjectdef_edit
- integer x = 2254
- integer y = 1492
- integer width = 384
- integer height = 96
- integer taborder = 100
- boolean bringtotop = true
- string text = "导出帐套科目"
- end type
- event clicked;IF NOT sys_power_issuper THEN
- MessageBox('系统提示','不是帐套管理员,不能导出')
- RETURN
- END IF
- string msg
- msg = '是否确定要导出帐套科目?'
- IF MessageBox ("IF",msg,Question!,YesNo! ) = 2 THEN RETURN
- Open(w_subject_export)
- end event
- type cb_tab from commandbutton within w_subjectdef_edit
- boolean visible = false
- integer x = 2277
- integer width = 219
- integer height = 84
- integer taborder = 30
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "none"
- end type
- event clicked;Long i
- IF sys_last_selected_subid <> '' THEN
- CHOOSE CASE Left(sys_last_selected_subid,1)
- CASE '1'
- tab_subject.SelectedTab = 1
-
- FOR i = 1 TO il_p1
- IF is_subtree_arr1[i].subid = sys_last_selected_subid THEN
- tv_1.SetFocus()
- tv_1.SelectItem(is_subtree_arr1[i].Handle)
- il_hand = is_subtree_arr1[i].Handle
- END IF
- NEXT
- CASE '2'
- tab_subject.SelectedTab = 2
-
- FOR i = 1 TO il_p2
- IF is_subtree_arr2[i].subid = sys_last_selected_subid THEN
- tv_2.SetFocus()
- tv_2.SelectItem(is_subtree_arr2[i].Handle)
- il_hand = is_subtree_arr2[i].Handle
- END IF
- NEXT
- CASE '3'
- tab_subject.SelectedTab = 3
-
- FOR i = 1 TO il_p3
- IF is_subtree_arr3[i].subid = sys_last_selected_subid THEN
- tv_3.SetFocus()
- tv_3.SelectItem(is_subtree_arr3[i].Handle)
- il_hand = is_subtree_arr3[i].Handle
- END IF
- NEXT
- CASE '4'
- tab_subject.SelectedTab = 4
-
- FOR i = 1 TO il_p4
- IF is_subtree_arr4[i].subid = sys_last_selected_subid THEN
- tv_4.SetFocus()
- tv_4.SelectItem(is_subtree_arr4[i].Handle)
- il_hand = is_subtree_arr4[i].Handle
- END IF
- NEXT
- CASE '5'
- tab_subject.SelectedTab = 5
-
- FOR i = 1 TO il_p5
- IF is_subtree_arr5[i].subid = sys_last_selected_subid THEN
- tv_5.SetFocus()
- tv_5.SelectItem(is_subtree_arr5[i].Handle)
- il_hand = is_subtree_arr5[i].Handle
- END IF
- NEXT
- END CHOOSE
- END IF
- end event
|