w_rp_sale_cust_mtrl.srw 9.1 KB

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