Merge branch 'develop' of http://git2.tenwa.com.cn/ApzlDev/apzl_leasing.git into zhuhuichen

This commit is contained in:
user 2018-06-07 09:54:20 +08:00
commit e916d79609
14 changed files with 307 additions and 36 deletions

View File

@ -15,7 +15,7 @@
//if(curOrgId.length()>13){
// curOrgId=curOrgId.substring(0,13);
//}
curOrgId=curOrgId.substring(0,curOrgId.length()-4);
curOrgId=curOrgId.substring(0,curOrgId.length()-3);
pid=curOrgId;
String selectType=CurPage.getParameter("selectType");
String flowno=CurPage.getParameter("flowno");

View File

@ -33,7 +33,9 @@
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=View02;Describe=定义变量,获取参数;]~*/%>
<%
HashMap<String,String>FlowFixedParam=GetFlowAction.getFlowParamByTask(CurPage.getParameter("TaskNo"),CurPage);
HashMap<String,String>FlowFixedParam=GetFlowAction.getFlowParamByTask(CurPage.getParameter("TaskNo"),CurPage);
FlowFixedParam.putAll(GetFlowAction.getFlowParamByFlowUnid(FlowFixedParam.get("ObjectNo")));
BizObject flowModel = GetFlowAction.getFlowModelParams(FlowFixedParam.get("FlowNo"),FlowFixedParam.get("PhaseNo")); //任务配置
String isPageRead=flowModel.getAttribute("ISREADONLY").getString(); //业务页面是否只读
if(null!=isPageRead&&isPageRead.endsWith("Y")){

View File

@ -141,6 +141,8 @@ $(function(){
paramJson["CUSTOMERTYPE"]="<%=startMap.get("CUSTOMERTYPE")%>";
paramJson["CustomerNature"]="<%=startMap.get("CustomerNature")%>";
paramJson["CUSTOMERID"]="<%=startMap.get("CUSTOMERID")%>";
paramJson["ContractId"]="<%=startMap.get("ContractId")%>";
//paramJson["CurFlowUser"]="<%=FlowFixedParam.get("CurFlowUser")%>";
//paramJson["AgentFlowUser"]="<%=FlowFixedParam.get("AgentFlowUser")%>";
//paramJson["Assignfinish"]="<%=FlowFixedParam.get("Assignfinish")%>";

View File

@ -201,6 +201,7 @@ function testTemplateLable(){
window.frames["AttachmentList"].viewFile();
}
function importConfigure(){
alert(11);
var sPara = getItemValue(0,getRow(0),'id');
if(typeof(sPara)=="undefined" || sPara.length==0 ){
alert("参数不能为空!");

View File

@ -88,7 +88,7 @@
getObj(0,i,"filelist").innerHTML=html;
getObj(0,i,"filelist").style["white-space"]="pre-wrap";
var height = getObj(0,i,"filelist").offsetHeight+1;
setItemStyle(0,i,"CUST_NAME","height="+height+"px");
setItemStyle(0,i,"FULLNAME","height="+height+"px");
};
}
function upload(id){

View File

@ -5,22 +5,24 @@
Content: 示例详情页面
History Log:
*/
String sPrevUrl = CurPage.getParameter("PrevUrl");
String contract_number = CurPage.getParameter("contract_number");
String sPrevUrl = CurPage.getParameter("ID");
if(sPrevUrl == null) sPrevUrl = "";
String sTempletNo = "LBInsuranceInfoDetail";//--模板号--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
dwTemp.genHTMLObjectWindow(CurPage.getParameter("id"));
dwTemp.genHTMLObjectWindow(CurPage.getParameter("ID"));
String sButtons[][] = {
{"true","All","Button","保存","保存所有修改","saveRecord()","","","","btn_icon_save"},
{"true","","Button","·µ»Ø","·µ»ØÁбíÒ³Ãæ","goBack()","","","","btn_icon_return"}
{"true","All","Button","·µ»Ø","·µ»ØÁбíÒ³Ãæ","goBack()","","","","btn_icon_return"}
};
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
function goBack(){
AsControl.OpenView("/Tenwa/Lease/App/BussinessOperation/InsuranceInfo/InsuranceInfoList.jsp", "","_self","");
var sPara = "<%=contract_number%>";
AsControl.OpenView("/Tenwa/Lease/App/BussinessOperation/InsuranceInfo/LBInsuranceInfoList.jsp", "contract_number="+sPara,"_self","");
}
function saveRecord(){
as_save("myiframe0");

View File

@ -15,36 +15,23 @@
dwTemp.ReadOnly = "1"; //Ö»¶Áģʽ
dwTemp.setPageSize(10);
dwTemp.genHTMLObjectWindow("");
String sButtons[][] = {
{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add"},
String sButtons[][] = {
/* {"true","All","Button","ÐÂÔö","ÐÂÔö","newRecord()","","","","btn_icon_add"},
{"true","","Button","ÐÞ¸Ä","ÐÞ¸Ä","viewAndEdit()","","","","btn_icon_detail"},
{"true","","Button","删除","删除","deleteRecord()","","","","btn_icon_delete"}
{"true","","Button","ɾ³ý","ɾ³ý","deleteRecord()","","","","btn_icon_delete"} */
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
function deleteRecord(){
var sPara = getItemValue(0,getRow(0),'ID');
if(typeof(sPara)=="undefined" || sPara.length==0 ){
alert("请选择一条数据!");
return ;
}
if(confirm('确实要删除吗?'))
as_delete(0);
function showNext(){
var param = getItemValue(0,getRow(0),'CONTRACT_NUMBER');
var SUrl = "/Tenwa/Lease/App/BussinessOperation/InsuranceInfo/LBInsuranceInfoList.jsp";
AsControl.OpenView(SUrl,'contract_number=' +param ,'_self','');
}
function newRecord(){
var sUrl = "/Tenwa/Lease/App/BussinessOperation/InsuranceInfo/InsuranceInfoDetail.jsp";
AsControl.OpenView(sUrl,'','_self','');
}
function viewAndEdit(){
var sUrl = "/Tenwa/Lease/App/BussinessOperation/InsuranceInfo/InsuranceInfoDetail.jsp";
var sPara = getItemValue(0,getRow(0),'ID');
if(typeof(sPara)=="undefined" || sPara.length==0 ){
alert("请选择一条数据!");
return ;
function afterSearch(){
for(var i=0;i<getRowCount(0);i++){
getObj(0,i,"CONTRACT_NUMBER").innerHTML='<a class="box" onclick="javascript:showNext()" style={color:#000;text-decoration:underline;}><font color="blue">'+getObj(0,i,"CONTRACT_NUMBER").innerHTML+'</font></a>';
}
AsControl.OpenView(sUrl,'id=' +sPara ,'_self','');
}
afterSearch();
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -0,0 +1,103 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
/*
Author: undefined 2018-05-31
Content: 示例详情页面
History Log:
*/
String Library_id = CurPage.getParameter("Library_id");
//定义变量
String sObjectNo = "";//--对象编号
//获得组件参数
String flowNo=CurPage.getParameter("FlowNo");
String sPrevUrl = CurPage.getParameter("PrevUrl");
//if(sPrevUrl == null) sPrevUrl = "/Tenwa/Lease/FamilyVisit/fieldSurvey/FieldSurveyList.jsp";
String sTempletNo = "InsureAttachmentUpload";//--模板号--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
//dwTemp.ReadOnly = "-2";//只读模式
dwTemp.genHTMLObjectWindow(Library_id);
String sButtons[][] = {
{"true","","Button","保存","保存所有修改","importRecord()","","","",""},
{"true","All","Button","取消","返回列表","pull()","","","","btn_icon_close"}
};
/* sButtonPosition = "south"; */
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
$(function() {
$("#FILE2").attr("type","file");
$("#myiframe0").attr("enctype","multipart/form-data");
var params={};
params["OBJECTTYPE"]="<%=flowNo%>";
var sparma="";
for(var key in params){
sparma=sparma+"<input type=\"text\" name=\""+key+"\" value=\""+params[key]+"\">"
}
$("#FILE2").append(sparma);
$("#myiframe0").attr("action","<%=sWebRootPath%>/Tenwa/Comm/DocList/DocListUploadTwo.jsp?CompClientID=<%=CurComp.getClientID()%>");
$("#myiframe0").attr("method","post");
});
var lock = false;
function importRecord(){
var o = document.forms["myiframe0"];
var sFileName = o.FILE2.value;
var nameArr = sFileName.split("\\");
setItemValue(0,0,"FileName",encodeURI(nameArr[nameArr.length-1]));
if (typeof(sFileName) == "undefined" || sFileName==""){
alert("请选上传的附件!");
return false;
}
if(/[!@'"#$%&\^*]/.test(nameArr[nameArr.length-1])){
alert("文件名不合法");
return;
}
var flag=CheckStr(nameArr[nameArr.length-1]);
/* if(flag!="true"){
alert("只能上传后缀名为"+flag+"的文件");
return ;
} */
var fileSize;
if(typeof(ActiveXObject) == "function"){ // IE
var fso = new ActiveXObject("Scripting.FileSystemObject");
var f1 = fso.GetFile(sFileName);
fileSize = f1.size;
}else{
fileSize = o.FILE2.files[0].size;
}
if(fileSize > 50*1024*1024){
alert("文件大于50MB不能上传");
return false;
}
if(lock){
//锁已经开启,在提交只会被阻断
AsDebug.showMessage('提醒:','请勿重复点击','','',true);
return false;
}else {
//锁开启,锁关闭只能是数据被处理完毕或者刷新页面,文档重新加载
lock = true;
}
return o.submit();
}
function CheckStr(filename){
var s="jpg,jpeg,png,bmp,gif,pdf,doc,docx,xls,xlsx,txt";
var flag="false";
var s2=s.split(",");
var filenamelast = filename.lastIndexOf(".");
var fileimage = filename.substr(filenamelast+1).toLowerCase();
for(var i=0;i<s2.length;i++){
if(fileimage==s2[i]){
return "true";
}
}
return s;
}
function pull(){
parent.AsDialog.ClosePage("_CANCEL_");
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -0,0 +1,129 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
/*
Author: undefined 2018-06-03
Content:
History Log:
*/
String contract_number = CurPage.getParameter("contract_number");
ASObjectModel doTemp = new ASObjectModel("LBInsuranceInfoTwoList");
if (""!=contract_number || null==contract_number){
doTemp.appendJboWhere("lci.CONTRACT_NUMBER='"+contract_number+"'");
}
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "1"; //只读模式
dwTemp.setPageSize(10);
dwTemp.genHTMLObjectWindow("");
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][] = {
{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
{"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'alert(getRowCount(0))')","","","","btn_icon_delete",""},
{"true","","Button","返回","返回","returnList()","","","","btn_icon_return",""},
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
function newRecord(){
var sUrl = "/Tenwa/Lease/App/BussinessOperation/InsuranceInfo/InsuranceInfoDetail.jsp";
var contractnumber = "<%=contract_number%>";
AsControl.OpenView(sUrl,'contract_number=' +contractnumber,'_self','');
}
function viewAndEdit(){
var sUrl = "/Tenwa/Lease/App/BussinessOperation/InsuranceInfo/InsuranceInfoDetail.jsp";
var sPara = getItemValue(0,getRow(0),'ID');
var sPara2 = getItemValue(0,getRow(0),'contract_number');
if(typeof(sPara)=="undefined" || sPara.length==0 ){
alert("参数不能为空!");
return ;
}
AsControl.OpenView(sUrl,'ID=' +sPara+'&contract_number='+sPara2,'_self','');
}
function returnList(){
AsControl.OpenView("/Tenwa/Lease/App/BussinessOperation/InsuranceInfo/InsuranceInfoList.jsp",'','_self','');
}
//在加载完表格后调用
function afterSearch(){
for(var i=0;i<getRowCount(0);i++){
getObj(0,i,"operation").innerHTML='<a class="box" onclick="upload(\''+getItemValue(0,i,"id")+'\')" style={color:#000;text-decoration:underline;}><font color="blue">上传</font></a>';
var filelist=getObj(0,i,"filelist").innerHTML;
var obj=eval('('+filelist+')');
var html="";
for(var file in obj){
//if(isReview!="true"&&sRightType!="ReadOnly"&&(sObjectType==obj[file]['objecttype'])&&username.replace(/\s+/g,"&nbsp;")==obj[file]['inputuser']){
// html+='<a class="btn_icon btn_icon_close" onclick="deleteFile(\''+obj[file]['id']+'\');">&nbsp;</a>';
//}
if(obj[file]['image']=="true"){
html+='<a class="btn_icon btn_icon_search" onclick="showImage(\''+obj[file]['id']+'\',\''+obj[file]['filename']+'\');">&nbsp;</a>';
}
if(obj[file]['word']=="true"){
html+='<a class="btn_icon btn_icon_search" onclick="showWord(\''+obj[file]['id']+'\',\''+obj[file]['filename']+'\');">&nbsp;</a>';
}
if(obj[file]['pdf']=="true"){
html+='<a class="btn_icon btn_icon_search" onclick="showPDF(\''+obj[file]['id']+'\',\''+obj[file]['filename']+'\');">&nbsp;</a>';
}
html+='<a onclick=downloadFile(\''+obj[file]['id']+'\')><font color="blue">'+obj[file]['filename']+'</font></a>';
html+='【上传时间:'+obj[file]['inputtime']+'】';
html+='【上传人:'+obj[file]['inputuser']+'】';
html+='【大小:'+Math.floor(obj[file]['FileSize']/1024*100)/100+'kb】';
html+='</br>';
}
getObj(0,i,"filelist").innerHTML=html;
getObj(0,i,"filelist").style["white-space"]="pre-wrap";
var height = getObj(0,i,"filelist").offsetHeight+1;
setItemStyle(0,i,"CONTRACT_NUMBER","height="+height+"px");
};
}
function upload(id){
var param="Library_id="+id;
var sUrl="/Tenwa/Lease/App/BussinessOperation/InsuranceInfo/InsureAttachmentUpload.jsp";
AsDialog.PopView(sUrl,param,"dialogWidth=450px;dialogHeight=400px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(message){
reloadSelf();
heping();
},"上传附件");
}
function heping(){
$("#TR_Right_myiframe0_0").attr("class","color_zebra0");
huanhang("Doc_Name");
}
function huanhang(col){
var tab=document.getElementById("myiframe0");
var a= getColIndex(0,col);
for(var i=0;i<tab.rows.length-1;i++){
$("#INPUT_myiframe0_"+col+"_"+i+"_"+a).parent().attr("style","white-space: pre-wrap;");
}
}
function showPDF(id,name){
var sUrl="/Tenwa/Comm/DocList/showPDF.jsp";
var param="attrid="+id;
AsControl.OpenPage(sUrl,param,"","");
}
function showWord(id,name){
var sUrl="/Tenwa/Comm/DocList/showWord.jsp";
var param="attrid="+id;
AsControl.OpenPage(sUrl,param,"","");
}
function showImage(id,name){
var sUrl="/Tenwa/Comm/DocList/showImage.jsp";
var param="attrid="+id;
AsDialog.PopView(sUrl,param,"dialogWidth=480px;dialogHeight=400px;",function(message){
},name);
}
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 deleteFile(id){
var sParams="attId="+id;
var sReturnInfo = RunJavaMethodTrans("com.tenwa.doc.action.DocListAction","deleteAttr",sParams);
reloadSelf();
heping();
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -20,6 +20,7 @@
var customer_id = sReturn[6];
var sParams = "ApplyType=<%=sApplyType%>,CurUserID=<%=CurUser.getUserID()%>";
sParams =sParams+",ProductId="+product_id+",ProjectId="+project_id+",ContractId="+contract_id+",ProjectName="+project_name+",FlowKey="+payment_number+",PaymentNumber="+payment_number+",ContractNumber="+contract_number+",CustomerId="+customer_id;
// alert(sParams);
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.assetsdisposal.assetsdisposalapply.AssetsDisposalStartAction","initFLow",sParams);
if(typeof(sReturnInfo)=="undefined" || sReturnInfo=="" || sReturnInfo=="_CANCEL_") return;
var sReturnInfos=sReturnInfo.split("@");

View File

@ -0,0 +1,33 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
/*
Author: undefined 2018-06-04
Content: 示例详情页面
History Log:
*/
String contractId = CurPage.getParameter("ContractId");
String sPrevUrl = CurPage.getParameter("PrevUrl");
/* String sFlowUnid = CurPage.getParameter("FlowUnid");
if(sFlowUnid == null) sFlowUnid = "";
alert(sFlowUnid); */
if(sPrevUrl == null) sPrevUrl = "";
String sTempletNo = "LcCarDisposeInfo";//--模板号--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
//doTemp.setColTips("", "测试");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
//dwTemp.ReadOnly = "-2";//只读模式
dwTemp.genHTMLObjectWindow(contractId);
String sButtons[][] = {
{"true","All","Button","保存","保存所有修改","as_save(0)","","","",""},
{String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""}
};
sButtonPosition = "south";
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
function returnList(){
AsControl.OpenView("<%=sPrevUrl%>", "","_self","");
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -26,6 +26,8 @@
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info02;Describe=定义变量,获取参数;]~*/%>
<%
String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号
String IsShowFormal = CurPage.getParameter("IsShowFormal");//流程编号

View File

@ -39,7 +39,7 @@
sProjId=bocl.getAttribute("proj_id").getString();
sProductId=bocl.getAttribute("productId").getString();
}
if (sProductId.equals("0005")){
/* if (sProductId.equals("0005")){
LeaseType="DoubleLease";
}else if(sProductId.equals("0001")){
LeaseType="NormalLease";
@ -47,7 +47,7 @@
LeaseType="CarBusiness";
}else{
LeaseType="NoBusiness";
}
} */
doTemp.setHtmlEvent("ONECLASSIFY","onchange","initTwoClass");
doTemp.setHtmlEvent("TWOCLASSIFY","onchange","initThreeClass");
@ -99,7 +99,7 @@
//加载一级分类选项
function initOneClass(status){
var oneClass=getItemValue(0,0,"ONECLASSIFY");
var sql="SELECT itemno,itemname FROM code_library WHERE codeno='DocList' AND itemno LIKE '005%' AND LENGTH(itemno)=6 and attribute1='<%=LeaseType%>'";
var sql="SELECT itemno,itemname FROM code_library WHERE codeno='DocList' AND itemno LIKE '005%' AND LENGTH(itemno)=6 ";
initSelectOption(sql,"itemname","itemno","ONECLASSIFY");
if(status=="edit"){
setItemValue(0,0,"ONECLASSIFY",oneClass);
@ -198,11 +198,11 @@
alert("请勾选合同模板!");
return;
}
alert(tempids);
var param={};
var tempParam={};
var sparam="";
// param["templateNo"]="0010";
tempParam["CurUserId"]="<%=CurUser.getUserID()%>";
tempParam["CurOrgId"]="<%=CurUser.getOrgID()%>";

View File

@ -6,9 +6,18 @@ import com.tenwa.flow.action.comm.BaseFlowStartAction;
import com.tenwa.util.SerialNumberUtil;
public class AssetsDisposalStartAction extends BaseFlowStartAction{
private String ContractId;
@Override
public void customOperation(JBOTransaction tx, BizObject flowBussiness)throws Exception {
String applyNo = SerialNumberUtil.getAssetsDisposalApplyNo(tx);
this.FlowParam.put("ApplyNo", applyNo);
this.FlowParam.put("ContractId", this.getContractId());
}
public String getContractId() {
return ContractId;
}
public void setContractId(String contractId) {
ContractId = contractId;
}
}