$PBExportHeader$w_rp_sc_taskwork.srw forward global type w_rp_sc_taskwork from w_publ_easyq end type type ddlb_1 from dropdownlistbox within w_rp_sc_taskwork end type type ddlb_type from dropdownlistbox within w_rp_sc_taskwork end type type em_mth from editmask within w_rp_sc_taskwork end type type st_1 from statictext within w_rp_sc_taskwork end type type cbx_1 from checkbox within w_rp_sc_taskwork end type end forward global type w_rp_sc_taskwork from w_publ_easyq string title = "产品个人工序计件单统计表" ddlb_1 ddlb_1 ddlb_type ddlb_type em_mth em_mth st_1 st_1 cbx_1 cbx_1 end type global w_rp_sc_taskwork w_rp_sc_taskwork type variables int il_type = 0 int cur_flag = -1 end variables on w_rp_sc_taskwork.create int iCurrent call super::create this.ddlb_1=create ddlb_1 this.ddlb_type=create ddlb_type this.em_mth=create em_mth this.st_1=create st_1 this.cbx_1=create cbx_1 iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.ddlb_1 this.Control[iCurrent+2]=this.ddlb_type this.Control[iCurrent+3]=this.em_mth this.Control[iCurrent+4]=this.st_1 this.Control[iCurrent+5]=this.cbx_1 end on on w_rp_sc_taskwork.destroy call super::destroy destroy(this.ddlb_1) destroy(this.ddlb_type) destroy(this.em_mth) destroy(this.st_1) destroy(this.cbx_1) end on event open;call super::open;//EM_1.TEXT=string(today(),'yyyy-mm')+'-01' //IF cbx_loginretr.Checked THEN // cb_1.TriggerEvent(Clicked!) //END IF end event event ue_before_open;call super::ue_before_open;if_ue_filter=true if_ue_sort=true if_ue_sentdataout=true wf_replacedw() end event event ue_before_openretrieve;call super::ue_before_openretrieve;EM_1.TEXT=string(today(),'yyyy-mm')+'-01' end event event close;call super::close;f_SetProfileString(SYS_empid, this.classname(), "cur_flag", string(cur_flag)) end event type cb_func from w_publ_easyq`cb_func within w_rp_sc_taskwork end type type cb_exit from w_publ_easyq`cb_exit within w_rp_sc_taskwork end type type cb_2 from w_publ_easyq`cb_2 within w_rp_sc_taskwork end type type cb_psetup from w_publ_easyq`cb_psetup within w_rp_sc_taskwork end type type cb_1 from w_publ_easyq`cb_1 within w_rp_sc_taskwork end type event cb_1::clicked;call super::clicked;Long ll_mth DateTime firstdate ,enddate firstdate = DateTime(Date(em_1.Text),Time(0)) enddate = DateTime(Date(em_2.Text),Time('23:59:59')) ll_mth = Long(em_mth.Text) IF dw_1.DataObject = 'dw_rp_sc_taskwork' THEN dw_1.Retrieve(ll_mth,il_type,firstdate,enddate) ELSE dw_1.Retrieve(ll_mth,il_type,firstdate,enddate,cur_flag) END IF end event type st_3 from w_publ_easyq`st_3 within w_rp_sc_taskwork integer x = 923 end type type st_4 from w_publ_easyq`st_4 within w_rp_sc_taskwork integer x = 1632 end type type em_1 from w_publ_easyq`em_1 within w_rp_sc_taskwork integer x = 1125 boolean enabled = false end type type em_2 from w_publ_easyq`em_2 within w_rp_sc_taskwork integer x = 1737 boolean enabled = false end type type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_sc_taskwork integer y = 12 end type type cbx_yl from w_publ_easyq`cbx_yl within w_rp_sc_taskwork integer y = 16 end type type dw_1 from w_publ_easyq`dw_1 within w_rp_sc_taskwork integer y = 304 string dataobject = "dw_rp_sc_taskwork" end type event dw_1::doubleclicked;call super::doubleclicked;IF dw_1.DataObject = 'dw_rp_sc_taskwork' THEN IF row > 0 THEN String ls_code Long ll_scid ll_scid = THIS.Object.u_sc_taskwork_scid[row] ls_code = THIS.Object.u_sc_taskwork_billcode[row] //f_open_win(ll_scid,ls_code) END IF END IF end event type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_sc_taskwork integer x = 1650 integer y = 480 end type type sle_cust from w_publ_easyq`sle_cust within w_rp_sc_taskwork integer x = 1637 integer y = 596 end type type st_mtrl from w_publ_easyq`st_mtrl within w_rp_sc_taskwork integer x = 1193 integer y = 496 end type type st_cust from w_publ_easyq`st_cust within w_rp_sc_taskwork integer x = 1175 integer y = 612 end type type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_sc_taskwork boolean visible = true end type type pb_em1 from w_publ_easyq`pb_em1 within w_rp_sc_taskwork integer x = 1541 boolean enabled = false end type type pb_em2 from w_publ_easyq`pb_em2 within w_rp_sc_taskwork integer x = 2153 boolean enabled = false end type type pb_2 from w_publ_easyq`pb_2 within w_rp_sc_taskwork integer x = 2263 boolean enabled = false end type type cb_help from w_publ_easyq`cb_help within w_rp_sc_taskwork end type type cb_copyself from w_publ_easyq`cb_copyself within w_rp_sc_taskwork end type type gb_1 from w_publ_easyq`gb_1 within w_rp_sc_taskwork end type type ln_bar from w_publ_easyq`ln_bar within w_rp_sc_taskwork end type type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_sc_taskwork end type type r_bar from w_publ_easyq`r_bar within w_rp_sc_taskwork end type type ln_1 from w_publ_easyq`ln_1 within w_rp_sc_taskwork end type type ln_2 from w_publ_easyq`ln_2 within w_rp_sc_taskwork end type type ln_3 from w_publ_easyq`ln_3 within w_rp_sc_taskwork boolean visible = false end type type ln_4 from w_publ_easyq`ln_4 within w_rp_sc_taskwork boolean visible = false end type type ddlb_1 from dropdownlistbox within w_rp_sc_taskwork integer x = 1810 integer y = 12 integer width = 923 integer height = 452 integer taborder = 120 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[] = {"明细表","汇总表[员工]","汇总表2[员工]","汇总表[产品]","汇总表[员工数量]","汇总表[员工工序数量]"} borderstyle borderstyle = stylelowered! end type event selectionchanged;dw_1.uf_save_profile_layout() IF ddlb_1.Text = '明细表' THEN dw_1.DataObject = 'dw_rp_sc_taskwork' ELSEIF ddlb_1.Text = '汇总表[员工]' THEN dw_1.DataObject = 'dw_rp_sc_taskwork_hz1' ELSEIF ddlb_1.Text = '汇总表2[员工]' THEN dw_1.DataObject = 'dw_rp_sc_taskwork_hz4' ELSEIF ddlb_1.Text = '汇总表[产品]' THEN dw_1.DataObject = 'dw_rp_sc_taskwork_hz2' ELSEIF ddlb_1.Text = '汇总表[员工数量]' THEN dw_1.DataObject = 'dw_rp_sc_taskwork_hz3' ELSEIF ddlb_1.Text = '汇总表[员工工序数量]' THEN dw_1.DataObject = 'dw_rp_sc_taskwork_hz5' END IF wf_replacedw() cb_1.TriggerEvent(Clicked!) end event type ddlb_type from dropdownlistbox within w_rp_sc_taskwork integer x = 9 integer y = 192 integer width = 393 integer height = 300 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 string item[] = {"按工资月份","按单据日期"} borderstyle borderstyle = stylelowered! end type event selectionchanged;IF THIS.Text = '按工资月份' THEN em_mth.enabled = TRUE pb_2.enabled = FALSE pb_em1.enabled = FALSE pb_em2.enabled = FALSE em_1.enabled = FALSE em_2.enabled = FALSE il_type = 0 ELSEIF THIS.Text = '按单据日期' THEN em_mth.enabled = FALSE pb_2.enabled = TRUE pb_em1.enabled = TRUE pb_em2.enabled = TRUE em_1.enabled = TRUE em_2.enabled = TRUE il_type = 1 END IF SetProfileString (sys_inifilename,'w_gz_rp_taskworkmx', "il_type", String(il_type)) cb_1.triggerevent(clicked!) end event event constructor;il_type = Integer(ProfileString (sys_inifilename,'w_gz_rp_taskworkmx', "il_type", '0')) IF il_type = 0 THEN em_mth.Enabled = TRUE pb_2.Enabled = FALSE pb_em1.Enabled = FALSE pb_em2.Enabled = FALSE em_1.Enabled = FALSE em_2.Enabled = FALSE this.text = '按工资月份' ELSE em_mth.Enabled = FALSE pb_2.Enabled = TRUE pb_em1.Enabled = TRUE pb_em2.Enabled = TRUE em_1.Enabled = TRUE em_2.Enabled = TRUE this.text = '按单据日期' END IF end event type em_mth from editmask within w_rp_sc_taskwork integer x = 571 integer y = 192 integer width = 329 integer height = 88 integer taborder = 120 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 string text = "none" alignment alignment = center! borderstyle borderstyle = stylelowered! maskdatatype maskdatatype = datemask! string mask = "yyyymm" boolean spin = true end type event constructor;em_mth.Text = String(Today(),'yyyymm') end event type st_1 from statictext within w_rp_sc_taskwork integer x = 416 integer y = 212 integer width = 146 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 = "月份:" alignment alignment = right! boolean focusrectangle = false end type type cbx_1 from checkbox within w_rp_sc_taskwork integer x = 2427 integer y = 196 integer width = 521 integer height = 92 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 constructor;cur_flag = Long(f_ProfileString(SYS_empid, parent.classname(), "cur_flag", "-1")) IF cur_flag = 1 THEN THIS.CHECKED = TRUE ELSE THIS.CHECKED = FALSE END IF end event event clicked;IF THIS.CHECKED = TRUE THEN cur_flag = 1 ELSE cur_flag = -1 END IF cb_1.TriggerEvent(Clicked!) end event