w_addzero_mtrlware.srw 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. $PBExportHeader$w_addzero_mtrlware.srw
  2. forward
  3. global type w_addzero_mtrlware from w_publ_base
  4. end type
  5. type dw_1 from datawindow within w_addzero_mtrlware
  6. end type
  7. type cb_2 from uo_imflatbutton within w_addzero_mtrlware
  8. end type
  9. type dw_2 from datawindow within w_addzero_mtrlware
  10. end type
  11. type gb_1 from groupbox within w_addzero_mtrlware
  12. end type
  13. end forward
  14. global type w_addzero_mtrlware from w_publ_base
  15. integer width = 2418
  16. integer height = 1460
  17. string title = "仓库选择"
  18. boolean minbox = false
  19. windowtype windowtype = response!
  20. dw_1 dw_1
  21. cb_2 cb_2
  22. dw_2 dw_2
  23. gb_1 gb_1
  24. end type
  25. global w_addzero_mtrlware w_addzero_mtrlware
  26. type variables
  27. long rst_storageid
  28. long cur_mtrlid
  29. end variables
  30. on w_addzero_mtrlware.create
  31. int iCurrent
  32. call super::create
  33. this.dw_1=create dw_1
  34. this.cb_2=create cb_2
  35. this.dw_2=create dw_2
  36. this.gb_1=create gb_1
  37. iCurrent=UpperBound(this.Control)
  38. this.Control[iCurrent+1]=this.dw_1
  39. this.Control[iCurrent+2]=this.cb_2
  40. this.Control[iCurrent+3]=this.dw_2
  41. this.Control[iCurrent+4]=this.gb_1
  42. end on
  43. on w_addzero_mtrlware.destroy
  44. call super::destroy
  45. destroy(this.dw_1)
  46. destroy(this.cb_2)
  47. destroy(this.dw_2)
  48. destroy(this.gb_1)
  49. end on
  50. event close;//closewithreturn(this,rst_storageid)
  51. end event
  52. event open;call super::open;dw_1.settransobject(sqlca)
  53. dw_1.retrieve()
  54. cur_mtrlid=message.DoubleParm
  55. dw_2.settransobject(sqlca)
  56. dw_2.retrieve(cur_mtrlid)
  57. end event
  58. type cb_func from w_publ_base`cb_func within w_addzero_mtrlware
  59. end type
  60. type cb_exit from w_publ_base`cb_exit within w_addzero_mtrlware
  61. integer x = 1170
  62. integer y = 1268
  63. integer width = 265
  64. string text = "取消"
  65. end type
  66. event cb_exit::clicked;rst_storageid=0
  67. close(parent)
  68. end event
  69. type dw_1 from datawindow within w_addzero_mtrlware
  70. integer width = 878
  71. integer height = 1364
  72. integer taborder = 20
  73. boolean bringtotop = true
  74. string dataobject = "dw_addzero_mtrlware"
  75. boolean vscrollbar = true
  76. boolean livescroll = true
  77. borderstyle borderstyle = stylelowered!
  78. end type
  79. event rowfocuschanged;if currentrow<=0 then return
  80. this.selectrow(0,false)
  81. this.selectrow(currentrow,true)
  82. end event
  83. type cb_2 from uo_imflatbutton within w_addzero_mtrlware
  84. integer x = 914
  85. integer y = 1268
  86. integer width = 265
  87. integer height = 96
  88. integer taborder = 20
  89. boolean bringtotop = true
  90. end type
  91. event clicked;call super::clicked;dw_2.accepttext()
  92. if dw_1.getrow()<=0 then
  93. messagebox("提示",'请选择仓库', Information!, OK! )
  94. return
  95. end if
  96. if dw_2.getrow()<=0 then
  97. messagebox("提示",'请选择物料', Information!, OK! )
  98. return
  99. end if
  100. rst_storageid=dw_1.object.storageid[dw_1.getrow()]
  101. string ls_woodcode=''
  102. string ls_plancode=''
  103. string ls_pcode=''
  104. string ls_status=''
  105. string ls_mtrlcode=''
  106. string arg_msg=''
  107. long ls_mtrlwareid,ls_sptid
  108. ls_woodcode=trim(dw_2.object.woodcode[dw_2.getrow()])
  109. ls_plancode=trim(dw_2.object.plancode[dw_2.getrow()])
  110. ls_pcode=trim(dw_2.object.pcode[dw_2.getrow()])
  111. ls_status=trim(dw_2.object.status[dw_2.getrow()])
  112. ls_mtrlcode=trim(dw_2.object.mtrlcode[dw_2.getrow()])
  113. ls_sptid=dw_2.object.sptid[dw_2.getrow()]
  114. if f_insert_0_mtrlware(ls_mtrlwareid,cur_mtrlid,ls_mtrlcode,rst_storageid,ls_sptid,ls_status,ls_woodcode,ls_pcode,ls_plancode,0,arg_msg) = 0 then
  115. messagebox('提示',arg_msg, Information!, OK! )
  116. else
  117. messagebox('提示','物料:'+ls_mtrlcode+'加0库存成功', Information!, OK! )
  118. end if
  119. close(parent)
  120. end event
  121. type dw_2 from datawindow within w_addzero_mtrlware
  122. integer x = 951
  123. integer y = 64
  124. integer width = 1426
  125. integer height = 1120
  126. integer taborder = 30
  127. boolean bringtotop = true
  128. string title = "none"
  129. string dataobject = "dw_addzero_mtrldef"
  130. boolean livescroll = true
  131. borderstyle borderstyle = stylelowered!
  132. end type
  133. event constructor;f_title_change(this)
  134. end event
  135. type gb_1 from groupbox within w_addzero_mtrlware
  136. integer x = 914
  137. integer width = 1499
  138. integer height = 1252
  139. integer taborder = 60
  140. integer textsize = -9
  141. integer weight = 400
  142. fontcharset fontcharset = gb2312charset!
  143. fontpitch fontpitch = variable!
  144. string facename = "宋体"
  145. long textcolor = 33554432
  146. long backcolor = 134217739
  147. string text = "相关信息"
  148. end type