w_rp_sale_cusarea.srw 11 KB

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