w_rp_assetdepr_mx.srw 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543
  1. $PBExportHeader$w_rp_assetdepr_mx.srw
  2. forward
  3. global type w_rp_assetdepr_mx from w_publ_easyq
  4. end type
  5. type ddlb_1 from dropdownlistbox within w_rp_assetdepr_mx
  6. end type
  7. type ddlb_2 from dropdownlistbox within w_rp_assetdepr_mx
  8. end type
  9. type cb_3 from uo_imflatbutton within w_rp_assetdepr_mx
  10. end type
  11. type cb_4 from uo_imflatbutton within w_rp_assetdepr_mx
  12. end type
  13. type cb_5 from uo_imflatbutton within w_rp_assetdepr_mx
  14. end type
  15. type dw_2 from u_dw_rbtnfilter within w_rp_assetdepr_mx
  16. end type
  17. type cbx_2 from checkbox within w_rp_assetdepr_mx
  18. end type
  19. type st_6 from statictext within w_rp_assetdepr_mx
  20. end type
  21. type st_5 from statictext within w_rp_assetdepr_mx
  22. end type
  23. type cbx_1 from checkbox within w_rp_assetdepr_mx
  24. end type
  25. type st_1 from statictext within w_rp_assetdepr_mx
  26. end type
  27. end forward
  28. global type w_rp_assetdepr_mx from w_publ_easyq
  29. integer width = 3502
  30. integer height = 2200
  31. string title = "固定资产及累计折旧明细帐"
  32. long backcolor = 83488739
  33. event retr_mx ( )
  34. ddlb_1 ddlb_1
  35. ddlb_2 ddlb_2
  36. cb_3 cb_3
  37. cb_4 cb_4
  38. cb_5 cb_5
  39. dw_2 dw_2
  40. cbx_2 cbx_2
  41. st_6 st_6
  42. st_5 st_5
  43. cbx_1 cbx_1
  44. st_1 st_1
  45. end type
  46. global w_rp_assetdepr_mx w_rp_assetdepr_mx
  47. event retr_mx;Long ls_firstcmon,ls_lastmon,init_mon
  48. String ls_assetcardname,ls_text,ls_assetcardcode
  49. long ll_assetcardid
  50. IF dw_2.GetRow() <= 0 THEN
  51. dw_1.Reset()
  52. RETURN
  53. END IF
  54. ls_firstcmon = Long(em_1.Text) * 100 + Long(ddlb_1.Text)
  55. ls_lastmon = Long(em_1.Text) * 100 + Long(ddlb_2.Text)
  56. ll_assetcardid = dw_2.Object.cw_assetcard_assetcardid[dw_2.GetRow()]
  57. ls_assetcardcode = dw_2.Object.cw_assetcard_assetcardcode[dw_2.GetRow()]
  58. ls_assetcardname = dw_2.Object.cw_assetcard_assetcardname[dw_2.GetRow()]
  59. ls_text = '('+ls_assetcardcode+')'+ls_assetcardname
  60. IF ls_firstcmon <= sys_startyearmon THEN
  61. init_mon = 0
  62. ELSE
  63. init_mon = ls_firstcmon
  64. END IF
  65. dw_1.Retrieve(sys_accsetid,ll_assetcardid,ls_firstcmon,ls_lastmon)
  66. dw_1.SetRedraw(FALSE)
  67. dw_1.Object.Month.Text = "期间: "+String(ls_firstcmon)+" 至 "+String(ls_lastmon)
  68. dw_1.Object.subname.Text = "固定资产: " + ls_text
  69. dw_1.SetRedraw(TRUE)
  70. end event
  71. on w_rp_assetdepr_mx.create
  72. int iCurrent
  73. call super::create
  74. this.ddlb_1=create ddlb_1
  75. this.ddlb_2=create ddlb_2
  76. this.cb_3=create cb_3
  77. this.cb_4=create cb_4
  78. this.cb_5=create cb_5
  79. this.dw_2=create dw_2
  80. this.cbx_2=create cbx_2
  81. this.st_6=create st_6
  82. this.st_5=create st_5
  83. this.cbx_1=create cbx_1
  84. this.st_1=create st_1
  85. iCurrent=UpperBound(this.Control)
  86. this.Control[iCurrent+1]=this.ddlb_1
  87. this.Control[iCurrent+2]=this.ddlb_2
  88. this.Control[iCurrent+3]=this.cb_3
  89. this.Control[iCurrent+4]=this.cb_4
  90. this.Control[iCurrent+5]=this.cb_5
  91. this.Control[iCurrent+6]=this.dw_2
  92. this.Control[iCurrent+7]=this.cbx_2
  93. this.Control[iCurrent+8]=this.st_6
  94. this.Control[iCurrent+9]=this.st_5
  95. this.Control[iCurrent+10]=this.cbx_1
  96. this.Control[iCurrent+11]=this.st_1
  97. end on
  98. on w_rp_assetdepr_mx.destroy
  99. call super::destroy
  100. destroy(this.ddlb_1)
  101. destroy(this.ddlb_2)
  102. destroy(this.cb_3)
  103. destroy(this.cb_4)
  104. destroy(this.cb_5)
  105. destroy(this.dw_2)
  106. destroy(this.cbx_2)
  107. destroy(this.st_6)
  108. destroy(this.st_5)
  109. destroy(this.cbx_1)
  110. destroy(this.st_1)
  111. end on
  112. event open;THIS.TriggerEvent('ue_before_open')
  113. wf_movetocenter()
  114. dw_2.SetTransObject (sqlca)
  115. dw_1.SetTransObject (sqlca)
  116. dw_1.titleclick_sort_use = FALSE
  117. IF Trim(dw_1.DataObject) <> '' THEN
  118. dw_1.Object.DataWindow.Print.MARGIN.Top = Integer(ProfileString(sys_inifilename,dw_1.DataObject, "MARGIN_TOP", "110"))
  119. dw_1.Object.DataWindow.Print.MARGIN.Left = Integer(ProfileString(sys_inifilename,dw_1.DataObject, "MARGIN_LEFT", "96" ))
  120. dw_1.Object.DataWindow.Print.MARGIN.bottom = Integer(ProfileString(sys_inifilename,dw_1.DataObject, "MARGIN_BOTTOM", "110"))
  121. dw_1.Object.DataWindow.Print.MARGIN.Right = Integer(ProfileString(sys_inifilename,dw_1.DataObject, "MARGIN_RIGHT", "96" ))
  122. END IF
  123. cb_1.TriggerEvent(Clicked!)
  124. end event
  125. event resize;call super::resize;dw_2.Height=dw_1.height
  126. end event
  127. event ue_before_open;call super::ue_before_open;if_ue_sentdataout = TRUE
  128. end event
  129. type cb_func from w_publ_easyq`cb_func within w_rp_assetdepr_mx
  130. end type
  131. type cb_exit from w_publ_easyq`cb_exit within w_rp_assetdepr_mx
  132. integer x = 1691
  133. end type
  134. type cb_2 from w_publ_easyq`cb_2 within w_rp_assetdepr_mx
  135. integer x = 1426
  136. integer width = 265
  137. integer taborder = 140
  138. boolean bringtotop = true
  139. string text = "选择打印"
  140. end type
  141. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_assetdepr_mx
  142. integer x = 1006
  143. integer taborder = 110
  144. boolean bringtotop = true
  145. end type
  146. type cb_1 from w_publ_easyq`cb_1 within w_rp_assetdepr_mx
  147. boolean bringtotop = true
  148. end type
  149. event cb_1::clicked;call super::clicked;Int li_clearflag
  150. IF cbx_1.Checked THEN
  151. li_clearflag = -1
  152. ELSE
  153. li_clearflag = 0
  154. END IF
  155. dw_2.Retrieve(sys_accsetid,li_clearflag)
  156. PARENT.TriggerEvent('retr_mx')
  157. end event
  158. type st_3 from w_publ_easyq`st_3 within w_rp_assetdepr_mx
  159. integer x = 9
  160. integer width = 288
  161. string text = "会计年度:"
  162. alignment alignment = center!
  163. end type
  164. type st_4 from w_publ_easyq`st_4 within w_rp_assetdepr_mx
  165. integer x = 1015
  166. integer width = 78
  167. string text = "至"
  168. end type
  169. type em_1 from w_publ_easyq`em_1 within w_rp_assetdepr_mx
  170. integer x = 288
  171. integer width = 219
  172. integer taborder = 150
  173. string mask = "yyyy"
  174. end type
  175. event em_1::constructor;THIS.Text = Left(String(sys_curyearmon),4)
  176. end event
  177. type em_2 from w_publ_easyq`em_2 within w_rp_assetdepr_mx
  178. integer x = 1801
  179. integer y = 548
  180. integer taborder = 160
  181. end type
  182. type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_assetdepr_mx
  183. integer x = 2066
  184. integer y = 48
  185. integer taborder = 90
  186. end type
  187. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_assetdepr_mx
  188. integer x = 1856
  189. integer y = 56
  190. integer height = 56
  191. integer taborder = 100
  192. long backcolor = 67108864
  193. end type
  194. type dw_1 from w_publ_easyq`dw_1 within w_rp_assetdepr_mx
  195. integer x = 1385
  196. integer y = 300
  197. integer width = 2039
  198. string dataobject = "dw_rp_assetdepr_mx"
  199. end type
  200. type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_assetdepr_mx
  201. end type
  202. type sle_cust from w_publ_easyq`sle_cust within w_rp_assetdepr_mx
  203. end type
  204. type st_mtrl from w_publ_easyq`st_mtrl within w_rp_assetdepr_mx
  205. end type
  206. type st_cust from w_publ_easyq`st_cust within w_rp_assetdepr_mx
  207. end type
  208. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_assetdepr_mx
  209. end type
  210. type pb_em1 from w_publ_easyq`pb_em1 within w_rp_assetdepr_mx
  211. integer x = 425
  212. integer y = 756
  213. end type
  214. type pb_em2 from w_publ_easyq`pb_em2 within w_rp_assetdepr_mx
  215. integer x = 1038
  216. integer y = 756
  217. end type
  218. type pb_2 from w_publ_easyq`pb_2 within w_rp_assetdepr_mx
  219. integer x = 1147
  220. integer y = 756
  221. end type
  222. type cb_help from w_publ_easyq`cb_help within w_rp_assetdepr_mx
  223. integer x = 553
  224. integer y = 568
  225. end type
  226. type cb_copyself from w_publ_easyq`cb_copyself within w_rp_assetdepr_mx
  227. end type
  228. type gb_1 from w_publ_easyq`gb_1 within w_rp_assetdepr_mx
  229. end type
  230. type ln_bar from w_publ_easyq`ln_bar within w_rp_assetdepr_mx
  231. end type
  232. type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_assetdepr_mx
  233. end type
  234. type r_bar from w_publ_easyq`r_bar within w_rp_assetdepr_mx
  235. end type
  236. type ln_1 from w_publ_easyq`ln_1 within w_rp_assetdepr_mx
  237. end type
  238. type ln_2 from w_publ_easyq`ln_2 within w_rp_assetdepr_mx
  239. end type
  240. type ln_3 from w_publ_easyq`ln_3 within w_rp_assetdepr_mx
  241. boolean visible = false
  242. end type
  243. type ln_4 from w_publ_easyq`ln_4 within w_rp_assetdepr_mx
  244. boolean visible = false
  245. end type
  246. type ddlb_1 from dropdownlistbox within w_rp_assetdepr_mx
  247. integer x = 782
  248. integer y = 200
  249. integer width = 229
  250. integer height = 908
  251. integer taborder = 170
  252. boolean bringtotop = true
  253. integer textsize = -9
  254. integer weight = 400
  255. fontcharset fontcharset = gb2312charset!
  256. fontpitch fontpitch = variable!
  257. string facename = "宋体"
  258. long textcolor = 33554432
  259. boolean sorted = false
  260. boolean vscrollbar = true
  261. string item[] = {"1","2","3","4","5","6","7","8","9","10","11","12"}
  262. borderstyle borderstyle = stylelowered!
  263. end type
  264. event constructor;this.text=string(s_sys_accset.currmon)
  265. end event
  266. type ddlb_2 from dropdownlistbox within w_rp_assetdepr_mx
  267. integer x = 1129
  268. integer y = 200
  269. integer width = 229
  270. integer height = 908
  271. integer taborder = 180
  272. boolean bringtotop = true
  273. integer textsize = -9
  274. integer weight = 400
  275. fontcharset fontcharset = gb2312charset!
  276. fontpitch fontpitch = variable!
  277. string facename = "宋体"
  278. long textcolor = 33554432
  279. boolean sorted = false
  280. boolean vscrollbar = true
  281. string item[] = {"1","2","3","4","5","6","7","8","9","10","11","12"}
  282. borderstyle borderstyle = stylelowered!
  283. end type
  284. event constructor;this.text=string(s_sys_accset.currmon)
  285. end event
  286. event selectionchanged;if long(ddlb_2.text)<long(ddlb_1.text) then
  287. ddlb_1.text=ddlb_2.text
  288. end if
  289. end event
  290. type cb_3 from uo_imflatbutton within w_rp_assetdepr_mx
  291. integer x = 558
  292. integer width = 224
  293. integer height = 164
  294. integer taborder = 60
  295. boolean bringtotop = true
  296. string text = "上一个"
  297. string normalpicname = "p5.bmp"
  298. integer picsize = 16
  299. toolbaralignment pic_align = alignattop!
  300. boolean border = false
  301. end type
  302. event clicked;dw_2.ScrollPriorRow()
  303. end event
  304. type cb_4 from uo_imflatbutton within w_rp_assetdepr_mx
  305. integer x = 782
  306. integer width = 224
  307. integer height = 164
  308. integer taborder = 70
  309. boolean bringtotop = true
  310. string text = "下一个"
  311. string normalpicname = "p6.bmp"
  312. integer picsize = 16
  313. toolbaralignment pic_align = alignattop!
  314. boolean border = false
  315. end type
  316. event clicked;dw_2.ScrollNextRow()
  317. end event
  318. type cb_5 from uo_imflatbutton within w_rp_assetdepr_mx
  319. integer x = 1262
  320. integer width = 165
  321. integer height = 164
  322. integer taborder = 120
  323. boolean bringtotop = true
  324. string text = "打印"
  325. string normalpicname = "print.bmp"
  326. integer picsize = 16
  327. toolbaralignment pic_align = alignattop!
  328. boolean border = false
  329. end type
  330. event clicked;dw_1.Object.datawindow.Print.page.range = ''
  331. dw_1.Object.datawindow.Print.copies = 1
  332. Long i
  333. Boolean printflag = FALSE
  334. FOR i = 1 TO dw_2.RowCount()
  335. IF dw_2.Object.cw_assetcard_selectflag[i] = 1 THEN
  336. dw_2.ScrollToRow(i)
  337. printflag = TRUE
  338. dw_1.Print()
  339. END IF
  340. NEXT
  341. IF printflag = FALSE THEN
  342. MessageBox('系统提示','没有可打印的产品,请选择产品!')
  343. RETURN
  344. END IF
  345. end event
  346. type dw_2 from u_dw_rbtnfilter within w_rp_assetdepr_mx
  347. integer y = 300
  348. integer width = 1385
  349. integer height = 928
  350. integer taborder = 30
  351. boolean bringtotop = true
  352. string dataobject = "w_rp_assetdepr_index"
  353. boolean hscrollbar = true
  354. boolean vscrollbar = true
  355. end type
  356. event rowfocuschanged;IF currentrow > 0 THEN
  357. THIS.SelectRow(0,FALSE)
  358. THIS.SelectRow(currentrow,TRUE)
  359. END IF
  360. PARENT.TriggerEvent('retr_mx')
  361. end event
  362. event constructor;call super::constructor; titleclick_sort_use=true //单击标题排序功能开关
  363. rbutton_filter_use=true //右键查询功能开关
  364. end event
  365. type cbx_2 from checkbox within w_rp_assetdepr_mx
  366. integer x = 1902
  367. integer y = 212
  368. integer width = 320
  369. integer height = 56
  370. integer textsize = -9
  371. integer weight = 400
  372. fontcharset fontcharset = gb2312charset!
  373. fontpitch fontpitch = variable!
  374. string facename = "宋体"
  375. long textcolor = 33554432
  376. long backcolor = 67108864
  377. string text = "全选打印"
  378. end type
  379. event clicked;Long i
  380. Int k = 0
  381. IF THIS.Checked THEN k = 1
  382. FOR i = 1 TO dw_2.RowCount()
  383. dw_2.Object.cw_assetcard_selectflag[i] = k
  384. NEXT
  385. end event
  386. type st_6 from statictext within w_rp_assetdepr_mx
  387. integer x = 2222
  388. integer y = 208
  389. integer width = 462
  390. integer height = 64
  391. integer textsize = -9
  392. integer weight = 700
  393. fontcharset fontcharset = gb2312charset!
  394. fontpitch fontpitch = variable!
  395. string facename = "宋体"
  396. long textcolor = 33554432
  397. long backcolor = 16776960
  398. boolean enabled = false
  399. boolean border = true
  400. boolean focusrectangle = false
  401. end type
  402. type st_5 from statictext within w_rp_assetdepr_mx
  403. integer x = 1888
  404. integer y = 200
  405. integer width = 818
  406. integer height = 80
  407. integer textsize = -9
  408. integer weight = 700
  409. fontcharset fontcharset = gb2312charset!
  410. fontpitch fontpitch = variable!
  411. string facename = "宋体"
  412. long textcolor = 33554432
  413. long backcolor = 80269524
  414. boolean enabled = false
  415. boolean border = true
  416. boolean focusrectangle = false
  417. end type
  418. type cbx_1 from checkbox within w_rp_assetdepr_mx
  419. integer x = 1394
  420. integer y = 212
  421. integer width = 466
  422. integer height = 60
  423. boolean bringtotop = true
  424. integer textsize = -9
  425. integer weight = 400
  426. fontcharset fontcharset = gb2312charset!
  427. fontpitch fontpitch = variable!
  428. string facename = "宋体"
  429. long textcolor = 33554432
  430. long backcolor = 67108864
  431. string text = "显示已清理资产"
  432. end type
  433. event clicked;cb_1.triggerevent(clicked!)
  434. end event
  435. type st_1 from statictext within w_rp_assetdepr_mx
  436. integer x = 512
  437. integer y = 216
  438. integer width = 288
  439. integer height = 48
  440. integer textsize = -9
  441. integer weight = 400
  442. fontcharset fontcharset = gb2312charset!
  443. fontpitch fontpitch = variable!
  444. string facename = "宋体"
  445. long textcolor = 33554432
  446. long backcolor = 67108864
  447. string text = "会计期间:"
  448. alignment alignment = center!
  449. boolean focusrectangle = false
  450. end type