$PBExportHeader$w_mtrl_spt_price.srw $PBExportComments$供应商价格管理 forward global type w_mtrl_spt_price from w_publ_1ton_share_detail end type type st_2 from statictext within w_mtrl_spt_price end type type dw_child2 from u_dw_rbtnfilter within w_mtrl_spt_price end type type ddlb_1 from uo_ddlb_storageid within w_mtrl_spt_price end type end forward global type w_mtrl_spt_price from w_publ_1ton_share_detail string title = "物料供应商价格" boolean maxbox = true windowstate windowstate = maximized! event insert_childrow ( ) event retrieve_childdw2 ( ) st_2 st_2 dw_child2 dw_child2 ddlb_1 ddlb_1 end type global w_mtrl_spt_price w_mtrl_spt_price type variables long mtrl_id//物料ID long cur_storageid = -1 long cur_storageid_arr[] string ins_status,ins_woodcode,ins_pcode,ins_unit end variables event insert_childrow();long li_row li_row=dw_child.insertrow(0) dw_child.scrolltorow(li_row) dw_child.SetColumn ('procode') end event event retrieve_childdw2();long li_row,li_sptid li_row=dw_child.getrow() if li_row=0 then dw_child2.reset() else li_sptid=dw_child.object.u_spt_price_sptid[li_row] if dw_child2.retrieve(mtrl_id,li_sptid,ins_status,ins_woodcode,ins_pcode,ins_unit) > 0 then dw_child2.selectrow(0,false) dw_child2.selectrow(1,true) end if end if end event on w_mtrl_spt_price.create int iCurrent call super::create this.st_2=create st_2 this.dw_child2=create dw_child2 this.ddlb_1=create ddlb_1 iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.st_2 this.Control[iCurrent+2]=this.dw_child2 this.Control[iCurrent+3]=this.ddlb_1 end on on w_mtrl_spt_price.destroy call super::destroy destroy(this.st_2) destroy(this.dw_child2) destroy(this.ddlb_1) end on event ue_usual_query_retr;call super::ue_usual_query_retr;string ls_querystrpart='' ls_newselect=lower(ori_oldselect) if trim(sle_usual_query.text)<>'' then if pos(trim(sle_usual_query.text),'%')=0 then ls_querystrpart="(u_mtrldef.mtrlcode like '%"+trim(sle_usual_query.text)+"%')" else ls_querystrpart="(u_mtrldef.mtrlcode like '"+trim(sle_usual_query.text)+"')" end if if pos(lower(ls_newselect),"where") <> 0 then ls_newselect=ls_newselect+" and ("+ls_querystrpart+')' else ls_newselect=ls_newselect+" where ("+ls_querystrpart+')' end if end if wf_retrieveuc(dw_pageretr,ls_newselect,1) this.triggerevent('retrieve_pageretr') end event event retrieve_pageretr;Boolean cb_firstpage_enabled,cb_nextpage_enabled,cb_retrieveall_enabled Boolean cb_priorpage_enabled,cb_func_enabled,cb_retrieve_enabled cb_nextpage_enabled = cb_nextpage.Enabled cb_retrieveall_enabled = cb_retrieveall.Enabled cb_func_enabled = cb_func.Enabled cb_nextpage.Enabled = False cb_retrieveall.Enabled = False cb_func.Enabled = False dw_pageretr.ShareDataOff() dw_pageretr.Retrieve(cur_storageid_arr) IF dw_pageretr.RowCount() > 0 And dw_pageretr.GetRow() = 0 THEN dw_pageretr.SetRow(1) dw_pageretr.ShareData(dw_uc) This.TriggerEvent('retrieve_childdw') cb_nextpage.Enabled = cb_nextpage_enabled cb_retrieveall.Enabled = cb_retrieveall_enabled cb_func.Enabled = cb_func_enabled end event event retrieve_childdw;call super::retrieve_childdw;Long row,uc_relid dw_child.Reset() row = dw_pageretr.GetRow() IF row > 0 THEN uc_relid = dw_pageretr.Object.mtrlid[row] ins_status=dw_pageretr.Object.v_maxprice_sptprice_status[row] ins_woodcode=dw_pageretr.Object.v_maxprice_sptprice_woodcode[row] ins_pcode=dw_pageretr.Object.v_maxprice_sptprice_pcode[row] ins_unit=dw_pageretr.Object.v_maxprice_sptprice_unit[row] mtrl_id = uc_relid dw_child.SetRedraw (FALSE) if dw_child.Retrieve(uc_relid,ins_status,ins_woodcode,ins_pcode,ins_unit,sys_user_spttype ) > 0 then dw_child.selectrow(0,false) dw_child.selectrow(1,true) end if dw_child.SetRedraw (TRUE) ELSE dw_child.Reset() dw_child2.Reset() END IF end event event ue_before_open;call super::ue_before_open;dw_child2.settransobject(sqlca) end event event resize;ln_bar.EndX = This.Width ln_bar2.EndX = This.Width r_bar.Width = This.Width ln_1.EndX = This.Width ln_2.EndX = This.Width dw_pageretr.Height = This.Height - dw_pageretr.y - 140 IF This.WindowState = maximized! THEN dw_uc.Width = 2048 dw_child.x = dw_uc.x + dw_uc.width + 5 dw_child.y = dw_uc.y dw_child.height = dw_uc.height dw_child.width = this.width - dw_child.y - 40 dw_child2.x = dw_uc.x dw_child2.y = dw_uc.y + dw_uc.height + 5 dw_child2.height = this.height - dw_child2.y - 140 dw_child2.width = this.width - dw_child2.y - 40 ELSE dw_uc.Width = This.Width - dw_pageretr.Width - 50 dw_child.x = dw_uc.x dw_child.y = dw_uc.y + dw_uc.height + 5 dw_child.Width = dw_uc.Width / 2 - 5 dw_child.Height = this.height - dw_child.y - 140 dw_child2.X = dw_child.X + dw_child.Width + 10 dw_child2.y = dw_child.y dw_child2.Width = dw_child.Width dw_child2.Height = dw_child.Height END IF end event event ue_usual_query_filt;call super::ue_usual_query_filt;string obj_expr='' if trim(sle_usual_query.text)<>'' then if pos(trim(sle_usual_query.text),'%')=0 then obj_expr=obj_expr+'( mtrlcode like "%'+trim(sle_usual_query.text)+'%" )' else obj_expr=obj_expr+'( mtrlcode like "'+trim(sle_usual_query.text)+'" )' end if end if dw_pageretr.setfilter(obj_expr) dw_pageretr.setredraw(false) dw_pageretr.filter() if dw_pageretr.rowcount()>=1 then dw_pageretr.selectrow(0,false) dw_pageretr.selectrow(1,true) end if dw_pageretr.setredraw(true) end event type cb_func from w_publ_1ton_share_detail`cb_func within w_mtrl_spt_price integer x = 165 end type type cb_exit from w_publ_1ton_share_detail`cb_exit within w_mtrl_spt_price integer x = 466 end type type sle_usual_query from w_publ_1ton_share_detail`sle_usual_query within w_mtrl_spt_price integer x = 215 integer width = 613 end type type cb_retrieveall from w_publ_1ton_share_detail`cb_retrieveall within w_mtrl_spt_price integer x = 946 end type type em_pagerowno from w_publ_1ton_share_detail`em_pagerowno within w_mtrl_spt_price integer x = 635 integer y = 36 integer width = 320 end type type dw_pageretr from w_publ_1ton_share_detail`dw_pageretr within w_mtrl_spt_price integer x = 0 integer y = 296 integer width = 1472 integer height = 1972 string title = "物料摘要内容" string dataobject = "dw_mtrl_spt_price_index" end type event dw_pageretr::rowfocuschanged;if dw_edit_mode then return if currentrow <= 0 then return this.selectrow(0,false) this.selectrow(currentrow,true) dw_uc.setrow(currentrow) dw_uc.scrolltorow (currentrow) if not dw_edit_mode then parent.triggerevent('retrieve_childdw') end event type st_1 from w_publ_1ton_share_detail`st_1 within w_mtrl_spt_price integer x = 27 integer width = 206 string text = "编码含" end type type cb_nextpage from w_publ_1ton_share_detail`cb_nextpage within w_mtrl_spt_price integer x = 1097 end type type dw_uc from w_publ_1ton_share_detail`dw_uc within w_mtrl_spt_price integer x = 1472 integer y = 300 integer width = 2048 integer height = 668 string dataobject = "dw_mtrl_spt_price_edit" end type event dw_uc::constructor;call super::constructor;f_title_change(this) end event type gb_2 from w_publ_1ton_share_detail`gb_2 within w_mtrl_spt_price end type type dw_child from w_publ_1ton_share_detail`dw_child within w_mtrl_spt_price integer x = 1472 integer y = 964 integer width = 1029 integer height = 1288 string title = "供应商物料价格表" string dataobject = "dw_mtrl_spt_price_mx1" boolean controlmenu = true end type event dw_child::rowfocuschanged;if currentrow>0 then this.selectrow(0,false) this.selectrow(currentrow,true) end if parent.triggerevent('retrieve_childdw2') end event type cb_viewprint from w_publ_1ton_share_detail`cb_viewprint within w_mtrl_spt_price boolean visible = false integer x = 1147 integer y = 2740 end type type cb_print from w_publ_1ton_share_detail`cb_print within w_mtrl_spt_price boolean visible = false integer x = 901 integer y = 2740 end type type cb_add from w_publ_1ton_share_detail`cb_add within w_mtrl_spt_price boolean visible = false integer x = 128 integer y = 2584 boolean enabled = false end type type cb_edit from w_publ_1ton_share_detail`cb_edit within w_mtrl_spt_price boolean visible = false integer x = 654 integer y = 2492 end type type cb_delet from w_publ_1ton_share_detail`cb_delet within w_mtrl_spt_price boolean visible = false integer x = 320 integer y = 2360 boolean enabled = false end type type cb_addzy from w_publ_1ton_share_detail`cb_addzy within w_mtrl_spt_price boolean visible = false end type type cb_auditing from w_publ_1ton_share_detail`cb_auditing within w_mtrl_spt_price boolean visible = false integer x = 229 integer y = 2812 integer width = 238 end type type cb_xm from w_publ_1ton_share_detail`cb_xm within w_mtrl_spt_price boolean visible = false integer x = 686 integer y = 2724 end type type cb_retrieve from w_publ_1ton_share_detail`cb_retrieve within w_mtrl_spt_price integer width = 165 end type type cb_xls from w_publ_1ton_share_detail`cb_xls within w_mtrl_spt_price boolean visible = false end type type cb_help from w_publ_1ton_share_detail`cb_help within w_mtrl_spt_price integer x = 315 end type type cb_auditing_cancel from w_publ_1ton_share_detail`cb_auditing_cancel within w_mtrl_spt_price boolean visible = false integer x = 1102 integer y = 128 end type type p_msg from w_publ_1ton_share_detail`p_msg within w_mtrl_spt_price end type type p_help from w_publ_1ton_share_detail`p_help within w_mtrl_spt_price end type type p_encl from w_publ_1ton_share_detail`p_encl within w_mtrl_spt_price end type type p_other from w_publ_1ton_share_detail`p_other within w_mtrl_spt_price end type type gb_3 from w_publ_1ton_share_detail`gb_3 within w_mtrl_spt_price end type type ln_bar from w_publ_1ton_share_detail`ln_bar within w_mtrl_spt_price end type type ln_bar2 from w_publ_1ton_share_detail`ln_bar2 within w_mtrl_spt_price end type type r_bar from w_publ_1ton_share_detail`r_bar within w_mtrl_spt_price end type type ln_1 from w_publ_1ton_share_detail`ln_1 within w_mtrl_spt_price integer endx = 3227 end type type ln_2 from w_publ_1ton_share_detail`ln_2 within w_mtrl_spt_price integer endx = 3227 end type type st_2 from statictext within w_mtrl_spt_price integer x = 933 integer y = 212 integer width = 187 integer height = 48 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_child2 from u_dw_rbtnfilter within w_mtrl_spt_price integer x = 2510 integer y = 964 integer height = 1288 integer taborder = 20 boolean bringtotop = true boolean titlebar = true string title = "物料供应商历史采购价格表[粉红色- 手动添加]" string dataobject = "dw_mtrl_spt_price_mx2" boolean controlmenu = true boolean maxbox = true boolean hscrollbar = true boolean vscrollbar = true boolean resizable = true boolean rbutton_filter_use = true boolean titleclick_sort_use = true end type event rowfocuschanged;call super::rowfocuschanged;this.selectrow(0,false) this.selectrow(currentrow,true) end event type ddlb_1 from uo_ddlb_storageid within w_mtrl_spt_price integer x = 1143 integer y = 192 integer width = 681 integer height = 1108 integer taborder = 150 boolean bringtotop = true end type event constructor;call super::constructor;cur_storageid_arr = this.uo_storageid_arr end event event selectionchanged;call super::selectionchanged;cur_storageid_arr = this.uo_storageid_arr parent.triggerevent('retrieve_pageretr') end event