Commit c3c62d41 authored by 刘明珠's avatar 刘明珠

index请求修改

parent 8488c4ed
......@@ -121,67 +121,5 @@
// // 弹出错误对话框
// }
var initpage;
$(function(){
//
showLoading();
$.ajax({
type: "post",
url: config.url + "/ssfwpt/declare/index",
dataType: "json", // 请求方式为jsonp
// async: false,
data: {
djxh: getUrlParam("djxh"),
token: getUrlParam("token"),
sbsq: '',
pzzlDm: ''
},
success: function (data) { //客户端jquery预先定义好的callback函数,成功获取跨域服务器上的json数据后,会动态执行这个callback函数
hideLoading();
//el表达式变jq
// $("#token").attr("value","");
if (data.success) {
if (data.bean.url == "error.jsp") {
myAlert("提示", data.bean.errorInfo, "确定")
// window.location.href = "/jsp/error/index.html?falg="+param;
return
}
}
var companyInfo = data;
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);
} else {
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() {
WdatePicker({
isShowClear:false,
dateFmt: 'yyyy-MM',
onpicking: function(dp){
initpage.changeDate(this, dp);
}
});
});
},
error: function(xhr){
hideLoading();
//jsonp 方式此方法不被触发
console.log("=======error======================")
}
})
})
</script>
</html>
\ No newline at end of file
......@@ -171,8 +171,7 @@ function initPage(companyInfo) {
window.open(config.ssfwptPage, '_blank');
Object.defineProperty(mlistener, 'returnSelectRowData', {
set: function (val) {
showTax([])
getTaxDeclaration(sbqDate, "N");
getTaxDeclaration(sbqDate, "Y");
}
})
} else {
......
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