凭证
This commit is contained in:
parent
2416074e46
commit
43da0fe7b6
@ -16,6 +16,7 @@
|
||||
dwTemp.MultiSelect = false; //
|
||||
dwTemp.setPageSize(50);
|
||||
dwTemp.genHTMLObjectWindow("");
|
||||
dwTemp.MultiSelect = true;
|
||||
doTemp.setLockCount(2);
|
||||
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||
String sButtons[][] = {
|
||||
@ -96,15 +97,27 @@ function importFK(){
|
||||
|
||||
//导出凭证
|
||||
function createContractByTemplate(){
|
||||
var id=getItemValue(0,getRow(),'f3');
|
||||
if(typeof(id)=="undefined" || id.length==0 ){
|
||||
//var id=getItemValue(0,getRow(),'f3');
|
||||
var id = getItemValueArray(0,'f3');
|
||||
if(id.length == 0){
|
||||
AsDebug.showMessage("提示:", "请选择一条凭证信息!");
|
||||
}
|
||||
var idStr = "";
|
||||
for(var i=0;i<id.length;i++){
|
||||
if(i==0) idStr+="";
|
||||
idStr+="'"+id[i]+"'";
|
||||
if(i==id.length-1) {
|
||||
idStr+="";
|
||||
}else {
|
||||
idStr+=",";}
|
||||
}
|
||||
|
||||
//var voucher_number=getItemValue(0,0,'voucher_number');
|
||||
//var flags=getItemValueArray(0,'v8_flag');
|
||||
/* if(typeof(id)=="undefined" || id.length==0 ){
|
||||
alert("请选择数据!");
|
||||
return ;
|
||||
}
|
||||
var voucher_number=getItemValue(0,0,'voucher_number');
|
||||
|
||||
|
||||
var flags=getItemValueArray(0,'v8_flag');
|
||||
} */
|
||||
|
||||
//导出限制
|
||||
/* for(var y=0;y<flag.length;y++)
|
||||
@ -115,17 +128,16 @@ function createContractByTemplate(){
|
||||
return;
|
||||
}
|
||||
} */
|
||||
|
||||
var param={};
|
||||
var tempParam={};
|
||||
var sparam="";
|
||||
param["templateNo"]="f65a58d7f2c14a6e8d6f1ae38495a024";//选择的模板ID
|
||||
tempParam["Ff3"]=id;
|
||||
tempParam["OBJECTTYPE"]="FunctionCreate";
|
||||
tempParam["Ff3"]=idStr;
|
||||
tempParam["OBJECTTYPE"]="凭证导出";
|
||||
tempParam["FLOW_UNID"]=new Date().Format("yyyyMMddhhmmssSS");
|
||||
tempParam["CurUserId"]="<%=CurUser.getUserID()%>"
|
||||
tempParam["backtype"]="";
|
||||
tempParam["voucher_code"]=voucher_number;
|
||||
//tempParam["voucher_code"]=voucher_number;
|
||||
tempParam["fileSaveMode"]="<%=sFileSaveMode%>";
|
||||
tempParam["fileSavePath"]="<%=sFileSavePath%>";
|
||||
tempParam["fileNameType"]="<%=sFileNameType%>";
|
||||
@ -147,23 +159,26 @@ function createContractByTemplate(){
|
||||
//拼接凭证号到sparam参数的最后; 用replace方法把最后一个 } 替换成 @"voucher_code":"voucher_number"}
|
||||
var result=RunJavaMethodTrans("com.tenwa.officetempalte.action.CreateOfficeAction","createOfficeByTemplate",sparam);
|
||||
if(result!="success"){
|
||||
alert("Éú³ÉÎļþʧ°Ü!");return;
|
||||
alert("生成文件失败!");
|
||||
return;
|
||||
}else{
|
||||
var attributeID = AsControl.RunJsp("/Tenwa/Lease/Flow/Rent/BatchIncome/GetLBDocAttributeID.jsp",
|
||||
"FLOW_UNID="+tempParam["FLOW_UNID"]+"&OBJECTTYPE="+tempParam["OBJECTTYPE"]);
|
||||
downloadFile(attributeID);
|
||||
reloadSelf();
|
||||
/* AsDialog.PopView("/AppConfig/Document/AttachmentFiles.jsp",'AttributeID='+attributeID,"",function(){
|
||||
reloadSelf();
|
||||
},"下载文件"); */
|
||||
}
|
||||
/* for(i=0;i<id.length;i++){
|
||||
RunJavaMethodTrans("com.tenwa.leasing.serviceImpl.voucher.VoucherAction","updateVoucherStatus","f3="+id);
|
||||
} */
|
||||
if(result == "success"){
|
||||
|
||||
var attributeID = AsControl.RunJsp("/Tenwa/Lease/Flow/Rent/BatchIncome/GetLBDocAttributeID.jsp",
|
||||
"FLOW_UNID="+tempParam["FLOW_UNID"]+"&OBJECTTYPE="+tempParam["OBJECTTYPE"]);
|
||||
AsDialog.PopView("/AppConfig/Document/AttachmentFiles.jsp",'AttributeID='+attributeID,"",function(){
|
||||
reloadSelf();
|
||||
},"ÏÂÔØÎļþ");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
function downloadFile(id){
|
||||
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body");
|
||||
window.open(sWebRootPath+"/servlet/view/docDownloadServlet?CompClientID=<%=sCompClientID%>&sqlString=save@"+id, "downloadTemplate");
|
||||
}
|
||||
function showContractInsurance()
|
||||
{
|
||||
var sPara = getItemValue(0,getRow(0),'f3');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user