$PBExportHeader$w_storage_loca_ch.srw forward global type w_storage_loca_ch from window end type type st_1 from statictext within w_storage_loca_ch end type type sle_usual_query from singlelineedit within w_storage_loca_ch end type type cb_1 from uo_imflatbutton within w_storage_loca_ch end type type r_bar from rectangle within w_storage_loca_ch end type type dw_ch from datawindow within w_storage_loca_ch end type end forward global type w_storage_loca_ch from window integer width = 1143 integer height = 1208 boolean titlebar = true string title = "仓位号选择" boolean controlmenu = true windowtype windowtype = response! long backcolor = 134217739 string icon = "AppIcon!" event ue_usual_query_filt ( ) st_1 st_1 sle_usual_query sle_usual_query cb_1 cb_1 r_bar r_bar dw_ch dw_ch end type global w_storage_loca_ch w_storage_loca_ch type variables String rst_str end variables event ue_usual_query_filt();String obj_expr = '' string ls_name IF Trim(sle_usual_query.Text) <> '' THEN IF Pos(Trim(sle_usual_query.Text),'%') = 0 THEN obj_expr = obj_expr+' ( locacode LIKE "%'+Trim(sle_usual_query.Text)+'%")' ELSE obj_expr = obj_expr+' ( locacode LIKE "'+Trim(sle_usual_query.Text)+'")' END IF END IF dw_ch.SetFilter(obj_expr) dw_ch.SetRedraw(FALSE) dw_ch.Filter() IF dw_ch.RowCount() >= 1 THEN dw_ch.SelectRow(0,FALSE) dw_ch.SelectRow(1,TRUE) END IF dw_ch.SetRedraw(TRUE) end event on w_storage_loca_ch.create this.st_1=create st_1 this.sle_usual_query=create sle_usual_query this.cb_1=create cb_1 this.r_bar=create r_bar this.dw_ch=create dw_ch this.Control[]={this.st_1,& this.sle_usual_query,& this.cb_1,& this.r_bar,& this.dw_ch} end on on w_storage_loca_ch.destroy destroy(this.st_1) destroy(this.sle_usual_query) destroy(this.cb_1) destroy(this.r_bar) destroy(this.dw_ch) end on event open;s_pzwin_open s_win s_win = Message.PowerObjectParm environment exerun_env GetEnvironment(exerun_env ) THIS.X = s_win.arg_x THIS.Y = s_win.arg_y //计算窗口位置 IF THIS.X + THIS.Width > PixelsToUnits(exerun_env.ScreenWidth, XPixelsToUnits!) THEN THIS.X = PixelsToUnits(exerun_env.ScreenWidth, XPixelsToUnits!) - THIS.Width END IF IF THIS.Y + THIS.Height > PixelsToUnits(exerun_env.ScreenHeight, XPixelsToUnits!) - 350 THEN THIS.Y = PixelsToUnits(exerun_env.ScreenHeight, XPixelsToUnits!) - THIS.Height - 350 END IF dw_ch.SetTransObject(sqlca) dw_ch.Retrieve(s_win.arg_mtrlid) end event event close;CloseWithReturn(THIS,rst_str) end event event resize;r_bar.width = this.width end event type st_1 from statictext within w_storage_loca_ch integer x = 9 integer y = 24 integer width = 210 integer height = 56 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 sle_usual_query from singlelineedit within w_storage_loca_ch event keyup pbm_keyup integer x = 224 integer y = 12 integer width = 507 integer height = 84 integer taborder = 10 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 borderstyle borderstyle = stylelowered! end type event keyup;PARENT.TRIGGEREVENT("ue_usual_query_filt") end event type cb_1 from uo_imflatbutton within w_storage_loca_ch integer y = 120 integer width = 110 integer height = 96 integer taborder = 10 string text = "" boolean cancel = true string normalpicname = "exit.bmp" integer picsize = 16 boolean border = false end type event clicked;call super::clicked;rst_str = '' Close(PARENT) end event type r_bar from rectangle within w_storage_loca_ch boolean visible = false long linecolor = 16777215 integer linethickness = 4 long fillcolor = 1073741824 integer x = 402 integer width = 146 integer height = 104 end type event constructor;this.fillcolor = 14215660 this.linecolor = 14215660 this.x = -1 this.y = -1 this.height = dw_ch.y - 5 end event type dw_ch from datawindow within w_storage_loca_ch event ue_mousemove pbm_dwnmousemove integer y = 104 integer width = 1120 integer height = 1016 integer taborder = 10 boolean bringtotop = true string title = "none" string dataobject = "dw_storage_loca_ch" boolean hscrollbar = true boolean vscrollbar = true boolean livescroll = true borderstyle borderstyle = stylelowered! end type event ue_mousemove;IF row > 0 THEN THIS.SelectRow(0,FALSE) THIS.SelectRow(row,TRUE) END IF end event event clicked;IF row > 0 THEN THIS.SelectRow(0,FALSE) THIS.SelectRow(row,TRUE) rst_str = dw_ch.object.locacode[row] END IF Close(PARENT) end event event constructor;f_title_change(this) end event