123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199 |
- $PBExportHeader$w_oa_workremind.srw
- forward
- global type w_oa_workremind from window
- end type
- type cb_exit from uo_imflatbutton within w_oa_workremind
- end type
- type st_1 from statictext within w_oa_workremind
- end type
- type dw_1 from datawindow within w_oa_workremind
- end type
- end forward
- global type w_oa_workremind from window
- integer width = 2410
- integer height = 1482
- boolean titlebar = true
- string title = "工作提醒"
- boolean controlmenu = true
- windowtype windowtype = popup!
- long backcolor = 67108864
- string icon = "AppIcon!"
- boolean center = true
- cb_exit cb_exit
- st_1 st_1
- dw_1 dw_1
- end type
- global w_oa_workremind w_oa_workremind
- type variables
- uo_oa_workremind u_wrm
- end variables
- on w_oa_workremind.create
- this.cb_exit=create cb_exit
- this.st_1=create st_1
- this.dw_1=create dw_1
- this.Control[]={this.cb_exit,&
- this.st_1,&
- this.dw_1}
- end on
- on w_oa_workremind.destroy
- destroy(this.cb_exit)
- destroy(this.st_1)
- destroy(this.dw_1)
- end on
- event open;
- Boolean rslt = TRUE
- u_wrm = CREATE uo_oa_workremind
- String ls_wrmList,arg_msg,ls_funcname
- String ls_wrmId[],ls_showMsg = ''
- Long cnt,cnt2,ll_funcid,cnt_notice
- Long ll_wrmid
- Int li_ifdftwin, li_ifautoopen
- s_userworkremindrslt ls_result[] ,empty[]
- //得到用户订阅列表
- IF NOT u_wrm.uf_get_userworkremind(REF ls_wrmList,publ_userid,REF arg_msg) THEN
- MessageBox('',arg_msg)
- RETURN
- END IF
- f_oa_workremind_splitstr(ls_wrmList,',',ls_wrmId)
- FOR cnt = 1 TO UpperBound(ls_wrmId)
- ls_result = empty
- ls_funcname = ''
- ll_funcid = -1
- ll_wrmid = Long(ls_wrmId[cnt])
-
- //查询订阅的定义资料
- SELECT funcid,winname, ifdftwin, ifautoopen
- INTO :ll_funcid,:ls_funcname , :li_ifdftwin, :li_ifautoopen
- FROM oa_workreminddef
- Where wrmid = :ll_wrmid;
- IF sqlca.SQLCode <> 0 THEN
- //MessageBox('ERROR',"查询订阅的定义信息失败,"+sqlca.sqlerrtext)
- CONTINUE
- END IF
-
-
- If (u_wrm.uf_retr_userworkremind(ll_wrmid,REF ls_result,REF ls_funcname,REF ll_funcid,REF arg_msg)) THEN
- FOR cnt2 = 1 TO UpperBound(ls_result)
- cnt_notice = dw_1.InsertRow(0)
- dw_1.Object.notice[cnt_notice] = ls_result[cnt2].result
- IF li_ifdftwin = 1 THEN
- dw_1.Object.funcname[cnt_notice] = "自定义提醒明细窗口"
- dw_1.Object.funcid[cnt_notice] = 809 //默认的提醒窗口ID
- ELSE
- dw_1.Object.funcname[cnt_notice] = ls_funcname
- dw_1.Object.funcid[cnt_notice] = ll_funcid
- END IF
- dw_1.Object.wrmid[cnt_notice] = ll_wrmid
- NEXT
-
- IF li_ifautoopen = 1 THEN
- IF li_ifdftwin = 1 THEN
- ll_funcid = 809
-
- s_edit_index_tran s_tran //翻页功能窗口 传递参数使用
- s_tran.if_retrieve_all = TRUE //是否一次RETRIEVE所有行
- s_tran.work_mode = 0 //0-单纯编辑模式, 1-选择模式
- s_tran.arg_pkid = ll_wrmid //目标定位PKID (备用)
- s_tran.arg_string_code = '' //查询列部分内容,用于初步筛选
- s_tran.mainid = ll_funcid
-
-
- OpenWithParm(w_oa_workremind_dftwin, s_tran)
- ELSE
- f_sys_main(ll_funcid)
- END IF
- END IF
-
- END IF
-
-
- NEXT
- IF dw_1.RowCount() = 0 THEN
- dw_1.Visible = FALSE
- st_1.Visible = TRUE
- st_1.Text = "当前没有新的提醒!"
- ELSE
- dw_1.Visible = TRUE
- st_1.Visible = FALSE
- END IF
- end event
- type cb_exit from uo_imflatbutton within w_oa_workremind
- integer x = 1031
- integer y = 1267
- integer width = 325
- integer height = 112
- integer taborder = 20
- boolean default = true
- end type
- event clicked;call super::clicked;close(parent)
- end event
- type st_1 from statictext within w_oa_workremind
- boolean visible = false
- integer x = 7
- integer width = 1631
- integer height = 490
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- boolean focusrectangle = false
- end type
- type dw_1 from datawindow within w_oa_workremind
- integer width = 2399
- integer height = 1245
- integer taborder = 10
- string title = "none"
- string dataobject = "dw_oa_workremind_notice_ff"
- boolean livescroll = true
- borderstyle borderstyle = stylelowered!
- end type
- event doubleclicked;dw_1.SelectRow(0,FALSE)
- dw_1.SelectRow(row,TRUE)
- dw_1.SetRow(row)
- IF row > 0 THEN
- Long ll_funcid, ll_wrmid
- ll_funcid = Long(dw_1.Object.funcid[row])
- ll_wrmid = dw_1.Object.wrmid[row]
- IF ll_funcid = 809 THEN
-
-
- s_edit_index_tran s_tran //翻页功能窗口 传递参数使用
- s_tran.if_retrieve_all = TRUE //是否一次RETRIEVE所有行
- s_tran.work_mode = 0 //0-单纯编辑模式, 1-选择模式
- s_tran.arg_pkid = ll_wrmid //目标定位PKID (备用)
- s_tran.arg_string_code = '' //查询列部分内容,用于初步筛选
- s_tran.mainid = ll_funcid
-
-
- OpenWithParm(w_oa_workremind_dftwin, s_tran)
- ELSE
- if ll_funcid = 0 then return//未设定模块或者设定的模块id为0,会报错
- f_sys_main(ll_funcid)
- END IF
- END IF
- end event
|