$PBExportHeader$w_rp_sptbalc_bill.srw forward global type w_rp_sptbalc_bill from w_publ_easyq end type type ddlb_1 from uo_ddlb_moneyid within w_rp_sptbalc_bill end type type st_1 from statictext within w_rp_sptbalc_bill end type type cbx_ifmsttake from checkbox within w_rp_sptbalc_bill end type type cbx_type from checkbox within w_rp_sptbalc_bill end type type dw_spttype from u_dw_rbtnfilter within w_rp_sptbalc_bill end type end forward global type w_rp_sptbalc_bill from w_publ_easyq integer x = 9 integer y = 12 string title = "供应商未对数单据统计表" ddlb_1 ddlb_1 st_1 st_1 cbx_ifmsttake cbx_ifmsttake cbx_type cbx_type dw_spttype dw_spttype end type global w_rp_sptbalc_bill w_rp_sptbalc_bill type variables long ins_spttypeid Long cur_moneyid = -1 end variables on w_rp_sptbalc_bill.create int iCurrent call super::create this.ddlb_1=create ddlb_1 this.st_1=create st_1 this.cbx_ifmsttake=create cbx_ifmsttake this.cbx_type=create cbx_type this.dw_spttype=create dw_spttype iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.ddlb_1 this.Control[iCurrent+2]=this.st_1 this.Control[iCurrent+3]=this.cbx_ifmsttake this.Control[iCurrent+4]=this.cbx_type this.Control[iCurrent+5]=this.dw_spttype end on on w_rp_sptbalc_bill.destroy call super::destroy destroy(this.ddlb_1) destroy(this.st_1) destroy(this.cbx_ifmsttake) destroy(this.cbx_type) destroy(this.dw_spttype) end on event open;call super::open;em_1.Text = String(Today(),'yyyy-mm')+'-01' Int ifcusgroup ifcusgroup = Integer(f_ProfileString (sys_empid,'dw_rp_sptbalc_bill', "ifcusgroup", '0')) IF ifcusgroup = 0 THEN dw_1.DataObject = 'dw_rp_sptbalc_bill' ELSE dw_1.DataObject = 'dw_rp_sptbalc_bill_cus' END IF dw_spttype.SetTransObject(sqlca) dw_1.SetTransObject(sqlca) dw_spttype.retrieve() dw_1.ins_INIfile_name = sys_inifilename dw_1.ins_opemp = publ_operator dw_1.cardw_empid = sys_empid dw_1.cur_DataObject = dw_1.DataObject dw_1.uf_read_profile_layout() f_title_change(dw_1) IF cbx_loginretr.Checked THEN cb_1.TriggerEvent(Clicked!) END IF end event event ue_before_open;call super::ue_before_open;if_ue_retr=true if_ue_filter=true if_ue_sort=true if_ue_sentdataout=true end event event resize;call super::resize;dw_spttype.Height = dw_1.Height end event type cb_func from w_publ_easyq`cb_func within w_rp_sptbalc_bill end type type cb_exit from w_publ_easyq`cb_exit within w_rp_sptbalc_bill end type type cb_2 from w_publ_easyq`cb_2 within w_rp_sptbalc_bill boolean bringtotop = true end type type cb_psetup from w_publ_easyq`cb_psetup within w_rp_sptbalc_bill boolean bringtotop = true end type type cb_1 from w_publ_easyq`cb_1 within w_rp_sptbalc_bill boolean bringtotop = true end type event cb_1::clicked;call super::clicked;DateTime firstdate,enddate firstdate = DateTime(Date(em_1.Text),Time(0)) enddate = DateTime(Date(em_2.Text),Time('23:59:59')) Int li_ifmsttake IF cbx_ifmsttake.Checked THEN li_ifmsttake = 1 ELSE li_ifmsttake = 0 END IF dw_1.Retrieve(ins_spttypeid,cur_moneyid,firstdate,enddate,li_ifmsttake) end event type st_3 from w_publ_easyq`st_3 within w_rp_sptbalc_bill integer x = 23 integer y = 320 boolean enabled = true end type type st_4 from w_publ_easyq`st_4 within w_rp_sptbalc_bill integer x = 750 integer y = 320 boolean enabled = true end type type em_1 from w_publ_easyq`em_1 within w_rp_sptbalc_bill integer x = 224 integer y = 304 end type type em_2 from w_publ_easyq`em_2 within w_rp_sptbalc_bill integer x = 855 integer y = 304 end type type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_sptbalc_bill integer x = 1541 end type type cbx_yl from w_publ_easyq`cbx_yl within w_rp_sptbalc_bill end type type dw_1 from w_publ_easyq`dw_1 within w_rp_sptbalc_bill integer x = 850 integer width = 2706 integer height = 1680 string dataobject = "dw_rp_sptbalc_bill" end type type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_sptbalc_bill integer y = 464 end type type sle_cust from w_publ_easyq`sle_cust within w_rp_sptbalc_bill integer y = 464 end type type st_mtrl from w_publ_easyq`st_mtrl within w_rp_sptbalc_bill integer y = 480 end type type st_cust from w_publ_easyq`st_cust within w_rp_sptbalc_bill integer y = 480 end type type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_sptbalc_bill boolean visible = true end type type pb_em1 from w_publ_easyq`pb_em1 within w_rp_sptbalc_bill integer x = 645 integer y = 304 end type type pb_em2 from w_publ_easyq`pb_em2 within w_rp_sptbalc_bill integer x = 1275 integer y = 304 end type type pb_2 from w_publ_easyq`pb_2 within w_rp_sptbalc_bill integer x = 1385 integer y = 304 end type type cb_help from w_publ_easyq`cb_help within w_rp_sptbalc_bill end type type cb_copyself from w_publ_easyq`cb_copyself within w_rp_sptbalc_bill end type type gb_1 from w_publ_easyq`gb_1 within w_rp_sptbalc_bill integer x = 1019 integer y = 416 integer width = 1659 end type type ln_bar from w_publ_easyq`ln_bar within w_rp_sptbalc_bill end type type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_sptbalc_bill end type type r_bar from w_publ_easyq`r_bar within w_rp_sptbalc_bill end type type ln_1 from w_publ_easyq`ln_1 within w_rp_sptbalc_bill end type type ln_2 from w_publ_easyq`ln_2 within w_rp_sptbalc_bill end type type ln_3 from w_publ_easyq`ln_3 within w_rp_sptbalc_bill end type type ln_4 from w_publ_easyq`ln_4 within w_rp_sptbalc_bill end type type ddlb_1 from uo_ddlb_moneyid within w_rp_sptbalc_bill integer x = 178 integer y = 192 integer width = 571 integer height = 772 integer taborder = 30 boolean bringtotop = true end type event constructor;call super::constructor;cur_moneyid = THIS.uo_moneyid end event event selectionchanged;call super::selectionchanged;cur_moneyid = THIS.uo_moneyid cb_1.TriggerEvent(Clicked!) end event type st_1 from statictext within w_rp_sptbalc_bill integer x = 32 integer y = 208 integer width = 142 integer height = 48 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "币种" boolean focusrectangle = false end type type cbx_ifmsttake from checkbox within w_rp_sptbalc_bill integer x = 777 integer y = 200 integer width = 521 integer height = 60 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "只显示应付未对单" boolean checked = true end type event clicked;Int ifmsttake IF THIS.Checked THEN ifmsttake = 1 ELSE ifmsttake = 0 END IF f_SetProfileString (sys_empid,dw_1.DataObject, "ifmsttake", String(ifmsttake)) cb_1.triggerevent(clicked!) end event event constructor;Int ifmsttake ifmsttake = Integer(f_ProfileString (sys_empid,dw_1.DataObject, "ifmsttake", '0')) IF ifmsttake = 0 THEN THIS.Checked = FALSE ELSE THIS.Checked = TRUE END IF end event type cbx_type from checkbox within w_rp_sptbalc_bill integer x = 1440 integer y = 200 integer width = 521 integer height = 60 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "按供应商分组小计" end type event clicked;int ifcusgroup dw_1.uf_save_profile_layout() IF THIS.Checked THEN dw_1.DataObject = 'dw_rp_sptbalc_bill_2' ifcusgroup = 1 ELSE dw_1.DataObject = 'dw_rp_sptbalc_bill' ifcusgroup = 0 END IF dw_1.SetTransObject(sqlca) dw_1.ins_INIfile_name = sys_inifilename dw_1.ins_opemp = publ_operator dw_1.cardw_empid = sys_empid dw_1.cur_DataObject = dw_1.DataObject dw_1.uf_read_profile_layout() f_title_change(dw_1) f_SetProfileString (sys_empid,'w_rp_cusbalc_bill', "ifcusgroup", String(ifcusgroup)) cb_1.TriggerEvent(Clicked!) end event event constructor;Int ifcusgroup ifcusgroup = Integer(f_ProfileString (sys_empid,'w_rp_cusbalc_bill', "ifcusgroup", '0')) IF ifcusgroup = 0 THEN THIS.Checked = FALSE ELSE THIS.Checked = TRUE END IF end event type dw_spttype from u_dw_rbtnfilter within w_rp_sptbalc_bill integer y = 416 integer width = 841 integer height = 1656 integer taborder = 90 boolean bringtotop = true string dataobject = "dw_spttype_index" end type event rowfocuschanged;call super::rowfocuschanged;IF currentrow <=0 THEN RETURN this.selectrow(0,false) this.selectrow(currentrow,true) IF dw_spttype.GetRow() <= 0 THEN ins_spttypeid = 0 ELSE ins_spttypeid = dw_spttype.Object.spttypeid[dw_spttype.GetRow()] END IF cb_1.triggerevent(clicked!) end event