w_rp_sale_mtrl.srw 11 KB

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