$PBExportHeader$uo_abnormity.sru forward global type uo_abnormity from nonvisualobject end type type s_abnormitymx from structure within uo_abnormity end type end forward type s_abnormitymx from structure long empid string empcode string empname decimal { 5 } amount decimal { 5 } wage string mxdscrp long printid string relcode long proid string procode string proname decimal { 5 } workhour end type global type uo_abnormity from nonvisualobject end type global uo_abnormity uo_abnormity type variables public protectedwrite long billid //计件单自动增量id public protectedwrite long wagemth //工资月份 public protectedwrite string billcode //计件单的唯一编号 public protectedwrite datetime opdate //建立时间,自动 public protectedwrite string opemp //建立人 public protectedwrite datetime moddate //修改时间,自动 public protectedwrite string modemp //修改人 public protectedwrite int flag=0 //审核标志 public protectedwrite int secflag=0 //审核标志 public protectedwrite datetime auditingdate //审核时间 public protectedwrite string auditingrep //审核操作员 datetime billdate //计件日期 long wageid //工资项目id string dscrp='' //备注 string relcode ='' //相关号码  long relid uo_wage u_wage private: s_abnormitymx abnormitymx[] //明细结构数组 long it_mxbt=0 //明细结构数组末指针 boolean it_newbegin=false //新建标志 boolean it_updatebegin=false//修改标志 end variables forward prototypes public function integer p_clearmx () public function integer p_reset () public function integer newbegin (ref string arg_msg) public function integer updatebegin (long arg_billid, ref string arg_msg) public function integer c_auditing (long arg_wageid, long arg_wagemth, ref string arg_msg, boolean arg_ifcommit) public function integer save (ref string arg_msg, boolean arg_ifcommit) public function integer del (long arg_billid, ref string arg_msg) public function integer add_dscrp (long arg_billid, string arg_newdescppart, ref string arg_msg) public function integer auditing (long arg_wageid, long arg_wagemth, datetime arg_enddate, ref string arg_msg, boolean arg_ifcommit) public function integer secauditing (long arg_billid, ref string arg_msg, boolean arg_ifcommit) public function integer c_secauditing (long arg_billid, ref string arg_msg, boolean arg_ifcommit) public function integer acceptmx (long arg_empid, string arg_empcode, string arg_empname, decimal arg_amount, decimal arg_wage, string arg_mxdscrp, ref string arg_msg, long arg_printid, string arg_relcode, long arg_proid, string arg_procode, string arg_proname, decimal arg_workhour) end prototypes public function integer p_clearmx ();//INT p_clearmx() //清除明细 it_mxbt=0 RETURN 1 end function public function integer p_reset ();//INT p_RESET() //清除对象及其明细 billid=0 billcode='' opemp='' auditingrep='' flag=0 wageid=0 dscrp='' relcode='' it_newbegin=FALSE it_updatebegin=FALSE //清除明细 P_CLEARMX() RETURN 1 end function public function integer newbegin (ref string arg_msg);p_reset() it_newbegin=TRUE it_updatebegin=FALSE return 1 end function public function integer updatebegin (long arg_billid, ref string arg_msg);//==================================================================== // Function: updatebegin(arg_billid,arg_msg) //-------------------------------------------------------------------- // Description: //-------------------------------------------------------------------- // Arguments: // value long arg_billid // reference string arg_msg //-------------------------------------------------------------------- // Returns: integer //-------------------------------------------------------------------- // Author: yyx Date: 2003.11.21 //-------------------------------------------------------------------- // Modify History: // //==================================================================== int rslt = 1 if arg_billid <= 0 then billid = 0 goto ext end if select u_sc_abnormity.billcode, u_sc_abnormity.wagemth, u_sc_abnormity.wageid, u_sc_abnormity.billdate, u_sc_abnormity.dscrp, u_sc_abnormity.auditingflag, u_sc_abnormity.secauditingflag into :billcode, :wagemth, :wageid, :billdate, :dscrp, :flag, :secflag from u_sc_abnormity where u_sc_abnormity.billid = :arg_billid; if sqlca.sqlcode <> 0 then rslt = 0 if pos(lower(sqlca.SQLErrText),'more than') > 0 then arg_msg = '查询操作失败,查询数据返回值多于一个' else arg_msg = '查询数据操作失败(错误单据唯一码)' end if goto ext end if if secflag = 1 then rslt = 0 arg_msg = '单据已经确认,不可以修改' goto ext end if if flag = 1 then rslt = 0 arg_msg = '单据已经审核,不可以修改' goto ext end if billid = arg_billid p_clearmx() it_newbegin = false it_updatebegin = true ext: if rslt = 0 then p_reset() arg_msg = '计件单,'+ arg_msg return rslt end function public function integer c_auditing (long arg_wageid, long arg_wagemth, ref string arg_msg, boolean arg_ifcommit); long cnt=0,i int rslt=1 datetime null_server_dt setnull(null_server_dt) select count(*) into :cnt from u_sc_abnormity where wagemth=:arg_wagemth and Auditingflag=1; if sqlca.sqlcode<>0 then rslt=0 arg_msg='查询计件单明细失败' goto ext end if if cnt=0 then rslt=0 arg_msg='该月的计件单未审核,不用撤审!' goto ext end if select count(*) into :cnt from u_gz_wage where wagemth=:arg_wagemth and Auditingflag=1; if sqlca.sqlcode<>0 then rslt=0 arg_msg='查询工资表失败' goto ext end if if cnt>0 then rslt=0 arg_msg='该月的工资表已审核,不能撤审!' goto ext end if cnt=0 select count(*) into :cnt from u_gz_wageitem where useflag=1 and wageid=:arg_wageid; if sqlca.sqlcode<>0 then rslt=0 arg_msg='查询工资项目失败' goto ext end if if cnt=0 then rslt=0 arg_msg='不存在该工资项目' goto ext end if update u_sc_abnormity set Auditingflag=0, Auditingemp='', Auditingdate=:null_server_dt, wagemth=0 where wagemth=:arg_wagemth and Auditingflag=1 and wageid=:arg_wageid; if sqlca.sqlcode<>0 then ARG_msg='更新计件明细单失败' rslt=0 goto ext end if update u_gz_wagemx set wageamt=0 where wageid=:arg_wageid and wagemth=:arg_wagemth; if sqlca.sqlcode<>0 then rslt=0 arg_Msg='更新工资表失败!' goto ext end if ext: if rslt=0 then rollback; elseif rslt=1 and arg_ifcommit then commit; end if arg_msg = '计件单,'+ arg_msg return rslt end function public function integer save (ref string arg_msg, boolean arg_ifcommit);//==================================================================== // Function: save(arg_msg,arg_ifcommit) //-------------------------------------------------------------------- // Description: //-------------------------------------------------------------------- // Arguments: // reference string arg_msg // value boolean arg_ifcommit //-------------------------------------------------------------------- // Returns: integer //-------------------------------------------------------------------- // Author: yyx Date: 2003.11.21 //-------------------------------------------------------------------- // Modify History: // //==================================================================== Integer rslt = 1,i,cnt = 0 DateTime server_dt Long ls_newid IF IsNull(wageid) THEN wageid = 0 IF IsNull(dscrp) THEN dscrp = '' IF IsNull(relcode) THEN relcode = '' IF IsNull(relid) THEN relid = 0 IF it_newbegin = FALSE AND it_updatebegin = FALSE THEN rslt = 0 arg_msg = "非编辑状态不可以提交" GOTO ext END IF SELECT Top 1 getdate() INTO :server_dt FROM u_user; //取得系统时间,借用操作员表 IF sqlca.SQLCode <> 0 THEN rslt = 0 arg_msg = "查询操作失败,日期 " GOTO ext END IF IF it_mxbt = 0 THEN // rslt = 0 arg_msg = "没有计件明细" GOTO ext END IF IF Year(Date(billdate)) < 2000 OR IsNull(billdate) THEN rslt = 0 arg_msg = "缺少计件时间或不合理" GOTO ext END IF ////////////////////////////////////////////////开始区分:新建/更新 处理 IF billid = 0 THEN //新建 ls_newid = f_sys_scidentity(0,"u_sc_abnormity","billid",arg_msg,TRUE,sqlca) IF ls_newid <= 0 THEN rslt = 0 GOTO ext END IF billcode = getid(0,"YC",Date(server_dt),TRUE,sqlca) //取得新单据编号 IF billcode = "err" THEN billcode = '' rslt = 0 arg_msg = "无法获取计件单编号" GOTO ext END IF INSERT INTO u_sc_abnormity ( billid, billcode, Wagemth, wageid, billdate, Dscrp, opdate, opemp, relcode, relid) VALUES ( :ls_newid, :billcode, :Wagemth, :wageid, :billdate, :dscrp, :server_dt, :publ_operator, :relcode, :relid); IF sqlca.SQLCode <> 0 THEN rslt = 0 if pos(lower(sqlca.SQLErrText),'pk_u_sc_abnormity') > 0 then arg_msg = '插入操作失败,关键字单据ID重复' elseif pos(lower(sqlca.SQLErrText),'ix_u_sc_abnormity') > 0 then arg_msg = '插入操作失败,单据编号重复' else arg_msg = "因网络或其它原因导致插入操作失败>>"+"~n"+sqlca.SQLErrText end if GOTO ext END IF billid = ls_newid FOR i = 1 TO it_mxbt INSERT INTO u_sc_abnormitymx ( billid, empid, empcode, empname, amount, wage, mxdscrp, printid, relcode, proid, procode, proname, workhour) VALUES (:ls_newid, :abnormitymx[i].empid, :abnormitymx[i].empcode, :abnormitymx[i].empname, :abnormitymx[i].amount, :abnormitymx[i].wage, :abnormitymx[i].mxdscrp, :abnormitymx[i].printid, :abnormitymx[i].relcode, :abnormitymx[i].proid, :abnormitymx[i].procode, :abnormitymx[i].proname, :abnormitymx[i].workhour); IF sqlca.SQLCode <> 0 THEN billid = 0 //还原noticeid rslt = 0 if pos(lower(sqlca.SQLErrText),'pk_u_sc_abnormitymx') > 0 then arg_msg = '插入明细操作失败,关键字分部ID、单据ID、明细ID重复' else arg_msg = "因网络或其它原因导致插入明细操作失败"+"~n"+sqlca.SQLErrText end if ROLLBACK ; GOTO ext END IF NEXT ELSE //////////////////////////////////////////////////更新 UPDATE u_sc_abnormity SET wageid = :wageid, billdate = :billdate, Dscrp = :Dscrp, moddate = :server_dt, modemp = :publ_operator, relcode = :relcode, relid = :relid WHERE u_sc_abnormity.billid = :billid AND Auditingflag = 0; IF sqlca.SQLCode <> 0 OR sqlca.SQLNRows <= 0 THEN rslt = 0 if pos(lower(sqlca.SQLErrText),'pk_u_sc_abnormity') > 0 then arg_msg = '插入操作失败,关键字单据ID重复' elseif pos(lower(sqlca.SQLErrText),'ix_u_sc_abnormity') > 0 then arg_msg = '插入操作失败,单据编号重复' else arg_msg = "因网络或其它原因导致插入操作失败>>"+"~n"+sqlca.SQLErrText end if GOTO ext END IF //删除原有明细 DELETE FROM u_sc_abnormitymx Where u_sc_abnormitymx.billid = :billid; IF sqlca.SQLCode <> 0 THEN rslt = 0 arg_msg = "删除旧有明细操作失败"+"~n"+sqlca.SQLErrText GOTO ext END IF FOR i = 1 TO it_mxbt INSERT INTO u_sc_abnormitymx ( billid, empid, empcode, empname, amount, wage, mxdscrp, printid, relcode, proid, procode, proname, workhour) VALUES (:billid, :abnormitymx[i].empid, :abnormitymx[i].empcode, :abnormitymx[i].empname, :abnormitymx[i].amount, :abnormitymx[i].wage, :abnormitymx[i].mxdscrp, :abnormitymx[i].printid, :abnormitymx[i].relcode, :abnormitymx[i].proid, :abnormitymx[i].procode, :abnormitymx[i].proname, :abnormitymx[i].workhour); IF sqlca.SQLCode <> 0 THEN rslt = 0 if pos(lower(sqlca.SQLErrText),'PK_u_sc_abnormitymx') > 0 then arg_msg = '插入明细操作失败,关键字分部ID、单据ID、明细ID重复' else arg_msg = "因网络或其它原因导致插入明细操作失败"+"~n"+sqlca.SQLErrText end if GOTO ext END IF NEXT END IF it_newbegin = FALSE it_updatebegin = FALSE ext: IF rslt = 0 THEN ROLLBACK; p_clearmx() ELSEIF rslt = 1 AND arg_ifcommit THEN COMMIT; END IF arg_msg = '计件单,'+ arg_msg RETURN(rslt) end function public function integer del (long arg_billid, ref string arg_msg);//==================================================================== // Function: del(arg_billid,arg_msg) //-------------------------------------------------------------------- // Description: //-------------------------------------------------------------------- // Arguments: // value long arg_billid // reference string arg_msg //-------------------------------------------------------------------- // Returns: integer //-------------------------------------------------------------------- // Author: yyx Date: 2003.11.21 //-------------------------------------------------------------------- // Modify History: // //==================================================================== int rslt = 1 if arg_billid <= 0 then rslt = 0 arg_msg = "没有删除对象,操作取消" goto ext end if if it_newbegin or it_updatebegin then rslt=0 arg_msg="编辑状态下不可以执行,操作取消" goto ext end if select u_sc_abnormity.auditingflag into :flag from u_sc_abnormity where u_sc_abnormity.billid = :arg_billid; if sqlca.sqlcode <> 0 then rslt = 0 if pos(lower(sqlca.SQLErrText),'more than') > 0 then arg_msg = '查询操作失败,查询数据返回值多于一个' else arg_msg = '查询计件单操作失败(错误单据唯一码)' end if goto ext end if if flag = 1 then rslt = 0 arg_msg = "单据已经审核,不可以删除" goto ext end if delete from u_sc_abnormity where u_sc_abnormity.billid = :arg_billid; if sqlca.sqlcode <> 0 then rslt = 0 arg_msg = "删除计件单操作失败" goto ext end if delete from u_sc_abnormitymx where u_sc_abnormitymx.billid = :arg_billid; if sqlca.sqlcode <> 0 then rslt = 0 arg_msg = "删除计件单明细操作失败" goto ext end if commit; it_newbegin = false it_updatebegin = false if rslt = 0 then rollback; p_reset() end if ext: arg_msg = '计件单,'+ arg_msg return (rslt) end function public function integer add_dscrp (long arg_billid, string arg_newdescppart, ref string arg_msg);//==================================================================== // Function: add_dscrp(arg_billid,arg_newdescppart,arg_msg) //-------------------------------------------------------------------- // Description: //-------------------------------------------------------------------- // Arguments: // value long arg_billid // value string arg_newdescppart // reference string arg_msg //-------------------------------------------------------------------- // Returns: integer //-------------------------------------------------------------------- // Author: yyx Date: 2003.11.21 //-------------------------------------------------------------------- // Modify History: // //==================================================================== int rslt = 1 arg_newdescppart = trim(arg_newdescppart) if arg_billid <= 0 then rslt = 0 arg_msg = "没有删除对象,操作取消" goto ext end if if it_newbegin or it_updatebegin then rslt=0 arg_msg="编辑状态下不可以执行,操作取消" goto ext end if select u_sc_abnormity.auditingflag into :flag from u_sc_abnormity where u_sc_abnormity.billid = :arg_billid; if sqlca.sqlcode <> 0 then rslt = 0 if pos(lower(sqlca.SQLErrText),'more than') > 0 then arg_msg = '查询操作失败,查询数据返回值多于一个' else arg_msg = '查询计件单操作失败,(错误单据唯一码)' end if goto ext end if if flag = 0 then rslt = 0 arg_msg = "非审核状态下不可用" goto ext end if update u_sc_abnormity set dscrp = dscrp+' '+:arg_newdescppart where u_sc_abnormity.billid = :billid; if sqlca.sqlcode <> 0 then rollback ; rslt = 0 arg_msg = "因网络或其它原因导致添加单据备注操作失败"+"~n"+sqlca.sqlerrtext goto ext end if commit; dscrp = dscrp+' '+arg_newdescppart ext: arg_msg = '计件单,'+ arg_msg return (rslt) end function public function integer auditing (long arg_wageid, long arg_wagemth, datetime arg_enddate, ref string arg_msg, boolean arg_ifcommit);//==================================================================== // Function: auditing(arg_wageid,arg_wagemth,arg_enddate,arg_msg,arg_ifcommit) //-------------------------------------------------------------------- // Description: //-------------------------------------------------------------------- // Arguments: // value long arg_wageid // value long arg_wagemth // value datetime arg_enddate // reference string arg_msg // value boolean arg_ifcommit //-------------------------------------------------------------------- // Returns: integer //-------------------------------------------------------------------- // Author: yyx Date: 2003.11.22 //-------------------------------------------------------------------- // Modify History: // //==================================================================== long cnt=0,i int rslt=1 decimal ls_emp_sumwage datastore ds_emp_sumabnormitywage cnt=0 select count(*) into :cnt from u_sc_abnormity where wagemth=:arg_wagemth and wageid = :arg_wageid and Auditingflag = 1; if sqlca.sqlcode<>0 then rslt=0 arg_msg='查询计件单明细失败!' goto ext end if if cnt > 0 then rslt=0 arg_msg='该月的计件单已审核,审核前请先执行撤审!' goto ext end if cnt=0 select count(*) into :cnt from u_gz_wageitem where useflag=1 and wageid=:arg_wageid; if sqlca.sqlcode<>0 then rslt=0 arg_msg='查询工资项目失败!' goto ext end if if cnt=0 then rslt=0 arg_msg='不存在该工资项目!' goto ext end if ds_emp_sumabnormitywage=create datastore ds_emp_sumabnormitywage.dataobject='dw_emp_sumabnormitywage' ds_emp_sumabnormitywage.settransobject(sqlca) if ds_emp_sumabnormitywage.retrieve(arg_enddate,arg_wageid)=0 then rslt=0 arg_msg='本月没有计件单可审核' goto ext end if for i= 1 to ds_emp_sumabnormitywage.rowcount() ls_emp_sumwage=0.00 ls_emp_sumwage=ds_emp_sumabnormitywage.object.sumwage[i] if u_wage.f_setwagemxdata(arg_wagemth,ds_emp_sumabnormitywage.object.u_sc_abnormitymx_empid[i],arg_wageid,ls_emp_sumwage,arg_msg,false)=0 then rslt=0 goto ext end if next update u_sc_abnormity set Auditingflag=1, Auditingemp=:publ_operator, Auditingdate=getdate(), wagemth=:arg_wagemth where billdate<=:arg_enddate and wageid=:arg_wageid and Auditingflag=0; if sqlca.sqlcode<>0 then ARG_msg='更新计件单失败' rslt=0 goto ext end if ext: if rslt=0 then rollback; elseif rslt=1 and arg_ifcommit then commit; end if arg_msg = '计件单,'+ arg_msg return rslt end function public function integer secauditing (long arg_billid, ref string arg_msg, boolean arg_ifcommit);int rslt = 1,li_secauditingflag if arg_billid = 0 then rslt = 0 arg_msg = "没有确认对象" goto ext end if select secauditingflag into :li_secauditingflag from u_sc_abnormity where billid = :arg_billid; if sqlca.sqlcode <> 0 then rslt = 0 arg_msg = '查询异常计件单资料失败' goto ext end if if li_secauditingflag = 1 then rslt = 0 arg_msg = '该单据已确认' goto ext end if update u_sc_abnormity set secauditingemp = :publ_operator, secauditingdate = getdate(), secauditingflag = 1 where u_sc_abnormity.billid = :arg_billid and secauditingflag = 0; if sqlca.sqlcode <> 0 then rslt = 0 arg_msg = "因网络或其它原因导致审核单据操作失败"+"~n"+sqlca.sqlerrtext goto ext elseif sqlca.sqlnrows = 0 then rslt = 0 arg_msg = "单据正在确认,请稍后查询。" goto ext end if ext: if rslt = 0 then rollback; elseif rslt = 1 and arg_ifcommit then commit; end if arg_msg = '计件单,'+ arg_msg return rslt end function public function integer c_secauditing (long arg_billid, ref string arg_msg, boolean arg_ifcommit);int rslt = 1,li_secauditingflag datetime null_dt setnull(null_dt) if arg_billid = 0 then rslt = 0 arg_msg = "没有审核对象" goto ext end if select secauditingflag into :li_secauditingflag from u_sc_abnormity where billid = :arg_billid; if sqlca.sqlcode <> 0 then rslt = 0 arg_msg = '查询异常计件单资料失败' goto ext end if if li_secauditingflag = 0 then rslt = 0 arg_msg = '该单据未确认,不能反确认' goto ext end if update u_sc_abnormity set secauditingemp = '', secauditingdate = :null_dt, secauditingflag = 0 where u_sc_abnormity.billid = :arg_billid and secauditingflag = 1; if sqlca.sqlcode <> 0 then rslt = 0 arg_msg = "因网络或其它原因导致反确认单据操作失败"+"~n"+sqlca.sqlerrtext goto ext elseif sqlca.sqlnrows = 0 then rslt = 0 arg_msg = "单据正在反确认,请稍后查询。" goto ext end if ext: if rslt = 0 then rollback; elseif rslt = 1 and arg_ifcommit then commit; end if arg_msg = '计件单,'+ arg_msg return rslt end function public function integer acceptmx (long arg_empid, string arg_empcode, string arg_empname, decimal arg_amount, decimal arg_wage, string arg_mxdscrp, ref string arg_msg, long arg_printid, string arg_relcode, long arg_proid, string arg_procode, string arg_proname, decimal arg_workhour);//==================================================================== // Function: acceptmx(arg_empid,arg_empcode,arg_empname,arg_Start_date,arg_End_date,arg_amount,arg_wage,arg_workhour,arg_mxdscrp,arg_msg,arg_printid) //-------------------------------------------------------------------- // Description: //-------------------------------------------------------------------- // Arguments: // value long arg_empid // value string arg_empcode // value string arg_empname // value decimal arg_amount // value decimal arg_wage // value string arg_mxdscrp // reference string arg_msg // value long arg_printid // value string arg_relcode //-------------------------------------------------------------------- // Returns: intege //-------------------------------------------------------------------- // Author: yyx Date: 2003.11.21 //-------------------------------------------------------------------- // Modify History: // //==================================================================== long rslt = 1,cnt = 0,ls_i string ls_empname,ls_empcode string ls_procode,ls_proname if it_newbegin = false and it_updatebegin = false then rslt = 0 arg_msg = "非编辑状态不可以使用,操作取消" goto ext end if if isnull(arg_empid) then arg_empid = 0 if isnull(arg_empcode) then arg_empcode = '' if isnull(arg_empname) then arg_empname = '' if isnull(arg_relcode) then arg_relcode = '' if isnull(arg_amount) then arg_amount = 0 if isnull(arg_wage) then arg_wage = 0 if isnull(arg_mxdscrp) then arg_mxdscrp = '' if isnull(arg_proid) then arg_proid = 0 if isnull(arg_procode) then arg_procode = '' if isnull(arg_proname) then arg_proname = '' if isnull(arg_workhour) then arg_workhour = 0 if arg_wage = 0 then rslt = 1 goto ext end if if isnull(arg_empcode) or trim(arg_empcode) = '' then rslt = 0 arg_msg = '人员编号不能为空' goto ext end if if isnull(arg_procode) or trim(arg_procode) = '' then rslt = 0 arg_msg = '工序号不能为空' goto ext end if if arg_amount < 0 or arg_workhour < 0 then //检查生产数量 rslt = 0 arg_msg = "数量或工时错误" goto ext end if select empcode,empname into :ls_empcode,:ls_empname from u_rs_empinfo where empid = :arg_empid; if sqlca.sqlcode <> 0 then rslt = 0 if pos(lower(sqlca.SQLErrText),'more than') > 0 then arg_msg = '查询操作失败,查询数据返回值多于一个' else arg_msg = '查询人员资料失败。(错误员工资料唯一码)' end if goto ext end if if ls_empname <> arg_empname or ls_empcode <> arg_empcode then rslt = 0 arg_msg = arg_empname+'>>该人员的编号或名称不正确。' goto ext end if select code,name into :ls_procode,:ls_proname from u_sc_workprocedure where proid = :arg_proid; if sqlca.sqlcode <> 0 then rslt = 0 if pos(lower(sqlca.SQLErrText),'more than') > 0 then arg_msg = '查询操作失败,查询数据返回值多于一个' else arg_msg = '查询工序定义失败。(错误工序资料唯一码)' end if goto ext end if if ls_procode <> arg_procode or ls_proname <> arg_proname then rslt = 0 arg_msg = arg_empname+'>>该工序号或名称不正确。' goto ext end if //写入内容 it_mxbt++ abnormitymx[it_mxbt].empid = arg_empid abnormitymx[it_mxbt].empcode = arg_empcode abnormitymx[it_mxbt].empname = arg_empname abnormitymx[it_mxbt].amount = arg_amount abnormitymx[it_mxbt].wage = arg_wage abnormitymx[it_mxbt].mxdscrp = arg_mxdscrp abnormitymx[it_mxbt].printid = arg_printid abnormitymx[it_mxbt].relcode = arg_relcode abnormitymx[it_mxbt].proid = arg_proid abnormitymx[it_mxbt].procode = arg_procode abnormitymx[it_mxbt].proname = arg_proname abnormitymx[it_mxbt].workhour= arg_workhour ext: if rslt = 0 then p_clearmx() arg_msg = '计件单,'+ arg_msg return(rslt) end function on uo_abnormity.create call super::create TriggerEvent( this, "constructor" ) end on on uo_abnormity.destroy TriggerEvent( this, "destructor" ) call super::destroy end on event constructor; u_wage=create uo_wage end event event destructor;DESTROY u_wage end event