w_musttake_ch.srw 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682
  1. $PBExportHeader$w_musttake_ch.srw
  2. forward
  3. global type w_musttake_ch from w_pageretr_ch2
  4. end type
  5. type st_4 from statictext within w_musttake_ch
  6. end type
  7. type em_1 from editmask within w_musttake_ch
  8. end type
  9. type em_2 from editmask within w_musttake_ch
  10. end type
  11. type pb_em1 from picturebutton within w_musttake_ch
  12. end type
  13. type pb_em2 from picturebutton within w_musttake_ch
  14. end type
  15. type pb_2 from picturebutton within w_musttake_ch
  16. end type
  17. type cbx_chkdate from checkbox within w_musttake_ch
  18. end type
  19. end forward
  20. global type w_musttake_ch from w_pageretr_ch2
  21. string title = "客户应收账选择 [按Ctrl键反选]"
  22. event ue_date1 ( )
  23. event ue_date2 ( )
  24. event ue_date3 ( )
  25. event ue_date4 ( )
  26. st_4 st_4
  27. em_1 em_1
  28. em_2 em_2
  29. pb_em1 pb_em1
  30. pb_em2 pb_em2
  31. pb_2 pb_2
  32. cbx_chkdate cbx_chkdate
  33. end type
  34. global w_musttake_ch w_musttake_ch
  35. type variables
  36. s_bmsttake_arr INS_RT_STRU
  37. long cur_scid
  38. long cur_cusid
  39. long cur_moneyid
  40. end variables
  41. forward prototypes
  42. public function integer days_in_month (integer month, integer year)
  43. end prototypes
  44. event ue_date1();//IF THIS.Text = "本日" THEN
  45. em_1.text = string(today(),"yyyy-mm-dd")
  46. em_2.text = string(today(),"yyyy-mm-dd")
  47. //ELSEIF THIS.Text = "本周" THEN
  48. // int li_DayNum
  49. // li_DayNum = DayNumber(today())
  50. // em_1.text = string(RelativeDate ( today(), 1 - li_DayNum ),"yyyy-mm-dd")
  51. // em_2.text = string(RelativeDate ( today(), 7 - li_DayNum ),"yyyy-mm-dd")
  52. //ELSEIF THIS.Text = "本月" THEN
  53. // int li_Month, li_Year, li_Days
  54. // li_Month = Month(today())
  55. // li_Year = Year(today())
  56. // li_Days = days_in_month(li_Month, li_Year)
  57. // em_1.text = string(Date(li_Year, li_Month, 1),"yyyy-mm-dd")
  58. // em_2.text = string(Date(li_Year, li_Month, li_Days),"yyyy-mm-dd")
  59. //END IF
  60. end event
  61. event ue_date2();//IF THIS.Text = "本日" THEN
  62. // em_1.text = string(today(),"yyyy-mm-dd")
  63. // em_2.text = string(today(),"yyyy-mm-dd")
  64. //ELSEIF THIS.Text = "本周" THEN
  65. int li_DayNum
  66. li_DayNum = DayNumber(today())
  67. em_1.text = string(RelativeDate ( today(), 1 - li_DayNum ),"yyyy-mm-dd")
  68. em_2.text = string(RelativeDate ( today(), 7 - li_DayNum ),"yyyy-mm-dd")
  69. //ELSEIF THIS.Text = "本月" THEN
  70. // int li_Month, li_Year, li_Days
  71. // li_Month = Month(today())
  72. // li_Year = Year(today())
  73. // li_Days = days_in_month(li_Month, li_Year)
  74. // em_1.text = string(Date(li_Year, li_Month, 1),"yyyy-mm-dd")
  75. // em_2.text = string(Date(li_Year, li_Month, li_Days),"yyyy-mm-dd")
  76. //END IF
  77. end event
  78. event ue_date3();//IF THIS.Text = "本日" THEN
  79. // em_1.text = string(today(),"yyyy-mm-dd")
  80. // em_2.text = string(today(),"yyyy-mm-dd")
  81. //ELSEIF THIS.Text = "本周" THEN
  82. // int li_DayNum
  83. // li_DayNum = DayNumber(today())
  84. // em_1.text = string(RelativeDate ( today(), 1 - li_DayNum ),"yyyy-mm-dd")
  85. // em_2.text = string(RelativeDate ( today(), 7 - li_DayNum ),"yyyy-mm-dd")
  86. //ELSEIF THIS.Text = "本月" THEN
  87. int li_Month, li_Year, li_Days
  88. li_Month = Month(today())
  89. li_Year = Year(today())
  90. li_Days = days_in_month(li_Month, li_Year)
  91. em_1.text = string(Date(li_Year, li_Month, 1),"yyyy-mm-dd")
  92. em_2.text = string(Date(li_Year, li_Month, li_Days),"yyyy-mm-dd")
  93. //END IF
  94. end event
  95. event ue_date4();//IF THIS.Text = "本日" THEN
  96. // em_1.text = string(today(),"yyyy-mm-dd")
  97. // em_2.text = string(today(),"yyyy-mm-dd")
  98. //ELSEIF THIS.Text = "本周" THEN
  99. // int li_DayNum
  100. // li_DayNum = DayNumber(today())
  101. // em_1.text = string(RelativeDate ( today(), 1 - li_DayNum ),"yyyy-mm-dd")
  102. // em_2.text = string(RelativeDate ( today(), 7 - li_DayNum ),"yyyy-mm-dd")
  103. //ELSEIF THIS.Text = "本月" THEN
  104. Int li_Month, li_Year, li_Days
  105. li_Month = Month(Today())
  106. li_Year = Year(Today())
  107. IF li_Month = 1 THEN
  108. li_Month = 12
  109. li_Year = li_Year - 1
  110. ELSE
  111. li_Month -= 1
  112. END IF
  113. li_Days = days_in_month(li_Month, li_Year)
  114. em_1.Text = String(Date(li_Year, li_Month, 1),"yyyy-mm-dd")
  115. em_2.Text = String(Date(li_Year, li_Month, li_Days),"yyyy-mm-dd")
  116. //END IF
  117. end event
  118. public function integer days_in_month (integer month, integer year);//Most cases are straight forward in that there are a fixed number of
  119. //days in 11 of the 12 months. February is, of course, the problem.
  120. //In a leap year February has 29 days, otherwise 28.
  121. Integer li_DaysInMonth, li_Days[12] = {31,28,31,30,31,30,31,31,30,31,30,31}
  122. // Get the number of days per month for a non leap year.
  123. li_DaysInMonth = li_Days[Month]
  124. // Check for a leap year.
  125. If Month = 2 Then
  126. // If the year is a leap year, change the number of days.
  127. // Leap Year Calculation:
  128. // Year divisible by 4, but not by 100, unless it is also divisible by 400
  129. If ( (Mod(Year,4) = 0 And Mod(Year,100) <> 0) Or (Mod(Year,400) = 0) ) Then
  130. li_DaysInMonth = 29
  131. End If
  132. End If
  133. //Return the number of days in the relevant month
  134. Return li_DaysInMonth
  135. end function
  136. on w_musttake_ch.create
  137. int iCurrent
  138. call super::create
  139. this.st_4=create st_4
  140. this.em_1=create em_1
  141. this.em_2=create em_2
  142. this.pb_em1=create pb_em1
  143. this.pb_em2=create pb_em2
  144. this.pb_2=create pb_2
  145. this.cbx_chkdate=create cbx_chkdate
  146. iCurrent=UpperBound(this.Control)
  147. this.Control[iCurrent+1]=this.st_4
  148. this.Control[iCurrent+2]=this.em_1
  149. this.Control[iCurrent+3]=this.em_2
  150. this.Control[iCurrent+4]=this.pb_em1
  151. this.Control[iCurrent+5]=this.pb_em2
  152. this.Control[iCurrent+6]=this.pb_2
  153. this.Control[iCurrent+7]=this.cbx_chkdate
  154. end on
  155. on w_musttake_ch.destroy
  156. call super::destroy
  157. destroy(this.st_4)
  158. destroy(this.em_1)
  159. destroy(this.em_2)
  160. destroy(this.pb_em1)
  161. destroy(this.pb_em2)
  162. destroy(this.pb_2)
  163. destroy(this.cbx_chkdate)
  164. end on
  165. event close;call super::close;CLOSEWITHRETURN(THIS,INS_RT_STRU)
  166. end event
  167. event retrieve_pageretr;Boolean cb_firstpage_enabled,cb_nextpage_enabled,cb_retrieveall_enabled
  168. Boolean cb_priorpage_enabled,cb_func_enabled,cb_retrieve_enabled
  169. cb_nextpage_enabled = cb_nextpage.Enabled
  170. cb_retrieveall_enabled = cb_retrieveall.Enabled
  171. cb_func_enabled = cb_func.Enabled
  172. cb_nextpage.Enabled = False
  173. cb_retrieveall.Enabled = False
  174. cb_func.Enabled = False
  175. Int li_chkdate
  176. DateTime ldt_sdate, ldt_edate
  177. IF cbx_chkdate.Checked THEN
  178. li_chkdate = 1
  179. ldt_sdate = DateTime(Date(em_1.Text))
  180. ldt_edate = DateTime(Date(em_2.Text), 23:59:59)
  181. ELSE
  182. li_chkdate = 0
  183. SetNull(ldt_sdate)
  184. SetNull(ldt_edate)
  185. END IF
  186. SetPointer(HourGlass!)
  187. dw_pageretr.Retrieve(cur_scid, cur_cusid, li_chkdate, ldt_sdate, ldt_edate, cur_moneyid)
  188. IF dw_pageretr.RowCount() > 0 And dw_pageretr.GetRow() = 0 THEN dw_pageretr.SetRow(1)
  189. SetPointer(Arrow!)
  190. cb_nextpage.Enabled = cb_nextpage_enabled
  191. cb_retrieveall.Enabled = cb_retrieveall_enabled
  192. cb_func.Enabled = cb_func_enabled
  193. IF cbx_mlselect.Checked And dw_pageretr.RowCount() > 1 THEN
  194. dw_pageretr.SelectRow(1,False)
  195. END IF
  196. end event
  197. event open;
  198. This.TriggerEvent('ue_before_open')
  199. wf_movetocenter()
  200. OLD_TITLE = This.Title
  201. s_tran = Message.PowerObjectParm
  202. IF Not IsNull(s_tran) THEN
  203. retrieve_all = s_tran.if_retrieve_all
  204. mode = s_tran.work_mode
  205. arg_pkid = s_tran.arg_pkid
  206. arg_string_code = s_tran.arg_string_code
  207. cur_scid = s_tran.b_long
  208. cur_cusid = s_tran.c_long
  209. cur_moneyid = s_tran.d_long
  210. IF sys_option_scid_msttake_mstpay = 1 THEN
  211. cur_scid = cur_scid
  212. ELSE
  213. cur_scid = -1
  214. END IF
  215. END IF
  216. //////////////// //
  217. This.Title = This.Title
  218. //////////////// //
  219. dw_pageretr.RBUTTON_FILTER_USE = True //右键查询功能开关
  220. dw_pageretr.titleclick_sort_use = True //单击标题排序功能开关
  221. dw_pageretr.SetTransObject (sqlca)
  222. pkcolumndbtname = wf_get_pkcolumndbtname(dw_pageretr) //取第一列为关键字
  223. ori_oldselect = dw_pageretr.Describe("DataWindow.Table.Select")
  224. ls_newselect = ori_oldselect
  225. ds_curquery = Create DATASTORE
  226. ds_curquery.DataObject = 'd_extr_find'
  227. ds_curquery.SetTransObject (sqlca)
  228. wf_editindex_lockf()
  229. IF Not retrieve_all And Trim(arg_string_code) <> '' THEN
  230. sle_usual_query.Text = Trim(arg_string_code)
  231. This.TriggerEvent("ue_usual_query_RETR") //修改ls_newselect,retrieve
  232. ELSE
  233. wf_retrieveuc(dw_pageretr,ls_newselect,1)
  234. This.TriggerEvent('RETRIEVE_pageretr')
  235. END IF
  236. IF retrieve_all And Trim(arg_string_code) <> '' THEN
  237. This.TriggerEvent("ue_usual_query_filt")
  238. END IF
  239. dw_choice.SetTransObject(sqlca)
  240. wf_face_change()
  241. //s_hide_col s_col
  242. //s_col.col_1 = 'cost'
  243. //s_col.col_2 = 'wareamt'
  244. //f_hide_col(490,dw_pageretr,s_col)
  245. //f_hide_col(490,dw_choice,s_col)
  246. //
  247. //s_hide_col s_col_mtrlsectype
  248. //s_col_mtrlsectype.col_1 = 'u_mtrldef_mtrlsectype'
  249. //f_hide_col(1308,dw_pageretr,s_col_mtrlsectype)
  250. //f_hide_col(1308,dw_choice,s_col_mtrlsectype)
  251. //
  252. //s_hide_col s_col_zxmtrlmode
  253. //s_col_zxmtrlmode.col_1 = 'u_mtrldef_zxmtrlmode'
  254. //f_hide_col(1309,dw_pageretr,s_col_zxmtrlmode)
  255. //f_hide_col(1309,dw_choice,s_col_zxmtrlmode)
  256. end event
  257. event ue_usual_query_filt;call super::ue_usual_query_filt;string obj_expr=''
  258. if trim(sle_usual_query.text)<>'' then
  259. IF POS(trim(sle_usual_query.text),'%')=0 THEN
  260. obj_expr=obj_expr+'( billcode LIKE "%'+trim(sle_usual_query.text)+'%") '
  261. obj_expr=obj_expr+' or ( u_bmsttake_relcode LIKE "%'+trim(sle_usual_query.text)+'%" )'
  262. ELSE
  263. obj_expr=obj_expr+'( billcode LIKE "'+trim(sle_usual_query.text)+'" )'
  264. obj_expr=obj_expr+' or ( u_bmsttake_relcode LIKE "'+trim(sle_usual_query.text)+'" )'
  265. END IF
  266. end if
  267. dw_pageretr.setfilter(obj_expr)
  268. dw_pageretr.SetRedraw(False)
  269. dw_pageretr.filter()
  270. if dw_pageretr.rowcount()>=1 then
  271. dw_pageretr.selectrow(0,false)
  272. dw_pageretr.selectrow(1,true )
  273. end if
  274. dw_pageretr.SetRedraw(TRUE )
  275. end event
  276. event ue_usual_query_retr;call super::ue_usual_query_retr;String ls_querystrpart = ''
  277. ls_newselect = Lower(ori_oldselect)
  278. IF Trim(sle_usual_query.Text) <> '' THEN
  279. IF Pos(Trim(sle_usual_query.Text),'%') = 0 THEN
  280. ls_querystrpart = ls_querystrpart + "(U_Bmsttake.billcode like '%"+Trim(sle_usual_query.Text)+"%'"
  281. ls_querystrpart = ls_querystrpart + " or U_Bmsttake.relcode like '%"+Trim(sle_usual_query.Text)+"%')"
  282. ELSE
  283. ls_querystrpart = ls_querystrpart + "( U_Bmsttake.billcode like '"+Trim(sle_usual_query.Text)+"'"
  284. ls_querystrpart = ls_querystrpart + " or U_Bmsttake.relcode like '"+Trim(sle_usual_query.Text)+"')"
  285. END IF
  286. IF Pos(ls_newselect," where ") <> 0 THEN
  287. ls_newselect = ls_newselect+" AND ("+ls_querystrpart+')'
  288. ELSE
  289. ls_newselect = ls_newselect+" where ("+ls_querystrpart+')'
  290. END IF
  291. END IF
  292. wf_retrieveuc(dw_pageretr,ls_newselect,1)
  293. THIS.TriggerEvent('retrieve_pageretr')
  294. end event
  295. type cb_func from w_pageretr_ch2`cb_func within w_musttake_ch
  296. end type
  297. type cb_exit from w_pageretr_ch2`cb_exit within w_musttake_ch
  298. end type
  299. type sle_usual_query from w_pageretr_ch2`sle_usual_query within w_musttake_ch
  300. end type
  301. type cb_retrieveall from w_pageretr_ch2`cb_retrieveall within w_musttake_ch
  302. end type
  303. type em_pagerowno from w_pageretr_ch2`em_pagerowno within w_musttake_ch
  304. end type
  305. type dw_pageretr from w_pageretr_ch2`dw_pageretr within w_musttake_ch
  306. string dataobject = "dw_msttake_ch"
  307. end type
  308. type st_1 from w_pageretr_ch2`st_1 within w_musttake_ch
  309. string text = "凭证号码含:"
  310. end type
  311. type cb_nextpage from w_pageretr_ch2`cb_nextpage within w_musttake_ch
  312. end type
  313. type cb_choice from w_pageretr_ch2`cb_choice within w_musttake_ch
  314. end type
  315. event cb_choice::clicked;call super::clicked;Long ROW,ls_i = 0,chC = 0
  316. datawindow dw
  317. IF cbx_ml.Checked THEN
  318. dw = dw_pageretr
  319. ROW = dw.GetRow()
  320. IF ROW <= 0 THEN
  321. MessageBox('提示','请先选择目标行!', Information!, OK! )
  322. RETURN
  323. END IF
  324. ELSE
  325. dw = dw_choice
  326. dw.AcceptText()
  327. ROW = dw.RowCount()
  328. IF ROW <= 0 THEN
  329. MessageBox('提示','请先选择缓冲目标!', Information!, OK! )
  330. RETURN
  331. END IF
  332. END IF
  333. FOR ls_i = 1 To dw.RowCount()
  334. IF not cbx_ml.Checked or dw.IsSelected(ls_i) THEN
  335. chC++
  336. INS_RT_STRU.scid[chC] = dw.Object.u_bmsttake_scid[ls_i]
  337. INS_RT_STRU.takeid[chC] = dw.Object.takeid[ls_i]
  338. INS_RT_STRU.takedate[chC] = dw.Object.takedate[ls_i]
  339. INS_RT_STRU.inrep[chC] = dw.Object.inrep[ls_i]
  340. INS_RT_STRU.oriamt[chC] = dw.Object.oriamt[ls_i]
  341. INS_RT_STRU.msttakeamt[chC] = dw.Object.msttakeamt[ls_i]
  342. INS_RT_STRU.takeamt[chC] = dw.Object.takeamt[ls_i]
  343. INS_RT_STRU.billcode[chC] = dw.Object.billcode[ls_i]
  344. INS_RT_STRU.relcode[chC] = dw.Object.u_bmsttake_relcode[ls_i]
  345. INS_RT_STRU.dscrp[chC] = dw.Object.dscrp[ls_i]
  346. INS_RT_STRU.viewdate[chC] = dw.Object.viewdate[ls_i]
  347. INS_RT_STRU.banktypeid[chC] = dw.Object.u_bmsttake_banktypeid[ls_i]
  348. INS_RT_STRU.buildtype[chC] = dw.Object.buildtype[ls_i]
  349. INS_RT_STRU.outwareid[chC] = dw.Object.outwareid[ls_i]
  350. INS_RT_STRU.accountsid[chC] = dw.Object.u_bmsttake_accountsid[ls_i]
  351. INS_RT_STRU.itemid[chC] = dw.Object.u_bmsttake_itemid[ls_i]
  352. INS_RT_STRU.moneyid[chC] = dw.Object.u_bmsttake_moneyid[ls_i]
  353. END IF
  354. NEXT
  355. IF chC = 0 THEN
  356. MessageBox('提示','请至少选择一个目标行!', Information!, OK! )
  357. RETURN
  358. END IF
  359. CLOSE(PARENT)
  360. end event
  361. type cb_refresh from w_pageretr_ch2`cb_refresh within w_musttake_ch
  362. end type
  363. type cb_help from w_pageretr_ch2`cb_help within w_musttake_ch
  364. end type
  365. type ln_bar from w_pageretr_ch2`ln_bar within w_musttake_ch
  366. end type
  367. type ln_bar2 from w_pageretr_ch2`ln_bar2 within w_musttake_ch
  368. end type
  369. type r_bar from w_pageretr_ch2`r_bar within w_musttake_ch
  370. end type
  371. type ln_1 from w_pageretr_ch2`ln_1 within w_musttake_ch
  372. end type
  373. type ln_2 from w_pageretr_ch2`ln_2 within w_musttake_ch
  374. end type
  375. type cbx_ml from w_pageretr_ch2`cbx_ml within w_musttake_ch
  376. end type
  377. type cb_ok from w_pageretr_ch2`cb_ok within w_musttake_ch
  378. end type
  379. event cb_ok::clicked;call super::clicked;Long ROW,ls_i,chC = 0
  380. ROW = dw_pageretr.GetRow()
  381. IF ROW <= 0 THEN
  382. MessageBox('提示','请先选择目标行!', Information!, OK! )
  383. RETURN
  384. END IF
  385. FOR ls_i = 1 To dw_pageretr.RowCount()
  386. IF dw_pageretr.IsSelected(ls_i) THEN
  387. IF dw_choice.Find('takeid ='+String(dw_pageretr.Object.takeid[ls_i]),1,dw_choice.RowCount()) = 0 THEN
  388. chC++
  389. dw_pageretr.RowsCopy(ls_i, ls_i, Primary!, dw_choice, dw_choice.RowCount() + 1, Primary!)
  390. END IF
  391. END IF
  392. NEXT
  393. end event
  394. type cb_del from w_pageretr_ch2`cb_del within w_musttake_ch
  395. end type
  396. type cbx_mlselect from w_pageretr_ch2`cbx_mlselect within w_musttake_ch
  397. integer x = 1239
  398. end type
  399. type dw_choice from w_pageretr_ch2`dw_choice within w_musttake_ch
  400. string dataobject = "dw_msttake_ch"
  401. end type
  402. type cbx_allselect from w_pageretr_ch2`cbx_allselect within w_musttake_ch
  403. integer x = 1467
  404. end type
  405. type st_4 from statictext within w_musttake_ch
  406. integer x = 2565
  407. integer y = 196
  408. integer width = 105
  409. integer height = 60
  410. boolean bringtotop = true
  411. integer textsize = -9
  412. integer weight = 400
  413. fontcharset fontcharset = gb2312charset!
  414. fontpitch fontpitch = variable!
  415. string facename = "宋体"
  416. long textcolor = 33554432
  417. long backcolor = 134217739
  418. boolean enabled = false
  419. string text = "到:"
  420. alignment alignment = right!
  421. boolean focusrectangle = false
  422. end type
  423. type em_1 from editmask within w_musttake_ch
  424. integer x = 2057
  425. integer y = 180
  426. integer width = 407
  427. integer height = 88
  428. integer taborder = 110
  429. boolean bringtotop = true
  430. integer textsize = -9
  431. integer weight = 400
  432. fontcharset fontcharset = gb2312charset!
  433. fontpitch fontpitch = variable!
  434. string facename = "宋体"
  435. long textcolor = 33554432
  436. borderstyle borderstyle = stylelowered!
  437. maskdatatype maskdatatype = datemask!
  438. string mask = "yyyy-mm-dd"
  439. boolean spin = true
  440. end type
  441. event rbuttondown;s_calender_arg s_calender
  442. s_calender.PointerX = THIS.PointerX()
  443. s_calender.PointerY = THIS.PointerY()
  444. s_calender.X = THIS.X
  445. s_calender.Y = THIS.Y
  446. OpenWithParm(w_calendar,s_calender)
  447. THIS.Text = String(id_date_selected)
  448. end event
  449. event constructor;This.Text = String(Today(), 'yyyy-mm')+'-01'
  450. end event
  451. type em_2 from editmask within w_musttake_ch
  452. integer x = 2670
  453. integer y = 180
  454. integer width = 407
  455. integer height = 88
  456. integer taborder = 120
  457. boolean bringtotop = true
  458. integer textsize = -9
  459. integer weight = 400
  460. fontcharset fontcharset = gb2312charset!
  461. fontpitch fontpitch = variable!
  462. string facename = "宋体"
  463. long textcolor = 33554432
  464. borderstyle borderstyle = stylelowered!
  465. maskdatatype maskdatatype = datemask!
  466. string mask = "yyyy-mm-dd"
  467. boolean spin = true
  468. end type
  469. event rbuttondown;s_calender_arg s_calender
  470. s_calender.PointerX = THIS.PointerX()
  471. s_calender.PointerY = THIS.PointerY()
  472. s_calender.X = THIS.X
  473. s_calender.Y = THIS.Y
  474. OpenWithParm(w_calendar,s_calender)
  475. THIS.Text = String(id_date_selected)
  476. end event
  477. event constructor;This.Text = String(Today(), 'yyyy-mm-dd')
  478. end event
  479. type pb_em1 from picturebutton within w_musttake_ch
  480. integer x = 2473
  481. integer y = 180
  482. integer width = 101
  483. integer height = 92
  484. integer taborder = 120
  485. boolean bringtotop = true
  486. integer textsize = -9
  487. integer weight = 400
  488. fontcharset fontcharset = gb2312charset!
  489. fontpitch fontpitch = variable!
  490. string facename = "宋体"
  491. string picturename = "date.BMP"
  492. alignment htextalign = left!
  493. end type
  494. event clicked;em_1.triggerevent(rbuttondown!)
  495. end event
  496. type pb_em2 from picturebutton within w_musttake_ch
  497. integer x = 3086
  498. integer y = 180
  499. integer width = 101
  500. integer height = 92
  501. integer taborder = 130
  502. boolean bringtotop = true
  503. integer textsize = -9
  504. integer weight = 400
  505. fontcharset fontcharset = gb2312charset!
  506. fontpitch fontpitch = variable!
  507. string facename = "宋体"
  508. string picturename = "date.BMP"
  509. alignment htextalign = left!
  510. end type
  511. event clicked;em_2.triggerevent(rbuttondown!)
  512. end event
  513. type pb_2 from picturebutton within w_musttake_ch
  514. integer x = 3195
  515. integer y = 180
  516. integer width = 101
  517. integer height = 92
  518. integer taborder = 140
  519. boolean bringtotop = true
  520. integer textsize = -9
  521. integer weight = 400
  522. fontcharset fontcharset = gb2312charset!
  523. fontpitch fontpitch = variable!
  524. string facename = "宋体"
  525. string picturename = "date1.BMP"
  526. alignment htextalign = left!
  527. end type
  528. event clicked;m_Dfc_Control_PopupMenu dmPopupMenu
  529. string menustr
  530. menustr="Text=本日~tEvent=ue_date1"
  531. menustr = menustr + "|" + "Text=本周~tEvent=ue_date2"
  532. menustr = menustr + "|" + "Text=本月~tEvent=ue_date3"
  533. menustr = menustr + "|" + "Text=上月~tEvent=ue_date4"
  534. if len(trim(menustr))<>0 then
  535. dmPopupMenu = Create m_Dfc_Control_PopupMenu
  536. dmPopupMenu.mf_BuildMenu(This, menustr)
  537. dmPopupMenu.mf_PopMenu()
  538. Destroy dmPopupMenu
  539. end if
  540. end event
  541. type cbx_chkdate from checkbox within w_musttake_ch
  542. integer x = 1787
  543. integer y = 196
  544. integer width = 265
  545. integer height = 60
  546. boolean bringtotop = true
  547. integer textsize = -9
  548. integer weight = 400
  549. fontcharset fontcharset = gb2312charset!
  550. fontpitch fontpitch = variable!
  551. string facename = "宋体"
  552. long textcolor = 33554432
  553. long backcolor = 134217739
  554. string text = "按日期"
  555. end type