w_rp_item_sub_hz.srw 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. $PBExportHeader$w_rp_item_sub_hz.srw
  2. forward
  3. global type w_rp_item_sub_hz from w_publ_easyq
  4. end type
  5. type ddlb_1 from dropdownlistbox within w_rp_item_sub_hz
  6. end type
  7. type ddlb_2 from dropdownlistbox within w_rp_item_sub_hz
  8. end type
  9. type ddlb_3 from dropdownlistbox within w_rp_item_sub_hz
  10. end type
  11. type st_2 from statictext within w_rp_item_sub_hz
  12. end type
  13. end forward
  14. global type w_rp_item_sub_hz from w_publ_easyq
  15. boolean TitleBar=true
  16. string Title="项目科目总帐"
  17. long BackColor=81324524
  18. ddlb_1 ddlb_1
  19. ddlb_2 ddlb_2
  20. ddlb_3 ddlb_3
  21. st_2 st_2
  22. end type
  23. global w_rp_item_sub_hz w_rp_item_sub_hz
  24. on w_rp_item_sub_hz.create
  25. int iCurrent
  26. call super::create
  27. this.ddlb_1=create ddlb_1
  28. this.ddlb_2=create ddlb_2
  29. this.ddlb_3=create ddlb_3
  30. this.st_2=create st_2
  31. iCurrent=UpperBound(this.Control)
  32. this.Control[iCurrent+1]=this.ddlb_1
  33. this.Control[iCurrent+2]=this.ddlb_2
  34. this.Control[iCurrent+3]=this.ddlb_3
  35. this.Control[iCurrent+4]=this.st_2
  36. end on
  37. on w_rp_item_sub_hz.destroy
  38. call super::destroy
  39. destroy(this.ddlb_1)
  40. destroy(this.ddlb_2)
  41. destroy(this.ddlb_3)
  42. destroy(this.st_2)
  43. end on
  44. event open;this.triggerevent('ue_before_open')
  45. wf_movetocenter()
  46. dw_1.SetTransObject (sqlca)
  47. dw_1.RBUTTON_FILTER_USE=true //右键查询功能开关
  48. IF TRIM(DW_1.DATAOBJECT)<>'' THEN
  49. DW_1.OBJECT.DataWindow.PRINT.MARGIN.TOP=INTEGER(ProfileString(sys_inifilename,DW_1.DATAOBJECT, "MARGIN_TOP", "110"))
  50. DW_1.OBJECT.DataWindow.PRINT.MARGIN.LEFT=INTEGER(ProfileString(sys_inifilename,DW_1.DATAOBJECT, "MARGIN_LEFT", "96" ))
  51. DW_1.OBJECT.DataWindow.PRINT.MARGIN.bottom=INTEGER(ProfileString(sys_inifilename,DW_1.DATAOBJECT, "MARGIN_BOTTOM", "110"))
  52. DW_1.OBJECT.DataWindow.PRINT.MARGIN.right=INTEGER(ProfileString(sys_inifilename,DW_1.DATAOBJECT, "MARGIN_RIGHT", "96" ))
  53. end if
  54. string ls_subname,ins_subname
  55. string ls_subid,ins_subid
  56. DECLARE sub_cur CURSOR FOR
  57. SELECT DISTINCT
  58. cw_subject.subid,
  59. cw_subject.name
  60. FROM cw_subject,uv_dept_bala
  61. WHERE uv_dept_bala.accsetid = cw_subject.accsetid
  62. AND uv_dept_bala.subid = cw_subject.subid
  63. AND uv_dept_bala.accsetid = :sys_accsetid
  64. AND uv_dept_bala.itemid <> 0
  65. ORDER BY cw_subject.subid ASC ;
  66. OPEN sub_cur;
  67. fetch sub_cur into :ls_subid,:ls_subname;
  68. ins_subid=ls_subid
  69. ins_subname=ls_subname
  70. do while sqlca.sqlcode=0
  71. ddlb_3.additem('['+string(ls_subid)+']' + ls_subname)
  72. fetch sub_cur into :ls_subid,:ls_subname;
  73. loop
  74. ddlb_3.text='['+string(ins_subid)+']' + ins_subname
  75. close sub_cur;
  76. cb_1.triggerevent(clicked!)
  77. end event
  78. type cb_2 from w_publ_easyq`cb_2 within w_rp_item_sub_hz
  79. boolean BringToTop=true
  80. end type
  81. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_item_sub_hz
  82. boolean BringToTop=true
  83. end type
  84. type cb_1 from w_publ_easyq`cb_1 within w_rp_item_sub_hz
  85. boolean BringToTop=true
  86. end type
  87. event cb_1::clicked;call super::clicked;Long ls_firstcmon,ls_lastmon
  88. String ls_subid
  89. ls_firstcmon = Long(em_1.Text) * 100 + Long(ddlb_1.Text)
  90. ls_lastmon = Long(em_1.Text) * 100 + Long(ddlb_2.Text)
  91. ls_subid = Mid (ddlb_3.Text,Pos(ddlb_3.Text,'[') + 1,Pos(ddlb_3.Text,']') - 2 )
  92. dw_1.Retrieve(sys_accsetid,ls_subid,ls_firstcmon,ls_lastmon)
  93. end event
  94. type st_3 from w_publ_easyq`st_3 within w_rp_item_sub_hz
  95. int X=9
  96. int Y=164
  97. int Width=288
  98. boolean BringToTop=true
  99. string Text="会计年度:"
  100. end type
  101. type st_4 from w_publ_easyq`st_4 within w_rp_item_sub_hz
  102. int X=1015
  103. int Y=164
  104. int Width=78
  105. boolean BringToTop=true
  106. string Text="至"
  107. end type
  108. type em_1 from w_publ_easyq`em_1 within w_rp_item_sub_hz
  109. int X=288
  110. int Width=219
  111. boolean BringToTop=true
  112. string Mask="yyyy"
  113. end type
  114. event em_1::constructor;this.text=left(string(sys_curyearmon),4)
  115. end event
  116. type em_2 from w_publ_easyq`em_2 within w_rp_item_sub_hz
  117. int X=1559
  118. int Y=300
  119. boolean BringToTop=true
  120. end type
  121. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_item_sub_hz
  122. int X=1650
  123. boolean BringToTop=true
  124. end type
  125. type dw_1 from w_publ_easyq`dw_1 within w_rp_item_sub_hz
  126. int Width=2455
  127. boolean BringToTop=true
  128. string DataObject="dw_rp_item_sub_hz"
  129. end type
  130. type ddlb_1 from dropdownlistbox within w_rp_item_sub_hz
  131. int X=773
  132. int Y=148
  133. int Width=229
  134. int Height=908
  135. int TabOrder=130
  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_sub_hz
  164. int X=1143
  165. int Y=148
  166. int Width=229
  167. int Height=908
  168. int TabOrder=140
  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 constructor;THIS.Text = String(s_sys_accset.currmon)
  193. end event
  194. event selectionchanged;IF Long(ddlb_2.Text) < Long(ddlb_1.Text) THEN
  195. ddlb_1.Text = ddlb_2.Text
  196. END IF
  197. cb_1.TriggerEvent(Clicked!)
  198. end event
  199. type ddlb_3 from dropdownlistbox within w_rp_item_sub_hz
  200. int X=1650
  201. int Y=148
  202. int Width=1399
  203. int Height=1012
  204. int TabOrder=40
  205. boolean BringToTop=true
  206. BorderStyle BorderStyle=StyleLowered!
  207. boolean Sorted=false
  208. boolean VScrollBar=true
  209. long TextColor=33554432
  210. int TextSize=-9
  211. int Weight=400
  212. string FaceName="宋体"
  213. FontCharSet FontCharSet=GB2312CharSet!
  214. FontPitch FontPitch=Variable!
  215. end type
  216. event selectionchanged;cb_1.triggerevent(clicked!)
  217. end event
  218. type st_2 from statictext within w_rp_item_sub_hz
  219. int X=1385
  220. int Y=164
  221. int Width=288
  222. int Height=60
  223. boolean Enabled=false
  224. string Text="会计科目:"
  225. boolean FocusRectangle=false
  226. long TextColor=33554432
  227. long BackColor=67108864
  228. int TextSize=-9
  229. int Weight=400
  230. string FaceName="宋体"
  231. FontCharSet FontCharSet=GB2312CharSet!
  232. FontPitch FontPitch=Variable!
  233. end type