123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170 |
- $PBExportHeader$w_rp_ware_warebalc_cmpl.srw
- forward
- global type w_rp_ware_warebalc_cmpl from w_publ_easyq
- end type
- type ddlb_2 from dropdownlistbox within w_rp_ware_warebalc_cmpl
- end type
- type ddlb_storageid from uo_ddlb_storageid within w_rp_ware_warebalc_cmpl
- end type
- type cb_other from uo_imflatbutton within w_rp_ware_warebalc_cmpl
- end type
- type tv_1 from uo_tv_mtrltype within w_rp_ware_warebalc_cmpl
- end type
- type cbx_inout from checkbox within w_rp_ware_warebalc_cmpl
- end type
- type tab_1 from tab within w_rp_ware_warebalc_cmpl
- end type
- type tabpage_1 from userobject within tab_1
- end type
- type st_6 from statictext within tabpage_1
- end type
- type st_7 from statictext within tabpage_1
- end type
- type ddlb_1 from dropdownlistbox within tabpage_1
- end type
- type cb_iomx_retrieve from uo_imflatbutton within tabpage_1
- end type
- type em_4 from editmask within tabpage_1
- end type
- type em_3 from editmask within tabpage_1
- end type
- type dw_inout from u_dw_rbtnfilter within tabpage_1
- end type
- type tabpage_1 from userobject within tab_1
- st_6 st_6
- st_7 st_7
- ddlb_1 ddlb_1
- cb_iomx_retrieve cb_iomx_retrieve
- em_4 em_4
- em_3 em_3
- dw_inout dw_inout
- end type
- type tabpage_2 from userobject within tab_1
- end type
- type dw_out_noaudit from u_dw_rbtnfilter within tabpage_2
- end type
- type tabpage_2 from userobject within tab_1
- dw_out_noaudit dw_out_noaudit
- end type
- type tabpage_3 from userobject within tab_1
- end type
- type dw_3 from u_dw_rbtnfilter within tabpage_3
- end type
- type dw_4 from u_dw_rbtnfilter within tabpage_3
- end type
- type cb_3 from uo_imflatbutton within tabpage_3
- end type
- type tabpage_3 from userobject within tab_1
- dw_3 dw_3
- dw_4 dw_4
- cb_3 cb_3
- end type
- type tab_1 from tab within w_rp_ware_warebalc_cmpl
- tabpage_1 tabpage_1
- tabpage_2 tabpage_2
- tabpage_3 tabpage_3
- end type
- end forward
- global type w_rp_ware_warebalc_cmpl from w_publ_easyq
- string title = "仓库推算结存表"
- event ue_retrieve_info ( )
- event ue_retrieve_inoutmx ( )
- event ue_getbalcdateint ( )
- ddlb_2 ddlb_2
- ddlb_storageid ddlb_storageid
- cb_other cb_other
- tv_1 tv_1
- cbx_inout cbx_inout
- tab_1 tab_1
- end type
- global w_rp_ware_warebalc_cmpl w_rp_ware_warebalc_cmpl
- type variables
- Long cur_storageid = -1
- long cur_storageid_arr[]
- DateTime balcdate //结存日期
- DateTime balcdate_end //结存日期end
- //Int cur_mtrlorigin = -1 //当前显示物料来源
- String ls_handtype = ''
- string ls_mtrltype = ''
- long viewtype = 0
- integer cur_billtype_in = -1
- integer cur_billtype_out = -1
- Long balcdateint
- end variables
- forward prototypes
- public subroutine wf_hidecol ()
- public function window getparentwindow ()
- public subroutine wf_retrieve_allmtrlware ()
- public subroutine wf_retrieve_allmtrlware_mx ()
- end prototypes
- event ue_retrieve_info();Long ll_row
- Long ll_mtrlid
- ll_row = dw_1.GetRow()
- IF ll_row <= 0 THEN
- ll_mtrlid = 0
- ELSE
- ll_mtrlid = dw_1.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
- event ue_retrieve_inoutmx();Long ll_row
- Long ll_storageid[]
- long ll_mtrlid
- String ls_status,ls_woodcode,ls_pcode
- String ls_plancode,ls_mtrlcuscode,ls_location
- DateTime ld_fdate,ld_edate,ld_showsale_data
- ll_row = dw_1.GetRow()
- tab_1.tabpage_1.dw_inout.setredraw(false)
- tab_1.tabpage_1.dw_inout.setfilter('')
- tab_1.tabpage_1.dw_inout.filter()
- IF ll_row <= 0 THEN
- tab_1.tabpage_1.dw_inout.Reset()
- ELSE
- ld_fdate = DateTime(Date(tab_1.tabpage_1.em_3.Text),Time(0))
- ld_edate = DateTime(Date(tab_1.tabpage_1.em_4.Text),Time('23:59:59'))
-
- IF ld_fdate < sys_showsaledata_mindt THEN
- ld_showsale_data = sys_showsaledata_mindt
- ELSE
- ld_showsale_data = ld_fdate
- END IF
- ll_storageid = cur_storageid_arr
- ll_mtrlid = dw_1.Object.u_mtrldef_mtrlid[ll_row]
-
- IF viewtype = 2 THEN
- ls_status = dw_1.Object.uv_warebalc_view_status[ll_row]
- ls_woodcode = dw_1.Object.uv_warebalc_view_woodcode[ll_row]
- ls_pcode = dw_1.Object.uv_warebalc_view_pcode[ll_row]
- ELSE
- IF balcdateint = 0 THEN
- IF viewtype = 0 THEN
- ls_status = dw_1.Object.uv_warebalc_view_status[ll_row]
- ls_woodcode = dw_1.Object.uv_warebalc_view_woodcode[ll_row]
- ls_pcode = dw_1.Object.uv_warebalc_view_pcode[ll_row]
- ELSEIF viewtype = 1 THEN
- ls_status = dw_1.Object.uv_warebalc_view_cusid_status[ll_row]
- ls_woodcode = dw_1.Object.uv_warebalc_view_cusid_woodcode[ll_row]
- ls_pcode = dw_1.Object.uv_warebalc_view_cusid_pcode[ll_row]
- END IF
- ELSE
- IF viewtype = 0 THEN
- ls_status = dw_1.Object.status[ll_row]
- ls_woodcode = dw_1.Object.woodcode[ll_row]
- ls_pcode = dw_1.Object.pcode[ll_row]
- ELSEIF viewtype = 1 THEN
- ls_status = dw_1.Object.uv_warebalc_view_1_cusid_status[ll_row]
- ls_woodcode = dw_1.Object.uv_warebalc_view_1_cusid_woodcode[ll_row]
- ls_pcode = dw_1.Object.uv_warebalc_view_1_cusid_pcode[ll_row]
- END IF
- END IF
- END IF
-
- tab_1.tabpage_1.dw_inout.Retrieve(ll_storageid,ll_mtrlid,ld_fdate,ld_edate,ls_status,ls_woodcode,ls_pcode,ld_showsale_data, cur_billtype_in, cur_billtype_out)
- END IF
- tab_1.tabpage_1.dw_inout.setredraw(true)
- end event
- event ue_getbalcdateint();DateTime first_date,end_date
- first_date = DateTime(Date(em_1.Text),Time(0))
- end_date = DateTime(Date(em_2.Text),Time('23:59:59'))
- SELECT top 1 isnull(min(balcdateint),0)
- INTO :balcdateint
- FROM u_warebalc
- WHERE balcdate >= :end_date
- And storageid = :cur_storageid;
- IF sqlca.SQLCode <> 0 THEN
- MessageBox('错误','查询结存日期失败!',stopsign!,ok!)
- RETURN
- END IF
- DELETE u_parm_batchtake ;
- IF sqlca.SQLCode <> 0 THEN
- ROLLBACK ;
- MessageBox('错误',"因网络或其它原因导致操作失败,请重试!"+sqlca.SQLErrText,information!,ok!)
- RETURN
- END IF
- INSERT Into u_parm_batchtake (cusid,firstdate,enddate,balcdateint) Values (0,:first_date,:end_date,:balcdateint) ;
- IF sqlca.SQLCode <> 0 THEN
- ROLLBACK ;
- MessageBox('错误',"因网络或其它原因导致操作失败,请重试!"+sqlca.SQLErrText,information!,ok!)
- RETURN
- END IF
- COMMIT ;
- end event
- public subroutine wf_hidecol ();s_hide_col s_col
- s_col.col_1 = 'bgamt'
- s_col.col_2 = 'uv_warebalc_view_incamt'
- s_col.col_3 = 'uv_warebalc_view_desamt'
- s_col.col_4 = 'uv_warebalc_view_balcamt'
-
- f_hide_col(123,dw_1,s_col)
- s_hide_col s_col_mtrlsectype
- s_col_mtrlsectype.col_1 = 'u_mtrldef_mtrlsectype'
- f_hide_col(1308,dw_1,s_col_mtrlsectype)
- s_hide_col s_col_zxmtrlmode
- s_col_zxmtrlmode.col_1 = 'u_mtrldef_zxmtrlmode'
- f_hide_col(1309,dw_1,s_col_zxmtrlmode)
- end subroutine
- public function window getparentwindow ();return this
- end function
- public subroutine wf_retrieve_allmtrlware ();
- end subroutine
- public subroutine wf_retrieve_allmtrlware_mx ();
- end subroutine
- on w_rp_ware_warebalc_cmpl.create
- int iCurrent
- call super::create
- this.ddlb_2=create ddlb_2
- this.ddlb_storageid=create ddlb_storageid
- this.cb_other=create cb_other
- this.tv_1=create tv_1
- this.cbx_inout=create cbx_inout
- this.tab_1=create tab_1
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.ddlb_2
- this.Control[iCurrent+2]=this.ddlb_storageid
- this.Control[iCurrent+3]=this.cb_other
- this.Control[iCurrent+4]=this.tv_1
- this.Control[iCurrent+5]=this.cbx_inout
- this.Control[iCurrent+6]=this.tab_1
- end on
- on w_rp_ware_warebalc_cmpl.destroy
- call super::destroy
- destroy(this.ddlb_2)
- destroy(this.ddlb_storageid)
- destroy(this.cb_other)
- destroy(this.tv_1)
- destroy(this.cbx_inout)
- destroy(this.tab_1)
- end on
- event resize;call super::resize;tv_1.height=this.height - dw_1.y - 115
- IF cbx_inout.Checked THEN
- tab_1.Visible = TRUE
-
- dw_1.Width = THIS.Width - dw_1.X - 40
- dw_1.Height = THIS.Height - dw_1.Y - tab_1.Height - 150
-
- tv_1.Height = THIS.Height - tv_1.Y - 150
-
-
-
- tab_1.Width = THIS.Width - tab_1.X - 40
-
- tab_1.Y = dw_1.Y + dw_1.Height + 10
- tab_1.X = dw_1.X
- tab_1.tabpage_1.dw_inout.Height = tab_1.tabpage_1.Height - tab_1.tabpage_1.dw_inout.Y - 40
- tab_1.tabpage_1.dw_inout.Width = tab_1.tabpage_1.Width - tab_1.tabpage_1.dw_inout.X - 40
- tab_1.tabpage_2.dw_out_noaudit.Height = tab_1.tabpage_2.Height - tab_1.tabpage_2.dw_out_noaudit.Y - 40
- tab_1.tabpage_2.dw_out_noaudit.Width = tab_1.tabpage_2.Width - tab_1.tabpage_2.dw_out_noaudit.X - 40
-
-
- tab_1.tabpage_3.dw_3.Width = (tab_1.tabpage_3.Width - tab_1.tabpage_3.dw_3.X - 40) / 2
- tab_1.tabpage_3.dw_3.Height = tab_1.tabpage_3.Height - tab_1.tabpage_3.dw_3.Y - 40
-
- tab_1.tabpage_3.dw_4.x=tab_1.tabpage_3.dw_3.X + tab_1.tabpage_3.dw_3.Width + 10
-
- tab_1.tabpage_3.dw_4.Width = (tab_1.tabpage_3.Width - tab_1.tabpage_3.dw_3.X - 40) / 2 - 30
- tab_1.tabpage_3.dw_4.Height = tab_1.tabpage_3.Height - tab_1.tabpage_3.dw_4.Y - 40
-
-
- ELSE
- dw_1.Width = THIS.Width - dw_1.X - 40
- dw_1.Height = THIS.Height - dw_1.Y - 150
-
- tv_1.Height = THIS.Height - tv_1.Y - 150
-
- tab_1.Visible = FALSE
-
- END IF
- end event
- event ue_before_openretrieve;call super::ue_before_openretrieve;//tv_1.f_maketree(-1)
- //wf_hide_col()
- end event
- event open;call super::open;tab_1.tabpage_2.visible = false
- tab_1.tabpage_3.visible = false
- end event
- type cb_func from w_publ_easyq`cb_func within w_rp_ware_warebalc_cmpl
- end type
- type cb_exit from w_publ_easyq`cb_exit within w_rp_ware_warebalc_cmpl
- integer x = 1477
- end type
- type cb_2 from w_publ_easyq`cb_2 within w_rp_ware_warebalc_cmpl
- integer x = 1175
- boolean bringtotop = true
- end type
- type cb_psetup from w_publ_easyq`cb_psetup within w_rp_ware_warebalc_cmpl
- integer x = 919
- boolean bringtotop = true
- end type
- type cb_1 from w_publ_easyq`cb_1 within w_rp_ware_warebalc_cmpl
- event ue_balcdateint ( )
- boolean bringtotop = true
- end type
- event cb_1::clicked;Parent.TriggerEvent("ue_getbalcdateint")
- // 与balcdateint 有关
- dw_1.uf_save_profile_layout()
- IF viewtype = 2 THEN
- dw_1.DataObject = 'dw_rp_ware_warebalc_cmpl_2'
- ELSEIF viewtype = 3 THEN
- dw_1.DataObject = 'dw_rp_dsr_ware_warebalc_his_cg'
- ELSE
- IF balcdateint = 0 THEN
- IF viewtype = 0 THEN
- dw_1.DataObject = 'dw_rp_ware_warebalc_cmpl'
- ELSEIF viewtype = 1 THEN
- dw_1.DataObject = 'dw_rp_ware_warebalc_cmpl_cusid'
- END IF
- ELSE
- IF viewtype = 0 THEN
- dw_1.DataObject = 'dw_rp_ware_warebalc_cmpl_1'
- ELSEIF viewtype = 1 THEN
- dw_1.DataObject = 'dw_rp_ware_warebalc_cmpl_1_cusid'
- END IF
- END IF
- END IF
- dw_1.uf_read_profile_layout()
- wf_replacedw()
- dw_1.Retrieve(cur_storageid_arr,ls_handtype)
- IF cur_storageid = -1 THEN
- dw_1.Object.Title.Text = '仓库推算结存表'
- ELSE
- dw_1.Object.Title.Text = Trim(Left(ddlb_storageid.Text,Pos(ddlb_storageid.Text,'[') - 1))+'-推算结存表'
- END IF
- dw_1.SetRedraw(True)
- end event
- type st_3 from w_publ_easyq`st_3 within w_rp_ware_warebalc_cmpl
- integer x = 690
- integer y = 204
- end type
- type st_4 from w_publ_easyq`st_4 within w_rp_ware_warebalc_cmpl
- integer x = 1381
- integer y = 204
- end type
- type em_1 from w_publ_easyq`em_1 within w_rp_ware_warebalc_cmpl
- integer x = 882
- integer y = 188
- integer taborder = 120
- end type
- type em_2 from w_publ_easyq`em_2 within w_rp_ware_warebalc_cmpl
- integer x = 1486
- integer y = 188
- integer taborder = 130
- end type
- type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_ware_warebalc_cmpl
- integer x = 1984
- integer y = 12
- end type
- type cbx_yl from w_publ_easyq`cbx_yl within w_rp_ware_warebalc_cmpl
- integer x = 1774
- integer y = 12
- end type
- type dw_1 from w_publ_easyq`dw_1 within w_rp_ware_warebalc_cmpl
- integer x = 805
- integer y = 300
- integer width = 2400
- integer height = 1808
- string dataobject = "dw_rp_ware_warebalc_cmpl"
- end type
- event dw_1::doubleclicked;call super::doubleclicked;IF dw_1.DataObject = 'dw_rp_ware_inware' THEN
- IF row > 0 THEN
- String ls_code,ls_relcode
- Long ll_scid
- int li_thflag,li_billtype
-
- ll_scid = THIS.Object.u_inware_scid[row]
- ls_code = THIS.Object.u_inware_inwarecode[row]
- ls_relcode = THIS.Object.u_inware_part[row]
- li_billtype = THIS.Object.u_inware_billtype[row]
- CHOOSE CASE li_billtype
- CASE 4,12,15
- f_open_win(ll_scid,ls_relcode)
- CASE ELSE
- f_open_win(ll_scid,ls_code)
- END CHOOSE
-
- END IF
- END IF
- end event
- event dw_1::rowfocuschanged;call super::rowfocuschanged;IF currentrow <= 0 THEN RETURN
- THIS.SelectRow(0,FALSE)
- THIS.SelectRow(currentrow,TRUE)
- IF ddlb_2.Text = '明细表' THEN
- PARENT.TriggerEvent('ue_retrieve_info')
- END IF
- IF cbx_inout.Checked THEN
- Parent.TriggerEvent('ue_retrieve_inoutmx')
- wf_retrieve_allmtrlware()
- END IF
- end event
- type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_ware_warebalc_cmpl
- end type
- type sle_cust from w_publ_easyq`sle_cust within w_rp_ware_warebalc_cmpl
- end type
- type st_mtrl from w_publ_easyq`st_mtrl within w_rp_ware_warebalc_cmpl
- end type
- type st_cust from w_publ_easyq`st_cust within w_rp_ware_warebalc_cmpl
- end type
- type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_ware_warebalc_cmpl
- integer x = 1774
- integer y = 100
- end type
- type pb_em1 from w_publ_easyq`pb_em1 within w_rp_ware_warebalc_cmpl
- integer x = 1298
- integer y = 188
- end type
- type pb_em2 from w_publ_easyq`pb_em2 within w_rp_ware_warebalc_cmpl
- integer x = 1897
- integer y = 188
- end type
- type pb_2 from w_publ_easyq`pb_2 within w_rp_ware_warebalc_cmpl
- integer x = 2007
- integer y = 188
- end type
- type cb_help from w_publ_easyq`cb_help within w_rp_ware_warebalc_cmpl
- integer x = 1330
- end type
- type cb_copyself from w_publ_easyq`cb_copyself within w_rp_ware_warebalc_cmpl
- end type
- type gb_1 from w_publ_easyq`gb_1 within w_rp_ware_warebalc_cmpl
- end type
- type ln_bar from w_publ_easyq`ln_bar within w_rp_ware_warebalc_cmpl
- end type
- type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_ware_warebalc_cmpl
- end type
- type r_bar from w_publ_easyq`r_bar within w_rp_ware_warebalc_cmpl
- integer x = 2469
- end type
- type ln_1 from w_publ_easyq`ln_1 within w_rp_ware_warebalc_cmpl
- end type
- type ln_2 from w_publ_easyq`ln_2 within w_rp_ware_warebalc_cmpl
- end type
- type ln_3 from w_publ_easyq`ln_3 within w_rp_ware_warebalc_cmpl
- boolean visible = false
- end type
- type ln_4 from w_publ_easyq`ln_4 within w_rp_ware_warebalc_cmpl
- boolean visible = false
- end type
- type ddlb_2 from dropdownlistbox within w_rp_ware_warebalc_cmpl
- integer x = 2464
- integer y = 36
- integer width = 622
- integer height = 448
- integer taborder = 80
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- string text = "按配置"
- boolean sorted = false
- boolean vscrollbar = true
- string item[] = {"按配置","按客户配置","按配置[带计划价]"}
- borderstyle borderstyle = stylelowered!
- end type
- event selectionchanged;
- dw_1.uf_save_profile_layout()
- IF THIS.Text = '按配置' THEN
- viewtype = 0
- ELSEIF THIS.Text = '按客户配置' THEN
- viewtype = 1
- ELSEIF THIS.Text = '按配置[带计划价]' THEN
- viewtype = 2
-
-
- END IF
- cb_1.TriggerEvent(Clicked!)
- end event
- type ddlb_storageid from uo_ddlb_storageid within w_rp_ware_warebalc_cmpl
- integer y = 192
- integer width = 681
- integer height = 1108
- integer taborder = 130
- boolean bringtotop = true
- end type
- event constructor;call super::constructor;cur_storageid = this.uo_storageid
- cur_storageid_arr = this.uo_storageid_arr
- end event
- event selectionchanged;call super::selectionchanged;cur_storageid = this.uo_storageid
- cur_storageid_arr = this.uo_storageid_arr
- cb_1.triggerevent(clicked!)
- end event
- type cb_other from uo_imflatbutton within w_rp_ware_warebalc_cmpl
- integer x = 562
- integer width = 361
- integer height = 164
- integer taborder = 130
- 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_1.GetRow()
- IF ll_row <= 0 THEN
- MessageBox('提示','请选择物料',information!,OK!)
- RETURN
- END IF
- Long ll_mtrlid
- ll_mtrlid = dw_1.Object.u_mtrldef_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 tv_1 from uo_tv_mtrltype within w_rp_ware_warebalc_cmpl
- integer x = 5
- integer y = 300
- integer width = 800
- integer height = 1808
- integer taborder = 130
- boolean bringtotop = true
- integer textsize = -9
- fontcharset fontcharset = gb2312charset!
- fontfamily fontfamily = anyfont!
- string facename = "宋体"
- end type
- event selectionchanged;call super::selectionchanged;
- ls_handtype = THIS.uo_cur_info.handtype
- ls_mtrltype = THIS.uo_cur_info.mtrltype
- IF ls_handtype <> '' THEN
- ls_mtrltype = '%'+ls_handtype+'%'
- ls_handtype = ls_handtype+'%'
- ELSE
- ls_mtrltype = ""
- END IF
- cb_1.TriggerEvent(Clicked!)
- end event
- type cbx_inout from checkbox within w_rp_ware_warebalc_cmpl
- integer x = 2222
- integer y = 220
- 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 = "显示明细"
- end type
- event clicked;Int if_inout
- IF This.Checked THEN
- if_inout = 1
- ELSE
- if_inout = 0
- END IF
- //f_SetProfileString (sys_empid,dw_1.DataObject, "if_inout", String(if_inout))
- Parent.TriggerEvent(Resize!)
- Parent.TriggerEvent("ue_getbalcdateint")
- Parent.TriggerEvent("ue_retrieve_inoutmx")
- end event
- event constructor;Int if_inout
- //if_inout = Integer(f_ProfileString (sys_empid,dw_1.DataObject, "if_inout", '0'))
- IF if_inout = 0 THEN
- This.Checked = False
- ELSE
- This.Checked = True
- END IF
- end event
- type tab_1 from tab within w_rp_ware_warebalc_cmpl
- event create ( )
- event destroy ( )
- integer x = 786
- integer y = 1228
- integer width = 2286
- integer height = 1056
- integer taborder = 70
- 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_1 tabpage_1
- tabpage_2 tabpage_2
- tabpage_3 tabpage_3
- end type
- on tab_1.create
- this.tabpage_1=create tabpage_1
- this.tabpage_2=create tabpage_2
- this.tabpage_3=create tabpage_3
- this.Control[]={this.tabpage_1,&
- this.tabpage_2,&
- this.tabpage_3}
- end on
- on tab_1.destroy
- destroy(this.tabpage_1)
- destroy(this.tabpage_2)
- destroy(this.tabpage_3)
- end on
- type tabpage_1 from userobject within tab_1
- event create ( )
- event destroy ( )
- integer x = 18
- integer y = 96
- integer width = 2249
- integer height = 944
- long backcolor = 134217739
- string text = "进出明细"
- long tabtextcolor = 33554432
- long tabbackcolor = 134217739
- long picturemaskcolor = 536870912
- st_6 st_6
- st_7 st_7
- ddlb_1 ddlb_1
- cb_iomx_retrieve cb_iomx_retrieve
- em_4 em_4
- em_3 em_3
- dw_inout dw_inout
- end type
- on tabpage_1.create
- this.st_6=create st_6
- this.st_7=create st_7
- this.ddlb_1=create ddlb_1
- this.cb_iomx_retrieve=create cb_iomx_retrieve
- this.em_4=create em_4
- this.em_3=create em_3
- this.dw_inout=create dw_inout
- this.Control[]={this.st_6,&
- this.st_7,&
- this.ddlb_1,&
- this.cb_iomx_retrieve,&
- this.em_4,&
- this.em_3,&
- this.dw_inout}
- end on
- on tabpage_1.destroy
- destroy(this.st_6)
- destroy(this.st_7)
- destroy(this.ddlb_1)
- destroy(this.cb_iomx_retrieve)
- destroy(this.em_4)
- destroy(this.em_3)
- destroy(this.dw_inout)
- end on
- type st_6 from statictext within tabpage_1
- integer x = 631
- integer y = 20
- integer width = 73
- integer height = 48
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217739
- string text = "至"
- boolean focusrectangle = false
- end type
- type st_7 from statictext within tabpage_1
- integer x = 9
- integer y = 20
- integer width = 219
- integer height = 48
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217739
- string text = "日期从:"
- boolean focusrectangle = false
- end type
- type ddlb_1 from dropdownlistbox within tabpage_1
- integer x = 1381
- integer y = 4
- integer width = 827
- integer height = 976
- integer taborder = 50
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- string text = "全 部[0]"
- boolean sorted = false
- boolean vscrollbar = true
- string item[] = {"全 部[0]","全部进仓[0]","全部出仓{0}","采购进仓[1]","生产进仓[3]","外协进仓[4]","其它进仓[8]","盘盈进仓[9]","调拨进仓[12]","拆装进仓[15]","来料加工收料进仓[20]","库存配置调整单[22]","销售出仓{1}","领料出仓{3}","外协仓库出仓{4}","其它出仓{8}","盘亏出仓{9}","扣费品出仓{10}","调拨出仓{12}","拆装出仓{15}"}
- borderstyle borderstyle = stylelowered!
- end type
- event selectionchanged;string ls_billtype
- choose case index
- case 1
- cur_billtype_in = -1
- cur_billtype_out = -1
- case 2
- cur_billtype_in = -1
- cur_billtype_out = 0
- case 3
- cur_billtype_in = 0
- cur_billtype_out = -1
- case else
- ls_billtype = Mid ( this.text,pos(this.text,'[') + 1,len(this.text) - pos(this.text,'[') - 1 )
- if isnumber(ls_billtype) then
- cur_billtype_in=long(ls_billtype)
- else
- cur_billtype_in = 0
- end if
-
- ls_billtype = Mid ( this.text,pos(this.text,'{') + 1,len(this.text) - pos(this.text,'{') - 1 )
- if isnumber(ls_billtype) then
- cur_billtype_out=long(ls_billtype)
- else
- cur_billtype_out = 0
- end if
- end choose
-
- cb_iomx_retrieve.triggerevent(clicked!)
- end event
- type cb_iomx_retrieve from uo_imflatbutton within tabpage_1
- integer x = 1134
- integer y = 4
- integer width = 215
- integer height = 84
- integer taborder = 100
- string text = "刷新"
- integer picsize = 16
- end type
- event clicked;call super::clicked;getparentwindow().triggerevent("ue_retrieve_inoutmx")
- end event
- type em_4 from editmask within tabpage_1
- integer x = 704
- integer y = 4
- integer width = 402
- integer height = 84
- integer taborder = 100
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- string text = "none"
- borderstyle borderstyle = stylelowered!
- maskdatatype maskdatatype = datemask!
- string mask = "yyyy-mm-dd"
- boolean spin = true
- end type
- event constructor;this.Text = String(Today(),'YYYY-MM-DD')
- end event
- type em_3 from editmask within tabpage_1
- integer x = 224
- integer y = 4
- integer width = 402
- integer height = 84
- integer taborder = 100
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- string text = "none"
- borderstyle borderstyle = stylelowered!
- maskdatatype maskdatatype = datemask!
- string mask = "yyyy-mm-dd"
- boolean spin = true
- end type
- event constructor;this.Text = String(Today(),'YYYY-MM')+'-01'
- end event
- type dw_inout from u_dw_rbtnfilter within tabpage_1
- integer y = 92
- integer taborder = 40
- string dataobject = "dw_rp_ware_mtrlware_inoutmx_2"
- 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 clicked;call super::clicked;IF row > 0 THEN
- This.SelectRow(0, False)
- This.SetRow(row)
- This.SelectRow(row,True)
- END IF
- end event
- event doubleclicked;call super::doubleclicked;IF row > 0 THEN
- String ls_code,ls_relcode,arg_msg
- Long ll_scid
- Int li_thflag,li_billtype
-
- ll_scid = This.Object.u_outware_scid[row]
- ls_code = This.Object.code[row]
- IF f_open_check(ll_scid,ls_code,arg_msg) = 0 THEN
- MessageBox('提示',arg_msg,information!,OK!)
- RETURN
- END IF
-
-
- f_open_win(ll_scid,ls_code)
- END IF
- end event
- type tabpage_2 from userobject within tab_1
- event create ( )
- event destroy ( )
- boolean visible = false
- integer x = 18
- integer y = 96
- integer width = 2249
- integer height = 944
- long backcolor = 134217739
- string text = "未审明细"
- long tabtextcolor = 33554432
- long tabbackcolor = 134217739
- long picturemaskcolor = 536870912
- dw_out_noaudit dw_out_noaudit
- end type
- on tabpage_2.create
- this.dw_out_noaudit=create dw_out_noaudit
- this.Control[]={this.dw_out_noaudit}
- end on
- on tabpage_2.destroy
- destroy(this.dw_out_noaudit)
- end on
- type dw_out_noaudit from u_dw_rbtnfilter within tabpage_2
- string dataobject = "dw_rp_ware_mtrlware_out_noaudit"
- 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 clicked;call super::clicked;IF row > 0 THEN
- This.SelectRow(0, False)
- This.SetRow(row)
- This.SelectRow(row,True)
- END IF
- end event
- event doubleclicked;call super::doubleclicked;IF row > 0 THEN
- String ls_code,ls_relcode
- Long ll_scid
- Int li_thflag,li_billtype
-
- ll_scid = This.Object.u_outware_scid[row]
- ls_code = This.Object.u_outware_outwarecode[row]
- f_open_win(ll_scid,ls_code)
- END IF
- end event
- type tabpage_3 from userobject within tab_1
- event create ( )
- event destroy ( )
- boolean visible = false
- integer x = 18
- integer y = 96
- integer width = 2249
- integer height = 944
- long backcolor = 134217739
- string text = "进仓批明细"
- long tabtextcolor = 33554432
- long tabbackcolor = 134217739
- long picturemaskcolor = 536870912
- dw_3 dw_3
- dw_4 dw_4
- cb_3 cb_3
- end type
- on tabpage_3.create
- this.dw_3=create dw_3
- this.dw_4=create dw_4
- this.cb_3=create cb_3
- this.Control[]={this.dw_3,&
- this.dw_4,&
- this.cb_3}
- end on
- on tabpage_3.destroy
- destroy(this.dw_3)
- destroy(this.dw_4)
- destroy(this.cb_3)
- end on
- type dw_3 from u_dw_rbtnfilter within tabpage_3
- integer y = 92
- integer height = 604
- integer taborder = 50
- boolean titlebar = true
- string title = "进仓成本明细(先进先出法)"
- string dataobject = "dw_rp_ware_mtrlware_dw3_allmtrlware"
- boolean controlmenu = true
- boolean minbox = true
- boolean maxbox = true
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean livescroll = false
- 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.SelectRow(0,False)
- This.SelectRow(row,True)
- This.SetRow(row)
- wf_retrieve_allmtrlware_mx()
- END IF
- end event
- event doubleclicked;call super::doubleclicked;IF row > 0 THEN
- String ls_code
- Long ll_scid
-
- ll_scid = THIS.Object.scid[row]
- ls_code = THIS.Object.u_mtrlware_inmx_inwarecode[row]
-
- f_open_win(ll_scid,ls_code)
- END IF
- end event
- type dw_4 from u_dw_rbtnfilter within tabpage_3
- integer x = 1033
- integer y = 100
- integer height = 596
- integer taborder = 70
- boolean titlebar = true
- string title = "明细库存 占用明细(先进先出法)"
- string dataobject = "dw_rp_ware_mtrlware_dw4_allmtrlware_mx"
- boolean controlmenu = true
- boolean minbox = true
- boolean maxbox = true
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean livescroll = false
- 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.SelectRow(0, False)
- This.SetRow(row)
- This.SelectRow(row,True)
- END IF
- end event
- event doubleclicked;call super::doubleclicked;IF row > 0 THEN
- String ls_code,ls_relcode
- Long ll_scid
- Int li_thflag,li_billtype
- long ll_row
-
-
- ll_row = dw_1.GetRow()
- IF ll_row = 0 THEN RETURN
- ll_scid =dw_1 .Object.u_mtrlware_scid[ll_row]
- ls_code = This.Object.outwarecode[row]
- f_open_win(ll_scid,ls_code)
- END IF
- end event
- type cb_3 from uo_imflatbutton within tabpage_3
- integer x = 23
- integer width = 215
- integer height = 84
- integer taborder = 50
- string text = "刷新"
- integer picsize = 16
- end type
- event clicked;call super::clicked;wf_retrieve_allmtrlware()
- end event
|