📄 js.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 baxJs(){
var x=document.forms[0].elements["FWGHT03__NOTAX_SUM"].value;
var y=document.forms[0].elements["FWGHT03__ADVANCE_PROPORTION"].value;
var z=x*y/100*1;
document.forms[0].elements["FWGHT03__ADVANCE_SUM"].value=z;
}
function caxJs(){
var x=document.forms[0].elements["FWGHT03__NOTAX_SUM"].value;
var y=document.forms[0].elements["FWGHT03__PFG_PROPORTION"].value;
var z=x*y/100*1;
document.forms[0].elements["FWGHT03__PFG_SUM"].value=z;
}
function daxJs(){
var x=document.forms[0].elements["FWGHT03__NOTAX_SUM"].value;
var y=document.forms[0].elements["FWGHT03__TAIL_PROPORTION"].value;
var z=x*y/100*1;
document.forms[0].elements["FWGHT03__TAIL_SUM"].value=z;
}
function sumJs() {
baxJs();
caxJs();
daxJs();
}
//修改按钮JS
function updateJs() {
if (forwardCheck( "OPERATETYPE", "Q", "查询")==false) return false;
//修改的时候币种必须选择
var vCURRENCY_KINK = trim(document.forms[0].elements["FWGHT03__CURRENCY_KINK"].value);
if(vCURRENCY_KINK=="" || vCURRENCY_KINK==null){
alert("修改的时候币种必须选择!");
return false;
}
if (window.confirm( "确定要修改吗?")==false) return false;
//数据检核
if (document.forms[0].elements["FWGHT03__CONTRACT_STATUS"].value!=0)
{
alert("合同状态不对,不能修改");
return false;
}
document.forms[0].TYPE.value = '3';
pageSubmit();
}
//报批按钮JS
function docommitJs() {
document.forms[0].elements["FWGHT03__NOTAX_SUM"].readonly=true;
document.forms[0].elements["FWGHT03__NOTAX_SUM"].disable=true;
if(forwardCheck( "OPERATETYPE", "Q", "查询")==false) return false;
//数据检核
/*var a1=document.forms[0].elements["FWGHT03__ADVANCE_PROPORTION"].value;
// var a2=document.forms[0].elements["FWGHT03__PFG_PROPORTION"].value;
// var a3=document.forms[0].elements["FWGHT03__PFO_PROPORTION"].value;
//var a4=document.forms[0].elements["FWGHT03__TAIL_PROPORTION"].value;*/
//var a5=document.forms[0].elements["FWGHT03__CESS"].value;
var a6=document.forms[0].elements["FWGHT03__NOTAX_SUM"].value;
/*var b1=document.forms[0].elements["FWGHT03__ADVANCE_PROPORTION_H"].value;
// var b2=document.forms[0].elements["FWGHT03__PFG_PROPORTION_H"].value;
// var b3=document.forms[0].elements["FWGHT03__PFO_PROPORTION_H"].value;
// var b4=document.forms[0].elements["FWGHT03__TAIL_PROPORTION_H"].value;*/
// var b5=document.forms[0].elements["FWGHT03__CESS_H"].value;
//var b6=document.forms[0].elements["FWGHT03__NOTAX_SUM_H"].value;
/*if (a1!=b1){
alert("页面上的预付款比例数据等于"+a1+"和数据库中预付款比例数据"+b1+"不符,不能进行报批");
return false;
}
if (a2!=b2){
alert("页面上的货款比例数据等于"+a2+"和数据库中货款比例数据"+b2+"不符,不能进行报批");
return false;
}
if (a3!=b3){
alert("页面上的其它款比例数据等于"+a3+"和数据库中其它款比例数据"+b3+"不符,不能进行报批");
return false;
}
if (a4!=b4){
alert("页面上的尾款比例数据等于"+a4+"和数据库中尾款比例数据"+b4+"不符,不能进行报批");
return false;
}
if (a5!=b5){
alert("页面上的税率数据等于"+a5+"和数据库中税率数据"+b5+"不符,不能进行报批");
return false;
}
if (a6!=b6){
alert("页面上的不含税总金额数据等于"+a6+"和数据库中不含税总金额数据"+b6+"不符,不能进行报批");
return false;
}*/
/* var sum=a1*1+a2*1+a3*1+a4*1;
if(sum!=100){
alert("sum="+sum+" 四个比例相加必须等于一百");
}
*/
if ((document.forms[0].elements["FWGHT03__CONTRACT_STATUS"].value!=0))
{
alert("合同状态不对,不能报批");
return false;
}
//报批的时候币种必须选择
var vCURRENCY_KINK = trim(document.forms[0].elements["FWGHT03__CURRENCY_KINK"].value);
if(vCURRENCY_KINK=="" || vCURRENCY_KINK==null){
alert("报批的时候币种必须选择!");
return false;
}
//报批的时候合同方式必须选择
if(validateSelf("FWGHT03__CONTRACT_MODE",'E0001',"合同方式")!=""){
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 (document.forms[0].elements["FWGHT03__CONTRACT_STATUS"].value!=1)
{
alert("合同状态不对,不能撤销报批");
return false;
}
if(window.confirm( "确定要撤销报批吗?")==false) return false;
document.forms[0].TYPE.value = '5';
pageSubmit();
}
//选择合同明细
function selectJs() {
var val = document.forms[0].elements[ "FWGHT03__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[ "FWGHT03__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[ "FWGHT03__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["FWGHT03__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["FWGHT03__CONTRACT_STATUS"]!=2)&&(document.forms[0].elements["FWGHT03__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 = '9';
pageSubmit();
}
//强制结案按钮JS
function dofinishJs() {
if(forwardCheck( "OPERATETYPE", "Q", "查询")==false) return false;
if(window.confirm( "确定要强制结案吗?")==false) return false;
document.forms[0].TYPE.value = '10';
pageSubmit();
}
//打印按钮JS
function printJs(){
var val =document.forms[0].elements[ "FWGHT03__CONTRACT_ID" ].value;
StyleReport('HTMODEL2', '&v_id='+val);
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -