$PBExportHeader$w_company_choose.srw forward global type w_company_choose from w_publ_base_style end type type cb_refresh from uo_imflatbutton within w_company_choose end type type cb_select from uo_imflatbutton within w_company_choose end type type dw_company_choose from u_dw_rbtnfilter within w_company_choose end type end forward global type w_company_choose from w_publ_base_style integer width = 3607 integer height = 2436 string title = "公司选择" boolean minbox = false windowtype windowtype = response! cb_refresh cb_refresh cb_select cb_select dw_company_choose dw_company_choose end type global w_company_choose w_company_choose forward prototypes public subroutine wf_retrieve_company () end prototypes public subroutine wf_retrieve_company ();string arg_msg long i,row oleobject request,response,mxs,item request = FXAppCom.CreatePbDictionary() request.SetString('token', app_token_fx) request.SetInt('userid', 0) response = FXAppCom.DoExecute('GetCompanyRange', request) arg_msg = response.GetString('ErrMsg') if (arg_msg <> '') then messagebox('提示', '获取订单明细失败,原因:' + arg_msg) return end if dw_company_choose.Reset() dw_company_choose.SetRedraw(false) mxs = response.GetArrOfPBDictionary('companies') Datetime ld_now,requiredate ld_now = DateTime(Today(),Now()) for i = 1 to mxs.Count item = mxs.GetItem(i - 1) row = dw_company_choose.InsertRow(0) dw_company_choose.SetItem(row, 'comid', item.GetInt('comid')) dw_company_choose.SetItem(row, 'fx_company_comname', item.GetString('comname')) dw_company_choose.SetItem(row, 'fx_company_simplename', item.GetString('simplename')) dw_company_choose.SetItem(row, 'fx_company_tele', item.GetString('tele')) dw_company_choose.SetItem(row, 'fx_company_address', item.GetString('address')) dw_company_choose.SetItem(row, 'fx_relation_relcode', item.GetString('relcode')) dw_company_choose.SetItem(row, 'fx_company_fx_title_erp', item.GetString('fx_title_erp')) next dw_company_choose.SetRedraw(true) end subroutine on w_company_choose.create int iCurrent call super::create this.cb_refresh=create cb_refresh this.cb_select=create cb_select this.dw_company_choose=create dw_company_choose iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.cb_refresh this.Control[iCurrent+2]=this.cb_select this.Control[iCurrent+3]=this.dw_company_choose end on on w_company_choose.destroy call super::destroy destroy(this.cb_refresh) destroy(this.cb_select) destroy(this.dw_company_choose) end on event resize;call super::resize;r_bar.height = this.height dw_company_choose.width = this.workspacewidth() dw_company_choose.height = this.workspaceheight() - dw_company_choose.y end event event open;call super::open;wf_movetocenter() wf_retrieve_company() end event type cb_func from w_publ_base_style`cb_func within w_company_choose boolean visible = false end type type cb_exit from w_publ_base_style`cb_exit within w_company_choose integer x = 315 end type type ln_bar from w_publ_base_style`ln_bar within w_company_choose end type type ln_bar2 from w_publ_base_style`ln_bar2 within w_company_choose end type type r_bar from w_publ_base_style`r_bar within w_company_choose end type type cb_refresh from uo_imflatbutton within w_company_choose integer width = 151 integer height = 164 integer taborder = 10 boolean bringtotop = true string text = "刷新" string normalpicname = "refresh.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;wf_retrieve_company() end event type cb_select from uo_imflatbutton within w_company_choose integer x = 151 integer width = 165 integer height = 164 integer taborder = 10 boolean bringtotop = true string text = "选定" string normalpicname = "ok.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;long ll_comid, ll_getrow ll_getrow = dw_company_choose.GetRow() IF ll_getrow <= 0 THEN MessageBox('提示', '请先选择要操作的公司!') return END IF ll_comid = dw_company_choose.Object.comid[ll_getrow] CloseWithReturn(PARENT, ll_comid) end event type dw_company_choose from u_dw_rbtnfilter within w_company_choose integer y = 180 integer width = 3593 integer height = 2180 integer taborder = 20 boolean bringtotop = true string dataobject = "dw_company_choose" boolean hscrollbar = true boolean vscrollbar = true boolean rbutton_filter_use = true boolean rbutton_setposition_use = true boolean titleclick_sort_use = true end type event clicked;call super::clicked;IF (row > 0) THEN THIS.SetRow(row) THIS.SelectRow(0, FALSE) THIS.SelectRow(row, TRUE) END IF end event