$PBExportHeader$w_msg_billcode_rel.srw forward global type w_msg_billcode_rel from w_publ_base end type type dw_msg from u_dw_rbtnfilter within w_msg_billcode_rel end type type tab_1 from tab within w_msg_billcode_rel end type type tabpage_1 from userobject within tab_1 end type type dw_msg_content from multilineedit within tabpage_1 end type type tabpage_1 from userobject within tab_1 dw_msg_content dw_msg_content end type type tabpage_2 from userobject within tab_1 end type type lv_in_fj from uo_msg_lv within tabpage_2 end type type tabpage_2 from userobject within tab_1 lv_in_fj lv_in_fj end type type tabpage_3 from userobject within tab_1 end type type dw_cmmt from u_dw_rbtnfilter within tabpage_3 end type type tabpage_3 from userobject within tab_1 dw_cmmt dw_cmmt end type type tab_1 from tab within w_msg_billcode_rel tabpage_1 tabpage_1 tabpage_2 tabpage_2 tabpage_3 tabpage_3 end type type st_billcode from statictext within w_msg_billcode_rel end type type st_2 from statictext within w_msg_billcode_rel end type end forward global type w_msg_billcode_rel from w_publ_base integer width = 2587 integer height = 2036 string title = "单据相关消息" boolean minbox = false windowtype windowtype = response! dw_msg dw_msg tab_1 tab_1 st_billcode st_billcode st_2 st_2 end type global w_msg_billcode_rel w_msg_billcode_rel forward prototypes public subroutine wf_read () public subroutine wf_rtr_cmmt () end prototypes public subroutine wf_read ();String char_enter,ls_msg,ls_s_msg Long ls_msgid,currentrow char_enter = Char(13)+Char(10) currentrow = dw_msg.GetRow() tab_1.tabpage_2.lv_in_fj.DeleteItems() IF currentrow > 0 THEN dw_msg.SetRow(currentrow) dw_msg.SelectRow(0,FALSE) dw_msg.SelectRow(currentrow,TRUE) tab_1.tabpage_1.dw_msg_content.Text = '' ls_msgid = dw_msg.Object.msgid[currentrow] SELECT s_msg INTO :ls_s_msg FROM Sys_admsg WHERE Sys_admsg.msgid = :ls_msgid; IF sqlca.SQLCode <> 0 THEN ls_s_msg = '' ls_msg = '**'+dw_msg.Object.s_msgtitle[currentrow]+'**' + char_enter + " "+ls_s_msg //dw_msg.object.sys_admsgmx_s_msg [row] tab_1.tabpage_1.dw_msg_content.Text = ls_msg //附件列表 Long count,ls_i Long ll_arr_fjid[] Int li_arr_filetype[] String ls_arr_filename[] listviewitem l_lvi DECLARE fj_cur CURSOR FOR SELECT fjid, filename, filetype FROM Sys_admsg_fj Where ( Sys_admsg_fj.msgid = :ls_msgid ); OPEN fj_cur; count = 1 FETCH fj_cur INTO :ll_arr_fjid[count],& :ls_arr_filename[count],& :li_arr_filetype[count]; DO WHILE sqlca.SQLCode = 0 count++ FETCH fj_cur INTO :ll_arr_fjid[count],& :ls_arr_filename[count],& :li_arr_filetype[count]; LOOP count = count - 1 CLOSE fj_cur; IF count > 0 THEN tab_1.tabpage_2.Text = '附件('+String(count)+')' ELSE tab_1.tabpage_2.Text = '附件' END IF FOR ls_i = 1 TO count l_lvi.Label = ls_arr_filename[ls_i] l_lvi.Data = ll_arr_fjid[ls_i] IF li_arr_filetype[ls_i] = 1 THEN //超链接时用第二种图标 l_lvi.PictureIndex = 2 ELSE l_lvi.PictureIndex = 1 END IF tab_1.tabpage_2.lv_in_fj.InsertItem(ls_i,l_lvi) NEXT END IF end subroutine public subroutine wf_rtr_cmmt ();Long ll_row,ll_msgid dw_msg.AcceptText() ll_row = dw_msg.GetRow() IF ll_row <= 0 THEN tab_1.tabpage_3.dw_cmmt.Reset() ELSE ll_msgid = dw_msg.Object.msgid[ll_row] tab_1.tabpage_3.dw_cmmt.Retrieve(ll_msgid) END IF end subroutine event open;call super::open;String ls_billcode ls_billcode = Message.StringParm st_billcode.text = '单号:'+ls_billcode dw_msg.SetTransObject(sqlca) tab_1.tabpage_3.dw_cmmt.SetTransObject(sqlca) IF dw_msg.Retrieve(ls_billcode) > 0 THEN dw_msg.SelectRow(0,FALSE) dw_msg.SetRow(1) dw_msg.SelectRow(1,TRUE) END IF wf_read() wf_rtr_cmmt() end event on w_msg_billcode_rel.create int iCurrent call super::create this.dw_msg=create dw_msg this.tab_1=create tab_1 this.st_billcode=create st_billcode this.st_2=create st_2 iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.dw_msg this.Control[iCurrent+2]=this.tab_1 this.Control[iCurrent+3]=this.st_billcode this.Control[iCurrent+4]=this.st_2 end on on w_msg_billcode_rel.destroy call super::destroy destroy(this.dw_msg) destroy(this.tab_1) destroy(this.st_billcode) destroy(this.st_2) end on type cb_func from w_publ_base`cb_func within w_msg_billcode_rel integer x = 677 integer y = 784 end type type cb_exit from w_publ_base`cb_exit within w_msg_billcode_rel integer x = 1033 integer y = 680 end type type dw_msg from u_dw_rbtnfilter within w_msg_billcode_rel integer y = 108 integer width = 2569 integer height = 844 boolean bringtotop = true string dataobject = "dw_msg_billcode_rel" boolean hscrollbar = true boolean vscrollbar = true boolean hsplitscroll = true end type event rowfocuschanged;call super::rowfocuschanged;IF currentrow > 0 THEN THIS.SelectRow(0,FALSE) THIS.SelectRow(currentrow,TRUE) THIS.SetRow(currentrow) END IF wf_read() wf_rtr_cmmt() end event type tab_1 from tab within w_msg_billcode_rel integer y = 960 integer width = 2569 integer height = 980 integer taborder = 20 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long backcolor = 134217739 boolean raggedright = true boolean focusonbuttondown = true integer selectedtab = 1 tabpage_1 tabpage_1 tabpage_2 tabpage_2 tabpage_3 tabpage_3 end type on tab_1.create this.tabpage_1=create tabpage_1 this.tabpage_2=create tabpage_2 this.tabpage_3=create tabpage_3 this.Control[]={this.tabpage_1,& this.tabpage_2,& this.tabpage_3} end on on tab_1.destroy destroy(this.tabpage_1) destroy(this.tabpage_2) destroy(this.tabpage_3) end on type tabpage_1 from userobject within tab_1 integer x = 18 integer y = 96 integer width = 2533 integer height = 868 long backcolor = 134217739 string text = "内容" long tabtextcolor = 33554432 long tabbackcolor = 134217739 long picturemaskcolor = 536870912 dw_msg_content dw_msg_content end type on tabpage_1.create this.dw_msg_content=create dw_msg_content this.Control[]={this.dw_msg_content} end on on tabpage_1.destroy destroy(this.dw_msg_content) end on type dw_msg_content from multilineedit within tabpage_1 integer width = 2533 integer height = 868 integer taborder = 10 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long backcolor = 16777215 boolean vscrollbar = true borderstyle borderstyle = stylelowered! end type type tabpage_2 from userobject within tab_1 integer x = 18 integer y = 96 integer width = 2533 integer height = 868 long backcolor = 134217739 string text = "附件" long tabtextcolor = 33554432 long tabbackcolor = 134217739 long picturemaskcolor = 536870912 lv_in_fj lv_in_fj end type on tabpage_2.create this.lv_in_fj=create lv_in_fj this.Control[]={this.lv_in_fj} end on on tabpage_2.destroy destroy(this.lv_in_fj) end on type lv_in_fj from uo_msg_lv within tabpage_2 integer width = 2533 integer height = 868 integer taborder = 10 long textcolor = 0 long backcolor = 16777215 end type type tabpage_3 from userobject within tab_1 integer x = 18 integer y = 96 integer width = 2533 integer height = 868 long backcolor = 134217739 string text = "相关确认" long tabtextcolor = 33554432 long tabbackcolor = 134217739 long picturemaskcolor = 536870912 dw_cmmt dw_cmmt end type on tabpage_3.create this.dw_cmmt=create dw_cmmt this.Control[]={this.dw_cmmt} end on on tabpage_3.destroy destroy(this.dw_cmmt) end on type dw_cmmt from u_dw_rbtnfilter within tabpage_3 integer width = 2533 integer height = 868 integer taborder = 20 string dataobject = "dw_msg_billcode_rel_user_cmmt" boolean hscrollbar = true boolean vscrollbar = true end type event rowfocuschanged;call super::rowfocuschanged;IF currentrow <= 0 THEN RETURN THIS.SelectRow(0,FALSE) THIS.SelectRow(currentrow,TRUE) end event type st_billcode from statictext within w_msg_billcode_rel integer x = 5 integer y = 4 integer width = 2555 integer height = 96 boolean bringtotop = true integer textsize = -12 integer weight = 700 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 alignment alignment = center! boolean border = true borderstyle borderstyle = styleraised! boolean focusrectangle = false end type type st_2 from statictext within w_msg_billcode_rel integer width = 2569 integer height = 108 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 alignment alignment = center! boolean border = true boolean focusrectangle = false end type