You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DS7/DSWeb/js/PaySettlementEdit2.js

65 lines
2.4 KiB
JavaScript

var mygrid_pay_2;
//两端去空格函数
String.prototype.trim = function () { return this.replace(/(^\s*)|(\s*$)/g, ""); }
function $(id) {
return document.getElementById(id);
}
function initWinScreen3() {
var winScreenHeight = 0;
var winScreenWidth = 0;
if (window.screen.height) {
winScreenHeight = window.screen.height;
}
if (window.screen.width) {
winScreenWidth = window.screen.width;
}
if (winScreenWidth >= 1440 && winScreenWidth >= 900) {
document.getElementById("mygrid_pay_2").style.height = "580px";
}
else if (winScreenWidth >= 1366 && winScreenWidth >= 768) {
document.getElementById("mygrid_pay_2").style.height = "340px";
}
else if (winScreenWidth >= 1024 && winScreenWidth >= 768) {
document.getElementById("mygrid_pay_2").style.height = "300px";
}
}
function initGrid3() {
//header
var headerArgs_order = new Array("核销结算单号", "客户名称", "币别", "核销金额", "核销结算人", "核销结算时间");
//width
var widthArgs_order = new Array("120", "120", "100", "100", "100", "120");
//column align
var colAlignArgs_order = new Array("center", "center", "center", "center", "center", "center");
//column sort
var colSortArgs_order = new Array("str", "str", "str", "str", "str", "str");
//column type
var colTypeArgs_order = new Array("ro", "ro", "ro", "ro", "ro", "ro");
mygrid_pay_2 = new TGridCommon("mygrid_pay_2", "form1", headerArgs_order, widthArgs_order, colAlignArgs_order, colSortArgs_order, colTypeArgs_order);
mygrid_pay_2.setResponseUrl("DoPayApplicationSettlementGridSource.aspx");
mygrid_pay_2.setRequest("DoPayApplicationSettlementGridSource.aspx?read=getshow&settlementid=" + $("h_settlementid").value + "&billno=" + $("h_billno").value + "&feetype=" + $("h_feetype").value + "&val=" + newGuid());
mygrid_pay_2.setSourceType("json");
mygrid_pay_2.setSkin("xp");
mygrid_pay_2.setImageUrl("../images/");
mygrid_pay_2.initGrid();
mygrid_pay_2.bind();
}
//获取GUID
function newGuid() {
var guid = "";
for (var i = 1; i <= 32; i++) {
var n = Math.floor(Math.random() * 16.0).toString(16);
guid += n;
if ((i == 8) || (i == 12) || (i == 16) || (i == 20))
guid += "-";
}
return guid.toUpperCase();
}