w_rp_buy_buytask.srw 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427
  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. s_col.col_9 = 'u_buytask_mstpayamt'
  81. s_col.col_10 = 'u_buytask_payamt'
  82. s_col.col_11 = 'nopayamt'
  83. f_hide_col(121,dw_1,s_col)
  84. s_hide_col s_col_mtrlsectype
  85. s_col_mtrlsectype.col_1 = 'u_mtrldef_mtrlsectype'
  86. f_hide_col(1308,dw_1,s_col_mtrlsectype)
  87. s_hide_col s_col_zxmtrlmode
  88. s_col_zxmtrlmode.col_1 = 'u_mtrldef_zxmtrlmode'
  89. f_hide_col(1309,dw_1,s_col_zxmtrlmode)
  90. end subroutine
  91. on w_rp_buy_buytask.create
  92. int iCurrent
  93. call super::create
  94. this.ddlb_scid=create ddlb_scid
  95. this.ddlb_1=create ddlb_1
  96. this.st_1=create st_1
  97. this.st_2=create st_2
  98. this.ddlb_status=create ddlb_status
  99. this.ddlb_4=create ddlb_4
  100. iCurrent=UpperBound(this.Control)
  101. this.Control[iCurrent+1]=this.ddlb_scid
  102. this.Control[iCurrent+2]=this.ddlb_1
  103. this.Control[iCurrent+3]=this.st_1
  104. this.Control[iCurrent+4]=this.st_2
  105. this.Control[iCurrent+5]=this.ddlb_status
  106. this.Control[iCurrent+6]=this.ddlb_4
  107. end on
  108. on w_rp_buy_buytask.destroy
  109. call super::destroy
  110. destroy(this.ddlb_scid)
  111. destroy(this.ddlb_1)
  112. destroy(this.st_1)
  113. destroy(this.st_2)
  114. destroy(this.ddlb_status)
  115. destroy(this.ddlb_4)
  116. end on
  117. type cb_func from w_publ_easyq`cb_func within w_rp_buy_buytask
  118. end type
  119. type cb_exit from w_publ_easyq`cb_exit within w_rp_buy_buytask
  120. end type
  121. type cb_2 from w_publ_easyq`cb_2 within w_rp_buy_buytask
  122. boolean bringtotop = true
  123. end type
  124. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_buy_buytask
  125. boolean bringtotop = true
  126. end type
  127. type cb_1 from w_publ_easyq`cb_1 within w_rp_buy_buytask
  128. boolean bringtotop = true
  129. end type
  130. event cb_1::clicked;call super::clicked;datetime firstdate,enddate
  131. firstdate = DATEtime(date(EM_1.TEXT),time(0))
  132. enddate = datetime(date(EM_2.TEXT),time('23:59:59'))
  133. dw_1.Retrieve(cur_scid_arr,cur_status,firstdate,enddate,sys_user_spttype,cur_shflag )
  134. end event
  135. type st_3 from w_publ_easyq`st_3 within w_rp_buy_buytask
  136. integer x = 1367
  137. integer y = 204
  138. integer width = 197
  139. alignment alignment = left!
  140. end type
  141. type st_4 from w_publ_easyq`st_4 within w_rp_buy_buytask
  142. integer x = 2066
  143. integer y = 204
  144. end type
  145. type em_1 from w_publ_easyq`em_1 within w_rp_buy_buytask
  146. integer x = 1563
  147. integer y = 188
  148. end type
  149. type em_2 from w_publ_easyq`em_2 within w_rp_buy_buytask
  150. integer x = 2171
  151. integer y = 188
  152. end type
  153. type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_buy_buytask
  154. integer x = 1550
  155. integer y = 8
  156. end type
  157. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_buy_buytask
  158. integer x = 1339
  159. integer y = 8
  160. end type
  161. type dw_1 from w_publ_easyq`dw_1 within w_rp_buy_buytask
  162. integer y = 300
  163. integer width = 3122
  164. integer height = 1232
  165. string dataobject = "dw_rp_buy_buytask"
  166. end type
  167. event dw_1::doubleclicked;call super::doubleclicked;IF dw_1.DataObject = 'dw_rp_buy_buytask' THEN
  168. IF row > 0 THEN
  169. String ls_code
  170. Long ll_scid
  171. ll_scid = THIS.Object.u_saletask_taskid[row]
  172. ls_code = THIS.Object.u_saletask_taskcode[row]
  173. f_open_win(ll_scid,ls_code)
  174. END IF
  175. END IF
  176. end event
  177. type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_buy_buytask
  178. end type
  179. type sle_cust from w_publ_easyq`sle_cust within w_rp_buy_buytask
  180. end type
  181. type st_mtrl from w_publ_easyq`st_mtrl within w_rp_buy_buytask
  182. end type
  183. type st_cust from w_publ_easyq`st_cust within w_rp_buy_buytask
  184. end type
  185. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_buy_buytask
  186. boolean visible = true
  187. integer x = 1339
  188. integer y = 96
  189. end type
  190. type pb_em1 from w_publ_easyq`pb_em1 within w_rp_buy_buytask
  191. integer x = 1975
  192. integer y = 188
  193. end type
  194. type pb_em2 from w_publ_easyq`pb_em2 within w_rp_buy_buytask
  195. integer x = 2583
  196. integer y = 188
  197. end type
  198. type pb_2 from w_publ_easyq`pb_2 within w_rp_buy_buytask
  199. integer x = 2688
  200. integer y = 188
  201. end type
  202. type cb_help from w_publ_easyq`cb_help within w_rp_buy_buytask
  203. end type
  204. type cb_copyself from w_publ_easyq`cb_copyself within w_rp_buy_buytask
  205. end type
  206. type gb_1 from w_publ_easyq`gb_1 within w_rp_buy_buytask
  207. end type
  208. type ln_bar from w_publ_easyq`ln_bar within w_rp_buy_buytask
  209. end type
  210. type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_buy_buytask
  211. end type
  212. type r_bar from w_publ_easyq`r_bar within w_rp_buy_buytask
  213. end type
  214. type ln_1 from w_publ_easyq`ln_1 within w_rp_buy_buytask
  215. end type
  216. type ln_2 from w_publ_easyq`ln_2 within w_rp_buy_buytask
  217. end type
  218. type ln_3 from w_publ_easyq`ln_3 within w_rp_buy_buytask
  219. end type
  220. type ln_4 from w_publ_easyq`ln_4 within w_rp_buy_buytask
  221. integer beginx = -5
  222. integer endx = 2043
  223. end type
  224. type ddlb_scid from uo_ddlb_scid within w_rp_buy_buytask
  225. integer x = 165
  226. integer y = 192
  227. integer width = 558
  228. integer height = 756
  229. integer taborder = 20
  230. boolean bringtotop = true
  231. end type
  232. event constructor;call super::constructor;cur_scid_arr = THIS.uo_scid_arr
  233. end event
  234. event selectionchanged;call super::selectionchanged;
  235. cur_scid_arr = THIS.uo_scid_arr
  236. cb_1.triggerevent(clicked!)
  237. end event
  238. type ddlb_1 from dropdownlistbox within w_rp_buy_buytask
  239. integer x = 1947
  240. integer y = 36
  241. integer width = 617
  242. integer height = 756
  243. integer taborder = 110
  244. boolean bringtotop = true
  245. integer textsize = -9
  246. integer weight = 400
  247. fontcharset fontcharset = gb2312charset!
  248. fontpitch fontpitch = variable!
  249. string facename = "宋体"
  250. long textcolor = 33554432
  251. string text = "明细表"
  252. boolean sorted = false
  253. string item[] = {"明细表","预算收货表","超期报表","明细表(不含小计)"}
  254. borderstyle borderstyle = stylelowered!
  255. end type
  256. event selectionchanged;wf_face()
  257. end event
  258. type st_1 from statictext within w_rp_buy_buytask
  259. integer x = 5
  260. integer y = 208
  261. integer width = 146
  262. integer height = 48
  263. boolean bringtotop = true
  264. integer textsize = -9
  265. integer weight = 400
  266. fontcharset fontcharset = gb2312charset!
  267. fontpitch fontpitch = variable!
  268. string facename = "宋体"
  269. long textcolor = 33554432
  270. long backcolor = 134217739
  271. string text = "分部"
  272. alignment alignment = right!
  273. boolean focusrectangle = false
  274. end type
  275. type st_2 from statictext within w_rp_buy_buytask
  276. integer x = 768
  277. integer y = 204
  278. integer width = 128
  279. integer height = 48
  280. boolean bringtotop = true
  281. integer textsize = -9
  282. integer weight = 400
  283. fontcharset fontcharset = gb2312charset!
  284. fontpitch fontpitch = variable!
  285. string facename = "宋体"
  286. long textcolor = 33554432
  287. long backcolor = 134217739
  288. string text = "状态"
  289. alignment alignment = right!
  290. boolean focusrectangle = false
  291. end type
  292. type ddlb_status from uo_ddlb_status within w_rp_buy_buytask
  293. integer x = 914
  294. integer y = 192
  295. integer width = 402
  296. integer taborder = 110
  297. boolean bringtotop = true
  298. string item[] = {"[全部]","待审批[0]","在进行[1]","已暂停[2]","已终止[3]","自动完成[5]","手动完成[6]"}
  299. end type
  300. event selectionchanged;call super::selectionchanged;cb_1.PostEvent(Clicked!)
  301. end event
  302. event uof_getvalue;call super::uof_getvalue;cur_status = this.uo_status
  303. end event
  304. type ddlb_4 from dropdownlistbox within w_rp_buy_buytask
  305. integer x = 3090
  306. integer y = 188
  307. integer width = 306
  308. integer height = 856
  309. integer taborder = 130
  310. boolean bringtotop = true
  311. integer textsize = -9
  312. integer weight = 400
  313. fontcharset fontcharset = gb2312charset!
  314. fontpitch fontpitch = variable!
  315. string facename = "宋体"
  316. long textcolor = 33554432
  317. string text = "[全部]"
  318. boolean sorted = false
  319. boolean vscrollbar = true
  320. string item[] = {"[全部]","已收完货[0]","未收完货[1]"}
  321. borderstyle borderstyle = stylelowered!
  322. end type
  323. event constructor;cur_shflag=long(f_ProfileString (sys_empid, parent.classname(), "shflag", "-1"))
  324. choose case cur_shflag
  325. case -1
  326. this.text="[全部]"
  327. case 0
  328. this.text="已收完货[0]"
  329. case 1
  330. this.text="未收完货[1]"
  331. case else
  332. this.text="[全部]"
  333. end choose
  334. end event
  335. event selectionchanged;choose case index
  336. case 1
  337. cur_shflag = -1
  338. case 2 //已发货
  339. cur_shflag=0
  340. case 3 //未发货
  341. cur_shflag=1
  342. case else
  343. cur_shflag= -1
  344. end choose
  345. cb_1.triggerevent(clicked!)
  346. end event