$PBExportHeader$w_rp_item_sub_mx.srw forward global type w_rp_item_sub_mx from w_publ_easyq end type type ddlb_1 from dropdownlistbox within w_rp_item_sub_mx end type type ddlb_2 from dropdownlistbox within w_rp_item_sub_mx end type type ddlb_3 from dropdownlistbox within w_rp_item_sub_mx end type type st_2 from statictext within w_rp_item_sub_mx end type type cbx_1 from checkbox within w_rp_item_sub_mx end type end forward global type w_rp_item_sub_mx from w_publ_easyq boolean TitleBar=true string Title="项目科目明细帐" long BackColor=81324524 ddlb_1 ddlb_1 ddlb_2 ddlb_2 ddlb_3 ddlb_3 st_2 st_2 cbx_1 cbx_1 end type global w_rp_item_sub_mx w_rp_item_sub_mx on w_rp_item_sub_mx.create int iCurrent call super::create this.ddlb_1=create ddlb_1 this.ddlb_2=create ddlb_2 this.ddlb_3=create ddlb_3 this.st_2=create st_2 this.cbx_1=create cbx_1 iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.ddlb_1 this.Control[iCurrent+2]=this.ddlb_2 this.Control[iCurrent+3]=this.ddlb_3 this.Control[iCurrent+4]=this.st_2 this.Control[iCurrent+5]=this.cbx_1 end on on w_rp_item_sub_mx.destroy call super::destroy destroy(this.ddlb_1) destroy(this.ddlb_2) destroy(this.ddlb_3) destroy(this.st_2) destroy(this.cbx_1) end on event open;THIS.TriggerEvent('ue_before_open') wf_movetocenter() dw_1.SetTransObject (sqlca) dw_1.titleclick_sort_use = FALSE IF Trim(dw_1.DataObject) <> '' THEN dw_1.Object.DataWindow.Print.MARGIN.Top = Integer(ProfileString(sys_inifilename,dw_1.DataObject, "MARGIN_TOP", "110")) dw_1.Object.DataWindow.Print.MARGIN.Left = Integer(ProfileString(sys_inifilename,dw_1.DataObject, "MARGIN_LEFT", "96" )) dw_1.Object.DataWindow.Print.MARGIN.bottom = Integer(ProfileString(sys_inifilename,dw_1.DataObject, "MARGIN_BOTTOM", "110")) dw_1.Object.DataWindow.Print.MARGIN.Right = Integer(ProfileString(sys_inifilename,dw_1.DataObject, "MARGIN_RIGHT", "96" )) END IF String ls_subname,ins_subname String ls_subid,ins_subid DECLARE sub_cur CURSOR FOR SELECT DISTINCT cw_subject.subid, cw_subject.name FROM cw_subject,uv_dept_bala WHERE uv_dept_bala.accsetid = cw_subject.accsetid AND uv_dept_bala.subid = cw_subject.subid AND uv_dept_bala.accsetid = :sys_accsetid AND uv_dept_bala.itemid <> 0 Order By cw_subject.subid Asc ; OPEN sub_cur; FETCH sub_cur INTO :ls_subid,:ls_subname; ins_subid = ls_subid ins_subname = ls_subname DO WHILE sqlca.SQLCode = 0 ddlb_3.AddItem('['+String(ls_subid)+']' + ls_subname) FETCH sub_cur INTO :ls_subid,:ls_subname; LOOP ddlb_3.Text = '['+String(ins_subid)+']' + ins_subname CLOSE sub_cur; cb_1.triggerevent(clicked!) end event type cb_exit from w_publ_easyq`cb_exit within w_rp_item_sub_mx int X=1125 end type type cb_2 from w_publ_easyq`cb_2 within w_rp_item_sub_mx int X=960 boolean BringToTop=true end type type cb_psetup from w_publ_easyq`cb_psetup within w_rp_item_sub_mx int X=695 boolean BringToTop=true end type type cb_1 from w_publ_easyq`cb_1 within w_rp_item_sub_mx boolean BringToTop=true end type event cb_1::clicked;call super::clicked;long ls_firstcmon,ls_lastmon string ls_subid int ls_postflag if cbx_1.checked then ls_postflag=1 else ls_postflag = -1 end if ls_firstcmon=long(em_1.text) * 100 + long(ddlb_1.text) ls_lastmon=long(em_1.text) * 100 + long(ddlb_2.text) ls_subid=Mid (ddlb_3.text,pos(ddlb_3.text,'[') + 1,pos(ddlb_3.text,']') - 2 ) dw_1.retrieve(sys_accsetid,ls_subid,ls_firstcmon,ls_lastmon,ls_postflag) if dw_1.rowcount()<=0 then return dec m_balc long i,ls_itemid for i=1 to dw_1.rowcount() if dw_1.object.dw_sort[i]=0 then ls_itemid=dw_1.object.itemid[i] m_balc=f_rst_item_sub_bbalc(ls_itemid,ls_subid,ls_firstcmon,ls_postflag) dw_1.object.balc[i]=m_balc elseif dw_1.object.dw_sort[i]=1 then dw_1.object.balc[i]=dw_1.object.debit[i] - dw_1.object.credit[i] + m_balc m_balc=dw_1.object.balc[i] elseif dw_1.object.dw_sort[i]=2 then dw_1.object.balc[i]=m_balc end if next end event type st_3 from w_publ_easyq`st_3 within w_rp_item_sub_mx int X=9 int Y=164 int Width=288 boolean BringToTop=true string Text="会计年度:" end type type st_4 from w_publ_easyq`st_4 within w_rp_item_sub_mx int X=1015 int Y=164 int Width=78 boolean BringToTop=true string Text="至" end type type em_1 from w_publ_easyq`em_1 within w_rp_item_sub_mx int X=288 int Width=219 boolean BringToTop=true string Mask="yyyy" end type event em_1::constructor;this.text=left(string(sys_curyearmon),4) end event type em_2 from w_publ_easyq`em_2 within w_rp_item_sub_mx int X=1559 int Y=300 boolean BringToTop=true end type type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_item_sub_mx int X=1536 end type type cbx_yl from w_publ_easyq`cbx_yl within w_rp_item_sub_mx int X=1326 boolean BringToTop=true end type type dw_1 from w_publ_easyq`dw_1 within w_rp_item_sub_mx int Width=2455 boolean BringToTop=true string DataObject="dw_rp_item_sub_mx" end type event dw_1::doubleclicked;Long ll_row Long ll_credid ll_row = THIS.GetRow() IF ll_row <= 0 THEN RETURN ll_credid = THIS.Object.credid[ll_row] IF ll_credid <= 0 THEN RETURN s_edit_index_tran s_tran //翻页功能窗口 传递参数使用 s_tran.if_retrieve_all = TRUE //是否一次RETRIEVE所有行 s_tran.work_mode = 0 //0-单纯编辑模式, 1-选择模式 s_tran.arg_pkid = 0 //目标定位PKID (备用) s_tran.arg_string_code = '' //查询列部分内容,用于初步筛选 s_tran.e_long = ll_credid OpenWithParm(w_credence_edit,s_tran) end event type ddlb_1 from dropdownlistbox within w_rp_item_sub_mx int X=773 int Y=148 int Width=229 int Height=908 int TabOrder=130 boolean BringToTop=true BorderStyle BorderStyle=StyleLowered! boolean Sorted=false boolean VScrollBar=true long TextColor=33554432 int TextSize=-9 int Weight=400 string FaceName="宋体" FontCharSet FontCharSet=GB2312CharSet! FontPitch FontPitch=Variable! string Item[]={"1",& "2",& "3",& "4",& "5",& "6",& "7",& "8",& "9",& "10",& "11",& "12"} end type event constructor;THIS.Text = String(s_sys_accset.currmon) end event event selectionchanged;cb_1.triggerevent(clicked!) end event type ddlb_2 from dropdownlistbox within w_rp_item_sub_mx int X=1143 int Y=148 int Width=229 int Height=908 int TabOrder=140 boolean BringToTop=true BorderStyle BorderStyle=StyleLowered! boolean Sorted=false boolean VScrollBar=true long TextColor=33554432 int TextSize=-9 int Weight=400 string FaceName="宋体" FontCharSet FontCharSet=GB2312CharSet! FontPitch FontPitch=Variable! string Item[]={"1",& "2",& "3",& "4",& "5",& "6",& "7",& "8",& "9",& "10",& "11",& "12"} end type event constructor;THIS.Text = String(s_sys_accset.currmon) end event event selectionchanged;IF Long(ddlb_2.Text) < Long(ddlb_1.Text) THEN ddlb_1.Text = ddlb_2.Text END IF cb_1.TriggerEvent(Clicked!) end event type ddlb_3 from dropdownlistbox within w_rp_item_sub_mx int X=1659 int Y=148 int Width=1125 int Height=1012 int TabOrder=40 boolean BringToTop=true BorderStyle BorderStyle=StyleLowered! boolean Sorted=false boolean VScrollBar=true long TextColor=33554432 int TextSize=-9 int Weight=400 string FaceName="宋体" FontCharSet FontCharSet=GB2312CharSet! FontPitch FontPitch=Variable! end type event selectionchanged;cb_1.triggerevent(clicked!) end event type st_2 from statictext within w_rp_item_sub_mx int X=1381 int Y=164 int Width=288 int Height=60 boolean Enabled=false string Text="会计科目:" Alignment Alignment=Right! boolean FocusRectangle=false long TextColor=33554432 long BackColor=67108864 int TextSize=-9 int Weight=400 string FaceName="宋体" FontCharSet FontCharSet=GB2312CharSet! FontPitch FontPitch=Variable! end type type cbx_1 from checkbox within w_rp_item_sub_mx int X=2825 int Y=164 int Width=466 int Height=76 boolean BringToTop=true string Text="包括未登帐凭证" BorderStyle BorderStyle=StyleLowered! long TextColor=33554432 long BackColor=67108864 int TextSize=-9 int Weight=400 string FaceName="宋体" FontCharSet FontCharSet=GB2312CharSet! FontPitch FontPitch=Variable! end type