$PBExportHeader$w_outware_sale_show_his_pricemx.srw forward global type w_outware_sale_show_his_pricemx from w_publ_base end type type tab_1 from tab within w_outware_sale_show_his_pricemx end type type tabpage_2 from userobject within tab_1 end type type dw_3 from u_dw_rbtnfilter within tabpage_2 end type type tabpage_2 from userobject within tab_1 dw_3 dw_3 end type type tabpage_1 from userobject within tab_1 end type type dw_1 from u_dw_rbtnfilter within tabpage_1 end type type tabpage_1 from userobject within tab_1 dw_1 dw_1 end type type tab_1 from tab within w_outware_sale_show_his_pricemx tabpage_2 tabpage_2 tabpage_1 tabpage_1 end type end forward global type w_outware_sale_show_his_pricemx from w_publ_base integer width = 3214 integer height = 2000 string title = "查看客户销售价格历史" boolean maxbox = true boolean resizable = true event ue_fj_view ( ) tab_1 tab_1 end type global w_outware_sale_show_his_pricemx w_outware_sale_show_his_pricemx type variables datawindow dw_cbmx datawindow dw_mtrlware,dw_mtrlwaremx long ins_mtrlid string ins_mtrlcode long cur_outwareid long cur_printid long cur_mtrlwareid decimal cur_dec_uqty string cur_mtrlname long cur_scid long cur_cusid long cur_mtrlid string cur_status string cur_woodcode string cur_pcode string cur_plancode end variables forward prototypes public subroutine wf_retrieve (long arg_mtrlid) public subroutine wf_picretrieve (long arg_mtrlid) public subroutine wf_retrieve_cbmx () public subroutine wf_retrieve_allmtrlware () end prototypes event ue_fj_view();s_edit_index_tran s_pic Long ll_ConnectionID String arg_msg Long ls_row IF f_get_outerconnection(ll_ConnectionID,arg_msg) = 0 THEN MessageBox('提示','没有指定附件数据库连接'+arg_msg, Information!, OK! ) RETURN END IF s_pic.f_long = 201 //物料资料 mainID s_pic.f_string = ins_mtrlcode s_pic.g_long = ins_mtrlid s_pic.d_long = 0 //relid_mx s_pic.d_string = '' //relcode_mx s_pic.e_long = 0 // scid s_pic.sqltransaction = sys_filedb_sqlca IF NOT f_power_ind(2154) THEN OpenWithParm(w_fj_bill_view,s_pic) ELSE OpenWithParm(w_fj_bill_mng,s_pic) END IF end event public subroutine wf_retrieve (long arg_mtrlid); IF tab_1.SelectedTab = 2 THEN dw_mtrlware.Retrieve(ins_mtrlid) ELSE wf_picretrieve(ins_mtrlid) END IF end subroutine public subroutine wf_picretrieve (long arg_mtrlid);//uo_fj_mng_billtype ls_uo_fjbt //ls_uo_fjbt = CREATE uo_fj_mng_billtype // //Long ll_fileid // //Blob ls_filedata //String arg_msg //Long ll_classid //String ls_filename //SetNull(ls_filedata) // //SELECT top 1 classid // INTO :ll_classid // FROM u_billpic_fileclass; //IF sqlca.SQLCode <> 0 THEN // SELECT top 1 classid // INTO :ll_classid // FROM U_FileClass // Where billtype = 201; // IF sqlca.SQLCode <> 0 THEN // ll_classid = 0 // END IF //END IF // // //SELECT top 1 fileid,filename INTO :ll_fileid,:ls_filename // FROM u_file // WHERE relid = :arg_mtrlid // AND classid = :ll_classid // AND (filetype = 'bmp' OR filetype = 'rle' OR filetype = 'wmf' // OR filetype = 'tif' OR filetype = 'jpg' OR filetype = 'gif' OR filetype = 'jpeg') // USING sys_fileDB_sqlca; //IF sys_fileDB_sqlca.SQLCode <> 0 THEN // ll_fileid = 0 //END IF // //IF ll_fileid > 0 THEN // IF ls_uo_fjbt.uf_getfjbolb_fromdb( ll_fileid, ls_filedata, sys_fileDB_sqlca, arg_msg) = 0 THEN // RETURN // END IF //ELSE // SetNull(ls_filedata) // ls_filename = '' //END IF // //tab_1.tabpage_2.uo_pic.OriginalSize = cbx_originalsize.Checked //tab_1.tabpage_2.uo_pic.of_showfile( ls_filedata,ls_filename, arg_msg) //tab_1.tabpage_2.uo_pic.of_setfilesize() // end subroutine public subroutine wf_retrieve_cbmx ();// // // // Long ll_row Long ll_scid,ll_outwareid,ll_printid Decimal dec_uqty dw_cbmx.Reset() // this.title='查看客户销售价格历史 ' + cur_mtrlname dw_cbmx.Retrieve(cur_scid,cur_cusid,cur_mtrlid,cur_status,cur_woodcode,cur_pcode,cur_plancode) wf_retrieve_allmtrlware() end subroutine public subroutine wf_retrieve_allmtrlware ();// dw_mtrlware.Reset() dw_mtrlware.Retrieve(cur_scid,-1,cur_mtrlid,cur_status,cur_woodcode,cur_pcode,cur_plancode) end subroutine on w_outware_sale_show_his_pricemx.create int iCurrent call super::create this.tab_1=create tab_1 iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.tab_1 end on on w_outware_sale_show_his_pricemx.destroy call super::destroy destroy(this.tab_1) end on event ue_before_open;call super::ue_before_open;dw_cbmx = tab_1.tabpage_2.dw_3 dw_mtrlware = tab_1.tabpage_1.dw_1 dw_mtrlware.settransobject(sqlca) dw_cbmx.settransobject(sqlca) end event event resize;call super::resize;tab_1.width = this.width - 11 tab_1.height = this.height - 30 dw_cbmx.width = tab_1.tabpage_1.width - 40 dw_cbmx.height = tab_1.tabpage_2.height - 140 dw_mtrlware.width = tab_1.tabpage_1.width - 40 dw_mtrlware.height = tab_1.tabpage_1.height - 140 end event event open;call super::open; s_edit_index_tran INS_RT_STRU //传递参数使用 INS_RT_STRU = Message.PowerObjectParm cur_scid=INS_RT_STRU.b_long cur_cusid=INS_RT_STRU.c_long cur_mtrlid=INS_RT_STRU.d_long cur_status=INS_RT_STRU.c_string cur_woodcode=INS_RT_STRU.d_string cur_pcode=INS_RT_STRU.e_string cur_plancode=INS_RT_STRU.f_string cur_mtrlname=INS_RT_STRU.b_string wf_retrieve_cbmx() end event type cb_func from w_publ_base`cb_func within w_outware_sale_show_his_pricemx boolean visible = false end type type cb_exit from w_publ_base`cb_exit within w_outware_sale_show_his_pricemx boolean visible = false integer x = 1925 integer y = 1288 end type type tab_1 from tab within w_outware_sale_show_his_pricemx integer width = 3159 integer height = 1860 integer taborder = 30 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long backcolor = 134217739 boolean raggedright = true boolean focusonbuttondown = true integer selectedtab = 1 tabpage_2 tabpage_2 tabpage_1 tabpage_1 end type on tab_1.create this.tabpage_2=create tabpage_2 this.tabpage_1=create tabpage_1 this.Control[]={this.tabpage_2,& this.tabpage_1} end on on tab_1.destroy destroy(this.tabpage_2) destroy(this.tabpage_1) end on event selectionchanged;//wf_retrieve(ins_mtrlid) // IF tab_1.SelectedTab = 1 THEN ELSE wf_retrieve_allmtrlware() END IF end event event constructor;//long ll_tab // //ll_tab = long(ProfileString(SYS_INIFILENAME, "w_fj_fileopen", "SelectedTab", "1")) //tab_1.SelectTab(ll_tab) end event type tabpage_2 from userobject within tab_1 integer x = 18 integer y = 96 integer width = 3122 integer height = 1748 long backcolor = 134217739 string text = "本单客户" long tabtextcolor = 33554432 long tabbackcolor = 134217739 long picturemaskcolor = 536870912 dw_3 dw_3 end type on tabpage_2.create this.dw_3=create dw_3 this.Control[]={this.dw_3} end on on tabpage_2.destroy destroy(this.dw_3) end on type dw_3 from u_dw_rbtnfilter within tabpage_2 integer width = 3113 integer height = 1728 integer taborder = 30 string dataobject = "dw_outware_sale_show_his_pricemx" boolean hscrollbar = true boolean vscrollbar = true boolean hsplitscroll = true borderstyle borderstyle = stylebox! boolean rbutton_filter_use = true boolean rbutton_setposition_use = true boolean titleclick_sort_use = true end type event rowfocuschanged;call super::rowfocuschanged;IF currentrow <= 0 THEN RETURN THIS.SelectRow(0,FALSE) THIS.SelectRow(currentrow,TRUE) end event event doubleclicked;call super::doubleclicked;IF row > 0 THEN String ls_code ls_code = THIS.Object.u_outware_outwarecode[row] f_open_win(cur_scid,ls_code) END IF end event type tabpage_1 from userobject within tab_1 integer x = 18 integer y = 96 integer width = 3122 integer height = 1748 long backcolor = 134217739 string text = "所有客户" long tabtextcolor = 33554432 long tabbackcolor = 134217739 long picturemaskcolor = 536870912 dw_1 dw_1 end type on tabpage_1.create this.dw_1=create dw_1 this.Control[]={this.dw_1} end on on tabpage_1.destroy destroy(this.dw_1) end on type dw_1 from u_dw_rbtnfilter within tabpage_1 integer width = 3113 integer height = 1764 integer taborder = 20 string dataobject = "dw_outware_sale_show_his_pricemx_allcust" boolean hscrollbar = true boolean vscrollbar = true boolean livescroll = false borderstyle borderstyle = stylebox! boolean rbutton_filter_use = true boolean rbutton_setposition_use = true boolean titleclick_sort_use = true end type event rowfocuschanged;call super::rowfocuschanged;IF currentrow <= 0 THEN RETURN THIS.SelectRow(0,FALSE) THIS.SelectRow(currentrow,TRUE) end event event doubleclicked;call super::doubleclicked;IF row > 0 THEN String ls_code ls_code = THIS.Object.u_outware_outwarecode[row] f_open_win(cur_scid,ls_code) END IF end event