w_rp_spt_sub_hz2.srw 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409
  1. $PBExportHeader$w_rp_spt_sub_hz2.srw
  2. forward
  3. global type w_rp_spt_sub_hz2 from w_publ_easyq
  4. end type
  5. type ddlb_1 from dropdownlistbox within w_rp_spt_sub_hz2
  6. end type
  7. type ddlb_2 from dropdownlistbox within w_rp_spt_sub_hz2
  8. end type
  9. type st_1 from statictext within w_rp_spt_sub_hz2
  10. end type
  11. type cbx_ifpost from checkbox within w_rp_spt_sub_hz2
  12. end type
  13. type dw_2 from u_dw_rbtnfilter within w_rp_spt_sub_hz2
  14. end type
  15. type cbx_ifspt from checkbox within w_rp_spt_sub_hz2
  16. end type
  17. end forward
  18. global type w_rp_spt_sub_hz2 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. st_1 st_1
  25. cbx_ifpost cbx_ifpost
  26. dw_2 dw_2
  27. cbx_ifspt cbx_ifspt
  28. end type
  29. global w_rp_spt_sub_hz2 w_rp_spt_sub_hz2
  30. on w_rp_spt_sub_hz2.create
  31. int iCurrent
  32. call super::create
  33. this.ddlb_1=create ddlb_1
  34. this.ddlb_2=create ddlb_2
  35. this.st_1=create st_1
  36. this.cbx_ifpost=create cbx_ifpost
  37. this.dw_2=create dw_2
  38. this.cbx_ifspt=create cbx_ifspt
  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.st_1
  43. this.Control[iCurrent+4]=this.cbx_ifpost
  44. this.Control[iCurrent+5]=this.dw_2
  45. this.Control[iCurrent+6]=this.cbx_ifspt
  46. end on
  47. on w_rp_spt_sub_hz2.destroy
  48. call super::destroy
  49. destroy(this.ddlb_1)
  50. destroy(this.ddlb_2)
  51. destroy(this.st_1)
  52. destroy(this.cbx_ifpost)
  53. destroy(this.dw_2)
  54. destroy(this.cbx_ifspt)
  55. end on
  56. event open;THIS.TriggerEvent('ue_before_open')
  57. wf_movetocenter()
  58. dw_1.RBUTTON_FILTER_USE = TRUE //右键查询功能开关
  59. IF Trim(dw_1.DataObject) <> '' THEN
  60. dw_1.Object.DataWindow.Print.MARGIN.Top = Integer(ProfileString(sys_inifilename,dw_1.DataObject, "MARGIN_TOP", "110"))
  61. dw_1.Object.DataWindow.Print.MARGIN.Left = Integer(ProfileString(sys_inifilename,dw_1.DataObject, "MARGIN_LEFT", "96" ))
  62. dw_1.Object.DataWindow.Print.MARGIN.bottom = Integer(ProfileString(sys_inifilename,dw_1.DataObject, "MARGIN_BOTTOM", "110"))
  63. dw_1.Object.DataWindow.Print.MARGIN.Right = Integer(ProfileString(sys_inifilename,dw_1.DataObject, "MARGIN_RIGHT", "96" ))
  64. END IF
  65. cb_1.TriggerEvent(Clicked!)
  66. end event
  67. event ue_before_open;call super::ue_before_open;dw_1.SetTransObject (sqlca)
  68. dw_2.SetTransObject(sqlca)
  69. IF dw_2.Retrieve(sys_accsetid) > 0 THEN
  70. dw_2.SelectRow(0,FALSE)
  71. dw_2.SetRow(1)
  72. dw_2.SelectRow(1,TRUE)
  73. END IF
  74. end event
  75. event resize;call super::resize;dw_2.Height = dw_1.Height
  76. end event
  77. type cb_func from w_publ_easyq`cb_func within w_rp_spt_sub_hz2
  78. end type
  79. type cb_exit from w_publ_easyq`cb_exit within w_rp_spt_sub_hz2
  80. end type
  81. type cb_2 from w_publ_easyq`cb_2 within w_rp_spt_sub_hz2
  82. boolean bringtotop = true
  83. end type
  84. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_spt_sub_hz2
  85. boolean bringtotop = true
  86. end type
  87. type cb_1 from w_publ_easyq`cb_1 within w_rp_spt_sub_hz2
  88. boolean bringtotop = true
  89. end type
  90. event cb_1::clicked;call super::clicked;Long ls_firstcmon,ls_lastmon,ll_row
  91. String ls_subid,ls_subname,ls_subid_like
  92. Int li_ifpost,li_ifspt
  93. ll_row = dw_2.GetRow()
  94. IF cbx_ifpost.Checked THEN
  95. li_ifpost = -1
  96. ELSE
  97. li_ifpost = 1
  98. END IF
  99. IF cbx_ifspt.Checked THEN
  100. li_ifspt = 1
  101. ELSE
  102. li_ifspt = -1
  103. END IF
  104. ls_firstcmon = Long(em_1.Text) * 100 + Long(ddlb_1.Text)
  105. ls_lastmon = Long(em_1.Text) * 100 + Long(ddlb_2.Text)
  106. IF ll_row > 0 THEN
  107. ls_subid = dw_2.Object.subid[ll_row]
  108. ls_subid_like = ls_subid + '%'
  109. ls_subname = dw_2.Object.name[ll_row]
  110. dw_1.Retrieve(sys_accsetid,ls_subid,ls_subid_like,ls_firstcmon,ls_lastmon,li_ifpost,li_ifspt)
  111. dw_1.Object.t_subid.Text = ls_subname
  112. ELSE
  113. dw_1.Reset()
  114. END IF
  115. end event
  116. type st_3 from w_publ_easyq`st_3 within w_rp_spt_sub_hz2
  117. integer x = 9
  118. integer width = 288
  119. string text = "会计年度:"
  120. end type
  121. type st_4 from w_publ_easyq`st_4 within w_rp_spt_sub_hz2
  122. integer x = 1074
  123. integer width = 78
  124. string text = "至"
  125. end type
  126. type em_1 from w_publ_easyq`em_1 within w_rp_spt_sub_hz2
  127. integer x = 288
  128. integer width = 242
  129. string mask = "yyyy"
  130. end type
  131. event em_1::constructor;this.text=left(string(sys_curyearmon),4)
  132. end event
  133. type em_2 from w_publ_easyq`em_2 within w_rp_spt_sub_hz2
  134. integer x = 1856
  135. integer y = 468
  136. end type
  137. type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_spt_sub_hz2
  138. end type
  139. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_spt_sub_hz2
  140. integer x = 951
  141. integer y = 44
  142. end type
  143. type dw_1 from w_publ_easyq`dw_1 within w_rp_spt_sub_hz2
  144. integer x = 1239
  145. integer width = 2190
  146. string dataobject = "dw_rp_spt_sub_hz2"
  147. end type
  148. event dw_1::doubleclicked;call super::doubleclicked;s_edit_index_tran s_open //翻页功能窗口 传递参数使用
  149. s_open.if_retrieve_all = TRUE //是否一次RETRIEVE所有行
  150. s_open.work_mode = 0 //0-单纯编辑模式, 1-选择模式
  151. s_open.arg_pkid = 0 //目标定位PKID (备用)
  152. s_open.arg_string_code = '' //查询列部分内容,用于初步筛选
  153. Long li_row,li_row2
  154. li_row = THIS.GetRow()
  155. li_row2 = dw_2.GetRow()
  156. IF li_row <= 0 THEN RETURN
  157. IF li_row2 <= 0 THEN RETURN
  158. s_open.b_string = dw_2.Object.subid[li_row2]
  159. s_open.b_long = THIS.Object.uv_dept_bala_sptid[li_row]
  160. s_open.c_long = Long(em_1.Text) * 100 + Long(ddlb_1.Text)
  161. s_open.d_long = Long(em_1.Text) * 100 + Long(ddlb_2.Text)
  162. IF cbx_ifpost.Checked THEN
  163. s_open.e_long = -1
  164. ELSE
  165. s_open.e_long = 1
  166. END IF
  167. OpenWithParm(w_rp_spt_sub_hz2_mx,s_open)
  168. end event
  169. type ln_bar from w_publ_easyq`ln_bar within w_rp_spt_sub_hz2
  170. end type
  171. type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_spt_sub_hz2
  172. end type
  173. type r_bar from w_publ_easyq`r_bar within w_rp_spt_sub_hz2
  174. end type
  175. type ln_1 from w_publ_easyq`ln_1 within w_rp_spt_sub_hz2
  176. end type
  177. type ln_2 from w_publ_easyq`ln_2 within w_rp_spt_sub_hz2
  178. end type
  179. type ddlb_1 from dropdownlistbox within w_rp_spt_sub_hz2
  180. integer x = 832
  181. integer y = 200
  182. integer width = 229
  183. integer height = 908
  184. integer taborder = 130
  185. boolean bringtotop = true
  186. integer textsize = -9
  187. integer weight = 400
  188. fontcharset fontcharset = gb2312charset!
  189. fontpitch fontpitch = variable!
  190. string facename = "宋体"
  191. long textcolor = 33554432
  192. boolean sorted = false
  193. boolean vscrollbar = true
  194. string item[] = {"1","2","3","4","5","6","7","8","9","10","11","12"}
  195. borderstyle borderstyle = stylelowered!
  196. end type
  197. event constructor;THIS.Text = String(s_sys_accset.currmon)
  198. end event
  199. event selectionchanged;cb_1.TriggerEvent(Clicked!)
  200. end event
  201. type ddlb_2 from dropdownlistbox within w_rp_spt_sub_hz2
  202. integer x = 1202
  203. integer y = 200
  204. integer width = 229
  205. integer height = 908
  206. integer taborder = 140
  207. boolean bringtotop = true
  208. integer textsize = -9
  209. integer weight = 400
  210. fontcharset fontcharset = gb2312charset!
  211. fontpitch fontpitch = variable!
  212. string facename = "宋体"
  213. long textcolor = 33554432
  214. boolean sorted = false
  215. boolean vscrollbar = true
  216. string item[] = {"1","2","3","4","5","6","7","8","9","10","11","12"}
  217. borderstyle borderstyle = stylelowered!
  218. end type
  219. event constructor;THIS.Text = String(s_sys_accset.currmon)
  220. end event
  221. event selectionchanged;IF Long(ddlb_2.Text) < Long(ddlb_1.Text) THEN
  222. ddlb_1.Text = ddlb_2.Text
  223. END IF
  224. cb_1.TriggerEvent(Clicked!)
  225. end event
  226. type st_1 from statictext within w_rp_spt_sub_hz2
  227. integer x = 539
  228. integer y = 216
  229. integer width = 288
  230. integer height = 52
  231. boolean bringtotop = true
  232. integer textsize = -9
  233. integer weight = 400
  234. fontcharset fontcharset = gb2312charset!
  235. fontpitch fontpitch = variable!
  236. string facename = "宋体"
  237. long textcolor = 33554432
  238. long backcolor = 67108864
  239. string text = "会计期间:"
  240. alignment alignment = right!
  241. boolean focusrectangle = false
  242. end type
  243. type cbx_ifpost from checkbox within w_rp_spt_sub_hz2
  244. integer x = 1463
  245. integer y = 200
  246. integer width = 466
  247. integer height = 80
  248. boolean bringtotop = true
  249. integer textsize = -9
  250. integer weight = 400
  251. fontcharset fontcharset = gb2312charset!
  252. fontpitch fontpitch = variable!
  253. string facename = "宋体"
  254. long textcolor = 33554432
  255. long backcolor = 67108864
  256. string text = "包括未登帐凭证"
  257. end type
  258. event clicked;Int li_ifpost
  259. IF THIS.Checked THEN
  260. li_ifpost = 1
  261. ELSE
  262. li_ifpost = 0
  263. END IF
  264. SetProfileString (sys_inifilename,dw_1.DataObject, "ifpost", String(li_ifpost))
  265. cb_1.TriggerEvent(Clicked!)
  266. end event
  267. event constructor;Int li_ifpost
  268. li_ifpost = Integer(ProfileString (sys_inifilename,dw_1.DataObject, "ifpost", '0'))
  269. IF li_ifpost = 0 THEN
  270. THIS.Checked = FALSE
  271. ELSE
  272. THIS.Checked = TRUE
  273. END IF
  274. end event
  275. type dw_2 from u_dw_rbtnfilter within w_rp_spt_sub_hz2
  276. integer y = 308
  277. integer width = 1234
  278. integer height = 928
  279. integer taborder = 40
  280. boolean bringtotop = true
  281. string dataobject = "dw_rp_subid_hsspt_index"
  282. boolean hscrollbar = true
  283. boolean vscrollbar = true
  284. boolean hsplitscroll = true
  285. end type
  286. event rowfocuschanged;IF currentrow > 0 THEN
  287. THIS.SelectRow(0,FALSE)
  288. THIS.SelectRow(currentrow,TRUE)
  289. END IF
  290. cb_1.TriggerEvent(Clicked!)
  291. end event
  292. type cbx_ifspt from checkbox within w_rp_spt_sub_hz2
  293. integer x = 2002
  294. integer y = 200
  295. integer width = 741
  296. integer height = 80
  297. boolean bringtotop = true
  298. integer textsize = -9
  299. integer weight = 400
  300. fontcharset fontcharset = gb2312charset!
  301. fontpitch fontpitch = variable!
  302. string facename = "宋体"
  303. long textcolor = 33554432
  304. long backcolor = 67108864
  305. string text = "不显示无发生业务的供应商"
  306. boolean checked = true
  307. end type
  308. event clicked;Int li_ifspt
  309. IF THIS.Checked THEN
  310. li_ifspt = 1
  311. ELSE
  312. li_ifspt = 0
  313. END IF
  314. SetProfileString (sys_inifilename,dw_1.DataObject, "ifspt", String(li_ifspt))
  315. cb_1.TriggerEvent(Clicked!)
  316. end event
  317. event constructor;Int li_ifspt
  318. li_ifspt = Integer(ProfileString (sys_inifilename,dw_1.DataObject, "ifspt", '0'))
  319. IF li_ifspt = 0 THEN
  320. THIS.Checked = FALSE
  321. ELSE
  322. THIS.Checked = TRUE
  323. END IF
  324. end event