Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
72e50540
Commit
72e50540
authored
Mar 19, 2019
by
chase
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge档案管理
parent
a3ba953d
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
217 additions
and
135 deletions
+217
-135
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+39
-16
WPNAME.java
...axtech/atms/vat/service/impl/report/functions/WPNAME.java
+1
-1
doc-manage.ctrl.js
...app/app/admin/infrastructure/docManage/doc-manage.ctrl.js
+6
-1
doc-manage.html
...webapp/app/admin/infrastructure/docManage/doc-manage.html
+2
-3
app-usr-operate-log.ctrl.js
...framework/app-usr-operate-log/app-usr-operate-log.ctrl.js
+1
-1
tax-document-list.ctrl.js
...ocumentManage/tax-document-list/tax-document-list.ctrl.js
+117
-80
tax-document-list.html
...axDocumentManage/tax-document-list/tax-document-list.html
+51
-33
No files found.
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
72e50540
...
...
@@ -705,17 +705,39 @@ public class ReportServiceImpl extends BaseService {
periodTemplateMapper
.
batchInsert
(
periodTemplateList
);
}
private
String
transNumber
(
int
num
,
String
result
){
if
(
num
==
0
){
return
result
;
}
int
pre
=
num
/
26
;
// 取商
int
res
=
num
%
26
;
// 取余数
if
(
res
!=
0
){
result
=(
char
)(
res
+
'A'
-
1
)+
result
;
}
else
{
result
+=
'Z'
;
pre
=
pre
-
1
;
}
return
transNumber
(
pre
,
result
);
}
public
Workbook
assembleTaxWorkBook
(
Template
template
,
Workbook
tWorkbook
,
String
projectId
,
Integer
period
)
{
Sheet
sheet
=
tWorkbook
.
getSheetAt
(
0
);
RevenueConfigExample
example
=
new
RevenueConfigExample
();
List
<
RevenueConfig
>
dataList
=
revenueConfigMapper
.
selectByExample
(
example
);
//合计项map
Map
<
Integer
,
List
<
String
>>
sumMap
=
new
HashMap
<>();
sumMap
.
put
(
TaxesCalculateReportEnum
.
Column
.
Column_5
.
getIndex
(),
new
ArrayList
<>());
sumMap
.
put
(
TaxesCalculateReportEnum
.
Column
.
Column_6
.
getIndex
(),
new
ArrayList
<>());
sumMap
.
put
(
TaxesCalculateReportEnum
.
Column
.
Column_7
.
getIndex
(),
new
ArrayList
<>());
sumMap
.
put
(
TaxesCalculateReportEnum
.
Column
.
Column_8
.
getIndex
(),
new
ArrayList
<>());
sumMap
.
put
(
TaxesCalculateReportEnum
.
Column
.
Column_10
.
getIndex
(),
new
ArrayList
<>());
if
(
CollectionUtils
.
isNotEmpty
(
dataList
))
{
Project
project
=
projectMapper
.
selectByPrimaryKey
(
projectId
);
int
rowIndex
=
1
;
Row
sourceRow
=
sheet
.
getRow
(
3
);
for
(
RevenueConfig
config
:
dataList
)
{
Row
row
=
POIUtil
.
createAndCloneRow
(
tWorkbook
,
sheet
,
1
,
sourceRow
);
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_1
.
getIndex
()).
setCellValue
(
"1-"
+
rowIndex
);
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_2
.
getIndex
()).
setCellValue
(
config
.
getName
());
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_3
.
getIndex
()).
setCellValue
(
""
);
...
...
@@ -724,9 +746,9 @@ public class ReportServiceImpl extends BaseService {
if
(
0
==
config
.
getAccountType
())
{
//0值
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_5
.
getIndex
()).
setCellValue
(
0.00
);
}
else
if
(
1
==
config
.
getAccountType
())
{
//科目
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_5
.
getIndex
()).
setCellValue
(
"DFFS(\""
+
config
.
getTbSegment3
()
+
"\","
+
project
.
getYear
()
+
","
+
period
+
","
+
1
+
",\""
+
config
.
getTbSegment5
()
+
"\",\""
+
config
.
getTbSegment6
()
+
"\")-"
+
"JFFS(\""
+
config
.
getTbSegment3
()
+
"\","
+
project
.
getYear
()
+
","
+
period
+
","
+
1
+
",\""
+
config
.
getTbSegment5
()
+
"\",\""
+
config
.
getTbSegment6
()
+
"\")"
);
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_5
.
getIndex
()).
setCellValue
(
"DFFS(\""
+
config
.
getTbSegment3
()
+
"\","
+
project
.
getYear
()
+
","
+
period
+
",1,\""
+
config
.
getTbSegment5
()
+
"\",\""
+
config
.
getTbSegment6
()
+
"\")-"
+
"JFFS(\""
+
config
.
getTbSegment3
()
+
"\","
+
project
.
getYear
()
+
","
+
period
+
",1,\""
+
config
.
getTbSegment5
()
+
"\",\""
+
config
.
getTbSegment6
()
+
"\")"
);
}
else
if
(
2
==
config
.
getAccountType
())
{
//手工输入
}
else
{
...
...
@@ -735,30 +757,31 @@ public class ReportServiceImpl extends BaseService {
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_6
.
getIndex
()).
setCellValue
(
""
);
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_7
.
getIndex
()).
setCellValue
(
""
);
if
(
1
==
config
.
getTaxBase
())
{
//账载
// row.getCell(TaxesCalculateReportEnum.Column.Column_8.getIndex()).setCellValue("WPNAME(\"VAT020\",\"B\",\""+config.getName()+"\",\"E\")");
// row.getCell(TaxesCalculateReportEnum.Column.Column_8.getIndex()).setCellValue("WPNAME(\"VAT020\",\"B\",\"" + config.getName() + "\",\"E\")");
//838b9b6513422e029c38575f9b029b1fdd18dadb
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_8
.
getIndex
()).
setCellValue
(
"WPNAME(\"VAT020\",\"B\",\""
+
config
.
getName
()+
"\",\"E\")"
);
}
else
if
(
2
==
config
.
getTaxBase
())
{
//开票收入
}
else
if
(
3
==
config
.
getTaxBase
())
{
//手工录入
}
else
if
(
4
==
config
.
getTaxBase
())
{
//借方发生额
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_8
.
getIndex
()).
setCellValue
(
"JFFS(\""
+
config
.
getTbSegment3
()
+
"\","
+
project
.
getYear
()
+
","
+
period
+
",
"
+
1
+
"
,,)"
);
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_8
.
getIndex
()).
setCellValue
(
"JFFS(\""
+
config
.
getTbSegment3
()
+
"\","
+
project
.
getYear
()
+
","
+
period
+
",
1
,,)"
);
}
else
if
(
5
==
config
.
getTaxBase
())
{
//贷方发生额
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_8
.
getIndex
()).
setCellValue
(
"DFFS(\""
+
config
.
getTbSegment3
()
+
"\","
+
project
.
getYear
()
+
","
+
period
+
",
"
+
1
+
"
,,)"
);
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_8
.
getIndex
()).
setCellValue
(
"DFFS(\""
+
config
.
getTbSegment3
()
+
"\","
+
project
.
getYear
()
+
","
+
period
+
",
1
,,)"
);
}
else
{
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_8
.
getIndex
()).
setCellValue
(
"
DFFS(\""
+
config
.
getTbSegment3
()
+
"\","
+
project
.
getYear
()
+
","
+
period
+
","
+
1
+
",\"\",\"\")
"
);
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_8
.
getIndex
()).
setCellValue
(
""
);
}
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_9
.
getIndex
()).
setCellValue
(
config
.
getTaxRate
().
multiply
(
new
BigDecimal
(
100
)).
intValue
()
+
"%"
);
// row.getCell(TaxesCalculateReportEnum.Column.Column_10.getIndex()).setCellValue("WPNAME(\"VAT020\",\"B\",\""+config.getName()+"\",\"E\")*"
// +"WPNAME(\"VAT020\",\"B\",\""+config.getName()+"\",\"I\")");
if
(
rowIndex
==
3
){
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_10
.
getIndex
()).
setCellValue
(
"WPNAME(\"VAT020\",\"B\",\""
+
config
.
getName
()+
"\",\"I\")"
);
}
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_10
.
getIndex
()).
setCellValue
(
"WPNAME(\"VAT020\",\"B\",\""
+
config
.
getName
()+
"\",\"E\")*"
+
"WPNAME(\"VAT020\",\"B\",\""
+
config
.
getName
()+
"\",\"I\")"
);
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_11
.
getIndex
()).
setCellValue
(
RevenueConfEnum
.
RevenueType
.
MAPPING
.
get
(
config
.
getRevenueType
()));
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_12
.
getIndex
()).
setCellValue
(
RevenueConfEnum
.
TaxType
.
MAPPING
.
get
(
config
.
getTaxType
()));
//组装合计项
sumMap
.
get
(
TaxesCalculateReportEnum
.
Column
.
Column_5
.
getIndex
()).
add
(
transNumber
(
TaxesCalculateReportEnum
.
Column
.
Column_5
.
getIndex
()+
1
,
""
)+
rowIndex
);
sumMap
.
get
(
TaxesCalculateReportEnum
.
Column
.
Column_6
.
getIndex
()).
add
(
transNumber
(
TaxesCalculateReportEnum
.
Column
.
Column_6
.
getIndex
()+
1
,
""
)+
rowIndex
);
sumMap
.
get
(
TaxesCalculateReportEnum
.
Column
.
Column_7
.
getIndex
()).
add
(
transNumber
(
TaxesCalculateReportEnum
.
Column
.
Column_7
.
getIndex
()+
1
,
""
)+
rowIndex
);
sumMap
.
get
(
TaxesCalculateReportEnum
.
Column
.
Column_8
.
getIndex
()).
add
(
transNumber
(
TaxesCalculateReportEnum
.
Column
.
Column_8
.
getIndex
()+
1
,
""
)+
rowIndex
);
sumMap
.
get
(
TaxesCalculateReportEnum
.
Column
.
Column_10
.
getIndex
()).
add
(
transNumber
(
TaxesCalculateReportEnum
.
Column
.
Column_10
.
getIndex
()+
1
,
""
)+
rowIndex
);
rowIndex
++;
}
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/WPNAME.java
View file @
72e50540
...
...
@@ -59,7 +59,7 @@ public class WPNAME extends FunctionBase implements FreeRefFunction {
MyAsserts
.
assertNotEmpty
(
cellTemplateDataList
,
Exceptions
.
BB_CELL_TEMP_NULL
);
cellTemplateData
=
cellTemplateDataList
.
get
(
0
);
int
index
=
ec
.
getWorkbook
().
getSheetIndex
(
bo
.
getReportCode
());
cellValue
=
getCellValue
(
index
,
ec
,
formulaContext
,
agent
,
cellTemplateData
.
getRowIndex
(),
bo
.
getColumnIndex
(),
cellValue
=
getCellValue
(
index
,
ec
,
formulaContext
,
agent
,
cellTemplateData
.
getRowIndex
(),
bo
.
getColumnIndex
()
-
1
,
Long
.
parseLong
(
cellTemplateData
.
getCellTemplateId
()));
nullCellDto
.
extractFromGroup
(
bo
,
formulaContext
.
getPeriod
(),
formulaContext
.
getYear
(),
cellTemplateData
);
nullCellDto
.
setAmount
(
cellValue
);
...
...
atms-web/src/main/webapp/app/admin/infrastructure/docManage/doc-manage.ctrl.js
View file @
72e50540
...
...
@@ -195,7 +195,7 @@
if
(
options
.
data
.
updateTime
)
{
$
(
'<span '
+
style
+
'>'
).
text
(
$filter
(
'date'
)(
options
.
data
.
updateTime
,
'yyyy-MM-dd'
)).
appendTo
(
container
);
}
else
{
$
(
'<span>'
).
text
().
appendTo
(
container
);
$
(
'<span>'
).
text
(
''
).
appendTo
(
container
);
}
}
catch
(
e
)
{
$log
.
error
(
e
);
...
...
@@ -281,6 +281,11 @@
var
createDocFileType
=
function
()
{
var
uploadModel
=
angular
.
copy
(
$scope
.
editModel
);
delete
uploadModel
.
id
;
//新增文档不需要上传ID
// 默认status为1
if
(
uploadModel
.
status
===
undefined
||
uploadModel
.
status
===
null
)
uploadModel
.
status
=
1
;
docManageService
.
addFileType
(
uploadModel
).
then
(
function
(
data
)
{
if
(
data
==
true
)
{
SweetAlert
.
success
(
$translate
.
instant
(
'SaveSuccess'
));
...
...
atms-web/src/main/webapp/app/admin/infrastructure/docManage/doc-manage.html
View file @
72e50540
...
...
@@ -144,10 +144,9 @@
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
<span
style=
"color:red"
>
*
</span>
<span
translate=
"State"
></span>
</label>
<div
class=
"col-sm-11"
style=
"width:61.67%"
>
<div
class=
"col-sm-11"
style=
"width:61.67%"
>
<label
class=
"col-sm-5 DM-state-label"
>
<input
type=
"radio"
name=
"editModelState"
value=
1
...
...
@@ -159,7 +158,7 @@
<input
type=
"radio"
name=
"editModelState"
value=
0
ng-checked=
"editModel.status == 0"
ng-model=
"editModel.status"
required
/>
ng-model=
"editModel.status"
/>
<span
translate=
"Disable"
></span>
</label>
...
...
atms-web/src/main/webapp/app/framework/app-usr-operate-log/app-usr-operate-log.ctrl.js
View file @
72e50540
...
...
@@ -98,7 +98,7 @@ frameworkModule.controller('appUsrOperateLogController',
if
(
options
.
data
.
createTime
)
{
$
(
'<span>'
).
text
(
$filter
(
'date'
)(
options
.
data
.
createTime
,
'yyyy-MM-dd hh:mm'
)).
appendTo
(
container
);
}
else
{
$
(
'<span>'
).
text
().
appendTo
(
container
);
$
(
'<span>'
).
text
(
''
).
appendTo
(
container
);
}
}
catch
(
e
)
{
$log
.
error
(
e
);
...
...
atms-web/src/main/webapp/app/taxDocumentManage/tax-document-list/tax-document-list.ctrl.js
View file @
72e50540
...
...
@@ -17,38 +17,24 @@ taxDocumentManageModule.controller('taxDocumentListController',
$scope
.
queryFieldModel
.
pageSize
=
$scope
.
pagingOptions
.
pageSize
;
var
params
=
angular
.
copy
(
$scope
.
queryFieldModel
);
// 过滤时间格式
params
.
ownTime
=
params
.
ownTime
?
params
.
ownTime
:
""
;
var
splitMark
=
params
.
ownTime
.
indexOf
(
"-"
)
>
-
1
?
"-"
:
"/"
;
params
.
ownTime
=
parseInt
(
params
.
ownTime
.
split
(
splitMark
).
join
(
""
));
// if($scope.queryOwnTime)params.ownTime = $scope.queryOwnTime(params.ownTime,"int");
params
.
fileBeginTime
?
params
.
fileBeginTime
+=
"-01"
:
""
;
if
(
params
.
fileEndTTime
)
{
var
fileEndTTimeDate
=
$scope
.
getMonthLastDate
(
params
.
fileEndTTime
.
split
(
"-"
)[
0
],
params
.
fileEndTTime
.
split
(
"-"
)[
1
]);
params
.
fileEndTTime
+=
"-"
+
fileEndTTimeDate
;
}
params
.
ownBeginTime
?
params
.
ownBeginTime
+=
"-01"
:
""
;
if
(
params
.
ownEndTime
)
{
var
ownEndTimeDate
=
$scope
.
getMonthLastDate
(
params
.
ownEndTime
.
split
(
"-"
)[
0
],
params
.
ownEndTime
.
split
(
"-"
)[
1
]);
params
.
ownEndTime
+=
"-"
+
ownEndTimeDate
;
}
params
.
effectiveBeginTime
?
params
.
effectiveBeginTime
+=
"-01"
:
""
;
if
(
params
.
effectiveEndTime
)
{
var
effectiveEndTimeDate
=
$scope
.
getMonthLastDate
(
params
.
effectiveEndTime
.
split
(
"-"
)[
0
],
params
.
effectiveEndTime
.
split
(
"-"
)[
1
]);
params
.
effectiveEndTime
+=
"-"
+
effectiveEndTimeDate
;
}
params
.
uploadBeginTime
?
params
.
uploadBeginTime
+=
"-01"
:
""
;
if
(
params
.
uploadEndTime
)
{
var
uploadEndTimeDate
=
$scope
.
getMonthLastDate
(
params
.
uploadEndTime
.
split
(
"-"
)[
0
],
params
.
uploadEndTime
.
split
(
"-"
)[
1
]);
params
.
uploadEndTime
+=
"-"
+
uploadEndTimeDate
;
params
.
fileBeginTime
=
getQueryDate
(
params
.
fileBeginTime
,
"-"
);
params
.
fileEndTTime
=
getQueryDate
(
params
.
fileEndTTime
,
"-"
);
params
.
ownBeginTime
=
getQueryDate
(
params
.
ownBeginTime
,
"-"
);
params
.
ownEndTime
=
getQueryDate
(
params
.
ownEndTime
,
"-"
);
params
.
effectiveBeginTime
=
getQueryDate
(
params
.
effectiveBeginTime
,
"-"
);
params
.
effectiveEndTime
=
getQueryDate
(
params
.
effectiveEndTime
,
"-"
);
params
.
uploadBeginTime
=
getQueryDate
(
params
.
uploadBeginTime
,
"-"
);
params
.
uploadEndTime
=
getQueryDate
(
params
.
uploadEndTime
,
"-"
);
function
getQueryDate
(
time
,
mark
)
{
if
(
!
time
)
return
""
;
var
theDate
=
new
Date
(
time
);
var
year
=
theDate
.
getFullYear
();
var
mm
=
theDate
.
getMonth
()
+
1
;
var
dd
=
theDate
.
getDate
();
mm
=
(
mm
+
""
).
length
<
2
?
"0"
+
mm
:
mm
;
dd
=
(
dd
+
""
).
length
<
2
?
"0"
+
dd
:
dd
;
return
year
+
mark
+
mm
+
mark
+
dd
;
}
taxDocumentListService
.
fetchMainList
(
params
).
then
(
function
(
data
,
status
,
headers
)
{
if
(
status
==
204
)
{
SweetAlert
.
warning
(
$translate
.
instant
(
"NoData"
));
...
...
@@ -284,8 +270,8 @@ taxDocumentManageModule.controller('taxDocumentListController',
// $scope.editFieldModel.ownTime = year + "/" + mon;
$scope
.
editFieldModel
.
ownTime
=
$scope
.
queryOwnTime
(
item
.
ownTime
,
"/"
);
$scope
.
editFieldModel
.
fileTime
=
$scope
.
q
ueryDate
(
item
.
fileTime
,
"/"
);
$scope
.
editFieldModel
.
effectiveTime
=
$scope
.
q
ueryDate
(
item
.
effectiveTime
,
"/"
);
$scope
.
editFieldModel
.
fileTime
=
$scope
.
getQ
ueryDate
(
item
.
fileTime
,
"/"
);
$scope
.
editFieldModel
.
effectiveTime
=
$scope
.
getQ
ueryDate
(
item
.
effectiveTime
,
"/"
);
$scope
.
syncFileType
(
$scope
.
editFieldModel
.
fileAttr
);
$scope
.
matchFieldTypeId
(
$scope
.
editFieldModel
);
}
...
...
@@ -310,8 +296,8 @@ taxDocumentManageModule.controller('taxDocumentListController',
// var splitMark = params.ownTime.indexOf("-") > -1 ? "-" : "/";
// params.ownTime = parseInt(params.ownTime.split(splitMark).join(""));
params
.
ownTime
=
$scope
.
queryOwnTime
(
params
.
ownTime
,
"int"
);
params
.
fileTime
=
$scope
.
q
ueryDate
(
params
.
fileTime
,
"-"
);
params
.
effectiveTime
=
$scope
.
q
ueryDate
(
params
.
effectiveTime
,
"-"
);
params
.
fileTime
=
$scope
.
getQ
ueryDate
(
params
.
fileTime
,
"-"
);
params
.
effectiveTime
=
$scope
.
getQ
ueryDate
(
params
.
effectiveTime
,
"-"
);
params
.
filePositionUrl
=
encodeURIComponent
(
params
.
filePositionUrl
);
taxDocumentListService
.
verifyDuplicate
(
params
).
then
(
function
(
data
)
{
...
...
@@ -331,7 +317,7 @@ taxDocumentManageModule.controller('taxDocumentListController',
}
else
{
if
(
/
(
createTime|updateTime|uploadTime
)
/
.
test
(
key
))
{
fields
[
key
]
=
$scope
.
q
ueryDate
(
curItemValue
,
"/"
);
fields
[
key
]
=
$scope
.
getQ
ueryDate
(
curItemValue
,
"/"
);
}
else
fields
[
key
]
=
curItemValue
;
}
...
...
@@ -415,12 +401,15 @@ taxDocumentManageModule.controller('taxDocumentListController',
// params.ownTime = params.ownTime ? params.ownTime : "";
// var splitMark = params.ownTime.indexOf("-") > -1 ? "-" : "/";
// params.ownTime = parseInt(params.ownTime.split(splitMark).join(""));
Object
.
keys
(
params
).
forEach
(
function
(
key
){
if
(
params
[
key
]
===
undefined
||
params
[
key
]
===
null
)
params
[
key
]
=
""
;
});
params
.
ownTime
=
$scope
.
queryOwnTime
(
params
.
ownTime
,
"int"
);
params
.
effectiveTime
=
$scope
.
q
ueryDate
(
params
.
effectiveTime
,
"/"
);
params
.
fileTime
=
$scope
.
q
ueryDate
(
params
.
fileTime
,
"/"
);
params
.
createTime
=
$scope
.
q
ueryDate
(
params
.
createTime
,
"/"
);
params
.
updateTime
=
$scope
.
q
ueryDate
(
params
.
updateTime
,
"/"
);
params
.
uploadTime
=
$scope
.
q
ueryDate
(
params
.
uploadTime
,
"/"
);
params
.
effectiveTime
=
$scope
.
getQ
ueryDate
(
params
.
effectiveTime
,
"/"
);
params
.
fileTime
=
$scope
.
getQ
ueryDate
(
params
.
fileTime
,
"/"
);
params
.
createTime
=
$scope
.
getQ
ueryDate
(
params
.
createTime
,
"/"
);
params
.
updateTime
=
$scope
.
getQ
ueryDate
(
params
.
updateTime
,
"/"
);
params
.
uploadTime
=
$scope
.
getQ
ueryDate
(
params
.
uploadTime
,
"/"
);
params
.
filePositionUrl
=
encodeURIComponent
(
params
.
filePositionUrl
);
taxDocumentListService
.
editRecord
(
params
).
then
(
function
(
data
)
{
if
(
data
==
true
)
{
...
...
@@ -492,12 +481,10 @@ taxDocumentManageModule.controller('taxDocumentListController',
// console.log(data);
if
(
data
)
{
$scope
.
typeAndAttrMap
=
data
;
Object
.
keys
(
data
).
forEach
(
function
(
item
)
{
$scope
.
fileTypeOptions
[
item
]
=
item
;
});
Object
.
values
(
data
).
forEach
(
function
(
item
)
{
$scope
.
fileAttrOptions
[
item
]
=
item
;
});
// 抽取每个元素的头一个字串,用于排序;
$scope
.
fileTypeOptions
=
$scope
.
sortByFirstCode
(
Object
.
keys
(
data
));
$scope
.
fileAttrOptions
=
$scope
.
sortByFirstCode
(
Object
.
values
(
data
));
}
});
...
...
@@ -799,7 +786,7 @@ taxDocumentManageModule.directive('multiFileUploader', function () {
fields[key] = $scope.queryOwnTime(curItemValue, "
int
");
} else {
if (/(createTime|updateTime|uploadTime)/.test(key)) {
fields[key] = $scope.
q
ueryDate(curItemValue, "
/
");
fields[key] = $scope.
getQ
ueryDate(curItemValue, "
/
");
} else fields[key] = curItemValue;
}
fileItem.formData.push(fields);
...
...
@@ -812,8 +799,8 @@ taxDocumentManageModule.directive('multiFileUploader', function () {
// params.ownTime = params.ownTime ? params.ownTime : "";
// params.ownTime = parseInt(_editFieldModel.ownTime.split("
-
").join(""));
params.ownTime = $scope.queryOwnTime(params.ownTime, "
int
");
params.fileTime = $scope.
q
ueryDate(params.fileTime, "
-
");
params.effectiveTime = $scope.
q
ueryDate(params.effectiveTime, "
-
");
params.fileTime = $scope.
getQ
ueryDate(params.fileTime, "
-
");
params.effectiveTime = $scope.
getQ
ueryDate(params.effectiveTime, "
-
");
_taxDocumentListService.verifyDuplicate(params).then(function (data) {
if (data == true) {
_fileItem.url = "
http
:
//etms.longi-silicon.com:8180//api/v1/taxDoc/add";
...
...
@@ -940,7 +927,9 @@ taxDocumentManageModule.directive('filePreview', function () {
}
else
if
(
/pdf/i
.
test
(
fileType
))
{
$scope
.
openPdfPreviewPop
(
filePositionUrl
);
}
else
{
}
else
if
(
/jpg|pig|gif|png|jpeg/i
.
test
(
fileType
))
{
$scope
.
openImgPreviewPop
(
fileName
,
filePositionUrl
);
}
else
{
SweetAlert
.
warning
(
$translate
.
instant
(
'UnFile'
));
}
...
...
@@ -952,14 +941,14 @@ taxDocumentManageModule.directive('filePreview', function () {
var
field_keys
=
Object
.
keys
(
_data
[
0
]);
var
field_values
=
Object
.
values
(
_data
[
0
]);
_data
.
forEach
(
function
(
item
)
{
var
curRow_keys
=
Object
.
keys
(
item
);
var
curRow_values
=
Object
.
values
(
item
);
if
(
curRow_keys
&&
curRow_keys
.
length
>
field_keys
.
length
)
{
field_keys
=
curRow_keys
;
field_values
=
curRow_values
;
}
});
//
_data.forEach(function (item) {
//
var curRow_keys = Object.keys(item);
//
var curRow_values = Object.values(item);
//
if (curRow_keys && curRow_keys.length > field_keys.length) {
//
field_keys = curRow_keys;
//
field_values = curRow_values;
//
}
//
});
$scope
.
filePreview_dataGridOptions
=
{
bindingOptions
:
{
...
...
@@ -1002,7 +991,7 @@ taxDocumentManageModule.directive('filePreview', function () {
field_keys
.
forEach
(
function
(
field
,
index
)
{
cols
.
push
({
dataField
:
field
,
caption
:
(
Object
.
keys
(
_data
[
0
]).
length
==
field_values
.
length
)
?
field_values
[
index
]
:
index
caption
:
field_values
[
index
]
});
});
return
cols
;
...
...
@@ -1102,6 +1091,27 @@ taxDocumentManageModule.directive('pdfPreview', function () {
}]
}
});
taxDocumentManageModule
.
directive
(
'imgPreview'
,
function
()
{
return
{
restrict
:
'EA'
,
controller
:
[
'$scope'
,
function
(
$scope
)
{
$scope
.
curImgSrc
=
""
;
$scope
.
curImgName
=
""
;
$scope
.
openImgPreviewPop
=
function
(
fileName
,
url
)
{
if
(
$scope
.
curImgSrc
!==
url
)
{
$scope
.
curImgName
=
fileName
;
$scope
.
curImgSrc
=
url
;
}
$
(
"#imgLayoutDialog"
).
modal
(
"show"
);
};
$scope
.
closeImgPop
=
function
()
{
$
(
"#imgLayoutDialog"
).
modal
(
"hide"
);
};
}]
}
});
taxDocumentManageModule
.
directive
(
'helpPop'
,
function
()
{
return
{
restrict
:
'EA'
,
...
...
@@ -1117,19 +1127,25 @@ taxDocumentManageModule.directive('helpPop', function () {
var
dataGrid
=
$
(
'<div dx-data-grid="help_dataGridOptions">'
);
$
(
"#helpPopContainer"
).
html
(
""
).
append
(
dataGrid
);
$compile
(
dataGrid
)(
$scope
);
$
(
"#helpPopDialog"
).
modal
(
"show"
);
var
helpPopDialog
=
$
(
"#helpPopDialog"
);
helpPopDialog
.
modal
(
"show"
);
})
};
$scope
.
sniffHelpPopRadio
=
function
(){
$
(
"input[name='helpPopRadio']"
).
each
(
function
(
index
,
item
)
{
if
(
item
.
checked
){
$scope
.
editFieldModel
.
fileAttr
=
item
.
getAttribute
(
"data-fileAttr"
);
$scope
.
editFieldModel
.
fileType
=
item
.
getAttribute
(
"data-fileType"
);
$scope
.
syncRequiredFields
(
$scope
.
editFieldModel
);
}
$scope
.
sniffHelpPopRadio
=
function
(){
var
checkedItem
=
$
(
".TDL-has-checked"
).
children
()[
0
].
childNodes
[
0
];
$scope
.
editFieldModel
.
fileAttr
=
checkedItem
.
getAttribute
(
"data-fileAttr"
);
taxDocumentListService
.
getDocumentsAttrAndType
({
params
:
{}}).
then
(
function
(
data
)
{
$scope
.
FileAttrAndTypeCache
=
data
.
items
;
//根据文件属性来匹配出 文件类型下拉列表
$scope
.
syncFileType
(
$scope
.
editFieldModel
.
fileAttr
);
$scope
.
editFieldModel
.
fileType
=
checkedItem
.
getAttribute
(
"data-fileType"
);
$scope
.
syncRequiredFields
(
$scope
.
editFieldModel
);
});
$
(
"#helpPopDialog"
).
modal
(
"hide"
);
};
$scope
.
help_dataGridUpdate
=
function
(
_data
)
{
$scope
.
help_cacheData
=
_data
.
items
;
$scope
.
help_dataGridOptions
=
{
...
...
@@ -1155,25 +1171,28 @@ taxDocumentManageModule.directive('helpPop', function () {
allowColumnReordering
:
true
,
columns
:
[
{
dataField
:
""
,
caption
:
""
,
dataField
:
"
fileAttr
"
,
caption
:
$translate
.
instant
(
'DocumentAttr'
)
,
cellTemplate
:
function
(
container
,
options
)
{
var
target
=
$
(
'<
input
name="helpPopRadio" type="radio" '
+
var
target
=
$
(
'<
span
name="helpPopRadio" type="radio" '
+
'data-id="helpPop_'
+
options
.
data
.
id
+
'" '
+
'data-fileAttr="'
+
options
.
data
.
fileAttr
+
'" '
+
'data-fileType="'
+
options
.
data
.
fileType
+
'"
/
>'
);
'"
>'
+
options
.
data
.
fileAttr
+
'</span
>'
);
container
.
append
(
target
);
// target.parents("tr").off('click').on('click', function () {
// $scope.sniffHelpPopRadio(options.data.id);
// });
var
trs
=
$
(
"#helpPopDialog"
).
find
(
"tr"
);
trs
.
each
(
function
(
index
,
item
)
{
$
(
item
).
off
(
"click"
).
on
(
"click"
,
function
(
e
){
trs
.
each
(
function
(
_index
,
_item
){
$
(
_item
).
removeClass
(
'TDL-has-checked'
);
});
$
(
e
.
currentTarget
).
addClass
(
'TDL-has-checked'
);
})
})
}
},
{
dataField
:
"fileAttr"
,
caption
:
$translate
.
instant
(
'DocumentAttr'
),
},
{
dataField
:
"fileType"
,
caption
:
$translate
.
instant
(
'DocumentType'
),
...
...
@@ -1188,6 +1207,7 @@ taxDocumentManageModule.directive('helpPop', function () {
],
};
};
$scope
.
openHelpPopForEntityStorage
=
function
()
{
window
.
swal
(
$translate
.
instant
(
'EntityStorageDescription'
));
}
...
...
@@ -1287,7 +1307,7 @@ taxDocumentManageModule.directive('tempModule', function () {
//税种
$scope
.
taxTypeSelects
=
[
"纳税申报表"
,
"税票"
];
$scope
.
q
ueryDate
=
function
(
time
,
mark
)
{
$scope
.
getQ
ueryDate
=
function
(
time
,
mark
)
{
if
(
!
time
)
return
""
;
var
theDate
=
new
Date
(
time
);
var
year
=
theDate
.
getFullYear
();
...
...
@@ -1372,6 +1392,23 @@ taxDocumentManageModule.directive('tempModule', function () {
$
(
"#period-picker3"
).
val
(
""
);
$
(
"#period-picker4"
).
val
(
""
);
};
$scope
.
sortByFirstCode
=
function
(
src
){
var
result
=
[];
var
typeKeys
=
[];
var
typeMap
=
{};
src
.
forEach
(
function
(
key
){
typeKeys
.
push
((
key
+
""
).
substr
(
0
,
1
));
typeMap
[(
key
+
""
).
substr
(
0
,
1
)]
=
key
;
});
typeKeys
.
sort
().
forEach
(
function
(
key
){
result
.
push
(
typeMap
[
key
]);
});
return
result
;
}
}]
}
});
...
...
atms-web/src/main/webapp/app/taxDocumentManage/tax-document-list/tax-document-list.html
View file @
72e50540
...
...
@@ -58,8 +58,8 @@
}
.TDL-query-bar
.TDL-query-val
.TDL-query-val-multi
{
width
:
45
%
;
max-width
:
45
%
;
width
:
50
%
;
max-width
:
50
%
;
display
:
inline-block
;
margin
:
0
;
position
:
absolute
;
...
...
@@ -67,7 +67,7 @@
left
:
1rem
;
}
.TDL-query-bar
.TDL-query-val
.TDL-query-val-multi
:nth-child
(
even
)
{
left
:
45
%
;
left
:
50
%
;
border-radius
:
0
4px
4px
0
;
}
...
...
@@ -113,8 +113,8 @@
.TDL-query-bar
.TDL-query-val
>
input
,
.TDL-query-bar
.TDL-query-val
>
select
{
width
:
9
0%
;
max-width
:
9
0%
;
width
:
10
0%
;
max-width
:
10
0%
;
box-sizing
:
border-box
;
border
:
1px
solid
#E1E1E1
;
}
...
...
@@ -333,6 +333,12 @@
div
.rangePicker.RTL
>
.wrap
>
.custom
>
div
.calendar.from
{
float
:
left
;
}
tr
.TDL-has-checked
{
background
:
#337ab7
;
color
:
#fff
;
}
</style>
<div
class=
"menu-header TDL-header"
>
<div
class=
"TDL-query-bar"
ng-init=
"MoreFields = false"
>
...
...
@@ -379,12 +385,12 @@
<!--<input type="text" class="form-control radius3" id="period-picker1"/>-->
<input
type=
'text'
placeholder=
"From"
date-time-picker
class=
"form-control TDL-query-val-multi"
data-date-format=
"yyyy
-mm
"
ng-model=
"queryFieldModel.fileBeginTime"
data-min-view-mode=
"
1
"
/>
data-date-format=
"yyyy
/mm/dd
"
ng-model=
"queryFieldModel.fileBeginTime"
data-min-view-mode=
"
0
"
/>
<input
type=
'text'
placeholder=
"To"
date-time-picker
class=
"form-control TDL-query-val-multi"
data-date-format=
"yyyy
-mm
"
ng-model=
"queryFieldModel.fileEndTTime"
data-min-view-mode=
"
1
"
/>
data-date-format=
"yyyy
/mm/dd
"
ng-model=
"queryFieldModel.fileEndTTime"
data-min-view-mode=
"
0
"
/>
</div>
</div>
...
...
@@ -397,12 +403,12 @@
<!--ng-model="queryFieldModel.Duration"/>-->
<input
type=
'text'
placeholder=
"From"
date-time-picker
class=
"form-control TDL-query-val-multi"
data-date-format=
"yyyy
-mm
"
ng-model=
"queryFieldModel.ownBeginTime"
data-min-view-mode=
"
1
"
/>
data-date-format=
"yyyy
/mm/dd
"
ng-model=
"queryFieldModel.ownBeginTime"
data-min-view-mode=
"
0
"
/>
<input
type=
'text'
placeholder=
"To"
date-time-picker
class=
"form-control TDL-query-val-multi"
data-date-format=
"yyyy
-mm
"
ng-model=
"queryFieldModel.ownEndTime"
data-min-view-mode=
"
1
"
/>
data-date-format=
"yyyy
/mm/dd
"
ng-model=
"queryFieldModel.ownEndTime"
data-min-view-mode=
"
0
"
/>
<!--<input type="text" class="form-control radius3" id="period-picker2"/>-->
</div>
...
...
@@ -460,17 +466,12 @@
<!--ng-model="queryFieldModel.DueDate"/>-->
<input
type=
'text'
placeholder=
"From"
date-time-picker
class=
"form-control TDL-query-val-multi"
data-date-format=
"yyyy
-mm
"
ng-model=
"queryFieldModel.effectiveBeginTime"
data-min-view-mode=
"
1
"
/>
data-date-format=
"yyyy
/mm/dd
"
ng-model=
"queryFieldModel.effectiveBeginTime"
data-min-view-mode=
"
0
"
/>
<input
type=
'text'
placeholder=
"To"
date-time-picker
class=
"form-control TDL-query-val-multi"
data-date-format=
"yyyy-mm"
ng-model=
"queryFieldModel.effectiveEndTime"
data-min-view-mode=
"1"
/>
<!--$scope.queryFieldModel.effectiveBeginTime = dateFormat(result[0].reverse());-->
<!--$scope.queryFieldModel.effectiveEndTime = dateFormat(result[1].reverse());-->
<!--<input type="text" class="form-control radius3" id="period-picker3" ng-model="queryFieldModel.DueDate" />-->
data-date-format=
"yyyy/mm/dd"
ng-model=
"queryFieldModel.effectiveEndTime"
data-min-view-mode=
"0"
/>
</div>
</div>
</div>
...
...
@@ -497,7 +498,7 @@
<span
translate=
"EntityIndex"
></span>
</div>
<div
class=
"TDL-query-val"
>
<input
type=
"
text
"
class=
"form-control radius3"
<input
type=
"
number
"
class=
"form-control radius3"
ng-model=
"queryFieldModel.physicalIndexNumber"
/>
</div>
</div>
...
...
@@ -540,12 +541,12 @@
<!--<input type="text" class="form-control radius3" id="period-picker4" />-->
<input
type=
'text'
placeholder=
"From"
date-time-picker
class=
"form-control TDL-query-val-multi"
data-date-format=
"yyyy
-mm
"
ng-model=
"queryFieldModel.uploadBeginTime"
data-min-view-mode=
"
1
"
/>
data-date-format=
"yyyy
/mm/dd
"
ng-model=
"queryFieldModel.uploadBeginTime"
data-min-view-mode=
"
0
"
/>
<input
type=
'text'
placeholder=
"To"
date-time-picker
class=
"form-control TDL-query-val-multi"
data-date-format=
"yyyy
-mm
"
ng-model=
"queryFieldModel.uploadEndTime"
data-min-view-mode=
"
1
"
/>
data-date-format=
"yyyy
/mm/dd
"
ng-model=
"queryFieldModel.uploadEndTime"
data-min-view-mode=
"
0
"
/>
<!--$scope.queryFieldModel.uploadBeginTime = dateFormat(result[0].reverse());-->
<!--$scope.queryFieldModel.uploadEndTime = dateFormat(result[1].reverse());-->
</div>
...
...
@@ -584,7 +585,7 @@
></app-usr-operate-log>
<button
class=
"btn DTL-create-record"
ng-click=
"openMultiUploadPop()"
>
<i
class=
"fa fa-plus-square"
></i>
<span
>
{{'MultiUpload' | translate}}
</span>
<span
translate=
"MultiUpload"
>
</span>
</button>
<button
class=
"btn DTL-create-record"
ng-click=
"openSimpleUploadPop()"
>
<i
class=
"fa fa-plus-square"
></i>
...
...
@@ -613,7 +614,7 @@
<div
class=
"modal fade"
id=
"simpleUploadPopDialog"
file-uploader
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
data-backdrop=
"static"
data-keyboard=
"false"
>
<div
class=
"modal-dialog"
style=
"width:80%;height:200px;"
role=
"document"
>
<div
class=
"modal-dialog"
style=
"width:80%;height:200px;
max-width:1028px
"
role=
"document"
>
<div
class=
"modal-content"
>
<form
class=
"form-horizontal"
name=
"newDocFileTypeForm"
ng-submit=
"simpleUploadSubmit(editFieldModel,'simple')"
>
...
...
@@ -817,6 +818,7 @@
</label>
<div
class=
"col-sm-11"
style=
"width:61.67%"
>
<input
class=
"form-control"
type=
"number"
placeholder=
"{{'PleaseType' | translate}}"
ng-required=
"isRequired('EntityIndex')"
ng-model=
"editFieldModel.physicalIndexNumber"
...
...
@@ -849,7 +851,7 @@
<div
class=
"modal fade"
id=
"multiUploadPopDialog"
multi-file-uploader
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
data-backdrop=
"static"
data-keyboard=
"false"
>
<div
class=
"modal-dialog"
style=
"width:80%;height:200px;"
role=
"document"
>
<div
class=
"modal-dialog"
style=
"width:80%;height:200px;
max-width:1028px
"
role=
"document"
>
<div
class=
"modal-content"
>
<form
class=
"form-horizontal"
name=
"newDocFileTypeForm"
ng-submit=
"multiUploadSubmit()"
>
<div
class=
"modal-header"
>
...
...
@@ -1053,6 +1055,7 @@
</label>
<div
class=
"col-sm-11"
style=
"width:61.67%"
>
<input
class=
"form-control"
type=
"number"
placeholder=
"{{'PleaseType' | translate}}"
ng-model=
"editFieldItem.physicalIndexNumber"
ng-required=
"isRequired('EntityIndex')"
...
...
@@ -1112,7 +1115,7 @@
<div
class=
"modal fade"
id=
"uploadResultPop"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModal"
data-backdrop=
"static"
data-keyboard=
"false"
>
<div
class=
"modal-dialog"
style=
"width:
80%;
"
role=
"document"
>
<div
class=
"modal-dialog"
style=
"width:
60%;max-width:960px
"
role=
"document"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<div
class=
"modal-title"
>
提示讯息
</div>
...
...
@@ -1141,7 +1144,7 @@
<div
class=
"modal fade"
id=
"helpPopDialog"
help-pop
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModal"
data-backdrop=
"static"
data-keyboard=
"false"
>
<div
class=
"modal-dialog"
style=
"width:80%;"
role=
"document"
>
<div
class=
"modal-dialog"
style=
"width:80%;
max-width:1028px
"
role=
"document"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<span
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
ng-click=
"hideFilePreviewPop()"
>
×
</span>
...
...
@@ -1164,9 +1167,23 @@
<div
class=
"wrapper TDL-pdf-preview-pop"
id=
"pdfContainer"
>
<canvas
id=
"the-canvas"
></canvas>
</div>
<button
class=
"TDL-pdf-preview-pop-close-btn"
ng-click=
"closePdfPop()"
>
x
</button>
<button
class=
"TDL-pdf-preview-pop-close-btn"
ng-click=
"closePdfPop()"
>
×
</button>
<button
class=
"TDL-pdf-paging-btn TDL-pdf-paging-btn-prev"
ng-click=
"prevPaging()"
title=
"上一页"
>
<
</button>
<button
class=
"TDL-pdf-paging-btn TDL-pdf-paging-btn-next"
ng-click=
"nextPaging()"
title=
"下一页"
>
>
</button>
</div>
<div
class=
"modal fade"
id=
"imgLayoutDialog"
img-preview
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModal"
data-backdrop=
"static"
data-keyboard=
"false"
>
<div
class=
"modal-dialog"
style=
"width:80%;max-width:1028px"
role=
"document"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<span
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
ng-click=
"closeImgPop()"
>
×
</span>
<div
class=
"modal-title"
>
{{curImgName}}
</div>
</div>
<div
class=
"modal-body"
style=
"text-align: center;"
>
<img
src=
"{{curImgSrc}}"
alt=
"please try again"
>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
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