问题描述
我用lotus现有的模板文档集做了一个公文审批,但是里面的评阅人只有一个选择框,有个类型可以选择逐级或者同时也就是并行评阅,现在的程序可以逐级评阅和一级的并行评阅,那个逐级评阅没有问题,但是并行评阅就只能一个选择框里所有人一起并行了,相当于一级并行,现在我想要实现多级并行,也就是说我另外增加了两个评阅人的选择框,想要实现3级评阅,每级里是并行评阅的,但不知道该怎么做,它本身的评阅人名字是ReviewerList,我加的那两个评阅人分别是ReviewerList1和ReviewerList2,我设想了一下,如果ReviewerList是数组的话,那把ReviewerList放在ReviewerList(0)里,ReviewerList1放在ReviewerList(1)里,ReviewerList2放在ReviewerList(2)里,这样想是不是可行?应该怎么做好呢?我是新手,一点不会lotus,领导安排的任务,急要,实在是没办法,求助大家,拜托大家帮帮我,如果能远程帮我看看就更好了,谢谢!
解决方案
解决方案二:
这个是document的querysave的代码:SubQuerysave(SourceAsNotesuidocument,ContinueAsVariant)DimwsAsNewNotesUIWorkspaceSetsession=NewNotesSessionSetdb=session.CurrentDatabaseIfnoteIsNothingThenSetnote=source.Documentnote.RemoveItem("SaveOptions")Ifnote.NSubmitNow(0)="1"ThenNSubmitNow=True'ParallelReviewCheckIfnote.ReviewType(0)="2"Andnote.complete(0)="1"ThenGotoPContinueEndIf'Serialreviewcheck:Ifwearenotsubmittingforreview,wedon'tneedtodotherestofthisIf(Not(NSubmitNow)Ornote.Status(0)=3)Andnote.Resubmit(0)="0"ThenExitSubPContinue:'ValidatethattheReviewerListdoesnotincludetheoriginatorIfListIncludesOriginatorThen'Callnote.replaceitemvalue("$DocLib","RevCycle")MessageboxGetString(17)&GetString(18),0,GetString(41)continue=FalseIfFieldName="ReviewerList"Thensource.GoToField("ReviewerList")Elsesource.GoToField("NewReviewer")EndIfExitSubEndIf'ValidatethatReviewTimeisnotblank.ifitis,setto"0"(notimelimit)Setitem=note.GetFirstItem("ReviewTime")Ifnote.ReviewWindow(0)=""Thennote.ReviewWindow="0"EndIf'ValidatethatReviewTimehasavalidentryifReviewWindowisnot0Setitem=note.GetFirstItem("ReviewTime")Ifnote.ReviewWindow(0)<>"0"Then'Thisverifiesthatitisnot0orblankorastringIfitem.Text=""Oritem.Text="0"Oritem.TextLike"*错误*"ThenInvalidReviewTime=True'Thisverifiesthatitisawholenumber>0Elseifnote.ReviewTime(0)<1OrInt(note.ReviewTime(0))<>note.ReviewTime(0)ThenInvalidReviewTime=TrueEndIfIfInvalidReviewTimeThenFieldName="TimeLimit"MessageboxGetString(16)&GetString(18),0,GetString(41)continue=Falsesource.GoToField("ReviewTime")ExitSubEndIfEndIf'ValidatethattheReviewerListisnotblankIfnote.ReviewerList(0)=""Andnote.NSubmitNow(0)="1"ThenFieldName="ReviewerList"MessageboxGetString(19)&GetString(18),0,GetString(41)continue=Falsesource.GoToField("ReviewTime")ExitSubEndIf'SetthisglobalvariablesothescriptlibknowswhethertoputupmessageboxesorpagesClientType="Notes"'Ifthesend(functionintheSubmitForReviewscriptlib)wassuccessful,thensaveandclose'SaveOptionssupressesthesavepromptIfnote.ReviewType(0)="1"ThenIfSendToNextThennote.SaveOptions="1"source.CloseElseContinue=Falsesource.RefreshEndIfEndIfIfnote.ReviewType(0)="2"Then下面两句是我加的,但是报错,应该是不对的,我不会,试试的note.ReviewerList(0)=note.ReviewerList(0)note.ReviewerList(1)=note.ReviewerList1(0)IfSendToAllThennote.SaveOptions="1"source.CloseElseContinue=Falsesource.RefreshEndIfEndIffinish:ws.ViewRefreshEndSub
解决方案三:
里面用到的SendToAll的代码是FunctionSendToAllsendtoall=TrueDimParallelEditorsAsVariantDimCurrentEditorAsVariantDimiAsIntegerDimitemAsnotesitemDimuboundrevAsVariantDimprevrevAsVariantIfnote.hasitem("PrevRev")Thenprevrev=note.prevrevElseUboundRev=Ubound(ReviewerList)Redimprevrev(UboundRev)AsVariantEndIfInReview="0"i=0Setmailnote=NewNotesDocument(db)Setusername=NewNotesName(note.CurrentUser(0))Setfromname=NewNotesName(note.From(0))CurrentEditor=note.CurrentEditor'savenoteisacopyoftheoriginalwhichwesaveasaresponsetothecopythatwillbereviewedIfNot(note.HasItem("OriginalSaved"))Thennote.saveTrue,True,TrueSetsavenote=NewNotesDocument(db)Callnote.CopyAllItems(savenote,False)'fromtheNotesclient,thebodyfieldisnotavailabletonoteuntilauisaveIfnote.HasItem("Body")ThenSetrtitem=note.GetFirstItem("Body")savenote.RemoveItem("Body")Callrtitem.CopyItemToDocument(savenote,"Body")Elsenote.CopyBody=TrueEndIfCallsavenote.MakeResponse(note)savenote.~$RefOptions="1"savenote.Subject=GetString(1)savenote.saveTrue,True,Truenote.OriginalSaved=savenote.UniversalIdEndIfSetitem=note.getfirstitem("ReviewerLog")Ifnote.Complete(0)="1"Then'determinewhichitemintheCurrentEditorarrayisthecurrentreviewer'sincetheirreviewiscompete,removethemfromtheCurrentEditorfieldForallaInnote.CurrentEditorIfNotusername.ishierarchicalAndLcase(username.common)=Lcase(a)And_'ifnothier.userandnothier.reviewernameLcase(note.CurrentEditor(i))=Lcase(a)ThenCurrentEditor(i)=""PrevRev(i)=username.commonnote.prevrev=PrevRevnote.CurrentEditor=CurrentEditornote.Locked=""note.reviewernumber=note.reviewernumber(0)+1item.appendtotextlist(GetString(8))Elseifusername.ishierarchicalAndLcase(username.Canonical)=Lcase(a)And_'ifhier.userandhier.reviewernameLcase(note.CurrentEditor(i))=Lcase(a)ThenCurrentEditor(i)=""PrevRev(i)=username.abbreviatednote.prevrev=PrevRevnote.CurrentEditor=CurrentEditornote.Locked=""note.reviewernumber=note.reviewernumber(0)+1item.appendtotextlist(GetString(8))Elseifusername.ishierarchicalAndLcase(username.Common)=Lcase(a)And_'ifhier.userandnothier.reviewernameLcase(note.CurrentEditor(i))=Lcase(a)ThenCurrentEditor(i)=""PrevRev(i)=username.abbreviatednote.prevrev=PrevRevnote.CurrentEditor=CurrentEditornote.Locked=""note.reviewernumber=note.reviewernumber(0)+1item.appendtotextlist(GetString(8))EndIfi=i+1EndForallEndIfIf(ClientType="Notes"Andnote.NSubmitNow(0)="1")Or(ClientType<>"Notes"Andnote.SubmitNow(0)="1")Then'doc.wasjustsubmittedforreviewnote.CurrentEditor=note.ReviewerListnote.reviewernumber=0item.appendtotextlist(GetString(6))EndIfReviewerList=note.ReviewerListParallelEditors=note.CurrentEditor'determineifdoc.isstillinreview(ParallelEditorsarraywillhaveatleast1value)'changestatusto2(inreview)ifitwasanewdocumenti=0ForallbInParallelEditorsIfNotParallelEditors(i)=""ThenInReview="1"GosubContinueEndIfi=i+1EndForallContinue:'fixstatusIfinreview="1"Andnote.status(0)=1Thennote.status=2EndIfIfinreview="0"Thennote.status=3EndIf'settheduedateIfnote.ReviewWindow(0)<>"0"ThenSetdt=NewNotesDateTime("")dt.SetNowReviewTime=note.ReviewTime(0)IfIsnumeric(ReviewTime)Thendt.AdjustDay(ReviewTime)Setnote.DueDateTime=dtEndIfEndIfMailSection:'mailsenttoallreviewersIf(ClientType="Notes"Andnote.NSubmitNow(0)="1")Or(ClientType<>"Notes"Andnote.SubmitNow(0)="1")Theni=0ForallcInReviewerListIfNotParallelEditors(i)=ReviewerList(i)ThenExitFunctionEndIfi=i+1EndForallCallParSendMailIfClientType<>"Notes"Thennote.RemoveItem("SubmitNow")Elsenote.RemoveItem("NSubmitNow")EndIfnote.RemoveItem("Resubmit")ExitFunctionEndIf'determineifauthorshouldbenotifiedaftereachreviewIfnote.hasitem("Reviewers")Andnote.status(0)=2Andnote.NotifyAfter(0)="1"_AndNotusername.ishierarchicalAndNotfromname.ishierarchicalAndNotusername.common=fromname.commonThenmailnote.Form="Memo"Setrtitem=NewNotesRichTextItem(mailnote,"Body")rtitem.AppendText(GetString(10))Callrtitem.AppendDocLink(note,GetString(11))mailnote.SendTo=note.Frommailnote.Subject=GetString(8)NotificationType="complete"'Callmailnote.send(True,note.From)CallParSendMailExitFunctionElseifnote.status(0)=2Andnote.NotifyAfter(0)="1"_Andusername.ishierarchicalAndfromname.ishierarchicalAndNotusername.Abbreviated=fromname.abbreviatedThenmailnote.Form="Memo"Setrtitem=NewNotesRichTextItem(mailnote,"Body")rtitem.AppendText(GetString(10))Callrtitem.AppendDocLink(note,GetString(11))mailnote.SendTo=note.Frommailnote.Subject=GetString(8)NotificationType="complete"'Callmailnote.send(True,note.From)CallParSendMailExitFunctionEndIf'dociscompletedbyoneormore(butnotall)ofthereviewers;don'tnotifyauthoraftereachreviewerIfnote.hasitem("Reviewers")Andnote.status(0)=2Andnote.NotifyAfter(0)<>"1"Andusername.common<>fromname.commonThen'NotificationType="complete"CallParSendMailExitFunctionEndIf'determineifreviewiscompleteandauthorshouldbenotifiedIfInReview="0"Thenmailnote.SendTo=note.Frommailnote.Subject=GetString(2)NotificationType="complete"CallParSendMailnote.RemoveItem("DocAuthors")EndIf'ifI'mnotthefinalreviewerandmailgetssenttooriginatoraftereachreviewiscompleteIfclienttype="Notes"Andnote.complete(0)="1"AndInReview="1"Andnote.NotifyAfter(0)="1"Then'Callmailnote.send(True,note.from)Messagebox(GetString(8))CallParSendMailEndIfEndFunction这个代码实在是看不懂,不知道怎么改好,拜托大家了,帮帮我吧,谢谢
解决方案四:
没看明白问题。