w_pz_ch_configcode_fx.srw 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. $PBExportHeader$w_pz_ch_configcode_fx.srw
  2. $PBExportComments$协同系统 fx_configure_codemx 部件选配 配置选择
  3. forward
  4. global type w_pz_ch_configcode_fx from w_publ_choice
  5. end type
  6. end forward
  7. global type w_pz_ch_configcode_fx from w_publ_choice
  8. integer width = 2409
  9. string title = "部件选配-配置选择"
  10. long backcolor = 16777215
  11. string icon = "graphics\chain_link_128px.ico"
  12. end type
  13. global w_pz_ch_configcode_fx w_pz_ch_configcode_fx
  14. type variables
  15. s_fx_pzwin_open ins_s
  16. string ins_ret
  17. end variables
  18. on w_pz_ch_configcode_fx.create
  19. call super::create
  20. end on
  21. on w_pz_ch_configcode_fx.destroy
  22. call super::destroy
  23. end on
  24. event open;ins_s = Message.PowerObjectParm
  25. if IsNull(ins_s) then
  26. MessageBox('提示', '打开方式有误(structure)')
  27. Close(this)
  28. return
  29. end if
  30. if IsNull(ins_s.arg_ds) or IsNull(ins_s.arg_dsmx) then
  31. MessageBox('提示', '打开方式有误(datastore)')
  32. Close(this)
  33. return
  34. end if
  35. if (ins_s.arg_ds.DataObject <> 'ds_fx_configure_code') &
  36. or (ins_s.arg_dsmx.DataObject <> 'ds_fx_configure_codemx') then
  37. MessageBox('提示', '打开方式有误(dataobject)')
  38. Close(this)
  39. return
  40. end if
  41. long typeid
  42. if (Pos(ins_s.arg_colname, 'status') > 0) then
  43. // this.Title = '配置选择'
  44. typeid = ins_s.arg_statustype
  45. elseif (Pos(ins_s.arg_colname, 'woodcode') > 0) then
  46. // this.Title = '配置1选择'
  47. typeid = ins_s.arg_woodcodetype
  48. elseif (Pos(ins_s.arg_colname, 'pcode') > 0) then
  49. // this.Title = '配置2选择'
  50. typeid = ins_s.arg_pcodetype
  51. end if
  52. environment exerun_env
  53. GetEnvironment(exerun_env)
  54. this.X = ins_s.arg_x + 100
  55. this.Y = ins_s.arg_y
  56. if THIS.X + this.width > PixelsToUnits(exerun_env.screenwidth, XPixelsToUnits!) - 100 then
  57. THIS.X = PixelsToUnits(exerun_env.screenwidth, XPixelsToUnits!) - this.width - 100
  58. end if
  59. if THIS.Y + this.height > PixelsToUnits(exerun_env.screenheight, XPixelsToUnits!) - 350 then
  60. THIS.Y = PixelsToUnits(exerun_env.screenheight, XPixelsToUnits!) - this.height - 350
  61. end if
  62. dw_ch.SetRedraw(false)
  63. dw_ch.DataObject = ins_s.arg_ds.DataObject
  64. dw_ch.Object.Data = ins_s.arg_ds.Object.Data
  65. dw_ch.SetFilter('typeid_erp = ' + string(typeid))
  66. dw_ch.Filter()
  67. dw_ch.SetRedraw(true)
  68. ins_ret = ''
  69. end event
  70. event close;call super::close;CloseWithReturn(this, ins_ret)
  71. end event
  72. type cb_func from w_publ_choice`cb_func within w_pz_ch_configcode_fx
  73. boolean visible = false
  74. end type
  75. type cb_exit from w_publ_choice`cb_exit within w_pz_ch_configcode_fx
  76. integer x = 151
  77. end type
  78. type sle_ch from w_publ_choice`sle_ch within w_pz_ch_configcode_fx
  79. boolean visible = false
  80. end type
  81. type dw_ch from w_publ_choice`dw_ch within w_pz_ch_configcode_fx
  82. event ue_dwndropdown pbm_dwndropdown
  83. integer y = 172
  84. integer width = 2418
  85. integer height = 1564
  86. string dataobject = "ds_fx_configure_code"
  87. boolean rbutton_setposition_use = true
  88. boolean titleclick_sort_use = true
  89. end type
  90. event dw_ch::ue_dwndropdown;//
  91. long row
  92. row = this.GetRow()
  93. if IsNull(row) then return
  94. if (row <= 0) then return
  95. long pzid
  96. pzid = this.Object.pzid_erp[row]
  97. if IsNull(pzid) then return
  98. if (pzid <= 0) then return
  99. ins_s.arg_dsmx.SetFilter('pzid_erp = ' + string(pzid))
  100. ins_s.arg_dsmx.Filter()
  101. s_fx_pzwin_open temp_s
  102. temp_s = ins_s
  103. temp_s.arg_ds = ins_s.arg_dsmx
  104. temp_s.arg_x = parent.X + this.X + this.Pointerx()
  105. temp_s.arg_y = parent.Y + this.Y + this.Pointery()
  106. OpenWithParm(w_pz_ch_fx, temp_s)
  107. string ret
  108. ret = Message.StringParm
  109. this.SetItem(row, 'namemx', ret)
  110. ins_s.arg_dsmx.SetFilter('')
  111. ins_s.arg_dsmx.Filter()
  112. end event
  113. event dw_ch::clicked;if (row > 0) then
  114. this.SelectRow(0, false)
  115. this.SelectRow(row, true)
  116. end if
  117. end event
  118. type st_1 from w_publ_choice`st_1 within w_pz_ch_configcode_fx
  119. boolean visible = false
  120. end type
  121. type cb_retrieve from w_publ_choice`cb_retrieve within w_pz_ch_configcode_fx
  122. boolean visible = false
  123. end type
  124. type cb_choice from w_publ_choice`cb_choice within w_pz_ch_configcode_fx
  125. integer x = 0
  126. end type
  127. event cb_choice::clicked;call super::clicked;dw_ch.AcceptText()
  128. long i
  129. string temp
  130. for i = 1 to dw_ch.RowCount()
  131. temp = Trim(dw_ch.Object.namemx[i])
  132. if (temp <> '') then
  133. ins_ret += Trim(dw_ch.Object.name[i]) + ':' + temp + '|'
  134. end if
  135. next
  136. Close(parent)
  137. end event
  138. type ln_bar from w_publ_choice`ln_bar within w_pz_ch_configcode_fx
  139. end type
  140. type ln_bar2 from w_publ_choice`ln_bar2 within w_pz_ch_configcode_fx
  141. end type
  142. type r_bar from w_publ_choice`r_bar within w_pz_ch_configcode_fx
  143. end type
  144. type ln_1 from w_publ_choice`ln_1 within w_pz_ch_configcode_fx
  145. boolean visible = false
  146. end type
  147. type ln_2 from w_publ_choice`ln_2 within w_pz_ch_configcode_fx
  148. boolean visible = false
  149. end type