$PBExportHeader$w_label_price.srw forward global type w_label_price from w_publ_base end type type st_421 from statictext within w_label_price end type type em_mth from editmask within w_label_price end type type sle_dscrp_pe from singlelineedit within w_label_price end type type cbx_hl_bz from checkbox within w_label_price end type type cb_dealwagemx from uo_imflatbutton within w_label_price end type type cb_auditing from uo_imflatbutton within w_label_price end type type cb_wagerpt from uo_imflatbutton within w_label_price end type type cb_addemp from uo_imflatbutton within w_label_price end type type ddlb_scid from uo_ddlb_scid within w_label_price end type type cb_delemp from uo_imflatbutton within w_label_price end type type cb_retrieve from uo_imflatbutton within w_label_price end type type cb_cancel from uo_imflatbutton within w_label_price end type type cb_wage_edit from uo_imflatbutton within w_label_price end type type cb_fillbz from uo_imflatbutton within w_label_price end type type cb_help from uo_imflatbutton within w_label_price end type type cb_other from uo_imflatbutton within w_label_price end type type cb_pay from uo_imflatbutton within w_label_price end type type cb_3 from uo_imflatbutton within w_label_price end type type cb_4 from uo_imflatbutton within w_label_price end type type cb_save from uo_imflatbutton within w_label_price end type type cb_5 from uo_imflatbutton within w_label_price end type type cb_2 from uo_imflatbutton within w_label_price end type type dw_child from u_dw_rbtnfilter within w_label_price end type type cb_7 from uo_imflatbutton within w_label_price end type type cb_8 from uo_imflatbutton within w_label_price end type type r_bar from rectangle within w_label_price end type type ln_bar from line within w_label_price end type type ln_bar2 from line within w_label_price end type type ln_1 from line within w_label_price end type type ln_2 from line within w_label_price end type end forward global type w_label_price from w_publ_base integer x = 46 integer y = 48 integer width = 6825 integer height = 2460 string title = "打印标签" boolean maxbox = true boolean resizable = true windowtype windowtype = main! windowstate windowstate = maximized! boolean if_ue_filter = true boolean if_ue_sort = true boolean if_ue_sentdataout = true event ue_basepay ( ) event ue_view_gzb ( ) event ue_f8 ( ) event ue_viewprint ( ) event ue_print ( ) st_421 st_421 em_mth em_mth sle_dscrp_pe sle_dscrp_pe cbx_hl_bz cbx_hl_bz cb_dealwagemx cb_dealwagemx cb_auditing cb_auditing cb_wagerpt cb_wagerpt cb_addemp cb_addemp ddlb_scid ddlb_scid cb_delemp cb_delemp cb_retrieve cb_retrieve cb_cancel cb_cancel cb_wage_edit cb_wage_edit cb_fillbz cb_fillbz cb_help cb_help cb_other cb_other cb_pay cb_pay cb_3 cb_3 cb_4 cb_4 cb_save cb_save cb_5 cb_5 cb_2 cb_2 dw_child dw_child cb_7 cb_7 cb_8 cb_8 r_bar r_bar ln_bar ln_bar ln_bar2 ln_bar2 ln_1 ln_1 ln_2 ln_2 end type global w_label_price w_label_price type prototypes end prototypes type variables datastore ds_wageitem datastore ds_print String ls_handtype = '' long cur_typeid=0 Long cur_scid Long cur_scid_arr[] Boolean if_power_sendout = true Boolean if_power_print = true long cur_wagemth long ll_currentrow//当前行 long ll_VerticalScroll//垂直滚动条位置 long ll_s_itemid,ll_d_itemid Int child_column_int = 1,uc_column_int = 1 datastore ds_copypaste String ls_newname = '' string ls_chnname = '' Long ll_prownum Long ls_powerid Int li_auditprint String ls_rpname = '' Long ls_msgprintid_rpt = 0 Long ll_xls_billid,ll_xls_Templatesid String ls_xls_DefaultDataWindow Long dw_pageretr_w,dw_pageretr_h Long dw_child_h,dw_child_w datastore ds_copy_bill String ins_openfile_log[] //用于退出后删除 Long ins_openfile_log_p = 0 //用于退出后删除 Boolean if_changeselect = TRUE Boolean if_del = FALSE Long ll_lastrow = 0 String is_query_menustr,is_mx_menustr long uc_width,uc_height string cur_mod[] BOOLEAN if_MtrlPicView = false int ifpic = 0 end variables forward prototypes public function integer wf_retr_wageitem () public function long wf_getwageitemid (string arg_wagename) public subroutine wf_lock_child () public subroutine clickedd (long arg_handle) public function integer dats_in_month (long year, long month) public subroutine wf_reads () public subroutine if_change () public subroutine wf_save () end prototypes event ue_basepay();IF NOT f_power_ind(1457) THEN MessageBox('提示','你没有使用权限!', Information!, OK! ) RETURN END IF s_wageeditw_open s_wageedit_tran s_wageedit_tran.handtype = ls_handtype s_wageedit_tran.scid_arr = cur_scid_arr s_wageedit_tran.scid = cur_scid OpenWithParm(w_gz_wage_basepay_edit,s_wageedit_tran) end event event ue_view_gzb;f_sys_main(706) end event event ue_f8();//用于选择明细内容,被f8[默认]\dw_child.doubleclicked调用 Long child_row Long ls_cusid,ll_moneyid,ls_j,i child_row = dw_child.GetRow() IF Not IsValid(w_mtrlware_storageid_ch_saletask) THEN s_edit_index_tran s_tranf8 //传递参数使用 s_tranf8.if_retrieve_all = True //是否一次retrieve所有行 s_tranf8.work_mode = 1 //0-单纯编辑模式 1-选择\编辑模式 s_tranf8.arg_pkid = 0 //目标定位pkid (备用) s_tranf8.arg_string_code = '' //查询列(物料编码)部分内容,用于初步筛选 s_tranf8.if_select_all = True //多选 s_tranf8.b_long = 0 //选产品 // s_tranf8.c_long = cur_scid //分部 s_tranf8.d_long = -1 //仓库 OpenWithParm(w_mtrlware_storageid_ch_label_price,s_tranf8) //调用 s_mtrldef_array s_inscust s_inscust = Message.PowerObjectParm //接受返回结构 FOR ls_j = 1 To UpperBound(s_inscust.mtrlid) IF s_inscust.mtrlid[ls_j] > 0 THEN //正常返回值则可以取以下值 dw_child.AcceptText() FOR i = 1 To dw_child.RowCount() IF dw_child.Object.mtrlid[i] = s_inscust.mtrlid[ls_j] THEN GOTO ext1 END IF NEXT IF dw_child.GetRow() > 0 THEN IF dw_child.Object.mtrlid[child_row] <> 0 THEN child_row = dw_child.InsertRow (0) ELSE child_row = dw_child.GetRow() END IF ELSE child_row = dw_child.InsertRow (0) END IF dw_child.Object.mtrlid[child_row] = s_inscust.mtrlid[ls_j] dw_child.Object.mtrlcode[child_row] = s_inscust.mtrlcode[ls_j] dw_child.Object.mtrlname[child_row] = s_inscust.mtrlname[ls_j] dw_child.Object.unit[child_row] = s_inscust.unit[ls_j] dw_child.Object.mtrlmode[child_row] = s_inscust.mtrlmode[ls_j] dw_child.Object.mtrlsectype[child_row] = s_inscust.mtrlsectype[ls_j] dw_child.Object.zxmtrlmode[child_row] = s_inscust.zxmtrlmode[ls_j] dw_child.Object.dscrp[child_row] = s_inscust.dscrp[ls_j] dw_child.Object.lmsaleprice[child_row] = s_inscust.lmsaleprice[ls_j] END IF ext1: NEXT END IF dw_child.SetFocus() end event event ue_viewprint();Long ls_msgprintid ls_msgprintid = Message.LongParm SELECT dft_new_dwname,powerid,auditprint,prownum,ifpic,chnname INTO :ls_newname,:ls_powerid,:li_auditprint,:ll_prownum,:ifpic,:ls_chnname FROM sys_dft_dwprint_dynamic Where sys_dft_dwprint_dynamic.dwprintid = :ls_msgprintid USING sqlca; IF sqlca.SQLCode <> 0 THEN ls_newname = '' ls_powerid = 0 END IF S_print_MSG LS_PRMSG LS_PRMSG.ifpic = ifpic IF ls_newname <> '' THEN LS_PRMSG.obj_dwNAME = ls_newname ELSE END IF LS_PRMSG.TAG_TEXT = '标签打印' LS_PRMSG.FILTER_STRING = '' LS_PRMSG.retr_pram_falg = -1 LS_PRMSG.PAGECH_FLAG =1 // LS_PRMSG.retr_scid = dw_pageretr.Object.u_saletask_scid[dw_pageretr.GetRow()] // LS_PRMSG.retr_pramnmb = dw_pageretr.Object.taskid[LS_ROW] LS_PRMSG.rowcnt = dw_child.RowCount() OpenWithParm(w_publ_preview,LS_PRMSG) end event event ue_print();Long ls_msgprintid ls_msgprintid = Message.LongParm SELECT dft_new_dwname,powerid,ifpic,chnname INTO :ls_newname,:ls_powerid,:ifpic,:ls_chnname FROM sys_dft_dwprint_dynamic Where sys_dft_dwprint_dynamic.dwprintid = :ls_msgprintid USING sqlca; IF sqlca.SQLCode <> 0 THEN ls_newname = '' ls_powerid = 0 END IF uo_print_preview uo_print IF MessageBox ("询问","是否确定要打印当前单据吗?",Question!,YesNo! ) = 2 THEN RETURN S_print_MSG LS_PRMSG LS_PRMSG.retr_pram_falg = -1 IF ls_newname <> '' THEN LS_PRMSG.obj_dwNAME = ls_newname END IF LS_PRMSG.TAG_TEXT = '标签打印' LS_PRMSG.FILTER_STRING = '' LS_PRMSG.PAGECH_FLAG = 0 uo_print.FACT_PRINT_MSG = LS_PRMSG String arg_msg IF uo_print.uof_print_begin(arg_msg) = 0 THEN MessageBox("错误",arg_msg,stopsign!,OK!) RETURN END IF uo_print.ds_print() end event public function integer wf_retr_wageitem ();//wf_retr_wageitem long ls_s ds_wageitem.retrieve() //ddlb_wageitem.reset() //for ls_s=1 to ds_wageitem.rowcount() // ddlb_wageitem.ADDItem(ds_wageitem.object.wagename[ls_s]) //next return 0 end function public function long wf_getwageitemid (string arg_wagename);//wf_getwageitemid long ls_wageid=0,ls_i for ls_i=1 to ds_wageitem.rowcount() if ds_wageitem.object.wagename[ls_i]=arg_wagename then return ds_wageitem.object.wageid[ls_i] end if next return ls_wageid end function public subroutine wf_lock_child ();INT LS_INT end subroutine public subroutine clickedd (long arg_handle); end subroutine public function integer dats_in_month (long year, long month);//Most cases are straight forward in that there are a fixed number of //days in 11 of the 12 months. February is, of course, the problem. //In a leap year February has 29 days, otherwise 28. Integer li_DaysInMonth, li_Days[12] = {31,28,31,30,31,30,31,31,30,31,30,31} // Get the number of days per month for a non leap year. li_DaysInMonth = li_Days[Month] // Check for a leap year. If Month = 2 Then // If the year is a leap year, change the number of days. // Leap Year Calculation: // Year divisible by 4, but not by 100, unless it is also divisible by 400 If ( (Mod(Year,4) = 0 And Mod(Year,100) <> 0) Or (Mod(Year,400) = 0) ) Then li_DaysInMonth = 29 End If End If //Return the number of days in the relevant month Return li_DaysInMonth end function public subroutine wf_reads ();IF dw_child.RowCount() <= 0 THEN RETURN Long i,ll_cpid,ll_mth Decimal s_sreadings,s_ereadings,d_sreadings,d_ereadings FOR i = 1 To dw_child.RowCount() ll_cpid = Long(dw_child.Object.cpid[i]) ll_mth = Long(dw_child.Object.wagemth[i]) //水 SELECT sreadings,ereadings INTO :s_sreadings,:s_ereadings FROM u_prty_wagemx WHERE u_prty_wagemx.cpid = :ll_cpid AND u_prty_wagemx.Wagemth = :ll_mth And u_prty_wagemx.itemid = :ll_s_itemid Using sqlca; dw_child.Object.s_sreadings[i] = s_sreadings dw_child.Object.s_ereadings[i] = s_ereadings //电 SELECT sreadings,ereadings INTO :d_sreadings,:d_ereadings FROM u_prty_wagemx WHERE u_prty_wagemx.cpid = :ll_cpid AND u_prty_wagemx.Wagemth = :ll_mth And u_prty_wagemx.itemid = :ll_d_itemid Using sqlca; dw_child.Object.d_sreadings[i] = d_sreadings dw_child.Object.d_ereadings[i] = d_ereadings NEXT end subroutine public subroutine if_change ();IF dw_child.RowCount() <= 0 THEN RETURN Long i,ll_cpid,ll_mth Decimal s_sreadings,s_ereadings,d_sreadings,d_ereadings dw_child.AcceptText() FOR i = 1 To dw_child.RowCount() ll_cpid = Long(dw_child.Object.cpid[i]) ll_mth = Long(dw_child.Object.wagemth[i]) //水 SELECT sreadings,ereadings INTO :s_sreadings,:s_ereadings FROM u_prty_wagemx WHERE u_prty_wagemx.cpid = :ll_cpid AND u_prty_wagemx.Wagemth = :ll_mth And u_prty_wagemx.itemid = :ll_s_itemid Using sqlca; //电 SELECT sreadings,ereadings INTO :d_sreadings,:d_ereadings FROM u_prty_wagemx WHERE u_prty_wagemx.cpid = :ll_cpid AND u_prty_wagemx.Wagemth = :ll_mth And u_prty_wagemx.itemid = :ll_d_itemid Using sqlca; IF dw_child.Object.s_sreadings[i] <> s_sreadings Or & dw_child.Object.s_ereadings[i] <> s_ereadings Or & dw_child.Object.d_sreadings[i] <> d_sreadings Or & dw_child.Object.d_ereadings[i] <> d_ereadings THEN IF MessageBox('提示信息','第'+ String(i) +'行资料已修改是否保存?', Question! ,YesNo! , 1 ) = 1 THEN cb_save.TriggerEvent(Clicked!) RETURN ELSE RETURN END IF END IF NEXT end subroutine public subroutine wf_save ();string ls_errmsg dw_child.AcceptText() IF dw_child.Update() = -1 THEN ROLLBACK; MessageBox (publ_operator,ls_errmsg+",保存操作失败!",Exclamation!,OK!) RETURN ELSE COMMIT; END IF end subroutine on w_label_price.create int iCurrent call super::create this.st_421=create st_421 this.em_mth=create em_mth this.sle_dscrp_pe=create sle_dscrp_pe this.cbx_hl_bz=create cbx_hl_bz this.cb_dealwagemx=create cb_dealwagemx this.cb_auditing=create cb_auditing this.cb_wagerpt=create cb_wagerpt this.cb_addemp=create cb_addemp this.ddlb_scid=create ddlb_scid this.cb_delemp=create cb_delemp this.cb_retrieve=create cb_retrieve this.cb_cancel=create cb_cancel this.cb_wage_edit=create cb_wage_edit this.cb_fillbz=create cb_fillbz this.cb_help=create cb_help this.cb_other=create cb_other this.cb_pay=create cb_pay this.cb_3=create cb_3 this.cb_4=create cb_4 this.cb_save=create cb_save this.cb_5=create cb_5 this.cb_2=create cb_2 this.dw_child=create dw_child this.cb_7=create cb_7 this.cb_8=create cb_8 this.r_bar=create r_bar this.ln_bar=create ln_bar this.ln_bar2=create ln_bar2 this.ln_1=create ln_1 this.ln_2=create ln_2 iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.st_421 this.Control[iCurrent+2]=this.em_mth this.Control[iCurrent+3]=this.sle_dscrp_pe this.Control[iCurrent+4]=this.cbx_hl_bz this.Control[iCurrent+5]=this.cb_dealwagemx this.Control[iCurrent+6]=this.cb_auditing this.Control[iCurrent+7]=this.cb_wagerpt this.Control[iCurrent+8]=this.cb_addemp this.Control[iCurrent+9]=this.ddlb_scid this.Control[iCurrent+10]=this.cb_delemp this.Control[iCurrent+11]=this.cb_retrieve this.Control[iCurrent+12]=this.cb_cancel this.Control[iCurrent+13]=this.cb_wage_edit this.Control[iCurrent+14]=this.cb_fillbz this.Control[iCurrent+15]=this.cb_help this.Control[iCurrent+16]=this.cb_other this.Control[iCurrent+17]=this.cb_pay this.Control[iCurrent+18]=this.cb_3 this.Control[iCurrent+19]=this.cb_4 this.Control[iCurrent+20]=this.cb_save this.Control[iCurrent+21]=this.cb_5 this.Control[iCurrent+22]=this.cb_2 this.Control[iCurrent+23]=this.dw_child this.Control[iCurrent+24]=this.cb_7 this.Control[iCurrent+25]=this.cb_8 this.Control[iCurrent+26]=this.r_bar this.Control[iCurrent+27]=this.ln_bar this.Control[iCurrent+28]=this.ln_bar2 this.Control[iCurrent+29]=this.ln_1 this.Control[iCurrent+30]=this.ln_2 end on on w_label_price.destroy call super::destroy destroy(this.st_421) destroy(this.em_mth) destroy(this.sle_dscrp_pe) destroy(this.cbx_hl_bz) destroy(this.cb_dealwagemx) destroy(this.cb_auditing) destroy(this.cb_wagerpt) destroy(this.cb_addemp) destroy(this.ddlb_scid) destroy(this.cb_delemp) destroy(this.cb_retrieve) destroy(this.cb_cancel) destroy(this.cb_wage_edit) destroy(this.cb_fillbz) destroy(this.cb_help) destroy(this.cb_other) destroy(this.cb_pay) destroy(this.cb_3) destroy(this.cb_4) destroy(this.cb_save) destroy(this.cb_5) destroy(this.cb_2) destroy(this.dw_child) destroy(this.cb_7) destroy(this.cb_8) destroy(this.r_bar) destroy(this.ln_bar) destroy(this.ln_bar2) destroy(this.ln_1) destroy(this.ln_2) end on event open;call super::open;//em_mth.text=string(today(),'yyyymm') String arg_msg Long i, rslt=1,ll_count1,ll_count2 delete u_label_price; COMMIT; end event event ue_before_open;if_ue_filter=true if_ue_sort=true dw_child.settransobject(sqlca) //dw_3.settransobject(sqlca) // // //ds_wageitem=create datastore //ds_wageitem.settransobject(sqlca) //ds_wageitem.dataobject='dw_prty_wage' // //ds_print=create datastore //ds_print.settransobject(sqlca) //ds_print.dataobject='dw_rp_print_jy' end event event ue_filter;call super::ue_filter;OPENWITHPARM(w_filter_query,dw_child) STRING LS_EXPR LS_EXPR=Message.StringParm if len(LS_EXPR)>2 and trim(LS_EXPR)='' then return dw_child.setfilter(LS_EXPR) dw_child.SetRedraw (false) dw_child.filter() dw_child.SetRedraw (TRUE) end event event ue_sort;call super::ue_sort;OPENwithparm(w_sortrow,dw_child) STRING LS_EXPR LS_EXPR=Message.StringParm IF ISNULL(LS_EXPR) THEN LS_EXPR=' ' if len(LS_EXPR)>2 and trim(LS_EXPR)='' then return dw_child.setsort(LS_EXPR) dw_child.SetRedraw (false) dw_child.sort() dw_child.SetRedraw (true) end event event resize;call super::resize;ln_bar.EndX = THIS.Width ln_bar2.EndX = THIS.Width ln_1.EndX = THIS.Width ln_2.EndX = THIS.Width r_bar.Width = THIS.Width Long w_width,w_height w_width = 3600 w_height = 2300 IF newwidth < w_width THEN THIS.Width = w_width IF newheight < w_height THEN THIS.Height = w_height dw_child.Width = THIS.Width - 20 dw_child.Height = THIS.Height - (w_height - 1840) end event event key;call super::key;if keydown(keyF1!) then this.triggerevent("ue_help") end event event ue_sentdataout;call super::ue_sentdataout;IF NOT if_power_sendout THEN MessageBox(publ_operator,'你没有使用权限!') RETURN END IF OpenWithParm(w_sentdataout,dw_child) end event event close;call super::close;delete u_label_price; COMMIT; end event type cb_func from w_publ_base`cb_func within w_label_price boolean visible = false integer x = 165 integer height = 172 end type type cb_exit from w_publ_base`cb_exit within w_label_price boolean visible = false integer x = 5001 integer y = 1092 integer width = 475 integer height = 172 integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type type st_421 from statictext within w_label_price boolean visible = false integer x = 571 integer y = 212 integer width = 142 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 boolean enabled = false string text = "月份:" alignment alignment = right! boolean focusrectangle = false end type type em_mth from editmask within w_label_price boolean visible = false integer x = 709 integer y = 196 integer width = 311 integer height = 92 integer taborder = 120 boolean bringtotop = true integer textsize = -10 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 borderstyle borderstyle = stylelowered! maskdatatype maskdatatype = datemask! string mask = "yyyymm" boolean spin = true end type type sle_dscrp_pe from singlelineedit within w_label_price boolean visible = false integer x = 1463 integer width = 1097 integer height = 84 integer taborder = 170 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 boolean autohscroll = false borderstyle borderstyle = stylelowered! end type type cbx_hl_bz from checkbox within w_label_price boolean visible = false integer x = 2158 integer y = 208 integer width = 485 integer height = 68 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 type cb_dealwagemx from uo_imflatbutton within w_label_price boolean visible = false integer x = 2089 integer y = 1912 integer width = 297 integer height = 96 integer taborder = 180 boolean bringtotop = true string text = "录入明细" end type type cb_auditing from uo_imflatbutton within w_label_price boolean visible = false integer x = 5358 integer y = 740 integer width = 197 integer height = 172 integer taborder = 150 boolean bringtotop = true string text = "审核" string normalpicname = "audit.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type type cb_wagerpt from uo_imflatbutton within w_label_price boolean visible = false integer x = 5774 integer y = 740 integer width = 306 integer height = 172 integer taborder = 150 boolean bringtotop = true string text = "查看工资表" string normalpicname = "find2.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;parent.triggerevent("ue_view_gzb") end event type cb_addemp from uo_imflatbutton within w_label_price boolean visible = false integer x = 4713 integer y = 1092 integer width = 878 integer height = 172 integer taborder = 150 boolean bringtotop = true string text = "增加人员" string normalpicname = "mx1.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;if not f_power_ind(196) then messagebox('提示','你没有使用权限!', Information!, OK! ) return end if m_Dfc_Control_PopupMenu dmPopupMenu string menustr menustr="Text=手工增加~tEvent=ue_addemp" menustr=menustr + "|" + "Text=自动增加~tEvent=ue_autoaddemp" if len(trim(menustr))<>0 then dmPopupMenu = Create m_Dfc_Control_PopupMenu dmPopupMenu.mf_BuildMenu(This, menustr) dmPopupMenu.mf_PopMenu() Destroy dmPopupMenu end if end event type ddlb_scid from uo_ddlb_scid within w_label_price boolean visible = false integer x = 9 integer y = 196 integer width = 517 integer height = 676 boolean bringtotop = true end type event constructor;call super::constructor;cur_scid = THIS.uo_scid cur_scid_arr = THIS.uo_scid_arr end event event selectionchanged;call super::selectionchanged;cur_scid = THIS.uo_scid cur_scid_arr = THIS.uo_scid_arr cb_retrieve.TriggerEvent(Clicked!) end event type cb_delemp from uo_imflatbutton within w_label_price boolean visible = false integer x = 4960 integer y = 1092 integer width = 247 integer height = 172 integer taborder = 150 boolean bringtotop = true string text = "删除人员" string normalpicname = "mx2.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type type cb_retrieve from uo_imflatbutton within w_label_price integer width = 165 integer height = 172 integer taborder = 150 string text = "刷新" string normalpicname = "refresh.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;////wf_retrieve() //cur_wagemth = Long(ddlb_1.Text) // //dw_child.Retrieve(cur_wagemth,cur_typeid, ls_handtype) //IF dw_child.RowCount() <= 0 THEN RETURN // //dw_child.SelectRow(0,False) //dw_child.SelectRow(ll_currentrow,True) //dw_child.SetRow(ll_currentrow) //dw_child.TriggerEvent('clicked') //dw_child.Object.DataWindow.VerticalScrollPosition = ll_VerticalScroll //wf_reads() // end event type cb_cancel from uo_imflatbutton within w_label_price boolean visible = false integer x = 4763 integer y = 1092 integer width = 210 integer height = 172 integer taborder = 40 boolean bringtotop = true boolean enabled = false string text = "放弃" string normalpicname = "undo.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;dw_edit_mode=false end event type cb_wage_edit from uo_imflatbutton within w_label_price boolean visible = false integer x = 837 integer width = 215 integer height = 172 integer taborder = 40 boolean bringtotop = true string text = "修改" string normalpicname = "open.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;Long i,ll_row,ll_row1,ll_row2 String arg_msg Long ll_cpid,ll_mth IF Not f_power_ind(1566) THEN MessageBox('提示','你没有使用权限!', Information!, OK! ) RETURN END IF IF dw_edit_mode THEN END IF dw_edit_mode = Not dw_edit_mode end event type cb_fillbz from uo_imflatbutton within w_label_price boolean visible = false integer x = 5253 integer y = 740 integer width = 247 integer height = 172 integer taborder = 50 boolean bringtotop = true string text = "更新备注" string normalpicname = "mx.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;if not dw_edit_mode then return long ls_i for ls_i=1 to dw_child.rowcount() if cbx_hl_bz.checked then if trim(dw_child.object.u_gz_wage_dscrp[ls_i])<>'' then dw_child.object.u_gz_wage_dscrp[ls_i]=trim(sle_dscrp_pe.text) else dw_child.object.u_gz_wage_dscrp[ls_i]=trim(sle_dscrp_pe.text) end if next // end event type cb_help from uo_imflatbutton within w_label_price string tag = "帮助[F1]" boolean visible = false integer x = 5737 integer y = 740 integer width = 165 integer height = 172 integer taborder = 20 boolean bringtotop = true string text = "帮助" string normalpicname = "help.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;parent.triggerevent("ue_help") end event type cb_other from uo_imflatbutton within w_label_price boolean visible = false integer x = 5499 integer y = 740 integer width = 274 integer height = 172 integer taborder = 160 boolean bringtotop = true string text = "辅助功能" string normalpicname = "other.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked; m_Dfc_Control_PopupMenu dmPopupMenu String menustr menustr = "Text=设定基本工资~tEvent=ue_basepay" menustr=menustr + "|" + "Text=-" menustr=menustr + "|" + "Text=查看工资表~tEvent=ue_view_gzb" IF Len(Trim(menustr)) <> 0 THEN dmPopupMenu = CREATE m_Dfc_Control_PopupMenu dmPopupMenu.mf_BuildMenu(THIS, menustr) dmPopupMenu.mf_PopMenu() DESTROY dmPopupMenu END IF end event type cb_pay from uo_imflatbutton within w_label_price boolean visible = false integer x = 5554 integer y = 740 integer width = 183 integer height = 172 integer taborder = 60 boolean bringtotop = true string text = "收租" string normalpicname = "audit.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type type cb_3 from uo_imflatbutton within w_label_price integer x = 617 integer width = 197 integer height = 172 integer taborder = 160 boolean bringtotop = true string text = "打印" string normalpicname = "print.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;String ls_dft_old_dwname, ls_dft_new_dwname,ls_dwtype Long ls_dwprintid String ls_windowname Int ls_i Long ll_billid Int li_ifuse Long ll_row String Name,ll_rpname Long ll_RpID,ll_flag,ll_ifuse w_curwin = PARENT ls_windowname = PARENT.ClassName ( ) SELECT billid,ifuse INTO :ll_billid, :li_ifuse FROM u_report_bill Where winName = :ls_windowname; IF sqlca.SQLCode <> 0 THEN li_ifuse = 0 END IF li_ifuse = 0 IF li_ifuse = 0 THEN DECLARE dft_dwprint CURSOR FOR SELECT dwprintid,dft_old_dwname, dft_new_dwname, chnname, dwtype FROM sys_dft_dwprint_dynamic WHERE dwtype = :ls_windowname AND ptype = 0 and ifuse = 1; OPEN dft_dwprint; FETCH dft_dwprint INTO :ls_dwprintid,:ls_dft_old_dwname, :ls_dft_new_dwname,:ls_chnname, :ls_dwtype; IF sqlca.SQLCode <> 0 THEN PARENT.TriggerEvent('ue_print',0,0) ELSE m_dft_dwprint_print_item m_1 m_1 = CREATE m_dft_dwprint_print_item ls_i = 1 DO WHILE sqlca.SQLCode = 0 f_add_menuitem_print_dft(m_1,ls_i,ls_chnname,String(ls_dwprintid)) FETCH dft_dwprint INTO :ls_dwprintid,:ls_dft_old_dwname, :ls_dft_new_dwname,:ls_chnname, :ls_dwtype; ls_i++ LOOP CLOSE dft_dwprint; m_1.PopMenu(THIS.X+50,THIS.Y+50) END IF ELSE DECLARE rpt_dwprint CURSOR FOR SELECT RpID,RpName,Flag,Ifuse FROM U_report_list WHERE billid = :ll_billid Order By RpName; OPEN rpt_dwprint; FETCH rpt_dwprint INTO :ll_RpID,:ll_rpname,:ll_flag,:ll_ifuse; IF sqlca.SQLCode <> 0 THEN PARENT.TriggerEvent('ue_print',0,0) ELSE m_rpt_dwprint_print_item m_2 m_2 = CREATE m_rpt_dwprint_print_item ls_i = 1 DO WHILE sqlca.SQLCode = 0 IF ll_ifuse = 1 AND ll_flag = 1 AND f_pow_rpt(ll_RpID) THEN //需添加权限 f_add_menuItem_print_rpt(m_2,ls_i,ll_rpname,String(ll_RpID)) END IF FETCH rpt_dwprint INTO :ll_RpID,:ll_rpname,:ll_flag,:ll_ifuse; ls_i++ LOOP CLOSE rpt_dwprint; m_2.Item[1].Visible = FALSE m_2.PopMenu(THIS.X+50,THIS.Y+50) END IF END IF end event type cb_4 from uo_imflatbutton within w_label_price integer x = 814 integer width = 197 integer height = 172 integer taborder = 170 boolean bringtotop = true string text = "预览" string normalpicname = "preview.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;String ls_dft_old_dwname, ls_dft_new_dwname,ls_dwtype Long ls_dwprintid String ls_windowname Int ls_i Long ll_billid Int li_ifuse Long ll_row String Name,ll_rpname Long ll_RpID,ll_flag,ll_ifuse wf_save() w_curwin = PARENT ls_windowname = PARENT.ClassName ( ) SELECT billid,ifuse INTO :ll_billid, :li_ifuse FROM u_report_bill Where winName = :ls_windowname; IF sqlca.SQLCode <> 0 THEN li_ifuse = 0 END IF li_ifuse = 0 IF li_ifuse = 0 THEN DECLARE dft_dwprint CURSOR FOR SELECT dwprintid,dft_old_dwname, dft_new_dwname, chnname, dwtype FROM sys_dft_dwprint_dynamic WHERE dwtype = :ls_windowname AND ptype = 0 and ifuse = 1; OPEN dft_dwprint; FETCH dft_dwprint INTO :ls_dwprintid,:ls_dft_old_dwname, :ls_dft_new_dwname,:ls_chnname, :ls_dwtype; IF sqlca.SQLCode <> 0 THEN PARENT.TriggerEvent('ue_viewprint',0,0) ELSE m_dft_dwprint_item m_1 m_1 = CREATE m_dft_dwprint_item ls_i = 1 DO WHILE sqlca.SQLCode = 0 f_add_menuItem_dft(m_1,ls_i,ls_chnname,String(ls_dwprintid)) FETCH dft_dwprint INTO :ls_dwprintid,:ls_dft_old_dwname, :ls_dft_new_dwname,:ls_chnname, :ls_dwtype; ls_i++ LOOP CLOSE dft_dwprint; m_1.PopMenu(THIS.X+50,THIS.Y+50) END IF ELSE DECLARE rpt_dwprint CURSOR FOR SELECT RpID,RpName,Flag,Ifuse FROM U_report_list WHERE billid = :ll_billid Order By RpName; OPEN rpt_dwprint; FETCH rpt_dwprint INTO :ll_RpID,:ll_rpname,:ll_flag,:ll_ifuse; IF sqlca.SQLCode <> 0 THEN PARENT.TriggerEvent('ue_rpt_viewprint',0,0) ELSE m_rpt_dwprint_item m_2 m_2 = CREATE m_rpt_dwprint_item ls_i = 1 DO WHILE sqlca.SQLCode = 0 IF f_pow_rpt(ll_RpID) AND ll_ifuse = 1 AND ll_flag = 1 THEN //权限检查f_pow_rpt( ) f_add_menuItem_rpt(m_2,ls_i,ll_rpname,String(ll_RpID)) END IF FETCH rpt_dwprint INTO :ll_RpID,:ll_rpname,:ll_flag,:ll_ifuse; ls_i++ LOOP CLOSE rpt_dwprint; m_2.Item[1].Visible = FALSE m_2.PopMenu(THIS.X+50,THIS.Y+50) END IF END IF end event type cb_save from uo_imflatbutton within w_label_price boolean visible = false integer x = 334 integer width = 197 integer height = 172 integer taborder = 170 boolean bringtotop = true string text = "保存" string normalpicname = "save.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type type cb_5 from uo_imflatbutton within w_label_price boolean visible = false integer x = 535 integer width = 197 integer height = 172 integer taborder = 170 boolean bringtotop = true string text = "导出" string normalpicname = "excel.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;OPENWITHPARM(w_sentdataout,dw_child) end event type cb_2 from uo_imflatbutton within w_label_price integer x = 1010 integer y = 4 integer width = 197 integer height = 172 integer taborder = 180 boolean bringtotop = true string text = "退出" string normalpicname = "exit.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;close(parent) end event type dw_child from u_dw_rbtnfilter within w_label_price integer y = 316 integer width = 2382 integer height = 1864 integer taborder = 20 boolean bringtotop = true string dataobject = "dw_label_price" boolean controlmenu = true boolean minbox = true boolean maxbox = true boolean hscrollbar = true boolean vscrollbar = true boolean hsplitscroll = true boolean livescroll = false end type event clicked;call super::clicked;IF row > 0 THEN This.SetRow(row) This.SelectRow(0,False) This.SelectRow(row,True) END IF end event event dwnkey;call super::dwnkey; IF Key = keyenter! THEN keybd_event ( 9, 0, 0 , 0 ) // 按下tab keybd_event ( 9, 0, 2, 0 ) // 释放tab RETURN 1 END IF end event type cb_7 from uo_imflatbutton within w_label_price integer x = 169 integer width = 219 integer height = 172 integer taborder = 170 boolean bringtotop = true string text = "选物料" string normalpicname = "other.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;PARENT.TriggerEvent('ue_f8') end event type cb_8 from uo_imflatbutton within w_label_price integer x = 393 integer width = 219 integer height = 172 integer taborder = 180 boolean bringtotop = true string text = "删物料" string normalpicname = "delete.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;IF dw_child.GetRow() <= 0 THEN RETURN dw_child.DeleteRow(dw_child.GetRow()) end event type r_bar from rectangle within w_label_price long linecolor = 16777215 long fillcolor = 1073741824 integer x = 3200 integer width = 73 integer height = 172 end type event constructor;this.fillcolor = 14215660 this.linecolor = 14215660 this.x = -1 this.y = -1 this.height = ln_bar2.beginy - 5 end event type ln_bar from line within w_label_price long linecolor = 268435456 integer linethickness = 4 integer beginy = 176 integer endx = 3429 integer endy = 176 end type type ln_bar2 from line within w_label_price long linecolor = 16777215 integer linethickness = 4 integer beginy = 180 integer endx = 3429 integer endy = 180 end type type ln_1 from line within w_label_price long linecolor = 268435456 integer linethickness = 4 integer beginy = 300 integer endx = 3429 integer endy = 300 end type type ln_2 from line within w_label_price long linecolor = 16777215 integer linethickness = 4 integer beginy = 304 integer endx = 3429 integer endy = 304 end type