1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108 |
- $PBExportHeader$w_gz_award_punish.srw
- forward
- global type w_gz_award_punish from w_publ_1ton_share_detail
- end type
- type ddlb_status from dropdownlistbox within w_gz_award_punish
- end type
- type st_2 from statictext within w_gz_award_punish
- end type
- end forward
- global type w_gz_award_punish from w_publ_1ton_share_detail
- integer height = 2036
- string title = "奖罚单"
- event ue_fj_edit ( )
- event ue_fj_view ( )
- ddlb_status ddlb_status
- st_2 st_2
- end type
- global w_gz_award_punish w_gz_award_punish
- type variables
- uo_award_punish uo_award_punish_dq
- Int cur_flag = -1
- end variables
- forward prototypes
- public function integer wf_refresh_curuc (long arg_billid)
- public subroutine wf_check_billfj ()
- public function integer wf_xls_retrievedata (long arg_ationid, ref s_xls_billlist arg_str_billlist, ref uo_sendtoexcel arg_obj_st, ref string arg_msg)
- end prototypes
- event ue_fj_edit();IF dw_edit_mode THEN
- MessageBox('提示','编辑状态下不可用', Information!, OK! )
- RETURN
- END IF
- //IF NOT f_power_ind(1446) THEN
- // MessageBox(publ_operator,'你没有使用权限!')
- // RETURN
- //END IF
- s_edit_index_tran s_pic
- Long ll_ConnectionID
- String arg_msg
- Long ls_row
- ls_row = dw_uc.GetRow()
- IF ls_row <= 0 THEN
- RETURN
- END IF
- IF f_get_outerconnection(ll_ConnectionID,arg_msg) = 0 THEN
- MessageBox('提示','没有指定附件数据库连接'+arg_msg, Information!, OK! )
- RETURN
- END IF
- s_pic.f_long = 724 //采购订单的mainID
- s_pic.f_string = dw_uc.Object.u_gz_award_punish_billcode[ls_row]
- s_pic.g_long = dw_uc.Object.u_gz_award_punish_billid[ls_row]
- s_pic.e_long = 0
- s_pic.sqltransaction = sys_filedb_sqlca
- OpenWithParm(w_fj_bill_mng,s_pic)
- //wf_check_billfj()
- end event
- event ue_fj_view();IF dw_edit_mode THEN
- MessageBox('提示','编辑状态下不可用', Information!, OK! )
- RETURN
- END IF
- s_edit_index_tran s_pic
- Long ll_ConnectionID
- String arg_msg
- Long ls_row
- ls_row = dw_uc.GetRow()
- IF ls_row <= 0 THEN
- RETURN
- END IF
- IF f_get_outerconnection(ll_ConnectionID,arg_msg) = 0 THEN
- MessageBox('提示','没有指定附件数据库连接'+arg_msg, Information!, OK! )
- RETURN
- END IF
- s_pic.f_long = 724 //采购订单的mainID
- s_pic.f_string = dw_uc.Object.u_gz_award_punish_billcode[ls_row]
- s_pic.g_long = dw_uc.Object.u_gz_award_punish_billid[ls_row]
- s_pic.e_long = 0
- s_pic.sqltransaction = sys_filedb_sqlca
- OpenWithParm(w_fj_bill_view,s_pic)
- end event
- public function integer wf_refresh_curuc (long arg_billid);IF arg_billid <= 0 OR IsNull(arg_billid) THEN RETURN 0
- Long uc_row
- uc_row = dw_pageretr.GetRow()
- IF uc_row <= 0 THEN RETURN 0
- Long wageid
- Int billtype
- String Empcode
- DateTime billdate
- Decimal award_punish_amt
- Long wagemth
- String reason
- Long deptid
- String rep
- Long empid
- String billcode
- DateTime moddate
- String modemp
- DateTime auditdate
- Int flag
- String auditrep
- String opemp
- DateTime opdate
- String Empname
- String duty
- Long deptid2
- String departmentname
- long ll_printnum
- string ls_dealtype
- SELECT u_gz_award_punish.wageid,
- u_gz_award_punish.billtype,
- u_rs_empinfo.Empcode,
- u_gz_award_punish.billdate,
- u_gz_award_punish.award_punish_amt,
- u_gz_award_punish.wagemth,
- u_gz_award_punish.reason,
- u_gz_award_punish.deptid,
- u_gz_award_punish.rep,
- u_gz_award_punish.empid,
- u_gz_award_punish.billcode,
- u_gz_award_punish.moddate,
- u_gz_award_punish.modemp,
- u_gz_award_punish.auditdate,
- u_gz_award_punish.flag,
- u_gz_award_punish.auditrep,
- u_gz_award_punish.opemp,
- u_gz_award_punish.opdate,
- u_rs_empinfo.Empname,
- u_rs_empinfo.duty,
- u_rs_empinfo.deptid,
- cw_department.departmentname,
- u_gz_award_punish.printnum,
- u_gz_award_punish.dealtype
- INTO :wageid,
- :billtype,
- :Empcode,
- :billdate,
- :award_punish_amt,
- :wagemth,
- :reason,
- :deptid,
- :rep,
- :empid,
- :billcode,
- :moddate,
- :modemp,
- :auditdate,
- :flag,
- :auditrep,
- :opemp,
- :opdate,
- :Empname,
- :duty,
- :deptid2,
- :departmentname,
- :ll_printnum,
- :ls_dealtype
- FROM u_gz_award_punish,
- u_rs_empinfo,
- cw_department
- WHERE ( u_gz_award_punish.empid = u_rs_empinfo.empid )
- AND ( u_rs_empinfo.deptid = cw_department.departmentid )
- And ( u_gz_award_punish.billid = :arg_billid );
-
- IF sqlca.SQLCode <> 0 THEN
- MessageBox('提示',"查询奖罚单操作失败"+sqlca.SQLErrText, Information!, OK! )
- RETURN 0
- END IF
- dw_pageretr.Object.u_gz_award_punish_billid[uc_row] = arg_billid
- dw_pageretr.Object.u_gz_award_punish_wageid[uc_row] = wageid
- dw_pageretr.Object.u_gz_award_punish_billtype[uc_row] = billtype
- dw_pageretr.Object.u_rs_empinfo_empcode[uc_row] = Empcode
- dw_pageretr.Object.u_gz_award_punish_billdate[uc_row] = billdate
- dw_pageretr.Object.u_gz_award_punish_award_punish_amt[uc_row] = award_punish_amt
- dw_pageretr.Object.u_gz_award_punish_wagemth[uc_row] = wagemth
- dw_pageretr.Object.u_gz_award_punish_deptid[uc_row] = deptid
- dw_pageretr.Object.u_gz_award_punish_reason[uc_row] = reason
- dw_pageretr.Object.u_gz_award_punish_empid[uc_row] = empid
- dw_pageretr.Object.u_gz_award_punish_billcode[uc_row] = billcode
- dw_pageretr.Object.u_gz_award_punish_modemp[uc_row] = modemp
- dw_pageretr.Object.u_gz_award_punish_moddate[uc_row] = moddate
- dw_pageretr.Object.u_gz_award_punish_auditdate[uc_row] = auditdate
- dw_pageretr.Object.u_gz_award_punish_flag[uc_row] = flag
- dw_pageretr.Object.u_gz_award_punish_auditrep[uc_row] = auditrep
- dw_pageretr.Object.u_gz_award_punish_opemp[uc_row] = opemp
- dw_pageretr.Object.u_gz_award_punish_opdate[uc_row] = opdate
- dw_pageretr.Object.u_rs_empinfo_duty[uc_row] = duty
- dw_pageretr.Object.u_rs_empinfo_deptid[uc_row] = deptid2
- dw_pageretr.Object.cw_department_departmentname[uc_row] = departmentname
- dw_pageretr.Object.u_gz_award_punish_rep[uc_row] = rep
- dw_pageretr.Object.u_rs_empinfo_Empname[uc_row] = Empname
- dw_pageretr.Object.u_gz_award_punish_printnum[uc_row] = ll_printnum
- dw_pageretr.Object.u_gz_award_punish_dealtype[uc_row] = ls_dealtype
- dw_uc.Reset()
- dw_pageretr.RowsCopy(dw_pageretr.GetRow(), dw_pageretr.GetRow(), Primary!, dw_uc, 1, Primary!)
- dw_uc.ResetUpdate()
- dw_uc.SetRedraw(TRUE)
- RETURN 1
- end function
- public subroutine wf_check_billfj ();String arg_msg
- Long ll_ConnectionID
- Long cur_billtype
- long ll_relid,ll_relid_mx,ll_scid
- Long ls_filecount = 0
- Int rslt = 1
- uo_fj_mng_billtype ls_uo_fjbt
- ls_uo_fjbt = CREATE uo_fj_mng_billtype
-
- Long row,uc_relid
- row = dw_pageretr.GetRow()
- IF row > 0 THEN
- ll_relid = dw_pageretr.Object.u_gz_award_punish_billid[row]
- ll_scid = 0
- ll_relid_mx = 0
- ELSE
- rslt = 0
- GOTO ext
- END IF
- IF f_get_outerconnection(ll_ConnectionID,arg_msg) = 0 THEN
- rslt = 0
- GOTO ext
- END IF
- cur_billtype = 724 //客户投拆单的 mainiD
- ls_uo_fjbt.uf_check_billfj( cur_billtype, ll_relid,ll_relid_mx,ll_scid, sys_fileDB_sqlca, arg_msg, ls_filecount)
- IF ls_filecount > 0 THEN
- rslt = 1
- GOTO ext
- ELSE
- rslt = 0
- GOTO ext
- END IF
- ext:
- wf_encl(rslt)
- DESTROY ls_uo_fjbt
- end subroutine
- public function integer wf_xls_retrievedata (long arg_ationid, ref s_xls_billlist arg_str_billlist, ref uo_sendtoexcel arg_obj_st, ref string arg_msg);//==============================================================================
- // 函数: w_publ_1ton_share_detail::wf_xls_retrievedata()
- //------------------------------------------------------------------------------
- // 描述: 此函数需要 重载,复制祖先范例代码,然后修改retrieve参数部分两处即可
- //------------------------------------------------------------------------------
- Long LS_ROW,ll_id,i,ll_scid
- LS_ROW = dw_uc.GetRow()
- IF LS_ROW <= 0 THEN
- arg_msg = '没有目标单据!'
- RETURN 0
- END IF
- //修改点:获取 指定retriev参数
- ll_id = dw_uc.Object.#1[LS_ROW]
- ll_scid = 0
- //查询所选模版是否含有图片信息
- Long ll_ifpic
- Long ll_classid
- SELECT ifpic
- INTO :ll_ifpic
- FROM U_XLS_Templates
- Where id = :ll_xls_Templatesid;
- IF sqlca.SQLCode <> 0 THEN
- ll_ifpic = 0
- END IF
- Long ll_i,ll_j
- Long ll_mtrlid
- Long ll_fileid
- Blob ls_filedata
- SetNull(ls_filedata)
- String Pathname,ls_filename,ls_filetype
- String errmsg
- uo_fj_mng_billtype ls_uo_fjbt
- ls_uo_fjbt = CREATE uo_fj_mng_billtype
- s_xls_pic_list s_pic //结构数组-用于保存图片路径
- IF ll_ifpic = 1 THEN //如果含有图片信息,则查询本类型单据需要带出哪类附件
- SELECT classid
- INTO :ll_classid
- FROM u_billpic_fileclass
- Where (billtype = 724);
- IF sqlca.SQLCode <> 0 THEN
- ll_classid = 0
- END IF
-
- IF ll_classid > 0 THEN //如果已经指定好附件类型,则循环明细表查询每个明细的图片信息.
- FOR ll_i = 1 TO dw_child.RowCount()
- ll_mtrlid = dw_child.Object.mtrlid[ll_i]
- //取该附件类型中的第一个附件.
- SELECT top 1 fileid,DisplayName,FileType INTO :ll_fileid,:ls_filename,:ls_filetype
- FROM u_file
- WHERE relid = :ll_mtrlid
- AND classid = :ll_classid
- AND (filetype = 'bmp' OR filetype = 'rle' OR filetype = 'wmf'
- OR filetype = 'tif' OR filetype = 'jpg' OR filetype = 'gif' OR filetype = 'jpeg')
- USING sys_fileDB_sqlca;
- IF sys_fileDB_sqlca.SQLCode <> 0 THEN
- ll_fileid = 0
- END IF
- IF ll_fileid > 0 THEN
- Pathname = sys_cur_path+ins_fjtemppath+'\'+String(Today(),'yymmdd')+String(Now(),'hhmmss')+'_'+ls_filename+'.'+ls_filetype
- IF Trim(Pathname) <> '' THEN
- IF ls_uo_fjbt.uf_getfjbolb_fromdb( ll_fileid, ls_filedata, sys_fileDB_sqlca, arg_msg) = 0 THEN
- RETURN 0
- END IF
-
- IF f_saveblobtofile(ls_filedata,Pathname,errmsg) = 0 THEN
- RETURN 0
- ELSE
-
- s_pic.path[ll_i] = Pathname
- //记录临时文件位置,本窗口退出后删除
- wf_addlog_tempfilepathname(Pathname)
-
- END IF
- ELSE
- s_pic.path[ll_i] = ''
- END IF
- ELSE
- s_pic.path[ll_i] = ''
- END IF
- NEXT
- END IF
- //
- END IF
- ////可选设置///
- arg_obj_st.uo_const.create_new_pwd( ) //创建随机密码
- if sys_option_xls_ifuse_passwd = 1 then arg_obj_st.uo_const.pwd = trim(sys_option_xls_user_passwd) //默认加密密码 默认为随即密码
- boolean xls_locked
- xls_locked = not (sys_option_xls_lock = 1)
- /// Excel 的可选设置
- if arg_obj_st.of_setoption(arg_ationid, xls_locked,true,arg_msg) <> 1 then
- return 0
- end if
- for i = 1 to arg_str_billlist.count
- ////可选操作///
- arg_str_billlist.bill[i].ds_data = create datastore //
- arg_str_billlist.bill[i].ds_data.dataobject = arg_str_billlist.bill[i].datawindow //
- arg_str_billlist.bill[i].ds_data.settransobject(sqlca)
-
- //修改点:注意retrieve 参数与上文对应
- arg_str_billlist.bill[i].ds_data.retrieve(ll_scid,ll_id)
- next
- return 1
- end function
- on w_gz_award_punish.create
- int iCurrent
- call super::create
- this.ddlb_status=create ddlb_status
- this.st_2=create st_2
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.ddlb_status
- this.Control[iCurrent+2]=this.st_2
- end on
- on w_gz_award_punish.destroy
- call super::destroy
- destroy(this.ddlb_status)
- destroy(this.st_2)
- end on
- event ue_usual_query_retr;call super::ue_usual_query_retr;string ls_querystrpart=''
- ls_newselect=lower(ori_oldselect)
- if trim(sle_usual_query.text)<>'' then
- if pos(trim(sle_usual_query.text),'%')=0 then
- ls_querystrpart="(u_gz_award_punish.billcode like '%"+trim(sle_usual_query.text)+"%')"
- else
- ls_querystrpart="(u_gz_award_punish.billcode like '"+trim(sle_usual_query.text)+"')"
- end if
- if pos(ls_newselect," where ") <> 0 then
- ls_newselect=ls_newselect+" and ("+ls_querystrpart+')'
- else
- ls_newselect=ls_newselect+" where ("+ls_querystrpart+')'
- end if
- end if
- wf_retrieveuc(dw_pageretr,ls_newselect,1)
- this.triggerevent('retrieve_pageretr')
- end event
- event ue_usual_query_filt;call super::ue_usual_query_filt;string obj_expr=''
- if trim(sle_usual_query.text)<>'' then
- if pos(trim(sle_usual_query.text),'%')=0 then
- obj_expr=obj_expr+'( u_gz_award_punish_billcode like "%'+trim(sle_usual_query.text)+'%" )'
- else
- obj_expr=obj_expr+'( u_gz_award_punish_billcode like "'+trim(sle_usual_query.text)+'" )'
- end if
- end if
- dw_pageretr.setfilter(obj_expr)
- dw_pageretr.setredraw(false)
- dw_pageretr.filter()
- if dw_pageretr.rowcount()>=1 then
- dw_pageretr.selectrow(0,false)
- dw_pageretr.selectrow(1,true)
- end if
- dw_pageretr.setredraw(true)
- end event
- event close;call super::close;destroy uo_award_punish_dq
- wf_del_tempfilepathname()
- end event
- event open;call super::open;uc_column_int=11 //uc dw前6列可以编辑
- uo_award_punish_dq =create uo_award_punish
- end event
- event refresh_interface;call super::refresh_interface;ddlb_status.enabled=not dw_edit_mode
- end event
- event retrieve_pageretr;Boolean cb_nextpage_enabled,cb_retrieveall_enabled
- Boolean cb_func_enabled,cb_retrieve_enabled
-
- cb_nextpage_enabled = cb_nextpage.Enabled
- cb_retrieveall_enabled = cb_retrieveall.Enabled
- cb_func_enabled = cb_func.Enabled
- cb_nextpage.Enabled = FALSE
- cb_retrieveall.Enabled = FALSE
- cb_func.Enabled = FALSE
- dw_uc.Retrieve()
- dw_pageretr.Retrieve(cur_flag)
- IF dw_pageretr.RowCount() > 0 THEN
- dw_pageretr.SetRow(1)
- dw_pageretr.triggerevent(rowfocuschanged!)
- end if
- THIS.TriggerEvent('retrieve_childdw')
- cb_nextpage.Enabled = cb_nextpage_enabled
- cb_retrieveall.Enabled = cb_retrieveall_enabled
- cb_func.Enabled = cb_func_enabled
- end event
- event ue_f9;call super::ue_f9;IF NOT dw_edit_mode THEN RETURN
- Long uc_row,ls_j
- s_empselect s_select
- String tmp_empcode
- uc_row = dw_uc.GetRow()
- IF uc_row = 0 THEN
- MessageBox('提示','请选定借支单!', Information!, OK! )
- RETURN
- END IF
- dw_uc.AcceptText()
- tmp_empcode = Trim(dw_uc.Object.u_rs_empinfo_empcode[uc_row])
- IF NOT IsValid(w_empinfo_choice) THEN
- OpenWithParm(w_empinfo_choice,tmp_empcode)
-
- s_select = Message.PowerObjectParm //接受返回结构
- IF s_select.empid > 0 THEN
- dw_uc.SetRedraw(FALSE)
- dw_uc.Object.u_gz_award_punish_empid[uc_row] = s_select.empid
- dw_uc.Object.u_rs_empinfo_empcode[uc_row] = s_select.empcode
- dw_uc.Object.u_rs_empinfo_empname[uc_row] = s_select.empname
- dw_uc.SetColumn('u_gz_award_punish_billdate')
- dw_uc.SetRedraw(TRUE)
- END IF
- END IF
- end event
- event ue_viewprint;call super::ue_viewprint;if not f_power_ind(483) then
- messagebox('提示','你没有使用权限!', Information!, OK! )
- return
- end if
- Long LS_ROW
- LS_ROW = dw_pageretr.GetRow()
- IF LS_ROW <= 0 THEN
- MessageBox('提示','没有打印目标单据!', Information!, OK! )
- RETURN
- END IF
- S_print_MSG LS_PRMSG
- IF ls_newname <> '' THEN
- IF li_auditprint = 1 THEN
- IF dw_pageretr.Object.u_gz_award_punish_flag[dw_pageretr.GetRow()] = 0 THEN
- MessageBox('提示','目标单据还未审核,不能打印!', Information!, OK! )
- RETURN
- END IF
- END IF
- ls_prmsg.obj_dwNAME = ls_newname
- ELSE
- ls_prmsg.obj_dwNAME = 'dw_rp_gz_award_punish_edit'
- END IF
- LS_PRMSG.TAG_TEXT = '奖罚单'
- LS_PRMSG.FILTER_STRING = ''
- LS_PRMSG.retr_pram_falg = 2
- LS_PRMSG.PAGECH_FLAG = 0
- LS_PRMSG.retr_pramnmb = dw_pageretr.Object.u_gz_award_punish_billid[LS_ROW]
- OpenWithParm(w_publ_preview,LS_PRMSG)
- //**更新打印次料
- String arg_msg
- printnum = Message.DoubleParm
- f_update_printnum('u_gz_award_punish',printnum,0,dw_pageretr.Object.u_gz_award_punish_billid[LS_ROW],'','',arg_msg,TRUE)
- end event
- event ue_print;call super::ue_print;//--直接打印
- IF NOT f_power_ind(483) THEN
- MessageBox('提示','你没有使用权限!', Information!, OK! )
- RETURN
- END IF
- uo_print_preview uo_print
- S_print_MSG LS_PRMSG
- IF dw_pageretr.RowCount() = 0 THEN
- MessageBox('提示','没有可打印的单据!', Information!, OK! )
- RETURN
- END IF
- IF MessageBox ("询问","是否确定要打印当前单据吗?",Question!,YesNo! ) = 2 THEN RETURN
- IF ls_newname <> '' THEN
-
- IF li_auditprint = 1 THEN
- IF dw_pageretr.Object.u_gz_award_punish_flag[dw_pageretr.GetRow()] = 0 THEN
- MessageBox('提示','目标单据还未审核,不能打印!', Information!, OK! )
- RETURN
- END IF
- END IF
-
- LS_PRMSG.obj_dwNAME = ls_newname
- ELSE
- LS_PRMSG.obj_dwNAME = 'dw_rp_gz_award_punish_edit'
- END IF
- LS_PRMSG.retr_pram_falg = 2
- LS_PRMSG.TAG_TEXT = '奖罚单'
- LS_PRMSG.FILTER_STRING = ''
- LS_PRMSG.PAGECH_FLAG = 0
- LS_PRMSG.retr_pramnmb = dw_pageretr.Object.u_gz_award_punish_billid[dw_pageretr.GetRow()]
- uo_print.FACT_PRINT_MSG = LS_PRMSG
- String arg_msg
- IF uo_print.uof_print_begin(arg_msg) = 0 THEN
- MessageBox("提示",arg_msg, Information!, OK! )
- RETURN
- END IF
- uo_print.ds_print()
- //**更新打印次料
- f_update_printnum('u_gz_award_punish',1,0,dw_pageretr.Object.u_gz_award_punish_billid[dw_pageretr.GetRow()],'','',arg_msg,TRUE)
- end event
- event ue_addzy;call super::ue_addzy;IF dw_edit_mode THEN
- MessageBox('提示',"编辑状态下不可以使用!", Information!, OK! )
- return
- END IF
- if not f_power_ind(773) then
- messagebox('提示','你没有使用权限!', Information!, OK! )
- return
- end if
- string arg_msg=''
- string ls_str
- long uc_row
- s_inputbox s_sreu
- uc_row=dw_uc.getrow()
- if uc_row<=0 then
- messagebox('系统提示','请选定当前目标单据!', Information!, OK! )
- return
- end if
- s_sreu.title='请输入要补充到备注的内容'
- s_sreu.old_text=''
- openwithparm(w_inputbox,s_sreu)
- ls_str=message.stringparm
- if trim(ls_str)='' or isnull(ls_str) then return
- if uo_award_punish_dq.add_dscrp(dw_uc.object.u_gz_award_punish_billid[uc_row],ls_str,arg_msg)=0 then
- messagebox('error!',arg_msg)
- return
- else
- messagebox('提示','添加备注操作成功!', Information!, OK! )
- wf_refresh_curuc(dw_uc.object.u_gz_award_punish_billid[uc_row])
- end if
- end event
- event resize;ln_bar.endx = this.width
- ln_bar2.endx = this.width
- r_bar.width = this.width
- end event
- type cb_func from w_publ_1ton_share_detail`cb_func within w_gz_award_punish
- end type
- type cb_exit from w_publ_1ton_share_detail`cb_exit within w_gz_award_punish
- integer x = 2267
- end type
- type sle_usual_query from w_publ_1ton_share_detail`sle_usual_query within w_gz_award_punish
- integer x = 192
- integer width = 530
- end type
- type cb_retrieveall from w_publ_1ton_share_detail`cb_retrieveall within w_gz_award_punish
- integer x = 2894
- end type
- type em_pagerowno from w_publ_1ton_share_detail`em_pagerowno within w_gz_award_punish
- integer x = 2533
- integer y = 40
- integer width = 320
- end type
- type dw_pageretr from w_publ_1ton_share_detail`dw_pageretr within w_gz_award_punish
- event dwnkey pbm_dwnkey
- integer x = 1746
- integer width = 1792
- integer height = 1644
- string dataobject = "dw_gz_award_punish_index"
- end type
- event dw_pageretr::dwnkey;call super::dwnkey;Int h = 0
- end event
- event dw_pageretr::constructor;call super::constructor; titleclick_sort_use=true //单击标题排序功能开关
- RBUTTON_FILTER_USE=true //右键查询功能开关
- end event
- event dw_pageretr::rowfocuschanged;call super::rowfocuschanged;wf_check_billfj()
- end event
- type st_1 from w_publ_1ton_share_detail`st_1 within w_gz_award_punish
- integer y = 208
- end type
- type cb_nextpage from w_publ_1ton_share_detail`cb_nextpage within w_gz_award_punish
- integer x = 3045
- end type
- type dw_uc from w_publ_1ton_share_detail`dw_uc within w_gz_award_punish
- integer width = 1737
- integer height = 1652
- string dataobject = "dw_gz_award_punish_edit"
- end type
- event dw_uc::dwnkey;PARENT.TriggerEvent('user_key')
- IF Key = KeyDownArrow! THEN RETURN 1
- IF dw_edit_mode THEN
-
-
- String ls_empcode
- String ls_empname
- Long ll_empid,li_row
- dw_uc.AcceptText()
- li_row = dw_uc.GetRow()
-
- IF dw_uc.GetColumnName ( ) = 'u_rs_empinfo_empcode' AND Key = keyenter! THEN
- ls_empcode = Trim(dw_uc.Object.u_rs_empinfo_empcode[li_row])
- SELECT empid,empname INTO :ll_empid,:ls_empname FROM u_rs_empinfo Where empcode = :ls_empcode;
- dw_uc.SetRedraw(FALSE)
- IF sqlca.SQLCode <> 0 THEN
- PARENT.TriggerEvent('ue_f9')
- RETURN 1
- ELSE
- dw_uc.Object.u_gz_award_punish_empid[li_row] = ll_empid
- dw_uc.Object.u_rs_empinfo_empname[li_row] = ls_empname
- END IF
- dw_uc.SetRedraw(TRUE)
- dw_uc.SetColumn("u_gz_loanwage_billdate")
- RETURN 1
-
- ELSE
- IF Key = keyenter! OR Key = KeyDownArrow! THEN //
- keybd_event ( 9, 0, 0 , 0 ) // 按下tab
- keybd_event ( 9, 0, 2, 0 ) // 释放tab
- RETURN 1
- ELSEIF Key = keyuparrow! THEN
- keybd_event ( 16, 0, 0 , 0 )
- keybd_event ( 9, 0, 0 , 0 )
- keybd_event ( 9, 0, 2, 0 )
- keybd_event ( 16, 0, 2, 0 )
- RETURN 1
- END IF
- END IF
- END IF
- end event
- event dw_uc::clicked;call super::clicked;if not dw_edit_mode then return
- if row <= 0 then return
- if dwo.name='p_p' then
- parent.TRIGGEREVENT('ue_f9')
- end if
- end event
- type gb_2 from w_publ_1ton_share_detail`gb_2 within w_gz_award_punish
- end type
- type dw_child from w_publ_1ton_share_detail`dw_child within w_gz_award_punish
- integer x = 1029
- integer y = 2408
- integer height = 604
- end type
- type cb_viewprint from w_publ_1ton_share_detail`cb_viewprint within w_gz_award_punish
- integer x = 1623
- end type
- type cb_print from w_publ_1ton_share_detail`cb_print within w_gz_award_punish
- integer x = 1431
- end type
- type cb_add from w_publ_1ton_share_detail`cb_add within w_gz_award_punish
- end type
- event cb_add::clicked;IF NOT f_power_ind(209) THEN
- MessageBox('提示','你没有使用权限!', Information!, OK! )
- RETURN
- END IF
- String arg_msg = ''
- Long uc_row
- IF dw_edit_mode THEN
- dw_uc.AcceptText()
- uc_row = dw_uc.GetRow()
- IF uc_row <= 0 THEN
- MessageBox('提示','请选定当前目标单据!', Information!, OK! )
- RETURN
- END IF
-
- IF NOT dw_uc.Object.u_gz_award_punish_billdate[uc_row] > DateTime(2000-01-01,Now()) THEN
- MessageBox('提示','不合理计件日期', Information!, OK! )
- RETURN
- END IF
-
- uo_award_punish_dq.billtype = dw_uc.Object.u_gz_award_punish_billtype[uc_row]
- uo_award_punish_dq.empid = dw_uc.Object.u_gz_award_punish_empid[uc_row]
- uo_award_punish_dq.billdate = dw_uc.Object.u_gz_award_punish_billdate[uc_row]
- uo_award_punish_dq.award_punish_amt = dw_uc.Object.u_gz_award_punish_award_punish_amt[uc_row]
- uo_award_punish_dq.reason = dw_uc.Object.u_gz_award_punish_reason[uc_row]
- uo_award_punish_dq.reason = dw_uc.Object.u_gz_award_punish_reason[uc_row]
- uo_award_punish_dq.deptid = dw_uc.Object.u_gz_award_punish_deptid[uc_row]
- uo_award_punish_dq.rep = dw_uc.Object.u_gz_award_punish_rep[uc_row]
- uo_award_punish_dq.wagemth = dw_uc.Object.u_gz_award_punish_wagemth[uc_row]
- uo_award_punish_dq.wageid = dw_uc.Object.u_gz_award_punish_wageid[uc_row]
- uo_award_punish_dq.dealtype = dw_uc.Object.u_gz_award_punish_dealtype[uc_row]
-
-
-
- IF uo_award_punish_dq.Save(arg_msg,TRUE) = 0 THEN
- MessageBox('错误',arg_msg, StopSign!, OK! )
- RETURN
- END IF
- // messagebox('提示','保存操作成功!')
- //write ini
- f_SetProfileString (sys_empid,dw_uc.DataObject, "ddlb_wageid",String(dw_uc.Object.u_gz_award_punish_wageid[dw_uc.GetRow()]))
- //
-
- Long ll_row
- ll_row = dw_pageretr.GetRow()
- dw_pageretr.SelectRow(0,FALSE)
- dw_pageretr.SelectRow(ll_row,TRUE)
-
- wf_refresh_curuc(uo_award_punish_dq.billid)
- ELSE
- IF uo_award_punish_dq.newbegin(arg_msg) = 0 THEN
- MessageBox('错误',arg_msg, StopSign!, OK! )
- RETURN
- END IF
- END IF
- CALL SUPER::Clicked
- IF dw_edit_mode THEN
- //read ini
- String ls_wageid
- ls_wageid = f_ProfileString (sys_empid,dw_uc.DataObject, "ddlb_wageid",'0')
- dw_uc.Object.u_gz_award_punish_wageid[dw_uc.GetRow()] = Long(ls_wageid)
- dw_uc.Object.u_gz_award_punish_wagemth[dw_uc.GetRow()] = Long(String(Today(),'yyyymm'))
- dw_uc.SetColumn('u_gz_award_punish_wageid')
- //
- ELSE
- PARENT.TriggerEvent("retrieve_childdw")
- END IF
- THIS.TriggerEvent('refresh_interface')
- // billid
- // empcode
- // u_sc_taskworkmx_procode
- // u_sc_taskworkmx_proname
- // workprice
- // amount
- // workhour
- // u_sc_taskworkmx_mxdscrp
- // empid
- // u_sc_taskworkmx_printid
- // empname
- // pid
- // amt
- end event
- type cb_edit from w_publ_1ton_share_detail`cb_edit within w_gz_award_punish
- end type
- event cb_edit::clicked;IF NOT f_power_ind(209) THEN
- MessageBox('提示','你没有使用权限!', Information!, OK! )
- RETURN
- END IF
- String arg_msg = ''
- Long uc_row
- uc_row = dw_pageretr.GetRow()
- IF uc_row <= 0 THEN
- MessageBox('提示','请选定当前目标单据!', Information!, OK! )
- RETURN
- END IF
- IF NOT dw_edit_mode THEN
- IF uo_award_punish_dq.updatebegin(dw_pageretr.Object.u_gz_award_punish_billid[uc_row],arg_msg) = 0 THEN
- MessageBox('Error!',arg_msg)
- RETURN
- END IF
-
- wf_refresh_curuc(dw_pageretr.Object.u_gz_award_punish_billid[uc_row])
- END IF
- CALL SUPER::Clicked
- end event
- type cb_delet from w_publ_1ton_share_detail`cb_delet within w_gz_award_punish
- end type
- event cb_delet::clicked;call super::clicked;IF NOT f_power_ind(629) THEN
- MessageBox('提示','你没有使用权限!', Information!, OK! )
- RETURN
- END IF
- IF dw_edit_mode THEN RETURN
- String arg_msg = ''
- Long uc_row
- uc_row = dw_pageretr.GetRow()
- IF uc_row <= 0 THEN
- MessageBox('提示','请选定当前目标单据!', Information!, OK! )
- RETURN
- END IF
- IF MessageBox ("IF","是否确定要删除当前单据吗?",Question!,YesNo! ) = 2 THEN RETURN
- IF uo_award_punish_dq.del(dw_pageretr.Object.u_gz_award_punish_billid[uc_row],arg_msg) = 0 THEN
- MessageBox('Error!',arg_msg)
- ELSE
- //日志
- Long ls_id
- String ls_code
- ls_id = dw_pageretr.Object.u_gz_award_punish_billid[uc_row]
- ls_code = dw_pageretr.Object.u_gz_award_punish_billcode[uc_row]
- f_setsysoplog('奖罚单','奖罚单删除,id:'+String(ls_id)+',code:'+ls_code,arg_msg,TRUE)
- //--
-
- MessageBox('提示','删除单据'+String(dw_pageretr.Object.u_gz_award_punish_billcode[uc_row])+'成功!', Information!, OK! )
- dw_pageretr.DeleteRow(uc_row)
- dw_pageretr.Triggerevent(rowfocuschanged!)
- END IF
- end event
- type cb_addzy from w_publ_1ton_share_detail`cb_addzy within w_gz_award_punish
- end type
- event cb_addzy::clicked;call super::clicked;
- m_Dfc_Control_PopupMenu dmPopupMenu
- string menustr
- menustr="Text=补充事宜~tEvent=ue_addzy"
- menustr=menustr + "|" + "Text=-"
- menustr=menustr + "|" + "Text=查看附件~tEvent=ue_fj_view"
- menustr=menustr + "|" + "Text=添加附件~tEvent=ue_fj_edit"
- if len(trim(menustr))<>0 then
- dmPopupMenu = Create m_Dfc_Control_PopupMenu
- dmPopupMenu.mf_BuildMenu(This, menustr)
- dmPopupMenu.mf_PopMenu()
- Destroy dmPopupMenu
- end if
- end event
- type cb_auditing from w_publ_1ton_share_detail`cb_auditing within w_gz_award_punish
- end type
- event cb_auditing::clicked;call super::clicked;IF Not f_power_ind(210) THEN
- MessageBox('提示','你没有使用权限!', Information!, OK! )
- RETURN
- END IF
- s_taskwork_abnormity_audit s_audit
- OpenWithParm(w_gz_award_punish_audit,1)
- s_audit = Message.PowerObjectParm
- IF s_audit.audit_month = 0 THEN RETURN
- String arg_msg
- IF uo_award_punish_dq.auditing(s_audit.audit_wageid,s_audit.audit_month,arg_msg,True) = 0 THEN
- MessageBox('提示','奖罚单审核失败,原因>>'+arg_msg, Information!, OK! )
- RETURN
- END IF
- MessageBox('提示','奖罚单审核成功', Information!, OK! )
- Parent.TriggerEvent('retrieve_pageretr')
- end event
- type cb_xm from w_publ_1ton_share_detail`cb_xm within w_gz_award_punish
- boolean visible = false
- end type
- type cb_retrieve from w_publ_1ton_share_detail`cb_retrieve within w_gz_award_punish
- end type
- type cb_xls from w_publ_1ton_share_detail`cb_xls within w_gz_award_punish
- integer x = 1815
- end type
- type cb_help from w_publ_1ton_share_detail`cb_help within w_gz_award_punish
- integer x = 2117
- end type
- type cb_auditing_cancel from w_publ_1ton_share_detail`cb_auditing_cancel within w_gz_award_punish
- end type
- event cb_auditing_cancel::clicked;call super::clicked;IF Not f_power_ind(905) THEN
- MessageBox('提示','你没有使用权限!', Information!, OK! )
- RETURN
- END IF
- s_taskwork_abnormity_audit s_audit
- OpenWithParm(w_gz_award_punish_audit,0)
- s_audit = Message.PowerObjectParm
- IF s_audit.audit_month = 0 THEN RETURN
- String arg_msg
- IF uo_award_punish_dq.c_auditing(s_audit.audit_wageid,s_audit.audit_month,arg_msg,True) = 0 THEN
- MessageBox('提示','奖罚单撤审失败,原因>>'+arg_msg, Information!, OK! )
- RETURN
- END IF
- MessageBox('提示','奖罚单撤审成功', Information!, OK! )
- Parent.TriggerEvent('retrieve_pageretr')
- end event
- type p_msg from w_publ_1ton_share_detail`p_msg within w_gz_award_punish
- end type
- type p_help from w_publ_1ton_share_detail`p_help within w_gz_award_punish
- end type
- type p_encl from w_publ_1ton_share_detail`p_encl within w_gz_award_punish
- end type
- type p_other from w_publ_1ton_share_detail`p_other within w_gz_award_punish
- end type
- type gb_3 from w_publ_1ton_share_detail`gb_3 within w_gz_award_punish
- end type
- type ln_bar from w_publ_1ton_share_detail`ln_bar within w_gz_award_punish
- end type
- type ln_bar2 from w_publ_1ton_share_detail`ln_bar2 within w_gz_award_punish
- end type
- type r_bar from w_publ_1ton_share_detail`r_bar within w_gz_award_punish
- end type
- type ln_1 from w_publ_1ton_share_detail`ln_1 within w_gz_award_punish
- end type
- type ln_2 from w_publ_1ton_share_detail`ln_2 within w_gz_award_punish
- end type
- type ddlb_status from dropdownlistbox within w_gz_award_punish
- integer x = 919
- integer y = 188
- integer width = 421
- integer height = 300
- integer taborder = 10
- 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 index=1 then
- cur_flag=-1
- elseif index=2 then
- cur_flag=0
- elseif index=3 then
- cur_flag=1
- end if
- parent.triggerevent('retrieve_pageretr')
- end event
- type st_2 from statictext within w_gz_award_punish
- integer x = 736
- integer y = 204
- integer width = 219
- integer height = 48
- 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
|