w_rp_sc_taskwork.srw 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  1. $PBExportHeader$w_rp_sc_taskwork.srw
  2. forward
  3. global type w_rp_sc_taskwork from w_publ_easyq
  4. end type
  5. type ddlb_1 from dropdownlistbox within w_rp_sc_taskwork
  6. end type
  7. type ddlb_type from dropdownlistbox within w_rp_sc_taskwork
  8. end type
  9. type em_mth from editmask within w_rp_sc_taskwork
  10. end type
  11. type st_1 from statictext within w_rp_sc_taskwork
  12. end type
  13. type cbx_1 from checkbox within w_rp_sc_taskwork
  14. end type
  15. end forward
  16. global type w_rp_sc_taskwork from w_publ_easyq
  17. string title = "产品个人工序计件单统计表"
  18. ddlb_1 ddlb_1
  19. ddlb_type ddlb_type
  20. em_mth em_mth
  21. st_1 st_1
  22. cbx_1 cbx_1
  23. end type
  24. global w_rp_sc_taskwork w_rp_sc_taskwork
  25. type variables
  26. int il_type = 0
  27. int cur_flag = -1
  28. end variables
  29. on w_rp_sc_taskwork.create
  30. int iCurrent
  31. call super::create
  32. this.ddlb_1=create ddlb_1
  33. this.ddlb_type=create ddlb_type
  34. this.em_mth=create em_mth
  35. this.st_1=create st_1
  36. this.cbx_1=create cbx_1
  37. iCurrent=UpperBound(this.Control)
  38. this.Control[iCurrent+1]=this.ddlb_1
  39. this.Control[iCurrent+2]=this.ddlb_type
  40. this.Control[iCurrent+3]=this.em_mth
  41. this.Control[iCurrent+4]=this.st_1
  42. this.Control[iCurrent+5]=this.cbx_1
  43. end on
  44. on w_rp_sc_taskwork.destroy
  45. call super::destroy
  46. destroy(this.ddlb_1)
  47. destroy(this.ddlb_type)
  48. destroy(this.em_mth)
  49. destroy(this.st_1)
  50. destroy(this.cbx_1)
  51. end on
  52. event open;call super::open;//EM_1.TEXT=string(today(),'yyyy-mm')+'-01'
  53. //IF cbx_loginretr.Checked THEN
  54. // cb_1.TriggerEvent(Clicked!)
  55. //END IF
  56. end event
  57. event ue_before_open;call super::ue_before_open;if_ue_filter=true
  58. if_ue_sort=true
  59. if_ue_sentdataout=true
  60. wf_replacedw()
  61. end event
  62. event ue_before_openretrieve;call super::ue_before_openretrieve;EM_1.TEXT=string(today(),'yyyy-mm')+'-01'
  63. end event
  64. event close;call super::close;f_SetProfileString(SYS_empid, this.classname(), "cur_flag", string(cur_flag))
  65. end event
  66. type cb_func from w_publ_easyq`cb_func within w_rp_sc_taskwork
  67. end type
  68. type cb_exit from w_publ_easyq`cb_exit within w_rp_sc_taskwork
  69. end type
  70. type cb_2 from w_publ_easyq`cb_2 within w_rp_sc_taskwork
  71. end type
  72. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_sc_taskwork
  73. end type
  74. type cb_1 from w_publ_easyq`cb_1 within w_rp_sc_taskwork
  75. end type
  76. event cb_1::clicked;call super::clicked;Long ll_mth
  77. DateTime firstdate ,enddate
  78. firstdate = DateTime(Date(em_1.Text),Time(0))
  79. enddate = DateTime(Date(em_2.Text),Time('23:59:59'))
  80. ll_mth = Long(em_mth.Text)
  81. IF dw_1.DataObject = 'dw_rp_sc_taskwork' THEN
  82. dw_1.Retrieve(ll_mth,il_type,firstdate,enddate)
  83. ELSE
  84. dw_1.Retrieve(ll_mth,il_type,firstdate,enddate,cur_flag)
  85. END IF
  86. end event
  87. type st_3 from w_publ_easyq`st_3 within w_rp_sc_taskwork
  88. integer x = 923
  89. end type
  90. type st_4 from w_publ_easyq`st_4 within w_rp_sc_taskwork
  91. integer x = 1632
  92. end type
  93. type em_1 from w_publ_easyq`em_1 within w_rp_sc_taskwork
  94. integer x = 1125
  95. boolean enabled = false
  96. end type
  97. type em_2 from w_publ_easyq`em_2 within w_rp_sc_taskwork
  98. integer x = 1737
  99. boolean enabled = false
  100. end type
  101. type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_sc_taskwork
  102. integer y = 12
  103. end type
  104. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_sc_taskwork
  105. integer y = 16
  106. end type
  107. type dw_1 from w_publ_easyq`dw_1 within w_rp_sc_taskwork
  108. integer y = 304
  109. string dataobject = "dw_rp_sc_taskwork"
  110. end type
  111. event dw_1::doubleclicked;call super::doubleclicked;IF dw_1.DataObject = 'dw_rp_sc_taskwork' THEN
  112. IF row > 0 THEN
  113. String ls_code
  114. Long ll_scid
  115. ll_scid = THIS.Object.u_sc_taskwork_scid[row]
  116. ls_code = THIS.Object.u_sc_taskwork_billcode[row]
  117. //f_open_win(ll_scid,ls_code)
  118. END IF
  119. END IF
  120. end event
  121. type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_sc_taskwork
  122. integer x = 1650
  123. integer y = 480
  124. end type
  125. type sle_cust from w_publ_easyq`sle_cust within w_rp_sc_taskwork
  126. integer x = 1637
  127. integer y = 596
  128. end type
  129. type st_mtrl from w_publ_easyq`st_mtrl within w_rp_sc_taskwork
  130. integer x = 1193
  131. integer y = 496
  132. end type
  133. type st_cust from w_publ_easyq`st_cust within w_rp_sc_taskwork
  134. integer x = 1175
  135. integer y = 612
  136. end type
  137. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_sc_taskwork
  138. boolean visible = true
  139. end type
  140. type pb_em1 from w_publ_easyq`pb_em1 within w_rp_sc_taskwork
  141. integer x = 1541
  142. boolean enabled = false
  143. end type
  144. type pb_em2 from w_publ_easyq`pb_em2 within w_rp_sc_taskwork
  145. integer x = 2153
  146. boolean enabled = false
  147. end type
  148. type pb_2 from w_publ_easyq`pb_2 within w_rp_sc_taskwork
  149. integer x = 2263
  150. boolean enabled = false
  151. end type
  152. type cb_help from w_publ_easyq`cb_help within w_rp_sc_taskwork
  153. end type
  154. type cb_copyself from w_publ_easyq`cb_copyself within w_rp_sc_taskwork
  155. end type
  156. type gb_1 from w_publ_easyq`gb_1 within w_rp_sc_taskwork
  157. end type
  158. type ln_bar from w_publ_easyq`ln_bar within w_rp_sc_taskwork
  159. end type
  160. type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_sc_taskwork
  161. end type
  162. type r_bar from w_publ_easyq`r_bar within w_rp_sc_taskwork
  163. end type
  164. type ln_1 from w_publ_easyq`ln_1 within w_rp_sc_taskwork
  165. end type
  166. type ln_2 from w_publ_easyq`ln_2 within w_rp_sc_taskwork
  167. end type
  168. type ln_3 from w_publ_easyq`ln_3 within w_rp_sc_taskwork
  169. boolean visible = false
  170. end type
  171. type ln_4 from w_publ_easyq`ln_4 within w_rp_sc_taskwork
  172. boolean visible = false
  173. end type
  174. type ddlb_1 from dropdownlistbox within w_rp_sc_taskwork
  175. integer x = 1810
  176. integer y = 12
  177. integer width = 923
  178. integer height = 452
  179. integer taborder = 120
  180. boolean bringtotop = true
  181. integer textsize = -9
  182. integer weight = 400
  183. fontcharset fontcharset = gb2312charset!
  184. fontpitch fontpitch = variable!
  185. string facename = "宋体"
  186. long textcolor = 33554432
  187. string text = "明细表"
  188. boolean sorted = false
  189. boolean vscrollbar = true
  190. string item[] = {"明细表","汇总表[员工]","汇总表2[员工]","汇总表[产品]","汇总表[员工数量]","汇总表[员工工序数量]"}
  191. borderstyle borderstyle = stylelowered!
  192. end type
  193. event selectionchanged;dw_1.uf_save_profile_layout()
  194. IF ddlb_1.Text = '明细表' THEN
  195. dw_1.DataObject = 'dw_rp_sc_taskwork'
  196. ELSEIF ddlb_1.Text = '汇总表[员工]' THEN
  197. dw_1.DataObject = 'dw_rp_sc_taskwork_hz1'
  198. ELSEIF ddlb_1.Text = '汇总表2[员工]' THEN
  199. dw_1.DataObject = 'dw_rp_sc_taskwork_hz4'
  200. ELSEIF ddlb_1.Text = '汇总表[产品]' THEN
  201. dw_1.DataObject = 'dw_rp_sc_taskwork_hz2'
  202. ELSEIF ddlb_1.Text = '汇总表[员工数量]' THEN
  203. dw_1.DataObject = 'dw_rp_sc_taskwork_hz3'
  204. ELSEIF ddlb_1.Text = '汇总表[员工工序数量]' THEN
  205. dw_1.DataObject = 'dw_rp_sc_taskwork_hz5'
  206. END IF
  207. wf_replacedw()
  208. cb_1.TriggerEvent(Clicked!)
  209. end event
  210. type ddlb_type from dropdownlistbox within w_rp_sc_taskwork
  211. integer x = 9
  212. integer y = 192
  213. integer width = 393
  214. integer height = 300
  215. integer taborder = 110
  216. boolean bringtotop = true
  217. integer textsize = -9
  218. integer weight = 400
  219. fontcharset fontcharset = gb2312charset!
  220. fontpitch fontpitch = variable!
  221. string facename = "宋体"
  222. long textcolor = 33554432
  223. string text = "按工资月份"
  224. boolean sorted = false
  225. string item[] = {"按工资月份","按单据日期"}
  226. borderstyle borderstyle = stylelowered!
  227. end type
  228. event selectionchanged;IF THIS.Text = '按工资月份' THEN
  229. em_mth.enabled = TRUE
  230. pb_2.enabled = FALSE
  231. pb_em1.enabled = FALSE
  232. pb_em2.enabled = FALSE
  233. em_1.enabled = FALSE
  234. em_2.enabled = FALSE
  235. il_type = 0
  236. ELSEIF THIS.Text = '按单据日期' THEN
  237. em_mth.enabled = FALSE
  238. pb_2.enabled = TRUE
  239. pb_em1.enabled = TRUE
  240. pb_em2.enabled = TRUE
  241. em_1.enabled = TRUE
  242. em_2.enabled = TRUE
  243. il_type = 1
  244. END IF
  245. SetProfileString (sys_inifilename,'w_gz_rp_taskworkmx', "il_type", String(il_type))
  246. cb_1.triggerevent(clicked!)
  247. end event
  248. event constructor;il_type = Integer(ProfileString (sys_inifilename,'w_gz_rp_taskworkmx', "il_type", '0'))
  249. IF il_type = 0 THEN
  250. em_mth.Enabled = TRUE
  251. pb_2.Enabled = FALSE
  252. pb_em1.Enabled = FALSE
  253. pb_em2.Enabled = FALSE
  254. em_1.Enabled = FALSE
  255. em_2.Enabled = FALSE
  256. this.text = '按工资月份'
  257. ELSE
  258. em_mth.Enabled = FALSE
  259. pb_2.Enabled = TRUE
  260. pb_em1.Enabled = TRUE
  261. pb_em2.Enabled = TRUE
  262. em_1.Enabled = TRUE
  263. em_2.Enabled = TRUE
  264. this.text = '按单据日期'
  265. END IF
  266. end event
  267. type em_mth from editmask within w_rp_sc_taskwork
  268. integer x = 571
  269. integer y = 192
  270. integer width = 329
  271. integer height = 88
  272. integer taborder = 120
  273. boolean bringtotop = true
  274. integer textsize = -9
  275. integer weight = 400
  276. fontcharset fontcharset = gb2312charset!
  277. fontpitch fontpitch = variable!
  278. string facename = "宋体"
  279. long textcolor = 33554432
  280. string text = "none"
  281. alignment alignment = center!
  282. borderstyle borderstyle = stylelowered!
  283. maskdatatype maskdatatype = datemask!
  284. string mask = "yyyymm"
  285. boolean spin = true
  286. end type
  287. event constructor;em_mth.Text = String(Today(),'yyyymm')
  288. end event
  289. type st_1 from statictext within w_rp_sc_taskwork
  290. integer x = 416
  291. integer y = 212
  292. integer width = 146
  293. integer height = 48
  294. boolean bringtotop = true
  295. integer textsize = -9
  296. integer weight = 400
  297. fontcharset fontcharset = gb2312charset!
  298. fontpitch fontpitch = variable!
  299. string facename = "宋体"
  300. long textcolor = 33554432
  301. long backcolor = 134217739
  302. string text = "月份:"
  303. alignment alignment = right!
  304. boolean focusrectangle = false
  305. end type
  306. type cbx_1 from checkbox within w_rp_sc_taskwork
  307. integer x = 2427
  308. integer y = 196
  309. integer width = 521
  310. integer height = 92
  311. boolean bringtotop = true
  312. integer textsize = -9
  313. integer weight = 400
  314. fontcharset fontcharset = gb2312charset!
  315. fontpitch fontpitch = variable!
  316. string facename = "宋体"
  317. long textcolor = 33554432
  318. long backcolor = 134217739
  319. string text = "只显示已审核单据"
  320. end type
  321. event constructor;cur_flag = Long(f_ProfileString(SYS_empid, parent.classname(), "cur_flag", "-1"))
  322. IF cur_flag = 1 THEN
  323. THIS.CHECKED = TRUE
  324. ELSE
  325. THIS.CHECKED = FALSE
  326. END IF
  327. end event
  328. event clicked;IF THIS.CHECKED = TRUE THEN
  329. cur_flag = 1
  330. ELSE
  331. cur_flag = -1
  332. END IF
  333. cb_1.TriggerEvent(Clicked!)
  334. end event