w_rp_sale_gpmx.srw 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  1. $PBExportHeader$w_rp_sale_gpmx.srw
  2. forward
  3. global type w_rp_sale_gpmx from w_publ_easyq
  4. end type
  5. type ddlb_flag from dropdownlistbox within w_rp_sale_gpmx
  6. end type
  7. type ddlb_1 from uo_ddlb_storageid within w_rp_sale_gpmx
  8. end type
  9. type st_1 from statictext within w_rp_sale_gpmx
  10. end type
  11. type st_2 from statictext within w_rp_sale_gpmx
  12. end type
  13. type ddlb_2 from dropdownlistbox within w_rp_sale_gpmx
  14. end type
  15. end forward
  16. global type w_rp_sale_gpmx from w_publ_easyq
  17. string title = "产品销售毛利明细表"
  18. ddlb_flag ddlb_flag
  19. ddlb_1 ddlb_1
  20. st_1 st_1
  21. st_2 st_2
  22. ddlb_2 ddlb_2
  23. end type
  24. global w_rp_sale_gpmx w_rp_sale_gpmx
  25. type variables
  26. Long cur_flag = -1 //-1:全部,0仓库未审,1仓库已审核
  27. Long cur_secflag = -1 //-1:全部,0财务未审
  28. Long cur_storageid_arr[]
  29. end variables
  30. forward prototypes
  31. public function integer wf_dw ()
  32. end prototypes
  33. public function integer wf_dw ();String ls_windowname
  34. ls_windowname = THIS.ClassName ( )
  35. String ls_old_dwname,ls_new_dwname = ''
  36. ls_old_dwname = dw_1.DataObject
  37. ls_new_dwname = f_get_dwprint_dynamic_chname(ls_old_dwname,ls_windowname)
  38. IF ls_new_dwname = '' THEN
  39. ls_new_dwname = ls_old_dwname
  40. END IF
  41. dw_1.DataObject = ls_new_dwname
  42. dw_1.SetTransObject(sqlca)
  43. dw_1.uf_read_profile_layout()
  44. f_title_change(dw_1)
  45. RETURN 1
  46. end function
  47. on w_rp_sale_gpmx.create
  48. int iCurrent
  49. call super::create
  50. this.ddlb_flag=create ddlb_flag
  51. this.ddlb_1=create ddlb_1
  52. this.st_1=create st_1
  53. this.st_2=create st_2
  54. this.ddlb_2=create ddlb_2
  55. iCurrent=UpperBound(this.Control)
  56. this.Control[iCurrent+1]=this.ddlb_flag
  57. this.Control[iCurrent+2]=this.ddlb_1
  58. this.Control[iCurrent+3]=this.st_1
  59. this.Control[iCurrent+4]=this.st_2
  60. this.Control[iCurrent+5]=this.ddlb_2
  61. end on
  62. on w_rp_sale_gpmx.destroy
  63. call super::destroy
  64. destroy(this.ddlb_flag)
  65. destroy(this.ddlb_1)
  66. destroy(this.st_1)
  67. destroy(this.st_2)
  68. destroy(this.ddlb_2)
  69. end on
  70. event ue_before_openretrieve;call super::ue_before_openretrieve;s_hide_col s_col1,s_col2
  71. s_col1.col_1 = 'u_outwaremx_costamt'
  72. s_col1.col_2 = 'avgcost'
  73. f_hide_col(490,dw_1,s_col1)
  74. s_col2.col_1 = 'gpamt'
  75. s_col2.col_2 = 'onegpamt'
  76. s_col2.col_3 = 'gpr'
  77. f_hide_col(843,dw_1,s_col2)
  78. s_hide_col s_col_mtrlsectype
  79. s_col_mtrlsectype.col_1 = 'u_mtrldef_mtrlsectype'
  80. f_hide_col(1308,dw_1,s_col_mtrlsectype)
  81. s_hide_col s_col_zxmtrlmode
  82. s_col_zxmtrlmode.col_1 = 'u_mtrldef_zxmtrlmode'
  83. f_hide_col(1309,dw_1,s_col_zxmtrlmode)
  84. end event
  85. type cb_func from w_publ_easyq`cb_func within w_rp_sale_gpmx
  86. end type
  87. type cb_exit from w_publ_easyq`cb_exit within w_rp_sale_gpmx
  88. end type
  89. type cb_2 from w_publ_easyq`cb_2 within w_rp_sale_gpmx
  90. boolean bringtotop = true
  91. end type
  92. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_sale_gpmx
  93. boolean bringtotop = true
  94. end type
  95. type cb_1 from w_publ_easyq`cb_1 within w_rp_sale_gpmx
  96. boolean bringtotop = true
  97. end type
  98. event cb_1::clicked;call super::clicked;DateTime first_date,end_date
  99. first_date = DateTime(Date(em_1.Text),Time(0))
  100. end_date = DateTime(Date(em_2.Text),Time('23:59:59'))
  101. IF first_date < sys_showsaledata_mindt THEN first_date = sys_showsaledata_mindt
  102. Int li_nogive
  103. IF ddlb_2.Text = "统计所有" THEN
  104. li_nogive = 0
  105. ELSE
  106. li_nogive = 1
  107. END IF
  108. Int li_option_outrep
  109. IF sys_power_issuper THEN
  110. li_option_outrep = 0
  111. ELSE
  112. li_option_outrep = sys_option_outrep
  113. END IF
  114. dw_1.Retrieve(cur_storageid_arr,first_date,end_date,cur_flag,cur_secflag,sys_areaid, li_nogive, sys_user_outrep, li_option_outrep)
  115. end event
  116. type st_3 from w_publ_easyq`st_3 within w_rp_sale_gpmx
  117. integer x = 1984
  118. end type
  119. type st_4 from w_publ_easyq`st_4 within w_rp_sale_gpmx
  120. integer x = 2697
  121. end type
  122. type em_1 from w_publ_easyq`em_1 within w_rp_sale_gpmx
  123. integer x = 2176
  124. integer taborder = 110
  125. end type
  126. type em_2 from w_publ_easyq`em_2 within w_rp_sale_gpmx
  127. integer x = 2798
  128. integer taborder = 120
  129. end type
  130. type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_sale_gpmx
  131. integer x = 1623
  132. integer y = 4
  133. end type
  134. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_sale_gpmx
  135. integer x = 1413
  136. integer y = 4
  137. end type
  138. type dw_1 from w_publ_easyq`dw_1 within w_rp_sale_gpmx
  139. integer y = 300
  140. integer width = 2688
  141. string dataobject = "dw_rp_sale_gpmx"
  142. end type
  143. type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_sale_gpmx
  144. end type
  145. type sle_cust from w_publ_easyq`sle_cust within w_rp_sale_gpmx
  146. end type
  147. type st_mtrl from w_publ_easyq`st_mtrl within w_rp_sale_gpmx
  148. end type
  149. type st_cust from w_publ_easyq`st_cust within w_rp_sale_gpmx
  150. end type
  151. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_sale_gpmx
  152. boolean visible = true
  153. integer x = 1413
  154. integer y = 96
  155. end type
  156. type pb_em1 from w_publ_easyq`pb_em1 within w_rp_sale_gpmx
  157. integer x = 2592
  158. end type
  159. type pb_em2 from w_publ_easyq`pb_em2 within w_rp_sale_gpmx
  160. integer x = 3218
  161. end type
  162. type pb_2 from w_publ_easyq`pb_2 within w_rp_sale_gpmx
  163. integer x = 3328
  164. end type
  165. type cb_help from w_publ_easyq`cb_help within w_rp_sale_gpmx
  166. end type
  167. type cb_copyself from w_publ_easyq`cb_copyself within w_rp_sale_gpmx
  168. end type
  169. type gb_1 from w_publ_easyq`gb_1 within w_rp_sale_gpmx
  170. end type
  171. type ln_bar from w_publ_easyq`ln_bar within w_rp_sale_gpmx
  172. end type
  173. type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_sale_gpmx
  174. end type
  175. type r_bar from w_publ_easyq`r_bar within w_rp_sale_gpmx
  176. end type
  177. type ln_1 from w_publ_easyq`ln_1 within w_rp_sale_gpmx
  178. end type
  179. type ln_2 from w_publ_easyq`ln_2 within w_rp_sale_gpmx
  180. end type
  181. type ln_3 from w_publ_easyq`ln_3 within w_rp_sale_gpmx
  182. end type
  183. type ln_4 from w_publ_easyq`ln_4 within w_rp_sale_gpmx
  184. end type
  185. type ddlb_flag from dropdownlistbox within w_rp_sale_gpmx
  186. integer x = 1545
  187. integer y = 196
  188. integer width = 425
  189. integer height = 484
  190. integer taborder = 70
  191. boolean bringtotop = true
  192. integer textsize = -9
  193. integer weight = 400
  194. fontcharset fontcharset = gb2312charset!
  195. fontpitch fontpitch = variable!
  196. string facename = "宋体"
  197. long textcolor = 33554432
  198. string text = "[全部]"
  199. boolean sorted = false
  200. boolean vscrollbar = true
  201. string item[] = {"[全部]","待仓库审核","待财务审核","审核完毕"}
  202. borderstyle borderstyle = stylelowered!
  203. end type
  204. event selectionchanged;if index=1 then
  205. cur_flag=-1
  206. cur_secflag= -1
  207. elseif index=2 then
  208. cur_flag= 0
  209. cur_secflag= -1
  210. elseif index=3 then
  211. cur_flag= 1
  212. cur_secflag= 0
  213. elseif index=4 then
  214. cur_flag= 1
  215. cur_secflag= 1
  216. end if
  217. cb_1.triggerevent(clicked!)
  218. end event
  219. type ddlb_1 from uo_ddlb_storageid within w_rp_sale_gpmx
  220. integer x = 699
  221. integer y = 196
  222. integer width = 681
  223. integer height = 1108
  224. integer taborder = 30
  225. boolean bringtotop = true
  226. end type
  227. event constructor;call super::constructor;cur_storageid_arr = this.uo_storageid_arr
  228. end event
  229. event selectionchanged;call super::selectionchanged;cur_storageid_arr = this.uo_storageid_arr
  230. cb_1.triggerevent(clicked!)
  231. end event
  232. type st_1 from statictext within w_rp_sale_gpmx
  233. integer x = 530
  234. integer y = 208
  235. integer width = 146
  236. integer height = 48
  237. boolean bringtotop = true
  238. integer textsize = -9
  239. integer weight = 400
  240. fontcharset fontcharset = gb2312charset!
  241. fontpitch fontpitch = variable!
  242. string facename = "宋体"
  243. long textcolor = 33554432
  244. long backcolor = 134217739
  245. string text = "仓库"
  246. alignment alignment = right!
  247. boolean focusrectangle = false
  248. end type
  249. type st_2 from statictext within w_rp_sale_gpmx
  250. integer x = 1403
  251. integer y = 212
  252. integer width = 128
  253. integer height = 48
  254. boolean bringtotop = true
  255. integer textsize = -9
  256. integer weight = 400
  257. fontcharset fontcharset = gb2312charset!
  258. fontpitch fontpitch = variable!
  259. string facename = "宋体"
  260. long textcolor = 33554432
  261. long backcolor = 134217739
  262. string text = "状态"
  263. alignment alignment = right!
  264. boolean focusrectangle = false
  265. end type
  266. type ddlb_2 from dropdownlistbox within w_rp_sale_gpmx
  267. integer y = 196
  268. integer width = 521
  269. integer height = 452
  270. integer taborder = 80
  271. boolean bringtotop = true
  272. integer textsize = -9
  273. integer weight = 400
  274. fontcharset fontcharset = gb2312charset!
  275. fontpitch fontpitch = variable!
  276. string facename = "宋体"
  277. long textcolor = 33554432
  278. string text = "统计所有"
  279. boolean sorted = false
  280. string item[] = {"统计所有","不含赠送"}
  281. borderstyle borderstyle = stylelowered!
  282. end type
  283. event selectionchanged;//dw_1.uf_save_profile_layout()
  284. //if ddlb_2.text='统计所有' then
  285. // dw_1.dataobject='dw_rp_sale_gpmx'
  286. //else
  287. // dw_1.dataobject='dw_rp_sale_gpmx_nogive'
  288. //end if
  289. //wf_dw()
  290. //dw_1.settransobject(sqlca)
  291. //
  292. //dw_1.ins_INIfile_name = sys_inifilename
  293. //dw_1.ins_opemp = publ_operator
  294. //dw_1.cardw_empid = sys_empid
  295. //dw_1.cur_DataObject = dw_1.DataObject
  296. //
  297. //dw_1.uf_read_profile_layout()
  298. cb_1.triggerevent(clicked!)
  299. end event