w_rp_item_hz.srw 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. $PBExportHeader$w_rp_item_hz.srw
  2. forward
  3. global type w_rp_item_hz from w_publ_easyq
  4. end type
  5. type ddlb_1 from dropdownlistbox within w_rp_item_hz
  6. end type
  7. type ddlb_2 from dropdownlistbox within w_rp_item_hz
  8. end type
  9. type dw_2 from u_dw_rbtnfilter within w_rp_item_hz
  10. end type
  11. end forward
  12. global type w_rp_item_hz from w_publ_easyq
  13. boolean TitleBar=true
  14. string Title="项目总帐"
  15. long BackColor=81324524
  16. ddlb_1 ddlb_1
  17. ddlb_2 ddlb_2
  18. dw_2 dw_2
  19. end type
  20. global w_rp_item_hz w_rp_item_hz
  21. on w_rp_item_hz.create
  22. int iCurrent
  23. call super::create
  24. this.ddlb_1=create ddlb_1
  25. this.ddlb_2=create ddlb_2
  26. this.dw_2=create dw_2
  27. iCurrent=UpperBound(this.Control)
  28. this.Control[iCurrent+1]=this.ddlb_1
  29. this.Control[iCurrent+2]=this.ddlb_2
  30. this.Control[iCurrent+3]=this.dw_2
  31. end on
  32. on w_rp_item_hz.destroy
  33. call super::destroy
  34. destroy(this.ddlb_1)
  35. destroy(this.ddlb_2)
  36. destroy(this.dw_2)
  37. end on
  38. event open;THIS.TriggerEvent('ue_before_open')
  39. wf_movetocenter()
  40. dw_1.SetTransObject (sqlca)
  41. dw_1.RBUTTON_FILTER_USE = TRUE //右键查询功能开关
  42. IF Trim(dw_1.DataObject) <> '' THEN
  43. dw_1.Object.DataWindow.Print.MARGIN.Top = Integer(ProfileString(sys_inifilename,dw_1.DataObject, "MARGIN_TOP", "110"))
  44. dw_1.Object.DataWindow.Print.MARGIN.Left = Integer(ProfileString(sys_inifilename,dw_1.DataObject, "MARGIN_LEFT", "96" ))
  45. dw_1.Object.DataWindow.Print.MARGIN.bottom = Integer(ProfileString(sys_inifilename,dw_1.DataObject, "MARGIN_BOTTOM", "110"))
  46. dw_1.Object.DataWindow.Print.MARGIN.Right = Integer(ProfileString(sys_inifilename,dw_1.DataObject, "MARGIN_RIGHT", "96" ))
  47. END IF
  48. datawindowchild childdw_subid
  49. dw_1.GetChild("subid",childdw_subid)
  50. childdw_subid.SetTransObject (sqlca)
  51. ddd_subid_display.ShareData(childdw_subid)
  52. dw_2.SetTransObject (sqlca)
  53. dw_2.RBUTTON_FILTER_USE = TRUE //右键查询功能开关
  54. IF dw_2.Retrieve(sys_accsetid) > 0 THEN
  55. dw_2.SelectRow(0,FALSE)
  56. dw_2.SetRow(1)
  57. dw_2.SelectRow(1,TRUE)
  58. END IF
  59. cb_1.triggerevent(clicked!)
  60. end event
  61. event resize;call super::resize;dw_2.Height = dw_1.Height
  62. end event
  63. type cb_2 from w_publ_easyq`cb_2 within w_rp_item_hz
  64. boolean BringToTop=true
  65. end type
  66. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_item_hz
  67. boolean BringToTop=true
  68. end type
  69. type cb_1 from w_publ_easyq`cb_1 within w_rp_item_hz
  70. boolean BringToTop=true
  71. end type
  72. event cb_1::clicked;call super::clicked;Long ls_firstcmon,ls_lastmon,ls_itemid
  73. Long ll_row
  74. string ls_itemname
  75. ls_firstcmon = Long(em_1.Text) * 100 + Long(ddlb_1.Text)
  76. ls_lastmon = Long(em_1.Text) * 100 + Long(ddlb_2.Text)
  77. ll_row = dw_2.GetRow()
  78. IF ll_row <= 0 THEN
  79. dw_1.Reset()
  80. RETURN
  81. END IF
  82. ls_itemid = dw_2.object.hsitemid[ll_row]
  83. ls_itemname = dw_2.object.hsitemname[ll_row]
  84. dw_1.object.title.text = ls_itemname+'总帐'
  85. dw_1.Retrieve(sys_accsetid,sys_subaccsetid,ls_itemid,ls_firstcmon,ls_lastmon)
  86. end event
  87. type st_3 from w_publ_easyq`st_3 within w_rp_item_hz
  88. int X=23
  89. int Y=164
  90. int Width=288
  91. boolean BringToTop=true
  92. string Text="会计年度:"
  93. end type
  94. type st_4 from w_publ_easyq`st_4 within w_rp_item_hz
  95. int X=1019
  96. int Y=164
  97. int Width=73
  98. boolean BringToTop=true
  99. string Text="至"
  100. end type
  101. type em_1 from w_publ_easyq`em_1 within w_rp_item_hz
  102. int X=302
  103. int Width=215
  104. boolean BringToTop=true
  105. string Mask="yyyy"
  106. end type
  107. event em_1::constructor;THIS.Text = Left(String(sys_curyearmon),4)
  108. end event
  109. type em_2 from w_publ_easyq`em_2 within w_rp_item_hz
  110. int X=1271
  111. int Y=336
  112. int TabOrder=140
  113. boolean BringToTop=true
  114. end type
  115. type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_item_hz
  116. int X=1874
  117. int Y=28
  118. end type
  119. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_item_hz
  120. int X=1664
  121. int Y=32
  122. boolean BringToTop=true
  123. end type
  124. type dw_1 from w_publ_easyq`dw_1 within w_rp_item_hz
  125. int X=1161
  126. int Width=2313
  127. boolean BringToTop=true
  128. string DataObject="dw_rp_item_hz"
  129. end type
  130. type ddlb_1 from dropdownlistbox within w_rp_item_hz
  131. int X=791
  132. int Y=152
  133. int Width=224
  134. int Height=800
  135. int TabOrder=120
  136. boolean BringToTop=true
  137. BorderStyle BorderStyle=StyleLowered!
  138. boolean Sorted=false
  139. boolean VScrollBar=true
  140. long TextColor=33554432
  141. int TextSize=-9
  142. int Weight=400
  143. string FaceName="宋体"
  144. FontCharSet FontCharSet=GB2312CharSet!
  145. FontPitch FontPitch=Variable!
  146. string Item[]={"1",&
  147. "2",&
  148. "3",&
  149. "4",&
  150. "5",&
  151. "6",&
  152. "7",&
  153. "8",&
  154. "9",&
  155. "10",&
  156. "11",&
  157. "12"}
  158. end type
  159. event constructor;THIS.Text = String(s_sys_accset.currmon)
  160. end event
  161. event selectionchanged;cb_1.TriggerEvent(Clicked!)
  162. end event
  163. type ddlb_2 from dropdownlistbox within w_rp_item_hz
  164. int X=1115
  165. int Y=152
  166. int Width=247
  167. int Height=880
  168. int TabOrder=130
  169. boolean BringToTop=true
  170. BorderStyle BorderStyle=StyleLowered!
  171. boolean Sorted=false
  172. boolean VScrollBar=true
  173. long TextColor=33554432
  174. int TextSize=-9
  175. int Weight=400
  176. string FaceName="宋体"
  177. FontCharSet FontCharSet=GB2312CharSet!
  178. FontPitch FontPitch=Variable!
  179. string Item[]={"1",&
  180. "2",&
  181. "3",&
  182. "4",&
  183. "5",&
  184. "6",&
  185. "7",&
  186. "8",&
  187. "9",&
  188. "10",&
  189. "11",&
  190. "12"}
  191. end type
  192. event selectionchanged;IF Long(ddlb_2.Text) < Long(ddlb_1.Text) THEN
  193. ddlb_1.Text = ddlb_2.Text
  194. END IF
  195. cb_1.TriggerEvent(Clicked!)
  196. end event
  197. event constructor;THIS.Text = String(s_sys_accset.currmon)
  198. end event
  199. type dw_2 from u_dw_rbtnfilter within w_rp_item_hz
  200. int X=0
  201. int Y=252
  202. int Width=1157
  203. int Height=928
  204. int TabOrder=20
  205. boolean BringToTop=true
  206. string DataObject="dw_rp_item_hz_item_index"
  207. boolean HScrollBar=true
  208. boolean VScrollBar=true
  209. boolean HSplitScroll=true
  210. end type
  211. event rowfocuschanged;IF currentrow > 0 THEN
  212. THIS.SelectRow(0,FALSE)
  213. THIS.SelectRow(currentrow,TRUE)
  214. END IF
  215. cb_1.TriggerEvent(Clicked!)
  216. end event