w_inware_tbuy_ch.srw 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676
  1. $PBExportHeader$w_inware_tbuy_ch.srw
  2. forward
  3. global type w_inware_tbuy_ch from w_pageretr_ch
  4. end type
  5. type st_2 from statictext within w_inware_tbuy_ch
  6. end type
  7. type em_1 from editmask within w_inware_tbuy_ch
  8. end type
  9. type cbx_mlselect from checkbox within w_inware_tbuy_ch
  10. end type
  11. type cbx_allselect from checkbox within w_inware_tbuy_ch
  12. end type
  13. type cbx_ml from checkbox within w_inware_tbuy_ch
  14. end type
  15. type cb_ok from uo_imflatbutton within w_inware_tbuy_ch
  16. end type
  17. type cb_del from uo_imflatbutton within w_inware_tbuy_ch
  18. end type
  19. type dw_choice from datawindow within w_inware_tbuy_ch
  20. end type
  21. type em_2 from editmask within w_inware_tbuy_ch
  22. end type
  23. type st_3 from statictext within w_inware_tbuy_ch
  24. end type
  25. end forward
  26. global type w_inware_tbuy_ch from w_pageretr_ch
  27. integer width = 3611
  28. integer height = 2380
  29. string title = "采购退货单-收货历史选择"
  30. st_2 st_2
  31. em_1 em_1
  32. cbx_mlselect cbx_mlselect
  33. cbx_allselect cbx_allselect
  34. cbx_ml cbx_ml
  35. cb_ok cb_ok
  36. cb_del cb_del
  37. dw_choice dw_choice
  38. em_2 em_2
  39. st_3 st_3
  40. end type
  41. global w_inware_tbuy_ch w_inware_tbuy_ch
  42. type variables
  43. s_inware_tbuy_array INS_RT_STRU
  44. boolean if_changeselect=true
  45. int if_mlselect=0
  46. long cur_cusid,cur_storageid,cur_scid
  47. end variables
  48. forward prototypes
  49. public function integer wf_face_change ()
  50. end prototypes
  51. public function integer wf_face_change ();//wf_face_change()
  52. IF cbx_ml.Checked THEN
  53. dw_pageretr.Height = THIS.Height - dw_pageretr.Y - 140
  54. dw_choice.Visible = FALSE
  55. cb_ok.Visible = FALSE
  56. cb_del.Visible = FALSE
  57. ELSE
  58. dw_pageretr.Height = cb_ok.Y - dw_pageretr.Y - 10
  59. dw_choice.Visible = TRUE
  60. cb_ok.Visible = TRUE
  61. cb_del.Visible = TRUE
  62. END IF
  63. RETURN 1
  64. end function
  65. on w_inware_tbuy_ch.create
  66. int iCurrent
  67. call super::create
  68. this.st_2=create st_2
  69. this.em_1=create em_1
  70. this.cbx_mlselect=create cbx_mlselect
  71. this.cbx_allselect=create cbx_allselect
  72. this.cbx_ml=create cbx_ml
  73. this.cb_ok=create cb_ok
  74. this.cb_del=create cb_del
  75. this.dw_choice=create dw_choice
  76. this.em_2=create em_2
  77. this.st_3=create st_3
  78. iCurrent=UpperBound(this.Control)
  79. this.Control[iCurrent+1]=this.st_2
  80. this.Control[iCurrent+2]=this.em_1
  81. this.Control[iCurrent+3]=this.cbx_mlselect
  82. this.Control[iCurrent+4]=this.cbx_allselect
  83. this.Control[iCurrent+5]=this.cbx_ml
  84. this.Control[iCurrent+6]=this.cb_ok
  85. this.Control[iCurrent+7]=this.cb_del
  86. this.Control[iCurrent+8]=this.dw_choice
  87. this.Control[iCurrent+9]=this.em_2
  88. this.Control[iCurrent+10]=this.st_3
  89. end on
  90. on w_inware_tbuy_ch.destroy
  91. call super::destroy
  92. destroy(this.st_2)
  93. destroy(this.em_1)
  94. destroy(this.cbx_mlselect)
  95. destroy(this.cbx_allselect)
  96. destroy(this.cbx_ml)
  97. destroy(this.cb_ok)
  98. destroy(this.cb_del)
  99. destroy(this.dw_choice)
  100. destroy(this.em_2)
  101. destroy(this.st_3)
  102. end on
  103. event ue_usual_query_filt;call super::ue_usual_query_filt;string obj_expr=''
  104. if trim(sle_usual_query.text)<>'' then
  105. if pos(trim(sle_usual_query.text),'%')=0 then
  106. obj_expr=obj_expr+'( u_inware_inwarecode like "%'+trim(sle_usual_query.text)+'%" )'
  107. else
  108. obj_expr=obj_expr+'( u_inware_inwarecode like "'+trim(sle_usual_query.text)+'" )'
  109. end if
  110. end if
  111. dw_pageretr.setfilter(obj_expr)
  112. dw_pageretr.setredraw(false)
  113. dw_pageretr.filter()
  114. if dw_pageretr.rowcount()>=1 then
  115. dw_pageretr.selectrow(0,false)
  116. dw_pageretr.selectrow(1,true)
  117. end if
  118. dw_pageretr.setredraw(true)
  119. end event
  120. event ue_usual_query_retr;string ls_querystrpart=''
  121. ls_newselect=lower(ori_oldselect)
  122. if trim(sle_usual_query.text)<>'' then
  123. if pos(trim(sle_usual_query.text),'%')=0 then
  124. ls_querystrpart="(u_inware.inwarecode like '%"+trim(sle_usual_query.text)+"%')"
  125. else
  126. ls_querystrpart="(u_inware.inwarecode like '"+trim(sle_usual_query.text)+"')"
  127. end if
  128. if pos(ls_newselect," where ") <> 0 then
  129. ls_newselect=ls_newselect+" and ("+ls_querystrpart+')'
  130. else
  131. ls_newselect=ls_newselect+" where ("+ls_querystrpart+')'
  132. end if
  133. end if
  134. wf_retrieveuc(dw_pageretr,ls_newselect,1)
  135. this.triggerevent('retrieve_pageretr')
  136. end event
  137. event retrieve_pageretr;Boolean cb_firstpage_enabled,cb_nextpage_enabled,cb_retrieveall_enabled
  138. Boolean cb_priorpage_enabled,cb_query_enabled,cb_retrieve_enabled
  139. //cb_firstpage_enabled=cb_firstpage.enabled
  140. cb_nextpage_enabled = cb_nextpage.Enabled
  141. cb_retrieveall_enabled = cb_retrieveall.Enabled
  142. //cb_priorpage_enabled=cb_priorpage.enabled
  143. //cb_firstpage.enabled=false
  144. cb_nextpage.Enabled = FALSE
  145. cb_retrieveall.Enabled = FALSE
  146. //cb_priorpage.enabled=false
  147. SetPointer(HourGlass!)
  148. DateTime first_date,end_date
  149. first_date = DateTime(Date(em_1.Text),Time('23:59:59'))
  150. end_date = DateTime(Date(em_2.Text),Time('23:59:59'))
  151. dw_pageretr.Retrieve(cur_scid,cur_cusid,cur_storageid,first_date,end_date)
  152. if dw_pageretr.rowcount()>0 and dw_pageretr.getrow()=0 then dw_pageretr.setrow(1)
  153. SetPointer(Arrow!)
  154. //cb_firstpage.enabled=cb_firstpage_enabled
  155. cb_nextpage.Enabled = cb_nextpage_enabled
  156. cb_retrieveall.Enabled = cb_retrieveall_enabled
  157. //cb_priorpage.enabled=cb_priorpage_enabled
  158. IF cbx_mlselect.Checked AND dw_pageretr.RowCount() > 1 THEN
  159. dw_pageretr.SelectRow(1,false)
  160. END IF
  161. end event
  162. event open;THIS.TriggerEvent('ue_before_open')
  163. wf_movetocenter()
  164. OLD_TITLE = THIS.Title
  165. ///
  166. date ld_date,ld_text2
  167. int ls_add_month
  168. EM_1.Text = String(Today(),'yyyy-mm-dd')
  169. ld_date = Today()
  170. ls_add_month = -3
  171. ld_text2 = date(year(ld_date)+int((month(ld_date)+ls_add_month)/13),long(mid(fill('010203040506070809101112',48),(mod(month(ld_date)+ls_add_month -1,12)+13)*2 -1,2)),day(ld_date) -integer(right(left(string(day(RelativeDate (date(year(ld_date)+int((month(ld_date)+ls_add_month)/13)+sign(long(mid(fill('010203040506070809101112',48),(mod(month(ld_date)+ls_add_month -1,12)+13)*2 -1,2)) -12)+1,mod(long(mid(fill('010203040506070809101112',48),(mod(month(ld_date)+ls_add_month -1,12)+13)*2 -1,2))+1,13)+abs(sign(mod(long(mid(fill('010203040506070809101112',48),(mod(month(ld_date)+ls_add_month -1,12)+13)*2 -1,2))+1,13)) -1),1),-1)) -day(ld_date),'00')+'00000',5),3))/100)
  172. EM_2.text = string(ld_text2,'yyyy-mm-dd')
  173. ///
  174. s_tran = Message.PowerObjectParm
  175. IF NOT IsNull(s_tran) THEN
  176. retrieve_all = s_tran.if_retrieve_all
  177. mode = s_tran.work_mode
  178. arg_pkid = s_tran.arg_pkid
  179. arg_string_code = s_tran.arg_string_code
  180. cur_cusid = s_tran.d_long
  181. cur_storageid = s_tran.c_long
  182. cur_scid = s_tran.b_long
  183. END IF
  184. dw_pageretr.RBUTTON_FILTER_USE = TRUE //右键查询功能开关
  185. dw_pageretr.titleclick_sort_use = TRUE //单击标题排序功能开关
  186. dw_pageretr.SetTransObject (sqlca)
  187. pkcolumndbtname = dw_pageretr.DESCRIBE("#1.dbname") //取第一列为关键字
  188. ori_oldselect = dw_pageretr.DESCRIBE("DataWindow.Table.Select")
  189. ls_newselect = ori_oldselect
  190. ds_curquery = CREATE DATASTORE
  191. ds_curquery.DataObject = 'd_extr_find'
  192. ds_curquery.SetTransObject (sqlca)
  193. wf_editindex_lockf()
  194. sle_usual_query.Text = Trim(arg_string_code)
  195. IF NOT retrieve_all THEN
  196. THIS.TriggerEvent("ue_usual_query_RETR") //修改ls_newselect,retrieve
  197. ELSE
  198. wf_retrieveuc(dw_pageretr,ls_newselect,1)
  199. THIS.TriggerEvent('RETRIEVE_pageretr')
  200. END IF
  201. IF retrieve_all AND Trim(arg_string_code) <> '' THEN
  202. THIS.TriggerEvent("ue_usual_query_filt")
  203. END IF
  204. s_hide_col s_col_mtrlsectype
  205. s_col_mtrlsectype.col_1 = 'u_mtrldef_mtrlsectype'
  206. f_hide_col(1308,dw_pageretr,s_col_mtrlsectype)
  207. s_hide_col s_col_zxmtrlmode
  208. s_col_zxmtrlmode.col_1 = 'u_mtrldef_zxmtrlmode'
  209. f_hide_col(1309,dw_pageretr,s_col_zxmtrlmode)
  210. end event
  211. event close;call super::close;CLOSEWITHRETURN(THIS,INS_RT_STRU)
  212. //<INS_RT_STRU> 窗体级子定义结构变量,用于返回
  213. end event
  214. type cb_func from w_pageretr_ch`cb_func within w_inware_tbuy_ch
  215. end type
  216. type cb_exit from w_pageretr_ch`cb_exit within w_inware_tbuy_ch
  217. end type
  218. type sle_usual_query from w_pageretr_ch`sle_usual_query within w_inware_tbuy_ch
  219. end type
  220. type cb_retrieveall from w_pageretr_ch`cb_retrieveall within w_inware_tbuy_ch
  221. integer x = 1074
  222. end type
  223. type em_pagerowno from w_pageretr_ch`em_pagerowno within w_inware_tbuy_ch
  224. integer x = 768
  225. end type
  226. type dw_pageretr from w_pageretr_ch`dw_pageretr within w_inware_tbuy_ch
  227. integer width = 3584
  228. integer height = 1260
  229. string dataobject = "dw_inware_tbuy_ch"
  230. end type
  231. event dw_pageretr::clicked;if row>0 then
  232. this.setrow(row)
  233. if if_mlselect=1 then
  234. if if_changeselect then
  235. this.selectrow(row,not this.IsSelected(row))
  236. else
  237. if_changeselect=true
  238. end if
  239. else
  240. this.selectrow(0,false)
  241. this.selectrow(row,true)
  242. end if
  243. end if
  244. end event
  245. event dw_pageretr::rowfocuschanged;if if_mlselect=1 then
  246. if currentrow <=0 then return
  247. if keydown(keycontrol!) then
  248. if this.isselected(currentrow) then
  249. this.selectrow(currentrow,false)
  250. if_changeselect=false
  251. else
  252. if_changeselect=true
  253. end if
  254. else
  255. if not this.isselected(currentrow) then
  256. this.selectrow(currentrow,true)
  257. if_changeselect=false
  258. else
  259. if_changeselect=true
  260. end if
  261. end if
  262. else
  263. if dw_edit_mode then return
  264. if currentrow <=0 then return
  265. this.selectrow(0,false)
  266. this.selectrow(currentrow,true)
  267. end if
  268. end event
  269. event dw_pageretr::doubleclicked;if cbx_ml.checked then
  270. cb_choice.TRIGGEREVENT(CLICKED!)
  271. else
  272. cb_ok.TRIGGEREVENT(CLICKED!)
  273. end if
  274. end event
  275. event dw_pageretr::constructor;call super::constructor;f_title_change(this)
  276. end event
  277. event dw_pageretr::sqlpreview;call super::sqlpreview;string ls_1
  278. ls_1 = sqlsyntax
  279. end event
  280. type st_1 from w_pageretr_ch`st_1 within w_inware_tbuy_ch
  281. end type
  282. type cb_nextpage from w_pageretr_ch`cb_nextpage within w_inware_tbuy_ch
  283. integer x = 1221
  284. end type
  285. type cb_choice from w_pageretr_ch`cb_choice within w_inware_tbuy_ch
  286. end type
  287. event cb_choice::clicked;call super::clicked;Long ROW,ls_i,chC = 0
  288. datawindow dw_ch
  289. IF cbx_ml.Checked THEN
  290. dw_ch = dw_pageretr
  291. ELSE
  292. dw_ch = dw_choice
  293. END IF
  294. FOR ls_i = 1 TO dw_ch.RowCount()
  295. IF dw_ch.IsSelected(ls_i) OR NOT cbx_ml.Checked THEN
  296. chC++
  297. INS_RT_STRU.inwareid[chC] = dw_ch.Object.u_inware_inwareid[ls_i]
  298. INS_RT_STRU.inwarecode[chC] = dw_ch.Object.u_inware_inwarecode[ls_i]
  299. INS_RT_STRU.mtrlid[chC] = dw_ch.Object.u_inwaremx_mtrlid[ls_i]
  300. INS_RT_STRU.storageid[chC] = dw_ch.Object.u_inware_storageid[ls_i]
  301. INS_RT_STRU.plancode[chC] = dw_ch.Object.u_inwaremx_plancode[ls_i]
  302. INS_RT_STRU.qty[chC] = dw_ch.Object.u_inwaremx_qty[ls_i]
  303. INS_RT_STRU.price[chC] = dw_ch.Object.u_inwaremx_price[ls_i]
  304. INS_RT_STRU.planprice[chC] = dw_ch.Object.u_inwaremx_planprice[ls_i]
  305. INS_RT_STRU.mtrlcode[chC] = dw_ch.Object.u_mtrldef_mtrlcode[ls_i]
  306. INS_RT_STRU.mtrlname[chC] = dw_ch.Object.u_mtrldef_mtrlname[ls_i]
  307. INS_RT_STRU.mtrltype[chC] = dw_ch.Object.u_mtrldef_mtrltype[ls_i]
  308. INS_RT_STRU.mtrlmode[chC] = dw_ch.Object.u_mtrldef_mtrlmode[ls_i]
  309. INS_RT_STRU.unit[chC] = dw_ch.Object.u_mtrldef_unit[ls_i]
  310. IF IsNull(INS_RT_STRU.qty[chC]) THEN INS_RT_STRU.qty[chC] = 0
  311. INS_RT_STRU.fprice[chC] = dw_ch.Object.u_inwaremx_fprice[ls_i]
  312. INS_RT_STRU.rebate[chC] = dw_ch.Object.u_inwaremx_rebate[ls_i]
  313. INS_RT_STRU.uprice[chC] = dw_ch.Object.u_inwaremx_uprice[ls_i]
  314. INS_RT_STRU.uqty[chC] = dw_ch.Object.u_inwaremx_uqty[ls_i]
  315. INS_RT_STRU.addqty[chC] = dw_ch.Object.u_inwaremx_addqty[ls_i]
  316. INS_RT_STRU.mxunit[chC] = dw_ch.Object.u_inwaremx_unit[ls_i]
  317. INS_RT_STRU.rate[chC] = dw_ch.Object.u_inwaremx_rate[ls_i]
  318. INS_RT_STRU.status[chC] = dw_ch.Object.u_inwaremx_status[ls_i]
  319. INS_RT_STRU.woodcode[chC] = dw_ch.Object.u_inwaremx_woodcode[ls_i]
  320. INS_RT_STRU.pcode[chC] = dw_ch.Object.u_inwaremx_pcode[ls_i]
  321. INS_RT_STRU.mtrlsectype[chC] = dw_ch.Object.u_mtrldef_mtrlsectype[ls_i]
  322. INS_RT_STRU.zxmtrlmode[chC] = dw_ch.Object.u_mtrldef_zxmtrlmode[ls_i]
  323. INS_RT_STRU.sptmtrlname[chC] = dw_ch.Object.u_inwaremx_sptmtrlname[ls_i]
  324. INS_RT_STRU.tax[chC] = dw_ch.Object.u_inwaremx_tax[ls_i]
  325. INS_RT_STRU.mtrlengname[chC] = dw_ch.Object.u_mtrldef_mtrlengname[ls_i]
  326. INS_RT_STRU.barcode[chC] = dw_ch.Object.u_mtrldef_barcode[ls_i]
  327. END IF
  328. NEXT
  329. IF chC = 0 THEN
  330. MessageBox('提示','请至少选择一个目标行!', Information!, OK! )
  331. RETURN
  332. END IF
  333. Close(PARENT)
  334. end event
  335. type cb_refresh from w_pageretr_ch`cb_refresh within w_inware_tbuy_ch
  336. end type
  337. type cb_help from w_pageretr_ch`cb_help within w_inware_tbuy_ch
  338. end type
  339. type ln_bar from w_pageretr_ch`ln_bar within w_inware_tbuy_ch
  340. end type
  341. type ln_bar2 from w_pageretr_ch`ln_bar2 within w_inware_tbuy_ch
  342. end type
  343. type r_bar from w_pageretr_ch`r_bar within w_inware_tbuy_ch
  344. end type
  345. type ln_1 from w_pageretr_ch`ln_1 within w_inware_tbuy_ch
  346. end type
  347. type ln_2 from w_pageretr_ch`ln_2 within w_inware_tbuy_ch
  348. end type
  349. type st_2 from statictext within w_inware_tbuy_ch
  350. integer x = 741
  351. integer y = 204
  352. integer width = 329
  353. integer height = 48
  354. boolean bringtotop = true
  355. integer textsize = -9
  356. integer weight = 400
  357. fontcharset fontcharset = gb2312charset!
  358. fontpitch fontpitch = variable!
  359. string facename = "宋体"
  360. long textcolor = 33554432
  361. long backcolor = 134217739
  362. string text = "进仓日期从:"
  363. boolean focusrectangle = false
  364. end type
  365. type em_1 from editmask within w_inware_tbuy_ch
  366. integer x = 1591
  367. integer y = 180
  368. integer width = 411
  369. integer height = 92
  370. integer taborder = 120
  371. boolean bringtotop = true
  372. integer textsize = -9
  373. integer weight = 400
  374. fontcharset fontcharset = gb2312charset!
  375. fontpitch fontpitch = variable!
  376. string facename = "宋体"
  377. long textcolor = 33554432
  378. string text = "none"
  379. alignment alignment = center!
  380. borderstyle borderstyle = stylelowered!
  381. maskdatatype maskdatatype = datemask!
  382. string mask = "yyyy-mm-dd"
  383. boolean spin = true
  384. end type
  385. type cbx_mlselect from checkbox within w_inware_tbuy_ch
  386. integer x = 2418
  387. integer y = 196
  388. integer width = 210
  389. integer height = 60
  390. boolean bringtotop = true
  391. integer textsize = -9
  392. integer weight = 400
  393. fontcharset fontcharset = gb2312charset!
  394. fontpitch fontpitch = variable!
  395. string facename = "宋体"
  396. long textcolor = 33554432
  397. long backcolor = 134217739
  398. string text = "多选 "
  399. end type
  400. event clicked;if this.checked then
  401. if_mlselect=1
  402. else
  403. if_mlselect=0
  404. end if
  405. f_SetProfileString (sys_empid,dw_pageretr.DATAOBJECT, "if_mlselect", string(if_mlselect))
  406. end event
  407. type cbx_allselect from checkbox within w_inware_tbuy_ch
  408. integer x = 2642
  409. integer y = 196
  410. integer width = 210
  411. integer height = 60
  412. boolean bringtotop = true
  413. integer textsize = -9
  414. integer weight = 400
  415. fontcharset fontcharset = gb2312charset!
  416. fontpitch fontpitch = variable!
  417. string facename = "宋体"
  418. long textcolor = 33554432
  419. long backcolor = 134217739
  420. string text = "全选"
  421. end type
  422. event clicked;Int li
  423. IF THIS.Checked AND cbx_mlselect.Checked THEN
  424. FOR li = 1 TO dw_pageretr.RowCount()
  425. dw_pageretr.SelectRow(li,TRUE)
  426. NEXT
  427. ELSE
  428. FOR li = 1 TO dw_pageretr.RowCount()
  429. dw_pageretr.SelectRow(li,FALSE)
  430. NEXT
  431. END IF
  432. end event
  433. type cbx_ml from checkbox within w_inware_tbuy_ch
  434. integer x = 2048
  435. integer y = 196
  436. integer width = 357
  437. integer height = 60
  438. boolean bringtotop = true
  439. integer textsize = -9
  440. integer weight = 700
  441. fontcharset fontcharset = gb2312charset!
  442. fontpitch fontpitch = variable!
  443. string facename = "宋体"
  444. long textcolor = 16711680
  445. long backcolor = 134217739
  446. string text = "直接多选"
  447. end type
  448. event clicked;wf_face_change()
  449. int use_ml
  450. if this.checked then
  451. use_ml=1
  452. else
  453. use_ml=0
  454. end if
  455. f_SetProfileString (sys_empid,dw_pageretr.DATAOBJECT, "use_ml", string(use_ml))
  456. end event
  457. event constructor;int use_ml
  458. use_ml=integer(f_ProfileString (sys_empid,dw_pageretr.DATAOBJECT, "use_ml", '0'))
  459. if use_ml=0 then
  460. this.checked=false
  461. else
  462. this.checked=true
  463. end if
  464. wf_face_change()
  465. end event
  466. event destructor;int use_ml
  467. if this.checked then
  468. use_ml=1
  469. else
  470. use_ml=0
  471. end if
  472. f_SetProfileString(sys_empid,dw_pageretr.DATAOBJECT, "use_ml", string(use_ml))
  473. end event
  474. type cb_ok from uo_imflatbutton within w_inware_tbuy_ch
  475. integer x = 2807
  476. integer y = 1580
  477. integer width = 379
  478. integer taborder = 80
  479. boolean bringtotop = true
  480. string text = "选定[Enter]"
  481. end type
  482. event clicked;call super::clicked;Long ROW,ls_i,chC = 0
  483. ROW = dw_pageretr.GetRow()
  484. IF ROW <= 0 THEN
  485. MessageBox('提示','请先选择目标行!', Information!, OK! )
  486. RETURN
  487. END IF
  488. FOR ls_i = 1 TO dw_pageretr.RowCount()
  489. IF dw_pageretr.IsSelected(ls_i) THEN
  490. IF dw_choice.Find('u_inware_inwareid ='+String(dw_pageretr.Object.u_inware_inwareid[ls_i]) + ' and u_inwaremx_printid = '+String(dw_pageretr.Object.u_inwaremx_printid[ls_i]),1,dw_choice.RowCount()) = 0 THEN
  491. chC++
  492. dw_pageretr.RowsCopy(ls_i, ls_i, Primary!, dw_choice, dw_choice.RowCount() + 1, Primary!)
  493. END IF
  494. END IF
  495. NEXT
  496. end event
  497. type cb_del from uo_imflatbutton within w_inware_tbuy_ch
  498. integer x = 3205
  499. integer y = 1580
  500. integer width = 379
  501. integer taborder = 90
  502. boolean bringtotop = true
  503. string text = "删除"
  504. string normalpicname = "delete.bmp"
  505. end type
  506. event clicked;call super::clicked;IF dw_choice.GETROW()=0 THEN
  507. MESSAGEBOX('提示','请选择删除的行对象!', Information!, OK! )
  508. RETURN
  509. END IF
  510. dw_choice.DeleteRow (0)
  511. dw_choice.TriggerEvent (rowfocuschanged!)
  512. end event
  513. type dw_choice from datawindow within w_inware_tbuy_ch
  514. integer y = 1692
  515. integer width = 3589
  516. integer height = 604
  517. integer taborder = 150
  518. boolean bringtotop = true
  519. string title = "none"
  520. string dataobject = "dw_inware_tbuy_ch"
  521. boolean minbox = true
  522. boolean hscrollbar = true
  523. boolean vscrollbar = true
  524. boolean hsplitscroll = true
  525. boolean livescroll = true
  526. borderstyle borderstyle = stylelowered!
  527. end type
  528. event rowfocuschanged;IF currentrow <=0 THEN RETURN
  529. this.selectrow(0,false)
  530. this.selectrow(currentrow,true)
  531. end event
  532. type em_2 from editmask within w_inware_tbuy_ch
  533. integer x = 1056
  534. integer y = 180
  535. integer width = 411
  536. integer height = 92
  537. integer taborder = 130
  538. boolean bringtotop = true
  539. integer textsize = -9
  540. integer weight = 400
  541. fontcharset fontcharset = gb2312charset!
  542. fontpitch fontpitch = variable!
  543. string facename = "宋体"
  544. long textcolor = 33554432
  545. string text = "none"
  546. alignment alignment = center!
  547. borderstyle borderstyle = stylelowered!
  548. maskdatatype maskdatatype = datemask!
  549. string mask = "yyyy-mm-dd"
  550. boolean spin = true
  551. end type
  552. type st_3 from statictext within w_inware_tbuy_ch
  553. integer x = 1490
  554. integer y = 204
  555. integer width = 91
  556. integer height = 48
  557. boolean bringtotop = true
  558. integer textsize = -9
  559. integer weight = 400
  560. fontcharset fontcharset = gb2312charset!
  561. fontpitch fontpitch = variable!
  562. string facename = "宋体"
  563. long textcolor = 33554432
  564. long backcolor = 134217739
  565. string text = "到"
  566. boolean focusrectangle = false
  567. end type