w_saletaskmx_stopqty_edit.srw 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. $PBExportHeader$w_saletaskmx_stopqty_edit.srw
  2. forward
  3. global type w_saletaskmx_stopqty_edit from w_publ_base
  4. end type
  5. type dw_1 from datawindow within w_saletaskmx_stopqty_edit
  6. end type
  7. type cb_1 from uo_imflatbutton within w_saletaskmx_stopqty_edit
  8. end type
  9. end forward
  10. global type w_saletaskmx_stopqty_edit from w_publ_base
  11. integer width = 2016
  12. integer height = 1164
  13. string title = "销售订单明细终止"
  14. boolean minbox = false
  15. windowtype windowtype = response!
  16. dw_1 dw_1
  17. cb_1 cb_1
  18. end type
  19. global w_saletaskmx_stopqty_edit w_saletaskmx_stopqty_edit
  20. type variables
  21. long ins_scid,ins_taskid,ins_printid
  22. s_edit_index_tran s_inscust
  23. end variables
  24. on w_saletaskmx_stopqty_edit.create
  25. int iCurrent
  26. call super::create
  27. this.dw_1=create dw_1
  28. this.cb_1=create cb_1
  29. iCurrent=UpperBound(this.Control)
  30. this.Control[iCurrent+1]=this.dw_1
  31. this.Control[iCurrent+2]=this.cb_1
  32. end on
  33. on w_saletaskmx_stopqty_edit.destroy
  34. call super::destroy
  35. destroy(this.dw_1)
  36. destroy(this.cb_1)
  37. end on
  38. event open;call super::open;dw_1.SetTransObject(sqlca)
  39. s_inscust = Message.PowerObjectParm
  40. ins_scid = s_inscust.b_long
  41. ins_taskid = s_inscust.c_long
  42. ins_printid = s_inscust.d_long
  43. dw_1.retrieve(ins_scid,ins_taskid,ins_printid)
  44. end event
  45. type cb_func from w_publ_base`cb_func within w_saletaskmx_stopqty_edit
  46. boolean visible = false
  47. end type
  48. type cb_exit from w_publ_base`cb_exit within w_saletaskmx_stopqty_edit
  49. integer x = 1093
  50. integer y = 952
  51. integer width = 302
  52. integer height = 100
  53. integer taborder = 40
  54. end type
  55. type dw_1 from datawindow within w_saletaskmx_stopqty_edit
  56. integer x = 32
  57. integer y = 24
  58. integer width = 1947
  59. integer height = 904
  60. integer taborder = 10
  61. boolean bringtotop = true
  62. string title = "none"
  63. string dataobject = "dw_saletaskmx_stopqty_edit"
  64. boolean livescroll = true
  65. borderstyle borderstyle = stylelowered!
  66. end type
  67. type cb_1 from uo_imflatbutton within w_saletaskmx_stopqty_edit
  68. integer x = 594
  69. integer y = 952
  70. integer taborder = 30
  71. boolean bringtotop = true
  72. string normalpicname = "ok.bmp"
  73. integer picsize = 16
  74. end type
  75. event clicked;call super::clicked;uo_saletask uo_sale
  76. uo_sale = Create uo_saletask
  77. uo_sale.commit_transaction = sqlca
  78. dw_1.AcceptText()
  79. Int rslt = 1
  80. Long ll_row
  81. Decimal ld_stopqty,ld_rebuyqty
  82. String ls_stopreason,ls_mtrlcode
  83. String arg_msg
  84. ll_row = dw_1.GetRow()
  85. ld_stopqty = dw_1.Object.u_saletaskmx_stopqty[ll_row]
  86. ls_stopreason = dw_1.Object.u_saletaskmx_stopreason[ll_row]
  87. ls_mtrlcode = dw_1.Object.u_mtrldef_mtrlcode[ll_row]
  88. IF uo_sale.uof_stopqty(ins_scid,ins_taskid,ins_printid,ld_stopqty,ls_stopreason,arg_msg,True) = 0 THEN
  89. MessageBox('Error',arg_msg)
  90. rslt = 0
  91. GOTO ext
  92. END IF
  93. ext:
  94. Destroy uo_sale
  95. IF rslt = 1 THEN
  96. MessageBox('系统提示','操作成功!')
  97. Close(Parent)
  98. END IF
  99. end event