w_cus_ch_fx.srw 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. $PBExportHeader$w_cus_ch_fx.srw
  2. $PBExportComments$(协同)客户选择
  3. forward
  4. global type w_cus_ch_fx from w_publ_choice
  5. end type
  6. end forward
  7. global type w_cus_ch_fx from w_publ_choice
  8. integer width = 4311
  9. integer height = 1920
  10. string title = "选择客户"
  11. long backcolor = 16777215
  12. boolean center = true
  13. end type
  14. global w_cus_ch_fx w_cus_ch_fx
  15. type variables
  16. s_fx_company ins_s, ins_ret
  17. end variables
  18. forward prototypes
  19. public function integer wf_retrieve ()
  20. end prototypes
  21. public function integer wf_retrieve ();int rslt = 1
  22. string arg_msg
  23. long i, insertRow
  24. oleobject obj, parm, list, item
  25. parm = FXAppCom.CreatePbDictionary()
  26. parm.SetString('token', app_token_fx)
  27. obj = FXAppCom.GetMyCustList(parm, ref arg_msg)
  28. if (arg_msg <> '') then
  29. rslt = 0
  30. goto ext
  31. end if
  32. dw_ch.SetRedraw(false)
  33. dw_ch.Reset()
  34. list = obj.GetPBArray('list')
  35. for i = 1 to list.Count
  36. item = list.GetPBDictionary(i - 1)
  37. insertRow = dw_ch.InsertRow(0)
  38. dw_ch.Object.comid[insertRow] = item.GetInt('comid')
  39. dw_ch.Object.comname[insertRow] = item.GetString('comname')
  40. dw_ch.Object.simplename[insertRow] = item.GetString('simplename')
  41. dw_ch.Object.custype[insertRow] = item.GetString('custype')
  42. dw_ch.Object.tele[insertRow] = item.GetString('tele')
  43. dw_ch.Object.address[insertRow] = item.GetString('address')
  44. dw_ch.Object.freight[insertRow] = item.GetString('freight')
  45. dw_ch.Object.freight_tele[insertRow] = item.GetString('freight_tele')
  46. dw_ch.Object.relid[insertRow] = item.GetInt('relid')
  47. next
  48. dw_ch.AcceptText()
  49. dw_ch.SetRedraw(true)
  50. ext:
  51. if (rslt = 0) then
  52. MessageBox('提示', arg_msg)
  53. end if
  54. return rslt
  55. end function
  56. on w_cus_ch_fx.create
  57. call super::create
  58. end on
  59. on w_cus_ch_fx.destroy
  60. call super::destroy
  61. end on
  62. event open;this.triggerevent('ue_before_open')
  63. ins_s = Message.PowerObjectParm
  64. if (not IsNull(ins_s)) then
  65. if (IsValid(ins_s)) then
  66. if (not IsNull(ins_s.ds)) then
  67. IF IsValid(ins_s.ds) THEN
  68. if (ins_s.ds.RowCount() > 0 and ins_s.ds.DataObject = 'dw_fx_cust_ch') then
  69. dw_ch.Object.Data = ins_s.ds.Object.Data
  70. return
  71. end if
  72. END IF
  73. end if
  74. end if
  75. end if
  76. wf_retrieve()
  77. end event
  78. event close;CloseWithReturn(this, ins_ret)
  79. end event
  80. event resize;call super::resize;dw_ch.Width = this.workspacewidth( )
  81. dw_ch.Height = this.workspaceheight( ) - dw_ch.Y
  82. end event
  83. type cb_func from w_publ_choice`cb_func within w_cus_ch_fx
  84. end type
  85. type cb_exit from w_publ_choice`cb_exit within w_cus_ch_fx
  86. end type
  87. event cb_exit::clicked;ins_ret.ifselect = false
  88. Close(parent)
  89. end event
  90. type sle_ch from w_publ_choice`sle_ch within w_cus_ch_fx
  91. boolean visible = false
  92. integer x = 2473
  93. integer y = 32
  94. boolean enabled = false
  95. end type
  96. type dw_ch from w_publ_choice`dw_ch within w_cus_ch_fx
  97. integer y = 176
  98. integer width = 4242
  99. integer height = 1344
  100. string dataobject = "dw_fx_cust_ch"
  101. boolean rbutton_filter_use = true
  102. boolean rbutton_setposition_use = true
  103. boolean titleclick_sort_use = true
  104. end type
  105. type st_1 from w_publ_choice`st_1 within w_cus_ch_fx
  106. boolean visible = false
  107. integer x = 2290
  108. integer y = 60
  109. boolean enabled = false
  110. end type
  111. type cb_retrieve from w_publ_choice`cb_retrieve within w_cus_ch_fx
  112. end type
  113. event cb_retrieve::clicked;wf_retrieve()
  114. end event
  115. type cb_choice from w_publ_choice`cb_choice within w_cus_ch_fx
  116. end type
  117. event cb_choice::clicked;call super::clicked;long row
  118. row = dw_ch.GetRow()
  119. if (row <= 0) then
  120. MessageBox('提示', '请在下面的清单内选中一个客户')
  121. return
  122. end if
  123. if not dw_ch.IsSelected(row) then
  124. MessageBox('提示', '请在下面的清单内选中一个客户')
  125. return
  126. end if
  127. ins_ret.comid[1] = dw_ch.Object.comid[row]
  128. ins_ret.comname[1] = Trim(dw_ch.Object.comname[row])
  129. ins_ret.simplename[1] = Trim(dw_ch.Object.simplename[row])
  130. ins_ret.relid[1] = dw_ch.Object.relid[row]
  131. ins_ret.ifselect = true
  132. Close(parent)
  133. end event
  134. type ln_bar from w_publ_choice`ln_bar within w_cus_ch_fx
  135. end type
  136. type ln_bar2 from w_publ_choice`ln_bar2 within w_cus_ch_fx
  137. end type
  138. type r_bar from w_publ_choice`r_bar within w_cus_ch_fx
  139. end type
  140. type ln_1 from w_publ_choice`ln_1 within w_cus_ch_fx
  141. end type
  142. type ln_2 from w_publ_choice`ln_2 within w_cus_ch_fx
  143. end type