123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463 |
- $PBExportHeader$w_saletask_ware_ch.srw
- forward
- global type w_saletask_ware_ch from w_publ_choice
- end type
- type dw_chmx from u_dw_rbtnfilter within w_saletask_ware_ch
- end type
- type cbx_ifzero from checkbox within w_saletask_ware_ch
- end type
- type cbx_ifinware from checkbox within w_saletask_ware_ch
- end type
- type cb_other from uo_imflatbutton within w_saletask_ware_ch
- end type
- type cbx_iffinish from checkbox within w_saletask_ware_ch
- end type
- type cbx_1 from checkbox within w_saletask_ware_ch
- end type
- end forward
- global type w_saletask_ware_ch from w_publ_choice
- integer width = 3611
- integer height = 2380
- string title = "订单选择"
- event ue_retrieve_info ( )
- dw_chmx dw_chmx
- cbx_ifzero cbx_ifzero
- cbx_ifinware cbx_ifinware
- cb_other cb_other
- cbx_iffinish cbx_iffinish
- cbx_1 cbx_1
- end type
- global w_saletask_ware_ch w_saletask_ware_ch
- type variables
- s_saletask_ch INS_RT_STRU
- long cur_scid
- long cur_areaid_arr[]
- long if_inware = 1
- long if_finish = 0
- end variables
- forward prototypes
- public subroutine wf_retrievemx ()
- end prototypes
- event ue_retrieve_info();Long ll_row
- Long ll_mtrlid
- ll_row = dw_chmx.GetRow()
- IF ll_row <= 0 THEN
- ll_mtrlid = 0
- ELSE
- ll_mtrlid = dw_chmx.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
- 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]
- //sys_option_check_inwarecp_ifsc 系统选项 282
- dw_chmx.retrieve(ll_scid,ll_taskid,sys_option_check_inwarecp_ifsc)
- end if
- end subroutine
- on w_saletask_ware_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
- this.cb_other=create cb_other
- this.cbx_iffinish=create cbx_iffinish
- this.cbx_1=create cbx_1
- 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
- this.Control[iCurrent+4]=this.cb_other
- this.Control[iCurrent+5]=this.cbx_iffinish
- this.Control[iCurrent+6]=this.cbx_1
- end on
- on w_saletask_ware_ch.destroy
- call super::destroy
- destroy(this.dw_chmx)
- destroy(this.cbx_ifzero)
- destroy(this.cbx_ifinware)
- destroy(this.cb_other)
- destroy(this.cbx_iffinish)
- destroy(this.cbx_1)
- 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_saletask_find s_find
- s_find = Message.PowerObjectParm
- cur_scid = s_find.scid
- cur_areaid_arr = s_find.areaid
- if_inware = Integer(f_ProfileString (sys_empid,dw_CH.DataObject, "if_inware", '1'))
- IF if_inware = 1 THEN
- cbx_ifinware.Checked = TRUE
- ELSE
- cbx_ifinware.Checked = FALSE
- END IF
- if_finish = Integer(f_ProfileString (sys_empid,dw_CH.DataObject, "if_finish", '1'))
- IF if_finish = 1 THEN
- cbx_iffinish.Checked = TRUE
- ELSE
- cbx_iffinish.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)
- IF sys_option_inwarecp_cusname = 0 THEN
- dw_CH.Modify( 'destroy u_cust_cuscode_t ~n u_cust_cuscode.visible=0 ~n destroy u_cust_name_t ~n u_cust_name.visible=0 ~n ')
- END IF
- s_hide_col s_col_mtrlsectype
- s_col_mtrlsectype.col_1 = 'u_mtrldef_mtrlsectype'
- f_hide_col(1308,dw_CH,s_col_mtrlsectype)
- s_hide_col s_col_zxmtrlmode
- s_col_zxmtrlmode.col_1 = 'u_mtrldef_zxmtrlmode'
- f_hide_col(1309,dw_CH,s_col_zxmtrlmode)
- 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_ware_ch
- end type
- type cb_exit from w_publ_choice`cb_exit within w_saletask_ware_ch
- integer x = 814
- end type
- type sle_ch from w_publ_choice`sle_ch within w_saletask_ware_ch
- integer x = 846
- integer width = 837
- 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_ware_ch
- integer width = 3547
- integer height = 1268
- string dataobject = "dw_saletask_ware_cust_ch"
- 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_ware_ch
- integer x = 0
- integer width = 823
- string text = "订单编号/客户编号/客户名称含:"
- boolean righttoleft = false
- end type
- type cb_retrieve from w_publ_choice`cb_retrieve within w_saletask_ware_ch
- end type
- event cb_retrieve::clicked;dw_ch.retrieve(cur_scid,cur_areaid_arr,if_inware,if_finish)
- wf_retrievemx()
- end event
- type cb_choice from w_publ_choice`cb_choice within w_saletask_ware_ch
- integer x = 663
- end type
- event cb_choice::clicked;call super::clicked;Long LS_ROW
- LS_ROW = dw_CH.GetRow()
- IF LS_ROW <= 0 THEN
- MessageBox('提示','请先选择目标行!',information!,OK!)
- RETURN
- END IF
- INS_RT_STRU.taskid = dw_CH.Object.u_saletask_taskid[LS_ROW]
- INS_RT_STRU.taskcode = dw_CH.Object.u_saletask_taskcode[LS_ROW]
- INS_RT_STRU.assign_emp = dw_CH.Object.u_saletask_assign_emp[LS_ROW]
- INS_RT_STRU.cusid = dw_CH.Object.u_saletask_cusid[LS_ROW]
- INS_RT_STRU.cuscode = dw_CH.Object.u_cust_cuscode[LS_ROW]
- INS_RT_STRU.cusname = dw_CH.Object.u_cust_name[LS_ROW]
- INS_RT_STRU.relcode = dw_CH.Object.u_saletask_relcode[LS_ROW]
- INS_RT_STRU.freight = dw_CH.Object.u_saletask_freight[LS_ROW]
- INS_RT_STRU.freight_tele = dw_CH.Object.u_saletask_freight_tele[LS_ROW]
- INS_RT_STRU.moneyid = dw_CH.Object.u_saletask_moneyid[LS_ROW]
- INS_RT_STRU.address = dw_CH.Object.u_saletask_cus_address[LS_ROW]
- INS_RT_STRU.tele = dw_CH.Object.u_saletask_cus_tele[LS_ROW]
- INS_RT_STRU.fax = dw_CH.Object.u_saletask_cus_fax[LS_ROW]
- INS_RT_STRU.rep = dw_CH.Object.u_cust_rep[LS_ROW]
- 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_ware_ch
- end type
- type ln_bar2 from w_publ_choice`ln_bar2 within w_saletask_ware_ch
- end type
- type r_bar from w_publ_choice`r_bar within w_saletask_ware_ch
- end type
- type ln_1 from w_publ_choice`ln_1 within w_saletask_ware_ch
- end type
- type ln_2 from w_publ_choice`ln_2 within w_saletask_ware_ch
- end type
- type dw_chmx from u_dw_rbtnfilter within w_saletask_ware_ch
- integer y = 1572
- integer width = 3547
- integer height = 652
- integer taborder = 20
- boolean bringtotop = true
- string dataobject = "dw_saletask_ware_ch_mx"
- boolean hscrollbar = true
- boolean vscrollbar = true
- end type
- event rowfocuschanged;call super::rowfocuschanged;IF currentrow <=0 THEN RETURN
- this.selectrow(0,false)
- this.selectrow(currentrow,true)
- PARENT.TriggerEvent('ue_retrieve_info')
- end event
- type cbx_ifzero from checkbox within w_saletask_ware_ch
- integer x = 1705
- integer y = 188
- 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_ware_ch
- integer x = 2400
- integer y = 196
- 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
- type cb_other from uo_imflatbutton within w_saletask_ware_ch
- integer x = 302
- integer width = 361
- integer height = 164
- integer taborder = 30
- 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_chmx.GetRow()
- IF ll_row <= 0 THEN
- MessageBox('提示','请选择物料',information!,OK!)
- RETURN
- END IF
- Long ll_mtrlid
- ll_mtrlid = dw_chmx.Object.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 cbx_iffinish from checkbox within w_saletask_ware_ch
- integer x = 2958
- integer y = 200
- integer width = 485
- 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_finish = 1
- ELSE
- if_finish = 0
- END IF
- f_SetProfileString (sys_empid,dw_ch.DataObject, "if_finish", String(if_finish))
- cb_retrieve.TriggerEvent(Clicked!)
- end event
- type cbx_1 from checkbox within w_saletask_ware_ch
- integer x = 2391
- integer y = 92
- integer width = 1042
- integer height = 64
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long backcolor = 134217739
- string text = "只显示已排产的订单明细(系统选项282)"
- end type
- event clicked;IF sys_option_check_inwarecp_ifsc = 0 THEN //系统选项 282
- This.Checked = False
- ELSE
- This.Checked = True
- END IF
- end event
- event constructor;IF sys_option_check_inwarecp_ifsc = 0 THEN //系统选项 282
- This.Checked = False
- ELSE
- This.Checked = True
- END IF
- end event
|