w_rp_spt_sub_hz.srw 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  1. $PBExportHeader$w_rp_spt_sub_hz.srw
  2. forward
  3. global type w_rp_spt_sub_hz from w_publ_easyq
  4. end type
  5. type ddlb_1 from dropdownlistbox within w_rp_spt_sub_hz
  6. end type
  7. type ddlb_2 from dropdownlistbox within w_rp_spt_sub_hz
  8. end type
  9. type ddlb_3 from dropdownlistbox within w_rp_spt_sub_hz
  10. end type
  11. type st_2 from statictext within w_rp_spt_sub_hz
  12. end type
  13. type st_1 from statictext within w_rp_spt_sub_hz
  14. end type
  15. type cbx_ifpost from checkbox within w_rp_spt_sub_hz
  16. end type
  17. end forward
  18. global type w_rp_spt_sub_hz from w_publ_easyq
  19. string title = "供应商科目总帐"
  20. long backcolor = 81324524
  21. boolean if_ue_sentdataout = true
  22. ddlb_1 ddlb_1
  23. ddlb_2 ddlb_2
  24. ddlb_3 ddlb_3
  25. st_2 st_2
  26. st_1 st_1
  27. cbx_ifpost cbx_ifpost
  28. end type
  29. global w_rp_spt_sub_hz w_rp_spt_sub_hz
  30. on w_rp_spt_sub_hz.create
  31. int iCurrent
  32. call super::create
  33. this.ddlb_1=create ddlb_1
  34. this.ddlb_2=create ddlb_2
  35. this.ddlb_3=create ddlb_3
  36. this.st_2=create st_2
  37. this.st_1=create st_1
  38. this.cbx_ifpost=create cbx_ifpost
  39. iCurrent=UpperBound(this.Control)
  40. this.Control[iCurrent+1]=this.ddlb_1
  41. this.Control[iCurrent+2]=this.ddlb_2
  42. this.Control[iCurrent+3]=this.ddlb_3
  43. this.Control[iCurrent+4]=this.st_2
  44. this.Control[iCurrent+5]=this.st_1
  45. this.Control[iCurrent+6]=this.cbx_ifpost
  46. end on
  47. on w_rp_spt_sub_hz.destroy
  48. call super::destroy
  49. destroy(this.ddlb_1)
  50. destroy(this.ddlb_2)
  51. destroy(this.ddlb_3)
  52. destroy(this.st_2)
  53. destroy(this.st_1)
  54. destroy(this.cbx_ifpost)
  55. end on
  56. event open;THIS.TriggerEvent('ue_before_open')
  57. wf_movetocenter()
  58. dw_1.SetTransObject (sqlca)
  59. dw_1.RBUTTON_FILTER_USE = TRUE //右键查询功能开关
  60. IF Trim(dw_1.DataObject) <> '' THEN
  61. dw_1.Object.DataWindow.Print.MARGIN.Top = Integer(ProfileString(sys_inifilename,dw_1.DataObject, "MARGIN_TOP", "110"))
  62. dw_1.Object.DataWindow.Print.MARGIN.Left = Integer(ProfileString(sys_inifilename,dw_1.DataObject, "MARGIN_LEFT", "96" ))
  63. dw_1.Object.DataWindow.Print.MARGIN.bottom = Integer(ProfileString(sys_inifilename,dw_1.DataObject, "MARGIN_BOTTOM", "110"))
  64. dw_1.Object.DataWindow.Print.MARGIN.Right = Integer(ProfileString(sys_inifilename,dw_1.DataObject, "MARGIN_RIGHT", "96" ))
  65. END IF
  66. String ls_subname,ins_subname
  67. String ls_subid,ins_subid
  68. DECLARE sub_cur CURSOR FOR
  69. SELECT DISTINCT
  70. cw_subject.subid,
  71. cw_subject.name
  72. FROM cw_subject
  73. WHERE cw_subject.accsetid = :sys_accsetid
  74. AND cw_subject.hsspt = 1
  75. Order By cw_subject.subid Asc ;
  76. OPEN sub_cur;
  77. FETCH sub_cur INTO :ls_subid,:ls_subname;
  78. ins_subid = ls_subid
  79. ins_subname = ls_subname
  80. DO WHILE sqlca.SQLCode = 0
  81. ddlb_3.AddItem('['+String(ls_subid)+']' + ls_subname)
  82. FETCH sub_cur INTO :ls_subid,:ls_subname;
  83. LOOP
  84. ddlb_3.Text = '['+String(ins_subid)+']' + ins_subname
  85. CLOSE sub_cur;
  86. cb_1.TriggerEvent(Clicked!)
  87. end event
  88. type cb_func from w_publ_easyq`cb_func within w_rp_spt_sub_hz
  89. end type
  90. type cb_exit from w_publ_easyq`cb_exit within w_rp_spt_sub_hz
  91. end type
  92. type cb_2 from w_publ_easyq`cb_2 within w_rp_spt_sub_hz
  93. boolean bringtotop = true
  94. end type
  95. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_spt_sub_hz
  96. boolean bringtotop = true
  97. end type
  98. type cb_1 from w_publ_easyq`cb_1 within w_rp_spt_sub_hz
  99. boolean bringtotop = true
  100. end type
  101. event cb_1::clicked;call super::clicked;Long ls_firstcmon,ls_lastmon
  102. String ls_subid
  103. Int li_ifpost
  104. IF cbx_ifpost.Checked THEN
  105. li_ifpost = -1
  106. ELSE
  107. li_ifpost = 1
  108. END IF
  109. ls_firstcmon = Long(em_1.Text) * 100 + Long(ddlb_1.Text)
  110. ls_lastmon = Long(em_1.Text) * 100 + Long(ddlb_2.Text)
  111. ls_subid = Mid (ddlb_3.Text,Pos(ddlb_3.Text,'[') + 1,Pos(ddlb_3.Text,']') - 2 )
  112. ls_subid = ls_subid + '%'
  113. dw_1.Retrieve(sys_accsetid,ls_subid,ls_firstcmon,ls_lastmon,li_ifpost)
  114. end event
  115. type st_3 from w_publ_easyq`st_3 within w_rp_spt_sub_hz
  116. integer x = 9
  117. integer width = 288
  118. string text = "会计年度:"
  119. end type
  120. type st_4 from w_publ_easyq`st_4 within w_rp_spt_sub_hz
  121. integer x = 1074
  122. integer width = 78
  123. string text = "至"
  124. end type
  125. type em_1 from w_publ_easyq`em_1 within w_rp_spt_sub_hz
  126. integer x = 288
  127. integer width = 242
  128. string mask = "yyyy"
  129. end type
  130. event em_1::constructor;this.text=left(string(sys_curyearmon),4)
  131. end event
  132. type em_2 from w_publ_easyq`em_2 within w_rp_spt_sub_hz
  133. integer x = 1856
  134. integer y = 468
  135. end type
  136. type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_spt_sub_hz
  137. end type
  138. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_spt_sub_hz
  139. integer x = 951
  140. integer y = 44
  141. end type
  142. type dw_1 from w_publ_easyq`dw_1 within w_rp_spt_sub_hz
  143. integer width = 2455
  144. string dataobject = "dw_rp_spt_sub_hz"
  145. end type
  146. type ln_bar from w_publ_easyq`ln_bar within w_rp_spt_sub_hz
  147. end type
  148. type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_spt_sub_hz
  149. end type
  150. type r_bar from w_publ_easyq`r_bar within w_rp_spt_sub_hz
  151. end type
  152. type ln_1 from w_publ_easyq`ln_1 within w_rp_spt_sub_hz
  153. end type
  154. type ln_2 from w_publ_easyq`ln_2 within w_rp_spt_sub_hz
  155. end type
  156. type ddlb_1 from dropdownlistbox within w_rp_spt_sub_hz
  157. integer x = 832
  158. integer y = 200
  159. integer width = 229
  160. integer height = 908
  161. integer taborder = 130
  162. boolean bringtotop = true
  163. integer textsize = -9
  164. integer weight = 400
  165. fontcharset fontcharset = gb2312charset!
  166. fontpitch fontpitch = variable!
  167. string facename = "宋体"
  168. long textcolor = 33554432
  169. boolean sorted = false
  170. boolean vscrollbar = true
  171. string item[] = {"1","2","3","4","5","6","7","8","9","10","11","12"}
  172. borderstyle borderstyle = stylelowered!
  173. end type
  174. event constructor;THIS.Text = String(s_sys_accset.currmon)
  175. end event
  176. event selectionchanged;cb_1.TriggerEvent(Clicked!)
  177. end event
  178. type ddlb_2 from dropdownlistbox within w_rp_spt_sub_hz
  179. integer x = 1202
  180. integer y = 200
  181. integer width = 229
  182. integer height = 908
  183. integer taborder = 140
  184. boolean bringtotop = true
  185. integer textsize = -9
  186. integer weight = 400
  187. fontcharset fontcharset = gb2312charset!
  188. fontpitch fontpitch = variable!
  189. string facename = "宋体"
  190. long textcolor = 33554432
  191. boolean sorted = false
  192. boolean vscrollbar = true
  193. string item[] = {"1","2","3","4","5","6","7","8","9","10","11","12"}
  194. borderstyle borderstyle = stylelowered!
  195. end type
  196. event constructor;THIS.Text = String(s_sys_accset.currmon)
  197. end event
  198. event selectionchanged;IF Long(ddlb_2.Text) < Long(ddlb_1.Text) THEN
  199. ddlb_1.Text = ddlb_2.Text
  200. END IF
  201. cb_1.TriggerEvent(Clicked!)
  202. end event
  203. type ddlb_3 from dropdownlistbox within w_rp_spt_sub_hz
  204. integer x = 1710
  205. integer y = 200
  206. integer width = 1399
  207. integer height = 1012
  208. integer taborder = 40
  209. boolean bringtotop = true
  210. integer textsize = -9
  211. integer weight = 400
  212. fontcharset fontcharset = gb2312charset!
  213. fontpitch fontpitch = variable!
  214. string facename = "宋体"
  215. long textcolor = 33554432
  216. boolean sorted = false
  217. boolean vscrollbar = true
  218. borderstyle borderstyle = stylelowered!
  219. end type
  220. event selectionchanged;cb_1.triggerevent(clicked!)
  221. end event
  222. type st_2 from statictext within w_rp_spt_sub_hz
  223. integer x = 1445
  224. integer y = 216
  225. integer width = 288
  226. integer height = 60
  227. integer textsize = -9
  228. integer weight = 400
  229. fontcharset fontcharset = gb2312charset!
  230. fontpitch fontpitch = variable!
  231. string facename = "宋体"
  232. long textcolor = 33554432
  233. long backcolor = 67108864
  234. boolean enabled = false
  235. string text = "会计科目:"
  236. boolean focusrectangle = false
  237. end type
  238. type st_1 from statictext within w_rp_spt_sub_hz
  239. integer x = 539
  240. integer y = 216
  241. integer width = 288
  242. integer height = 52
  243. boolean bringtotop = true
  244. integer textsize = -9
  245. integer weight = 400
  246. fontcharset fontcharset = gb2312charset!
  247. fontpitch fontpitch = variable!
  248. string facename = "宋体"
  249. long textcolor = 33554432
  250. long backcolor = 67108864
  251. string text = "会计期间:"
  252. alignment alignment = right!
  253. boolean focusrectangle = false
  254. end type
  255. type cbx_ifpost from checkbox within w_rp_spt_sub_hz
  256. integer x = 3113
  257. integer y = 204
  258. integer width = 466
  259. integer height = 80
  260. boolean bringtotop = true
  261. integer textsize = -9
  262. integer weight = 400
  263. fontcharset fontcharset = gb2312charset!
  264. fontpitch fontpitch = variable!
  265. string facename = "宋体"
  266. long textcolor = 33554432
  267. long backcolor = 67108864
  268. string text = "包括未登帐凭证"
  269. end type
  270. event clicked;Int li_ifpost
  271. IF THIS.Checked THEN
  272. li_ifpost = 1
  273. ELSE
  274. li_ifpost = 0
  275. END IF
  276. SetProfileString (sys_inifilename,dw_1.DataObject, "ifpost", String(li_ifpost))
  277. cb_1.TriggerEvent(Clicked!)
  278. end event
  279. event constructor;Int li_ifpost
  280. li_ifpost = Integer(ProfileString (sys_inifilename,dw_1.DataObject, "ifpost", '0'))
  281. IF li_ifpost = 0 THEN
  282. THIS.Checked = FALSE
  283. ELSE
  284. THIS.Checked = TRUE
  285. END IF
  286. end event