w_outware_sale_info.srw 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. $PBExportHeader$w_outware_sale_info.srw
  2. forward
  3. global type w_outware_sale_info from w_publ_base
  4. end type
  5. type dw_1 from u_dw_rbtnfilter within w_outware_sale_info
  6. end type
  7. type st_1 from statictext within w_outware_sale_info
  8. end type
  9. end forward
  10. global type w_outware_sale_info from w_publ_base
  11. integer width = 2034
  12. integer height = 1168
  13. string title = "发货单信息"
  14. boolean resizable = true
  15. dw_1 dw_1
  16. st_1 st_1
  17. end type
  18. global w_outware_sale_info w_outware_sale_info
  19. type variables
  20. long ins_scid,ins_taskid,ins_printid
  21. s_edit_index_tran s_tran
  22. end variables
  23. forward prototypes
  24. public subroutine wf_retrieve (long arg_scid, long arg_taskid, long arg_printid)
  25. end prototypes
  26. public subroutine wf_retrieve (long arg_scid, long arg_taskid, long arg_printid);String ls_taskcode,ls_mtrlcode
  27. SELECT u_SaleTask.TaskCode, u_mtrldef.mtrlcode
  28. INTO :ls_taskcode,:ls_mtrlcode
  29. FROM u_SaleTask INNER JOIN
  30. u_SaleTaskMx ON u_SaleTask.scid = u_SaleTaskMx.scid AND
  31. u_SaleTask.TaskID = u_SaleTaskMx.TaskID INNER JOIN
  32. u_mtrldef ON u_SaleTaskMx.MtrlID = u_mtrldef.mtrlid
  33. WHERE u_SaleTask.TaskID = :arg_taskid
  34. AND u_SaleTask.scid = :arg_scid
  35. And u_SaleTaskMx.printid = :arg_printid;
  36. IF sqlca.SQLCode <> 0 THEN
  37. This.Title = ''
  38. ELSE
  39. This.Title = ls_taskcode + '['+ls_mtrlcode+']' + ' 相关发货单信息'
  40. END IF
  41. dw_1.Retrieve(ins_scid,ins_taskid,ins_printid)
  42. end subroutine
  43. on w_outware_sale_info.create
  44. int iCurrent
  45. call super::create
  46. this.dw_1=create dw_1
  47. this.st_1=create st_1
  48. iCurrent=UpperBound(this.Control)
  49. this.Control[iCurrent+1]=this.dw_1
  50. this.Control[iCurrent+2]=this.st_1
  51. end on
  52. on w_outware_sale_info.destroy
  53. call super::destroy
  54. destroy(this.dw_1)
  55. destroy(this.st_1)
  56. end on
  57. event open;call super::open;Long ll_width,ll_height
  58. ll_width = Long(f_ProfileString(sys_empid, "w_outware_sale_info", "winwidth", "1998"))
  59. ll_height = Long(f_ProfileString(sys_empid, "w_outware_sale_info", "winheight", "1064"))
  60. This.Width = ll_width
  61. This.Height = ll_height
  62. Long ll_x,ll_y
  63. ll_x = Long(f_ProfileString(sys_empid, "w_outware_sale_info", "winx", "1326"))
  64. ll_y = Long(f_ProfileString(sys_empid, "w_outware_sale_info", "winy", "1076"))
  65. This.X = ll_x
  66. This.Y = ll_y
  67. environment exerun_env
  68. GetEnvironment(exerun_env )
  69. //计算窗口位置
  70. IF This.X + This.Width > PixelsToUnits(exerun_env.ScreenWidth, XPixelsToUnits!) THEN
  71. This.X = PixelsToUnits(exerun_env.ScreenWidth, XPixelsToUnits!) - This.Width
  72. END IF
  73. IF This.Y + This.Height > PixelsToUnits(exerun_env.ScreenHeight, XPixelsToUnits!) - 350 THEN
  74. This.Y = PixelsToUnits(exerun_env.ScreenHeight, XPixelsToUnits!) - This.Height - 350
  75. END IF
  76. s_tran = Message.PowerObjectParm
  77. ins_scid = s_tran.b_long
  78. ins_taskid = s_tran.c_long
  79. ins_printid = s_tran.d_long
  80. wf_retrieve(ins_scid,ins_taskid,ins_printid)
  81. end event
  82. event close;call super::close;f_SetProfileString(sys_empid, "w_outware_sale_info", "winwidth", String(THIS.Width))
  83. f_SetProfileString(sys_empid, "w_outware_sale_info", "winheight", String(THIS.Height))
  84. f_SetProfileString(sys_empid, "w_outware_sale_info", "winx", String(THIS.X))
  85. f_SetProfileString(sys_empid, "w_outware_sale_info", "winy", String(THIS.Y))
  86. end event
  87. event resize;call super::resize;dw_1.width = this.width - 60
  88. dw_1.height = this.height - 220
  89. end event
  90. event ue_before_open;call super::ue_before_open;dw_1.settransobject(sqlca)
  91. end event
  92. type cb_func from w_publ_base`cb_func within w_outware_sale_info
  93. boolean visible = false
  94. end type
  95. type cb_exit from w_publ_base`cb_exit within w_outware_sale_info
  96. boolean visible = false
  97. end type
  98. type dw_1 from u_dw_rbtnfilter within w_outware_sale_info
  99. integer x = 9
  100. integer y = 72
  101. integer width = 1984
  102. integer height = 980
  103. integer taborder = 20
  104. boolean bringtotop = true
  105. string dataobject = "dw_outware_sale_info"
  106. boolean hscrollbar = true
  107. boolean vscrollbar = true
  108. end type
  109. event rowfocuschanged;call super::rowfocuschanged;IF currentrow <= 0 THEN RETURN
  110. THIS.SelectRow(0,FALSE)
  111. THIS.SelectRow(currentrow,TRUE)
  112. end event
  113. event doubleclicked;call super::doubleclicked;IF row > 0 THEN
  114. String ls_code
  115. Long ll_scid
  116. ll_scid = THIS.Object.u_outware_scid[row]
  117. ls_code = THIS.Object.u_outware_outwarecode[row]
  118. f_open_win(ll_scid,ls_code)
  119. END IF
  120. end event
  121. type st_1 from statictext within w_outware_sale_info
  122. integer x = 18
  123. integer y = 12
  124. integer width = 672
  125. integer height = 48
  126. boolean bringtotop = true
  127. integer textsize = -9
  128. integer weight = 400
  129. fontcharset fontcharset = gb2312charset!
  130. fontpitch fontpitch = variable!
  131. string facename = "宋体"
  132. long textcolor = 16711680
  133. long backcolor = 134217739
  134. string text = "双击可显示发货单详细信息"
  135. boolean focusrectangle = false
  136. end type