Merge branch 'develop' of http://git2.tenwa.com.cn/ApzlDev/apzl_leasing.git into zhanglei
This commit is contained in:
commit
f7377654b2
@ -1,7 +1,8 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||
String orgid=CurUser.getOrgID();
|
||||
String userid=CurUser.getUserID();
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||
<%
|
||||
String orgid=CurUser.getOrgID();
|
||||
String userid=CurUser.getUserID();
|
||||
ASObjectModel doTemp = new ASObjectModel("LB_CAR_LICENSE_PLATE_LIST");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
dwTemp.Style="1";
|
||||
@ -10,14 +11,35 @@ String userid=CurUser.getUserID();
|
||||
|
||||
dwTemp.genHTMLObjectWindow("");
|
||||
String sButtons[][] = {
|
||||
{"true","All","Button","新增","新增","newRecord()","","","",""},
|
||||
/* {"true","All","Button","新增","新增","newRecord()","","","",""}, */
|
||||
{"true","All","Button","修改","修改","edit()","","","",""},
|
||||
{"true","All","Button","删除","删除","do_delete()","","","","btn_icon_delete"},
|
||||
{"true","All","Button","牌照管理导入","牌照管理导入","importExcel()","","","","btn_icon_import"}
|
||||
{"true","All","Button","导入Excel","导入Excel","importExcel()","","","","btn_icon_import"},
|
||||
{"true","","Button","牌照模版下载","牌照模版下载","LicensePlateDownload()","","","","btn_icon_down",""},
|
||||
};
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
<iframe name="MyAtt" src="<%=com.amarsoft.awe.util.Escape.getBlankJsp(sWebRootPath,"正在下载附件,请稍候...")%>" style="background-color: blue" width=100% height=100% frameborder=0 hspace=0 vspace=0 marginwidth=0 marginheight=0 scrolling="no">
|
||||
</iframe>
|
||||
<form name=form1 method=post action="<%=sWebRootPath%>/servlet/view/fileTemplateView?CompClientID=<%=sCompClientID%>" target=MyAtt>
|
||||
<div style="display:none">
|
||||
<input id="sqlString" name=sqlString value="">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
/*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/
|
||||
|
||||
function LicensePlateDownload(){
|
||||
var sId="4c559680c16242c497816604aedce292";
|
||||
if (typeof(sId)=="undefined" || sId.length==0){
|
||||
return;
|
||||
}else{
|
||||
$("#sqlString").val("save@"+sId);
|
||||
form1.submit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function newRecord(){
|
||||
AsDialog.OpenSelector("SelectContractCarPhoto","","dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
|
||||
|
||||
@ -76,9 +98,11 @@ String userid=CurUser.getUserID();
|
||||
function edit(){
|
||||
var sUrl = "/Tenwa/ChannelPortal/BusinessHanding/CarPhoto/LBCarPhotoDocumentInfo.jsp";
|
||||
// AsControl.OpenView(sUrl,'','_self','');
|
||||
|
||||
var id=getItemValue(0, getRow(0), "contract_id");
|
||||
var car_id=getItemValue(0, getRow(0), "car_id");
|
||||
var cparam="contract_id="+id+"&car_id="+car_id;
|
||||
//var car_id=getItemValue(0, getRow(0), "car_id");
|
||||
//var cparam="contract_id="+id+"&car_id="+car_id;
|
||||
var cparam="contract_id="+id;
|
||||
AsDialog.PopView(sUrl,cparam,"dialogWidth=800px;dialogHeight=480px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(){
|
||||
reloadSelf();
|
||||
},"修改车牌号");
|
||||
@ -95,7 +119,7 @@ String userid=CurUser.getUserID();
|
||||
{width:"350px",height:"40px",title:"上传牌照管理数据"},function(){reloadSelf();});
|
||||
}
|
||||
|
||||
function exportExcel(){
|
||||
<%-- function exportExcel(){
|
||||
var param={};
|
||||
var tempParam={};
|
||||
var sparam="";
|
||||
@ -123,7 +147,7 @@ String userid=CurUser.getUserID();
|
||||
"FLOW_UNID="+tempParam["FLOW_UNID"]+"&OBJECTTYPE="+tempParam["OBJECTTYPE"]);
|
||||
downloadFile(attributeID);
|
||||
}else{
|
||||
alert("导出失败!");
|
||||
alert("导出失败!");sr
|
||||
}
|
||||
}
|
||||
|
||||
@ -131,6 +155,6 @@ String userid=CurUser.getUserID();
|
||||
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body");
|
||||
window.open(sWebRootPath+"/servlet/view/docDownloadServlet?CompClientID=<%=sCompClientID%>&sqlString=save@"+id, "downloadTemplate");
|
||||
}
|
||||
|
||||
--%>
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -5,12 +5,15 @@
|
||||
//获得组件参数
|
||||
String sObjectType=CurPage.getParameter("ObjectType");//
|
||||
String contract_id=CurPage.getParameter("contract_id");
|
||||
String car_id=CurPage.getParameter("car_id");
|
||||
|
||||
//String contract_id=CurPage.getParameter("contract_id");
|
||||
//String car_id=CurPage.getParameter("car_id");
|
||||
ASObjectModel doTemp = new ASObjectModel("LB_CAR_LICENSE_PLATE_INFO");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
dwTemp.Style="2"; // 设置DW风格 1:Grid 2:Freeform
|
||||
dwTemp.ReadOnly = "0"; // 设置是否只读 1:只读 0:可写
|
||||
dwTemp.genHTMLObjectWindow(car_id);
|
||||
//dwTemp.genHTMLObjectWindow(car_id);
|
||||
dwTemp.genHTMLObjectWindow(contract_id);
|
||||
String[][] sButtons=null;
|
||||
sButtons=new String[][]{
|
||||
{"true","","Button","保存","保存所有修改","importRecord()","","","",""},
|
||||
@ -18,7 +21,7 @@
|
||||
%><%@include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#FILE2").attr("type","file");debugger;
|
||||
$("#FILE2").attr("type","file");
|
||||
$("#FILE3").attr("type","file");
|
||||
$("#myiframe0").attr("enctype","multipart/form-data");
|
||||
var params={};
|
||||
@ -47,12 +50,18 @@
|
||||
}
|
||||
}
|
||||
function saveRecord(){
|
||||
var car_id="<%=car_id%>";
|
||||
<%-- var car_id="<%=car_id%>"; --%>
|
||||
var contract_id="<%=contract_id%>";
|
||||
var plate_number=getItemValue(0,getRow(0),"plate_number");
|
||||
var platetime=getItemValue(0,getRow(0),"platetime");
|
||||
var car_unit=getItemValue(0,getRow(0),"car_unit");
|
||||
var car_location=getItemValue(0,getRow(0),"car_location");
|
||||
var param="id="+car_id+",plate_number="+plate_number+",platetime="+platetime+",car_unit="+car_unit+",car_location="+car_location;
|
||||
var frame_number=getItemValue(0,getRow(0),"frame_number");
|
||||
var plate_status=getItemValue(0,getRow(0),"plate_status");
|
||||
|
||||
/* var car_unit=getItemValue(0,getRow(0),"car_unit"); */
|
||||
/* var car_location=getItemValue(0,getRow(0),"car_location"); */
|
||||
var param="id="+contract_id+",plate_number="+plate_number+",platetime="+platetime+",frame_number="+frame_number+",plate_status="+plate_status;
|
||||
//var param="id="+contract_id+",plate_number="+plate_number+",platetime="+platetime+",car_unit="+car_unit+",car_location="+car_location;
|
||||
|
||||
RunJavaMethodTrans("com.tenwa.channelmanage.SaveCarPhoto", "SaveCarPhoto", param);
|
||||
}
|
||||
//提交
|
||||
|
||||
@ -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")){
|
||||
|
||||
@ -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")%>";
|
||||
|
||||
@ -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("参数不能为空!");
|
||||
|
||||
@ -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){
|
||||
|
||||
@ -11,12 +11,33 @@
|
||||
{"true","All","Button","新增","新增","newRecord()","","","",""},
|
||||
{"true","All","Button","修改","修改","viewAndEdit()","","","","btn_icon_edit"},
|
||||
{"true","","Button","删除","删除","do_delete()","","","","btn_icon_delete"},
|
||||
{"true","","Button","GPSµ¼Èë","GPSµ¼Èë","importExcel()","","","","btn_icon_import"}
|
||||
{"true","","Button","导入Excel","导入Excel","importExcel()","","","","btn_icon_import"},
|
||||
{"true","","Button","GPS模版下载","GPS模版下载","GPSDownload()","","","","btn_icon_down",""},
|
||||
};
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
|
||||
<iframe name="MyAtt" src="<%=com.amarsoft.awe.util.Escape.getBlankJsp(sWebRootPath,"正在下载附件,请稍候...")%>" style="background-color: blue" width=100% height=100% frameborder=0 hspace=0 vspace=0 marginwidth=0 marginheight=0 scrolling="no">
|
||||
</iframe>
|
||||
<form name=form1 method=post action="<%=sWebRootPath%>/servlet/view/fileTemplateView?CompClientID=<%=sCompClientID%>" target=MyAtt>
|
||||
<div style="display:none">
|
||||
<input id="sqlString" name=sqlString value="">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
/*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/
|
||||
|
||||
function GPSDownload(){
|
||||
var sId="52b5c3fc03ec47709f6a972b9d5d5d7a";
|
||||
if (typeof(sId)=="undefined" || sId.length==0){
|
||||
return;
|
||||
}else{
|
||||
$("#sqlString").val("save@"+sId);
|
||||
form1.submit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function newRecord(){
|
||||
var sUrl = "/Tenwa/Gps/GpsRegister/GpsRegister.jsp";
|
||||
AsDialog.PopView(sUrl,"","resizable=yes;dialogWidth=700px;dialogHeight=330px;center:yes;status:no;statusbar:no",function(){
|
||||
|
||||
@ -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("@");
|
||||
|
||||
@ -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"%>
|
||||
@ -26,6 +26,8 @@
|
||||
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info02;Describe=定义变量,获取参数;]~*/%>
|
||||
|
||||
<%
|
||||
|
||||
|
||||
String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号
|
||||
String IsShowFormal = CurPage.getParameter("IsShowFormal");//流程编号
|
||||
|
||||
|
||||
@ -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()%>";
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -4,9 +4,11 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import jbo.app.tenwa.calc.VI_LC_RENT_PLAN;
|
||||
import jbo.com.tenwa.lease.comm.LB_CAR_LICENSE_PLATE_INFO;
|
||||
import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO;
|
||||
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
@ -14,17 +16,35 @@ import com.amarsoft.context.ASUser;
|
||||
import com.tenwa.comm.exception.BusinessException;
|
||||
|
||||
public class LBCarLicenseCallback extends BaseImportExcelCallBack{
|
||||
|
||||
|
||||
@Override
|
||||
public void run(ASUser CurUser, BizObject importObject,
|
||||
Map<String, String> model, Integer rowIndex, JBOTransaction tx,
|
||||
Transaction Sqlca) throws Exception {
|
||||
//获取Excel表中的合同编号(excel表中的字段为contract_id,实际输入的内容为合同编号)
|
||||
String contractNumber = importObject.getAttribute("contract_id").getString();
|
||||
|
||||
//jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO
|
||||
BizObject contractInfo=JBOFactory.createBizObjectQuery(jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO.CLASS_NAME,"contract_number=:contractNumber").setParameter("contractNumber", contractNumber).getSingleResult(false);
|
||||
//根据合同编号获取该合同信息
|
||||
BizObject contractInfo=JBOFactory.createBizObjectQuery(LB_CONTRACT_INFO.CLASS_NAME,"contract_number=:contractNumber").setParameter("contractNumber", contractNumber).getSingleResult(false);
|
||||
if(contractInfo != null){
|
||||
//获取该合同信息的合同id
|
||||
String contractId = contractInfo.getAttribute("ID").toString();
|
||||
importObject.setAttributeValue("contract_id", contractId);
|
||||
//判断该车辆信息表中是否已经存在该合同,如果不存在则可以新增
|
||||
BizObject carLicenseInfo=JBOFactory.createBizObjectQuery(LB_CAR_LICENSE_PLATE_INFO.CLASS_NAME,"CONTRACT_ID=:contractId").setParameter("contractId", contractId).getSingleResult(false);
|
||||
if(carLicenseInfo==null){
|
||||
BizObjectManager carLicenseManager =JBOFactory.getBizObjectManager(LB_CAR_LICENSE_PLATE_INFO.CLASS_NAME);
|
||||
BizObject carLicensePlate=carLicenseManager.newObject();
|
||||
carLicensePlate.setAttributeValue("CONTRACT_ID", contractId);
|
||||
carLicensePlate.setAttributeValue("PLATE_STATUS", importObject.getAttribute("plate_status").getString());
|
||||
carLicensePlate.setAttributeValue("FRAME_NUMBER", importObject.getAttribute("frame_number").getString());
|
||||
carLicensePlate.setAttributeValue("PLATE_NUMBER", importObject.getAttribute("plate_number").getString());
|
||||
carLicensePlate.setAttributeValue("PLATETIME", importObject.getAttribute("platetime").getString());
|
||||
carLicenseManager.saveObject(carLicensePlate);
|
||||
}else{
|
||||
throw new BusinessException("该合同编号已拥有车辆");
|
||||
}
|
||||
|
||||
}else{
|
||||
throw new BusinessException("²»´æÔڸúÏͬ±àºÅ");
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user