123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965 |
- $PBExportHeader$w_outware_move.srw
- forward
- global type w_outware_move from w_publ_1ton_share_detail
- end type
- type st_2 from statictext within w_outware_move
- end type
- type ddlb_status from dropdownlistbox within w_outware_move
- end type
- type cbx_packqty_cmpl from checkbox within w_outware_move
- end type
- end forward
- global type w_outware_move from w_publ_1ton_share_detail
- integer height = 2300
- string title = "仓库调拨单"
- boolean maxbox = true
- windowstate windowstate = maximized!
- event insert_childrow ( )
- event ue_fj_edit ( )
- event ue_fj_view ( )
- event ue_cmpl_status_qty ( )
- event ue_mod_price ( )
- st_2 st_2
- ddlb_status ddlb_status
- cbx_packqty_cmpl cbx_packqty_cmpl
- end type
- global w_outware_move w_outware_move
- type variables
- uo_outware_move uo_ware
- int cur_flag = -1
- int cur_d_auditFlag = -1
- int copy_storageid = 0
- int ii_packqty_cmpl
- end variables
- forward prototypes
- public function integer wf_refresh_curuc (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)
- 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(1098) THEN
- // MessageBox(publ_operator,'你没有使用权限!')
- // RETURN
- //END IF
- s_edit_index_tran s_pic
- Long ll_ConnectionID
- String arg_msg
- Long ls_row
- ls_row = dw_uc.GetRow()
- IF ls_row <= 0 THEN
- RETURN
- END IF
- IF f_get_outerconnection(ll_ConnectionID,arg_msg) = 0 THEN
- MessageBox('提示','没有指定附件数据库连接'+arg_msg,information!,ok!)
- RETURN
- END IF
- s_pic.f_long = 313 //销售订单的mainID
- s_pic.f_string = dw_uc.Object.u_outware_move_outwarecode[ls_row]
- s_pic.g_long = dw_uc.Object.u_outware_move_outwareid[ls_row]
- s_pic.e_long = 0
- s_pic.sqltransaction = sys_filedb_sqlca
- OpenWithParm(w_fj_bill_mng,s_pic)
- wf_check_billfj()
- end event
- event ue_fj_view();IF dw_edit_mode THEN
- MessageBox('提示','编辑状态下不可用',information!,ok!)
- RETURN
- END IF
- s_edit_index_tran s_pic
- Long ll_ConnectionID
- String arg_msg
- Long ls_row
- ls_row = dw_uc.GetRow()
- IF ls_row <= 0 THEN
- RETURN
- END IF
- IF f_get_outerconnection(ll_ConnectionID,arg_msg) = 0 THEN
- MessageBox('提示','没有指定附件数据库连接'+arg_msg,information!,ok!)
- RETURN
- END IF
- s_pic.f_long = 313 //销售订单的mainID
- s_pic.f_string = dw_uc.Object.u_outware_move_outwarecode[ls_row]
- s_pic.g_long = dw_uc.Object.u_outware_move_outwareid[ls_row]
- s_pic.e_long = 0
- s_pic.sqltransaction = sys_filedb_sqlca
- OpenWithParm(w_fj_bill_view,s_pic)
- end event
- event ue_cmpl_status_qty();Int ll_flag
- Decimal ll_value
- Long ll_num
- Long i,j,k
- String ls_mtrlmode
- String ls_status
- Decimal ld_qty
- Decimal ld_addqty
- String ls_msg
- s_cmpl_addqty s_cmpl
- dw_child.AcceptText()
- dw_uc.SetRedraw(FALSE)
- IF dw_edit_mode THEN
- Open(w_cmpl_status_qty_ch)
- s_cmpl = Message.PowerObjectParm
- ll_flag = s_cmpl.flag
- ll_value = s_cmpl.addvalue
- ll_num = s_cmpl.num
- IF ll_value <= 0 THEN RETURN
- IF dw_child.RowCount() <= 0 THEN RETURN
- FOR i = 1 TO dw_child.RowCount()
- ld_addqty = dw_child.Object.u_outwaremovemx_addqty[i]
- ls_status = dw_child.Object.u_outwaremovemx_status[i]
- IF ld_addqty = 0 OR ls_status = '' THEN
- ELSE
- ld_qty = 0
- IF f_cmpl_status_qty(ld_addqty,ls_status,ld_qty,ls_msg) = 0 THEN
- MessageBox('错误',ls_msg,stopsign!,ok!)
- GOTO ext
- END IF
-
- IF ll_flag = 0 THEN
- dw_child.Object.u_outwaremovemx_qty[i] = Round(ld_qty * ll_value,ll_num)
- ELSE
- dw_child.Object.u_outwaremovemx_qty[i] = Round(ld_qty / ll_value,ll_num)
- END IF
- END IF
- NEXT
-
- END IF
- ext:
- dw_uc.SetRedraw(TRUE)
- end event
- event ue_mod_price();IF NOT f_power_ind(1402) THEN
- MessageBox('提示','你没有权限',information!,ok!)
- RETURN
- END IF
- dw_child.AcceptText()
- Long ll_row,ll_scid,ll_outwareid
- String ls_msg
- IF dw_child.GetRow() = 0 THEN RETURN
- ll_row = dw_pageretr.GetRow()
-
- ll_outwareid = dw_pageretr.Object.u_outware_move_outwareid[ll_row]
- s_edit_index_tran s_tran1
- s_tran1.c_long = ll_outwareid
- OpenWithParm(w_outware_move_modprice,s_tran1)
- this.TriggerEvent('retrieve_childdw')
- end event
- public function integer wf_refresh_curuc (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 outrep
- String dscrp
- String outwarecode
- DateTime opdate
- String operator
- Int flag
- DateTime auditingdate
- String Auditingrep
- String modrep
- DateTime moddate
- Int dstorageid
- Int sstorageid
- String relcode
- String reason
- Long d_auditFlag
- DateTime d_Auditingdate
- String d_Auditingrep
- string storagename, storagename_in
- long printnum
- SELECT u_outware_move.outdate,
- u_outware_move.outrep,
- u_outware_move.dscrp,
- u_outware_move.outwarecode,
- u_outware_move.opdate,
- u_outware_move.operator,
- u_outware_move.auditingdate,
- u_outware_move.flag,
- u_outware_move.auditingrep,
- u_outware_move.modrep,
- u_outware_move.moddate,
- u_outware_move.dstorageid,
- u_outware_move.sstorageid,
- u_outware_move.relcode,
- u_outware_move.reason,
- u_outware_move.d_auditFlag,
- u_outware_move.d_Auditingdate,
- u_outware_move.d_Auditingrep,
- u_storage.storagename,
- u_storage_b.storagename as storagename_in,
- u_outware_move.printnum
- INTO :outdate,
- :outrep,
- :dscrp,
- :outwarecode,
- :opdate,
- :operator,
- :Auditingdate,
- :flag,
- :Auditingrep,
- :modrep,
- :moddate,
- :dstorageid ,
- :sstorageid,
- :relcode,
- :reason,
- :d_auditFlag,
- :d_Auditingdate,
- :d_Auditingrep,
- :storagename,
- :storagename_in,
- :printnum
- FROM u_outware_move INNER JOIN
- u_storage ON u_outware_move.sstorageid = u_storage.storageid INNER JOIN
- u_storage u_storage_b ON u_outware_move.dstorageid = u_storage_b.storageid
- Where (u_outware_move.outwareid = :arg_wareid );
- IF sqlca.SQLCode <> 0 THEN
- MessageBox('错误',"查询操作失败(错误单据唯一码)",stopsign!,ok!)
- RETURN 0
- END IF
- dw_pageretr.Object.u_outware_move_outwareid[uc_row] = arg_wareid
- dw_pageretr.Object.u_outware_move_outdate[uc_row] = outdate
- dw_pageretr.Object.u_outware_move_outrep[uc_row] = outrep
- dw_pageretr.Object.u_outware_move_dscrp[uc_row] = dscrp
- dw_pageretr.Object.u_outware_move_outwarecode[uc_row] = outwarecode
- dw_pageretr.Object.u_outware_move_opdate[uc_row] = opdate
- dw_pageretr.Object.u_outware_move_operator[uc_row] = operator
- dw_pageretr.Object.u_outware_move_flag[uc_row] = flag
- dw_pageretr.Object.u_outware_move_Auditingdate[uc_row] = auditingdate
- dw_pageretr.Object.u_outware_move_Auditingrep[uc_row] = Auditingrep
- dw_pageretr.Object.u_outware_move_moddate[uc_row] = moddate
- dw_pageretr.Object.u_outware_move_modrep[uc_row] = modrep
- dw_pageretr.Object.u_outware_move_dstorageid[uc_row] = dstorageid
- dw_pageretr.Object.u_outware_move_sstorageid[uc_row] = sstorageid
- dw_pageretr.Object.u_storage_storagename[uc_row] = storagename
- dw_pageretr.Object.u_storage_storagename_in[uc_row] = storagename_in
- dw_pageretr.Object.u_outware_move_relcode[uc_row] = relcode
- dw_pageretr.Object.u_outware_move_reason[uc_row] = reason
- dw_pageretr.Object.u_outware_move_d_auditFlag[uc_row] = d_auditFlag
- dw_pageretr.Object.u_outware_move_d_Auditingdate[uc_row] = d_Auditingdate
- dw_pageretr.Object.u_outware_move_d_Auditingrep[uc_row] = d_Auditingrep
- dw_pageretr.Object.u_outware_move_printnum[uc_row] = printnum
- dw_uc.Reset()
- dw_pageretr.RowsCopy(dw_pageretr.GetRow(),dw_pageretr.GetRow(), Primary!, dw_uc, 1, Primary!)
- dw_uc.ResetUpdate()
- dw_uc.SetRedraw(TRUE)
- THIS.PostEvent('retrieve_childdw')
- wf_flagstatus_rf()
- RETURN 1
- end function
- public function integer wf_flagstatus_rf ();
- //wf_flagstatus_rf()
- Long pagerert_row
- Int flag = -1
- Int d_auditflag = -1
- pagerert_row = dw_pageretr.GetRow()
- IF pagerert_row <= 0 THEN
- cb_auditing.Text = '调出审&F'
- cb_auditing_cancel.Text = '调出撤'
- cb_auditing.Enabled = FALSE
- cb_auditing_cancel.Enabled = FALSE
- flag = -1
- d_auditflag = -1
- GOTO ext
- END IF
- flag = dw_pageretr.Object.u_outware_move_flag[pagerert_row]
- d_auditflag = dw_pageretr.Object.u_outware_move_d_auditflag[pagerert_row]
- IF dw_edit_mode THEN
- cb_auditing.Text = '调出审&F'
- cb_auditing.Enabled = FALSE
-
- flag = -1
- d_auditflag = -1
-
- cb_auditing_cancel.Enabled = FALSE
- ELSE
- IF flag = 0 THEN
- cb_auditing.Enabled = TRUE
- cb_auditing_cancel.Enabled = FALSE
- cb_auditing.Text = '调出审&F'
- cb_auditing_cancel.Text = '调出撤'
- ELSEIF flag = 1 AND d_auditflag = 0 THEN
- cb_auditing_cancel.Enabled = TRUE
- cb_auditing.Enabled = TRUE
- cb_auditing.Text = '调入审&F'
- cb_auditing_cancel.Text = '调出撤'
- ELSE
- cb_auditing.Enabled = FALSE
- cb_auditing_cancel.Enabled = TRUE
- cb_auditing.Text = '调入审&F'
- cb_auditing_cancel.Text = '调入撤'
- END IF
- END IF
- cb_auditing.TriggerEvent('ue_textchange')
- cb_auditing_cancel.TriggerEvent('ue_textchange')
- 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_move_outwareid[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 = 313 //客户投拆单的 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 = 313);
- 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.u_outwaremovemx_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
- long ll_cnt
- 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 参数与上文对应
- ll_cnt = 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.u_outwaremovemx_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_outware_move.create
- int iCurrent
- call super::create
- this.st_2=create st_2
- this.ddlb_status=create ddlb_status
- this.cbx_packqty_cmpl=create cbx_packqty_cmpl
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.st_2
- this.Control[iCurrent+2]=this.ddlb_status
- this.Control[iCurrent+3]=this.cbx_packqty_cmpl
- end on
- on w_outware_move.destroy
- call super::destroy
- destroy(this.st_2)
- destroy(this.ddlb_status)
- destroy(this.cbx_packqty_cmpl)
- end on
- event open;This.TriggerEvent('ue_before_open')
- wf_movetocenter()
- ds_copy_bill = Create datastore
- ds_copy_bill.DataObject = dw_child.DataObject
- ds_copy_bill.SetTransObject(sqlca)
- 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
- //--------------------------------------------------------------------
- //String ls_ret = '',ls_storagestr,ls_storageid,ls_selectstr
- //ls_storagestr = sys_user_storagestr
- //IF ls_storagestr = '0' THEN
- // ls_ret = ''
- //ELSEIF ls_storagestr = '-1' THEN
- // ls_ret = ' (1 = 0)'
- //ELSE
- // DO WHILE Len(ls_storagestr) <> 1
- // ls_storagestr = Replace( ls_storagestr, 1, 1, '' )
- // ls_storageid = Left(ls_storagestr,Pos(ls_storagestr,',',1) - 1)
- // ls_ret = ls_ret + ' or u_outware_move.sstorageid = ' + ls_storageid
- // ls_ret = ls_ret + ' or u_outware_move.dstorageid = ' + ls_storageid
- // ls_storagestr = Replace ( ls_storagestr, 1, Pos(ls_storagestr,',',1) - 1, '' )
- // LOOP
- // ls_ret = Replace ( ls_ret, 1, Pos(ls_ret,'or',1) + 2, '' )
- // ls_ret = ' (' + ls_ret + ')'
- //END IF
- //IF Pos(Lower(ori_oldselect),' where ',1) > 0 THEN
- // IF ls_ret <> '' THEN
- // ori_oldselect = ori_oldselect + ' and ' + f_return_storageidstr()
- // END IF
- //ELSE
- // IF ls_ret <> '' THEN
- // ori_oldselect = ori_oldselect + ' where ' + f_return_storageidstr()
- // END IF
- //END IF
- //====================================================================
- 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前5列可以编辑
- child_column_int = 7 //子dw前5列可以编辑
- uo_ware = Create uo_outware_move
- s_hide_col s_col
- s_col.col_1 = 'u_outwaremovemx_price'
- s_col.col_2 = 'amt'
- s_col.col_3 = 'u_outwaremovemx_cost'
- s_col.col_4 = 'costamt'
- f_hide_col(1510,dw_child,s_col)
- 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 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_move_outwareid[row]
- dw_child.SetRedraw (False)
- dw_child.Retrieve(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
- //只显未自已管的仓库
- datawindowchild childdw
- String new_sqlstr,modify_str
- dw_uc.SetTransObject (sqlca)
- dw_uc.GetChild("u_outware_move_sstorageid",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 )
- IF childdw.Retrieve() = 0 THEN
- childdw.InsertRow(0)
- END IF
- //
- dw_uc.Retrieve() //dw_uc的dw改左select top 0 并肯不带参数
- dw_pageretr.Retrieve(sys_user_storageid,cur_flag,cur_d_auditFlag)
- IF dw_pageretr.RowCount() > 0 THEN
- dw_pageretr.SetRow(1)
- dw_pageretr.TriggerEvent(RowFocusChanged!)
- END IF
- This.TriggerEvent('retrieve_childdw')
- cb_nextpage.Enabled = cb_nextpage_enabled
- cb_retrieveall.Enabled = cb_retrieveall_enabled
- cb_func.Enabled = cb_func_enabled
- end event
- event ue_f8;call super::ue_f8;//用于选择明细内容,被F8[默认]\dw_child.doubleclicked调用
- IF Not dw_edit_mode THEN RETURN
- Long child_row,ins_storageid = 0
- dw_uc.AcceptText()
- ins_storageid = dw_uc.Object.u_outware_move_sstorageid[dw_uc.GetRow()]
- IF ins_storageid = 0 Or IsNull(ins_storageid) THEN
- MessageBox('提示','请先选择原仓库',information!,ok!)
- RETURN
- END IF
- child_row = dw_child.GetRow()
- 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
- s_tranf8.c_long = -1
-
- 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_outwaremovemx_mtrlwareid[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_outwaremovemx_mtrlwareid[child_row] = S_INSCUST.mtrlwareid[ls_j]
- dw_child.Object.u_outwaremovemx_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_unit[child_row] = S_INSCUST.u_mtrldef_unit[ls_j]
- dw_child.Object.u_mtrldef_mtrlmode[child_row] = S_INSCUST.u_mtrldef_mtrlmode[ls_j]
-
- IF sys_option_outware_move_ware = 0 THEN
-
- ELSEIF sys_option_outware_move_ware = 1 THEN
- dw_child.Object.u_outwaremovemx_qty[child_row] = S_INSCUST.noallocqty[ls_j] - S_INSCUST.noauditingqty[ls_j]
- dw_child.Object.u_outwaremovemx_addqty[child_row] = S_INSCUST.noallocaddqty[ls_j] - S_INSCUST.noauditingaddqty[ls_j]
- ELSE
- dw_child.Object.u_outwaremovemx_qty[child_row] = S_INSCUST.noallocqty[ls_j]
- dw_child.Object.u_outwaremovemx_addqty[child_row] = S_INSCUST.noallocaddqty[ls_j]
- END IF
-
- dw_child.Object.u_outwaremovemx_cost[child_row] = S_INSCUST.cost[ls_j]
- dw_child.Object.u_outwaremovemx_storageid[child_row] = S_INSCUST.storageid[ls_j]
- dw_child.Object.u_outwaremovemx_price[child_row] = S_INSCUST.cost[ls_j]
- dw_child.Object.u_outwaremovemx_pcode[child_row] = S_INSCUST.pcode[ls_j]
- dw_child.Object.u_outwaremovemx_woodcode[child_row] = S_INSCUST.woodcode[ls_j]
- dw_child.Object.u_outwaremovemx_status[child_row] = S_INSCUST.status[ls_j]
- dw_child.Object.u_mtrldef_zxmtrlmode[child_row] = S_INSCUST.u_mtrldef_zxmtrlmode[ls_j]
- dw_child.Object.u_mtrldef_mtrlsectype[child_row] = S_INSCUST.u_mtrldef_mtrlsectype[ls_j]
- dw_child.Object.u_cust_cuscode[child_row] = S_INSCUST.sptcode[ls_j]
- dw_child.Object.u_cust_name[child_row] = S_INSCUST.sptname[ls_j]
- dw_child.Object.u_outwaremovemx_plancode[child_row] = S_INSCUST.plancode[ls_j]
- dw_child.Object.u_outwaremovemx_newplancode[child_row] = S_INSCUST.plancode[ls_j]
- dw_child.Object.u_outwaremovemx_cost_notax[child_row] = S_INSCUST.cost_notax[ls_j]
-
- dw_child.SetColumn('u_outwaremovemx_qty')
- END IF
- NEXT
- END IF
- 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_move.outwarecode like '%"+trim(sle_usual_query.text)+"%')"
- else
- ls_querystrpart="(u_outware_move.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_viewprint;call super::ue_viewprint;IF NOT f_power_ind(479) THEN
- MessageBox('提示','你没有使用权限!',information!,ok!)
- RETURN
- END IF
- Long LS_ROW
- LS_ROW = dw_pageretr.GetRow()
- IF LS_ROW <= 0 THEN
- MessageBox('提示','没有打印目标单据!',information!,ok!)
- RETURN
- END IF
- S_print_MSG LS_PRMSG
- IF ls_newname <> '' THEN
- IF li_auditprint = 1 THEN
- IF dw_pageretr.Object.u_outware_move_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_move_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 = 0
- LS_PRMSG.retr_pramnmb = dw_pageretr.Object.u_outware_move_outwareid[LS_ROW]
- LS_PRMSG.rowcnt = dw_child.RowCount()
- 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
- end event
- event refresh_interface;call super::refresh_interface;wf_flagstatus_rf()
- ddlb_status.enabled = not dw_edit_mode
- end event
- event ue_addzy;call super::ue_addzy;IF dw_edit_mode THEN
- MessageBox('提示',"编辑状态下不可以使用!",information!,ok!)
- return
- END IF
- string arg_msg=''
- if not f_power_ind(791) then
- messagebox('提示','你没有权限',information!,ok!)
- return
- end if
- string 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.getinfo(dw_pageretr.object.u_outware_move_outwareid[uc_row],arg_msg)=0 then
- messagebox('错误',arg_msg,stopsign!,ok!)
- return
- end if
- if uo_ware.add_dscrp(LS_STR,arg_msg)=0 then
- messagebox('错误',arg_msg,stopsign!,ok!)
- return
- else
- messagebox('提示','添加备注操作成功!',information!,ok!)
- wf_refresh_curuc(dw_pageretr.object.u_outware_move_outwareid[uc_row])
- end if
- end event
- event ue_print;call super::ue_print;//--直接打印
- IF NOT f_power_ind(479) 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
- Long LS_ROW
- LS_ROW = dw_pageretr.GetRow()
- IF LS_ROW <= 0 THEN
- MessageBox('提示','没有打印目标单据!',information!,ok!)
- RETURN
- END IF
- IF ls_newname <> '' THEN
-
- IF li_auditprint = 1 THEN
- IF dw_pageretr.Object.u_outware_move_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_move_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 = 0
- LS_PRMSG.retr_pramnmb = dw_pageretr.Object.u_outware_move_outwareid[LS_ROW]
- LS_PRMSG.rowcnt = dw_child.RowCount()
- 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,stopsign!,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('u_outware_move',1,0,dw_pageretr.Object.u_outware_move_outwareid[dw_pageretr.GetRow()],'','',arg_msg,True)
- wf_refresh_curuc(dw_pageretr.Object.u_outware_move_outwareid[dw_pageretr.GetRow()])
- end event
- event ue_f10;call super::ue_f10;IF NOT dw_edit_mode THEN RETURN
- Long child_row
- Int if_addmxdscrp
- String ls_mxdscrp
- s_addqty_input s_input
-
- dw_child.AcceptText( )
- child_row = dw_child.GetRow()
- IF child_row <= 0 THEN RETURN
- IF dw_child.Object.u_outwaremovemx_mtrlid[child_row] <= 0 THEN RETURN
- ls_mxdscrp = dw_child.Object.u_outwaremovemx_mxdscrp[child_row]
- IF NOT IsValid(w_addqty_input) THEN
- OpenWithParm(w_addqty_input,ls_mxdscrp)
-
- s_input = Message.PowerObjectParm
-
- IF s_input.addqty = -1 THEN RETURN
- dw_child.Object.u_outwaremovemx_addqty[child_row] = s_input.addqty
-
- IF s_input.addqtystr <> '' THEN
- dw_child.Object.u_outwaremovemx_mxdscrp[child_row] = s_input.addqtystr
- END IF
-
- // IF s_input.formula <> '' THEN
- // dw_child.Object.u_inwaremx_formula[child_row] = s_input.formula
- // END IF
-
- IF s_input.flag = 1 THEN
- dw_child.Object.u_outwaremovemx_qty[child_row] = s_input.qty
- END IF
-
- END IF
- end event
- event ue_usual_query_filt;call super::ue_usual_query_filt;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="(outwarecode like '%"+trim(sle_usual_query.text)+"%')"
- else
- ls_querystrpart="(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 close;call super::close;destroy uo_ware
- wf_del_tempfilepathname()
- end event
- event ue_rpt_print;call super::ue_rpt_print;IF NOT f_power_ind(479) 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.u_outware_move_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 = THIS.Title
- 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.u_outware_move_outwareid[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,stopsign!,ok!)
- RETURN
- END IF
- uo_print.ds_print()
- end event
- event ue_rpt_viewprint;call super::ue_rpt_viewprint;IF NOT f_power_ind(479) 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.u_outware_move_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.u_outware_move_outwareid[row]
- s_print.rowcnt = dw_child.RowCount()
- OpenWithParm(w_rpt_preview,s_print)
- end event
- type cb_func from w_publ_1ton_share_detail`cb_func within w_outware_move
- end type
- type cb_exit from w_publ_1ton_share_detail`cb_exit within w_outware_move
- integer x = 2597
- end type
- type sle_usual_query from w_publ_1ton_share_detail`sle_usual_query within w_outware_move
- integer x = 215
- integer width = 549
- end type
- type cb_retrieveall from w_publ_1ton_share_detail`cb_retrieveall within w_outware_move
- integer x = 3104
- end type
- type em_pagerowno from w_publ_1ton_share_detail`em_pagerowno within w_outware_move
- integer x = 2775
- integer y = 60
- integer width = 320
- end type
- type dw_pageretr from w_publ_1ton_share_detail`dw_pageretr within w_outware_move
- integer x = 1751
- integer width = 1792
- integer height = 1040
- string dataobject = "dw_outware_move_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_move
- integer x = 0
- integer width = 206
- alignment alignment = right!
- end type
- type cb_nextpage from w_publ_1ton_share_detail`cb_nextpage within w_outware_move
- integer x = 3255
- end type
- type dw_uc from w_publ_1ton_share_detail`dw_uc within w_outware_move
- event dwnkey pbm_dwnkey
- integer width = 1746
- integer height = 1040
- string dataobject = "dw_outware_move_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_move_dscrp' and key = KeyEnter! then
- dw_child.scrolltorow(1)
- dw_child.setfocus()
- dw_child.SetColumn ('u_mtrldef_mtrlcode')
- 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 dwo.name='u_outware_move_sstorageid' then
- dw_child.reset()
- parent.triggerevent("insert_childrow")
- dw_uc.setcolumn("u_outware_move_sstorageid")
- end if
- end event
- type gb_2 from w_publ_1ton_share_detail`gb_2 within w_outware_move
- end type
- type dw_child from w_publ_1ton_share_detail`dw_child within w_outware_move
- integer x = 9
- integer y = 1340
- integer height = 788
- string dataobject = "dw_outwaremovemx_edit"
- end type
- event dw_child::dwnkey;call super::dwnkey;PARENT.TriggerEvent('user_key')
- String ls_mtrlcode,ls_mtrlname,ls_unit,ls_plancode,ls_mtrltype,ls_mtrlmode
- String ls_pcode,ls_status,ls_woodcode,ls_mtrlsectype,ls_zxmtrlmode
- Long ls_mtrlwareid,ls_mtrlid,ls_storageid
- Dec ls_noallocqty,ls_cost,ls_planprice
- s_mtrlware_noalloc_array arg_s_mtrlware
- Long child_row
- Long ls_null
- SetNull(ls_null)
- IF dw_edit_mode THEN
- dw_uc.AcceptText()
- ls_storageid = dw_uc.Object.u_outware_move_sstorageid[dw_uc.GetRow()]
- IF ls_storageid = 0 OR IsNull(ls_storageid) THEN
- MessageBox('提示','请先选择原仓库',information!,ok!)
- RETURN
- END IF
-
- 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]
-
- IF f_find_mtrlware(ls_mtrlcode,ls_storageid,-1,arg_s_mtrlware) = 0 THEN
- PARENT.TriggerEvent('ue_f8')
- RETURN 1
- ELSE
- ls_mtrlwareid = arg_s_mtrlware.mtrlwareid[1]
- ls_mtrlid = arg_s_mtrlware.mtrlid[1]
- ls_mtrlcode = arg_s_mtrlware.u_mtrldef_mtrlcode[1]
- ls_mtrlname = arg_s_mtrlware.u_mtrldef_mtrlname[1]
- ls_unit = arg_s_mtrlware.u_mtrldef_unit[1]
- ls_mtrlmode = arg_s_mtrlware.u_mtrldef_mtrlmode[1]
- ls_planprice = arg_s_mtrlware.planprice[1]
- ls_noallocqty = arg_s_mtrlware.noallocqty[1]
- ls_storageid = arg_s_mtrlware.storageid[1]
- ls_plancode = arg_s_mtrlware.plancode[1]
- ls_status = arg_s_mtrlware.status[1]
- ls_woodcode = arg_s_mtrlware.woodcode[1]
- ls_pcode = arg_s_mtrlware.pcode[1]
- ls_cost = arg_s_mtrlware.cost[1]
- ls_mtrlsectype = arg_s_mtrlware.u_mtrldef_mtrlsectype[][1]
- ls_zxmtrlmode = arg_s_mtrlware.u_mtrldef_zxmtrlmode[][1]
- END IF
- dw_child.Object.u_outwaremovemx_mtrlwareid [child_row] = ls_mtrlwareid
- dw_child.Object.u_outwaremovemx_mtrlid[child_row] = ls_mtrlid
- dw_child.Object.u_mtrldef_mtrlname[child_row] = ls_mtrlname
- dw_child.Object.u_mtrldef_mtrltype[child_row] = ls_mtrltype
- dw_child.Object.u_mtrldef_unit[child_row] = ls_unit
- dw_child.Object.u_outwaremovemx_qty[child_row] = ls_noallocqty
-
- dw_child.Object.u_outwaremovemx_price[child_row] = ls_cost
- dw_child.Object.u_outwaremovemx_cost[child_row] = ls_cost
- dw_child.Object.u_outwaremovemx_storageid[child_row] = ls_storageid
- dw_child.Object.u_outwaremovemx_pcode[child_row] = ls_pcode
- dw_child.Object.u_outwaremovemx_woodcode[child_row] = ls_woodcode
- dw_child.Object.u_outwaremovemx_status[child_row] = ls_status
- dw_child.Object.u_mtrldef_mtrlcode[child_row] = ls_mtrlcode
- dw_child.Object.u_mtrldef_zxmtrlmode[child_row] = ls_zxmtrlmode
- dw_child.Object.u_mtrldef_mtrlsectype[child_row] = ls_mtrlsectype
-
- 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_outwaremovemx_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
- event dw_child::doubleclicked;if dw_edit_mode then
- if dwo.name = 'u_outwaremovemx_addqty' then
- parent.triggerevent('ue_f10')
- else
- parent.triggerevent('ue_f8')
- end if
- end if
- end event
- event dw_child::itemchanged;call super::itemchanged;IF Not dw_edit_mode THEN RETURN
- This.AcceptText()
- IF dwo.Name = 'u_outwaremovemx_packqty' THEN
- Long ll_mtrlid
- Decimal lde_packqty_single, lde_packqty, lde_rate
- IF ii_packqty_cmpl = 1 THEN
- ll_mtrlid = This.Object.u_outwaremovemx_mtrlid[row]
- lde_packqty_single = f_get_packqty(ll_mtrlid)
- lde_packqty = This.Object.u_outwaremovemx_packqty[row]
- //lde_rate = This.Object.u_outwaremovemx_rate[row]
- //if lde_rate = 0 then lde_rate = 1
- This.Object.u_outwaremovemx_qty[row] = lde_packqty * lde_packqty_single
- //This.Object.u_outwaremovemx_buyqty[row] = lde_packqty * lde_packqty_single / lde_rate
- //This.Object.u_outwaremx_saleqty[row] = lde_packqty * lde_packqty_single / lde_rate
- END IF
- END IF
- end event
- type cb_viewprint from w_publ_1ton_share_detail`cb_viewprint within w_outware_move
- integer x = 1952
- end type
- type cb_print from w_publ_1ton_share_detail`cb_print within w_outware_move
- integer x = 1760
- end type
- type cb_add from w_publ_1ton_share_detail`cb_add within w_outware_move
- end type
- event cb_add::clicked;IF Not f_power_ind(81) THEN
- MessageBox('提示','你没有权限',information!,ok!)
- RETURN
- END IF
- String arg_msg = ''
- Long uc_row
- Long reld_uc
- Long 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 dw_uc.Object.u_outware_move_sstorageid[uc_row] = 0 THEN
- MessageBox('提示','请选择调出仓库',information!,ok!)
- dw_uc.SetFocus()
- dw_uc.SetColumn("u_outware_move_sstorageid")
- RETURN
- END IF
-
- IF dw_uc.Object.u_outware_move_dstorageid[uc_row] = 0 THEN
- MessageBox('提示','请选择调入仓库',information!,ok!)
- dw_uc.SetFocus()
- dw_uc.SetColumn("u_outware_move_dstorageid")
- RETURN
- END IF
-
- IF dw_uc.Object.u_outware_move_sstorageid[uc_row] = dw_uc.Object.u_outware_move_dstorageid[uc_row] THEN
- MessageBox('提示','调出仓库和调入仓库不能相同',information!,ok!)
- dw_uc.SetFocus()
- dw_uc.SetColumn("u_outware_move_dstorageid")
- RETURN
- END IF
-
- IF Not dw_uc.Object.u_outware_move_outdate[uc_row] > DateTime(2000-01-01,Now()) THEN
- MessageBox('提示','不合理调动时间',information!,ok!)
- dw_uc.SetFocus()
- dw_uc.SetColumn("u_outware_move_outdate")
- RETURN
- END IF
- IF Not Len(String(dw_uc.Object.u_outware_move_outrep[uc_row])) > 0 THEN
- MessageBox('提示','请填写经手人',information!,ok!)
- dw_uc.SetFocus()
- dw_uc.SetColumn("u_outware_move_outrep")
- RETURN
- END IF
-
- IF dw_uc.Object.u_outware_move_reason[uc_row] = '' THEN
- MessageBox('提示','请选择调拨原因',information!,ok!)
- dw_uc.SetFocus()
- dw_uc.SetColumn("u_outware_move_reason")
- RETURN
- END IF
-
- uo_ware.outdate = dw_uc.Object.u_outware_move_outdate[uc_row] // 发生时间
- uo_ware.outrep = dw_uc.Object.u_outware_move_outrep[uc_row] // 经手人
- uo_ware.dscrp = dw_uc.Object.u_outware_move_dscrp[uc_row] //备注
- uo_ware.sstorageid = dw_uc.Object.u_outware_move_sstorageid[uc_row]
- uo_ware.dstorageid = dw_uc.Object.u_outware_move_dstorageid[uc_row]
- uo_ware.relcode = dw_uc.Object.u_outware_move_relcode[uc_row]
- uo_ware.reason = dw_uc.Object.u_outware_move_reason[uc_row]
-
-
-
- FOR i = 1 To dw_child.RowCount()
- IF dw_child.Object.u_outwaremovemx_mtrlwareid[i] > 0 THEN
- IF uo_ware.acceptmx(dw_child.Object.u_outwaremovemx_mtrlwareid[i],&
- dw_child.Object.u_outwaremovemx_qty[i],&
- dw_child.Object.u_outwaremovemx_addqty[i],&
- dw_child.Object.u_outwaremovemx_price[i],&
- arg_msg,dw_child.Object.pid[i],&
- dw_child.Object.u_outwaremovemx_mxdscrp[i],&
- dw_child.Object.u_outwaremovemx_newplancode[i],&
- dw_child.Object.u_outwaremovemx_packqty[i]) = 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('提示','保存操作成功!',information!,ok!)
- //write ini
- f_SetProfileString (sys_empid,dw_uc.DataObject, "ddlb_sstorageid",String(dw_uc.Object.u_outware_move_sstorageid[dw_uc.GetRow()]))
- f_SetProfileString (sys_empid,dw_uc.DataObject, "ddlb_dstorageid",String(dw_uc.Object.u_outware_move_dstorageid[dw_uc.GetRow()]))
- //
- Long ll_row
- ll_row = dw_uc.GetRow()
- dw_uc.SelectRow(0,False)
- dw_uc.SelectRow(ll_row,True)
- wf_refresh_curuc(uo_ware.outwareid) //刷新uc
- ELSE
- IF uo_ware.newbegin(arg_msg) = 0 THEN
- MessageBox('错误',arg_msg,stopsign!,ok!)
- RETURN
- END IF
- END IF
- CALL Super::Clicked
- IF dw_edit_mode THEN
- Parent.TriggerEvent("insert_childrow")
- //read ini
- dw_uc.SetRedraw(False)
- String ls_sstorageid,ls_dstorageid
- ls_sstorageid = f_ProfileString (sys_empid,dw_uc.DataObject, "ddlb_sstorageid",'0')
- ls_dstorageid = f_ProfileString (sys_empid,dw_uc.DataObject, "ddlb_dstorageid",'0')
- dw_uc.Object.u_outware_move_sstorageid[dw_uc.GetRow()] = Long(ls_sstorageid)
- dw_uc.Object.u_outware_move_dstorageid[dw_uc.GetRow()] = Long(ls_dstorageid)
- dw_uc.SetColumn("u_outware_move_outdate")
- 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_move
- end type
- event cb_edit::clicked;String arg_msg = ''
- IF Not f_power_ind(81) THEN
- MessageBox('提示','你没有权限',information!,ok!)
- RETURN
- END IF
- 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.u_outware_move_outwareid[uc_row],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_move
- end type
- event cb_delet::clicked;if dw_edit_mode then return
- string arg_msg=''
- if not f_power_ind(613) then
- messagebox('提示','你没有权限',information!,ok!)
- return
- end if
- IF MessageBox ("询问","是否确定要删除当前单据吗?",Question!,YesNo! ) = 2 THEN RETURN
- long uc_row
- uc_row=dw_pageretr.getrow()
- if uc_row<=0 then
- messagebox('提示','请选定当前目标单据!',information!,ok!)
- return
- end if
- if uo_ware.cancel(dw_pageretr.object.u_outware_move_outwareid[uc_row],arg_msg)=0 then
- messagebox('错误',arg_msg,stopsign!,ok!)
- ELSE
- //日志
- long ls_id
- string ls_code
- ls_id=dw_pageretr.object.u_outware_move_outwareid[uc_row]
- ls_code=dw_pageretr.object.u_outware_move_outwarecode[uc_row]
- f_setsysoplog('仓库调拨单','仓库调拨单删除,ID:'+string(LS_id)+',code:'+ls_code,arg_msg,true)
- //--
- MESSAGEBOX('提示','删除单据'+string(dw_pageretr.object.u_outware_move_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_move
- integer x = 1257
- end type
- event cb_addzy::clicked;call super::clicked;m_Dfc_Control_PopupMenu dmPopupMenu
- string menustr
- menustr="Text=增加备注~tEvent=ue_addzy"
- 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_move
- integer width = 210
- end type
- event cb_auditing::clicked;call super::clicked;IF dw_edit_mode THEN RETURN
- String arg_msg = ''
- IF MessageBox ("询问","是否确定要审核当前单据吗?",Question!,YesNo! ) = 2 THEN RETURN
- Long pagerert_row
- dw_pageretr.accepttext()
- pagerert_row = dw_pageretr.GetRow()
- IF pagerert_row <= 0 THEN
- MessageBox('提示','请选定当前目标单据!',information!,ok!)
- RETURN
- END IF
- IF uo_ware.getinfo(dw_pageretr.Object.u_outware_move_outwareid[pagerert_row],arg_msg) = 0 THEN
- MessageBox('错误',arg_msg,stopsign!,ok!)
- RETURN
- END IF
- IF dw_pageretr.Object.u_outware_move_flag[pagerert_row] = 0 THEN
- IF NOT f_power_ind(82) THEN
- MessageBox('提示','你没有权限',information!,ok!)
- RETURN
- END IF
-
- IF uo_ware.ss_auditing(publ_operator,arg_msg) = 0 THEN
- MessageBox('错误',arg_msg,stopsign!,ok!)
- ELSE
- MessageBox('提示','调出审核成功!',information!,ok!)
- wf_refresh_curuc(dw_pageretr.Object.u_outware_move_outwareid[pagerert_row])
- END IF
-
- ELSE
- IF NOT f_power_ind(1400) THEN
- MessageBox('提示','你没有权限',information!,ok!)
- RETURN
- END IF
-
- IF uo_ware.ds_auditing(publ_operator,arg_msg) = 0 THEN
- MessageBox('错误',arg_msg,stopsign!,ok!)
- ELSE
- MessageBox('提示','调入审核成功!',information!,ok!)
- wf_refresh_curuc(dw_pageretr.Object.u_outware_move_outwareid[pagerert_row])
- END IF
- END IF
- end event
- type cb_xm from w_publ_1ton_share_detail`cb_xm within w_outware_move
- integer x = 1509
- end type
- event cb_xm::clicked;is_mx_menustr = ''
- IF dw_edit_mode THEN
- is_mx_menustr += "|" + "Text=批由辅数和配置计算数量~tEvent=ue_cmpl_status_qty"
- ELSE
- is_mx_menustr += "|" + "Text=修改明细单价~tEvent=ue_mod_price"
- END IF
- CALL Super::Clicked
- //if dw_pageretr.getrow() = 0 then return
- //dw_pageretr.accepttext()
- //
- //m_Dfc_Control_PopupMenu dmPopupMenu
- //String menustr
- //
- //IF dw_edit_mode THEN
- // menustr = "Text=增明细~tEvent=ue_addmx"
- // menustr = menustr + "|" + "Text=删明细~tEvent=ue_deletemx"
- // menustr = menustr + "|" + "Text=批由辅数和配置计算数量~tEvent=ue_cmpl_status_qty"
- //END IF
- //
- //long ll_flag,ll_d_auditFlag
- //ll_flag = dw_pageretr.object.u_outware_move_flag[dw_pageretr.getrow()]
- //ll_d_auditFlag = dw_pageretr.object.u_outware_move_d_auditflag[dw_pageretr.getrow()]
- //IF ll_flag = 1 AND ll_d_auditFlag = 0 THEN
- // IF menustr = '' THEN
- // menustr = menustr + "Text=修改明细单价~tEvent=ue_mod_price"
- // ELSE
- // menustr = menustr + "|" + "Text=修改明细单价~tEvent=ue_mod_price"
- // END IF
- //END IF
- //
- //IF if_MtrlPicView THEN
- // IF Trim(menustr) <> "" THEN
- // menustr = menustr + "|" + "Text=-"
- // menustr = menustr + "|" + "Text=明细物料图片查看~tEvent=ue_MtrlPicView"
- // ELSE
- // menustr = "Text=明细物料图片查看~tEvent=ue_MtrlPicView"
- // END IF
- //END IF
- //
- //
- //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_retrieve from w_publ_1ton_share_detail`cb_retrieve within w_outware_move
- end type
- type cb_xls from w_publ_1ton_share_detail`cb_xls within w_outware_move
- integer x = 2144
- end type
- type cb_help from w_publ_1ton_share_detail`cb_help within w_outware_move
- integer x = 2446
- end type
- type cb_auditing_cancel from w_publ_1ton_share_detail`cb_auditing_cancel within w_outware_move
- integer x = 1047
- integer width = 210
- end type
- event cb_auditing_cancel::clicked;call super::clicked;IF dw_edit_mode THEN RETURN
- String arg_msg = '',ls_code,ls_opemp,ls_outpart
- IF MessageBox ("询问","是否确定要撤审当前单据吗?",Question!,YesNo! ) = 2 THEN RETURN
- Long pagerert_row
- dw_pageretr.AcceptText()
- pagerert_row = dw_pageretr.GetRow()
- IF pagerert_row <= 0 THEN
- MessageBox('提示','请选定当前目标单据!',information!,ok!)
- RETURN
- END IF
- IF uo_ware.getinfo(dw_pageretr.Object.u_outware_move_outwareid[pagerert_row],arg_msg) = 0 THEN
- MessageBox('错误',arg_msg,stopsign!,ok!)
- RETURN
- END IF
- IF dw_pageretr.Object.u_outware_move_flag[pagerert_row] = 1 AND dw_pageretr.Object.u_outware_move_d_auditflag[pagerert_row] = 0 THEN
- IF NOT f_power_ind(916) THEN
- MessageBox('提示','你没有权限',information!,ok!)
- RETURN
- END IF
-
- IF uo_ware.c_ss_auditing(arg_msg) = 0 THEN
- MessageBox('错误',arg_msg,stopsign!,ok!)
- ELSE
- MessageBox('提示','调出撤审成功!',information!,ok!)
- wf_refresh_curuc(dw_pageretr.Object.u_outware_move_outwareid[pagerert_row])
- END IF
-
- ls_code = dw_pageretr.Object.u_outware_move_outwarecode[pagerert_row]
- ls_opemp = dw_pageretr.Object.u_outware_move_operator[pagerert_row]
- ls_outpart = dw_pageretr.Object.u_outware_move_relcode[pagerert_row]
- f_setsysoplog('仓库调拨单','调出撤审'+',code:'+ls_code+',相关号码:'+ls_outpart+',建立人:'+ls_opemp,arg_msg,TRUE)
-
-
- ELSEIF dw_pageretr.Object.u_outware_move_flag[pagerert_row] = 1 AND dw_pageretr.Object.u_outware_move_d_auditflag[pagerert_row] = 1 THEN
- IF NOT f_power_ind(1401) THEN
- MessageBox('提示','你没有权限',information!,ok!)
- RETURN
- END IF
-
- IF uo_ware.c_ds_auditing(arg_msg) = 0 THEN
- MessageBox('错误',arg_msg,stopsign!,ok!)
- ELSE
- MessageBox('提示','调入撤审成功!',information!,ok!)
- wf_refresh_curuc(dw_pageretr.Object.u_outware_move_outwareid[pagerert_row])
- END IF
-
- ls_code = dw_pageretr.Object.u_outware_move_outwarecode[pagerert_row]
- ls_opemp = dw_pageretr.Object.u_outware_move_operator[pagerert_row]
- ls_outpart = dw_pageretr.Object.u_outware_move_relcode[pagerert_row]
- f_setsysoplog('仓库调拨单','调入撤审'+',code:'+ls_code+',相关号码:'+ls_outpart+',建立人:'+ls_opemp,arg_msg,TRUE)
-
- END IF
- end event
- type p_msg from w_publ_1ton_share_detail`p_msg within w_outware_move
- end type
- type p_help from w_publ_1ton_share_detail`p_help within w_outware_move
- end type
- type p_encl from w_publ_1ton_share_detail`p_encl within w_outware_move
- end type
- type p_other from w_publ_1ton_share_detail`p_other within w_outware_move
- end type
- type gb_3 from w_publ_1ton_share_detail`gb_3 within w_outware_move
- end type
- type ln_bar from w_publ_1ton_share_detail`ln_bar within w_outware_move
- end type
- type ln_bar2 from w_publ_1ton_share_detail`ln_bar2 within w_outware_move
- end type
- type r_bar from w_publ_1ton_share_detail`r_bar within w_outware_move
- end type
- type ln_1 from w_publ_1ton_share_detail`ln_1 within w_outware_move
- end type
- type ln_2 from w_publ_1ton_share_detail`ln_2 within w_outware_move
- end type
- type st_2 from statictext within w_outware_move
- integer x = 750
- integer y = 204
- integer width = 201
- 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 = "状 态"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type ddlb_status from dropdownlistbox within w_outware_move
- integer x = 965
- integer y = 192
- integer width = 549
- integer height = 300
- 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_d_auditFlag = -1
- ELSEIF Index = 2 THEN
- cur_flag = 0
- cur_d_auditFlag = 0
- ELSEIF Index = 3 THEN
- cur_flag = 1
- cur_d_auditFlag = 0
- ELSEIF Index = 4 THEN
- cur_flag = 1
- cur_d_auditFlag = 1
-
- END IF
- PARENT.TriggerEvent('retrieve_pageretr')
- end event
- type cbx_packqty_cmpl from checkbox within w_outware_move
- integer x = 3351
- integer y = 80
- integer width = 576
- integer height = 60
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217739
- string text = "录入包装数计算数量"
- end type
- event clicked;IF THIS.Checked THEN
- ii_packqty_cmpl = 1
- ELSE
- ii_packqty_cmpl = 0
- END IF
- f_SetProfileString (sys_empid,publ_userid+'_'+dw_uc.DataObject, "packqty_cmpl",String(ii_packqty_cmpl))
- end event
- event constructor;this.backcolor = 14215660
- ii_packqty_cmpl = Long(f_ProfileString (sys_empid,publ_userid+'_'+dw_uc.DataObject, "packqty_cmpl",'0'))
- IF ii_packqty_cmpl = 1 THEN
- THIS.Checked = TRUE
- ELSE
- THIS.Checked = FALSE
- END IF
- //this.y = cbx_enamt_edit.y
- //this.x = cbx_enamt_edit.x + cbx_enamt_edit.width + 10
- end event
|