123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633 |
- $PBExportHeader$w_gz_wage_basepay_edit.srw
- forward
- global type w_gz_wage_basepay_edit from w_publ_base
- end type
- type cb_retrieve from uo_imflatbutton within w_gz_wage_basepay_edit
- end type
- type cb_wage_edit from uo_imflatbutton within w_gz_wage_basepay_edit
- end type
- type cb_cancel from uo_imflatbutton within w_gz_wage_basepay_edit
- end type
- type tv_1 from uo_tv_deptype within w_gz_wage_basepay_edit
- end type
- type dw_wage from u_dw_rbtnfilter within w_gz_wage_basepay_edit
- end type
- type ddlb_scid from uo_ddlb_scid within w_gz_wage_basepay_edit
- end type
- type st_2 from statictext within w_gz_wage_basepay_edit
- end type
- type ddlb_1 from dropdownlistbox within w_gz_wage_basepay_edit
- end type
- type ln_bar from line within w_gz_wage_basepay_edit
- end type
- type ln_bar2 from line within w_gz_wage_basepay_edit
- end type
- type ln_1 from line within w_gz_wage_basepay_edit
- end type
- type ln_2 from line within w_gz_wage_basepay_edit
- end type
- type r_bar from rectangle within w_gz_wage_basepay_edit
- end type
- end forward
- global type w_gz_wage_basepay_edit from w_publ_base
- integer x = 59
- integer y = 32
- integer width = 3630
- integer height = 2540
- string title = "员工基本工资"
- windowstate windowstate = maximized!
- boolean if_ue_retr = true
- boolean if_ue_filter = true
- boolean if_ue_sort = true
- boolean if_ue_sentdataout = true
- cb_retrieve cb_retrieve
- cb_wage_edit cb_wage_edit
- cb_cancel cb_cancel
- tv_1 tv_1
- dw_wage dw_wage
- ddlb_scid ddlb_scid
- st_2 st_2
- ddlb_1 ddlb_1
- ln_bar ln_bar
- ln_bar2 ln_bar2
- ln_1 ln_1
- ln_2 ln_2
- r_bar r_bar
- end type
- global w_gz_wage_basepay_edit w_gz_wage_basepay_edit
- type variables
- String ls_handtype = ''
- Long cur_scid
- Long cur_scid_arr[]
- int cur_status = 1
- Boolean if_power_sendout = true
- Boolean if_power_print = true
- end variables
- forward prototypes
- public function integer wf_refresh_face ()
- public subroutine wf_find_tvchild (long arg_handl, long arg_deptid)
- public subroutine wf_find_tvnext (long arg_handl, long arg_deptid)
- public subroutine wf_setopen (long arg_deptid, long arg_scid)
- end prototypes
- public function integer wf_refresh_face ();//wf_refresh_face
- Int ls_i
- cb_func.Enabled = NOT dw_edit_mode
- ddlb_scid.Enabled = NOT dw_edit_mode
- IF dw_edit_mode THEN
- cb_cancel.Enabled = TRUE
- cb_wage_edit.Text = '保存'
- cb_wage_edit.normalpicname = 'Save.bmp'
-
- cb_retrieve.Enabled = FALSE
-
- dw_wage.SetTabOrder('u_basepay_basepay',10)
- dw_wage.SetTabOrder('dscrp',20)
- ELSE
- cb_cancel.Enabled = FALSE
- cb_wage_edit.Text = '修改'
- cb_wage_edit.normalpicname = 'open.bmp'
-
- cb_retrieve.Enabled = TRUE
- cb_wage_edit.Enabled = TRUE
-
- dw_wage.SetTabOrder('u_basepay_basepay',0)
- dw_wage.SetTabOrder('dscrp',0)
-
- END IF
- cb_wage_edit.of_init_draw()
- cb_wage_edit.of_paint()
- cb_wage_edit.TriggerEvent('ue_textchange')
- RETURN 0
- end function
- public subroutine wf_find_tvchild (long arg_handl, long arg_deptid);Long ll_handl
- Long ll_deptid
- treeviewitem tvi
- ll_handl = arg_handl
- ll_handl = tv_1.FindItem(ChildTreeItem!,ll_handl)
- DO WHILE ll_handl > 0
- tv_1.GetItem(ll_handl,tvi)
- ll_deptid = tvi.Data
-
- IF ll_deptid = arg_deptid THEN
- tv_1.SelectItem (ll_handl)
- RETURN
- END IF
-
- wf_find_tvnext(ll_handl,arg_deptid)
- ll_handl = tv_1.FindItem(ChildTreeItem!,ll_handl)
- LOOP
- end subroutine
- public subroutine wf_find_tvnext (long arg_handl, long arg_deptid);Long ll_handl
- Long ll_deptid
- treeviewitem tvi
- ll_handl = arg_handl
- ll_handl = tv_1.FindItem(NextTreeItem!,ll_handl)
- DO WHILE ll_handl > 0
- tv_1.GetItem(ll_handl,tvi)
- ll_deptid = tvi.Data
-
- IF ll_deptid = arg_deptid THEN
- tv_1.SelectItem ( ll_handl )
- RETURN
- END IF
-
- wf_find_tvchild(ll_handl,arg_deptid)
- ll_handl = tv_1.FindItem(NextTreeItem!,ll_handl)
- LOOP
- end subroutine
- public subroutine wf_setopen (long arg_deptid, long arg_scid);//tv
- Long ll_handl
- ll_handl = tv_1.FindItem(RootTreeItem!,0)
- IF ll_handl > 0 THEN wf_find_tvchild(ll_handl,arg_deptid)
- //ddlb
- String ls_scname
- Int li_spacenum
- String ls_space
- String ls_name
- Long ll_finditem
- IF arg_scid = -1 THEN
- ls_name = '[全部]'
- ELSE
-
- SELECT scname
- INTO :ls_scname
- FROM u_scdef
- Where scid = :arg_scid;
- IF sqlca.SQLCode <> 0 OR IsNull(ls_scname) THEN ls_scname = ''
-
- li_spacenum = 50 - Len(Trim(ls_scname)) - 2 - Len(String(arg_scid))
- ls_space = Fill(' ',li_spacenum)
-
- ls_name = ls_scname+ls_space+'['+String(arg_scid)+']'
- END IF
- ll_finditem = ddlb_scid.FindItem(ls_name,0)
- IF ll_finditem > 0 THEN
- ddlb_scid.SelectItem ( ls_name, ll_finditem )
- END IF
- end subroutine
- on w_gz_wage_basepay_edit.create
- int iCurrent
- call super::create
- this.cb_retrieve=create cb_retrieve
- this.cb_wage_edit=create cb_wage_edit
- this.cb_cancel=create cb_cancel
- this.tv_1=create tv_1
- this.dw_wage=create dw_wage
- this.ddlb_scid=create ddlb_scid
- this.st_2=create st_2
- this.ddlb_1=create ddlb_1
- this.ln_bar=create ln_bar
- this.ln_bar2=create ln_bar2
- this.ln_1=create ln_1
- this.ln_2=create ln_2
- this.r_bar=create r_bar
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.cb_retrieve
- this.Control[iCurrent+2]=this.cb_wage_edit
- this.Control[iCurrent+3]=this.cb_cancel
- this.Control[iCurrent+4]=this.tv_1
- this.Control[iCurrent+5]=this.dw_wage
- this.Control[iCurrent+6]=this.ddlb_scid
- this.Control[iCurrent+7]=this.st_2
- this.Control[iCurrent+8]=this.ddlb_1
- this.Control[iCurrent+9]=this.ln_bar
- this.Control[iCurrent+10]=this.ln_bar2
- this.Control[iCurrent+11]=this.ln_1
- this.Control[iCurrent+12]=this.ln_2
- this.Control[iCurrent+13]=this.r_bar
- end on
- on w_gz_wage_basepay_edit.destroy
- call super::destroy
- destroy(this.cb_retrieve)
- destroy(this.cb_wage_edit)
- destroy(this.cb_cancel)
- destroy(this.tv_1)
- destroy(this.dw_wage)
- destroy(this.ddlb_scid)
- destroy(this.st_2)
- destroy(this.ddlb_1)
- destroy(this.ln_bar)
- destroy(this.ln_bar2)
- destroy(this.ln_1)
- destroy(this.ln_2)
- destroy(this.r_bar)
- end on
- event open;call super::open;if_power_sendout = f_power_ind(1505)
- dw_wage.SetTransObject(sqlca)
- s_wageeditw_open s_wageedit_tran
- s_wageedit_tran = Message.PowerObjectParm
- ls_handtype = s_wageedit_tran.handtype
- cur_scid_arr = s_wageedit_tran.scid_arr
- cur_scid = s_wageedit_tran.scid
- //////更新基本工资
- //Long ll_updateflag = 0
- //ll_updateflag = Long(f_ProfileString (sys_empid,'dw_rs_empinfo_index', "updateflag",'0'))
- //IF ll_updateflag = 0 THEN
- // INSERT INTO U_BasePay(empid,BasePay)
- // (SELECT empid,wage FROM u_rs_empinfo);
- // f_setProfileString (sys_empid,'dw_rs_empinfo_index', "updateflag",'1')
- //END IF
- wf_setopen(s_wageedit_tran.deptid,s_wageedit_tran.scid)
- //wf_retreve()
- cb_retrieve.TriggerEvent(Clicked!)
- wf_refresh_face()
- end event
- event ue_filter;call super::ue_filter;OPENWITHPARM(w_filter_query,dw_wage)
- STRING LS_EXPR
- LS_EXPR=Message.StringParm
- if len(LS_EXPR)>2 and trim(LS_EXPR)='' then return
- dw_wage.setfilter(LS_EXPR)
- dw_wage.SetRedraw (false)
- dw_wage.filter()
- dw_wage.SetRedraw (TRUE)
- end event
- event ue_sort;call super::ue_sort;OPENwithparm(w_sortrow,dw_wage)
- STRING LS_EXPR
- LS_EXPR=Message.StringParm
- IF ISNULL(LS_EXPR) THEN LS_EXPR=' '
- if len(LS_EXPR)>2 and trim(LS_EXPR)='' then return
- dw_wage.setsort(LS_EXPR)
- dw_wage.SetRedraw (false)
- dw_wage.sort()
- dw_wage.SetRedraw (true)
- end event
- event resize;call super::resize;ln_bar.EndX = THIS.Width
- ln_bar2.EndX = THIS.Width
- ln_1.EndX = THIS.Width
- ln_2.EndX = THIS.Width
- r_bar.Width = THIS.Width
- Long w_width,w_height
- w_width = 3611
- w_height = 2200
- IF newwidth < w_width THEN THIS.Width = w_width
- IF newheight < w_height THEN THIS.Height = w_height
- dw_wage.Width = THIS.Width - (w_width - 2720)
- dw_wage.Height = THIS.Height - (w_height - 1740)
- tv_1.Height = THIS.Height - (w_height - 1740)
- end event
- event ue_sentdataout;call super::ue_sentdataout;IF NOT if_power_sendout THEN
- MessageBox(publ_operator,'你没有使用权限!')
- RETURN
- END IF
- OpenWithParm(w_sentdataout,dw_wage)
- end event
- type cb_func from w_publ_base`cb_func within w_gz_wage_basepay_edit
- integer x = 151
- integer width = 151
- integer height = 164
- string normalpicname = "setting.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- type cb_exit from w_publ_base`cb_exit within w_gz_wage_basepay_edit
- integer x = 603
- integer width = 151
- integer height = 164
- integer taborder = 100
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- type cb_retrieve from uo_imflatbutton within w_gz_wage_basepay_edit
- integer width = 151
- integer height = 164
- integer taborder = 90
- boolean bringtotop = true
- string text = "刷新"
- string normalpicname = "refresh.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;//wf_retreve()
- dw_wage.Retrieve(cur_scid_arr,ls_handtype,cur_status)
- end event
- type cb_wage_edit from uo_imflatbutton within w_gz_wage_basepay_edit
- integer x = 302
- integer width = 151
- integer height = 164
- integer taborder = 40
- boolean bringtotop = true
- string text = "修改"
- string normalpicname = "save.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;IF dw_edit_mode THEN
- dw_wage.SetFilter('')
- dw_wage.Filter()
- dw_wage.AcceptText()
-
- Long i
- Long ll_empid
- String ls_empname
- Decimal ld_basepay
- Boolean if_commit
- String arg_msg
- string ls_Dscrp
-
- uo_basewage uo_bp
- uo_bp = CREATE uo_basewage
-
- FOR i = 1 TO dw_wage.RowCount()
- IF dw_wage.Object.u_basepay_empid[i] = 0 THEN
- ll_empid = dw_wage.Object.u_rs_empinfo_empid[i]
- ELSE
- ll_empid = dw_wage.Object.u_basepay_empid[i]
- END IF
- ls_empname = dw_wage.Object.u_rs_empinfo_empname[i]
- ld_basepay = dw_wage.Object.u_basepay_basepay[i]
- ls_Dscrp = dw_wage.Object.dscrp[i]
-
- IF i = dw_wage.RowCount() THEN
- if_commit = TRUE
- ELSE
- if_commit = FALSE
- END IF
-
- IF uo_bp.uof_basepay_init(ll_empid,ls_empname,ld_basepay,ls_Dscrp,arg_msg,if_commit) = 0 THEN
- MessageBox(publ_operator,'保存失败!'+arg_msg)
- RETURN
- END IF
-
- NEXT
-
- DESTROY uo_bp
-
- MessageBox(publ_operator,'保存成功!')
- END IF
- dw_edit_mode = NOT dw_edit_mode
- wf_refresh_face()
- end event
- type cb_cancel from uo_imflatbutton within w_gz_wage_basepay_edit
- integer x = 453
- integer width = 151
- integer height = 164
- integer taborder = 60
- boolean bringtotop = true
- string text = "取消"
- string normalpicname = "undo.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;dw_edit_mode = FALSE
- //wf_retreve()
- cb_retrieve.TriggerEvent(Clicked!)
- wf_refresh_face()
- end event
- type tv_1 from uo_tv_deptype within w_gz_wage_basepay_edit
- integer y = 292
- integer width = 814
- integer height = 1740
- integer taborder = 10
- boolean bringtotop = true
- integer textsize = -9
- fontcharset fontcharset = gb2312charset!
- fontfamily fontfamily = anyfont!
- string facename = "宋体"
- end type
- event selectionchanged;call super::selectionchanged;ls_handtype = THIS.uo_cur_info.handtype
- ls_handtype = ls_handtype + '%'
- cb_retrieve.TriggerEvent(Clicked!)
- end event
- type dw_wage from u_dw_rbtnfilter within w_gz_wage_basepay_edit
- integer x = 814
- integer y = 292
- integer width = 2720
- integer height = 1740
- integer taborder = 20
- boolean bringtotop = true
- string dataobject = "dw_mthwage_basepay_edit"
- boolean hscrollbar = true
- boolean vscrollbar = true
- end type
- event constructor;call super::constructor; titleclick_sort_use=true //单击标题排序功能开关
- RBUTTON_FILTER_USE=true //右键查询功能开关
- end event
- event rowfocuschanged;call super::rowfocuschanged;IF currentrow >0 THEN
- this.selectrow(0,false)
- this.selectrow(currentrow,true)
- end if
- end event
- event dwnkey;call super::dwnkey;IF Key = KeyEnter! THEN //
- keybd_event ( 9, 0, 0 , 0 ) // 按下tab
- keybd_event ( 9, 0, 2, 0 ) // 释放tab
- RETURN 1
- END IF
- end event
- type ddlb_scid from uo_ddlb_scid within w_gz_wage_basepay_edit
- integer y = 192
- integer width = 517
- integer height = 676
- integer taborder = 110
- boolean bringtotop = true
- end type
- event constructor;call super::constructor;cur_scid_arr = THIS.uo_scid_arr
- end event
- event selectionchanged;call super::selectionchanged;cur_scid_arr = THIS.uo_scid_arr
- cb_retrieve.TriggerEvent(Clicked!)
- end event
- type st_2 from statictext within w_gz_wage_basepay_edit
- integer x = 558
- integer y = 208
- integer width = 219
- 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 ddlb_1 from dropdownlistbox within w_gz_wage_basepay_edit
- integer x = 745
- integer y = 192
- integer width = 398
- integer height = 300
- 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 = "在职"
- boolean sorted = false
- string item[] = {"离职","在职"}
- borderstyle borderstyle = stylelowered!
- end type
- event selectionchanged;IF THIS.Text = '离职' THEN
- cur_status = 0
- ELSE
- cur_status = 1
- END IF
- cb_retrieve.TriggerEvent(Clicked!)
- end event
- type ln_bar from line within w_gz_wage_basepay_edit
- long linecolor = 268435456
- integer linethickness = 4
- integer beginy = 172
- integer endx = 2007
- integer endy = 172
- end type
- type ln_bar2 from line within w_gz_wage_basepay_edit
- long linecolor = 16777215
- integer linethickness = 4
- integer beginy = 176
- integer endx = 2039
- integer endy = 176
- end type
- type ln_1 from line within w_gz_wage_basepay_edit
- long linecolor = 268435456
- integer linethickness = 4
- integer beginy = 284
- integer endx = 2016
- integer endy = 284
- end type
- type ln_2 from line within w_gz_wage_basepay_edit
- long linecolor = 16777215
- integer linethickness = 4
- integer beginy = 288
- integer endx = 2048
- integer endy = 288
- end type
- type r_bar from rectangle within w_gz_wage_basepay_edit
- long linecolor = 16777215
- integer linethickness = 4
- long fillcolor = 1073741824
- integer x = 2139
- integer width = 146
- integer height = 68
- end type
- event constructor;this.fillcolor = 14215660
- this.linecolor = 14215660
- this.x = -1
- this.y = -1
- this.height = ln_bar.beginy - 5
- end event
|