w_rp_mx.srw 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674
  1. $PBExportHeader$w_rp_mx.srw
  2. forward
  3. global type w_rp_mx from w_publ_easyq
  4. end type
  5. type st_2 from statictext within w_rp_mx
  6. end type
  7. type ddlb_1 from dropdownlistbox within w_rp_mx
  8. end type
  9. type dw_2 from u_dw_rbtnfilter within w_rp_mx
  10. end type
  11. type cbx_1 from checkbox within w_rp_mx
  12. end type
  13. type cb_3 from uo_imflatbutton within w_rp_mx
  14. end type
  15. type cb_4 from uo_imflatbutton within w_rp_mx
  16. end type
  17. type cb_5 from uo_imflatbutton within w_rp_mx
  18. end type
  19. type st_5 from statictext within w_rp_mx
  20. end type
  21. type em_month from editmask within w_rp_mx
  22. end type
  23. type st_6 from statictext within w_rp_mx
  24. end type
  25. type ddlb_2 from dropdownlistbox within w_rp_mx
  26. end type
  27. type ddlb_3 from dropdownlistbox within w_rp_mx
  28. end type
  29. type cbx_ifpost from checkbox within w_rp_mx
  30. end type
  31. type st_1 from statictext within w_rp_mx
  32. end type
  33. end forward
  34. global type w_rp_mx from w_publ_easyq
  35. string title = "科目明细表"
  36. long backcolor = 80269524
  37. boolean if_ue_sentdataout = true
  38. st_2 st_2
  39. ddlb_1 ddlb_1
  40. dw_2 dw_2
  41. cbx_1 cbx_1
  42. cb_3 cb_3
  43. cb_4 cb_4
  44. cb_5 cb_5
  45. st_5 st_5
  46. em_month em_month
  47. st_6 st_6
  48. ddlb_2 ddlb_2
  49. ddlb_3 ddlb_3
  50. cbx_ifpost cbx_ifpost
  51. st_1 st_1
  52. end type
  53. global w_rp_mx w_rp_mx
  54. type variables
  55. s_rp_type s_rp_type_hz
  56. boolean is_display=false
  57. end variables
  58. forward prototypes
  59. public function integer wf_dw ()
  60. end prototypes
  61. public function integer wf_dw ();if ddlb_1.text = '金额式' then
  62. if ddlb_2.text = '月统计' then
  63. dw_1.dataobject='dw_rp_mx'
  64. else
  65. dw_1.dataobject='dw_rp_mx_year'
  66. end if
  67. else
  68. if ddlb_2.text = '月统计' then
  69. dw_1.dataobject='dw_rp_mx_wb'
  70. else
  71. dw_1.dataobject='dw_rp_mx_wb_year'
  72. end if
  73. end if
  74. dw_1.settransobject(sqlca)
  75. return 1
  76. end function
  77. on w_rp_mx.create
  78. int iCurrent
  79. call super::create
  80. this.st_2=create st_2
  81. this.ddlb_1=create ddlb_1
  82. this.dw_2=create dw_2
  83. this.cbx_1=create cbx_1
  84. this.cb_3=create cb_3
  85. this.cb_4=create cb_4
  86. this.cb_5=create cb_5
  87. this.st_5=create st_5
  88. this.em_month=create em_month
  89. this.st_6=create st_6
  90. this.ddlb_2=create ddlb_2
  91. this.ddlb_3=create ddlb_3
  92. this.cbx_ifpost=create cbx_ifpost
  93. this.st_1=create st_1
  94. iCurrent=UpperBound(this.Control)
  95. this.Control[iCurrent+1]=this.st_2
  96. this.Control[iCurrent+2]=this.ddlb_1
  97. this.Control[iCurrent+3]=this.dw_2
  98. this.Control[iCurrent+4]=this.cbx_1
  99. this.Control[iCurrent+5]=this.cb_3
  100. this.Control[iCurrent+6]=this.cb_4
  101. this.Control[iCurrent+7]=this.cb_5
  102. this.Control[iCurrent+8]=this.st_5
  103. this.Control[iCurrent+9]=this.em_month
  104. this.Control[iCurrent+10]=this.st_6
  105. this.Control[iCurrent+11]=this.ddlb_2
  106. this.Control[iCurrent+12]=this.ddlb_3
  107. this.Control[iCurrent+13]=this.cbx_ifpost
  108. this.Control[iCurrent+14]=this.st_1
  109. end on
  110. on w_rp_mx.destroy
  111. call super::destroy
  112. destroy(this.st_2)
  113. destroy(this.ddlb_1)
  114. destroy(this.dw_2)
  115. destroy(this.cbx_1)
  116. destroy(this.cb_3)
  117. destroy(this.cb_4)
  118. destroy(this.cb_5)
  119. destroy(this.st_5)
  120. destroy(this.em_month)
  121. destroy(this.st_6)
  122. destroy(this.ddlb_2)
  123. destroy(this.ddlb_3)
  124. destroy(this.cbx_ifpost)
  125. destroy(this.st_1)
  126. end on
  127. event open;this.triggerevent('ue_before_open')
  128. wf_movetocenter()
  129. dw_2.SetTransObject (sqlca)
  130. dw_1.SetTransObject (sqlca)
  131. dw_1.titleclick_sort_use=false
  132. IF TRIM(DW_1.DATAOBJECT)<>'' THEN
  133. DW_1.OBJECT.DataWindow.PRINT.MARGIN.TOP=INTEGER(ProfileString(sys_inifilename,DW_1.DATAOBJECT, "MARGIN_TOP", "110"))
  134. DW_1.OBJECT.DataWindow.PRINT.MARGIN.LEFT=INTEGER(ProfileString(sys_inifilename,DW_1.DATAOBJECT, "MARGIN_LEFT", "96" ))
  135. DW_1.OBJECT.DataWindow.PRINT.MARGIN.bottom=INTEGER(ProfileString(sys_inifilename,DW_1.DATAOBJECT, "MARGIN_BOTTOM", "110"))
  136. DW_1.OBJECT.DataWindow.PRINT.MARGIN.right=INTEGER(ProfileString(sys_inifilename,DW_1.DATAOBJECT, "MARGIN_RIGHT", "96" ))
  137. end if
  138. dw_2.retrieve(sys_accsetid)
  139. cb_1.triggerevent(clicked!)
  140. end event
  141. event resize;call super::resize;dw_2.Height = dw_1.Height
  142. end event
  143. event ue_before_open;call super::ue_before_open;if_ue_sort = TRUE
  144. if_ue_sentdataout = TRUE
  145. end event
  146. type cb_func from w_publ_easyq`cb_func within w_rp_mx
  147. end type
  148. type cb_exit from w_publ_easyq`cb_exit within w_rp_mx
  149. integer x = 1701
  150. integer taborder = 50
  151. end type
  152. type cb_2 from w_publ_easyq`cb_2 within w_rp_mx
  153. integer x = 1426
  154. integer width = 274
  155. integer taborder = 170
  156. boolean bringtotop = true
  157. string text = "选择打印"
  158. end type
  159. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_mx
  160. integer x = 1006
  161. integer taborder = 150
  162. boolean bringtotop = true
  163. end type
  164. type cb_1 from w_publ_easyq`cb_1 within w_rp_mx
  165. integer taborder = 60
  166. boolean bringtotop = true
  167. end type
  168. event cb_1::clicked;long ls_month
  169. string ls_subid,ls_subname
  170. int li_ifpost
  171. if dw_2.getrow()<=0 then return
  172. if cbx_ifpost.checked then
  173. li_ifpost = 1
  174. else
  175. li_ifpost = 0
  176. end if
  177. ls_subid = dw_2.object.subid[dw_2.getrow()]
  178. ls_subname=dw_2.object.name[dw_2.getrow()]
  179. ls_subid = ls_subid + '%'
  180. ls_month = long(em_month.text)
  181. dw_1.retrieve(sys_accsetid,sys_subaccsetid,ls_subid,ls_month,li_ifpost)
  182. if ddlb_2.text = '月统计' then
  183. dw_1.object.title.text=ls_subname+' '+em_month.text+'月明细表'
  184. else
  185. dw_1.object.title.text=ls_subname+' '+em_month.text+'月统计表'
  186. end if
  187. end event
  188. type st_3 from w_publ_easyq`st_3 within w_rp_mx
  189. integer x = 261
  190. integer y = 488
  191. integer width = 448
  192. integer weight = 700
  193. long backcolor = 16776960
  194. string text = "会计年度:2002"
  195. alignment alignment = left!
  196. boolean border = true
  197. end type
  198. type st_4 from w_publ_easyq`st_4 within w_rp_mx
  199. integer x = 2423
  200. integer y = 204
  201. integer width = 462
  202. integer height = 64
  203. integer weight = 700
  204. long backcolor = 16776960
  205. string text = ""
  206. alignment alignment = left!
  207. boolean border = true
  208. end type
  209. type em_1 from w_publ_easyq`em_1 within w_rp_mx
  210. integer x = 142
  211. integer y = 576
  212. integer taborder = 180
  213. end type
  214. type em_2 from w_publ_easyq`em_2 within w_rp_mx
  215. integer x = 521
  216. integer y = 576
  217. integer taborder = 190
  218. end type
  219. type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_mx
  220. integer x = 2071
  221. integer y = 52
  222. integer taborder = 100
  223. end type
  224. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_mx
  225. integer x = 1865
  226. integer y = 52
  227. integer taborder = 130
  228. long backcolor = 67108864
  229. end type
  230. type dw_1 from w_publ_easyq`dw_1 within w_rp_mx
  231. integer x = 1381
  232. integer y = 300
  233. integer width = 1943
  234. integer height = 1100
  235. string dataobject = "dw_rp_mx"
  236. end type
  237. type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_mx
  238. integer x = 1778
  239. integer y = 932
  240. end type
  241. type sle_cust from w_publ_easyq`sle_cust within w_rp_mx
  242. integer x = 617
  243. integer y = 932
  244. end type
  245. type st_mtrl from w_publ_easyq`st_mtrl within w_rp_mx
  246. integer x = 1321
  247. integer y = 948
  248. end type
  249. type st_cust from w_publ_easyq`st_cust within w_rp_mx
  250. integer x = 155
  251. integer y = 948
  252. end type
  253. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_mx
  254. integer x = 2409
  255. integer y = 768
  256. end type
  257. type pb_em1 from w_publ_easyq`pb_em1 within w_rp_mx
  258. boolean visible = false
  259. integer y = 400
  260. end type
  261. type pb_em2 from w_publ_easyq`pb_em2 within w_rp_mx
  262. boolean visible = false
  263. integer y = 400
  264. end type
  265. type pb_2 from w_publ_easyq`pb_2 within w_rp_mx
  266. boolean visible = false
  267. integer x = 1691
  268. integer y = 444
  269. end type
  270. type cb_help from w_publ_easyq`cb_help within w_rp_mx
  271. boolean visible = false
  272. integer x = 1925
  273. integer y = 612
  274. end type
  275. type cb_copyself from w_publ_easyq`cb_copyself within w_rp_mx
  276. integer x = 750
  277. end type
  278. type gb_1 from w_publ_easyq`gb_1 within w_rp_mx
  279. end type
  280. type ln_bar from w_publ_easyq`ln_bar within w_rp_mx
  281. end type
  282. type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_mx
  283. end type
  284. type r_bar from w_publ_easyq`r_bar within w_rp_mx
  285. end type
  286. type ln_1 from w_publ_easyq`ln_1 within w_rp_mx
  287. end type
  288. type ln_2 from w_publ_easyq`ln_2 within w_rp_mx
  289. end type
  290. type ln_3 from w_publ_easyq`ln_3 within w_rp_mx
  291. boolean visible = false
  292. end type
  293. type ln_4 from w_publ_easyq`ln_4 within w_rp_mx
  294. boolean visible = false
  295. end type
  296. type st_2 from statictext within w_rp_mx
  297. integer x = 14
  298. integer y = 212
  299. integer width = 178
  300. integer height = 52
  301. boolean bringtotop = true
  302. integer textsize = -9
  303. integer weight = 400
  304. fontcharset fontcharset = gb2312charset!
  305. fontpitch fontpitch = variable!
  306. string facename = "宋体"
  307. long textcolor = 33554432
  308. long backcolor = 67108864
  309. boolean enabled = false
  310. string text = "格式:"
  311. boolean focusrectangle = false
  312. end type
  313. type ddlb_1 from dropdownlistbox within w_rp_mx
  314. integer x = 201
  315. integer y = 200
  316. integer width = 416
  317. integer height = 268
  318. integer taborder = 20
  319. boolean bringtotop = true
  320. integer textsize = -9
  321. integer weight = 400
  322. fontcharset fontcharset = gb2312charset!
  323. fontpitch fontpitch = variable!
  324. string facename = "宋体"
  325. long textcolor = 33554432
  326. string text = "金额式"
  327. boolean sorted = false
  328. boolean vscrollbar = true
  329. string item[] = {"金额式","外币金额式"}
  330. borderstyle borderstyle = stylelowered!
  331. end type
  332. event selectionchanged;wf_dw()
  333. end event
  334. type dw_2 from u_dw_rbtnfilter within w_rp_mx
  335. integer x = 5
  336. integer y = 300
  337. integer width = 1376
  338. integer height = 844
  339. integer taborder = 40
  340. boolean bringtotop = true
  341. string dataobject = "dw_rp_mx_subidlist"
  342. boolean hscrollbar = true
  343. boolean vscrollbar = true
  344. end type
  345. event rowfocuschanged;if currentrow<=0 then return
  346. this.selectrow(0,false)
  347. this.selectrow(currentrow,true)
  348. string ls_subid,moneyname
  349. long ls_moneyid=0
  350. ls_subid=this.object.subid[currentrow]
  351. select moneyid into :ls_moneyid from cw_subject
  352. where cw_subject.subid=:ls_subid
  353. and cw_subject.accsetid=:sys_accsetid;
  354. if sqlca.sqlcode<>0 then
  355. ls_moneyid=0
  356. end if
  357. if ls_moneyid=0 then
  358. select name into :moneyname from cw_currency
  359. where cw_currency.accsetid =:sys_accsetid
  360. and cw_currency.native=1;
  361. else
  362. select name into :moneyname from cw_currency
  363. where cw_currency.accsetid =:sys_accsetid
  364. and cw_currency.native=0
  365. and cw_currency.moneyid=:ls_moneyid;
  366. end if
  367. st_4.text='币种:'+moneyname
  368. cb_1.triggerevent(clicked!)
  369. end event
  370. type cbx_1 from checkbox within w_rp_mx
  371. integer x = 2094
  372. integer y = 204
  373. integer width = 320
  374. integer height = 64
  375. boolean bringtotop = true
  376. integer textsize = -9
  377. integer weight = 400
  378. fontcharset fontcharset = gb2312charset!
  379. fontpitch fontpitch = variable!
  380. string facename = "宋体"
  381. long textcolor = 33554432
  382. long backcolor = 67108864
  383. string text = "全选打印"
  384. end type
  385. event clicked;long i
  386. int k=0
  387. if this.checked then k=1
  388. for i= 1 to dw_2.rowcount()
  389. dw_2.object.selectflag[i]=k
  390. next
  391. end event
  392. type cb_3 from uo_imflatbutton within w_rp_mx
  393. integer x = 1262
  394. integer width = 165
  395. integer height = 164
  396. integer taborder = 140
  397. boolean bringtotop = true
  398. string text = "打印"
  399. string normalpicname = "print.bmp"
  400. integer picsize = 16
  401. toolbaralignment pic_align = alignattop!
  402. boolean border = false
  403. end type
  404. event clicked;IF NOT f_power_ind(153,sys_msg_pow) THEN
  405. MessageBox(publ_operator,'你没有使用权限!')
  406. RETURN
  407. END IF
  408. dw_1.Object.datawindow.Print.page.range = ''
  409. dw_1.Object.datawindow.Print.copies = 1
  410. Long i
  411. Boolean printflag = FALSE
  412. FOR i = 1 TO dw_2.RowCount()
  413. IF dw_2.Object.selectflag[i] = 1 THEN
  414. dw_2.ScrollToRow(i)
  415. printflag = TRUE
  416. dw_1.Print()
  417. END IF
  418. NEXT
  419. IF printflag = FALSE THEN
  420. MessageBox('系统提示','没有可打印的产品,请选择产品!')
  421. RETURN
  422. END IF
  423. end event
  424. type cb_4 from uo_imflatbutton within w_rp_mx
  425. integer x = 302
  426. integer width = 224
  427. integer height = 164
  428. integer taborder = 80
  429. boolean bringtotop = true
  430. string text = "上一个"
  431. string normalpicname = "p5.bmp"
  432. integer picsize = 16
  433. toolbaralignment pic_align = alignattop!
  434. boolean border = false
  435. end type
  436. event clicked;dw_2.ScrollPriorRow()
  437. end event
  438. type cb_5 from uo_imflatbutton within w_rp_mx
  439. integer x = 526
  440. integer width = 224
  441. integer height = 164
  442. integer taborder = 120
  443. boolean bringtotop = true
  444. string text = "下一个"
  445. string normalpicname = "p6.bmp"
  446. integer picsize = 16
  447. toolbaralignment pic_align = alignattop!
  448. boolean border = false
  449. end type
  450. event clicked;dw_2.ScrollNextRow()
  451. end event
  452. type st_5 from statictext within w_rp_mx
  453. integer x = 1216
  454. integer y = 212
  455. integer width = 178
  456. integer height = 52
  457. boolean bringtotop = true
  458. integer textsize = -9
  459. integer weight = 400
  460. fontcharset fontcharset = gb2312charset!
  461. fontpitch fontpitch = variable!
  462. string facename = "宋体"
  463. long textcolor = 33554432
  464. long backcolor = 67108864
  465. boolean enabled = false
  466. string text = "月份:"
  467. boolean focusrectangle = false
  468. end type
  469. type em_month from editmask within w_rp_mx
  470. integer x = 1413
  471. integer y = 200
  472. integer width = 288
  473. integer height = 84
  474. integer taborder = 30
  475. boolean bringtotop = true
  476. integer textsize = -9
  477. integer weight = 400
  478. fontcharset fontcharset = gb2312charset!
  479. fontpitch fontpitch = variable!
  480. string facename = "宋体"
  481. long textcolor = 33554432
  482. alignment alignment = center!
  483. borderstyle borderstyle = stylelowered!
  484. maskdatatype maskdatatype = datemask!
  485. string mask = "yyyymm"
  486. boolean spin = true
  487. end type
  488. event constructor;this.text = string(sys_curyearmon)
  489. end event
  490. type st_6 from statictext within w_rp_mx
  491. integer x = 626
  492. integer y = 212
  493. integer width = 178
  494. integer height = 52
  495. boolean bringtotop = true
  496. integer textsize = -9
  497. integer weight = 400
  498. fontcharset fontcharset = gb2312charset!
  499. fontpitch fontpitch = variable!
  500. string facename = "宋体"
  501. long textcolor = 33554432
  502. long backcolor = 67108864
  503. boolean enabled = false
  504. string text = "类型:"
  505. boolean focusrectangle = false
  506. end type
  507. type ddlb_2 from dropdownlistbox within w_rp_mx
  508. integer x = 791
  509. integer y = 200
  510. integer width = 416
  511. integer height = 268
  512. integer taborder = 110
  513. boolean bringtotop = true
  514. integer textsize = -9
  515. integer weight = 400
  516. fontcharset fontcharset = gb2312charset!
  517. fontpitch fontpitch = variable!
  518. string facename = "宋体"
  519. long textcolor = 33554432
  520. string text = "月统计"
  521. boolean sorted = false
  522. boolean vscrollbar = true
  523. string item[] = {"月统计","年统计"}
  524. borderstyle borderstyle = stylelowered!
  525. end type
  526. event selectionchanged;wf_dw()
  527. end event
  528. type ddlb_3 from dropdownlistbox within w_rp_mx
  529. integer x = 1710
  530. integer y = 200
  531. integer width = 347
  532. integer height = 228
  533. integer taborder = 40
  534. boolean bringtotop = true
  535. integer textsize = -9
  536. integer weight = 400
  537. fontcharset fontcharset = gb2312charset!
  538. fontpitch fontpitch = variable!
  539. string facename = "宋体"
  540. long textcolor = 33554432
  541. string text = "格式一"
  542. boolean sorted = false
  543. boolean vscrollbar = true
  544. string item[] = {"格式一","格式二"}
  545. borderstyle borderstyle = stylelowered!
  546. end type
  547. type cbx_ifpost from checkbox within w_rp_mx
  548. integer x = 2359
  549. integer y = 52
  550. integer width = 466
  551. integer height = 76
  552. boolean bringtotop = true
  553. integer textsize = -9
  554. integer weight = 400
  555. fontcharset fontcharset = gb2312charset!
  556. fontpitch fontpitch = variable!
  557. string facename = "宋体"
  558. long textcolor = 33554432
  559. long backcolor = 67108864
  560. string text = "包括未登帐凭证"
  561. end type
  562. type st_1 from statictext within w_rp_mx
  563. integer x = 2071
  564. integer y = 188
  565. integer width = 837
  566. integer height = 96
  567. integer textsize = -9
  568. integer weight = 400
  569. fontcharset fontcharset = gb2312charset!
  570. fontpitch fontpitch = variable!
  571. string facename = "宋体"
  572. long textcolor = 33554432
  573. long backcolor = 67108864
  574. boolean border = true
  575. boolean focusrectangle = false
  576. end type