w_rp_sale_cust_mtrl.srw 8.7 KB

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