w_inware_wfjg_ch.srw 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619
  1. $PBExportHeader$w_inware_wfjg_ch.srw
  2. forward
  3. global type w_inware_wfjg_ch from w_pageretr_ch
  4. end type
  5. type cbx_mlselect from checkbox within w_inware_wfjg_ch
  6. end type
  7. type cbx_ml from checkbox within w_inware_wfjg_ch
  8. end type
  9. type dw_choice from datawindow within w_inware_wfjg_ch
  10. end type
  11. type cb_ok from uo_imflatbutton within w_inware_wfjg_ch
  12. end type
  13. type cb_del from uo_imflatbutton within w_inware_wfjg_ch
  14. end type
  15. type cbx_allselect from checkbox within w_inware_wfjg_ch
  16. end type
  17. end forward
  18. global type w_inware_wfjg_ch from w_pageretr_ch
  19. integer width = 3611
  20. integer height = 2380
  21. string title = "外协收货选择-外协订单明细"
  22. cbx_mlselect cbx_mlselect
  23. cbx_ml cbx_ml
  24. dw_choice dw_choice
  25. cb_ok cb_ok
  26. cb_del cb_del
  27. cbx_allselect cbx_allselect
  28. end type
  29. global w_inware_wfjg_ch w_inware_wfjg_ch
  30. type variables
  31. s_mtrldef_wfjg_array INS_RT_STRU
  32. boolean if_changeselect=true
  33. int if_mlselect=0
  34. long cur_sptid
  35. long cur_ifth
  36. long cur_scid
  37. end variables
  38. forward prototypes
  39. public function integer wf_face_change ()
  40. end prototypes
  41. public function integer wf_face_change ();//wf_face_change()
  42. if cbx_ml.checked then
  43. dw_pageretr.height=2000
  44. dw_choice.visible=false
  45. cb_ok.visible=false
  46. cb_del.visible=false
  47. else
  48. dw_pageretr.height=1108
  49. dw_choice.visible=true
  50. cb_ok.visible=true
  51. cb_del.visible=true
  52. end if
  53. return 1
  54. end function
  55. on w_inware_wfjg_ch.create
  56. int iCurrent
  57. call super::create
  58. this.cbx_mlselect=create cbx_mlselect
  59. this.cbx_ml=create cbx_ml
  60. this.dw_choice=create dw_choice
  61. this.cb_ok=create cb_ok
  62. this.cb_del=create cb_del
  63. this.cbx_allselect=create cbx_allselect
  64. iCurrent=UpperBound(this.Control)
  65. this.Control[iCurrent+1]=this.cbx_mlselect
  66. this.Control[iCurrent+2]=this.cbx_ml
  67. this.Control[iCurrent+3]=this.dw_choice
  68. this.Control[iCurrent+4]=this.cb_ok
  69. this.Control[iCurrent+5]=this.cb_del
  70. this.Control[iCurrent+6]=this.cbx_allselect
  71. end on
  72. on w_inware_wfjg_ch.destroy
  73. call super::destroy
  74. destroy(this.cbx_mlselect)
  75. destroy(this.cbx_ml)
  76. destroy(this.dw_choice)
  77. destroy(this.cb_ok)
  78. destroy(this.cb_del)
  79. destroy(this.cbx_allselect)
  80. end on
  81. event ue_usual_query_filt;call super::ue_usual_query_filt;string obj_expr=''
  82. if trim(sle_usual_query.text)<>'' then
  83. if pos(trim(sle_usual_query.text),'%')=0 then
  84. obj_expr=obj_expr+'( u_mtrldef_mtrlcode like "%'+trim(sle_usual_query.text)+'%" )'
  85. else
  86. obj_expr=obj_expr+'( u_mtrldef_mtrlcode like "'+trim(sle_usual_query.text)+'" )'
  87. end if
  88. end if
  89. dw_pageretr.setfilter(obj_expr)
  90. dw_pageretr.setredraw(false)
  91. dw_pageretr.filter()
  92. if dw_pageretr.rowcount()>=1 then
  93. dw_pageretr.selectrow(0,false)
  94. dw_pageretr.selectrow(1,true)
  95. end if
  96. dw_pageretr.setredraw(true)
  97. end event
  98. event ue_usual_query_retr;call super::ue_usual_query_retr;string ls_querystrpart=''
  99. ls_newselect=lower(ori_oldselect)
  100. if trim(sle_usual_query.text)<>'' then
  101. if pos(trim(sle_usual_query.text),'%')=0 then
  102. ls_querystrpart="(u_mtrldef.mtrlcode like '%"+trim(sle_usual_query.text)+"%')"
  103. else
  104. ls_querystrpart="(u_mtrldef.mtrlcode like '"+trim(sle_usual_query.text)+"')"
  105. end if
  106. if pos(ls_newselect," where ") <> 0 then
  107. ls_newselect=ls_newselect+" and ("+ls_querystrpart+')'
  108. else
  109. ls_newselect=ls_newselect+" where ("+ls_querystrpart+')'
  110. end if
  111. end if
  112. wf_retrieveuc(dw_pageretr,ls_newselect,1)
  113. this.triggerevent('retrieve_pageretr')
  114. end event
  115. event close;CLOSEWITHRETURN(THIS,INS_RT_STRU)
  116. //<INS_RT_STRU> 窗体级子定义结构变量,用于返回
  117. end event
  118. event open;this.triggerevent('ue_before_open')
  119. wf_movetocenter()
  120. OLD_TITLE=THIS.TITLE
  121. s_tran=Message.PowerObjectParm
  122. IF not ISNULL(s_tran) then
  123. retrieve_all=s_tran.if_retrieve_all
  124. mode=s_tran.work_mode
  125. arg_pkid=s_tran.arg_pkid
  126. arg_string_code=s_tran.arg_string_code
  127. if_sharedata=s_tran.if_sharedata //是否应用sharedata,当retrieve_all=true是生效
  128. ds_share=s_tran.ds_share
  129. cur_sptid = s_tran.d_long
  130. cur_ifth = s_tran.f_long
  131. cur_scid = s_tran.e_long
  132. end if
  133. dw_pageretr.RBUTTON_FILTER_USE=true //右键查询功能开关
  134. dw_pageretr.titleclick_sort_use=true //单击标题排序功能开关
  135. dw_pageretr.SetTransObject (sqlca)
  136. pkcolumndbtname=wf_get_pkcolumndbtname(dw_pageretr) //取第一列为关键字
  137. ori_oldselect=dw_pageretr.Describe("DataWindow.Table.Select")
  138. ls_newselect=ori_oldselect
  139. ds_curquery=CREATE DATASTORE
  140. ds_curquery.DATAOBJECT='d_extr_find'
  141. ds_curquery.SetTransObject (sqlca)
  142. wf_editindex_lockf()
  143. sle_usual_query.text=trim(arg_string_code)
  144. if NOT retrieve_all then
  145. THIS.TRIGGEREVENT("ue_usual_query_RETR") //修改ls_newselect,retrieve
  146. else
  147. if if_sharedata then
  148. ds_share.sharedata(dw_pageretr)
  149. else
  150. wf_retrieveuc(dw_pageretr,ls_newselect,1)
  151. this.TRIGGEREVENT('RETRIEVE_pageretr')
  152. end if
  153. end if
  154. IF retrieve_all THEN
  155. THIS.TRIGGEREVENT("ue_usual_query_filt")
  156. END IF
  157. INS_RT_STRU.mtrlid[1]=0
  158. s_hide_col s_col_mtrlsectype
  159. s_col_mtrlsectype.col_1 = 'u_mtrldef_mtrlsectype'
  160. f_hide_col(1308,dw_pageretr,s_col_mtrlsectype)
  161. f_hide_col(1308,dw_choice,s_col_mtrlsectype)
  162. s_hide_col s_col_zxmtrlmode
  163. s_col_zxmtrlmode.col_1 = 'u_mtrldef_zxmtrlmode'
  164. f_hide_col(1309,dw_pageretr,s_col_zxmtrlmode)
  165. f_hide_col(1309,dw_choice,s_col_zxmtrlmode)
  166. end event
  167. event ue_before_open;call super::ue_before_open;if_ue_sort=true
  168. end event
  169. event retrieve_pageretr;boolean cb_firstpage_enabled,cb_nextpage_enabled,cb_retrieveall_enabled
  170. boolean cb_priorpage_enabled,cb_func_enabled,cb_retrieve_enabled
  171. cb_nextpage_enabled=cb_nextpage.enabled
  172. cb_retrieveall_enabled=cb_retrieveall.enabled
  173. cb_func_enabled=cb_func.enabled
  174. cb_nextpage.enabled=false
  175. cb_retrieveall.enabled=false
  176. cb_func.enabled=false
  177. SetPointer(HourGlass!)
  178. dw_pageretr.retrieve(cur_sptid,cur_scid,cur_ifth)
  179. if dw_pageretr.rowcount()>0 and dw_pageretr.getrow()=0 then dw_pageretr.setrow(1)
  180. SetPointer(Arrow!)
  181. cb_nextpage.enabled=cb_nextpage_enabled
  182. cb_retrieveall.enabled=cb_retrieveall_enabled
  183. cb_func.enabled=cb_func_enabled
  184. IF cbx_mlselect.Checked AND dw_pageretr.RowCount() > 1 THEN
  185. dw_pageretr.SelectRow(1,FALSE)
  186. END IF
  187. end event
  188. type cb_func from w_pageretr_ch`cb_func within w_inware_wfjg_ch
  189. end type
  190. type cb_exit from w_pageretr_ch`cb_exit within w_inware_wfjg_ch
  191. end type
  192. type sle_usual_query from w_pageretr_ch`sle_usual_query within w_inware_wfjg_ch
  193. integer x = 347
  194. end type
  195. type cb_retrieveall from w_pageretr_ch`cb_retrieveall within w_inware_wfjg_ch
  196. integer x = 1074
  197. end type
  198. type em_pagerowno from w_pageretr_ch`em_pagerowno within w_inware_wfjg_ch
  199. integer x = 768
  200. end type
  201. type dw_pageretr from w_pageretr_ch`dw_pageretr within w_inware_wfjg_ch
  202. integer width = 3566
  203. integer height = 1108
  204. string dataobject = "dw_inware_wfjg_ch"
  205. end type
  206. event dw_pageretr::clicked;if row>0 then
  207. this.setrow(row)
  208. if if_mlselect=1 then
  209. if if_changeselect then
  210. this.selectrow(row,not this.IsSelected(row))
  211. else
  212. if_changeselect=true
  213. end if
  214. else
  215. this.selectrow(0,false)
  216. this.selectrow(row,true)
  217. end if
  218. end if
  219. end event
  220. event dw_pageretr::rowfocuschanged;if if_mlselect=1 then
  221. if currentrow <=0 then return
  222. if keydown(keycontrol!) then
  223. if this.isselected(currentrow) then
  224. this.selectrow(currentrow,false)
  225. if_changeselect=false
  226. else
  227. if_changeselect=true
  228. end if
  229. else
  230. if not this.isselected(currentrow) then
  231. this.selectrow(currentrow,true)
  232. if_changeselect=false
  233. else
  234. if_changeselect=true
  235. end if
  236. end if
  237. else
  238. if dw_edit_mode then return
  239. if currentrow <=0 then return
  240. this.selectrow(0,false)
  241. this.selectrow(currentrow,true)
  242. end if
  243. end event
  244. event dw_pageretr::dwnkey;call super::dwnkey;if keydown(keyenter!) then return 1
  245. end event
  246. event dw_pageretr::doubleclicked;IF cbx_ml.Checked THEN
  247. cb_choice.TriggerEvent(Clicked!)
  248. ELSE
  249. cb_ok.TriggerEvent(Clicked!)
  250. END IF
  251. end event
  252. type st_1 from w_pageretr_ch`st_1 within w_inware_wfjg_ch
  253. integer width = 315
  254. string text = "物料编码含:"
  255. end type
  256. type cb_nextpage from w_pageretr_ch`cb_nextpage within w_inware_wfjg_ch
  257. integer x = 1225
  258. end type
  259. type cb_choice from w_pageretr_ch`cb_choice within w_inware_wfjg_ch
  260. end type
  261. event cb_choice::clicked;call super::clicked;Long ROW,ls_i = 0,chC = 0
  262. IF cbx_ml.Checked THEN
  263. ROW = dw_pageretr.GetRow()
  264. IF ROW <= 0 THEN
  265. MessageBox('提示','请先选择目标行!',information!,OK!)
  266. RETURN
  267. END IF
  268. FOR ls_i = 1 TO dw_pageretr.RowCount()
  269. IF dw_pageretr.IsSelected(ls_i) THEN
  270. chC++
  271. INS_RT_STRU.wfjgid[chC] = dw_pageretr.Object.u_order_wfjg_wfjgid [ls_i]
  272. INS_RT_STRU.printid[chC] = dw_pageretr.Object.u_order_wfjgmx_printid[ls_i]
  273. INS_RT_STRU.taskcode[chC] = dw_pageretr.Object.u_order_wfjg_taskcode[ls_i]
  274. INS_RT_STRU.orderid[chC] = dw_pageretr.Object.u_order_wfjgmx_orderid[ls_i]
  275. INS_RT_STRU.mtrlid[chC] = dw_pageretr.Object.u_order_wfjgmx_mtrlid[ls_i]
  276. INS_RT_STRU.mtrlname[chC] = dw_pageretr.Object.u_mtrldef_mtrlname[ls_i]
  277. INS_RT_STRU.mtrlcode[chC] = dw_pageretr.Object.u_mtrldef_mtrlcode[ls_i]
  278. INS_RT_STRU.mtrlmode[chC] = dw_pageretr.Object.u_mtrldef_mtrlmode[ls_i]
  279. INS_RT_STRU.mtrlengname[chC] = dw_pageretr.Object.u_mtrldef_mtrlengname[ls_i]
  280. INS_RT_STRU.barcode[chC] = dw_pageretr.Object.u_mtrldef_barcode[ls_i]
  281. INS_RT_STRU.unit[chC] = dw_pageretr.Object.u_mtrldef_unit[ls_i]
  282. INS_RT_STRU.planprice[chC] = dw_pageretr.Object.u_mtrldef_planprice[ls_i]
  283. INS_RT_STRU.qty[chC] = dw_pageretr.Object.u_order_wfjgmx_qty[ls_i] - dw_pageretr.Object.u_order_wfjgmx_stopqty[ls_i] - dw_pageretr.Object.u_order_wfjgmx_consignedqty[ls_i] - dw_pageretr.Object.u_order_wfjgmx_wasteqty[ls_i]
  284. INS_RT_STRU.price[chC] = dw_pageretr.Object.u_order_wfjgmx_price[ls_i]
  285. INS_RT_STRU.status[chC] = dw_pageretr.Object.u_order_wfjgmx_status[ls_i]
  286. INS_RT_STRU.woodcode[chC] = dw_pageretr.Object.u_order_wfjgmx_woodcode[ls_i]
  287. INS_RT_STRU.pcode[chC] = dw_pageretr.Object.u_order_wfjgmx_pcode[ls_i]
  288. INS_RT_STRU.zxmtrlmode[chC] = dw_pageretr.Object.u_mtrldef_zxmtrlmode[ls_i]
  289. INS_RT_STRU.mtrlsectype[chC] = dw_pageretr.Object.u_mtrldef_mtrlsectype[ls_i]
  290. INS_RT_STRU.dscrp[chC] = dw_pageretr.Object.u_order_wfjgmx_dscrp[ls_i]
  291. INS_RT_STRU.storageid[chC] = dw_pageretr.Object.u_order_wfjgmx_storageid[ls_i]
  292. INS_RT_STRU.consignedqty[chC] = dw_pageretr.Object.u_order_wfjgmx_consignedqty[ls_i]
  293. INS_RT_STRU.plancode[chC] = dw_pageretr.Object.u_order_wfjgmx_plancode[ls_i]
  294. INS_RT_STRU.mxdscrp2[chC] = dw_pageretr.Object.u_order_wfjgmx_mxdscrp2[ls_i]
  295. INS_RT_STRU.mxdscrp3[chC] = dw_pageretr.Object.u_order_wfjgmx_mxdscrp3[ls_i]
  296. INS_RT_STRU.mxdscrp4[chC] = dw_pageretr.Object.u_order_wfjgmx_mxdscrp4[ls_i]
  297. INS_RT_STRU.taskrelcode[chC] = dw_pageretr.Object.u_SaleTask_relcode[ls_i]
  298. END IF
  299. NEXT
  300. IF chC = 0 THEN
  301. MessageBox('提示','请至少选择一个目标行!',information!,OK!)
  302. RETURN
  303. END IF
  304. ELSE
  305. ROW = dw_choice.GetRow()
  306. IF ROW <= 0 THEN
  307. MessageBox('提示','请先选择目标行!',information!,OK!)
  308. RETURN
  309. END IF
  310. FOR ls_i = 1 TO dw_choice.RowCount()
  311. chC++
  312. INS_RT_STRU.wfjgid[chC] = dw_choice.Object.u_order_wfjg_wfjgid [ls_i]
  313. INS_RT_STRU.printid[chC] = dw_choice.Object.u_order_wfjgmx_printid[ls_i]
  314. INS_RT_STRU.taskcode[chC] = dw_choice.Object.u_order_wfjg_taskcode[ls_i]
  315. INS_RT_STRU.orderid[chC] = dw_choice.Object.u_order_wfjgmx_orderid[ls_i]
  316. INS_RT_STRU.mtrlid[chC] = dw_choice.Object.u_order_wfjgmx_mtrlid[ls_i]
  317. INS_RT_STRU.mtrlname[chC] = dw_choice.Object.u_mtrldef_mtrlname[ls_i]
  318. INS_RT_STRU.mtrlcode[chC] = dw_choice.Object.u_mtrldef_mtrlcode[ls_i]
  319. INS_RT_STRU.mtrlmode[chC] = dw_choice.Object.u_mtrldef_mtrlmode[ls_i]
  320. INS_RT_STRU.mtrlengname[chC] = dw_choice.Object.u_mtrldef_mtrlengname[ls_i]
  321. INS_RT_STRU.barcode[chC] = dw_choice.Object.u_mtrldef_barcode[ls_i]
  322. INS_RT_STRU.unit[chC] = dw_choice.Object.u_mtrldef_unit[ls_i]
  323. INS_RT_STRU.planprice[chC] = dw_choice.Object.u_mtrldef_planprice[ls_i]
  324. INS_RT_STRU.qty[chC] = dw_choice.Object.u_order_wfjgmx_qty[ls_i] - dw_choice.Object.u_order_wfjgmx_stopqty[ls_i] - dw_choice.Object.u_order_wfjgmx_consignedqty[ls_i] - dw_choice.Object.u_order_wfjgmx_wasteqty[ls_i]
  325. INS_RT_STRU.price[chC] = dw_choice.Object.u_order_wfjgmx_price[ls_i]
  326. INS_RT_STRU.status[chC] = dw_choice.Object.u_order_wfjgmx_status[ls_i]
  327. INS_RT_STRU.woodcode[chC] = dw_choice.Object.u_order_wfjgmx_woodcode[ls_i]
  328. INS_RT_STRU.pcode[chC] = dw_choice.Object.u_order_wfjgmx_pcode[ls_i]
  329. INS_RT_STRU.zxmtrlmode[chC] = dw_choice.Object.u_mtrldef_zxmtrlmode[ls_i]
  330. INS_RT_STRU.mtrlsectype[chC] = dw_choice.Object.u_mtrldef_mtrlsectype[ls_i]
  331. INS_RT_STRU.dscrp[chC] = dw_choice.Object.u_order_wfjgmx_dscrp[ls_i]
  332. INS_RT_STRU.storageid[chC] = dw_choice.Object.u_order_wfjgmx_storageid[ls_i]
  333. INS_RT_STRU.consignedqty[chC] = dw_choice.Object.u_order_wfjgmx_consignedqty[ls_i]
  334. INS_RT_STRU.plancode[chC] = dw_choice.Object.u_order_wfjgmx_plancode[ls_i]
  335. INS_RT_STRU.mxdscrp2[chC] = dw_choice.Object.u_order_wfjgmx_mxdscrp2[ls_i]
  336. INS_RT_STRU.mxdscrp3[chC] = dw_choice.Object.u_order_wfjgmx_mxdscrp3[ls_i]
  337. INS_RT_STRU.mxdscrp4[chC] = dw_choice.Object.u_order_wfjgmx_mxdscrp4[ls_i]
  338. INS_RT_STRU.taskrelcode[chC] = dw_pageretr.Object.u_SaleTask_relcode[ls_i]
  339. NEXT
  340. IF chC = 0 THEN
  341. MessageBox('提示','请至少选择一个目标行!',information!,OK!)
  342. RETURN
  343. END IF
  344. END IF
  345. Close(PARENT)
  346. end event
  347. type cb_refresh from w_pageretr_ch`cb_refresh within w_inware_wfjg_ch
  348. end type
  349. type cb_help from w_pageretr_ch`cb_help within w_inware_wfjg_ch
  350. end type
  351. type ln_bar from w_pageretr_ch`ln_bar within w_inware_wfjg_ch
  352. end type
  353. type ln_bar2 from w_pageretr_ch`ln_bar2 within w_inware_wfjg_ch
  354. end type
  355. type r_bar from w_pageretr_ch`r_bar within w_inware_wfjg_ch
  356. end type
  357. type ln_1 from w_pageretr_ch`ln_1 within w_inware_wfjg_ch
  358. end type
  359. type ln_2 from w_pageretr_ch`ln_2 within w_inware_wfjg_ch
  360. end type
  361. type cbx_mlselect from checkbox within w_inware_wfjg_ch
  362. integer x = 1243
  363. integer y = 204
  364. integer width = 256
  365. integer height = 60
  366. boolean bringtotop = true
  367. integer textsize = -9
  368. integer weight = 400
  369. fontcharset fontcharset = gb2312charset!
  370. fontpitch fontpitch = variable!
  371. string facename = "宋体"
  372. long backcolor = 134217739
  373. string text = "多选"
  374. end type
  375. event clicked;if this.checked then
  376. if_mlselect=1
  377. cbx_allselect.enabled = true
  378. else
  379. if_mlselect=0
  380. cbx_allselect.enabled = false
  381. end if
  382. f_SetProfileString (sys_empid,dw_pageretr.DATAOBJECT, "if_mlselect", string(if_mlselect))
  383. end event
  384. event constructor;if_mlselect=integer(f_ProfileString (sys_empid,dw_pageretr.DATAOBJECT, "if_mlselect", '0'))
  385. if if_mlselect =0 then
  386. this.checked=false
  387. else
  388. this.checked=true
  389. end if
  390. end event
  391. type cbx_ml from checkbox within w_inware_wfjg_ch
  392. integer x = 869
  393. integer y = 204
  394. integer width = 357
  395. integer height = 60
  396. boolean bringtotop = true
  397. integer textsize = -9
  398. integer weight = 700
  399. fontcharset fontcharset = gb2312charset!
  400. fontpitch fontpitch = variable!
  401. string facename = "宋体"
  402. long textcolor = 16711680
  403. long backcolor = 134217739
  404. string text = "直接选择"
  405. end type
  406. event clicked;wf_face_change()
  407. int use_ml
  408. if this.checked then
  409. use_ml=1
  410. else
  411. use_ml=0
  412. end if
  413. f_SetProfileString (sys_empid,dw_pageretr.DATAOBJECT, "use_ml", string(use_ml))
  414. end event
  415. event constructor;int use_ml
  416. use_ml=integer(f_ProfileString (sys_empid,dw_pageretr.DATAOBJECT, "use_ml", '0'))
  417. if use_ml=0 then
  418. this.checked=false
  419. else
  420. this.checked=true
  421. end if
  422. this.triggerevent(clicked!)
  423. end event
  424. type dw_choice from datawindow within w_inware_wfjg_ch
  425. integer y = 1524
  426. integer width = 3566
  427. integer height = 752
  428. integer taborder = 140
  429. boolean bringtotop = true
  430. string dataobject = "dw_inware_wfjg_ch"
  431. boolean minbox = true
  432. boolean hscrollbar = true
  433. boolean vscrollbar = true
  434. boolean hsplitscroll = true
  435. boolean livescroll = true
  436. borderstyle borderstyle = stylelowered!
  437. end type
  438. event rowfocuschanged;IF currentrow <=0 THEN RETURN
  439. this.selectrow(0,false)
  440. this.selectrow(currentrow,true)
  441. end event
  442. type cb_ok from uo_imflatbutton within w_inware_wfjg_ch
  443. integer x = 2798
  444. integer y = 1412
  445. integer width = 379
  446. integer taborder = 70
  447. boolean bringtotop = true
  448. string text = "选定[Enter]"
  449. end type
  450. event clicked;call super::clicked;LONG ROW,ls_i,chC=0
  451. ROW=dw_pageretr.GETROW()
  452. if ROW<=0 then
  453. messagebox('提示','请先选择目标行!',information!,OK!)
  454. return
  455. end if
  456. string ls_find
  457. for ls_i=1 to dw_pageretr.rowcount()
  458. if dw_pageretr.isselected(ls_i) then
  459. ls_find = ' u_order_wfjgmx_printid ='+string(dw_pageretr.object.u_order_wfjgmx_printid[ls_i]) + ' and u_order_wfjg_wfjgID = ' +string(dw_pageretr.object.u_order_wfjg_wfjgID[ls_i])
  460. if dw_choice.find(ls_find,1,dw_choice.rowcount())=0 then
  461. chC++
  462. dw_pageretr.RowsCopy(ls_i, ls_i, Primary!, dw_choice, dw_choice.rowcount() + 1, Primary!)
  463. end if
  464. end if
  465. next
  466. end event
  467. type cb_del from uo_imflatbutton within w_inware_wfjg_ch
  468. integer x = 3195
  469. integer y = 1412
  470. integer width = 311
  471. integer taborder = 80
  472. boolean bringtotop = true
  473. string text = "删除"
  474. string normalpicname = "delete.bmp"
  475. end type
  476. event clicked;call super::clicked;IF dw_choice.GETROW()=0 THEN
  477. MESSAGEBOX('提示','请选择删除的行对象!',information!,OK!)
  478. RETURN
  479. END IF
  480. dw_choice.DeleteRow (0)
  481. dw_choice.TriggerEvent (rowfocuschanged!)
  482. end event
  483. type cbx_allselect from checkbox within w_inware_wfjg_ch
  484. integer x = 1518
  485. integer y = 204
  486. integer width = 224
  487. integer height = 60
  488. boolean bringtotop = true
  489. integer textsize = -9
  490. integer weight = 400
  491. fontcharset fontcharset = gb2312charset!
  492. fontpitch fontpitch = variable!
  493. string facename = "宋体"
  494. long backcolor = 134217739
  495. string text = "全选"
  496. end type
  497. event clicked;Int li
  498. IF THIS.Checked AND cbx_mlselect.Checked THEN
  499. FOR li = 1 TO dw_pageretr.RowCount()
  500. dw_pageretr.SelectRow(li,TRUE)
  501. NEXT
  502. ELSE
  503. FOR li = 1 TO dw_pageretr.RowCount()
  504. dw_pageretr.SelectRow(li,FALSE)
  505. NEXT
  506. END IF
  507. end event