w_rp_ware_inoutmx.srw 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672
  1. $PBExportHeader$w_rp_ware_inoutmx.srw
  2. forward
  3. global type w_rp_ware_inoutmx from w_publ_easyq
  4. end type
  5. type ddlb_1 from dropdownlistbox within w_rp_ware_inoutmx
  6. end type
  7. type rb_1 from radiobutton within w_rp_ware_inoutmx
  8. end type
  9. type rb_2 from radiobutton within w_rp_ware_inoutmx
  10. end type
  11. type st_2 from statictext within w_rp_ware_inoutmx
  12. end type
  13. type cbx_1 from checkbox within w_rp_ware_inoutmx
  14. end type
  15. type dw_2 from u_dw_rbtnfilter within w_rp_ware_inoutmx
  16. end type
  17. end forward
  18. global type w_rp_ware_inoutmx from w_publ_easyq
  19. string title = "物料进出明细统计表"
  20. ddlb_1 ddlb_1
  21. rb_1 rb_1
  22. rb_2 rb_2
  23. st_2 st_2
  24. cbx_1 cbx_1
  25. dw_2 dw_2
  26. end type
  27. global w_rp_ware_inoutmx w_rp_ware_inoutmx
  28. type variables
  29. datetime first_date,end_date,showsale_data
  30. long cur_storageid
  31. boolean lb_r1=true
  32. boolean lb_r2=false
  33. end variables
  34. forward prototypes
  35. public subroutine wf_cmpbalc ()
  36. public subroutine wf_rtrdw2 ()
  37. end prototypes
  38. public subroutine wf_cmpbalc ();Long ll_rowcount,i
  39. Dec ld_sumbalc
  40. IF dw_1.RowCount() > 0 THEN
  41. dwobject dwod
  42. dwod = dw_1.Object.mxreport
  43. ll_rowcount = dwod.Object.dwrowcount[1]
  44. Long ll_mtrlid
  45. ll_mtrlid = dw_2.Object.mtrlid[dw_2.GetRow()]
  46. SELECT sum(noallocqty) INTO :ld_sumbalc FROM u_mtrlware
  47. WHERE storageid = :cur_storageid
  48. AND mtrlid = :ll_mtrlid Group By mtrlid;
  49. IF sqlca.SQLCode <> 0 OR IsNull(ld_sumbalc) THEN
  50. ld_sumbalc = 0
  51. END IF
  52. IF ll_rowcount = 1 THEN
  53. dwod.Object.balc[1] = ld_sumbalc
  54. RETURN
  55. END IF
  56. dwod.Object.balc[ll_rowcount] = ld_sumbalc
  57. FOR i = ll_rowcount - 1 TO 1 STEP - 1
  58. ld_sumbalc = (ld_sumbalc - dwod.Object.inqty[i+1]) + dwod.Object.outqty[i+1]
  59. dwod.Object.balc[i] = ld_sumbalc
  60. dwod.Object.bgqty[i] = dwod.Object.balc[i] - dwod.Object.inqty[i] + dwod.Object.outqty[i]
  61. NEXT
  62. END IF
  63. end subroutine
  64. public subroutine wf_rtrdw2 ();dw_2.retrieve(cur_storageid)
  65. end subroutine
  66. on w_rp_ware_inoutmx.create
  67. int iCurrent
  68. call super::create
  69. this.ddlb_1=create ddlb_1
  70. this.rb_1=create rb_1
  71. this.rb_2=create rb_2
  72. this.st_2=create st_2
  73. this.cbx_1=create cbx_1
  74. this.dw_2=create dw_2
  75. iCurrent=UpperBound(this.Control)
  76. this.Control[iCurrent+1]=this.ddlb_1
  77. this.Control[iCurrent+2]=this.rb_1
  78. this.Control[iCurrent+3]=this.rb_2
  79. this.Control[iCurrent+4]=this.st_2
  80. this.Control[iCurrent+5]=this.cbx_1
  81. this.Control[iCurrent+6]=this.dw_2
  82. end on
  83. on w_rp_ware_inoutmx.destroy
  84. call super::destroy
  85. destroy(this.ddlb_1)
  86. destroy(this.rb_1)
  87. destroy(this.rb_2)
  88. destroy(this.st_2)
  89. destroy(this.cbx_1)
  90. destroy(this.dw_2)
  91. end on
  92. event activate;call super::activate;//int i=1
  93. end event
  94. event resize;call super::resize;dw_1.width=this.width - dw_1.x - 40
  95. dw_1.height=this.height - dw_1.y - 115
  96. dw_2.Height=dw_1.height - 80
  97. end event
  98. event ue_before_open;call super::ue_before_open;dw_2.settransobject(sqlca)
  99. IF TRIM(DW_1.DATAOBJECT)<>'' THEN
  100. DW_1.OBJECT.DataWindow.PRINT.MARGIN.TOP=INTEGER(f_ProfileString (sys_empid,DW_1.DATAOBJECT, "MARGIN_TOP", "110"))
  101. DW_1.OBJECT.DataWindow.PRINT.MARGIN.LEFT=INTEGER(f_ProfileString (sys_empid,DW_1.DATAOBJECT, "MARGIN_LEFT", "96" ))
  102. DW_1.OBJECT.DataWindow.PRINT.MARGIN.bottom=INTEGER(f_ProfileString (sys_empid,DW_1.DATAOBJECT, "MARGIN_BOTTOM", "110"))
  103. DW_1.OBJECT.DataWindow.PRINT.MARGIN.right=INTEGER(f_ProfileString (sys_empid,DW_1.DATAOBJECT, "MARGIN_RIGHT", "96" ))
  104. dw_1.object.DataWindow.Print.Preview = 'yes'
  105. dw_1.Object.DataWindow.Print.Duplex = 2
  106. dw_1.Object.DataWindow.Print.Preview.Rulers = "yes"
  107. end if
  108. end event
  109. event ue_sentdataout;IF NOT if_power_sendout THEN
  110. MessageBox(publ_operator,'你没有使用权限!')
  111. RETURN
  112. END IF
  113. Long i
  114. IF rb_1.Checked THEN
  115. Boolean printflag = FALSE
  116. FOR i = 1 TO dw_2.RowCount()
  117. IF dw_2.Object.selectflag[i] = 1 THEN
  118. dw_2.ScrollToRow(i)
  119. OpenWithParm(w_sentdataout,DW_1)
  120. END IF
  121. NEXT
  122. ELSE
  123. OpenWithParm(w_sentdataout,DW_1)
  124. END IF
  125. end event
  126. event ue_before_openretrieve;call super::ue_before_openretrieve;wf_rtrdw2()
  127. ddlb_1.triggerevent(selectionchanged!)
  128. end event
  129. type cb_func from w_publ_easyq`cb_func within w_rp_ware_inoutmx
  130. end type
  131. type cb_exit from w_publ_easyq`cb_exit within w_rp_ware_inoutmx
  132. end type
  133. type cb_2 from w_publ_easyq`cb_2 within w_rp_ware_inoutmx
  134. integer x = 558
  135. boolean bringtotop = true
  136. end type
  137. event cb_2::clicked;//
  138. //IF NOT f_power_ind(127) THEN
  139. // MessageBox('提示','你没有使用权限!',information!,OK!)
  140. // RETURN
  141. //END IF
  142. //
  143. //IF NOT f_power_ind(1253) THEN
  144. // MessageBox('提示','你没有使用权限!',information!,OK!)
  145. // RETURN
  146. //END IF
  147. dw_1.Object.datawindow.Print.page.range = ''
  148. dw_1.Object.datawindow.Print.copies = 1
  149. Long i
  150. IF rb_1.Checked THEN
  151. Boolean printflag = FALSE
  152. FOR i = 1 TO dw_2.RowCount()
  153. IF dw_2.Object.selectflag[i] = 1 THEN
  154. dw_2.ScrollToRow(i)
  155. printflag = TRUE
  156. dw_1.Print()
  157. END IF
  158. NEXT
  159. IF printflag = FALSE THEN
  160. MessageBox('提示','没有可打印的产品,请选择产品!',information!,OK!)
  161. RETURN
  162. END IF
  163. ELSE
  164. CALL SUPER::Clicked
  165. END IF
  166. end event
  167. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_ware_inoutmx
  168. integer x = 859
  169. boolean bringtotop = true
  170. end type
  171. type cb_1 from w_publ_easyq`cb_1 within w_rp_ware_inoutmx
  172. boolean bringtotop = true
  173. end type
  174. event cb_1::clicked;Long ll_mtrlid
  175. first_date = DateTime(Date(em_1.Text),Time(0))
  176. end_date = DateTime(Date(em_2.Text),Time('23:59:59'))
  177. IF first_date < sys_showsaledata_mindt THEN
  178. showsale_data = sys_showsaledata_mindt
  179. ELSE
  180. showsale_data = first_date
  181. END IF
  182. Long a,b,c,d,e
  183. IF rb_1.Checked THEN
  184. IF dw_2.RowCount() > 0 THEN ll_mtrlid = dw_2.Object.mtrlid[dw_2.GetRow()]
  185. dw_1.Retrieve(cur_storageid,first_date,end_date,ll_mtrlid,showsale_data)
  186. //====================================================================
  187. // Script - w_rp_mtrl_inoutmx::cb_1 for clicked
  188. // Reason:
  189. //--------------------------------------------------------------------
  190. // Modified By: yyx Date: 2004.01.10
  191. //--------------------------------------------------------------------
  192. IF dw_2.RowCount() > 0 THEN
  193. ll_mtrlid = dw_2.Object.mtrlid[dw_2.GetRow()]
  194. Long in_cnt,out_cnt
  195. SELECT count(*) INTO :out_cnt FROM u_outware,u_outwaremx
  196. WHERE u_outware.flag = 1
  197. AND u_outware.scid = u_outwaremx.scid
  198. AND u_outware.outwareid = u_outwaremx.outwareid
  199. AND u_outware.storageid = :cur_storageid
  200. AND u_outwaremx.mtrlid = :ll_mtrlid
  201. AND (( u_outware.billtype = 1 AND u_outware.outdate > = :showsale_data AND u_outware.outdate <= :end_date) OR
  202. ( u_outware.billtype <> 1 And u_outware.outdate > = :first_date And u_outware.outdate <= :end_date ));
  203. IF sqlca.SQLCode <> 0 THEN out_cnt = 0
  204. SELECT count(*) INTO :in_cnt FROM u_inware,u_inwaremx
  205. WHERE u_inware.flag = 1
  206. AND u_inware.scid = u_inwaremx.scid
  207. AND u_inware.inwareid = u_inwaremx.inwareid
  208. AND u_inware.storageid = :cur_storageid
  209. AND u_inwaremx.mtrlid = :ll_mtrlid
  210. AND u_inware.indate > = :first_date
  211. And u_inware.indate <= :end_date;
  212. IF sqlca.SQLCode <> 0 THEN in_cnt = 0
  213. IF in_cnt + out_cnt > 0 THEN
  214. wf_cmpbalc()
  215. END IF
  216. ELSE
  217. dw_1.Reset()
  218. END IF
  219. ELSE
  220. dw_1.Retrieve(cur_storageid,first_date,end_date,showsale_data)
  221. dw_1.SetRedraw(False)
  222. dw_1.SetSort("mtrltype A, mtrlcode A, auditingdate D")
  223. dw_1.Sort()
  224. IF dw_1.RowCount() > 0 THEN //2
  225. Long ins_mtrlid,piro_mtrlid,li_row
  226. Dec ins_balcqty = 0
  227. IF dw_1.RowCount() > 1 THEN //产品行数多于1 //3
  228. ins_mtrlid = Long(dw_1.Object.mtrlid[1])
  229. SELECT sum(noallocqty) INTO :ins_balcqty FROM u_mtrlware
  230. WHERE storageid = :cur_storageid
  231. And mtrlid = :ins_mtrlid Group By mtrlid;
  232. IF sqlca.SQLCode = -1 Or IsNull(ins_balcqty) THEN
  233. MessageBox('错误',sqlca.SQLErrText,stopsign!,OK!)
  234. ins_balcqty = 0
  235. END IF
  236. dw_1.Object.balc[1] = ins_balcqty
  237. ins_balcqty = ins_balcqty + dw_1.Object.outqty[1] - dw_1.Object.inqty[1]
  238. FOR li_row = 2 To dw_1.RowCount()
  239. ins_mtrlid = Long(dw_1.Object.mtrlid[li_row])
  240. piro_mtrlid = Long(dw_1.Object.mtrlid[li_row - 1])
  241. IF ins_mtrlid <> piro_mtrlid THEN
  242. SELECT sum(noallocqty) INTO :ins_balcqty FROM u_mtrlware
  243. WHERE storageid = :cur_storageid
  244. And mtrlid = :ins_mtrlid Group By mtrlid;
  245. IF sqlca.SQLCode = -1 Or IsNull(ins_balcqty) THEN
  246. ins_balcqty = 0
  247. END IF
  248. dw_1.Object.balc[li_row] = ins_balcqty
  249. ins_balcqty = ins_balcqty + dw_1.Object.outqty[li_row] - dw_1.Object.inqty[li_row]
  250. ELSE
  251. a = dw_1.Object.outqty[li_row]
  252. b = dw_1.Object.inqty[li_row]
  253. dw_1.Object.balc[li_row] = ins_balcqty
  254. ins_balcqty = ins_balcqty + dw_1.Object.outqty[li_row] - dw_1.Object.inqty[li_row]
  255. END IF
  256. NEXT
  257. ELSE
  258. ins_mtrlid = Long(dw_1.Object.mtrlid[dw_1.RowCount()])
  259. SELECT sum(noallocqty) INTO :ins_balcqty FROM u_mtrlware
  260. WHERE storageid = :cur_storageid
  261. And mtrlid = :ins_mtrlid Group By mtrlid;
  262. IF sqlca.SQLCode = -1 Or IsNull(ins_balcqty) THEN
  263. ins_balcqty = 0
  264. END IF
  265. ins_balcqty = 0
  266. END IF //3
  267. dw_1.SetSort("mtrltype A, mtrlcode A, auditingdate A")
  268. dw_1.Sort()
  269. dw_1.SetRedraw(True)
  270. ELSE
  271. dw_1.Reset()
  272. END IF //2
  273. END IF
  274. //IF rb_2.Checked THEN //1
  275. //ELSE
  276. //
  277. // //====================================================================
  278. //END IF //1
  279. //
  280. end event
  281. type st_3 from w_publ_easyq`st_3 within w_rp_ware_inoutmx
  282. integer x = 1413
  283. end type
  284. type st_4 from w_publ_easyq`st_4 within w_rp_ware_inoutmx
  285. integer x = 2149
  286. end type
  287. type em_1 from w_publ_easyq`em_1 within w_rp_ware_inoutmx
  288. integer x = 1641
  289. integer taborder = 140
  290. end type
  291. type em_2 from w_publ_easyq`em_2 within w_rp_ware_inoutmx
  292. integer x = 2249
  293. integer taborder = 150
  294. end type
  295. type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_ware_inoutmx
  296. integer x = 1605
  297. integer y = 8
  298. integer taborder = 80
  299. end type
  300. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_ware_inoutmx
  301. integer x = 1390
  302. integer y = 12
  303. integer taborder = 90
  304. boolean enabled = false
  305. end type
  306. type dw_1 from w_publ_easyq`dw_1 within w_rp_ware_inoutmx
  307. integer x = 672
  308. integer y = 308
  309. integer width = 2523
  310. integer height = 1124
  311. string dataobject = "dw_rp_ware_inoutmx_1"
  312. borderstyle borderstyle = stylebox!
  313. boolean autosave_sort_use = false
  314. boolean autosave_setlayout_use = false
  315. end type
  316. type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_ware_inoutmx
  317. end type
  318. type sle_cust from w_publ_easyq`sle_cust within w_rp_ware_inoutmx
  319. end type
  320. type st_mtrl from w_publ_easyq`st_mtrl within w_rp_ware_inoutmx
  321. end type
  322. type st_cust from w_publ_easyq`st_cust within w_rp_ware_inoutmx
  323. end type
  324. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_ware_inoutmx
  325. integer x = 1390
  326. end type
  327. type pb_em1 from w_publ_easyq`pb_em1 within w_rp_ware_inoutmx
  328. integer x = 2053
  329. end type
  330. type pb_em2 from w_publ_easyq`pb_em2 within w_rp_ware_inoutmx
  331. integer x = 2661
  332. end type
  333. type pb_2 from w_publ_easyq`pb_2 within w_rp_ware_inoutmx
  334. integer x = 2770
  335. end type
  336. type cb_help from w_publ_easyq`cb_help within w_rp_ware_inoutmx
  337. integer x = 709
  338. end type
  339. type cb_copyself from w_publ_easyq`cb_copyself within w_rp_ware_inoutmx
  340. end type
  341. type gb_1 from w_publ_easyq`gb_1 within w_rp_ware_inoutmx
  342. end type
  343. type ln_bar from w_publ_easyq`ln_bar within w_rp_ware_inoutmx
  344. integer beginx = -9
  345. integer endx = 1998
  346. end type
  347. type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_ware_inoutmx
  348. end type
  349. type r_bar from w_publ_easyq`r_bar within w_rp_ware_inoutmx
  350. end type
  351. type ln_1 from w_publ_easyq`ln_1 within w_rp_ware_inoutmx
  352. end type
  353. type ln_2 from w_publ_easyq`ln_2 within w_rp_ware_inoutmx
  354. end type
  355. type ln_3 from w_publ_easyq`ln_3 within w_rp_ware_inoutmx
  356. boolean visible = false
  357. end type
  358. type ln_4 from w_publ_easyq`ln_4 within w_rp_ware_inoutmx
  359. boolean visible = false
  360. end type
  361. type ddlb_1 from dropdownlistbox within w_rp_ware_inoutmx
  362. integer x = 713
  363. integer y = 196
  364. integer width = 667
  365. integer height = 452
  366. integer taborder = 20
  367. boolean bringtotop = true
  368. integer textsize = -9
  369. integer weight = 400
  370. fontcharset fontcharset = gb2312charset!
  371. fontpitch fontpitch = variable!
  372. string facename = "宋体"
  373. long textcolor = 33554432
  374. boolean sorted = false
  375. boolean vscrollbar = true
  376. borderstyle borderstyle = stylelowered!
  377. end type
  378. event selectionchanged;cur_storageid=long(Mid ( ddlb_1.text,pos(ddlb_1.text,'[') + 1,len(ddlb_1.text) - pos(ddlb_1.text,'[') - 1 ))
  379. wf_rtrdw2()
  380. if dw_2.rowcount()>0 then dw_2.ScrollToRow(1)
  381. cb_1.triggerevent(clicked!)
  382. end event
  383. event constructor;long ins_storageid,ls_storageid
  384. string ins_storagename,ls_storagestr
  385. ///yyx0822
  386. ls_storagestr=sys_user_storagestr
  387. if ls_storagestr='0' then
  388. DECLARE storage_cur CURSOR FOR
  389. SELECT u_storage.storageid,
  390. u_storage.storagename
  391. FROM u_storage;
  392. open storage_cur;
  393. fetch storage_cur into :ins_storageid,:ins_storagename;
  394. do while sqlca.sqlcode=0 //循环读取明细数据
  395. ddlb_1.AddItem (ins_storagename+'['+string(ins_storageid)+']')
  396. fetch storage_cur into :ins_storageid,:ins_storagename;
  397. loop
  398. close storage_cur;
  399. // ddlb_1.AddItem ('[全部]')
  400. else
  401. DO WHILE len(ls_storagestr)<>1
  402. ls_storagestr=Replace( ls_storagestr, 1, 1, '' )
  403. ls_storageid=long(left(ls_storagestr,pos(ls_storagestr,',',1) - 1))
  404. /////
  405. SELECT u_storage.storageid,
  406. u_storage.storagename
  407. INTO :ins_storageid,:ins_storagename
  408. FROM u_storage where u_storage.storageid= :ls_storageid;
  409. ddlb_1.AddItem (ins_storagename+'['+string(ins_storageid)+']')
  410. ///////////////////////////////
  411. ls_storagestr=Replace ( ls_storagestr, 1, pos(ls_storagestr,',',1) - 1, '' )
  412. LOOP
  413. end if
  414. ////////
  415. ddlb_1.text=ins_storagename+'['+string(ins_storageid)+']'
  416. cur_storageid=ins_storageid
  417. end event
  418. type rb_1 from radiobutton within w_rp_ware_inoutmx
  419. integer x = 18
  420. integer y = 208
  421. integer width = 315
  422. integer height = 76
  423. boolean bringtotop = true
  424. integer textsize = -9
  425. integer weight = 400
  426. fontcharset fontcharset = gb2312charset!
  427. fontpitch fontpitch = variable!
  428. string facename = "宋体"
  429. long textcolor = 33554432
  430. long backcolor = 134217739
  431. string text = "帐簿格式"
  432. boolean checked = true
  433. end type
  434. event clicked;em_2.enabled=true
  435. cbx_yl.checked=false
  436. cbx_yl.enabled=false
  437. dw_1.dataobject='dw_rp_ware_inoutmx_1'
  438. dw_1.SetTransObject (sqlca)
  439. dw_1.object.DataWindow.Print.Preview = 'yes'
  440. dw_1.Object.DataWindow.Print.Duplex = 2
  441. dw_1.Object.DataWindow.Print.Preview.Rulers = "yes"
  442. wf_rtrdw2()
  443. cb_1.triggerevent(clicked!)
  444. if lb_r1=false then
  445. dw_1.x=681
  446. dw_1.Width=dw_1.Width - dw_2.Width
  447. dw_2.visible=true
  448. st_2.visible=true
  449. cbx_1.visible=true
  450. lb_r2=false
  451. lb_r1=true
  452. end if
  453. end event
  454. type rb_2 from radiobutton within w_rp_ware_inoutmx
  455. integer x = 389
  456. integer y = 208
  457. integer width = 261
  458. integer height = 76
  459. boolean bringtotop = true
  460. integer textsize = -9
  461. integer weight = 400
  462. fontcharset fontcharset = gb2312charset!
  463. fontpitch fontpitch = variable!
  464. string facename = "宋体"
  465. long textcolor = 33554432
  466. long backcolor = 134217739
  467. string text = "日记式"
  468. end type
  469. event clicked;EM_1.TEXT=STRING(TODAY(),'YYYY-MM-DD')
  470. EM_2.TEXT=STRING(TODAY(),'YYYY-MM-DD')
  471. em_2.enabled=false
  472. cbx_yl.enabled=true
  473. dw_1.dataobject='dw_mtrl_inoutmx_2'
  474. dw_1.SetTransObject (sqlca)
  475. if lb_r2=false then
  476. dw_1.x=dw_2.x
  477. dw_1.Width=dw_1.Width+dw_2.Width
  478. dw_2.visible=false
  479. st_2.visible=false
  480. cbx_1.visible=false
  481. lb_r1=false
  482. lb_r2=true
  483. end if
  484. cb_1.triggerevent(clicked!)
  485. end event
  486. type st_2 from statictext within w_rp_ware_inoutmx
  487. integer x = 5
  488. integer y = 308
  489. integer width = 663
  490. integer height = 80
  491. boolean bringtotop = true
  492. integer textsize = -9
  493. integer weight = 400
  494. fontcharset fontcharset = gb2312charset!
  495. fontpitch fontpitch = variable!
  496. string facename = "宋体"
  497. long textcolor = 33554432
  498. long backcolor = 67108864
  499. boolean enabled = false
  500. alignment alignment = right!
  501. boolean border = true
  502. boolean focusrectangle = false
  503. end type
  504. type cbx_1 from checkbox within w_rp_ware_inoutmx
  505. integer x = 41
  506. integer y = 316
  507. integer width = 251
  508. integer height = 68
  509. boolean bringtotop = true
  510. integer textsize = -9
  511. integer weight = 400
  512. fontcharset fontcharset = gb2312charset!
  513. fontpitch fontpitch = variable!
  514. string facename = "宋体"
  515. long textcolor = 33554432
  516. long backcolor = 67108864
  517. string text = "全选"
  518. end type
  519. event clicked;long i
  520. int k=0
  521. if this.checked then k=1
  522. for i= 1 to dw_2.rowcount()
  523. dw_2.object.selectflag[i]=k
  524. next
  525. end event
  526. type dw_2 from u_dw_rbtnfilter within w_rp_ware_inoutmx
  527. integer x = 5
  528. integer y = 380
  529. integer width = 663
  530. integer height = 1048
  531. integer taborder = 30
  532. string dataobject = "dw_rp_ware_inoutmx_2"
  533. boolean hscrollbar = true
  534. boolean vscrollbar = true
  535. boolean resizable = true
  536. borderstyle borderstyle = stylebox!
  537. end type
  538. event rowfocuschanged;if currentrow<=0 then return
  539. //DW_2.SETROW(currentrow)
  540. //DW_2.ScrollToRow (currentrow)
  541. this.SelectRow(0,false)
  542. this.SelectRow(currentrow,true)
  543. cb_1.triggerevent(clicked!)
  544. end event
  545. event clicked;call super::clicked;//if row<=0 then return
  546. //DW_2.SETROW(row)
  547. //DW_2.ScrollToRow (row)
  548. //this.SelectRow(0,false)
  549. //this.SelectRow(row,true)
  550. end event
  551. event constructor;call super::constructor; titleclick_sort_use=true //单击标题排序功能开关
  552. RBUTTON_FILTER_USE=true //右键查询功能开关
  553. end event