w_rp_item_sub_mx.srw 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  1. $PBExportHeader$w_rp_item_sub_mx.srw
  2. forward
  3. global type w_rp_item_sub_mx from w_publ_easyq
  4. end type
  5. type ddlb_1 from dropdownlistbox within w_rp_item_sub_mx
  6. end type
  7. type ddlb_2 from dropdownlistbox within w_rp_item_sub_mx
  8. end type
  9. type ddlb_3 from dropdownlistbox within w_rp_item_sub_mx
  10. end type
  11. type st_2 from statictext within w_rp_item_sub_mx
  12. end type
  13. type cbx_1 from checkbox within w_rp_item_sub_mx
  14. end type
  15. end forward
  16. global type w_rp_item_sub_mx from w_publ_easyq
  17. boolean TitleBar=true
  18. string Title="项目科目明细帐"
  19. long BackColor=81324524
  20. ddlb_1 ddlb_1
  21. ddlb_2 ddlb_2
  22. ddlb_3 ddlb_3
  23. st_2 st_2
  24. cbx_1 cbx_1
  25. end type
  26. global w_rp_item_sub_mx w_rp_item_sub_mx
  27. on w_rp_item_sub_mx.create
  28. int iCurrent
  29. call super::create
  30. this.ddlb_1=create ddlb_1
  31. this.ddlb_2=create ddlb_2
  32. this.ddlb_3=create ddlb_3
  33. this.st_2=create st_2
  34. this.cbx_1=create cbx_1
  35. iCurrent=UpperBound(this.Control)
  36. this.Control[iCurrent+1]=this.ddlb_1
  37. this.Control[iCurrent+2]=this.ddlb_2
  38. this.Control[iCurrent+3]=this.ddlb_3
  39. this.Control[iCurrent+4]=this.st_2
  40. this.Control[iCurrent+5]=this.cbx_1
  41. end on
  42. on w_rp_item_sub_mx.destroy
  43. call super::destroy
  44. destroy(this.ddlb_1)
  45. destroy(this.ddlb_2)
  46. destroy(this.ddlb_3)
  47. destroy(this.st_2)
  48. destroy(this.cbx_1)
  49. end on
  50. event open;THIS.TriggerEvent('ue_before_open')
  51. wf_movetocenter()
  52. dw_1.SetTransObject (sqlca)
  53. dw_1.titleclick_sort_use = FALSE
  54. IF Trim(dw_1.DataObject) <> '' THEN
  55. dw_1.Object.DataWindow.Print.MARGIN.Top = Integer(ProfileString(sys_inifilename,dw_1.DataObject, "MARGIN_TOP", "110"))
  56. dw_1.Object.DataWindow.Print.MARGIN.Left = Integer(ProfileString(sys_inifilename,dw_1.DataObject, "MARGIN_LEFT", "96" ))
  57. dw_1.Object.DataWindow.Print.MARGIN.bottom = Integer(ProfileString(sys_inifilename,dw_1.DataObject, "MARGIN_BOTTOM", "110"))
  58. dw_1.Object.DataWindow.Print.MARGIN.Right = Integer(ProfileString(sys_inifilename,dw_1.DataObject, "MARGIN_RIGHT", "96" ))
  59. END IF
  60. String ls_subname,ins_subname
  61. String ls_subid,ins_subid
  62. DECLARE sub_cur CURSOR FOR
  63. SELECT DISTINCT
  64. cw_subject.subid,
  65. cw_subject.name
  66. FROM cw_subject,uv_dept_bala
  67. WHERE uv_dept_bala.accsetid = cw_subject.accsetid
  68. AND uv_dept_bala.subid = cw_subject.subid
  69. AND uv_dept_bala.accsetid = :sys_accsetid
  70. AND uv_dept_bala.itemid <> 0
  71. Order By cw_subject.subid Asc ;
  72. OPEN sub_cur;
  73. FETCH sub_cur INTO :ls_subid,:ls_subname;
  74. ins_subid = ls_subid
  75. ins_subname = ls_subname
  76. DO WHILE sqlca.SQLCode = 0
  77. ddlb_3.AddItem('['+String(ls_subid)+']' + ls_subname)
  78. FETCH sub_cur INTO :ls_subid,:ls_subname;
  79. LOOP
  80. ddlb_3.Text = '['+String(ins_subid)+']' + ins_subname
  81. CLOSE sub_cur;
  82. cb_1.triggerevent(clicked!)
  83. end event
  84. type cb_exit from w_publ_easyq`cb_exit within w_rp_item_sub_mx
  85. int X=1125
  86. end type
  87. type cb_2 from w_publ_easyq`cb_2 within w_rp_item_sub_mx
  88. int X=960
  89. boolean BringToTop=true
  90. end type
  91. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_item_sub_mx
  92. int X=695
  93. boolean BringToTop=true
  94. end type
  95. type cb_1 from w_publ_easyq`cb_1 within w_rp_item_sub_mx
  96. boolean BringToTop=true
  97. end type
  98. event cb_1::clicked;call super::clicked;long ls_firstcmon,ls_lastmon
  99. string ls_subid
  100. int ls_postflag
  101. if cbx_1.checked then
  102. ls_postflag=1
  103. else
  104. ls_postflag = -1
  105. end if
  106. ls_firstcmon=long(em_1.text) * 100 + long(ddlb_1.text)
  107. ls_lastmon=long(em_1.text) * 100 + long(ddlb_2.text)
  108. ls_subid=Mid (ddlb_3.text,pos(ddlb_3.text,'[') + 1,pos(ddlb_3.text,']') - 2 )
  109. dw_1.retrieve(sys_accsetid,ls_subid,ls_firstcmon,ls_lastmon,ls_postflag)
  110. if dw_1.rowcount()<=0 then return
  111. dec m_balc
  112. long i,ls_itemid
  113. for i=1 to dw_1.rowcount()
  114. if dw_1.object.dw_sort[i]=0 then
  115. ls_itemid=dw_1.object.itemid[i]
  116. m_balc=f_rst_item_sub_bbalc(ls_itemid,ls_subid,ls_firstcmon,ls_postflag)
  117. dw_1.object.balc[i]=m_balc
  118. elseif dw_1.object.dw_sort[i]=1 then
  119. dw_1.object.balc[i]=dw_1.object.debit[i] - dw_1.object.credit[i] + m_balc
  120. m_balc=dw_1.object.balc[i]
  121. elseif dw_1.object.dw_sort[i]=2 then
  122. dw_1.object.balc[i]=m_balc
  123. end if
  124. next
  125. end event
  126. type st_3 from w_publ_easyq`st_3 within w_rp_item_sub_mx
  127. int X=9
  128. int Y=164
  129. int Width=288
  130. boolean BringToTop=true
  131. string Text="会计年度:"
  132. end type
  133. type st_4 from w_publ_easyq`st_4 within w_rp_item_sub_mx
  134. int X=1015
  135. int Y=164
  136. int Width=78
  137. boolean BringToTop=true
  138. string Text="至"
  139. end type
  140. type em_1 from w_publ_easyq`em_1 within w_rp_item_sub_mx
  141. int X=288
  142. int Width=219
  143. boolean BringToTop=true
  144. string Mask="yyyy"
  145. end type
  146. event em_1::constructor;this.text=left(string(sys_curyearmon),4)
  147. end event
  148. type em_2 from w_publ_easyq`em_2 within w_rp_item_sub_mx
  149. int X=1559
  150. int Y=300
  151. boolean BringToTop=true
  152. end type
  153. type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_item_sub_mx
  154. int X=1536
  155. end type
  156. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_item_sub_mx
  157. int X=1326
  158. boolean BringToTop=true
  159. end type
  160. type dw_1 from w_publ_easyq`dw_1 within w_rp_item_sub_mx
  161. int Width=2455
  162. boolean BringToTop=true
  163. string DataObject="dw_rp_item_sub_mx"
  164. end type
  165. event dw_1::doubleclicked;Long ll_row
  166. Long ll_credid
  167. ll_row = THIS.GetRow()
  168. IF ll_row <= 0 THEN RETURN
  169. ll_credid = THIS.Object.credid[ll_row]
  170. IF ll_credid <= 0 THEN RETURN
  171. s_edit_index_tran s_tran //翻页功能窗口 传递参数使用
  172. s_tran.if_retrieve_all = TRUE //是否一次RETRIEVE所有行
  173. s_tran.work_mode = 0 //0-单纯编辑模式, 1-选择模式
  174. s_tran.arg_pkid = 0 //目标定位PKID (备用)
  175. s_tran.arg_string_code = '' //查询列部分内容,用于初步筛选
  176. s_tran.e_long = ll_credid
  177. OpenWithParm(w_credence_edit,s_tran)
  178. end event
  179. type ddlb_1 from dropdownlistbox within w_rp_item_sub_mx
  180. int X=773
  181. int Y=148
  182. int Width=229
  183. int Height=908
  184. int TabOrder=130
  185. boolean BringToTop=true
  186. BorderStyle BorderStyle=StyleLowered!
  187. boolean Sorted=false
  188. boolean VScrollBar=true
  189. long TextColor=33554432
  190. int TextSize=-9
  191. int Weight=400
  192. string FaceName="宋体"
  193. FontCharSet FontCharSet=GB2312CharSet!
  194. FontPitch FontPitch=Variable!
  195. string Item[]={"1",&
  196. "2",&
  197. "3",&
  198. "4",&
  199. "5",&
  200. "6",&
  201. "7",&
  202. "8",&
  203. "9",&
  204. "10",&
  205. "11",&
  206. "12"}
  207. end type
  208. event constructor;THIS.Text = String(s_sys_accset.currmon)
  209. end event
  210. event selectionchanged;cb_1.triggerevent(clicked!)
  211. end event
  212. type ddlb_2 from dropdownlistbox within w_rp_item_sub_mx
  213. int X=1143
  214. int Y=148
  215. int Width=229
  216. int Height=908
  217. int TabOrder=140
  218. boolean BringToTop=true
  219. BorderStyle BorderStyle=StyleLowered!
  220. boolean Sorted=false
  221. boolean VScrollBar=true
  222. long TextColor=33554432
  223. int TextSize=-9
  224. int Weight=400
  225. string FaceName="宋体"
  226. FontCharSet FontCharSet=GB2312CharSet!
  227. FontPitch FontPitch=Variable!
  228. string Item[]={"1",&
  229. "2",&
  230. "3",&
  231. "4",&
  232. "5",&
  233. "6",&
  234. "7",&
  235. "8",&
  236. "9",&
  237. "10",&
  238. "11",&
  239. "12"}
  240. end type
  241. event constructor;THIS.Text = String(s_sys_accset.currmon)
  242. end event
  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. type ddlb_3 from dropdownlistbox within w_rp_item_sub_mx
  249. int X=1659
  250. int Y=148
  251. int Width=1125
  252. int Height=1012
  253. int TabOrder=40
  254. boolean BringToTop=true
  255. BorderStyle BorderStyle=StyleLowered!
  256. boolean Sorted=false
  257. boolean VScrollBar=true
  258. long TextColor=33554432
  259. int TextSize=-9
  260. int Weight=400
  261. string FaceName="宋体"
  262. FontCharSet FontCharSet=GB2312CharSet!
  263. FontPitch FontPitch=Variable!
  264. end type
  265. event selectionchanged;cb_1.triggerevent(clicked!)
  266. end event
  267. type st_2 from statictext within w_rp_item_sub_mx
  268. int X=1381
  269. int Y=164
  270. int Width=288
  271. int Height=60
  272. boolean Enabled=false
  273. string Text="会计科目:"
  274. Alignment Alignment=Right!
  275. boolean FocusRectangle=false
  276. long TextColor=33554432
  277. long BackColor=67108864
  278. int TextSize=-9
  279. int Weight=400
  280. string FaceName="宋体"
  281. FontCharSet FontCharSet=GB2312CharSet!
  282. FontPitch FontPitch=Variable!
  283. end type
  284. type cbx_1 from checkbox within w_rp_item_sub_mx
  285. int X=2825
  286. int Y=164
  287. int Width=466
  288. int Height=76
  289. boolean BringToTop=true
  290. string Text="包括未登帐凭证"
  291. BorderStyle BorderStyle=StyleLowered!
  292. long TextColor=33554432
  293. long BackColor=67108864
  294. int TextSize=-9
  295. int Weight=400
  296. string FaceName="宋体"
  297. FontCharSet FontCharSet=GB2312CharSet!
  298. FontPitch FontPitch=Variable!
  299. end type