w_message_mng_ljfieb.srw 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919
  1. $PBExportHeader$w_message_mng_ljfieb.srw
  2. forward
  3. global type w_message_mng_ljfieb from w_publ_base
  4. end type
  5. type tab_1 from tab within w_message_mng_ljfieb
  6. end type
  7. type tabpage_1 from userobject within tab_1
  8. end type
  9. type p_3 from picture within tabpage_1
  10. end type
  11. type p_2 from picture within tabpage_1
  12. end type
  13. type p_1 from picture within tabpage_1
  14. end type
  15. type cbx_ifshow from checkbox within tabpage_1
  16. end type
  17. type st_ok from uo_text_m_main within tabpage_1
  18. end type
  19. type st_feedback from uo_text_m_main within tabpage_1
  20. end type
  21. type st_retrieve_rece from uo_text_m_main within tabpage_1
  22. end type
  23. type st_1 from statictext within tabpage_1
  24. end type
  25. type mle_rece from multilineedit within tabpage_1
  26. end type
  27. type dw_1 from u_dw_rbtnfilter within tabpage_1
  28. end type
  29. type tabpage_1 from userobject within tab_1
  30. p_3 p_3
  31. p_2 p_2
  32. p_1 p_1
  33. cbx_ifshow cbx_ifshow
  34. st_ok st_ok
  35. st_feedback st_feedback
  36. st_retrieve_rece st_retrieve_rece
  37. st_1 st_1
  38. mle_rece mle_rece
  39. dw_1 dw_1
  40. end type
  41. type tabpage_2 from userobject within tab_1
  42. end type
  43. type p_4 from picture within tabpage_2
  44. end type
  45. type st_retrieve_send from uo_text_m_main within tabpage_2
  46. end type
  47. type em_2 from editmask within tabpage_2
  48. end type
  49. type st_7 from statictext within tabpage_2
  50. end type
  51. type em_1 from editmask within tabpage_2
  52. end type
  53. type st_6 from statictext within tabpage_2
  54. end type
  55. type st_5 from statictext within tabpage_2
  56. end type
  57. type mle_send from multilineedit within tabpage_2
  58. end type
  59. type dw_2 from u_dw_rbtnfilter within tabpage_2
  60. end type
  61. type tabpage_2 from userobject within tab_1
  62. p_4 p_4
  63. st_retrieve_send st_retrieve_send
  64. em_2 em_2
  65. st_7 st_7
  66. em_1 em_1
  67. st_6 st_6
  68. st_5 st_5
  69. mle_send mle_send
  70. dw_2 dw_2
  71. end type
  72. type tab_1 from tab within w_message_mng_ljfieb
  73. tabpage_1 tabpage_1
  74. tabpage_2 tabpage_2
  75. end type
  76. end forward
  77. global type w_message_mng_ljfieb from w_publ_base
  78. integer width = 3611
  79. integer height = 2380
  80. string title = "电子商务消息管理"
  81. boolean minbox = false
  82. windowtype windowtype = response!
  83. tab_1 tab_1
  84. end type
  85. global w_message_mng_ljfieb w_message_mng_ljfieb
  86. type variables
  87. int ins_billtype// 1 - 供应商消息, 2 - 客户消息
  88. uo_ljfieb uo_fieb
  89. Transaction tr_eb_sqlca
  90. end variables
  91. forward prototypes
  92. public function integer wf_read (long arg_row)
  93. end prototypes
  94. public function integer wf_read (long arg_row);String ls_SerialNum,arg_msg
  95. Long ll_sendid,ll_receid
  96. String ls_recesccode,ls_sendsccode
  97. String ls_sn
  98. IF arg_row <= 0 THEN RETURN 0
  99. ls_sn = tab_1.tabpage_1.dw_1.Object.LJFIEB_packet_SerialNum[arg_row]
  100. ll_sendid = tab_1.tabpage_1.dw_1.Object.LJFIEB_packet_SendCusCommID[arg_row]
  101. ll_receid = tab_1.tabpage_1.dw_1.Object.LJFIEB_packet_receivecuscommid[arg_row]
  102. ls_recesccode = tab_1.tabpage_1.dw_1.Object.LJFIEB_packet_receivesccode[arg_row]
  103. ls_sendsccode = tab_1.tabpage_1.dw_1.Object.LJFIEB_packet_SendSCcode[arg_row]
  104. SELECT TOP 1 NEWID() INTO :ls_SerialNum
  105. From u_user Using sqlca;
  106. IF sqlca.SQLCode <> 0 THEN
  107. ROLLBACK Using sqlca;
  108. MessageBox('Error','生成序列号失败,'+sqlca.SQLErrText)
  109. RETURN 0
  110. END IF
  111. IF IsNull(ls_SerialNum) THEN ls_SerialNum = ''
  112. IF ls_SerialNum = '' THEN
  113. MessageBox('Error','错误的发送序列号')
  114. RETURN 0
  115. END IF
  116. UPDATE LJFIEB_packet
  117. SET Complete = 1 ,
  118. status = 6,
  119. ConfirmTime = getdate(),
  120. ConfirmUser = :publ_operator
  121. Where SerialNum = :ls_sn Using tr_eb_sqlca;
  122. IF tr_eb_sqlca.SQLCode <> 0 THEN
  123. ROLLBACK Using tr_eb_sqlca;
  124. MessageBox('Errr','更新消息状态失败,'+tr_eb_sqlca.SQLErrText)
  125. RETURN 0
  126. END IF
  127. IF uo_fieb.add_packet(ls_SerialNum,'',ll_receid,ls_recesccode,ll_sendid,ls_sendsccode,6,'确认消息','','',ls_sn,'',0,arg_msg,True) = 0 THEN
  128. MessageBox('Error','发送确认指令失败 '+arg_msg)
  129. RETURN 0
  130. END IF
  131. RETURN 1
  132. end function
  133. on w_message_mng_ljfieb.create
  134. int iCurrent
  135. call super::create
  136. this.tab_1=create tab_1
  137. iCurrent=UpperBound(this.Control)
  138. this.Control[iCurrent+1]=this.tab_1
  139. end on
  140. on w_message_mng_ljfieb.destroy
  141. call super::destroy
  142. destroy(this.tab_1)
  143. end on
  144. event open;call super::open;IF sys_email_sqlca.DBHandle() = 0 THEN
  145. MessageBox('Error','电子商务数据库连接失败,请检查')
  146. RETURN
  147. END IF
  148. tr_eb_sqlca = sys_email_sqlca // 电子商务连接
  149. ins_billtype = message.doubleparm
  150. if ins_billtype = 1 then
  151. this.title = '供应商电子商务消息管理'
  152. else
  153. this.title = '客户电子商务消息管理'
  154. end if
  155. uo_fieb = Create uo_ljfieb
  156. uo_fieb.commit_transaction = tr_eb_sqlca
  157. tab_1.tabpage_1.dw_1.settransobject(sys_email_sqlca)
  158. tab_1.tabpage_2.dw_2.settransobject(sys_email_sqlca)
  159. tab_1.tabpage_1.st_retrieve_rece.triggerevent(clicked!)
  160. tab_1.tabpage_2.st_retrieve_send.triggerevent(clicked!)
  161. end event
  162. type cb_func from w_publ_base`cb_func within w_message_mng_ljfieb
  163. boolean visible = false
  164. end type
  165. type cb_exit from w_publ_base`cb_exit within w_message_mng_ljfieb
  166. integer x = 3191
  167. integer y = 2172
  168. end type
  169. type tab_1 from tab within w_message_mng_ljfieb
  170. integer width = 3589
  171. integer height = 2148
  172. integer taborder = 30
  173. boolean bringtotop = true
  174. integer textsize = -9
  175. integer weight = 400
  176. fontcharset fontcharset = gb2312charset!
  177. fontpitch fontpitch = variable!
  178. string facename = "宋体"
  179. long backcolor = 134217739
  180. boolean raggedright = true
  181. boolean focusonbuttondown = true
  182. integer selectedtab = 1
  183. tabpage_1 tabpage_1
  184. tabpage_2 tabpage_2
  185. end type
  186. on tab_1.create
  187. this.tabpage_1=create tabpage_1
  188. this.tabpage_2=create tabpage_2
  189. this.Control[]={this.tabpage_1,&
  190. this.tabpage_2}
  191. end on
  192. on tab_1.destroy
  193. destroy(this.tabpage_1)
  194. destroy(this.tabpage_2)
  195. end on
  196. type tabpage_1 from userobject within tab_1
  197. integer x = 18
  198. integer y = 112
  199. integer width = 3552
  200. integer height = 2020
  201. long backcolor = 16777215
  202. string text = "收件箱"
  203. long tabtextcolor = 33554432
  204. long tabbackcolor = 134217739
  205. string picturename = "OutputNext!"
  206. long picturemaskcolor = 536870912
  207. p_3 p_3
  208. p_2 p_2
  209. p_1 p_1
  210. cbx_ifshow cbx_ifshow
  211. st_ok st_ok
  212. st_feedback st_feedback
  213. st_retrieve_rece st_retrieve_rece
  214. st_1 st_1
  215. mle_rece mle_rece
  216. dw_1 dw_1
  217. end type
  218. on tabpage_1.create
  219. this.p_3=create p_3
  220. this.p_2=create p_2
  221. this.p_1=create p_1
  222. this.cbx_ifshow=create cbx_ifshow
  223. this.st_ok=create st_ok
  224. this.st_feedback=create st_feedback
  225. this.st_retrieve_rece=create st_retrieve_rece
  226. this.st_1=create st_1
  227. this.mle_rece=create mle_rece
  228. this.dw_1=create dw_1
  229. this.Control[]={this.p_3,&
  230. this.p_2,&
  231. this.p_1,&
  232. this.cbx_ifshow,&
  233. this.st_ok,&
  234. this.st_feedback,&
  235. this.st_retrieve_rece,&
  236. this.st_1,&
  237. this.mle_rece,&
  238. this.dw_1}
  239. end on
  240. on tabpage_1.destroy
  241. destroy(this.p_3)
  242. destroy(this.p_2)
  243. destroy(this.p_1)
  244. destroy(this.cbx_ifshow)
  245. destroy(this.st_ok)
  246. destroy(this.st_feedback)
  247. destroy(this.st_retrieve_rece)
  248. destroy(this.st_1)
  249. destroy(this.mle_rece)
  250. destroy(this.dw_1)
  251. end on
  252. type p_3 from picture within tabpage_1
  253. integer x = 485
  254. integer y = 20
  255. integer width = 73
  256. integer height = 64
  257. string pointer = "HAND.CUR"
  258. boolean originalsize = true
  259. string picturename = "graphics\ok.bmp"
  260. boolean focusrectangle = false
  261. end type
  262. event clicked;tab_1.tabpage_1.st_ok.triggerevent(clicked!)
  263. end event
  264. type p_2 from picture within tabpage_1
  265. integer x = 251
  266. integer y = 20
  267. integer width = 73
  268. integer height = 64
  269. string pointer = "HAND.CUR"
  270. boolean originalsize = true
  271. string picturename = "graphics\open.bmp"
  272. boolean focusrectangle = false
  273. end type
  274. event clicked;tab_1.tabpage_1.st_feedback.triggerevent(clicked!)
  275. end event
  276. type p_1 from picture within tabpage_1
  277. integer x = 27
  278. integer y = 20
  279. integer width = 73
  280. integer height = 64
  281. string pointer = "HAND.CUR"
  282. boolean originalsize = true
  283. string picturename = "graphics\refresh.BMP"
  284. boolean focusrectangle = false
  285. end type
  286. event clicked;tab_1.tabpage_1.st_retrieve_rece.triggerevent(clicked!)
  287. end event
  288. type cbx_ifshow from checkbox within tabpage_1
  289. integer x = 933
  290. integer y = 12
  291. integer width = 553
  292. integer height = 76
  293. integer textsize = -9
  294. integer weight = 400
  295. fontcharset fontcharset = gb2312charset!
  296. fontpitch fontpitch = variable!
  297. string facename = "宋体"
  298. long textcolor = 33554432
  299. long backcolor = 16777215
  300. string text = "只显示待确认消息"
  301. boolean checked = true
  302. end type
  303. event clicked;tab_1.tabpage_1.st_retrieve_rece.triggerevent(clicked!)
  304. end event
  305. type st_ok from uo_text_m_main within tabpage_1
  306. integer x = 567
  307. integer y = 28
  308. integer width = 128
  309. integer height = 56
  310. integer textsize = -9
  311. string text = "确认"
  312. end type
  313. event clicked;call super::clicked;IF Not f_power_ind(1596) THEN
  314. MessageBox(publ_operator,sys_msg_pow)
  315. RETURN
  316. END IF
  317. Long ll_row
  318. String ls_sn
  319. Int li_status
  320. ll_row = tab_1.tabpage_1.dw_1.getrow()
  321. if ll_row <= 0 then
  322. messagebox('系统提示','请选择要确认的消息')
  323. return
  324. end if
  325. ls_sn = tab_1.tabpage_1.dw_1.Object.LJFIEB_packet_SerialNum[ll_row]
  326. SELECT status
  327. INTO :li_status
  328. FROM LJFIEB_packet
  329. Where SerialNum = :ls_sn Using tr_eb_sqlca;
  330. IF tr_eb_sqlca.SQLCode <> 0 THEN
  331. ROLLBACK Using tr_eb_sqlca;
  332. MessageBox('Errr','查询消息状态失败,'+tr_eb_sqlca.SQLErrText)
  333. RETURN 0
  334. END IF
  335. IF li_status <> 5 THEN
  336. MessageBox('系统提示','消息已确认,不能重复操作')
  337. RETURN
  338. END IF
  339. IF MessageBox('询问','是否要确认本条消息?',question!,yesno!) = 2 THEN RETURN
  340. IF wf_read(ll_row) = 0 THEN RETURN
  341. tab_1.tabpage_1.st_retrieve_rece.TriggerEvent(Clicked!)
  342. end event
  343. type st_feedback from uo_text_m_main within tabpage_1
  344. integer x = 334
  345. integer y = 28
  346. integer width = 128
  347. integer height = 56
  348. integer textsize = -9
  349. string text = "回复"
  350. end type
  351. event clicked;call super::clicked;IF Not f_power_ind(1595) THEN
  352. MessageBox(publ_operator,sys_msg_pow)
  353. RETURN
  354. END IF
  355. Long ll_row
  356. string ls_sn
  357. ll_row = tab_1.tabpage_1.dw_1.GetRow()
  358. IF ll_row <= 0 THEN RETURN
  359. s_edit_index_tran s_buy_msg
  360. s_buy_msg.b_long = ins_billtype // 1 - 选供应商, 2 - 选客户
  361. s_buy_msg.c_long = 1
  362. s_buy_msg.b_string = tab_1.tabpage_1.dw_1.Object.LJFIEB_packet_Summary[ll_row]
  363. s_buy_msg.c_string = tab_1.tabpage_1.dw_1.Object.ljfieb_cuscomm_s_cuscode[ll_row]
  364. s_buy_msg.d_string = tab_1.tabpage_1.dw_1.Object.ljfieb_cuscomm_s_cusname[ll_row]
  365. s_buy_msg.e_string = tab_1.tabpage_1.dw_1.Object.ljfieb_packet_sendsccode[ll_row]
  366. s_buy_msg.f_string = tab_1.tabpage_1.dw_1.Object.LJFIEB_packet_Postscript[ll_row]
  367. OpenWithParm(w_msg_send_ljfieb,s_buy_msg)
  368. Int li_ifsend,li_status
  369. li_ifsend = Message.DoubleParm
  370. ls_sn = tab_1.tabpage_1.dw_1.Object.LJFIEB_packet_SerialNum[ll_row]
  371. SELECT status
  372. INTO :li_status
  373. FROM LJFIEB_packet
  374. Where SerialNum = :ls_sn Using tr_eb_sqlca;
  375. IF tr_eb_sqlca.SQLCode <> 0 THEN
  376. ROLLBACK Using tr_eb_sqlca;
  377. MessageBox('Errr','查询消息状态失败,'+tr_eb_sqlca.SQLErrText)
  378. RETURN 0
  379. END IF
  380. IF li_status = 5 And li_ifsend = 1 THEN
  381. IF wf_read(ll_row) = 0 THEN RETURN
  382. tab_1.tabpage_1.st_retrieve_rece.TriggerEvent(Clicked!)
  383. END IF
  384. end event
  385. type st_retrieve_rece from uo_text_m_main within tabpage_1
  386. integer x = 101
  387. integer y = 28
  388. integer width = 128
  389. integer height = 56
  390. integer textsize = -9
  391. string text = "刷新"
  392. end type
  393. event clicked;call super::clicked;Int li_ifshow
  394. Long ll_i
  395. String ls_cuscode
  396. Long ll_sendcuscommid,ll_cusareaid
  397. String ls_custype,ls_receivesccode,ls_scstr,ls_SendSCcode
  398. String ls_areastr,ls_outrep
  399. Long ll_scid
  400. IF tab_1.tabpage_1.cbx_ifshow.Checked THEN
  401. li_ifshow = 0
  402. ELSE
  403. li_ifshow = -1
  404. END IF
  405. tab_1.tabpage_1.dw_1.SetRedraw(False)
  406. tab_1.tabpage_1.dw_1.Retrieve(li_ifshow,ins_billtype)
  407. IF Not sys_power_issuper THEN
  408. tab_1.tabpage_1.dw_1.AcceptText()
  409. FOR ll_i = tab_1.tabpage_1.dw_1.RowCount() To 1 Step -1
  410. ll_sendcuscommid = tab_1.tabpage_1.dw_1.Object.ljfieb_packet_sendcuscommid[ll_i]
  411. ls_receivesccode = tab_1.tabpage_1.dw_1.Object.ljfieb_packet_receivesccode[ll_i]
  412. ls_SendSCcode = tab_1.tabpage_1.dw_1.Object.ljfieb_packet_SendSCcode [ll_i]
  413. IF sys_user_scstr <> '0' THEN
  414. SELECT scid INTO :ll_scid
  415. FROM u_scdef
  416. Where sccode = :ls_receivesccode Using sqlca;
  417. IF sqlca.SQLCode <> 0 THEN
  418. ll_scid = 0
  419. END IF
  420. ls_scstr = ','+String(ll_scid)+','
  421. IF Pos(sys_user_scstr,ls_scstr) = 0 THEN
  422. tab_1.tabpage_1.dw_1.DeleteRow(ll_i)
  423. CONTINUE
  424. END IF
  425. END IF
  426. SELECT CusCode
  427. INTO :ls_cuscode
  428. FROM LJFIEB_CusComm
  429. Where CusCommID = :ll_sendcuscommid Using sys_email_sqlca;
  430. IF sys_email_sqlca.SQLCode <> 0 THEN
  431. ls_cuscode = ''
  432. END IF
  433. IF Trim(ls_cuscode) = '' THEN CONTINUE
  434. SELECT cusareaid,
  435. custype
  436. INTO
  437. :ll_cusareaid,
  438. :ls_custype
  439. FROM u_cust
  440. WHERE commcode = :ls_cuscode
  441. And commsccode = :ls_SendSCcode Using sqlca;
  442. IF sqlca.SQLCode <> 0 THEN CONTINUE
  443. IF sys_areastr <> '0' THEN
  444. ls_areastr = ','+String( ll_cusareaid)+','
  445. IF Pos(sys_areastr,ls_areastr) = 0 THEN
  446. tab_1.tabpage_1.dw_1.DeleteRow(ll_i)
  447. CONTINUE
  448. END IF
  449. END IF
  450. IF sys_user_outrepstr <> '0' THEN
  451. ls_outrep = ','+String( ls_custype)+','
  452. IF Pos(sys_user_outrepstr,ls_outrep) = 0 THEN
  453. tab_1.tabpage_1.dw_1.DeleteRow(ll_i)
  454. CONTINUE
  455. END IF
  456. END IF
  457. NEXT
  458. END IF
  459. tab_1.tabpage_1.dw_1.SetRedraw(True)
  460. end event
  461. type st_1 from statictext within tabpage_1
  462. integer x = 18
  463. integer y = 1184
  464. integer width = 178
  465. integer height = 48
  466. integer textsize = -9
  467. integer weight = 400
  468. fontcharset fontcharset = gb2312charset!
  469. fontpitch fontpitch = variable!
  470. string facename = "宋体"
  471. long textcolor = 33554432
  472. long backcolor = 16777215
  473. string text = "正文"
  474. boolean focusrectangle = false
  475. end type
  476. type mle_rece from multilineedit within tabpage_1
  477. integer y = 1248
  478. integer width = 3534
  479. integer height = 772
  480. integer taborder = 30
  481. integer textsize = -9
  482. integer weight = 400
  483. fontcharset fontcharset = gb2312charset!
  484. fontpitch fontpitch = variable!
  485. string facename = "宋体"
  486. long textcolor = 33554432
  487. boolean displayonly = true
  488. borderstyle borderstyle = stylelowered!
  489. end type
  490. type dw_1 from u_dw_rbtnfilter within tabpage_1
  491. integer y = 100
  492. integer width = 3534
  493. integer height = 1064
  494. integer taborder = 20
  495. string dataobject = "dw_salemsg_rece_mng"
  496. boolean hscrollbar = true
  497. boolean vscrollbar = true
  498. boolean hsplitscroll = true
  499. end type
  500. event rowfocuschanged;call super::rowfocuschanged;IF currentrow <= 0 THEN
  501. tab_1.tabpage_1.mle_rece.Text = ''
  502. RETURN
  503. END IF
  504. This.SelectRow(0,False)
  505. This.SelectRow(currentrow,True)
  506. IF This.GetRow() > 0 THEN
  507. tab_1.tabpage_1.mle_rece.Text = '*' + This.Object.LJFIEB_packet_Summary[This.GetRow()] + '*' + '~r~n' + '~r~n'+ This.Object.LJFIEB_packet_Postscript[This.GetRow()]
  508. ELSE
  509. tab_1.tabpage_1.mle_rece.Text = ''
  510. END IF
  511. end event
  512. type tabpage_2 from userobject within tab_1
  513. integer x = 18
  514. integer y = 112
  515. integer width = 3552
  516. integer height = 2020
  517. long backcolor = 16777215
  518. string text = "发件箱"
  519. long tabtextcolor = 33554432
  520. long tabbackcolor = 134217739
  521. string picturename = "OutputPrevious!"
  522. long picturemaskcolor = 536870912
  523. p_4 p_4
  524. st_retrieve_send st_retrieve_send
  525. em_2 em_2
  526. st_7 st_7
  527. em_1 em_1
  528. st_6 st_6
  529. st_5 st_5
  530. mle_send mle_send
  531. dw_2 dw_2
  532. end type
  533. on tabpage_2.create
  534. this.p_4=create p_4
  535. this.st_retrieve_send=create st_retrieve_send
  536. this.em_2=create em_2
  537. this.st_7=create st_7
  538. this.em_1=create em_1
  539. this.st_6=create st_6
  540. this.st_5=create st_5
  541. this.mle_send=create mle_send
  542. this.dw_2=create dw_2
  543. this.Control[]={this.p_4,&
  544. this.st_retrieve_send,&
  545. this.em_2,&
  546. this.st_7,&
  547. this.em_1,&
  548. this.st_6,&
  549. this.st_5,&
  550. this.mle_send,&
  551. this.dw_2}
  552. end on
  553. on tabpage_2.destroy
  554. destroy(this.p_4)
  555. destroy(this.st_retrieve_send)
  556. destroy(this.em_2)
  557. destroy(this.st_7)
  558. destroy(this.em_1)
  559. destroy(this.st_6)
  560. destroy(this.st_5)
  561. destroy(this.mle_send)
  562. destroy(this.dw_2)
  563. end on
  564. type p_4 from picture within tabpage_2
  565. integer x = 1138
  566. integer y = 12
  567. integer width = 73
  568. integer height = 64
  569. string pointer = "HAND.CUR"
  570. boolean originalsize = true
  571. string picturename = "graphics\refresh.BMP"
  572. boolean focusrectangle = false
  573. end type
  574. event clicked;tab_1.tabpage_2.st_retrieve_send.triggerevent(clicked!)
  575. end event
  576. type st_retrieve_send from uo_text_m_main within tabpage_2
  577. integer x = 1216
  578. integer y = 20
  579. integer width = 133
  580. integer height = 60
  581. integer textsize = -9
  582. string text = "刷新"
  583. end type
  584. event clicked;call super::clicked;DateTime ld_first
  585. DateTime ld_end
  586. Long ll_i
  587. String ls_cuscode
  588. Long ll_receivecuscommid,ll_cusareaid
  589. String ls_custype,ls_receivesccode,ls_scstr,ls_SendSCcode
  590. String ls_areastr,ls_outrep
  591. Long ll_scid
  592. ld_first = DateTime(Date(tab_1.tabpage_2.em_1.Text),Time('0'))
  593. ld_end = DateTime(Date(tab_1.tabpage_2.em_2.Text),Time('23:59:59'))
  594. tab_1.tabpage_2.dw_2.setredraw(false)
  595. tab_1.tabpage_2.dw_2.Retrieve(ld_first,ld_end,ins_billtype)
  596. IF Not sys_power_issuper THEN
  597. tab_1.tabpage_2.dw_2.AcceptText()
  598. FOR ll_i = tab_1.tabpage_2.dw_2.RowCount() To 1 Step -1
  599. ll_receivecuscommid = tab_1.tabpage_2.dw_2.Object.ljfieb_packet_receivecuscommid[ll_i]
  600. ls_receivesccode = tab_1.tabpage_2.dw_2.Object.ljfieb_packet_receivesccode[ll_i]
  601. ls_SendSCcode = tab_1.tabpage_2.dw_2.Object.ljfieb_packet_SendSCcode [ll_i]
  602. IF sys_user_scstr <> '0' THEN
  603. SELECT scid INTO :ll_scid
  604. FROM u_scdef
  605. Where sccode = :ls_SendSCcode Using sqlca;
  606. IF sqlca.SQLCode <> 0 THEN
  607. ll_scid = 0
  608. END IF
  609. ls_scstr = ','+String(ll_scid)+','
  610. IF Pos(sys_user_scstr,ls_scstr) = 0 THEN
  611. tab_1.tabpage_2.dw_2.DeleteRow(ll_i)
  612. CONTINUE
  613. END IF
  614. END IF
  615. SELECT CusCode
  616. INTO :ls_cuscode
  617. FROM LJFIEB_CusComm
  618. Where CusCommID = :ll_receivecuscommid Using sys_email_sqlca;
  619. IF sys_email_sqlca.SQLCode <> 0 THEN
  620. ls_cuscode = ''
  621. END IF
  622. IF Trim(ls_cuscode) = '' THEN CONTINUE
  623. SELECT cusareaid,
  624. custype
  625. INTO
  626. :ll_cusareaid,
  627. :ls_custype
  628. FROM u_cust
  629. WHERE commcode = :ls_cuscode
  630. And commsccode = :ls_SendSCcode Using sqlca;
  631. IF sqlca.SQLCode <> 0 THEN CONTINUE
  632. IF sys_areastr <> '0' THEN
  633. ls_areastr = ','+String( ll_cusareaid)+','
  634. IF Pos(sys_areastr,ls_areastr) = 0 THEN
  635. tab_1.tabpage_2.dw_2.DeleteRow(ll_i)
  636. CONTINUE
  637. END IF
  638. END IF
  639. IF sys_user_outrepstr <> '0' THEN
  640. ls_outrep = ','+String( ls_custype)+','
  641. IF Pos(sys_user_outrepstr,ls_outrep) = 0 THEN
  642. tab_1.tabpage_2.dw_2.DeleteRow(ll_i)
  643. CONTINUE
  644. END IF
  645. END IF
  646. NEXT
  647. END IF
  648. tab_1.tabpage_2.dw_2.setredraw(true)
  649. end event
  650. type em_2 from editmask within tabpage_2
  651. integer x = 727
  652. integer y = 8
  653. integer width = 389
  654. integer height = 84
  655. integer taborder = 40
  656. integer textsize = -9
  657. integer weight = 400
  658. fontcharset fontcharset = gb2312charset!
  659. fontpitch fontpitch = variable!
  660. string facename = "宋体"
  661. long textcolor = 33554432
  662. string text = "none"
  663. borderstyle borderstyle = stylelowered!
  664. maskdatatype maskdatatype = datetimemask!
  665. string mask = "yyyy-mm-dd"
  666. boolean spin = true
  667. end type
  668. event constructor;this.text = string(today(),'yyyy-mm-dd')
  669. end event
  670. type st_7 from statictext within tabpage_2
  671. integer x = 631
  672. integer y = 20
  673. integer width = 101
  674. integer height = 60
  675. integer textsize = -9
  676. integer weight = 400
  677. fontcharset fontcharset = gb2312charset!
  678. fontpitch fontpitch = variable!
  679. string facename = "宋体"
  680. long textcolor = 33554432
  681. long backcolor = 16777215
  682. string text = "到"
  683. alignment alignment = center!
  684. boolean focusrectangle = false
  685. end type
  686. type em_1 from editmask within tabpage_2
  687. integer x = 224
  688. integer y = 8
  689. integer width = 402
  690. integer height = 84
  691. integer taborder = 30
  692. integer textsize = -9
  693. integer weight = 400
  694. fontcharset fontcharset = gb2312charset!
  695. fontpitch fontpitch = variable!
  696. string facename = "宋体"
  697. long textcolor = 33554432
  698. string text = "none"
  699. alignment alignment = center!
  700. borderstyle borderstyle = stylelowered!
  701. maskdatatype maskdatatype = datetimemask!
  702. string mask = "yyyy-mm-dd"
  703. boolean spin = true
  704. end type
  705. event constructor;this.text = string(today(),'yyyy-mm')+'-01'
  706. end event
  707. type st_6 from statictext within tabpage_2
  708. integer x = 27
  709. integer y = 24
  710. integer width = 197
  711. integer height = 48
  712. integer textsize = -9
  713. integer weight = 400
  714. fontcharset fontcharset = gb2312charset!
  715. fontpitch fontpitch = variable!
  716. string facename = "宋体"
  717. long textcolor = 33554432
  718. long backcolor = 16777215
  719. string text = "日期从:"
  720. boolean focusrectangle = false
  721. end type
  722. type st_5 from statictext within tabpage_2
  723. integer x = 18
  724. integer y = 1184
  725. integer width = 146
  726. integer height = 48
  727. integer textsize = -9
  728. integer weight = 400
  729. fontcharset fontcharset = gb2312charset!
  730. fontpitch fontpitch = variable!
  731. string facename = "宋体"
  732. long textcolor = 33554432
  733. long backcolor = 16777215
  734. string text = "正文"
  735. boolean focusrectangle = false
  736. end type
  737. type mle_send from multilineedit within tabpage_2
  738. integer y = 1248
  739. integer width = 3534
  740. integer height = 772
  741. integer taborder = 40
  742. integer textsize = -9
  743. integer weight = 400
  744. fontcharset fontcharset = gb2312charset!
  745. fontpitch fontpitch = variable!
  746. string facename = "宋体"
  747. long textcolor = 33554432
  748. boolean displayonly = true
  749. borderstyle borderstyle = stylelowered!
  750. end type
  751. type dw_2 from u_dw_rbtnfilter within tabpage_2
  752. integer y = 100
  753. integer width = 3534
  754. integer height = 1064
  755. integer taborder = 20
  756. string dataobject = "dw_salemsg_send_mng"
  757. boolean hscrollbar = true
  758. boolean vscrollbar = true
  759. boolean hsplitscroll = true
  760. end type
  761. event rowfocuschanged;call super::rowfocuschanged;IF currentrow <= 0 THEN
  762. tab_1.tabpage_2.mle_send.Text = ''
  763. RETURN
  764. END IF
  765. This.SelectRow(0,False)
  766. This.SelectRow(currentrow,True)
  767. IF This.GetRow() > 0 THEN
  768. tab_1.tabpage_2.mle_send.Text = '*' + This.Object.LJFIEB_packet_Summary[This.GetRow()] + '*' + '~r~n' + '~r~n'+ This.Object.LJFIEB_packet_Postscript[This.GetRow()]
  769. ELSE
  770. tab_1.tabpage_2.mle_send.Text = ''
  771. END IF
  772. end event