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

印花税快捷申报:重置清册调整

parent e645eaef
...@@ -2,13 +2,15 @@ var zjhm = ''; ...@@ -2,13 +2,15 @@ var zjhm = '';
var initpage; var initpage;
var sbqDate = ''; var sbqDate = '';
var yearBblxDm = ['10414', '10420']; var yearBblxDm = ['10414', '10420'];
var token = "";
var yhsSyxx = {};
$(function () { $(function () {
showLoading(); showLoading();
getInitTable(); getInitTable();
}) })
function getInitTable() { function getInitTable() {
token = getUrlParam("token");
$.ajax({ $.ajax({
type: "post", type: "post",
url: config.url + "/online/easy/declare_ccxws_lb", url: config.url + "/online/easy/declare_ccxws_lb",
...@@ -26,16 +28,21 @@ function getInitTable() { ...@@ -26,16 +28,21 @@ function getInitTable() {
success: function (data) { //客户端jquery预先定义好的callback函数,成功获取跨域服务器上的json数据后,会动态执行这个callback函数 success: function (data) { //客户端jquery预先定义好的callback函数,成功获取跨域服务器上的json数据后,会动态执行这个callback函数
hideLoading(); hideLoading();
var companyInfo = data; var companyInfo = data;
if (companyInfo.returnCode) { if (companyInfo.returnCode == '00') {
config.value = companyInfo.content.value config.value = companyInfo.content.value
companyInfo.content.config = config companyInfo.content.config = config
companyInfo.content.return = true; /* @Author ygy @Date 10:12 2020/7/8 @Description 前端判断接口成功返回数据标记用于区分是否执行初始化table方法*/ companyInfo.content.return = true; /* @Author ygy @Date 10:12 2020/7/8 @Description 前端判断接口成功返回数据标记用于区分是否执行初始化table方法*/
config.return = true; config.return = true;
if (companyInfo.content.yhsSyxx != undefined && companyInfo.content.yhsSyxx != null && JSON.stringify(companyInfo.content.yhsSyxx) != '{}') {
yhsSyxx = companyInfo.content.yhsSyxx;
} else {
yhsSyxx = {};
}
initpage = initPage(companyInfo.content); initpage = initPage(companyInfo.content);
} else { } else {
hideLoading(); hideLoading();
if (data.errmsg != undefined) { if (data.returnMessage != undefined) {
alertWarning(data.errmsg); alertWarning(data.returnMessage);
} else { } else {
alertWarning(data.returnMessage); alertWarning(data.returnMessage);
} }
...@@ -94,14 +101,14 @@ function initPage(companyInfo) { ...@@ -94,14 +101,14 @@ function initPage(companyInfo) {
if (taxInfo[i].sbrq) { if (taxInfo[i].sbrq) {
taxInfo[i].sbrq = tool.formatDate(taxInfo[i].sbrq.split(" ")[0]); taxInfo[i].sbrq = tool.formatDate(taxInfo[i].sbrq.split(" ")[0]);
} }
if (taxInfo[i].bblxDm=='30101') { if (taxInfo[i].bblxDm == '30101') {
taxInfo[i].sssqQ = "-"; taxInfo[i].sssqQ = "-";
taxInfo[i].sssqZ = "-"; taxInfo[i].sssqZ = "-";
} }
if (taxInfo[i].sbzt=='Y') { if (taxInfo[i].sbzt == 'Y') {
taxInfo[i].sbzt = "已申报"; taxInfo[i].sbzt = "已申报";
} }
if (taxInfo[i].sbzt=='N') { if (taxInfo[i].sbzt == 'N') {
taxInfo[i].sbzt = "未申报"; taxInfo[i].sbzt = "未申报";
} }
} }
...@@ -116,7 +123,7 @@ function initPage(companyInfo) { ...@@ -116,7 +123,7 @@ function initPage(companyInfo) {
}, { }, {
name: "申报表", name: "申报表",
width: "40%" width: "40%"
}, { }, {
name: "登记序号", name: "登记序号",
width: "15%" width: "15%"
}, { }, {
...@@ -166,13 +173,13 @@ function initPage(companyInfo) { ...@@ -166,13 +173,13 @@ function initPage(companyInfo) {
data.sbbz = '3'; data.sbbz = '3';
data.value = config.value; data.value = config.value;
if (data.sbzt == "Y") { if (data.sbzt == "Y") {
myAlert("提示", "当前申报表已经申报", "确定") myAlert("提示", "当前印花税已经申报", "确定")
return false; return false;
} }
if (data.sourceFlag == "ssfwpt_sbzj") { if (data.sourceFlag == "ssfwpt_sbzj") {
window.mlistener = { window.mlistener = {
selectRowData: {}, selectRowData: {},
urlList:{} urlList: {}
}; };
var openCollectYHS = { var openCollectYHS = {
"nsrsbh": data.nsrsbh, "nsrsbh": data.nsrsbh,
...@@ -193,17 +200,27 @@ function initPage(companyInfo) { ...@@ -193,17 +200,27 @@ function initPage(companyInfo) {
"nsqxDm": data.nsqxDm, "nsqxDm": data.nsqxDm,
"zsDjxh": data.zsDjxh, "zsDjxh": data.zsDjxh,
"stateType": "add", "stateType": "add",
"sycjType": "yhs" "sycjType": "yhs",
"sourceFlag":"kjsb"
}
if (JSON.stringify(yhsSyxx) != '{}') {
openCollectYHS.stateType = "edit";
openCollectYHS.gzbz = '1';
openCollectYHS.syuuid = yhsSyxx.syuuid;
} else {
openCollectYHS.stateType = "add";
openCollectYHS.gzbz = '0';
openCollectYHS.syuuid = "";
} }
var url = "property_tax_plugin"; var url = "property_tax_plugin";
if(config.environmental=='test'){ if (config.environmental == 'test') {
url = "property_tax_plugin"; url = "property_tax_plugin";
}else{ } else {
url = "online_property_tax_plugin"; url = "online_property_tax_plugin";
} }
var urlList = { var urlList = {
openTable: "/"+url+"/yhs/openTable", openTable: "/" + url + "/yhs/openTable",
saveSbbInfo:"/"+url+"/yhs/saveSbbInfo " saveSbbInfo: "/" + url + "/yhs/saveSbbInfo "
} }
window.mlistener.selectRowData = openCollectYHS; window.mlistener.selectRowData = openCollectYHS;
window.mlistener.urlList = urlList; window.mlistener.urlList = urlList;
...@@ -211,7 +228,7 @@ function initPage(companyInfo) { ...@@ -211,7 +228,7 @@ function initPage(companyInfo) {
Object.defineProperty(mlistener, 'returnSelectRowData', { Object.defineProperty(mlistener, 'returnSelectRowData', {
set: function (val) { set: function (val) {
setTimeout(function () { setTimeout(function () {
getTaxDeclaration(sbqDate, "N", '2'); getTaxDeclaration(sbqDate, 'N');
}, 1000); }, 1000);
} }
}) })
...@@ -266,7 +283,7 @@ function initPage(companyInfo) { ...@@ -266,7 +283,7 @@ function initPage(companyInfo) {
if (companyInfo) { if (companyInfo) {
url = companyInfo.config.url; url = companyInfo.config.url;
} }
var getTaxDeclaration = function (date) { var getTaxDeclaration = function (date,type) {
// TODO 开始加载等待动画 // TODO 开始加载等待动画
showLoading(); showLoading();
var param = { var param = {
...@@ -284,21 +301,27 @@ function initPage(companyInfo) { ...@@ -284,21 +301,27 @@ function initPage(companyInfo) {
// myAlert("提示", "正在获取初始化信息", "确定") // myAlert("提示", "正在获取初始化信息", "确定")
// }, // },
}).done(function (data) { }).done(function (data) {
if (data.success) { hideLoading();
if (data.bean.url == "error.jsp") { if (data.returnCode) {
myAlert("提示", data.bean.errorInfo, "确定") if (data.returnCode != '00') {
myAlert("提示", data.returnMessage, "确定")
return return
} }
drawGrid(data.bean); drawGrid(data.content);
companyInfo = data.bean; companyInfo = data.content;
if (companyInfo.yhsSyxx != undefined && companyInfo.yhsSyxx != null && JSON.stringify(companyInfo.yhsSyxx) != '{}') {
yhsSyxx = companyInfo.yhsSyxx;
} else {
yhsSyxx = {};
}
zjhm = companyInfo.zjhm zjhm = companyInfo.zjhm
config.value = companyInfo.value; config.value = companyInfo.value;
if (type == 'Y') { if (type == 'Y') {
myAlert("提示", "重置清册成功", "确定") myAlert("提示", "重置清册成功", "确定")
} }
} else { } else {
if (data.errmsg != undefined) { if (data.returnMessage != undefined) {
alertWarning(data.errmsg); alertWarning(data.returnMessage);
} else { } else {
alertWarning(data.returnMessage); alertWarning(data.returnMessage);
} }
...@@ -307,6 +330,37 @@ function initPage(companyInfo) { ...@@ -307,6 +330,37 @@ function initPage(companyInfo) {
hideLoading(); hideLoading();
}); });
}; };
var resetInventory = function (date) {
// TODO 开始加载等待动画
showLoading();
console.log('companyInfo', companyInfo);
var param = {
djxh: djxh,
operateType: companyInfo.operateType,
sbsq: companyInfo.sbsq,
isFresh: true,
pzzlDm: "",
refreshSbzt: '1',
}
$.ajax({
url: "/online/declare/getPzzlList",
data: param,
type: "POST",
dataType: "JSON",
// beforeSend:function(){
// myAlert("提示", "正在获取初始化信息", "确定")
// },
}).done(function (data) {
hideLoading();
if (!data.success) {
myAlert("提示", data.returnMessage, "确定")
return
}
getTaxDeclaration(date, 'Y')
}).always(function (data) {
hideLoading();
});
};
/** /**
* 隐藏modal * 隐藏modal
*/ */
...@@ -324,7 +378,7 @@ function initPage(companyInfo) { ...@@ -324,7 +378,7 @@ function initPage(companyInfo) {
}); });
if (bean.taxInfos.length == 0) { if (bean.taxInfos.length == 0) {
showTax(bean.taxInfos); showTax(bean.taxInfos);
alertInfo("税费申报暂无数据"); alertInfo("印花税快捷申报暂无数据!");
} else { } else {
showTax(bean.taxInfos); showTax(bean.taxInfos);
} }
...@@ -342,13 +396,13 @@ function initPage(companyInfo) { ...@@ -342,13 +396,13 @@ function initPage(companyInfo) {
// 加了一个延时,时间改变后时间框没有收起隐藏就加载数据,没有找到好的解决办法,暂时用延时处理 // 加了一个延时,时间改变后时间框没有收起隐藏就加载数据,没有找到好的解决办法,暂时用延时处理
sbqDate = date sbqDate = date
setTimeout(function () { setTimeout(function () {
getTaxDeclaration(date, "N", '1'); getTaxDeclaration(date, 'N');
}, 50); }, 50);
}; };
var refresh = function () { var refresh = function () {
myConfirm("消息", "您确定需要重置申报清册吗?点击确定继续", "确定", "取消", function () { myConfirm("消息", "您确定需要重置申报清册吗?点击确定继续", "确定", "取消", function () {
getTaxDeclaration(nowdate, "Y", '1'); resetInventory(nowdate, "Y");
}); });
}; };
//申报方式 当iszzsybjc=01同时pzzlDm=010101时,调用改方法 //申报方式 当iszzsybjc=01同时pzzlDm=010101时,调用改方法
...@@ -374,7 +428,7 @@ function initPage(companyInfo) { ...@@ -374,7 +428,7 @@ function initPage(companyInfo) {
Object.defineProperty(mlistener, 'returnSelectRowData', { Object.defineProperty(mlistener, 'returnSelectRowData', {
set: function (val) { set: function (val) {
setTimeout(function () { setTimeout(function () {
getTaxDeclaration(sbqDate, "N", '2'); getTaxDeclaration(sbqDate, 'N');
}, 1000); }, 1000);
} }
}) })
......
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