$PBExportHeader$w_spt_price.srw $PBExportComments$供应商价格管理 forward global type w_spt_price from w_publ_pageretr end type type r_bar from rectangle within w_spt_price end type type dw_mtrl_newprice from u_dw_rbtnfilter within w_spt_price end type type cb_refresh from uo_imflatbutton within w_spt_price end type type dw_mtrl_spt_price from datawindow within w_spt_price end type type ddlb_spttype from dropdownlistbox within w_spt_price end type type cb_print from uo_imflatbutton within w_spt_price end type type cb_help from uo_imflatbutton within w_spt_price end type type dw_child from u_dw_rbtnfilter within w_spt_price end type type cb_billfunc from uo_imflatbutton within w_spt_price end type type cbx_1 from checkbox within w_spt_price end type type ln_bar from line within w_spt_price end type type ln_bar2 from line within w_spt_price end type type ln_5 from line within w_spt_price end type type ln_6 from line within w_spt_price end type type ln_1 from line within w_spt_price end type type ln_2 from line within w_spt_price end type end forward global type w_spt_price from w_publ_pageretr integer width = 3602 integer height = 2300 string title = "供应商物料价格" boolean maxbox = true windowstate windowstate = maximized! boolean if_ue_retr = true boolean if_ue_filter = true boolean if_ue_sort = true event ue_select_oldprice ( ) event retr_mx1 ( ) event retr_mx2 ( ) event retr_mx3 ( ) event ue_del_super ( ) event ue_del_his ( ) event ue_del ( ) event ue_add ( ) event ue_viewprint ( ) r_bar r_bar dw_mtrl_newprice dw_mtrl_newprice cb_refresh cb_refresh dw_mtrl_spt_price dw_mtrl_spt_price ddlb_spttype ddlb_spttype cb_print cb_print cb_help cb_help dw_child dw_child cb_billfunc cb_billfunc cbx_1 cbx_1 ln_bar ln_bar ln_bar2 ln_bar2 ln_5 ln_5 ln_6 ln_6 ln_1 ln_1 ln_2 ln_2 end type global w_spt_price w_spt_price type variables long mtrl_id//物料ID long spt_id string spt_name string mtrl_name uo_spt_price uo_del string cur_spttype = '' string ins_status='' string ins_woodcode='' string ins_pcode='' long cur_isuse = 1 end variables forward prototypes public subroutine wf_facechange () public function integer wf_openbill (long arg_billtype) end prototypes event retr_mx1();long li_row li_row=dw_pageretr.getrow() if li_row=0 then dw_mtrl_newprice.reset() dw_child.reset() dw_mtrl_spt_price.reset() else spt_id=dw_pageretr.object.sptid[li_row] spt_name=dw_pageretr.object.name[li_row] if dw_mtrl_newprice.retrieve(spt_id,cur_isuse) > 0 then dw_mtrl_newprice.selectrow(0,false) dw_mtrl_newprice.selectrow(1,true) end if this.triggerevent('retr_mx2') end if end event event retr_mx2();Long li_row long ll_sptid decimal lde_fprice, lde_zqrate, lde_price li_row = dw_mtrl_newprice.GetRow() IF li_row = 0 THEN dw_child.Reset() dw_mtrl_spt_price.Reset() ELSE mtrl_id = dw_mtrl_newprice.Object.u_spt_price_mtrlid[li_row] mtrl_name = dw_mtrl_newprice.Object.u_mtrldef_mtrlname[li_row] ins_status = dw_mtrl_newprice.Object.u_spt_price_status[li_row] ins_woodcode = dw_mtrl_newprice.Object.u_spt_price_woodcode[li_row] ins_pcode = dw_mtrl_newprice.Object.u_spt_price_pcode[li_row] ll_sptid = dw_mtrl_newprice.Object.u_spt_price_sptid[li_row] lde_fprice = dw_mtrl_newprice.Object.u_spt_price_fprice[li_row] lde_zqrate = dw_mtrl_newprice.Object.u_spt_price_zqrate[li_row] lde_price = dw_mtrl_newprice.Object.u_spt_price_price[li_row] IF dw_mtrl_spt_price.Retrieve(mtrl_id,ins_status,ins_woodcode,ins_pcode) > 0 THEN li_row = dw_mtrl_spt_price.find("u_spt_price_sptid = "+string(ll_sptid) & + "and u_spt_price_fprice = "+string(lde_fprice) & + "and u_spt_price_zqrate = "+string(lde_zqrate) & + "and u_spt_price_price = "+string(lde_price) , 1, dw_mtrl_spt_price.rowcount()) dw_mtrl_spt_price.SelectRow(0,FALSE) if li_row > 0 then dw_mtrl_spt_price.SetRow(li_row) dw_mtrl_spt_price.SelectRow(li_row,TRUE) else dw_mtrl_spt_price.SetRow(1) dw_mtrl_spt_price.SelectRow(1,TRUE) end if END IF THIS.TriggerEvent('retr_mx3') END IF end event event retr_mx3();Long li_row,li_sptid String ls_sptname li_row = dw_mtrl_spt_price.GetRow() IF li_row = 0 THEN dw_child.Reset() ELSE li_sptid = dw_mtrl_spt_price.Object.u_spt_price_sptid[li_row] ls_sptname = dw_mtrl_spt_price.Object.u_spt_name[li_row] dw_child.Title = "["+ls_sptname+"]"+" 供应商-物料 历史价格列表" IF dw_child.Retrieve(mtrl_id,li_sptid,ins_status,ins_woodcode,ins_pcode) > 0 THEN dw_child.SelectRow(0,FALSE) dw_child.SelectRow(1,TRUE) END IF END IF end event event ue_del_super();IF NOT sys_power_issuper THEN MessageBox('提示','只有管理员能操作!',information!,ok!) RETURN END IF IF MessageBox('询问','确认要删除供应商物料最新采购价格吗',Question!,YESNO!) = 2 THEN RETURN dw_mtrl_newprice.AcceptText() Long mtrlid = 0,li_row,li_row2 Long sptid = 0 String ls_unit,ls_status,ls_woodcode,ls_pcode String ls_mtrlname,ls_msg,ls_mtrlcode decimal ld_price li_row = dw_mtrl_newprice.GetRow() li_row2 = dw_pageretr.GetRow() sptid = dw_pageretr.Object.sptid[li_row2] mtrlid = dw_mtrl_newprice.Object.u_spt_price_mtrlid[li_row] ls_mtrlname = dw_mtrl_newprice.Object.u_mtrldef_mtrlname[li_row] ls_status = dw_mtrl_newprice.Object.u_spt_price_status[li_row] ls_woodcode = dw_mtrl_newprice.Object.u_spt_price_woodcode[li_row] ls_pcode = dw_mtrl_newprice.Object.u_spt_price_pcode[li_row] ls_mtrlcode = dw_mtrl_newprice.Object.u_mtrldef_mtrlcode[li_row] ld_price = dw_mtrl_newprice.Object.u_spt_price_fprice[li_row] ls_unit = dw_mtrl_newprice.Object.u_spt_price_unit[li_row] DELETE FROM u_spt_price WHERE sptid = :sptid AND mtrlid = :mtrlid AND unit = :ls_unit AND woodcode = :ls_woodcode AND pcode = :ls_pcode AND status = :ls_status; IF sqlca.SQLCode <> 0 THEN ls_msg = '删除供应商物料最新采购价格失败,' + sqlca.SQLErrText MessageBox('错误',ls_msg) ROLLBACK; RETURN END IF DELETE FROM u_spt_price_mx WHERE sptid = :sptid AND mtrlid = :mtrlid AND unit = :ls_unit AND woodcode = :ls_woodcode AND pcode = :ls_pcode AND status = :ls_status; IF sqlca.SQLCode <> 0 THEN ls_msg = '删除供应商物料历史采购价格失败,' + sqlca.SQLErrText MessageBox('错误',ls_msg) ROLLBACK; RETURN END IF COMMIT; //日志 f_setsysoplog('供应商物料最新采购价格','超级删除,编码'+ ls_mtrlcode + ',单价:' + string(ld_price,'##,##0.#####') ,ls_msg,TRUE) //-- messagebox('提示','删除成功') cb_refresh.TriggerEvent(Clicked!) end event event ue_del_his();IF NOT f_power_ind(104) THEN MessageBox('提示','你没有使用权限!',information!,ok!) RETURN END IF IF NOT IsValid(w_del_hisprice) THEN s_edit_index_tran s_ch_tran //传递参数使用 s_ch_tran.work_mode = 1 OpenWithParm(w_del_hisprice,s_ch_tran) end if end event event ue_del();IF NOT f_power_ind(104) THEN MessageBox('提示','你没有使用权限!',information!,ok!) RETURN END IF Dec new_price = 0.0,zqrate Long mtrlid = 0 Long sptid = 0 DateTime opdate String errmsg = '' String ls_unit,ls_status,ls_woodcode,ls_pcode IF dw_child.GetRow() <= 0 THEN MessageBox('提示','没有可删除的数据',information!,ok!) RETURN END IF IF dw_child.Object.buildtype[dw_child.GetRow()] = 0 THEN MessageBox('提示','您要删除的历史价格不是手动添加的,不能删除',information!,ok!) RETURN END IF IF dw_child.GetRow() <> 1 THEN MessageBox('提示','被删除的商品历史采购价格必须是最后添加记录(第一条)',information!,ok!) RETURN END IF IF dw_child.RowCount() < 2 THEN new_price = 0.0 zqrate = 1 ELSE new_price = dw_child.Object.u_spt_price_mx_fprice[2] zqrate = dw_child.Object.u_spt_price_mx_zqrate[2] END IF mtrl_id = dw_child.Object.mtrlid[1] spt_id = dw_child.Object.sptid[1] opdate = dw_child.Object.opdate[1] ls_unit = dw_child.Object.unit[1] ls_status = dw_child.Object.status[1] ls_woodcode = dw_child.Object.woodcode[1] ls_pcode = dw_child.Object.pcode[1] //确认确实需要删除数据吗? IF MessageBox('询问','确认商品采购历史价格要删除吗',Question!,YESNO!) = 1 THEN IF uo_del.uf_del_sdsptprice(mtrl_id,spt_id,ls_unit,ls_status,ls_woodcode,ls_pcode,opdate,new_price,zqrate,TRUE,errmsg) = 0 THEN MessageBox('错误',errmsg,stopsign!,ok!) RETURN END IF END IF cb_refresh.TriggerEvent(Clicked!) end event event ue_add();IF NOT f_power_ind(104) THEN MessageBox('提示','你没有使用权限!',information!,ok!) RETURN END IF IF dw_pageretr.GetRow() <= 0 THEN RETURN END IF s_insert_cusprice s_cusprice s_cusprice.cusid = dw_pageretr.Object.sptid[dw_pageretr.GetRow()] IF dw_mtrl_newprice.RowCount() > 0 THEN s_cusprice.mtrlid = dw_mtrl_newprice.Object.u_spt_price_mtrlid[dw_mtrl_newprice.GetRow()] ELSE s_cusprice.mtrlid = 0 END IF s_cusprice.cusname = dw_pageretr.Object.Name[dw_pageretr.GetRow()] IF dw_mtrl_newprice.RowCount() > 0 THEN s_cusprice.mtrlname = dw_mtrl_newprice.Object.u_mtrldef_mtrlname[dw_mtrl_newprice.GetRow()] ELSE s_cusprice.mtrlname = '' END IF OpenWithParm(w_add_mxnewprice_spt,s_cusprice) cb_refresh.TriggerEvent(Clicked!) dw_edit_mode = FALSE wf_facechange() end event event ue_viewprint();IF NOT if_power_print THEN MessageBox(publ_operator,'你没有使用权限!') RETURN END IF String ls_newname = '' Long ls_msgprintid ls_msgprintid = Message.LongParm SELECT dft_new_dwname INTO :ls_newname FROM sys_dft_dwprint_dynamic Where sys_dft_dwprint_dynamic.dwprintid = :ls_msgprintid USING sqlca; IF sqlca.SQLCode <> 0 THEN ls_newname = '' END IF LONG LS_ROW LS_ROW=dw_pageretr.getrow() IF LS_ROW<=0 THEN MESSAGEBOX('提示','没有打印目标单据!',information!,ok!) RETURN END IF S_print_MSG LS_PRMSG IF ls_newname <> '' THEN LS_PRMSG.obj_dwNAME = ls_newname ELSE LS_PRMSG.obj_dwNAME = 'dw_rp_mtrl_newprice' END IF LS_PRMSG.TAG_TEXT='采购报价单' LS_PRMSG.FILTER_STRING = '' LS_PRMSG.retr_pram_falg=2 LS_PRMSG.PAGECH_FLAG=0 LS_PRMSG.retr_pramnmb=dw_pageretr.object.sptid[LS_ROW] Openwithparm(w_publ_preview,LS_PRMSG) end event public subroutine wf_facechange ();//if dw_edit_mode then // cb_sadd.enabled=false // cb_del.enabled=false //else // cb_sadd.enabled=true // cb_del.enabled=true //end if // //if dw_pageretr.rowcount()<=0 then // cb_sadd.enabled=false // cb_del.enabled=false //end if end subroutine public function integer wf_openbill (long arg_billtype);int rslt=1 return rslt end function on w_spt_price.create int iCurrent call super::create this.r_bar=create r_bar this.dw_mtrl_newprice=create dw_mtrl_newprice this.cb_refresh=create cb_refresh this.dw_mtrl_spt_price=create dw_mtrl_spt_price this.ddlb_spttype=create ddlb_spttype this.cb_print=create cb_print this.cb_help=create cb_help this.dw_child=create dw_child this.cb_billfunc=create cb_billfunc this.cbx_1=create cbx_1 this.ln_bar=create ln_bar this.ln_bar2=create ln_bar2 this.ln_5=create ln_5 this.ln_6=create ln_6 this.ln_1=create ln_1 this.ln_2=create ln_2 iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.r_bar this.Control[iCurrent+2]=this.dw_mtrl_newprice this.Control[iCurrent+3]=this.cb_refresh this.Control[iCurrent+4]=this.dw_mtrl_spt_price this.Control[iCurrent+5]=this.ddlb_spttype this.Control[iCurrent+6]=this.cb_print this.Control[iCurrent+7]=this.cb_help this.Control[iCurrent+8]=this.dw_child this.Control[iCurrent+9]=this.cb_billfunc this.Control[iCurrent+10]=this.cbx_1 this.Control[iCurrent+11]=this.ln_bar this.Control[iCurrent+12]=this.ln_bar2 this.Control[iCurrent+13]=this.ln_5 this.Control[iCurrent+14]=this.ln_6 this.Control[iCurrent+15]=this.ln_1 this.Control[iCurrent+16]=this.ln_2 end on on w_spt_price.destroy call super::destroy destroy(this.r_bar) destroy(this.dw_mtrl_newprice) destroy(this.cb_refresh) destroy(this.dw_mtrl_spt_price) destroy(this.ddlb_spttype) destroy(this.cb_print) destroy(this.cb_help) destroy(this.dw_child) destroy(this.cb_billfunc) destroy(this.cbx_1) destroy(this.ln_bar) destroy(this.ln_bar2) destroy(this.ln_5) destroy(this.ln_6) destroy(this.ln_1) destroy(this.ln_2) end on event open;call super::open;uo_del=create uo_spt_price wf_facechange() end event event ue_before_open;dw_mtrl_newprice.SetTransObject(sqlca) dw_child.SetTransObject(sqlca) dw_mtrl_spt_price.SetTransObject(sqlca) //if_ue_retr=true //if_ue_filter=true //if_ue_sort=true end event event 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+'( sptcode LIKE "%'+trim(sle_usual_query.text)+'%" )' ELSE obj_expr=obj_expr+'( sptcode 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 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="( sptcode like '%"+trim(sle_usual_query.text)+"%')" else ls_querystrpart="(sptcode like '"+trim(sle_usual_query.text)+"')" end if if Pos(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 SetPointer(HourGlass!) dw_pageretr.retrieve(cur_spttype,sys_user_spttype ) if dw_pageretr.rowcount()>0 and dw_pageretr.getrow()=0 then dw_pageretr.setrow(1) SetPointer(Arrow!) this.TriggerEvent('retr_mx1') cb_nextpage.enabled=cb_nextpage_enabled cb_retrieveall.enabled=cb_retrieveall_enabled cb_func.enabled=cb_func_enabled 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 - (w_width - 2007) dw_mtrl_newprice.width=this.width - (w_width - 2007) dw_mtrl_newprice.height=this.height - (w_height - 1112) dw_pageretr.height=this.height - (w_height - 1112) dw_mtrl_spt_price.y=this.height - (w_height - 1412) dw_child.y=this.height - (w_height - 1412) end event event key;call super::key;IF KeyDown(KeyF1!) THEN cb_help.TriggerEvent(Clicked!) END IF 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_pageretr) end event event ue_sort;call super::ue_sort;OpenWithParm(w_sortrow,dw_mtrl_newprice) 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_mtrl_newprice.SetSort(LS_EXPR) dw_mtrl_newprice.SetRedraw (False) dw_mtrl_newprice.Sort() dw_mtrl_newprice.SetRedraw (True) end event type cb_func from w_publ_pageretr`cb_func within w_spt_price integer x = 151 integer y = 0 integer width = 151 integer height = 164 end type type cb_exit from w_publ_pageretr`cb_exit within w_spt_price integer x = 878 integer y = 0 integer width = 151 integer height = 164 integer taborder = 180 integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type type sle_usual_query from w_publ_pageretr`sle_usual_query within w_spt_price integer y = 192 integer height = 80 boolean bringtotop = true end type type cb_retrieveall from w_publ_pageretr`cb_retrieveall within w_spt_price integer x = 1353 integer width = 151 integer height = 164 integer taborder = 130 string normalpicname = "p1.ico" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type type em_pagerowno from w_publ_pageretr`em_pagerowno within w_spt_price integer x = 1029 integer y = 44 integer width = 325 boolean bringtotop = true end type type dw_pageretr from w_publ_pageretr`dw_pageretr within w_spt_price integer y = 304 integer width = 1527 integer height = 1112 integer taborder = 20 boolean bringtotop = true string title = "供应商列表" string dataobject = "dw_spt" end type event dw_pageretr::rowfocuschanged;call super::rowfocuschanged;IF currentrow > 0 THEN THIS.SelectRow(0,FALSE) THIS.SelectRow(currentrow,TRUE) END IF PARENT.TriggerEvent('retr_mx1') end event type st_1 from w_publ_pageretr`st_1 within w_spt_price integer y = 212 integer width = 201 integer height = 56 string text = "编号含:" end type type cb_nextpage from w_publ_pageretr`cb_nextpage within w_spt_price integer x = 1504 integer width = 64 integer height = 164 integer taborder = 160 toolbaralignment pic_align = alignattop! boolean border = false end type type r_bar from rectangle within w_spt_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 dw_mtrl_newprice from u_dw_rbtnfilter within w_spt_price integer x = 1527 integer y = 304 integer width = 2007 integer height = 1112 integer taborder = 30 boolean bringtotop = true boolean titlebar = true string title = "供应商-物料 最新价格列表" string dataobject = "dw_mtrl_newprice" boolean maxbox = true boolean hscrollbar = true boolean vscrollbar = true boolean border = false end type event rowfocuschanged;if currentrow>0 then this.selectrow(0,false) this.selectrow(currentrow,true) end if parent.triggerevent('retr_mx2') end event event constructor;call super::constructor; titleclick_sort_use=true //单击标题排序功能开关 RBUTTON_FILTER_USE=true //右键查询功能开关 end event type cb_refresh from uo_imflatbutton within w_spt_price integer width = 151 integer height = 164 integer taborder = 90 boolean bringtotop = true string text = "重查" string normalpicname = "refresh.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;parent.triggerevent('retr_mx1') parent.triggerevent('retr_mx2') parent.triggerevent('retr_mx3') end event type dw_mtrl_spt_price from datawindow within w_spt_price integer y = 1412 integer width = 1527 integer height = 732 integer taborder = 80 boolean bringtotop = true boolean titlebar = true string title = "物料-供应商 最新价格列表" string dataobject = "dw_mtrl_spt_price" boolean maxbox = true boolean hscrollbar = true boolean vscrollbar = true boolean border = false boolean livescroll = true end type event rowfocuschanged;if currentrow>0 then this.selectrow(0,false) this.selectrow(currentrow,true) end if parent.triggerevent('retr_mx3') end event type ddlb_spttype from dropdownlistbox within w_spt_price integer x = 777 integer y = 192 integer width = 585 integer height = 1244 integer taborder = 50 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;String ls_spttype DECLARE cur_spttype CURSOR FOR SELECT distinct u_spt.spttype FROM u_spt where u_spt.spttype <> ''; OPEN cur_spttype; FETCH cur_spttype INTO :ls_spttype; DO WHILE sqlca.SQLCode = 0 THIS.AddItem(ls_spttype) FETCH cur_spttype INTO :ls_spttype; LOOP CLOSE cur_spttype; THIS.AddItem('全部') THIS.text = '全部' end event event selectionchanged;if this.text = '全部' then cur_spttype = '' else cur_spttype = this.text end if parent.triggerevent('retrieve_pageretr') end event type cb_print from uo_imflatbutton within w_spt_price integer x = 576 integer width = 151 integer height = 164 integer taborder = 190 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_chnname,ls_dwtype Long ls_dwprintid string ls_windowname Int ls_i w_curwin = PARENT ls_windowname = parent.Classname ( ) DECLARE dft_dwprint CURSOR FOR SELECT dwprintid,dft_old_dwname, dft_new_dwname, chnname, dwtype FROM sys_dft_dwprint_dynamic Where dwtype = :ls_windowname; 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 end event type cb_help from uo_imflatbutton within w_spt_price string tag = "帮助[F1]" integer x = 727 integer width = 151 integer height = 164 integer taborder = 140 boolean bringtotop = true string text = "帮助" string normalpicname = "help.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type type dw_child from u_dw_rbtnfilter within w_spt_price integer x = 1531 integer y = 1412 integer width = 1993 integer height = 736 integer taborder = 20 boolean bringtotop = true boolean titlebar = true string title = "供应商-物料 历史价格列表" string dataobject = "dw_mtrl_old_price" boolean maxbox = true boolean hscrollbar = true boolean vscrollbar = true boolean border = false end type event rowfocuschanged;call super::rowfocuschanged;if currentrow>0 then this.selectrow(0,false) this.selectrow(currentrow,true) end if end event type cb_billfunc from uo_imflatbutton within w_spt_price integer x = 302 integer width = 274 integer height = 164 integer taborder = 90 boolean bringtotop = true string text = "辅助功能" string normalpicname = "update.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_add" menustr = menustr + "|" + "Text=删除~tEvent=ue_del" menustr = menustr + "|" + "Text=-" menustr = menustr + "|" + "Text=按月删除~tEvent=ue_del_his" menustr = menustr + "|" + "Text=超级删除~tEvent=ue_del_super" 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 cbx_1 from checkbox within w_spt_price integer x = 1527 integer y = 212 integer width = 466 integer height = 56 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 checked = true end type event clicked;IF THIS.Checked THEN cur_isuse = 1 ELSE cur_isuse = - 1 END IF cb_refresh.triggerevent(clicked!) end event type ln_bar from line within w_spt_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_spt_price long linecolor = 16777215 integer linethickness = 4 integer beginy = 180 integer endx = 3429 integer endy = 180 end type type ln_5 from line within w_spt_price boolean visible = false long linecolor = 268435456 integer beginx = 1481 integer endx = 1481 integer endy = 176 end type type ln_6 from line within w_spt_price boolean visible = false long linecolor = 16777215 integer beginx = 1486 integer endx = 1486 integer endy = 180 end type type ln_1 from line within w_spt_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_spt_price long linecolor = 16777215 integer linethickness = 4 integer beginy = 304 integer endx = 3429 integer endy = 304 end type