w_rp_buy_buytask.srw 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424
  1. $PBExportHeader$w_rp_buy_buytask.srw
  2. forward
  3. global type w_rp_buy_buytask from w_publ_easyq
  4. end type
  5. type ddlb_scid from uo_ddlb_scid within w_rp_buy_buytask
  6. end type
  7. type ddlb_1 from dropdownlistbox within w_rp_buy_buytask
  8. end type
  9. type st_1 from statictext within w_rp_buy_buytask
  10. end type
  11. type st_2 from statictext within w_rp_buy_buytask
  12. end type
  13. type ddlb_status from uo_ddlb_status within w_rp_buy_buytask
  14. end type
  15. type ddlb_4 from dropdownlistbox within w_rp_buy_buytask
  16. end type
  17. end forward
  18. global type w_rp_buy_buytask from w_publ_easyq
  19. string title = "采购订单统计表"
  20. ddlb_scid ddlb_scid
  21. ddlb_1 ddlb_1
  22. st_1 st_1
  23. st_2 st_2
  24. ddlb_status ddlb_status
  25. ddlb_4 ddlb_4
  26. end type
  27. global w_rp_buy_buytask w_rp_buy_buytask
  28. type variables
  29. int cur_status = 0
  30. long cur_scid_arr[]
  31. int cur_shflag = -1
  32. end variables
  33. forward prototypes
  34. public function integer wf_face ()
  35. public subroutine wf_hidecol ()
  36. end prototypes
  37. public function integer wf_face ();dw_1.uf_save_profile_layout()
  38. IF ddlb_1.Text = '明细表' THEN
  39. em_1.Enabled = TRUE
  40. em_2.Enabled = TRUE
  41. ddlb_status.Enabled = TRUE
  42. em_1.Text = String(Today(),'yyyy-mm-dd')
  43. em_2.Text = em_1.Text
  44. dw_1.DataObject = 'dw_rp_buy_buytask'
  45. ELSEIF ddlb_1.Text = '预算收货表' THEN
  46. em_1.Enabled = false
  47. em_2.Enabled = true
  48. ddlb_status.Enabled = false
  49. em_1.Text = String(Today(),'yyyy-mm-dd')
  50. em_2.Text = String(RelativeDate ( Today(), 3 ),'yyyy-mm-dd')
  51. dw_1.DataObject = 'dw_rp_buy_buytask_2'
  52. ELSEIF ddlb_1.Text = '明细表(不含小计)' THEN
  53. em_1.Enabled = TRUE
  54. em_2.Enabled = TRUE
  55. ddlb_status.Enabled = TRUE
  56. em_1.Text = String(Today(),'yyyy-mm-dd')
  57. em_2.Text = em_1.Text
  58. dw_1.DataObject = 'dw_rp_buy_buytask_noxj'
  59. ELSE
  60. em_1.Enabled = FALSE
  61. em_2.Enabled = FALSE
  62. ddlb_status.Enabled = false
  63. em_1.Text = String(Today(),'yyyy-mm-dd')
  64. em_2.Text = em_1.Text
  65. dw_1.DataObject = 'dw_rp_buy_buytask_3'
  66. END IF
  67. wf_replacedw()
  68. cb_1.TriggerEvent(Clicked!)
  69. RETURN 1
  70. end function
  71. public subroutine wf_hidecol ();s_hide_col s_col
  72. s_col.col_1 = 'u_buytaskmx_uprice'
  73. s_col.col_2 = 'u_buytaskmx_rebate'
  74. s_col.col_3 = 'u_buytaskmx_uamt'
  75. s_col.col_4 = 'u_buytaskmx_fprice'
  76. s_col.col_5 = 'u_buytaskmx_tax'
  77. s_col.col_6 = 'u_buytaskmx_uamt_tax'
  78. s_col.col_7 = 'u_buytaskmx_bsamt'
  79. s_col.col_8 = 'u_buytaskmx_bsamt_tax'
  80. f_hide_col(121,dw_1,s_col)
  81. s_hide_col s_col_mtrlsectype
  82. s_col_mtrlsectype.col_1 = 'u_mtrldef_mtrlsectype'
  83. f_hide_col(1308,dw_1,s_col_mtrlsectype)
  84. s_hide_col s_col_zxmtrlmode
  85. s_col_zxmtrlmode.col_1 = 'u_mtrldef_zxmtrlmode'
  86. f_hide_col(1309,dw_1,s_col_zxmtrlmode)
  87. end subroutine
  88. on w_rp_buy_buytask.create
  89. int iCurrent
  90. call super::create
  91. this.ddlb_scid=create ddlb_scid
  92. this.ddlb_1=create ddlb_1
  93. this.st_1=create st_1
  94. this.st_2=create st_2
  95. this.ddlb_status=create ddlb_status
  96. this.ddlb_4=create ddlb_4
  97. iCurrent=UpperBound(this.Control)
  98. this.Control[iCurrent+1]=this.ddlb_scid
  99. this.Control[iCurrent+2]=this.ddlb_1
  100. this.Control[iCurrent+3]=this.st_1
  101. this.Control[iCurrent+4]=this.st_2
  102. this.Control[iCurrent+5]=this.ddlb_status
  103. this.Control[iCurrent+6]=this.ddlb_4
  104. end on
  105. on w_rp_buy_buytask.destroy
  106. call super::destroy
  107. destroy(this.ddlb_scid)
  108. destroy(this.ddlb_1)
  109. destroy(this.st_1)
  110. destroy(this.st_2)
  111. destroy(this.ddlb_status)
  112. destroy(this.ddlb_4)
  113. end on
  114. type cb_func from w_publ_easyq`cb_func within w_rp_buy_buytask
  115. end type
  116. type cb_exit from w_publ_easyq`cb_exit within w_rp_buy_buytask
  117. end type
  118. type cb_2 from w_publ_easyq`cb_2 within w_rp_buy_buytask
  119. boolean bringtotop = true
  120. end type
  121. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_buy_buytask
  122. boolean bringtotop = true
  123. end type
  124. type cb_1 from w_publ_easyq`cb_1 within w_rp_buy_buytask
  125. boolean bringtotop = true
  126. end type
  127. event cb_1::clicked;call super::clicked;datetime firstdate,enddate
  128. firstdate = DATEtime(date(EM_1.TEXT),time(0))
  129. enddate = datetime(date(EM_2.TEXT),time('23:59:59'))
  130. dw_1.Retrieve(cur_scid_arr,cur_status,firstdate,enddate,sys_user_spttype,cur_shflag )
  131. end event
  132. type st_3 from w_publ_easyq`st_3 within w_rp_buy_buytask
  133. integer x = 1367
  134. integer y = 204
  135. integer width = 197
  136. alignment alignment = left!
  137. end type
  138. type st_4 from w_publ_easyq`st_4 within w_rp_buy_buytask
  139. integer x = 2066
  140. integer y = 204
  141. end type
  142. type em_1 from w_publ_easyq`em_1 within w_rp_buy_buytask
  143. integer x = 1563
  144. integer y = 188
  145. end type
  146. type em_2 from w_publ_easyq`em_2 within w_rp_buy_buytask
  147. integer x = 2171
  148. integer y = 188
  149. end type
  150. type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_buy_buytask
  151. integer x = 1550
  152. integer y = 8
  153. end type
  154. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_buy_buytask
  155. integer x = 1339
  156. integer y = 8
  157. end type
  158. type dw_1 from w_publ_easyq`dw_1 within w_rp_buy_buytask
  159. integer y = 300
  160. integer width = 3122
  161. integer height = 1232
  162. string dataobject = "dw_rp_buy_buytask"
  163. end type
  164. event dw_1::doubleclicked;call super::doubleclicked;IF dw_1.DataObject = 'dw_rp_buy_buytask' THEN
  165. IF row > 0 THEN
  166. String ls_code
  167. Long ll_scid
  168. ll_scid = THIS.Object.u_saletask_taskid[row]
  169. ls_code = THIS.Object.u_saletask_taskcode[row]
  170. f_open_win(ll_scid,ls_code)
  171. END IF
  172. END IF
  173. end event
  174. type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_buy_buytask
  175. end type
  176. type sle_cust from w_publ_easyq`sle_cust within w_rp_buy_buytask
  177. end type
  178. type st_mtrl from w_publ_easyq`st_mtrl within w_rp_buy_buytask
  179. end type
  180. type st_cust from w_publ_easyq`st_cust within w_rp_buy_buytask
  181. end type
  182. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_buy_buytask
  183. boolean visible = true
  184. integer x = 1339
  185. integer y = 96
  186. end type
  187. type pb_em1 from w_publ_easyq`pb_em1 within w_rp_buy_buytask
  188. integer x = 1975
  189. integer y = 188
  190. end type
  191. type pb_em2 from w_publ_easyq`pb_em2 within w_rp_buy_buytask
  192. integer x = 2583
  193. integer y = 188
  194. end type
  195. type pb_2 from w_publ_easyq`pb_2 within w_rp_buy_buytask
  196. integer x = 2688
  197. integer y = 188
  198. end type
  199. type cb_help from w_publ_easyq`cb_help within w_rp_buy_buytask
  200. end type
  201. type cb_copyself from w_publ_easyq`cb_copyself within w_rp_buy_buytask
  202. end type
  203. type gb_1 from w_publ_easyq`gb_1 within w_rp_buy_buytask
  204. end type
  205. type ln_bar from w_publ_easyq`ln_bar within w_rp_buy_buytask
  206. end type
  207. type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_buy_buytask
  208. end type
  209. type r_bar from w_publ_easyq`r_bar within w_rp_buy_buytask
  210. end type
  211. type ln_1 from w_publ_easyq`ln_1 within w_rp_buy_buytask
  212. end type
  213. type ln_2 from w_publ_easyq`ln_2 within w_rp_buy_buytask
  214. end type
  215. type ln_3 from w_publ_easyq`ln_3 within w_rp_buy_buytask
  216. end type
  217. type ln_4 from w_publ_easyq`ln_4 within w_rp_buy_buytask
  218. integer beginx = -5
  219. integer endx = 2043
  220. end type
  221. type ddlb_scid from uo_ddlb_scid within w_rp_buy_buytask
  222. integer x = 165
  223. integer y = 192
  224. integer width = 558
  225. integer height = 756
  226. integer taborder = 20
  227. boolean bringtotop = true
  228. end type
  229. event constructor;call super::constructor;cur_scid_arr = THIS.uo_scid_arr
  230. end event
  231. event selectionchanged;call super::selectionchanged;
  232. cur_scid_arr = THIS.uo_scid_arr
  233. cb_1.triggerevent(clicked!)
  234. end event
  235. type ddlb_1 from dropdownlistbox within w_rp_buy_buytask
  236. integer x = 1947
  237. integer y = 36
  238. integer width = 617
  239. integer height = 756
  240. integer taborder = 110
  241. boolean bringtotop = true
  242. integer textsize = -9
  243. integer weight = 400
  244. fontcharset fontcharset = gb2312charset!
  245. fontpitch fontpitch = variable!
  246. string facename = "宋体"
  247. long textcolor = 33554432
  248. string text = "明细表"
  249. boolean sorted = false
  250. string item[] = {"明细表","预算收货表","超期报表","明细表(不含小计)"}
  251. borderstyle borderstyle = stylelowered!
  252. end type
  253. event selectionchanged;wf_face()
  254. end event
  255. type st_1 from statictext within w_rp_buy_buytask
  256. integer x = 5
  257. integer y = 208
  258. integer width = 146
  259. integer height = 48
  260. boolean bringtotop = true
  261. integer textsize = -9
  262. integer weight = 400
  263. fontcharset fontcharset = gb2312charset!
  264. fontpitch fontpitch = variable!
  265. string facename = "宋体"
  266. long textcolor = 33554432
  267. long backcolor = 134217739
  268. string text = "分部"
  269. alignment alignment = right!
  270. boolean focusrectangle = false
  271. end type
  272. type st_2 from statictext within w_rp_buy_buytask
  273. integer x = 768
  274. integer y = 204
  275. integer width = 128
  276. integer height = 48
  277. boolean bringtotop = true
  278. integer textsize = -9
  279. integer weight = 400
  280. fontcharset fontcharset = gb2312charset!
  281. fontpitch fontpitch = variable!
  282. string facename = "宋体"
  283. long textcolor = 33554432
  284. long backcolor = 134217739
  285. string text = "状态"
  286. alignment alignment = right!
  287. boolean focusrectangle = false
  288. end type
  289. type ddlb_status from uo_ddlb_status within w_rp_buy_buytask
  290. integer x = 914
  291. integer y = 192
  292. integer width = 402
  293. integer taborder = 110
  294. boolean bringtotop = true
  295. string item[] = {"[全部]","待审批[0]","在进行[1]","已暂停[2]","已终止[3]","自动完成[5]","手动完成[6]"}
  296. end type
  297. event selectionchanged;call super::selectionchanged;cb_1.PostEvent(Clicked!)
  298. end event
  299. event uof_getvalue;call super::uof_getvalue;cur_status = this.uo_status
  300. end event
  301. type ddlb_4 from dropdownlistbox within w_rp_buy_buytask
  302. integer x = 3090
  303. integer y = 188
  304. integer width = 306
  305. integer height = 856
  306. integer taborder = 130
  307. boolean bringtotop = true
  308. integer textsize = -9
  309. integer weight = 400
  310. fontcharset fontcharset = gb2312charset!
  311. fontpitch fontpitch = variable!
  312. string facename = "宋体"
  313. long textcolor = 33554432
  314. string text = "[全部]"
  315. boolean sorted = false
  316. boolean vscrollbar = true
  317. string item[] = {"[全部]","已收完货[0]","未收完货[1]"}
  318. borderstyle borderstyle = stylelowered!
  319. end type
  320. event constructor;cur_shflag=long(f_ProfileString (sys_empid, parent.classname(), "shflag", "-1"))
  321. choose case cur_shflag
  322. case -1
  323. this.text="[全部]"
  324. case 0
  325. this.text="已收完货[0]"
  326. case 1
  327. this.text="未收完货[1]"
  328. case else
  329. this.text="[全部]"
  330. end choose
  331. end event
  332. event selectionchanged;choose case index
  333. case 1
  334. cur_shflag = -1
  335. case 2 //已发货
  336. cur_shflag=0
  337. case 3 //未发货
  338. cur_shflag=1
  339. case else
  340. cur_shflag= -1
  341. end choose
  342. cb_1.triggerevent(clicked!)
  343. end event