123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332 |
- $PBExportHeader$w_outware_sale_ch.srw
- forward
- global type w_outware_sale_ch from w_pageretr_ch
- end type
- type st_2 from statictext within w_outware_sale_ch
- end type
- type em_1 from editmask within w_outware_sale_ch
- end type
- type cbx_mlselect from checkbox within w_outware_sale_ch
- end type
- end forward
- global type w_outware_sale_ch from w_pageretr_ch
- integer width = 3611
- integer height = 2380
- string title = "销售发货单选择"
- st_2 st_2
- em_1 em_1
- cbx_mlselect cbx_mlselect
- end type
- global w_outware_sale_ch w_outware_sale_ch
- type variables
- s_outware_tsale_array INS_RT_STRU
- boolean if_changeselect=true
- int if_mlselect=0
- long cur_cusid,cur_storageid,cur_scid
- end variables
- on w_outware_sale_ch.create
- int iCurrent
- call super::create
- this.st_2=create st_2
- this.em_1=create em_1
- this.cbx_mlselect=create cbx_mlselect
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.st_2
- this.Control[iCurrent+2]=this.em_1
- this.Control[iCurrent+3]=this.cbx_mlselect
- end on
- on w_outware_sale_ch.destroy
- call super::destroy
- destroy(this.st_2)
- destroy(this.em_1)
- destroy(this.cbx_mlselect)
- 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_inware_inwarecode like "%'+trim(sle_usual_query.text)+'%" )'
- else
- obj_expr=obj_expr+'( u_inware_inwarecode 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_inware.inwarecode like '%"+trim(sle_usual_query.text)+"%')"
- else
- ls_querystrpart="(u_inware.inwarecode 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 retrieve_pageretr;boolean cb_firstpage_enabled,cb_nextpage_enabled,cb_retrieveall_enabled
- boolean cb_priorpage_enabled,cb_query_enabled,cb_retrieve_enabled
-
- cb_nextpage_enabled=cb_nextpage.enabled
- cb_retrieveall_enabled=cb_retrieveall.enabled
-
- cb_nextpage.enabled=false
- cb_retrieveall.enabled=false
- //dw_pageretr.reset()
- SetPointer(HourGlass!)
- //dw_pageretr.setredraw(false)
- //
- datetime first_date,end_date
- first_date=datetime(date(em_1.text),time('23:59:59'))
- dw_pageretr.retrieve(cur_scid,first_date)
- //dw_pageretr.setredraw(true)
- SetPointer(Arrow!)
-
- cb_nextpage.enabled=cb_nextpage_enabled
- cb_retrieveall.enabled=cb_retrieveall_enabled
- end event
- event open;this.triggerevent('ue_before_open')
- wf_movetocenter()
- OLD_TITLE=THIS.TITLE
- ///
- EM_1.TEXT=string(TODAY(),'yyyy-mm-dd')
- ///
- 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
- cur_cusid=s_tran.d_long
- cur_storageid=s_tran.c_long
- cur_scid=s_tran.b_long
- end if
- dw_pageretr.RBUTTON_FILTER_USE=true //右键查询功能开关
- dw_pageretr.titleclick_sort_use=true //单击标题排序功能开关
-
- dw_pageretr.SetTransObject (sqlca)
- pkcolumndbtname=dw_pageretr.Describe("#1.dbname") //取第一列为关键字
- 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)
- //if mode=1 then cb_mode_itfchg.TRIGGEREVENT(CLICKED!)
- wf_editindex_lockf()
- if NOT retrieve_all AND trim(arg_string_code)<>'' then
- sle_usual_query.text=trim(arg_string_code)
- THIS.TRIGGEREVENT("ue_usual_query_RETR") //修改ls_newselect,retrieve
- else
- wf_retrieveuc(dw_pageretr,ls_newselect,1)
- end if
- IF retrieve_all AND trim(arg_string_code)<>'' THEN
- THIS.TRIGGEREVENT("ue_usual_query_filt")
- END IF
- s_hide_col s_col_mtrlsectype
- s_col_mtrlsectype.col_1 = 'u_mtrldef_mtrlsectype'
- f_hide_col(1308,dw_pageretr,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)
- cb_refresh.triggerevent(clicked!)
- end event
- event close;call super::close;CLOSEWITHRETURN(THIS,INS_RT_STRU)
- //<INS_RT_STRU> 窗体级子定义结构变量,用于返回
- end event
- type cb_func from w_pageretr_ch`cb_func within w_outware_sale_ch
- end type
- type cb_exit from w_pageretr_ch`cb_exit within w_outware_sale_ch
- end type
- type sle_usual_query from w_pageretr_ch`sle_usual_query within w_outware_sale_ch
- end type
- type cb_retrieveall from w_pageretr_ch`cb_retrieveall within w_outware_sale_ch
- end type
- type em_pagerowno from w_pageretr_ch`em_pagerowno within w_outware_sale_ch
- end type
- type dw_pageretr from w_pageretr_ch`dw_pageretr within w_outware_sale_ch
- integer width = 3589
- integer height = 1992
- string dataobject = "dw_outware_sale_ch"
- end type
- type st_1 from w_pageretr_ch`st_1 within w_outware_sale_ch
- end type
- type cb_nextpage from w_pageretr_ch`cb_nextpage within w_outware_sale_ch
- end type
- type cb_choice from w_pageretr_ch`cb_choice within w_outware_sale_ch
- end type
- event cb_choice::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_pageretr.Object.u_outwaremx_qty[ls_i] < 0 THEN
- MessageBox('提示',"该记录为退货记录不能选择",information!,OK!)
- dw_pageretr.SelectRow(0,False)
- dw_pageretr.SelectRow(ls_i,True)
- RETURN
- END IF
- chC++
- INS_RT_STRU.mtrlwareid[chC] = dw_pageretr.Object.u_outwaremx_mtrlwareid[ls_i]
- INS_RT_STRU.outwareid[chC] = dw_pageretr.Object.u_outware_outwareid[ls_i]
- INS_RT_STRU.outwarecode[chC] = dw_pageretr.Object.u_outware_outwarecode[ls_i]
- INS_RT_STRU.mtrlid[chC] = dw_pageretr.Object.u_outwaremx_mtrlid[ls_i]
- INS_RT_STRU.storageid[chC] = dw_pageretr.Object.u_outware_storageid[ls_i]
- INS_RT_STRU.plancode[chC] = dw_pageretr.Object.u_outwaremx_plancode[ls_i]
- INS_RT_STRU.qty[chC] = dw_pageretr.Object.u_outwaremx_qty[ls_i]
- INS_RT_STRU.price[chC] = dw_pageretr.Object.u_outwaremx_price[ls_i]
- //INS_RT_STRU.cost[chC]=dw_pageretr.OBJECT.u_outwaremx_cost[ls_i]
- INS_RT_STRU.planprice[chC] = dw_pageretr.Object.u_outwaremx_planprice[ls_i]
- INS_RT_STRU.msdscrp[chC] = dw_pageretr.Object.u_outwaremx_mxdscrp[ls_i]
- INS_RT_STRU.mtrlcode[chC] = dw_pageretr.Object.u_mtrldef_mtrlcode[ls_i]
- INS_RT_STRU.mtrlname[chC] = dw_pageretr.Object.u_mtrldef_mtrlname[ls_i]
- INS_RT_STRU.mtrltype[chC] = dw_pageretr.Object.u_mtrldef_mtrltype[ls_i]
- INS_RT_STRU.unit[chC] = dw_pageretr.Object.u_mtrldef_unit[ls_i]
- INS_RT_STRU.dxflag[chC] = dw_pageretr.Object.u_outwaremx_dxflag[ls_i]
- IF IsNull(INS_RT_STRU.qty[chC]) THEN INS_RT_STRU.qty[chC] = 0
- INS_RT_STRU.mtrlmode[chC] = dw_pageretr.Object.u_mtrldef_mtrlmode[ls_i]
- INS_RT_STRU.fprice[chC] = dw_pageretr.Object.u_outwaremx_fprice[ls_i]
- INS_RT_STRU.rebate[chC] = dw_pageretr.Object.u_outwaremx_rebate[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]
- END IF
- NEXT
- IF chC = 0 THEN
- MessageBox('提示','请至少选择一个目标行!',information!,OK!)
- RETURN
- END IF
- Close(Parent)
- end event
- type cb_refresh from w_pageretr_ch`cb_refresh within w_outware_sale_ch
- end type
- event cb_refresh::clicked;parent.triggerevent("retrieve_pageretr")
- end event
- type cb_help from w_pageretr_ch`cb_help within w_outware_sale_ch
- end type
- type ln_bar from w_pageretr_ch`ln_bar within w_outware_sale_ch
- end type
- type ln_bar2 from w_pageretr_ch`ln_bar2 within w_outware_sale_ch
- end type
- type r_bar from w_pageretr_ch`r_bar within w_outware_sale_ch
- end type
- type ln_1 from w_pageretr_ch`ln_1 within w_outware_sale_ch
- end type
- type ln_2 from w_pageretr_ch`ln_2 within w_outware_sale_ch
- end type
- type st_2 from statictext within w_outware_sale_ch
- integer x = 832
- integer y = 200
- integer width = 457
- integer height = 48
- 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 focusrectangle = false
- end type
- type em_1 from editmask within w_outware_sale_ch
- integer x = 1280
- integer y = 180
- integer width = 384
- integer height = 88
- integer taborder = 120
- boolean bringtotop = true
- 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
- type cbx_mlselect from checkbox within w_outware_sale_ch
- boolean visible = false
- integer x = 1234
- integer y = 1408
- integer width = 210
- 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 = 67108864
- string text = "多选 "
- end type
|