w_mtrldef_edit_limitprice.srw 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387
  1. $PBExportHeader$w_mtrldef_edit_limitprice.srw
  2. forward
  3. global type w_mtrldef_edit_limitprice from w_publ_easyq
  4. end type
  5. type cb_save from uo_imflatbutton within w_mtrldef_edit_limitprice
  6. end type
  7. type cbx_1 from checkbox within w_mtrldef_edit_limitprice
  8. end type
  9. type cb_pcl from uo_imflatbutton within w_mtrldef_edit_limitprice
  10. end type
  11. type cb_mod from uo_imflatbutton within w_mtrldef_edit_limitprice
  12. end type
  13. type tv_1 from uo_tv_mtrltype within w_mtrldef_edit_limitprice
  14. end type
  15. end forward
  16. global type w_mtrldef_edit_limitprice from w_publ_easyq
  17. string title = "物料收货限价批设定"
  18. cb_save cb_save
  19. cbx_1 cbx_1
  20. cb_pcl cb_pcl
  21. cb_mod cb_mod
  22. tv_1 tv_1
  23. end type
  24. global w_mtrldef_edit_limitprice w_mtrldef_edit_limitprice
  25. type variables
  26. string ls_handtype=''
  27. string ls_mtrltype = ''
  28. integer li_isuse=1
  29. long cur_mtrlorigin=-1
  30. end variables
  31. forward prototypes
  32. public subroutine wf_face ()
  33. end prototypes
  34. public subroutine wf_face ();if dw_edit_mode then
  35. cb_save.enabled = true
  36. cb_pcl.enabled = true
  37. dw_1.settaborder('iflimitprice',10)
  38. cb_mod.text = "放弃"
  39. cb_mod.normalpicname = "Undo.bmp"
  40. else
  41. cb_save.enabled = false
  42. cb_pcl.enabled = false
  43. dw_1.settaborder('iflimitprice',0)
  44. cb_mod.text = "修改"
  45. cb_mod.normalpicname = "OPEN.bmp"
  46. end if
  47. cb_mod.triggerevent('ue_textchange')
  48. end subroutine
  49. on w_mtrldef_edit_limitprice.create
  50. int iCurrent
  51. call super::create
  52. this.cb_save=create cb_save
  53. this.cbx_1=create cbx_1
  54. this.cb_pcl=create cb_pcl
  55. this.cb_mod=create cb_mod
  56. this.tv_1=create tv_1
  57. iCurrent=UpperBound(this.Control)
  58. this.Control[iCurrent+1]=this.cb_save
  59. this.Control[iCurrent+2]=this.cbx_1
  60. this.Control[iCurrent+3]=this.cb_pcl
  61. this.Control[iCurrent+4]=this.cb_mod
  62. this.Control[iCurrent+5]=this.tv_1
  63. end on
  64. on w_mtrldef_edit_limitprice.destroy
  65. call super::destroy
  66. destroy(this.cb_save)
  67. destroy(this.cbx_1)
  68. destroy(this.cb_pcl)
  69. destroy(this.cb_mod)
  70. destroy(this.tv_1)
  71. end on
  72. event resize;call super::resize;tv_1.height = dw_1.height
  73. end event
  74. event open;call super::open;if_ue_retr=true
  75. if_ue_filter=true
  76. if_ue_sort=true
  77. if_ue_sentdataout=true
  78. tv_1.f_maketree(-1)
  79. cb_1.triggerevent(clicked!)
  80. wf_face()
  81. end event
  82. type cb_func from w_publ_easyq`cb_func within w_mtrldef_edit_limitprice
  83. end type
  84. type cb_exit from w_publ_easyq`cb_exit within w_mtrldef_edit_limitprice
  85. integer x = 1353
  86. end type
  87. type cb_2 from w_publ_easyq`cb_2 within w_mtrldef_edit_limitprice
  88. integer x = 1051
  89. integer taborder = 100
  90. boolean bringtotop = true
  91. end type
  92. type cb_psetup from w_publ_easyq`cb_psetup within w_mtrldef_edit_limitprice
  93. integer x = 795
  94. boolean bringtotop = true
  95. end type
  96. type cb_1 from w_publ_easyq`cb_1 within w_mtrldef_edit_limitprice
  97. boolean bringtotop = true
  98. end type
  99. event cb_1::clicked;call super::clicked;
  100. dw_1.Retrieve(cur_mtrlorigin,li_isuse,ls_handtype)
  101. RETURN
  102. end event
  103. type st_3 from w_publ_easyq`st_3 within w_mtrldef_edit_limitprice
  104. boolean visible = false
  105. integer x = 823
  106. integer y = 368
  107. end type
  108. type st_4 from w_publ_easyq`st_4 within w_mtrldef_edit_limitprice
  109. boolean visible = false
  110. integer x = 1170
  111. integer y = 508
  112. end type
  113. type em_1 from w_publ_easyq`em_1 within w_mtrldef_edit_limitprice
  114. boolean visible = false
  115. integer x = 736
  116. integer y = 436
  117. integer taborder = 110
  118. end type
  119. type em_2 from w_publ_easyq`em_2 within w_mtrldef_edit_limitprice
  120. boolean visible = false
  121. integer x = 1253
  122. integer y = 428
  123. integer taborder = 140
  124. end type
  125. type ddlb_yl from w_publ_easyq`ddlb_yl within w_mtrldef_edit_limitprice
  126. integer x = 1893
  127. end type
  128. type cbx_yl from w_publ_easyq`cbx_yl within w_mtrldef_edit_limitprice
  129. integer x = 1682
  130. end type
  131. type dw_1 from w_publ_easyq`dw_1 within w_mtrldef_edit_limitprice
  132. integer x = 805
  133. integer y = 308
  134. integer width = 2469
  135. integer height = 1932
  136. string dataobject = "dw_mtrldef_edit_limitprice"
  137. end type
  138. event dw_1::rowfocuschanged;IF currentrow <=0 THEN RETURN
  139. this.selectrow(0,false)
  140. this.selectrow(currentrow,true)
  141. end event
  142. event dw_1::clicked;call super::clicked;IF row <=0 THEN RETURN
  143. this.selectrow(0,false)
  144. this.selectrow(row,true)
  145. end event
  146. type sle_mtrl from w_publ_easyq`sle_mtrl within w_mtrldef_edit_limitprice
  147. end type
  148. type sle_cust from w_publ_easyq`sle_cust within w_mtrldef_edit_limitprice
  149. end type
  150. type st_mtrl from w_publ_easyq`st_mtrl within w_mtrldef_edit_limitprice
  151. end type
  152. type st_cust from w_publ_easyq`st_cust within w_mtrldef_edit_limitprice
  153. end type
  154. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_mtrldef_edit_limitprice
  155. end type
  156. type pb_em1 from w_publ_easyq`pb_em1 within w_mtrldef_edit_limitprice
  157. boolean visible = false
  158. end type
  159. type pb_em2 from w_publ_easyq`pb_em2 within w_mtrldef_edit_limitprice
  160. boolean visible = false
  161. end type
  162. type pb_2 from w_publ_easyq`pb_2 within w_mtrldef_edit_limitprice
  163. boolean visible = false
  164. end type
  165. type cb_help from w_publ_easyq`cb_help within w_mtrldef_edit_limitprice
  166. integer x = 1202
  167. end type
  168. type cb_copyself from w_publ_easyq`cb_copyself within w_mtrldef_edit_limitprice
  169. end type
  170. type gb_1 from w_publ_easyq`gb_1 within w_mtrldef_edit_limitprice
  171. end type
  172. type ln_bar from w_publ_easyq`ln_bar within w_mtrldef_edit_limitprice
  173. end type
  174. type ln_bar2 from w_publ_easyq`ln_bar2 within w_mtrldef_edit_limitprice
  175. end type
  176. type r_bar from w_publ_easyq`r_bar within w_mtrldef_edit_limitprice
  177. end type
  178. type ln_1 from w_publ_easyq`ln_1 within w_mtrldef_edit_limitprice
  179. end type
  180. type ln_2 from w_publ_easyq`ln_2 within w_mtrldef_edit_limitprice
  181. end type
  182. type ln_3 from w_publ_easyq`ln_3 within w_mtrldef_edit_limitprice
  183. integer beginy = 292
  184. integer endy = 292
  185. end type
  186. type ln_4 from w_publ_easyq`ln_4 within w_mtrldef_edit_limitprice
  187. end type
  188. type cb_save from uo_imflatbutton within w_mtrldef_edit_limitprice
  189. integer x = 302
  190. integer width = 151
  191. integer height = 164
  192. integer taborder = 20
  193. boolean bringtotop = true
  194. string text = "保存"
  195. string normalpicname = "save.bmp"
  196. integer picsize = 16
  197. toolbaralignment pic_align = alignattop!
  198. boolean border = false
  199. end type
  200. event clicked;call super::clicked;if not f_power_ind(842) then
  201. messagebox('提示',"你没有使用权限!", Information!, OK! )
  202. return
  203. end if
  204. dw_1.accepttext( )
  205. IF dw_edit_mode THEN
  206. IF dw_1.UPDATE() <> 1 THEN
  207. ROLLBACK USING sqlca;
  208. MessageBox("提示","保存失败", Information!, OK! )
  209. RETURN
  210. ELSE
  211. COMMIT USING sqlca;
  212. MessageBox('提示',"保存成功", Information!, OK! )
  213. END IF
  214. END IF
  215. dw_edit_mode = not dw_edit_mode
  216. wf_face()
  217. cb_1.triggerevent(clicked!)
  218. end event
  219. type cbx_1 from checkbox within w_mtrldef_edit_limitprice
  220. integer x = 9
  221. integer y = 212
  222. integer width = 384
  223. integer height = 56
  224. boolean bringtotop = true
  225. integer textsize = -9
  226. integer weight = 400
  227. fontcharset fontcharset = gb2312charset!
  228. fontpitch fontpitch = variable!
  229. string facename = "宋体"
  230. long textcolor = 33554432
  231. long backcolor = 134217739
  232. string text = "只显示有效"
  233. boolean checked = true
  234. end type
  235. event clicked;IF cbx_1.Checked THEN
  236. li_isuse = 1
  237. ELSE
  238. li_isuse = -1
  239. END IF
  240. cb_1.triggerevent(clicked!)
  241. end event
  242. type cb_pcl from uo_imflatbutton within w_mtrldef_edit_limitprice
  243. integer x = 603
  244. integer width = 192
  245. integer height = 164
  246. integer taborder = 30
  247. boolean bringtotop = true
  248. string text = "批处理"
  249. string normalpicname = "update.bmp"
  250. integer picsize = 16
  251. toolbaralignment pic_align = alignattop!
  252. boolean border = false
  253. end type
  254. event clicked;call super::clicked;Long i,ll_limitprice
  255. Long uc_row
  256. uc_row = dw_1.GetRow()
  257. IF uc_row <= 0 THEN RETURN
  258. IF MessageBox('提示','确定要批修改物料收货限价吗?',question!,yesno!,2) = 2 THEN RETURN
  259. dw_1.AcceptText( )
  260. ll_limitprice = dw_1.Object.iflimitprice[1]
  261. FOR i = 1 To dw_1.RowCount()
  262. dw_1.Object.iflimitprice[i] = ll_limitprice
  263. NEXT
  264. end event
  265. type cb_mod from uo_imflatbutton within w_mtrldef_edit_limitprice
  266. integer x = 453
  267. integer width = 151
  268. integer height = 164
  269. integer taborder = 30
  270. boolean bringtotop = true
  271. string text = "修改"
  272. string normalpicname = "open.bmp"
  273. integer picsize = 16
  274. toolbaralignment pic_align = alignattop!
  275. boolean border = false
  276. end type
  277. event clicked;call super::clicked;IF NOT f_power_ind(842) THEN
  278. MessageBox('提示','你没有使用权限!', Information!, OK! )
  279. RETURN
  280. END IF
  281. if dw_edit_mode then
  282. if messagebox('提示',"是否要确定放弃保存资料",exclamation!,yesno!,2) = 2 then
  283. return
  284. end if
  285. end if
  286. dw_edit_mode = NOT dw_edit_mode
  287. if not dw_edit_mode then
  288. cb_1.triggerevent(clicked!)
  289. end if
  290. wf_face()
  291. end event
  292. type tv_1 from uo_tv_mtrltype within w_mtrldef_edit_limitprice
  293. integer y = 300
  294. integer width = 800
  295. integer height = 1932
  296. integer taborder = 90
  297. boolean bringtotop = true
  298. integer textsize = -9
  299. fontcharset fontcharset = gb2312charset!
  300. fontfamily fontfamily = anyfont!
  301. string facename = "宋体"
  302. end type
  303. event selectionchanged;call super::selectionchanged;ls_handtype = THIS.uo_cur_info.handtype
  304. ls_handtype = ls_handtype + "%"
  305. cb_1.triggerevent(clicked!)
  306. end event