w_rp_sale_cusarea.srw 11 KB

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