w_spt_ch_fx.srw 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. $PBExportHeader$w_spt_ch_fx.srw
  2. $PBExportComments$(采购)选择供应商界面
  3. forward
  4. global type w_spt_ch_fx from w_publ_choice
  5. end type
  6. end forward
  7. global type w_spt_ch_fx from w_publ_choice
  8. integer width = 3310
  9. string title = "选择供应商"
  10. boolean controlmenu = true
  11. long backcolor = 16777215
  12. string icon = "graphics\chain_link_128px.ico"
  13. boolean center = true
  14. end type
  15. global w_spt_ch_fx w_spt_ch_fx
  16. type variables
  17. s_fx_company ins_ret
  18. end variables
  19. forward prototypes
  20. public function integer wf_retrieve ()
  21. end prototypes
  22. public function integer wf_retrieve ();//
  23. int rslt = 1
  24. dw_ch.Reset()
  25. string arg_msg
  26. oleobject list, item
  27. list = FXAppCom.GetMySptList(app_token_fx, ref arg_msg)
  28. if (arg_msg <> '') then
  29. rslt = 0
  30. goto ext
  31. end if
  32. dw_ch.SetRedraw(false)
  33. long i
  34. for i = 1 to list.Count
  35. item = list.GetItem(i - 1)
  36. dw_ch.Object.comid[i] = item.GetInt('comid')
  37. dw_ch.Object.comname[i] = item.GetString('comname')
  38. dw_ch.Object.simplename[i] = item.GetString('simplename')
  39. dw_ch.Object.custype[i] = item.GetString('custype')
  40. dw_ch.Object.tele[i] = item.GetString('tele')
  41. dw_ch.Object.address[i] = item.GetString('address')
  42. dw_ch.Object.freight[i] = item.GetString('freight')
  43. dw_ch.Object.freight_tele[i] = item.GetString('freight_tele')
  44. next
  45. dw_ch.SelectRow(0, false)
  46. dw_ch.SetRedraw(true)
  47. ext:
  48. return rslt
  49. end function
  50. on w_spt_ch_fx.create
  51. call super::create
  52. end on
  53. on w_spt_ch_fx.destroy
  54. call super::destroy
  55. end on
  56. event open;ins_ret.ifselect = false
  57. wf_retrieve()
  58. end event
  59. event close;call super::close;CloseWithReturn(this, ins_ret)
  60. end event
  61. type cb_func from w_publ_choice`cb_func within w_spt_ch_fx
  62. end type
  63. type cb_exit from w_publ_choice`cb_exit within w_spt_ch_fx
  64. end type
  65. type sle_ch from w_publ_choice`sle_ch within w_spt_ch_fx
  66. end type
  67. type dw_ch from w_publ_choice`dw_ch within w_spt_ch_fx
  68. integer width = 3301
  69. integer height = 1440
  70. string dataobject = "dw_fx_spt_ch"
  71. boolean rbutton_filter_use = true
  72. boolean rbutton_setposition_use = true
  73. boolean titleclick_sort_use = true
  74. end type
  75. event dw_ch::clicked;call super::clicked;this.SelectRow(0, false)
  76. if (row > 0) then
  77. this.SelectRow(row, true)
  78. end if
  79. end event
  80. type st_1 from w_publ_choice`st_1 within w_spt_ch_fx
  81. long backcolor = 16777215
  82. end type
  83. type cb_retrieve from w_publ_choice`cb_retrieve within w_spt_ch_fx
  84. end type
  85. event cb_retrieve::clicked;wf_retrieve()
  86. end event
  87. type cb_choice from w_publ_choice`cb_choice within w_spt_ch_fx
  88. end type
  89. event cb_choice::clicked;call super::clicked;long row
  90. row = dw_ch.GetRow()
  91. if (row <= 0) then
  92. MessageBox('提示', '请在下面的清单内选中一个供应商')
  93. return
  94. end if
  95. if not dw_ch.IsSelected(row) then
  96. MessageBox('提示', '请在下面的清单内选中一个供应商')
  97. return
  98. end if
  99. ins_ret.comid[1] = dw_ch.Object.comid[row]
  100. ins_ret.comname[1] = Trim(dw_ch.Object.comname[row])
  101. ins_ret.ifselect = true
  102. Close(parent)
  103. end event
  104. type ln_bar from w_publ_choice`ln_bar within w_spt_ch_fx
  105. end type
  106. type ln_bar2 from w_publ_choice`ln_bar2 within w_spt_ch_fx
  107. end type
  108. type r_bar from w_publ_choice`r_bar within w_spt_ch_fx
  109. end type
  110. type ln_1 from w_publ_choice`ln_1 within w_spt_ch_fx
  111. end type
  112. type ln_2 from w_publ_choice`ln_2 within w_spt_ch_fx
  113. end type