w_msg_list_main.srw 27 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151
  1. $PBExportHeader$w_msg_list_main.srw
  2. forward
  3. global type w_msg_list_main from w_publ_base
  4. end type
  5. type tab_1 from tab within w_msg_list_main
  6. end type
  7. type tabpage_2 from userobject within tab_1
  8. end type
  9. type cbx_showmeredeal from checkbox within tabpage_2
  10. end type
  11. type dw_msg_rec from u_dw_rbtnfilter within tabpage_2
  12. end type
  13. type tab_5 from tab within tabpage_2
  14. end type
  15. type tabpage_12 from userobject within tab_5
  16. end type
  17. type dw_msg_content from multilineedit within tabpage_12
  18. end type
  19. type tabpage_12 from userobject within tab_5
  20. dw_msg_content dw_msg_content
  21. end type
  22. type tabpage_13 from userobject within tab_5
  23. end type
  24. type lv_in_fj from uo_msg_lv within tabpage_13
  25. end type
  26. type tabpage_13 from userobject within tab_5
  27. lv_in_fj lv_in_fj
  28. end type
  29. type tab_5 from tab within tabpage_2
  30. tabpage_12 tabpage_12
  31. tabpage_13 tabpage_13
  32. end type
  33. type st_retrieve from uo_text_m_main within tabpage_2
  34. end type
  35. type st_read from uo_text_m_main within tabpage_2
  36. end type
  37. type st_del from uo_text_m_main within tabpage_2
  38. end type
  39. type p_retrieve from picture within tabpage_2
  40. end type
  41. type p_back_msg from picture within tabpage_2
  42. end type
  43. type p_del from picture within tabpage_2
  44. end type
  45. type st_back_msg from uo_text_m_main within tabpage_2
  46. end type
  47. type tabpage_2 from userobject within tab_1
  48. cbx_showmeredeal cbx_showmeredeal
  49. dw_msg_rec dw_msg_rec
  50. tab_5 tab_5
  51. st_retrieve st_retrieve
  52. st_read st_read
  53. st_del st_del
  54. p_retrieve p_retrieve
  55. p_back_msg p_back_msg
  56. p_del p_del
  57. st_back_msg st_back_msg
  58. end type
  59. type tabpage_3 from userobject within tab_1
  60. end type
  61. type tab_3 from tab within tabpage_3
  62. end type
  63. type tabpage_5 from userobject within tab_3
  64. end type
  65. type mle_msg from multilineedit within tabpage_5
  66. end type
  67. type tabpage_5 from userobject within tab_3
  68. mle_msg mle_msg
  69. end type
  70. type tabpage_7 from userobject within tab_3
  71. end type
  72. type lv_out_fj from uo_msg_lv within tabpage_7
  73. end type
  74. type tabpage_7 from userobject within tab_3
  75. lv_out_fj lv_out_fj
  76. end type
  77. type tabpage_6 from userobject within tab_3
  78. end type
  79. type dw_user from u_dw_rbtnfilter within tabpage_6
  80. end type
  81. type tabpage_6 from userobject within tab_3
  82. dw_user dw_user
  83. end type
  84. type tab_3 from tab within tabpage_3
  85. tabpage_5 tabpage_5
  86. tabpage_7 tabpage_7
  87. tabpage_6 tabpage_6
  88. end type
  89. type dw_hismsg from u_dw_rbtnfilter within tabpage_3
  90. end type
  91. type em_firstdate from editmask within tabpage_3
  92. end type
  93. type em_enddate from editmask within tabpage_3
  94. end type
  95. type st_21 from statictext within tabpage_3
  96. end type
  97. type st_22 from statictext within tabpage_3
  98. end type
  99. type st_retrieve_his from uo_text_m_main within tabpage_3
  100. end type
  101. type p_19 from picture within tabpage_3
  102. end type
  103. type tabpage_3 from userobject within tab_1
  104. tab_3 tab_3
  105. dw_hismsg dw_hismsg
  106. em_firstdate em_firstdate
  107. em_enddate em_enddate
  108. st_21 st_21
  109. st_22 st_22
  110. st_retrieve_his st_retrieve_his
  111. p_19 p_19
  112. end type
  113. type tab_1 from tab within w_msg_list_main
  114. tabpage_2 tabpage_2
  115. tabpage_3 tabpage_3
  116. end type
  117. end forward
  118. global type w_msg_list_main from w_publ_base
  119. integer width = 3611
  120. integer height = 2288
  121. string title = "消息管理"
  122. boolean minbox = false
  123. windowtype windowtype = response!
  124. event ue_back_msg ( )
  125. tab_1 tab_1
  126. end type
  127. global w_msg_list_main w_msg_list_main
  128. type variables
  129. uo_transmsg uo_msg
  130. long ins_findid
  131. end variables
  132. event ue_back_msg();String sendemp,msgtitle,msg,ls_billcode
  133. Long ll_row
  134. ll_row = tab_1.tabpage_2.dw_msg_rec.GetRow()
  135. IF ll_row <= 0 THEN RETURN
  136. sendemp = tab_1.tabpage_2.dw_msg_rec.Object.sendemp[ll_row]
  137. msgtitle = tab_1.tabpage_2.dw_msg_rec.Object.sys_admsgmx_s_msgtitle[ll_row]
  138. msg = tab_1.tabpage_2.dw_msg_rec.Object.sys_admsgmx_s_msg[ll_row]
  139. ls_billcode = tab_1.tabpage_2.dw_msg_rec.Object.sys_admsgmx_billcode[ll_row]
  140. s_admsg s_msg
  141. s_msg.sendemp = sendemp
  142. s_msg.billcode = ls_billcode
  143. s_msg.msgtitle = msgtitle
  144. s_msg.msg = msg
  145. s_msg.ifback = 1
  146. OpenWithParm(w_msg_send,s_msg)
  147. end event
  148. on w_msg_list_main.create
  149. int iCurrent
  150. call super::create
  151. this.tab_1=create tab_1
  152. iCurrent=UpperBound(this.Control)
  153. this.Control[iCurrent+1]=this.tab_1
  154. end on
  155. on w_msg_list_main.destroy
  156. call super::destroy
  157. destroy(this.tab_1)
  158. end on
  159. event open;call super::open;tab_1.tabpage_2.dw_msg_rec.SetTransObject(sqlca)
  160. tab_1.tabpage_3.dw_hismsg.SetTransObject(sqlca)
  161. tab_1.tabpage_3.tab_3.tabpage_6.dw_user.SetTransObject(sqlca)
  162. tab_1.tabpage_2.st_retrieve.TriggerEvent(Clicked!)
  163. tab_1.tabpage_3.st_retrieve_his.TriggerEvent(Clicked!)
  164. ins_findid = Message.DoubleParm
  165. Long ll_findrow
  166. IF ins_findid > 0 THEN
  167. ll_findrow = tab_1.tabpage_2.dw_msg_rec.Find('sys_admsgmx_msgid = '+String(ins_findid),1,tab_1.tabpage_2.dw_msg_rec.RowCount())
  168. tab_1.tabpage_2.dw_msg_rec.SetRow(ll_findrow)
  169. tab_1.tabpage_2.dw_msg_rec.ScrollToRow(ll_findrow)
  170. tab_1.tabpage_2.dw_msg_rec.SelectRow(0,False)
  171. tab_1.tabpage_2.dw_msg_rec.SelectRow(ll_findrow,True)
  172. END IF
  173. end event
  174. type cb_func from w_publ_base`cb_func within w_msg_list_main
  175. boolean visible = false
  176. end type
  177. type cb_exit from w_publ_base`cb_exit within w_msg_list_main
  178. integer x = 3205
  179. integer y = 2080
  180. integer picsize = 16
  181. end type
  182. type tab_1 from tab within w_msg_list_main
  183. event create ( )
  184. event destroy ( )
  185. integer width = 3584
  186. integer height = 2044
  187. integer taborder = 50
  188. boolean bringtotop = true
  189. integer textsize = -9
  190. integer weight = 400
  191. fontcharset fontcharset = gb2312charset!
  192. fontpitch fontpitch = variable!
  193. string facename = "宋体"
  194. long backcolor = 16777215
  195. boolean raggedright = true
  196. integer selectedtab = 1
  197. tabpage_2 tabpage_2
  198. tabpage_3 tabpage_3
  199. end type
  200. on tab_1.create
  201. this.tabpage_2=create tabpage_2
  202. this.tabpage_3=create tabpage_3
  203. this.Control[]={this.tabpage_2,&
  204. this.tabpage_3}
  205. end on
  206. on tab_1.destroy
  207. destroy(this.tabpage_2)
  208. destroy(this.tabpage_3)
  209. end on
  210. type tabpage_2 from userobject within tab_1
  211. event timer pbm_timer
  212. event create ( )
  213. event destroy ( )
  214. integer x = 18
  215. integer y = 112
  216. integer width = 3547
  217. integer height = 1916
  218. long backcolor = 16777215
  219. string text = "收件箱"
  220. long tabtextcolor = 33554432
  221. long tabbackcolor = 16777215
  222. string picturename = "graphics\newsin.BMP"
  223. long picturemaskcolor = 16777215
  224. cbx_showmeredeal cbx_showmeredeal
  225. dw_msg_rec dw_msg_rec
  226. tab_5 tab_5
  227. st_retrieve st_retrieve
  228. st_read st_read
  229. st_del st_del
  230. p_retrieve p_retrieve
  231. p_back_msg p_back_msg
  232. p_del p_del
  233. st_back_msg st_back_msg
  234. end type
  235. on tabpage_2.create
  236. this.cbx_showmeredeal=create cbx_showmeredeal
  237. this.dw_msg_rec=create dw_msg_rec
  238. this.tab_5=create tab_5
  239. this.st_retrieve=create st_retrieve
  240. this.st_read=create st_read
  241. this.st_del=create st_del
  242. this.p_retrieve=create p_retrieve
  243. this.p_back_msg=create p_back_msg
  244. this.p_del=create p_del
  245. this.st_back_msg=create st_back_msg
  246. this.Control[]={this.cbx_showmeredeal,&
  247. this.dw_msg_rec,&
  248. this.tab_5,&
  249. this.st_retrieve,&
  250. this.st_read,&
  251. this.st_del,&
  252. this.p_retrieve,&
  253. this.p_back_msg,&
  254. this.p_del,&
  255. this.st_back_msg}
  256. end on
  257. on tabpage_2.destroy
  258. destroy(this.cbx_showmeredeal)
  259. destroy(this.dw_msg_rec)
  260. destroy(this.tab_5)
  261. destroy(this.st_retrieve)
  262. destroy(this.st_read)
  263. destroy(this.st_del)
  264. destroy(this.p_retrieve)
  265. destroy(this.p_back_msg)
  266. destroy(this.p_del)
  267. destroy(this.st_back_msg)
  268. end on
  269. type cbx_showmeredeal from checkbox within tabpage_2
  270. integer x = 1065
  271. integer y = 20
  272. integer width = 535
  273. integer height = 56
  274. integer taborder = 80
  275. boolean bringtotop = true
  276. integer textsize = -9
  277. integer weight = 400
  278. fontcharset fontcharset = gb2312charset!
  279. fontpitch fontpitch = variable!
  280. string facename = "宋体"
  281. long textcolor = 33554432
  282. long backcolor = 16777215
  283. string text = "只显示待确认消息"
  284. boolean checked = true
  285. end type
  286. event clicked;tab_1.tabpage_2.st_retrieve.TriggerEvent(Clicked!)
  287. end event
  288. type dw_msg_rec from u_dw_rbtnfilter within tabpage_2
  289. integer y = 92
  290. integer width = 3534
  291. integer height = 992
  292. integer taborder = 40
  293. string dataobject = "dw_deal_admsg_1"
  294. boolean hscrollbar = true
  295. boolean vscrollbar = true
  296. boolean hsplitscroll = true
  297. end type
  298. event buttonclicked;call super::buttonclicked;Long rslt = 1,ls_msgid ,ls_empid,ls_senddtint
  299. String arg_msg
  300. IF dwo.Name = 'bt_deal' AND row > 0 THEN
  301. IF MessageBox ("IF","是否确定要确认当前消息记录?"+' '+String(tab_1.tabpage_2.dw_msg_rec.Object.sys_admsgmx_s_msgtitle[row]),Question!,YesNo! ) = 2 THEN RETURN
  302. ls_msgid = tab_1.tabpage_2.dw_msg_rec.Object.sys_admsgmx_msgid[row]
  303. ls_empid = tab_1.tabpage_2.dw_msg_rec.Object.sys_admsgmx_empid[row]
  304. ls_senddtint = tab_1.tabpage_2.dw_msg_rec.Object.sys_admsgmx_senddtint[row]
  305. uo_transmsg uo_itransmsg
  306. rslt = uo_itransmsg.f_redeal_admsg(ls_msgid,ls_senddtint,ls_empid,arg_msg,TRUE)
  307. IF rslt = 0 THEN
  308. MessageBox('系统提示',arg_msg)
  309. ELSE
  310. st_retrieve.TriggerEvent(Clicked!)
  311. END IF
  312. END IF
  313. end event
  314. event clicked;call super::clicked;IF row <= 0 THEN RETURN
  315. THIS.SelectRow(0,FALSE)
  316. THIS.SelectRow(row,TRUE)
  317. this.setrow(row)
  318. end event
  319. event constructor;call super::constructor;RBUTTON_FILTER_USE=true
  320. end event
  321. event doubleclicked;call super::doubleclicked;IF row > 0 THEN
  322. IF dwo.Name = 'sys_admsgmx_billcode' THEN
  323. PARENT.GetParent().GetParent().TriggerEvent('ue_viewbill_msg')
  324. END IF
  325. END IF
  326. end event
  327. event rbuttondown;IF IsNull(row) OR row <= 0 THEN RETURN
  328. THIS.SelectRow(0,FALSE)
  329. THIS.SelectRow(row,TRUE)
  330. THIS.SetRow(row)
  331. m_Dfc_Control_PopupMenu dmPopupMenu
  332. String menustr
  333. arg_ins_xpos = xpos
  334. arg_ins_ypos = ypos +50
  335. arg_ins_dwname = dwo.Name
  336. arg_ins_dwrow = row
  337. arg_ins_dwtype = dwo.TYPE
  338. String ls_name
  339. ls_name = THIS.GetColumnName( )
  340. IF row > 0 AND arg_ins_dwtype <> 'datawindow' THEN
  341. arg_ins_dwdata = String(dwo.primary[row])
  342. END IF
  343. menustr = "Text=回复消息~tEvent=ue_back_msg"
  344. menustr = menustr+"|"+"Text=查看单据~tEvent=ue_viewbill_msg"
  345. menustr = menustr+"|"+"Text=-"
  346. menustr = menustr+"|"+"Text=右键查询~tEvent=ue_rbbutton"
  347. menustr = menustr+"|"+"Text=显示全部~tEvent=ue_dwchild_filter"
  348. IF Len(Trim(menustr)) <> 0 THEN
  349. dmPopupMenu = CREATE m_Dfc_Control_PopupMenu
  350. dmPopupMenu.mf_BuildMenu(THIS, menustr)
  351. dmPopupMenu.mf_PopMenu()
  352. DESTROY dmPopupMenu
  353. END IF
  354. end event
  355. event rowfocuschanged;call super::rowfocuschanged;IF currentrow <= 0 THEN RETURN
  356. THIS.SelectRow(0,FALSE)
  357. THIS.SelectRow(currentrow,TRUE)
  358. this.setrow(currentrow)
  359. st_read.triggerevent(clicked!)
  360. end event
  361. type tab_5 from tab within tabpage_2
  362. event create ( )
  363. event destroy ( )
  364. integer y = 1092
  365. integer width = 3529
  366. integer height = 816
  367. integer taborder = 80
  368. integer textsize = -9
  369. integer weight = 400
  370. fontcharset fontcharset = gb2312charset!
  371. fontpitch fontpitch = variable!
  372. string facename = "宋体"
  373. long backcolor = 16777215
  374. boolean raggedright = true
  375. boolean focusonbuttondown = true
  376. integer selectedtab = 1
  377. tabpage_12 tabpage_12
  378. tabpage_13 tabpage_13
  379. end type
  380. on tab_5.create
  381. this.tabpage_12=create tabpage_12
  382. this.tabpage_13=create tabpage_13
  383. this.Control[]={this.tabpage_12,&
  384. this.tabpage_13}
  385. end on
  386. on tab_5.destroy
  387. destroy(this.tabpage_12)
  388. destroy(this.tabpage_13)
  389. end on
  390. type tabpage_12 from userobject within tab_5
  391. event create ( )
  392. event destroy ( )
  393. integer x = 18
  394. integer y = 112
  395. integer width = 3493
  396. integer height = 688
  397. long backcolor = 16777215
  398. string text = "内容"
  399. long tabtextcolor = 33554432
  400. long tabbackcolor = 16777215
  401. string picturename = "graphics\content.bmp"
  402. long picturemaskcolor = 536870912
  403. dw_msg_content dw_msg_content
  404. end type
  405. on tabpage_12.create
  406. this.dw_msg_content=create dw_msg_content
  407. this.Control[]={this.dw_msg_content}
  408. end on
  409. on tabpage_12.destroy
  410. destroy(this.dw_msg_content)
  411. end on
  412. type dw_msg_content from multilineedit within tabpage_12
  413. integer x = 5
  414. integer width = 3483
  415. integer height = 688
  416. integer taborder = 10
  417. integer textsize = -9
  418. integer weight = 400
  419. fontcharset fontcharset = gb2312charset!
  420. fontpitch fontpitch = variable!
  421. string facename = "宋体"
  422. long backcolor = 16777215
  423. boolean vscrollbar = true
  424. borderstyle borderstyle = stylelowered!
  425. end type
  426. type tabpage_13 from userobject within tab_5
  427. event create ( )
  428. event destroy ( )
  429. integer x = 18
  430. integer y = 112
  431. integer width = 3493
  432. integer height = 688
  433. long backcolor = 16777215
  434. string text = "附件"
  435. long tabtextcolor = 33554432
  436. long tabbackcolor = 16777215
  437. string picturename = "p45workgroup.ico"
  438. long picturemaskcolor = 536870912
  439. lv_in_fj lv_in_fj
  440. end type
  441. on tabpage_13.create
  442. this.lv_in_fj=create lv_in_fj
  443. this.Control[]={this.lv_in_fj}
  444. end on
  445. on tabpage_13.destroy
  446. destroy(this.lv_in_fj)
  447. end on
  448. type lv_in_fj from uo_msg_lv within tabpage_13
  449. integer width = 3488
  450. integer height = 688
  451. integer taborder = 10
  452. long textcolor = 0
  453. long backcolor = 16777215
  454. end type
  455. type st_retrieve from uo_text_m_main within tabpage_2
  456. integer x = 110
  457. integer y = 24
  458. integer width = 119
  459. integer height = 52
  460. integer textsize = -9
  461. string text = "刷新"
  462. end type
  463. event clicked;call super::clicked;Int ls_dealflag
  464. Long ll_cnt
  465. IF tab_1.tabpage_2.cbx_showmeredeal.Checked THEN
  466. ls_dealflag = 0
  467. ELSE
  468. ls_dealflag = -1
  469. END IF
  470. ll_cnt = tab_1.tabpage_2.dw_msg_rec.Retrieve(sys_empid,ls_dealflag)
  471. IF ll_cnt > 0 THEN
  472. tab_1.tabpage_2.Text = '收件箱('+String(ll_cnt)+')'
  473. ELSE
  474. tab_1.tabpage_2.Text = '收件箱'
  475. END IF
  476. IF ll_cnt = -1 THEN
  477. MessageBox('系统提示','因网络原因导致与服务器断开,系统即将关闭!')
  478. HALT
  479. END IF
  480. end event
  481. type st_read from uo_text_m_main within tabpage_2
  482. boolean visible = false
  483. integer x = 2034
  484. integer y = 28
  485. integer width = 229
  486. integer height = 52
  487. integer textsize = -9
  488. string text = "查看信息"
  489. end type
  490. event clicked;call super::clicked;String char_enter,ls_msg,ls_s_msg
  491. Long ls_msgid,ls_empid,ls_senddtint,currentrow
  492. currentrow = dw_msg_rec.GetRow()
  493. char_enter = Char(13)+Char(10)
  494. tab_1.tabpage_2.tab_5.tabpage_13.lv_in_fj.DeleteItems()
  495. IF currentrow > 0 THEN
  496. dw_msg_rec.SetRow(currentrow)
  497. dw_msg_rec.SelectRow(0,FALSE)
  498. dw_msg_rec.SelectRow(currentrow,TRUE)
  499. tab_1.tabpage_2.tab_5.tabpage_12.dw_msg_content.Text = ''
  500. ls_msgid = dw_msg_rec.Object.sys_admsgmx_msgid[currentrow]
  501. ls_empid = dw_msg_rec.Object.sys_admsgmx_empid[currentrow]
  502. ls_senddtint = dw_msg_rec.Object.sys_admsgmx_senddtint[currentrow]
  503. SELECT s_msg INTO :ls_s_msg FROM Sys_admsgmx
  504. WHERE Sys_admsgmx.msgid = :ls_msgid
  505. AND Sys_admsgmx.empid = :ls_empid
  506. AND Sys_admsgmx.senddtint = :ls_senddtint;
  507. IF sqlca.SQLCode <> 0 THEN ls_s_msg = ''
  508. ls_msg = '**'+dw_msg_rec.Object.sys_admsgmx_s_msgtitle[currentrow]+'**' + char_enter + " "+ls_s_msg //dw_msg_rec.object.sys_admsgmx_s_msg [row]
  509. tab_1.tabpage_2.tab_5.tabpage_12.dw_msg_content.Text = ls_msg
  510. //附件列表
  511. Long count,ls_i
  512. Long ll_arr_fjid[]
  513. Int li_arr_filetype[]
  514. String ls_arr_filename[]
  515. listviewitem l_lvi
  516. DECLARE fj_cur CURSOR FOR
  517. SELECT fjid,
  518. filename,
  519. filetype
  520. FROM Sys_admsg_fj
  521. Where ( Sys_admsg_fj.msgid = :ls_msgid );
  522. OPEN fj_cur;
  523. count = 1
  524. FETCH fj_cur INTO :ll_arr_fjid[count],&
  525. :ls_arr_filename[count],&
  526. :li_arr_filetype[count];
  527. DO WHILE sqlca.SQLCode = 0
  528. count++
  529. FETCH fj_cur INTO :ll_arr_fjid[count],&
  530. :ls_arr_filename[count],&
  531. :li_arr_filetype[count];
  532. LOOP
  533. count = count - 1
  534. CLOSE fj_cur;
  535. if count > 0 then
  536. tab_1.tabpage_2.tab_5.tabpage_13.text = '附件('+string(count)+')'
  537. else
  538. tab_1.tabpage_2.tab_5.tabpage_13.text = '附件'
  539. end if
  540. FOR ls_i = 1 TO count
  541. l_lvi.Label = ls_arr_filename[ls_i]
  542. l_lvi.Data = ll_arr_fjid[ls_i]
  543. IF li_arr_filetype[ls_i] = 1 THEN //超链接时用第二种图标
  544. l_lvi.PictureIndex = 2
  545. ELSE
  546. l_lvi.PictureIndex = 1
  547. END IF
  548. tab_1.tabpage_2.tab_5.tabpage_13.lv_in_fj.InsertItem(ls_i,l_lvi)
  549. NEXT
  550. END IF
  551. end event
  552. type st_del from uo_text_m_main within tabpage_2
  553. integer x = 750
  554. integer y = 24
  555. integer width = 229
  556. integer height = 52
  557. integer textsize = -9
  558. string text = "确认信息"
  559. end type
  560. event clicked;call super::clicked;Long rslt = 1,ls_msgid ,ls_empid,ls_senddtint,row
  561. String arg_msg
  562. row = dw_msg_rec.GetRow()
  563. IF row > 0 THEN
  564. IF MessageBox ("询问","是否确定要确认当前消息记录?"+' '+String(dw_msg_rec.Object.sys_admsgmx_s_msgtitle[row]),Question!,YesNo! ) = 2 THEN RETURN
  565. ls_msgid = dw_msg_rec.Object.sys_admsgmx_msgid[row]
  566. ls_empid = dw_msg_rec.Object.sys_admsgmx_empid[row]
  567. ls_senddtint = dw_msg_rec.Object.sys_admsgmx_senddtint[row]
  568. rslt = uo_msg.f_redeal_admsg(ls_msgid,ls_senddtint,ls_empid,arg_msg,True)
  569. IF rslt = 0 THEN
  570. MessageBox('系统提示',arg_msg)
  571. ELSE
  572. tab_1.tabpage_2.st_retrieve.TriggerEvent(Clicked!)
  573. END IF
  574. END IF
  575. end event
  576. type p_retrieve from picture within tabpage_2
  577. integer x = 37
  578. integer y = 12
  579. integer width = 73
  580. integer height = 64
  581. boolean originalsize = true
  582. string picturename = "graphics\refresh.BMP"
  583. boolean focusrectangle = false
  584. end type
  585. event clicked;tab_1.tabpage_2.st_retrieve.triggerevent(clicked!)
  586. end event
  587. type p_back_msg from picture within tabpage_2
  588. integer x = 347
  589. integer y = 16
  590. integer width = 73
  591. integer height = 64
  592. boolean originalsize = true
  593. string picturename = "graphics\open.bmp"
  594. boolean focusrectangle = false
  595. end type
  596. event clicked;tab_1.tabpage_2.st_back_msg.triggerevent(clicked!)
  597. end event
  598. type p_del from picture within tabpage_2
  599. integer x = 672
  600. integer y = 12
  601. integer width = 73
  602. integer height = 64
  603. boolean originalsize = true
  604. string picturename = "graphics\ok.bmp"
  605. boolean focusrectangle = false
  606. end type
  607. event clicked;tab_1.tabpage_2.st_del.triggerevent(clicked!)
  608. end event
  609. type st_back_msg from uo_text_m_main within tabpage_2
  610. integer x = 434
  611. integer y = 24
  612. integer width = 229
  613. integer height = 52
  614. integer textsize = -9
  615. string text = "回复信息"
  616. end type
  617. event clicked;call super::clicked;parent.getparent().getparent().triggerevent('ue_back_msg')
  618. end event
  619. type tabpage_3 from userobject within tab_1
  620. event create ( )
  621. event destroy ( )
  622. integer x = 18
  623. integer y = 112
  624. integer width = 3547
  625. integer height = 1916
  626. long backcolor = 16777215
  627. string text = "发件箱"
  628. long tabtextcolor = 33554432
  629. long tabbackcolor = 16777215
  630. string picturename = "graphics\newsout.BMP"
  631. long picturemaskcolor = 536870912
  632. tab_3 tab_3
  633. dw_hismsg dw_hismsg
  634. em_firstdate em_firstdate
  635. em_enddate em_enddate
  636. st_21 st_21
  637. st_22 st_22
  638. st_retrieve_his st_retrieve_his
  639. p_19 p_19
  640. end type
  641. on tabpage_3.create
  642. this.tab_3=create tab_3
  643. this.dw_hismsg=create dw_hismsg
  644. this.em_firstdate=create em_firstdate
  645. this.em_enddate=create em_enddate
  646. this.st_21=create st_21
  647. this.st_22=create st_22
  648. this.st_retrieve_his=create st_retrieve_his
  649. this.p_19=create p_19
  650. this.Control[]={this.tab_3,&
  651. this.dw_hismsg,&
  652. this.em_firstdate,&
  653. this.em_enddate,&
  654. this.st_21,&
  655. this.st_22,&
  656. this.st_retrieve_his,&
  657. this.p_19}
  658. end on
  659. on tabpage_3.destroy
  660. destroy(this.tab_3)
  661. destroy(this.dw_hismsg)
  662. destroy(this.em_firstdate)
  663. destroy(this.em_enddate)
  664. destroy(this.st_21)
  665. destroy(this.st_22)
  666. destroy(this.st_retrieve_his)
  667. destroy(this.p_19)
  668. end on
  669. type tab_3 from tab within tabpage_3
  670. event create ( )
  671. event destroy ( )
  672. integer y = 1100
  673. integer width = 3529
  674. integer height = 816
  675. integer taborder = 80
  676. boolean bringtotop = true
  677. integer textsize = -9
  678. integer weight = 400
  679. fontcharset fontcharset = gb2312charset!
  680. fontpitch fontpitch = variable!
  681. string facename = "宋体"
  682. long backcolor = 16777215
  683. boolean raggedright = true
  684. boolean focusonbuttondown = true
  685. integer selectedtab = 1
  686. tabpage_5 tabpage_5
  687. tabpage_7 tabpage_7
  688. tabpage_6 tabpage_6
  689. end type
  690. on tab_3.create
  691. this.tabpage_5=create tabpage_5
  692. this.tabpage_7=create tabpage_7
  693. this.tabpage_6=create tabpage_6
  694. this.Control[]={this.tabpage_5,&
  695. this.tabpage_7,&
  696. this.tabpage_6}
  697. end on
  698. on tab_3.destroy
  699. destroy(this.tabpage_5)
  700. destroy(this.tabpage_7)
  701. destroy(this.tabpage_6)
  702. end on
  703. type tabpage_5 from userobject within tab_3
  704. event create ( )
  705. event destroy ( )
  706. integer x = 18
  707. integer y = 112
  708. integer width = 3493
  709. integer height = 688
  710. long backcolor = 16777215
  711. string text = "内容"
  712. long tabtextcolor = 33554432
  713. long tabbackcolor = 16777215
  714. string picturename = "graphics\content.bmp"
  715. long picturemaskcolor = 536870912
  716. mle_msg mle_msg
  717. end type
  718. on tabpage_5.create
  719. this.mle_msg=create mle_msg
  720. this.Control[]={this.mle_msg}
  721. end on
  722. on tabpage_5.destroy
  723. destroy(this.mle_msg)
  724. end on
  725. type mle_msg from multilineedit within tabpage_5
  726. integer width = 3483
  727. integer height = 688
  728. integer taborder = 10
  729. integer textsize = -9
  730. integer weight = 400
  731. fontcharset fontcharset = gb2312charset!
  732. fontpitch fontpitch = variable!
  733. string facename = "宋体"
  734. long textcolor = 33554432
  735. long backcolor = 16777215
  736. boolean vscrollbar = true
  737. boolean autovscroll = true
  738. boolean displayonly = true
  739. borderstyle borderstyle = stylelowered!
  740. end type
  741. type tabpage_7 from userobject within tab_3
  742. event create ( )
  743. event destroy ( )
  744. integer x = 18
  745. integer y = 112
  746. integer width = 3493
  747. integer height = 688
  748. long backcolor = 16777215
  749. string text = "附件"
  750. long tabtextcolor = 33554432
  751. long tabbackcolor = 16777215
  752. string picturename = "p45workgroup.ico"
  753. long picturemaskcolor = 536870912
  754. lv_out_fj lv_out_fj
  755. end type
  756. on tabpage_7.create
  757. this.lv_out_fj=create lv_out_fj
  758. this.Control[]={this.lv_out_fj}
  759. end on
  760. on tabpage_7.destroy
  761. destroy(this.lv_out_fj)
  762. end on
  763. type lv_out_fj from uo_msg_lv within tabpage_7
  764. integer width = 3483
  765. integer height = 688
  766. integer taborder = 10
  767. end type
  768. type tabpage_6 from userobject within tab_3
  769. event create ( )
  770. event destroy ( )
  771. integer x = 18
  772. integer y = 112
  773. integer width = 3493
  774. integer height = 688
  775. long backcolor = 16777215
  776. string text = "确认列表"
  777. long tabtextcolor = 33554432
  778. long tabbackcolor = 16777215
  779. string picturename = "graphics\people.bmp"
  780. long picturemaskcolor = 536870912
  781. dw_user dw_user
  782. end type
  783. on tabpage_6.create
  784. this.dw_user=create dw_user
  785. this.Control[]={this.dw_user}
  786. end on
  787. on tabpage_6.destroy
  788. destroy(this.dw_user)
  789. end on
  790. type dw_user from u_dw_rbtnfilter within tabpage_6
  791. integer width = 3488
  792. integer height = 688
  793. string dataobject = "dw_objdpm_user_cmmt"
  794. boolean hscrollbar = true
  795. boolean vscrollbar = true
  796. end type
  797. event rowfocuschanged;call super::rowfocuschanged;IF currentrow <= 0 THEN RETURN
  798. THIS.SelectRow(0,FALSE)
  799. THIS.SelectRow(currentrow,TRUE)
  800. end event
  801. type dw_hismsg from u_dw_rbtnfilter within tabpage_3
  802. integer y = 100
  803. integer width = 3538
  804. integer height = 992
  805. integer taborder = 30
  806. string dataobject = "dw_hismsg"
  807. boolean hscrollbar = true
  808. boolean vscrollbar = true
  809. boolean hsplitscroll = true
  810. end type
  811. event constructor;call super::constructor; titleclick_sort_use=true //单击标题排序-功能开关
  812. RBUTTON_FILTER_USE=true //右键查询-功能开关
  813. setcolumn_visible_USE= true //自动保存显示列-功能开关
  814. autosave_setlayout_USE= true //自动保存列位置及宽度-功能开关
  815. end event
  816. event rowfocuschanged;call super::rowfocuschanged;IF currentrow <= 0 THEN RETURN
  817. if isnull(currentrow) then return
  818. THIS.SelectRow(0,FALSE)
  819. THIS.SelectRow(currentrow,TRUE)
  820. Long ls_msgid
  821. ls_msgid = dw_hismsg.Object.msgid[currentrow]
  822. tab_1.tabpage_3.tab_3.tabpage_6.dw_user.Retrieve(ls_msgid)
  823. //***********************
  824. String char_enter,ls_msg,ls_s_msg
  825. char_enter = Char(13)+Char(10)
  826. tab_1.tabpage_3.tab_3.tabpage_7.lv_out_fj.DeleteItems()
  827. IF currentrow > 0 THEN
  828. dw_hismsg.SetRow(currentrow)
  829. dw_hismsg.SelectRow(0,FALSE)
  830. dw_hismsg.SelectRow(currentrow,TRUE)
  831. tab_1.tabpage_3.tab_3.tabpage_5.mle_msg.Text = ''
  832. ls_msgid = dw_hismsg.Object.msgid[currentrow]
  833. SELECT s_msg INTO :ls_s_msg FROM Sys_admsg
  834. WHERE Sys_admsg.msgid = :ls_msgid;
  835. IF sqlca.SQLCode <> 0 THEN ls_s_msg = ''
  836. ls_msg = '**'+dw_hismsg.Object.s_msgtitle[currentrow]+'**' + char_enter + " "+ls_s_msg //dw_hismsg.object.s_msg [row]
  837. tab_1.tabpage_3.tab_3.tabpage_5.mle_msg.Text = ls_msg
  838. //附件列表
  839. Long count,ls_i
  840. Long ll_arr_fjid[]
  841. Int li_arr_filetype[]
  842. String ls_arr_filename[]
  843. listviewitem l_lvi
  844. DECLARE fj_cur CURSOR FOR
  845. SELECT fjid,
  846. filename,
  847. filetype
  848. FROM Sys_admsg_fj
  849. Where ( Sys_admsg_fj.msgid = :ls_msgid );
  850. OPEN fj_cur;
  851. count = 1
  852. FETCH fj_cur INTO :ll_arr_fjid[count],&
  853. :ls_arr_filename[count],&
  854. :li_arr_filetype[count];
  855. DO WHILE sqlca.SQLCode = 0
  856. count++
  857. FETCH fj_cur INTO :ll_arr_fjid[count],&
  858. :ls_arr_filename[count],&
  859. :li_arr_filetype[count];
  860. LOOP
  861. count = count - 1
  862. CLOSE fj_cur;
  863. if count > 0 then
  864. tab_1.tabpage_3.tab_3.tabpage_7.text = '附件('+string(count)+')'
  865. else
  866. tab_1.tabpage_3.tab_3.tabpage_7.text = '附件'
  867. end if
  868. FOR ls_i = 1 TO count
  869. l_lvi.Label = ls_arr_filename[ls_i]
  870. l_lvi.Data = ll_arr_fjid[ls_i]
  871. IF li_arr_filetype[ls_i] = 1 THEN //超链接时用第二种图标
  872. l_lvi.PictureIndex = 2
  873. ELSE
  874. l_lvi.PictureIndex = 1
  875. END IF
  876. tab_1.tabpage_3.tab_3.tabpage_7.lv_out_fj.InsertItem(ls_i,l_lvi)
  877. NEXT
  878. END IF
  879. end event
  880. type em_firstdate from editmask within tabpage_3
  881. integer x = 229
  882. integer y = 8
  883. integer width = 402
  884. integer height = 84
  885. integer taborder = 40
  886. integer textsize = -9
  887. integer weight = 400
  888. fontcharset fontcharset = gb2312charset!
  889. fontpitch fontpitch = variable!
  890. string facename = "宋体"
  891. long textcolor = 33554432
  892. string text = "none"
  893. borderstyle borderstyle = stylelowered!
  894. maskdatatype maskdatatype = datetimemask!
  895. string mask = "yyyy-mm-dd"
  896. boolean spin = true
  897. end type
  898. event constructor;this.text = string(today(),'yyyy-mm')+'-01'
  899. end event
  900. event rbuttondown;s_calender_arg s_calender
  901. s_calender.PointerX = THIS.PointerX()
  902. s_calender.PointerY = THIS.PointerY()
  903. s_calender.X = THIS.X
  904. s_calender.Y = THIS.Y + tab_1.y
  905. OpenWithParm(w_calendar,s_calender)
  906. THIS.Text = String(id_date_selected)
  907. end event
  908. type em_enddate from editmask within tabpage_3
  909. integer x = 741
  910. integer y = 8
  911. integer width = 402
  912. integer height = 84
  913. integer taborder = 40
  914. integer textsize = -9
  915. integer weight = 400
  916. fontcharset fontcharset = gb2312charset!
  917. fontpitch fontpitch = variable!
  918. string facename = "宋体"
  919. long textcolor = 33554432
  920. string text = "none"
  921. borderstyle borderstyle = stylelowered!
  922. maskdatatype maskdatatype = datetimemask!
  923. string mask = "yyyy-mm-dd"
  924. boolean spin = true
  925. end type
  926. event constructor;this.text = string(today(),'yyyy-mm-dd')
  927. end event
  928. event rbuttondown;s_calender_arg s_calender
  929. s_calender.PointerX = THIS.PointerX()
  930. s_calender.PointerY = THIS.PointerY()
  931. s_calender.X = THIS.X
  932. s_calender.Y = THIS.Y + tab_1.y
  933. OpenWithParm(w_calendar,s_calender)
  934. THIS.Text = String(id_date_selected)
  935. end event
  936. type st_21 from statictext within tabpage_3
  937. integer x = 18
  938. integer y = 24
  939. integer width = 206
  940. integer height = 48
  941. integer textsize = -9
  942. integer weight = 400
  943. fontcharset fontcharset = gb2312charset!
  944. fontpitch fontpitch = variable!
  945. string facename = "宋体"
  946. long textcolor = 33554432
  947. long backcolor = 16777215
  948. string text = "日期从:"
  949. alignment alignment = right!
  950. boolean focusrectangle = false
  951. end type
  952. type st_22 from statictext within tabpage_3
  953. integer x = 645
  954. integer y = 24
  955. integer width = 87
  956. integer height = 48
  957. integer textsize = -9
  958. integer weight = 400
  959. fontcharset fontcharset = gb2312charset!
  960. fontpitch fontpitch = variable!
  961. string facename = "宋体"
  962. long textcolor = 33554432
  963. long backcolor = 16777215
  964. string text = "到"
  965. alignment alignment = right!
  966. boolean focusrectangle = false
  967. end type
  968. type st_retrieve_his from uo_text_m_main within tabpage_3
  969. integer x = 1239
  970. integer y = 28
  971. integer width = 133
  972. integer height = 56
  973. integer textsize = -9
  974. string text = "刷新"
  975. end type
  976. event clicked;call super::clicked;DateTime ld_first
  977. DateTime ld_end
  978. ld_first = DateTime(Date(tab_1.tabpage_3.em_firstdate.Text),Time('0'))
  979. ld_end = DateTime(Date(tab_1.tabpage_3.em_enddate.Text),Time('23:59:59'))
  980. tab_1.tabpage_3.dw_hismsg.SetTransObject(sqlca)
  981. tab_1.tabpage_3.dw_hismsg.Retrieve(sys_empid,ld_first,ld_end)
  982. end event
  983. type p_19 from picture within tabpage_3
  984. integer x = 1161
  985. integer y = 16
  986. integer width = 73
  987. integer height = 64
  988. boolean originalsize = true
  989. string picturename = "graphics\refresh.BMP"
  990. boolean focusrectangle = false
  991. end type
  992. event clicked;tab_1.tabpage_3.st_retrieve_his.triggerevent(clicked!)
  993. end event