Commit 5d098453 authored by 于广洋's avatar 于广洋

后台返回错误信息的时候,申报月份依然可以切换

parent 2d99544a
......@@ -141,22 +141,21 @@
}
var companyInfo = data;
companyInfo.config = config
if (companyInfo.success) {
companyInfo.bean.config = config
companyInfo.bean.return = true;/* @Author ygy @Date 10:12 2020/7/8 @Description 前端判断接口成功返回数据标记用于区分是否执行初始化table方法*/
config.return = true;
initpage = initPage(companyInfo.bean);
/*$("#getInputValue").on("focus", function() {
WdatePicker({
isShowClear:false,
dateFmt: 'yyyy-MM',
onpicking: function(dp){
initpage.changeDate(this, dp);
}
});
});*/
} else {
initpage = initPage("");
alertWarning(companyInfo.returnMessage);
hideLoading();
if(!companyInfo.bean){
companyInfo.bean={};
companyInfo.bean.djxh = getUrlParam("djxh");
companyInfo.bean.return = false;
}
alertWarning(companyInfo.errmsg);
companyInfo.bean.config = config
initpage = initPage(companyInfo.bean);
// 弹出错误对话框
}
$("#getInputValue").on("focus", function() {
......
......@@ -139,11 +139,19 @@
$("#djxh").attr("value", companyInfo.djxh);
if (companyInfo.success) {
companyInfo.bean.config = config
companyInfo.bean.return = true;
initpage = initPage(companyInfo.bean);
} else {
hideLoading();
initpage = initPage("");
if(!companyInfo.bean){
companyInfo.bean={};
companyInfo.bean.djxh = getUrlParam("djxh");
companyInfo.bean.return = false;
}
alertWarning(companyInfo.errmsg);
companyInfo.bean.config = config
initpage = initPage(companyInfo.bean);
alertWarning(companyInfo.returnMessage);
// 弹出错误对话框
}
......
......@@ -160,7 +160,6 @@ function initPage(companyInfo) {
pzzlDm:companyInfo.pzzlDm
}
$.ajax({
// url: url + "/ssfwpt/declare/getPzzlList",
url: url + "/ssfwpt/declare/getPzzlList",
data: param,
type: "POST",
......@@ -171,12 +170,11 @@ function initPage(companyInfo) {
if (data.bean.url == "error.jsp") {
myAlert("提示", data.bean.errorInfo, "确定")
return
// window.location.href = "/jsp/error/index.html?falg="+param;
}
drawGrid(data.bean);
companyInfo = data.bean;
} else {
alertWarning(data.returnMessage);
alertWarning(data.errmsg);
}
}).always(function(data) {
hideLoading();
......@@ -194,9 +192,9 @@ function initPage(companyInfo) {
var drawGrid = function (bean) {
//两个表合成一个表
  $.each(bean.financialInfos,function(i,item){
    bean.taxInfos.push(item);
  });
$.each(bean.financialInfos,function(i,item){
bean.taxInfos.push(item);
});
console.log(bean)
if(bean.taxInfos.length==0){
showTax(bean.taxInfos);
......
......@@ -319,7 +319,7 @@ function initPage(companyInfo) {
//TODO 调用备案接口
});
// 格式化后台返回的时间
if(companyInfo) {
if(companyInfo.config.return) {
$("#getInputValue").val(tool.formatDate(companyInfo.sbsq));
nowDate = tool.formatDate(companyInfo.sbsq);
drawGrid(companyInfo);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment