流程中的附件一览修改
This commit is contained in:
parent
280aefa268
commit
ff71c1abca
@ -4,6 +4,7 @@
|
||||
<%
|
||||
//定义变量
|
||||
String sObjectNo = "";//--对象编号
|
||||
String isProduct = CurPage.getParameter("isProduct");
|
||||
//获得组件参数
|
||||
String sLibraryId = CurPage.getParameter("Library_id");
|
||||
String sDocType=CurPage.getParameter("DocType");//
|
||||
@ -18,16 +19,12 @@
|
||||
String doc=DocumentListAction.getFlowDocument(flowunid,flowNo);
|
||||
ASObjectModel doTemp = new ASObjectModel("LBDocumentInfo");
|
||||
|
||||
String condition="";
|
||||
if(doc.length()>0){
|
||||
condition=" LENGTH(itemno)=3 and codeno='DocList' and itemno in ("+doc+")";
|
||||
}else{
|
||||
condition=" 1=2";
|
||||
}
|
||||
doTemp.setColumnAttribute("Doc_Type","coleditsource","jbo.sys.CODE_LIBRARY,itemno,itemname,"+condition);
|
||||
if("FundCollectionFlow".equalsIgnoreCase(flowNo)){
|
||||
doTemp.setDefaultValue("Doc_Type", "099");
|
||||
doTemp.setReadOnly("Doc_Type", true);
|
||||
}
|
||||
if("N".equals(isProduct)){
|
||||
doc = "'004','004001'";
|
||||
doTemp.setDefaultValue("DOC_TYPE", "004");
|
||||
}
|
||||
doTemp.setHtmlEvent("DOC_TYPE","onchange","cleanSelect","0");
|
||||
doTemp.setHtmlEvent("one_Classify","onchange","cleanSelect","1");
|
||||
@ -36,7 +33,7 @@
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
dwTemp.Style="2"; // 设置DW风格 1:Grid 2:Freeform
|
||||
dwTemp.ReadOnly = "0"; // 设置是否只读 1:只读 0:可写
|
||||
dwTemp.genHTMLObjectWindow("");
|
||||
dwTemp.genHTMLObjectWindow(sLibraryId);
|
||||
String[][] sButtons=null;
|
||||
sButtons=new String[][]{
|
||||
{"true","","Button","保存","保存所有修改","importRecord()","","","",""},
|
||||
@ -80,7 +77,7 @@
|
||||
}
|
||||
|
||||
//加载二级分类选项
|
||||
<%-- function initOneClass(){
|
||||
function initOneClass(){
|
||||
var doc="<%=doc%>";
|
||||
var docType=$("#DOC_TYPE").val();
|
||||
var condition="";
|
||||
@ -91,7 +88,7 @@
|
||||
}
|
||||
var sql="select itemno,itemname from code_library where "+condition;
|
||||
initSelectOption(sql,"itemname","itemno","ONE_CLASSIFY");
|
||||
} --%>
|
||||
}
|
||||
|
||||
function initTwoClass(){
|
||||
var oneClass=$("#ONE_CLASSIFY").val();
|
||||
|
||||
@ -11,11 +11,14 @@
|
||||
String flowunid=CurPage.getParameter("ObjectNo");
|
||||
String sObjectType=CurPage.getParameter("FlowNo");
|
||||
String proj_id = CurPage.getParameter("proj_id");
|
||||
String contract_id = CurPage.getParameter("contract_id") ;
|
||||
String contract_id = CurPage.getParameter("contract_id");
|
||||
String isProduct = "Y";//是否产品相关流程Y:是,N:否
|
||||
if(proj_id==null||contract_id==null){
|
||||
isProduct = "N";
|
||||
}
|
||||
String type=CurPage.getParameter("type");
|
||||
if(type==null)type="";
|
||||
|
||||
|
||||
String otherWhere="";
|
||||
|
||||
if(type==""){
|
||||
@ -137,13 +140,14 @@ function upload(){
|
||||
var sDocType=getItemValue(0,getRow(),"doc_Type");
|
||||
var sOneClassify=getItemValue(0,getRow(),"one_Classify");
|
||||
var sTwoClassify=getItemValue(0,getRow(),"Two_Classify");
|
||||
var isProduct = "isProduct=<%=isProduct%>";
|
||||
if(typeof(id)=="undefined")id="";
|
||||
if(typeof(sDocType)=="undefined")sDocType="";
|
||||
if(typeof(sOneClassify)=="undefined")sOneClassify="";
|
||||
if(typeof(sTwoClassify)=="undefined")sTwoClassify="";
|
||||
|
||||
var param="Library_id="+id+"&DocType="+sDocType+"&TwoClassify="+sTwoClassify+"&OneClassify="+sOneClassify;
|
||||
param+="&flowunid=<%=flowunid%>&ObjectType=<%=sObjectType%>";
|
||||
param+="&flowunid=<%=flowunid%>&ObjectType=<%=sObjectType%>&"+isProduct;
|
||||
var sUrl="/Tenwa/Comm/Document/LBDocumentInfo.jsp";
|
||||
AsDialog.PopView(sUrl,param,"dialogWidth=480px;dialogHeight=400px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(message){
|
||||
reloadSelf();
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
AmarsoftUpload myAmarsoftUpload = new AmarsoftUpload();
|
||||
myAmarsoftUpload.initialize(pageContext);
|
||||
myAmarsoftUpload.upload();
|
||||
String docType=(String)myAmarsoftUpload.getRequest().getParameter("DOC_TYPE");//×ÊÁÏÀàÐÍ
|
||||
|
||||
String oneClassify=(String)myAmarsoftUpload.getRequest().getParameter("ONE_CLASSIFY");//一级分类
|
||||
String docId=(String)myAmarsoftUpload.getRequest().getParameter("DOC_NAME"); //二级分类
|
||||
String sFileName = myAmarsoftUpload.getFiles().getFile(0).getFileName(); //文件名称
|
||||
@ -18,6 +18,8 @@
|
||||
String cust_id=(String)myAmarsoftUpload.getRequest().getParameter("CUST_ID"); //客户ID
|
||||
BizObject docconfig=JBOFactory.createBizObjectQuery("jbo.app.tenwa.doc.LB_DOCCONFIG","id=:id").setParameter("id", docId).getSingleResult(false);
|
||||
String docName=docconfig.getAttribute("DOC_NAME").getString();
|
||||
String docType=docconfig.getAttribute("DOC_TYPE").getString();//×ÊÁÏÀàÐÍ
|
||||
String doc_Class_Itemno=docconfig.getAttribute("DOC_CLASS_ITEMNO").getString();//×ÊÁÏÀàÐÍ
|
||||
String libraryId=""; //附件编号
|
||||
String InputTime= StringFunction.getTodayNow(); //附件上传时间
|
||||
String flowunid= (String)myAmarsoftUpload.getRequest().getParameter("FLOWUNID"); //流程号
|
||||
@ -41,8 +43,8 @@
|
||||
sql+=otherWhere;
|
||||
sql+=otherParamWhere;
|
||||
BizObjectQuery query=libBm.createQuery(sql);
|
||||
query.setParameter("doc_type",NameManager.getItemName("DocList", docType));
|
||||
if(oneClassify.length()>0)query.setParameter("oneClassify", NameManager.getItemName("DocList", oneClassify));
|
||||
query.setParameter("doc_type",docType);
|
||||
if(oneClassify.length()>0)query.setParameter("oneClassify", oneClassify);
|
||||
if(docName.length()>0)query.setParameter("docName", docName);
|
||||
if(cust_id.length()>0)query.setParameter("cust_id", cust_id);
|
||||
lib=query.getSingleResult(true);
|
||||
@ -61,7 +63,7 @@
|
||||
sql+=otherWhere;
|
||||
sql+=otherParamWhere;
|
||||
query=relaBm.createQuery(sql);
|
||||
query.setParameter("doc_type",NameManager.getItemName("DocList", docType));
|
||||
query.setParameter("doc_type",docType);
|
||||
if(cust_id.length()>0)query.setParameter("cust_id", cust_id);
|
||||
BizObject rela=query.getSingleResult(true);
|
||||
String relativeid="";
|
||||
@ -80,16 +82,16 @@
|
||||
}
|
||||
//初始化附件
|
||||
lib=libBm.newObject();
|
||||
lib.setAttributeValue("Doc_Type", NameManager.getItemName("DocList", docType));
|
||||
lib.setAttributeValue("One_Classify", NameManager.getItemName("DocList", oneClassify));
|
||||
lib.setAttributeValue("doc_Class_Itemno",docconfig.getAttribute("doc_Class_Itemno").getString());
|
||||
lib.setAttributeValue("Doc_Type", docType);
|
||||
lib.setAttributeValue("One_Classify", oneClassify);
|
||||
lib.setAttributeValue("doc_Class_Itemno",doc_Class_Itemno);
|
||||
lib.setAttributeValue("serial_num", docconfig.getAttribute("serial_num").getString());
|
||||
lib.setAttributeValue("config_id", docId);
|
||||
lib.setAttributeValue("doc_name", docName);
|
||||
lib.setAttributeValue("Relative_Id", relativeid);
|
||||
lib.setAttributeValue("BUSINESS_CHECK","DocCheck_2");
|
||||
lib.setAttributeValue("REVIEW_CHECK","DocCheck_2");
|
||||
lib.setAttributeValue("doc_nature",docconfig.getAttribute("doc_nature").getString());
|
||||
lib.setAttributeValue("doc_nature","doc_nature");
|
||||
libBm.saveObject(lib);
|
||||
libraryId=lib.getAttribute("id").getString();
|
||||
}
|
||||
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user