将传统和汽车类传统主题添加合同审批
This commit is contained in:
parent
8572776041
commit
38a6578528
@ -287,6 +287,20 @@
|
||||
|
||||
|
||||
init();
|
||||
|
||||
function selectManySubject(){
|
||||
AsDialog.OpenSelector("selectManySubject","","dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px",
|
||||
function(sReturn){
|
||||
if(!sReturn||sReturn=="_CANCEL_"||sReturn=="")
|
||||
{
|
||||
//alert(getHtmlMessage('1'));//请选择一条信息!
|
||||
return;
|
||||
}
|
||||
sReturn = sReturn.split("@");
|
||||
setItemValue(0,0,"subjectid",sReturn[0]);
|
||||
setItemValue(0,0,"subjectname",sReturn[1]);
|
||||
},"请选择客户",'');
|
||||
}
|
||||
</script>
|
||||
<%/*~END~*/%>
|
||||
|
||||
|
||||
@ -61,7 +61,8 @@
|
||||
var isNetCar = sReturn[7];
|
||||
var signType = sReturn[9];
|
||||
var sealType = sReturn[10];
|
||||
if("03" == customertype){
|
||||
|
||||
if(flowno=="BContractApproveApply"&&"03" == customertype){
|
||||
if(""== signType||null == signType||"undefined" == signType){
|
||||
alert("请在产品中配置签约方式!!!");
|
||||
return ;
|
||||
@ -71,13 +72,22 @@
|
||||
return ;
|
||||
}
|
||||
}
|
||||
|
||||
var gpsVendor = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.GpsVendorCheck","getGpsVendor","productId="+product_id);
|
||||
var sParams = "ApplyType=<%=sApplyType%>,CurUserID=<%=CurUser.getUserID()%>,gpsVendor="+gpsVendor;
|
||||
sParams =sParams+",signType="+signType+",sealType="+sealType+",isNetCar="+isNetCar+",carAttributes="+carAttributes+",leasform="+leasform+",ProductId="+product_id+",ProjectId="+id+",ProjectNo="+project_id+",customertype="+customertype+",ProjectName="+project_name+",ApplyType=<%=sApplyType%>";
|
||||
|
||||
if(flowno=="BContractApproveApply"){
|
||||
sParams =sParams+",operationType="+sReturn[8];
|
||||
}
|
||||
}else{
|
||||
var SubjectName = "";
|
||||
var messages = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","selectTitleName","SubjectId="+sReturn[5]);
|
||||
message = messages.split("@");
|
||||
if("error"!=message[0]){
|
||||
SubjectName = message[1];
|
||||
}
|
||||
sParams =sParams+",SubjectId="+sReturn[5]+",SubjectName="+SubjectName;
|
||||
}
|
||||
|
||||
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.contract.contractapproval.ContractApprovalStartAction","initFLow",sParams);
|
||||
|
||||
|
||||
@ -90,16 +90,8 @@
|
||||
alert("该用户无权限发起申请!");
|
||||
return;
|
||||
}
|
||||
|
||||
var messages = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","selectTitleName","SubjectId="+SubjectId);
|
||||
message = messages.split("@");
|
||||
if("error"==message[0]){
|
||||
alert(message[1]);
|
||||
return;
|
||||
}
|
||||
|
||||
var sParams = "ApplyType=<%=sApplyType%>,CurUserID=<%=CurUser.getUserID()%>";
|
||||
sParams =sParams+",SubjectId="+SubjectId+",SubjectName="+message[1]+",CustId="+custid+",CustName=" + custname+",ProductId="+productid+",ProductName="+productname+",businesstype="+businesstype;
|
||||
sParams =sParams+",CustId="+custid+",CustName=" + custname+",ProductId="+productid+",ProductName="+productname+",businesstype="+businesstype;
|
||||
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.projectapproval.ProjectApprovalStartAction","initFLow",sParams);
|
||||
if(typeof(sReturnInfo)=="undefined" || sReturnInfo=="" || sReturnInfo=="_CANCEL_" )
|
||||
{
|
||||
@ -135,7 +127,6 @@
|
||||
<script type="text/javascript">
|
||||
|
||||
<%/*~[Describe=选择客户;]~*/%>
|
||||
var SubjectId=''
|
||||
function selectCustomerName()
|
||||
{
|
||||
var userid="<%=CurUser.getUserID()%>";
|
||||
@ -176,7 +167,6 @@
|
||||
sReturn = sReturn.split("@");
|
||||
setItemValue(0,0,"productId",sReturn[0]);
|
||||
setItemValue(0,0,"productName",sReturn[1]);
|
||||
SubjectId = sReturn[2]
|
||||
},"请选择业务品种",'');
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -235,13 +235,14 @@ public class CustomerGroupCompanyController {
|
||||
//校验经销商额度是否足够
|
||||
public String checkTotal(JBOTransaction tx) throws Exception{
|
||||
Conn conn = new Conn(tx);
|
||||
String sql = "SELECT IFNULL(di.total,0)-IFNULL(lcc.CLEAN_LEASE_MONEY,0) total FROM lb_contract_info lci LEFT JOIN DISTRIBUTOR_INFO di ON di.distributor_no=lci.distributor_id LEFT JOIN LC_CALC_CONDITION lcc ON lcc.contract_id=lci.id WHERE lci.id=? ";
|
||||
String sql = "SELECT IFNULL(di.total,0)-IFNULL(lcc.CLEAN_LEASE_MONEY,0) total,di.CHANNELTYPE FROM lb_contract_info lci LEFT JOIN DISTRIBUTOR_INFO di ON di.distributor_no=lci.distributor_id LEFT JOIN LC_CALC_CONDITION lcc ON lcc.contract_id=lci.id WHERE lci.id=? ";
|
||||
List<Map<String, String>> results = conn.executeQuery(sql, this.contractId);
|
||||
String istotal = results.get(0).get("total");
|
||||
if(new Double(istotal)>0){
|
||||
return "true";
|
||||
String channeltype = results.get(0).get("CHANNELTYPE");
|
||||
if("01".equals(channeltype) && new Double(istotal) <= 0){
|
||||
return "经销商额度不足!";
|
||||
}
|
||||
return "经销商额度不足!";
|
||||
return "true";
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -62,8 +62,6 @@ public class LBProjectIntoTempInitBusiness extends BaseBussiness {
|
||||
bo.setAttributeValue("PROJECT_INDUSTRY", PROJECT_INDUSTRY);
|
||||
bo.setAttributeValue("InputUserID", asUser.getUserID());
|
||||
bo.setAttributeValue("InputTime", StringFunction.getToday());
|
||||
bo.setAttributeValue("subjectid",this.getAttribute("SubjectId"));
|
||||
bo.setAttributeValue("subjectname",this.getAttribute("SubjectName"));
|
||||
bm.saveObject(bo);
|
||||
String sMessage="true";
|
||||
return sMessage;
|
||||
|
||||
@ -24,6 +24,10 @@ public class LBProjectIntoTempToContractBusiness extends BaseBussiness {
|
||||
otherProperty.put("CONTRACT_NO",this.getAttribute("ContractNo").toString());
|
||||
// otherProperty.put("CONTRACT_NUMBER",this.getAttribute("ContractNo").toString());
|
||||
otherProperty.put("Project_Id", this.getAttribute("ProjectId").toString());
|
||||
|
||||
otherProperty.put("subjectid", this.getAttribute("SubjectId").toString());
|
||||
otherProperty.put("subjectname", this.getAttribute("SubjectName").toString());
|
||||
|
||||
service.copyOrLoadProjectInfoToContract(Sqlca, fromCondtion, null,otherProperty, ServiceOperatorEnum.FormalToTemp);
|
||||
String sMessage="true";
|
||||
return sMessage;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user