123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540 |
- $PBExportHeader$w_deal_admsg.srw
- forward
- global type w_deal_admsg from window
- end type
- type cb_1 from uo_imflatbutton within w_deal_admsg
- end type
- type cb_retrieve from uo_imflatbutton within w_deal_admsg
- end type
- type em_mm from editmask within w_deal_admsg
- end type
- type st_2 from statictext within w_deal_admsg
- end type
- type st_1 from statictext within w_deal_admsg
- end type
- type cb_2 from uo_imflatbutton within w_deal_admsg
- end type
- type tab_1 from tab within w_deal_admsg
- end type
- type tabpage_1 from userobject within tab_1
- end type
- type dw_m0 from datawindow within tabpage_1
- end type
- type tabpage_1 from userobject within tab_1
- dw_m0 dw_m0
- end type
- type tabpage_2 from userobject within tab_1
- end type
- type cbx_showmeredeal from checkbox within tabpage_2
- end type
- type mle_admsg from multilineedit within tabpage_2
- end type
- type dw_m1 from datawindow within tabpage_2
- end type
- type tabpage_2 from userobject within tab_1
- cbx_showmeredeal cbx_showmeredeal
- mle_admsg mle_admsg
- dw_m1 dw_m1
- end type
- type tab_1 from tab within w_deal_admsg
- tabpage_1 tabpage_1
- tabpage_2 tabpage_2
- end type
- end forward
- global type w_deal_admsg from window
- integer x = 59
- integer y = 464
- integer width = 1993
- integer height = 1448
- boolean titlebar = true
- string title = "消息"
- boolean controlmenu = true
- boolean minbox = true
- windowtype windowtype = popup!
- long backcolor = 81324524
- cb_1 cb_1
- cb_retrieve cb_retrieve
- em_mm em_mm
- st_2 st_2
- st_1 st_1
- cb_2 cb_2
- tab_1 tab_1
- end type
- global w_deal_admsg w_deal_admsg
- type variables
- uo_transmsg uo_itransmsg
- uo_workremind uo_mind
- int retrieve_mm=5
- end variables
- forward prototypes
- public function integer wf_retr_dw_m1 ()
- public function integer wf_retr_dw_m0 ()
- public function integer wf_retrieve ()
- end prototypes
- public function integer wf_retr_dw_m1 ();int ls_dealflag
- if tab_1.tabpage_2.cbx_showmeredeal.checked then
- ls_dealflag=0
- else
- ls_dealflag=-1
- end if
- tab_1.tabpage_2.dw_m1.RETRIEVE(sys_empid,ls_dealflag)
- long row
- string char_enter,ls_msg
- long ls_msgid,ls_empid,ls_senddtint
- string ls_s_msg
- char_enter=char(13)+char(10)
- row=tab_1.tabpage_2.dw_m1.getrow()
- IF row >0 THEN
- ls_msgid=tab_1.tabpage_2.dw_m1.object.sys_admsgmx_msgid[row]
- ls_empid=tab_1.tabpage_2.dw_m1.object.sys_admsgmx_empid[row]
- ls_senddtint=tab_1.tabpage_2.dw_m1.object.sys_admsgmx_senddtint[row]
- select s_msg into :ls_s_msg from Sys_admsgmx
- where Sys_admsgmx.msgid=:ls_msgid
- and Sys_admsgmx.empid=:ls_empid
- and Sys_admsgmx.senddtint=:ls_senddtint;
-
- if sqlca.sqlcode<>0 then ls_s_msg=''
-
-
- ls_msg='**'+tab_1.tabpage_2.dw_m1.object.sys_admsgmx_s_msgtitle[row]+'**' + char_enter + " "+ls_s_msg
- tab_1.tabpage_2.mle_admsg.text=ls_msg
- else
- tab_1.tabpage_2.mle_admsg.text=''
- end if
- return 1
- end function
- public function integer wf_retr_dw_m0 ();tab_1.tabpage_1.dw_m0.SetTransObject(sqlca)
- tab_1.tabpage_1.dw_m0.Reset()
- Long ll_i
- Long ll_scid
- Long ll_storageid
- Long ll_powerid
- IF sys_user_scstr = '0' AND sys_user_storagestr = '0' THEN
- else
- uo_mind.f_getwrmdrslt()
- end if
- datastore ds_m0
- ds_m0 = CREATE datastore
- ds_m0.DataObject = 'ds_deal_admsg_0'
- ds_m0.SetTransObject(sqlca)
- ds_m0.Retrieve()
- tab_1.tabpage_1.dw_m0.SetRedraw(FALSE)
- IF sys_user_scstr = '0' AND sys_user_storagestr = '0' THEN
- FOR ll_i = 1 TO ds_m0.RowCount()
- ds_m0.RowsCopy(ll_i,ll_i, Primary!,tab_1.tabpage_1.dw_m0, tab_1.tabpage_1.dw_m0.RowCount() + 1, Primary!)
- NEXT
- ELSE
- FOR ll_i = 1 TO ds_m0.RowCount()
- ll_scid = ds_m0.Object.sys_workremind_scid[ll_i]
- ll_storageid = ds_m0.Object.sys_workremind_storageid[ll_i]
- ll_powerid = ds_m0.Object.sys_workremind_powerid[ll_i]
-
- IF f_power_ind(ll_powerid) THEN
- IF ll_scid = -1 OR sys_user_scstr = '0' OR Pos(sys_user_scstr,','+String(ll_scid)+',') > 0 THEN
- IF ll_storageid = -1 OR sys_user_storagestr = '0' OR Pos(sys_user_storagestr,','+String(ll_storageid)+',') > 0 THEN
- ds_m0.RowsCopy(ll_i,ll_i, Primary!,tab_1.tabpage_1.dw_m0, tab_1.tabpage_1.dw_m0.RowCount() + 1, Primary!)
- END IF
- END IF
- END IF
- NEXT
- END IF
- tab_1.tabpage_1.dw_m0.SetRedraw(TRUE)
- RETURN 1
- end function
- public function integer wf_retrieve ();
- wf_retr_dw_m0()
- wf_retr_dw_m1()
- return 1
- end function
- on w_deal_admsg.create
- this.cb_1=create cb_1
- this.cb_retrieve=create cb_retrieve
- this.em_mm=create em_mm
- this.st_2=create st_2
- this.st_1=create st_1
- this.cb_2=create cb_2
- this.tab_1=create tab_1
- this.Control[]={this.cb_1,&
- this.cb_retrieve,&
- this.em_mm,&
- this.st_2,&
- this.st_1,&
- this.cb_2,&
- this.tab_1}
- end on
- on w_deal_admsg.destroy
- destroy(this.cb_1)
- destroy(this.cb_retrieve)
- destroy(this.em_mm)
- destroy(this.st_2)
- destroy(this.st_1)
- destroy(this.cb_2)
- destroy(this.tab_1)
- end on
- event open;string msg
- uo_mind = create uo_workremind
- tab_1.tabpage_2.dw_m1.settransobject(sqlca)
- cb_retrieve.triggerevent(clicked!)
- timer(60)
- if integer(f_ProfileString (sys_empid,'w_deal_admsg', "x",string(this.x)))=0 then
- this.x=59
- this.y=464
- else
- this.x=integer(f_ProfileString (sys_empid,'w_deal_admsg', "x",string(this.x)))
- this.y=integer(f_ProfileString (sys_empid,'w_deal_admsg', "y",string(this.y)))
- end if
- end event
- event timer;if mod(integer(string(now(),'mm')),retrieve_mm)=0 then
- wf_retrieve()
- end if
- end event
- event close;f_setProfileString (sys_empid,'w_deal_admsg', "x",string(this.x))
- f_setProfileString (sys_empid,'w_deal_admsg', "y",string(this.y))
- destroy uo_mind
- end event
- event activate;this.title='['+publ_operator+']'
- end event
- type cb_1 from uo_imflatbutton within w_deal_admsg
- integer x = 1659
- integer y = 8
- integer width = 279
- integer height = 84
- integer taborder = 30
- string text = "重新统计"
- end type
- event clicked;call super::clicked;IF NOT sys_power_issuper THEN
- MessageBox(publ_operator,'你没有使用权限!')
- RETURN
- END IF
- uo_mind.f_getwrmdrslt()
- cb_retrieve.triggerevent(clicked!)
- end event
- type cb_retrieve from uo_imflatbutton within w_deal_admsg
- integer x = 1074
- integer y = 8
- integer width = 183
- integer height = 84
- integer taborder = 30
- string text = "刷新"
- end type
- event clicked;call super::clicked;wf_Retrieve()
- end event
- type em_mm from editmask within w_deal_admsg
- integer x = 846
- integer y = 8
- integer width = 91
- integer height = 76
- integer taborder = 30
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- string text = "10"
- borderstyle borderstyle = stylelowered!
- string mask = "#0"
- end type
- event constructor;this.text=f_ProfileString (sys_empid,tab_1.tabpage_2.dw_m1.DATAOBJECT, "em_mm",'5')
- retrieve_mm=long(this.text)
- end event
- event modified;IF LONG(THIS.TEXT)>0 THEN
- else
- THIS.TEXT='1'
- end if
- retrieve_mm=LONG(THIS.TEXT)
- f_SetProfileString (sys_empid,tab_1.tabpage_2.dw_m1.DATAOBJECT, "em_mm", THIS.TEXT)
- end event
- type st_2 from statictext within w_deal_admsg
- integer x = 754
- integer y = 24
- integer width = 78
- integer height = 48
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "每"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type st_1 from statictext within w_deal_admsg
- integer x = 946
- integer y = 24
- integer width = 151
- integer height = 48
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "分钟"
- boolean focusrectangle = false
- end type
- type cb_2 from uo_imflatbutton within w_deal_admsg
- integer x = 1298
- integer y = 8
- integer width = 366
- integer height = 84
- integer taborder = 20
- string text = "发起新消息"
- end type
- event clicked;call super::clicked;open(w_new_admsg)
- end event
- type tab_1 from tab within w_deal_admsg
- integer width = 1947
- integer height = 1316
- integer taborder = 10
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long backcolor = 81324524
- boolean raggedright = true
- boolean focusonbuttondown = true
- integer selectedtab = 1
- tabpage_1 tabpage_1
- tabpage_2 tabpage_2
- end type
- on tab_1.create
- this.tabpage_1=create tabpage_1
- this.tabpage_2=create tabpage_2
- this.Control[]={this.tabpage_1,&
- this.tabpage_2}
- end on
- on tab_1.destroy
- destroy(this.tabpage_1)
- destroy(this.tabpage_2)
- end on
- type tabpage_1 from userobject within tab_1
- event create ( )
- event destroy ( )
- integer x = 18
- integer y = 112
- integer width = 1911
- integer height = 1188
- long backcolor = 81324524
- string text = "待处理"
- long tabtextcolor = 33554432
- long tabbackcolor = 81324524
- string picturename = "Custom023!"
- long picturemaskcolor = 536870912
- dw_m0 dw_m0
- end type
- on tabpage_1.create
- this.dw_m0=create dw_m0
- this.Control[]={this.dw_m0}
- end on
- on tabpage_1.destroy
- destroy(this.dw_m0)
- end on
- type dw_m0 from datawindow within tabpage_1
- integer width = 1902
- integer height = 1184
- integer taborder = 20
- string title = "none"
- string dataobject = "dw_deal_admsg_0"
- boolean vscrollbar = true
- boolean livescroll = true
- borderstyle borderstyle = stylelowered!
- end type
- event rowfocuschanged;if currentrow<=0 then return
- this.selectrow(0,false)
- this.selectrow(currentrow,true)
- end event
- event clicked;Long rslt = 1
- Long funcid
- String arg_msg
- IF dwo.Name = 'handle' AND row > 0 THEN
- funcid = tab_1.tabpage_1.dw_m0.Object.sys_workremind_funcid [row]
- f_sys_main(funcid)
- END IF
- THIS.SetRow(row)
- end event
- type tabpage_2 from userobject within tab_1
- event create ( )
- event destroy ( )
- integer x = 18
- integer y = 112
- integer width = 1911
- integer height = 1188
- long backcolor = 81324524
- string text = "消息"
- long tabtextcolor = 33554432
- long tabbackcolor = 81324524
- string picturename = "Custom025!"
- long picturemaskcolor = 536870912
- cbx_showmeredeal cbx_showmeredeal
- mle_admsg mle_admsg
- dw_m1 dw_m1
- end type
- on tabpage_2.create
- this.cbx_showmeredeal=create cbx_showmeredeal
- this.mle_admsg=create mle_admsg
- this.dw_m1=create dw_m1
- this.Control[]={this.cbx_showmeredeal,&
- this.mle_admsg,&
- this.dw_m1}
- end on
- on tabpage_2.destroy
- destroy(this.cbx_showmeredeal)
- destroy(this.mle_admsg)
- destroy(this.dw_m1)
- end on
- type cbx_showmeredeal from checkbox within tabpage_2
- integer x = 18
- integer y = 12
- integer width = 521
- integer height = 60
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "只显示待确认消息"
- boolean checked = true
- end type
- event clicked;wf_retr_dw_m1()
- end event
- type mle_admsg from multilineedit within tabpage_2
- integer y = 796
- integer width = 1902
- integer height = 388
- integer taborder = 20
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- boolean vscrollbar = true
- borderstyle borderstyle = stylelowered!
- end type
- type dw_m1 from datawindow within tabpage_2
- integer y = 88
- integer width = 1902
- integer height = 708
- integer taborder = 20
- string title = "none"
- string dataobject = "dw_deal_admsg_1"
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean livescroll = true
- borderstyle borderstyle = stylelowered!
- end type
- event buttonclicked;long rslt=1,ls_msgid ,ls_empid,ls_senddtint
- string arg_msg
- IF dwo.NAME='bt_deal' and row >0 then
- IF MessageBox ("IF","是否确定要确认当前消息记录?"+' '+string(dw_m1.object.sys_admsgmx_s_msgtitle[row]),Question!,YesNo! ) = 2 THEN RETURN
- ls_msgid=dw_m1.object.sys_admsgmx_msgid[row]
- ls_empid=dw_m1.object.sys_admsgmx_empid[row]
- ls_senddtint=dw_m1.object.sys_admsgmx_senddtint[row]
- rslt=uo_itransmsg.f_redeal_admsg(ls_msgid,ls_senddtint,ls_empid,arg_msg,true)
- if rslt=0 then
- messagebox('系统提示',arg_msg)
- else
- cb_retrieve.triggerevent(clicked!)
- end if
- end if
- end event
- event rowfocuschanged;string char_enter,ls_msg,ls_s_msg
- long ls_msgid,ls_empid,ls_senddtint
- char_enter=char(13)+char(10)
- IF currentrow >0 THEN
- this.SETROW(currentrow)
- this.selectrow(0,false)
- this.selectrow(currentrow,true)
- mle_admsg.text=''
-
- ls_msgid=dw_m1.object.sys_admsgmx_msgid[currentrow]
- ls_empid=dw_m1.object.sys_admsgmx_empid[currentrow]
- ls_senddtint=dw_m1.object.sys_admsgmx_senddtint[currentrow]
- select s_msg into :ls_s_msg from Sys_admsgmx
- where Sys_admsgmx.msgid=:ls_msgid
- and Sys_admsgmx.empid=:ls_empid
- and Sys_admsgmx.senddtint=:ls_senddtint;
-
- if sqlca.sqlcode<>0 then ls_s_msg=''
-
- ls_msg='**'+dw_m1.object.sys_admsgmx_s_msgtitle[currentrow]+'**' + char_enter + " "+ls_s_msg//this.object.sys_admsgmx_s_msg [row]
- mle_admsg.text=ls_msg
- end if
- end event
|