$PBExportHeader$w_rp_mustpay_balc.srw forward global type w_rp_mustpay_balc from w_publ_easyq end type type cbx_1 from checkbox within w_rp_mustpay_balc end type type ddlb_2 from uo_ddlb_scid within w_rp_mustpay_balc end type type st_2 from statictext within w_rp_mustpay_balc end type type dw_spttype from u_dw_rbtnfilter within w_rp_mustpay_balc end type type ddlb_1 from dropdownlistbox within w_rp_mustpay_balc end type type st_1 from statictext within w_rp_mustpay_balc end type type ddlb_4 from dropdownlistbox within w_rp_mustpay_balc end type end forward global type w_rp_mustpay_balc from w_publ_easyq integer x = 9 integer y = 12 string title = "应付汇总表" cbx_1 cbx_1 ddlb_2 ddlb_2 st_2 st_2 dw_spttype dw_spttype ddlb_1 ddlb_1 st_1 st_1 ddlb_4 ddlb_4 end type global w_rp_mustpay_balc w_rp_mustpay_balc type variables long cur_scid long cur_scid_arr[] long ins_spttypeid long ins_moneyid = -1 end variables on w_rp_mustpay_balc.create int iCurrent call super::create this.cbx_1=create cbx_1 this.ddlb_2=create ddlb_2 this.st_2=create st_2 this.dw_spttype=create dw_spttype this.ddlb_1=create ddlb_1 this.st_1=create st_1 this.ddlb_4=create ddlb_4 iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.cbx_1 this.Control[iCurrent+2]=this.ddlb_2 this.Control[iCurrent+3]=this.st_2 this.Control[iCurrent+4]=this.dw_spttype this.Control[iCurrent+5]=this.ddlb_1 this.Control[iCurrent+6]=this.st_1 this.Control[iCurrent+7]=this.ddlb_4 end on on w_rp_mustpay_balc.destroy call super::destroy destroy(this.cbx_1) destroy(this.ddlb_2) destroy(this.st_2) destroy(this.dw_spttype) destroy(this.ddlb_1) destroy(this.st_1) destroy(this.ddlb_4) end on event resize;call super::resize;dw_spttype.height = dw_1.height end event event ue_before_openretrieve;call super::ue_before_openretrieve;dw_spttype.SetTransObject (sqlca) dw_spttype.Retrieve() end event event ue_before_open;IF sys_option_scid_msttake_mstpay = 1 THEN dw_1.DataObject = 'dw_rp_mustpay_balc' ELSE dw_1.DataObject = 'dw_rp_mustpay_balc_not_scid' END IF CALL Super :: ue_before_open; end event type cb_func from w_publ_easyq`cb_func within w_rp_mustpay_balc end type type cb_exit from w_publ_easyq`cb_exit within w_rp_mustpay_balc end type type cb_2 from w_publ_easyq`cb_2 within w_rp_mustpay_balc boolean bringtotop = true end type type cb_psetup from w_publ_easyq`cb_psetup within w_rp_mustpay_balc boolean bringtotop = true end type type cb_1 from w_publ_easyq`cb_1 within w_rp_mustpay_balc 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')) DELETE From u_parm_pay Where id = 1 ; IF sqlca.SQLCode <> 0 THEN MessageBox('错误','数据库操作失败!',stopsign!,ok!) ROLLBACK; RETURN END IF INSERT Into u_parm_pay (firstdate,enddate,id) Values (:firstdate,:enddate,1); IF sqlca.SQLCode <> 0 THEN MessageBox('错误','数据库操作失败!',stopsign!,ok!) ROLLBACK; RETURN END IF COMMIT; Int arg_flag IF cbx_1.Checked THEN arg_flag = 0 ELSE arg_flag = 1 END IF IF sys_option_scid_msttake_mstpay = 1 THEN dw_1.Retrieve(arg_flag,cur_scid_arr,sys_user_spttype,ins_spttypeid,ins_moneyid) ELSE dw_1.Retrieve(arg_flag,sys_user_spttype,ins_spttypeid,ins_moneyid) END IF dw_1.Object.dt_ar.Text = "日期范围: "+em_1.Text+" 到 "+em_2.Text end event type st_3 from w_publ_easyq`st_3 within w_rp_mustpay_balc integer x = 5 integer y = 324 integer width = 206 end type type st_4 from w_publ_easyq`st_4 within w_rp_mustpay_balc integer x = 722 integer y = 324 end type type em_1 from w_publ_easyq`em_1 within w_rp_mustpay_balc integer x = 210 integer y = 308 integer width = 393 alignment alignment = center! end type type em_2 from w_publ_easyq`em_2 within w_rp_mustpay_balc integer x = 827 integer y = 308 integer width = 393 alignment alignment = center! end type type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_mustpay_balc integer y = 8 end type type cbx_yl from w_publ_easyq`cbx_yl within w_rp_mustpay_balc integer y = 12 end type type dw_1 from w_publ_easyq`dw_1 within w_rp_mustpay_balc integer x = 800 integer y = 416 integer width = 2345 integer height = 1712 string dataobject = "dw_rp_mustpay_balc" end type type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_mustpay_balc end type type sle_cust from w_publ_easyq`sle_cust within w_rp_mustpay_balc end type type st_mtrl from w_publ_easyq`st_mtrl within w_rp_mustpay_balc end type type st_cust from w_publ_easyq`st_cust within w_rp_mustpay_balc end type type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_mustpay_balc boolean visible = true end type type pb_em1 from w_publ_easyq`pb_em1 within w_rp_mustpay_balc integer x = 617 integer y = 308 end type type pb_em2 from w_publ_easyq`pb_em2 within w_rp_mustpay_balc integer x = 1230 integer y = 308 end type type pb_2 from w_publ_easyq`pb_2 within w_rp_mustpay_balc integer x = 1344 integer y = 308 end type type cb_help from w_publ_easyq`cb_help within w_rp_mustpay_balc end type type cb_copyself from w_publ_easyq`cb_copyself within w_rp_mustpay_balc end type type gb_1 from w_publ_easyq`gb_1 within w_rp_mustpay_balc end type type ln_bar from w_publ_easyq`ln_bar within w_rp_mustpay_balc end type type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_mustpay_balc end type type r_bar from w_publ_easyq`r_bar within w_rp_mustpay_balc end type type ln_1 from w_publ_easyq`ln_1 within w_rp_mustpay_balc end type type ln_2 from w_publ_easyq`ln_2 within w_rp_mustpay_balc end type type ln_3 from w_publ_easyq`ln_3 within w_rp_mustpay_balc end type type ln_4 from w_publ_easyq`ln_4 within w_rp_mustpay_balc end type type cbx_1 from checkbox within w_rp_mustpay_balc integer x = 1371 integer y = 196 integer width = 631 integer height = 76 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 16711680 long backcolor = 134217739 string text = "不显示无交易的供应商" boolean checked = true end type type ddlb_2 from uo_ddlb_scid within w_rp_mustpay_balc integer x = 142 integer y = 192 integer width = 526 integer height = 768 integer taborder = 60 boolean bringtotop = true end type event constructor;call super::constructor;THIS.Enabled = (sys_option_scid_msttake_mstpay = 1) cur_scid_arr = THIS.uo_scid_arr end event event selectionchanged;call super::selectionchanged;cur_scid_arr = THIS.uo_scid_arr cb_1.TriggerEvent(Clicked!) end event type st_2 from statictext within w_rp_mustpay_balc integer x = 5 integer y = 204 integer width = 133 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 dw_spttype from u_dw_rbtnfilter within w_rp_mustpay_balc integer y = 416 integer width = 791 integer height = 1656 integer taborder = 30 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 type ddlb_1 from dropdownlistbox within w_rp_mustpay_balc integer x = 887 integer y = 192 integer width = 462 integer height = 1592 integer taborder = 40 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 boolean sorted = false borderstyle borderstyle = stylelowered! end type event constructor;Long ll_moneyid,i String ls_name DECLARE getmx CURSOR FOR SELECT moneyid,Name FROM cw_currency Order By moneyid ; OPEN getmx; DO WHILE sqlca.SQLCode = 0 FETCH getmx INTO :ll_moneyid,:ls_name ; IF sqlca.SQLCode <> 0 THEN EXIT THIS.AddItem(ls_name+Fill(' ',50)+'['+String(ll_moneyid)+']') i++ if i=1 then this.text=ls_name+Fill(' ',50)+'['+String(ll_moneyid)+']' ins_moneyid=ll_moneyid end if LOOP CLOSE getmx; THIS.AddItem('全部'+Fill(' ',50)+'['+String(-1)+']') end event event selectionchanged; ins_moneyid=Long(Mid ( THIS.Text,Pos(THIS.Text,'[') + 1,Len(THIS.Text) - Pos(THIS.Text,'[') - 1 )) cb_1.triggerevent(clicked!) end event type st_1 from statictext within w_rp_mustpay_balc integer x = 741 integer y = 204 integer width = 128 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 ddlb_4 from dropdownlistbox within w_rp_mustpay_balc integer x = 1961 integer y = 48 integer width = 645 integer height = 448 integer taborder = 110 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 string text = "汇总统计" boolean sorted = false boolean vscrollbar = true string item[] = {"汇总统计","分项目统计","分类统计"} borderstyle borderstyle = stylelowered! end type event selectionchanged;IF this.Text <> '分项目统计' THEN dw_1.uf_save_profile_layout() END IF IF sys_option_scid_msttake_mstpay = 1 THEN IF THIS.Text = '汇总统计' THEN dw_1.DataObject = 'dw_rp_mustpay_balc' ELSEIF THIS.Text = '分项目统计' THEN dw_1.DataObject = 'dw_rp_mustpay_balc_2' ELSE //分类统计 dw_1.DataObject = 'dw_rp_mustpay_balc_3' END IF ELSE IF THIS.Text = '汇总统计' THEN dw_1.DataObject = 'dw_rp_mustpay_balc_not_scid' ELSEIF THIS.Text = '分项目统计' THEN dw_1.DataObject = 'dw_rp_mustpay_balc_2_not_scid' ELSE //分类统计 dw_1.DataObject = 'dw_rp_mustpay_balc_3_not_scid' END IF END IF dw_1.SetTransObject(sqlca) IF this.Text <> '分项目统计' THEN 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() END IF cb_1.TriggerEvent(Clicked!) end event