$PBExportHeader$w_mtrldef_edit_cost_cmp.srw forward global type w_mtrldef_edit_cost_cmp from w_publ_easyq end type type tv_1 from uo_tv_mtrltype within w_mtrldef_edit_cost_cmp end type type ddlb_mtrlprp from uo_ddlb_mtrlorigin within w_mtrldef_edit_cost_cmp end type type cbx_1 from checkbox within w_mtrldef_edit_cost_cmp end type end forward global type w_mtrldef_edit_cost_cmp from w_publ_easyq integer width = 3675 string title = "产品计划价统计历史查询" event ue_p_unit_buy ( ) event ue_p_unit_scll ( ) event ue_p_unit_sale ( ) event ue_p_rate_buy ( ) event ue_p_rate_scll ( ) event ue_p_rate_sale ( ) event ue_p_unit ( ) event ue_p_mtrlorigin ( ) event ue_p_mtrlprp ( ) tv_1 tv_1 ddlb_mtrlprp ddlb_mtrlprp cbx_1 cbx_1 end type global w_mtrldef_edit_cost_cmp w_mtrldef_edit_cost_cmp type variables int cur_mtrlorigin = 0 string ls_handtype = '' uo_mtrldef uo_mtrl long cmpid s_edit_index_tran s_tran end variables event ue_p_unit_buy();IF MessageBox('提示','是否要确定要批设定辅单位1', question!, YesNo!, 2) = 2 THEN RETURN END IF Long ll_i dw_1.AcceptText() dw_1.SetRedraw(FALSE) FOR ll_i = 1 TO dw_1.RowCount() IF ll_i = 1 THEN CONTINUE dw_1.Object.unit_buy[ll_i] = dw_1.Object.unit_buy[1] NEXT dw_1.SetRedraw(TRUE) end event event ue_p_unit_scll();IF MessageBox('提示','是否要确定要批设定辅单位2', question!, YesNo!, 2) = 2 THEN RETURN END IF Long ll_i dw_1.AcceptText() dw_1.SetRedraw(FALSE) FOR ll_i = 1 TO dw_1.RowCount() IF ll_i = 1 THEN CONTINUE dw_1.Object.unit_scll[ll_i] = dw_1.Object.unit_scll[1] NEXT dw_1.SetRedraw(TRUE) end event event ue_p_unit_sale();IF MessageBox('提示','是否要确定要批设定辅单位3', question!, YesNo!, 2) = 2 THEN RETURN END IF Long ll_i dw_1.AcceptText() dw_1.SetRedraw(FALSE) FOR ll_i = 1 TO dw_1.RowCount() IF ll_i = 1 THEN CONTINUE dw_1.Object.unit_sale[ll_i] = dw_1.Object.unit_sale[1] NEXT dw_1.SetRedraw(TRUE) end event event ue_p_rate_buy();IF MessageBox('提示','是否要确定要批设定转换率1', question!, YesNo!, 2) = 2 THEN RETURN END IF Long ll_i dw_1.AcceptText() dw_1.SetRedraw(FALSE) FOR ll_i = 1 TO dw_1.RowCount() IF ll_i = 1 THEN CONTINUE dw_1.Object.rate_buy[ll_i] = dw_1.Object.rate_buy[1] NEXT dw_1.SetRedraw(TRUE) end event event ue_p_rate_scll();IF MessageBox('提示','是否要确定要批设定转换率2', question!, YesNo!, 2) = 2 THEN RETURN END IF Long ll_i dw_1.AcceptText() dw_1.SetRedraw(FALSE) FOR ll_i = 1 TO dw_1.RowCount() IF ll_i = 1 THEN CONTINUE dw_1.Object.rate_scll[ll_i] = dw_1.Object.rate_scll[1] NEXT dw_1.SetRedraw(TRUE) end event event ue_p_rate_sale();IF MessageBox('提示','是否要确定要批设定转换率3', question!, YesNo!, 2) = 2 THEN RETURN END IF Long ll_i dw_1.AcceptText() dw_1.SetRedraw(FALSE) FOR ll_i = 1 TO dw_1.RowCount() IF ll_i = 1 THEN CONTINUE dw_1.Object.rate_sale[ll_i] = dw_1.Object.rate_sale[1] NEXT dw_1.SetRedraw(TRUE) end event event ue_p_unit();IF MessageBox('提示','是否要确定要批设定单位', question!, YesNo!, 2) = 2 THEN RETURN END IF Long ll_i dw_1.AcceptText() dw_1.SetRedraw(FALSE) FOR ll_i = 1 TO dw_1.RowCount() IF ll_i = 1 THEN CONTINUE dw_1.Object.unit[ll_i] = dw_1.Object.unit[1] NEXT dw_1.SetRedraw(TRUE) end event event ue_p_mtrlorigin();IF MessageBox('提示','是否要确定要批设定物料来源', question!, YesNo!, 2) = 2 THEN RETURN END IF Long ll_i Long ll_mtrlorigin s_mtrlorigin rls_mtrlorigin Open(w_mtrlorigin_ch) rls_mtrlorigin = Message.PowerObjectParm IF rls_mtrlorigin.mtrloriginid >= 0 THEN dw_1.AcceptText() dw_1.SetRedraw(FALSE) FOR ll_i = 1 TO dw_1.RowCount() IF dw_1.Object.isselect[ll_i] = 1 THEN dw_1.Object.mtrlorigin[ll_i] = rls_mtrlorigin.mtrloriginid END IF NEXT dw_1.SetRedraw(TRUE) END IF end event event ue_p_mtrlprp();IF MessageBox('提示','是否要确定要批设定物料属性', question!, YesNo!, 2) = 2 THEN RETURN END IF Long ll_i s_mtrlprp rls_mtrlprp Open(w_mtrlprp_ch) rls_mtrlprp = Message.PowerObjectParm IF rls_mtrlprp.mtrlprpid >= 0 THEN dw_1.AcceptText() dw_1.SetRedraw(FALSE) FOR ll_i = 1 TO dw_1.RowCount() IF dw_1.Object.isselect[ll_i] = 1 THEN dw_1.Object.mtrlprp[ll_i] = rls_mtrlprp.mtrlprpid END IF NEXT dw_1.SetRedraw(TRUE) END IF end event on w_mtrldef_edit_cost_cmp.create int iCurrent call super::create this.tv_1=create tv_1 this.ddlb_mtrlprp=create ddlb_mtrlprp this.cbx_1=create cbx_1 iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.tv_1 this.Control[iCurrent+2]=this.ddlb_mtrlprp this.Control[iCurrent+3]=this.cbx_1 end on on w_mtrldef_edit_cost_cmp.destroy call super::destroy destroy(this.tv_1) destroy(this.ddlb_mtrlprp) destroy(this.cbx_1) end on event resize;ln_bar.endx = this.width ln_bar2.endx = this.width ln_1.endx = this.width ln_2.endx = this.width ln_3.endx = this.width ln_4.endx = this.width r_bar.width = this.width dw_1.height=this.height - dw_1.y - 150 tv_1.height=this.height - tv_1.y - 150 dw_1.width=this.width - dw_1.x - 40 end event event open;call super::open;s_tran = Message.PowerObjectParm cmpid = s_tran.b_long cb_1.triggerevent(clicked!) end event event ue_before_open;call super::ue_before_open;if_ue_retr=true if_ue_filter=true if_ue_sort=true if_ue_sentdataout=true end event event close;call super::close;destroy uo_mtrl end event type cb_func from w_publ_easyq`cb_func within w_mtrldef_edit_cost_cmp end type type cb_exit from w_publ_easyq`cb_exit within w_mtrldef_edit_cost_cmp integer x = 859 end type type cb_2 from w_publ_easyq`cb_2 within w_mtrldef_edit_cost_cmp integer x = 558 integer taborder = 100 boolean bringtotop = true end type type cb_psetup from w_publ_easyq`cb_psetup within w_mtrldef_edit_cost_cmp integer x = 302 boolean bringtotop = true end type type cb_1 from w_publ_easyq`cb_1 within w_mtrldef_edit_cost_cmp boolean bringtotop = true end type event cb_1::clicked;call super::clicked;Int li_isuse IF cbx_1.Checked THEN li_isuse = 1 ELSE li_isuse = -1 END IF dw_1.Retrieve(cmpid,cur_mtrlorigin,ls_handtype,li_isuse) end event type st_3 from w_publ_easyq`st_3 within w_mtrldef_edit_cost_cmp boolean visible = false integer x = 1641 integer y = 648 end type type st_4 from w_publ_easyq`st_4 within w_mtrldef_edit_cost_cmp boolean visible = false integer x = 1655 integer y = 552 end type type em_1 from w_publ_easyq`em_1 within w_mtrldef_edit_cost_cmp boolean visible = false integer x = 1221 integer y = 480 integer taborder = 110 end type type em_2 from w_publ_easyq`em_2 within w_mtrldef_edit_cost_cmp boolean visible = false integer x = 1737 integer y = 356 integer taborder = 140 end type type ddlb_yl from w_publ_easyq`ddlb_yl within w_mtrldef_edit_cost_cmp integer x = 1275 integer y = 32 end type type cbx_yl from w_publ_easyq`cbx_yl within w_mtrldef_edit_cost_cmp integer x = 1070 integer y = 36 end type type dw_1 from w_publ_easyq`dw_1 within w_mtrldef_edit_cost_cmp integer x = 919 integer y = 288 integer width = 3589 integer height = 1984 string dataobject = "dw_mtrldef_costmx_cmp" end type event dw_1::rowfocuschanged;IF currentrow > 0 THEN THIS.SelectRow(0,FALSE) THIS.SelectRow(currentrow,TRUE) END IF end event event dw_1::clicked;call super::clicked;IF row <=0 THEN RETURN this.selectrow(0,false) this.selectrow(row,true) this.setrow(row) end event type sle_mtrl from w_publ_easyq`sle_mtrl within w_mtrldef_edit_cost_cmp end type type sle_cust from w_publ_easyq`sle_cust within w_mtrldef_edit_cost_cmp end type type st_mtrl from w_publ_easyq`st_mtrl within w_mtrldef_edit_cost_cmp end type type st_cust from w_publ_easyq`st_cust within w_mtrldef_edit_cost_cmp end type type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_mtrldef_edit_cost_cmp end type type pb_em1 from w_publ_easyq`pb_em1 within w_mtrldef_edit_cost_cmp boolean visible = false end type type pb_em2 from w_publ_easyq`pb_em2 within w_mtrldef_edit_cost_cmp boolean visible = false end type type pb_2 from w_publ_easyq`pb_2 within w_mtrldef_edit_cost_cmp boolean visible = false end type type cb_help from w_publ_easyq`cb_help within w_mtrldef_edit_cost_cmp integer x = 709 end type type cb_copyself from w_publ_easyq`cb_copyself within w_mtrldef_edit_cost_cmp boolean visible = false integer x = 411 end type type gb_1 from w_publ_easyq`gb_1 within w_mtrldef_edit_cost_cmp integer x = 1463 integer y = 476 integer width = 599 end type type ln_bar from w_publ_easyq`ln_bar within w_mtrldef_edit_cost_cmp end type type ln_bar2 from w_publ_easyq`ln_bar2 within w_mtrldef_edit_cost_cmp end type type r_bar from w_publ_easyq`r_bar within w_mtrldef_edit_cost_cmp integer x = 3374 integer y = 32 end type type ln_1 from w_publ_easyq`ln_1 within w_mtrldef_edit_cost_cmp integer beginy = 280 integer endy = 280 end type type ln_2 from w_publ_easyq`ln_2 within w_mtrldef_edit_cost_cmp integer beginy = 284 integer endy = 284 end type type ln_3 from w_publ_easyq`ln_3 within w_mtrldef_edit_cost_cmp boolean visible = false end type type ln_4 from w_publ_easyq`ln_4 within w_mtrldef_edit_cost_cmp boolean visible = false end type type tv_1 from uo_tv_mtrltype within w_mtrldef_edit_cost_cmp integer y = 288 integer width = 905 integer height = 1984 integer taborder = 70 boolean bringtotop = true integer textsize = -9 fontcharset fontcharset = gb2312charset! fontfamily fontfamily = anyfont! string facename = "宋体" end type event selectionchanged;call super::selectionchanged; IF dw_edit_mode THEN IF dw_1.GetRow() <= 0 THEN RETURN IF THIS.uo_cur_info.sonflag = 1 THEN dw_1.SetRedraw(FALSE) dw_1.Object.mtrltypeid[dw_1.GetRow()] = THIS.uo_cur_info.mtrltypeid dw_1.Object.mtrltype[dw_1.GetRow()] = THIS.uo_cur_info.mtrltype dw_1.Object.handtype[dw_1.GetRow()] = THIS.uo_cur_info.handtype dw_1.Object.mtrlorigin[dw_1.GetRow()] = THIS.uo_cur_info.mtrlprp dw_1.SetRedraw(TRUE) END IF ELSE ls_handtype = THIS.uo_cur_info.handtype ls_handtype = ls_handtype + '%' cb_1.TriggerEvent(Clicked!) END IF end event type ddlb_mtrlprp from uo_ddlb_mtrlorigin within w_mtrldef_edit_cost_cmp integer x = 14 integer y = 188 integer width = 517 integer height = 480 integer taborder = 50 boolean bringtotop = true end type event selectionchanged;call super::selectionchanged;cur_mtrlorigin = this.uo_mtrlorigin cb_1.triggerevent(clicked!) end event type cbx_1 from checkbox within w_mtrldef_edit_cost_cmp integer x = 549 integer y = 196 integer width = 402 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 = 134217739 string text = "只显示有效" boolean checked = true end type event clicked;cb_1.triggerevent(clicked!) end event