$PBExportHeader$w_inware_buytask_ch.srw forward global type w_inware_buytask_ch from w_pageretr_ch end type type cbx_mlselect from checkbox within w_inware_buytask_ch end type type cbx_allselect from checkbox within w_inware_buytask_ch end type type cb_ok from uo_imflatbutton within w_inware_buytask_ch end type type cb_del from uo_imflatbutton within w_inware_buytask_ch end type type cbx_ml from checkbox within w_inware_buytask_ch end type type cb_other from uo_imflatbutton within w_inware_buytask_ch end type type dw_choice from u_dw_rbtnfilter within w_inware_buytask_ch end type end forward global type w_inware_buytask_ch from w_pageretr_ch integer width = 4690 integer height = 2380 string title = "采购订单选择" event ue_retrieve_info ( ) cbx_mlselect cbx_mlselect cbx_allselect cbx_allselect cb_ok cb_ok cb_del cb_del cbx_ml cbx_ml cb_other cb_other dw_choice dw_choice end type global w_inware_buytask_ch w_inware_buytask_ch type variables s_mtrldef_buytask_array INS_RT_STRU boolean if_changeselect=true int if_mlselect=0 long cur_sptid end variables forward prototypes public function integer wf_face_change () end prototypes event ue_retrieve_info();Long ll_row Long ll_mtrlid ll_row = dw_pageretr.GetRow() IF ll_row <= 0 THEN ll_mtrlid = 0 ELSE ll_mtrlid = dw_pageretr.Object.u_buytaskmx_mtrlid[ll_row] END IF IF IsValid(w_mtrl_info) THEN w_mtrl_info.WindowState = Normal! w_mtrl_info.ins_mtrlid = ll_mtrlid w_mtrl_info.wf_retrieve(ll_mtrlid) END IF end event public function integer wf_face_change ();//wf_face_change() IF cbx_ml.Checked THEN dw_pageretr.Height = THIS.Height - dw_pageretr.Y - 140 dw_choice.Visible = FALSE cb_ok.Visible = FALSE cb_del.Visible = FALSE ELSE dw_pageretr.Height = cb_ok.Y - dw_pageretr.Y - 10 dw_choice.Visible = TRUE cb_ok.Visible = TRUE cb_del.Visible = TRUE END IF RETURN 1 end function on w_inware_buytask_ch.create int iCurrent call super::create this.cbx_mlselect=create cbx_mlselect this.cbx_allselect=create cbx_allselect this.cb_ok=create cb_ok this.cb_del=create cb_del this.cbx_ml=create cbx_ml this.cb_other=create cb_other this.dw_choice=create dw_choice iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.cbx_mlselect this.Control[iCurrent+2]=this.cbx_allselect this.Control[iCurrent+3]=this.cb_ok this.Control[iCurrent+4]=this.cb_del this.Control[iCurrent+5]=this.cbx_ml this.Control[iCurrent+6]=this.cb_other this.Control[iCurrent+7]=this.dw_choice end on on w_inware_buytask_ch.destroy call super::destroy destroy(this.cbx_mlselect) destroy(this.cbx_allselect) destroy(this.cb_ok) destroy(this.cb_del) destroy(this.cbx_ml) destroy(this.cb_other) destroy(this.dw_choice) end on event ue_usual_query_filt;call super::ue_usual_query_filt;string obj_expr='' if trim(sle_usual_query.text)<>'' then if pos(trim(sle_usual_query.text),'%')=0 then obj_expr=obj_expr+'( u_mtrldef_mtrlcode like "%'+trim(sle_usual_query.text)+'%" )' else obj_expr=obj_expr+'( u_mtrldef_mtrlcode like "'+trim(sle_usual_query.text)+'" )' end if end if dw_pageretr.setfilter(obj_expr) dw_pageretr.setredraw(false) dw_pageretr.filter() if dw_pageretr.rowcount()>=1 then dw_pageretr.selectrow(0,false) dw_pageretr.selectrow(1,true) end if dw_pageretr.setredraw(true) end event event ue_usual_query_retr;call super::ue_usual_query_retr;string ls_querystrpart='' ls_newselect=lower(ori_oldselect) if trim(sle_usual_query.text)<>'' then if pos(trim(sle_usual_query.text),'%')=0 then ls_querystrpart="(u_mtrldef.mtrlcode like '%"+trim(sle_usual_query.text)+"%')" else ls_querystrpart="(u_mtrldef.mtrlcode like '"+trim(sle_usual_query.text)+"')" end if if pos(ls_newselect," where ") <> 0 then ls_newselect=ls_newselect+" and ("+ls_querystrpart+')' else ls_newselect=ls_newselect+" where ("+ls_querystrpart+')' end if end if wf_retrieveuc(dw_pageretr,ls_newselect,1) this.triggerevent('retrieve_pageretr') end event event close;CLOSEWITHRETURN(THIS,INS_RT_STRU) // 窗体级子定义结构变量,用于返回 end event event open;THIS.TriggerEvent('ue_before_open') wf_movetocenter() OLD_TITLE = THIS.Title s_tran = Message.PowerObjectParm IF NOT IsNull(s_tran) THEN retrieve_all = s_tran.if_retrieve_all mode = s_tran.work_mode arg_pkid = s_tran.arg_pkid arg_string_code = s_tran.arg_string_code if_sharedata = s_tran.if_sharedata //是否应用sharedata,当retrieve_all=true是生效 ds_share = s_tran.ds_share cur_sptid = s_tran.d_long END IF dw_pageretr.RBUTTON_FILTER_USE = TRUE //右键查询功能开关 dw_pageretr.titleclick_sort_use = TRUE //单击标题排序功能开关 dw_pageretr.SetTransObject (sqlca) dw_choice.SetTransObject(sqlca) pkcolumndbtname = wf_get_pkcolumndbtname(dw_pageretr) //取第一列为关键字 ori_oldselect = dw_pageretr.Describe("DataWindow.Table.Select") ls_newselect = ori_oldselect ds_curquery = CREATE DATASTORE ds_curquery.DataObject = 'd_extr_find' ds_curquery.SetTransObject (sqlca) wf_editindex_lockf() sle_usual_query.Text = Trim(arg_string_code) IF NOT retrieve_all THEN THIS.TriggerEvent("ue_usual_query_RETR") //修改ls_newselect,retrieve ELSE IF if_sharedata THEN ds_share.ShareData(dw_pageretr) ELSE wf_retrieveuc(dw_pageretr,ls_newselect,1) THIS.TriggerEvent('RETRIEVE_pageretr') END IF END IF IF retrieve_all THEN THIS.TriggerEvent("ue_usual_query_filt") END IF INS_RT_STRU.mtrlid[1] = 0 s_hide_col s_col s_col.col_1 = 'u_buytaskmx_rebate' s_col.col_2 = 'amt' s_col.col_3 = 'u_buytaskmx_fprice' s_col.col_4 = 'u_buytaskmx_price' s_col.col_5 = 'u_buytaskmx_uprice' f_hide_col(121,dw_pageretr,s_col) f_hide_col(121,dw_choice,s_col) s_hide_col s_col_mtrlsectype s_col_mtrlsectype.col_1 = 'u_mtrldef_mtrlsectype' f_hide_col(1308,dw_pageretr,s_col_mtrlsectype) f_hide_col(1308,dw_choice,s_col_mtrlsectype) s_hide_col s_col_zxmtrlmode s_col_zxmtrlmode.col_1 = 'u_mtrldef_zxmtrlmode' f_hide_col(1309,dw_pageretr,s_col_zxmtrlmode) f_hide_col(1309,dw_choice,s_col_zxmtrlmode) end event event ue_before_open;call super::ue_before_open;if_ue_sort=true end event event retrieve_pageretr;boolean cb_firstpage_enabled,cb_nextpage_enabled,cb_retrieveall_enabled boolean cb_priorpage_enabled,cb_func_enabled,cb_retrieve_enabled //cb_firstpage_enabled=cb_firstpage.enabled cb_nextpage_enabled=cb_nextpage.enabled cb_retrieveall_enabled=cb_retrieveall.enabled //cb_priorpage_enabled=cb_priorpage.enabled cb_func_enabled=cb_func.enabled //cb_firstpage.enabled=false cb_nextpage.enabled=false cb_retrieveall.enabled=false //cb_priorpage.enabled=false cb_func.enabled=false SetPointer(HourGlass!) dw_pageretr.retrieve(cur_sptid) if dw_pageretr.rowcount()>0 and dw_pageretr.getrow()=0 then dw_pageretr.setrow(1) SetPointer(Arrow!) //cb_firstpage.enabled=cb_firstpage_enabled cb_nextpage.enabled=cb_nextpage_enabled cb_retrieveall.enabled=cb_retrieveall_enabled //cb_priorpage.enabled=cb_priorpage_enabled cb_func.enabled=cb_func_enabled IF cbx_mlselect.Checked AND dw_pageretr.RowCount() > 1 THEN dw_pageretr.SelectRow(1,FALSE) END IF end event type cb_func from w_pageretr_ch`cb_func within w_inware_buytask_ch end type type cb_exit from w_pageretr_ch`cb_exit within w_inware_buytask_ch integer x = 869 end type type sle_usual_query from w_pageretr_ch`sle_usual_query within w_inware_buytask_ch integer x = 347 end type type cb_retrieveall from w_pageretr_ch`cb_retrieveall within w_inware_buytask_ch integer x = 1362 end type type em_pagerowno from w_pageretr_ch`em_pagerowno within w_inware_buytask_ch integer x = 1033 end type type dw_pageretr from w_pageretr_ch`dw_pageretr within w_inware_buytask_ch integer width = 4681 integer height = 1276 string dataobject = "dw_inware_buytask_ch" end type event dw_pageretr::clicked;IF row > 0 THEN This.SetRow(row) IF if_mlselect = 1 THEN IF if_changeselect THEN This.SelectRow(row,Not This.IsSelected(row)) ELSE if_changeselect = True END IF ELSE This.SelectRow(0,False) This.SelectRow(row,True) END IF END IF end event event dw_pageretr::rowfocuschanged;if if_mlselect=1 then if currentrow <=0 then return if keydown(keycontrol!) then if this.isselected(currentrow) then this.selectrow(currentrow,false) if_changeselect=false else if_changeselect=true end if else if not this.isselected(currentrow) then this.selectrow(currentrow,true) if_changeselect=false else if_changeselect=true end if end if else if dw_edit_mode then return if currentrow <=0 then return this.selectrow(0,false) this.selectrow(currentrow,true) end if parent.TriggerEvent('ue_retrieve_info') end event event dw_pageretr::dwnkey;call super::dwnkey;if keydown(keyenter!) then return 1 end event event dw_pageretr::doubleclicked;IF cbx_ml.Checked THEN cb_choice.TriggerEvent(Clicked!) ELSE cb_ok.TriggerEvent(Clicked!) END IF end event type st_1 from w_pageretr_ch`st_1 within w_inware_buytask_ch integer width = 315 string text = "物料编码含:" end type type cb_nextpage from w_pageretr_ch`cb_nextpage within w_inware_buytask_ch integer x = 1509 end type type cb_choice from w_pageretr_ch`cb_choice within w_inware_buytask_ch integer x = 718 end type event cb_choice::clicked;call super::clicked;Long ROW,ls_i = 0,chC = 0 Long ll_billtype datawindow dw IF cbx_ml.Checked THEN dw = dw_pageretr ROW = dw.GetRow() IF ROW <= 0 THEN MessageBox('提示','请先选择目标行!', Information!, OK! ) RETURN END IF ELSE dw = dw_choice ROW = dw.RowCount() IF ROW <= 0 THEN MessageBox('提示','请先选择缓冲目标!', Information!, OK! ) RETURN END IF END IF FOR ls_i = 1 To dw.RowCount() IF Not cbx_ml.Checked Or dw.IsSelected(ls_i) THEN chC++ INS_RT_STRU.mtrlid[chC] = dw.Object.u_buytaskmx_mtrlid[ls_i] INS_RT_STRU.mtrlname[chC] = dw.Object.u_mtrldef_mtrlname[ls_i] INS_RT_STRU.mtrlcode[chC] = dw.Object.u_mtrldef_mtrlcode[ls_i] INS_RT_STRU.mtrlmode[chC] = dw.Object.u_mtrldef_mtrlmode[ls_i] INS_RT_STRU.unit[chC] = dw.Object.u_mtrldef_unit[ls_i] INS_RT_STRU.mxunit[chC] = dw.Object.u_buytaskmx_unit[ls_i] INS_RT_STRU.planprice[chC] = dw.Object.u_mtrldef_planprice[ls_i] INS_RT_STRU.qty[chC] = dw.Object.u_buytaskmx_uqty[ls_i] - dw.Object.u_buytaskmx_stopqty[ls_i] - dw.Object.u_buytaskmx_consignedqty[ls_i] INS_RT_STRU.fprice[chC] = dw.Object.u_buytaskmx_fprice[ls_i] INS_RT_STRU.rebate[chC] = dw.Object.u_buytaskmx_rebate[ls_i] INS_RT_STRU.uqty[chC] = dw.Object.u_buytaskmx_uqty[ls_i] - dw.Object.u_buytaskmx_stopqty[ls_i] - dw.Object.u_buytaskmx_consignedqty[ls_i] INS_RT_STRU.addqty[chC] = dw.Object.u_buytaskmx_addqty[ls_i] - dw.Object.u_buytaskmx_consignedaddqty[ls_i] INS_RT_STRU.uprice[chC] = dw.Object.u_buytaskmx_uprice[ls_i] INS_RT_STRU.rate[chC] = dw.Object.u_buytaskmx_rate[ls_i] INS_RT_STRU.buytaskid[chC] = dw.Object.u_buytask_taskid [ls_i] INS_RT_STRU.printid[chC] = dw.Object.u_buytaskmx_printid[ls_i] INS_RT_STRU.buytaskcode[chC] = dw.Object.u_buytask_taskcode[ls_i] INS_RT_STRU.status[chC] = dw.Object.u_buytaskmx_status[ls_i] INS_RT_STRU.woodcode[chC] = dw.Object.u_buytaskmx_woodcode[ls_i] INS_RT_STRU.pcode[chC] = dw.Object.u_buytaskmx_pcode[ls_i] INS_RT_STRU.orderid[chC] = dw.Object.u_buytaskmx_orderid[ls_i] INS_RT_STRU.banktypeid[chC] = dw.Object.u_buytask_banktypeid[ls_i] INS_RT_STRU.dscrp[chC] = dw.Object.u_buytaskmx_dscrp[ls_i] INS_RT_STRU.mtrlsectype[chC] = dw.Object.u_mtrldef_mtrlsectype[ls_i] INS_RT_STRU.mtrltype[chC] = dw.Object.u_mtrldef_mtrltype[ls_i] INS_RT_STRU.zxmtrlmode[chC] = dw.Object.u_mtrldef_zxmtrlmode[ls_i] INS_RT_STRU.relcode[chC] = dw.Object.u_buytask_relcode[ls_i] INS_RT_STRU.sptmtrlname[chC] = dw.Object.u_buytaskmx_sptmtrlname[ls_i] INS_RT_STRU.tax[chC] = dw.Object.u_buytaskmx_tax[ls_i] INS_RT_STRU.plancode[chC] = dw.Object.u_buytaskmx_plancode[ls_i] INS_RT_STRU.mtrlengname[chC] = dw.Object.u_mtrldef_mtrlengname[ls_i] INS_RT_STRU.barcode[chC] = dw.Object.u_mtrldef_barcode[ls_i] ll_billtype = dw.Object.u_buytask_billtype[ls_i] INS_RT_STRU.billtype[chC] = dw.Object.u_buytask_billtype[ls_i] INS_RT_STRU.buytask_dscrp[chC] = dw.Object.u_buytask_dscrp[ls_i] INS_RT_STRU.saletaskcode[chC] = dw.Object.u_saletask_taskcode[ls_i] INS_RT_STRU.salerelcode[chC] = dw.Object.u_saletask_relcode[ls_i] INS_RT_STRU.dscrp2[chC] = dw.Object.u_buytaskmx_dscrp2[ls_i] INS_RT_STRU.dscrp3[chC] = dw.Object.u_buytaskmx_dscrp3[ls_i] INS_RT_STRU.dscrp4[chC] = dw.Object.u_buytaskmx_dscrp4[ls_i] IF ll_billtype = 1 THEN //成品采购的 INS_RT_STRU.cusid[chC] = dw.Object.u_saletask_cusid[ls_i] INS_RT_STRU.cuscode[chC] = dw.Object.u_cust_cuscode[ls_i] INS_RT_STRU.cusname[chC] = dw.Object.u_cust_name[ls_i] ELSE INS_RT_STRU.cusid[chC] = 0 INS_RT_STRU.cuscode[chC] = '' INS_RT_STRU.cusname[chC] = '' END IF END IF NEXT IF chC = 0 THEN MessageBox('提示','请至少选择一个目标行!', Information!, OK! ) RETURN END IF Close(Parent) //IF cbx_ml.Checked THEN // // ROW = dw_pageretr.GetRow() // IF ROW <= 0 THEN // MessageBox('提示','请先选择目标行!', Information!, OK! ) // RETURN // END IF // FOR ls_i = 1 To dw_pageretr.RowCount() // IF dw_pageretr.IsSelected(ls_i) THEN // chC++ // INS_RT_STRU.mtrlid[chC] = dw_pageretr.Object.u_buytaskmx_mtrlid[ls_i] // INS_RT_STRU.mtrlname[chC] = dw_pageretr.Object.u_mtrldef_mtrlname[ls_i] // INS_RT_STRU.mtrlcode[chC] = dw_pageretr.Object.u_mtrldef_mtrlcode[ls_i] // INS_RT_STRU.mtrlmode[chC] = dw_pageretr.Object.u_mtrldef_mtrlmode[ls_i] // INS_RT_STRU.unit[chC] = dw_pageretr.Object.u_mtrldef_unit[ls_i] // INS_RT_STRU.mxunit[chC] = dw_pageretr.Object.u_buytaskmx_unit[ls_i] // INS_RT_STRU.planprice[chC] = dw_pageretr.Object.u_mtrldef_planprice[ls_i] // INS_RT_STRU.qty[chC] = dw_pageretr.Object.u_buytaskmx_uqty[ls_i] - dw_pageretr.Object.u_buytaskmx_stopqty[ls_i] - dw_pageretr.Object.u_buytaskmx_consignedqty[ls_i] // INS_RT_STRU.fprice[chC] = dw_pageretr.Object.u_buytaskmx_fprice[ls_i] // INS_RT_STRU.rebate[chC] = dw_pageretr.Object.u_buytaskmx_rebate[ls_i] // INS_RT_STRU.uqty[chC] = dw_pageretr.Object.u_buytaskmx_uqty[ls_i] - dw_pageretr.Object.u_buytaskmx_stopqty[ls_i] - dw_pageretr.Object.u_buytaskmx_consignedqty[ls_i] // INS_RT_STRU.addqty[chC] = dw_pageretr.Object.u_buytaskmx_addqty[ls_i] - dw_pageretr.Object.u_buytaskmx_consignedaddqty[ls_i] // INS_RT_STRU.uprice[chC] = dw_pageretr.Object.u_buytaskmx_uprice[ls_i] // INS_RT_STRU.rate[chC] = dw_pageretr.Object.u_buytaskmx_rate[ls_i] // INS_RT_STRU.buytaskid[chC] = dw_pageretr.Object.u_buytask_taskid [ls_i] // INS_RT_STRU.printid[chC] = dw_pageretr.Object.u_buytaskmx_printid[ls_i] // INS_RT_STRU.buytaskcode[chC] = dw_pageretr.Object.u_buytask_taskcode[ls_i] // INS_RT_STRU.status[chC] = dw_pageretr.Object.u_buytaskmx_status[ls_i] // INS_RT_STRU.woodcode[chC] = dw_pageretr.Object.u_buytaskmx_woodcode[ls_i] // INS_RT_STRU.pcode[chC] = dw_pageretr.Object.u_buytaskmx_pcode[ls_i] // INS_RT_STRU.orderid[chC] = dw_pageretr.Object.u_buytaskmx_orderid[ls_i] // INS_RT_STRU.banktypeid[chC] = dw_pageretr.Object.u_buytask_banktypeid[ls_i] // INS_RT_STRU.dscrp[chC] = dw_pageretr.Object.u_buytaskmx_dscrp[ls_i] // INS_RT_STRU.mtrlsectype[chC] = dw_pageretr.Object.u_mtrldef_mtrlsectype[ls_i] // INS_RT_STRU.zxmtrlmode[chC] = dw_pageretr.Object.u_mtrldef_zxmtrlmode[ls_i] // INS_RT_STRU.relcode[chC] = dw_pageretr.Object.u_buytask_relcode[ls_i] // INS_RT_STRU.sptmtrlname[chC] = dw_pageretr.Object.u_buytaskmx_sptmtrlname[ls_i] // // ll_billtype = dw_pageretr.Object.u_buytask_billtype[ls_i] // INS_RT_STRU.billtype[chC] = dw_pageretr.Object.u_buytask_billtype[ls_i] // // IF ll_billtype = 1 THEN //成品采购的 // INS_RT_STRU.cusid[chC] = dw_pageretr.Object.u_saletask_cusid[ls_i] // INS_RT_STRU.cuscode[chC] = dw_pageretr.Object.u_cust_cuscode[ls_i] // INS_RT_STRU.cusname[chC] = dw_pageretr.Object.u_cust_name[ls_i] // ELSE // INS_RT_STRU.cusid[chC] = 0 // INS_RT_STRU.cuscode[chC] = '' // INS_RT_STRU.cusname[chC] = '' // END IF // END IF // NEXT // IF chC = 0 THEN // MessageBox('提示','请至少选择一个目标行!', Information!, OK! ) // RETURN // END IF // //ELSE // ROW = dw_choice.GetRow() // IF ROW <= 0 THEN // MessageBox('提示','请先选择目标行!', Information!, OK! ) // RETURN // END IF // FOR ls_i = 1 To dw_choice.RowCount() // chC++ // INS_RT_STRU.mtrlid[chC] = dw_choice.Object.u_buytaskmx_mtrlid[ls_i] // INS_RT_STRU.mtrlname[chC] = dw_choice.Object.u_mtrldef_mtrlname[ls_i] // INS_RT_STRU.mtrlcode[chC] = dw_choice.Object.u_mtrldef_mtrlcode[ls_i] // INS_RT_STRU.mtrlmode[chC] = dw_choice.Object.u_mtrldef_mtrlmode[ls_i] // INS_RT_STRU.unit[chC] = dw_choice.Object.u_mtrldef_unit[ls_i] // INS_RT_STRU.mxunit[chC] = dw_choice.Object.u_buytaskmx_unit[ls_i] // INS_RT_STRU.planprice[chC] = dw_choice.Object.u_mtrldef_planprice[ls_i] // INS_RT_STRU.qty[chC] = dw_choice.Object.u_buytaskmx_uqty[ls_i] - dw_choice.Object.u_buytaskmx_stopqty[ls_i] - dw_choice.Object.u_buytaskmx_consignedqty[ls_i] // INS_RT_STRU.fprice[chC] = dw_choice.Object.u_buytaskmx_fprice[ls_i] // INS_RT_STRU.rebate[chC] = dw_choice.Object.u_buytaskmx_rebate[ls_i] // INS_RT_STRU.uqty[chC] = dw_choice.Object.u_buytaskmx_uqty[ls_i] - dw_choice.Object.u_buytaskmx_stopqty[ls_i] - dw_choice.Object.u_buytaskmx_consignedqty[ls_i] // INS_RT_STRU.addqty[chC] = dw_choice.Object.u_buytaskmx_addqty[ls_i] - dw_choice.Object.u_buytaskmx_consignedaddqty[ls_i] // INS_RT_STRU.uprice[chC] = dw_choice.Object.u_buytaskmx_uprice[ls_i] // INS_RT_STRU.rate[chC] = dw_choice.Object.u_buytaskmx_rate[ls_i] // INS_RT_STRU.buytaskid[chC] = dw_choice.Object.u_buytask_taskid [ls_i] // INS_RT_STRU.printid[chC] = dw_choice.Object.u_buytaskmx_printid[ls_i] // INS_RT_STRU.buytaskcode[chC] = dw_choice.Object.u_buytask_taskcode[ls_i] // INS_RT_STRU.status[chC] = dw_choice.Object.u_buytaskmx_status[ls_i] // INS_RT_STRU.woodcode[chC] = dw_choice.Object.u_buytaskmx_woodcode[ls_i] // INS_RT_STRU.pcode[chC] = dw_choice.Object.u_buytaskmx_pcode[ls_i] // INS_RT_STRU.orderid[chC] = dw_choice.Object.u_buytaskmx_orderid[ls_i] // INS_RT_STRU.banktypeid[chC] = dw_choice.Object.u_buytask_banktypeid[ls_i] // INS_RT_STRU.dscrp[chC] = dw_choice.Object.u_buytaskmx_dscrp[ls_i] // INS_RT_STRU.mtrlsectype[chC] = dw_choice.Object.u_mtrldef_mtrlsectype[ls_i] // INS_RT_STRU.zxmtrlmode[chC] = dw_choice.Object.u_mtrldef_zxmtrlmode[ls_i] // INS_RT_STRU.relcode[chC] = dw_choice.Object.u_buytask_relcode[ls_i] // INS_RT_STRU.sptmtrlname[chC] = dw_choice.Object.u_buytaskmx_sptmtrlname[ls_i] // // ll_billtype = dw_choice.Object.u_buytask_billtype[ls_i] // INS_RT_STRU.billtype[chC] = dw_choice.Object.u_buytask_billtype[ls_i] // // IF ll_billtype = 1 THEN //成品采购的 // INS_RT_STRU.cusid[chC] = dw_choice.Object.u_saletask_cusid[ls_i] // INS_RT_STRU.cuscode[chC] = dw_choice.Object.u_cust_cuscode[ls_i] // INS_RT_STRU.cusname[chC] = dw_choice.Object.u_cust_name[ls_i] // ELSE // INS_RT_STRU.cusid[chC] = 0 // INS_RT_STRU.cuscode[chC] = '' // INS_RT_STRU.cusname[chC] = '' // END IF // // NEXT // //END IF // //Close(Parent) // end event type cb_refresh from w_pageretr_ch`cb_refresh within w_inware_buytask_ch end type type cb_help from w_pageretr_ch`cb_help within w_inware_buytask_ch end type type ln_bar from w_pageretr_ch`ln_bar within w_inware_buytask_ch end type type ln_bar2 from w_pageretr_ch`ln_bar2 within w_inware_buytask_ch end type type r_bar from w_pageretr_ch`r_bar within w_inware_buytask_ch end type type ln_1 from w_pageretr_ch`ln_1 within w_inware_buytask_ch end type type ln_2 from w_pageretr_ch`ln_2 within w_inware_buytask_ch end type type cbx_mlselect from checkbox within w_inware_buytask_ch integer x = 1394 integer y = 196 integer width = 256 integer height = 60 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long backcolor = 134217739 string text = "多选" end type event clicked;if this.checked then if_mlselect=1 else if_mlselect=0 end if f_SetProfileString (sys_empid,dw_pageretr.DATAOBJECT, "if_mlselect", string(if_mlselect)) end event event constructor;if_mlselect=integer(f_ProfileString (sys_empid,dw_pageretr.DATAOBJECT, "if_mlselect", '0')) if if_mlselect =0 then this.checked=false else this.checked=true end if end event type cbx_allselect from checkbox within w_inware_buytask_ch integer x = 1701 integer y = 196 integer width = 256 integer height = 60 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long backcolor = 134217739 string text = "全选" end type event clicked;Int li IF THIS.Checked AND cbx_mlselect.Checked THEN FOR li = 1 TO dw_pageretr.RowCount() dw_pageretr.SelectRow(li,TRUE) NEXT ELSE FOR li = 1 TO dw_pageretr.RowCount() dw_pageretr.SelectRow(li,FALSE) NEXT END IF end event event constructor;Int li IF THIS.Checked AND cbx_mlselect.Checked THEN FOR li = 1 TO dw_pageretr.RowCount() dw_pageretr.SelectRow(li,TRUE) NEXT ELSE FOR li = 1 TO dw_pageretr.RowCount() dw_pageretr.SelectRow(li,FALSE) NEXT END IF end event type cb_ok from uo_imflatbutton within w_inware_buytask_ch integer x = 3831 integer y = 1580 integer width = 379 integer taborder = 70 boolean bringtotop = true string text = "选定[Enter]" end type event clicked;call super::clicked;Long ROW,ls_i,chC = 0 ROW = dw_pageretr.GetRow() IF ROW <= 0 THEN MessageBox('提示','请先选择目标行!', Information!, OK! ) RETURN END IF FOR ls_i = 1 To dw_pageretr.RowCount() IF dw_pageretr.IsSelected(ls_i) THEN IF dw_choice.Find('u_buyTask_TaskID ='+String(dw_pageretr.Object.u_buyTask_TaskID[ls_i]) + ' and u_buyTaskmx_printID = '+String(dw_pageretr.Object.u_buyTaskmx_printID[ls_i]),1,dw_choice.RowCount()) = 0 THEN chC++ dw_pageretr.RowsCopy(ls_i, ls_i, Primary!, dw_choice, dw_choice.RowCount() + 1, Primary!) END IF END IF NEXT end event type cb_del from uo_imflatbutton within w_inware_buytask_ch integer x = 4229 integer y = 1580 integer width = 379 integer taborder = 80 boolean bringtotop = true string text = "删除" string normalpicname = "delete.bmp" end type event clicked;call super::clicked;IF dw_choice.GETROW()=0 THEN MESSAGEBOX('提示','请选择删除的行对象!', Information!, OK! ) RETURN END IF dw_choice.DeleteRow (0) dw_choice.TriggerEvent (rowfocuschanged!) end event type cbx_ml from checkbox within w_inware_buytask_ch integer x = 987 integer y = 196 integer width = 357 integer height = 60 boolean bringtotop = true integer textsize = -9 integer weight = 700 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 16711680 long backcolor = 134217739 string text = "直接多选" end type event clicked;wf_face_change() int use_ml if this.checked then use_ml=1 else use_ml=0 end if f_SetProfileString (sys_empid,dw_pageretr.DATAOBJECT, "use_ml", string(use_ml)) end event event constructor;int use_ml use_ml=integer(f_ProfileString (sys_empid,dw_pageretr.DATAOBJECT, "use_ml", '0')) if use_ml=0 then this.checked=false else this.checked=true end if wf_face_change() end event event destructor;int use_ml if this.checked then use_ml=1 else use_ml=0 end if f_SetProfileString(sys_empid,dw_pageretr.DATAOBJECT, "use_ml", string(use_ml)) end event type cb_other from uo_imflatbutton within w_inware_buytask_ch integer x = 453 integer width = 265 integer height = 164 integer taborder = 40 boolean bringtotop = true string text = "相关信息" string normalpicname = "find2.BMP" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;Long ll_row ll_row = dw_pageretr.GetRow() IF ll_row <= 0 THEN MessageBox('系统提示','请选择物料') RETURN END IF Long ll_mtrlid ll_mtrlid = dw_pageretr.Object.u_buytaskmx_mtrlid[ll_row] IF IsValid(w_mtrl_info) THEN w_mtrl_info.WindowState = Normal! w_mtrl_info.ins_mtrlid = ll_mtrlid w_mtrl_info.wf_retrieve(ll_mtrlid) ELSE OpenWithParm(w_mtrl_info,ll_mtrlid) END IF end event type dw_choice from u_dw_rbtnfilter within w_inware_buytask_ch integer y = 1692 integer width = 4681 integer height = 604 integer taborder = 30 boolean bringtotop = true string dataobject = "dw_inware_buytask_ch" boolean hscrollbar = true boolean vscrollbar = true boolean hsplitscroll = true boolean rbutton_filter_use = true boolean rbutton_setposition_use = true boolean titleclick_sort_use = true end type event destructor;/// end event event rowfocuschanged;call super::rowfocuschanged;IF currentrow <=0 THEN RETURN this.selectrow(0,false) this.selectrow(currentrow,true) end event