w_publ_easyq.srw 30 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180
  1. $PBExportHeader$w_publ_easyq.srw
  2. $PBExportComments$报表窗口
  3. forward
  4. global type w_publ_easyq from w_publ_base
  5. end type
  6. type cb_2 from uo_imflatbutton within w_publ_easyq
  7. end type
  8. type cb_psetup from uo_imflatbutton within w_publ_easyq
  9. end type
  10. type cb_1 from uo_imflatbutton within w_publ_easyq
  11. end type
  12. type st_3 from statictext within w_publ_easyq
  13. end type
  14. type st_4 from statictext within w_publ_easyq
  15. end type
  16. type em_1 from editmask within w_publ_easyq
  17. end type
  18. type em_2 from editmask within w_publ_easyq
  19. end type
  20. type ddlb_yl from dropdownlistbox within w_publ_easyq
  21. end type
  22. type cbx_yl from checkbox within w_publ_easyq
  23. end type
  24. type dw_1 from u_dw_rbtnfilter within w_publ_easyq
  25. end type
  26. type sle_mtrl from singlelineedit within w_publ_easyq
  27. end type
  28. type sle_cust from singlelineedit within w_publ_easyq
  29. end type
  30. type st_mtrl from statictext within w_publ_easyq
  31. end type
  32. type st_cust from statictext within w_publ_easyq
  33. end type
  34. type cbx_loginretr from checkbox within w_publ_easyq
  35. end type
  36. type pb_em1 from picturebutton within w_publ_easyq
  37. end type
  38. type pb_em2 from picturebutton within w_publ_easyq
  39. end type
  40. type pb_2 from picturebutton within w_publ_easyq
  41. end type
  42. type cb_help from uo_imflatbutton within w_publ_easyq
  43. end type
  44. type cb_copyself from uo_imflatbutton within w_publ_easyq
  45. end type
  46. type gb_1 from groupbox within w_publ_easyq
  47. end type
  48. type ln_bar from line within w_publ_easyq
  49. end type
  50. type ln_bar2 from line within w_publ_easyq
  51. end type
  52. type r_bar from rectangle within w_publ_easyq
  53. end type
  54. type ln_1 from line within w_publ_easyq
  55. end type
  56. type ln_2 from line within w_publ_easyq
  57. end type
  58. type ln_3 from line within w_publ_easyq
  59. end type
  60. type ln_4 from line within w_publ_easyq
  61. end type
  62. end forward
  63. global type w_publ_easyq from w_publ_base
  64. integer x = 270
  65. integer y = 136
  66. integer width = 3639
  67. integer height = 2404
  68. string title = "统计表"
  69. boolean maxbox = true
  70. boolean resizable = true
  71. windowstate windowstate = maximized!
  72. boolean if_ue_retr = true
  73. boolean if_ue_filter = true
  74. boolean if_ue_sort = true
  75. boolean if_ue_sentdataout = true
  76. event ue_date1 ( )
  77. event ue_date2 ( )
  78. event ue_date3 ( )
  79. event ue_help ( )
  80. event user_key ( )
  81. event ue_date4 ( )
  82. event ue_before_openretrieve ( )
  83. cb_2 cb_2
  84. cb_psetup cb_psetup
  85. cb_1 cb_1
  86. st_3 st_3
  87. st_4 st_4
  88. em_1 em_1
  89. em_2 em_2
  90. ddlb_yl ddlb_yl
  91. cbx_yl cbx_yl
  92. dw_1 dw_1
  93. sle_mtrl sle_mtrl
  94. sle_cust sle_cust
  95. st_mtrl st_mtrl
  96. st_cust st_cust
  97. cbx_loginretr cbx_loginretr
  98. pb_em1 pb_em1
  99. pb_em2 pb_em2
  100. pb_2 pb_2
  101. cb_help cb_help
  102. cb_copyself cb_copyself
  103. gb_1 gb_1
  104. ln_bar ln_bar
  105. ln_bar2 ln_bar2
  106. r_bar r_bar
  107. ln_1 ln_1
  108. ln_2 ln_2
  109. ln_3 ln_3
  110. ln_4 ln_4
  111. end type
  112. global w_publ_easyq w_publ_easyq
  113. type variables
  114. Boolean if_mdf_title = TRUE
  115. Boolean cb_reol
  116. Boolean if_retrieveing = FALSE //是否正在retrieve
  117. String cur_vspos
  118. Boolean if_power_sendout = true
  119. Boolean if_power_print = true
  120. end variables
  121. forward prototypes
  122. public function integer days_in_month (integer month, integer year)
  123. public function integer wf_replacedw ()
  124. public subroutine wf_hidecol ()
  125. public subroutine wf_init_dw1 ()
  126. end prototypes
  127. event ue_date1();//IF THIS.Text = "本日" THEN
  128. em_1.text = string(today(),"yyyy-mm-dd")
  129. em_2.text = string(today(),"yyyy-mm-dd")
  130. //ELSEIF THIS.Text = "本周" THEN
  131. // int li_DayNum
  132. // li_DayNum = DayNumber(today())
  133. // em_1.text = string(RelativeDate ( today(), 1 - li_DayNum ),"yyyy-mm-dd")
  134. // em_2.text = string(RelativeDate ( today(), 7 - li_DayNum ),"yyyy-mm-dd")
  135. //ELSEIF THIS.Text = "本月" THEN
  136. // int li_Month, li_Year, li_Days
  137. // li_Month = Month(today())
  138. // li_Year = Year(today())
  139. // li_Days = days_in_month(li_Month, li_Year)
  140. // em_1.text = string(Date(li_Year, li_Month, 1),"yyyy-mm-dd")
  141. // em_2.text = string(Date(li_Year, li_Month, li_Days),"yyyy-mm-dd")
  142. //END IF
  143. end event
  144. event ue_date2();//IF THIS.Text = "本日" THEN
  145. // em_1.text = string(today(),"yyyy-mm-dd")
  146. // em_2.text = string(today(),"yyyy-mm-dd")
  147. //ELSEIF THIS.Text = "本周" THEN
  148. int li_DayNum
  149. li_DayNum = DayNumber(today())
  150. em_1.text = string(RelativeDate ( today(), 1 - li_DayNum ),"yyyy-mm-dd")
  151. em_2.text = string(RelativeDate ( today(), 7 - li_DayNum ),"yyyy-mm-dd")
  152. //ELSEIF THIS.Text = "本月" THEN
  153. // int li_Month, li_Year, li_Days
  154. // li_Month = Month(today())
  155. // li_Year = Year(today())
  156. // li_Days = days_in_month(li_Month, li_Year)
  157. // em_1.text = string(Date(li_Year, li_Month, 1),"yyyy-mm-dd")
  158. // em_2.text = string(Date(li_Year, li_Month, li_Days),"yyyy-mm-dd")
  159. //END IF
  160. end event
  161. event ue_date3();//IF THIS.Text = "本日" THEN
  162. // em_1.text = string(today(),"yyyy-mm-dd")
  163. // em_2.text = string(today(),"yyyy-mm-dd")
  164. //ELSEIF THIS.Text = "本周" THEN
  165. // int li_DayNum
  166. // li_DayNum = DayNumber(today())
  167. // em_1.text = string(RelativeDate ( today(), 1 - li_DayNum ),"yyyy-mm-dd")
  168. // em_2.text = string(RelativeDate ( today(), 7 - li_DayNum ),"yyyy-mm-dd")
  169. //ELSEIF THIS.Text = "本月" THEN
  170. int li_Month, li_Year, li_Days
  171. li_Month = Month(today())
  172. li_Year = Year(today())
  173. li_Days = days_in_month(li_Month, li_Year)
  174. em_1.text = string(Date(li_Year, li_Month, 1),"yyyy-mm-dd")
  175. em_2.text = string(Date(li_Year, li_Month, li_Days),"yyyy-mm-dd")
  176. //END IF
  177. end event
  178. event ue_help();Int i
  179. i = htmlhelpA(Handle(THIS), sys_help_chm, 0, THIS.Title+".html")
  180. end event
  181. event user_key();IF KeyDown(KeyF1!) THEN
  182. THIS.TriggerEvent('ue_help')
  183. end if
  184. end event
  185. event ue_date4();//IF THIS.Text = "本日" THEN
  186. // em_1.text = string(today(),"yyyy-mm-dd")
  187. // em_2.text = string(today(),"yyyy-mm-dd")
  188. //ELSEIF THIS.Text = "本周" THEN
  189. // int li_DayNum
  190. // li_DayNum = DayNumber(today())
  191. // em_1.text = string(RelativeDate ( today(), 1 - li_DayNum ),"yyyy-mm-dd")
  192. // em_2.text = string(RelativeDate ( today(), 7 - li_DayNum ),"yyyy-mm-dd")
  193. //ELSEIF THIS.Text = "本月" THEN
  194. Int li_Month, li_Year, li_Days
  195. li_Month = Month(Today())
  196. li_Year = Year(Today())
  197. IF li_Month = 1 THEN
  198. li_Month = 12
  199. li_Year = li_Year - 1
  200. ELSE
  201. li_Month -= 1
  202. END IF
  203. li_Days = days_in_month(li_Month, li_Year)
  204. em_1.Text = String(Date(li_Year, li_Month, 1),"yyyy-mm-dd")
  205. em_2.Text = String(Date(li_Year, li_Month, li_Days),"yyyy-mm-dd")
  206. //END IF
  207. end event
  208. event ue_before_openretrieve();EM_1.Text = String(Today(),'YYYY-MM-01')
  209. EM_2.Text = String(Today(),'YYYY-MM-DD')
  210. end event
  211. public function integer days_in_month (integer month, integer year);//Most cases are straight forward in that there are a fixed number of
  212. //days in 11 of the 12 months. February is, of course, the problem.
  213. //In a leap year February has 29 days, otherwise 28.
  214. Integer li_DaysInMonth, li_Days[12] = {31,28,31,30,31,30,31,31,30,31,30,31}
  215. // Get the number of days per month for a non leap year.
  216. li_DaysInMonth = li_Days[Month]
  217. // Check for a leap year.
  218. If Month = 2 Then
  219. // If the year is a leap year, change the number of days.
  220. // Leap Year Calculation:
  221. // Year divisible by 4, but not by 100, unless it is also divisible by 400
  222. If ( (Mod(Year,4) = 0 And Mod(Year,100) <> 0) Or (Mod(Year,400) = 0) ) Then
  223. li_DaysInMonth = 29
  224. End If
  225. End If
  226. //Return the number of days in the relevant month
  227. Return li_DaysInMonth
  228. end function
  229. public function integer wf_replacedw ();String ls_windowname
  230. ls_windowname = This.ClassName ( )
  231. Int rslt = 1
  232. String ls_old_dwname,ls_new_dwname = ''
  233. Boolean lb_ch = False
  234. ls_old_dwname = dw_1.DataObject
  235. ls_new_dwname = f_get_dwprint_dynamic_chname(ls_old_dwname,ls_windowname)
  236. IF ls_new_dwname = '' THEN
  237. ls_new_dwname = ls_old_dwname
  238. ELSE
  239. lb_ch = True
  240. END IF
  241. dw_1.DataObject = ls_new_dwname
  242. rslt = dw_1.SetTransObject(sqlca)
  243. IF rslt <> 1 THEN
  244. IF lb_ch THEN
  245. MessageBox('系统提示','替换格式['+ls_new_dwname+']初始化失败!系统将还原为标准格式显示!')
  246. dw_1.DataObject = ls_old_dwname
  247. dw_1.SetTransObject(sqlca)
  248. lb_ch = false
  249. END IF
  250. END IF
  251. dw_1.uf_read_profile_layout()
  252. wf_hidecol()
  253. f_title_change(dw_1)
  254. if lb_ch then
  255. if pos(this.title, '[替换]') = 0 then
  256. this.title += '[替换]'
  257. end if
  258. else
  259. if pos(this.title, '[替换]') > 0 then
  260. this.title = Replace(this.title, pos(this.title, '[替换]'), len('[替换]'), "")
  261. end if
  262. end if
  263. RETURN 1
  264. end function
  265. public subroutine wf_hidecol ();return
  266. end subroutine
  267. public subroutine wf_init_dw1 ();//用于初始化dw1的dataobject
  268. //dw_1.dataobject = ''
  269. return
  270. end subroutine
  271. on w_publ_easyq.create
  272. int iCurrent
  273. call super::create
  274. this.cb_2=create cb_2
  275. this.cb_psetup=create cb_psetup
  276. this.cb_1=create cb_1
  277. this.st_3=create st_3
  278. this.st_4=create st_4
  279. this.em_1=create em_1
  280. this.em_2=create em_2
  281. this.ddlb_yl=create ddlb_yl
  282. this.cbx_yl=create cbx_yl
  283. this.dw_1=create dw_1
  284. this.sle_mtrl=create sle_mtrl
  285. this.sle_cust=create sle_cust
  286. this.st_mtrl=create st_mtrl
  287. this.st_cust=create st_cust
  288. this.cbx_loginretr=create cbx_loginretr
  289. this.pb_em1=create pb_em1
  290. this.pb_em2=create pb_em2
  291. this.pb_2=create pb_2
  292. this.cb_help=create cb_help
  293. this.cb_copyself=create cb_copyself
  294. this.gb_1=create gb_1
  295. this.ln_bar=create ln_bar
  296. this.ln_bar2=create ln_bar2
  297. this.r_bar=create r_bar
  298. this.ln_1=create ln_1
  299. this.ln_2=create ln_2
  300. this.ln_3=create ln_3
  301. this.ln_4=create ln_4
  302. iCurrent=UpperBound(this.Control)
  303. this.Control[iCurrent+1]=this.cb_2
  304. this.Control[iCurrent+2]=this.cb_psetup
  305. this.Control[iCurrent+3]=this.cb_1
  306. this.Control[iCurrent+4]=this.st_3
  307. this.Control[iCurrent+5]=this.st_4
  308. this.Control[iCurrent+6]=this.em_1
  309. this.Control[iCurrent+7]=this.em_2
  310. this.Control[iCurrent+8]=this.ddlb_yl
  311. this.Control[iCurrent+9]=this.cbx_yl
  312. this.Control[iCurrent+10]=this.dw_1
  313. this.Control[iCurrent+11]=this.sle_mtrl
  314. this.Control[iCurrent+12]=this.sle_cust
  315. this.Control[iCurrent+13]=this.st_mtrl
  316. this.Control[iCurrent+14]=this.st_cust
  317. this.Control[iCurrent+15]=this.cbx_loginretr
  318. this.Control[iCurrent+16]=this.pb_em1
  319. this.Control[iCurrent+17]=this.pb_em2
  320. this.Control[iCurrent+18]=this.pb_2
  321. this.Control[iCurrent+19]=this.cb_help
  322. this.Control[iCurrent+20]=this.cb_copyself
  323. this.Control[iCurrent+21]=this.gb_1
  324. this.Control[iCurrent+22]=this.ln_bar
  325. this.Control[iCurrent+23]=this.ln_bar2
  326. this.Control[iCurrent+24]=this.r_bar
  327. this.Control[iCurrent+25]=this.ln_1
  328. this.Control[iCurrent+26]=this.ln_2
  329. this.Control[iCurrent+27]=this.ln_3
  330. this.Control[iCurrent+28]=this.ln_4
  331. end on
  332. on w_publ_easyq.destroy
  333. call super::destroy
  334. destroy(this.cb_2)
  335. destroy(this.cb_psetup)
  336. destroy(this.cb_1)
  337. destroy(this.st_3)
  338. destroy(this.st_4)
  339. destroy(this.em_1)
  340. destroy(this.em_2)
  341. destroy(this.ddlb_yl)
  342. destroy(this.cbx_yl)
  343. destroy(this.dw_1)
  344. destroy(this.sle_mtrl)
  345. destroy(this.sle_cust)
  346. destroy(this.st_mtrl)
  347. destroy(this.st_cust)
  348. destroy(this.cbx_loginretr)
  349. destroy(this.pb_em1)
  350. destroy(this.pb_em2)
  351. destroy(this.pb_2)
  352. destroy(this.cb_help)
  353. destroy(this.cb_copyself)
  354. destroy(this.gb_1)
  355. destroy(this.ln_bar)
  356. destroy(this.ln_bar2)
  357. destroy(this.r_bar)
  358. destroy(this.ln_1)
  359. destroy(this.ln_2)
  360. destroy(this.ln_3)
  361. destroy(this.ln_4)
  362. end on
  363. event resize;ln_bar.EndX = This.Width
  364. ln_bar2.EndX = This.Width
  365. ln_1.EndX = This.Width
  366. ln_2.EndX = This.Width
  367. ln_3.EndX = This.Width
  368. ln_4.EndX = This.Width
  369. r_bar.Width = This.Width
  370. dw_1.Width = This.Width - dw_1.X - 40
  371. dw_1.Height = This.Height - dw_1.Y - 150
  372. end event
  373. event open;call super::open;//dw_1.SetTransObject (sqlca)
  374. dw_1.RBUTTON_FILTER_USE = True //右键查询功能开关
  375. IF dw_1.Describe("DataWindow.Objects") = "" THEN dw_1.DataObject = ''
  376. IF Trim(dw_1.DataObject) <> '' THEN
  377. dw_1.Object.DataWindow.Print.MARGIN.Top = Integer(f_ProfileString(sys_empid,dw_1.DataObject, "MARGIN_TOP", "110"))
  378. dw_1.Object.DataWindow.Print.MARGIN.Left = Integer(f_ProfileString(sys_empid,dw_1.DataObject, "MARGIN_LEFT", "96" ))
  379. dw_1.Object.DataWindow.Print.MARGIN.bottom = Integer(f_ProfileString(sys_empid,dw_1.DataObject, "MARGIN_BOTTOM", "110"))
  380. dw_1.Object.DataWindow.Print.MARGIN.Right = Integer(f_ProfileString(sys_empid,dw_1.DataObject, "MARGIN_RIGHT", "96" ))
  381. END IF
  382. This.TriggerEvent('ue_before_openretrieve')
  383. IF cbx_loginretr.Checked THEN
  384. cb_1.TriggerEvent(Clicked!)
  385. END IF
  386. end event
  387. event activate;IF Trim(dw_1.DataObject) <> '' THEN
  388. IF cbx_yl.Enabled AND cbx_yl.Visible THEN cbx_yl.TriggerEvent(Clicked!)
  389. END IF
  390. end event
  391. event key;call super::key;this.TRIGGEREVENT('USER_KEY')
  392. end event
  393. event ue_before_open;call super::ue_before_open;wf_init_dw1()
  394. wf_replacedw()
  395. s_edit_index_tran s_tran
  396. s_tran = Message.PowerObjectParm
  397. IF Not IsNull(s_tran) THEN
  398. if_power_sendout = s_tran.if_sendout
  399. if_power_print = s_tran.if_print
  400. END IF
  401. if_ue_sentdataout = if_power_sendout
  402. cb_psetup.enabled = if_power_print
  403. cb_2.enabled = if_power_print
  404. cbx_yl.enabled = if_power_print
  405. ddlb_yl.enabled = if_power_print
  406. end event
  407. event ue_sentdataout;call super::ue_sentdataout;IF NOT if_power_sendout THEN
  408. MessageBox(publ_operator,'你没有使用权限!')
  409. RETURN
  410. END IF
  411. OpenWithParm(w_sentdataout,DW_1)
  412. end event
  413. event ue_sort;call super::ue_sort;OpenWithParm(w_sortrow,DW_1)
  414. String LS_EXPR
  415. LS_EXPR = Message.StringParm
  416. IF IsNull(LS_EXPR) THEN LS_EXPR = ' '
  417. IF Len(LS_EXPR) > 2 And Trim(LS_EXPR) = '' THEN RETURN
  418. DW_1.SetSort(LS_EXPR)
  419. DW_1.SetRedraw (False)
  420. DW_1.Sort()
  421. DW_1.SetRedraw (True)
  422. end event
  423. event ue_filter;call super::ue_filter;OpenWithParm(w_filter_query,dw_1)
  424. String LS_EXPR
  425. LS_EXPR = Message.StringParm
  426. IF Len(LS_EXPR) > 2 And Trim(LS_EXPR) = '' THEN RETURN
  427. dw_1.SetFilter(LS_EXPR)
  428. dw_1.SetRedraw (False)
  429. dw_1.Filter()
  430. dw_1.SetRedraw (True)
  431. end event
  432. type cb_func from w_publ_base`cb_func within w_publ_easyq
  433. integer x = 151
  434. integer width = 151
  435. integer height = 164
  436. end type
  437. type cb_exit from w_publ_base`cb_exit within w_publ_easyq
  438. integer x = 1115
  439. integer width = 151
  440. integer height = 164
  441. integer picsize = 16
  442. toolbaralignment pic_align = alignattop!
  443. boolean border = false
  444. end type
  445. type cb_2 from uo_imflatbutton within w_publ_easyq
  446. integer x = 814
  447. integer width = 151
  448. integer height = 164
  449. integer taborder = 90
  450. string text = "打印"
  451. string normalpicname = "print.bmp"
  452. integer picsize = 16
  453. toolbaralignment pic_align = alignattop!
  454. boolean border = false
  455. end type
  456. event clicked;call super::clicked;
  457. IF NOT if_power_print THEN
  458. MessageBox(publ_operator,'你没有使用权限!')
  459. RETURN
  460. END IF
  461. IF DW_1.RowCount() >= 1 THEN
  462. cbx_YL.Checked = TRUE
  463. cbx_YL.TriggerEvent(Clicked!)
  464. OpenWithParm(w_sys_printpagesetting,DW_1)
  465. ELSE
  466. MessageBox('NO','数据窗口中没有任何记录,不能打印!')
  467. END IF
  468. IF Trim(DW_1.DataObject) = '' THEN RETURN
  469. f_SetProfileString (sys_empid,DW_1.DataObject, "MARGIN_TOP", String(DW_1.Object.DataWindow.Print.MARGIN.Top))
  470. f_SetProfileString (sys_empid,DW_1.DataObject, "MARGIN_LEFT", String(DW_1.Object.DataWindow.Print.MARGIN.Left))
  471. f_SetProfileString (sys_empid,DW_1.DataObject, "MARGIN_BOTTOM", String(DW_1.Object.DataWindow.Print.MARGIN.BOTTOM))
  472. f_SetProfileString (sys_empid,DW_1.DataObject, "MARGIN_RIGHT", String(DW_1.Object.DataWindow.Print.MARGIN.Right))
  473. f_SetProfileString (sys_empid,DW_1.DataObject, "PAPER_SIZE", String(DW_1.Object.datawindow.Print.paper.size) )
  474. f_SetProfileString (sys_empid,DW_1.DataObject, "ORIENTATION", String(DW_1.Object.datawindow.Print.orientation))
  475. end event
  476. type cb_psetup from uo_imflatbutton within w_publ_easyq
  477. integer x = 558
  478. integer width = 256
  479. integer height = 164
  480. integer taborder = 80
  481. string text = "页面设置"
  482. string normalpicname = "PRINTFLD.BMP"
  483. integer picsize = 16
  484. toolbaralignment pic_align = alignattop!
  485. boolean border = false
  486. end type
  487. event clicked;call super::clicked;s_print_value s_print
  488. s_print.obj_dw = DW_1
  489. s_print.dft_printername = ''
  490. OpenWithParm(w_sys_printpage_value,s_print)
  491. end event
  492. type cb_1 from uo_imflatbutton within w_publ_easyq
  493. integer width = 151
  494. integer height = 164
  495. integer taborder = 40
  496. string text = "刷新"
  497. string normalpicname = "refresh.bmp"
  498. integer picsize = 16
  499. toolbaralignment pic_align = alignattop!
  500. boolean border = false
  501. end type
  502. event clicked;call super::clicked;//DateTime first_date,end_date
  503. //
  504. //first_date = DateTime(Date(em_1.Text),Time(0))
  505. //end_date = DateTime(Date(em_2.Text),Time('23:59:59'))
  506. //String ls_cust_str, ls_mtrl_str
  507. //IF Pos(sle_cust.Text,"%") <> 0 THEN
  508. // ls_cust_str = trim(sle_cust.Text)
  509. //ELSE
  510. // ls_cust_str = "%"+trim(sle_cust.Text)+"%"
  511. //END IF
  512. //IF Pos(sle_mtrl.Text,"%") <> 0 THEN
  513. // ls_mtrl_str = trim(sle_mtrl.Text)
  514. //ELSE
  515. // ls_mtrl_str = "%"+trim(sle_mtrl.Text)+"%"
  516. //END IF
  517. //dw_1.Retrieve(DATE(EM_1.TEXT),DATE(EM_2.TEXT),ls_cust_str,ls_mtrl_str)
  518. //dw_1.OBJECT.date_mid.TEXT=EM_1.TEXT+'~~'+EM_2.TEXT
  519. end event
  520. type st_3 from statictext within w_publ_easyq
  521. integer x = 18
  522. integer y = 208
  523. integer width = 201
  524. integer height = 60
  525. boolean bringtotop = true
  526. integer textsize = -9
  527. integer weight = 400
  528. fontcharset fontcharset = gb2312charset!
  529. fontpitch fontpitch = variable!
  530. string facename = "宋体"
  531. long textcolor = 33554432
  532. long backcolor = 134217739
  533. boolean enabled = false
  534. string text = "日期从:"
  535. alignment alignment = right!
  536. boolean focusrectangle = false
  537. end type
  538. type st_4 from statictext within w_publ_easyq
  539. integer x = 727
  540. integer y = 208
  541. integer width = 105
  542. integer height = 60
  543. boolean bringtotop = true
  544. integer textsize = -9
  545. integer weight = 400
  546. fontcharset fontcharset = gb2312charset!
  547. fontpitch fontpitch = variable!
  548. string facename = "宋体"
  549. long textcolor = 33554432
  550. long backcolor = 134217739
  551. boolean enabled = false
  552. string text = "到:"
  553. alignment alignment = right!
  554. boolean focusrectangle = false
  555. end type
  556. type em_1 from editmask within w_publ_easyq
  557. integer x = 219
  558. integer y = 192
  559. integer width = 407
  560. integer height = 88
  561. integer taborder = 100
  562. boolean bringtotop = true
  563. integer textsize = -9
  564. integer weight = 400
  565. fontcharset fontcharset = gb2312charset!
  566. fontpitch fontpitch = variable!
  567. string facename = "宋体"
  568. long textcolor = 33554432
  569. borderstyle borderstyle = stylelowered!
  570. maskdatatype maskdatatype = datemask!
  571. string mask = "yyyy-mm-dd"
  572. boolean spin = true
  573. end type
  574. event rbuttondown;s_calender_arg s_calender
  575. s_calender.PointerX = THIS.PointerX()
  576. s_calender.PointerY = THIS.PointerY()
  577. s_calender.X = THIS.X
  578. s_calender.Y = THIS.Y
  579. OpenWithParm(w_calendar,s_calender)
  580. THIS.Text = String(id_date_selected)
  581. end event
  582. type em_2 from editmask within w_publ_easyq
  583. integer x = 832
  584. integer y = 192
  585. integer width = 407
  586. integer height = 88
  587. integer taborder = 110
  588. boolean bringtotop = true
  589. integer textsize = -9
  590. integer weight = 400
  591. fontcharset fontcharset = gb2312charset!
  592. fontpitch fontpitch = variable!
  593. string facename = "宋体"
  594. long textcolor = 33554432
  595. borderstyle borderstyle = stylelowered!
  596. maskdatatype maskdatatype = datemask!
  597. string mask = "yyyy-mm-dd"
  598. boolean spin = true
  599. end type
  600. event rbuttondown;s_calender_arg s_calender
  601. s_calender.PointerX = THIS.PointerX()
  602. s_calender.PointerY = THIS.PointerY()
  603. s_calender.X = THIS.X
  604. s_calender.Y = THIS.Y
  605. OpenWithParm(w_calendar,s_calender)
  606. THIS.Text = String(id_date_selected)
  607. end event
  608. type ddlb_yl from dropdownlistbox within w_publ_easyq
  609. integer x = 1536
  610. integer y = 16
  611. integer width = 261
  612. integer height = 532
  613. integer taborder = 60
  614. integer textsize = -9
  615. integer weight = 400
  616. fontcharset fontcharset = gb2312charset!
  617. fontpitch fontpitch = variable!
  618. string facename = "宋体"
  619. long textcolor = 33554432
  620. boolean enabled = false
  621. string text = "适当大小"
  622. boolean vscrollbar = true
  623. string item[] = {"100%","75%","50%","25%","200%","150%"}
  624. borderstyle borderstyle = stylelowered!
  625. end type
  626. event selectionchanged;dw_1.Object.DataWindow.Print.Preview.Zoom = INTEGER(LEFT(TRIM(this.text),LEN(TRIM(this.text)) - 1))
  627. dw_1.object.DataWindow.Print.Preview = 'yes'
  628. end event
  629. event constructor;if THIS.TotalItems ( )>=1 then THIS.SelectItem(1)
  630. end event
  631. type cbx_yl from checkbox within w_publ_easyq
  632. integer x = 1317
  633. integer y = 20
  634. integer width = 206
  635. integer height = 76
  636. integer taborder = 70
  637. boolean bringtotop = true
  638. integer textsize = -9
  639. integer weight = 400
  640. fontcharset fontcharset = gb2312charset!
  641. fontpitch fontpitch = variable!
  642. string facename = "宋体"
  643. long textcolor = 33554432
  644. long backcolor = 134217739
  645. string text = "预览"
  646. end type
  647. event clicked;ddlb_yl.Enabled = THIS.Checked
  648. try
  649. IF THIS.Checked THEN
  650. IF Lower(dw_1.Object.DataWindow.Print.Preview) = 'yes' THEN RETURN
  651. dw_1.Object.DataWindow.Print.Preview = 'yes'
  652. dw_1.Object.DataWindow.Print.Preview.Rulers = "yes"
  653. dw_1.SetRedraw(FALSE)
  654. IF Trim(dw_1.DataObject) <> '' THEN
  655. Integer margin_top =-1,margin_left=-1,margin_bottom=-1,margin_right=-1,paper_size=-1,orientation=-1
  656. margin_top = Integer(f_ProfileString(sys_empid,dw_1.DataObject, "MARGIN_TOP", "-1"))
  657. margin_left= Integer(f_ProfileString(sys_empid,dw_1.DataObject, "MARGIN_LEFT", "-1" ))
  658. margin_bottom= Integer(f_ProfileString(sys_empid,dw_1.DataObject, "MARGIN_BOTTOM", "-1"))
  659. margin_right= Integer(f_ProfileString(sys_empid,dw_1.DataObject, "MARGIN_RIGHT", "-1" ))
  660. paper_size= Integer(f_ProfileString(sys_empid,dw_1.DataObject, "PAPER_SIZE", "-1" ))
  661. orientation= Integer(f_ProfileString(sys_empid,dw_1.DataObject, "ORIENTATION", "-1" ))
  662. if margin_top > 0 then
  663. dw_1.Object.datawindow.Print.margin.Top =margin_top
  664. end if
  665. if margin_left > 0 then
  666. dw_1.Object.datawindow.Print.margin.Left =margin_left
  667. end if
  668. if margin_bottom > 0 then
  669. dw_1.Object.datawindow.Print.margin.bottom =margin_bottom
  670. end if
  671. if margin_right > 0 then
  672. dw_1.Object.datawindow.Print.margin.Right =margin_right
  673. end if
  674. if paper_size > 0 then
  675. dw_1.Object.datawindow.Print.paper.size =paper_size
  676. end if
  677. if orientation > 0 then
  678. dw_1.Object.datawindow.Print.orientation =orientation
  679. end if
  680. END IF
  681. dw_1.SetRedraw(TRUE)
  682. ELSE
  683. IF Lower(dw_1.Object.DataWindow.Print.Preview) = 'no' THEN RETURN
  684. dw_1.Object.DataWindow.Print.Preview = 'NO'
  685. END IF
  686. catch(runtimeerror err)
  687. end try
  688. end event
  689. event constructor;THIS.BackColor = 14215660
  690. end event
  691. type dw_1 from u_dw_rbtnfilter within w_publ_easyq
  692. integer y = 412
  693. integer width = 3538
  694. integer height = 1820
  695. boolean bringtotop = true
  696. boolean hscrollbar = true
  697. boolean vscrollbar = true
  698. boolean hsplitscroll = true
  699. boolean rbutton_filter_use = true
  700. boolean rbutton_setposition_use = true
  701. boolean titleclick_sort_use = true
  702. end type
  703. event retrievestart;call super::retrievestart;cb_reol = cb_1.Enabled
  704. cb_1.Enabled = FALSE
  705. if_retrieveing = TRUE
  706. cur_vspos = THIS.Describe("DataWindow.VerticalScrollPosition")
  707. end event
  708. event retrieveend;call super::retrieveend;cb_1.Enabled = cb_reol
  709. if_retrieveing = FALSE
  710. IF Dec(cur_vspos) > 0 THEN
  711. THIS.Modify("DataWindow.VerticalScrollPosition="+cur_vspos)
  712. END IF
  713. end event
  714. event doubleclicked;call super::doubleclicked;IF if_mdf_title THEN
  715. IF Lower(Left(dwo.Type,4)) = 'text' THEN
  716. s_inputbox S_SREU
  717. String LS_STR,column_name
  718. S_SREU.Title = '目前标题为: '+dwo.Text+' 。请输入新标题: '
  719. S_SREU.OLD_TEXT = dwo.Text
  720. column_name = dwo.Name
  721. OpenWithParm(w_inputbox,S_SREU)
  722. LS_STR = Message.StringParm
  723. IF Trim(LS_STR) <> '' And dwo.Text <> LS_STR THEN
  724. This.Modify(column_name+'.text="'+LS_STR+'"')
  725. END IF
  726. END IF
  727. END IF
  728. end event
  729. event rowfocuschanged;call super::rowfocuschanged;IF currentrow > 0 THEN
  730. THIS.SelectRow(0,FALSE)
  731. THIS.SelectRow(currentrow,TRUE)
  732. END IF
  733. end event
  734. event dwnkey;call super::dwnkey;PARENT.TRIGGEREVENT('USER_KEY')
  735. end event
  736. type sle_mtrl from singlelineedit within w_publ_easyq
  737. boolean visible = false
  738. integer x = 1637
  739. integer y = 308
  740. integer width = 677
  741. integer height = 84
  742. integer taborder = 120
  743. boolean bringtotop = true
  744. integer textsize = -9
  745. integer weight = 400
  746. fontcharset fontcharset = gb2312charset!
  747. fontpitch fontpitch = variable!
  748. string facename = "宋体"
  749. long textcolor = 33554432
  750. borderstyle borderstyle = stylelowered!
  751. end type
  752. type sle_cust from singlelineedit within w_publ_easyq
  753. boolean visible = false
  754. integer x = 475
  755. integer y = 308
  756. integer width = 677
  757. integer height = 84
  758. integer taborder = 130
  759. boolean bringtotop = true
  760. integer textsize = -9
  761. integer weight = 400
  762. fontcharset fontcharset = gb2312charset!
  763. fontpitch fontpitch = variable!
  764. string facename = "宋体"
  765. long textcolor = 33554432
  766. borderstyle borderstyle = stylelowered!
  767. end type
  768. type st_mtrl from statictext within w_publ_easyq
  769. boolean visible = false
  770. integer x = 1179
  771. integer y = 324
  772. integer width = 453
  773. integer height = 48
  774. boolean bringtotop = true
  775. integer textsize = -9
  776. integer weight = 400
  777. fontcharset fontcharset = gb2312charset!
  778. fontpitch fontpitch = variable!
  779. string facename = "宋体"
  780. long textcolor = 33554432
  781. long backcolor = 134217739
  782. string text = "物料编码/名称含:"
  783. alignment alignment = right!
  784. boolean focusrectangle = false
  785. end type
  786. type st_cust from statictext within w_publ_easyq
  787. boolean visible = false
  788. integer x = 14
  789. integer y = 324
  790. integer width = 453
  791. integer height = 48
  792. boolean bringtotop = true
  793. integer textsize = -9
  794. integer weight = 400
  795. fontcharset fontcharset = gb2312charset!
  796. fontpitch fontpitch = variable!
  797. string facename = "宋体"
  798. long textcolor = 33554432
  799. long backcolor = 134217739
  800. string text = "客户编号/名称含:"
  801. boolean focusrectangle = false
  802. end type
  803. type cbx_loginretr from checkbox within w_publ_easyq
  804. string tag = "此项勾选时,报表打开自动按缺省条件刷新数据,但会耗费系统资源[建议不勾选]"
  805. boolean visible = false
  806. integer x = 1317
  807. integer y = 104
  808. integer width = 521
  809. integer height = 60
  810. boolean bringtotop = true
  811. integer textsize = -9
  812. integer weight = 400
  813. fontcharset fontcharset = gb2312charset!
  814. fontpitch fontpitch = variable!
  815. string facename = "宋体"
  816. long textcolor = 33554432
  817. long backcolor = 134217739
  818. string text = "报表打开自动刷新"
  819. boolean checked = true
  820. end type
  821. event clicked;Long ll_loginretr
  822. IF This.Checked THEN
  823. ll_loginretr = 1
  824. ELSE
  825. ll_loginretr = 0
  826. END IF
  827. //f_SetProfileString(sys_empid,DW_1.DataObject, "LOGIN_RETRIEVE", String(ll_loginretr))
  828. f_SetProfileString(sys_empid,Parent.ClassName(), "LOGIN_RETRIEVE", String(ll_loginretr))
  829. end event
  830. event constructor;This.BackColor = 14215660
  831. Int ll_loginretr
  832. //ll_loginretr = Integer(f_ProfileString(sys_empid,DW_1.DataObject, "LOGIN_RETRIEVE", "1"))
  833. ll_loginretr = Integer(f_ProfileString(sys_empid,Parent.ClassName(), "LOGIN_RETRIEVE", "1"))
  834. IF ll_loginretr = 1 THEN
  835. This.Checked = True
  836. ELSE
  837. This.Checked = False
  838. END IF
  839. end event
  840. type pb_em1 from picturebutton within w_publ_easyq
  841. integer x = 635
  842. integer y = 192
  843. integer width = 101
  844. integer height = 92
  845. integer taborder = 120
  846. boolean bringtotop = true
  847. integer textsize = -9
  848. integer weight = 400
  849. fontcharset fontcharset = gb2312charset!
  850. fontpitch fontpitch = variable!
  851. string facename = "宋体"
  852. string picturename = "date.BMP"
  853. alignment htextalign = left!
  854. end type
  855. event clicked;em_1.triggerevent(rbuttondown!)
  856. end event
  857. type pb_em2 from picturebutton within w_publ_easyq
  858. integer x = 1248
  859. integer y = 192
  860. integer width = 101
  861. integer height = 92
  862. integer taborder = 110
  863. boolean bringtotop = true
  864. integer textsize = -9
  865. integer weight = 400
  866. fontcharset fontcharset = gb2312charset!
  867. fontpitch fontpitch = variable!
  868. string facename = "宋体"
  869. string picturename = "date.BMP"
  870. alignment htextalign = left!
  871. end type
  872. event clicked;em_2.triggerevent(rbuttondown!)
  873. end event
  874. type pb_2 from picturebutton within w_publ_easyq
  875. integer x = 1358
  876. integer y = 192
  877. integer width = 101
  878. integer height = 92
  879. integer taborder = 120
  880. boolean bringtotop = true
  881. integer textsize = -9
  882. integer weight = 400
  883. fontcharset fontcharset = gb2312charset!
  884. fontpitch fontpitch = variable!
  885. string facename = "宋体"
  886. string picturename = "date1.BMP"
  887. alignment htextalign = left!
  888. end type
  889. event clicked;m_Dfc_Control_PopupMenu dmPopupMenu
  890. string menustr
  891. menustr="Text=本日~tEvent=ue_date1"
  892. menustr = menustr + "|" + "Text=本周~tEvent=ue_date2"
  893. menustr = menustr + "|" + "Text=本月~tEvent=ue_date3"
  894. menustr = menustr + "|" + "Text=上月~tEvent=ue_date4"
  895. if len(trim(menustr))<>0 then
  896. dmPopupMenu = Create m_Dfc_Control_PopupMenu
  897. dmPopupMenu.mf_BuildMenu(This, menustr)
  898. dmPopupMenu.mf_PopMenu()
  899. Destroy dmPopupMenu
  900. end if
  901. end event
  902. type cb_help from uo_imflatbutton within w_publ_easyq
  903. integer x = 965
  904. integer width = 151
  905. integer height = 164
  906. integer taborder = 20
  907. boolean bringtotop = true
  908. string text = "帮助"
  909. string normalpicname = "help.bmp"
  910. integer picsize = 16
  911. toolbaralignment pic_align = alignattop!
  912. boolean border = false
  913. end type
  914. event clicked;call super::clicked;PARENT.TriggerEvent('ue_help')
  915. end event
  916. type cb_copyself from uo_imflatbutton within w_publ_easyq
  917. integer x = 302
  918. integer width = 256
  919. integer height = 164
  920. integer taborder = 30
  921. boolean bringtotop = true
  922. string text = "打开副本"
  923. string normalpicname = "COPY.BMP"
  924. integer picsize = 16
  925. toolbaralignment pic_align = alignattop!
  926. boolean border = false
  927. end type
  928. event clicked;call super::clicked;window lw_win
  929. s_edit_index_tran s_rpinfo
  930. s_rpinfo.if_sendout = if_power_sendout
  931. s_rpinfo.if_print = if_power_print
  932. OpenWithParm(lw_win,s_rpinfo,PARENT.ClassName())
  933. lw_win.WindowState = Normal!
  934. end event
  935. type gb_1 from groupbox within w_publ_easyq
  936. boolean visible = false
  937. integer x = 357
  938. integer y = 524
  939. integer width = 1125
  940. integer height = 148
  941. integer taborder = 80
  942. integer textsize = -9
  943. integer weight = 400
  944. fontcharset fontcharset = gb2312charset!
  945. fontpitch fontpitch = variable!
  946. string facename = "宋体"
  947. long textcolor = 33554432
  948. long backcolor = 15793151
  949. end type
  950. type ln_bar from line within w_publ_easyq
  951. long linecolor = 268435456
  952. integer linethickness = 4
  953. integer beginy = 172
  954. integer endx = 2007
  955. integer endy = 172
  956. end type
  957. type ln_bar2 from line within w_publ_easyq
  958. long linecolor = 16777215
  959. integer linethickness = 4
  960. integer beginy = 176
  961. integer endx = 2039
  962. integer endy = 176
  963. end type
  964. type r_bar from rectangle within w_publ_easyq
  965. long linecolor = 16777215
  966. integer linethickness = 4
  967. long fillcolor = 1073741824
  968. integer x = 2139
  969. integer width = 146
  970. integer height = 68
  971. end type
  972. event constructor;this.fillcolor = 14215660
  973. this.linecolor = 14215660
  974. this.x = -1
  975. this.y = -1
  976. this.height = ln_bar.beginy - 5
  977. end event
  978. type ln_1 from line within w_publ_easyq
  979. long linecolor = 268435456
  980. integer linethickness = 4
  981. integer beginy = 292
  982. integer endx = 2016
  983. integer endy = 292
  984. end type
  985. type ln_2 from line within w_publ_easyq
  986. long linecolor = 16777215
  987. integer linethickness = 4
  988. integer beginy = 296
  989. integer endx = 2048
  990. integer endy = 296
  991. end type
  992. type ln_3 from line within w_publ_easyq
  993. long linecolor = 268435456
  994. integer linethickness = 4
  995. integer beginy = 404
  996. integer endx = 2016
  997. integer endy = 404
  998. end type
  999. type ln_4 from line within w_publ_easyq
  1000. long linecolor = 16777215
  1001. integer linethickness = 4
  1002. integer beginy = 408
  1003. integer endx = 2048
  1004. integer endy = 408
  1005. end type