w_msg_newstyle.srw 38 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559
  1. $PBExportHeader$w_msg_newstyle.srw
  2. forward
  3. global type w_msg_newstyle from w_publ_base
  4. end type
  5. type r_bg from rectangle within w_msg_newstyle
  6. end type
  7. type dw_list from datawindow within w_msg_newstyle
  8. end type
  9. type dw_msg from datawindow within w_msg_newstyle
  10. end type
  11. type dw_fj from datawindow within w_msg_newstyle
  12. end type
  13. type st_fjtitle from statictext within w_msg_newstyle
  14. end type
  15. type st_empname from statictext within w_msg_newstyle
  16. end type
  17. type mle_edit from multilineedit within w_msg_newstyle
  18. end type
  19. type cb_send from commandbutton within w_msg_newstyle
  20. end type
  21. type st_3 from statictext within w_msg_newstyle
  22. end type
  23. type st_add_msg from statictext within w_msg_newstyle
  24. end type
  25. type p_add_msg from picture within w_msg_newstyle
  26. end type
  27. type st_fjtitle_sub from statictext within w_msg_newstyle
  28. end type
  29. type shl_old from statichyperlink within w_msg_newstyle
  30. end type
  31. type p_fj_add from picture within w_msg_newstyle
  32. end type
  33. type st_fj_add from statictext within w_msg_newstyle
  34. end type
  35. type sle_title from singlelineedit within w_msg_newstyle
  36. end type
  37. type ln_1 from line within w_msg_newstyle
  38. end type
  39. type ln_3 from line within w_msg_newstyle
  40. end type
  41. type st_title_tip_warp from statictext within w_msg_newstyle
  42. end type
  43. type st_title_tip from statictext within w_msg_newstyle
  44. end type
  45. type st_msg_tip_warp from statictext within w_msg_newstyle
  46. end type
  47. type st_msg_tip from statictext within w_msg_newstyle
  48. end type
  49. type sle_billcode from singlelineedit within w_msg_newstyle
  50. end type
  51. type st_billcode_tip_warp from statictext within w_msg_newstyle
  52. end type
  53. type st_billcode_tip from statictext within w_msg_newstyle
  54. end type
  55. type sle_find from singlelineedit within w_msg_newstyle
  56. end type
  57. type st_1 from statictext within w_msg_newstyle
  58. end type
  59. type p_filter_close from picture within w_msg_newstyle
  60. end type
  61. type st_search_tip_warp from statictext within w_msg_newstyle
  62. end type
  63. type st_search_tip from statictext within w_msg_newstyle
  64. end type
  65. type st_no_fj from statictext within w_msg_newstyle
  66. end type
  67. type r_1 from rectangle within w_msg_newstyle
  68. end type
  69. end forward
  70. global type w_msg_newstyle from w_publ_base
  71. integer width = 4704
  72. integer height = 2876
  73. string title = "内部消息"
  74. boolean maxbox = true
  75. long backcolor = 16777215
  76. event ue_msg_setroll ( )
  77. event ue_open_fj ( )
  78. event ue_download_fj ( )
  79. event ue_add_fj ( )
  80. event ue_ifshow_tip ( )
  81. event ue_retrieve_msg ( )
  82. event ue_retrieve_fj ( )
  83. event ue_retrieve_list ( )
  84. event ue_retrieve_all ( )
  85. r_bg r_bg
  86. dw_list dw_list
  87. dw_msg dw_msg
  88. dw_fj dw_fj
  89. st_fjtitle st_fjtitle
  90. st_empname st_empname
  91. mle_edit mle_edit
  92. cb_send cb_send
  93. st_3 st_3
  94. st_add_msg st_add_msg
  95. p_add_msg p_add_msg
  96. st_fjtitle_sub st_fjtitle_sub
  97. shl_old shl_old
  98. p_fj_add p_fj_add
  99. st_fj_add st_fj_add
  100. sle_title sle_title
  101. ln_1 ln_1
  102. ln_3 ln_3
  103. st_title_tip_warp st_title_tip_warp
  104. st_title_tip st_title_tip
  105. st_msg_tip_warp st_msg_tip_warp
  106. st_msg_tip st_msg_tip
  107. sle_billcode sle_billcode
  108. st_billcode_tip_warp st_billcode_tip_warp
  109. st_billcode_tip st_billcode_tip
  110. sle_find sle_find
  111. st_1 st_1
  112. p_filter_close p_filter_close
  113. st_search_tip_warp st_search_tip_warp
  114. st_search_tip st_search_tip
  115. st_no_fj st_no_fj
  116. r_1 r_1
  117. end type
  118. global w_msg_newstyle w_msg_newstyle
  119. type variables
  120. String smax1,smax2,spos1
  121. string fjfilepathname = 'fjtemp'
  122. string ins_openfile_log[] //用于退出后删除
  123. long ins_openfile_log_p=0 //用于退出后删除
  124. s_msg_fj ins_msg_fj[],ins_fj_empty[]
  125. s_msg_newstyle ins_msg_tmp[]
  126. string ins_empname
  127. long ins_empid
  128. uo_transmsg uo_msg
  129. boolean ins_iffocus_title = false,ins_iffocus_msg = false,ins_iffocus_billcode = false
  130. string ori_select_msg,ori_select_fj
  131. s_edit_index_tran s_open
  132. long ins_toprow = 200
  133. end variables
  134. forward prototypes
  135. public subroutine wf_addlog_tempfilepathname (string arg_filepathname)
  136. public subroutine wf_del_tempfilepathname ()
  137. end prototypes
  138. event ue_msg_setroll();////String smax1
  139. //smax1 = dw_msg.Describe("DataWindow.VerticalScrollMaximum")
  140. //dw_msg.Modify("DataWindow.VerticalScrollPosition='"+smax1+"'")
  141. //
  142. smax2 = dw_msg.Describe("DataWindow.VerticalScrollMaximum")
  143. long ll_spos2
  144. If long(smax1) > 0 Then
  145. ll_spos2 = long(spos1) * (long(smax2) / long(smax1))
  146. Else
  147. ll_spos2 = long(smax1)
  148. End If
  149. dw_msg.Modify("DataWindow.VerticalScrollPosition='"+String(ll_spos2)+"'")
  150. end event
  151. event ue_open_fj();int rslt = 1
  152. string ls_pathname
  153. string errmsg
  154. string lsNull
  155. setnull(lsNull)
  156. string arg_filename
  157. blob arg_blob
  158. long arg_fjid
  159. long ll_row
  160. string arg_msg
  161. ll_row = dw_fj.getrow()
  162. if ll_row <= 0 then return
  163. arg_fjid = dw_fj.object.sys_admsg_fj_fjid[ll_row]
  164. arg_filename = dw_fj.object.sys_admsg_fj_filename[ll_row]
  165. SELECTBLOB fileblob INTO :arg_blob FROM Sys_admsg_fj
  166. WHERE fjid = :arg_fjid;
  167. if sqlca.sqlcode <> 0 then
  168. rslt = 0
  169. arg_msg = '获取内部消息附件失败,' + sqlca.sqlerrtext
  170. goto ext
  171. end if
  172. ls_pathname = sys_cur_path+ins_fjtemppath+'\'+String(Today(),'yymmdd')+String(Now(),'hhmmss')+'_'+arg_filename
  173. IF FileExists(ls_pathname) THEN FileDelete(ls_pathname)
  174. IF f_blobtofile(ls_pathname,arg_blob,errmsg) = 0 THEN
  175. rslt = 0
  176. GOTO ext
  177. END IF
  178. wf_addlog_tempfilepathname(ls_pathname)
  179. //打开附件
  180. ShellExecute32( Handle(THIS), lsNull, ls_pathname, lsNull, lsNull, 1 )
  181. ext:
  182. IF rslt = 0 THEN
  183. MessageBox('系统提示',errmsg)
  184. END IF
  185. end event
  186. event ue_download_fj();Int rslt = 1
  187. String ls_pathname
  188. String errmsg
  189. String lsNull
  190. SetNull(lsNull)
  191. String arg_filename
  192. Blob arg_blob
  193. Long arg_fjid,i
  194. Long ll_row
  195. String arg_msg
  196. ll_row = dw_fj.GetRow()
  197. If ll_row <= 0 Then Return
  198. arg_fjid = dw_fj.Object.sys_admsg_fj_fjid[ll_row]
  199. arg_filename = dw_fj.Object.sys_admsg_fj_filename[ll_row]
  200. ls_pathname = arg_filename
  201. long pos1
  202. string ls_filetypename
  203. pos1 = pos(arg_filename,'.',1)
  204. IF pos1 > 0 THEN
  205. ls_filetypename = mid(arg_filename,pos1 + 1, len(arg_filename))
  206. i = GetFileSaveName("另存为",ls_pathname,arg_filename,"*","*."+ls_filetypename+",*."+ls_filetypename)
  207. ELSE
  208. ls_filetypename = ''
  209. i = GetFileSaveName("另存为",ls_pathname,arg_filename,"*","*.*,*.*")
  210. END IF
  211. If i = 1 And Trim(ls_pathname) <> '' Then
  212. SelectBlob fileblob Into :arg_blob From Sys_admsg_fj
  213. Where fjid = :arg_fjid;
  214. If sqlca.SQLCode <> 0 Then
  215. rslt = 0
  216. arg_msg = '获取内部消息附件失败,' + sqlca.SQLErrText
  217. Goto ext
  218. End If
  219. If f_blobtofile(ls_pathname,arg_blob,errmsg) = 0 Then
  220. rslt = 0
  221. Goto ext
  222. End If
  223. messagebox('系统提示','附件保存成功')
  224. End If
  225. ext:
  226. If rslt = 0 Then
  227. MessageBox('系统提示',errmsg)
  228. End If
  229. end event
  230. event ue_add_fj();s_msg_newstyle s_add_fj
  231. s_add_fj.arg_s_fj = ins_msg_fj
  232. openwithparm(w_msg_fj_add_newstyle,s_add_fj)
  233. s_add_fj = message.powerobjectparm
  234. ins_msg_fj = s_add_fj.arg_s_fj
  235. if UpperBound(ins_msg_fj) > 0 then
  236. st_fj_add.text = '已添加'+string(UpperBound(ins_msg_fj))+'个附件'
  237. else
  238. st_fj_add.text = '添加附件'
  239. end if
  240. mle_edit.setfocus()
  241. end event
  242. event ue_ifshow_tip();If ins_iffocus_title = False And ins_iffocus_msg = False And ins_iffocus_billcode = False Then
  243. //先判断是否需要执行,避免界面控件频繁刷新
  244. If st_title_tip_warp.Visible = True Then
  245. st_title_tip_warp.Visible = False
  246. st_title_tip.Visible = False
  247. st_msg_tip_warp.Visible = False
  248. st_msg_tip.Visible = False
  249. st_billcode_tip_warp.Visible = False
  250. st_billcode_tip.Visible = False
  251. End If
  252. Else
  253. If st_title_tip_warp.Visible = False Then
  254. st_title_tip_warp.BringToTop = True
  255. st_title_tip.BringToTop = True
  256. st_title_tip_warp.Visible = True
  257. st_title_tip.Visible = True
  258. st_msg_tip_warp.BringToTop = True
  259. st_msg_tip.BringToTop = True
  260. st_msg_tip_warp.Visible = True
  261. st_msg_tip.Visible = True
  262. st_billcode_tip_warp.BringToTop = True
  263. st_billcode_tip.BringToTop = True
  264. st_billcode_tip_warp.Visible = True
  265. st_billcode_tip.Visible = True
  266. End If
  267. End If
  268. end event
  269. event ue_retrieve_msg();String ls_wherestr,ls_newselect
  270. String arg_msg
  271. String ls_findstr
  272. string ls_orderbystr
  273. ls_wherestr = " WHERE (sys_admsgmx.empid = "+String(sys_empid)+" and sys_admsg.sendempid = "+String(ins_empid)
  274. ls_wherestr += "or sys_admsgmx.empid = "+String(ins_empid) +" and sys_admsg.sendempid = "+String(sys_empid)+") "
  275. If Trim(sle_find.Text) <> '' Then
  276. ls_findstr = '%'+Trim(sle_find.Text)+'%'
  277. ls_wherestr += " and (sys_admsg.s_msg like '" +ls_findstr+"'" +&
  278. " or sys_admsg.s_msgtitle like '" +ls_findstr+"'" +&
  279. " or isnull(u_saletask.relcode,'') like '" +ls_findstr+"'" +&
  280. " or sys_admsg.billcode like '" +ls_findstr+"')"
  281. End If
  282. //ls_orderbystr = ' order by sys_admsgmx.dealdt desc'
  283. //ls_newselect = 'select top '+string(ins_toprow)+' '+mid( ori_select_msg , 8) + ls_wherestr + ls_orderbystr
  284. ls_newselect = ori_select_msg + ls_wherestr
  285. dw_msg.Modify("datawindow.table.select = ~"" + ls_newselect+ "~"")
  286. dw_msg.Retrieve()
  287. //更新收件人是我的消息的已读标记
  288. If dw_msg.Find('read_flag = 0 and empid = '+String(sys_empid),1,dw_msg.RowCount()) > 0 Then
  289. Update Sys_admsgmx
  290. Set read_flag = 1
  291. From Sys_admsg
  292. Inner JOIN Sys_admsgmx
  293. ON Sys_admsg.msgid = Sys_admsgmx.msgid
  294. Where sys_admsg.sendempid = :ins_empid
  295. And Sys_admsgmx.empid = :sys_empid;
  296. If sqlca.SQLCode <> 0 Then
  297. arg_msg = '更新已读标记失败,'+sqlca.SQLErrText
  298. Rollback;
  299. Else
  300. Commit;
  301. End If
  302. End If
  303. //String smax1
  304. smax1 = dw_msg.Describe("DataWindow.VerticalScrollMaximum")
  305. dw_msg.Modify("DataWindow.VerticalScrollPosition='"+smax1+"'")
  306. dw_msg.SetFocus()
  307. end event
  308. event ue_retrieve_fj();string ls_wherestr,ls_newselect,ls_findstr
  309. ls_wherestr= " WHERE (sys_admsgmx.empid = "+string(sys_empid)+" and sys_admsg.sendempid = "+string(ins_empid)
  310. ls_wherestr += "or sys_admsgmx.empid = "+string(ins_empid) +" and sys_admsg.sendempid = "+string(sys_empid)+") "
  311. If Trim(sle_find.Text) <> '' Then
  312. ls_findstr = '%'+Trim(sle_find.Text)+'%'
  313. ls_wherestr += " and (sys_admsg.s_msg like '" +ls_findstr+"'" +&
  314. " or sys_admsg.s_msgtitle like '" +ls_findstr+"'" +&
  315. " or isnull(u_saletask.relcode,'') like '" +ls_findstr+"'" +&
  316. " or sys_admsg.billcode like '" +ls_findstr+"')"
  317. End If
  318. ls_newselect = ori_select_fj + ls_wherestr
  319. dw_fj.Modify("datawindow.table.select = ~"" + ls_newselect+ "~"")
  320. dw_fj.Retrieve()
  321. st_no_fj.visible = (dw_fj.rowcount() = 0)
  322. end event
  323. event ue_retrieve_list();String ls_findstr
  324. If Trim(sle_find.Text) <> '' Then
  325. ls_findstr = '%'+sle_find.Text+'%'
  326. End If
  327. dw_list.Retrieve(sys_empid,ls_findstr)
  328. end event
  329. event ue_retrieve_all();This.TriggerEvent('ue_retrieve_list')
  330. If dw_list.RowCount() > 0 Then
  331. ins_empname = dw_list.Object.empname[1]
  332. ins_empid = dw_list.Object.empid[1]
  333. st_empname.Text = ins_empname
  334. // //刷新 dw_msg及 dw_fj,并更新已读标记,同时更新dw_list的 s_msgtitle,s_msgtitle_ori
  335. This.TriggerEvent('ue_retrieve_msg')
  336. This.TriggerEvent('ue_retrieve_fj')
  337. ////// //
  338. else
  339. dw_msg.reset()
  340. dw_fj.reset()
  341. End If
  342. end event
  343. public subroutine wf_addlog_tempfilepathname (string arg_filepathname);//wf_addlog_tempfilepathname
  344. if isnull(arg_filepathname) or len(trim(arg_filepathname))<3 then return
  345. ins_openfile_log_p++
  346. ins_openfile_log[ins_openfile_log_p]=arg_filepathname
  347. end subroutine
  348. public subroutine wf_del_tempfilepathname ();long li
  349. for li=1 to ins_openfile_log_p
  350. if len(trim(ins_openfile_log[li]))<=0 then
  351. else
  352. FileDelete(ins_openfile_log[li])
  353. end if
  354. next
  355. end subroutine
  356. on w_msg_newstyle.create
  357. int iCurrent
  358. call super::create
  359. this.r_bg=create r_bg
  360. this.dw_list=create dw_list
  361. this.dw_msg=create dw_msg
  362. this.dw_fj=create dw_fj
  363. this.st_fjtitle=create st_fjtitle
  364. this.st_empname=create st_empname
  365. this.mle_edit=create mle_edit
  366. this.cb_send=create cb_send
  367. this.st_3=create st_3
  368. this.st_add_msg=create st_add_msg
  369. this.p_add_msg=create p_add_msg
  370. this.st_fjtitle_sub=create st_fjtitle_sub
  371. this.shl_old=create shl_old
  372. this.p_fj_add=create p_fj_add
  373. this.st_fj_add=create st_fj_add
  374. this.sle_title=create sle_title
  375. this.ln_1=create ln_1
  376. this.ln_3=create ln_3
  377. this.st_title_tip_warp=create st_title_tip_warp
  378. this.st_title_tip=create st_title_tip
  379. this.st_msg_tip_warp=create st_msg_tip_warp
  380. this.st_msg_tip=create st_msg_tip
  381. this.sle_billcode=create sle_billcode
  382. this.st_billcode_tip_warp=create st_billcode_tip_warp
  383. this.st_billcode_tip=create st_billcode_tip
  384. this.sle_find=create sle_find
  385. this.st_1=create st_1
  386. this.p_filter_close=create p_filter_close
  387. this.st_search_tip_warp=create st_search_tip_warp
  388. this.st_search_tip=create st_search_tip
  389. this.st_no_fj=create st_no_fj
  390. this.r_1=create r_1
  391. iCurrent=UpperBound(this.Control)
  392. this.Control[iCurrent+1]=this.r_bg
  393. this.Control[iCurrent+2]=this.dw_list
  394. this.Control[iCurrent+3]=this.dw_msg
  395. this.Control[iCurrent+4]=this.dw_fj
  396. this.Control[iCurrent+5]=this.st_fjtitle
  397. this.Control[iCurrent+6]=this.st_empname
  398. this.Control[iCurrent+7]=this.mle_edit
  399. this.Control[iCurrent+8]=this.cb_send
  400. this.Control[iCurrent+9]=this.st_3
  401. this.Control[iCurrent+10]=this.st_add_msg
  402. this.Control[iCurrent+11]=this.p_add_msg
  403. this.Control[iCurrent+12]=this.st_fjtitle_sub
  404. this.Control[iCurrent+13]=this.shl_old
  405. this.Control[iCurrent+14]=this.p_fj_add
  406. this.Control[iCurrent+15]=this.st_fj_add
  407. this.Control[iCurrent+16]=this.sle_title
  408. this.Control[iCurrent+17]=this.ln_1
  409. this.Control[iCurrent+18]=this.ln_3
  410. this.Control[iCurrent+19]=this.st_title_tip_warp
  411. this.Control[iCurrent+20]=this.st_title_tip
  412. this.Control[iCurrent+21]=this.st_msg_tip_warp
  413. this.Control[iCurrent+22]=this.st_msg_tip
  414. this.Control[iCurrent+23]=this.sle_billcode
  415. this.Control[iCurrent+24]=this.st_billcode_tip_warp
  416. this.Control[iCurrent+25]=this.st_billcode_tip
  417. this.Control[iCurrent+26]=this.sle_find
  418. this.Control[iCurrent+27]=this.st_1
  419. this.Control[iCurrent+28]=this.p_filter_close
  420. this.Control[iCurrent+29]=this.st_search_tip_warp
  421. this.Control[iCurrent+30]=this.st_search_tip
  422. this.Control[iCurrent+31]=this.st_no_fj
  423. this.Control[iCurrent+32]=this.r_1
  424. end on
  425. on w_msg_newstyle.destroy
  426. call super::destroy
  427. destroy(this.r_bg)
  428. destroy(this.dw_list)
  429. destroy(this.dw_msg)
  430. destroy(this.dw_fj)
  431. destroy(this.st_fjtitle)
  432. destroy(this.st_empname)
  433. destroy(this.mle_edit)
  434. destroy(this.cb_send)
  435. destroy(this.st_3)
  436. destroy(this.st_add_msg)
  437. destroy(this.p_add_msg)
  438. destroy(this.st_fjtitle_sub)
  439. destroy(this.shl_old)
  440. destroy(this.p_fj_add)
  441. destroy(this.st_fj_add)
  442. destroy(this.sle_title)
  443. destroy(this.ln_1)
  444. destroy(this.ln_3)
  445. destroy(this.st_title_tip_warp)
  446. destroy(this.st_title_tip)
  447. destroy(this.st_msg_tip_warp)
  448. destroy(this.st_msg_tip)
  449. destroy(this.sle_billcode)
  450. destroy(this.st_billcode_tip_warp)
  451. destroy(this.st_billcode_tip)
  452. destroy(this.sle_find)
  453. destroy(this.st_1)
  454. destroy(this.p_filter_close)
  455. destroy(this.st_search_tip_warp)
  456. destroy(this.st_search_tip)
  457. destroy(this.st_no_fj)
  458. destroy(this.r_1)
  459. end on
  460. event open;call super::open;ori_select_msg = dw_msg.Describe("DataWindow.Table.Select")
  461. ori_select_fj = dw_fj.Describe("DataWindow.Table.Select")
  462. dw_list.SetTransObject(sqlca)
  463. dw_msg.SetTransObject(sqlca)
  464. dw_fj.SetTransObject(sqlca)
  465. s_open = Message.PowerObjectParm
  466. If s_open.b_string <> '' Then
  467. //外面调用,定位到选定的发送人
  468. This.TriggerEvent('ue_retrieve_list')
  469. Long ll_row_f,ll_row_f_msg
  470. ll_row_f = dw_list.Find('empname = "'+s_open.b_string+'"',1,dw_list.RowCount())
  471. If ll_row_f <= 0 Then
  472. ll_row_f = 1
  473. End If
  474. If dw_list.RowCount() > 0 Then
  475. dw_list.SetRow(ll_row_f)
  476. ins_empname = dw_list.Object.empname[ll_row_f]
  477. ins_empid = dw_list.Object.empid[ll_row_f]
  478. st_empname.Text = ins_empname
  479. This.TriggerEvent('ue_retrieve_msg')
  480. This.TriggerEvent('ue_retrieve_fj')
  481. dw_list.SetRow(ll_row_f)
  482. dw_list.ScrollToRow(ll_row_f)
  483. If s_open.b_long > 0 Then
  484. ll_row_f_msg = dw_msg.Find('msgid = '+String(s_open.b_long),1,dw_msg.RowCount())
  485. dw_msg.SetRow(ll_row_f_msg)
  486. dw_msg.ScrollToRow(ll_row_f_msg)
  487. End If
  488. End If
  489. Else
  490. This.TriggerEvent('ue_retrieve_all')
  491. //String smax1
  492. smax1 = dw_msg.Describe("DataWindow.VerticalScrollMaximum")
  493. dw_msg.Modify("DataWindow.VerticalScrollPosition='"+smax1+"'")
  494. End If
  495. If dw_msg.RowCount() > 0 Then
  496. dw_msg.SetRow(dw_msg.RowCount())
  497. End If
  498. //
  499. //if dw_list.rowcount() > 0 then
  500. // ins_empname = dw_list.object.empname[1]
  501. // ins_empid = dw_list.object.empid[1]
  502. // st_empname.text = ins_empname
  503. //
  504. // //将XX条未读 改为 最近一条的标题,因为点击进来就是已读了
  505. // dw_list.Object.s_msgtitle[1] = dw_list.Object.s_msgtitle_ori[1]
  506. //
  507. // ////刷新 dw_msg及 dw_fj,并更新已读标记,同时更新dw_list的 s_msgtitle,s_msgtitle_ori
  508. // this.triggerevent('ue_retrieve_msg')
  509. // this.triggerevent('ue_retrieve_fj')
  510. // ////////
  511. //
  512. //end if
  513. //
  514. dw_msg.SetFocus()
  515. //This.PostEvent('ue_msg_setroll')
  516. end event
  517. event resize;call super::resize;/////各代码前后顺序不要随便改动,涉及到相对位置,有严格的先后顺序
  518. this.setredraw(false)
  519. r_bg.width = this.workspacewidth() + 10
  520. r_bg.height= ln_1.BeginY + 4
  521. ln_1.BeginX = 0 // dw_msg.x
  522. ln_1.EndX = This.WorkSpaceWidth() + 10 //ln_3.BeginX //dw_msg.x + dw_msg.width
  523. ln_3.BeginY = ln_1.BeginY
  524. ln_3.EndY = This.WorkSpaceHeight() + 10 // dw_fj.y + dw_fj.height
  525. dw_list.Height = This.WorkSpaceHeight() - dw_list.Y - 10
  526. dw_fj.X = This.WorkSpaceWidth() - dw_fj.Width - 10
  527. ln_3.BeginX = dw_fj.X - 4
  528. ln_3.EndX = ln_3.BeginX
  529. //记录当前滚动条位置,用于resize后让滚动条回到该位置,否则滚动条会在最顶部
  530. Long ll_spos2
  531. spos1 = dw_msg.Describe("DataWindow.VerticalScrollPosition")
  532. smax1 = dw_msg.Describe("DataWindow.VerticalScrollMaximum")
  533. dw_msg.x = dw_list.x + dw_list.width + 10
  534. dw_msg.object.s_msg.width = This.WorkSpaceWidth() - dw_msg.X - dw_fj.Width - 25 - 300// dw_msg.width - 400
  535. dw_msg.object.s_msgtitle.width = This.WorkSpaceWidth() - dw_msg.X - dw_fj.Width - 25 - 300//dw_msg.width - 400
  536. dw_msg.Height = This.WorkSpaceHeight() - dw_msg.Y - 830 // 830是录入部分的高度
  537. dw_msg.Width = This.WorkSpaceWidth() - dw_msg.X - dw_fj.Width - 25
  538. mle_edit.X = dw_msg.X
  539. mle_edit.Width = dw_msg.Width
  540. sle_title.x = mle_edit.X
  541. sle_title.y = dw_msg.Y + dw_msg.Height + 24
  542. sle_title.width = mle_edit.Width
  543. mle_edit.Y = sle_title.y + sle_title.height + 4 //dw_msg.Y + dw_msg.Height + 24
  544. st_title_tip_warp.y = sle_title.y
  545. st_title_tip.y = sle_title.y + 16
  546. st_msg_tip_warp.y = mle_edit.y
  547. st_msg_tip.y = mle_edit.y + 16
  548. cb_send.X = mle_edit.X + mle_edit.Width - cb_send.Width
  549. cb_send.Y = This.WorkSpaceHeight() - 116
  550. sle_billcode.x = mle_edit.X
  551. sle_billcode.y = cb_send.Y
  552. st_billcode_tip_warp.y = sle_billcode.y
  553. st_billcode_tip.y = sle_billcode.y + 16
  554. mle_edit.height = sle_billcode.y - 4 - mle_edit.y
  555. p_fj_add.y = cb_send.y + 8
  556. st_fj_add.y = cb_send.y + 16
  557. st_fjtitle.x = dw_fj.x + 42
  558. st_fjtitle_sub.x = st_fjtitle.x + st_fjtitle.width + 5
  559. dw_fj.height = This.WorkSpaceHeight() - dw_fj.Y - 10
  560. shl_old.x = dw_msg.x + dw_msg.width - shl_old.width - 10
  561. st_no_fj.x = dw_fj.x + 389
  562. //还原滚动条位置
  563. this.postevent('ue_msg_setroll')
  564. this.setredraw(true)
  565. end event
  566. event close;call super::close;// 删除临时文件
  567. wf_del_tempfilepathname()
  568. end event
  569. type cb_func from w_publ_base`cb_func within w_msg_newstyle
  570. boolean visible = false
  571. integer taborder = 30
  572. end type
  573. type cb_exit from w_publ_base`cb_exit within w_msg_newstyle
  574. boolean visible = false
  575. end type
  576. type r_bg from rectangle within w_msg_newstyle
  577. long linecolor = 33554432
  578. linestyle linestyle = transparent!
  579. integer linethickness = 4
  580. long fillcolor = 29920514
  581. integer width = 521
  582. integer height = 176
  583. end type
  584. type dw_list from datawindow within w_msg_newstyle
  585. integer x = 14
  586. integer y = 132
  587. integer width = 987
  588. integer height = 2612
  589. integer taborder = 60
  590. boolean bringtotop = true
  591. string title = "none"
  592. string dataobject = "dw_msg_userlist_newstyle_demo"
  593. boolean vscrollbar = true
  594. boolean border = false
  595. boolean livescroll = true
  596. borderstyle borderstyle = stylelowered!
  597. end type
  598. event clicked;If row > 0 Then
  599. Long i
  600. Boolean lb_iffind = False
  601. Long cnt,ll_find,ll_row_f
  602. cnt = UpperBound(ins_msg_tmp)
  603. //记录原有发送对象的未发送内容
  604. For i = 1 To cnt
  605. If ins_msg_tmp[i].empname = ins_empname Then
  606. lb_iffind = True
  607. ll_find = i
  608. Exit
  609. End If
  610. Next
  611. If lb_iffind = False Then
  612. cnt++
  613. ins_msg_tmp[cnt].empname = ins_empname
  614. ins_msg_tmp[cnt].empid = ins_empid
  615. ll_find = cnt
  616. End If
  617. ins_msg_tmp[ll_find].s_msgtitle = Trim(sle_title.Text)
  618. ins_msg_tmp[ll_find].s_msg = Trim(mle_edit.Text)
  619. ins_msg_tmp[ll_find].billcode = Trim(sle_billcode.Text)
  620. ins_msg_tmp[ll_find].arg_s_fj = ins_msg_fj
  621. //更新换行前的那一行内容为【正在编辑发送内容】
  622. ll_row_f = dw_list.Find('empid = '+String(ins_empid),1,dw_list.RowCount())
  623. If ll_row_f > 0 Then
  624. If Trim(sle_title.Text) <> '' Or Trim(mle_edit.Text) <> '' or Trim(sle_billcode.Text) <> '' Or UpperBound(ins_msg_fj) > 0 Then
  625. dw_list.Object.s_msgtitle[ll_row_f] = '[正在编辑发送内容]'
  626. dw_list.Object.editing[ll_row_f] = 1
  627. Else
  628. // if trim(sle_find.text) = '' then
  629. dw_list.Object.s_msgtitle[ll_row_f] = dw_list.Object.s_msgtitle_ori[ll_row_f]
  630. // end if
  631. dw_list.Object.editing[ll_row_f] = 0
  632. End If
  633. End If
  634. /////// //
  635. ////新的一行信息
  636. ins_empname = This.Object.empname[row]
  637. ins_empid = This.Object.empid[row]
  638. //将XX条未读 改为 最近一条的标题,因为点击进来就是已读了
  639. // if trim(sle_find.text) = '' then
  640. dw_list.Object.s_msgtitle[row] = dw_list.Object.s_msgtitle_ori[row]
  641. // end if
  642. dw_list.Object.editing[row] = 0
  643. st_empname.Text = ins_empname
  644. ins_msg_fj = ins_fj_empty
  645. sle_title.Text = ''
  646. mle_edit.Text = ''
  647. sle_billcode.Text = ''
  648. ////还原之前编辑未发送的内容
  649. For i = 1 To UpperBound(ins_msg_tmp)
  650. If ins_empname = ins_msg_tmp[i].empname Then
  651. sle_title.Text = ins_msg_tmp[i].s_msgtitle
  652. mle_edit.Text = ins_msg_tmp[i].s_msg
  653. ins_msg_fj = ins_msg_tmp[i].arg_s_fj
  654. sle_billcode.Text = ins_msg_tmp[i].billcode
  655. End If
  656. Next
  657. If UpperBound(ins_msg_fj) > 0 Then
  658. st_fj_add.Text = '已添加'+String(UpperBound(ins_msg_fj))+'个附件'
  659. Else
  660. st_fj_add.Text = '添加附件'
  661. End If
  662. //////
  663. ////刷新 dw_msg及 dw_fj,并更新已读标记,同时更新dw_list的 s_msgtitle,s_msgtitle_ori
  664. parent.triggerevent('ue_retrieve_msg')
  665. parent.triggerevent('ue_retrieve_fj')
  666. ////////
  667. If Trim(sle_title.Text) <> '' Or Trim(mle_edit.Text) <> '' or Trim(sle_billcode.Text) <> '' Or UpperBound(ins_msg_fj) > 0 Then
  668. mle_edit.setfocus()
  669. end if
  670. End If
  671. end event
  672. type dw_msg from datawindow within w_msg_newstyle
  673. integer x = 1006
  674. integer y = 132
  675. integer width = 2446
  676. integer height = 1904
  677. integer taborder = 70
  678. boolean bringtotop = true
  679. string title = "none"
  680. string dataobject = "dw_msg_mainface_newstyle_demo"
  681. boolean vscrollbar = true
  682. boolean border = false
  683. boolean livescroll = true
  684. end type
  685. event clicked;if row > 0 then
  686. if dwo.name = 'relcode' then
  687. long ll_scid
  688. string ls_code
  689. ll_scid = this.object.scid[row]
  690. ls_code = this.object.billcode[row]
  691. IF ls_code <> '' THEN
  692. f_open_win(ll_scid,ls_code)
  693. END IF
  694. elseif dwo.name = 'p_fj' or dwo.name = 'fjstr' then
  695. s_edit_index_tran s_fj_open
  696. s_fj_open.b_long = this.object.msgid[row]
  697. openwithparm(w_msg_fj_view_newstyle,s_fj_open)
  698. end if
  699. end if
  700. end event
  701. type dw_fj from datawindow within w_msg_newstyle
  702. integer x = 3483
  703. integer y = 132
  704. integer width = 1202
  705. integer height = 2600
  706. integer taborder = 80
  707. boolean bringtotop = true
  708. string title = "none"
  709. string dataobject = "dw_msg_fj_newstyle_demo"
  710. boolean vscrollbar = true
  711. boolean border = false
  712. boolean livescroll = true
  713. end type
  714. event doubleclicked;parent.triggerevent('ue_open_fj')
  715. end event
  716. event clicked;if row > 0 then
  717. this.setrow(row)
  718. if dwo.name = 't_download' then
  719. parent.triggerevent('ue_download_fj')
  720. end if
  721. end if
  722. end event
  723. type st_fjtitle from statictext within w_msg_newstyle
  724. integer x = 3525
  725. integer y = 40
  726. integer width = 329
  727. integer height = 60
  728. boolean bringtotop = true
  729. integer textsize = -11
  730. integer weight = 700
  731. fontcharset fontcharset = gb2312charset!
  732. fontpitch fontpitch = variable!
  733. string facename = "宋体"
  734. long textcolor = 16777215
  735. long backcolor = 29920514
  736. string text = "附件汇总"
  737. boolean focusrectangle = false
  738. end type
  739. type st_empname from statictext within w_msg_newstyle
  740. integer x = 1019
  741. integer y = 40
  742. integer width = 320
  743. integer height = 60
  744. boolean bringtotop = true
  745. integer textsize = -11
  746. integer weight = 700
  747. fontcharset fontcharset = gb2312charset!
  748. fontpitch fontpitch = variable!
  749. string facename = "宋体"
  750. long textcolor = 16777215
  751. long backcolor = 29920514
  752. string text = "姓名"
  753. boolean focusrectangle = false
  754. end type
  755. type mle_edit from multilineedit within w_msg_newstyle
  756. integer x = 1019
  757. integer y = 2148
  758. integer width = 2423
  759. integer height = 528
  760. integer taborder = 40
  761. boolean bringtotop = true
  762. integer textsize = -10
  763. integer weight = 400
  764. fontcharset fontcharset = gb2312charset!
  765. fontpitch fontpitch = variable!
  766. string facename = "宋体"
  767. long textcolor = 33554432
  768. long backcolor = 16777215
  769. boolean vscrollbar = true
  770. boolean autovscroll = true
  771. borderstyle borderstyle = stylelowered!
  772. end type
  773. event losefocus;ins_iffocus_msg = false
  774. parent.triggerevent('ue_ifshow_tip')
  775. end event
  776. event getfocus;ins_iffocus_msg = true
  777. parent.triggerevent('ue_ifshow_tip')
  778. end event
  779. type cb_send from commandbutton within w_msg_newstyle
  780. integer x = 3136
  781. integer y = 2684
  782. integer width = 306
  783. integer height = 92
  784. integer taborder = 90
  785. boolean bringtotop = true
  786. integer textsize = -10
  787. integer weight = 400
  788. fontcharset fontcharset = gb2312charset!
  789. fontpitch fontpitch = variable!
  790. string facename = "宋体"
  791. string text = "发送"
  792. end type
  793. event clicked;String ls_objdpm,ls_msgtitle,ls_s_msg,arg_msg,ls_billcode
  794. Boolean ifcommit
  795. Long ls_i
  796. ls_objdpm = ins_empname
  797. ls_msgtitle = Trim(sle_title.Text)
  798. ls_s_msg = Trim(mle_edit.Text)
  799. ls_billcode = Trim(sle_billcode.Text)
  800. If Trim(ls_objdpm) = '' Then
  801. MessageBox('系统提示','请指定收件人')
  802. Return
  803. End If
  804. if ls_s_msg = '' then
  805. MessageBox('系统提示','请输入消息内容')
  806. Return
  807. End If
  808. If Trim(ls_msgtitle) = '' Then
  809. if len(ls_s_msg) > 12 then
  810. ls_msgtitle = left(ls_s_msg,12) + '...'
  811. else
  812. ls_msgtitle = ls_s_msg
  813. end if
  814. // MessageBox('系统提示','请输入标题')
  815. // sle_title.SetFocus()
  816. // Return
  817. End If
  818. Blob ls_filedata,ls_filedate_arr[]
  819. Long ll_cnt_fj
  820. Long ll_FileID
  821. For ls_i = 1 To UpperBound(ins_msg_fj)
  822. If f_filetoblob(ins_msg_fj[ls_i].fjpath,ls_filedata,arg_msg) = 0 Then
  823. MessageBox('系统提示','文件读取失败:'+ ins_msg_fj[ls_i].fjname+'~r~n'+arg_msg)
  824. Return
  825. End If
  826. ins_msg_fj[ls_i].filedata = ls_filedata
  827. Next
  828. If ll_cnt_fj = 0 Then
  829. ifcommit = True
  830. Else
  831. ifcommit = False
  832. End If
  833. If uo_msg.f_create_admsg(sys_empid,publ_operator,ls_objdpm,ls_msgtitle,ls_s_msg,arg_msg,0,ls_billcode,ifcommit) = 0 Then
  834. MessageBox('系统提示','消息发送失败'+'~r~n'+arg_msg)
  835. Return
  836. End If
  837. For ls_i = 1 To UpperBound(ins_msg_fj)
  838. If ls_i = UpperBound(ins_msg_fj) Then
  839. ifcommit = True
  840. Else
  841. ifcommit = False
  842. End If
  843. If uo_msg.f_save_fj(uo_msg.uo_msgid,&
  844. ins_msg_fj[ls_i].fjname,&
  845. ins_msg_fj[ls_i].filedata,&
  846. 0,&
  847. 0,arg_msg,ifcommit) = 0 Then
  848. MessageBox('系统提示','添加附件失败'+'~r~n'+arg_msg)
  849. Return
  850. End If
  851. Next
  852. sle_title.Text = ''
  853. mle_edit.Text = ''
  854. sle_billcode.Text = ''
  855. ins_msg_fj = ins_fj_empty
  856. st_fj_add.text = '添加附件'
  857. //刷新dw_msg,dw_fj
  858. Parent.TriggerEvent('ue_retrieve_msg')
  859. Parent.TriggerEvent('ue_retrieve_fj')
  860. end event
  861. type st_3 from statictext within w_msg_newstyle
  862. integer x = 32
  863. integer y = 40
  864. integer width = 402
  865. integer height = 60
  866. boolean bringtotop = true
  867. integer textsize = -11
  868. integer weight = 700
  869. fontcharset fontcharset = gb2312charset!
  870. fontpitch fontpitch = variable!
  871. string facename = "宋体"
  872. long textcolor = 16777215
  873. long backcolor = 29920514
  874. string text = "历史联系人"
  875. boolean focusrectangle = false
  876. end type
  877. type st_add_msg from statictext within w_msg_newstyle
  878. integer x = 549
  879. integer y = 44
  880. integer width = 411
  881. integer height = 60
  882. boolean bringtotop = true
  883. integer textsize = -9
  884. integer weight = 400
  885. fontcharset fontcharset = gb2312charset!
  886. fontpitch fontpitch = variable!
  887. string facename = "宋体"
  888. string pointer = "HyperLink!"
  889. long textcolor = 16777215
  890. long backcolor = 29920514
  891. string text = "新联系人/群发"
  892. boolean focusrectangle = false
  893. end type
  894. event clicked;s_admsg s_msg,s_return
  895. s_msg.ifback = 0
  896. openwithparm(w_msg_send_normal,s_msg)
  897. s_return = message.powerobjectparm
  898. if s_return.ifsend = 1 then
  899. //刷新
  900. parent.triggerevent('ue_retrieve_all')
  901. end if
  902. end event
  903. type p_add_msg from picture within w_msg_newstyle
  904. integer x = 466
  905. integer y = 40
  906. integer width = 73
  907. integer height = 64
  908. boolean bringtotop = true
  909. string pointer = "HyperLink!"
  910. string picturename = "msg_add_newstyle.jpg"
  911. boolean focusrectangle = false
  912. end type
  913. event clicked;st_add_msg.triggerevent(clicked!)
  914. end event
  915. type st_fjtitle_sub from statictext within w_msg_newstyle
  916. integer x = 3849
  917. integer y = 44
  918. integer width = 402
  919. integer height = 60
  920. boolean bringtotop = true
  921. integer textsize = -9
  922. integer weight = 400
  923. fontcharset fontcharset = gb2312charset!
  924. fontpitch fontpitch = variable!
  925. string facename = "宋体"
  926. long textcolor = 16777215
  927. long backcolor = 29920514
  928. string text = "双击可打开附件"
  929. boolean focusrectangle = false
  930. end type
  931. type shl_old from statichyperlink within w_msg_newstyle
  932. integer x = 3008
  933. integer y = 44
  934. integer width = 466
  935. integer height = 60
  936. boolean bringtotop = true
  937. integer textsize = -9
  938. integer weight = 400
  939. fontcharset fontcharset = gb2312charset!
  940. fontpitch fontpitch = variable!
  941. string facename = "宋体"
  942. string pointer = "HyperLink!"
  943. long textcolor = 16777215
  944. long backcolor = 29920514
  945. string text = "进入传统消息管理"
  946. boolean focusrectangle = false
  947. end type
  948. event clicked;long ll_msgid
  949. if dw_msg.getrow() > 0 then
  950. ll_msgid = dw_msg.object.msgid[dw_msg.getrow()]
  951. end if
  952. OpenWithParm(w_email_view,ll_msgid)
  953. end event
  954. type p_fj_add from picture within w_msg_newstyle
  955. integer x = 1632
  956. integer y = 2692
  957. integer width = 73
  958. integer height = 64
  959. boolean bringtotop = true
  960. boolean originalsize = true
  961. string picturename = "mt_fj_add.png"
  962. boolean focusrectangle = false
  963. end type
  964. event clicked;parent.triggerevent('ue_add_fj')
  965. end event
  966. type st_fj_add from statictext within w_msg_newstyle
  967. integer x = 1723
  968. integer y = 2700
  969. integer width = 535
  970. integer height = 48
  971. boolean bringtotop = true
  972. integer textsize = -9
  973. integer weight = 400
  974. fontcharset fontcharset = gb2312charset!
  975. fontpitch fontpitch = variable!
  976. string facename = "宋体"
  977. long textcolor = 134217856
  978. long backcolor = 16777215
  979. string text = "添加附件"
  980. boolean focusrectangle = false
  981. end type
  982. event clicked;parent.triggerevent('ue_add_fj')
  983. end event
  984. type sle_title from singlelineedit within w_msg_newstyle
  985. event key pbm_keydown
  986. integer x = 1019
  987. integer y = 2048
  988. integer width = 2423
  989. integer height = 92
  990. integer taborder = 20
  991. boolean bringtotop = true
  992. integer textsize = -10
  993. integer weight = 400
  994. fontcharset fontcharset = gb2312charset!
  995. fontpitch fontpitch = variable!
  996. string facename = "宋体"
  997. long textcolor = 33554432
  998. long backcolor = 16777215
  999. borderstyle borderstyle = stylelowered!
  1000. end type
  1001. event key;if key = keyenter! then
  1002. mle_edit.setfocus()
  1003. end if
  1004. end event
  1005. event getfocus;ins_iffocus_title = true
  1006. parent.triggerevent('ue_ifshow_tip')
  1007. end event
  1008. event losefocus;ins_iffocus_title = false
  1009. parent.triggerevent('ue_ifshow_tip')
  1010. end event
  1011. type ln_1 from line within w_msg_newstyle
  1012. long linecolor = 30988504
  1013. integer linethickness = 4
  1014. integer beginx = 1033
  1015. integer beginy = 124
  1016. integer endx = 2080
  1017. integer endy = 124
  1018. end type
  1019. type ln_3 from line within w_msg_newstyle
  1020. long linecolor = 30988504
  1021. integer linethickness = 4
  1022. integer beginx = 3474
  1023. integer beginy = 152
  1024. integer endx = 3474
  1025. integer endy = 712
  1026. end type
  1027. type st_title_tip_warp from statictext within w_msg_newstyle
  1028. boolean visible = false
  1029. integer x = 759
  1030. integer y = 2048
  1031. integer width = 247
  1032. integer height = 92
  1033. boolean bringtotop = true
  1034. integer textsize = -10
  1035. integer weight = 400
  1036. fontcharset fontcharset = gb2312charset!
  1037. fontpitch fontpitch = variable!
  1038. string facename = "宋体"
  1039. long textcolor = 8421504
  1040. long backcolor = 15793151
  1041. alignment alignment = center!
  1042. boolean border = true
  1043. long bordercolor = 8421504
  1044. boolean focusrectangle = false
  1045. end type
  1046. type st_title_tip from statictext within w_msg_newstyle
  1047. boolean visible = false
  1048. integer x = 782
  1049. integer y = 2064
  1050. integer width = 197
  1051. integer height = 60
  1052. boolean bringtotop = true
  1053. integer textsize = -10
  1054. integer weight = 400
  1055. fontcharset fontcharset = gb2312charset!
  1056. fontpitch fontpitch = variable!
  1057. string facename = "宋体"
  1058. long textcolor = 8421504
  1059. long backcolor = 15793151
  1060. string text = "标题"
  1061. alignment alignment = center!
  1062. boolean focusrectangle = false
  1063. end type
  1064. type st_msg_tip_warp from statictext within w_msg_newstyle
  1065. boolean visible = false
  1066. integer x = 759
  1067. integer y = 2152
  1068. integer width = 247
  1069. integer height = 92
  1070. boolean bringtotop = true
  1071. integer textsize = -10
  1072. integer weight = 400
  1073. fontcharset fontcharset = gb2312charset!
  1074. fontpitch fontpitch = variable!
  1075. string facename = "宋体"
  1076. long textcolor = 8421504
  1077. long backcolor = 15793151
  1078. alignment alignment = center!
  1079. boolean border = true
  1080. long bordercolor = 8421504
  1081. boolean focusrectangle = false
  1082. end type
  1083. type st_msg_tip from statictext within w_msg_newstyle
  1084. boolean visible = false
  1085. integer x = 782
  1086. integer y = 2168
  1087. integer width = 197
  1088. integer height = 60
  1089. boolean bringtotop = true
  1090. integer textsize = -10
  1091. integer weight = 400
  1092. fontcharset fontcharset = gb2312charset!
  1093. fontpitch fontpitch = variable!
  1094. string facename = "宋体"
  1095. long textcolor = 8421504
  1096. long backcolor = 15793151
  1097. string text = "正文"
  1098. alignment alignment = center!
  1099. boolean focusrectangle = false
  1100. end type
  1101. type sle_billcode from singlelineedit within w_msg_newstyle
  1102. event key pbm_keydown
  1103. integer x = 1019
  1104. integer y = 2680
  1105. integer width = 549
  1106. integer height = 92
  1107. integer taborder = 50
  1108. boolean bringtotop = true
  1109. integer textsize = -10
  1110. integer weight = 400
  1111. fontcharset fontcharset = gb2312charset!
  1112. fontpitch fontpitch = variable!
  1113. string facename = "宋体"
  1114. long textcolor = 33554432
  1115. long backcolor = 16777215
  1116. borderstyle borderstyle = stylelowered!
  1117. end type
  1118. event getfocus;ins_iffocus_billcode = true
  1119. parent.triggerevent('ue_ifshow_tip')
  1120. end event
  1121. event losefocus;ins_iffocus_billcode = false
  1122. parent.triggerevent('ue_ifshow_tip')
  1123. end event
  1124. type st_billcode_tip_warp from statictext within w_msg_newstyle
  1125. boolean visible = false
  1126. integer x = 759
  1127. integer y = 2680
  1128. integer width = 247
  1129. integer height = 92
  1130. boolean bringtotop = true
  1131. integer textsize = -10
  1132. integer weight = 400
  1133. fontcharset fontcharset = gb2312charset!
  1134. fontpitch fontpitch = variable!
  1135. string facename = "宋体"
  1136. long textcolor = 8421504
  1137. long backcolor = 15793151
  1138. alignment alignment = center!
  1139. boolean border = true
  1140. long bordercolor = 8421504
  1141. boolean focusrectangle = false
  1142. end type
  1143. type st_billcode_tip from statictext within w_msg_newstyle
  1144. boolean visible = false
  1145. integer x = 782
  1146. integer y = 2700
  1147. integer width = 197
  1148. integer height = 60
  1149. boolean bringtotop = true
  1150. integer textsize = -10
  1151. integer weight = 400
  1152. fontcharset fontcharset = gb2312charset!
  1153. fontpitch fontpitch = variable!
  1154. string facename = "宋体"
  1155. long textcolor = 8421504
  1156. long backcolor = 15793151
  1157. string text = "相关号"
  1158. alignment alignment = center!
  1159. boolean focusrectangle = false
  1160. end type
  1161. type sle_find from singlelineedit within w_msg_newstyle
  1162. event key pbm_keydown
  1163. integer x = 1522
  1164. integer y = 36
  1165. integer width = 1339
  1166. integer height = 60
  1167. integer taborder = 20
  1168. boolean bringtotop = true
  1169. integer textsize = -9
  1170. integer weight = 400
  1171. fontcharset fontcharset = gb2312charset!
  1172. fontpitch fontpitch = variable!
  1173. string facename = "宋体"
  1174. long textcolor = 33554432
  1175. long backcolor = 16777215
  1176. boolean border = false
  1177. end type
  1178. event key;If Key = keyenter! Then
  1179. Parent.TriggerEvent('ue_retrieve_all')
  1180. sle_find.SetFocus()
  1181. End If
  1182. end event
  1183. event getfocus;
  1184. st_search_tip_warp.BringToTop = True
  1185. st_search_tip.BringToTop = True
  1186. st_search_tip_warp.Visible = True
  1187. st_search_tip.Visible = True
  1188. end event
  1189. event losefocus;st_search_tip.visible = false
  1190. st_search_tip_warp.visible = false
  1191. end event
  1192. type st_1 from statictext within w_msg_newstyle
  1193. integer x = 1385
  1194. integer y = 36
  1195. integer width = 123
  1196. integer height = 52
  1197. boolean bringtotop = true
  1198. integer textsize = -9
  1199. integer weight = 400
  1200. fontcharset fontcharset = gb2312charset!
  1201. fontpitch fontpitch = variable!
  1202. string facename = "宋体"
  1203. long textcolor = 8421504
  1204. long backcolor = 16777215
  1205. string text = "搜索"
  1206. alignment alignment = right!
  1207. boolean focusrectangle = false
  1208. end type
  1209. event clicked;sle_find.setfocus()
  1210. end event
  1211. type p_filter_close from picture within w_msg_newstyle
  1212. integer x = 2875
  1213. integer y = 32
  1214. integer width = 73
  1215. integer height = 64
  1216. boolean bringtotop = true
  1217. boolean originalsize = true
  1218. string picturename = "dm_close.png"
  1219. boolean focusrectangle = false
  1220. end type
  1221. event clicked;If Trim(sle_find.Text) <> '' Then
  1222. sle_find.Text = ''
  1223. Parent.TriggerEvent('ue_retrieve_all')
  1224. End If
  1225. sle_find.SetFocus()
  1226. end event
  1227. type st_search_tip_warp from statictext within w_msg_newstyle
  1228. boolean visible = false
  1229. integer x = 1367
  1230. integer y = 120
  1231. integer width = 800
  1232. integer height = 92
  1233. boolean bringtotop = true
  1234. integer textsize = -10
  1235. integer weight = 400
  1236. fontcharset fontcharset = gb2312charset!
  1237. fontpitch fontpitch = variable!
  1238. string facename = "宋体"
  1239. long textcolor = 8421504
  1240. long backcolor = 15793151
  1241. alignment alignment = center!
  1242. boolean border = true
  1243. long bordercolor = 8421504
  1244. boolean focusrectangle = false
  1245. end type
  1246. type st_search_tip from statictext within w_msg_newstyle
  1247. boolean visible = false
  1248. integer x = 1403
  1249. integer y = 136
  1250. integer width = 727
  1251. integer height = 60
  1252. boolean bringtotop = true
  1253. integer textsize = -10
  1254. integer weight = 400
  1255. fontcharset fontcharset = gb2312charset!
  1256. fontpitch fontpitch = variable!
  1257. string facename = "宋体"
  1258. long textcolor = 8421504
  1259. long backcolor = 15793151
  1260. string text = "可搜索标题、正文、相关号"
  1261. alignment alignment = center!
  1262. boolean focusrectangle = false
  1263. end type
  1264. type st_no_fj from statictext within w_msg_newstyle
  1265. boolean visible = false
  1266. integer x = 3872
  1267. integer y = 308
  1268. integer width = 421
  1269. integer height = 104
  1270. boolean bringtotop = true
  1271. integer textsize = -15
  1272. integer weight = 400
  1273. fontcharset fontcharset = gb2312charset!
  1274. fontpitch fontpitch = fixed!
  1275. fontfamily fontfamily = modern!
  1276. string facename = "黑体"
  1277. long textcolor = 8421504
  1278. string text = "没有附件"
  1279. boolean focusrectangle = false
  1280. end type
  1281. type r_1 from rectangle within w_msg_newstyle
  1282. long linecolor = 12632256
  1283. integer linethickness = 4
  1284. long fillcolor = 16777215
  1285. integer x = 1367
  1286. integer y = 12
  1287. integer width = 1600
  1288. integer height = 100
  1289. end type