w_rp_sale_cusarea.srw 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473
  1. $PBExportHeader$w_rp_sale_cusarea.srw
  2. forward
  3. global type w_rp_sale_cusarea from w_publ_easyq
  4. end type
  5. type ddlb_1 from uo_ddlb_storageid within w_rp_sale_cusarea
  6. end type
  7. type ddlb_flag from dropdownlistbox within w_rp_sale_cusarea
  8. end type
  9. type tv_1 from uo_tv_cusarea within w_rp_sale_cusarea
  10. end type
  11. type st_1 from statictext within w_rp_sale_cusarea
  12. end type
  13. type st_2 from statictext within w_rp_sale_cusarea
  14. end type
  15. type st_5 from statictext within w_rp_sale_cusarea
  16. end type
  17. type st_6 from statictext within w_rp_sale_cusarea
  18. end type
  19. type cbx_showmx from checkbox within w_rp_sale_cusarea
  20. end type
  21. end forward
  22. global type w_rp_sale_cusarea from w_publ_easyq
  23. string title = "区域销售统计表"
  24. ddlb_1 ddlb_1
  25. ddlb_flag ddlb_flag
  26. tv_1 tv_1
  27. st_1 st_1
  28. st_2 st_2
  29. st_5 st_5
  30. st_6 st_6
  31. cbx_showmx cbx_showmx
  32. end type
  33. global w_rp_sale_cusarea w_rp_sale_cusarea
  34. type variables
  35. string ls_areaname=''
  36. long ls_sonflag, il_sonflag_ori = -1
  37. Long cur_flag = -1 //-1:全部,0仓库未审,1仓库已审核
  38. Long cur_secflag = -1 //-1:全部,0财务未审
  39. Long cur_storageid_arr[]
  40. end variables
  41. forward prototypes
  42. public subroutine wf_selectionchanged (string arg_type)
  43. public subroutine wf_hidecol ()
  44. end prototypes
  45. public subroutine wf_selectionchanged (string arg_type);dw_1.uf_save_profile_layout()
  46. IF arg_type = 'HZ' THEN //'区域汇总'
  47. dw_1.DataObject = 'dw_rp_sale_cusarea_1'
  48. ELSE //MX
  49. dw_1.DataObject = 'dw_rp_sale_cusarea_2'
  50. END IF
  51. wf_replacedw()
  52. //cb_1.TriggerEvent(Clicked!)
  53. end subroutine
  54. public subroutine wf_hidecol ();
  55. s_hide_col s_col1,s_col2
  56. s_col1.col_1 = 'costamt'
  57. f_hide_col(490,dw_1,s_col1)
  58. s_col2.col_1 = 'gpamt'
  59. s_col2.col_2 = 'gpr'
  60. f_hide_col(843,dw_1,s_col2)
  61. s_hide_col s_col_plan
  62. s_col_plan.col_1 = 'u_mtrldef_planprice'
  63. s_col_plan.col_2 = 'enamt_plan'
  64. s_col_plan.col_3 = 'gpamt_plan'
  65. f_hide_col(1451,dw_1,s_col_plan)
  66. end subroutine
  67. on w_rp_sale_cusarea.create
  68. int iCurrent
  69. call super::create
  70. this.ddlb_1=create ddlb_1
  71. this.ddlb_flag=create ddlb_flag
  72. this.tv_1=create tv_1
  73. this.st_1=create st_1
  74. this.st_2=create st_2
  75. this.st_5=create st_5
  76. this.st_6=create st_6
  77. this.cbx_showmx=create cbx_showmx
  78. iCurrent=UpperBound(this.Control)
  79. this.Control[iCurrent+1]=this.ddlb_1
  80. this.Control[iCurrent+2]=this.ddlb_flag
  81. this.Control[iCurrent+3]=this.tv_1
  82. this.Control[iCurrent+4]=this.st_1
  83. this.Control[iCurrent+5]=this.st_2
  84. this.Control[iCurrent+6]=this.st_5
  85. this.Control[iCurrent+7]=this.st_6
  86. this.Control[iCurrent+8]=this.cbx_showmx
  87. end on
  88. on w_rp_sale_cusarea.destroy
  89. call super::destroy
  90. destroy(this.ddlb_1)
  91. destroy(this.ddlb_flag)
  92. destroy(this.tv_1)
  93. destroy(this.st_1)
  94. destroy(this.st_2)
  95. destroy(this.st_5)
  96. destroy(this.st_6)
  97. destroy(this.cbx_showmx)
  98. end on
  99. event resize;call super::resize;dw_1.width=this.width - dw_1.x - 40
  100. dw_1.height=this.height - dw_1.y - 115
  101. tv_1.height=dw_1.height
  102. end event
  103. event ue_before_open;call super::ue_before_open;st_5.visible = false
  104. st_6.visible = false
  105. end event
  106. type cb_func from w_publ_easyq`cb_func within w_rp_sale_cusarea
  107. end type
  108. type cb_exit from w_publ_easyq`cb_exit within w_rp_sale_cusarea
  109. end type
  110. type cb_2 from w_publ_easyq`cb_2 within w_rp_sale_cusarea
  111. boolean bringtotop = true
  112. end type
  113. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_sale_cusarea
  114. boolean bringtotop = true
  115. end type
  116. type cb_1 from w_publ_easyq`cb_1 within w_rp_sale_cusarea
  117. boolean bringtotop = true
  118. end type
  119. event cb_1::clicked;call super::clicked;IF ls_areaname <> '' THEN
  120. ls_areaname = '%'+ls_areaname+'%'
  121. ELSE
  122. ls_areaname = ""
  123. END IF
  124. DateTime firstdate,enddate
  125. firstdate = DateTime(Date(Trim(em_1.Text)),Time("00:00:00"))
  126. enddate = DateTime(Date(Trim(em_2.Text)),Time("23:59:59"))
  127. //IF cbx_showmx.Checked THEN
  128. // dw_1.DataObject = "dw_rp_sale_cusarea_2"
  129. //ELSE
  130. // IF ls_sonflag = 0 THEN
  131. // dw_1.DataObject = "dw_rp_sale_cusarea_1"
  132. // ELSEIF ls_sonflag = 1 THEN
  133. // dw_1.DataObject = "dw_rp_sale_cusarea_2"
  134. // END IF
  135. //END IF
  136. //
  137. //dw_1.SetTransObject(sqlca)
  138. Int li_option_outrep
  139. IF sys_power_issuper THEN
  140. li_option_outrep = 0
  141. ELSE
  142. li_option_outrep = sys_option_outrep
  143. END IF
  144. dw_1.Retrieve(cur_storageid_arr,firstdate,enddate,cur_flag,cur_secflag,sys_areaid,ls_areaname, sys_user_outrep, li_option_outrep)
  145. wf_hidecol()
  146. end event
  147. type st_3 from w_publ_easyq`st_3 within w_rp_sale_cusarea
  148. integer x = 1413
  149. end type
  150. type st_4 from w_publ_easyq`st_4 within w_rp_sale_cusarea
  151. integer x = 2112
  152. end type
  153. type em_1 from w_publ_easyq`em_1 within w_rp_sale_cusarea
  154. integer x = 1614
  155. integer taborder = 120
  156. end type
  157. type em_2 from w_publ_easyq`em_2 within w_rp_sale_cusarea
  158. integer x = 2222
  159. integer taborder = 130
  160. end type
  161. type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_sale_cusarea
  162. integer x = 1618
  163. integer y = 12
  164. end type
  165. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_sale_cusarea
  166. integer x = 1408
  167. integer y = 12
  168. end type
  169. type dw_1 from w_publ_easyq`dw_1 within w_rp_sale_cusarea
  170. integer x = 859
  171. integer y = 300
  172. integer width = 2185
  173. integer height = 1464
  174. string dataobject = "dw_rp_sale_cusarea_1"
  175. end type
  176. type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_sale_cusarea
  177. end type
  178. type sle_cust from w_publ_easyq`sle_cust within w_rp_sale_cusarea
  179. end type
  180. type st_mtrl from w_publ_easyq`st_mtrl within w_rp_sale_cusarea
  181. end type
  182. type st_cust from w_publ_easyq`st_cust within w_rp_sale_cusarea
  183. end type
  184. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_sale_cusarea
  185. boolean visible = true
  186. integer x = 1408
  187. end type
  188. type pb_em1 from w_publ_easyq`pb_em1 within w_rp_sale_cusarea
  189. integer x = 2025
  190. end type
  191. type pb_em2 from w_publ_easyq`pb_em2 within w_rp_sale_cusarea
  192. integer x = 2633
  193. end type
  194. type pb_2 from w_publ_easyq`pb_2 within w_rp_sale_cusarea
  195. integer x = 2738
  196. end type
  197. type cb_help from w_publ_easyq`cb_help within w_rp_sale_cusarea
  198. end type
  199. type cb_copyself from w_publ_easyq`cb_copyself within w_rp_sale_cusarea
  200. end type
  201. type gb_1 from w_publ_easyq`gb_1 within w_rp_sale_cusarea
  202. end type
  203. type ln_bar from w_publ_easyq`ln_bar within w_rp_sale_cusarea
  204. end type
  205. type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_sale_cusarea
  206. end type
  207. type r_bar from w_publ_easyq`r_bar within w_rp_sale_cusarea
  208. end type
  209. type ln_1 from w_publ_easyq`ln_1 within w_rp_sale_cusarea
  210. end type
  211. type ln_2 from w_publ_easyq`ln_2 within w_rp_sale_cusarea
  212. end type
  213. type ln_3 from w_publ_easyq`ln_3 within w_rp_sale_cusarea
  214. end type
  215. type ln_4 from w_publ_easyq`ln_4 within w_rp_sale_cusarea
  216. end type
  217. type ddlb_1 from uo_ddlb_storageid within w_rp_sale_cusarea
  218. integer x = 165
  219. integer y = 192
  220. integer width = 681
  221. integer height = 1108
  222. integer taborder = 50
  223. boolean bringtotop = true
  224. end type
  225. event constructor;call super::constructor;cur_storageid_arr = this.uo_storageid_arr
  226. end event
  227. event selectionchanged;call super::selectionchanged;cur_storageid_arr = this.uo_storageid_arr
  228. cb_1.triggerevent(clicked!)
  229. end event
  230. type ddlb_flag from dropdownlistbox within w_rp_sale_cusarea
  231. integer x = 1001
  232. integer y = 192
  233. integer width = 389
  234. integer height = 484
  235. integer taborder = 90
  236. boolean bringtotop = true
  237. integer textsize = -9
  238. integer weight = 400
  239. fontcharset fontcharset = gb2312charset!
  240. fontpitch fontpitch = variable!
  241. string facename = "宋体"
  242. long textcolor = 33554432
  243. string text = "[全部]"
  244. boolean sorted = false
  245. boolean vscrollbar = true
  246. string item[] = {"[全部]","待仓库审核","待财务审核","审核完毕"}
  247. borderstyle borderstyle = stylelowered!
  248. end type
  249. event selectionchanged;if index=1 then
  250. cur_flag=-1
  251. cur_secflag= -1
  252. elseif index=2 then
  253. cur_flag= 0
  254. cur_secflag= -1
  255. elseif index=3 then
  256. cur_flag= 1
  257. cur_secflag= 0
  258. elseif index=4 then
  259. cur_flag= 1
  260. cur_secflag= 1
  261. end if
  262. cb_1.triggerevent(clicked!)
  263. end event
  264. type tv_1 from uo_tv_cusarea within w_rp_sale_cusarea
  265. integer x = 5
  266. integer y = 300
  267. integer width = 855
  268. integer height = 1464
  269. integer taborder = 20
  270. boolean bringtotop = true
  271. integer textsize = -9
  272. fontcharset fontcharset = gb2312charset!
  273. fontfamily fontfamily = anyfont!
  274. string facename = "宋体"
  275. end type
  276. event selectionchanged;call super::selectionchanged;
  277. ls_areaname = This.uo_cur_info.areaname
  278. ls_areaname = ls_areaname + '%'
  279. ls_sonflag = This.uo_cur_info.sonflag
  280. IF ls_sonflag <> il_sonflag_ori THEN
  281. IF Not cbx_showmx.Checked THEN
  282. IF ls_sonflag = 0 THEN
  283. wf_selectionchanged("HZ")
  284. ELSE
  285. wf_selectionchanged("MX")
  286. END IF
  287. END IF
  288. il_sonflag_ori = ls_sonflag
  289. END IF
  290. cb_1.TriggerEvent(Clicked!)
  291. end event
  292. type st_1 from statictext within w_rp_sale_cusarea
  293. integer x = 5
  294. integer y = 208
  295. integer width = 146
  296. integer height = 48
  297. boolean bringtotop = true
  298. integer textsize = -9
  299. integer weight = 400
  300. fontcharset fontcharset = gb2312charset!
  301. fontpitch fontpitch = variable!
  302. string facename = "宋体"
  303. long textcolor = 33554432
  304. long backcolor = 134217739
  305. string text = "仓库"
  306. alignment alignment = right!
  307. boolean focusrectangle = false
  308. end type
  309. type st_2 from statictext within w_rp_sale_cusarea
  310. integer x = 855
  311. integer y = 208
  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 st_5 from statictext within w_rp_sale_cusarea
  327. integer x = 2345
  328. integer y = 40
  329. integer width = 562
  330. integer height = 48
  331. boolean bringtotop = true
  332. integer textsize = -9
  333. integer weight = 400
  334. fontcharset fontcharset = gb2312charset!
  335. fontpitch fontpitch = variable!
  336. string facename = "宋体"
  337. long textcolor = 255
  338. long backcolor = 67108864
  339. string text = "dw_rp_sale_cusarea_1"
  340. boolean focusrectangle = false
  341. end type
  342. type st_6 from statictext within w_rp_sale_cusarea
  343. integer x = 2345
  344. integer y = 116
  345. integer width = 562
  346. integer height = 48
  347. boolean bringtotop = true
  348. integer textsize = -9
  349. integer weight = 400
  350. fontcharset fontcharset = gb2312charset!
  351. fontpitch fontpitch = variable!
  352. string facename = "宋体"
  353. long textcolor = 255
  354. long backcolor = 67108864
  355. string text = "dw_rp_sale_cusarea_2"
  356. boolean focusrectangle = false
  357. end type
  358. type cbx_showmx from checkbox within w_rp_sale_cusarea
  359. integer x = 2894
  360. integer y = 208
  361. integer width = 411
  362. integer height = 60
  363. boolean bringtotop = true
  364. integer textsize = -9
  365. integer weight = 400
  366. fontcharset fontcharset = gb2312charset!
  367. fontpitch fontpitch = variable!
  368. string facename = "宋体"
  369. long textcolor = 33554432
  370. long backcolor = 134217739
  371. string text = "显示区域明细"
  372. end type
  373. event clicked;IF This.Checked THEN
  374. wf_selectionchanged("MX")
  375. ELSE
  376. IF il_sonflag_ori = 0 THEN
  377. wf_selectionchanged("HZ")
  378. ELSE
  379. wf_selectionchanged("MX")
  380. END IF
  381. END IF
  382. cb_1.TriggerEvent(Clicked!)
  383. end event