$PBExportHeader$w_outware_gj.srw forward global type w_outware_gj from w_publ_1ton_share_detail end type type ddlb_scid from uo_ddlb_scid within w_outware_gj end type type st_3 from statictext within w_outware_gj end type type st_2 from statictext within w_outware_gj end type type ddlb_status from dropdownlistbox within w_outware_gj end type type cb_fj from uo_imflatbutton within w_outware_gj end type end forward global type w_outware_gj from w_publ_1ton_share_detail string title = "扣费品单" boolean maxbox = true windowstate windowstate = maximized! event insert_childrow ( ) event ue_gzcaudit ( ) event ue_gzaudit ( ) event ue_fj_edit ( ) event ue_fj_view ( ) ddlb_scid ddlb_scid st_3 st_3 st_2 st_2 ddlb_status ddlb_status cb_fj cb_fj end type global w_outware_gj w_outware_gj type variables long cur_scid //分店ID int cur_flag = -1 int cur_secflag = -1 uo_outware_gj uo_ware int flag= 0 int secflag= 0 end variables forward prototypes public function integer wf_refresh_curuc (long arg_scid, long arg_wareid) public function integer wf_flagstatus_rf () 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 insert_childrow();long li_row li_row=dw_child.insertrow(0) dw_child.scrolltorow(li_row) dw_child.SetColumn ('u_mtrldef_mtrlcode') end event event ue_gzcaudit();IF dw_edit_mode THEN MessageBox('提示',"编辑状态下不可以使用!", Information!, OK! ) return END IF IF NOT f_power_ind(907) THEN MessageBox('提示','你没有使用权限!', Information!, OK! ) RETURN END IF IF MessageBox ("询问","是否确定要撤消工资审核当前单据吗?",Question!,YesNo! ) = 2 THEN RETURN String arg_msg = '' s_taskwork_abnormity_audit s_audit OpenWithParm(w_outware_gj_audit,0) s_audit = Message.PowerObjectParm IF s_audit.audit_month = 0 THEN RETURN IF uo_ware.c_sec_auditing(s_audit.audit_wageid,s_audit.audit_month,arg_msg,TRUE) = 0 THEN MessageBox('error!',arg_msg) ELSE //日志 String ls_month ls_month = String(s_audit.audit_month) f_setsysoplog('扣费品单','工资撤审,月份:'+ls_month,arg_msg,TRUE) //-- MessageBox('提示','工资撤审成功!', Information!, OK! ) this.TriggerEvent('retrieve_pageretr') END IF end event event ue_gzaudit();IF dw_edit_mode THEN MessageBox('提示',"编辑状态下不可以使用!", Information!, OK! ) return END IF IF NOT f_power_ind(203) THEN MessageBox('提示','你没有使用权限!', Information!, OK! ) RETURN END IF IF MessageBox ("询问","是否确定要工资审核当前单据吗?",question!,yesno! ) = 2 THEN RETURN String arg_msg = '' s_taskwork_abnormity_audit s_audit OpenWithParm(w_outware_gj_audit,1) s_audit = Message.PowerObjectParm IF s_audit.audit_month = 0 THEN RETURN IF uo_ware.sec_auditing(s_audit.audit_month,s_audit.audit_wageid,TRUE,arg_msg) = 0 THEN MessageBox('错误',arg_msg, StopSign!, OK! ) ELSE MessageBox('提示','工资审核成功!', Information!, OK! ) this.TriggerEvent('retrieve_pageretr') END IF end event 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_pageretr.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 = 329 //采购订单的mainID s_pic.f_string = dw_pageretr.Object.u_outware_outwarecode[ls_row] s_pic.g_long = dw_pageretr.Object.u_outware_outwareid[ls_row] s_pic.e_long = dw_pageretr.Object.u_outware_scid[ls_row] 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_pageretr.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 = 329 //采购订单的mainID s_pic.f_string = dw_pageretr.Object.u_outware_outwarecode[ls_row] s_pic.g_long = dw_pageretr.Object.u_outware_outwareid[ls_row] s_pic.e_long = dw_pageretr.Object.u_outware_scid[ls_row] s_pic.sqltransaction = sys_filedb_sqlca OpenWithParm(w_fj_bill_view,s_pic) end event public function integer wf_refresh_curuc (long arg_scid, long arg_wareid);//wf_refresh_curuc IF arg_wareid <= 0 OR IsNull(arg_wareid) THEN RETURN 0 Long uc_row uc_row = dw_pageretr.GetRow() IF uc_row <= 0 THEN RETURN 0 Long outwareid DateTime outdate String part String cusname String outrep String dscrp Int balcflag String outwarecode DateTime opdate String opemp DateTime moddate String modemp Int aflag DateTime auditingdate String Auditingrep String storagename Long storageid String Empcode Long relid Long wagemth,ll_secflag String secauditingrep DateTime secauditingdate long cusid string empname SELECT u_outware.outdate, u_outware.outrep, u_outware.part, u_outware.dscrp, u_outware.outwarecode, u_outware.opdate, u_outware.opemp, u_outware.moddate, u_outware.modemp, u_outware.auditingdate, u_outware.flag, u_outware.Auditingrep, u_outware.cusname, u_outware.balcflag, u_storage.storagename, u_outware.storageid, u_rs_empinfo.Empcode, u_outware.relid, u_outware.secflag , u_outware.secauditingrep, u_outware.secauditingdate, u_outware.wagemth, u_outware.cusid, u_rs_empinfo.empname INTO :outdate, :outrep, :part, :dscrp, :outwarecode, :opdate, :opemp, :moddate, :modemp, :auditingdate, :aflag, :Auditingrep, :cusname, :balcflag, :storagename, :storageid, :Empcode, :relid, :ll_secflag, :secauditingrep, :secauditingdate, :wagemth, :cusid, :empname FROM u_outware ,u_storage, u_rs_empinfo Where ( u_outware.outwareid = :arg_wareid ) And ( u_outware.storageid = u_storage.storageid ) And ( u_outware.scid = :arg_scid ) And ( u_outware.cusid = u_rs_empinfo.empid ); IF sqlca.SQLCode <> 0 THEN MessageBox('提示',"查询操作失败(错误单据唯一码)", Information!, OK! ) RETURN 0 END IF dw_pageretr.Object.u_outware_scid[uc_row] = arg_scid dw_pageretr.Object.u_outware_outwareid[uc_row] = arg_wareid dw_pageretr.Object.u_outware_outdate[uc_row] = outdate dw_pageretr.Object.u_outware_part[uc_row] = part dw_pageretr.Object.u_outware_outrep[uc_row] = outrep dw_pageretr.Object.u_outware_dscrp[uc_row] = dscrp dw_pageretr.Object.u_outware_balcflag[uc_row] = balcflag dw_pageretr.Object.u_outware_outwarecode[uc_row] = outwarecode dw_pageretr.Object.u_outware_opdate[uc_row] = opdate dw_pageretr.Object.u_outware_opemp[uc_row] = opemp dw_pageretr.Object.u_outware_moddate[uc_row] = moddate dw_pageretr.Object.u_outware_modemp[uc_row] = modemp dw_pageretr.Object.cusname[uc_row] = cusname dw_pageretr.Object.flag[uc_row] = aflag dw_pageretr.Object.u_outware_Auditingdate[uc_row] = auditingdate dw_pageretr.Object.u_outware_Auditingrep[uc_row] = Auditingrep dw_pageretr.Object.u_storage_storagename[uc_row] = storagename dw_pageretr.Object.storageid[uc_row] = storageid dw_pageretr.Object.u_rs_empinfo_empcode[uc_row] = Empcode dw_pageretr.Object.u_outware_relid[uc_row] = relid dw_pageretr.Object.u_outware_secflag[uc_row] = ll_secflag dw_pageretr.Object.u_outware_secauditingrep[uc_row] = secauditingrep dw_pageretr.Object.u_outware_secauditingdate[uc_row] = secauditingdate dw_pageretr.Object.u_outware_wagemth[uc_row] = wagemth dw_pageretr.Object.u_outware_cusid[uc_row] = cusid dw_pageretr.Object.u_rs_empinfo_empname[uc_row] = empname dw_uc.Reset() dw_pageretr.RowsCopy(dw_pageretr.GetRow(), dw_pageretr.GetRow(), Primary!, dw_uc, 1, Primary!) dw_uc.ResetUpdate() dw_uc.SetRedraw(TRUE) wf_flagstatus_rf() RETURN 1 end function public function integer wf_flagstatus_rf ();//==================================================================== // Function: wf_flagstatus_rf() //-------------------------------------------------------------------- // Description: //-------------------------------------------------------------------- // Arguments:(None) //-------------------------------------------------------------------- // Returns: integer //-------------------------------------------------------------------- // Author: yyx Date: 2003.12.26 //-------------------------------------------------------------------- // Modify History: // //==================================================================== //wf_flagstatus_rf() long pagerert_row pagerert_row=dw_pageretr.getrow() if pagerert_row<=0 then cb_auditing.enabled=false flag=-1 secflag= -1 goto ext end if flag=dw_pageretr.object.flag[pagerert_row] secflag=dw_pageretr.object.u_outware_secflag[pagerert_row] if dw_edit_mode then cb_auditing.enabled=false cb_auditing_cancel.enabled=false else if flag=0 then cb_auditing.enabled=true cb_auditing_cancel.enabled=false elseif flag=1 and secflag=0 then cb_auditing.enabled=false cb_auditing_cancel.enabled=true else cb_auditing.enabled=false cb_auditing_cancel.enabled=false end if end if ext: return 0 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_outware_outwareid[row] ll_scid = dw_pageretr.Object.u_outware_scid[row] 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 = 329 //客户投拆单的 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: IF rslt = 1 THEN cb_fj.Enabled = TRUE ELSE cb_fj.Enabled = FALSE END IF 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 = dw_uc.Object.u_outware_scid[LS_ROW] //查询所选模版是否含有图片信息 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 = 329); 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_outware_gj.create int iCurrent call super::create this.ddlb_scid=create ddlb_scid this.st_3=create st_3 this.st_2=create st_2 this.ddlb_status=create ddlb_status this.cb_fj=create cb_fj iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.ddlb_scid this.Control[iCurrent+2]=this.st_3 this.Control[iCurrent+3]=this.st_2 this.Control[iCurrent+4]=this.ddlb_status this.Control[iCurrent+5]=this.cb_fj end on on w_outware_gj.destroy call super::destroy destroy(this.ddlb_scid) destroy(this.st_3) destroy(this.st_2) destroy(this.ddlb_status) destroy(this.cb_fj) end on event close;call super::close;destroy uo_outware wf_del_tempfilepathname() end event event open;this.triggerevent('ue_before_open') wf_movetocenter() OLD_TITLE=THIS.TITLE s_tran=Message.PowerObjectParm IF not ISNULL(s_tran) then retrieve_all=s_tran.if_retrieve_all mode=s_tran.work_mode arg_pkid=s_tran.arg_pkid arg_string_code=s_tran.arg_string_code if_sharedata=s_tran.if_sharedata //是否应用sharedata,当retrieve_all=true是生效 ds_share=s_tran.ds_share end if dw_pageretr.RBUTTON_FILTER_USE=true //右键查询功能开关 dw_pageretr.titleclick_sort_use=true //单击标题排序功能开关 dw_pageretr.SetTransObject (sqlca) pkcolumndbtname=wf_get_pkcolumndbtname(dw_pageretr) //取第一列为关键字 ori_oldselect=dw_pageretr.Describe("DataWindow.Table.Select") //==================================================================== // Script - w_outware_other inherited from w_publ_1ton_share_detail for open // Reason: //-------------------------------------------------------------------- // Modified By: yyx Date: 2003.12.01 //-------------------------------------------------------------------- ori_oldselect=f_modify_selectstr(ori_oldselect)//只显示所管的仓库单据 //==================================================================== ls_newselect=ori_oldselect ds_curquery=CREATE DATASTORE ds_curquery.DATAOBJECT='d_extr_find' ds_curquery.SetTransObject (sqlca) wf_editindex_lockf() sle_usual_query.text=trim(arg_string_code) if NOT retrieve_all then THIS.TRIGGEREVENT("ue_usual_query_RETR") //修改ls_newselect,retrieve else if if_sharedata then ds_share.sharedata(dw_pageretr) else wf_retrieveuc(dw_pageretr,ls_newselect,1) this.TRIGGEREVENT('RETRIEVE_pageretr') end if end if IF retrieve_all THEN THIS.TRIGGEREVENT("ue_usual_query_filt") END IF uc_column_int=8 //uc dw前7列可以编辑 child_column_int=5 //子dw前8列可以编辑 uo_ware=create uo_outware_gj uo_ware.commit_transaction=sqlca end event event refresh_interface;call super::refresh_interface;wf_flagstatus_rf() ddlb_status.enabled=not dw_edit_mode if dw_edit_mode then ddlb_scid.enabled=false else if sys_scid > 0 then ddlb_scid.enabled=false else ddlb_scid.enabled=true end if end if //if dw_edit_mode then // dw_child.x=0 // dw_child.width=this.width - 50 // dw_pageretr.height=600 //else // dw_child.x=1038 // dw_child.width=2519 // dw_pageretr.height=1908 //end if end event event retrieve_childdw;call super::retrieve_childdw;long row,uc_relid row=dw_pageretr.getrow() if row>0 then uc_relid=dw_pageretr.object.u_outware_outwareid[row] dw_child.SetRedraw (false) dw_child.retrieve(cur_scid,uc_relid) dw_child.SetRedraw (true) else dw_child.reset() end if end event event retrieve_pageretr;boolean cb_firstpage_enabled,cb_nextpage_enabled,cb_retrieveall_enabled boolean cb_priorpage_enabled,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_scid,cur_flag,cur_secflag) if dw_pageretr.rowcount()>0 and dw_pageretr.getrow()=0 then dw_pageretr.setrow(1) 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 //只显未自已管的仓库 datawindowchild childdw string new_sqlstr,modify_str dw_uc.SetTransObject (sqlca) dw_uc.getchild("storageid",childdw) childdw.SetTransObject (sqlca) new_sqlstr=childdw.Describe("DataWindow.Table.Select") new_sqlstr=f_modify_selectstr(new_sqlstr) modify_str="DataWindow.Table.Select='" + new_sqlstr +"'" childdw.modify ( modify_str ) childdw.retrieve() // 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_outware_outwarecode LIKE "%'+Trim(sle_usual_query.Text)+'%" )' ELSE obj_expr = obj_expr+'( u_outware_outwarecode 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 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_outware.outwarecode like '%"+trim(sle_usual_query.text)+"%')" else ls_querystrpart="(u_outware.outwarecode 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_f8;call super::ue_f8;//用于选择明细内容,被F8[默认]\dw_child.doubleclicked调用 if not dw_edit_mode then return long child_row,ins_storageid=0 ins_storageid=dw_uc.object.storageid[dw_uc.getrow()] if ins_storageid=0 or isnull(ins_storageid) then messagebox('提示','请先选择仓库', Information!, OK! ) return end if child_row=dw_child.getrow() this.enabled = false if not isvalid(w_mtrlware_storageid_ch) then s_edit_index_tran s_tranf8 //传递参数使用 s_tranf8.if_retrieve_all=false //是否一次RETRIEVE所有行 s_tranf8.arg_pkid=0 //目标定位PKID (备用) s_tranf8.arg_string_code='' //查询列(物料编码)部分内容,用于初步筛选 s_tranf8.b_long= - 1 //选择原料或产品 s_tranf8.d_long=ins_storageid long chc=1,ls_j dw_child.accepttext() if dw_child.getrow()>0 then s_tranf8.arg_string_code=trim(dw_child.object.u_mtrldef_mtrlcode[dw_child.getrow()]) OPENwithparm(w_mtrlware_storageid_ch,s_tranf8) //调用 s_mtrlware_noalloc_array S_INSCUST S_INSCUST=Message.PowerObjectParm //接受返回结构 for ls_j=1 to UpperBound(S_INSCUST.mtrlwareid) if S_INSCUST.mtrlwareid[ls_j]>0 then if dw_child.getrow()>0 then if dw_child.object.u_outwaremx_mtrlid[child_row]<>0 then child_row = dw_child.InsertRow (0) else child_row=dw_child.getrow() end if else child_row = dw_child.InsertRow (0) end if dw_child.object.u_outwaremx_mtrlwareid[child_row]=S_INSCUST.mtrlwareid[ls_j] dw_child.object.u_outwaremx_mtrlid[child_row]=S_INSCUST.mtrlid[ls_j] dw_child.object.u_mtrldef_mtrlcode[child_row] =S_INSCUST.u_mtrldef_mtrlcode[ls_j] dw_child.object.u_mtrldef_mtrlname[child_row] =S_INSCUST.u_mtrldef_mtrlname[ls_j] dw_child.object.u_mtrldef_mtrlmode[child_row] =S_INSCUST.u_mtrldef_mtrlmode[ls_j] dw_child.object.u_mtrldef_unit[child_row] =S_INSCUST.u_mtrldef_unit[ls_j] dw_child.object.u_mtrldef_prdpackcode[child_row] =S_INSCUST.u_mtrldef_prdpackcode[ls_j] dw_child.object.u_mtrldef_packqty[child_row] =S_INSCUST.u_mtrldef_packqty[ls_j] dw_child.object.u_outwaremx_qty[child_row] =S_INSCUST.noallocqty[ls_j] dw_child.object.u_outwaremx_fprice[child_row] =S_INSCUST.cost[ls_j] dw_child.object.u_outwaremx_planprice[child_row] =S_INSCUST.planprice[ls_j] dw_child.object.u_outwaremx_storageid[child_row] =S_INSCUST.storageid[ls_j] dw_child.object.u_outwaremx_plancode[child_row] =S_INSCUST.plancode[ls_j] dw_child.object.u_outwaremx_status[child_row] =S_INSCUST.status[ls_j] end if next end if this.enabled = true end event event ue_viewprint;call super::ue_viewprint;IF NOT f_power_ind(477) 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.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_outware_gj_edit' END IF LS_PRMSG.TAG_TEXT='扣费品领用单' LS_PRMSG.FILTER_STRING = '' LS_PRMSG.retr_pram_falg=15 LS_PRMSG.PAGECH_FLAG=0 LS_PRMSG.retr_scid=cur_scid LS_PRMSG.retr_pramnmb=dw_pageretr.object.u_outware_outwareid[LS_ROW] ls_prmsg.rowcnt=dw_child.rowcount() Openwithparm(w_publ_preview,LS_PRMSG) 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]) this.enabled = false 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_outware_cusid[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_outware_relid') dw_uc.setredraw(true) end if end if this.enabled = true end event event ue_print;call super::ue_print;//--直接打印 IF NOT f_power_ind(477) 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.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_outware_gj_edit' END IF LS_PRMSG.retr_pram_falg = 15 LS_PRMSG.TAG_TEXT = '扣费品领用单' LS_PRMSG.FILTER_STRING = '' LS_PRMSG.PAGECH_FLAG = 0 LS_PRMSG.retr_scid = cur_scid LS_PRMSG.retr_pramnmb = dw_pageretr.Object.u_outware_outwareid[dw_pageretr.GetRow()] LS_PRMSG.rowcnt = dw_child.RowCount() 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() 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(788) then messagebox('提示','你没有使用权限!', Information!, OK! ) return end if string arg_msg='',LS_STR long uc_row s_inputbox S_SREU uc_row=dw_pageretr.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_ware.add_dscrp(cur_scid,dw_pageretr.object.u_outware_outwareid[uc_row],LS_STR,arg_msg)=0 then messagebox('Error!',arg_msg) return else messagebox('提示','添加备注操作成功!', Information!, OK! ) wf_refresh_curuc(cur_scid,dw_pageretr.object.u_outware_outwareid[uc_row]) end if end event type cb_func from w_publ_1ton_share_detail`cb_func within w_outware_gj end type type cb_exit from w_publ_1ton_share_detail`cb_exit within w_outware_gj end type type sle_usual_query from w_publ_1ton_share_detail`sle_usual_query within w_outware_gj integer x = 320 integer width = 549 end type type cb_retrieveall from w_publ_1ton_share_detail`cb_retrieveall within w_outware_gj integer x = 3099 end type type em_pagerowno from w_publ_1ton_share_detail`em_pagerowno within w_outware_gj integer x = 2779 integer width = 320 end type type dw_pageretr from w_publ_1ton_share_detail`dw_pageretr within w_outware_gj integer x = 1792 integer width = 1746 integer height = 1000 string dataobject = "dw_outware_gj_index" end type event dw_pageretr::rowfocuschanged;call super::rowfocuschanged;wf_flagstatus_rf() wf_check_billfj() end event type st_1 from w_publ_1ton_share_detail`st_1 within w_outware_gj integer x = 146 string text = "编码含" end type type cb_nextpage from w_publ_1ton_share_detail`cb_nextpage within w_outware_gj integer x = 3250 end type type dw_uc from w_publ_1ton_share_detail`dw_uc within w_outware_gj integer width = 1787 integer height = 1000 string dataobject = "dw_outware_gj_edit" end type event dw_uc::dwnkey;parent.triggerevent('user_key') if key = KeyDownArrow! then return 1 if dw_edit_mode then if dw_uc.GetColumnName ( )='u_outware_dscrp' and key = KeyEnter! then dw_child.setfocus() dw_child.scrolltorow(1) dw_child.SetColumn ('u_mtrldef_mtrlcode') return 1 elseif dw_uc.GetColumnName ( ) = 'u_rs_empinfo_empcode' AND Key = keyenter! THEN String ls_empcode String ls_empname Long ll_empid,li_row dw_uc.AcceptText() li_row = dw_uc.GetRow() 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_outware_cusid[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_outware_relid") RETURN 1 else if key = KeyEnter! Then // keybd_event ( 9, 0, 0 , 0 ) // 按下tab keybd_event ( 9, 0, 2, 0 ) // 释放tab Return 1 end If end if end if end event event dw_uc::itemchanged;call super::itemchanged;if not dw_edit_mode then return if dw_uc.GetColumnName ( )<>'storageid' then return dw_child.reset() parent.triggerevent("insert_childrow") 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_outware_gj end type type dw_child from w_publ_1ton_share_detail`dw_child within w_outware_gj integer y = 1300 integer width = 3543 integer height = 948 string dataobject = "dw_outwaremx_gj_edit" end type event dw_child::dwnkey;call super::dwnkey;parent.triggerevent('user_key') string ls_mtrlcode,ls_mtrlname,ls_unit,ls_plancode,ls_mtrlmode,ls_status,ls_prdpackcode long ls_mtrlwareid,ls_mtrlid,ls_storageid dec ls_noallocqty,ls_noauditingqty,ls_cost,ls_planprice,ls_packqty long child_row long ls_null setnull(ls_null) if dw_edit_mode then if keydown(Keydownarrow!) Then long li_row if dw_child.getrow()=dw_child.rowcount() then parent.triggerevent("insert_childrow") end if else if (keydown(KeyEnter!) or keydown(KeyTab!)) and not keydown(KeyControl!) and not keydown(KeyShift!) then if dw_child.GetColumnName( )='u_mtrldef_mtrlcode' then ls_storageid=dw_uc.object.storageid[dw_uc.getrow()] if ls_storageid=0 or isnull(ls_storageid) then messagebox('提示','请先选择仓库', Information!, OK! ) return end if dw_child.accepttext() child_row=dw_child.getrow() ls_mtrlcode=dw_child.object.u_mtrldef_mtrlcode[child_row] //查询产品是否多于一批库存 int cnt=0 SELECT count(mtrlwareid) into :cnt FROM u_mtrlware, u_mtrldef WHERE ( u_mtrldef.mtrlid = u_mtrlware.mtrlid ) and ( u_mtrlware.storageid=:ls_storageid ) and ( u_mtrldef.mtrlcode=:ls_mtrlcode) and ( u_mtrlware.noallocqty > 0 ); if sqlca.sqlcode=100 or cnt > 1 then parent.triggerevent('ue_f8') return end if ///////////////////////////// SELECT top 1 u_mtrlware.mtrlwareid , u_mtrlware.mtrlid, u_mtrldef.mtrlname, u_mtrldef.unit, u_mtrlware.noallocqty, u_mtrlware.cost, u_mtrlware.storageid, u_mtrlware.plancode, u_mtrldef.mtrlmode, u_mtrlware.planprice, u_mtrlware.status, uv_mtrlware_noauditingqty.noauditingqty, u_mtrldef.prdpackcode, u_mtrldef.packqty INTO :ls_mtrlwareid,:ls_mtrlid,:ls_mtrlname,:ls_unit,:ls_noallocqty, :ls_cost,:ls_storageid,:ls_plancode,:ls_mtrlmode, :ls_planprice,:ls_status,:ls_noauditingqty, :ls_prdpackcode,:ls_packqty FROM u_mtrldef, u_mtrlware left outer join u_storage on ( u_mtrlware.storageid = u_storage.storageid) left outer join uv_mtrlware_noauditingqty on ( u_mtrlware.mtrlwareid = uv_mtrlware_noauditingqty.mtrlwareid) and ( u_mtrlware.scid = uv_mtrlware_noauditingqty.scid) WHERE ( u_mtrldef.mtrlid = u_mtrlware.mtrlid ) and ( u_mtrlware.storageid=:ls_storageid ) and ( u_mtrldef.mtrlcode=:ls_mtrlcode ) and ( u_mtrlware.scid = :cur_scid ) and ( u_mtrlware.noallocqty > 0 ) order by u_mtrlware.mtrlwareid asc; if sqlca.sqlcode=100 then parent.triggerevent('ue_f8') return end if dw_child.object.u_outwaremx_mtrlwareid[child_row]=ls_mtrlwareid dw_child.object.u_outwaremx_mtrlid[child_row] =ls_mtrlid dw_child.object.u_mtrldef_mtrlname[child_row] =ls_mtrlname dw_child.object.u_mtrldef_mtrlmode[child_row] =ls_mtrlmode dw_child.object.u_mtrldef_unit[child_row] =ls_unit dw_child.object.u_mtrldef_prdpackcode[child_row] =ls_prdpackcode dw_child.object.u_mtrldef_packqty[child_row] =ls_packqty dw_child.object.u_outwaremx_qty[child_row]=ls_noallocqty - ls_noauditingqty dw_child.object.u_outwaremx_fprice[child_row] =ls_cost dw_child.object.u_outwaremx_planprice[child_row] =ls_planprice dw_child.object.u_outwaremx_storageid[child_row] =ls_storageid dw_child.object.u_outwaremx_plancode[child_row] =ls_plancode dw_child.object.u_outwaremx_status[child_row] =ls_status If key = KeyEnter! Then // keybd_event ( 9, 0, 0 , 0 ) // 按下tab keybd_event ( 9, 0, 2, 0 ) // 释放tab return 1 end if elseif dw_child.GetColumnName( )='u_outwaremx_mxdscrp' and dw_child.getrow()=dw_child.rowcount() then parent.triggerevent("insert_childrow") return 1 else If key = KeyEnter! Then // keybd_event ( 9, 0, 0 , 0 ) // 按下tab keybd_event ( 9, 0, 2, 0 ) // 释放tab return 1 end if end if end if end if end if end event type cb_viewprint from w_publ_1ton_share_detail`cb_viewprint within w_outware_gj end type type cb_print from w_publ_1ton_share_detail`cb_print within w_outware_gj end type type cb_add from w_publ_1ton_share_detail`cb_add within w_outware_gj end type event cb_add::clicked;IF NOT f_power_ind(84) THEN MessageBox('提示','你没有使用权限!', Information!, OK! ) RETURN END IF String arg_msg = '' Long uc_row,i IF dw_edit_mode THEN dw_uc.AcceptText() dw_child.AcceptText() uc_row = dw_uc.GetRow() IF uc_row <= 0 THEN MessageBox('提示','请选定当前目标单据!', Information!, OK! ) RETURN END IF IF NOT dw_uc.Object.u_outware_outdate[uc_row] > DateTime(2000-01-01,Now()) THEN MessageBox('提示','不合理发生时间', Information!, OK! ) dw_uc.SetFocus() dw_uc.SetColumn("u_outware_outdate") RETURN END IF IF NOT Len(String(dw_uc.Object.u_outware_outrep[uc_row])) > 0 THEN MessageBox('提示','请填写经手人', Information!, OK! ) dw_uc.SetFocus() dw_uc.SetColumn("u_outware_outrep") RETURN END IF IF dw_uc.Object.u_outware_cusid[uc_row] = 0 THEN MessageBox('提示','请选择员工', Information!, OK! ) dw_uc.SetFocus() dw_uc.SetColumn("u_rs_empinfo_empcode") RETURN END IF IF dw_uc.Object.storageid[uc_row] = 0 THEN MessageBox('提示','请选择仓库', Information!, OK! ) dw_uc.SetFocus() dw_uc.SetColumn("storageid") RETURN END IF uo_ware.outdate = dw_uc.Object.u_outware_outdate[uc_row] // 发生时间 uo_ware.outrep = dw_uc.Object.u_outware_outrep[uc_row] // 经手人 uo_ware.part = dw_uc.Object.u_outware_part[uc_row] //相关部门 uo_ware.dscrp = dw_uc.Object.u_outware_dscrp[uc_row] //备注 uo_ware.cusid = dw_uc.Object.u_outware_cusid[uc_row] uo_ware.relid = dw_uc.Object.u_outware_relid[uc_row] uo_ware.storageid = dw_uc.Object.storageid[uc_row] FOR i = 1 TO dw_child.RowCount() IF dw_child.Object.u_outwaremx_mtrlwareid[i] > 0 THEN IF uo_ware.acceptmx(dw_child.Object.u_outwaremx_mtrlwareid[i],& dw_child.Object.u_outwaremx_qty[i],0,& dw_child.Object.u_outwaremx_fprice[i],& dw_child.Object.u_outwaremx_rebate[i],& dw_child.Object.u_outwaremx_mxdscrp[i],& dw_child.Object.printid[i],& arg_msg,0,0,0,0,0,0,0,dw_child.Object.u_mtrldef_unit[i],1,'','') = 0 THEN MessageBox('Error!',arg_msg) RETURN END IF END IF NEXT IF uo_ware.Save(TRUE,arg_msg) = 0 THEN MessageBox('错误',arg_msg, StopSign!, OK! ) RETURN END IF // MessageBox('提示','保存操作成功!') //write ini f_SetProfileString (sys_empid,dw_uc.DataObject, "ddlb_storageid",String(dw_uc.Object.storageid[dw_uc.GetRow()])) f_SetProfileString (sys_empid,dw_uc.DataObject, "ddlb_wageid",String(dw_uc.Object.u_outware_relid[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(cur_scid,uo_ware.outwareid) ELSE IF uo_ware.newbegin(cur_scid,10,arg_msg) = 0 THEN MessageBox('错误',arg_msg, StopSign!, OK! ) RETURN END IF END IF CALL SUPER::Clicked //read ini IF dw_edit_mode THEN PARENT.TriggerEvent("insert_childrow") dw_uc.SetRedraw(FALSE) String ls_wageid ls_wageid = f_ProfileString (sys_empid,dw_uc.DataObject, "ddlb_wageid",'0') dw_uc.Object.u_outware_relid[dw_uc.GetRow()] = Long(ls_wageid) String ls_storageid ls_storageid = f_ProfileString (sys_empid,dw_uc.DataObject, "ddlb_storageid",'0') IF f_find_storageid(ls_storageid) = '' THEN ls_storageid = '0' END IF dw_uc.Object.storageid[dw_uc.GetRow()] = Long(ls_storageid) dw_uc.SetColumn("storageid") dw_uc.SetRedraw(TRUE) ELSE PARENT.TriggerEvent("retrieve_childdw") END IF // end event type cb_edit from w_publ_1ton_share_detail`cb_edit within w_outware_gj end type event cb_edit::clicked;if not f_power_ind(84) 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_ware.updatebegin(cur_scid,dw_pageretr.object.u_outware_outwareid[uc_row],10,arg_msg)=0 then messagebox('错误',arg_msg, StopSign!, OK! ) return end if end if call super::clicked end event type cb_delet from w_publ_1ton_share_detail`cb_delet within w_outware_gj end type event cb_delet::clicked;if not f_power_ind(596) 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 ("询问","是否确定要删除当前单据吗?",Question!,YesNo! ) = 2 THEN RETURN if uo_ware.del(cur_scid,dw_pageretr.object.u_outware_outwareid[uc_row],arg_msg,true)=0 then messagebox('错误',arg_msg, StopSign!, OK! ) ELSE //日志 long ls_id string ls_code ls_id=dw_pageretr.object.u_outware_outwareid[uc_row] ls_code=dw_pageretr.object.u_outware_outwarecode[uc_row] f_setsysoplog('扣费品单','删除,ID:'+string(LS_id)+',code:'+ls_code,arg_msg,true) //-- MESSAGEBOX('提示','删除单据'+string(dw_pageretr.object.u_outware_outwarecode[uc_row])+'成功!', Information!, OK! ) dw_pageretr.deleterow(uc_row) dw_pageretr.postevent(rowfocuschanged!) end if end event type cb_addzy from w_publ_1ton_share_detail`cb_addzy within w_outware_gj 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_gzaudit" menustr=menustr + "|" + "Text=工资撤审~tEvent=ue_gzcaudit" menustr = menustr + "|" + "Text=-" menustr = menustr + "|" + "Text=复制单据~tEvent=ue_bill_copy" menustr = menustr + "|" + "Text=粘贴单据~tEvent=ue_bill_paste" 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_outware_gj end type event cb_auditing::clicked;IF NOT f_power_ind(85) THEN MessageBox('提示','你没有使用权限!', Information!, OK! ) RETURN END IF IF dw_edit_mode THEN RETURN String arg_msg = '' Long pagerert_row pagerert_row = dw_pageretr.GetRow() IF pagerert_row <= 0 THEN MessageBox('提示','请选定当前目标单据!', Information!, OK! ) RETURN END IF IF dw_pageretr.Object.flag[pagerert_row] = 1 THEN RETURN IF MessageBox ("询问","是否确定要审核当前单据吗?",question!,yesno! ) = 2 THEN RETURN IF uo_ware.getinfo(cur_scid,dw_pageretr.Object.u_outware_outwareid[pagerert_row],arg_msg) = 0 THEN MessageBox('错误',arg_msg, StopSign!, OK! ) RETURN END IF IF uo_ware.auditing(TRUE,arg_msg) = 0 THEN MessageBox('错误',arg_msg, StopSign!, OK! ) ELSE MessageBox('提示','仓库审核成功!', Information!, OK! ) wf_refresh_curuc(cur_scid,dw_pageretr.Object.u_outware_outwareid[pagerert_row]) END IF end event type cb_xm from w_publ_1ton_share_detail`cb_xm within w_outware_gj end type type cb_retrieve from w_publ_1ton_share_detail`cb_retrieve within w_outware_gj end type type cb_xls from w_publ_1ton_share_detail`cb_xls within w_outware_gj end type type cb_help from w_publ_1ton_share_detail`cb_help within w_outware_gj end type type cb_auditing_cancel from w_publ_1ton_share_detail`cb_auditing_cancel within w_outware_gj end type event cb_auditing_cancel::clicked;call super::clicked;IF NOT f_power_ind(906) THEN MessageBox('提示','你没有使用权限!', Information!, OK! ) RETURN END IF IF dw_edit_mode THEN RETURN String arg_msg = '' Long pagerert_row pagerert_row = dw_pageretr.GetRow() IF pagerert_row <= 0 THEN MessageBox('提示','请选定当前目标单据!', Information!, OK! ) RETURN END IF IF dw_pageretr.Object.flag[pagerert_row] = 0 THEN RETURN IF dw_pageretr.Object.u_outware_secflag[pagerert_row] = 1 THEN RETURN IF MessageBox ("询问","是否确定要撤消审核当前单据吗?",Question!,YesNo! ) = 2 THEN RETURN IF uo_ware.getinfo(cur_scid,dw_pageretr.Object.u_outware_outwareid[pagerert_row],arg_msg) = 0 THEN MessageBox('错误',arg_msg, StopSign!, OK! ) RETURN END IF IF uo_ware.c_auditing(TRUE,arg_msg) = 0 THEN MessageBox('错误',arg_msg, StopSign!, OK! ) ELSE //日志 String ls_code,ls_opemp,ls_outpart ls_code = dw_pageretr.Object.u_outware_outwarecode[pagerert_row] ls_opemp = dw_pageretr.Object.u_outware_opemp[pagerert_row] ls_outpart = dw_pageretr.Object.u_outware_part[pagerert_row] f_setsysoplog('扣费品单单','仓库撤审'+',code:'+ls_code+',相关号码:'+ls_outpart+',建立人:'+ls_opemp,arg_msg,TRUE) //-- MessageBox('提示','撤消审核成功!', Information!, OK! ) wf_refresh_curuc(cur_scid,dw_pageretr.Object.u_outware_outwareid[pagerert_row]) END IF end event type p_msg from w_publ_1ton_share_detail`p_msg within w_outware_gj end type type p_help from w_publ_1ton_share_detail`p_help within w_outware_gj end type type p_encl from w_publ_1ton_share_detail`p_encl within w_outware_gj end type type p_other from w_publ_1ton_share_detail`p_other within w_outware_gj end type type gb_3 from w_publ_1ton_share_detail`gb_3 within w_outware_gj end type type ln_bar from w_publ_1ton_share_detail`ln_bar within w_outware_gj end type type ln_bar2 from w_publ_1ton_share_detail`ln_bar2 within w_outware_gj end type type r_bar from w_publ_1ton_share_detail`r_bar within w_outware_gj end type type ln_1 from w_publ_1ton_share_detail`ln_1 within w_outware_gj integer beginx = -261 integer endx = 2990 end type type ln_2 from w_publ_1ton_share_detail`ln_2 within w_outware_gj integer beginx = -279 integer endx = 3003 end type type ddlb_scid from uo_ddlb_scid within w_outware_gj integer x = 1079 integer y = 188 integer width = 549 integer height = 960 integer taborder = 20 boolean bringtotop = true end type event selectionchanged;call super::selectionchanged;cur_scid=this.uo_scid parent.triggerevent("retrieve_pageretr") end event event constructor;call super::constructor;cur_scid=this.uo_scid end event type st_3 from statictext within w_outware_gj integer x = 1678 integer y = 208 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 type st_2 from statictext within w_outware_gj integer x = 905 integer y = 200 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 type ddlb_status from dropdownlistbox within w_outware_gj integer x = 1851 integer y = 188 integer width = 549 integer height = 552 integer taborder = 40 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 cur_secflag= -1 elseif index=2 then cur_flag= 0 cur_secflag= -1 elseif index=3 then cur_flag= 1 cur_secflag= 0 elseif index=4 then cur_flag= 1 cur_secflag= 1 end if parent.triggerevent('retrieve_pageretr') end event type cb_fj from uo_imflatbutton within w_outware_gj integer y = 188 integer width = 96 integer height = 84 integer taborder = 50 boolean bringtotop = true string text = "" string normalpicname = "fj.bmp" integer picsize = 17 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;PARENT.TriggerEvent( 'ue_fj_view') end event