$PBExportHeader$w_cmpl_addqty_ch_sale.srw forward global type w_cmpl_addqty_ch_sale from w_publ_base end type type cb_1 from uo_imflatbutton within w_cmpl_addqty_ch_sale end type type sle_1 from singlelineedit within w_cmpl_addqty_ch_sale end type type rb_1 from radiobutton within w_cmpl_addqty_ch_sale end type type rb_2 from radiobutton within w_cmpl_addqty_ch_sale end type type st_1 from statictext within w_cmpl_addqty_ch_sale end type type st_2 from statictext within w_cmpl_addqty_ch_sale end type type st_3 from statictext within w_cmpl_addqty_ch_sale end type type em_1 from editmask within w_cmpl_addqty_ch_sale end type end forward global type w_cmpl_addqty_ch_sale from w_publ_base integer width = 1198 integer height = 572 string title = "设定公式" boolean minbox = false windowtype windowtype = response! cb_1 cb_1 sle_1 sle_1 rb_1 rb_1 rb_2 rb_2 st_1 st_1 st_2 st_2 st_3 st_3 em_1 em_1 end type global w_cmpl_addqty_ch_sale w_cmpl_addqty_ch_sale type variables string ls_value long ll_flag string ls_num s_cmpl_addqty s_cmpl end variables on w_cmpl_addqty_ch_sale.create int iCurrent call super::create this.cb_1=create cb_1 this.sle_1=create sle_1 this.rb_1=create rb_1 this.rb_2=create rb_2 this.st_1=create st_1 this.st_2=create st_2 this.st_3=create st_3 this.em_1=create em_1 iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.cb_1 this.Control[iCurrent+2]=this.sle_1 this.Control[iCurrent+3]=this.rb_1 this.Control[iCurrent+4]=this.rb_2 this.Control[iCurrent+5]=this.st_1 this.Control[iCurrent+6]=this.st_2 this.Control[iCurrent+7]=this.st_3 this.Control[iCurrent+8]=this.em_1 end on on w_cmpl_addqty_ch_sale.destroy call super::destroy destroy(this.cb_1) destroy(this.sle_1) destroy(this.rb_1) destroy(this.rb_2) destroy(this.st_1) destroy(this.st_2) destroy(this.st_3) destroy(this.em_1) end on event close;call super::close;closewithreturn(this,s_cmpl) end event event open;call super::open; ls_value = f_ProfileString (sys_empid,'w_cmpl_addqty_ch_sale', "value",'0') ll_flag = Long(f_ProfileString (sys_empid,'w_cmpl_addqty_ch_sale', "flag",'0')) ls_num = f_ProfileString (sys_empid,'w_cmpl_addqty_ch_sale', "num",'0') IF ll_flag = 0 THEN rb_1.Checked = TRUE ELSE rb_2.Checked = TRUE END IF sle_1.Text = ls_value em_1.text = ls_num end event type cb_func from w_publ_base`cb_func within w_cmpl_addqty_ch_sale boolean visible = false end type type cb_exit from w_publ_base`cb_exit within w_cmpl_addqty_ch_sale integer x = 626 integer y = 364 integer width = 302 integer height = 100 end type type cb_1 from uo_imflatbutton within w_cmpl_addqty_ch_sale integer x = 215 integer y = 364 integer taborder = 20 boolean bringtotop = true string normalpicname = "ok.bmp" end type event clicked;call super::clicked;ls_value = sle_1.text ls_num = em_1.text if rb_1.checked then ll_flag = 0 elseif rb_2.checked then ll_flag = 1 end if f_SetProfileString (sys_empid, "w_cmpl_addqty_ch_sale", "flag", string(ll_flag)) f_SetProfileString (sys_empid, "w_cmpl_addqty_ch_sale", "value", ls_value) f_SetProfileString (sys_empid, "w_cmpl_addqty_ch_sale", "num",ls_num) s_cmpl.flag = ll_flag s_cmpl.addvalue = dec(ls_value) s_cmpl.num= long(ls_num) close(parent) end event type sle_1 from singlelineedit within w_cmpl_addqty_ch_sale integer x = 608 integer y = 80 integer width = 279 integer height = 84 integer taborder = 30 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 borderstyle borderstyle = stylelowered! end type type rb_1 from radiobutton within w_cmpl_addqty_ch_sale integer x = 443 integer y = 56 integer width = 155 integer height = 60 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217738 string text = "*" end type type rb_2 from radiobutton within w_cmpl_addqty_ch_sale integer x = 443 integer y = 136 integer width = 160 integer height = 56 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217738 string text = "/" end type type st_1 from statictext within w_cmpl_addqty_ch_sale integer x = 73 integer y = 96 integer width = 315 integer height = 64 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217738 string text = "规格 * 数量" boolean focusrectangle = false end type type st_2 from statictext within w_cmpl_addqty_ch_sale integer x = 923 integer y = 88 integer width = 224 integer height = 64 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217738 string text = "= 辅数" boolean focusrectangle = false end type type st_3 from statictext within w_cmpl_addqty_ch_sale integer x = 325 integer y = 244 integer width = 201 integer height = 56 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217738 string text = "小数位:" alignment alignment = right! boolean focusrectangle = false end type type em_1 from editmask within w_cmpl_addqty_ch_sale integer x = 530 integer y = 232 integer width = 238 integer height = 84 integer taborder = 40 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 alignment alignment = right! borderstyle borderstyle = stylelowered! string mask = "###0" boolean spin = true double increment = 1 string minmax = "0~~5" end type