w_saletaskmx_mod_stopqty.srw 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. $PBExportHeader$w_saletaskmx_mod_stopqty.srw
  2. forward
  3. global type w_saletaskmx_mod_stopqty from w_publ_base
  4. end type
  5. type cb_ok from uo_imflatbutton within w_saletaskmx_mod_stopqty
  6. end type
  7. type dw_1 from datawindow within w_saletaskmx_mod_stopqty
  8. end type
  9. end forward
  10. global type w_saletaskmx_mod_stopqty from w_publ_base
  11. integer width = 3616
  12. integer height = 1628
  13. string title = "销售订单明细终止"
  14. boolean minbox = false
  15. windowtype windowtype = response!
  16. cb_ok cb_ok
  17. dw_1 dw_1
  18. end type
  19. global w_saletaskmx_mod_stopqty w_saletaskmx_mod_stopqty
  20. type variables
  21. s_edit_index_tran s_tran
  22. long ins_scid,ins_inwareid
  23. string ins_inwarecode
  24. end variables
  25. on w_saletaskmx_mod_stopqty.create
  26. int iCurrent
  27. call super::create
  28. this.cb_ok=create cb_ok
  29. this.dw_1=create dw_1
  30. iCurrent=UpperBound(this.Control)
  31. this.Control[iCurrent+1]=this.cb_ok
  32. this.Control[iCurrent+2]=this.dw_1
  33. end on
  34. on w_saletaskmx_mod_stopqty.destroy
  35. call super::destroy
  36. destroy(this.cb_ok)
  37. destroy(this.dw_1)
  38. end on
  39. event open;call super::open;dw_1.settransobject(sqlca)
  40. s_tran=Message.PowerObjectParm
  41. ins_scid = s_tran.b_long
  42. ins_inwareid = s_tran.c_long
  43. ins_inwarecode = s_tran.c_string
  44. dw_1.retrieve( ins_scid,ins_inwareid)
  45. dw_1.setfocus()
  46. end event
  47. type cb_func from w_publ_base`cb_func within w_saletaskmx_mod_stopqty
  48. boolean visible = false
  49. end type
  50. type cb_exit from w_publ_base`cb_exit within w_saletaskmx_mod_stopqty
  51. integer x = 2025
  52. integer y = 1404
  53. integer picsize = 16
  54. end type
  55. type cb_ok from uo_imflatbutton within w_saletaskmx_mod_stopqty
  56. integer x = 1458
  57. integer y = 1404
  58. integer width = 311
  59. integer height = 96
  60. integer taborder = 20
  61. boolean bringtotop = true
  62. string normalpicname = "ok.bmp"
  63. integer picsize = 16
  64. end type
  65. event clicked;call super::clicked;
  66. Long rslt = 1
  67. Long i
  68. long ll_printid
  69. Decimal ld_uprice,ld_jgprice, lde_rebate, lde_tax
  70. String arg_msg
  71. dw_1.AcceptText()
  72. uo_inware uo_ware
  73. uo_ware = create uo_inware
  74. uo_ware.commit_transaction = sqlca
  75. i = dw_1.GetNextModified(0 , Primary!)
  76. IF i = 0 THEN
  77. arg_msg = "单价没有修改"
  78. rslt = 0
  79. GOTO ext
  80. END IF
  81. DO WHILE i > 0
  82. ll_printid = dw_1.Object.u_inwaremx_printid[i]
  83. ld_uprice = dw_1.Object.u_inwaremx_uprice[i]
  84. ld_jgprice = 0
  85. lde_rebate = dw_1.Object.u_inwaremx_rebate[i]
  86. lde_tax = dw_1.Object.u_inwaremx_tax[i]
  87. IF uo_ware.mod_price(ins_scid,ins_inwareid,ll_printid,ld_uprice,ld_jgprice,lde_rebate, lde_tax,arg_msg,false) = 0 THEN
  88. arg_msg = "行:"+string(i)+","+arg_msg
  89. rslt = 0
  90. GOTO ext
  91. END IF
  92. i = dw_1.GetNextModified(i, Primary!)
  93. LOOP
  94. ext:
  95. destroy uo_ware
  96. IF rslt = 0 THEN
  97. ROLLBACK;
  98. MessageBox('错误',arg_msg, StopSign!, OK! )
  99. RETURN
  100. ELSE
  101. COMMIT;
  102. MessageBox('提示','修改单价成功!', Information!, OK! )
  103. Close(Parent)
  104. END IF
  105. end event
  106. type dw_1 from datawindow within w_saletaskmx_mod_stopqty
  107. integer width = 3584
  108. integer height = 1348
  109. integer taborder = 30
  110. boolean bringtotop = true
  111. string title = "none"
  112. string dataobject = "dw_saletaskmx_mod_stopqty"
  113. boolean hscrollbar = true
  114. boolean vscrollbar = true
  115. boolean hsplitscroll = true
  116. boolean livescroll = true
  117. borderstyle borderstyle = stylelowered!
  118. end type
  119. event constructor;f_title_change(this)
  120. end event