123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349 |
- $PBExportHeader$w_saletask_ch.srw
- forward
- global type w_saletask_ch from w_publ_choice
- end type
- type dw_chmx from u_dw_rbtnfilter within w_saletask_ch
- end type
- type cbx_ifzero from checkbox within w_saletask_ch
- end type
- type cbx_ifinware from checkbox within w_saletask_ch
- end type
- end forward
- global type w_saletask_ch from w_publ_choice
- integer width = 3611
- integer height = 2380
- string title = "订单选择"
- dw_chmx dw_chmx
- cbx_ifzero cbx_ifzero
- cbx_ifinware cbx_ifinware
- end type
- global w_saletask_ch w_saletask_ch
- type variables
- s_saletask_ch INS_RT_STRU
- long cur_scid
- long cur_areaid_arr[]
- long if_inware = 1
- long cur_cusid
- end variables
- forward prototypes
- public subroutine wf_retrievemx ()
- end prototypes
- 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_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
- 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
- end on
- on w_saletask_ch.destroy
- call super::destroy
- destroy(this.dw_chmx)
- destroy(this.cbx_ifzero)
- destroy(this.cbx_ifinware)
- end on
- event close;call super::close;CLOSEWITHRETURN(THIS,INS_RT_STRU)
- //<INS_RT_STRU> 窗体级子定义结构变量,用于返回
- end event
- event open;This.TriggerEvent('ue_before_open')
- wf_movetocenter()
- dw_CH.SetTransObject (sqlca)
- dw_chmx.SetTransObject (sqlca)
- s_hide_col s_col_mtrlsectype
- s_col_mtrlsectype.col_1 = 'u_mtrldef_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_chmx,s_col_zxmtrlmode)
- s_saletask_find s_find
- s_find = Message.PowerObjectParm
- cur_scid = s_find.scid
- cur_areaid_arr = s_find.areaid
- IF s_find.cusid > 0 then
- cur_cusid = s_find.cusid
- ELSE
- cur_cusid = -1
- END IF
- if_inware = Integer(f_ProfileString (sys_empid,dw_CH.DataObject, "if_inware", '0'))
- 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)
- 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_ch
- end type
- type cb_exit from w_publ_choice`cb_exit within w_saletask_ch
- end type
- type sle_ch from w_publ_choice`sle_ch within w_saletask_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_ch
- integer width = 3547
- integer height = 1268
- string dataobject = "dw_saletask_ch"
- boolean rbutton_filter_use = true
- boolean rbutton_setposition_use = true
- boolean titleclick_sort_use = true
- 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_ch
- integer width = 837
- string text = "订单编号/客户编号/客户名称含:"
- boolean righttoleft = false
- end type
- type cb_retrieve from w_publ_choice`cb_retrieve within w_saletask_ch
- end type
- event cb_retrieve::clicked;Int li_option_outrep
- IF sys_power_issuper THEN
- li_option_outrep = 0
- ELSE
- li_option_outrep = sys_option_outrep
- END IF
- dw_ch.retrieve(cur_scid,cur_areaid_arr,if_inware, sys_user_outrep, li_option_outrep,cur_cusid)
- wf_retrievemx()
- end event
- type cb_choice from w_publ_choice`cb_choice within w_saletask_ch
- end type
- event cb_choice::clicked;call super::clicked;Long i
- i = dw_CH.GetRow()
- IF i <= 0 THEN
- MessageBox('提示','请先选择目标行!',information!,OK!)
- RETURN
- END IF
- INS_RT_STRU.scid = dw_CH.Object.u_saletask_scid[i]
- INS_RT_STRU.taskid = dw_CH.Object.u_saletask_taskid[i]
- INS_RT_STRU.taskcode = dw_CH.Object.u_saletask_taskcode[i]
- INS_RT_STRU.assign_emp = dw_CH.Object.u_saletask_assign_emp[i]
- INS_RT_STRU.cusid = dw_CH.Object.u_saletask_cusid[i]
- INS_RT_STRU.cuscode = dw_CH.Object.u_cust_cuscode[i]
- INS_RT_STRU.cusname = dw_CH.Object.u_cust_name[i]
- INS_RT_STRU.relcode = dw_CH.Object.u_saletask_relcode[i]
- INS_RT_STRU.freight = dw_CH.Object.u_saletask_freight[i]
- INS_RT_STRU.freight_tele = dw_CH.Object.u_saletask_freight_tele[i]
- INS_RT_STRU.moneyid = dw_CH.Object.u_saletask_moneyid[i]
- INS_RT_STRU.banktypeid = dw_CH.Object.u_saletask_banktypeid[i]
- INS_RT_STRU.dscrp = dw_CH.Object.u_saletask_dscrp[i]
- INS_RT_STRU.dscrp2 = dw_CH.Object.u_saletask_dscrp2[i]
- INS_RT_STRU.dscrp3 = dw_CH.Object.u_saletask_dscrp3[i]
- INS_RT_STRU.paytype = dw_CH.Object.u_saletask_paytype[i]
- INS_RT_STRU.Address = dw_CH.Object.u_saletask_cus_address[i]
- INS_RT_STRU.tele = dw_CH.Object.u_saletask_cus_tele[i]
- INS_RT_STRU.tele1 = dw_CH.Object.u_saletask_cus_tele1[i]
- INS_RT_STRU.fax = dw_CH.Object.u_saletask_cus_fax[i]
- INS_RT_STRU.rep = dw_CH.Object.u_cust_rep[i]
- INS_RT_STRU.rel_rep = dw_CH.Object.u_saletask_rel_rep[i]
- INS_RT_STRU.lsflag = dw_CH.Object.u_cust_lsflag[i]
- INS_RT_STRU.damt = dw_CH.Object.u_saletask_damt[i]
- INS_RT_STRU.otheramt = dw_CH.Object.u_saletask_otheramt[i]
- INS_RT_STRU.transcode = dw_CH.Object.u_saletask_transcode[i]
- INS_RT_STRU.carcode = dw_CH.Object.u_saletask_carcode[i]
- INS_RT_STRU.freight_address = dw_CH.Object.u_saletask_freight_address[i]
- 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_ch
- end type
- type ln_bar2 from w_publ_choice`ln_bar2 within w_saletask_ch
- end type
- type r_bar from w_publ_choice`r_bar within w_saletask_ch
- end type
- type ln_1 from w_publ_choice`ln_1 within w_saletask_ch
- end type
- type ln_2 from w_publ_choice`ln_2 within w_saletask_ch
- end type
- type dw_chmx from u_dw_rbtnfilter within w_saletask_ch
- integer y = 1572
- integer width = 3547
- integer height = 652
- integer taborder = 20
- boolean bringtotop = true
- string dataobject = "dw_saletask_ch_mx"
- boolean hscrollbar = true
- boolean vscrollbar = true
- 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
- type cbx_ifzero from checkbox within w_saletask_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_ch
- integer x = 2729
- integer y = 204
- 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
|