w_ljmail_msg_fx.srw 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  1. $PBExportHeader$w_ljmail_msg_fx.srw
  2. $PBExportComments$龙嘉邮件(查看)
  3. forward
  4. global type w_ljmail_msg_fx from w_publ_base_style
  5. end type
  6. type uo_msg from uo_html_editor within w_ljmail_msg_fx
  7. end type
  8. type st_1 from statictext within w_ljmail_msg_fx
  9. end type
  10. type sle_sendempname from singlelineedit within w_ljmail_msg_fx
  11. end type
  12. type st_2 from statictext within w_ljmail_msg_fx
  13. end type
  14. type sle_comname from singlelineedit within w_ljmail_msg_fx
  15. end type
  16. type st_sendtime from statictext within w_ljmail_msg_fx
  17. end type
  18. type cb_re from uo_imflatbutton within w_ljmail_msg_fx
  19. end type
  20. type st_3 from statictext within w_ljmail_msg_fx
  21. end type
  22. type sle_subject from singlelineedit within w_ljmail_msg_fx
  23. end type
  24. end forward
  25. global type w_ljmail_msg_fx from w_publ_base_style
  26. integer width = 3154
  27. integer height = 1972
  28. string title = "邮件"
  29. boolean maxbox = true
  30. boolean resizable = true
  31. long backcolor = 16777215
  32. string icon = "graphics\chain_link_128px.ico"
  33. uo_msg uo_msg
  34. st_1 st_1
  35. sle_sendempname sle_sendempname
  36. st_2 st_2
  37. sle_comname sle_comname
  38. st_sendtime st_sendtime
  39. cb_re cb_re
  40. st_3 st_3
  41. sle_subject sle_subject
  42. end type
  43. global w_ljmail_msg_fx w_ljmail_msg_fx
  44. type variables
  45. long ins_msgid
  46. long ins_sendcomid, ins_sendflag
  47. string ins_ljmail
  48. end variables
  49. forward prototypes
  50. public function integer wf_read_msg ()
  51. end prototypes
  52. public function integer wf_read_msg ();int rslt = 1
  53. string arg_msg
  54. oleobject msg
  55. msg = FXAppCom.GetMsgByMsgid(app_token_fx, ins_msgid, ref arg_msg)
  56. if not IsNull(msg) then
  57. if (msg.GetInt('msgid') > 0) then
  58. string html
  59. html = msg.GetString('htmlbody')
  60. uo_msg.uf_SetHtml(html)
  61. sle_subject.Text = msg.GetString('subject')
  62. sle_sendempname.Text = msg.GetString('sendempname') + '<' + msg.GetString('ljmail') + '>'
  63. sle_comname.Text = msg.GetString('comname')
  64. if not IsNull(msg.GetDateTime('sendtime')) then
  65. st_sendtime.Text = '发件时间:' + string(msg.GetDateTime('sendtime'), 'yyyy-MM-dd hh:mm:ss')
  66. end if
  67. ins_sendcomid = msg.GetInt('sendcomid')
  68. ins_ljmail = msg.GetString('ljmail')
  69. ins_sendflag = msg.GetInt('sendflag')
  70. if (ins_sendflag = 3) then
  71. cb_re.Enabled = true
  72. end if
  73. else
  74. rslt = 0
  75. goto ext
  76. end if
  77. else
  78. rslt = 0
  79. goto ext
  80. end if
  81. if (arg_msg <> '') then
  82. rslt = 0
  83. goto ext
  84. end if
  85. ext:
  86. if (rslt = 0 and arg_msg <> '') then
  87. MessageBox('提示', arg_msg)
  88. end if
  89. return rslt
  90. end function
  91. on w_ljmail_msg_fx.create
  92. int iCurrent
  93. call super::create
  94. this.uo_msg=create uo_msg
  95. this.st_1=create st_1
  96. this.sle_sendempname=create sle_sendempname
  97. this.st_2=create st_2
  98. this.sle_comname=create sle_comname
  99. this.st_sendtime=create st_sendtime
  100. this.cb_re=create cb_re
  101. this.st_3=create st_3
  102. this.sle_subject=create sle_subject
  103. iCurrent=UpperBound(this.Control)
  104. this.Control[iCurrent+1]=this.uo_msg
  105. this.Control[iCurrent+2]=this.st_1
  106. this.Control[iCurrent+3]=this.sle_sendempname
  107. this.Control[iCurrent+4]=this.st_2
  108. this.Control[iCurrent+5]=this.sle_comname
  109. this.Control[iCurrent+6]=this.st_sendtime
  110. this.Control[iCurrent+7]=this.cb_re
  111. this.Control[iCurrent+8]=this.st_3
  112. this.Control[iCurrent+9]=this.sle_subject
  113. end on
  114. on w_ljmail_msg_fx.destroy
  115. call super::destroy
  116. destroy(this.uo_msg)
  117. destroy(this.st_1)
  118. destroy(this.sle_sendempname)
  119. destroy(this.st_2)
  120. destroy(this.sle_comname)
  121. destroy(this.st_sendtime)
  122. destroy(this.cb_re)
  123. destroy(this.st_3)
  124. destroy(this.sle_subject)
  125. end on
  126. event open;call super::open;long temp
  127. temp = Message.DoubleParm
  128. if not IsNull(temp) then
  129. if (temp > 0) then
  130. ins_msgid = temp
  131. wf_read_msg()
  132. end if
  133. end if
  134. uo_msg.uf_setreadonly( )
  135. //uo_msg.ole_web.object.Document.ExecCommand("FontSize", false, 9)
  136. end event
  137. event resize;call super::resize;if (this.Width < 3000) then this.Width = 3000
  138. if (this.Height < 1800) then this.Height = 1800
  139. sle_subject.Width = this.workspacewidth( ) - sle_subject.X - 50
  140. uo_msg.Width = this.workspacewidth( )
  141. uo_msg.Height = this.workspaceheight( ) - uo_msg.Y
  142. cb_exit.X = this.workspacewidth( ) - cb_exit.Width
  143. end event
  144. type cb_func from w_publ_base_style`cb_func within w_ljmail_msg_fx
  145. boolean visible = false
  146. end type
  147. type cb_exit from w_publ_base_style`cb_exit within w_ljmail_msg_fx
  148. integer x = 1307
  149. end type
  150. type ln_bar from w_publ_base_style`ln_bar within w_ljmail_msg_fx
  151. end type
  152. type ln_bar2 from w_publ_base_style`ln_bar2 within w_ljmail_msg_fx
  153. end type
  154. type r_bar from w_publ_base_style`r_bar within w_ljmail_msg_fx
  155. end type
  156. type uo_msg from uo_html_editor within w_ljmail_msg_fx
  157. integer y = 368
  158. integer width = 2624
  159. integer height = 1196
  160. integer taborder = 30
  161. boolean bringtotop = true
  162. end type
  163. on uo_msg.destroy
  164. call uo_html_editor::destroy
  165. end on
  166. type st_1 from statictext within w_ljmail_msg_fx
  167. integer x = 14
  168. integer y = 200
  169. integer width = 219
  170. integer height = 56
  171. boolean bringtotop = true
  172. integer textsize = -9
  173. integer weight = 400
  174. fontcharset fontcharset = gb2312charset!
  175. fontpitch fontpitch = variable!
  176. string facename = "宋体"
  177. long textcolor = 33554432
  178. long backcolor = 16777215
  179. string text = "发件人:"
  180. boolean focusrectangle = false
  181. end type
  182. type sle_sendempname from singlelineedit within w_ljmail_msg_fx
  183. integer x = 210
  184. integer y = 188
  185. integer width = 873
  186. integer height = 68
  187. integer taborder = 30
  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 textcolor = 33554432
  195. boolean displayonly = true
  196. borderstyle borderstyle = stylelowered!
  197. end type
  198. type st_2 from statictext within w_ljmail_msg_fx
  199. integer x = 1102
  200. integer y = 200
  201. integer width = 315
  202. integer height = 56
  203. boolean bringtotop = true
  204. integer textsize = -9
  205. integer weight = 400
  206. fontcharset fontcharset = gb2312charset!
  207. fontpitch fontpitch = variable!
  208. string facename = "宋体"
  209. long textcolor = 33554432
  210. long backcolor = 16777215
  211. string text = "发件人企业:"
  212. boolean focusrectangle = false
  213. end type
  214. type sle_comname from singlelineedit within w_ljmail_msg_fx
  215. integer x = 1403
  216. integer y = 192
  217. integer width = 681
  218. integer height = 68
  219. integer taborder = 40
  220. boolean bringtotop = true
  221. integer textsize = -9
  222. integer weight = 400
  223. fontcharset fontcharset = gb2312charset!
  224. fontpitch fontpitch = variable!
  225. string facename = "宋体"
  226. long textcolor = 33554432
  227. boolean displayonly = true
  228. borderstyle borderstyle = stylelowered!
  229. end type
  230. type st_sendtime from statictext within w_ljmail_msg_fx
  231. integer x = 2117
  232. integer y = 200
  233. integer width = 914
  234. integer height = 56
  235. boolean bringtotop = true
  236. integer textsize = -9
  237. integer weight = 400
  238. fontcharset fontcharset = gb2312charset!
  239. fontpitch fontpitch = variable!
  240. string facename = "宋体"
  241. long textcolor = 33554432
  242. long backcolor = 16777215
  243. string text = "发件时间:"
  244. boolean focusrectangle = false
  245. end type
  246. type cb_re from uo_imflatbutton within w_ljmail_msg_fx
  247. integer width = 151
  248. integer height = 164
  249. integer taborder = 40
  250. boolean bringtotop = true
  251. boolean enabled = false
  252. string text = "回复"
  253. string normalpicname = "graphics\fx_send.bmp"
  254. integer picsize = 16
  255. toolbaralignment pic_align = alignattop!
  256. boolean border = false
  257. end type
  258. event clicked;call super::clicked;// sle_subject.Text = '回复:' + temp.subject
  259. // string html
  260. // html = '<P>####################原始邮件####################</P>' + temp.htmlbody
  261. // uo_1.uf_sethtml(html)
  262. //
  263. // wf_get_contact(temp.revcomid, temp.revljmail)
  264. s_ljmail_msg s_tran
  265. s_tran.subject = Trim(sle_subject.Text)
  266. string temp
  267. temp = '<P>' + sle_sendempname.Text + '(' + st_sendtime.Text + ')</P>'
  268. s_tran.htmlbody = temp + uo_msg.uf_gethtml( )
  269. s_tran.revcomid = ins_sendcomid
  270. s_tran.revljmail = ins_ljmail
  271. OpenWithParm(w_ljmail_send_fx, s_tran)
  272. end event
  273. type st_3 from statictext within w_ljmail_msg_fx
  274. integer x = 14
  275. integer y = 288
  276. integer width = 183
  277. integer height = 56
  278. boolean bringtotop = true
  279. integer textsize = -9
  280. integer weight = 400
  281. fontcharset fontcharset = gb2312charset!
  282. fontpitch fontpitch = variable!
  283. string facename = "宋体"
  284. long textcolor = 33554432
  285. long backcolor = 16777215
  286. string text = "主题:"
  287. boolean focusrectangle = false
  288. end type
  289. type sle_subject from singlelineedit within w_ljmail_msg_fx
  290. integer x = 210
  291. integer y = 280
  292. integer width = 2816
  293. integer height = 68
  294. integer taborder = 40
  295. boolean bringtotop = true
  296. integer textsize = -9
  297. integer weight = 400
  298. fontcharset fontcharset = gb2312charset!
  299. fontpitch fontpitch = variable!
  300. string facename = "宋体"
  301. long textcolor = 33554432
  302. boolean displayonly = true
  303. borderstyle borderstyle = stylelowered!
  304. end type