w_rp_sptbalc_bill.srw 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382
  1. $PBExportHeader$w_rp_sptbalc_bill.srw
  2. forward
  3. global type w_rp_sptbalc_bill from w_publ_easyq
  4. end type
  5. type ddlb_1 from uo_ddlb_moneyid within w_rp_sptbalc_bill
  6. end type
  7. type st_1 from statictext within w_rp_sptbalc_bill
  8. end type
  9. type cbx_ifmsttake from checkbox within w_rp_sptbalc_bill
  10. end type
  11. type cbx_type from checkbox within w_rp_sptbalc_bill
  12. end type
  13. type dw_spttype from u_dw_rbtnfilter within w_rp_sptbalc_bill
  14. end type
  15. end forward
  16. global type w_rp_sptbalc_bill from w_publ_easyq
  17. integer x = 9
  18. integer y = 12
  19. string title = "供应商未对数单据统计表"
  20. ddlb_1 ddlb_1
  21. st_1 st_1
  22. cbx_ifmsttake cbx_ifmsttake
  23. cbx_type cbx_type
  24. dw_spttype dw_spttype
  25. end type
  26. global w_rp_sptbalc_bill w_rp_sptbalc_bill
  27. type variables
  28. long ins_spttypeid
  29. Long cur_moneyid = -1
  30. end variables
  31. on w_rp_sptbalc_bill.create
  32. int iCurrent
  33. call super::create
  34. this.ddlb_1=create ddlb_1
  35. this.st_1=create st_1
  36. this.cbx_ifmsttake=create cbx_ifmsttake
  37. this.cbx_type=create cbx_type
  38. this.dw_spttype=create dw_spttype
  39. iCurrent=UpperBound(this.Control)
  40. this.Control[iCurrent+1]=this.ddlb_1
  41. this.Control[iCurrent+2]=this.st_1
  42. this.Control[iCurrent+3]=this.cbx_ifmsttake
  43. this.Control[iCurrent+4]=this.cbx_type
  44. this.Control[iCurrent+5]=this.dw_spttype
  45. end on
  46. on w_rp_sptbalc_bill.destroy
  47. call super::destroy
  48. destroy(this.ddlb_1)
  49. destroy(this.st_1)
  50. destroy(this.cbx_ifmsttake)
  51. destroy(this.cbx_type)
  52. destroy(this.dw_spttype)
  53. end on
  54. event open;call super::open;em_1.Text = String(Today(),'yyyy-mm')+'-01'
  55. Int ifcusgroup
  56. ifcusgroup = Integer(f_ProfileString (sys_empid,'dw_rp_sptbalc_bill', "ifcusgroup", '0'))
  57. IF ifcusgroup = 0 THEN
  58. dw_1.DataObject = 'dw_rp_sptbalc_bill'
  59. ELSE
  60. dw_1.DataObject = 'dw_rp_sptbalc_bill_cus'
  61. END IF
  62. dw_spttype.SetTransObject(sqlca)
  63. dw_1.SetTransObject(sqlca)
  64. dw_spttype.retrieve()
  65. dw_1.ins_INIfile_name = sys_inifilename
  66. dw_1.ins_opemp = publ_operator
  67. dw_1.cardw_empid = sys_empid
  68. dw_1.cur_DataObject = dw_1.DataObject
  69. dw_1.uf_read_profile_layout()
  70. f_title_change(dw_1)
  71. IF cbx_loginretr.Checked THEN
  72. cb_1.TriggerEvent(Clicked!)
  73. END IF
  74. end event
  75. event ue_before_open;call super::ue_before_open;if_ue_retr=true
  76. if_ue_filter=true
  77. if_ue_sort=true
  78. if_ue_sentdataout=true
  79. end event
  80. event resize;call super::resize;dw_spttype.Height = dw_1.Height
  81. end event
  82. type cb_func from w_publ_easyq`cb_func within w_rp_sptbalc_bill
  83. end type
  84. type cb_exit from w_publ_easyq`cb_exit within w_rp_sptbalc_bill
  85. end type
  86. type cb_2 from w_publ_easyq`cb_2 within w_rp_sptbalc_bill
  87. boolean bringtotop = true
  88. end type
  89. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_sptbalc_bill
  90. boolean bringtotop = true
  91. end type
  92. type cb_1 from w_publ_easyq`cb_1 within w_rp_sptbalc_bill
  93. boolean bringtotop = true
  94. end type
  95. event cb_1::clicked;call super::clicked;DateTime firstdate,enddate
  96. firstdate = DateTime(Date(em_1.Text),Time(0))
  97. enddate = DateTime(Date(em_2.Text),Time('23:59:59'))
  98. Int li_ifmsttake
  99. IF cbx_ifmsttake.Checked THEN
  100. li_ifmsttake = 1
  101. ELSE
  102. li_ifmsttake = 0
  103. END IF
  104. dw_1.Retrieve(ins_spttypeid,cur_moneyid,firstdate,enddate,li_ifmsttake)
  105. end event
  106. type st_3 from w_publ_easyq`st_3 within w_rp_sptbalc_bill
  107. integer x = 23
  108. integer y = 320
  109. boolean enabled = true
  110. end type
  111. type st_4 from w_publ_easyq`st_4 within w_rp_sptbalc_bill
  112. integer x = 750
  113. integer y = 320
  114. boolean enabled = true
  115. end type
  116. type em_1 from w_publ_easyq`em_1 within w_rp_sptbalc_bill
  117. integer x = 224
  118. integer y = 304
  119. end type
  120. type em_2 from w_publ_easyq`em_2 within w_rp_sptbalc_bill
  121. integer x = 855
  122. integer y = 304
  123. end type
  124. type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_sptbalc_bill
  125. integer x = 1541
  126. end type
  127. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_sptbalc_bill
  128. end type
  129. type dw_1 from w_publ_easyq`dw_1 within w_rp_sptbalc_bill
  130. integer x = 850
  131. integer width = 2706
  132. integer height = 1680
  133. string dataobject = "dw_rp_sptbalc_bill"
  134. end type
  135. type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_sptbalc_bill
  136. integer y = 464
  137. end type
  138. type sle_cust from w_publ_easyq`sle_cust within w_rp_sptbalc_bill
  139. integer y = 464
  140. end type
  141. type st_mtrl from w_publ_easyq`st_mtrl within w_rp_sptbalc_bill
  142. integer y = 480
  143. end type
  144. type st_cust from w_publ_easyq`st_cust within w_rp_sptbalc_bill
  145. integer y = 480
  146. end type
  147. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_sptbalc_bill
  148. boolean visible = true
  149. end type
  150. type pb_em1 from w_publ_easyq`pb_em1 within w_rp_sptbalc_bill
  151. integer x = 645
  152. integer y = 304
  153. end type
  154. type pb_em2 from w_publ_easyq`pb_em2 within w_rp_sptbalc_bill
  155. integer x = 1275
  156. integer y = 304
  157. end type
  158. type pb_2 from w_publ_easyq`pb_2 within w_rp_sptbalc_bill
  159. integer x = 1385
  160. integer y = 304
  161. end type
  162. type cb_help from w_publ_easyq`cb_help within w_rp_sptbalc_bill
  163. end type
  164. type cb_copyself from w_publ_easyq`cb_copyself within w_rp_sptbalc_bill
  165. end type
  166. type gb_1 from w_publ_easyq`gb_1 within w_rp_sptbalc_bill
  167. integer x = 1019
  168. integer y = 416
  169. integer width = 1659
  170. end type
  171. type ln_bar from w_publ_easyq`ln_bar within w_rp_sptbalc_bill
  172. end type
  173. type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_sptbalc_bill
  174. end type
  175. type r_bar from w_publ_easyq`r_bar within w_rp_sptbalc_bill
  176. end type
  177. type ln_1 from w_publ_easyq`ln_1 within w_rp_sptbalc_bill
  178. end type
  179. type ln_2 from w_publ_easyq`ln_2 within w_rp_sptbalc_bill
  180. end type
  181. type ln_3 from w_publ_easyq`ln_3 within w_rp_sptbalc_bill
  182. end type
  183. type ln_4 from w_publ_easyq`ln_4 within w_rp_sptbalc_bill
  184. end type
  185. type ddlb_1 from uo_ddlb_moneyid within w_rp_sptbalc_bill
  186. integer x = 178
  187. integer y = 192
  188. integer width = 571
  189. integer height = 772
  190. integer taborder = 30
  191. boolean bringtotop = true
  192. end type
  193. event constructor;call super::constructor;cur_moneyid = THIS.uo_moneyid
  194. end event
  195. event selectionchanged;call super::selectionchanged;cur_moneyid = THIS.uo_moneyid
  196. cb_1.TriggerEvent(Clicked!)
  197. end event
  198. type st_1 from statictext within w_rp_sptbalc_bill
  199. integer x = 32
  200. integer y = 208
  201. integer width = 142
  202. integer height = 48
  203. boolean bringtotop = true
  204. integer textsize = -9
  205. integer weight = 400
  206. fontcharset fontcharset = gb2312charset!
  207. fontpitch fontpitch = variable!
  208. string facename = "宋体"
  209. long textcolor = 33554432
  210. long backcolor = 134217739
  211. string text = "币种"
  212. boolean focusrectangle = false
  213. end type
  214. type cbx_ifmsttake from checkbox within w_rp_sptbalc_bill
  215. integer x = 777
  216. integer y = 200
  217. integer width = 521
  218. integer height = 60
  219. boolean bringtotop = true
  220. integer textsize = -9
  221. integer weight = 400
  222. fontcharset fontcharset = gb2312charset!
  223. fontpitch fontpitch = variable!
  224. string facename = "宋体"
  225. long textcolor = 33554432
  226. long backcolor = 134217739
  227. string text = "只显示应付未对单"
  228. boolean checked = true
  229. end type
  230. event clicked;Int ifmsttake
  231. IF THIS.Checked THEN
  232. ifmsttake = 1
  233. ELSE
  234. ifmsttake = 0
  235. END IF
  236. f_SetProfileString (sys_empid,dw_1.DataObject, "ifmsttake", String(ifmsttake))
  237. cb_1.triggerevent(clicked!)
  238. end event
  239. event constructor;Int ifmsttake
  240. ifmsttake = Integer(f_ProfileString (sys_empid,dw_1.DataObject, "ifmsttake", '0'))
  241. IF ifmsttake = 0 THEN
  242. THIS.Checked = FALSE
  243. ELSE
  244. THIS.Checked = TRUE
  245. END IF
  246. end event
  247. type cbx_type from checkbox within w_rp_sptbalc_bill
  248. integer x = 1440
  249. integer y = 200
  250. integer width = 521
  251. integer height = 60
  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. long backcolor = 134217739
  260. string text = "按供应商分组小计"
  261. end type
  262. event clicked;int ifcusgroup
  263. dw_1.uf_save_profile_layout()
  264. IF THIS.Checked THEN
  265. dw_1.DataObject = 'dw_rp_sptbalc_bill_2'
  266. ifcusgroup = 1
  267. ELSE
  268. dw_1.DataObject = 'dw_rp_sptbalc_bill'
  269. ifcusgroup = 0
  270. END IF
  271. dw_1.SetTransObject(sqlca)
  272. dw_1.ins_INIfile_name = sys_inifilename
  273. dw_1.ins_opemp = publ_operator
  274. dw_1.cardw_empid = sys_empid
  275. dw_1.cur_DataObject = dw_1.DataObject
  276. dw_1.uf_read_profile_layout()
  277. f_title_change(dw_1)
  278. f_SetProfileString (sys_empid,'w_rp_cusbalc_bill', "ifcusgroup", String(ifcusgroup))
  279. cb_1.TriggerEvent(Clicked!)
  280. end event
  281. event constructor;Int ifcusgroup
  282. ifcusgroup = Integer(f_ProfileString (sys_empid,'w_rp_cusbalc_bill', "ifcusgroup", '0'))
  283. IF ifcusgroup = 0 THEN
  284. THIS.Checked = FALSE
  285. ELSE
  286. THIS.Checked = TRUE
  287. END IF
  288. end event
  289. type dw_spttype from u_dw_rbtnfilter within w_rp_sptbalc_bill
  290. integer y = 416
  291. integer width = 841
  292. integer height = 1656
  293. integer taborder = 90
  294. boolean bringtotop = true
  295. string dataobject = "dw_spttype_index"
  296. end type
  297. event rowfocuschanged;call super::rowfocuschanged;IF currentrow <=0 THEN RETURN
  298. this.selectrow(0,false)
  299. this.selectrow(currentrow,true)
  300. IF dw_spttype.GetRow() <= 0 THEN
  301. ins_spttypeid = 0
  302. ELSE
  303. ins_spttypeid = dw_spttype.Object.spttypeid[dw_spttype.GetRow()]
  304. END IF
  305. cb_1.triggerevent(clicked!)
  306. end event