概述
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<#include "/page/head.htm">
<style>
.file-box{ position:relative;width:40%;}
.file{ position:absolute; top:0; right:190px; height:24px; filter:alpha(opacity:0);opacity: 0;width:210px }
.errorvalue{border-color: red;}
</style>
</head>
<body>
<div class="CM_main">
<p class="title"></p>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_contain">
<tr>
<td valign="top">
<div class="CM_content">
<div id="container">
<div class="whitebg pl10 pr10 pb10 borderline">
<div class="title_c2 mar-t-10">
<div class="title3 pointer" οnclick="$('#t2').toggle();"> <h2><b class="titicon icon1"></b>查询条件</h2></div>
</div>
<form id="form_search">
<div id="t2" class="pannel1 whitebg mtop10">
<div class="content">
<table class="table1" width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="align_left tdbg"><span>发票号码</span></td>
<td>
<input id="invoiceNumber" name="invoiceNumber" type="text" class="input-text" value="">
</td>
<td class="align_left tdbg"><span>发票代码</span></td>
<td>
<input id="invoiceCode" name="invoiceCode" type="text" class="input-text" value="">
</td>
<td class="align_left tdbg"><span>认证状态</span></td>
<td>
<select id="invoiceResult" name="invoiceResult" prop="invoiceResultProp">
</select>
</td>
<td class="align_left tdbg"><span>开票日期</span></td>
<td width="30%">
<input type="text" name="minInvoiceDate" class="input-time" id="minInvoiceDate"/> 至
<input type="text" name="maxInvoiceDate" class="input-time" id="maxInvoiceDate"/>
</td>
</tr>
</tbody></table>
<div class="mtop10">
<input class="bluebtn fr mr10" type="reset" value="清空" onClick="clear();"></input>
<input type="button" class="bluebtn fr" value="查询" onClick="findPagination();"></input>
</div>
</div>
</div>
</form>
</div>
<div class="whitebg pl10 pr10 pb10 borderline mtop10">
<div class="title_c2 mar-t-10">
<div class="title3 pointer" οnclick="$('#t4').toggle();"> <h2><b class="titicon icon4"></b>抵扣联发票列表</h2></div>
</div>
<form id="queryFome">
<div id="t4" class="pannel1 mtop10">
<div class="content">
<table id="deductionInvoiceTable" width="100%" cellpadding="0" cellspacing="0" class="table2">
<tbody>
<tr>
<!-- <th><input id="select_all" type="checkbox" name="" value="" width="1%" /></th> -->
<th>NO.</th>
<th>发票号码</th>
<th>发票代码</th>
<th>增值税抵扣发票类型</th>
<th>销方纳税人识别号</th>
<th>购方纳税人识别号</th>
<th>开票日期</th>
<th>开票金额</th>
<th>发票税额</th>
<th>认证状态</th>
</tr>
</tbody>
</table>
<div id="deductionInvoiceTableDiv"></div>
</div>
</div>
</div>
</form>
<br/>
<form method="POST" id="upload" enctype="multipart/form-data" action="/easServlet?method=com.zte.eas.account.business.BusinessCenter4Invoice.deductionInvoice__excelFileImport">
<span class=" f_left"> 选择需要导入的文件:</span>
<div class="file-box" align="left">
<input type='text' id='textfield' />
<input type='button' style="width:10%;" value='浏览...' />
<input type="file" class="file" name="file" οnchange="document.getElementById('textfield').value=this.value"/>
<input type="button" style="width:10%;" οnclick="upload()" value="导入" />
</form>
<!--
<a href='javascript:void(0);' οnclick="downTempFile()">下载模板</a> -->
<form method="POST" id="downTempFile" enctype="multipart/form-data" action="/easServlet?method=com.zte.eas.account.business.BusinessCenter4Invoice.deductionInvoice__downLoadTempFile">
<input name="file" type="file"/>
<a href='javascript:void(0);' οnclick="downTempFile()">下载模板</a>
</form>
</div>
</div>
<div class="h80"></div>
</div>
<!--列表信息结束-->
</td>
</tr>
</table>
</div>
<script type="text/javascript">
var userInfo;
var orgId;
var __pagination__;
function CheckExcel() {
var textValue = $("#textfield").val();
textValue = textValue.toLowerCase().substr(textValue.lastIndexOf("."));
if(!(textValue == ".xls")) {
alert("请导入正确的EXCEL文件,仅支持xls格式!");
return false;
}
return true;
}
function upload(){
if(!CheckExcel()){
return false;
}
//文件上传完成
$('#upload').form('submit',{
success:function(data){
findPagination();
if(data){
alert(data.message);
}
}
});
}
//文件下载
function downTempFile(){
//文件下载完成
$('#downTempFile').form('submit',{
success:function(data){
findPagination();
if(data){
alert(data.message);
}
}
});
}
//文件下载
function downTempFile2(){
var params = {};
var uploadFileType = [];
var fileUploadModel = {};
fileUploadModel.filePath = $(".file").val();
uploadFileType[0]=fileUploadModel;
params.uploadFileType = uploadFileType;
$.ajax({
url: '/easServlet?method=com.zte.eas.account.business.BusinessCenter4Invoice.deductionInvoice__downLoadTempFile',
type: 'POST',
dataType: 'json',
data:params,
success:function(data){
if(data){
}
}
});
}
$('#minInvoiceDate').click(function(e){
e.stopPropagation();
Calendar.show(this,{startDay:'before'});
});
$('#maxInvoiceDate').click(function(e){
e.stopPropagation();
Calendar.show(this,{startDay:'before'});
});
$(function(){
//获取登录信息 json格式
userInfo = $.fn.eas("getUserInfo");
orgId = userInfo.orgId;
$("select[prop=invoiceResultProp]").eas("select",{
lookupType: "SIE_DEDUCTION_INVOICE_INVOICE_RESULT", //进项税抵扣发票-认证状态
pleaseChoose: true
});
deductionInvoicePagination();
});
function clear(){
$("#form_search").find('input[type=text]').each(function(){
var input = this;
$(input).val('');
});
$("#form_search").find('select').each(function(){
var select = this;
$(select).val('');
});
}
function checkCondition(){
var minInvoiceDate = $("#minInvoiceDate").val().replace(/-/g,"");
var maxInvoiceDate = $("#maxInvoiceDate").val().replace(/-/g,"");
$("#minInvoiceDate").removeClass('errorvalue');
$("#maxInvoiceDate").removeClass('errorvalue');
if("" != minInvoiceDate){
if(isNaN(minInvoiceDate) || minInvoiceDate.length != 8){
alert('开始日期格式不正确');
$("#minInvoiceDate").addClass('errorvalue');
return false;
}
}
if("" != maxInvoiceDate){
if(isNaN(maxInvoiceDate) || maxInvoiceDate.length != 8){
alert('结束日期格式不正确');
$("#maxInvoiceDate").addClass('errorvalue');
return false;
}
}
if(""!=minInvoiceDate && ""!=maxInvoiceDate){
if(!isNaN(minInvoiceDate) && !isNaN(maxInvoiceDate)){
if(Number(minInvoiceDate) > Number(maxInvoiceDate)){
alert('开始日期不能大于结束日期');
$("#minInvoiceDate").addClass('errorvalue');
$("#maxInvoiceDate").addClass('errorvalue');
return false;
}
}
}
return true;
}
function deductionInvoicePagination(){
__pagination__ = $("#deductionInvoiceTableDiv").initPagination({
'id' : 'deductionInvoice_pagination',
'queryParam' : [],
'queryUrl' : '/easServlet?method=com.zte.eas.account.business.BusinessCenter4Invoice.deductionInvoice__findPagination',
'async' : true,
'pageCountArray' : [5, 10, 20, 30, 50],
'alias':{'pageIndex':'page','pageSize':'rows'}
});
$("#deductionInvoiceTableDiv").data("__pagination__",__pagination__);
findPagination();
};
function findPagination(){
if(!checkCondition()){
return false;
}
var json={};
var sieDeductionInvoiceCommon = $("#form_search").toJson(true);
if(""!=$("#minInvoiceDate").val()){
sieDeductionInvoiceCommon.minInvoiceDate = $("#minInvoiceDate").val().replace(/-/g,"")+"000000";
}
if(""!=$("#maxInvoiceDate").val()){
sieDeductionInvoiceCommon.maxInvoiceDate = $("#maxInvoiceDate").val().replace(/-/g,"")+"000000";
}
json.sieDeductionInvoiceCommon = sieDeductionInvoiceCommon;
$( $("#deductionInvoiceTableDiv").data("__pagination__")).query(json,function(data,__pagination__){
if(null!=data.message&&"001"!=data.result){
alert(data.message);
return;
}
if(null != data.items){
var sieDeductionInvoiceCommons= data.items;
//清除表格数据
$("#deductionInvoiceTable tr:not(:first)").remove();
$.each(sieDeductionInvoiceCommons, function(i, sieDeductionInvoiceCommon) {
var index = i+1;
var tbTr = "<tr><td>"+index+"</td>"+"<td>"+(sieDeductionInvoiceCommon.invoiceNumber!=null?sieDeductionInvoiceCommon.invoiceNumber:"")+"</td>"
+"<td>"+(sieDeductionInvoiceCommon.invoiceCode != undefined ? sieDeductionInvoiceCommon.invoiceCode : "")+"</td><td>"+(sieDeductionInvoiceCommon.invoiceTypeName!=null?sieDeductionInvoiceCommon.invoiceTypeName:"")+"</td>"
+"<td>"+(sieDeductionInvoiceCommon.sellerTaxIdentiNum!=null?sieDeductionInvoiceCommon.sellerTaxIdentiNum:"")+"</td><td>"+(sieDeductionInvoiceCommon.buyTaxIdentiNum!=null?sieDeductionInvoiceCommon.buyTaxIdentiNum:"")+"</td>"
+"<td>"+(sieDeductionInvoiceCommon.invoiceDate!=null?sieDeductionInvoiceCommon.invoiceDate:"")+"</td><td>"+(sieDeductionInvoiceCommon.invoicePrice!=null?sieDeductionInvoiceCommon.invoicePrice:"")+"</td>"
+"<td>"+(sieDeductionInvoiceCommon.invoiceTaxAmount!=null?sieDeductionInvoiceCommon.invoiceTaxAmount:"")+"</td>" + "<td>"+(sieDeductionInvoiceCommon.invoiceResultName!=null?sieDeductionInvoiceCommon.invoiceResultName:"")+"</td>"
+"<td>"+"<input type='hidden' value='" + sieDeductionInvoiceCommon.deductionInvoiceId + "' />"+"</td>"+"</tr>";
//动态添加表格
$("#deductionInvoiceTable").append(tbTr);
});
}
});
}
/*错误信息的公共回调函数*/
function errorCallback(XMLHttpRequest, textStatus, errorThrown) {
alert('连接异常,错误代码为:' + XMLHttpRequest.status);
}
</script>
</body>
</html>
最后
以上就是懵懂皮卡丘为你收集整理的inport的全部内容,希望文章能够帮你解决inport所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复