w_rp_item_mx.srw 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  1. $PBExportHeader$w_rp_item_mx.srw
  2. forward
  3. global type w_rp_item_mx from w_publ_easyq
  4. end type
  5. type ddlb_1 from dropdownlistbox within w_rp_item_mx
  6. end type
  7. type ddlb_2 from dropdownlistbox within w_rp_item_mx
  8. end type
  9. type cbx_1 from checkbox within w_rp_item_mx
  10. end type
  11. type dw_2 from u_dw_rbtnfilter within w_rp_item_mx
  12. end type
  13. end forward
  14. global type w_rp_item_mx 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. cbx_1 cbx_1
  21. dw_2 dw_2
  22. end type
  23. global w_rp_item_mx w_rp_item_mx
  24. on w_rp_item_mx.create
  25. int iCurrent
  26. call super::create
  27. this.ddlb_1=create ddlb_1
  28. this.ddlb_2=create ddlb_2
  29. this.cbx_1=create cbx_1
  30. this.dw_2=create dw_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.cbx_1
  35. this.Control[iCurrent+4]=this.dw_2
  36. end on
  37. on w_rp_item_mx.destroy
  38. call super::destroy
  39. destroy(this.ddlb_1)
  40. destroy(this.ddlb_2)
  41. destroy(this.cbx_1)
  42. destroy(this.dw_2)
  43. end on
  44. event open;THIS.TriggerEvent('ue_before_open')
  45. wf_movetocenter()
  46. dw_1.SetTransObject (sqlca)
  47. dw_1.titleclick_sort_use = FALSE
  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. datawindowchild childdw_subid
  55. dw_1.GetChild("subid",childdw_subid)
  56. childdw_subid.SetTransObject (sqlca)
  57. childdw_subid.Retrieve(sys_accsetid)
  58. dw_2.SetTransObject (sqlca)
  59. dw_2.RBUTTON_FILTER_USE = TRUE //右键查询功能开关
  60. IF dw_2.Retrieve(sys_accsetid) > 0 THEN
  61. dw_2.SelectRow(0,FALSE)
  62. dw_2.SetRow(1)
  63. dw_2.SelectRow(1,TRUE)
  64. END IF
  65. cb_1.TriggerEvent(Clicked!)
  66. end event
  67. event resize;call super::resize;dw_2.Height = dw_1.Height
  68. end event
  69. type cb_exit from w_publ_easyq`cb_exit within w_rp_item_mx
  70. int X=1125
  71. end type
  72. type cb_2 from w_publ_easyq`cb_2 within w_rp_item_mx
  73. int X=960
  74. int TabOrder=110
  75. boolean BringToTop=true
  76. end type
  77. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_item_mx
  78. int X=695
  79. int TabOrder=90
  80. boolean BringToTop=true
  81. end type
  82. type cb_1 from w_publ_easyq`cb_1 within w_rp_item_mx
  83. int TabOrder=40
  84. boolean BringToTop=true
  85. end type
  86. event cb_1::clicked;call super::clicked;Long ls_firstcmon,ls_lastmon,ls_itemid
  87. Int ls_postflag
  88. Long ll_row
  89. String ls_itemname
  90. ll_row = dw_2.GetRow()
  91. IF ll_row <= 0 THEN
  92. dw_1.Reset()
  93. RETURN
  94. END IF
  95. IF cbx_1.Checked THEN
  96. ls_postflag = 1
  97. ELSE
  98. ls_postflag = -1
  99. END IF
  100. ls_firstcmon = Long(em_1.Text) * 100 + Long(ddlb_1.Text)
  101. ls_lastmon = Long(em_1.Text) * 100 + Long(ddlb_2.Text)
  102. ls_itemid = dw_2.object.hsitemid[ll_row]
  103. ls_itemname = dw_2.object.hsitemname[ll_row]
  104. dw_1.Object.Title.Text = ls_itemname+'明细帐'
  105. dw_1.Retrieve(sys_accsetid,ls_itemid,ls_firstcmon,ls_lastmon,ls_postflag)
  106. IF dw_1.RowCount() <= 0 THEN RETURN
  107. Dec m_balc
  108. String ls_subid
  109. Long i
  110. FOR i = 1 TO dw_1.RowCount()
  111. IF dw_1.Object.dw_sort[i] = 0 THEN
  112. ls_subid = dw_1.Object.subid[i]
  113. m_balc = f_rst_item_sub_bbalc(ls_itemid,ls_subid,ls_firstcmon,ls_postflag)
  114. dw_1.Object.balc[i] = m_balc
  115. ELSEIF dw_1.Object.dw_sort[i] = 1 THEN
  116. dw_1.Object.balc[i] = dw_1.Object.debit[i] - dw_1.Object.credit[i] + m_balc
  117. m_balc = dw_1.Object.balc[i]
  118. ELSEIF dw_1.Object.dw_sort[i] = 2 THEN
  119. dw_1.Object.balc[i] = m_balc
  120. END IF
  121. NEXT
  122. end event
  123. type st_3 from w_publ_easyq`st_3 within w_rp_item_mx
  124. int X=23
  125. int Y=164
  126. int Width=288
  127. boolean BringToTop=true
  128. string Text="会计年度:"
  129. end type
  130. type st_4 from w_publ_easyq`st_4 within w_rp_item_mx
  131. int X=1019
  132. int Y=164
  133. int Width=73
  134. boolean BringToTop=true
  135. string Text="至"
  136. end type
  137. type em_1 from w_publ_easyq`em_1 within w_rp_item_mx
  138. int X=302
  139. int Width=215
  140. int TabOrder=120
  141. boolean BringToTop=true
  142. string Mask="yyyy"
  143. end type
  144. event em_1::constructor;this.text=left(string(sys_curyearmon),4)
  145. end event
  146. type em_2 from w_publ_easyq`em_2 within w_rp_item_mx
  147. int X=1271
  148. int Y=336
  149. int TabOrder=150
  150. boolean BringToTop=true
  151. end type
  152. type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_item_mx
  153. int X=1582
  154. int TabOrder=70
  155. end type
  156. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_item_mx
  157. int X=1371
  158. int TabOrder=80
  159. boolean BringToTop=true
  160. end type
  161. type dw_1 from w_publ_easyq`dw_1 within w_rp_item_mx
  162. int X=1157
  163. int Width=2336
  164. boolean BringToTop=true
  165. string DataObject="dw_rp_item_mx"
  166. end type
  167. event dw_1::doubleclicked;Long ll_row
  168. Long ll_credid
  169. ll_row = THIS.GetRow()
  170. IF ll_row <= 0 THEN RETURN
  171. ll_credid = THIS.Object.credid[ll_row]
  172. IF ll_credid <= 0 THEN RETURN
  173. s_edit_index_tran s_tran //翻页功能窗口 传递参数使用
  174. s_tran.if_retrieve_all = TRUE //是否一次RETRIEVE所有行
  175. s_tran.work_mode = 0 //0-单纯编辑模式, 1-选择模式
  176. s_tran.arg_pkid = 0 //目标定位PKID (备用)
  177. s_tran.arg_string_code = '' //查询列部分内容,用于初步筛选
  178. s_tran.e_long = ll_credid
  179. OpenWithParm(w_credence_edit,s_tran)
  180. end event
  181. type ddlb_1 from dropdownlistbox within w_rp_item_mx
  182. int X=791
  183. int Y=152
  184. int Width=224
  185. int Height=800
  186. int TabOrder=130
  187. boolean BringToTop=true
  188. BorderStyle BorderStyle=StyleLowered!
  189. boolean Sorted=false
  190. boolean VScrollBar=true
  191. long TextColor=33554432
  192. int TextSize=-9
  193. int Weight=400
  194. string FaceName="宋体"
  195. FontCharSet FontCharSet=GB2312CharSet!
  196. FontPitch FontPitch=Variable!
  197. string Item[]={"1",&
  198. "2",&
  199. "3",&
  200. "4",&
  201. "5",&
  202. "6",&
  203. "7",&
  204. "8",&
  205. "9",&
  206. "10",&
  207. "11",&
  208. "12"}
  209. end type
  210. event constructor;THIS.Text = String(s_sys_accset.currmon)
  211. end event
  212. event selectionchanged;cb_1.TriggerEvent(Clicked!)
  213. end event
  214. type ddlb_2 from dropdownlistbox within w_rp_item_mx
  215. int X=1115
  216. int Y=152
  217. int Width=247
  218. int Height=880
  219. int TabOrder=140
  220. boolean BringToTop=true
  221. BorderStyle BorderStyle=StyleLowered!
  222. boolean Sorted=false
  223. boolean VScrollBar=true
  224. long TextColor=33554432
  225. int TextSize=-9
  226. int Weight=400
  227. string FaceName="宋体"
  228. FontCharSet FontCharSet=GB2312CharSet!
  229. FontPitch FontPitch=Variable!
  230. string Item[]={"1",&
  231. "2",&
  232. "3",&
  233. "4",&
  234. "5",&
  235. "6",&
  236. "7",&
  237. "8",&
  238. "9",&
  239. "10",&
  240. "11",&
  241. "12"}
  242. end type
  243. event selectionchanged;IF Long(ddlb_2.Text) < Long(ddlb_1.Text) THEN
  244. ddlb_1.Text = ddlb_2.Text
  245. END IF
  246. cb_1.TriggerEvent(Clicked!)
  247. end event
  248. event constructor;THIS.Text = String(s_sys_accset.currmon)
  249. end event
  250. type cbx_1 from checkbox within w_rp_item_mx
  251. int X=1385
  252. int Y=156
  253. int Width=466
  254. int Height=76
  255. boolean BringToTop=true
  256. string Text="包括未登帐凭证"
  257. BorderStyle BorderStyle=StyleLowered!
  258. long TextColor=33554432
  259. long BackColor=67108864
  260. int TextSize=-9
  261. int Weight=400
  262. string FaceName="宋体"
  263. FontCharSet FontCharSet=GB2312CharSet!
  264. FontPitch FontPitch=Variable!
  265. end type
  266. type dw_2 from u_dw_rbtnfilter within w_rp_item_mx
  267. int X=0
  268. int Y=252
  269. int Width=1157
  270. int Height=928
  271. int TabOrder=30
  272. boolean BringToTop=true
  273. string DataObject="dw_rp_item_mx_item_index"
  274. boolean HScrollBar=true
  275. boolean VScrollBar=true
  276. boolean HSplitScroll=true
  277. end type
  278. event rowfocuschanged;IF currentrow > 0 THEN
  279. THIS.SelectRow(0,FALSE)
  280. THIS.SelectRow(currentrow,TRUE)
  281. END IF
  282. cb_1.TriggerEvent(Clicked!)
  283. end event