var u = ""; var w = ""; var pageCount = 20; //每页计数 var UrlParam = ""; var cacheKey = ""; var gid = ""; var companyid = ""; var pageTotalCount = 0; var totalCount = 0; var url = ""; var rdoAuditing = ""; var pageNum = 0; var auditingFlow = "FeeSettleAudit"; var chkBSChecked = false; var chkAccChecked = false; var chkETDChecked = false; var isEnteringDate = false; var strSearchDate = ""; var symbol = "null"; var strBFDate = ""; var strBTDate = ""; var strParam = ""; var searchKey = ""; var strInfo = ""; var customerName = ""; var billNo = ""; var recGid = ""; var billStatus = -1; var imgName = ""; //0-已审批1-未提交2-已提交 var btn = ""; $(function () { $.ajaxSetup({ async: false }); var winWidth = document.documentElement.clientWidth; var winHeight = document.documentElement.clientHeight; $("#txtBSFromDate").datepicker(); $("#txtBSToDate").datepicker(); $("#txtETDFromDate").datepicker(); $("#txtETDToDate").datepicker(); $("#txtACCFromDate").datepicker(); $("#txtACCToDate").datepicker(); $('.jqtransform').jqTransform(); u = UrlParm.parm("u"); w = UrlParm.parm("w"); //document.body.scroll = "no"; /*if ((winWidth <= 320)) { // && (winHeight == 985) $("#css").attr("href", "lib/css/list960.css"); } else if ((winWidth >= 360)) { // && (winHeight == 673) $("#css").attr("href", "lib/css/list1080.css"); }*/ //marginBottom表示滚动条离底部的距离,0表示滚动到最底部才加载,可以根据需要修改 new NeuF.ScrollPage(window, { delay: 1000, marginBottom: 0 }, function (offset) { if (offset > 0) { //$("#Loadding").show(); //加载提示 setTimeout(function () { //这里就是异步获取内容的地方,这里简化成一句话,可以根据需要修改 //$("#divContainer").append($("
第“" + ($(".content").size() + 1) + "”页内容
")); pageNum++; //var searchKey = ""; if (strSearchDate != "") { // symbol != "null" && symbol != "," searchKey = $("#txtSearch").val() + symbol + strSearchDate; } else { searchKey = $("#txtSearch").val(); } rdoAuditing = $('input[name="auditing"]:checked').val(); /*UrlParam = "&id=" + jsencrypt(decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"), gid) + "&p=" + escape(jsencrypt(decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"), companyid)) + "&s=" + jsencrypt(decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"), searchKey) + "&i=" + pageNum + "&c=" + pageCount; //" + PageIndex + " url = "lib/handler/PaymentAuditing.ashx?action=0" + strParam + "&au=" + escape(rdoAuditing) + "&k=" + jsencrypt(decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"), cacheKey) + "&u=" + jsencrypt(decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"), decrypt(u, decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"))) + "&w=" + jsencrypt(decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"), decrypt(w, decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"))) + UrlParam; fnList(cacheKey, pageTotalCount, url);*/ }, 1000); } }); $("#txtSearch").keydown(function () { $("#txtSearch").css("color", "#7d7d7d"); }); /*$("#txtSearch").focus(function () { //$("#txtSearch").val(""); if ($("#txtSearch").val() == "请输入提单号或者流水号") { $("#txtSearch").val(""); } });*/ $("#txtSearch").focus(function () { $("#txtSearch").val(""); }); $("#txtSearch").blur(function () { var txtSearchText = $("#txtSearch").val(); var strSearchText = new Array(); //定义一维数组 var result = ""; if ($("#txtSearch").val() == "") { //$("#txtSearch").css("color", "#acacac"); $("#txtSearch").val("请输入客户名称或者流水号"); } else { $("#txtSearch").css("color", "#7d7d7d"); } if (txtSearchText.indexOf(",") != -1) { strSearchText = txtSearchText.split(","); symbol = ","; } else if (txtSearchText.indexOf(";") != -1) { strSearchText = txtSearchText.split(";"); symbol = ";"; } else if (txtSearchText.indexOf("\\") != -1) { strSearchText = txtSearchText.split("\\"); symbol = "\\"; } else if (txtSearchText.indexOf("/") != -1) { strSearchText = txtSearchText.split("/"); symbol = "/"; } result = ""; if (strSearchText.length > 0) { for (var iCount = 0; iCount < strSearchText.length; iCount++) { if (!isDate(strSearchText[iCount])) { result += strSearchText[iCount] + symbol; } } } result = result.substring(0, result.length - 1); if (result != "") { $("#txtSearch").val(result); } }); fnPaymentAuditingList(); var itemContainHeight = winHeight - 5.625 * 16; $("#listItemContain").height(itemContainHeight); }); function isDate(dateString) { if (dateString.trim() == "") return true; var r = dateString.match(/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/); if (r == null) { return false; } else { return true; } } function fnComfirm() { if ($("#txtBSFromDate").val() != "") { strBFDate = $("#txtBSFromDate").val(); } if ($("#txtBSToDate").val() != "") { strBTDate = $("#txtBSToDate").val(); } $("#inquireParameter").css("display", "none"); } function fnClose() { fnComfirm(); } function fnParam() { var _leftDatumPoint = 0; var _topDatumPoint = 0; var _scrollWidth = 0; var _scrollHeight = 0; var myDate = new Date(); var _year = myDate.getFullYear(); //获取完整的年份(4位,1970-????) var _month = parseInt(myDate.getMonth()) + 1; //获取当前月份(0-11,0代表1月) var _day = myDate.getDate(); //获取当前日(1-31) _scrollWidth = Math.max(document.body.scrollWidth, document.documentElement.scrollWidth); _scrollHeight = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight); _leftDatumPoint = document.body.scrollLeft + document.body.clientWidth / 2 - 130; _topDatumPoint = 96; //document.body.scrollTop + document.body.clientHeight / 2 - 160; //96; $(".dateMask").width(_scrollWidth); $(".dateMask").height(_scrollHeight); $(".dateContain").css("left", _leftDatumPoint / 16 + "em"); $(".dateContain").css("top", _topDatumPoint / 16 + "em"); $("#inquireParameter").css("display", "block"); } function fnPaymentAuditingList() { $.ajaxSetup({ async: false }); searchKey = fnSearchParam(); pageTotalCount = 0; rdoAuditing = $('input[name="auditing"]:checked').val(); strParam = ""; if (strBFDate != "") { strParam = "&bf=" + jsencrypt(decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"), strBFDate); } else { strParam = "&bf="; } if (strBTDate != "") { strParam += "&bt=" + jsencrypt(decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"), strBTDate); } else { strParam += "&bt="; } strParam += "&au=" + escape(rdoAuditing); UrlParam = strParam + "&s=" + jsencrypt(decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"), searchKey) + "&t=1&l=50";// + pageCount; //" + PageIndex + " url = "../../Handler/Payment.ashx?action=0" + UrlParam; fnList(pageTotalCount, url); } function fnList(pageTotalCount, url) { $.ajax({ type: "post", dataType: "json", data: UrlParam, url: url, cache: false, success: function (msg) { strInfo = ""; $.each(msg, function (i, item) { if (item.GID != "" && item.GID != undefined && item.GID != null) { billNo = item.BILLNO; customerName = item.CUSTOMERNAME; recGid = item.GID; billStatus = parseInt(item.BILLSTATUS); switch (billStatus) { case 0: imgName = "../../Images/img04.png"; btn = ""; break; case 1: imgName = "../../Images/img03.png"; btn = " "; break; case 2: imgName = "../../Images/img03.png"; btn = " "; break; case 3: imgName = "../../Images/img06.png"; btn = ""; break; case 4: imgName = "../../Images/img04.png"; btn = ""; break; case 5: imgName = "../../Images/img04.png"; btn = ""; break; case 6: imgName = "../../Images/img05.png"; btn = " "; break } strInfo += "
"; strInfo += "
"; strInfo += "
" + billNo + " " + customerName + "" + btn + "
"; //strInfo += "
" + billNo + " " + customerName + "" + btn + "
"; strInfo += "
"; pageTotalCount++; } }); if (strInfo != "") { //$("#listItemContain").css("height", 3.1875 * pageTotalCount + "em"); $("#listItemContain").html(strInfo); } } }); } function fnSearchParam() { var strSearch = ""; var searchValue = $("#txtSearch").val(); if (searchValue != "请输入客户名称或者流水号") { if (searchValue.indexOf(",") != -1) { var arrsearchValue = searchValue.split(','); for (var i = 0; i < arrsearchValue.length; i++) { if (i == 0) { strSearch += "(i.BILLNO like '%" + arrsearchValue[i].toString() + "%' or i.CUSTOMERNAME like '%" + arrsearchValue[i].toString() + "%' or APPLICANT like '%" + arrsearchValue[i].toString() + "%' "; } else if (i < arrsearchValue.length - 1) { strSearch += "or i.BILLNO like '%" + arrsearchValue[i].toString() + "%' or i.CUSTOMERNAME like '%" + arrsearchValue[i].toString() + "%' or APPLICANT like '%" + arrsearchValue[i].toString() + "%' "; } else if (i == arrsearchValue.length - 1) { strSearch += "or i.BILLNO like '%" + arrsearchValue[i].toString() + "%' or i.CUSTOMERNAME like '%" + arrsearchValue[i].toString() + "%' or APPLICANT like '%" + arrsearchValue[i].toString() + "%') "; } } } else if (searchValue.indexOf(";") != -1) { var arrsearchValue = searchValue.split(';'); for (var i = 0; i < arrsearchValue.length; i++) { if (i == 0) { strSearch += "(i.BILLNO like '%" + arrsearchValue[i].toString() + "%' or i.CUSTOMERNAME like '%" + arrsearchValue[i].toString() + "%' or APPLICANT like '%" + arrsearchValue[i].toString() + "%' "; } else if (i < arrsearchValue.length - 1) { strSearch += "or i.BILLNO like '%" + arrsearchValue[i].toString() + "%' or i.CUSTOMERNAME like '%" + arrsearchValue[i].toString() + "%' or APPLICANT like '%" + arrsearchValue[i].toString() + "%' "; } else if (i == arrsearchValue.length - 1) { strSearch += "or i.BILLNO like '%" + arrsearchValue[i].toString() + "%' or i.CUSTOMERNAME like '%" + arrsearchValue[i].toString() + "%' or APPLICANT like '%" + arrsearchValue[i].toString() + "%') "; } } } else if (searchValue.indexOf("\\") != -1) { var arrsearchValue = searchValue.split('\\'); for (var i = 0; i < arrsearchValue.length; i++) { if (i == 0) { strSearch += "(i.BILLNO like '%" + arrsearchValue[i].toString() + "%' or i.CUSTOMERNAME like '%" + arrsearchValue[i].toString() + "%' or APPLICANT like '%" + arrsearchValue[i].toString() + "%' "; } else if (i < arrsearchValue.length - 1) { strSearch += "or i.BILLNO like '%" + arrsearchValue[i].toString() + "%' or i.CUSTOMERNAME like '%" + arrsearchValue[i].toString() + "%' or APPLICANT like '%" + arrsearchValue[i].toString() + "%' "; } else if (i == arrsearchValue.length - 1) { strSearch += "or i.BILLNO like '%" + arrsearchValue[i].toString() + "%' or i.CUSTOMERNAME like '%" + arrsearchValue[i].toString() + "%' or APPLICANT like '%" + arrsearchValue[i].toString() + "%') "; } } } else if (searchValue.indexOf("/") != -1) { var arrsearchValue = searchValue.split('/'); for (var i = 0; i < arrsearchValue.length; i++) { if (i == 0) { strSearch += "(i.BILLNO like '%" + arrsearchValue[i].toString() + "%' or i.CUSTOMERNAME like '%" + arrsearchValue[i].toString() + "%' or APPLICANT like '%" + arrsearchValue[i].toString() + "%' "; } else if (i < arrsearchValue.length - 1) { strSearch += "or i.BILLNO like '%" + arrsearchValue[i].toString() + "%' or i.CUSTOMERNAME like '%" + arrsearchValue[i].toString() + "%' or APPLICANT like '%" + arrsearchValue[i].toString() + "%' "; } else if (i == arrsearchValue.length - 1) { strSearch += "or i.BILLNO like '%" + arrsearchValue[i].toString() + "%' or i.CUSTOMERNAME like '%" + arrsearchValue[i].toString() + "%' or APPLICANT like '%" + arrsearchValue[i].toString() + "%') "; } } } else if (searchValue != "") { strSearch = "(i.BILLNO like '%" + searchValue + "%' or i.CUSTOMERNAME like '%" + searchValue + "%' or APPLICANT like '%" + searchValue + "%') "; } } return strSearch; } function fnIndex() { window.location.href = "/Home/Index?u=" + escape(decrypt(u, decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"))) + "&w=" + escape(decrypt(w, decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"))); } function fnReturn() { window.location.href = "/Home/Index?u=" + escape(decrypt(u, decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"))) + "&w=" + escape(decrypt(w, decrypt("8cdd29a091e29cc101042f65", "^id548f@^fueam##54325jfs"))); }