w_order_ml_mrp_ch.srw 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. $PBExportHeader$w_order_ml_mrp_ch.srw
  2. forward
  3. global type w_order_ml_mrp_ch from window
  4. end type
  5. type cbx_ifwx_mtrl_not_useqty from checkbox within w_order_ml_mrp_ch
  6. end type
  7. type cbx_ifbuy_mtrl_not_useqty from checkbox within w_order_ml_mrp_ch
  8. end type
  9. type cbx_if_allowuse from checkbox within w_order_ml_mrp_ch
  10. end type
  11. type rb_2 from radiobutton within w_order_ml_mrp_ch
  12. end type
  13. type rb_1 from radiobutton within w_order_ml_mrp_ch
  14. end type
  15. type cb_2 from uo_imflatbutton within w_order_ml_mrp_ch
  16. end type
  17. type cb_1 from uo_imflatbutton within w_order_ml_mrp_ch
  18. end type
  19. end forward
  20. global type w_order_ml_mrp_ch from window
  21. integer width = 1531
  22. integer height = 884
  23. boolean titlebar = true
  24. string title = "生产计划MRP运算"
  25. boolean controlmenu = true
  26. windowtype windowtype = response!
  27. long backcolor = 134217739
  28. string icon = "AppIcon!"
  29. boolean center = true
  30. cbx_ifwx_mtrl_not_useqty cbx_ifwx_mtrl_not_useqty
  31. cbx_ifbuy_mtrl_not_useqty cbx_ifbuy_mtrl_not_useqty
  32. cbx_if_allowuse cbx_if_allowuse
  33. rb_2 rb_2
  34. rb_1 rb_1
  35. cb_2 cb_2
  36. cb_1 cb_1
  37. end type
  38. global w_order_ml_mrp_ch w_order_ml_mrp_ch
  39. type variables
  40. s_order_ml_mrp s_mrp
  41. end variables
  42. on w_order_ml_mrp_ch.create
  43. this.cbx_ifwx_mtrl_not_useqty=create cbx_ifwx_mtrl_not_useqty
  44. this.cbx_ifbuy_mtrl_not_useqty=create cbx_ifbuy_mtrl_not_useqty
  45. this.cbx_if_allowuse=create cbx_if_allowuse
  46. this.rb_2=create rb_2
  47. this.rb_1=create rb_1
  48. this.cb_2=create cb_2
  49. this.cb_1=create cb_1
  50. this.Control[]={this.cbx_ifwx_mtrl_not_useqty,&
  51. this.cbx_ifbuy_mtrl_not_useqty,&
  52. this.cbx_if_allowuse,&
  53. this.rb_2,&
  54. this.rb_1,&
  55. this.cb_2,&
  56. this.cb_1}
  57. end on
  58. on w_order_ml_mrp_ch.destroy
  59. destroy(this.cbx_ifwx_mtrl_not_useqty)
  60. destroy(this.cbx_ifbuy_mtrl_not_useqty)
  61. destroy(this.cbx_if_allowuse)
  62. destroy(this.rb_2)
  63. destroy(this.rb_1)
  64. destroy(this.cb_2)
  65. destroy(this.cb_1)
  66. end on
  67. event open;Int li_if_allowuse,li_mrp_ch
  68. li_if_allowuse = Long(ProfileString(SYS_INIFILENAME, "w_order_mrp_ch", "if_allowuse", "0"))
  69. li_mrp_ch = Long(ProfileString(SYS_INIFILENAME, "w_order_mrp_ch", "mrp_ch", "1"))
  70. IF li_if_allowuse = 1 THEN
  71. cbx_if_allowuse.Checked = TRUE
  72. ELSE
  73. cbx_if_allowuse.Checked = FALSE
  74. END IF
  75. cbx_if_allowuse.TriggerEvent(Clicked!)
  76. IF li_mrp_ch = 1 THEN
  77. rb_1.Checked = TRUE
  78. rb_2.Checked = FALSE
  79. ELSE
  80. rb_1.Checked = FALSE
  81. rb_2.Checked = TRUE
  82. END IF
  83. end event
  84. event close;Int li_if_allowuse,li_mrp_ch
  85. IF cbx_if_allowuse.Checked THEN
  86. li_if_allowuse = 1
  87. ELSE
  88. li_if_allowuse = 0
  89. END IF
  90. IF rb_1.Checked THEN
  91. li_mrp_ch = 1
  92. ELSE
  93. li_mrp_ch = 2
  94. END IF
  95. SetProfileString(SYS_INIFILENAME, "w_order_mrp_ch", "if_allowuse", String(li_if_allowuse))
  96. SetProfileString(SYS_INIFILENAME, "w_order_mrp_ch", "mrp_ch", String(li_mrp_ch))
  97. CloseWithReturn(THIS,s_mrp)
  98. end event
  99. type cbx_ifwx_mtrl_not_useqty from checkbox within w_order_ml_mrp_ch
  100. integer x = 261
  101. integer y = 416
  102. integer width = 905
  103. integer height = 60
  104. boolean bringtotop = true
  105. integer textsize = -9
  106. integer weight = 400
  107. fontcharset fontcharset = gb2312charset!
  108. fontpitch fontpitch = variable!
  109. string facename = "宋体"
  110. long textcolor = 16711680
  111. long backcolor = 134217739
  112. string text = "外协不考虑可用数"
  113. end type
  114. type cbx_ifbuy_mtrl_not_useqty from checkbox within w_order_ml_mrp_ch
  115. integer x = 261
  116. integer y = 324
  117. integer width = 576
  118. integer height = 60
  119. boolean bringtotop = true
  120. integer textsize = -9
  121. integer weight = 400
  122. fontcharset fontcharset = gb2312charset!
  123. fontpitch fontpitch = variable!
  124. string facename = "宋体"
  125. long textcolor = 16711680
  126. long backcolor = 134217739
  127. string text = "采购不考虑可用数"
  128. end type
  129. type cbx_if_allowuse from checkbox within w_order_ml_mrp_ch
  130. integer x = 178
  131. integer y = 216
  132. integer width = 466
  133. integer height = 60
  134. integer textsize = -9
  135. integer weight = 400
  136. fontcharset fontcharset = gb2312charset!
  137. fontpitch fontpitch = variable!
  138. string facename = "宋体"
  139. long textcolor = 33554432
  140. long backcolor = 134217739
  141. string text = "运算考虑可用数"
  142. end type
  143. event clicked;IF THIS.Checked THEN
  144. cbx_ifbuy_mtrl_not_useqty.Enabled = TRUE
  145. cbx_ifwx_mtrl_not_useqty.Enabled = TRUE
  146. ELSE
  147. cbx_ifbuy_mtrl_not_useqty.Enabled = FALSE
  148. cbx_ifwx_mtrl_not_useqty.Enabled = FALSE
  149. cbx_ifbuy_mtrl_not_useqty.Checked = FALSE
  150. cbx_ifwx_mtrl_not_useqty.Checked = FALSE
  151. END IF
  152. end event
  153. type rb_2 from radiobutton within w_order_ml_mrp_ch
  154. integer x = 699
  155. integer y = 84
  156. integer width = 402
  157. integer height = 60
  158. integer textsize = -9
  159. integer weight = 400
  160. fontcharset fontcharset = gb2312charset!
  161. fontpitch fontpitch = variable!
  162. string facename = "宋体"
  163. long textcolor = 33554432
  164. long backcolor = 134217739
  165. string text = "直接运算"
  166. end type
  167. type rb_1 from radiobutton within w_order_ml_mrp_ch
  168. integer x = 178
  169. integer y = 84
  170. integer width = 402
  171. integer height = 60
  172. integer textsize = -9
  173. integer weight = 400
  174. fontcharset fontcharset = gb2312charset!
  175. fontpitch fontpitch = variable!
  176. string facename = "宋体"
  177. long textcolor = 33554432
  178. long backcolor = 134217739
  179. string text = "可视运算"
  180. boolean checked = true
  181. end type
  182. type cb_2 from uo_imflatbutton within w_order_ml_mrp_ch
  183. integer x = 873
  184. integer y = 616
  185. integer width = 311
  186. integer taborder = 20
  187. string text = "取消"
  188. string normalpicname = "exit.bmp"
  189. end type
  190. event clicked;call super::clicked;s_mrp.mrptype = 0
  191. Close(PARENT)
  192. end event
  193. type cb_1 from uo_imflatbutton within w_order_ml_mrp_ch
  194. integer x = 402
  195. integer y = 616
  196. integer width = 311
  197. integer taborder = 10
  198. string normalpicname = "ok.bmp"
  199. end type
  200. event clicked;call super::clicked;IF rb_1.Checked THEN
  201. s_mrp.mrptype = 1
  202. ELSE
  203. s_mrp.mrptype = 2
  204. END IF
  205. IF cbx_if_allowuse.Checked THEN
  206. s_mrp.if_allowuse = 1
  207. ELSE
  208. s_mrp.if_allowuse = 0
  209. END IF
  210. s_mrp.ifbuy_mtrl_not_useqty = cbx_ifbuy_mtrl_not_useqty.Checked
  211. s_mrp.ifwx_mtrl_not_useqty = cbx_ifwx_mtrl_not_useqty.Checked
  212. Close(PARENT)
  213. end event