w_wfjg_out_ch.srw 17 KB

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