w_rp_sale_saler.srw 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451
  1. $PBExportHeader$w_rp_sale_saler.srw
  2. forward
  3. global type w_rp_sale_saler from w_publ_easyq
  4. end type
  5. type ddlb_flag from dropdownlistbox within w_rp_sale_saler
  6. end type
  7. type ddlb_2 from dropdownlistbox within w_rp_sale_saler
  8. end type
  9. type st_2 from statictext within w_rp_sale_saler
  10. end type
  11. type ddlb_scid from uo_ddlb_scid within w_rp_sale_saler
  12. end type
  13. type st_5 from statictext within w_rp_sale_saler
  14. end type
  15. type ddlb_1 from uo_ddlb_storageid within w_rp_sale_saler
  16. end type
  17. type st_1 from statictext within w_rp_sale_saler
  18. end type
  19. end forward
  20. global type w_rp_sale_saler from w_publ_easyq
  21. string title = "业务员销售统计表"
  22. ddlb_flag ddlb_flag
  23. ddlb_2 ddlb_2
  24. st_2 st_2
  25. ddlb_scid ddlb_scid
  26. st_5 st_5
  27. ddlb_1 ddlb_1
  28. st_1 st_1
  29. end type
  30. global w_rp_sale_saler w_rp_sale_saler
  31. type variables
  32. long cur_flag= -1 //-1:全部,0仓库未审,1仓库已审核
  33. long cur_secflag= -1 //-1:全部,0财务未审
  34. long cur_scid_arr[]
  35. Long cur_storageid_arr[]
  36. long cur_storageid = 0
  37. end variables
  38. forward prototypes
  39. public subroutine wf_hidecol ()
  40. end prototypes
  41. public subroutine wf_hidecol ();IF dw_1.DataObject = 'dw_rp_sale_saler_mx' THEN
  42. s_hide_col s_col1, s_col2,s_col3
  43. s_col1.col_1 = 'costamt'
  44. f_hide_col(490,dw_1,s_col1)
  45. s_col3.col_1 = 'u_outwaremx_fprice'
  46. s_col3.col_2 = 'u_outwaremx_rebate'
  47. s_col3.col_3 = 'u_outwaremx_price'
  48. s_col3.col_4 = 'amt'
  49. s_col3.col_5 = 'u_outwaremx_ware_fprice'
  50. s_col3.col_6 = 'ware_amt'
  51. s_col3.col_7 = 'u_outware_otheramt'
  52. f_hide_col(122,dw_1,s_col3)
  53. END IF
  54. s_col2.col_1 = 'gpamt'
  55. s_col2.col_2 = 'gpr'
  56. f_hide_col(843,dw_1,s_col2)
  57. s_col1.col_1 = 'costamt'
  58. f_hide_col(123,dw_1,s_col1)
  59. s_col1.col_1 = 'costamt'
  60. f_hide_col(490,dw_1,s_col1)
  61. s_hide_col s_col_plan
  62. s_col_plan.col_1 = '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_saler.create
  68. int iCurrent
  69. call super::create
  70. this.ddlb_flag=create ddlb_flag
  71. this.ddlb_2=create ddlb_2
  72. this.st_2=create st_2
  73. this.ddlb_scid=create ddlb_scid
  74. this.st_5=create st_5
  75. this.ddlb_1=create ddlb_1
  76. this.st_1=create st_1
  77. iCurrent=UpperBound(this.Control)
  78. this.Control[iCurrent+1]=this.ddlb_flag
  79. this.Control[iCurrent+2]=this.ddlb_2
  80. this.Control[iCurrent+3]=this.st_2
  81. this.Control[iCurrent+4]=this.ddlb_scid
  82. this.Control[iCurrent+5]=this.st_5
  83. this.Control[iCurrent+6]=this.ddlb_1
  84. this.Control[iCurrent+7]=this.st_1
  85. end on
  86. on w_rp_sale_saler.destroy
  87. call super::destroy
  88. destroy(this.ddlb_flag)
  89. destroy(this.ddlb_2)
  90. destroy(this.st_2)
  91. destroy(this.ddlb_scid)
  92. destroy(this.st_5)
  93. destroy(this.ddlb_1)
  94. destroy(this.st_1)
  95. end on
  96. type cb_func from w_publ_easyq`cb_func within w_rp_sale_saler
  97. end type
  98. type cb_exit from w_publ_easyq`cb_exit within w_rp_sale_saler
  99. end type
  100. type cb_2 from w_publ_easyq`cb_2 within w_rp_sale_saler
  101. boolean bringtotop = true
  102. end type
  103. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_sale_saler
  104. boolean bringtotop = true
  105. end type
  106. type cb_1 from w_publ_easyq`cb_1 within w_rp_sale_saler
  107. boolean bringtotop = true
  108. end type
  109. event cb_1::clicked;Int ls_flag = 0
  110. DateTime first_date,end_date
  111. first_date = DateTime(Date(em_1.Text),Time(0))
  112. end_date = DateTime(Date(em_2.Text),Time('23:59:59'))
  113. IF first_date < sys_showsaledata_mindt THEN first_date= sys_showsaledata_mindt
  114. Int li_option_outrep,li_option_opemp
  115. string ls_option_opemp
  116. IF sys_power_issuper THEN
  117. li_option_outrep = 0
  118. ELSE
  119. li_option_outrep = sys_option_outrep
  120. END IF
  121. IF sys_power_issuper THEN
  122. li_option_opemp = 0
  123. // ls_option_opemp = publ_operator
  124. ELSE
  125. li_option_opemp = sys_option_opemp_sale
  126. ls_option_opemp = publ_operator
  127. END IF
  128. dw_1.Retrieve(cur_scid_arr,cur_storageid_arr,first_date,end_date,cur_flag,cur_secflag,sys_areaid, sys_user_outrep, li_option_outrep,ls_option_opemp,li_option_opemp)
  129. end event
  130. type st_3 from w_publ_easyq`st_3 within w_rp_sale_saler
  131. integer x = 2075
  132. integer y = 204
  133. integer width = 210
  134. alignment alignment = left!
  135. end type
  136. type st_4 from w_publ_easyq`st_4 within w_rp_sale_saler
  137. integer x = 2789
  138. integer y = 204
  139. end type
  140. type em_1 from w_publ_easyq`em_1 within w_rp_sale_saler
  141. integer x = 2277
  142. integer y = 188
  143. integer taborder = 120
  144. end type
  145. type em_2 from w_publ_easyq`em_2 within w_rp_sale_saler
  146. integer x = 2894
  147. integer y = 188
  148. integer taborder = 130
  149. end type
  150. type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_sale_saler
  151. integer x = 1563
  152. integer y = 4
  153. end type
  154. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_sale_saler
  155. integer x = 1353
  156. integer y = 8
  157. end type
  158. type dw_1 from w_publ_easyq`dw_1 within w_rp_sale_saler
  159. integer y = 288
  160. integer width = 2665
  161. integer height = 1044
  162. string dataobject = "dw_rp_sale_saler_mx"
  163. end type
  164. event dw_1::doubleclicked;call super::doubleclicked;IF dw_1.DataObject = 'dw_rp_sale_saler_mx' or dw_1.DataObject = 'dw_rp_sale_saler_mx_b' THEN
  165. IF row > 0 THEN
  166. String ls_code
  167. Long ll_scid
  168. // Int li_thflag
  169. ll_scid = THIS.Object.u_outware_scid[row]
  170. ls_code = THIS.Object.u_outware_outwarecode[row]
  171. // li_thflag = THIS.Object.u_outware_thflag[row]
  172. f_open_win(ll_scid,ls_code)
  173. END IF
  174. END IF
  175. end event
  176. type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_sale_saler
  177. end type
  178. type sle_cust from w_publ_easyq`sle_cust within w_rp_sale_saler
  179. end type
  180. type st_mtrl from w_publ_easyq`st_mtrl within w_rp_sale_saler
  181. end type
  182. type st_cust from w_publ_easyq`st_cust within w_rp_sale_saler
  183. end type
  184. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_sale_saler
  185. boolean visible = true
  186. integer x = 1353
  187. end type
  188. type pb_em1 from w_publ_easyq`pb_em1 within w_rp_sale_saler
  189. integer x = 2693
  190. integer y = 188
  191. end type
  192. type pb_em2 from w_publ_easyq`pb_em2 within w_rp_sale_saler
  193. integer x = 3310
  194. integer y = 188
  195. end type
  196. type pb_2 from w_publ_easyq`pb_2 within w_rp_sale_saler
  197. integer x = 3419
  198. integer y = 188
  199. end type
  200. type cb_help from w_publ_easyq`cb_help within w_rp_sale_saler
  201. end type
  202. type cb_copyself from w_publ_easyq`cb_copyself within w_rp_sale_saler
  203. end type
  204. type gb_1 from w_publ_easyq`gb_1 within w_rp_sale_saler
  205. end type
  206. type ln_bar from w_publ_easyq`ln_bar within w_rp_sale_saler
  207. end type
  208. type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_sale_saler
  209. end type
  210. type r_bar from w_publ_easyq`r_bar within w_rp_sale_saler
  211. end type
  212. type ln_1 from w_publ_easyq`ln_1 within w_rp_sale_saler
  213. integer beginy = 280
  214. integer endy = 280
  215. end type
  216. type ln_2 from w_publ_easyq`ln_2 within w_rp_sale_saler
  217. integer beginy = 284
  218. integer endy = 284
  219. end type
  220. type ln_3 from w_publ_easyq`ln_3 within w_rp_sale_saler
  221. end type
  222. type ln_4 from w_publ_easyq`ln_4 within w_rp_sale_saler
  223. end type
  224. type ddlb_flag from dropdownlistbox within w_rp_sale_saler
  225. integer x = 1609
  226. integer y = 188
  227. integer width = 457
  228. integer height = 484
  229. integer taborder = 90
  230. boolean bringtotop = true
  231. integer textsize = -9
  232. integer weight = 400
  233. fontcharset fontcharset = gb2312charset!
  234. fontpitch fontpitch = variable!
  235. string facename = "宋体"
  236. long textcolor = 33554432
  237. string text = "[全部]"
  238. boolean sorted = false
  239. boolean vscrollbar = true
  240. string item[] = {"[全部]","待仓库审核","待财务审核","审核完毕"}
  241. borderstyle borderstyle = stylelowered!
  242. end type
  243. event selectionchanged;if index=1 then
  244. cur_flag=-1
  245. cur_secflag= -1
  246. elseif index=2 then
  247. cur_flag= 0
  248. cur_secflag= -1
  249. elseif index=3 then
  250. cur_flag= 1
  251. cur_secflag= 0
  252. elseif index=4 then
  253. cur_flag= 1
  254. cur_secflag= 1
  255. end if
  256. cb_1.triggerevent(clicked!)
  257. end event
  258. type ddlb_2 from dropdownlistbox within w_rp_sale_saler
  259. integer x = 1961
  260. integer y = 48
  261. integer width = 411
  262. integer height = 448
  263. integer taborder = 90
  264. boolean bringtotop = true
  265. integer textsize = -9
  266. integer weight = 400
  267. fontcharset fontcharset = gb2312charset!
  268. fontpitch fontpitch = variable!
  269. string facename = "宋体"
  270. long textcolor = 33554432
  271. string text = "明细表"
  272. boolean sorted = false
  273. boolean vscrollbar = true
  274. string item[] = {"明细表","汇总表","销售额排名"}
  275. borderstyle borderstyle = stylelowered!
  276. end type
  277. event selectionchanged;dw_1.uf_save_profile_layout()
  278. IF ddlb_2.Text = '明细表' THEN
  279. // IF sys_version = 802001 THEN //商业版
  280. // dw_1.DataObject = 'dw_rp_sale_saler_mx_b'
  281. // ELSE //工业版
  282. dw_1.DataObject = 'dw_rp_sale_saler_mx'
  283. // END IF
  284. ELSEIF ddlb_2.Text = '汇总表' THEN
  285. dw_1.DataObject = 'dw_rp_sale_saler_hz'
  286. ELSEIF ddlb_2.Text = '销售额排名' THEN
  287. dw_1.DataObject = 'dw_rp_sale_saler_hz_1'
  288. END IF
  289. wf_replacedw()
  290. cb_1.TriggerEvent(Clicked!)
  291. end event
  292. type st_2 from statictext within w_rp_sale_saler
  293. integer x = 1467
  294. integer y = 204
  295. integer width = 128
  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 ddlb_scid from uo_ddlb_scid within w_rp_sale_saler
  310. integer x = 142
  311. integer y = 188
  312. integer width = 480
  313. integer height = 620
  314. integer taborder = 150
  315. boolean bringtotop = true
  316. end type
  317. event constructor;call super::constructor;cur_scid_arr = THIS.uo_scid_arr
  318. end event
  319. event selectionchanged;call super::selectionchanged;
  320. cur_scid_arr = THIS.uo_scid_arr
  321. cb_1.triggerevent(clicked!)
  322. end event
  323. type st_5 from statictext within w_rp_sale_saler
  324. integer x = 5
  325. integer y = 204
  326. integer width = 128
  327. integer height = 48
  328. boolean bringtotop = true
  329. integer textsize = -9
  330. integer weight = 400
  331. fontcharset fontcharset = gb2312charset!
  332. fontpitch fontpitch = variable!
  333. string facename = "宋体"
  334. long textcolor = 33554432
  335. long backcolor = 134217739
  336. string text = "分部"
  337. alignment alignment = right!
  338. boolean focusrectangle = false
  339. end type
  340. type ddlb_1 from uo_ddlb_storageid within w_rp_sale_saler
  341. integer x = 795
  342. integer y = 188
  343. integer width = 681
  344. integer height = 1108
  345. integer taborder = 30
  346. boolean bringtotop = true
  347. end type
  348. event constructor;call super::constructor;cur_storageid_arr = this.uo_storageid_arr
  349. cur_storageid = this.uo_storageid
  350. end event
  351. event selectionchanged;call super::selectionchanged;cur_storageid_arr = this.uo_storageid_arr
  352. cur_storageid = this.uo_storageid
  353. cb_1.triggerevent(clicked!)
  354. end event
  355. type st_1 from statictext within w_rp_sale_saler
  356. integer x = 622
  357. integer y = 208
  358. integer width = 146
  359. integer height = 48
  360. boolean bringtotop = true
  361. integer textsize = -9
  362. integer weight = 400
  363. fontcharset fontcharset = gb2312charset!
  364. fontpitch fontpitch = variable!
  365. string facename = "宋体"
  366. long textcolor = 33554432
  367. long backcolor = 134217739
  368. string text = "仓库"
  369. alignment alignment = right!
  370. boolean focusrectangle = false
  371. end type