w_msg_billcode_rel.srw 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395
  1. $PBExportHeader$w_msg_billcode_rel.srw
  2. forward
  3. global type w_msg_billcode_rel from w_publ_base
  4. end type
  5. type dw_msg from u_dw_rbtnfilter within w_msg_billcode_rel
  6. end type
  7. type tab_1 from tab within w_msg_billcode_rel
  8. end type
  9. type tabpage_1 from userobject within tab_1
  10. end type
  11. type dw_msg_content from multilineedit within tabpage_1
  12. end type
  13. type tabpage_1 from userobject within tab_1
  14. dw_msg_content dw_msg_content
  15. end type
  16. type tabpage_2 from userobject within tab_1
  17. end type
  18. type lv_in_fj from uo_msg_lv within tabpage_2
  19. end type
  20. type tabpage_2 from userobject within tab_1
  21. lv_in_fj lv_in_fj
  22. end type
  23. type tabpage_3 from userobject within tab_1
  24. end type
  25. type dw_cmmt from u_dw_rbtnfilter within tabpage_3
  26. end type
  27. type tabpage_3 from userobject within tab_1
  28. dw_cmmt dw_cmmt
  29. end type
  30. type tab_1 from tab within w_msg_billcode_rel
  31. tabpage_1 tabpage_1
  32. tabpage_2 tabpage_2
  33. tabpage_3 tabpage_3
  34. end type
  35. type st_billcode from statictext within w_msg_billcode_rel
  36. end type
  37. type st_2 from statictext within w_msg_billcode_rel
  38. end type
  39. end forward
  40. global type w_msg_billcode_rel from w_publ_base
  41. integer width = 2587
  42. integer height = 2036
  43. string title = "单据相关消息"
  44. boolean minbox = false
  45. windowtype windowtype = response!
  46. dw_msg dw_msg
  47. tab_1 tab_1
  48. st_billcode st_billcode
  49. st_2 st_2
  50. end type
  51. global w_msg_billcode_rel w_msg_billcode_rel
  52. forward prototypes
  53. public subroutine wf_read ()
  54. public subroutine wf_rtr_cmmt ()
  55. end prototypes
  56. public subroutine wf_read ();String char_enter,ls_msg,ls_s_msg
  57. Long ls_msgid,currentrow
  58. char_enter = Char(13)+Char(10)
  59. currentrow = dw_msg.GetRow()
  60. tab_1.tabpage_2.lv_in_fj.DeleteItems()
  61. IF currentrow > 0 THEN
  62. dw_msg.SetRow(currentrow)
  63. dw_msg.SelectRow(0,FALSE)
  64. dw_msg.SelectRow(currentrow,TRUE)
  65. tab_1.tabpage_1.dw_msg_content.Text = ''
  66. ls_msgid = dw_msg.Object.msgid[currentrow]
  67. SELECT s_msg INTO :ls_s_msg FROM Sys_admsg
  68. WHERE Sys_admsg.msgid = :ls_msgid;
  69. IF sqlca.SQLCode <> 0 THEN ls_s_msg = ''
  70. ls_msg = '**'+dw_msg.Object.s_msgtitle[currentrow]+'**' + char_enter + " "+ls_s_msg //dw_msg.object.sys_admsgmx_s_msg [row]
  71. tab_1.tabpage_1.dw_msg_content.Text = ls_msg
  72. //附件列表
  73. Long count,ls_i
  74. Long ll_arr_fjid[]
  75. Int li_arr_filetype[]
  76. String ls_arr_filename[]
  77. listviewitem l_lvi
  78. DECLARE fj_cur CURSOR FOR
  79. SELECT fjid,
  80. filename,
  81. filetype
  82. FROM Sys_admsg_fj
  83. Where ( Sys_admsg_fj.msgid = :ls_msgid );
  84. OPEN fj_cur;
  85. count = 1
  86. FETCH fj_cur INTO :ll_arr_fjid[count],&
  87. :ls_arr_filename[count],&
  88. :li_arr_filetype[count];
  89. DO WHILE sqlca.SQLCode = 0
  90. count++
  91. FETCH fj_cur INTO :ll_arr_fjid[count],&
  92. :ls_arr_filename[count],&
  93. :li_arr_filetype[count];
  94. LOOP
  95. count = count - 1
  96. CLOSE fj_cur;
  97. IF count > 0 THEN
  98. tab_1.tabpage_2.Text = '附件('+String(count)+')'
  99. ELSE
  100. tab_1.tabpage_2.Text = '附件'
  101. END IF
  102. FOR ls_i = 1 TO count
  103. l_lvi.Label = ls_arr_filename[ls_i]
  104. l_lvi.Data = ll_arr_fjid[ls_i]
  105. IF li_arr_filetype[ls_i] = 1 THEN //超链接时用第二种图标
  106. l_lvi.PictureIndex = 2
  107. ELSE
  108. l_lvi.PictureIndex = 1
  109. END IF
  110. tab_1.tabpage_2.lv_in_fj.InsertItem(ls_i,l_lvi)
  111. NEXT
  112. END IF
  113. end subroutine
  114. public subroutine wf_rtr_cmmt ();Long ll_row,ll_msgid
  115. dw_msg.AcceptText()
  116. ll_row = dw_msg.GetRow()
  117. IF ll_row <= 0 THEN
  118. tab_1.tabpage_3.dw_cmmt.Reset()
  119. ELSE
  120. ll_msgid = dw_msg.Object.msgid[ll_row]
  121. tab_1.tabpage_3.dw_cmmt.Retrieve(ll_msgid)
  122. END IF
  123. end subroutine
  124. event open;call super::open;String ls_billcode
  125. ls_billcode = Message.StringParm
  126. st_billcode.text = '单号:'+ls_billcode
  127. dw_msg.SetTransObject(sqlca)
  128. tab_1.tabpage_3.dw_cmmt.SetTransObject(sqlca)
  129. IF dw_msg.Retrieve(ls_billcode) > 0 THEN
  130. dw_msg.SelectRow(0,FALSE)
  131. dw_msg.SetRow(1)
  132. dw_msg.SelectRow(1,TRUE)
  133. END IF
  134. wf_read()
  135. wf_rtr_cmmt()
  136. end event
  137. on w_msg_billcode_rel.create
  138. int iCurrent
  139. call super::create
  140. this.dw_msg=create dw_msg
  141. this.tab_1=create tab_1
  142. this.st_billcode=create st_billcode
  143. this.st_2=create st_2
  144. iCurrent=UpperBound(this.Control)
  145. this.Control[iCurrent+1]=this.dw_msg
  146. this.Control[iCurrent+2]=this.tab_1
  147. this.Control[iCurrent+3]=this.st_billcode
  148. this.Control[iCurrent+4]=this.st_2
  149. end on
  150. on w_msg_billcode_rel.destroy
  151. call super::destroy
  152. destroy(this.dw_msg)
  153. destroy(this.tab_1)
  154. destroy(this.st_billcode)
  155. destroy(this.st_2)
  156. end on
  157. type cb_func from w_publ_base`cb_func within w_msg_billcode_rel
  158. integer x = 677
  159. integer y = 784
  160. end type
  161. type cb_exit from w_publ_base`cb_exit within w_msg_billcode_rel
  162. integer x = 1033
  163. integer y = 680
  164. end type
  165. type dw_msg from u_dw_rbtnfilter within w_msg_billcode_rel
  166. integer y = 108
  167. integer width = 2569
  168. integer height = 844
  169. boolean bringtotop = true
  170. string dataobject = "dw_msg_billcode_rel"
  171. boolean hscrollbar = true
  172. boolean vscrollbar = true
  173. boolean hsplitscroll = true
  174. end type
  175. event rowfocuschanged;call super::rowfocuschanged;IF currentrow > 0 THEN
  176. THIS.SelectRow(0,FALSE)
  177. THIS.SelectRow(currentrow,TRUE)
  178. THIS.SetRow(currentrow)
  179. END IF
  180. wf_read()
  181. wf_rtr_cmmt()
  182. end event
  183. type tab_1 from tab within w_msg_billcode_rel
  184. integer y = 960
  185. integer width = 2569
  186. integer height = 980
  187. integer taborder = 20
  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 = 134217739
  195. boolean raggedright = true
  196. boolean focusonbuttondown = true
  197. integer selectedtab = 1
  198. tabpage_1 tabpage_1
  199. tabpage_2 tabpage_2
  200. tabpage_3 tabpage_3
  201. end type
  202. on tab_1.create
  203. this.tabpage_1=create tabpage_1
  204. this.tabpage_2=create tabpage_2
  205. this.tabpage_3=create tabpage_3
  206. this.Control[]={this.tabpage_1,&
  207. this.tabpage_2,&
  208. this.tabpage_3}
  209. end on
  210. on tab_1.destroy
  211. destroy(this.tabpage_1)
  212. destroy(this.tabpage_2)
  213. destroy(this.tabpage_3)
  214. end on
  215. type tabpage_1 from userobject within tab_1
  216. integer x = 18
  217. integer y = 96
  218. integer width = 2533
  219. integer height = 868
  220. long backcolor = 134217739
  221. string text = "内容"
  222. long tabtextcolor = 33554432
  223. long tabbackcolor = 134217739
  224. long picturemaskcolor = 536870912
  225. dw_msg_content dw_msg_content
  226. end type
  227. on tabpage_1.create
  228. this.dw_msg_content=create dw_msg_content
  229. this.Control[]={this.dw_msg_content}
  230. end on
  231. on tabpage_1.destroy
  232. destroy(this.dw_msg_content)
  233. end on
  234. type dw_msg_content from multilineedit within tabpage_1
  235. integer width = 2533
  236. integer height = 868
  237. integer taborder = 10
  238. integer textsize = -9
  239. integer weight = 400
  240. fontcharset fontcharset = gb2312charset!
  241. fontpitch fontpitch = variable!
  242. string facename = "宋体"
  243. long backcolor = 16777215
  244. boolean vscrollbar = true
  245. borderstyle borderstyle = stylelowered!
  246. end type
  247. type tabpage_2 from userobject within tab_1
  248. integer x = 18
  249. integer y = 96
  250. integer width = 2533
  251. integer height = 868
  252. long backcolor = 134217739
  253. string text = "附件"
  254. long tabtextcolor = 33554432
  255. long tabbackcolor = 134217739
  256. long picturemaskcolor = 536870912
  257. lv_in_fj lv_in_fj
  258. end type
  259. on tabpage_2.create
  260. this.lv_in_fj=create lv_in_fj
  261. this.Control[]={this.lv_in_fj}
  262. end on
  263. on tabpage_2.destroy
  264. destroy(this.lv_in_fj)
  265. end on
  266. type lv_in_fj from uo_msg_lv within tabpage_2
  267. integer width = 2533
  268. integer height = 868
  269. integer taborder = 10
  270. long textcolor = 0
  271. long backcolor = 16777215
  272. end type
  273. type tabpage_3 from userobject within tab_1
  274. integer x = 18
  275. integer y = 96
  276. integer width = 2533
  277. integer height = 868
  278. long backcolor = 134217739
  279. string text = "相关确认"
  280. long tabtextcolor = 33554432
  281. long tabbackcolor = 134217739
  282. long picturemaskcolor = 536870912
  283. dw_cmmt dw_cmmt
  284. end type
  285. on tabpage_3.create
  286. this.dw_cmmt=create dw_cmmt
  287. this.Control[]={this.dw_cmmt}
  288. end on
  289. on tabpage_3.destroy
  290. destroy(this.dw_cmmt)
  291. end on
  292. type dw_cmmt from u_dw_rbtnfilter within tabpage_3
  293. integer width = 2533
  294. integer height = 868
  295. integer taborder = 20
  296. string dataobject = "dw_msg_billcode_rel_user_cmmt"
  297. boolean hscrollbar = true
  298. boolean vscrollbar = true
  299. end type
  300. event rowfocuschanged;call super::rowfocuschanged;IF currentrow <= 0 THEN RETURN
  301. THIS.SelectRow(0,FALSE)
  302. THIS.SelectRow(currentrow,TRUE)
  303. end event
  304. type st_billcode from statictext within w_msg_billcode_rel
  305. integer x = 5
  306. integer y = 4
  307. integer width = 2555
  308. integer height = 96
  309. boolean bringtotop = true
  310. integer textsize = -12
  311. integer weight = 700
  312. fontcharset fontcharset = gb2312charset!
  313. fontpitch fontpitch = variable!
  314. string facename = "宋体"
  315. long textcolor = 33554432
  316. long backcolor = 134217739
  317. alignment alignment = center!
  318. boolean border = true
  319. borderstyle borderstyle = styleraised!
  320. boolean focusrectangle = false
  321. end type
  322. type st_2 from statictext within w_msg_billcode_rel
  323. integer width = 2569
  324. integer height = 108
  325. integer textsize = -9
  326. integer weight = 400
  327. fontcharset fontcharset = gb2312charset!
  328. fontpitch fontpitch = variable!
  329. string facename = "宋体"
  330. long textcolor = 33554432
  331. long backcolor = 134217739
  332. alignment alignment = center!
  333. boolean border = true
  334. boolean focusrectangle = false
  335. end type