123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460 |
- $PBExportHeader$w_mtrl_spt_name.srw
- $PBExportComments$供应商价格管理
- forward
- global type w_mtrl_spt_name from w_publ_1ton_share_detail
- end type
- type cb_save from uo_imflatbutton within w_mtrl_spt_name
- end type
- type st_2 from statictext within w_mtrl_spt_name
- end type
- type ddlb_storageid from uo_ddlb_storageid within w_mtrl_spt_name
- end type
- type cb_addmx from uo_imflatbutton within w_mtrl_spt_name
- end type
- type cb_delmx from uo_imflatbutton within w_mtrl_spt_name
- end type
- end forward
- global type w_mtrl_spt_name from w_publ_1ton_share_detail
- string title = "供应商物料别名"
- cb_save cb_save
- st_2 st_2
- ddlb_storageid ddlb_storageid
- cb_addmx cb_addmx
- cb_delmx cb_delmx
- end type
- global w_mtrl_spt_name w_mtrl_spt_name
- type variables
- Long mtrl_id //物料ID
- Long cur_storageid_arr[]
- end variables
- forward prototypes
- public subroutine wf_addlog_tempfilepathname (string arg_filepathname)
- end prototypes
- public subroutine wf_addlog_tempfilepathname (string arg_filepathname);
- end subroutine
- on w_mtrl_spt_name.create
- int iCurrent
- call super::create
- this.cb_save=create cb_save
- this.st_2=create st_2
- this.ddlb_storageid=create ddlb_storageid
- this.cb_addmx=create cb_addmx
- this.cb_delmx=create cb_delmx
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.cb_save
- this.Control[iCurrent+2]=this.st_2
- this.Control[iCurrent+3]=this.ddlb_storageid
- this.Control[iCurrent+4]=this.cb_addmx
- this.Control[iCurrent+5]=this.cb_delmx
- end on
- on w_mtrl_spt_name.destroy
- call super::destroy
- destroy(this.cb_save)
- destroy(this.st_2)
- destroy(this.ddlb_storageid)
- destroy(this.cb_addmx)
- destroy(this.cb_delmx)
- 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(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_nextpage_enabled,cb_retrieveall_enabled
- Boolean 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.Retrieve(cur_storageid_arr)
- IF dw_pageretr.RowCount() > 0 THEN
- dw_pageretr.SetRow(1)
- dw_pageretr.TriggerEvent(RowFocusChanged!)
- END IF
- 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]
- mtrl_id = uc_relid
- dw_child.SetRedraw (FALSE)
- if dw_child.Retrieve(uc_relid) > 0 then
- dw_child.selectrow(0,false)
- dw_child.selectrow(1,true)
- end if
- dw_child.SetRedraw (TRUE)
- ELSE
- dw_child.Reset()
- END IF
- end event
- event 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
- dw_pageretr.height = this.height - dw_pageretr.y - 120
- dw_child.height = this.height - dw_child.y - 120
- end event
- event open;call super::open;s_hide_col s_col
- s_col.col_1 = 'v_maxprice_sptprice_price'
- f_hide_col(121,dw_pageretr,s_col)
- s_col.col_1 = 'u_spt_price_fprice'
- s_col.col_2 = 'u_spt_price_zqrate'
- s_col.col_3 = 'u_spt_price_price'
-
- f_hide_col(121,dw_child,s_col)
- end event
- type cb_func from w_publ_1ton_share_detail`cb_func within w_mtrl_spt_name
- end type
- type cb_exit from w_publ_1ton_share_detail`cb_exit within w_mtrl_spt_name
- integer x = 782
- end type
- type sle_usual_query from w_publ_1ton_share_detail`sle_usual_query within w_mtrl_spt_name
- integer x = 1019
- integer width = 613
- end type
- type cb_retrieveall from w_publ_1ton_share_detail`cb_retrieveall within w_mtrl_spt_name
- integer x = 1234
- integer width = 142
- end type
- type em_pagerowno from w_publ_1ton_share_detail`em_pagerowno within w_mtrl_spt_name
- integer x = 933
- end type
- type dw_pageretr from w_publ_1ton_share_detail`dw_pageretr within w_mtrl_spt_name
- integer x = 0
- integer width = 1472
- integer height = 1880
- string title = "物料摘要内容"
- string dataobject = "dw_mtrl_spt_name_index"
- end type
- type st_1 from w_publ_1ton_share_detail`st_1 within w_mtrl_spt_name
- integer x = 837
- integer width = 206
- string text = "编码含"
- end type
- type cb_nextpage from w_publ_1ton_share_detail`cb_nextpage within w_mtrl_spt_name
- integer x = 1376
- end type
- type dw_uc from w_publ_1ton_share_detail`dw_uc within w_mtrl_spt_name
- integer x = 1477
- integer width = 2117
- integer height = 420
- string dataobject = "dw_mtrl_spt_name_edit"
- end type
- type gb_2 from w_publ_1ton_share_detail`gb_2 within w_mtrl_spt_name
- integer x = 288
- integer y = 752
- integer width = 594
- integer height = 808
- string text = "物料摘要内容"
- end type
- type dw_child from w_publ_1ton_share_detail`dw_child within w_mtrl_spt_name
- integer x = 1477
- integer y = 712
- integer width = 2117
- integer height = 1460
- string title = "供应商物料名称"
- string dataobject = "dw_mtrl_spt_name_mx"
- 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_name
- boolean visible = false
- integer x = 745
- integer y = 1116
- boolean enabled = false
- end type
- type cb_print from w_publ_1ton_share_detail`cb_print within w_mtrl_spt_name
- boolean visible = false
- integer x = 494
- integer y = 1116
- boolean enabled = false
- end type
- type cb_add from w_publ_1ton_share_detail`cb_add within w_mtrl_spt_name
- boolean visible = false
- integer x = 219
- integer y = 952
- boolean enabled = false
- end type
- type cb_edit from w_publ_1ton_share_detail`cb_edit within w_mtrl_spt_name
- boolean visible = false
- integer x = 1170
- integer y = 904
- boolean enabled = false
- end type
- type cb_delet from w_publ_1ton_share_detail`cb_delet within w_mtrl_spt_name
- boolean visible = false
- integer x = 448
- integer y = 980
- boolean enabled = false
- end type
- type cb_addzy from w_publ_1ton_share_detail`cb_addzy within w_mtrl_spt_name
- boolean visible = false
- integer x = 759
- integer y = 908
- boolean enabled = false
- end type
- type cb_auditing from w_publ_1ton_share_detail`cb_auditing within w_mtrl_spt_name
- boolean visible = false
- integer x = 475
- integer y = 444
- boolean enabled = false
- end type
- type cb_xm from w_publ_1ton_share_detail`cb_xm within w_mtrl_spt_name
- boolean visible = false
- integer x = 1797
- boolean enabled = false
- end type
- type cb_retrieve from w_publ_1ton_share_detail`cb_retrieve within w_mtrl_spt_name
- end type
- type cb_xls from w_publ_1ton_share_detail`cb_xls within w_mtrl_spt_name
- boolean visible = false
- integer x = 329
- integer y = 680
- boolean enabled = false
- end type
- type cb_help from w_publ_1ton_share_detail`cb_help within w_mtrl_spt_name
- integer x = 631
- end type
- type cb_auditing_cancel from w_publ_1ton_share_detail`cb_auditing_cancel within w_mtrl_spt_name
- boolean visible = false
- integer x = 1591
- boolean enabled = false
- end type
- type p_msg from w_publ_1ton_share_detail`p_msg within w_mtrl_spt_name
- end type
- type p_help from w_publ_1ton_share_detail`p_help within w_mtrl_spt_name
- end type
- type p_encl from w_publ_1ton_share_detail`p_encl within w_mtrl_spt_name
- end type
- type p_other from w_publ_1ton_share_detail`p_other within w_mtrl_spt_name
- end type
- type gb_3 from w_publ_1ton_share_detail`gb_3 within w_mtrl_spt_name
- integer width = 773
- end type
- type ln_bar from w_publ_1ton_share_detail`ln_bar within w_mtrl_spt_name
- end type
- type ln_bar2 from w_publ_1ton_share_detail`ln_bar2 within w_mtrl_spt_name
- end type
- type r_bar from w_publ_1ton_share_detail`r_bar within w_mtrl_spt_name
- end type
- type ln_1 from w_publ_1ton_share_detail`ln_1 within w_mtrl_spt_name
- end type
- type ln_2 from w_publ_1ton_share_detail`ln_2 within w_mtrl_spt_name
- end type
- type cb_save from uo_imflatbutton within w_mtrl_spt_name
- boolean visible = false
- integer x = 837
- integer y = 728
- integer width = 283
- integer height = 104
- integer taborder = 280
- boolean bringtotop = true
- boolean enabled = false
- string text = "保存[&S]"
- end type
- type st_2 from statictext within w_mtrl_spt_name
- integer x = 27
- integer y = 204
- 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 ddlb_storageid from uo_ddlb_storageid within w_mtrl_spt_name
- integer x = 215
- integer y = 192
- integer width = 613
- integer height = 748
- integer taborder = 20
- 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
- type cb_addmx from uo_imflatbutton within w_mtrl_spt_name
- integer x = 302
- integer width = 165
- integer height = 164
- integer taborder = 40
- boolean bringtotop = true
- string text = "增加"
- string normalpicname = "new.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;IF NOT f_power_ind(631) THEN
- MessageBox('提示','你没有使用权限!',information!,ok!)
- RETURN
- END IF
- Long ll_mtrlid
- Int row
- row = dw_pageretr.GetRow()
- IF row <= 0 THEN RETURN 1
- ll_mtrlid = dw_pageretr.Object.mtrlid[row]
- OpenWithParm(w_add_sptmtrlname,ll_mtrlid)
- PARENT.TriggerEvent('retrieve_childdw')
- dw_edit_mode = FALSE
- end event
- type cb_delmx from uo_imflatbutton within w_mtrl_spt_name
- integer x = 466
- integer width = 165
- integer height = 164
- integer taborder = 40
- 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 NOT f_power_ind(631) THEN
- MessageBox('提示','你没有使用权限!',information!,ok!)
- RETURN
- END IF
- Long ll_mtrlid,ll_sptid
- Int row_pageretr,row_child
- row_pageretr = dw_pageretr.GetRow()
- row_child = dw_child.GetRow()
- IF row_pageretr <= 0 OR row_child <= 0 THEN
- MessageBox('提示','没有可清除的数据',information!,ok!)
- RETURN
- END IF
- ll_mtrlid = dw_pageretr.Object.mtrlid[row_pageretr]
- ll_sptid = dw_child.Object.u_sptmtrlname_sptid[row_child]
- IF MessageBox('询问','确认清除物料所属供应商的名称吗',Question!,OkCancel!) = 1 THEN
- DELETE FROM u_sptmtrlname
- WHERE sptid = :ll_sptid
- AND mtrlid = :ll_mtrlid;
- IF sqlca.SQLCode <> 0 THEN
- MessageBox('错误', '因网络和其它原因,清除物料所属供应商的名称失败'+sqlca.SQLErrText,stopsign!,ok!)
- RETURN
- ELSE
- MessageBox('提示','清除成功',information!,ok!)
- cb_retrieve.TriggerEvent(Clicked!)
- END IF
- END IF
- end event
|