w_rp_buy_contrast.srw 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342
  1. $PBExportHeader$w_rp_buy_contrast.srw
  2. forward
  3. global type w_rp_buy_contrast from w_publ_easyq
  4. end type
  5. type cbx_1 from checkbox within w_rp_buy_contrast
  6. end type
  7. type ddlb_1 from dropdownlistbox within w_rp_buy_contrast
  8. end type
  9. type ddlb_scid from uo_ddlb_scid within w_rp_buy_contrast
  10. end type
  11. type st_1 from statictext within w_rp_buy_contrast
  12. end type
  13. type st_2 from statictext within w_rp_buy_contrast
  14. end type
  15. type ddlb_2 from uo_ddlb_storageid within w_rp_buy_contrast
  16. end type
  17. end forward
  18. global type w_rp_buy_contrast from w_publ_easyq
  19. string title = "采购金额汇总对比表"
  20. cbx_1 cbx_1
  21. ddlb_1 ddlb_1
  22. ddlb_scid ddlb_scid
  23. st_1 st_1
  24. st_2 st_2
  25. ddlb_2 ddlb_2
  26. end type
  27. global w_rp_buy_contrast w_rp_buy_contrast
  28. type variables
  29. long cur_scid_arr[]
  30. Long cur_storageid_arr[]
  31. int cur_contrastflag = 1
  32. end variables
  33. forward prototypes
  34. public function datetime wf_get_lastmonth ()
  35. end prototypes
  36. public function datetime wf_get_lastmonth ();int li_month
  37. long ll_year
  38. datetime ldt_dt
  39. ll_year = year(today())
  40. li_month = month(today())
  41. if li_month = 1 then
  42. ldt_dt = datetime(date(string(ll_year - 1)+"-12-01"))
  43. else
  44. ldt_dt = datetime(date(string(ll_year)+"-"+string(li_month - 1)+"-01"))
  45. end if
  46. return ldt_dt
  47. end function
  48. on w_rp_buy_contrast.create
  49. int iCurrent
  50. call super::create
  51. this.cbx_1=create cbx_1
  52. this.ddlb_1=create ddlb_1
  53. this.ddlb_scid=create ddlb_scid
  54. this.st_1=create st_1
  55. this.st_2=create st_2
  56. this.ddlb_2=create ddlb_2
  57. iCurrent=UpperBound(this.Control)
  58. this.Control[iCurrent+1]=this.cbx_1
  59. this.Control[iCurrent+2]=this.ddlb_1
  60. this.Control[iCurrent+3]=this.ddlb_scid
  61. this.Control[iCurrent+4]=this.st_1
  62. this.Control[iCurrent+5]=this.st_2
  63. this.Control[iCurrent+6]=this.ddlb_2
  64. end on
  65. on w_rp_buy_contrast.destroy
  66. call super::destroy
  67. destroy(this.cbx_1)
  68. destroy(this.ddlb_1)
  69. destroy(this.ddlb_scid)
  70. destroy(this.st_1)
  71. destroy(this.st_2)
  72. destroy(this.ddlb_2)
  73. end on
  74. event ue_before_openretrieve;call super::ue_before_openretrieve;em_1.text = string(wf_get_lastmonth(),"yyyy-mm")
  75. end event
  76. type cb_func from w_publ_easyq`cb_func within w_rp_buy_contrast
  77. end type
  78. type cb_exit from w_publ_easyq`cb_exit within w_rp_buy_contrast
  79. end type
  80. type cb_2 from w_publ_easyq`cb_2 within w_rp_buy_contrast
  81. boolean bringtotop = true
  82. end type
  83. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_buy_contrast
  84. boolean bringtotop = true
  85. end type
  86. type cb_1 from w_publ_easyq`cb_1 within w_rp_buy_contrast
  87. boolean bringtotop = true
  88. end type
  89. event cb_1::clicked;call super::clicked;
  90. dw_1.Retrieve(cur_scid_arr,Trim(em_1.Text),Trim(em_2.Text),sys_user_spttype,cur_contrastflag,cur_storageid_arr)
  91. end event
  92. type st_3 from w_publ_easyq`st_3 within w_rp_buy_contrast
  93. integer x = 1641
  94. integer y = 212
  95. end type
  96. type st_4 from w_publ_easyq`st_4 within w_rp_buy_contrast
  97. integer x = 2286
  98. integer y = 212
  99. end type
  100. type em_1 from w_publ_easyq`em_1 within w_rp_buy_contrast
  101. integer x = 1861
  102. integer y = 196
  103. integer width = 325
  104. integer taborder = 110
  105. string mask = "yyyy-mm"
  106. end type
  107. type em_2 from w_publ_easyq`em_2 within w_rp_buy_contrast
  108. integer x = 2386
  109. integer y = 196
  110. integer width = 325
  111. integer taborder = 120
  112. string mask = "yyyy-mm"
  113. end type
  114. type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_buy_contrast
  115. integer x = 1600
  116. integer y = 12
  117. end type
  118. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_buy_contrast
  119. integer x = 1390
  120. integer y = 12
  121. end type
  122. type dw_1 from w_publ_easyq`dw_1 within w_rp_buy_contrast
  123. integer y = 304
  124. integer width = 2679
  125. string dataobject = "dw_rp_buy_contrast_1"
  126. end type
  127. type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_buy_contrast
  128. end type
  129. type sle_cust from w_publ_easyq`sle_cust within w_rp_buy_contrast
  130. end type
  131. type st_mtrl from w_publ_easyq`st_mtrl within w_rp_buy_contrast
  132. end type
  133. type st_cust from w_publ_easyq`st_cust within w_rp_buy_contrast
  134. end type
  135. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_buy_contrast
  136. boolean visible = true
  137. integer x = 1390
  138. integer y = 108
  139. end type
  140. type pb_em1 from w_publ_easyq`pb_em1 within w_rp_buy_contrast
  141. integer x = 2194
  142. integer y = 196
  143. end type
  144. type pb_em2 from w_publ_easyq`pb_em2 within w_rp_buy_contrast
  145. integer x = 2720
  146. integer y = 196
  147. end type
  148. type pb_2 from w_publ_easyq`pb_2 within w_rp_buy_contrast
  149. integer x = 2825
  150. integer y = 196
  151. end type
  152. type cb_help from w_publ_easyq`cb_help within w_rp_buy_contrast
  153. end type
  154. type cb_copyself from w_publ_easyq`cb_copyself within w_rp_buy_contrast
  155. end type
  156. type gb_1 from w_publ_easyq`gb_1 within w_rp_buy_contrast
  157. end type
  158. type ln_bar from w_publ_easyq`ln_bar within w_rp_buy_contrast
  159. end type
  160. type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_buy_contrast
  161. end type
  162. type r_bar from w_publ_easyq`r_bar within w_rp_buy_contrast
  163. end type
  164. type ln_1 from w_publ_easyq`ln_1 within w_rp_buy_contrast
  165. end type
  166. type ln_2 from w_publ_easyq`ln_2 within w_rp_buy_contrast
  167. end type
  168. type ln_3 from w_publ_easyq`ln_3 within w_rp_buy_contrast
  169. end type
  170. type ln_4 from w_publ_easyq`ln_4 within w_rp_buy_contrast
  171. end type
  172. type cbx_1 from checkbox within w_rp_buy_contrast
  173. integer x = 2953
  174. integer y = 212
  175. integer width = 384
  176. integer height = 64
  177. boolean bringtotop = true
  178. integer textsize = -9
  179. integer weight = 400
  180. fontcharset fontcharset = gb2312charset!
  181. fontpitch fontpitch = variable!
  182. string facename = "宋体"
  183. long textcolor = 33554432
  184. long backcolor = 134217739
  185. string text = "按月份对比"
  186. boolean checked = true
  187. end type
  188. event clicked;if this.checked then
  189. cur_contrastflag = 1
  190. else
  191. cur_contrastflag = 0
  192. end if
  193. cb_1.triggerevent(clicked!)
  194. end event
  195. type ddlb_1 from dropdownlistbox within w_rp_buy_contrast
  196. integer x = 1975
  197. integer y = 44
  198. integer width = 718
  199. integer height = 556
  200. integer taborder = 120
  201. boolean bringtotop = true
  202. integer textsize = -9
  203. integer weight = 400
  204. fontcharset fontcharset = gb2312charset!
  205. fontpitch fontpitch = variable!
  206. string facename = "宋体"
  207. long textcolor = 33554432
  208. string text = "供应商采购金额对比表"
  209. boolean sorted = false
  210. boolean vscrollbar = true
  211. string item[] = {"供应商采购金额对比表","物料采购金额对比表"}
  212. borderstyle borderstyle = stylelowered!
  213. end type
  214. event selectionchanged;IF Trim(THIS.Text) = "供应商采购金额对比表" THEN
  215. dw_1.DataObject = "dw_rp_buy_contrast_1"
  216. ELSEIF Trim(THIS.Text) = "物料采购金额对比表" THEN
  217. dw_1.DataObject = "dw_rp_buy_contrast_2"
  218. END IF
  219. dw_1.SetTransObject(sqlca)
  220. cb_1.TriggerEvent(Clicked!)
  221. end event
  222. type ddlb_scid from uo_ddlb_scid within w_rp_buy_contrast
  223. integer x = 128
  224. integer y = 192
  225. integer width = 622
  226. integer height = 556
  227. integer taborder = 100
  228. boolean bringtotop = true
  229. end type
  230. event constructor;call super::constructor;cur_scid_arr = THIS.uo_scid_arr
  231. end event
  232. event selectionchanged;call super::selectionchanged;
  233. cur_scid_arr = THIS.uo_scid_arr
  234. cb_1.triggerevent(clicked!)
  235. end event
  236. type st_1 from statictext within w_rp_buy_contrast
  237. integer y = 208
  238. integer width = 123
  239. integer height = 48
  240. boolean bringtotop = true
  241. integer textsize = -9
  242. integer weight = 400
  243. fontcharset fontcharset = gb2312charset!
  244. fontpitch fontpitch = variable!
  245. string facename = "宋体"
  246. long textcolor = 33554432
  247. long backcolor = 134217739
  248. string text = "分部"
  249. alignment alignment = right!
  250. boolean focusrectangle = false
  251. end type
  252. type st_2 from statictext within w_rp_buy_contrast
  253. integer x = 759
  254. integer y = 208
  255. integer width = 146
  256. integer height = 48
  257. boolean bringtotop = true
  258. integer textsize = -9
  259. integer weight = 400
  260. fontcharset fontcharset = gb2312charset!
  261. fontpitch fontpitch = variable!
  262. string facename = "宋体"
  263. long textcolor = 33554432
  264. long backcolor = 134217739
  265. string text = "仓库"
  266. alignment alignment = right!
  267. boolean focusrectangle = false
  268. end type
  269. type ddlb_2 from uo_ddlb_storageid within w_rp_buy_contrast
  270. integer x = 919
  271. integer y = 192
  272. integer width = 681
  273. integer height = 1108
  274. integer taborder = 110
  275. boolean bringtotop = true
  276. end type
  277. event constructor;call super::constructor;cur_storageid_arr = this.uo_storageid_arr
  278. end event
  279. event selectionchanged;call super::selectionchanged;cur_storageid_arr = this.uo_storageid_arr
  280. cb_1.triggerevent(clicked!)
  281. end event