123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642 |
- $PBExportHeader$w_email_seach_spt_group.srw
- forward
- global type w_email_seach_spt_group from w_publ_easyq
- end type
- type cbx_1 from checkbox within w_email_seach_spt_group
- end type
- type ddlb_1 from dropdownlistbox within w_email_seach_spt_group
- end type
- type ddlb_scid from uo_ddlb_scid within w_email_seach_spt_group
- end type
- type cb_3 from uo_imflatbutton within w_email_seach_spt_group
- end type
- type cb_4 from uo_imflatbutton within w_email_seach_spt_group
- end type
- type cb_5 from uo_imflatbutton within w_email_seach_spt_group
- end type
- type dw_spttype from u_dw_rbtnfilter within w_email_seach_spt_group
- end type
- end forward
- global type w_email_seach_spt_group from w_publ_easyq
- integer x = 9
- integer y = 12
- integer width = 3611
- integer height = 2380
- string title = "供应商筛选"
- boolean minbox = false
- boolean maxbox = false
- boolean resizable = false
- windowtype windowtype = response!
- cbx_1 cbx_1
- ddlb_1 ddlb_1
- ddlb_scid ddlb_scid
- cb_3 cb_3
- cb_4 cb_4
- cb_5 cb_5
- dw_spttype dw_spttype
- end type
- global w_email_seach_spt_group w_email_seach_spt_group
- type variables
- long cur_scid_arr[]
- String ls_areaname = ''
- datetime end_date_jq
- string ls_u_cust_cusareaname
- string ls_u_cust_rep_email
- string ls_cuscode
- string ls_name
- string ls_custype
- string ls_u_cust_grade
- string ls_u_cust_dscrp
- string ls_u_cust_rep_repname
- string ls_u_cust_rep_sex
- string ls_u_cust_rep_deptname
- string ls_u_cust_rep_duty
- boolean b_Focus=false
- long ins_spttypeid =-1
- s_edit_index_tran ss_tran
- end variables
- forward prototypes
- public subroutine wf_combine (ref datawindow arg_dw)
- public function decimal f_getys (long arg_custid, integer arg_scid, datetime arg_star, datetime arg_end)
- public function datetime f_month_add (datetime arg_date)
- public subroutine wf_face ()
- public subroutine wf_filter ()
- end prototypes
- public subroutine wf_combine (ref datawindow arg_dw);//合并金额
- arg_dw.setsort("u_cust_sc_cuscode")
- arg_dw.sort()
- long cnt,row
- cnt=arg_dw.rowcount()
- if cnt>1 then
- for row=cnt to 2 step -1
- if arg_dw.object.u_cust_sc_cuscode[row - 1]=arg_dw.object.u_cust_sc_cuscode[row] then
- arg_dw.object.orgn_amt[row - 1]=arg_dw.object.orgn_amt[row - 1]+arg_dw.object.orgn_amt[row]
- arg_dw.object.v_musttakebalc_incdec_groupbysc_msttakeamt[row - 1]=arg_dw.object.v_musttakebalc_incdec_groupbysc_msttakeamt[row - 1]+arg_dw.object.v_musttakebalc_incdec_groupbysc_msttakeamt[row]
- arg_dw.object.v_musttakebalc_incdec_groupbysc_takeamt[row - 1]=arg_dw.object.v_musttakebalc_incdec_groupbysc_takeamt[row - 1]+arg_dw.object.v_musttakebalc_incdec_groupbysc_takeamt[row]
- arg_dw.object.v_musttakebalc_balcamt_groupbysc_balcamt[row - 1]=arg_dw.object.v_musttakebalc_balcamt_groupbysc_balcamt[row - 1]+arg_dw.object.v_musttakebalc_balcamt_groupbysc_balcamt[row]
-
- arg_dw.deleterow(row)
- end if
- next
- end if
- end subroutine
- public function decimal f_getys (long arg_custid, integer arg_scid, datetime arg_star, datetime arg_end); decimal amt,amt1
- SELECT
- isnull(sum( U_Bmsttake.msttakeamt - U_Bmsttake.takeamt ) ,0)as '应收'
- into :amt
- FROM U_Bmsttake left outer join u_accounts on
- U_Bmsttake.accountsid = u_accounts.accountsid
- left outer join u_itemdef on
- U_Bmsttake.itemid = u_itemdef.itemid
- left outer join cw_banktype on
- U_Bmsttake.banktypeid = cw_banktype.banktypeid,
- u_scdef
- WHERE ( U_Bmsttake.scid = u_scdef.ScID ) and
- ( U_Bmsttake.cusid = :arg_custid) AND
- ( U_Bmsttake.takedate >= :arg_star ) AND
- ( U_Bmsttake.takedate < :arg_end ) and
- ( U_Bmsttake.scid = :arg_scid) ;
-
- //////////////////////////////////////////////////////
- SELECT
- isnull(sum(U_Bmsttake.takeamt ) ,0)as '应收'
- into :amt1
- FROM U_Bmsttake left outer join u_accounts on
- U_Bmsttake.accountsid = u_accounts.accountsid
- left outer join u_itemdef on
- U_Bmsttake.itemid = u_itemdef.itemid
- left outer join cw_banktype on
- U_Bmsttake.banktypeid = cw_banktype.banktypeid,
- u_scdef
- WHERE ( U_Bmsttake.scid = u_scdef.ScID ) and
- ( U_Bmsttake.cusid = :arg_custid) AND
- ( U_Bmsttake.takedate >= :arg_star ) AND
- ( U_Bmsttake.takedate < :arg_end ) and
- (( U_Bmsttake.finishdate >= :end_date_jq ) or U_Bmsttake.finishflag=0) AND
- ( U_Bmsttake.scid = :arg_scid) ;
-
- amt=amt + amt1
-
- return amt
- // and
- // ( U_Bmsttake.finishflag = 0 );
-
- end function
- public function datetime f_month_add (datetime arg_date);datetime d_date
- date e_date
- e_date=date(arg_date)
- if long(month(e_date))<>12 then
- arg_date= DateTime(date(string(year(e_date)) + '-' +string(long(month(e_date)) + 1) + '-01' ) ,00:00:00)
- else
- arg_date= DateTime(date(string(long(year(e_date)) + 1) + '-01' + '-01' ) ,00:00:00)
- end if
- return arg_date
- end function
- public subroutine wf_face ();
- end subroutine
- public subroutine wf_filter ();String ls_date
- //dw_2.AcceptText()
- //ls_u_cust_rep_email= "'%" +string(dw_2.object.u_cust_rep_email_t[1])+ "%'"
- //ls_cuscode= "'%" +string(dw_2.object.cuscode_t[1])+ "%'"
- //ls_name= "'%" +string(dw_2.object.name_t[1])+ "%'"
- //ls_custype= "'%" +string(dw_2.object.custype_t[1])+ "%'"
- //ls_u_cust_cusareaname= "'%" +string(dw_2.object.u_cust_cusareaname_t[1])+ "%'"
- //ls_u_cust_grade= "'%" +string(dw_2.object.u_cust_grade_t[1])+ "%'"
- //ls_u_cust_dscrp= "'%" +string(dw_2.object.u_cust_dscrp_t[1])+ "%'"
- //ls_u_cust_rep_repname= "'%" +string(dw_2.object.u_cust_rep_repname_t[1])+ "%'"
- //ls_u_cust_rep_sex= "'%" +string(dw_2.object.u_cust_rep_sex_t[1])+ "%'"
- //ls_u_cust_rep_deptname= "'%" +string(dw_2.object.u_cust_rep_deptname_t[1])+ "%'"
- //ls_u_cust_rep_duty= "'%" +string(dw_2.object.u_cust_rep_duty_t[1])+ "%'"
- //
- ////ls_date = "(u_cust_rep.email like " + ls_u_cust_rep_email + ") and (cuscode like " + ls_cuscode + ")" + " and (name like " + ls_name + ")"
- //
- ////ls_date = "email like + ' %1 ' + "
- ////dw.setfilter(" name = 'lily' ")
- ////IF Trim(sle_find.Text) = "" THEN RETURN
- //ls_date = "'%" + Trim(sle_find.Text) + "%'"
- ////dw_list.SetFilter("subject like '%" + ls_date + "%' " )
- //ls_date = "(subject like " + ls_date + ") or (sendman like " + ls_date + ")" + " or (revman like " + ls_date + ")"
- //
- //
- //dw_1.SetFilter( " u_cust_rep.email = 'lily' ")
- //dw_1.Filter()
- //dw_1.SetFilter("")
- end subroutine
- on w_email_seach_spt_group.create
- int iCurrent
- call super::create
- this.cbx_1=create cbx_1
- this.ddlb_1=create ddlb_1
- this.ddlb_scid=create ddlb_scid
- this.cb_3=create cb_3
- this.cb_4=create cb_4
- this.cb_5=create cb_5
- this.dw_spttype=create dw_spttype
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.cbx_1
- this.Control[iCurrent+2]=this.ddlb_1
- this.Control[iCurrent+3]=this.ddlb_scid
- this.Control[iCurrent+4]=this.cb_3
- this.Control[iCurrent+5]=this.cb_4
- this.Control[iCurrent+6]=this.cb_5
- this.Control[iCurrent+7]=this.dw_spttype
- end on
- on w_email_seach_spt_group.destroy
- call super::destroy
- destroy(this.cbx_1)
- destroy(this.ddlb_1)
- destroy(this.ddlb_scid)
- destroy(this.cb_3)
- destroy(this.cb_4)
- destroy(this.cb_5)
- destroy(this.dw_spttype)
- end on
- event open;call super::open;ls_areaname = "%%"
- dw_spttype.Retrieve()
- cb_1.triggerevent(clicked!)
- ss_tran = message.powerobjectparm
-
- end event
- event ue_before_open;call super::ue_before_open;if_ue_retr=true
- if_ue_filter=true
- if_ue_sort=true
- if_ue_sentdataout=true
- //IF sys_option_takepay_sc = 1 THEN
- dw_1.DataObject = "dw_email_seach_spt_group"
- ddlb_scid.Enabled = TRUE
- //ELSE
- // dw_1.DataObject = "dw_rp_musttake_balc_scid_fenyue"
- // ddlb_scid.Enabled = FALSE
- //END IF
- dw_spttype.settransobject(sqlca)
- dw_1.settransobject(sqlca)
- dw_1.ins_INIfile_name = sys_inifilename
- dw_1.ins_opemp = publ_operator
- dw_1.cardw_empid = sys_empid
- dw_1.cur_DataObject = dw_1.DataObject
- dw_1.uf_read_profile_layout()
- wf_face()
- end event
- event resize;call super::resize;dw_spttype.Height = This.Height - dw_1.Y - 115
- end event
- type cb_func from w_publ_easyq`cb_func within w_email_seach_spt_group
- boolean visible = false
- end type
- type cb_exit from w_publ_easyq`cb_exit within w_email_seach_spt_group
- integer x = 160
- end type
- type cb_2 from w_publ_easyq`cb_2 within w_email_seach_spt_group
- boolean visible = false
- boolean bringtotop = true
- end type
- type cb_psetup from w_publ_easyq`cb_psetup within w_email_seach_spt_group
- boolean visible = false
- boolean bringtotop = true
- end type
- type cb_1 from w_publ_easyq`cb_1 within w_email_seach_spt_group
- boolean bringtotop = true
- end type
- event cb_1::clicked;call super::clicked;
- dw_1.Retrieve(ins_spttypeid)
- end event
- type st_3 from w_publ_easyq`st_3 within w_email_seach_spt_group
- boolean visible = false
- integer x = 608
- integer width = 315
- string text = "发生日期从:"
- alignment alignment = left!
- end type
- type st_4 from w_publ_easyq`st_4 within w_email_seach_spt_group
- boolean visible = false
- integer x = 1449
- end type
- type em_1 from w_publ_easyq`em_1 within w_email_seach_spt_group
- boolean visible = false
- integer x = 910
- integer width = 430
- integer textsize = -10
- string mask = "yyyy-mm"
- end type
- type em_2 from w_publ_easyq`em_2 within w_email_seach_spt_group
- boolean visible = false
- integer x = 1550
- integer width = 430
- integer textsize = -10
- string mask = "yyyy-mm"
- end type
- type ddlb_yl from w_publ_easyq`ddlb_yl within w_email_seach_spt_group
- boolean visible = false
- integer x = 1495
- integer y = 40
- end type
- type cbx_yl from w_publ_easyq`cbx_yl within w_email_seach_spt_group
- boolean visible = false
- integer x = 1285
- integer y = 44
- end type
- type dw_1 from w_publ_easyq`dw_1 within w_email_seach_spt_group
- event dwnlbuttonup pbm_dwnlbuttonup
- event mousemove pbm_dwnmousemove
- integer x = 855
- integer y = 300
- integer width = 2546
- integer height = 1792
- string dataobject = "dw_email_seach_spt_group"
- boolean hsplitscroll = false
- boolean livescroll = false
- end type
- event dw_1::mousemove;wf_face()
- end event
- event dw_1::clicked;IF row > 0 THEN
- This.SelectRow(0,False)
- This.SetRow(row)
- This.SelectRow(row,True)
- END IF
- b_Focus = False
- end event
- event dw_1::scrollhorizontal;call super::scrollhorizontal;wf_face()
- end event
- type sle_mtrl from w_publ_easyq`sle_mtrl within w_email_seach_spt_group
- end type
- type sle_cust from w_publ_easyq`sle_cust within w_email_seach_spt_group
- end type
- type st_mtrl from w_publ_easyq`st_mtrl within w_email_seach_spt_group
- end type
- type st_cust from w_publ_easyq`st_cust within w_email_seach_spt_group
- end type
- type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_email_seach_spt_group
- end type
- type pb_em1 from w_publ_easyq`pb_em1 within w_email_seach_spt_group
- boolean visible = false
- integer x = 1344
- integer y = 184
- end type
- type pb_em2 from w_publ_easyq`pb_em2 within w_email_seach_spt_group
- boolean visible = false
- integer x = 1975
- integer y = 188
- end type
- type pb_2 from w_publ_easyq`pb_2 within w_email_seach_spt_group
- boolean visible = false
- integer x = 2583
- integer y = 60
- end type
- type cb_help from w_publ_easyq`cb_help within w_email_seach_spt_group
- boolean visible = false
- end type
- type cb_copyself from w_publ_easyq`cb_copyself within w_email_seach_spt_group
- boolean visible = false
- end type
- type gb_1 from w_publ_easyq`gb_1 within w_email_seach_spt_group
- end type
- type ln_bar from w_publ_easyq`ln_bar within w_email_seach_spt_group
- end type
- type ln_bar2 from w_publ_easyq`ln_bar2 within w_email_seach_spt_group
- end type
- type r_bar from w_publ_easyq`r_bar within w_email_seach_spt_group
- end type
- type ln_1 from w_publ_easyq`ln_1 within w_email_seach_spt_group
- end type
- type ln_2 from w_publ_easyq`ln_2 within w_email_seach_spt_group
- end type
- type ln_3 from w_publ_easyq`ln_3 within w_email_seach_spt_group
- end type
- type ln_4 from w_publ_easyq`ln_4 within w_email_seach_spt_group
- end type
- type cbx_1 from checkbox within w_email_seach_spt_group
- boolean visible = false
- integer x = 2409
- integer y = 204
- integer width = 585
- integer height = 76
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 16711680
- long backcolor = 134217739
- string text = "不显示无交易的客户"
- boolean checked = true
- end type
- type ddlb_1 from dropdownlistbox within w_email_seach_spt_group
- boolean visible = false
- integer x = 9
- integer y = 200
- integer width = 494
- integer height = 300
- integer taborder = 20
- 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
- string item[] = {"格式一","格式二"}
- borderstyle borderstyle = stylelowered!
- end type
- event selectionchanged;
- //IF THIS.Text = '格式二' THEN
- // ddlb_scid.Enabled = FALSE
- //ELSE
- // ddlb_scid.Enabled = TRUE
- //END IF
- IF THIS.Text = '格式一' THEN
- // IF sys_option_takepay_sc = 1 THEN
- dw_1.DataObject = 'dw_rp_musttake_balc_scid'
- // ELSE
- // dw_1.DataObject = 'dw_rp_musttake_balc'
- // END IF
- dw_1.ins_INIfile_name = sys_inifilename
- dw_1.ins_opemp = publ_operator
- dw_1.cardw_empid = sys_empid
- dw_1.cur_DataObject = dw_1.DataObject
- dw_1.uf_read_profile_layout()
- ELSE
- dw_1.uf_save_profile_layout()
- // IF sys_option_takepay_sc = 1 THEN
- dw_1.DataObject = 'dw_rp_musttake_balc_scid_2'
- // ELSE
- // dw_1.DataObject = 'dw_rp_musttake_balc_2'
- // END IF
- // dw_1.DataObject = 'dw_rp_musttake_balc_2'
- END IF
- dw_1.SetTransObject(sqlca)
- cb_1.triggerevent(clicked!)
- end event
- type ddlb_scid from uo_ddlb_scid within w_email_seach_spt_group
- boolean visible = false
- integer x = 32
- integer y = 200
- integer width = 562
- integer height = 424
- integer taborder = 20
- boolean bringtotop = true
- end type
- event selectionchanged;call super::selectionchanged;cur_scid_arr = THIS.uo_scid_arr
- cb_1.triggerevent(clicked!)
- end event
- event constructor;call super::constructor;cur_scid_arr = THIS.uo_scid_arr
- end event
- type cb_3 from uo_imflatbutton within w_email_seach_spt_group
- integer x = 1339
- integer width = 494
- integer height = 164
- integer taborder = 40
- boolean bringtotop = true
- string text = "添加供应商联系人"
- string normalpicname = "caudit.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;//s_sendmx_parm s_sendmxx
- s_rep_group_parm ss_rep_group
- Long i,j
- dw_1.AcceptText()
- DO WHILE i < dw_1.RowCount()
- i++
- IF dw_1.Object.isselect[i] = 1 THEN
- j++
-
- ss_rep_group.s_group[j].reltype =1
- ss_rep_group.s_group[j].relid = dw_1.Object.sptid[i]
- ss_rep_group.s_group[j].repid = dw_1.Object.repid[i]
- END IF
- LOOP
- CloseWithReturn(Parent, ss_rep_group)
- end event
- type cb_4 from uo_imflatbutton within w_email_seach_spt_group
- integer x = 855
- integer width = 233
- integer height = 164
- integer taborder = 50
- boolean bringtotop = true
- string text = "全选"
- string normalpicname = "ok.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;Integer i
- TRY
-
- FOR i = 1 To dw_1.RowCount()
- dw_1.Object.isselect[i] = 1
- NEXT
-
- Catch(RunTimeError e)
- END TRY
- end event
- type cb_5 from uo_imflatbutton within w_email_seach_spt_group
- integer x = 1097
- integer width = 233
- integer height = 164
- integer taborder = 60
- boolean bringtotop = true
- string text = "全不选"
- string normalpicname = "ok.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;Integer i
- TRY
-
-
- FOR i = 1 To dw_1.RowCount()
- dw_1.Object.isselect[i] = 0
- NEXT
-
- Catch(RunTimeError e)
- END TRY
- end event
- type dw_spttype from u_dw_rbtnfilter within w_email_seach_spt_group
- integer x = 9
- integer y = 304
- integer width = 841
- integer height = 1656
- integer taborder = 110
- boolean bringtotop = true
- string dataobject = "dw_spttype_index"
- end type
- event rowfocuschanged;call super::rowfocuschanged;IF currentrow <=0 THEN RETURN
- this.selectrow(0,false)
- this.selectrow(currentrow,true)
- IF dw_spttype.GetRow() <= 0 THEN
- ins_spttypeid = 0
- ELSE
- ins_spttypeid = dw_spttype.Object.spttypeid[dw_spttype.GetRow()]
- END IF
- cb_1.triggerevent(clicked!)
- end event
|