w_oa_workremind.srw 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. $PBExportHeader$w_oa_workremind.srw
  2. forward
  3. global type w_oa_workremind from window
  4. end type
  5. type cb_exit from uo_imflatbutton within w_oa_workremind
  6. end type
  7. type st_1 from statictext within w_oa_workremind
  8. end type
  9. type dw_1 from datawindow within w_oa_workremind
  10. end type
  11. end forward
  12. global type w_oa_workremind from window
  13. integer width = 2410
  14. integer height = 1482
  15. boolean titlebar = true
  16. string title = "工作提醒"
  17. boolean controlmenu = true
  18. windowtype windowtype = popup!
  19. long backcolor = 67108864
  20. string icon = "AppIcon!"
  21. boolean center = true
  22. cb_exit cb_exit
  23. st_1 st_1
  24. dw_1 dw_1
  25. end type
  26. global w_oa_workremind w_oa_workremind
  27. type variables
  28. uo_oa_workremind u_wrm
  29. end variables
  30. on w_oa_workremind.create
  31. this.cb_exit=create cb_exit
  32. this.st_1=create st_1
  33. this.dw_1=create dw_1
  34. this.Control[]={this.cb_exit,&
  35. this.st_1,&
  36. this.dw_1}
  37. end on
  38. on w_oa_workremind.destroy
  39. destroy(this.cb_exit)
  40. destroy(this.st_1)
  41. destroy(this.dw_1)
  42. end on
  43. event open;
  44. Boolean rslt = TRUE
  45. u_wrm = CREATE uo_oa_workremind
  46. String ls_wrmList,arg_msg,ls_funcname
  47. String ls_wrmId[],ls_showMsg = ''
  48. Long cnt,cnt2,ll_funcid,cnt_notice
  49. Long ll_wrmid
  50. Int li_ifdftwin, li_ifautoopen
  51. s_userworkremindrslt ls_result[] ,empty[]
  52. //得到用户订阅列表
  53. IF NOT u_wrm.uf_get_userworkremind(REF ls_wrmList,publ_userid,REF arg_msg) THEN
  54. MessageBox('',arg_msg)
  55. RETURN
  56. END IF
  57. f_oa_workremind_splitstr(ls_wrmList,',',ls_wrmId)
  58. FOR cnt = 1 TO UpperBound(ls_wrmId)
  59. ls_result = empty
  60. ls_funcname = ''
  61. ll_funcid = -1
  62. ll_wrmid = Long(ls_wrmId[cnt])
  63. //查询订阅的定义资料
  64. SELECT funcid,winname, ifdftwin, ifautoopen
  65. INTO :ll_funcid,:ls_funcname , :li_ifdftwin, :li_ifautoopen
  66. FROM oa_workreminddef
  67. Where wrmid = :ll_wrmid;
  68. IF sqlca.SQLCode <> 0 THEN
  69. //MessageBox('ERROR',"查询订阅的定义信息失败,"+sqlca.sqlerrtext)
  70. CONTINUE
  71. END IF
  72. If (u_wrm.uf_retr_userworkremind(ll_wrmid,REF ls_result,REF ls_funcname,REF ll_funcid,REF arg_msg)) THEN
  73. FOR cnt2 = 1 TO UpperBound(ls_result)
  74. cnt_notice = dw_1.InsertRow(0)
  75. dw_1.Object.notice[cnt_notice] = ls_result[cnt2].result
  76. IF li_ifdftwin = 1 THEN
  77. dw_1.Object.funcname[cnt_notice] = "自定义提醒明细窗口"
  78. dw_1.Object.funcid[cnt_notice] = 809 //默认的提醒窗口ID
  79. ELSE
  80. dw_1.Object.funcname[cnt_notice] = ls_funcname
  81. dw_1.Object.funcid[cnt_notice] = ll_funcid
  82. END IF
  83. dw_1.Object.wrmid[cnt_notice] = ll_wrmid
  84. NEXT
  85. IF li_ifautoopen = 1 THEN
  86. IF li_ifdftwin = 1 THEN
  87. ll_funcid = 809
  88. s_edit_index_tran s_tran //翻页功能窗口 传递参数使用
  89. s_tran.if_retrieve_all = TRUE //是否一次RETRIEVE所有行
  90. s_tran.work_mode = 0 //0-单纯编辑模式, 1-选择模式
  91. s_tran.arg_pkid = ll_wrmid //目标定位PKID (备用)
  92. s_tran.arg_string_code = '' //查询列部分内容,用于初步筛选
  93. s_tran.mainid = ll_funcid
  94. OpenWithParm(w_oa_workremind_dftwin, s_tran)
  95. ELSE
  96. f_sys_main(ll_funcid)
  97. END IF
  98. END IF
  99. END IF
  100. NEXT
  101. IF dw_1.RowCount() = 0 THEN
  102. dw_1.Visible = FALSE
  103. st_1.Visible = TRUE
  104. st_1.Text = "当前没有新的提醒!"
  105. ELSE
  106. dw_1.Visible = TRUE
  107. st_1.Visible = FALSE
  108. END IF
  109. end event
  110. type cb_exit from uo_imflatbutton within w_oa_workremind
  111. integer x = 1031
  112. integer y = 1267
  113. integer width = 325
  114. integer height = 112
  115. integer taborder = 20
  116. boolean default = true
  117. end type
  118. event clicked;call super::clicked;close(parent)
  119. end event
  120. type st_1 from statictext within w_oa_workremind
  121. boolean visible = false
  122. integer x = 7
  123. integer width = 1631
  124. integer height = 490
  125. integer textsize = -9
  126. integer weight = 400
  127. fontcharset fontcharset = gb2312charset!
  128. fontpitch fontpitch = variable!
  129. string facename = "宋体"
  130. long textcolor = 33554432
  131. long backcolor = 67108864
  132. boolean focusrectangle = false
  133. end type
  134. type dw_1 from datawindow within w_oa_workremind
  135. integer width = 2399
  136. integer height = 1245
  137. integer taborder = 10
  138. string title = "none"
  139. string dataobject = "dw_oa_workremind_notice_ff"
  140. boolean livescroll = true
  141. borderstyle borderstyle = stylelowered!
  142. end type
  143. event doubleclicked;dw_1.SelectRow(0,FALSE)
  144. dw_1.SelectRow(row,TRUE)
  145. dw_1.SetRow(row)
  146. IF row > 0 THEN
  147. Long ll_funcid, ll_wrmid
  148. ll_funcid = Long(dw_1.Object.funcid[row])
  149. ll_wrmid = dw_1.Object.wrmid[row]
  150. IF ll_funcid = 809 THEN
  151. s_edit_index_tran s_tran //翻页功能窗口 传递参数使用
  152. s_tran.if_retrieve_all = TRUE //是否一次RETRIEVE所有行
  153. s_tran.work_mode = 0 //0-单纯编辑模式, 1-选择模式
  154. s_tran.arg_pkid = ll_wrmid //目标定位PKID (备用)
  155. s_tran.arg_string_code = '' //查询列部分内容,用于初步筛选
  156. s_tran.mainid = ll_funcid
  157. OpenWithParm(w_oa_workremind_dftwin, s_tran)
  158. ELSE
  159. if ll_funcid = 0 then return//未设定模块或者设定的模块id为0,会报错
  160. f_sys_main(ll_funcid)
  161. END IF
  162. END IF
  163. end event