w_publ_easyq.srw 25 KB

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