w_rp_sale_mtrl.srw 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481
  1. $PBExportHeader$w_rp_sale_mtrl.srw
  2. forward
  3. global type w_rp_sale_mtrl from w_publ_easyq
  4. end type
  5. type ddlb_flag from dropdownlistbox within w_rp_sale_mtrl
  6. end type
  7. type ddlb_1 from uo_ddlb_storageid within w_rp_sale_mtrl
  8. end type
  9. type tv_1 from uo_tv_mtrltype within w_rp_sale_mtrl
  10. end type
  11. type ddlb_scid from uo_ddlb_scid within w_rp_sale_mtrl
  12. end type
  13. type st_5 from statictext within w_rp_sale_mtrl
  14. end type
  15. type ddlb_2 from dropdownlistbox within w_rp_sale_mtrl
  16. end type
  17. type ddlb_3 from dropdownlistbox within w_rp_sale_mtrl
  18. end type
  19. end forward
  20. global type w_rp_sale_mtrl from w_publ_easyq
  21. integer width = 3538
  22. integer height = 2096
  23. string title = "产品销售汇总表"
  24. ddlb_flag ddlb_flag
  25. ddlb_1 ddlb_1
  26. tv_1 tv_1
  27. ddlb_scid ddlb_scid
  28. st_5 st_5
  29. ddlb_2 ddlb_2
  30. ddlb_3 ddlb_3
  31. end type
  32. global w_rp_sale_mtrl w_rp_sale_mtrl
  33. type variables
  34. Long cur_flag = -1 //-1:全部,0仓库未审,1仓库已审核
  35. Long cur_secflag = -1 //-1:全部,0财务未审
  36. Long cur_storageid_arr[]
  37. String ls_handtype = ''
  38. int cur_mtrlorigin=0
  39. long cur_scid_arr[]
  40. long cur_thflag = -1
  41. end variables
  42. forward prototypes
  43. public function integer wf_dw ()
  44. public subroutine wf_hidecol ()
  45. end prototypes
  46. public function integer wf_dw ();String ls_windowname
  47. ls_windowname = This.ClassName ( )
  48. String ls_old_dwname,ls_new_dwname = ''
  49. ls_old_dwname = dw_1.DataObject
  50. ls_new_dwname = f_get_dwprint_dynamic_chname(ls_old_dwname,ls_windowname)
  51. IF dw_1.DataObject = 'dw_rp_sale_mtrl_pz' THEN
  52. dw_1.SetTransObject(sqlca)
  53. RETURN 1
  54. end if
  55. IF ls_new_dwname = '' THEN
  56. ls_new_dwname = ls_old_dwname
  57. END IF
  58. dw_1.DataObject = ls_new_dwname
  59. dw_1.SetTransObject(sqlca)
  60. dw_1.uf_read_profile_layout()
  61. //
  62. f_title_change(dw_1)
  63. RETURN 1
  64. end function
  65. public subroutine wf_hidecol ();s_hide_col s_col
  66. s_col.col_1 = 'costamt'
  67. f_hide_col(123,dw_1,s_col)
  68. s_col.col_1 = 'grossprofit'
  69. s_col.col_2 = 'gpr'
  70. f_hide_col(843,dw_1,s_col)
  71. s_col.col_1 = 'costamt'
  72. f_hide_col(490,dw_1,s_col)
  73. s_hide_col s_col_plan
  74. s_col_plan.col_1 = 'u_mtrldef_planprice'
  75. s_col_plan.col_2 = 'enamt_plan'
  76. s_col_plan.col_3 = 'gpamt_plan'
  77. f_hide_col(1451,dw_1,s_col_plan)
  78. end subroutine
  79. on w_rp_sale_mtrl.create
  80. int iCurrent
  81. call super::create
  82. this.ddlb_flag=create ddlb_flag
  83. this.ddlb_1=create ddlb_1
  84. this.tv_1=create tv_1
  85. this.ddlb_scid=create ddlb_scid
  86. this.st_5=create st_5
  87. this.ddlb_2=create ddlb_2
  88. this.ddlb_3=create ddlb_3
  89. iCurrent=UpperBound(this.Control)
  90. this.Control[iCurrent+1]=this.ddlb_flag
  91. this.Control[iCurrent+2]=this.ddlb_1
  92. this.Control[iCurrent+3]=this.tv_1
  93. this.Control[iCurrent+4]=this.ddlb_scid
  94. this.Control[iCurrent+5]=this.st_5
  95. this.Control[iCurrent+6]=this.ddlb_2
  96. this.Control[iCurrent+7]=this.ddlb_3
  97. end on
  98. on w_rp_sale_mtrl.destroy
  99. call super::destroy
  100. destroy(this.ddlb_flag)
  101. destroy(this.ddlb_1)
  102. destroy(this.tv_1)
  103. destroy(this.ddlb_scid)
  104. destroy(this.st_5)
  105. destroy(this.ddlb_2)
  106. destroy(this.ddlb_3)
  107. end on
  108. event resize;call super::resize;tv_1.height=this.height - dw_1.y - 115
  109. end event
  110. event ue_before_openretrieve;s_hide_col s_col1,s_col2
  111. s_col1.col_1 = 'costamt'
  112. f_hide_col(490,dw_1,s_col1)
  113. s_col2.col_1 = 'grossprofit'
  114. f_hide_col(843,dw_1,s_col2)
  115. s_hide_col s_col_mtrlsectype
  116. s_col_mtrlsectype.col_1 = 'u_mtrldef_mtrlsectype'
  117. f_hide_col(1308,dw_1,s_col_mtrlsectype)
  118. s_hide_col s_col_zxmtrlmode
  119. s_col_zxmtrlmode.col_1 = 'u_mtrldef_zxmtrlmode'
  120. f_hide_col(1309,dw_1,s_col_zxmtrlmode)
  121. s_hide_col s_col_amt
  122. s_col_amt.col_1 = 'amt'
  123. f_hide_col(122,dw_1,s_col_amt)
  124. s_hide_col s_col_planprice
  125. s_col_planprice.col_1 = 'u_mtrldef_planprice'
  126. f_hide_col(1451,dw_1,s_col_planprice)
  127. end event
  128. event ue_before_open;call super::ue_before_open;EM_1.Text = String(Today(),'YYYY-MM-01')
  129. EM_2.Text = String(Today(),'YYYY-MM-DD')
  130. end event
  131. type cb_func from w_publ_easyq`cb_func within w_rp_sale_mtrl
  132. end type
  133. type cb_exit from w_publ_easyq`cb_exit within w_rp_sale_mtrl
  134. end type
  135. type cb_2 from w_publ_easyq`cb_2 within w_rp_sale_mtrl
  136. boolean bringtotop = true
  137. end type
  138. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_sale_mtrl
  139. boolean bringtotop = true
  140. end type
  141. type cb_1 from w_publ_easyq`cb_1 within w_rp_sale_mtrl
  142. boolean bringtotop = true
  143. end type
  144. event cb_1::clicked;DateTime first_date,end_date
  145. first_date = DateTime(Date(em_1.Text),Time(0))
  146. end_date = DateTime(Date(em_2.Text),Time('23:59:59'))
  147. IF first_date < sys_showsaledata_mindt THEN first_date = sys_showsaledata_mindt
  148. Int li_option_outrep
  149. IF sys_power_issuper THEN
  150. li_option_outrep = 0
  151. ELSE
  152. li_option_outrep = sys_option_outrep
  153. END IF
  154. dw_1.Retrieve(cur_scid_arr,cur_storageid_arr,first_date,end_date,cur_flag,cur_secflag,sys_areaid,ls_handtype,-1,cur_thflag, sys_user_outrep, li_option_outrep)
  155. wf_hidecol()
  156. parent.TriggerEvent('ue_before_openretrieve')
  157. end event
  158. type st_3 from w_publ_easyq`st_3 within w_rp_sale_mtrl
  159. integer x = 2021
  160. integer y = 212
  161. end type
  162. type st_4 from w_publ_easyq`st_4 within w_rp_sale_mtrl
  163. integer x = 2725
  164. integer y = 212
  165. end type
  166. type em_1 from w_publ_easyq`em_1 within w_rp_sale_mtrl
  167. integer x = 2213
  168. integer taborder = 110
  169. end type
  170. type em_2 from w_publ_easyq`em_2 within w_rp_sale_mtrl
  171. integer x = 2825
  172. integer taborder = 120
  173. end type
  174. type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_sale_mtrl
  175. integer x = 1637
  176. integer y = 0
  177. end type
  178. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_sale_mtrl
  179. integer x = 1426
  180. integer y = 4
  181. end type
  182. type dw_1 from w_publ_easyq`dw_1 within w_rp_sale_mtrl
  183. integer x = 768
  184. integer y = 300
  185. integer width = 2048
  186. integer height = 1088
  187. string dataobject = "dw_rp_sale_mtrl"
  188. end type
  189. type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_sale_mtrl
  190. end type
  191. type sle_cust from w_publ_easyq`sle_cust within w_rp_sale_mtrl
  192. end type
  193. type st_mtrl from w_publ_easyq`st_mtrl within w_rp_sale_mtrl
  194. end type
  195. type st_cust from w_publ_easyq`st_cust within w_rp_sale_mtrl
  196. end type
  197. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_sale_mtrl
  198. boolean visible = true
  199. integer x = 1426
  200. integer y = 100
  201. end type
  202. type pb_em1 from w_publ_easyq`pb_em1 within w_rp_sale_mtrl
  203. integer x = 2629
  204. integer y = 188
  205. end type
  206. type pb_em2 from w_publ_easyq`pb_em2 within w_rp_sale_mtrl
  207. integer x = 3237
  208. integer y = 188
  209. end type
  210. type pb_2 from w_publ_easyq`pb_2 within w_rp_sale_mtrl
  211. integer x = 3346
  212. integer y = 188
  213. end type
  214. type cb_help from w_publ_easyq`cb_help within w_rp_sale_mtrl
  215. end type
  216. type cb_copyself from w_publ_easyq`cb_copyself within w_rp_sale_mtrl
  217. end type
  218. type gb_1 from w_publ_easyq`gb_1 within w_rp_sale_mtrl
  219. end type
  220. type ln_bar from w_publ_easyq`ln_bar within w_rp_sale_mtrl
  221. end type
  222. type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_sale_mtrl
  223. end type
  224. type r_bar from w_publ_easyq`r_bar within w_rp_sale_mtrl
  225. end type
  226. type ln_1 from w_publ_easyq`ln_1 within w_rp_sale_mtrl
  227. end type
  228. type ln_2 from w_publ_easyq`ln_2 within w_rp_sale_mtrl
  229. end type
  230. type ln_3 from w_publ_easyq`ln_3 within w_rp_sale_mtrl
  231. end type
  232. type ln_4 from w_publ_easyq`ln_4 within w_rp_sale_mtrl
  233. end type
  234. type ddlb_flag from dropdownlistbox within w_rp_sale_mtrl
  235. integer x = 1330
  236. integer y = 192
  237. integer width = 384
  238. integer height = 484
  239. integer taborder = 70
  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. string text = "[全部]"
  248. boolean sorted = false
  249. boolean vscrollbar = true
  250. string item[] = {"[全部]","待仓库审核","待财务审核","审核完毕"}
  251. borderstyle borderstyle = stylelowered!
  252. end type
  253. event selectionchanged;if index=1 then
  254. cur_flag=-1
  255. cur_secflag= -1
  256. elseif index=2 then
  257. cur_flag= 0
  258. cur_secflag= -1
  259. elseif index=3 then
  260. cur_flag= 1
  261. cur_secflag= 0
  262. elseif index=4 then
  263. cur_flag= 1
  264. cur_secflag= 1
  265. end if
  266. cb_1.triggerevent(clicked!)
  267. end event
  268. type ddlb_1 from uo_ddlb_storageid within w_rp_sale_mtrl
  269. integer x = 635
  270. integer y = 192
  271. integer width = 681
  272. integer height = 1108
  273. integer taborder = 120
  274. boolean bringtotop = true
  275. end type
  276. event constructor;call super::constructor;cur_storageid_arr = this.uo_storageid_arr
  277. end event
  278. event selectionchanged;call super::selectionchanged;cur_storageid_arr = this.uo_storageid_arr
  279. cb_1.triggerevent(clicked!)
  280. end event
  281. type tv_1 from uo_tv_mtrltype within w_rp_sale_mtrl
  282. integer y = 300
  283. integer width = 768
  284. integer height = 1120
  285. integer taborder = 70
  286. boolean bringtotop = true
  287. integer textsize = -9
  288. fontcharset fontcharset = gb2312charset!
  289. fontfamily fontfamily = anyfont!
  290. string facename = "宋体"
  291. end type
  292. event selectionchanged;call super::selectionchanged;ls_handtype = THIS.uo_cur_info.handtype
  293. ls_handtype = ls_handtype + '%'
  294. cb_1.triggerevent(clicked!)
  295. end event
  296. type ddlb_scid from uo_ddlb_scid within w_rp_sale_mtrl
  297. integer x = 137
  298. integer y = 192
  299. integer width = 471
  300. integer height = 620
  301. integer taborder = 110
  302. boolean bringtotop = true
  303. end type
  304. event constructor;call super::constructor;cur_scid_arr = THIS.uo_scid_arr
  305. end event
  306. event selectionchanged;call super::selectionchanged;
  307. cur_scid_arr = THIS.uo_scid_arr
  308. cb_1.triggerevent(clicked!)
  309. end event
  310. type st_5 from statictext within w_rp_sale_mtrl
  311. integer y = 212
  312. integer width = 128
  313. integer height = 48
  314. boolean bringtotop = true
  315. integer textsize = -9
  316. integer weight = 400
  317. fontcharset fontcharset = gb2312charset!
  318. fontpitch fontpitch = variable!
  319. string facename = "宋体"
  320. long textcolor = 33554432
  321. long backcolor = 134217739
  322. string text = "分部"
  323. alignment alignment = right!
  324. boolean focusrectangle = false
  325. end type
  326. type ddlb_2 from dropdownlistbox within w_rp_sale_mtrl
  327. integer x = 1714
  328. integer y = 192
  329. integer width = 283
  330. integer height = 484
  331. integer taborder = 80
  332. boolean bringtotop = true
  333. integer textsize = -9
  334. integer weight = 400
  335. fontcharset fontcharset = gb2312charset!
  336. fontpitch fontpitch = variable!
  337. string facename = "宋体"
  338. long textcolor = 33554432
  339. string text = "[全部]"
  340. boolean sorted = false
  341. boolean vscrollbar = true
  342. string item[] = {"[全部]","发货","退货"}
  343. borderstyle borderstyle = stylelowered!
  344. end type
  345. event selectionchanged;IF Index = 1 THEN
  346. cur_thflag = -1
  347. ELSEIF Index = 2 THEN
  348. cur_thflag = 0
  349. ELSEIF Index = 3 THEN
  350. cur_thflag = 1
  351. END IF
  352. cb_1.TriggerEvent(Clicked!)
  353. end event
  354. type ddlb_3 from dropdownlistbox within w_rp_sale_mtrl
  355. integer x = 2395
  356. integer y = 32
  357. integer width = 759
  358. integer height = 756
  359. integer taborder = 130
  360. boolean bringtotop = true
  361. integer textsize = -9
  362. integer weight = 400
  363. fontcharset fontcharset = gb2312charset!
  364. fontpitch fontpitch = variable!
  365. string facename = "宋体"
  366. long textcolor = 33554432
  367. string text = "按产品汇总"
  368. boolean sorted = false
  369. string item[] = {"按产品汇总","按产品配置","按产品汇总(分仓库)"}
  370. borderstyle borderstyle = stylelowered!
  371. end type
  372. event selectionchanged;IF This.Text = '按产品汇总' THEN
  373. dw_1.DataObject = 'dw_rp_sale_mtrl'
  374. ELSEIF This.Text = '按产品配置' THEN
  375. dw_1.DataObject = 'dw_rp_sale_mtrl_pz'
  376. ELSEIF This.Text = '按产品汇总(分仓库)' THEN
  377. dw_1.DataObject = 'dw_rp_sale_mtrl_storage'
  378. END IF
  379. wf_dw()
  380. wf_replacedw()
  381. cb_1.TriggerEvent(Clicked!)
  382. end event