w_bom_bill_ch.srw 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. $PBExportHeader$w_bom_bill_ch.srw
  2. forward
  3. global type w_bom_bill_ch from w_publ_choice
  4. end type
  5. end forward
  6. global type w_bom_bill_ch from w_publ_choice
  7. string title = "物料清单工作表选择"
  8. end type
  9. global w_bom_bill_ch w_bom_bill_ch
  10. type variables
  11. s_cmpl_modle_ch INS_RT_STRU
  12. end variables
  13. on w_bom_bill_ch.create
  14. call super::create
  15. end on
  16. on w_bom_bill_ch.destroy
  17. call super::destroy
  18. end on
  19. event close;call super::close;CLOSEWITHRETURN(THIS,INS_RT_STRU)
  20. end event
  21. event dw_filter;call super::dw_filter;string obj_expr=''
  22. if trim(sle_ch.text)<>'' then
  23. IF POS(trim(sle_ch.text),'%')=0 THEN
  24. obj_expr=obj_expr+'( modlename LIKE "%'+trim(sle_ch.text)+'%" )'
  25. ELSE
  26. obj_expr=obj_expr+'( modlename LIKE "'+trim(sle_ch.text)+'" )'
  27. END IF
  28. end if
  29. dw_ch.setfilter(obj_expr)
  30. dw_ch.SetRedraw(False)
  31. dw_ch.filter()
  32. if dw_ch.rowcount()>=1 then
  33. dw_ch.selectrow(0,false)
  34. dw_ch.selectrow(1,true)
  35. end if
  36. dw_ch.SetRedraw(TRUE)
  37. end event
  38. event open;call super::open;INS_RT_STRU.modleid = 0
  39. end event
  40. type cb_func from w_publ_choice`cb_func within w_bom_bill_ch
  41. end type
  42. type cb_exit from w_publ_choice`cb_exit within w_bom_bill_ch
  43. end type
  44. type sle_ch from w_publ_choice`sle_ch within w_bom_bill_ch
  45. end type
  46. type dw_ch from w_publ_choice`dw_ch within w_bom_bill_ch
  47. string dataobject = "dw_bom_bill_ch"
  48. end type
  49. type st_1 from w_publ_choice`st_1 within w_bom_bill_ch
  50. end type
  51. type cb_retrieve from w_publ_choice`cb_retrieve within w_bom_bill_ch
  52. end type
  53. type cb_choice from w_publ_choice`cb_choice within w_bom_bill_ch
  54. end type
  55. event cb_choice::clicked;call super::clicked;Long LS_ROW
  56. LS_ROW = dw_CH.GetRow()
  57. IF LS_ROW <= 0 THEN
  58. MessageBox('系统提示','请先选择目标行!',StopSign!)
  59. RETURN
  60. END IF
  61. INS_RT_STRU.modleid = dw_CH.Object.modleid[LS_ROW]
  62. INS_RT_STRU.modlename = dw_CH.Object.modlename[LS_ROW]
  63. //Long ll_printid
  64. //String ll_parmName
  65. //String ll_displayName
  66. //Decimal ll_defaultValue
  67. //Long ll_if_useformula
  68. //String ll_formula
  69. //Long ll_if_from_mtrl
  70. //Long ll_mtrlid
  71. //String ll_mtrl_pro
  72. //Long ll_if_from_product
  73. //String ll_product_pro
  74. //String ll_mtrlcode
  75. //String ll_mtrlname
  76. //
  77. //declare cur1 cursor for
  78. // select
  79. // printid,
  80. // parmName,
  81. // displayName,
  82. // defaultValue,
  83. // if_useformula,
  84. // formula,
  85. // if_from_mtrl,
  86. // u_cmpl_modleMx.mtrlid,
  87. // mtrl_pro,
  88. // if_from_product,
  89. // product_pro,
  90. // isnull(u_mtrldef.mtrlcode, '') as mtrlcode,
  91. // isnull(u_mtrldef.mtrlname, '') as mtrlname
  92. // from u_cmpl_modleMx LEFT outer JOIN u_mtrldef ON u_cmpl_modleMx.mtrlid = u_mtrldef.mtrlid
  93. // Where modleid = :INS_RT_STRU.modleid order by printid;
  94. //
  95. //open cur1;
  96. //fetch cur1 into
  97. // :ll_printid,
  98. // :ll_parmName,
  99. // :ll_displayName,
  100. // :ll_defaultValue,
  101. // :ll_if_useformula,
  102. // :ll_formula,
  103. // :ll_if_from_mtrl,
  104. // :ll_mtrlid,
  105. // :ll_mtrl_pro,
  106. // :ll_if_from_product,
  107. // :ll_product_pro,
  108. // :ll_mtrlcode,
  109. // :ll_mtrlname;
  110. //
  111. //Long ll_cnt = 0
  112. //DO WHILE sqlca.SQLCode = 0
  113. // ll_cnt++
  114. // INS_RT_STRU.printid[ll_cnt] = ll_printid
  115. // INS_RT_STRU.parmName[ll_cnt] = ll_parmName
  116. // INS_RT_STRU.DisplayName[ll_cnt] = ll_displayName
  117. // INS_RT_STRU.defaultValue[ll_cnt] = ll_defaultValue
  118. // INS_RT_STRU.if_useformula[ll_cnt] = ll_if_useformula
  119. // INS_RT_STRU.formula[ll_cnt] = ll_formula
  120. // INS_RT_STRU.if_from_mtrl[ll_cnt] = ll_if_from_mtrl
  121. // INS_RT_STRU.mtrlid[ll_cnt] = ll_mtrlid
  122. // INS_RT_STRU.mtrl_pro[ll_cnt] = ll_mtrl_pro
  123. // INS_RT_STRU.if_from_product[ll_cnt] = ll_if_from_product
  124. // INS_RT_STRU.product_pro[ll_cnt] = ll_product_pro
  125. // INS_RT_STRU.mtrlcode[ll_cnt] = ll_mtrlcode
  126. // INS_RT_STRU.mtrlname[ll_cnt] = ll_mtrlname
  127. // fetch cur1 into
  128. // :ll_printid,
  129. // :ll_parmName,
  130. // :ll_displayName,
  131. // :ll_defaultValue,
  132. // :ll_if_useformula,
  133. // :ll_formula,
  134. // :ll_if_from_mtrl,
  135. // :ll_mtrlid,
  136. // :ll_mtrl_pro,
  137. // :ll_if_from_product,
  138. // :ll_product_pro,
  139. // :ll_mtrlcode,
  140. // :ll_mtrlname;
  141. //
  142. //LOOP
  143. //close cur1;
  144. Close(PARENT)
  145. end event
  146. type ln_bar from w_publ_choice`ln_bar within w_bom_bill_ch
  147. end type
  148. type ln_bar2 from w_publ_choice`ln_bar2 within w_bom_bill_ch
  149. end type
  150. type r_bar from w_publ_choice`r_bar within w_bom_bill_ch
  151. end type
  152. type ln_1 from w_publ_choice`ln_1 within w_bom_bill_ch
  153. end type
  154. type ln_2 from w_publ_choice`ln_2 within w_bom_bill_ch
  155. end type