w_warebalc_cmpl.srw 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. $PBExportHeader$w_warebalc_cmpl.srw
  2. forward
  3. global type w_warebalc_cmpl from w_publ_base
  4. end type
  5. type cb_ok from uo_imflatbutton within w_warebalc_cmpl
  6. end type
  7. type dw_1 from datawindow within w_warebalc_cmpl
  8. end type
  9. type dw_2 from datawindow within w_warebalc_cmpl
  10. end type
  11. type ln_bar from line within w_warebalc_cmpl
  12. end type
  13. type ln_bar2 from line within w_warebalc_cmpl
  14. end type
  15. type r_bar from rectangle within w_warebalc_cmpl
  16. end type
  17. end forward
  18. global type w_warebalc_cmpl from w_publ_base
  19. integer width = 3616
  20. integer height = 2380
  21. string title = "结存重算"
  22. boolean minbox = false
  23. windowtype windowtype = response!
  24. cb_ok cb_ok
  25. dw_1 dw_1
  26. dw_2 dw_2
  27. ln_bar ln_bar
  28. ln_bar2 ln_bar2
  29. r_bar r_bar
  30. end type
  31. global w_warebalc_cmpl w_warebalc_cmpl
  32. type variables
  33. s_edit_index_tran s_tran
  34. long ins_scid,ins_inwareid
  35. string ins_inwarecode
  36. end variables
  37. on w_warebalc_cmpl.create
  38. int iCurrent
  39. call super::create
  40. this.cb_ok=create cb_ok
  41. this.dw_1=create dw_1
  42. this.dw_2=create dw_2
  43. this.ln_bar=create ln_bar
  44. this.ln_bar2=create ln_bar2
  45. this.r_bar=create r_bar
  46. iCurrent=UpperBound(this.Control)
  47. this.Control[iCurrent+1]=this.cb_ok
  48. this.Control[iCurrent+2]=this.dw_1
  49. this.Control[iCurrent+3]=this.dw_2
  50. this.Control[iCurrent+4]=this.ln_bar
  51. this.Control[iCurrent+5]=this.ln_bar2
  52. this.Control[iCurrent+6]=this.r_bar
  53. end on
  54. on w_warebalc_cmpl.destroy
  55. call super::destroy
  56. destroy(this.cb_ok)
  57. destroy(this.dw_1)
  58. destroy(this.dw_2)
  59. destroy(this.ln_bar)
  60. destroy(this.ln_bar2)
  61. destroy(this.r_bar)
  62. end on
  63. event open;call super::open;dw_1.settransobject(sqlca)
  64. s_tran=Message.PowerObjectParm
  65. ins_scid = s_tran.b_long
  66. ins_inwareid = s_tran.c_long
  67. ins_inwarecode = s_tran.c_string
  68. dw_1.retrieve( ins_scid,ins_inwareid)
  69. dw_1.setfocus()
  70. end event
  71. event resize;call super::resize;ln_bar.EndX = THIS.Width
  72. ln_bar2.EndX = THIS.Width
  73. r_bar.Width = THIS.Width
  74. //ln_1.EndX = THIS.Width
  75. //ln_2.EndX = THIS.Width
  76. //ln_3.EndX = THIS.Width
  77. //ln_4.EndX = THIS.Width
  78. end event
  79. type cb_func from w_publ_base`cb_func within w_warebalc_cmpl
  80. boolean visible = false
  81. end type
  82. type cb_exit from w_publ_base`cb_exit within w_warebalc_cmpl
  83. integer x = 567
  84. integer width = 165
  85. integer height = 164
  86. integer picsize = 16
  87. toolbaralignment pic_align = alignattop!
  88. boolean border = false
  89. end type
  90. type cb_ok from uo_imflatbutton within w_warebalc_cmpl
  91. integer width = 165
  92. integer height = 164
  93. integer taborder = 20
  94. boolean bringtotop = true
  95. string normalpicname = "ok.bmp"
  96. integer picsize = 16
  97. toolbaralignment pic_align = alignattop!
  98. boolean border = false
  99. end type
  100. event clicked;call super::clicked;
  101. Long rslt = 1
  102. Long i
  103. long ll_printid
  104. Decimal ld_uprice,ld_jgprice, lde_rebate, lde_tax
  105. String arg_msg
  106. dw_1.AcceptText()
  107. uo_inware uo_ware
  108. uo_ware = create uo_inware
  109. uo_ware.commit_transaction = sqlca
  110. i = dw_1.GetNextModified(0 , Primary!)
  111. IF i = 0 THEN
  112. arg_msg = "单价没有修改"
  113. rslt = 0
  114. GOTO ext
  115. END IF
  116. DO WHILE i > 0
  117. ll_printid = dw_1.Object.u_inwaremx_printid[i]
  118. ld_uprice = dw_1.Object.u_inwaremx_uprice[i]
  119. ld_jgprice = 0
  120. lde_rebate = dw_1.Object.u_inwaremx_rebate[i]
  121. lde_tax = dw_1.Object.u_inwaremx_tax[i]
  122. IF uo_ware.mod_price(ins_scid,ins_inwareid,ll_printid,ld_uprice,ld_jgprice,lde_rebate, lde_tax,arg_msg,false) = 0 THEN
  123. arg_msg = "行:"+string(i)+","+arg_msg
  124. rslt = 0
  125. GOTO ext
  126. END IF
  127. i = dw_1.GetNextModified(i, Primary!)
  128. LOOP
  129. ext:
  130. destroy uo_ware
  131. IF rslt = 0 THEN
  132. ROLLBACK;
  133. MessageBox('错误',arg_msg, StopSign!, OK! )
  134. RETURN
  135. ELSE
  136. COMMIT;
  137. MessageBox('提示','修改单价成功!', Information!, OK! )
  138. Close(Parent)
  139. END IF
  140. end event
  141. type dw_1 from datawindow within w_warebalc_cmpl
  142. integer y = 188
  143. integer width = 3584
  144. integer height = 488
  145. integer taborder = 30
  146. boolean bringtotop = true
  147. string title = "none"
  148. string dataobject = "dw_inwaremx_buy_mod_price_p"
  149. boolean hscrollbar = true
  150. boolean vscrollbar = true
  151. boolean hsplitscroll = true
  152. boolean livescroll = true
  153. borderstyle borderstyle = stylelowered!
  154. end type
  155. event constructor;f_title_change(this)
  156. end event
  157. type dw_2 from datawindow within w_warebalc_cmpl
  158. integer y = 684
  159. integer width = 3584
  160. integer height = 1596
  161. integer taborder = 10
  162. boolean bringtotop = true
  163. string title = "none"
  164. string dataobject = "dw_inwaremx_buy_mod_price_p"
  165. boolean hscrollbar = true
  166. boolean vscrollbar = true
  167. boolean hsplitscroll = true
  168. boolean livescroll = true
  169. borderstyle borderstyle = stylelowered!
  170. end type
  171. event constructor;f_title_change(this)
  172. end event
  173. type ln_bar from line within w_warebalc_cmpl
  174. long linecolor = 268435456
  175. integer linethickness = 4
  176. integer beginy = 176
  177. integer endx = 3323
  178. integer endy = 176
  179. end type
  180. type ln_bar2 from line within w_warebalc_cmpl
  181. long linecolor = 16777215
  182. integer linethickness = 4
  183. integer beginy = 180
  184. integer endx = 3323
  185. integer endy = 180
  186. end type
  187. type r_bar from rectangle within w_warebalc_cmpl
  188. long linecolor = 16777215
  189. long fillcolor = 1073741824
  190. integer x = 2473
  191. integer width = 73
  192. integer height = 172
  193. end type
  194. event constructor;this.fillcolor = 14215660
  195. this.linecolor = 14215660
  196. this.x = -1
  197. this.y = -1
  198. this.height = ln_bar2.beginy - 5
  199. end event