⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 js.jsp

📁 用java编写的网络架构程序
💻 JSP
字号:
<%@ page contentType="text/html; charset=GBK" %>
<script language='javascript'>

//查询按钮JS
function searchJs() {

  document.forms[0].TYPE.value = '1';
  searchJsValue();

}

//到按钮JS
function goJs() {
  if(forwardCheck( "OPERATETYPE","Q","查询")==false)return false;
  document.forms[0].TYPE.value = '2';
  pageSubmit();
}
//
function taxJs(){
  var x=document.forms[0].elements["FCGHT03__NOTAX_SUM"].value;
    var y=document.forms[0].elements["FCGHT03__CESS"].value;
    var z=x*y/100+x*1;
    document.forms[0].elements["FCGHT03__WITHTAX_SUM"].value=z;
  }
  //
function baxJs(){
  var x=document.forms[0].elements["FCGHT03__NOTAX_SUM"].value;
    var y=document.forms[0].elements["FCGHT03__ADVANCE_PROPORTION"].value;
    var z=x*y/100*1;
    document.forms[0].elements["FCGHT03__ADVANCE_SUM"].value=z;
  }
    //
function caxJs(){
  var x=document.forms[0].elements["FCGHT03__NOTAX_SUM"].value;
    var y=document.forms[0].elements["FCGHT03__PFG_PROPORTION"].value;
    var z=x*y/100*1;
    document.forms[0].elements["FCGHT03__PFG_SUM"].value=z;
  }
      //
function daxJs(){
  var x=document.forms[0].elements["FCGHT03__NOTAX_SUM"].value;
    var y=document.forms[0].elements["FCGHT03__PFO_PROPORTION"].value;
    var z=x*y/100*1;
    document.forms[0].elements["FCGHT03__PFO_SUM"].value=z;
  }
        //
function eaxJs(){
  var x=document.forms[0].elements["FCGHT03__NOTAX_SUM"].value;
    var y=document.forms[0].elements["FCGHT03__TAIL_PROPORTION"].value;
    var z=x*y/100*1;
    document.forms[0].elements["FCGHT03__TAIL_SUM"].value=z;
  }

function sumJs() {
    taxJs();
    baxJs();
    caxJs();
    daxJs();
    eaxJs();
}
//修改按钮JS
function updateJs() {
  if (forwardCheck( "OPERATETYPE", "Q", "查询")==false) return false;

  if (window.confirm( "确定要修改吗?")==false) return false;
  //数据检核
    if (document.forms[0].elements["FCGHT03__CONTRACT_STATUS"].value!=0)
  {
   alert("合同状态不对,不能修改");
    return false;
  }
  if(validateForm(document.forms[0])==false) return false;
  document.forms[0].TYPE.value = '3';
  pageSubmit();
}

//报批按钮JS
function docommitJs() {
  //document.forms[0].elements["FCGHT03__NOTAX_SUM"].readonly=true;
  // document.forms[0].elements["FCGHT03__NOTAX_SUM"].disable=true;
 // alert(document.forms[0].elements["FCGHT03__NOTAX_SUM"].disable);
   if(forwardCheck( "OPERATETYPE", "Q", "查询")==false) return false;
   if ((document.forms[0].elements["FCGHT03__CONTRACT_STATUS"].value!=0))
   {
     alert("合同状态不对,不能报批");
     return false;
   }
   //报批的时候合同方式必须选择
   if(validateSelf("FCGHT03__CONTRACT_MODE",'E0001',"合同方式")!=""){
     alert("报批的时候合同方式必须选择!");
     return false;
  }

   //数据检核
   var a1=document.forms[0].elements["FCGHT03__ADVANCE_PROPORTION"].value;
   var a2=document.forms[0].elements["FCGHT03__PFG_PROPORTION"].value;
   var a3=document.forms[0].elements["FCGHT03__PFO_PROPORTION"].value;
   var a4=document.forms[0].elements["FCGHT03__TAIL_PROPORTION"].value;
   var a5=document.forms[0].elements["FCGHT03__CESS"].value;
   var a6=document.forms[0].elements["FCGHT03__NOTAX_SUM"].value;

   var b1=document.forms[0].elements["FCGHT03__ADVANCE_PROPORTION_H"].value;
   var b2=document.forms[0].elements["FCGHT03__PFG_PROPORTION_H"].value;
   var b3=document.forms[0].elements["FCGHT03__PFO_PROPORTION_H"].value;
   var b4=document.forms[0].elements["FCGHT03__TAIL_PROPORTION_H"].value;
   var b5=document.forms[0].elements["FCGHT03__CESS_H"].value;
   var b6=document.forms[0].elements["FCGHT03__NOTAX_SUM_H"].value;
   if (a1!=b1){
     alert("报批时,预付款比例不能修改");
     document.forms[0].elements["FCGHT03__ADVANCE_PROPORTION"].value = b1;
     return false;
     }
   if (a2!=b2){
     alert("报批时,货款比例不能修改");
     document.forms[0].elements["FCGHT03__PFG_PROPORTION"].value = b2;
     return false;
      }
   if (a3!=b3){
     alert("报批时,其他款比例不能修改");
     document.forms[0].elements["FCGHT03__PFO_PROPORTION"].value = b3;
     return false;
     }
   if (a4!=b4){
     alert("报批时,尾款比例不能修改");
     document.forms[0].elements["FCGHT03__TAIL_PROPORTION"].value = b4;
     return false;
     }
   if (a5!=b5){
     alert("报批时,税率不能修改");
     document.forms[0].elements["FCGHT03__CESS"].value = b5;
     return false;
     }
   if (a6!=b6){
     alert("报批时,不含税总金额不能修改");
     document.forms[0].elements["FCGHT03__NOTAX_SUM"].value = b6;
     return false;
     }

   var sum=a1*1+a2*1+a3*1+a4*1;
    if(sum!=100){
      alert("各付款比例之和不为100%,不能报批");
      document.forms[0].elements["FCGHT03__ADVANCE_PROPORTION"].focus();
      return false;
    }

    if(document.forms[0].elements["FCGHT03__NOTAX_SUM"].value!=document.forms[0].elements["FCGHT03__MX_NOTAX_SUM"].value) {
      alert("合同不含税总金额与合同明细不含税金额之和不符,不能进行报批操作");
      return false;
    }

  if(window.confirm( "确定要报批吗?")==false) return false;
   document.forms[0].TYPE.value = '4';
   pageSubmit();
}

//撤销报批按钮JS
function discommitJs() {


   if(forwardCheck( "OPERATETYPE", "Q", "查询")==false) return false;
   if(window.confirm( "确定要撤销报批吗?")==false) return false;
   //数据检核
    if (document.forms[0].elements["FCGHT03__CONTRACT_STATUS"].value!=1)
  {
   alert("合同状态不对,不能撤销报批");
    return false;
  }


   document.forms[0].TYPE.value = '5';
   pageSubmit();
}

//选择合同明细
function selectJs() {
  var val = document.forms[0].elements[ "FCGHT03__CONTRACT_ID" ].value;
  location.href = "PCGHT06?WINDOW=open&PCGHT06__CONTRACT_ID_S=" + val + "&TYPE=1&PAGE=1";
}
//合同明细
function linkdtlJs() {
  var val = document.forms[0].elements[ "FCGHT03__CONTRACT_ID" ].value;
  location.href = "PCGHT04?WINDOW=open&PCGHT04__CONTRACT_ID_S=" + val + "&TYPE=1&PAGE=1";
}
//合同分批交货
function linkdlvJs() {
  var val = document.forms[0].elements[ "FCGHT03__CONTRACT_ID" ].value;
  location.href = "PCGHT07?WINDOW=open&PCGHT07__CONTRACT_ID_S=" + val + "&TYPE=1&PAGE=1";
}

//生效按钮JS
function doeffectJs() {
   if(forwardCheck( "OPERATETYPE", "Q", "查询")==false) return false;
   if(window.confirm( "确定要生效吗?")==false) return false;
   //数据检核
    if(document.forms[0].elements["FCGHT03__CONTRACT_STATUS"].value!=1)
  {
   alert("合同状态不对,不能生效");
    return false;
  }
   document.forms[0].TYPE.value = '6';
   pageSubmit();
}

//撤销生效按钮JS
function diseffectJs() {
 if(forwardCheck( "OPERATETYPE", "Q", "查询")==false) return false;
   if(window.confirm( "确定要撤销生效吗?")==false) return false;
   //数据检核
    if((document.forms[0].elements["FCGHT03__CONTRACT_STATUS"]!=2)&&(document.forms[0].elements["FCGHT03__CONTRACT_DLV_STATUS"].value!=0))
  {
   alert("合同状态不对,不能撤销生效");
    return false;
  }
   document.forms[0].TYPE.value = '7';
   pageSubmit();
}



//合同撤销按钮JS
function cancelJs() {
  if(forwardCheck( "OPERATETYPE", "Q", "查询")==false) return false;
   if(window.confirm( "确定要撤销合同吗?")==false) return false;
   document.forms[0].TYPE.value = '8';
   pageSubmit();
}

//强制结案按钮JS
function dofinishJs() {
  if(forwardCheck( "OPERATETYPE", "Q", "查询")==false) return false;
   if(window.confirm( "确定要强制结案吗?")==false) return false;
   document.forms[0].TYPE.value = '9';
   pageSubmit();
}
//打印按钮JS
function printJs(){

    var val = document.forms[0].elements[ "FCGHT03__CONTRACT_ID" ].value;
    StyleReport('ContractReport', '&v_CONTRACT_ID='+val);

}


</script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -