123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297 |
- $PBExportHeader$w_order_ml_mrp_change.srw
- forward
- global type w_order_ml_mrp_change from window
- end type
- type st_4 from statictext within w_order_ml_mrp_change
- end type
- type em_s_qty from editmask within w_order_ml_mrp_change
- end type
- type st_3 from statictext within w_order_ml_mrp_change
- end type
- type st_2 from statictext within w_order_ml_mrp_change
- end type
- type st_1 from statictext within w_order_ml_mrp_change
- end type
- type ddlb_s_plantype from uo_ddlb_mtrlorigin within w_order_ml_mrp_change
- end type
- type ddlb_c_plantype from uo_ddlb_mtrlorigin within w_order_ml_mrp_change
- end type
- type em_c_qty from editmask within w_order_ml_mrp_change
- end type
- type cb_2 from uo_imflatbutton within w_order_ml_mrp_change
- end type
- type cb_1 from uo_imflatbutton within w_order_ml_mrp_change
- end type
- end forward
- global type w_order_ml_mrp_change from window
- integer width = 1486
- integer height = 992
- boolean titlebar = true
- string title = "生产计划物料变更"
- boolean controlmenu = true
- windowtype windowtype = response!
- long backcolor = 134217739
- string icon = "AppIcon!"
- boolean center = true
- st_4 st_4
- em_s_qty em_s_qty
- st_3 st_3
- st_2 st_2
- st_1 st_1
- ddlb_s_plantype ddlb_s_plantype
- ddlb_c_plantype ddlb_c_plantype
- em_c_qty em_c_qty
- cb_2 cb_2
- cb_1 cb_1
- end type
- global w_order_ml_mrp_change w_order_ml_mrp_change
- type variables
- s_order_ml_mrp_change s_change,s_change_open
- end variables
- on w_order_ml_mrp_change.create
- this.st_4=create st_4
- this.em_s_qty=create em_s_qty
- this.st_3=create st_3
- this.st_2=create st_2
- this.st_1=create st_1
- this.ddlb_s_plantype=create ddlb_s_plantype
- this.ddlb_c_plantype=create ddlb_c_plantype
- this.em_c_qty=create em_c_qty
- this.cb_2=create cb_2
- this.cb_1=create cb_1
- this.Control[]={this.st_4,&
- this.em_s_qty,&
- this.st_3,&
- this.st_2,&
- this.st_1,&
- this.ddlb_s_plantype,&
- this.ddlb_c_plantype,&
- this.em_c_qty,&
- this.cb_2,&
- this.cb_1}
- end on
- on w_order_ml_mrp_change.destroy
- destroy(this.st_4)
- destroy(this.em_s_qty)
- destroy(this.st_3)
- destroy(this.st_2)
- destroy(this.st_1)
- destroy(this.ddlb_s_plantype)
- destroy(this.ddlb_c_plantype)
- destroy(this.em_c_qty)
- destroy(this.cb_2)
- destroy(this.cb_1)
- end on
- event open;s_change_open = Message.PowerObjectParm
- IF s_change_open.s_plantype = 0 THEN
- ddlb_s_plantype.Text = "自制产品[0]"
- ELSEIF s_change_open.s_plantype = 1 THEN
- ddlb_s_plantype.Text = "产品包装件[1]"
- ELSEIF s_change_open.s_plantype = 2 THEN
- ddlb_s_plantype.Text = "采购[2]"
- ELSEIF s_change_open.s_plantype = 3 THEN
- ddlb_s_plantype.Text = "外协部件[3]"
- ELSEIF s_change_open.s_plantype = 4 THEN
- ddlb_s_plantype.Text = "自制部件[4]"
- ELSEIF s_change_open.s_plantype = 6 THEN
- ddlb_s_plantype.Text = "来料加工[6]"
- END IF
- em_s_qty.Text = String(s_change_open.s_qty)
- end event
- event close;CloseWithReturn(THIS,s_change)
- end event
- type st_4 from statictext within w_order_ml_mrp_change
- integer x = 233
- integer y = 276
- integer width = 402
- integer height = 48
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217739
- string text = "现处理数量"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type em_s_qty from editmask within w_order_ml_mrp_change
- integer x = 663
- integer y = 260
- integer width = 489
- integer height = 84
- integer taborder = 20
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- boolean enabled = false
- string text = "0"
- borderstyle borderstyle = stylelowered!
- string mask = "###,##0.0####"
- end type
- type st_3 from statictext within w_order_ml_mrp_change
- integer x = 233
- integer y = 488
- integer width = 402
- integer height = 48
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217739
- string text = "变更处理数量"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type st_2 from statictext within w_order_ml_mrp_change
- integer x = 233
- integer y = 380
- integer width = 402
- integer height = 48
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217739
- string text = "变更处理方法"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type st_1 from statictext within w_order_ml_mrp_change
- integer x = 233
- integer y = 176
- integer width = 402
- integer height = 48
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217739
- string text = "现处理方法"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type ddlb_s_plantype from uo_ddlb_mtrlorigin within w_order_ml_mrp_change
- integer x = 663
- integer y = 160
- integer width = 489
- integer taborder = 10
- boolean enabled = false
- end type
- type ddlb_c_plantype from uo_ddlb_mtrlorigin within w_order_ml_mrp_change
- integer x = 663
- integer y = 368
- integer width = 489
- integer taborder = 20
- end type
- type em_c_qty from editmask within w_order_ml_mrp_change
- integer x = 663
- integer y = 472
- integer width = 489
- integer height = 84
- integer taborder = 10
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- string text = "0"
- borderstyle borderstyle = stylelowered!
- string mask = "###,##0.0####"
- end type
- type cb_2 from uo_imflatbutton within w_order_ml_mrp_change
- integer x = 800
- integer y = 668
- integer width = 311
- integer taborder = 20
- string text = "取消"
- string normalpicname = "exit.bmp"
- end type
- event clicked;call super::clicked;s_change.ifchanged = 0
- Close(PARENT)
- end event
- type cb_1 from uo_imflatbutton within w_order_ml_mrp_change
- integer x = 329
- integer y = 668
- integer width = 311
- integer taborder = 10
- string normalpicname = "ok.bmp"
- end type
- event clicked;call super::clicked;IF ddlb_c_plantype.uo_mtrlorigin = -1 THEN
- MessageBox('提示','请选择正确的变更处理方法')
- RETURN
- END IF
- IF ddlb_c_plantype.text = ddlb_s_plantype.text THEN
- MessageBox('提示','变更处理方法相同,不能操作')
- RETURN
- END IF
- IF s_change_open.ordertype <> 6 AND &
- ddlb_c_plantype.uo_mtrlorigin = 6 THEN
- MessageBox('提示','不是来料加工计划不能选择客户来料')
- RETURN
- END IF
- IF Dec(em_c_qty.Text) <= 0 THEN
- MessageBox('提示','请输入正确的变更处理数量')
- RETURN
- END IF
- IF Dec(em_c_qty.Text) >= Dec(em_s_qty.Text) THEN
- MessageBox('提示','变更处理数量只能少于现处理数量')
- RETURN
- END IF
- s_change.ifchanged = 1
- s_change.c_plantype = ddlb_c_plantype.uo_mtrlorigin
- s_change.c_qty = Dec(em_c_qty.Text)
- Close(PARENT)
- end event
|