w_rp_sptamt_mx.srw 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390
  1. $PBExportHeader$w_rp_sptamt_mx.srw
  2. forward
  3. global type w_rp_sptamt_mx from w_publ_easyq
  4. end type
  5. type st_2 from statictext within w_rp_sptamt_mx
  6. end type
  7. type ddlb_scid from uo_ddlb_scid within w_rp_sptamt_mx
  8. end type
  9. type st_5 from statictext within w_rp_sptamt_mx
  10. end type
  11. type ddlb_status from dropdownlistbox within w_rp_sptamt_mx
  12. end type
  13. end forward
  14. global type w_rp_sptamt_mx 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_sptamt_mx w_rp_sptamt_mx
  24. type variables
  25. Int cur_flag = -1,cur_confirmflag = -1,cur_secflag = -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_sptamt_mx.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_sptamt_mx.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_sptamt_mx
  101. end type
  102. type cb_exit from w_publ_easyq`cb_exit within w_rp_sptamt_mx
  103. end type
  104. type cb_2 from w_publ_easyq`cb_2 within w_rp_sptamt_mx
  105. boolean bringtotop = true
  106. end type
  107. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_sptamt_mx
  108. boolean bringtotop = true
  109. end type
  110. type cb_1 from w_publ_easyq`cb_1 within w_rp_sptamt_mx
  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. Int li_option_outrep //业务员权限
  117. IF sys_power_issuper THEN
  118. li_option_outrep = 0
  119. ELSE
  120. li_option_outrep = sys_option_outrep
  121. END IF
  122. dw_1.Retrieve(cur_scid_arr,cur_flag,cur_secflag,cur_confirmflag,sys_user_spttype,firstdate,enddate)
  123. end event
  124. type st_3 from w_publ_easyq`st_3 within w_rp_sptamt_mx
  125. integer x = 1307
  126. integer y = 204
  127. end type
  128. type st_4 from w_publ_easyq`st_4 within w_rp_sptamt_mx
  129. integer x = 2034
  130. integer y = 204
  131. end type
  132. type em_1 from w_publ_easyq`em_1 within w_rp_sptamt_mx
  133. integer x = 1509
  134. integer y = 188
  135. end type
  136. type em_2 from w_publ_easyq`em_2 within w_rp_sptamt_mx
  137. integer x = 2139
  138. integer y = 188
  139. end type
  140. type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_sptamt_mx
  141. end type
  142. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_sptamt_mx
  143. end type
  144. event cbx_yl::clicked;call super::clicked;IF THIS.Checked THEN
  145. dw_1.SelectRow(0,FALSE)
  146. END IF
  147. end event
  148. type dw_1 from w_publ_easyq`dw_1 within w_rp_sptamt_mx
  149. integer y = 300
  150. integer width = 2208
  151. string dataobject = "dw_rp_sptamt_mx"
  152. end type
  153. event dw_1::doubleclicked;call super::doubleclicked;
  154. IF row > 0 THEN
  155. String ls_code
  156. Long ll_scid
  157. ll_scid = This.Object.u_cusamt_scid[row]
  158. ls_code = This.Object.u_cusamt_cusmoncode[row]
  159. f_open_win(ll_scid,ls_code)
  160. END IF
  161. end event
  162. type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_sptamt_mx
  163. integer y = 492
  164. end type
  165. type sle_cust from w_publ_easyq`sle_cust within w_rp_sptamt_mx
  166. integer y = 492
  167. end type
  168. type st_mtrl from w_publ_easyq`st_mtrl within w_rp_sptamt_mx
  169. integer y = 508
  170. end type
  171. type st_cust from w_publ_easyq`st_cust within w_rp_sptamt_mx
  172. integer y = 508
  173. end type
  174. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_sptamt_mx
  175. boolean visible = true
  176. end type
  177. type pb_em1 from w_publ_easyq`pb_em1 within w_rp_sptamt_mx
  178. integer x = 1915
  179. integer y = 188
  180. end type
  181. type pb_em2 from w_publ_easyq`pb_em2 within w_rp_sptamt_mx
  182. integer x = 2555
  183. integer y = 188
  184. end type
  185. type pb_2 from w_publ_easyq`pb_2 within w_rp_sptamt_mx
  186. integer x = 2665
  187. integer y = 188
  188. end type
  189. type cb_help from w_publ_easyq`cb_help within w_rp_sptamt_mx
  190. end type
  191. type cb_copyself from w_publ_easyq`cb_copyself within w_rp_sptamt_mx
  192. end type
  193. type gb_1 from w_publ_easyq`gb_1 within w_rp_sptamt_mx
  194. integer x = 2418
  195. integer y = 560
  196. integer width = 87
  197. integer height = 172
  198. end type
  199. type ln_bar from w_publ_easyq`ln_bar within w_rp_sptamt_mx
  200. end type
  201. type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_sptamt_mx
  202. end type
  203. type r_bar from w_publ_easyq`r_bar within w_rp_sptamt_mx
  204. end type
  205. type ln_1 from w_publ_easyq`ln_1 within w_rp_sptamt_mx
  206. end type
  207. type ln_2 from w_publ_easyq`ln_2 within w_rp_sptamt_mx
  208. end type
  209. type ln_3 from w_publ_easyq`ln_3 within w_rp_sptamt_mx
  210. boolean visible = false
  211. end type
  212. type ln_4 from w_publ_easyq`ln_4 within w_rp_sptamt_mx
  213. boolean visible = false
  214. end type
  215. type st_2 from statictext within w_rp_sptamt_mx
  216. integer x = 27
  217. integer y = 208
  218. integer width = 137
  219. integer height = 48
  220. boolean bringtotop = true
  221. integer textsize = -9
  222. integer weight = 400
  223. fontcharset fontcharset = gb2312charset!
  224. fontpitch fontpitch = variable!
  225. string facename = "宋体"
  226. long textcolor = 33554432
  227. long backcolor = 134217739
  228. string text = "分部"
  229. boolean focusrectangle = false
  230. end type
  231. type ddlb_scid from uo_ddlb_scid within w_rp_sptamt_mx
  232. integer x = 160
  233. integer y = 192
  234. integer width = 549
  235. integer height = 1120
  236. integer taborder = 20
  237. boolean bringtotop = true
  238. end type
  239. event constructor;call super::constructor;cur_scid_arr = THIS.uo_scid_arr
  240. end event
  241. event selectionchanged;call super::selectionchanged;cur_scid_arr = THIS.uo_scid_arr
  242. cb_1.TriggerEvent(Clicked!)
  243. end event
  244. type st_5 from statictext within w_rp_sptamt_mx
  245. integer x = 745
  246. integer y = 208
  247. integer width = 146
  248. integer height = 52
  249. boolean bringtotop = true
  250. integer textsize = -9
  251. integer weight = 400
  252. fontcharset fontcharset = gb2312charset!
  253. fontpitch fontpitch = variable!
  254. string facename = "宋体"
  255. long textcolor = 33554432
  256. long backcolor = 134217739
  257. string text = "状态"
  258. alignment alignment = center!
  259. boolean focusrectangle = false
  260. end type
  261. type ddlb_status from dropdownlistbox within w_rp_sptamt_mx
  262. integer x = 914
  263. integer y = 196
  264. integer width = 393
  265. integer height = 400
  266. integer taborder = 110
  267. boolean bringtotop = true
  268. integer textsize = -9
  269. integer weight = 400
  270. fontcharset fontcharset = gb2312charset!
  271. fontpitch fontpitch = variable!
  272. string facename = "宋体"
  273. long textcolor = 33554432
  274. string text = "[全部]"
  275. boolean sorted = false
  276. string item[] = {"[全部]","待初审","待终审","待确认","审核完毕"}
  277. borderstyle borderstyle = stylelowered!
  278. end type
  279. event selectionchanged;IF Index = 1 THEN
  280. cur_flag = -1
  281. cur_confirmflag = -1
  282. cur_secflag = -1
  283. ELSEIF Index = 2 THEN
  284. cur_flag = 0
  285. cur_secflag = 0
  286. cur_confirmflag = -1
  287. ELSEIF Index = 3 THEN
  288. cur_flag = 1
  289. cur_secflag = 0
  290. cur_confirmflag = -1
  291. ELSEIF Index = 4 THEN
  292. cur_flag = -1
  293. cur_secflag = -1
  294. cur_confirmflag = 0
  295. ELSE
  296. cur_flag = 1
  297. cur_secflag = 1
  298. cur_confirmflag = 1
  299. END IF
  300. cb_1.TriggerEvent(Clicked!)
  301. end event