w_order_ml_mrp_change.srw 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. $PBExportHeader$w_order_ml_mrp_change.srw
  2. forward
  3. global type w_order_ml_mrp_change from window
  4. end type
  5. type st_4 from statictext within w_order_ml_mrp_change
  6. end type
  7. type em_s_qty from editmask within w_order_ml_mrp_change
  8. end type
  9. type st_3 from statictext within w_order_ml_mrp_change
  10. end type
  11. type st_2 from statictext within w_order_ml_mrp_change
  12. end type
  13. type st_1 from statictext within w_order_ml_mrp_change
  14. end type
  15. type ddlb_s_plantype from uo_ddlb_mtrlorigin within w_order_ml_mrp_change
  16. end type
  17. type ddlb_c_plantype from uo_ddlb_mtrlorigin within w_order_ml_mrp_change
  18. end type
  19. type em_c_qty from editmask within w_order_ml_mrp_change
  20. end type
  21. type cb_2 from uo_imflatbutton within w_order_ml_mrp_change
  22. end type
  23. type cb_1 from uo_imflatbutton within w_order_ml_mrp_change
  24. end type
  25. end forward
  26. global type w_order_ml_mrp_change from window
  27. integer width = 1486
  28. integer height = 992
  29. boolean titlebar = true
  30. string title = "生产计划物料变更"
  31. boolean controlmenu = true
  32. windowtype windowtype = response!
  33. long backcolor = 134217739
  34. string icon = "AppIcon!"
  35. boolean center = true
  36. st_4 st_4
  37. em_s_qty em_s_qty
  38. st_3 st_3
  39. st_2 st_2
  40. st_1 st_1
  41. ddlb_s_plantype ddlb_s_plantype
  42. ddlb_c_plantype ddlb_c_plantype
  43. em_c_qty em_c_qty
  44. cb_2 cb_2
  45. cb_1 cb_1
  46. end type
  47. global w_order_ml_mrp_change w_order_ml_mrp_change
  48. type variables
  49. s_order_ml_mrp_change s_change,s_change_open
  50. end variables
  51. on w_order_ml_mrp_change.create
  52. this.st_4=create st_4
  53. this.em_s_qty=create em_s_qty
  54. this.st_3=create st_3
  55. this.st_2=create st_2
  56. this.st_1=create st_1
  57. this.ddlb_s_plantype=create ddlb_s_plantype
  58. this.ddlb_c_plantype=create ddlb_c_plantype
  59. this.em_c_qty=create em_c_qty
  60. this.cb_2=create cb_2
  61. this.cb_1=create cb_1
  62. this.Control[]={this.st_4,&
  63. this.em_s_qty,&
  64. this.st_3,&
  65. this.st_2,&
  66. this.st_1,&
  67. this.ddlb_s_plantype,&
  68. this.ddlb_c_plantype,&
  69. this.em_c_qty,&
  70. this.cb_2,&
  71. this.cb_1}
  72. end on
  73. on w_order_ml_mrp_change.destroy
  74. destroy(this.st_4)
  75. destroy(this.em_s_qty)
  76. destroy(this.st_3)
  77. destroy(this.st_2)
  78. destroy(this.st_1)
  79. destroy(this.ddlb_s_plantype)
  80. destroy(this.ddlb_c_plantype)
  81. destroy(this.em_c_qty)
  82. destroy(this.cb_2)
  83. destroy(this.cb_1)
  84. end on
  85. event open;s_change_open = Message.PowerObjectParm
  86. IF s_change_open.s_plantype = 0 THEN
  87. ddlb_s_plantype.Text = "自制产品[0]"
  88. ELSEIF s_change_open.s_plantype = 1 THEN
  89. ddlb_s_plantype.Text = "产品包装件[1]"
  90. ELSEIF s_change_open.s_plantype = 2 THEN
  91. ddlb_s_plantype.Text = "采购[2]"
  92. ELSEIF s_change_open.s_plantype = 3 THEN
  93. ddlb_s_plantype.Text = "外协部件[3]"
  94. ELSEIF s_change_open.s_plantype = 4 THEN
  95. ddlb_s_plantype.Text = "自制部件[4]"
  96. ELSEIF s_change_open.s_plantype = 6 THEN
  97. ddlb_s_plantype.Text = "来料加工[6]"
  98. END IF
  99. em_s_qty.Text = String(s_change_open.s_qty)
  100. end event
  101. event close;CloseWithReturn(THIS,s_change)
  102. end event
  103. type st_4 from statictext within w_order_ml_mrp_change
  104. integer x = 233
  105. integer y = 276
  106. integer width = 402
  107. integer height = 48
  108. integer textsize = -9
  109. integer weight = 400
  110. fontcharset fontcharset = gb2312charset!
  111. fontpitch fontpitch = variable!
  112. string facename = "宋体"
  113. long textcolor = 33554432
  114. long backcolor = 134217739
  115. string text = "现处理数量"
  116. alignment alignment = right!
  117. boolean focusrectangle = false
  118. end type
  119. type em_s_qty from editmask within w_order_ml_mrp_change
  120. integer x = 663
  121. integer y = 260
  122. integer width = 489
  123. integer height = 84
  124. integer taborder = 20
  125. integer textsize = -9
  126. integer weight = 400
  127. fontcharset fontcharset = gb2312charset!
  128. fontpitch fontpitch = variable!
  129. string facename = "宋体"
  130. long textcolor = 33554432
  131. boolean enabled = false
  132. string text = "0"
  133. borderstyle borderstyle = stylelowered!
  134. string mask = "###,##0.0####"
  135. end type
  136. type st_3 from statictext within w_order_ml_mrp_change
  137. integer x = 233
  138. integer y = 488
  139. integer width = 402
  140. integer height = 48
  141. integer textsize = -9
  142. integer weight = 400
  143. fontcharset fontcharset = gb2312charset!
  144. fontpitch fontpitch = variable!
  145. string facename = "宋体"
  146. long textcolor = 33554432
  147. long backcolor = 134217739
  148. string text = "变更处理数量"
  149. alignment alignment = right!
  150. boolean focusrectangle = false
  151. end type
  152. type st_2 from statictext within w_order_ml_mrp_change
  153. integer x = 233
  154. integer y = 380
  155. integer width = 402
  156. integer height = 48
  157. integer textsize = -9
  158. integer weight = 400
  159. fontcharset fontcharset = gb2312charset!
  160. fontpitch fontpitch = variable!
  161. string facename = "宋体"
  162. long textcolor = 33554432
  163. long backcolor = 134217739
  164. string text = "变更处理方法"
  165. alignment alignment = right!
  166. boolean focusrectangle = false
  167. end type
  168. type st_1 from statictext within w_order_ml_mrp_change
  169. integer x = 233
  170. integer y = 176
  171. integer width = 402
  172. integer height = 48
  173. integer textsize = -9
  174. integer weight = 400
  175. fontcharset fontcharset = gb2312charset!
  176. fontpitch fontpitch = variable!
  177. string facename = "宋体"
  178. long textcolor = 33554432
  179. long backcolor = 134217739
  180. string text = "现处理方法"
  181. alignment alignment = right!
  182. boolean focusrectangle = false
  183. end type
  184. type ddlb_s_plantype from uo_ddlb_mtrlorigin within w_order_ml_mrp_change
  185. integer x = 663
  186. integer y = 160
  187. integer width = 489
  188. integer taborder = 10
  189. boolean enabled = false
  190. end type
  191. type ddlb_c_plantype from uo_ddlb_mtrlorigin within w_order_ml_mrp_change
  192. integer x = 663
  193. integer y = 368
  194. integer width = 489
  195. integer taborder = 20
  196. end type
  197. type em_c_qty from editmask within w_order_ml_mrp_change
  198. integer x = 663
  199. integer y = 472
  200. integer width = 489
  201. integer height = 84
  202. integer taborder = 10
  203. integer textsize = -9
  204. integer weight = 400
  205. fontcharset fontcharset = gb2312charset!
  206. fontpitch fontpitch = variable!
  207. string facename = "宋体"
  208. long textcolor = 33554432
  209. string text = "0"
  210. borderstyle borderstyle = stylelowered!
  211. string mask = "###,##0.0####"
  212. end type
  213. type cb_2 from uo_imflatbutton within w_order_ml_mrp_change
  214. integer x = 800
  215. integer y = 668
  216. integer width = 311
  217. integer taborder = 20
  218. string text = "取消"
  219. string normalpicname = "exit.bmp"
  220. end type
  221. event clicked;call super::clicked;s_change.ifchanged = 0
  222. Close(PARENT)
  223. end event
  224. type cb_1 from uo_imflatbutton within w_order_ml_mrp_change
  225. integer x = 329
  226. integer y = 668
  227. integer width = 311
  228. integer taborder = 10
  229. string normalpicname = "ok.bmp"
  230. end type
  231. event clicked;call super::clicked;IF ddlb_c_plantype.uo_mtrlorigin = -1 THEN
  232. MessageBox('提示','请选择正确的变更处理方法')
  233. RETURN
  234. END IF
  235. IF ddlb_c_plantype.text = ddlb_s_plantype.text THEN
  236. MessageBox('提示','变更处理方法相同,不能操作')
  237. RETURN
  238. END IF
  239. IF s_change_open.ordertype <> 6 AND &
  240. ddlb_c_plantype.uo_mtrlorigin = 6 THEN
  241. MessageBox('提示','不是来料加工计划不能选择客户来料')
  242. RETURN
  243. END IF
  244. IF Dec(em_c_qty.Text) <= 0 THEN
  245. MessageBox('提示','请输入正确的变更处理数量')
  246. RETURN
  247. END IF
  248. IF Dec(em_c_qty.Text) >= Dec(em_s_qty.Text) THEN
  249. MessageBox('提示','变更处理数量只能少于现处理数量')
  250. RETURN
  251. END IF
  252. s_change.ifchanged = 1
  253. s_change.c_plantype = ddlb_c_plantype.uo_mtrlorigin
  254. s_change.c_qty = Dec(em_c_qty.Text)
  255. Close(PARENT)
  256. end event