w_mtrl_spt_price.srw 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450
  1. $PBExportHeader$w_mtrl_spt_price.srw
  2. $PBExportComments$供应商价格管理
  3. forward
  4. global type w_mtrl_spt_price from w_publ_1ton_share_detail
  5. end type
  6. type st_2 from statictext within w_mtrl_spt_price
  7. end type
  8. type dw_child2 from u_dw_rbtnfilter within w_mtrl_spt_price
  9. end type
  10. type ddlb_1 from uo_ddlb_storageid within w_mtrl_spt_price
  11. end type
  12. end forward
  13. global type w_mtrl_spt_price from w_publ_1ton_share_detail
  14. string title = "物料供应商价格"
  15. boolean maxbox = true
  16. windowstate windowstate = maximized!
  17. event insert_childrow ( )
  18. event retrieve_childdw2 ( )
  19. st_2 st_2
  20. dw_child2 dw_child2
  21. ddlb_1 ddlb_1
  22. end type
  23. global w_mtrl_spt_price w_mtrl_spt_price
  24. type variables
  25. long mtrl_id//物料ID
  26. long cur_storageid = -1
  27. long cur_storageid_arr[]
  28. string ins_status,ins_woodcode,ins_pcode,ins_unit
  29. end variables
  30. event insert_childrow();long li_row
  31. li_row=dw_child.insertrow(0)
  32. dw_child.scrolltorow(li_row)
  33. dw_child.SetColumn ('procode')
  34. end event
  35. event retrieve_childdw2();long li_row,li_sptid
  36. li_row=dw_child.getrow()
  37. if li_row=0 then
  38. dw_child2.reset()
  39. else
  40. li_sptid=dw_child.object.u_spt_price_sptid[li_row]
  41. if dw_child2.retrieve(mtrl_id,li_sptid,ins_status,ins_woodcode,ins_pcode,ins_unit) > 0 then
  42. dw_child2.selectrow(0,false)
  43. dw_child2.selectrow(1,true)
  44. end if
  45. end if
  46. end event
  47. on w_mtrl_spt_price.create
  48. int iCurrent
  49. call super::create
  50. this.st_2=create st_2
  51. this.dw_child2=create dw_child2
  52. this.ddlb_1=create ddlb_1
  53. iCurrent=UpperBound(this.Control)
  54. this.Control[iCurrent+1]=this.st_2
  55. this.Control[iCurrent+2]=this.dw_child2
  56. this.Control[iCurrent+3]=this.ddlb_1
  57. end on
  58. on w_mtrl_spt_price.destroy
  59. call super::destroy
  60. destroy(this.st_2)
  61. destroy(this.dw_child2)
  62. destroy(this.ddlb_1)
  63. end on
  64. event ue_usual_query_retr;call super::ue_usual_query_retr;string ls_querystrpart=''
  65. ls_newselect=lower(ori_oldselect)
  66. if trim(sle_usual_query.text)<>'' then
  67. if pos(trim(sle_usual_query.text),'%')=0 then
  68. ls_querystrpart="(u_mtrldef.mtrlcode like '%"+trim(sle_usual_query.text)+"%')"
  69. else
  70. ls_querystrpart="(u_mtrldef.mtrlcode like '"+trim(sle_usual_query.text)+"')"
  71. end if
  72. if pos(lower(ls_newselect),"where") <> 0 then
  73. ls_newselect=ls_newselect+" and ("+ls_querystrpart+')'
  74. else
  75. ls_newselect=ls_newselect+" where ("+ls_querystrpart+')'
  76. end if
  77. end if
  78. wf_retrieveuc(dw_pageretr,ls_newselect,1)
  79. this.triggerevent('retrieve_pageretr')
  80. end event
  81. event retrieve_pageretr;Boolean cb_firstpage_enabled,cb_nextpage_enabled,cb_retrieveall_enabled
  82. Boolean cb_priorpage_enabled,cb_func_enabled,cb_retrieve_enabled
  83. cb_nextpage_enabled = cb_nextpage.Enabled
  84. cb_retrieveall_enabled = cb_retrieveall.Enabled
  85. cb_func_enabled = cb_func.Enabled
  86. cb_nextpage.Enabled = False
  87. cb_retrieveall.Enabled = False
  88. cb_func.Enabled = False
  89. dw_pageretr.ShareDataOff()
  90. dw_pageretr.Retrieve(cur_storageid_arr)
  91. IF dw_pageretr.RowCount() > 0 And dw_pageretr.GetRow() = 0 THEN dw_pageretr.SetRow(1)
  92. dw_pageretr.ShareData(dw_uc)
  93. This.TriggerEvent('retrieve_childdw')
  94. cb_nextpage.Enabled = cb_nextpage_enabled
  95. cb_retrieveall.Enabled = cb_retrieveall_enabled
  96. cb_func.Enabled = cb_func_enabled
  97. end event
  98. event retrieve_childdw;call super::retrieve_childdw;Long row,uc_relid
  99. dw_child.Reset()
  100. row = dw_pageretr.GetRow()
  101. IF row > 0 THEN
  102. uc_relid = dw_pageretr.Object.mtrlid[row]
  103. ins_status=dw_pageretr.Object.v_maxprice_sptprice_status[row]
  104. ins_woodcode=dw_pageretr.Object.v_maxprice_sptprice_woodcode[row]
  105. ins_pcode=dw_pageretr.Object.v_maxprice_sptprice_pcode[row]
  106. ins_unit=dw_pageretr.Object.v_maxprice_sptprice_unit[row]
  107. mtrl_id = uc_relid
  108. dw_child.SetRedraw (FALSE)
  109. if dw_child.Retrieve(uc_relid,ins_status,ins_woodcode,ins_pcode,ins_unit,sys_user_spttype ) > 0 then
  110. dw_child.selectrow(0,false)
  111. dw_child.selectrow(1,true)
  112. end if
  113. dw_child.SetRedraw (TRUE)
  114. ELSE
  115. dw_child.Reset()
  116. dw_child2.Reset()
  117. END IF
  118. end event
  119. event ue_before_open;call super::ue_before_open;dw_child2.settransobject(sqlca)
  120. end event
  121. event resize;ln_bar.EndX = This.Width
  122. ln_bar2.EndX = This.Width
  123. r_bar.Width = This.Width
  124. ln_1.EndX = This.Width
  125. ln_2.EndX = This.Width
  126. dw_pageretr.Height = This.Height - dw_pageretr.y - 140
  127. IF This.WindowState = maximized! THEN
  128. dw_uc.Width = 2048
  129. dw_child.x = dw_uc.x + dw_uc.width + 5
  130. dw_child.y = dw_uc.y
  131. dw_child.height = dw_uc.height
  132. dw_child.width = this.width - dw_child.y - 40
  133. dw_child2.x = dw_uc.x
  134. dw_child2.y = dw_uc.y + dw_uc.height + 5
  135. dw_child2.height = this.height - dw_child2.y - 140
  136. dw_child2.width = this.width - dw_child2.y - 40
  137. ELSE
  138. dw_uc.Width = This.Width - dw_pageretr.Width - 50
  139. dw_child.x = dw_uc.x
  140. dw_child.y = dw_uc.y + dw_uc.height + 5
  141. dw_child.Width = dw_uc.Width / 2 - 5
  142. dw_child.Height = this.height - dw_child.y - 140
  143. dw_child2.X = dw_child.X + dw_child.Width + 10
  144. dw_child2.y = dw_child.y
  145. dw_child2.Width = dw_child.Width
  146. dw_child2.Height = dw_child.Height
  147. END IF
  148. end event
  149. event ue_usual_query_filt;call super::ue_usual_query_filt;string obj_expr=''
  150. if trim(sle_usual_query.text)<>'' then
  151. if pos(trim(sle_usual_query.text),'%')=0 then
  152. obj_expr=obj_expr+'( mtrlcode like "%'+trim(sle_usual_query.text)+'%" )'
  153. else
  154. obj_expr=obj_expr+'( mtrlcode like "'+trim(sle_usual_query.text)+'" )'
  155. end if
  156. end if
  157. dw_pageretr.setfilter(obj_expr)
  158. dw_pageretr.setredraw(false)
  159. dw_pageretr.filter()
  160. if dw_pageretr.rowcount()>=1 then
  161. dw_pageretr.selectrow(0,false)
  162. dw_pageretr.selectrow(1,true)
  163. end if
  164. dw_pageretr.setredraw(true)
  165. end event
  166. type cb_func from w_publ_1ton_share_detail`cb_func within w_mtrl_spt_price
  167. integer x = 165
  168. end type
  169. type cb_exit from w_publ_1ton_share_detail`cb_exit within w_mtrl_spt_price
  170. integer x = 466
  171. end type
  172. type sle_usual_query from w_publ_1ton_share_detail`sle_usual_query within w_mtrl_spt_price
  173. integer x = 215
  174. integer width = 613
  175. end type
  176. type cb_retrieveall from w_publ_1ton_share_detail`cb_retrieveall within w_mtrl_spt_price
  177. integer x = 946
  178. end type
  179. type em_pagerowno from w_publ_1ton_share_detail`em_pagerowno within w_mtrl_spt_price
  180. integer x = 635
  181. integer y = 36
  182. integer width = 320
  183. end type
  184. type dw_pageretr from w_publ_1ton_share_detail`dw_pageretr within w_mtrl_spt_price
  185. integer x = 0
  186. integer y = 296
  187. integer width = 1472
  188. integer height = 1972
  189. string title = "物料摘要内容"
  190. string dataobject = "dw_mtrl_spt_price_index"
  191. end type
  192. event dw_pageretr::rowfocuschanged;if dw_edit_mode then return
  193. if currentrow <= 0 then return
  194. this.selectrow(0,false)
  195. this.selectrow(currentrow,true)
  196. dw_uc.setrow(currentrow)
  197. dw_uc.scrolltorow (currentrow)
  198. if not dw_edit_mode then parent.triggerevent('retrieve_childdw')
  199. end event
  200. type st_1 from w_publ_1ton_share_detail`st_1 within w_mtrl_spt_price
  201. integer x = 27
  202. integer width = 206
  203. string text = "编码含"
  204. end type
  205. type cb_nextpage from w_publ_1ton_share_detail`cb_nextpage within w_mtrl_spt_price
  206. integer x = 1097
  207. end type
  208. type dw_uc from w_publ_1ton_share_detail`dw_uc within w_mtrl_spt_price
  209. integer x = 1472
  210. integer y = 300
  211. integer width = 2048
  212. integer height = 668
  213. string dataobject = "dw_mtrl_spt_price_edit"
  214. end type
  215. event dw_uc::constructor;call super::constructor;f_title_change(this)
  216. end event
  217. type gb_2 from w_publ_1ton_share_detail`gb_2 within w_mtrl_spt_price
  218. end type
  219. type dw_child from w_publ_1ton_share_detail`dw_child within w_mtrl_spt_price
  220. integer x = 1472
  221. integer y = 964
  222. integer width = 1029
  223. integer height = 1288
  224. string title = "供应商物料价格表"
  225. string dataobject = "dw_mtrl_spt_price_mx1"
  226. boolean controlmenu = true
  227. end type
  228. event dw_child::rowfocuschanged;if currentrow>0 then
  229. this.selectrow(0,false)
  230. this.selectrow(currentrow,true)
  231. end if
  232. parent.triggerevent('retrieve_childdw2')
  233. end event
  234. type cb_viewprint from w_publ_1ton_share_detail`cb_viewprint within w_mtrl_spt_price
  235. boolean visible = false
  236. integer x = 1147
  237. integer y = 2740
  238. end type
  239. type cb_print from w_publ_1ton_share_detail`cb_print within w_mtrl_spt_price
  240. boolean visible = false
  241. integer x = 901
  242. integer y = 2740
  243. end type
  244. type cb_add from w_publ_1ton_share_detail`cb_add within w_mtrl_spt_price
  245. boolean visible = false
  246. integer x = 128
  247. integer y = 2584
  248. boolean enabled = false
  249. end type
  250. type cb_edit from w_publ_1ton_share_detail`cb_edit within w_mtrl_spt_price
  251. boolean visible = false
  252. integer x = 654
  253. integer y = 2492
  254. end type
  255. type cb_delet from w_publ_1ton_share_detail`cb_delet within w_mtrl_spt_price
  256. boolean visible = false
  257. integer x = 320
  258. integer y = 2360
  259. boolean enabled = false
  260. end type
  261. type cb_addzy from w_publ_1ton_share_detail`cb_addzy within w_mtrl_spt_price
  262. boolean visible = false
  263. end type
  264. type cb_auditing from w_publ_1ton_share_detail`cb_auditing within w_mtrl_spt_price
  265. boolean visible = false
  266. integer x = 229
  267. integer y = 2812
  268. integer width = 238
  269. end type
  270. type cb_xm from w_publ_1ton_share_detail`cb_xm within w_mtrl_spt_price
  271. boolean visible = false
  272. integer x = 686
  273. integer y = 2724
  274. end type
  275. type cb_retrieve from w_publ_1ton_share_detail`cb_retrieve within w_mtrl_spt_price
  276. integer width = 165
  277. end type
  278. type cb_xls from w_publ_1ton_share_detail`cb_xls within w_mtrl_spt_price
  279. boolean visible = false
  280. end type
  281. type cb_help from w_publ_1ton_share_detail`cb_help within w_mtrl_spt_price
  282. integer x = 315
  283. end type
  284. type cb_auditing_cancel from w_publ_1ton_share_detail`cb_auditing_cancel within w_mtrl_spt_price
  285. boolean visible = false
  286. integer x = 1102
  287. integer y = 128
  288. end type
  289. type p_msg from w_publ_1ton_share_detail`p_msg within w_mtrl_spt_price
  290. end type
  291. type p_help from w_publ_1ton_share_detail`p_help within w_mtrl_spt_price
  292. end type
  293. type p_encl from w_publ_1ton_share_detail`p_encl within w_mtrl_spt_price
  294. end type
  295. type p_other from w_publ_1ton_share_detail`p_other within w_mtrl_spt_price
  296. end type
  297. type gb_3 from w_publ_1ton_share_detail`gb_3 within w_mtrl_spt_price
  298. end type
  299. type ln_bar from w_publ_1ton_share_detail`ln_bar within w_mtrl_spt_price
  300. end type
  301. type ln_bar2 from w_publ_1ton_share_detail`ln_bar2 within w_mtrl_spt_price
  302. end type
  303. type r_bar from w_publ_1ton_share_detail`r_bar within w_mtrl_spt_price
  304. end type
  305. type ln_1 from w_publ_1ton_share_detail`ln_1 within w_mtrl_spt_price
  306. integer endx = 3227
  307. end type
  308. type ln_2 from w_publ_1ton_share_detail`ln_2 within w_mtrl_spt_price
  309. integer endx = 3227
  310. end type
  311. type st_2 from statictext within w_mtrl_spt_price
  312. integer x = 933
  313. integer y = 212
  314. integer width = 187
  315. integer height = 48
  316. integer textsize = -9
  317. integer weight = 400
  318. fontcharset fontcharset = gb2312charset!
  319. fontpitch fontpitch = variable!
  320. string facename = "宋体"
  321. long textcolor = 33554432
  322. long backcolor = 134217739
  323. string text = "仓 库"
  324. boolean focusrectangle = false
  325. end type
  326. type dw_child2 from u_dw_rbtnfilter within w_mtrl_spt_price
  327. integer x = 2510
  328. integer y = 964
  329. integer height = 1288
  330. integer taborder = 20
  331. boolean bringtotop = true
  332. boolean titlebar = true
  333. string title = "物料供应商历史采购价格表[粉红色- 手动添加]"
  334. string dataobject = "dw_mtrl_spt_price_mx2"
  335. boolean controlmenu = true
  336. boolean maxbox = true
  337. boolean hscrollbar = true
  338. boolean vscrollbar = true
  339. boolean resizable = true
  340. boolean rbutton_filter_use = true
  341. boolean titleclick_sort_use = true
  342. end type
  343. event rowfocuschanged;call super::rowfocuschanged;this.selectrow(0,false)
  344. this.selectrow(currentrow,true)
  345. end event
  346. type ddlb_1 from uo_ddlb_storageid within w_mtrl_spt_price
  347. integer x = 1143
  348. integer y = 192
  349. integer width = 681
  350. integer height = 1108
  351. integer taborder = 150
  352. boolean bringtotop = true
  353. end type
  354. event constructor;call super::constructor;cur_storageid_arr = this.uo_storageid_arr
  355. end event
  356. event selectionchanged;call super::selectionchanged;cur_storageid_arr = this.uo_storageid_arr
  357. parent.triggerevent('retrieve_pageretr')
  358. end event