Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
Z
zxtb_to_ssfwpt
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Bugzilla
Bugzilla
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
卢世豪
zxtb_to_ssfwpt
Commits
d4a42923
Commit
d4a42923
authored
Jul 22, 2020
by
刘明珠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
正常申报添加税种列表刷新
parent
e914a0f2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
384 additions
and
367 deletions
+384
-367
index.html
jsp/declare/index.html
+17
-79
declare_grid.js
static/biz/declare_grid.js
+367
-288
No files found.
jsp/declare/index.html
View file @
d4a42923
...
@@ -3,17 +3,17 @@
...
@@ -3,17 +3,17 @@
<head>
<head>
<meta
charset=
'UTF-8'
>
<meta
charset=
'UTF-8'
>
<link
href=
"
/web/onlineReport
/static/tools/css/bootstrap.css?v=1.1"
rel=
"stylesheet"
>
<link
href=
"
../..
/static/tools/css/bootstrap.css?v=1.1"
rel=
"stylesheet"
>
<!--滚动条-->
<!--滚动条-->
<link
rel=
"stylesheet"
href=
"
/web/onlineReport
/static/tools/css/scroll.css"
/>
<link
rel=
"stylesheet"
href=
"
../..
/static/tools/css/scroll.css"
/>
<!--table样式-->
<!--table样式-->
<link
rel=
"stylesheet"
href=
"
/web/onlineReport
/static/tools/css/table.css"
/>
<link
rel=
"stylesheet"
href=
"
../..
/static/tools/css/table.css"
/>
<!--样式-->
<!--样式-->
<link
rel=
"stylesheet"
href=
"
/web/onlineReport
/static/tools/css/encapsulation.css"
/>
<link
rel=
"stylesheet"
href=
"
../..
/static/tools/css/encapsulation.css"
/>
<!--时间插件-->
<!--时间插件-->
<link
rel=
"stylesheet"
href=
"
/web/onlineReport
/static/tools/js/My97DatePicker/skin/WdatePicker.css"
/>
<link
rel=
"stylesheet"
href=
"
../..
/static/tools/js/My97DatePicker/skin/WdatePicker.css"
/>
<!--declare-->
<!--declare-->
<link
rel=
"stylesheet"
href=
"
/web/onlineReport
/static/css/declare/declare.css"
/>
<link
rel=
"stylesheet"
href=
"
../..
/static/css/declare/declare.css"
/>
<!-- 页面自定义样式 -->
<!-- 页面自定义样式 -->
<title>
在线填报
</title>
<title>
在线填报
</title>
</head>
</head>
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
<div
style=
"background-color:#FFFFFF;"
>
<div
style=
"background-color:#FFFFFF;"
>
<div
style=
"padding: 25px;"
>
<div
style=
"padding: 25px;"
>
<div
class=
"div-border"
style=
"padding-bottom: 20px;height: 60px;"
>
<div
class=
"div-border"
style=
"padding-bottom: 20px;height: 60px;"
>
<img
style=
"float:left;display:block"
src=
"
/web/onlineReport
/static/tools/images/zxtb.png"
>
<img
style=
"float:left;display:block"
src=
"
../..
/static/tools/images/zxtb.png"
>
<span
style=
"float:left;display:block;margin-left: 10px;margin-top: 9px;top: 10px;"
class=
"span-title"
>
按期应申报
</span>
<span
style=
"float:left;display:block;margin-left: 10px;margin-top: 9px;top: 10px;"
class=
"span-title"
>
按期应申报
</span>
</div>
</div>
<div>
<div>
...
@@ -77,22 +77,22 @@
...
@@ -77,22 +77,22 @@
<div
style=
"line-height: 40px;margin: 10px;font-size: 14px;"
><div
id=
"ybName"
></div>
<div
style=
"line-height: 40px;margin: 10px;font-size: 14px;"
><div
id=
"ybName"
></div>
<button
class=
"btn btn-primary ybDeclaration1"
id=
"ybDeclaration"
onmouseover=
"this.className='btn ybDeclaration'"
onmouseout=
"this.className='btn btn-primary ybDeclaration1'"
onclick=
"initpage.declarationMethod('Y')"
>
一表集成
</button></div>
<button
class=
"btn btn-primary ybDeclaration1"
id=
"ybDeclaration"
onmouseover=
"this.className='btn ybDeclaration'"
onmouseout=
"this.className='btn btn-primary ybDeclaration1'"
onclick=
"initpage.declarationMethod('Y')"
>
一表集成
</button></div>
</div>
</div>
<img
class=
"img-ybjc-modal"
onclick=
"initpage.closeModal()"
src=
"
/web/onlineReport
/static/tools/images/close.png"
>
<img
class=
"img-ybjc-modal"
onclick=
"initpage.closeModal()"
src=
"
../..
/static/tools/images/close.png"
>
</div>
</div>
</div>
</div>
</body>
</body>
<script
src=
"
/web/onlineReport
/static/tools/js/jquery-1.11.3.js?v=1.1"
></script>
<script
src=
"
../..
/static/tools/js/jquery-1.11.3.js?v=1.1"
></script>
<script
src=
"
/web/onlineReport
/static/js/tax/tool.js"
></script>
<script
src=
"
../..
/static/js/tax/tool.js"
></script>
<script
src=
"
/web/onlineReport
/static/tools/js/jquery.nicescroll.js?v=1.1"
></script>
<script
src=
"
../..
/static/tools/js/jquery.nicescroll.js?v=1.1"
></script>
<script
src=
"
/web/onlineReport
/static/tools/js/bootstrap.js?v=1.1"
></script>
<script
src=
"
../..
/static/tools/js/bootstrap.js?v=1.1"
></script>
<script
src=
"
/web/onlineReport
/static/tools/js/encapsulation.js?v=1.3"
></script>
<script
src=
"
../..
/static/tools/js/encapsulation.js?v=1.3"
></script>
<script
src=
"
/web/onlineReport
/static/tools/js/minScroll.js?v=1.1"
></script>
<script
src=
"
../..
/static/tools/js/minScroll.js?v=1.1"
></script>
<script
src=
"
/web/onlineReport
/static/tools/js/My97DatePicker/WdatePicker.js?v=1.1"
></script>
<script
src=
"
../..
/static/tools/js/My97DatePicker/WdatePicker.js?v=1.1"
></script>
<script>
<script>
document
.
write
(
"<script type='text/javascript' src='
/web/onlineReport
/static/config.js?time="
+
Math
.
random
()
+
"'></"
+
"script"
+
">"
)
document
.
write
(
"<script type='text/javascript' src='
../..
/static/config.js?time="
+
Math
.
random
()
+
"'></"
+
"script"
+
">"
)
</script>
</script>
<script
src=
"
/web/onlineReport
/static/biz/declare_grid.js?v=1.0"
></script>
<script
src=
"
../..
/static/biz/declare_grid.js?v=1.0"
></script>
<script>
<script>
//
<!--
// 使用 el 表达式,将返回的信息写到此处,然后调用页面绘制方法绘制页面
//
<!--
// 使用 el 表达式,将返回的信息写到此处,然后调用页面绘制方法绘制页面
// var companyInfo = ${json};
// var companyInfo = ${json};
...
@@ -113,67 +113,5 @@
...
@@ -113,67 +113,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>
</script>
</html>
</html>
\ No newline at end of file
static/biz/declare_grid.js
View file @
d4a42923
var
initpage
;
var
pzzlList
=
false
;
var
sbqDate
=
''
$
(
function
()
{
//
showLoading
();
getInitTable
();
})
function
getInitTable
()
{
$
.
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======================"
)
}
})
}
/**
/**
* 按期申报填报列表页控制脚本
* 按期申报填报列表页控制脚本
*
*
...
@@ -21,11 +89,11 @@ function initPage(companyInfo) {
...
@@ -21,11 +89,11 @@ function initPage(companyInfo) {
/**
/**
* 展示税种申报信息
* 展示税种申报信息
*/
*/
var
showTax
=
function
(
taxInfo
)
{
var
showTax
=
function
(
taxInfo
)
{
// console.log(taxInfo,companyInfo);
// console.log(taxInfo,companyInfo);
if
(
taxInfo
.
length
>
0
)
{
if
(
taxInfo
.
length
>
0
)
{
for
(
var
i
=
0
;
i
<
taxInfo
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
taxInfo
.
length
;
i
++
)
{
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
]);
}
}
}
}
...
@@ -55,7 +123,7 @@ function initPage(companyInfo) {
...
@@ -55,7 +123,7 @@ function initPage(companyInfo) {
}];
}];
console
.
log
(
taxInfo
);
console
.
log
(
taxInfo
);
//渲染表
//渲染表
getTableDeclaration
(
id
,
order
,
headerList
,
taxInfo
,
buttonHtml
,
promptStatement
)
getTableDeclaration
(
id
,
order
,
headerList
,
taxInfo
,
buttonHtml
,
promptStatement
)
};
};
/**
/**
* 税务申报table渲染
* 税务申报table渲染
...
@@ -65,77 +133,86 @@ function initPage(companyInfo) {
...
@@ -65,77 +133,86 @@ function initPage(companyInfo) {
* @param {*} ddt
* @param {*} ddt
* @param {*} buttonHtml
* @param {*} buttonHtml
*/
*/
var
getTableDeclaration
=
function
(
id
,
order
,
headerList
,
ddt
,
buttonHtml
,
promptStatement
)
{
var
getTableDeclaration
=
function
(
id
,
order
,
headerList
,
ddt
,
buttonHtml
,
promptStatement
)
{
var
tableObj
=
{
var
tableObj
=
{
id
:
id
,
//tabel父元素的id
id
:
id
,
//tabel父元素的id
autoHeight
:
ddt
.
length
>
0
?
10
:
""
,
autoHeight
:
ddt
.
length
>
0
?
10
:
""
,
containerWidth
:
"99%"
,
//table占父元素的百分比
containerWidth
:
"99%"
,
//table占父元素的百分比
autoHeight
:
ddt
.
length
>
0
?
10
:
""
,
// 默认10行
autoHeight
:
ddt
.
length
>
0
?
10
:
""
,
// 默认10行
order
:
order
,
//数据按照什么顺序排序 1.do为是否保函操作 2.序号列会自动添加不需要写
order
:
order
,
//数据按照什么顺序排序 1.do为是否保函操作 2.序号列会自动添加不需要写
onlyId
:
"uuId"
,
//数据的唯一标识
onlyId
:
"uuId"
,
//数据的唯一标识
height
:
"320"
,
//表格的高度
height
:
"320"
,
//表格的高度
buttonHeight
:
""
,
//表格的高度
buttonHeight
:
""
,
//表格的高度
buttonHtml
:
buttonHtml
,
//按钮里的字
buttonHtml
:
buttonHtml
,
//按钮里的字
headerList
:
headerList
,
//表头名字及占比,顺序与order对应
headerList
:
headerList
,
//表头名字及占比,顺序与order对应
promptStatement
:
promptStatement
,
// 没有数据时默认提示
promptStatement
:
promptStatement
,
// 没有数据时默认提示
data
:
{
data
:
{
page
:
"1"
,
page
:
"1"
,
pageSize
:
ddt
.
length
pageSize
:
ddt
.
length
},
},
jsonReady
:
ddt
,
jsonReady
:
ddt
,
callback
:
function
(
data
,
node
)
{
callback
:
function
(
data
,
node
)
{
console
.
log
(
data
);
console
.
log
(
data
);
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
:
{},
};
};
data
.
fillingFlag
=
"normal"
// 填报标记
data
.
fillingFlag
=
"normal"
// 填报标记
data
.
saveUserId
=
"zxtb"
;
// 用户id
data
.
saveUserId
=
"zxtb"
;
// 用户id
window
.
mlistener
.
selectRowData
=
data
;
window
.
mlistener
.
selectRowData
=
data
;
window
.
open
(
config
.
ssfwptPage
,
'_blank'
);
window
.
open
(
config
.
ssfwptPage
,
'_blank'
);
}
else
{
Object
.
defineProperty
(
mlistener
,
'returnSelectRowData'
,
{
set
:
function
(
val
)
{
if
(
pzzlList
)
{
getTaxDeclaration
(
sbqDate
,
"N"
);
}
else
{
getInitTable
();
}
}
})
}
else
{
data
.
djxh
=
companyInfo
.
djxh
;
data
.
djxh
=
companyInfo
.
djxh
;
data
.
iszzsybjc
=
companyInfo
.
iszzsybjc
;
// 一表申报代码
data
.
iszzsybjc
=
companyInfo
.
iszzsybjc
;
// 一表申报代码
data
.
nsrsbh
=
companyInfo
.
nsrsbh
;
// 那随人识别号
data
.
nsrsbh
=
companyInfo
.
nsrsbh
;
// 那随人识别号
data
.
nssbq
=
nowdate
;
data
.
nssbq
=
nowdate
;
data
.
checkTime
=
false
;
data
.
checkTime
=
false
;
if
(
data
.
pzzlDm
===
'11602'
)
{
if
(
data
.
pzzlDm
===
'11602'
)
{
var
List
=
companyInfo
.
taxInfos
.
filter
(
function
(
item
)
{
var
List
=
companyInfo
.
taxInfos
.
filter
(
function
(
item
)
{
return
item
.
pzzlDm
==
'10101'
||
item
.
pzzlDm
==
'10102'
return
item
.
pzzlDm
==
'10101'
||
item
.
pzzlDm
==
'10102'
})
})
if
(
List
.
length
===
0
)
{
if
(
List
.
length
===
0
)
{
data
.
checkTime
=
true
;
data
.
checkTime
=
true
;
}
}
for
(
var
i
=
0
;
i
<
List
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
List
.
length
;
i
++
)
{
if
(
List
[
i
].
sssqQ
!==
data
.
sssqQ
||
List
[
i
].
sssqZ
!==
data
.
sssqZ
)
{
if
(
List
[
i
].
sssqQ
!==
data
.
sssqQ
||
List
[
i
].
sssqZ
!==
data
.
sssqZ
)
{
data
.
checkTime
=
true
;
data
.
checkTime
=
true
;
break
;
break
;
}
}
}
}
}
}
submitData
=
data
;
submitData
=
data
;
if
(
node
.
context
.
innerText
==
"填写申报表"
&&
companyInfo
.
iszzsybjc
==
"01"
&&
data
.
pzzlDm
==
"10101"
)
{
if
(
node
.
context
.
innerText
==
"填写申报表"
&&
companyInfo
.
iszzsybjc
==
"01"
&&
data
.
pzzlDm
==
"10101"
)
{
// if(node.context.innerText=="填写申报表"){
// if(node.context.innerText=="填写申报表"){
console
.
log
(
initpage
)
console
.
log
(
initpage
)
initpage
.
declarationMethod
(
'N'
)
initpage
.
declarationMethod
(
'N'
)
// $('#myMask').show();
// $('#myMask').show();
// $('#myModal').show();
// $('#myModal').show();
// $('#dName').html(data.pzzlMc);
// $('#dName').html(data.pzzlMc);
// $('#dName').attr("title",data.pzzlMc);//修改title值
// $('#dName').attr("title",data.pzzlMc);//修改title值
// $('#ybName').html(data.pzzlMc);
// $('#ybName').html(data.pzzlMc);
// $('#ybName').attr("title",data.pzzlMc);//修改title值
// $('#ybName').attr("title",data.pzzlMc);//修改title值
}
else
{
}
else
{
declarationMethod
(
"N"
)
declarationMethod
(
"N"
)
}
}
}
}
}
//点击按钮后的回调函数
}
//点击按钮后的回调函数
};
};
var
object
=
tool
.
tableCreate
(
tableObj
);
var
object
=
tool
.
tableCreate
(
tableObj
);
// object.jsonReadyTo(ddt, { page: "1", pageSize: ddt.length });
// object.jsonReadyTo(ddt, { page: "1", pageSize: ddt.length });
};
};
/**
/**
...
@@ -146,10 +223,11 @@ function initPage(companyInfo) {
...
@@ -146,10 +223,11 @@ function initPage(companyInfo) {
//http://sbjs.tjsat.gov.cn:18090
//http://sbjs.tjsat.gov.cn:18090
//http://localhost:7070
//http://localhost:7070
var
url
;
var
url
;
if
(
companyInfo
)
{
if
(
companyInfo
)
{
url
=
companyInfo
.
config
.
url
;
url
=
companyInfo
.
config
.
url
;
}
}
var
getTaxDeclaration
=
function
(
date
,
type
)
{
var
getTaxDeclaration
=
function
(
date
,
type
)
{
pzzlList
=
true
;
// TODO 开始加载等待动画
// TODO 开始加载等待动画
showLoading
();
showLoading
();
var
param
=
{
var
param
=
{
...
@@ -157,14 +235,14 @@ function initPage(companyInfo) {
...
@@ -157,14 +235,14 @@ function initPage(companyInfo) {
operateType
:
companyInfo
.
operateType
,
operateType
:
companyInfo
.
operateType
,
sbsq
:
date
,
sbsq
:
date
,
isFresh
:
type
.
toUpperCase
()
==
"Y"
,
isFresh
:
type
.
toUpperCase
()
==
"Y"
,
pzzlDm
:
companyInfo
.
pzzlDm
pzzlDm
:
companyInfo
.
pzzlDm
}
}
$
.
ajax
({
$
.
ajax
({
url
:
url
+
"/ssfwpt/declare/getPzzlList"
,
url
:
url
+
"/ssfwpt/declare/getPzzlList"
,
data
:
param
,
data
:
param
,
type
:
"POST"
,
type
:
"POST"
,
dataType
:
"JSON"
dataType
:
"JSON"
}).
done
(
function
(
data
)
{
}).
done
(
function
(
data
)
{
console
.
log
(
data
)
console
.
log
(
data
)
if
(
data
.
success
)
{
if
(
data
.
success
)
{
if
(
data
.
bean
.
url
==
"error.jsp"
)
{
if
(
data
.
bean
.
url
==
"error.jsp"
)
{
...
@@ -176,7 +254,7 @@ function initPage(companyInfo) {
...
@@ -176,7 +254,7 @@ function initPage(companyInfo) {
}
else
{
}
else
{
alertWarning
(
data
.
errmsg
);
alertWarning
(
data
.
errmsg
);
}
}
}).
always
(
function
(
data
)
{
}).
always
(
function
(
data
)
{
hideLoading
();
hideLoading
();
});
});
};
};
...
@@ -192,14 +270,14 @@ function initPage(companyInfo) {
...
@@ -192,14 +270,14 @@ function initPage(companyInfo) {
var
drawGrid
=
function
(
bean
)
{
var
drawGrid
=
function
(
bean
)
{
//两个表合成一个表
//两个表合成一个表
$
.
each
(
bean
.
financialInfos
,
function
(
i
,
item
)
{
$
.
each
(
bean
.
financialInfos
,
function
(
i
,
item
)
{
bean
.
taxInfos
.
push
(
item
);
bean
.
taxInfos
.
push
(
item
);
});
});
console
.
log
(
bean
)
console
.
log
(
bean
)
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
);
}
}
};
};
...
@@ -210,17 +288,18 @@ function initPage(companyInfo) {
...
@@ -210,17 +288,18 @@ function initPage(companyInfo) {
* @param {*} obj
* @param {*} obj
* @param {*} dp
* @param {*} dp
*/
*/
var
changeDate
=
function
(
obj
,
dp
)
{
var
changeDate
=
function
(
obj
,
dp
)
{
date
=
dp
.
cal
.
getNewDateStr
();
date
=
dp
.
cal
.
getNewDateStr
();
nowdate
=
date
;
// 给缓存时间赋值
nowdate
=
date
;
// 给缓存时间赋值
// 加了一个延时,时间改变后时间框没有收起隐藏就加载数据,没有找到好的解决办法,暂时用延时处理
// 加了一个延时,时间改变后时间框没有收起隐藏就加载数据,没有找到好的解决办法,暂时用延时处理
setTimeout
(
function
(){
sbqDate
=
date
setTimeout
(
function
()
{
getTaxDeclaration
(
date
,
"N"
);
getTaxDeclaration
(
date
,
"N"
);
},
50
);
},
50
);
};
};
var
refresh
=
function
()
{
var
refresh
=
function
()
{
myConfirm
(
"消息"
,
"您确定需要重置申报清册吗?点击确定继续"
,
"确定"
,
"取消"
,
function
()
{
myConfirm
(
"消息"
,
"您确定需要重置申报清册吗?点击确定继续"
,
"确定"
,
"取消"
,
function
()
{
getTaxDeclaration
(
nowdate
,
"Y"
);
getTaxDeclaration
(
nowdate
,
"Y"
);
});
});
};
};
...
@@ -229,15 +308,15 @@ function initPage(companyInfo) {
...
@@ -229,15 +308,15 @@ function initPage(companyInfo) {
submitData
.
ybjcState
=
statu
;
submitData
.
ybjcState
=
statu
;
console
.
log
(
submitData
.
sourceFlag
,
submitData
.
sourceFlag
.
indexOf
(
"sbzj"
)
!=
-
1
)
console
.
log
(
submitData
.
sourceFlag
,
submitData
.
sourceFlag
.
indexOf
(
"sbzj"
)
!=
-
1
)
//需要判断在线还是税表的开关
//需要判断在线还是税表的开关
if
(
submitData
.
sourceFlag
==
"ssfwpt_sbzj"
)
{
if
(
submitData
.
sourceFlag
==
"ssfwpt_sbzj"
)
{
window
.
mlistener
=
{
window
.
mlistener
=
{
selectRowData
:
{},
selectRowData
:
{},
};
};
submitData
.
fillingFlag
=
"normal"
// 填报标记
submitData
.
fillingFlag
=
"normal"
// 填报标记
submitData
.
saveUserId
=
"zxtb"
;
// 用户id
submitData
.
saveUserId
=
"zxtb"
;
// 用户id
window
.
mlistener
.
selectRowData
=
submitData
;
window
.
mlistener
.
selectRowData
=
submitData
;
window
.
open
(
config
.
ssfwptPage
,
'_blank'
);
window
.
open
(
config
.
ssfwptPage
,
'_blank'
);
}
else
{
}
else
{
//"ssfwpt_zxtb"
//"ssfwpt_zxtb"
// var form = $("#changeForm");
// var form = $("#changeForm");
// form.find("#changeForm_data").val(JSON.stringify(submitData));
// form.find("#changeForm_data").val(JSON.stringify(submitData));
...
@@ -255,28 +334,28 @@ function initPage(companyInfo) {
...
@@ -255,28 +334,28 @@ function initPage(companyInfo) {
success
:
function
(
data
)
{
success
:
function
(
data
)
{
hideLoading
()
hideLoading
()
console
.
log
(
"taxInfo:"
,
JSON
.
stringify
(
submitData
))
console
.
log
(
"taxInfo:"
,
JSON
.
stringify
(
submitData
))
window
.
taxInfo
=
JSON
.
stringify
(
submitData
);
window
.
taxInfo
=
JSON
.
stringify
(
submitData
);
localStorage
.
setItem
(
"data"
,
JSON
.
stringify
(
submitData
));
localStorage
.
setItem
(
"data"
,
JSON
.
stringify
(
submitData
));
if
(
data
.
url
==
"edit.jsp"
)
{
if
(
data
.
url
==
"edit.jsp"
)
{
window
.
open
(
config
.
webUrl
+
"declare/edit.html?falg="
+
falg
+
'¶ms='
+
encodeURI
(
JSON
.
stringify
(
submitData
)));
window
.
open
(
config
.
webUrl
+
"declare/edit.html?falg="
+
falg
+
'¶ms='
+
encodeURI
(
JSON
.
stringify
(
submitData
)));
}
else
if
(
data
.
url
==
"yearReport.jsp"
)
{
}
else
if
(
data
.
url
==
"yearReport.jsp"
)
{
window
.
open
(
config
.
webUrl
+
"declare/yearReport.html?falg="
+
falg
+
'¶ms='
+
encodeURI
(
JSON
.
stringify
(
submitData
)));
window
.
open
(
config
.
webUrl
+
"declare/yearReport.html?falg="
+
falg
+
'¶ms='
+
encodeURI
(
JSON
.
stringify
(
submitData
)));
}
else
if
(
data
.
url
==
"yearReportGLB.jsp"
)
{
}
else
if
(
data
.
url
==
"yearReportGLB.jsp"
)
{
window
.
open
(
config
.
webUrl
+
"declare/yearReportGLB.html?falg="
+
falg
+
'¶ms='
+
encodeURI
(
JSON
.
stringify
(
submitData
)));
window
.
open
(
config
.
webUrl
+
"declare/yearReportGLB.html?falg="
+
falg
+
'¶ms='
+
encodeURI
(
JSON
.
stringify
(
submitData
)));
}
else
{
}
else
{
//因为后台不知道返回路径是什么样的就直接改成了else data.url == "error.jsp"
//因为后台不知道返回路径是什么样的就直接改成了else data.url == "error.jsp"
window
.
open
(
config
.
webUrl
+
"error/index.html?falg="
+
falg
+
'¶ms='
+
encodeURI
(
JSON
.
stringify
(
submitData
)));
window
.
open
(
config
.
webUrl
+
"error/index.html?falg="
+
falg
+
'¶ms='
+
encodeURI
(
JSON
.
stringify
(
submitData
)));
}
}
},
},
error
:
function
(
xhr
)
{
error
:
function
(
xhr
)
{
//jsonp 方式此方法不被触发
//jsonp 方式此方法不被触发
if
(
data
.
returnMessage
==
undefined
)
{
if
(
data
.
returnMessage
==
undefined
)
{
if
(
data
.
returnMessage
==
undefined
)
{
if
(
data
.
returnMessage
==
undefined
)
{
alertWarning
(
data
.
errmsg
);
alertWarning
(
data
.
errmsg
);
}
else
{
}
else
{
alertWarning
(
"程序错误,请联系管理员!"
);
alertWarning
(
"程序错误,请联系管理员!"
);
}
}
}
else
{
}
else
{
alertWarning
(
data
.
returnMessage
);
alertWarning
(
data
.
returnMessage
);
}
}
hideLoading
()
hideLoading
()
...
@@ -292,23 +371,23 @@ function initPage(companyInfo) {
...
@@ -292,23 +371,23 @@ function initPage(companyInfo) {
* @param {} params
* @param {} params
*/
*/
$
(
"#reset,#reset1"
).
on
(
"click"
,
refresh
);
$
(
"#reset,#reset1"
).
on
(
"click"
,
refresh
);
$
(
"#goRecord"
).
click
(
function
()
{
$
(
"#goRecord"
).
click
(
function
()
{
//TODO 调用备案接口
//TODO 调用备案接口
});
});
// 格式化后台返回的时间
// 格式化后台返回的时间
if
(
companyInfo
.
config
.
return
)
{
if
(
companyInfo
.
config
.
return
)
{
$
(
"#getInputValue"
).
val
(
tool
.
formatDate
(
companyInfo
.
sbsq
));
$
(
"#getInputValue"
).
val
(
tool
.
formatDate
(
companyInfo
.
sbsq
));
nowdate
=
companyInfo
.
sbsq
;
nowdate
=
companyInfo
.
sbsq
;
drawGrid
(
companyInfo
);
drawGrid
(
companyInfo
);
}
}
//页面出现滚动条,监听滚动条变化将高赋值给模态框
//页面出现滚动条,监听滚动条变化将高赋值给模态框
window
.
onscroll
=
function
()
{
window
.
onscroll
=
function
()
{
$
(
"#myModal"
).
css
(
"top"
,
$
(
document
).
scrollTop
()
+
235
);
$
(
"#myModal"
).
css
(
"top"
,
$
(
document
).
scrollTop
()
+
235
);
}
}
return
{
return
{
changeDate
:
changeDate
,
changeDate
:
changeDate
,
reset
:
reset
,
reset
:
reset
,
declarationMethod
:
declarationMethod
,
declarationMethod
:
declarationMethod
,
closeModal
:
closeModal
closeModal
:
closeModal
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment