w_rp_cusbalc_bill.srw 8.8 KB

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