w_rp_taskdamt.srw 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368
  1. $PBExportHeader$w_rp_taskdamt.srw
  2. forward
  3. global type w_rp_taskdamt from w_publ_easyq
  4. end type
  5. type st_2 from statictext within w_rp_taskdamt
  6. end type
  7. type ddlb_scid from uo_ddlb_scid within w_rp_taskdamt
  8. end type
  9. type st_5 from statictext within w_rp_taskdamt
  10. end type
  11. type ddlb_status from dropdownlistbox within w_rp_taskdamt
  12. end type
  13. end forward
  14. global type w_rp_taskdamt from w_publ_easyq
  15. integer x = 9
  16. integer y = 12
  17. string title = "订单收款单统计表"
  18. st_2 st_2
  19. ddlb_scid ddlb_scid
  20. st_5 st_5
  21. ddlb_status ddlb_status
  22. end type
  23. global w_rp_taskdamt w_rp_taskdamt
  24. type variables
  25. Int cur_flag = -1
  26. Long cur_scid_arr[]
  27. long il_moneyid_native
  28. end variables
  29. forward prototypes
  30. public subroutine wf_retr_billdscrp ()
  31. end prototypes
  32. public subroutine wf_retr_billdscrp ();Long ll_i,ll_refrapid
  33. String ls_billdscrp,ls_billcode,ls_cusmoncode
  34. decimal ld_takeamt
  35. dw_1.AcceptText()
  36. Open(w_sys_wait_jdt) //初始化进度条
  37. w_sys_wait_jdt.Show()
  38. w_sys_wait_jdt.wf_accepttol(dw_1.RowCount())
  39. FOR ll_i = 1 TO dw_1.RowCount()
  40. ll_refrapid = dw_1.Object.u_cusamt_refrapid[ll_i]
  41. ls_cusmoncode = dw_1.Object.u_cusamt_cusmoncode[ll_i]
  42. w_sys_wait_jdt.wf_inc(ll_i)
  43. w_sys_wait_jdt.st_msg.Text = "正在统计:"+ls_cusmoncode+'...'
  44. DECLARE cur_billcode CURSOR FOR
  45. SELECT u_Bmsttakemx.Billcode,u_Bmsttakemx.takeamt
  46. FROM u_Bmsttakemx
  47. WHERE u_Bmsttakemx.takeid = :ll_refrapid
  48. AND u_Bmsttakemx.buildtype = 2;
  49. OPEN cur_billcode;
  50. FETCH cur_billcode INTO :ls_billcode,:ld_takeamt;
  51. DO WHILE sqlca.SQLCode = 0
  52. ls_billdscrp = ls_billdscrp + '单(' + ls_billcode + ','+string(0 - ld_takeamt,'#,#0.00')+'), '
  53. FETCH cur_billcode INTO :ls_billcode,:ld_takeamt;
  54. LOOP
  55. CLOSE cur_billcode;
  56. ls_billdscrp = Left(ls_billdscrp,Len(ls_billdscrp) - 1)
  57. dw_1.Object.billdscrp[ll_i] = ls_billdscrp
  58. ls_billdscrp = ''
  59. NEXT
  60. Close(w_sys_wait_jdt)
  61. end subroutine
  62. on w_rp_taskdamt.create
  63. int iCurrent
  64. call super::create
  65. this.st_2=create st_2
  66. this.ddlb_scid=create ddlb_scid
  67. this.st_5=create st_5
  68. this.ddlb_status=create ddlb_status
  69. iCurrent=UpperBound(this.Control)
  70. this.Control[iCurrent+1]=this.st_2
  71. this.Control[iCurrent+2]=this.ddlb_scid
  72. this.Control[iCurrent+3]=this.st_5
  73. this.Control[iCurrent+4]=this.ddlb_status
  74. end on
  75. on w_rp_taskdamt.destroy
  76. call super::destroy
  77. destroy(this.st_2)
  78. destroy(this.ddlb_scid)
  79. destroy(this.st_5)
  80. destroy(this.ddlb_status)
  81. end on
  82. event open;call super::open;EM_1.Text = String(Today(),'yyyy-mm')+'-01'
  83. EM_2.Text = String(Today(),'YYYY-MM-DD')
  84. SELECT moneyid INTO :il_moneyid_native
  85. FROM cw_currency
  86. Where native = 1;
  87. IF sqlca.SQLCode <> 0 THEN
  88. il_moneyid_native = 0
  89. MessageBox('提示','查询本位币资料失败,请检查币种资料')
  90. END IF
  91. IF cbx_loginretr.Checked THEN
  92. cb_1.TriggerEvent(Clicked!)
  93. END IF
  94. end event
  95. event ue_before_open;call super::ue_before_open;if_ue_retr = TRUE
  96. if_ue_filter = TRUE
  97. if_ue_sort = TRUE
  98. if_ue_sentdataout = TRUE
  99. end event
  100. type cb_func from w_publ_easyq`cb_func within w_rp_taskdamt
  101. end type
  102. type cb_exit from w_publ_easyq`cb_exit within w_rp_taskdamt
  103. end type
  104. type cb_2 from w_publ_easyq`cb_2 within w_rp_taskdamt
  105. boolean bringtotop = true
  106. end type
  107. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_taskdamt
  108. boolean bringtotop = true
  109. end type
  110. type cb_1 from w_publ_easyq`cb_1 within w_rp_taskdamt
  111. boolean bringtotop = true
  112. end type
  113. event cb_1::clicked;call super::clicked;DateTime firstdate,enddate
  114. firstdate = DateTime(Date(em_1.Text),Time(0))
  115. enddate = DateTime(Date(em_2.Text),Time('23:59:59'))
  116. dw_1.Retrieve(cur_scid_arr,cur_flag,firstdate,enddate,il_moneyid_native)
  117. end event
  118. type st_3 from w_publ_easyq`st_3 within w_rp_taskdamt
  119. integer x = 1307
  120. integer y = 204
  121. end type
  122. type st_4 from w_publ_easyq`st_4 within w_rp_taskdamt
  123. integer x = 2034
  124. integer y = 204
  125. end type
  126. type em_1 from w_publ_easyq`em_1 within w_rp_taskdamt
  127. integer x = 1509
  128. integer y = 188
  129. end type
  130. type em_2 from w_publ_easyq`em_2 within w_rp_taskdamt
  131. integer x = 2139
  132. integer y = 188
  133. end type
  134. type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_taskdamt
  135. end type
  136. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_taskdamt
  137. end type
  138. event cbx_yl::clicked;call super::clicked;IF THIS.Checked THEN
  139. dw_1.SelectRow(0,FALSE)
  140. END IF
  141. end event
  142. type dw_1 from w_publ_easyq`dw_1 within w_rp_taskdamt
  143. integer y = 300
  144. integer width = 2208
  145. string dataobject = "dw_rp_taskdamt_mx"
  146. end type
  147. event dw_1::doubleclicked;call super::doubleclicked;
  148. IF row > 0 THEN
  149. String ls_code
  150. Long ll_scid
  151. ll_scid = This.Object.u_taskdamt_scid[row]
  152. ls_code = This.Object.u_taskdamt_billcode[row]
  153. f_open_win(ll_scid,ls_code)
  154. END IF
  155. end event
  156. type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_taskdamt
  157. integer y = 492
  158. end type
  159. type sle_cust from w_publ_easyq`sle_cust within w_rp_taskdamt
  160. integer y = 492
  161. end type
  162. type st_mtrl from w_publ_easyq`st_mtrl within w_rp_taskdamt
  163. integer y = 508
  164. end type
  165. type st_cust from w_publ_easyq`st_cust within w_rp_taskdamt
  166. integer y = 508
  167. end type
  168. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_taskdamt
  169. boolean visible = true
  170. end type
  171. type pb_em1 from w_publ_easyq`pb_em1 within w_rp_taskdamt
  172. integer x = 1915
  173. integer y = 188
  174. end type
  175. type pb_em2 from w_publ_easyq`pb_em2 within w_rp_taskdamt
  176. integer x = 2555
  177. integer y = 188
  178. end type
  179. type pb_2 from w_publ_easyq`pb_2 within w_rp_taskdamt
  180. integer x = 2665
  181. integer y = 188
  182. end type
  183. type cb_help from w_publ_easyq`cb_help within w_rp_taskdamt
  184. end type
  185. type cb_copyself from w_publ_easyq`cb_copyself within w_rp_taskdamt
  186. end type
  187. type gb_1 from w_publ_easyq`gb_1 within w_rp_taskdamt
  188. integer x = 2418
  189. integer y = 560
  190. integer width = 87
  191. integer height = 172
  192. end type
  193. type ln_bar from w_publ_easyq`ln_bar within w_rp_taskdamt
  194. end type
  195. type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_taskdamt
  196. end type
  197. type r_bar from w_publ_easyq`r_bar within w_rp_taskdamt
  198. end type
  199. type ln_1 from w_publ_easyq`ln_1 within w_rp_taskdamt
  200. end type
  201. type ln_2 from w_publ_easyq`ln_2 within w_rp_taskdamt
  202. end type
  203. type ln_3 from w_publ_easyq`ln_3 within w_rp_taskdamt
  204. boolean visible = false
  205. end type
  206. type ln_4 from w_publ_easyq`ln_4 within w_rp_taskdamt
  207. boolean visible = false
  208. end type
  209. type st_2 from statictext within w_rp_taskdamt
  210. integer x = 27
  211. integer y = 208
  212. integer width = 137
  213. integer height = 48
  214. boolean bringtotop = true
  215. integer textsize = -9
  216. integer weight = 400
  217. fontcharset fontcharset = gb2312charset!
  218. fontpitch fontpitch = variable!
  219. string facename = "宋体"
  220. long textcolor = 33554432
  221. long backcolor = 134217739
  222. string text = "分部"
  223. boolean focusrectangle = false
  224. end type
  225. type ddlb_scid from uo_ddlb_scid within w_rp_taskdamt
  226. integer x = 160
  227. integer y = 192
  228. integer width = 549
  229. integer height = 1120
  230. integer taborder = 20
  231. boolean bringtotop = true
  232. end type
  233. event constructor;call super::constructor;cur_scid_arr = THIS.uo_scid_arr
  234. end event
  235. event selectionchanged;call super::selectionchanged;cur_scid_arr = THIS.uo_scid_arr
  236. cb_1.TriggerEvent(Clicked!)
  237. end event
  238. type st_5 from statictext within w_rp_taskdamt
  239. integer x = 745
  240. integer y = 208
  241. integer width = 146
  242. integer height = 52
  243. boolean bringtotop = true
  244. integer textsize = -9
  245. integer weight = 400
  246. fontcharset fontcharset = gb2312charset!
  247. fontpitch fontpitch = variable!
  248. string facename = "宋体"
  249. long textcolor = 33554432
  250. long backcolor = 134217739
  251. string text = "状态"
  252. alignment alignment = center!
  253. boolean focusrectangle = false
  254. end type
  255. type ddlb_status from dropdownlistbox within w_rp_taskdamt
  256. integer x = 887
  257. integer y = 192
  258. integer width = 393
  259. integer height = 692
  260. integer taborder = 20
  261. boolean bringtotop = true
  262. integer textsize = -9
  263. integer weight = 400
  264. fontcharset fontcharset = gb2312charset!
  265. fontpitch fontpitch = variable!
  266. string facename = "宋体"
  267. long textcolor = 33554432
  268. string text = "[全部]"
  269. boolean sorted = false
  270. string item[] = {"[全部]","待审核","已审核"}
  271. borderstyle borderstyle = stylelowered!
  272. end type
  273. event selectionchanged;if index=1 then
  274. cur_flag=-1
  275. elseif index=2 then
  276. cur_flag= 0
  277. elseif index=3 then
  278. cur_flag= 1
  279. end if
  280. cb_1.TriggerEvent(Clicked!)
  281. end event