1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480 |
- $PBExportHeader$w_oppose_spt.srw
- forward
- global type w_oppose_spt from w_publ_1ton_share_detail
- end type
- type ddlb_status from dropdownlistbox within w_oppose_spt
- end type
- type st_2 from statictext within w_oppose_spt
- end type
- end forward
- global type w_oppose_spt from w_publ_1ton_share_detail
- integer height = 2300
- string title = "供应商投诉单"
- boolean maxbox = true
- windowstate windowstate = maximized!
- event insert_childrow ( )
- event insert_childrow1 ( )
- event ue_fj_edit ( )
- event ue_fj_view ( )
- ddlb_status ddlb_status
- st_2 st_2
- end type
- global w_oppose_spt w_oppose_spt
- type variables
- int cur_flag=-1
- uo_oppose uo_ware
- 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)
- public function integer wf_print_retrievedata (ref s_print_pic_list arg_s_pic, 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_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 = 406 //采购订单的mainID
- s_pic.f_string = dw_pageretr.Object.billcode[ls_row]
- s_pic.g_long = dw_pageretr.Object.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_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 = 406 //采购订单的mainID
- s_pic.f_string = dw_pageretr.Object.billcode[ls_row]
- s_pic.g_long = dw_pageretr.Object.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);//====================================================================
- // Function: wf_refresh_curuc(arg_scid,arg_inwareid)
- //--------------------------------------------------------------------
- // Description: 刷新dw_pageretr
- //--------------------------------------------------------------------
- // Arguments:
- // value long arg_scid
- // value long arg_inwareid
- //--------------------------------------------------------------------
- // Returns: integer
- //--------------------------------------------------------------------
- // Author: yyx Date: 2003.11.14
- //--------------------------------------------------------------------
- // Modify History:
- //
- //====================================================================
- 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
- datetime billdate
- string opposedept
- string billcode
- datetime opdate
- string opemp
- string modemp
- datetime moddate
- int flag
- datetime Auditingdate
- string Auditingrep
- string threason
- long relid
- string sptcode
- string improveidea
- long printnum_1
- int itemid
-
- SELECT
- u_oppose.billdate,
- u_oppose.opposedept,
- u_oppose.threason,
- u_oppose.relid,
- u_spt.sptcode,
- u_oppose.manageridea,
- u_oppose.billcode,
- u_oppose.opdate,
- u_oppose.opemp,
- u_oppose.moddate,
- u_oppose.modemp,
- u_oppose.flag,
- u_oppose.auditdate,
- u_oppose.auditemp,
- u_oppose.printnum,
- u_oppose.improveidea,
- u_oppose.itemid
- into :billdate,
- :opposedept,
- :threason,
- :relid,
- :sptcode,
- :improveidea,
- :billcode,
- :opdate,
- :opemp,
- :moddate,
- :modemp,
- :flag,
- :auditingdate,
- :auditingrep,
- :printnum_1,
- :improveidea,
- :itemid
- FROM u_oppose LEFT OUTER JOIN u_spt ON u_oppose.relid = u_spt.sptid
- WHERE u_oppose.billid =:arg_billid ;
- if sqlca.sqlcode<>0 then
- messagebox('提示',"查询操作失败(错误单据唯一码)", Information!, OK! )
- return 0
- end if
- dw_pageretr.object.printnum[uc_row]=printnum_1
- dw_pageretr.object.billid[uc_row]=arg_billid
- dw_pageretr.object.opposedept[uc_row]=opposedept
- dw_pageretr.object.threason[uc_row]=threason
- dw_pageretr.object.u_oppose_relid[uc_row]=relid
- dw_pageretr.object.u_spt_sptcode[uc_row]= sptcode
- dw_pageretr.object.improveidea[uc_row]= improveidea
- dw_pageretr.object.billcode[uc_row]= billcode
- dw_pageretr.object.opdate[uc_row]= opdate
- dw_pageretr.object.opemp[uc_row]= opemp
- dw_pageretr.object.moddate[uc_row]= moddate
- dw_pageretr.object.modemp[uc_row]=modemp
- dw_pageretr.object.flag[uc_row]=flag
- dw_pageretr.object.auditdate[uc_row]=auditingdate
- dw_pageretr.object.auditemp[uc_row]=auditingrep
- dw_pageretr.object.u_oppose_itemid[uc_row]=itemid
- 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.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 = 406 //客户投拆单的 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 = 406);
- 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
- public function integer wf_print_retrievedata (ref s_print_pic_list arg_s_pic, ref string arg_msg);Long LS_ROW,ll_id,i,ll_scid
- LS_ROW = dw_pageretr.GetRow()
- IF LS_ROW <= 0 THEN
- arg_msg = '没有目标单据!'
- RETURN 0
- END IF
- //修改点:获取 指定retriev参数
- ll_id = dw_pageretr.Object.#1[LS_ROW]
- ll_scid = 0
- 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
- Long ll_classid
- SELECT classid
- INTO :ll_classid
- FROM u_billpic_fileclass
- Where (billtype = 102);
- 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]
- arg_s_pic.mtrlid[ll_i] = ll_mtrlid
- //取该附件类型中的第一个附件.
- 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
-
- arg_s_pic.path[ll_i] = Pathname
- //记录临时文件位置,本窗口退出后删除
- wf_addlog_tempfilepathname(Pathname)
- END IF
- ELSE
- arg_s_pic.path[ll_i] = ''
- END IF
- ELSE
- arg_s_pic.path[ll_i] = ''
- END IF
- NEXT
- END IF
- RETURN 1
- end function
- on w_oppose_spt.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_oppose_spt.destroy
- call super::destroy
- destroy(this.ddlb_status)
- destroy(this.st_2)
- end on
- 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_uc的dw改左select top 0 并肯不带参数
- dw_pageretr.retrieve(cur_flag,sys_user_spttype)
- IF dw_pageretr.RowCount() > 0 THEN
- dw_pageretr.SetRow(1)
- dw_pageretr.triggerevent(rowfocuschanged!)
- end if
- this.triggerevent('retrieve_childdw')
- this.triggerevent("retrieve_dw1")
- cb_nextpage.Enabled = cb_nextpage_enabled
- cb_retrieveall.Enabled = cb_retrieveall_enabled
- cb_func.Enabled = cb_func_enabled
- 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+'( billcode LIKE "%'+trim(sle_usual_query.text)+'%" )'
- ELSE
- obj_expr=obj_expr+'( 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)
- dw_pageretr.SetRow(1)
- dw_pageretr.triggerevent(rowfocuschanged!)
- 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_oppose.billcode like '%"+trim(sle_usual_query.text)+"%')"
- else
- ls_querystrpart="(u_oppose.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 refresh_interface;call super::refresh_interface;ddlb_status.enabled=not dw_edit_mode
- end event
- event close;call super::close;destroy uo_ware
- wf_del_tempfilepathname()
- end event
- event ue_f8;call super::ue_f8;//用于选择明细内容,被F8[默认]\dw_child.doubleclicked调用
- IF NOT dw_edit_mode THEN RETURN
- Long child_row
- child_row = dw_child.GetRow()
-
- IF NOT IsValid(W_mtrldef_edit) THEN
- s_edit_index_tran s_ch_tran //传递参数使用
- s_ch_tran.if_retrieve_all = FALSE //是否一次RETRIEVE所有行
- s_ch_tran.work_mode = 1 //0-单纯编辑模式 1-选择\编辑模式
- s_ch_tran.arg_pkid = 0 //目标定位PKID (备用)
- s_ch_tran.arg_string_code = '' //查询列(物料编码)部分内容,用于初步筛选
- s_ch_tran.if_select_all = TRUE
- s_ch_tran.b_long = 2
-
- Long chc = 1,ls_j
- dw_child.AcceptText()
- IF dw_child.GetRow() > 0 THEN s_ch_tran.arg_string_code = Trim(dw_child.Object.u_mtrldef_mtrlcode[dw_child.GetRow()])
-
-
- OpenWithParm(W_mtrldef_edit,s_ch_tran)
-
- s_mtrldef_array S_INSCUST
- S_INSCUST = Message.PowerObjectParm
- FOR ls_j = 1 TO UpperBound(S_INSCUST.mtrlid)
- IF S_INSCUST.mtrlid[ls_j] > 0 THEN
- IF dw_child.GetRow() > 0 THEN
- IF dw_child.Object.u_opposemx_mtrl_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_mtrldef_mtrlcode[child_row] = S_INSCUST.mtrlcode[ls_j]
- dw_child.Object.u_opposemx_mtrl_mtrlid[child_row] = S_INSCUST.mtrlid[ls_j]
- dw_child.Object.u_mtrldef_mtrlname[child_row] = S_INSCUST.mtrlname[ls_j]
- dw_child.Object.u_mtrldef_mtrlmode[child_row] = S_INSCUST.mtrlmode[ls_j]
- dw_child.Object.u_mtrldef_statusflag[child_row] = S_INSCUST.statusflag[ls_j]
- dw_child.Object.u_mtrldef_woodcodeflag[child_row] = S_INSCUST.woodcodeflag[ls_j]
- dw_child.Object.u_mtrldef_pcodeflag[child_row] = S_INSCUST.pcodeflag[ls_j]
-
- END IF
- NEXT
- dw_child.SetFocus()
- this.triggerevent('ue_allowedit')
- 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.billid[row]
- dw_child.SetRedraw (false)
- dw_child.retrieve(uc_relid)
- dw_child.SetRedraw (true)
- else
- dw_child.reset()
- end if
- end event
- event open;call super::open;uc_column_int = 6 //uc dw前7列可以编辑
- child_column_int = 8 //子dw前8列可以编辑
- uo_ware = CREATE uo_oppose
- uo_ware.commit_transaction = sqlca
- s_hide_col s_col_mtrlsectype
- s_col_mtrlsectype.col_1 = 'u_mtrldef_mtrlsectype'
- f_hide_col(1308,dw_child,s_col_mtrlsectype)
- s_hide_col s_col_zxmtrlmode
- s_col_zxmtrlmode.col_1 = 'u_mtrldef_zxmtrlmode'
- f_hide_col(1309,dw_child,s_col_zxmtrlmode)
- end event
- event ue_viewprint;call super::ue_viewprint;IF NOT f_power_ind(109) 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_oppsoe_spt_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.billid[LS_ROW]
- IF ifpic = 1 THEN
- String ls_msg
- IF wf_print_retrievedata(LS_PRMSG.s_pic,ls_msg) = 0 THEN
- MessageBox('提示','下载图片失败!',information!,OK!)
- RETURN
- END IF
- END IF
- Openwithparm(w_publ_preview,LS_PRMSG)
- IF ifpic = 1 THEN
- Long li
- FOR li = 1 TO UpperBound(LS_PRMSG.s_pic.path)
- IF Len(Trim(LS_PRMSG.s_pic.path[li])) > 0 THEN
- FileDelete(LS_PRMSG.s_pic.path[li])
- END IF
- NEXT
- END IF
- //**更新打印次料
- String arg_msg
- printnum = Message.DoubleParm
- f_update_printnum('u_oppose',printnum,0,dw_pageretr.Object.billid[LS_ROW],'','',arg_msg,TRUE)
- end event
- event ue_print;call super::ue_print;//--直接打印
- IF NOT f_power_ind(109) 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_oppsoe_spt_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.billid[dw_pageretr.getrow()]
- IF ifpic = 1 THEN
- String ls_msg
- IF wf_print_retrievedata(LS_PRMSG.s_pic,ls_msg) = 0 THEN
- MessageBox('提示','下载图片失败!',information!,OK!)
- RETURN
- END IF
- END IF
- 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()
- IF ifpic = 1 THEN
- Long li
- FOR li = 1 TO UpperBound(LS_PRMSG.s_pic.path)
- IF Len(Trim(LS_PRMSG.s_pic.path[li])) > 0 THEN
- FileDelete(LS_PRMSG.s_pic.path[li])
- END IF
- NEXT
- END IF
- //**更新打印次料
- f_update_printnum('',1,0,dw_pageretr.object.billid[dw_pageretr.getrow()],'','',arg_msg,true)
- end event
- event ue_f9;call super::ue_f9;//用于选择明细内容,被F9[默认]
- if not dw_edit_mode then return
- long uc_row
- uc_row=dw_pageretr.getrow()
- if uc_row=0 then
- messagebox('提示','请选定进仓单!', Information!, OK! )
- return
- end if
- dw_uc.accepttext()
- if not isvalid(W_spt_edit) then
- s_edit_index_tran s_ch_tran //传递参数使用
- s_ch_tran.if_retrieve_all=false //是否一次RETRIEVE所有行
- s_ch_tran.work_mode=1 //0-单纯编辑模式 1-选择\编辑模式
- s_ch_tran.arg_pkid=0 //目标定位PKID (备用)
- //查询列(物料编码)部分内容,用于初步筛选
- s_ch_tran.arg_string_code=upper(trim(dw_uc.object.u_spt_sptcode[dw_uc.getrow()]))
- OPENwithparm(W_spt_edit,s_ch_tran) //调用
- S_spt S_INSCUST
- S_INSCUST=Message.PowerObjectParm //接受返回结构
- IF S_INSCUST.sptid>0 THEN //正常返回值则可以取以下值
- dw_uc.setredraw(false)
- dw_uc.object.u_oppose_relid[uc_row]=S_INSCUST.sptid
- dw_uc.object.u_oppose_opposedept[uc_row]=S_INSCUST.name
- dw_uc.object.u_spt_sptcode[uc_row]=S_INSCUST.sptcode
- dw_uc.setredraw(true)
- dw_uc.setcolumn("threason")
- END IF
- end if
- 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(784) 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_improveidea(dw_pageretr.object.billid[uc_row],LS_STR,arg_msg,true)=0 then
- messagebox('Error!',arg_msg)
- return
- else
- messagebox('提示','添加操作成功!', Information!, OK! )
- wf_refresh_curuc(dw_pageretr.object.billid[uc_row])
- end if
- end event
- event ue_rpt_print;call super::ue_rpt_print;IF NOT f_power_ind(109) THEN
- MessageBox('提示','你没有使用权限!', Information!, OK! )
- RETURN
- END IF
- Long row,uc_relid,ll_scid
- row = dw_pageretr.GetRow()
- IF row = 0 THEN RETURN
- uo_rpt_print_preview uo_print
- S_rpt_print_MSG LS_PRMSG
- IF dw_pageretr.RowCount() = 0 THEN
- MessageBox('提示','没有可打印的单据!', Information!, OK! )
- RETURN
- END IF
- IF ls_rpname = '' THEN RETURN
- IF li_auditprint = 1 THEN
- IF dw_pageretr.Object.flag[row] = 0 THEN
- MessageBox('提示','目标单据还未审核,不能打印!', Information!, OK! )
- RETURN
- END IF
- END IF
- IF MessageBox ("询问","是否确定要打印当前单据吗?",Question!,YesNo! ) = 2 THEN RETURN
- LS_PRMSG.retr_pram_falg = 2
- LS_PRMSG.TAG_TEXT = '供应商投诉单'
- LS_PRMSG.rpname = ls_rpname
- LS_PRMSG.FILTER_STRING = ''
- LS_PRMSG.PAGECH_FLAG = 0
- LS_PRMSG.rpid = ls_msgprintid_rpt
- LS_PRMSG.retr_pramnmb = dw_pageretr.Object.billid[row]
- 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()
- //**更新打印次料
- f_update_printnum('',1,0,dw_pageretr.object.billid[dw_pageretr.getrow()],'','',arg_msg,true)
- end event
- event ue_rpt_viewprint;call super::ue_rpt_viewprint;IF NOT f_power_ind(109) THEN
- MessageBox('提示','你没有使用权限!', Information!, OK! )
- RETURN
- END IF
- Long row,uc_relid,ll_scid
- row = dw_pageretr.GetRow()
- IF row = 0 THEN RETURN
- IF ls_rpname = '' THEN RETURN
- IF li_auditprint = 1 THEN
- IF dw_pageretr.Object.flag[row] = 0 THEN
- MessageBox('提示','目标单据还未审核,不能打印!', Information!, OK! )
- RETURN
- END IF
- END IF
- s_rpt_print_msg s_print
- s_print.retr_pram_falg = 2
- s_print.rpid = ls_msgprintid_rpt
- s_print.retr_flag = TRUE
- s_print.tag_text = THIS.Title
- s_print.rpname = ls_rpname
- s_print.retr_pramnmb = dw_pageretr.Object.billid[row]
- s_print.rowcnt = dw_child.RowCount()
- OpenWithParm(w_rpt_preview,s_print)
- //**更新打印次料
- string arg_msg
- f_update_printnum('',1,0,dw_pageretr.object.billid[dw_pageretr.getrow()],'','',arg_msg,true)
- end event
- type cb_func from w_publ_1ton_share_detail`cb_func within w_oppose_spt
- end type
- type cb_exit from w_publ_1ton_share_detail`cb_exit within w_oppose_spt
- end type
- type sle_usual_query from w_publ_1ton_share_detail`sle_usual_query within w_oppose_spt
- integer x = 206
- integer y = 188
- integer width = 549
- end type
- type cb_retrieveall from w_publ_1ton_share_detail`cb_retrieveall within w_oppose_spt
- integer x = 3040
- end type
- type em_pagerowno from w_publ_1ton_share_detail`em_pagerowno within w_oppose_spt
- integer x = 2711
- integer y = 28
- integer width = 320
- end type
- type dw_pageretr from w_publ_1ton_share_detail`dw_pageretr within w_oppose_spt
- integer x = 2007
- integer width = 1531
- integer height = 880
- string dataobject = "dw_oppsoe_spt_index"
- end type
- event dw_pageretr::rowfocuschanged;call super::rowfocuschanged;wf_check_billfj()
- //IF dw_edit_mode THEN RETURN
- //IF currentrow <=0 THEN RETURN
- //this.selectrow(0,false)
- //this.selectrow(currentrow,true)
- //DW_UC.SETROW(currentrow)
- //DW_UC.ScrollToRow (currentrow)
- if currentrow<=0 then dw_child.reset()
- IF NOT dw_edit_mode THEN
- parent.triggerevent('retrieve_dw1')
- END IF
- end event
- type st_1 from w_publ_1ton_share_detail`st_1 within w_oppose_spt
- integer x = 14
- integer y = 208
- end type
- type cb_nextpage from w_publ_1ton_share_detail`cb_nextpage within w_oppose_spt
- integer x = 3191
- end type
- type dw_uc from w_publ_1ton_share_detail`dw_uc within w_oppose_spt
- integer width = 2002
- integer height = 872
- string dataobject = "dw_oppsoe_spt_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 ( )='improveidea' and key = KeyEnter! then
- dw_child.setfocus()
- dw_child.scrolltorow(dw_child.rowcount())
- dw_child.SetColumn ('u_mtrldef_mtrlcode')
- return 1
- elseif dw_uc.GetColumnName ( )='u_spt_sptcode' and key = KeyEnter! then
- string ls_code,ls_name
- long ls_sptid
-
- dw_uc.accepttext()
- ls_code=upper(trim(dw_uc.object.u_spt_sptcode[dw_uc.getrow()]))
- SELECT u_spt.sptid,
- u_spt.name
- INTO :ls_sptid,:ls_name
- FROM u_spt
- WHERE (sptcode=:ls_code);
-
-
- if sqlca.sqlcode<>0 then
- parent.triggerevent('ue_f9')
- return 1
- else
- dw_uc.setredraw(false)
- dw_uc.object.u_oppose_relid[dw_uc.getrow()]=ls_sptid
- dw_uc.object.u_oppose_opposedept[dw_uc.getrow()]=ls_name
- dw_uc.setredraw(true)
- dw_uc.setcolumn("threason")
- return 1
- end if
- 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::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_oppose_spt
- end type
- type dw_child from w_publ_1ton_share_detail`dw_child within w_oppose_spt
- integer y = 1176
- integer height = 780
- string dataobject = "dw_oppsoemx_spt_index"
- boolean resizable = false
- boolean border = false
- end type
- event dw_child::dwnkey;call super::dwnkey;PARENT.TriggerEvent('user_key')
- String ls_mtrlcode,ls_mtrlname,ls_unit,ls_mtrlmode
- Long ls_mtrlid
- Int li_statusflag,li_woodcodeflag,li_pcodeflag
- 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
- dw_child.AcceptText()
- child_row = dw_child.GetRow()
-
- ls_mtrlcode = dw_child.Object.u_mtrldef_mtrlcode[child_row]
-
- SELECT u_mtrldef.mtrlid,
- u_mtrldef.mtrlname,
- u_mtrldef.unit,
- u_mtrldef.mtrlmode,
- u_mtrldef.statusflag,
- u_mtrldef.woodcodeflag,
- u_mtrldef.pcodeflag
- INTO :ls_mtrlid,:ls_mtrlname,:ls_unit,
- :ls_mtrlmode,
- :li_statusflag,:li_woodcodeflag,:li_pcodeflag
- FROM u_mtrldef
- Where ( u_mtrldef.mtrlcode = :ls_mtrlcode);
-
- IF sqlca.SQLCode = 100 THEN
- PARENT.TriggerEvent('ue_f8')
- RETURN
- END IF
-
- dw_child.Object.u_opposemx_mtrl_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_statusflag[child_row] = li_statusflag
- dw_child.Object.u_mtrldef_woodcodeflag[child_row] = li_woodcodeflag
- dw_child.Object.u_mtrldef_pcodeflag[child_row] = li_pcodeflag
- PARENT.TriggerEvent('ue_allowedit')
- 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_opposemx_mtrl_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
- //u_mtrldef_mtrlcode
- //u_mtrldef_unit
- //u_inwaremx_mtrlid
- //u_inwaremx_planprice
- //u_inwaremx_price
- //u_mtrldef_mtrlname
- end event
- event dw_child::doubleclicked;if dw_edit_mode and dw_child.getcolumnname()='u_mtrldef_mtrlcode' then
- parent.triggerevent('ue_f8')
- end if
- end event
- event dw_child::constructor;call super::constructor;f_title_change(this)
- end event
- type cb_viewprint from w_publ_1ton_share_detail`cb_viewprint within w_oppose_spt
- end type
- type cb_print from w_publ_1ton_share_detail`cb_print within w_oppose_spt
- end type
- type cb_add from w_publ_1ton_share_detail`cb_add within w_oppose_spt
- end type
- event cb_add::clicked;IF NOT f_power_ind(110) 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.billdate[uc_row] > DateTime(2000-01-01,Now()) THEN
- MessageBox('提示','不合理发生时间!', Information!, OK! )
- dw_uc.SetFocus()
- dw_uc.SetColumn("billdate")
- RETURN
- END IF
-
- IF dw_uc.Object.u_oppose_itemid[uc_row] = 0 THEN
- MessageBox('提示','请选择投诉项目!', Information!, OK! )
- dw_uc.SetFocus()
- dw_uc.SetColumn("u_oppose_itemid")
- RETURN
- END IF
-
- IF dw_uc.Object.u_oppose_relid[uc_row] = 0 THEN
- MessageBox('提示','请选择供应商!', Information!, OK! )
- dw_uc.SetFocus()
- dw_uc.SetColumn("u_spt_sptcode")
- RETURN
- END IF
-
- uo_ware.billdate = dw_uc.Object.billdate[uc_row]
- uo_ware.opposedept = dw_uc.Object.u_oppose_opposedept[uc_row] // 经手人
- uo_ware.relid = dw_uc.Object.u_oppose_relid[uc_row]
- uo_ware.improveidea = dw_uc.Object.improveidea[uc_row]
- uo_ware.threason = dw_uc.Object.threason[uc_row]
- uo_ware.itemid = dw_uc.Object.u_oppose_itemid[uc_row]
-
-
- FOR i = 1 TO dw_child.RowCount()
- IF dw_child.Object.u_opposemx_mtrl_mtrlid[i] > 0 THEN
- IF uo_ware.acceptmx(dw_child.Object.u_opposemx_mtrl_mtrlid[i],&
- dw_child.Object.u_opposemx_mtrl_status[i],&
- dw_child.Object.u_opposemx_mtrl_qty[i],&
- dw_child.Object.u_opposemx_mtrl_mxdscrp[i],0,0,0,0,&
- arg_msg ) = 0 THEN
- MessageBox('错误',arg_msg, StopSign!, OK! )
- RETURN
- END IF
- END IF
- NEXT
-
-
- IF uo_ware.Save(TRUE,arg_msg) = 0 THEN
- MessageBox('错误',arg_msg, StopSign!, OK! )
- RETURN
- END IF
- // MessageBox('提示','保存操作成功!')
-
- long ll_row
- ll_row = dw_pageretr.getrow()
- dw_pageretr.SelectRow(0,FALSE)
- dw_pageretr.SelectRow(ll_row,TRUE)
- wf_refresh_curuc(uo_ware.billid)
-
- ELSE
- IF uo_ware.newbegin(1,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)
- dw_uc.SetColumn("billdate")
- 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_oppose_spt
- end type
- event cb_edit::clicked;if not f_power_ind(110) 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(dw_pageretr.object.billid[uc_row],arg_msg)=0 then
- messagebox('错误',arg_msg, StopSign!, OK! )
- return
- end if
- parent.triggerevent('ue_allowedit')
- end if
- call super::clicked
- end event
- type cb_delet from w_publ_1ton_share_detail`cb_delet within w_oppose_spt
- end type
- event cb_delet::clicked;call super::clicked;
- IF NOT f_power_ind(615) 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(dw_pageretr.Object.billid[uc_row],arg_msg,TRUE) = 0 THEN
- MessageBox('提示',arg_msg, Information!, OK! )
- ELSE
- //日志
- Long ls_id
- String ls_code
- ls_id = dw_pageretr.Object.billid[uc_row]
- ls_code = dw_pageretr.Object.billcode[uc_row]
- f_setsysoplog('供应商投诉单','删除,id:'+String(ls_id)+',code:'+ls_code,arg_msg,TRUE)
- //--
- MessageBox('提示','删除单据'+String(dw_pageretr.Object.billcode[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_oppose_spt
- 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_oppose_spt
- end type
- event cb_auditing::clicked;call super::clicked;IF NOT f_power_ind(111) 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 MessageBox ("询问","是否确定要审核当前单据?",question!,yesno! ) = 2 THEN RETURN
- IF uo_ware.auditing(dw_pageretr.Object.billid[pagerert_row],TRUE,arg_msg) = 0 THEN
- MessageBox('错误',arg_msg, StopSign!, OK! )
- ELSE
- MessageBox('提示','审核成功!', Information!, OK! )
- wf_refresh_curuc(dw_pageretr.Object.billid[pagerert_row])
- END IF
- end event
- type cb_xm from w_publ_1ton_share_detail`cb_xm within w_oppose_spt
- end type
- type cb_retrieve from w_publ_1ton_share_detail`cb_retrieve within w_oppose_spt
- end type
- type cb_xls from w_publ_1ton_share_detail`cb_xls within w_oppose_spt
- end type
- type cb_help from w_publ_1ton_share_detail`cb_help within w_oppose_spt
- end type
- type cb_auditing_cancel from w_publ_1ton_share_detail`cb_auditing_cancel within w_oppose_spt
- end type
- event cb_auditing_cancel::clicked;call super::clicked;IF NOT f_power_ind(885) 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 MessageBox ("询问","是否确定要撤消审核当前单据?",question!,yesno! ) = 2 THEN RETURN
- IF uo_ware.c_auditing(dw_pageretr.Object.billid[pagerert_row],TRUE,arg_msg) = 0 THEN
- MessageBox('错误',arg_msg, StopSign!, OK! )
- ELSE
- //日志
- Long ls_id
- String ls_code
- ls_id = dw_pageretr.Object.billid[pagerert_row]
- ls_code = dw_pageretr.Object.billcode[pagerert_row]
- f_setsysoplog('供应商投诉单','撤审,id:'+String(ls_id)+',code:'+ls_code,arg_msg,TRUE)
- //--
- MessageBox('提示','撤消审核成功!', Information!, OK! )
- wf_refresh_curuc(dw_pageretr.Object.billid[pagerert_row])
- END IF
- end event
- type p_msg from w_publ_1ton_share_detail`p_msg within w_oppose_spt
- end type
- type p_help from w_publ_1ton_share_detail`p_help within w_oppose_spt
- end type
- type p_encl from w_publ_1ton_share_detail`p_encl within w_oppose_spt
- end type
- type p_other from w_publ_1ton_share_detail`p_other within w_oppose_spt
- end type
- type gb_3 from w_publ_1ton_share_detail`gb_3 within w_oppose_spt
- end type
- type ln_bar from w_publ_1ton_share_detail`ln_bar within w_oppose_spt
- end type
- type ln_bar2 from w_publ_1ton_share_detail`ln_bar2 within w_oppose_spt
- end type
- type r_bar from w_publ_1ton_share_detail`r_bar within w_oppose_spt
- end type
- type ln_1 from w_publ_1ton_share_detail`ln_1 within w_oppose_spt
- end type
- type ln_2 from w_publ_1ton_share_detail`ln_2 within w_oppose_spt
- end type
- type ddlb_status from dropdownlistbox within w_oppose_spt
- integer x = 960
- integer y = 188
- integer width = 549
- integer height = 300
- integer taborder = 30
- 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_oppose_spt
- integer x = 786
- 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
|