w_rp_sale_mtrl.srw 11 KB

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