w_mustpay_ch.srw 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684
  1. $PBExportHeader$w_mustpay_ch.srw
  2. forward
  3. global type w_mustpay_ch from w_pageretr_ch2
  4. end type
  5. type st_4 from statictext within w_mustpay_ch
  6. end type
  7. type em_1 from editmask within w_mustpay_ch
  8. end type
  9. type em_2 from editmask within w_mustpay_ch
  10. end type
  11. type pb_em1 from picturebutton within w_mustpay_ch
  12. end type
  13. type pb_em2 from picturebutton within w_mustpay_ch
  14. end type
  15. type pb_2 from picturebutton within w_mustpay_ch
  16. end type
  17. type cbx_chkdate from checkbox within w_mustpay_ch
  18. end type
  19. end forward
  20. global type w_mustpay_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_mustpay_ch w_mustpay_ch
  35. type variables
  36. s_bmstpay_arr INS_RT_STRU
  37. long cur_scid
  38. long cur_sptid
  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_mustpay_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_mustpay_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_sptid, 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_sptid = 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_Bmstpay_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_Bmstpay_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_Bmstpay.billcode like '%"+Trim(sle_usual_query.Text)+"%'"
  281. ls_querystrpart = ls_querystrpart + " or U_Bmstpay.relcode like '%"+Trim(sle_usual_query.Text)+"%')"
  282. ELSE
  283. ls_querystrpart = ls_querystrpart + "( U_Bmstpay.billcode like '"+Trim(sle_usual_query.Text)+"'"
  284. ls_querystrpart = ls_querystrpart + " or U_Bmstpay.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_mustpay_ch
  296. end type
  297. type cb_exit from w_pageretr_ch2`cb_exit within w_mustpay_ch
  298. end type
  299. type sle_usual_query from w_pageretr_ch2`sle_usual_query within w_mustpay_ch
  300. end type
  301. type cb_retrieveall from w_pageretr_ch2`cb_retrieveall within w_mustpay_ch
  302. end type
  303. type em_pagerowno from w_pageretr_ch2`em_pagerowno within w_mustpay_ch
  304. end type
  305. type dw_pageretr from w_pageretr_ch2`dw_pageretr within w_mustpay_ch
  306. string dataobject = "dw_mstpay_ch"
  307. end type
  308. type st_1 from w_pageretr_ch2`st_1 within w_mustpay_ch
  309. string text = "凭证号码含:"
  310. end type
  311. type cb_nextpage from w_pageretr_ch2`cb_nextpage within w_mustpay_ch
  312. end type
  313. type cb_choice from w_pageretr_ch2`cb_choice within w_mustpay_ch
  314. integer weight = 700
  315. end type
  316. event cb_choice::clicked;call super::clicked;Long ROW,ls_i = 0,chC = 0
  317. datawindow dw
  318. IF cbx_ml.Checked THEN //直接多选
  319. dw = dw_pageretr
  320. ROW = dw.GetRow()
  321. IF ROW <= 0 THEN
  322. MessageBox('提示','请先选择目标行!', Information!, OK! )
  323. RETURN
  324. END IF
  325. ELSE
  326. dw = dw_choice
  327. dw.AcceptText()
  328. ROW = dw.RowCount()
  329. IF ROW <= 0 THEN
  330. MessageBox('提示','请先选择缓冲目标!', Information!, OK! )
  331. RETURN
  332. END IF
  333. END IF
  334. FOR ls_i = 1 To dw.RowCount()
  335. IF not cbx_ml.Checked or dw.IsSelected(ls_i) THEN
  336. chC++
  337. INS_RT_STRU.scid[chC] = dw.Object.U_Bmstpay_scid[ls_i]
  338. INS_RT_STRU.payid[chC] = dw.Object.payid[ls_i]
  339. INS_RT_STRU.paydate[chC] = dw.Object.paydate[ls_i]
  340. INS_RT_STRU.inrep[chC] = dw.Object.inrep[ls_i]
  341. INS_RT_STRU.oriamt[chC] = dw.Object.oriamt[ls_i]
  342. INS_RT_STRU.mstpayamt[chC] = dw.Object.mstpayamt[ls_i]
  343. INS_RT_STRU.payamt[chC] = dw.Object.payamt[ls_i]
  344. INS_RT_STRU.billcode[chC] = dw.Object.billcode[ls_i]
  345. INS_RT_STRU.relcode[chC] = dw.Object.U_Bmstpay_relcode[ls_i]
  346. INS_RT_STRU.dscrp[chC] = dw.Object.dscrp[ls_i]
  347. INS_RT_STRU.viewdate[chC] = dw.Object.viewdate[ls_i]
  348. INS_RT_STRU.banktypeid[chC] = dw.Object.U_Bmstpay_banktypeid[ls_i]
  349. INS_RT_STRU.buildtype[chC] = dw.Object.buildtype[ls_i]
  350. INS_RT_STRU.inwareid[chC] = dw.Object.inwareid[ls_i]
  351. INS_RT_STRU.accountsid[chC] = dw.Object.U_Bmstpay_accountsid[ls_i]
  352. INS_RT_STRU.itemid[chC] = dw.Object.U_Bmstpay_itemid[ls_i]
  353. INS_RT_STRU.moneyid[chC] = dw.Object.U_Bmstpay_moneyid[ls_i]
  354. END IF
  355. NEXT
  356. IF chC = 0 THEN
  357. MessageBox('提示','请至少选择一个目标行!', Information!, OK! )
  358. RETURN
  359. END IF
  360. CLOSE(PARENT)
  361. end event
  362. type cb_refresh from w_pageretr_ch2`cb_refresh within w_mustpay_ch
  363. end type
  364. type cb_help from w_pageretr_ch2`cb_help within w_mustpay_ch
  365. end type
  366. type ln_bar from w_pageretr_ch2`ln_bar within w_mustpay_ch
  367. end type
  368. type ln_bar2 from w_pageretr_ch2`ln_bar2 within w_mustpay_ch
  369. end type
  370. type r_bar from w_pageretr_ch2`r_bar within w_mustpay_ch
  371. end type
  372. type ln_1 from w_pageretr_ch2`ln_1 within w_mustpay_ch
  373. end type
  374. type ln_2 from w_pageretr_ch2`ln_2 within w_mustpay_ch
  375. end type
  376. type cbx_ml from w_pageretr_ch2`cbx_ml within w_mustpay_ch
  377. end type
  378. type cb_ok from w_pageretr_ch2`cb_ok within w_mustpay_ch
  379. end type
  380. event cb_ok::clicked;call super::clicked;Long ROW,ls_i,chC = 0
  381. ROW = dw_pageretr.GetRow()
  382. IF ROW <= 0 THEN
  383. MessageBox('提示','请先选择目标行!', Information!, OK! )
  384. RETURN
  385. END IF
  386. FOR ls_i = 1 To dw_pageretr.RowCount()
  387. IF dw_pageretr.IsSelected(ls_i) THEN
  388. IF dw_choice.Find('payid ='+String(dw_pageretr.Object.payid[ls_i]),1,dw_choice.RowCount()) = 0 THEN
  389. chC++
  390. dw_pageretr.RowsCopy(ls_i, ls_i, Primary!, dw_choice, dw_choice.RowCount() + 1, Primary!)
  391. END IF
  392. END IF
  393. NEXT
  394. end event
  395. type cb_del from w_pageretr_ch2`cb_del within w_mustpay_ch
  396. end type
  397. type cbx_mlselect from w_pageretr_ch2`cbx_mlselect within w_mustpay_ch
  398. integer x = 1239
  399. end type
  400. type dw_choice from w_pageretr_ch2`dw_choice within w_mustpay_ch
  401. string dataobject = "dw_mstpay_ch"
  402. end type
  403. type cbx_allselect from w_pageretr_ch2`cbx_allselect within w_mustpay_ch
  404. integer x = 1467
  405. end type
  406. type st_4 from statictext within w_mustpay_ch
  407. integer x = 2565
  408. integer y = 196
  409. integer width = 105
  410. integer height = 60
  411. boolean bringtotop = true
  412. integer textsize = -9
  413. integer weight = 400
  414. fontcharset fontcharset = gb2312charset!
  415. fontpitch fontpitch = variable!
  416. string facename = "宋体"
  417. long textcolor = 33554432
  418. long backcolor = 134217739
  419. boolean enabled = false
  420. string text = "到:"
  421. alignment alignment = right!
  422. boolean focusrectangle = false
  423. end type
  424. type em_1 from editmask within w_mustpay_ch
  425. integer x = 2057
  426. integer y = 180
  427. integer width = 407
  428. integer height = 88
  429. integer taborder = 110
  430. boolean bringtotop = true
  431. integer textsize = -9
  432. integer weight = 400
  433. fontcharset fontcharset = gb2312charset!
  434. fontpitch fontpitch = variable!
  435. string facename = "宋体"
  436. long textcolor = 33554432
  437. borderstyle borderstyle = stylelowered!
  438. maskdatatype maskdatatype = datemask!
  439. string mask = "yyyy-mm-dd"
  440. boolean spin = true
  441. end type
  442. event rbuttondown;s_calender_arg s_calender
  443. s_calender.PointerX = THIS.PointerX()
  444. s_calender.PointerY = THIS.PointerY()
  445. s_calender.X = THIS.X
  446. s_calender.Y = THIS.Y
  447. OpenWithParm(w_calendar,s_calender)
  448. THIS.Text = String(id_date_selected)
  449. end event
  450. event constructor;This.Text = String(Today(), 'yyyy-mm')+'-01'
  451. end event
  452. type em_2 from editmask within w_mustpay_ch
  453. integer x = 2670
  454. integer y = 180
  455. integer width = 407
  456. integer height = 88
  457. integer taborder = 120
  458. boolean bringtotop = true
  459. integer textsize = -9
  460. integer weight = 400
  461. fontcharset fontcharset = gb2312charset!
  462. fontpitch fontpitch = variable!
  463. string facename = "宋体"
  464. long textcolor = 33554432
  465. borderstyle borderstyle = stylelowered!
  466. maskdatatype maskdatatype = datemask!
  467. string mask = "yyyy-mm-dd"
  468. boolean spin = true
  469. end type
  470. event rbuttondown;s_calender_arg s_calender
  471. s_calender.PointerX = THIS.PointerX()
  472. s_calender.PointerY = THIS.PointerY()
  473. s_calender.X = THIS.X
  474. s_calender.Y = THIS.Y
  475. OpenWithParm(w_calendar,s_calender)
  476. THIS.Text = String(id_date_selected)
  477. end event
  478. event constructor;This.Text = String(Today(), 'yyyy-mm-dd')
  479. end event
  480. type pb_em1 from picturebutton within w_mustpay_ch
  481. integer x = 2473
  482. integer y = 180
  483. integer width = 101
  484. integer height = 92
  485. integer taborder = 120
  486. boolean bringtotop = true
  487. integer textsize = -9
  488. integer weight = 400
  489. fontcharset fontcharset = gb2312charset!
  490. fontpitch fontpitch = variable!
  491. string facename = "宋体"
  492. string picturename = "date.BMP"
  493. alignment htextalign = left!
  494. end type
  495. event clicked;em_1.triggerevent(rbuttondown!)
  496. end event
  497. type pb_em2 from picturebutton within w_mustpay_ch
  498. integer x = 3086
  499. integer y = 180
  500. integer width = 101
  501. integer height = 92
  502. integer taborder = 130
  503. boolean bringtotop = true
  504. integer textsize = -9
  505. integer weight = 400
  506. fontcharset fontcharset = gb2312charset!
  507. fontpitch fontpitch = variable!
  508. string facename = "宋体"
  509. string picturename = "date.BMP"
  510. alignment htextalign = left!
  511. end type
  512. event clicked;em_2.triggerevent(rbuttondown!)
  513. end event
  514. type pb_2 from picturebutton within w_mustpay_ch
  515. integer x = 3195
  516. integer y = 180
  517. integer width = 101
  518. integer height = 92
  519. integer taborder = 140
  520. boolean bringtotop = true
  521. integer textsize = -9
  522. integer weight = 400
  523. fontcharset fontcharset = gb2312charset!
  524. fontpitch fontpitch = variable!
  525. string facename = "宋体"
  526. string picturename = "date1.BMP"
  527. alignment htextalign = left!
  528. end type
  529. event clicked;m_Dfc_Control_PopupMenu dmPopupMenu
  530. string menustr
  531. menustr="Text=本日~tEvent=ue_date1"
  532. menustr = menustr + "|" + "Text=本周~tEvent=ue_date2"
  533. menustr = menustr + "|" + "Text=本月~tEvent=ue_date3"
  534. menustr = menustr + "|" + "Text=上月~tEvent=ue_date4"
  535. if len(trim(menustr))<>0 then
  536. dmPopupMenu = Create m_Dfc_Control_PopupMenu
  537. dmPopupMenu.mf_BuildMenu(This, menustr)
  538. dmPopupMenu.mf_PopMenu()
  539. Destroy dmPopupMenu
  540. end if
  541. end event
  542. type cbx_chkdate from checkbox within w_mustpay_ch
  543. integer x = 1787
  544. integer y = 196
  545. integer width = 265
  546. integer height = 60
  547. boolean bringtotop = true
  548. integer textsize = -9
  549. integer weight = 400
  550. fontcharset fontcharset = gb2312charset!
  551. fontpitch fontpitch = variable!
  552. string facename = "宋体"
  553. long textcolor = 33554432
  554. long backcolor = 134217739
  555. string text = "按日期"
  556. end type