123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308 |
- $PBExportHeader$w_taskamt_ch.srw
- forward
- global type w_taskamt_ch from w_publ_choice
- end type
- type dw_chmx from u_dw_rbtnfilter within w_taskamt_ch
- end type
- type cbx_1 from checkbox within w_taskamt_ch
- end type
- end forward
- global type w_taskamt_ch from w_publ_choice
- integer width = 3611
- integer height = 2380
- string title = "订单选择"
- boolean controlmenu = true
- dw_chmx dw_chmx
- cbx_1 cbx_1
- end type
- global w_taskamt_ch w_taskamt_ch
- type variables
- s_saletask_ch_arr INS_RT_STRU
- long cur_scid
- long cur_cusid
- long cur_noamt = 0
- boolean b_buy = false
- 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
- if b_buy = true then
- ll_scid = dw_ch.object.u_buytask_scid[ll_ucrow]
- ll_taskid = dw_ch.object.taskid[ll_ucrow]
- else
- ll_scid = dw_ch.object.u_saletask_scid[ll_ucrow]
- ll_taskid = dw_ch.object.u_saletask_taskid[ll_ucrow]
- end if
- dw_chmx.retrieve(ll_scid,ll_taskid)
- end if
- end subroutine
- on w_taskamt_ch.create
- int iCurrent
- call super::create
- this.dw_chmx=create dw_chmx
- this.cbx_1=create cbx_1
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.dw_chmx
- this.Control[iCurrent+2]=this.cbx_1
- end on
- on w_taskamt_ch.destroy
- call super::destroy
- destroy(this.dw_chmx)
- 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_edit_index_tran s_ch_tran
- s_ch_tran = message.powerobjectparm
- cur_scid = s_ch_tran.b_long
- cur_cusid = s_ch_tran.c_long
- IF cur_cusid = 0 THEN cur_cusid = -1
- if s_ch_tran.b_string = 'buy' then
- dw_ch.dataobject='dw_taskamt_ch_buy'
- dw_chmx.dataobject='dw_buytask_ch_mx_buy'
- st_1.text = '订单编号/供应商编号/供应商名称含:'
- b_buy = true
- else
- dw_ch.dataobject='dw_taskamt_ch'
- dw_chmx.dataobject='dw_saletask_ch_mx'
- st_1.text = '订单编号/客户编号/客户名称含:'
- b_buy = false
- end if
- dw_CH.uf_read_profile_layout()
- dw_chmx.uf_read_profile_layout()
- dw_CH.SetTransObject (sqlca)
- dw_chmx.SetTransObject (sqlca)
- cb_retrieve.TRIGGEREVENT(CLICKED!)
- 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
- event key;call super::key;If KeyDown(KeyEnter!) And KeyDown(KeyControl!) Then
- If cb_choice.Enabled Then cb_choice.TriggerEvent(Clicked!)
- End If
- end event
- type cb_func from w_publ_choice`cb_func within w_taskamt_ch
- end type
- type cb_exit from w_publ_choice`cb_exit within w_taskamt_ch
- end type
- type sle_ch from w_publ_choice`sle_ch within w_taskamt_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=''
- if b_buy = true then
- obj_expr=obj_expr+' ( pos(taskcode ,"'+TRIM(THIS.TEXT)+'")<>0 ) '
- obj_expr=obj_expr+' or ( pos(sptcode ,"'+TRIM(THIS.TEXT)+'")<>0 ) '
- obj_expr=obj_expr+' or ( pos(u_spt_name ,"'+TRIM(THIS.TEXT)+'")<>0 ) '
- else
- 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 ) '
- end if
- dw_ch.SETFILTER(obj_expr)
- end if
- dw_ch.FILTER()
- end event
- type dw_ch from w_publ_choice`dw_ch within w_taskamt_ch
- integer width = 3552
- integer height = 1080
- string dataobject = "dw_taskamt_ch"
- 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_taskamt_ch
- integer y = 200
- integer width = 837
- string text = "订单编号/客户编号/客户名称含:"
- boolean righttoleft = false
- end type
- type cb_retrieve from w_publ_choice`cb_retrieve within w_taskamt_ch
- end type
- event cb_retrieve::clicked;dw_ch.retrieve(cur_scid,cur_cusid,cur_noamt)
- wf_retrievemx()
- end event
- type cb_choice from w_publ_choice`cb_choice within w_taskamt_ch
- boolean default = false
- end type
- event cb_choice::clicked;call super::clicked;Long LS_ROW
- LS_ROW = dw_CH.GetRow()
- IF LS_ROW <= 0 THEN
- MessageBox('系统提示','请先选择目标行!',StopSign!)
- RETURN
- END IF
-
- if b_buy = true then
- INS_RT_STRU.taskid[1] = dw_CH.Object.taskid[LS_ROW]
- INS_RT_STRU.taskcode[1] = dw_CH.Object.taskcode[LS_ROW]
- INS_RT_STRU.relcode[1] = dw_CH.Object.relcode[LS_ROW]
- INS_RT_STRU.assign_emp[1] = dw_CH.Object.assign_emp[LS_ROW]
- INS_RT_STRU.cusid[1] = dw_CH.Object.sptid[LS_ROW]
- INS_RT_STRU.cuscode[1] = dw_CH.Object.sptcode[LS_ROW]
- INS_RT_STRU.cusname[1] = dw_CH.Object.u_spt_name[LS_ROW]
- INS_RT_STRU.relcode[1] = dw_CH.Object.u_buytask_relcode[LS_ROW]
- // INS_RT_STRU.freight[1] = dw_CH.Object.u_saletask_freight[LS_ROW]
- // INS_RT_STRU.freight_tele[1] = dw_CH.Object.u_saletask_freight_tele[LS_ROW]
- INS_RT_STRU.banktypeid[1] = dw_CH.Object.u_buytask_banktypeid[LS_ROW]
- INS_RT_STRU.moneyid[1] = dw_CH.Object.u_buytask_moneyid[LS_ROW]
- INS_RT_STRU.mrate[1] = dw_CH.Object.u_buytask_mrate[LS_ROW]
- // INS_RT_STRU.damt[1] = dw_CH.Object.u_saletask_damt[LS_ROW]
- INS_RT_STRU.billamt[1] = dw_CH.Object.u_buytask_mstpayamt[LS_ROW]
- INS_RT_STRU.takeamt[1] = dw_CH.Object.u_buytask_payamt[LS_ROW]
- INS_RT_STRU.noamt[1] = dw_CH.Object.nopayamt[LS_ROW]
- // INS_RT_STRU.takedamt[1] = dw_CH.Object.u_saletask_takedamt[LS_ROW]
-
- // INS_RT_STRU.address[1] = dw_CH.Object.u_saletask_cus_address[LS_ROW]
- // INS_RT_STRU.tele[1] = dw_CH.Object.u_saletask_cus_tele[LS_ROW]
- // INS_RT_STRU.fax[1] = dw_CH.Object.u_saletask_cus_fax[LS_ROW]
- else
-
- INS_RT_STRU.taskid[1] = dw_CH.Object.u_saletask_taskid[LS_ROW]
- INS_RT_STRU.taskcode[1] = dw_CH.Object.u_saletask_taskcode[LS_ROW]
- INS_RT_STRU.assign_emp[1] = dw_CH.Object.u_saletask_assign_emp[LS_ROW]
- INS_RT_STRU.cusid[1] = dw_CH.Object.u_saletask_cusid[LS_ROW]
- INS_RT_STRU.cuscode[1] = dw_CH.Object.u_cust_cuscode[LS_ROW]
- INS_RT_STRU.cusname[1] = dw_CH.Object.u_cust_name[LS_ROW]
- INS_RT_STRU.relcode[1] = dw_CH.Object.u_saletask_relcode[LS_ROW]
- INS_RT_STRU.freight[1] = dw_CH.Object.u_saletask_freight[LS_ROW]
- INS_RT_STRU.freight_tele[1] = dw_CH.Object.u_saletask_freight_tele[LS_ROW]
- INS_RT_STRU.banktypeid[1] = dw_CH.Object.u_saletask_banktypeid[LS_ROW]
- INS_RT_STRU.moneyid[1] = dw_CH.Object.u_saletask_moneyid[LS_ROW]
- INS_RT_STRU.mrate[1] = dw_CH.Object.u_saletask_mrate[LS_ROW]
- INS_RT_STRU.damt[1] = dw_CH.Object.u_saletask_damt[LS_ROW]
- INS_RT_STRU.billamt[1] = dw_CH.Object.u_saletask_msttakeamt[LS_ROW]
- INS_RT_STRU.takeamt[1] = dw_CH.Object.u_saletask_takeamt[LS_ROW]
- INS_RT_STRU.noamt[1] = dw_CH.Object.noamt[LS_ROW]
- INS_RT_STRU.takedamt[1] = dw_CH.Object.u_saletask_takedamt[LS_ROW]
-
- INS_RT_STRU.address[1] = dw_CH.Object.u_saletask_cus_address[LS_ROW]
- INS_RT_STRU.tele[1] = dw_CH.Object.u_saletask_cus_tele[LS_ROW]
- INS_RT_STRU.fax[1] = dw_CH.Object.u_saletask_cus_fax[LS_ROW]
- end if
- CLOSE(PARENT)
- end event
- type ln_bar from w_publ_choice`ln_bar within w_taskamt_ch
- end type
- type ln_bar2 from w_publ_choice`ln_bar2 within w_taskamt_ch
- end type
- type r_bar from w_publ_choice`r_bar within w_taskamt_ch
- end type
- type ln_1 from w_publ_choice`ln_1 within w_taskamt_ch
- end type
- type ln_2 from w_publ_choice`ln_2 within w_taskamt_ch
- end type
- type dw_chmx from u_dw_rbtnfilter within w_taskamt_ch
- integer y = 1400
- integer width = 3552
- integer height = 860
- integer taborder = 20
- boolean bringtotop = true
- string dataobject = "dw_saletask_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)
- end event
- type cbx_1 from checkbox within w_taskamt_ch
- integer x = 878
- integer y = 80
- 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 = 67108864
- string text = "只显示未收完款单据"
- boolean checked = true
- end type
- event clicked;IF THIS.CHECKED = TRUE THEN
- cur_noamt = 0
- else
- cur_noamt = -1
- END IF
- cb_retrieve.triggerevent(clicked!)
- end event
- event constructor;this.backcolor = 14215660
- end event
|