w_warebalc_view_old.srw 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860
  1. $PBExportHeader$w_warebalc_view_old.srw
  2. forward
  3. global type w_warebalc_view_old from w_publ_pageretr_easyq
  4. end type
  5. type ddlb_storageid from uo_ddlb_storageid within w_warebalc_view_old
  6. end type
  7. type ddlb_mtrlprp from dropdownlistbox within w_warebalc_view_old
  8. end type
  9. type em_month from editmask within w_warebalc_view_old
  10. end type
  11. type st_2 from statictext within w_warebalc_view_old
  12. end type
  13. type st_4 from statictext within w_warebalc_view_old
  14. end type
  15. type em_endmonth from editmask within w_warebalc_view_old
  16. end type
  17. type pb_em1 from picturebutton within w_warebalc_view_old
  18. end type
  19. type pb_em2 from picturebutton within w_warebalc_view_old
  20. end type
  21. type pb_2 from picturebutton within w_warebalc_view_old
  22. end type
  23. type ddlb_2 from dropdownlistbox within w_warebalc_view_old
  24. end type
  25. type tv_1 from uo_tv_mtrltype within w_warebalc_view_old
  26. end type
  27. type st_3 from statictext within w_warebalc_view_old
  28. end type
  29. end forward
  30. global type w_warebalc_view_old from w_publ_pageretr_easyq
  31. integer width = 3831
  32. string title = "仓库推算结存表"
  33. event ue_date1 ( )
  34. event ue_date2 ( )
  35. event type integer days_in_month ( integer month, integer year )
  36. event ue_date3 ( )
  37. ddlb_storageid ddlb_storageid
  38. ddlb_mtrlprp ddlb_mtrlprp
  39. em_month em_month
  40. st_2 st_2
  41. st_4 st_4
  42. em_endmonth em_endmonth
  43. pb_em1 pb_em1
  44. pb_em2 pb_em2
  45. pb_2 pb_2
  46. ddlb_2 ddlb_2
  47. tv_1 tv_1
  48. st_3 st_3
  49. end type
  50. global w_warebalc_view_old w_warebalc_view_old
  51. type variables
  52. Long cur_storageid = -1
  53. long cur_storageid_arr[]
  54. DateTime balcdate //结存日期
  55. DateTime balcdate_end //结存日期end
  56. //Int cur_mtrlorigin = -1 //当前显示物料来源
  57. String ls_handtype = ''
  58. string ls_mtrltype = ''
  59. long viewtype = 0
  60. end variables
  61. forward prototypes
  62. public subroutine wf_hide_col ()
  63. public function integer days_in_month (integer month, integer year)
  64. end prototypes
  65. event ue_date1();//IF THIS.Text = "本日" THEN
  66. em_month.text = string(today(),"yyyy-mm-dd")
  67. em_endmonth.text = string(today(),"yyyy-mm-dd")
  68. //ELSEIF THIS.Text = "本周" THEN
  69. // int li_DayNum
  70. // li_DayNum = DayNumber(today())
  71. // em_1.text = string(RelativeDate ( today(), 1 - li_DayNum ),"yyyy-mm-dd")
  72. // em_2.text = string(RelativeDate ( today(), 7 - li_DayNum ),"yyyy-mm-dd")
  73. //ELSEIF THIS.Text = "本月" THEN
  74. // int li_Month, li_Year, li_Days
  75. // li_Month = Month(today())
  76. // li_Year = Year(today())
  77. // li_Days = days_in_month(li_Month, li_Year)
  78. // em_1.text = string(Date(li_Year, li_Month, 1),"yyyy-mm-dd")
  79. // em_2.text = string(Date(li_Year, li_Month, li_Days),"yyyy-mm-dd")
  80. //END IF
  81. end event
  82. event ue_date2();//IF THIS.Text = "本日" THEN
  83. // em_1.text = string(today(),"yyyy-mm-dd")
  84. // em_2.text = string(today(),"yyyy-mm-dd")
  85. //ELSEIF THIS.Text = "本周" THEN
  86. int li_DayNum
  87. li_DayNum = DayNumber(today())
  88. em_month.text = string(RelativeDate ( today(), 1 - li_DayNum ),"yyyy-mm-dd")
  89. em_endmonth.text = string(RelativeDate ( today(), 7 - li_DayNum ),"yyyy-mm-dd")
  90. //ELSEIF THIS.Text = "本月" THEN
  91. // int li_Month, li_Year, li_Days
  92. // li_Month = Month(today())
  93. // li_Year = Year(today())
  94. // li_Days = days_in_month(li_Month, li_Year)
  95. // em_1.text = string(Date(li_Year, li_Month, 1),"yyyy-mm-dd")
  96. // em_2.text = string(Date(li_Year, li_Month, li_Days),"yyyy-mm-dd")
  97. //END IF
  98. end event
  99. event type integer days_in_month(integer month, integer year);//Most cases are straight forward in that there are a fixed number of
  100. //days in 11 of the 12 months. February is, of course, the problem.
  101. //In a leap year February has 29 days, otherwise 28.
  102. Integer li_DaysInMonth, li_Days[12] = {31,28,31,30,31,30,31,31,30,31,30,31}
  103. // Get the number of days per month for a non leap year.
  104. li_DaysInMonth = li_Days[Month]
  105. // Check for a leap year.
  106. If Month = 2 Then
  107. // If the year is a leap year, change the number of days.
  108. // Leap Year Calculation:
  109. // Year divisible by 4, but not by 100, unless it is also divisible by 400
  110. If ( (Mod(Year,4) = 0 And Mod(Year,100) <> 0) Or (Mod(Year,400) = 0) ) Then
  111. li_DaysInMonth = 29
  112. End If
  113. End If
  114. //Return the number of days in the relevant month
  115. Return li_DaysInMonth
  116. end event
  117. event ue_date3();//IF THIS.Text = "本日" THEN
  118. // em_1.text = string(today(),"yyyy-mm-dd")
  119. // em_2.text = string(today(),"yyyy-mm-dd")
  120. //ELSEIF THIS.Text = "本周" THEN
  121. // int li_DayNum
  122. // li_DayNum = DayNumber(today())
  123. // em_1.text = string(RelativeDate ( today(), 1 - li_DayNum ),"yyyy-mm-dd")
  124. // em_2.text = string(RelativeDate ( today(), 7 - li_DayNum ),"yyyy-mm-dd")
  125. //ELSEIF THIS.Text = "本月" THEN
  126. int li_Month, li_Year, li_Days
  127. li_Month = Month(today())
  128. li_Year = Year(today())
  129. li_Days = days_in_month(li_Month, li_Year)
  130. em_month.text = string(Date(li_Year, li_Month, 1),"yyyy-mm-dd")
  131. em_endmonth.text = string(Date(li_Year, li_Month, li_Days),"yyyy-mm-dd")
  132. //END IF
  133. end event
  134. public subroutine wf_hide_col ();s_hide_col s_col
  135. s_col.col_1 = 'bgamt'
  136. s_col.col_2 = 'uv_warebalc_view_incamt'
  137. s_col.col_3 = 'uv_warebalc_view_desamt'
  138. s_col.col_4 = 'uv_warebalc_view_balcamt'
  139. f_hide_col(123,dw_pageretr,s_col)
  140. s_hide_col s_col_mtrlsectype
  141. s_col_mtrlsectype.col_1 = 'u_mtrldef_mtrlsectype'
  142. f_hide_col(1308,dw_pageretr,s_col_mtrlsectype)
  143. s_hide_col s_col_zxmtrlmode
  144. s_col_zxmtrlmode.col_1 = 'u_mtrldef_zxmtrlmode'
  145. f_hide_col(1309,dw_pageretr,s_col_zxmtrlmode)
  146. end subroutine
  147. public function integer days_in_month (integer month, integer year);//Most cases are straight forward in that there are a fixed number of
  148. //days in 11 of the 12 months. February is, of course, the problem.
  149. //In a leap year February has 29 days, otherwise 28.
  150. Integer li_DaysInMonth, li_Days[12] = {31,28,31,30,31,30,31,31,30,31,30,31}
  151. // Get the number of days per month for a non leap year.
  152. li_DaysInMonth = li_Days[Month]
  153. // Check for a leap year.
  154. If Month = 2 Then
  155. // If the year is a leap year, change the number of days.
  156. // Leap Year Calculation:
  157. // Year divisible by 4, but not by 100, unless it is also divisible by 400
  158. If ( (Mod(Year,4) = 0 And Mod(Year,100) <> 0) Or (Mod(Year,400) = 0) ) Then
  159. li_DaysInMonth = 29
  160. End If
  161. End If
  162. //Return the number of days in the relevant month
  163. Return li_DaysInMonth
  164. end function
  165. on w_warebalc_view_old.create
  166. int iCurrent
  167. call super::create
  168. this.ddlb_storageid=create ddlb_storageid
  169. this.ddlb_mtrlprp=create ddlb_mtrlprp
  170. this.em_month=create em_month
  171. this.st_2=create st_2
  172. this.st_4=create st_4
  173. this.em_endmonth=create em_endmonth
  174. this.pb_em1=create pb_em1
  175. this.pb_em2=create pb_em2
  176. this.pb_2=create pb_2
  177. this.ddlb_2=create ddlb_2
  178. this.tv_1=create tv_1
  179. this.st_3=create st_3
  180. iCurrent=UpperBound(this.Control)
  181. this.Control[iCurrent+1]=this.ddlb_storageid
  182. this.Control[iCurrent+2]=this.ddlb_mtrlprp
  183. this.Control[iCurrent+3]=this.em_month
  184. this.Control[iCurrent+4]=this.st_2
  185. this.Control[iCurrent+5]=this.st_4
  186. this.Control[iCurrent+6]=this.em_endmonth
  187. this.Control[iCurrent+7]=this.pb_em1
  188. this.Control[iCurrent+8]=this.pb_em2
  189. this.Control[iCurrent+9]=this.pb_2
  190. this.Control[iCurrent+10]=this.ddlb_2
  191. this.Control[iCurrent+11]=this.tv_1
  192. this.Control[iCurrent+12]=this.st_3
  193. end on
  194. on w_warebalc_view_old.destroy
  195. call super::destroy
  196. destroy(this.ddlb_storageid)
  197. destroy(this.ddlb_mtrlprp)
  198. destroy(this.em_month)
  199. destroy(this.st_2)
  200. destroy(this.st_4)
  201. destroy(this.em_endmonth)
  202. destroy(this.pb_em1)
  203. destroy(this.pb_em2)
  204. destroy(this.pb_2)
  205. destroy(this.ddlb_2)
  206. destroy(this.tv_1)
  207. destroy(this.st_3)
  208. end on
  209. event ue_usual_query_retr;call super::ue_usual_query_retr;String ls_querystrpart = ''
  210. ls_newselect = Lower(ori_oldselect)
  211. IF Trim(sle_usual_query.Text) <> '' THEN
  212. IF Pos(Trim(sle_usual_query.Text),'%') = 0 THEN
  213. ls_querystrpart = ls_querystrpart + "u_mtrldef_mtrlcode like '%"+Trim(sle_usual_query.Text)+"%'"
  214. ls_querystrpart = ls_querystrpart + " or mtrlname like '%"+Trim(sle_usual_query.Text)+"%')"
  215. ELSE
  216. ls_querystrpart = ls_querystrpart + " (u_mtrldef_mtrlcode like '"+Trim(sle_usual_query.Text)+"'"
  217. ls_querystrpart = ls_querystrpart + " or mtrlname like '"+Trim(sle_usual_query.Text)+"')"
  218. END IF
  219. IF Pos(ls_newselect," where ") <> 0 THEN
  220. ls_newselect = ls_newselect+" AND ("+ls_querystrpart+')'
  221. ELSE
  222. ls_newselect = ls_newselect+" where ("+ls_querystrpart+')'
  223. END IF
  224. END IF
  225. wf_retrieveuc(dw_pageretr,ls_newselect,1)
  226. THIS.TriggerEvent('retrieve_pageretr')
  227. end event
  228. event ue_usual_query_filt;call super::ue_usual_query_filt;String obj_expr = ''
  229. IF Trim(sle_usual_query.Text) <> '' THEN
  230. IF Pos(Trim(sle_usual_query.Text),'%') = 0 THEN
  231. obj_expr = obj_expr+' ( u_mtrldef_mtrlcode LIKE "%'+Trim(sle_usual_query.Text)+'%") '
  232. obj_expr = obj_expr+' or ( mtrlname LIKE "%'+Trim(sle_usual_query.Text)+'%") '
  233. ELSE
  234. obj_expr = obj_expr+' ( u_mtrldef_mtrlcode LIKE "'+Trim(sle_usual_query.Text)+'") '
  235. obj_expr = obj_expr+' or ( mtrlname LIKE "'+Trim(sle_usual_query.Text)+'") '
  236. END IF
  237. END IF
  238. dw_pageretr.SetFilter(obj_expr)
  239. dw_pageretr.SetRedraw(FALSE)
  240. dw_pageretr.Filter()
  241. IF dw_pageretr.RowCount() >= 1 THEN
  242. dw_pageretr.SelectRow(0,FALSE)
  243. dw_pageretr.SelectRow(1,TRUE)
  244. END IF
  245. dw_pageretr.SetRedraw(TRUE)
  246. end event
  247. event retrieve_pageretr;boolean cb_firstpage_enabled,cb_nextpage_enabled,cb_retrieveall_enabled
  248. boolean cb_priorpage_enabled,cb_func_enabled,cb_retrieve_enabled
  249. cb_nextpage_enabled=cb_nextpage.enabled
  250. cb_retrieveall_enabled=cb_retrieveall.enabled
  251. cb_func_enabled=cb_func.enabled
  252. cb_nextpage.enabled=false
  253. cb_retrieveall.enabled=false
  254. cb_func.enabled=false
  255. SetPointer(HourGlass!)
  256. dw_pageretr.retrieve(cur_storageid_arr,ls_handtype)
  257. IF cur_storageid = -1 THEN
  258. dw_pageretr.Object.Title.Text = '仓库推算结存表'
  259. ELSE
  260. dw_pageretr.Object.Title.Text = trim(Left(ddlb_storageid.Text,Pos(ddlb_storageid.Text,'[') - 1))+'-推算结存表'
  261. END IF
  262. SetPointer(Arrow!)
  263. cb_nextpage.enabled=cb_nextpage_enabled
  264. cb_retrieveall.enabled=cb_retrieveall_enabled
  265. cb_func.enabled=cb_func_enabled
  266. end event
  267. event ue_before_open;call super::ue_before_open;if_ue_retr=true
  268. if_ue_filter=true
  269. if_ue_sort=true
  270. if_ue_sentdataout=true
  271. end event
  272. event resize;call super::resize;tv_1.height=this.height - dw_pageretr.y - 115
  273. end event
  274. event open;call super::open;wf_hide_col()
  275. //tv_1.f_maketree(-1)
  276. end event
  277. type cb_func from w_publ_pageretr_easyq`cb_func within w_warebalc_view_old
  278. integer taborder = 140
  279. end type
  280. type cb_exit from w_publ_pageretr_easyq`cb_exit within w_warebalc_view_old
  281. integer x = 878
  282. integer picsize = 16
  283. toolbaralignment pic_align = alignattop!
  284. end type
  285. type sle_usual_query from w_publ_pageretr_easyq`sle_usual_query within w_warebalc_view_old
  286. boolean visible = false
  287. integer x = 2039
  288. integer y = 52
  289. integer width = 585
  290. integer height = 96
  291. end type
  292. type cb_retrieveall from w_publ_pageretr_easyq`cb_retrieveall within w_warebalc_view_old
  293. boolean visible = false
  294. integer x = 1632
  295. integer y = 388
  296. integer taborder = 150
  297. end type
  298. type em_pagerowno from w_publ_pageretr_easyq`em_pagerowno within w_warebalc_view_old
  299. integer x = 1376
  300. integer y = 388
  301. end type
  302. type dw_pageretr from w_publ_pageretr_easyq`dw_pageretr within w_warebalc_view_old
  303. integer x = 809
  304. integer y = 296
  305. integer width = 2597
  306. integer height = 1312
  307. string dataobject = "dw_warebalc_view_new"
  308. boolean rbutton_filter_use = true
  309. boolean rbutton_setposition_use = true
  310. boolean titleclick_sort_use = true
  311. end type
  312. type st_1 from w_publ_pageretr_easyq`st_1 within w_warebalc_view_old
  313. boolean visible = false
  314. integer x = 1691
  315. integer y = 72
  316. integer width = 343
  317. integer height = 56
  318. long backcolor = 67108864
  319. string text = "编码/名称含:"
  320. end type
  321. event st_1::constructor;call super::constructor;this.backcolor = 14215660
  322. end event
  323. type cb_nextpage from w_publ_pageretr_easyq`cb_nextpage within w_warebalc_view_old
  324. boolean visible = false
  325. integer x = 2126
  326. integer y = 388
  327. integer taborder = 180
  328. end type
  329. type ddlb_yl from w_publ_pageretr_easyq`ddlb_yl within w_warebalc_view_old
  330. integer x = 1349
  331. integer y = 52
  332. integer taborder = 80
  333. end type
  334. type cbx_yl from w_publ_pageretr_easyq`cbx_yl within w_warebalc_view_old
  335. integer x = 1138
  336. integer y = 56
  337. long backcolor = 1073741824
  338. end type
  339. event cbx_yl::clicked;call super::clicked;if this.checked then
  340. dw_edit_mode=true
  341. dw_pageretr.selectrow(0,false)
  342. else
  343. dw_edit_mode=false
  344. end if
  345. end event
  346. type cb_psetup from w_publ_pageretr_easyq`cb_psetup within w_warebalc_view_old
  347. integer x = 603
  348. integer width = 247
  349. integer taborder = 130
  350. end type
  351. type cb_2 from w_publ_pageretr_easyq`cb_2 within w_warebalc_view_old
  352. integer x = 576
  353. integer taborder = 70
  354. end type
  355. type cb_refresh from w_publ_pageretr_easyq`cb_refresh within w_warebalc_view_old
  356. integer taborder = 90
  357. end type
  358. event cb_refresh::clicked;Long balcdateint
  359. balcdate = DateTime(Date(em_month.Text),Time(0))
  360. balcdate_end = DateTime(Date(em_endmonth.Text),Time('23:59:59'))
  361. SELECT top 1 isnull(min(balcdateint),0)
  362. INTO :balcdateint
  363. FROM u_warebalc
  364. WHERE balcdate >= :balcdate_end
  365. AND storageid = :cur_storageid;
  366. IF sqlca.SQLCode <> 0 THEN
  367. MessageBox('错误','查询结存日期失败!',stopsign!,ok!)
  368. RETURN
  369. END IF
  370. DELETE u_parm_batchtake ;
  371. IF sqlca.SQLCode <> 0 THEN
  372. ROLLBACK ;
  373. MessageBox('错误',"因网络或其它原因导致操作失败,请重试!"+sqlca.SQLErrText,information!,ok!)
  374. RETURN
  375. END IF
  376. INSERT INTO u_parm_batchtake (cusid,firstdate,enddate,balcdateint) Values (0,:balcdate,:balcdate_end,:balcdateint) ;
  377. IF sqlca.SQLCode <> 0 THEN
  378. ROLLBACK ;
  379. MessageBox('错误',"因网络或其它原因导致操作失败,请重试!"+sqlca.SQLErrText,information!,ok!)
  380. RETURN
  381. ELSE
  382. COMMIT ;
  383. END IF
  384. IF viewtype = 2 THEN
  385. dw_pageretr.DataObject = 'dw_warebalc_view_new_2'
  386. ELSE
  387. IF balcdateint = 0 THEN
  388. IF viewtype = 0 THEN
  389. dw_pageretr.DataObject = 'dw_warebalc_view_new'
  390. ELSEIF viewtype = 1 THEN
  391. dw_pageretr.DataObject = 'dw_warebalc_view_new_cusid'
  392. END IF
  393. ELSE
  394. IF viewtype = 0 THEN
  395. dw_pageretr.DataObject = 'dw_warebalc_view_new_1'
  396. ELSEIF viewtype = 1 THEN
  397. dw_pageretr.DataObject = 'dw_warebalc_view_new_1_cusid'
  398. END IF
  399. END IF
  400. END IF
  401. dw_pageretr.SetTransObject(sqlca)
  402. dw_pageretr.uf_read_profile_layout()
  403. f_title_change(dw_pageretr)
  404. PARENT.TriggerEvent('retrieve_pageretr')
  405. dw_pageretr.SetRedraw(TRUE)
  406. IF retrieve_all THEN
  407. THIS.TriggerEvent("ue_usual_query_filt")
  408. END IF
  409. end event
  410. type cb_help from w_publ_pageretr_easyq`cb_help within w_warebalc_view_old
  411. integer x = 727
  412. end type
  413. type cb_copyself from w_publ_pageretr_easyq`cb_copyself within w_warebalc_view_old
  414. end type
  415. type gb_2 from w_publ_pageretr_easyq`gb_2 within w_warebalc_view_old
  416. end type
  417. type ln_bar from w_publ_pageretr_easyq`ln_bar within w_warebalc_view_old
  418. end type
  419. type ln_bar2 from w_publ_pageretr_easyq`ln_bar2 within w_warebalc_view_old
  420. end type
  421. type r_bar from w_publ_pageretr_easyq`r_bar within w_warebalc_view_old
  422. end type
  423. type ln_1 from w_publ_pageretr_easyq`ln_1 within w_warebalc_view_old
  424. end type
  425. type ln_2 from w_publ_pageretr_easyq`ln_2 within w_warebalc_view_old
  426. end type
  427. type ddlb_storageid from uo_ddlb_storageid within w_warebalc_view_old
  428. integer x = 178
  429. integer y = 188
  430. integer width = 681
  431. integer height = 1108
  432. integer taborder = 20
  433. boolean bringtotop = true
  434. end type
  435. event constructor;call super::constructor;cur_storageid = this.uo_storageid
  436. cur_storageid_arr = this.uo_storageid_arr
  437. end event
  438. event selectionchanged;call super::selectionchanged;cur_storageid = this.uo_storageid
  439. cur_storageid_arr = this.uo_storageid_arr
  440. cb_refresh.triggerevent(clicked!)
  441. end event
  442. type ddlb_mtrlprp from dropdownlistbox within w_warebalc_view_old
  443. boolean visible = false
  444. integer x = 18
  445. integer y = 200
  446. integer width = 462
  447. integer height = 480
  448. integer taborder = 30
  449. boolean bringtotop = true
  450. integer textsize = -9
  451. integer weight = 400
  452. fontcharset fontcharset = gb2312charset!
  453. fontpitch fontpitch = variable!
  454. string facename = "宋体"
  455. long textcolor = 33554432
  456. string text = "全部[-1]"
  457. boolean sorted = false
  458. boolean vscrollbar = true
  459. string item[] = {"自制产品[0]","采购[2]","外加工部件[3]","自制部件[4]","全部[-1]",""}
  460. borderstyle borderstyle = stylelowered!
  461. end type
  462. event selectionchanged;//CHOOSE CASE Index
  463. // CASE 1
  464. // cur_mtrlorigin = 0
  465. // CASE 2
  466. // cur_mtrlorigin = 2
  467. // CASE 3
  468. // cur_mtrlorigin = 3
  469. // CASE 4
  470. // cur_mtrlorigin = 4
  471. // CASE 5
  472. // cur_mtrlorigin = -1
  473. //END CHOOSE
  474. cb_refresh.TriggerEvent(Clicked!)
  475. //tv_1.f_maketree(-1)
  476. end event
  477. type em_month from editmask within w_warebalc_view_old
  478. integer x = 1143
  479. integer y = 196
  480. integer width = 434
  481. integer height = 84
  482. integer taborder = 100
  483. boolean bringtotop = true
  484. integer textsize = -10
  485. integer weight = 400
  486. fontcharset fontcharset = gb2312charset!
  487. fontpitch fontpitch = variable!
  488. string facename = "宋体"
  489. long textcolor = 33554432
  490. string text = "none"
  491. alignment alignment = center!
  492. borderstyle borderstyle = stylelowered!
  493. maskdatatype maskdatatype = datemask!
  494. string mask = "yyyy-mm-dd"
  495. boolean spin = true
  496. end type
  497. event constructor;this.text = string(today(),'yyyy-mm-dd')
  498. end event
  499. event rbuttondown;s_calender_arg s_calender
  500. s_calender.PointerX = THIS.PointerX()
  501. s_calender.PointerY = THIS.PointerY()
  502. s_calender.X = THIS.X
  503. s_calender.Y = THIS.Y
  504. OpenWithParm(w_calendar,s_calender)
  505. THIS.Text = String(id_date_selected)
  506. end event
  507. type st_2 from statictext within w_warebalc_view_old
  508. integer x = 882
  509. integer y = 212
  510. integer width = 247
  511. integer height = 48
  512. boolean bringtotop = true
  513. integer textsize = -9
  514. integer weight = 400
  515. fontcharset fontcharset = gb2312charset!
  516. fontpitch fontpitch = variable!
  517. string facename = "宋体"
  518. long textcolor = 33554432
  519. long backcolor = 134217739
  520. string text = "开始日期"
  521. alignment alignment = right!
  522. boolean focusrectangle = false
  523. end type
  524. type st_4 from statictext within w_warebalc_view_old
  525. integer x = 1687
  526. integer y = 208
  527. integer width = 247
  528. integer height = 48
  529. boolean bringtotop = true
  530. integer textsize = -9
  531. integer weight = 400
  532. fontcharset fontcharset = gb2312charset!
  533. fontpitch fontpitch = variable!
  534. string facename = "宋体"
  535. long textcolor = 33554432
  536. long backcolor = 134217739
  537. string text = "结束日期"
  538. alignment alignment = right!
  539. boolean focusrectangle = false
  540. end type
  541. type em_endmonth from editmask within w_warebalc_view_old
  542. integer x = 1943
  543. integer y = 192
  544. integer width = 434
  545. integer height = 84
  546. integer taborder = 110
  547. boolean bringtotop = true
  548. integer textsize = -10
  549. integer weight = 400
  550. fontcharset fontcharset = gb2312charset!
  551. fontpitch fontpitch = variable!
  552. string facename = "宋体"
  553. long textcolor = 33554432
  554. string text = "none"
  555. alignment alignment = center!
  556. borderstyle borderstyle = stylelowered!
  557. maskdatatype maskdatatype = datemask!
  558. string mask = "yyyy-mm-dd"
  559. boolean spin = true
  560. end type
  561. event constructor;this.text = string(today(),'yyyy-mm-dd')
  562. end event
  563. event rbuttondown;s_calender_arg s_calender
  564. s_calender.PointerX = THIS.PointerX()
  565. s_calender.PointerY = THIS.PointerY()
  566. s_calender.X = THIS.X
  567. s_calender.Y = THIS.Y
  568. OpenWithParm(w_calendar,s_calender)
  569. THIS.Text = String(id_date_selected)
  570. end event
  571. type pb_em1 from picturebutton within w_warebalc_view_old
  572. integer x = 1582
  573. integer y = 192
  574. integer width = 101
  575. integer height = 92
  576. integer taborder = 130
  577. boolean bringtotop = true
  578. integer textsize = -9
  579. integer weight = 400
  580. fontcharset fontcharset = gb2312charset!
  581. fontpitch fontpitch = variable!
  582. string facename = "宋体"
  583. string picturename = "date.BMP"
  584. alignment htextalign = left!
  585. end type
  586. event clicked;em_month.triggerevent(rbuttondown!)
  587. end event
  588. type pb_em2 from picturebutton within w_warebalc_view_old
  589. integer x = 2377
  590. integer y = 192
  591. integer width = 101
  592. integer height = 92
  593. integer taborder = 140
  594. boolean bringtotop = true
  595. integer textsize = -9
  596. integer weight = 400
  597. fontcharset fontcharset = gb2312charset!
  598. fontpitch fontpitch = variable!
  599. string facename = "宋体"
  600. string picturename = "date.BMP"
  601. alignment htextalign = left!
  602. end type
  603. event clicked;em_endmonth.triggerevent(rbuttondown!)
  604. end event
  605. type pb_2 from picturebutton within w_warebalc_view_old
  606. integer x = 2487
  607. integer y = 192
  608. integer width = 101
  609. integer height = 92
  610. integer taborder = 150
  611. boolean bringtotop = true
  612. integer textsize = -9
  613. integer weight = 400
  614. fontcharset fontcharset = gb2312charset!
  615. fontpitch fontpitch = variable!
  616. string facename = "宋体"
  617. string picturename = "date1.BMP"
  618. alignment htextalign = left!
  619. end type
  620. event clicked;m_Dfc_Control_PopupMenu dmPopupMenu
  621. string menustr
  622. menustr="Text=本日~tEvent=ue_date1"
  623. menustr = menustr + "|" + "Text=本周~tEvent=ue_date2"
  624. menustr = menustr + "|" + "Text=本月~tEvent=ue_date3"
  625. if len(trim(menustr))<>0 then
  626. dmPopupMenu = Create m_Dfc_Control_PopupMenu
  627. dmPopupMenu.mf_BuildMenu(This, menustr)
  628. dmPopupMenu.mf_PopMenu()
  629. Destroy dmPopupMenu
  630. end if
  631. end event
  632. type ddlb_2 from dropdownlistbox within w_warebalc_view_old
  633. integer x = 1673
  634. integer y = 52
  635. integer width = 480
  636. integer height = 300
  637. integer taborder = 20
  638. boolean bringtotop = true
  639. integer textsize = -9
  640. integer weight = 400
  641. fontcharset fontcharset = gb2312charset!
  642. fontpitch fontpitch = variable!
  643. string facename = "宋体"
  644. long textcolor = 33554432
  645. string text = "按配置"
  646. boolean sorted = false
  647. string item[] = {"按配置","按客户配置","按配置[带计划价]"}
  648. borderstyle borderstyle = stylelowered!
  649. end type
  650. event selectionchanged;IF THIS.Text = '按配置' THEN
  651. viewtype = 0
  652. ELSEIF THIS.Text = '按客户配置' THEN
  653. viewtype = 1
  654. ELSEIF THIS.Text = '按配置[带计划价]' THEN
  655. viewtype = 2
  656. END IF
  657. //dw_pageretr.SetRedraw(false)
  658. //IF viewtype = 2 THEN
  659. // dw_pageretr.DataObject = 'dw_warebalc_view_new_2'
  660. //ELSE
  661. // IF balcdateint = 0 THEN
  662. // IF viewtype = 0 THEN
  663. // dw_pageretr.DataObject = 'dw_warebalc_view_new'
  664. // ELSEIF viewtype = 1 THEN
  665. // dw_pageretr.DataObject = 'dw_warebalc_view_new_cusid'
  666. // END IF
  667. // ELSE
  668. // IF viewtype = 0 THEN
  669. // dw_pageretr.DataObject = 'dw_warebalc_view_new_1'
  670. // ELSEIF viewtype = 1 THEN
  671. // dw_pageretr.DataObject = 'dw_warebalc_view_new_1_cusid'
  672. // END IF
  673. // END IF
  674. //END IF
  675. //
  676. //dw_pageretr.SetTransObject(sqlca)
  677. //dw_pageretr.uf_read_profile_layout()
  678. //f_title_change(dw_pageretr)
  679. //
  680. //PARENT.TriggerEvent('retrieve_pageretr')
  681. //dw_pageretr.SetRedraw(TRUE)
  682. cb_refresh.triggerevent(clicked!)
  683. end event
  684. type tv_1 from uo_tv_mtrltype within w_warebalc_view_old
  685. integer y = 300
  686. integer width = 800
  687. integer height = 1312
  688. integer taborder = 100
  689. boolean bringtotop = true
  690. integer textsize = -9
  691. fontcharset fontcharset = gb2312charset!
  692. fontfamily fontfamily = anyfont!
  693. string facename = "宋体"
  694. end type
  695. event selectionchanged;call super::selectionchanged;ls_handtype = THIS.uo_cur_info.handtype
  696. ls_mtrltype = THIS.uo_cur_info.mtrltype
  697. IF ls_handtype <> '' THEN
  698. ls_mtrltype = '%'+ls_handtype+'%'
  699. ls_handtype = ls_handtype+'%'
  700. ELSE
  701. ls_mtrltype = ""
  702. END IF
  703. PARENT.TriggerEvent('retrieve_pageretr')
  704. end event
  705. type st_3 from statictext within w_warebalc_view_old
  706. integer x = 23
  707. integer y = 208
  708. integer width = 133
  709. integer height = 48
  710. boolean bringtotop = true
  711. integer textsize = -9
  712. integer weight = 400
  713. fontcharset fontcharset = gb2312charset!
  714. fontpitch fontpitch = variable!
  715. string facename = "宋体"
  716. long textcolor = 33554432
  717. long backcolor = 134217739
  718. string text = "仓库"
  719. alignment alignment = center!
  720. boolean focusrectangle = false
  721. end type