w_msg_his.srw 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029
  1. $PBExportHeader$w_msg_his.srw
  2. forward
  3. global type w_msg_his from w_publ_base
  4. end type
  5. type dw_user from u_dw_rbtnfilter within w_msg_his
  6. end type
  7. type tab_1 from tab within w_msg_his
  8. end type
  9. type tabpage_1 from userobject within tab_1
  10. end type
  11. type tab_3 from tab within tabpage_1
  12. end type
  13. type tabpage_5 from userobject within tab_3
  14. end type
  15. type mle_in_msg from multilineedit within tabpage_5
  16. end type
  17. type tabpage_5 from userobject within tab_3
  18. mle_in_msg mle_in_msg
  19. end type
  20. type tabpage_6 from userobject within tab_3
  21. end type
  22. type lv_in_fj from uo_msg_lv within tabpage_6
  23. end type
  24. type tabpage_6 from userobject within tab_3
  25. lv_in_fj lv_in_fj
  26. end type
  27. type tab_3 from tab within tabpage_1
  28. tabpage_5 tabpage_5
  29. tabpage_6 tabpage_6
  30. end type
  31. type dw_get from u_dw_rbtnfilter within tabpage_1
  32. end type
  33. type tabpage_1 from userobject within tab_1
  34. tab_3 tab_3
  35. dw_get dw_get
  36. end type
  37. type tabpage_2 from userobject within tab_1
  38. end type
  39. type tab_2 from tab within tabpage_2
  40. end type
  41. type tabpage_3 from userobject within tab_2
  42. end type
  43. type mle_out_msg from multilineedit within tabpage_3
  44. end type
  45. type tabpage_3 from userobject within tab_2
  46. mle_out_msg mle_out_msg
  47. end type
  48. type tabpage_4 from userobject within tab_2
  49. end type
  50. type lv_out_fj from uo_msg_lv within tabpage_4
  51. end type
  52. type tabpage_4 from userobject within tab_2
  53. lv_out_fj lv_out_fj
  54. end type
  55. type tabpage_7 from userobject within tab_2
  56. end type
  57. type dw_commit from u_dw_rbtnfilter within tabpage_7
  58. end type
  59. type tabpage_7 from userobject within tab_2
  60. dw_commit dw_commit
  61. end type
  62. type tab_2 from tab within tabpage_2
  63. tabpage_3 tabpage_3
  64. tabpage_4 tabpage_4
  65. tabpage_7 tabpage_7
  66. end type
  67. type dw_send from u_dw_rbtnfilter within tabpage_2
  68. end type
  69. type tabpage_2 from userobject within tab_1
  70. tab_2 tab_2
  71. dw_send dw_send
  72. end type
  73. type tab_1 from tab within w_msg_his
  74. tabpage_1 tabpage_1
  75. tabpage_2 tabpage_2
  76. end type
  77. type em_first from editmask within w_msg_his
  78. end type
  79. type em_end from editmask within w_msg_his
  80. end type
  81. type st_1 from statictext within w_msg_his
  82. end type
  83. type st_2 from statictext within w_msg_his
  84. end type
  85. type cb_retrieve from uo_imflatbutton within w_msg_his
  86. end type
  87. type cb_delmsg from uo_imflatbutton within w_msg_his
  88. end type
  89. type cbx_all from checkbox within w_msg_his
  90. end type
  91. end forward
  92. global type w_msg_his from w_publ_base
  93. integer width = 3570
  94. integer height = 2152
  95. string title = "历史信息管理"
  96. dw_user dw_user
  97. tab_1 tab_1
  98. em_first em_first
  99. em_end em_end
  100. st_1 st_1
  101. st_2 st_2
  102. cb_retrieve cb_retrieve
  103. cb_delmsg cb_delmsg
  104. cbx_all cbx_all
  105. end type
  106. global w_msg_his w_msg_his
  107. type variables
  108. long cur_empid
  109. end variables
  110. forward prototypes
  111. public subroutine wf_retrieve ()
  112. end prototypes
  113. public subroutine wf_retrieve ();datetime ld_first
  114. datetime ld_end
  115. ld_first=datetime(date(em_first.text),time('0'))
  116. ld_end=datetime(date(em_end.text),time('23:59:59'))
  117. tab_1.tabpage_1.dw_get.retrieve(cur_empid,ld_first,ld_end)
  118. tab_1.tabpage_2.dw_send.retrieve(cur_empid,ld_first,ld_end)
  119. end subroutine
  120. on w_msg_his.create
  121. int iCurrent
  122. call super::create
  123. this.dw_user=create dw_user
  124. this.tab_1=create tab_1
  125. this.em_first=create em_first
  126. this.em_end=create em_end
  127. this.st_1=create st_1
  128. this.st_2=create st_2
  129. this.cb_retrieve=create cb_retrieve
  130. this.cb_delmsg=create cb_delmsg
  131. this.cbx_all=create cbx_all
  132. iCurrent=UpperBound(this.Control)
  133. this.Control[iCurrent+1]=this.dw_user
  134. this.Control[iCurrent+2]=this.tab_1
  135. this.Control[iCurrent+3]=this.em_first
  136. this.Control[iCurrent+4]=this.em_end
  137. this.Control[iCurrent+5]=this.st_1
  138. this.Control[iCurrent+6]=this.st_2
  139. this.Control[iCurrent+7]=this.cb_retrieve
  140. this.Control[iCurrent+8]=this.cb_delmsg
  141. this.Control[iCurrent+9]=this.cbx_all
  142. end on
  143. on w_msg_his.destroy
  144. call super::destroy
  145. destroy(this.dw_user)
  146. destroy(this.tab_1)
  147. destroy(this.em_first)
  148. destroy(this.em_end)
  149. destroy(this.st_1)
  150. destroy(this.st_2)
  151. destroy(this.cb_retrieve)
  152. destroy(this.cb_delmsg)
  153. destroy(this.cbx_all)
  154. end on
  155. event open;this.triggerevent('ue_before_open')
  156. wf_movetocenter()
  157. string ls_first_date,ls_end_date
  158. ls_first_date=string(today(),'yyyy-mm')
  159. ls_first_date=ls_first_date+'-01'
  160. em_first.text=ls_first_date
  161. ls_end_date=string(today(),'yyyy-mm-dd')
  162. em_end.text=ls_end_date
  163. dw_user.rbutton_filter_use=true
  164. dw_user.titleclick_sort_use=true
  165. tab_1.tabpage_1.dw_get.rbutton_filter_use=true
  166. tab_1.tabpage_1.dw_get.titleclick_sort_use=true
  167. tab_1.tabpage_2.dw_send.rbutton_filter_use=true
  168. tab_1.tabpage_2.dw_send.titleclick_sort_use=true
  169. tab_1.tabpage_2.tab_2.tabpage_7.dw_commit.rbutton_filter_use=true
  170. tab_1.tabpage_2.tab_2.tabpage_7.dw_commit.titleclick_sort_use=true
  171. dw_user.retrieve(publ_userid)
  172. end event
  173. event ue_before_open;call super::ue_before_open;dw_user.settransobject(sqlca)
  174. tab_1.tabpage_1.dw_get.settransobject(sqlca)
  175. tab_1.tabpage_2.dw_send.settransobject(sqlca)
  176. tab_1.tabpage_2.tab_2.tabpage_7.dw_commit.settransobject(sqlca)
  177. end event
  178. type cb_func from w_publ_base`cb_func within w_msg_his
  179. boolean visible = false
  180. integer x = 2089
  181. boolean enabled = false
  182. end type
  183. type cb_exit from w_publ_base`cb_exit within w_msg_his
  184. integer x = 293
  185. integer width = 293
  186. integer height = 100
  187. end type
  188. type dw_user from u_dw_rbtnfilter within w_msg_his
  189. integer y = 108
  190. integer width = 882
  191. integer height = 1944
  192. integer taborder = 20
  193. boolean bringtotop = true
  194. string dataobject = "dw_userindex_1"
  195. end type
  196. event clicked;call super::clicked;If (row > 0) THEN
  197. THIS.SelectRow( 0, FALSE)
  198. THIS.SelectRow( row, TRUE)
  199. ELSE
  200. THIS.SelectRow( 0, FALSE)
  201. END IF
  202. end event
  203. event rowfocuschanged;call super::rowfocuschanged;if currentrow = 0 then return
  204. cur_empid=dw_user.object.empid[currentrow]
  205. cb_retrieve.triggerevent(clicked!)
  206. end event
  207. type tab_1 from tab within w_msg_his
  208. integer x = 887
  209. integer y = 108
  210. integer width = 2656
  211. integer height = 1944
  212. integer taborder = 30
  213. boolean bringtotop = true
  214. integer textsize = -9
  215. integer weight = 400
  216. fontcharset fontcharset = gb2312charset!
  217. fontpitch fontpitch = variable!
  218. string facename = "宋体"
  219. long backcolor = 134217739
  220. boolean raggedright = true
  221. boolean focusonbuttondown = true
  222. integer selectedtab = 1
  223. tabpage_1 tabpage_1
  224. tabpage_2 tabpage_2
  225. end type
  226. on tab_1.create
  227. this.tabpage_1=create tabpage_1
  228. this.tabpage_2=create tabpage_2
  229. this.Control[]={this.tabpage_1,&
  230. this.tabpage_2}
  231. end on
  232. on tab_1.destroy
  233. destroy(this.tabpage_1)
  234. destroy(this.tabpage_2)
  235. end on
  236. event selectionchanged;IF tab_1.SelectedTab = 1 THEN
  237. cbx_all.Visible = FALSE
  238. cb_delmsg.Visible = FALSE
  239. ELSE
  240. cbx_all.Visible = TRUE
  241. cb_delmsg.Visible = TRUE
  242. END IF
  243. end event
  244. type tabpage_1 from userobject within tab_1
  245. integer x = 18
  246. integer y = 112
  247. integer width = 2619
  248. integer height = 1816
  249. long backcolor = 134217739
  250. string text = "收信息"
  251. long tabtextcolor = 33554432
  252. long tabbackcolor = 134217739
  253. string picturename = "graphics\newsin.BMP"
  254. long picturemaskcolor = 553648127
  255. tab_3 tab_3
  256. dw_get dw_get
  257. end type
  258. on tabpage_1.create
  259. this.tab_3=create tab_3
  260. this.dw_get=create dw_get
  261. this.Control[]={this.tab_3,&
  262. this.dw_get}
  263. end on
  264. on tabpage_1.destroy
  265. destroy(this.tab_3)
  266. destroy(this.dw_get)
  267. end on
  268. type tab_3 from tab within tabpage_1
  269. integer y = 792
  270. integer width = 2619
  271. integer height = 1028
  272. integer taborder = 40
  273. integer textsize = -9
  274. integer weight = 400
  275. fontcharset fontcharset = gb2312charset!
  276. fontpitch fontpitch = variable!
  277. string facename = "宋体"
  278. long backcolor = 134217739
  279. boolean raggedright = true
  280. boolean focusonbuttondown = true
  281. integer selectedtab = 1
  282. tabpage_5 tabpage_5
  283. tabpage_6 tabpage_6
  284. end type
  285. on tab_3.create
  286. this.tabpage_5=create tabpage_5
  287. this.tabpage_6=create tabpage_6
  288. this.Control[]={this.tabpage_5,&
  289. this.tabpage_6}
  290. end on
  291. on tab_3.destroy
  292. destroy(this.tabpage_5)
  293. destroy(this.tabpage_6)
  294. end on
  295. type tabpage_5 from userobject within tab_3
  296. integer x = 18
  297. integer y = 112
  298. integer width = 2583
  299. integer height = 900
  300. long backcolor = 134217739
  301. string text = "内容"
  302. long tabtextcolor = 33554432
  303. long tabbackcolor = 134217739
  304. string picturename = "graphics\content.bmp"
  305. long picturemaskcolor = 536870912
  306. mle_in_msg mle_in_msg
  307. end type
  308. on tabpage_5.create
  309. this.mle_in_msg=create mle_in_msg
  310. this.Control[]={this.mle_in_msg}
  311. end on
  312. on tabpage_5.destroy
  313. destroy(this.mle_in_msg)
  314. end on
  315. type mle_in_msg from multilineedit within tabpage_5
  316. integer width = 2583
  317. integer height = 896
  318. integer taborder = 30
  319. integer textsize = -9
  320. integer weight = 400
  321. fontcharset fontcharset = gb2312charset!
  322. fontpitch fontpitch = variable!
  323. string facename = "宋体"
  324. long textcolor = 33554432
  325. boolean displayonly = true
  326. borderstyle borderstyle = stylelowered!
  327. end type
  328. type tabpage_6 from userobject within tab_3
  329. integer x = 18
  330. integer y = 112
  331. integer width = 2583
  332. integer height = 900
  333. long backcolor = 134217739
  334. string text = "附件"
  335. long tabtextcolor = 33554432
  336. long tabbackcolor = 134217739
  337. string picturename = "p45workgroup.ico"
  338. long picturemaskcolor = 536870912
  339. lv_in_fj lv_in_fj
  340. end type
  341. on tabpage_6.create
  342. this.lv_in_fj=create lv_in_fj
  343. this.Control[]={this.lv_in_fj}
  344. end on
  345. on tabpage_6.destroy
  346. destroy(this.lv_in_fj)
  347. end on
  348. type lv_in_fj from uo_msg_lv within tabpage_6
  349. integer width = 2583
  350. integer height = 904
  351. integer taborder = 30
  352. end type
  353. type dw_get from u_dw_rbtnfilter within tabpage_1
  354. integer width = 2619
  355. integer height = 788
  356. integer taborder = 20
  357. string dataobject = "dw_deal_admsg_2"
  358. boolean hscrollbar = true
  359. boolean vscrollbar = true
  360. end type
  361. event rowfocuschanged;call super::rowfocuschanged;string char_enter,ls_s_msg,ls_msg
  362. long ll_msgid,ll_empid,ll_senddtint
  363. char_enter=char(13)+char(10)
  364. tab_1.tabpage_1.tab_3.tabpage_6.lv_in_fj.deleteitems( )
  365. if(currentrow>0) then
  366. this.selectrow( 0, false)
  367. this.selectrow( currentrow, true)
  368. tab_1.tabpage_1.tab_3.tabpage_5.mle_in_msg.text=''
  369. ll_msgid = this.Object.sys_admsgmx_msgid[currentrow]
  370. ll_empid = this.Object.sys_admsgmx_empid[currentrow]
  371. ll_senddtint = this.Object.sys_admsgmx_senddtint[currentrow]
  372. SELECT s_msg INTO :ls_s_msg FROM Sys_admsgmx
  373. WHERE Sys_admsgmx.msgid = :ll_msgid
  374. AND Sys_admsgmx.empid = :ll_empid
  375. AND Sys_admsgmx.senddtint = :ll_senddtint;
  376. IF sqlca.SQLCode <> 0 THEN ls_s_msg = ''
  377. ls_msg = '**'+this.Object.sys_admsgmx_s_msgtitle[currentrow]+'**' + char_enter + " "+ls_s_msg //dw_msg_rec.object.sys_admsgmx_s_msg [row]
  378. tab_1.tabpage_1.tab_3.tabpage_5.mle_in_msg.text = ls_msg
  379. //附件列表
  380. Long count,ls_i
  381. Long ll_arr_fjid[]
  382. Int li_arr_filetype[]
  383. String ls_arr_filename[]
  384. listviewitem l_lvi
  385. DECLARE fj_cur CURSOR FOR
  386. SELECT fjid,
  387. filename,
  388. filetype
  389. FROM Sys_admsg_fj
  390. Where ( Sys_admsg_fj.msgid = :ll_msgid );
  391. OPEN fj_cur;
  392. count = 1
  393. FETCH fj_cur INTO :ll_arr_fjid[count],&
  394. :ls_arr_filename[count],&
  395. :li_arr_filetype[count];
  396. DO WHILE sqlca.SQLCode = 0
  397. count++
  398. FETCH fj_cur INTO :ll_arr_fjid[count],&
  399. :ls_arr_filename[count],&
  400. :li_arr_filetype[count];
  401. LOOP
  402. count = count - 1
  403. CLOSE fj_cur;
  404. if count > 0 then
  405. tab_1.tabpage_1.tab_3.tabpage_6.text='附件('+string(count)+')'
  406. else
  407. tab_1.tabpage_1.tab_3.tabpage_6.text = '附件'
  408. end if
  409. FOR ls_i = 1 TO count
  410. l_lvi.Label = ls_arr_filename[ls_i]
  411. l_lvi.Data = ll_arr_fjid[ls_i]
  412. IF li_arr_filetype[ls_i] = 1 THEN //超链接时用第二种图标
  413. l_lvi.PictureIndex = 2
  414. ELSE
  415. l_lvi.PictureIndex = 1
  416. END IF
  417. tab_1.tabpage_1.tab_3.tabpage_6.lv_in_fj.InsertItem(ls_i,l_lvi)
  418. NEXT
  419. end if
  420. end event
  421. event clicked;call super::clicked;if row<=0 then return
  422. if(row>0) then
  423. this.selectrow( 0, false)
  424. this.selectrow( row, true)
  425. this.setrow(row)
  426. end if
  427. end event
  428. type tabpage_2 from userobject within tab_1
  429. integer x = 18
  430. integer y = 112
  431. integer width = 2619
  432. integer height = 1816
  433. long backcolor = 134217739
  434. string text = "发信息"
  435. long tabtextcolor = 33554432
  436. long tabbackcolor = 134217739
  437. string picturename = "graphics\newsout.BMP"
  438. long picturemaskcolor = 536870912
  439. tab_2 tab_2
  440. dw_send dw_send
  441. end type
  442. on tabpage_2.create
  443. this.tab_2=create tab_2
  444. this.dw_send=create dw_send
  445. this.Control[]={this.tab_2,&
  446. this.dw_send}
  447. end on
  448. on tabpage_2.destroy
  449. destroy(this.tab_2)
  450. destroy(this.dw_send)
  451. end on
  452. type tab_2 from tab within tabpage_2
  453. integer y = 792
  454. integer width = 2619
  455. integer height = 1028
  456. integer taborder = 30
  457. integer textsize = -9
  458. integer weight = 400
  459. fontcharset fontcharset = gb2312charset!
  460. fontpitch fontpitch = variable!
  461. string facename = "宋体"
  462. long backcolor = 134217739
  463. boolean raggedright = true
  464. boolean focusonbuttondown = true
  465. integer selectedtab = 1
  466. tabpage_3 tabpage_3
  467. tabpage_4 tabpage_4
  468. tabpage_7 tabpage_7
  469. end type
  470. on tab_2.create
  471. this.tabpage_3=create tabpage_3
  472. this.tabpage_4=create tabpage_4
  473. this.tabpage_7=create tabpage_7
  474. this.Control[]={this.tabpage_3,&
  475. this.tabpage_4,&
  476. this.tabpage_7}
  477. end on
  478. on tab_2.destroy
  479. destroy(this.tabpage_3)
  480. destroy(this.tabpage_4)
  481. destroy(this.tabpage_7)
  482. end on
  483. type tabpage_3 from userobject within tab_2
  484. integer x = 18
  485. integer y = 112
  486. integer width = 2583
  487. integer height = 900
  488. long backcolor = 134217739
  489. string text = "内容"
  490. long tabtextcolor = 33554432
  491. long tabbackcolor = 134217739
  492. string picturename = "graphics\content.bmp"
  493. long picturemaskcolor = 536870912
  494. mle_out_msg mle_out_msg
  495. end type
  496. on tabpage_3.create
  497. this.mle_out_msg=create mle_out_msg
  498. this.Control[]={this.mle_out_msg}
  499. end on
  500. on tabpage_3.destroy
  501. destroy(this.mle_out_msg)
  502. end on
  503. type mle_out_msg from multilineedit within tabpage_3
  504. integer width = 2578
  505. integer height = 904
  506. integer taborder = 30
  507. integer textsize = -9
  508. integer weight = 400
  509. fontcharset fontcharset = gb2312charset!
  510. fontpitch fontpitch = variable!
  511. string facename = "宋体"
  512. long textcolor = 33554432
  513. boolean displayonly = true
  514. borderstyle borderstyle = stylelowered!
  515. end type
  516. type tabpage_4 from userobject within tab_2
  517. integer x = 18
  518. integer y = 112
  519. integer width = 2583
  520. integer height = 900
  521. long backcolor = 134217739
  522. string text = "附件"
  523. long tabtextcolor = 33554432
  524. long tabbackcolor = 134217739
  525. string picturename = "p45workgroup.ico"
  526. long picturemaskcolor = 536870912
  527. lv_out_fj lv_out_fj
  528. end type
  529. on tabpage_4.create
  530. this.lv_out_fj=create lv_out_fj
  531. this.Control[]={this.lv_out_fj}
  532. end on
  533. on tabpage_4.destroy
  534. destroy(this.lv_out_fj)
  535. end on
  536. type lv_out_fj from uo_msg_lv within tabpage_4
  537. integer width = 2583
  538. integer height = 904
  539. integer taborder = 30
  540. end type
  541. type tabpage_7 from userobject within tab_2
  542. integer x = 18
  543. integer y = 112
  544. integer width = 2583
  545. integer height = 900
  546. long backcolor = 134217739
  547. string text = "确认列表"
  548. long tabtextcolor = 33554432
  549. long tabbackcolor = 134217739
  550. string picturename = "graphics\people.bmp"
  551. long picturemaskcolor = 536870912
  552. dw_commit dw_commit
  553. end type
  554. on tabpage_7.create
  555. this.dw_commit=create dw_commit
  556. this.Control[]={this.dw_commit}
  557. end on
  558. on tabpage_7.destroy
  559. destroy(this.dw_commit)
  560. end on
  561. type dw_commit from u_dw_rbtnfilter within tabpage_7
  562. integer y = 8
  563. integer width = 2578
  564. integer height = 904
  565. integer taborder = 20
  566. string dataobject = "dw_objdpm_user_cmmt_1"
  567. end type
  568. type dw_send from u_dw_rbtnfilter within tabpage_2
  569. integer width = 2619
  570. integer height = 788
  571. integer taborder = 20
  572. string dataobject = "dw_hismsg_1"
  573. boolean hscrollbar = true
  574. boolean vscrollbar = true
  575. end type
  576. event clicked;call super::clicked;if row<=0 then return
  577. if(row>0) then
  578. this.selectrow( 0, false)
  579. this.selectrow( row, true)
  580. this.setrow(row)
  581. end if
  582. end event
  583. event rowfocuschanged;call super::rowfocuschanged;IF currentrow <= 0 THEN RETURN
  584. Long ls_msgid
  585. //***********************
  586. String char_enter,ls_msg,ls_s_msg
  587. Long ls_empid,ls_senddtint
  588. char_enter = Char(13)+Char(10)
  589. tab_1.tabpage_2.tab_2.tabpage_4.lv_out_fj.deleteitems( )
  590. tab_1.tabpage_2.tab_2.tabpage_3.mle_out_msg.text=''
  591. IF currentrow > 0 THEN
  592. this.SetRow(currentrow)
  593. this.SelectRow(0,FALSE)
  594. this.SelectRow(currentrow,TRUE)
  595. ls_msgid = this.Object.msgid[currentrow]
  596. ls_empid = this.Object.sendempid[currentrow]
  597. tab_1.tabpage_2.tab_2.tabpage_7.dw_commit.retrieve(ls_msgid)
  598. // ls_senddtint=this.object.senddtint[currentrow]
  599. SELECT s_msg INTO :ls_s_msg FROM Sys_admsg
  600. WHERE Sys_admsg.msgid = :ls_msgid;
  601. IF sqlca.SQLCode <> 0 THEN ls_s_msg = ''
  602. ls_msg = '**'+this.Object.s_msgtitle[currentrow]+'**' + char_enter + " "+ls_s_msg //dw_hismsg.object.s_msg [row]
  603. tab_1.tabpage_2.tab_2.tabpage_3.mle_out_msg.text=ls_msg
  604. //附件列表
  605. Long count,ls_i
  606. Long ll_arr_fjid[]
  607. Int li_arr_filetype[]
  608. String ls_arr_filename[]
  609. listviewitem l_lvi
  610. DECLARE fj_cur CURSOR FOR
  611. SELECT fjid,
  612. filename,
  613. filetype
  614. FROM Sys_admsg_fj
  615. Where ( Sys_admsg_fj.msgid = :ls_msgid );
  616. OPEN fj_cur;
  617. count = 1
  618. FETCH fj_cur INTO :ll_arr_fjid[count],&
  619. :ls_arr_filename[count],&
  620. :li_arr_filetype[count];
  621. DO WHILE sqlca.SQLCode = 0
  622. count++
  623. FETCH fj_cur INTO :ll_arr_fjid[count],&
  624. :ls_arr_filename[count],&
  625. :li_arr_filetype[count];
  626. LOOP
  627. count = count - 1
  628. CLOSE fj_cur;
  629. if count > 0 then
  630. tab_1.tabpage_2.tab_2.tabpage_4.text = '附件('+string(count)+')'
  631. else
  632. tab_1.tabpage_2.tab_2.tabpage_4.text = '附件'
  633. end if
  634. FOR ls_i = 1 TO count
  635. l_lvi.Label = ls_arr_filename[ls_i]
  636. l_lvi.Data = ll_arr_fjid[ls_i]
  637. IF li_arr_filetype[ls_i] = 1 THEN //超链接时用第二种图标
  638. l_lvi.PictureIndex = 2
  639. ELSE
  640. l_lvi.PictureIndex = 1
  641. END IF
  642. tab_1.tabpage_2.tab_2.tabpage_4.lv_out_fj.InsertItem(ls_i,l_lvi)
  643. NEXT
  644. END IF
  645. end event
  646. type em_first from editmask within w_msg_his
  647. integer x = 1138
  648. integer y = 8
  649. integer width = 402
  650. integer height = 84
  651. integer taborder = 20
  652. boolean bringtotop = true
  653. integer textsize = -9
  654. integer weight = 400
  655. fontcharset fontcharset = gb2312charset!
  656. fontpitch fontpitch = variable!
  657. string facename = "宋体"
  658. long textcolor = 33554432
  659. string text = "none"
  660. borderstyle borderstyle = stylelowered!
  661. maskdatatype maskdatatype = datetimemask!
  662. string mask = "yyyy-mm-dd"
  663. boolean spin = true
  664. end type
  665. type em_end from editmask within w_msg_his
  666. integer x = 1632
  667. integer y = 8
  668. integer width = 402
  669. integer height = 84
  670. integer taborder = 30
  671. boolean bringtotop = true
  672. integer textsize = -9
  673. integer weight = 400
  674. fontcharset fontcharset = gb2312charset!
  675. fontpitch fontpitch = variable!
  676. string facename = "宋体"
  677. long textcolor = 33554432
  678. string text = "none"
  679. borderstyle borderstyle = stylelowered!
  680. maskdatatype maskdatatype = datetimemask!
  681. string mask = "yyyy-mm-dd"
  682. boolean spin = true
  683. end type
  684. type st_1 from statictext within w_msg_his
  685. integer x = 901
  686. integer y = 24
  687. integer width = 233
  688. integer height = 48
  689. boolean bringtotop = true
  690. integer textsize = -9
  691. integer weight = 400
  692. fontcharset fontcharset = gb2312charset!
  693. fontpitch fontpitch = variable!
  694. string facename = "宋体"
  695. long textcolor = 33554432
  696. long backcolor = 134217739
  697. string text = "日期从:"
  698. boolean focusrectangle = false
  699. end type
  700. type st_2 from statictext within w_msg_his
  701. integer x = 1559
  702. integer y = 28
  703. integer width = 69
  704. integer height = 48
  705. boolean bringtotop = true
  706. integer textsize = -9
  707. integer weight = 400
  708. fontcharset fontcharset = gb2312charset!
  709. fontpitch fontpitch = variable!
  710. string facename = "宋体"
  711. long textcolor = 33554432
  712. long backcolor = 134217739
  713. string text = "到"
  714. boolean focusrectangle = false
  715. end type
  716. type cb_retrieve from uo_imflatbutton within w_msg_his
  717. integer width = 293
  718. integer taborder = 20
  719. boolean bringtotop = true
  720. string text = "刷新"
  721. string normalpicname = "refresh.bmp"
  722. end type
  723. event clicked;call super::clicked;wf_retrieve()
  724. end event
  725. type cb_delmsg from uo_imflatbutton within w_msg_his
  726. boolean visible = false
  727. integer x = 2277
  728. integer y = 112
  729. integer height = 92
  730. integer taborder = 40
  731. boolean bringtotop = true
  732. string text = "删除"
  733. string normalpicname = "DELETE.BMP"
  734. integer picsize = 16
  735. end type
  736. event clicked;call super::clicked;Long cnt ,ll_i
  737. Long ll_row,ll_msgid,ll_pid
  738. Long ll_cnt
  739. Long ll_fail = 0,ll_suc = 0
  740. Long ll_cnt_lp = 0
  741. String ls_msgtitle
  742. String arg_msg
  743. cnt = 0
  744. FOR ll_i = 1 TO tab_1.tabpage_2.dw_send.RowCount()
  745. IF tab_1.tabpage_2.dw_send.Object.ch[ll_i] = 1 THEN
  746. cnt++
  747. END IF
  748. NEXT
  749. IF cnt = 0 THEN
  750. ll_row = tab_1.tabpage_2.dw_send.GetRow()
  751. IF ll_row <= 0 THEN
  752. MessageBox('系统提示','请选定要删除的信息')
  753. RETURN
  754. END IF
  755. IF MessageBox ("询问","是否确定要删除当前的信息?",Question!,YesNo! ) = 2 THEN RETURN
  756. ll_msgid = tab_1.tabpage_2.dw_send.Object.msgid[ll_row]
  757. //检查该信息除超级用户外是否全部收信人都已确认
  758. ll_cnt = 0
  759. SELECT count(*) INTO :ll_cnt
  760. FROM Sys_admsgmx
  761. WHERE msgid = :ll_msgid
  762. AND dealflag = 0
  763. AND empid <> 0 ;
  764. IF sqlca.SQLCode <> 0 THEN
  765. MessageBox('系统提示','查询该信息的收信人是否全部确认失败,'+sqlca.SQLErrText)
  766. RETURN
  767. END IF
  768. IF ll_cnt > 0 THEN
  769. MessageBox('系统提示','该信息还有收信人没有确认,不允许删除')
  770. RETURN
  771. END IF
  772. //检查通过,可能删除.删除发信,收信,附件
  773. DELETE FROM Sys_admsg
  774. Where msgid = :ll_msgid;
  775. IF sqlca.SQLCode <> 0 THEN
  776. ROLLBACK;
  777. MessageBox('Error','删除信息失败,'+sqlca.SQLErrText)
  778. RETURN
  779. END IF
  780. DELETE FROM Sys_admsgmx
  781. Where msgid = :ll_msgid;
  782. IF sqlca.SQLCode <> 0 THEN
  783. ROLLBACK;
  784. MessageBox('Error','删除信息的收信列表失败,'+sqlca.SQLErrText)
  785. RETURN
  786. END IF
  787. DELETE FROM Sys_admsg_fj
  788. Where msgid = :ll_msgid;
  789. IF sqlca.SQLCode <> 0 THEN
  790. ROLLBACK;
  791. MessageBox('Error','删除信息的附件失败,'+sqlca.SQLErrText)
  792. RETURN
  793. END IF
  794. COMMIT;
  795. MessageBox('系统提示','删除信息成功')
  796. cb_retrieve.TriggerEvent(Clicked!)
  797. ELSE
  798. IF MessageBox ("询问","是否确定要删除当前选中的信息?",Question!,YesNo! ) = 2 THEN RETURN
  799. Open(w_sys_wait_jdt) //初始化进度条
  800. w_sys_wait_jdt.Show()
  801. w_sys_wait_jdt.wf_accepttol(cnt)
  802. FOR ll_i = 1 TO tab_1.tabpage_2.dw_send.RowCount()
  803. IF tab_1.tabpage_2.dw_send.Object.ch[ll_i] = 1 THEN
  804. ll_msgid = tab_1.tabpage_2.dw_send.Object.msgid[ll_i]
  805. ll_pid = tab_1.tabpage_2.dw_send.Object.pid[ll_i]
  806. ls_msgtitle = tab_1.tabpage_2.dw_send.Object.s_msgtitle[ll_i]
  807. ll_cnt_lp++
  808. w_sys_wait_jdt.st_msg.Text = '第'+ String(ll_pid)+'行信息正在操作...' //进度信息
  809. w_sys_wait_jdt.wf_inc(ll_cnt_lp)
  810. //检查该信息除超级用户外是否全部收信人都已确认
  811. ll_cnt = 0
  812. SELECT count(*) INTO :ll_cnt
  813. FROM Sys_admsgmx
  814. WHERE msgid = :ll_msgid
  815. AND dealflag = 0
  816. AND empid <> 0
  817. and empid in (select empid from u_user);
  818. IF sqlca.SQLCode <> 0 THEN
  819. arg_msg = arg_msg + string(ll_pid)+ls_msgtitle +' 失败原因:查询该信息的收信人是否全部确认失败,'+sqlca.SQLErrText + '~r~n'
  820. ll_fail++
  821. CONTINUE
  822. END IF
  823. IF ll_cnt > 0 THEN
  824. arg_msg = arg_msg + string(ll_pid)+ ls_msgtitle +' 失败原因:该信息还有收信人没有确认,不允许删除'+ '~r~n'
  825. ll_fail++
  826. CONTINUE
  827. END IF
  828. //检查通过,可能删除.删除发信,收信,附件
  829. DELETE FROM Sys_admsg
  830. Where msgid = :ll_msgid;
  831. IF sqlca.SQLCode <> 0 THEN
  832. ROLLBACK;
  833. arg_msg = arg_msg + string(ll_pid)+ ls_msgtitle +' 失败原因:'+sqlca.SQLErrText+ '~r~n'
  834. ll_fail++
  835. CONTINUE
  836. END IF
  837. DELETE FROM Sys_admsgmx
  838. Where msgid = :ll_msgid;
  839. IF sqlca.SQLCode <> 0 THEN
  840. ROLLBACK;
  841. arg_msg = arg_msg + string(ll_pid)+ ls_msgtitle +' 失败原因:删除信息的收信列表失败,'+sqlca.SQLErrText + '~r~n'
  842. ll_fail++
  843. CONTINUE
  844. END IF
  845. DELETE FROM Sys_admsg_fj
  846. Where msgid = :ll_msgid;
  847. IF sqlca.SQLCode <> 0 THEN
  848. ROLLBACK;
  849. arg_msg = arg_msg + string(ll_pid)+ ls_msgtitle +' 失败原因:删除信息的附件失败,'+sqlca.SQLErrText + '~r~n'
  850. ll_fail++
  851. CONTINUE
  852. END IF
  853. ll_suc++
  854. COMMIT;
  855. END IF
  856. NEXT
  857. Close(w_sys_wait_jdt)
  858. MessageBox(publ_operator,'批删除操作完成!成功:'+String(ll_suc)+',失败:'+String(ll_fail))
  859. IF ll_fail > 0 THEN
  860. OpenWithParm(w_message_err,arg_msg)
  861. END IF
  862. cb_retrieve.TriggerEvent(Clicked!)
  863. END IF
  864. end event
  865. type cbx_all from checkbox within w_msg_his
  866. boolean visible = false
  867. integer x = 2025
  868. integer y = 128
  869. integer width = 238
  870. integer height = 60
  871. boolean bringtotop = true
  872. integer textsize = -9
  873. integer weight = 400
  874. fontcharset fontcharset = gb2312charset!
  875. fontpitch fontpitch = variable!
  876. string facename = "宋体"
  877. long textcolor = 33554432
  878. long backcolor = 134217739
  879. string text = "全选"
  880. end type
  881. event clicked;Long ll_i
  882. IF THIS.Checked THEN
  883. FOR ll_i = 1 TO tab_1.tabpage_2.dw_send.RowCount()
  884. tab_1.tabpage_2.dw_send.Object.ch[ll_i] = 1
  885. NEXT
  886. ELSE
  887. FOR ll_i = 1 TO tab_1.tabpage_2.dw_send.RowCount()
  888. tab_1.tabpage_2.dw_send.Object.ch[ll_i] = 0
  889. NEXT
  890. END IF
  891. end event