$PBExportHeader$w_saletask_scllmx_ch.srw forward global type w_saletask_scllmx_ch from w_publ_choice end type type dw_chmx from u_dw_rbtnfilter within w_saletask_scllmx_ch end type type cbx_ifzero from checkbox within w_saletask_scllmx_ch end type type cbx_ifinware from checkbox within w_saletask_scllmx_ch end type type cb_other from uo_imflatbutton within w_saletask_scllmx_ch end type end forward global type w_saletask_scllmx_ch from w_publ_choice integer width = 3611 integer height = 2380 string title = "订单选择" event ue_retrieve_info ( ) dw_chmx dw_chmx cbx_ifzero cbx_ifzero cbx_ifinware cbx_ifinware cb_other cb_other end type global w_saletask_scllmx_ch w_saletask_scllmx_ch type variables s_saletask_ch INS_RT_STRU long cur_scid long cur_areaid_arr[] long if_inware = 1 end variables forward prototypes public subroutine wf_retrievemx () end prototypes event ue_retrieve_info();Long ll_row Long ll_mtrlid ll_row = dw_chmx.GetRow() IF ll_row <= 0 THEN ll_mtrlid = 0 ELSE ll_mtrlid = dw_chmx.Object.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 subroutine wf_retrievemx ();long ll_ucrow,ll_scid,ll_taskid ll_ucrow = dw_ch.getrow() if ll_ucrow <= 0 then dw_chmx.reset() else ll_scid = dw_ch.object.u_saletask_scid[ll_ucrow] ll_taskid = dw_ch.object.u_saletask_taskid[ll_ucrow] dw_chmx.retrieve(ll_scid,ll_taskid) end if end subroutine on w_saletask_scllmx_ch.create int iCurrent call super::create this.dw_chmx=create dw_chmx this.cbx_ifzero=create cbx_ifzero this.cbx_ifinware=create cbx_ifinware this.cb_other=create cb_other iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.dw_chmx this.Control[iCurrent+2]=this.cbx_ifzero this.Control[iCurrent+3]=this.cbx_ifinware this.Control[iCurrent+4]=this.cb_other end on on w_saletask_scllmx_ch.destroy call super::destroy destroy(this.dw_chmx) destroy(this.cbx_ifzero) destroy(this.cbx_ifinware) destroy(this.cb_other) end on event close;call super::close;CLOSEWITHRETURN(THIS,INS_RT_STRU) // 窗体级子定义结构变量,用于返回 end event event open;this.triggerevent('ue_before_open') wf_movetocenter() dw_CH.SetTransObject (sqlca) dw_chmx.SetTransObject (sqlca) s_saletask_find s_find s_find = Message.powerobjectparm cur_scid = s_find.scid cur_areaid_arr = s_find.areaid if_inware=integer(f_ProfileString (sys_empid,dw_ch.DATAOBJECT, "if_inware", '1')) if if_inware = 1 then cbx_ifinware.checked= true else cbx_ifinware.checked= false end if cb_retrieve.TRIGGEREVENT(CLICKED!) s_hide_col s_col s_col.col_1 = 'u_saletaskmx_enprice' s_col.col_2 = 'u_saletaskmx_rebate' s_col.col_3 = 'u_saletaskmx_fprice' s_col.col_4 = 'emamt' s_col.col_5 = 'amt' s_col.col_6 = 'u_saletaskmx_dftsaleprice' f_hide_col(122,dw_chmx,s_col) s_hide_col s_col_mtrlsectype s_col_mtrlsectype.col_1 = 'u_mtrldef_mtrlsectype' f_hide_col(1308,dw_ch,s_col_mtrlsectype) f_hide_col(1308,dw_chmx,s_col_mtrlsectype) s_hide_col s_col_zxmtrlmode s_col_zxmtrlmode.col_1 = 'u_mtrldef_zxmtrlmode' f_hide_col(1309,dw_ch,s_col_zxmtrlmode) f_hide_col(1309,dw_chmx,s_col_zxmtrlmode) end event event ue_before_open;call super::ue_before_open;if_ue_retr = TRUE if_ue_filter = TRUE if_ue_sort = TRUE end event type cb_func from w_publ_choice`cb_func within w_saletask_scllmx_ch end type type cb_exit from w_publ_choice`cb_exit within w_saletask_scllmx_ch integer x = 814 end type type sle_ch from w_publ_choice`sle_ch within w_saletask_scllmx_ch integer x = 878 integer width = 955 end type event sle_ch::inputchanged; if TRIM(THIS.TEXT)='' then dw_ch.SETFILTER('') else string obj_expr='' obj_expr=obj_expr+' ( pos(u_saletask_taskcode ,"'+TRIM(THIS.TEXT)+'")<>0 ) ' obj_expr=obj_expr+' or ( pos(u_cust_cuscode ,"'+TRIM(THIS.TEXT)+'")<>0 ) ' obj_expr=obj_expr+' or ( pos(u_cust_name ,"'+TRIM(THIS.TEXT)+'")<>0 ) ' dw_ch.SETFILTER(obj_expr) end if dw_ch.FILTER() end event type dw_ch from w_publ_choice`dw_ch within w_saletask_scllmx_ch integer width = 3547 integer height = 1268 string dataobject = "dw_saletask_scllmx_ch" end type event dw_ch::rowfocuschanged;IF currentrow <=0 THEN RETURN this.selectrow(0,false) this.selectrow(currentrow,true) wf_retrievemx() end event type st_1 from w_publ_choice`st_1 within w_saletask_scllmx_ch integer width = 837 string text = "订单编号/客户编号/客户名称含:" boolean righttoleft = false end type type cb_retrieve from w_publ_choice`cb_retrieve within w_saletask_scllmx_ch end type event cb_retrieve::clicked;dw_ch.retrieve(cur_scid,cur_areaid_arr,if_inware) wf_retrievemx() end event type cb_choice from w_publ_choice`cb_choice within w_saletask_scllmx_ch integer x = 663 end type event cb_choice::clicked;call super::clicked;Long LS_ROW LS_ROW = dw_CH.GetRow() IF LS_ROW <= 0 THEN MessageBox('提示','请先选择目标行!',information!,OK!) RETURN END IF INS_RT_STRU.taskid = dw_CH.Object.u_saletask_taskid[LS_ROW] INS_RT_STRU.taskcode = dw_CH.Object.u_saletask_taskcode[LS_ROW] INS_RT_STRU.assign_emp = dw_CH.Object.u_saletask_assign_emp[LS_ROW] INS_RT_STRU.cusid = dw_CH.Object.u_saletask_cusid[LS_ROW] INS_RT_STRU.cuscode = dw_CH.Object.u_cust_cuscode[LS_ROW] INS_RT_STRU.cusname = dw_CH.Object.u_cust_name[LS_ROW] INS_RT_STRU.relcode = dw_CH.Object.u_saletask_relcode[LS_ROW] INS_RT_STRU.freight = dw_CH.Object.u_saletask_freight[LS_ROW] INS_RT_STRU.freight_tele = dw_CH.Object.u_saletask_freight_tele[LS_ROW] INS_RT_STRU.moneyid = dw_CH.Object.u_saletask_moneyid[LS_ROW] INS_RT_STRU.address = dw_CH.Object.u_saletask_cus_address[LS_ROW] INS_RT_STRU.tele = dw_CH.Object.u_saletask_cus_tele[LS_ROW] INS_RT_STRU.fax = dw_CH.Object.u_saletask_cus_fax[LS_ROW] INS_RT_STRU.rep = dw_CH.Object.u_cust_rep[LS_ROW] if cbx_ifzero.checked=true then INS_RT_STRU.if_zeromtrlware=1 else INS_RT_STRU.if_zeromtrlware=0 end if CLOSE(PARENT) end event type ln_bar from w_publ_choice`ln_bar within w_saletask_scllmx_ch end type type ln_bar2 from w_publ_choice`ln_bar2 within w_saletask_scllmx_ch end type type r_bar from w_publ_choice`r_bar within w_saletask_scllmx_ch end type type ln_1 from w_publ_choice`ln_1 within w_saletask_scllmx_ch end type type ln_2 from w_publ_choice`ln_2 within w_saletask_scllmx_ch end type type dw_chmx from u_dw_rbtnfilter within w_saletask_scllmx_ch integer y = 1572 integer width = 3547 integer height = 652 integer taborder = 20 boolean bringtotop = true string dataobject = "dw_saletask_scllmx_ch_mx" boolean hscrollbar = true boolean vscrollbar = true end type event rowfocuschanged;call super::rowfocuschanged;IF currentrow <=0 THEN RETURN this.selectrow(0,false) this.selectrow(currentrow,true) PARENT.TriggerEvent('ue_retrieve_info') end event type cbx_ifzero from checkbox within w_saletask_scllmx_ch integer x = 1966 integer y = 192 integer width = 686 integer height = 80 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 constructor;int if_zeromtrlware if_zeromtrlware=integer(f_ProfileString (sys_empid,dw_ch.DATAOBJECT, "if_zeromtrlware", '1')) if if_zeromtrlware =0 then this.checked=false else this.checked=true end if end event event clicked;int if_zeromtrlware if this.checked then if_zeromtrlware=1 else if_zeromtrlware=0 end if f_SetProfileString (sys_empid,dw_ch.DATAOBJECT, "if_zeromtrlware", string(if_zeromtrlware)) end event type cbx_ifinware from checkbox within w_saletask_scllmx_ch integer x = 2729 integer y = 200 integer width = 576 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 = "只显示未进仓订单" end type event clicked; if this.checked then if_inware=1 else if_inware=0 end if f_SetProfileString (sys_empid,dw_ch.DATAOBJECT, "if_inware", string(if_inware)) cb_retrieve.TriggerEvent(clicked!) end event type cb_other from uo_imflatbutton within w_saletask_scllmx_ch integer x = 302 integer width = 361 integer height = 164 integer taborder = 30 boolean bringtotop = true string text = "产品相关查询" string normalpicname = "imexport.BMP" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;Long ll_row ll_row = dw_chmx.GetRow() IF ll_row <= 0 THEN MessageBox('提示','请选择物料',information!,OK!) RETURN END IF Long ll_mtrlid ll_mtrlid = dw_chmx.Object.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