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
f3afdc1c
Commit
f3afdc1c
authored
Mar 13, 2019
by
chase
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge 档案管理代码
parent
7c05ad7d
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
163 additions
and
108 deletions
+163
-108
OperationLogFileTypeController.java
...xtech/atms/controller/OperationLogFileTypeController.java
+14
-0
OperationLogTaxDocController.java
...taxtech/atms/controller/OperationLogTaxDocController.java
+15
-0
TaxDocumentController.java
...va/pwc/taxtech/atms/controller/TaxDocumentController.java
+3
-3
TaxDocumentDto.java
...pi/src/main/java/pwc/taxtech/atms/dto/TaxDocumentDto.java
+10
-0
OperationLogFileTypeServiceImpl.java
...ch/atms/service/impl/OperationLogFileTypeServiceImpl.java
+7
-0
OperationLogTaxDocServiceImpl.java
...tech/atms/service/impl/OperationLogTaxDocServiceImpl.java
+7
-0
TaxDocumentServiceImpl.java
...pwc/taxtech/atms/service/impl/TaxDocumentServiceImpl.java
+22
-10
FileTypes.java
...-dao/src/main/java/pwc/taxtech/atms/entity/FileTypes.java
+2
-2
TaxDocument.java
...ao/src/main/java/pwc/taxtech/atms/entity/TaxDocument.java
+6
-6
app-usr-operate-log.ctrl.js
...framework/app-usr-operate-log/app-usr-operate-log.ctrl.js
+15
-12
app-usr-operate-log.js
.../app/framework/app-usr-operate-log/app-usr-operate-log.js
+1
-0
app-usr-operate-log.svc.js
.../framework/app-usr-operate-log/app-usr-operate-log.svc.js
+2
-1
tax-document-list.ctrl.js
...ocumentManage/tax-document-list/tax-document-list.ctrl.js
+54
-72
tax-document-list.html
...axDocumentManage/tax-document-list/tax-document-list.html
+5
-2
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/OperationLogFileTypeController.java
View file @
f3afdc1c
...
@@ -36,6 +36,20 @@ public class OperationLogFileTypeController {
...
@@ -36,6 +36,20 @@ public class OperationLogFileTypeController {
return
returnData
;
return
returnData
;
}
}
/**
* 根据 id 数组来查询相关日志
* @return
*/
@RequestMapping
(
"/selectListForLog"
)
@ResponseBody
public
ReturnData
selectListForLog
(
List
<
String
>
fileTypeIds
){
List
<
OperationLogFileType
>
operationLogFileType
=
operationLogFileTypeService
.
selectListForLog
(
fileTypeIds
);
ReturnData
returnData
=
new
ReturnData
();
returnData
.
setItems
(
operationLogFileType
);
returnData
.
setTotalCount
(
operationLogFileType
.
size
());
return
returnData
;
}
/**
/**
* 添加文件档案操作日志
* 添加文件档案操作日志
* @param operationLogFileType
* @param operationLogFileType
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/OperationLogTaxDocController.java
View file @
f3afdc1c
...
@@ -32,6 +32,21 @@ public class OperationLogTaxDocController {
...
@@ -32,6 +32,21 @@ public class OperationLogTaxDocController {
return
returnData
;
return
returnData
;
}
}
/**
* 根据 id 数组来查询相关日志
* @param taxDocumentIds
* @return
*/
@RequestMapping
(
"/selectListForLog"
)
@ResponseBody
public
ReturnData
selectListForLog
(
List
<
String
>
taxDocumentIds
){
List
<
OperationLogTaxDocument
>
operationLogTaxDocuments
=
operationLogTaxDocService
.
selectListForLog
(
taxDocumentIds
);
ReturnData
returnData
=
new
ReturnData
();
returnData
.
setItems
(
operationLogTaxDocuments
);
returnData
.
setTotalCount
(
operationLogTaxDocuments
.
size
());
return
returnData
;
}
@RequestMapping
(
"add"
)
@RequestMapping
(
"add"
)
@ResponseBody
@ResponseBody
public
boolean
addTaxDocuments
(
OperationLogTaxDocument
operationLogTaxDocument
){
public
boolean
addTaxDocuments
(
OperationLogTaxDocument
operationLogTaxDocument
){
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/TaxDocumentController.java
View file @
f3afdc1c
...
@@ -161,14 +161,14 @@ public class TaxDocumentController {
...
@@ -161,14 +161,14 @@ public class TaxDocumentController {
/**
/**
* 读取Excel转换成 Json
* 读取Excel转换成 Json
* @param
path
文件的路径
* @param
taxDocumentDto
文件的路径
*/
*/
@PostMapping
(
"/previewExcelToJson"
)
@PostMapping
(
"/previewExcelToJson"
)
@ResponseBody
@ResponseBody
public
String
previewExcel
(
@Request
Param
(
"path"
)
String
path
)
{
public
String
previewExcel
(
@Request
Body
TaxDocumentDto
taxDocumentDto
)
{
try
{
try
{
JSONArray
dataArray
=
new
JSONArray
();
JSONArray
dataArray
=
new
JSONArray
();
URL
httpurl
=
new
URL
(
path
);
URL
httpurl
=
new
URL
(
taxDocumentDto
.
getPath
()
);
InputStream
is
;
InputStream
is
;
HttpURLConnection
httpConn
=(
HttpURLConnection
)
httpurl
.
openConnection
();
HttpURLConnection
httpConn
=(
HttpURLConnection
)
httpurl
.
openConnection
();
httpConn
.
setDoOutput
(
true
);
// 使用 URL 连接进行输出
httpConn
.
setDoOutput
(
true
);
// 使用 URL 连接进行输出
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/TaxDocumentDto.java
View file @
f3afdc1c
...
@@ -61,6 +61,16 @@ public class TaxDocumentDto {
...
@@ -61,6 +61,16 @@ public class TaxDocumentDto {
private
List
<
Long
>
ids
=
new
ArrayList
<>();
//批量删除id
private
List
<
Long
>
ids
=
new
ArrayList
<>();
//批量删除id
private
String
path
;
//文件上传路径
public
String
getPath
()
{
return
path
;
}
public
void
setPath
(
String
path
)
{
this
.
path
=
path
;
}
public
List
<
Long
>
getIds
()
{
public
List
<
Long
>
getIds
()
{
return
ids
;
return
ids
;
}
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/OperationLogFileTypeServiceImpl.java
View file @
f3afdc1c
...
@@ -47,4 +47,11 @@ public class OperationLogFileTypeServiceImpl {
...
@@ -47,4 +47,11 @@ public class OperationLogFileTypeServiceImpl {
return
false
;
return
false
;
}
}
}
}
public
List
<
OperationLogFileType
>
selectListForLog
(
List
<
String
>
fileTypeIds
)
{
OperationLogFileTypeExample
example
=
new
OperationLogFileTypeExample
();
OperationLogFileTypeExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andIdIn
(
fileTypeIds
);
return
operationLogFileTypeMapper
.
selectByExample
(
example
);
}
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/OperationLogTaxDocServiceImpl.java
View file @
f3afdc1c
...
@@ -47,4 +47,11 @@ public class OperationLogTaxDocServiceImpl {
...
@@ -47,4 +47,11 @@ public class OperationLogTaxDocServiceImpl {
return
false
;
return
false
;
}
}
}
}
public
List
<
OperationLogTaxDocument
>
selectListForLog
(
List
<
String
>
taxDocumentIds
)
{
OperationLogTaxDocumentExample
example
=
new
OperationLogTaxDocumentExample
();
OperationLogTaxDocumentExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andIdIn
(
taxDocumentIds
);
return
operationLogTaxDocumentMapper
.
selectByExample
(
example
);
}
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/TaxDocumentServiceImpl.java
View file @
f3afdc1c
...
@@ -85,9 +85,13 @@ public class TaxDocumentServiceImpl {
...
@@ -85,9 +85,13 @@ public class TaxDocumentServiceImpl {
if
(
StringUtils
.
isNotBlank
(
taxDocumentDto
.
getFileType
()))
{
if
(
StringUtils
.
isNotBlank
(
taxDocumentDto
.
getFileType
()))
{
criteria
.
andFileTypeEqualTo
(
taxDocumentDto
.
getFileType
());
criteria
.
andFileTypeEqualTo
(
taxDocumentDto
.
getFileType
());
}
}
//文件生效日期 fileTime
//文件生效起始日期 fileBeginTime
if
(
null
!=
taxDocumentDto
.
getFileBeginTime
()
&&
null
!=
taxDocumentDto
.
getFileEndTTime
())
{
if
(
null
!=
taxDocumentDto
.
getFileBeginTime
())
{
criteria
.
andFileTimeBetween
(
taxDocumentDto
.
getFileBeginTime
(),
taxDocumentDto
.
getFileEndTTime
());
criteria
.
andFileTimeGreaterThanOrEqualTo
(
taxDocumentDto
.
getFileBeginTime
());
}
//文件生效到期日期 fileEndTTime
if
(
null
!=
taxDocumentDto
.
getFileEndTTime
())
{
criteria
.
andFileTimeLessThanOrEqualTo
(
taxDocumentDto
.
getFileEndTTime
());
}
}
//所属时间 ownTime
//所属时间 ownTime
if
(
null
!=
taxDocumentDto
.
getOwnTime
())
{
if
(
null
!=
taxDocumentDto
.
getOwnTime
())
{
...
@@ -95,7 +99,7 @@ public class TaxDocumentServiceImpl {
...
@@ -95,7 +99,7 @@ public class TaxDocumentServiceImpl {
}
}
//档案名称 fileName
//档案名称 fileName
if
(
StringUtils
.
isNotBlank
(
taxDocumentDto
.
getFileName
()))
{
if
(
StringUtils
.
isNotBlank
(
taxDocumentDto
.
getFileName
()))
{
criteria
.
andFileNameLike
(
"%"
+
taxDocumentDto
.
getFileName
()+
"%"
);
criteria
.
andFileNameLike
(
"%"
+
taxDocumentDto
.
getFileName
()
+
"%"
);
}
}
//业务线 businessLine
//业务线 businessLine
if
(
StringUtils
.
isNotBlank
(
taxDocumentDto
.
getBusinessLine
()))
{
if
(
StringUtils
.
isNotBlank
(
taxDocumentDto
.
getBusinessLine
()))
{
...
@@ -105,9 +109,13 @@ public class TaxDocumentServiceImpl {
...
@@ -105,9 +109,13 @@ public class TaxDocumentServiceImpl {
if
(
StringUtils
.
isNotBlank
(
taxDocumentDto
.
getCompanyName
()))
{
if
(
StringUtils
.
isNotBlank
(
taxDocumentDto
.
getCompanyName
()))
{
criteria
.
andCompanyNameEqualTo
(
taxDocumentDto
.
getCompanyName
());
criteria
.
andCompanyNameEqualTo
(
taxDocumentDto
.
getCompanyName
());
}
}
//到期日 effectiveTime
//到期起始日 effectiveBeginTime
if
(
null
!=
taxDocumentDto
.
getEffectiveBeginTime
()
&&
null
!=
taxDocumentDto
.
getEffectiveEndTime
())
{
if
(
null
!=
taxDocumentDto
.
getEffectiveBeginTime
())
{
criteria
.
andEffectiveTimeBetween
(
taxDocumentDto
.
getEffectiveBeginTime
(),
taxDocumentDto
.
getEffectiveEndTime
());
criteria
.
andEffectiveTimeGreaterThanOrEqualTo
(
taxDocumentDto
.
getEffectiveBeginTime
());
}
//到期结束日 effectiveEndTime
if
(
null
!=
taxDocumentDto
.
getEffectiveEndTime
())
{
criteria
.
andEffectiveTimeLessThanOrEqualTo
(
taxDocumentDto
.
getEffectiveEndTime
());
}
}
//税种 taxType
//税种 taxType
if
(
StringUtils
.
isNotBlank
(
taxDocumentDto
.
getTaxType
()))
{
if
(
StringUtils
.
isNotBlank
(
taxDocumentDto
.
getTaxType
()))
{
...
@@ -129,9 +137,13 @@ public class TaxDocumentServiceImpl {
...
@@ -129,9 +137,13 @@ public class TaxDocumentServiceImpl {
if
(
null
!=
taxDocumentDto
.
getAuditStatus
())
{
if
(
null
!=
taxDocumentDto
.
getAuditStatus
())
{
criteria
.
andAuditStatusEqualTo
(
taxDocumentDto
.
getAuditStatus
());
criteria
.
andAuditStatusEqualTo
(
taxDocumentDto
.
getAuditStatus
());
}
}
//上传日期 uploadTime
//上传开始日期 uploadBeginTime
if
(
null
!=
taxDocumentDto
.
getUploadBeginTime
()
&&
null
!=
taxDocumentDto
.
getUploadEndTime
())
{
if
(
null
!=
taxDocumentDto
.
getUploadBeginTime
())
{
criteria
.
andUploadTimeBetween
(
taxDocumentDto
.
getUploadBeginTime
(),
taxDocumentDto
.
getUploadEndTime
());
criteria
.
andUploadTimeGreaterThanOrEqualTo
(
taxDocumentDto
.
getUploadBeginTime
());
}
//上传结束日期 uploadEndTime
if
(
null
!=
taxDocumentDto
.
getUploadEndTime
())
{
criteria
.
andUploadTimeLessThanOrEqualTo
(
taxDocumentDto
.
getUploadEndTime
());
}
}
//创建人 creator
//创建人 creator
if
(
StringUtils
.
isNotBlank
(
taxDocumentDto
.
getCreator
()))
{
if
(
StringUtils
.
isNotBlank
(
taxDocumentDto
.
getCreator
()))
{
...
...
atms-dao/src/main/java/pwc/taxtech/atms/entity/FileTypes.java
View file @
f3afdc1c
...
@@ -449,8 +449,8 @@ public class FileTypes implements Serializable {
...
@@ -449,8 +449,8 @@ public class FileTypes implements Serializable {
sb
.
append
(
", 说明="
).
append
(
description
);
sb
.
append
(
", 说明="
).
append
(
description
);
sb
.
append
(
", 必填字段="
).
append
(
requiredField
);
sb
.
append
(
", 必填字段="
).
append
(
requiredField
);
sb
.
append
(
", 创建人="
).
append
(
creator
);
sb
.
append
(
", 创建人="
).
append
(
creator
);
sb
.
append
(
", 创建时间="
).
append
(
createTime
.
toLocaleString
());
sb
.
append
(
", 创建时间="
).
append
(
null
==
createTime
?
null
:
createTime
.
toLocaleString
());
sb
.
append
(
", 更新时间="
).
append
(
updateTime
.
toLocaleString
());
sb
.
append
(
", 更新时间="
).
append
(
null
==
updateTime
?
null
:
updateTime
.
toLocaleString
());
sb
.
append
(
", 状态="
).
append
(
"T"
.
equals
(
status
)?
"启用"
:
"未启用"
);
sb
.
append
(
", 状态="
).
append
(
"T"
.
equals
(
status
)?
"启用"
:
"未启用"
);
sb
.
append
(
", 说明="
).
append
(
remarks
);
sb
.
append
(
", 说明="
).
append
(
remarks
);
return
sb
.
toString
();
return
sb
.
toString
();
...
...
atms-dao/src/main/java/pwc/taxtech/atms/entity/TaxDocument.java
View file @
f3afdc1c
...
@@ -912,18 +912,18 @@ public class TaxDocument implements Serializable {
...
@@ -912,18 +912,18 @@ public class TaxDocument implements Serializable {
sb
.
append
(
"业务线="
).
append
(
businessLine
);
sb
.
append
(
"业务线="
).
append
(
businessLine
);
sb
.
append
(
"公司名称="
).
append
(
companyName
);
sb
.
append
(
"公司名称="
).
append
(
companyName
);
sb
.
append
(
"税种="
).
append
(
taxType
);
sb
.
append
(
"税种="
).
append
(
taxType
);
sb
.
append
(
"文件生效日期="
).
append
(
fileTime
.
toLocaleString
());
sb
.
append
(
"文件生效日期="
).
append
(
fileTime
==
null
?
null
:
fileTime
.
toLocaleString
());
sb
.
append
(
"到期日="
).
append
(
effectiveTime
.
toLocaleString
()
);
sb
.
append
(
"到期日="
).
append
(
effectiveTime
==
null
?
null
:
effectiveTime
.
toLocaleString
()
);
sb
.
append
(
"所属期间="
).
append
(
ownTime
);
sb
.
append
(
"所属期间="
).
append
(
ownTime
);
sb
.
append
(
"创建人="
).
append
(
creator
);
sb
.
append
(
"创建人="
).
append
(
creator
);
sb
.
append
(
"创建时间="
).
append
(
createTime
.
toLocaleString
());
sb
.
append
(
"创建时间="
).
append
(
createTime
==
null
?
null
:
createTime
.
toLocaleString
());
sb
.
append
(
"更新时间="
).
append
(
updateTime
.
toLocaleString
());
sb
.
append
(
"更新时间="
).
append
(
updateTime
==
null
?
null
:
updateTime
.
toLocaleString
());
sb
.
append
(
"上传时间="
).
append
(
uploadTime
.
toLocaleString
());
sb
.
append
(
"上传时间="
).
append
(
uploadTime
==
null
?
null
:
uploadTime
.
toLocaleString
());
sb
.
append
(
"实物存放地点="
).
append
(
storageArea
);
sb
.
append
(
"实物存放地点="
).
append
(
storageArea
);
sb
.
append
(
"保管人="
).
append
(
keeper
);
sb
.
append
(
"保管人="
).
append
(
keeper
);
sb
.
append
(
"实物索引号="
).
append
(
physicalIndexNumber
);
sb
.
append
(
"实物索引号="
).
append
(
physicalIndexNumber
);
sb
.
append
(
"备注="
).
append
(
remark
);
sb
.
append
(
"备注="
).
append
(
remark
);
sb
.
append
(
"审批状态="
).
append
(
auditStatus
==
0
?
"未审核"
:
auditStatus
==
1
?
"审核通过"
:
"审核不通过"
);
sb
.
append
(
"审批状态="
).
append
(
null
==
auditStatus
?
null
:
auditStatus
==
0
?
"未审核"
:
auditStatus
==
1
?
"审核通过"
:
"审核不通过"
);
sb
.
append
(
"是否可用="
).
append
(
"T"
.
equals
(
enable
)?
"启用"
:
"未启用"
);
sb
.
append
(
"是否可用="
).
append
(
"T"
.
equals
(
enable
)?
"启用"
:
"未启用"
);
return
sb
.
toString
();
return
sb
.
toString
();
}
}
...
...
atms-web/src/main/webapp/app/framework/app-usr-operate-log/app-usr-operate-log.ctrl.js
View file @
f3afdc1c
...
@@ -9,8 +9,11 @@ frameworkModule.controller('appUsrOperateLogController',
...
@@ -9,8 +9,11 @@ frameworkModule.controller('appUsrOperateLogController',
// thisParams:"=",
// thisParams:"=",
$scope
.
localData
=
null
;
$scope
.
localData
=
null
;
$scope
.
loadMainData
=
function
()
{
$scope
.
loadMainData
=
function
()
{
$scope
.
thisModuleId
=
$scope
.
thisModuleId
?
$scope
.
thisModuleId
:
[];
var
config
=
{
var
config
=
{
params
:
{}
params
:
{
taxDocumentIds
:
JSON
.
stringify
(
$scope
.
thisModuleId
)
}
};
};
usrOperateLogService
[
$scope
.
thisModuleName
](
config
).
then
(
function
(
data
)
{
usrOperateLogService
[
$scope
.
thisModuleName
](
config
).
then
(
function
(
data
)
{
if
(
status
===
204
)
{
if
(
status
===
204
)
{
...
@@ -113,20 +116,20 @@ frameworkModule.controller('appUsrOperateLogController',
...
@@ -113,20 +116,20 @@ frameworkModule.controller('appUsrOperateLogController',
allowHeaderFiltering
:
true
,
allowHeaderFiltering
:
true
,
},
},
{
//
{
dataField
:
"operationContent"
,
//
dataField: "operationContent",
caption
:
$translate
.
instant
(
'OperationContent'
),
//
caption: $translate.instant('OperationContent'),
allowHeaderFiltering
:
true
,
//
allowHeaderFiltering: true,
},
//
},
{
//
{
dataField
:
"originalState"
,
//
dataField: "originalState",
caption
:
$translate
.
instant
(
'LogOriginalState'
),
//
caption: $translate.instant('LogOriginalState'),
allowHeaderFiltering
:
true
,
//
allowHeaderFiltering: true,
},
//
},
{
{
dataField
:
"updateState"
,
dataField
:
"updateState"
,
caption
:
$translate
.
instant
(
'
LogUpdateState
'
),
caption
:
$translate
.
instant
(
'
OperationContent
'
),
allowHeaderFiltering
:
true
,
allowHeaderFiltering
:
true
,
},
},
{
{
...
...
atms-web/src/main/webapp/app/framework/app-usr-operate-log/app-usr-operate-log.js
View file @
f3afdc1c
...
@@ -14,6 +14,7 @@ frameworkModule.directive('appUsrOperateLog', ['$log',
...
@@ -14,6 +14,7 @@ frameworkModule.directive('appUsrOperateLog', ['$log',
thisTitle
:
"@"
,
//自定义title
thisTitle
:
"@"
,
//自定义title
thisParams
:
"="
,
//自定义参数
thisParams
:
"="
,
//自定义参数
thisCaption
:
"="
,
//自定义表头字段
thisCaption
:
"="
,
//自定义表头字段
thisModuleId
:
"="
,
//根据ID来获取指定的日志信息
},
},
controller
:
'appUsrOperateLogController'
,
controller
:
'appUsrOperateLogController'
,
link
:
function
(
$scope
,
$element
,
$attr
)
{
link
:
function
(
$scope
,
$element
,
$attr
)
{
...
...
atms-web/src/main/webapp/app/framework/app-usr-operate-log/app-usr-operate-log.svc.js
View file @
f3afdc1c
...
@@ -10,7 +10,7 @@ function ($q, apiConfig, jqFetch,apiInterceptor) {
...
@@ -10,7 +10,7 @@ function ($q, apiConfig, jqFetch,apiInterceptor) {
return
jqFetch
.
get
(
apiInterceptor
.
webApiHostUrl
+
'/operLogFileTypes/selectList'
,
params
);
return
jqFetch
.
get
(
apiInterceptor
.
webApiHostUrl
+
'/operLogFileTypes/selectList'
,
params
);
},
},
docManageListLog
:
function
(
params
)
{
docManageListLog
:
function
(
params
)
{
return
jqFetch
.
get
(
apiInterceptor
.
webApiHostUrl
+
'/operLogTaxDoc/selectList'
,
params
);
return
jqFetch
.
get
(
apiInterceptor
.
webApiHostUrl
+
'/operLogTaxDoc/selectList
ForLog
'
,
params
);
}
}
};
};
}]);
}]);
\ No newline at end of file
atms-web/src/main/webapp/app/taxDocumentManage/tax-document-list/tax-document-list.ctrl.js
View file @
f3afdc1c
...
@@ -83,10 +83,13 @@ taxDocumentManageModule.controller('taxDocumentListController',
...
@@ -83,10 +83,13 @@ taxDocumentManageModule.controller('taxDocumentListController',
dataField
:
"id"
,
dataField
:
"id"
,
caption
:
""
,
caption
:
""
,
cellTemplate
:
function
(
container
,
options
)
{
cellTemplate
:
function
(
container
,
options
)
{
$
(
'<input name="dataGridCheckBox"
'
+
var
targetString
=
'<input name="dataGridCheckBox" ng-click="sniffCheckbox()"
'
+
'data-id="'
+
options
.
data
.
id
+
'" '
+
'data-id="'
+
options
.
data
.
id
+
'" '
+
'data-url="'
+
options
.
data
.
filePositionUrl
+
'" '
+
'data-url="'
+
options
.
data
.
filePositionUrl
+
'" '
+
'type="checkbox">'
).
appendTo
(
container
);
'type="checkbox">'
;
var
eventTarget
=
$
(
targetString
);
$compile
(
eventTarget
)(
$scope
);
container
.
append
(
eventTarget
);
}
}
},
},
{
{
...
@@ -245,28 +248,19 @@ taxDocumentManageModule.controller('taxDocumentListController',
...
@@ -245,28 +248,19 @@ taxDocumentManageModule.controller('taxDocumentListController',
$scope
.
isCreatePop
=
false
;
$scope
.
isCreatePop
=
false
;
var
openSimpleUploadPop
=
function
(
rowId
)
{
var
openSimpleUploadPop
=
function
(
rowId
)
{
$scope
.
uploader
.
clearQueue
();
$scope
.
uploader
.
clearQueue
();
$
(
"#uploadFilePlugin"
).
val
(
null
);
// 带ID的就是编辑窗口
// 带ID的就是编辑窗口
if
(
rowId
)
{
if
(
rowId
)
{
$scope
.
isCreatePop
=
false
;
$scope
.
isCreatePop
=
false
;
$scope
.
simpleUploadSubmit
=
editDocFileRecord
;
$scope
.
simpleUploadSubmit
=
editDocFileRecord
;
$scope
.
syncFileType
();
$scope
.
localData
.
forEach
(
function
(
item
)
{
$scope
.
localData
.
forEach
(
function
(
item
)
{
if
(
item
.
id
==
rowId
)
{
if
(
item
.
id
==
rowId
)
{
$scope
.
editFieldModel
=
angular
.
copy
(
item
);
$scope
.
editFieldModel
=
angular
.
copy
(
item
);
$scope
.
editFieldModel
.
ownTime
=
dateFormat
(
item
.
ownTime
);
$scope
.
editFieldModel
.
ownTime
=
$scope
.
queryDate
(
item
.
ownTime
,
"/"
);
$scope
.
editFieldModel
.
fileTime
=
dateFormat
(
item
.
fileTime
);
$scope
.
editFieldModel
.
fileTime
=
$scope
.
queryDate
(
item
.
fileTime
,
"/"
);
$scope
.
editFieldModel
.
effectiveTime
=
dateFormat
(
item
.
effectiveTime
);
$scope
.
editFieldModel
.
effectiveTime
=
$scope
.
queryDate
(
item
.
effectiveTime
,
"/"
);
$scope
.
syncFileType
(
$scope
.
editFieldModel
.
fileAttr
);
$scope
.
syncFileType
(
$scope
.
editFieldModel
.
fileAttr
);
function
dateFormat
(
date
)
{
$scope
.
matchFieldTypeId
(
$scope
.
editFieldModel
);
if
(
!
date
)
return
""
;
var
_date
=
new
Date
(
date
);
var
yy
=
_date
.
getFullYear
();
var
mm
=
(
_date
.
getMonth
()
+
1
)
+
""
;
var
dd
=
_date
.
getDate
()
+
""
;
mm
=
mm
.
length
<
2
?
"0"
+
mm
:
mm
;
dd
=
dd
.
length
<
2
?
"0"
+
dd
:
dd
;
return
yy
+
"-"
+
mm
+
"-"
+
dd
;
}
}
}
});
});
}
}
...
@@ -705,8 +699,8 @@ taxDocumentManageModule.directive('dateTimePicker', function () {
...
@@ -705,8 +699,8 @@ taxDocumentManageModule.directive('dateTimePicker', function () {
taxDocumentManageModule
.
directive
(
'fileUploader'
,
function
()
{
taxDocumentManageModule
.
directive
(
'fileUploader'
,
function
()
{
return
{
return
{
restrict
:
"EA"
,
restrict
:
"EA"
,
controller
:
[
'$scope'
,
'FileUploader'
,
'apiInterceptor'
,
'taxDocumentListService'
,
'$translate'
,
'SweetAlert'
,
controller
:
[
'$scope'
,
'FileUploader'
,
'apiInterceptor'
,
'taxDocumentListService'
,
'$translate'
,
'SweetAlert'
,
'$compile'
,
function
(
$scope
,
FileUploader
,
apiInterceptor
,
taxDocumentListService
,
$translate
,
SweetAlert
)
{
function
(
$scope
,
FileUploader
,
apiInterceptor
,
taxDocumentListService
,
$translate
,
SweetAlert
,
$compile
)
{
$scope
.
uploadFile
=
function
()
{
$scope
.
uploadFile
=
function
()
{
$
(
"#uploadFilePlugin"
).
click
();
$
(
"#uploadFilePlugin"
).
click
();
};
};
...
@@ -714,7 +708,7 @@ taxDocumentManageModule.directive('fileUploader', function () {
...
@@ -714,7 +708,7 @@ taxDocumentManageModule.directive('fileUploader', function () {
url
:
apiInterceptor
.
webApiHostUrl
+
"/v1/taxDoc/add"
,
url
:
apiInterceptor
.
webApiHostUrl
+
"/v1/taxDoc/add"
,
// autoUpload: true,//添加后,自动上传
// autoUpload: true,//添加后,自动上传
headers
:
{
"Authorization"
:
apiInterceptor
.
tokenType
+
' '
+
apiInterceptor
.
apiToken
()},
headers
:
{
"Authorization"
:
apiInterceptor
.
tokenType
+
' '
+
apiInterceptor
.
apiToken
()},
removeAfterUpload
:
true
,
//
removeAfterUpload: true,
});
});
$scope
.
uploader
.
filters
.
push
({
//xls限制
$scope
.
uploader
.
filters
.
push
({
//xls限制
name
:
'fileTypeFilter'
,
name
:
'fileTypeFilter'
,
...
@@ -728,7 +722,6 @@ taxDocumentManageModule.directive('fileUploader', function () {
...
@@ -728,7 +722,6 @@ taxDocumentManageModule.directive('fileUploader', function () {
var prevPath = fileNativePath.split(splitMark);
var prevPath = fileNativePath.split(splitMark);
prevPath.pop();
prevPath.pop();
fileNativePath = prevPath.join(splitMark) + splitMark;
fileNativePath = prevPath.join(splitMark) + splitMark;
$scope.uploader.clearQueue();
$scope.editFieldModel.fileNativePath = fileNativePath;
$scope.editFieldModel.fileNativePath = fileNativePath;
$scope.editFieldModel.fileName = item.name;
$scope.editFieldModel.fileName = item.name;
$scope.autoMatchAttrAndType(item.name,$scope.editFieldModel);
$scope.autoMatchAttrAndType(item.name,$scope.editFieldModel);
...
@@ -740,26 +733,19 @@ taxDocumentManageModule.directive('fileUploader', function () {
...
@@ -740,26 +733,19 @@ taxDocumentManageModule.directive('fileUploader', function () {
});
});
$scope.uploader.onErrorItem = function (fileItem, response, status, headers) {
$scope.uploader.onErrorItem = function (fileItem, response, status, headers) {
SweetAlert.warning($translate.instant('FailUpload'));
SweetAlert.warning($translate.instant('FailUpload'));
// $scope.uploader.cancelItem();
// $scope.uploader.clearQueue();
$scope.editFieldModel = {};
$scope.editFieldModel = {};
// $('#busy-indicator-container').hide();
};
};
// $scope.uploader.onCancelItem = function(fileItem, response, status, headers) {
// $scope.uploader.onCancelItem = function(fileItem, response, status, headers) {
// console.info('onCancelItem', fileItem, response, status, headers);
// console.info('onCancelItem', fileItem, response, status, headers);
// };
// };
$scope.uploader.onSuccessItem = function (fileItem, response, status, headers) {
$scope.uploader.onSuccessItem = function (fileItem, response, status, headers) {
// fileItem.filePositionUrl = response;
// $scope.editFieldModel.filePositionUrl = response;
var title = $translate.instant("
Uploaded
");
var title = $translate.instant("
Uploaded
");
if ($scope.isCoverOperation) {
if ($scope.isCoverOperation) {
title = $translate.instant("
Edited
");
title = $translate.instant("
Edited
");
// $scope.coverDocFileRecord($scope.editFieldModel, 'simple');
} else {
} else {
title = $translate.instant("
Uploaded
");
title = $translate.instant("
Uploaded
");
// $scope.addLogicAfterUploadFile($scope.editFieldModel, 'simple');
}
}
SweetAlert.swal({
SweetAlert.swal({
...
@@ -780,8 +766,8 @@ taxDocumentManageModule.directive('fileUploader', function () {
...
@@ -780,8 +766,8 @@ taxDocumentManageModule.directive('fileUploader', function () {
taxDocumentManageModule.directive('multiFileUploader', function () {
taxDocumentManageModule.directive('multiFileUploader', function () {
return {
return {
restrict: "
EA
",
restrict: "
EA
",
controller: ['$scope', 'FileUploader', 'apiInterceptor', 'taxDocumentListService', '$translate', 'SweetAlert',
controller: ['$scope', 'FileUploader', 'apiInterceptor', 'taxDocumentListService', '$translate', 'SweetAlert',
'$compile',
function ($scope, FileUploader, apiInterceptor, taxDocumentListService, $translate, SweetAlert) {
function ($scope, FileUploader, apiInterceptor, taxDocumentListService, $translate, SweetAlert
, $compile
) {
var timer = null;
var timer = null;
$scope.activeTab = function (activeIndex) {
$scope.activeTab = function (activeIndex) {
$scope.editFieldModel_multi.forEach(function (item) {
$scope.editFieldModel_multi.forEach(function (item) {
...
@@ -794,6 +780,7 @@ taxDocumentManageModule.directive('multiFileUploader', function () {
...
@@ -794,6 +780,7 @@ taxDocumentManageModule.directive('multiFileUploader', function () {
timer = null;
timer = null;
$("
#
multiUploadFilePlugin
").click();
$("
#
multiUploadFilePlugin
").click();
$scope.multiUploader.clearQueue();
$scope.multiUploader.clearQueue();
$("
#
multiUploadFilePlugin
").val(null);
$scope.editFieldModel_multi.length = 0;
$scope.editFieldModel_multi.length = 0;
timer = setInterval(function () {
timer = setInterval(function () {
if ($scope.multiUploader.queue && $scope.multiUploader.queue.length > 0) {
if ($scope.multiUploader.queue && $scope.multiUploader.queue.length > 0) {
...
@@ -813,7 +800,7 @@ taxDocumentManageModule.directive('multiFileUploader', function () {
...
@@ -813,7 +800,7 @@ taxDocumentManageModule.directive('multiFileUploader', function () {
$scope.multiUploader = new FileUploader({
$scope.multiUploader = new FileUploader({
// autoUpload: true,//添加后,自动上传
// autoUpload: true,//添加后,自动上传
headers: {"
Authorization
": apiInterceptor.tokenType + ' ' + apiInterceptor.apiToken()},
headers: {"
Authorization
": apiInterceptor.tokenType + ' ' + apiInterceptor.apiToken()},
removeAfterUpload: true,
//
removeAfterUpload: true,
});
});
$scope.multiUploader.filters.push({//xls限制
$scope.multiUploader.filters.push({//xls限制
name: 'fileTypeFilter',
name: 'fileTypeFilter',
...
@@ -857,7 +844,6 @@ taxDocumentManageModule.directive('multiFileUploader', function () {
...
@@ -857,7 +844,6 @@ taxDocumentManageModule.directive('multiFileUploader', function () {
$("
#
uploadResultPop
").modal("
show
");
$("
#
uploadResultPop
").modal("
show
");
$('#multiUploadPopDialog').modal('hide');
$('#multiUploadPopDialog').modal('hide');
// $scope.multiUploader.clearQueue();
};
};
$scope.multiUploader.onSuccessItem = function (fileItem, response) {
$scope.multiUploader.onSuccessItem = function (fileItem, response) {
...
@@ -980,24 +966,18 @@ taxDocumentManageModule.directive('filePreview', function () {
...
@@ -980,24 +966,18 @@ taxDocumentManageModule.directive('filePreview', function () {
function getXLS(url) {
function getXLS(url) {
// return taxDocumentListService.getBinaryData('./bundles/MS Function list - Phase 1.xlsx');
// return taxDocumentListService.getBinaryData('./bundles/MS Function list - Phase 1.xlsx');
return taxDocumentListService.readXLSX({
return taxDocumentListService.readXLSX({
// path:url
path:url
path: 'http://47.94.233.173:11007/static/erp_tax_system/FE9A6FCC-019E-4B93-A9B2-1DD04CDD7431?expire=1552463739&signiture=H15ovgMR4zXwiYlPe4nZMoeLMSZFhimiHFUZ4-SVVaE='
});
});
}
}
function renderXLS(resData) {
function renderXLS(resData) {
try {
try {
if(!resData || !resData.length) return SweetAlert.warning("
Empty
File
");
// var wb = window.XLSX.read(resData, {type:"
array
"});
var _resData = JSON.parse(resData);
//
sheetSumPages = _resData.length;
// sheetSumPages = wb.SheetNames.length;
var curSheet = _resData[sheetCurPageIndex];
// $scope.currentSheetName = wb.SheetNames[sheetCurPageIndex];
// var data = window.XLSX.utils.sheet_to_json(wb.Sheets[$scope.currentSheetName]);
// console.log(data);
sheetSumPages = resData.length;
var curSheet = resData[sheetCurPageIndex];
$scope.currentSheetName = Object.keys(curSheet)[0];
$scope.currentSheetName = Object.keys(curSheet)[0];
if (
resData &&
resData.length) {
if (
_resData && _
resData.length) {
$scope.filePreview_dataGridUpdate(curSheet[$scope.currentSheetName]);
$scope.filePreview_dataGridUpdate(curSheet[$scope.currentSheetName]);
$("
#
filePreviewPop
").modal("
show
");
$("
#
filePreviewPop
").modal("
show
");
}
}
...
@@ -1027,7 +1007,6 @@ taxDocumentManageModule.directive('filePreview', function () {
...
@@ -1027,7 +1007,6 @@ taxDocumentManageModule.directive('filePreview', function () {
})
})
}
}
else if (/pdf/i.test(fileType)) {
else if (/pdf/i.test(fileType)) {
// return SweetAlert.warning('暂时不支持PDF预览');
$scope.openPdfPreviewPop(filePositionUrl);
$scope.openPdfPreviewPop(filePositionUrl);
} else {
} else {
SweetAlert.warning($translate.instant('UnFile'));
SweetAlert.warning($translate.instant('UnFile'));
...
@@ -1264,13 +1243,13 @@ taxDocumentManageModule.directive('watchGroup', function () {
...
@@ -1264,13 +1243,13 @@ taxDocumentManageModule.directive('watchGroup', function () {
controller: ['$scope','taxDocumentListService','$translate',
controller: ['$scope','taxDocumentListService','$translate',
function ($scope,taxDocumentListService,$translate) {
function ($scope,taxDocumentListService,$translate) {
// $scope.$watch("
editFieldModel
.
fileName
",function(result){
$scope.requiredField = [];
// console.log("
asdaw
");
$scope.FileAttrAndTypeCache = [];
// if(result && result.length) $scope.autoMatchAttrAndType(result);
taxDocumentListService.getDocumentsAttrAndType({params: {}}).then(function (data) {
// });
$scope.FileAttrAndTypeCache = data.items;
});
//根据文件属性来匹配出
//根据文件属性来匹配出 文件类型下拉列表
// 1,文件类型
$scope.syncFileType = function (curAttr) {
$scope.syncFileType = function (curAttr) {
$scope.curFileTypeOptions.length = 0;
$scope.curFileTypeOptions.length = 0;
Object.keys($scope.typeAndAttrMap).forEach(function (key) {
Object.keys($scope.typeAndAttrMap).forEach(function (key) {
...
@@ -1300,45 +1279,36 @@ taxDocumentManageModule.directive('watchGroup', function () {
...
@@ -1300,45 +1279,36 @@ taxDocumentManageModule.directive('watchGroup', function () {
});
});
$scope.syncRequiredFields(fieldModel);
$scope.syncRequiredFields(fieldModel);
$scope.matchCompanyId(fieldModel);
};
// 根据companyName来匹配companyId;
// 选了类型之后,就自动匹配必填字段
Object.keys($scope.companyNameOptionsMap).forEach(function (key) {
$scope.syncRequiredFields = function(fieldModel){
if (fieldModel.companyName === $scope.companyNameOptionsMap[key]) {
fieldModel.companyId = key;
}
});
// 根据Type来匹配TypeId;
$scope.FileAttrAndTypeCache.forEach(function (FATItem) {
$scope.FileAttrAndTypeCache.forEach(function (FATItem) {
if(FATItem.fileType === fieldModel.fileType
if(FATItem.fileType === fieldModel.fileType
&& FATItem.fileAttr === fieldModel.fileAttr){
&& FATItem.fileAttr === fieldModel.fileAttr){
fieldModel.fileTypeId = FATItem.i
d;
$scope.requiredField = FATItem.requiredFiel
d;
}
}
});
});
// 根据Type来匹配TypeId;
$scope.matchFieldTypeId(fieldModel);
};
};
$scope.FileAttrAndTypeCache = [];
$scope.isRequired = function(IT8nField){
taxDocumentListService.getDocumentsAttrAndType({params: {}}).then(function (data) {
return $scope.requiredField.indexOf($translate.instant(IT8nField)) > -1;
$scope.FileAttrAndTypeCache = data.items;
};
});
$scope.requiredField = [];
// 选了属性之后,就自动匹配必填字段
$scope.matchFieldTypeId = function(fieldModel){
$scope.syncRequiredFields = function(fieldModel){
// 根据Type来匹配TypeId;
$scope.FileAttrAndTypeCache.forEach(function (FATItem) {
$scope.FileAttrAndTypeCache.forEach(function (FATItem) {
if(FATItem.fileType === fieldModel.fileType
if(FATItem.fileType === fieldModel.fileType
&& FATItem.fileAttr === fieldModel.fileAttr){
&& FATItem.fileAttr === fieldModel.fileAttr){
$scope.requiredField = FATItem.requiredFiel
d;
fieldModel.fileTypeId = FATItem.i
d;
}
}
});
});
};
};
$scope.isRequired = function(IT8nField){
return $scope.requiredField.indexOf($translate.instant(IT8nField)) > -1;
};
// 选了公司之后,就自动匹配公司ID
// 选了公司之后,就自动匹配公司ID
$scope.matchCompanyId = function(fieldModel){
$scope.matchCompanyId = function(fieldModel){
Object.keys($scope.companyNameOptionsMap).forEach(function (key) {
Object.keys($scope.companyNameOptionsMap).forEach(function (key) {
...
@@ -1371,6 +1341,18 @@ taxDocumentManageModule.directive('tempModule', function () {
...
@@ -1371,6 +1341,18 @@ taxDocumentManageModule.directive('tempModule', function () {
mm = (mm + "").length < 2 ? "
0
" + mm : mm;
mm = (mm + "").length < 2 ? "
0
" + mm : mm;
dd = (dd + "").length < 2 ? "
0
" + dd : dd;
dd = (dd + "").length < 2 ? "
0
" + dd : dd;
return year + mark + mm + mark + dd;
return year + mark + mm + mark + dd;
};
$scope.checkedItemIds = [];
$scope.sniffCheckbox = function(){
$scope.checkedItemIds.length = 0;
$("
input
[
name
=
'dataGridCheckBox'
]
").each(function (index, item) {
if (item.checked) {
var cellId = $(item).attr("
data
-
id
");
$scope.checkedItemIds.push(cellId);
}
});
console.info($scope.checkedItemIds.join("
,
"));
}
}
}]
}]
}
}
...
...
atms-web/src/main/webapp/app/taxDocumentManage/tax-document-list/tax-document-list.html
View file @
f3afdc1c
...
@@ -557,7 +557,10 @@
...
@@ -557,7 +557,10 @@
<div
class=
"content-container TDL-content-container"
>
<div
class=
"content-container TDL-content-container"
>
<div
class=
"DTL-content-head-bar"
>
<div
class=
"DTL-content-head-bar"
>
<app-usr-operate-log
style=
"float:right"
this-module-name=
"docManageListLog"
></app-usr-operate-log>
<app-usr-operate-log
style=
"float:right"
this-module-name=
"docManageListLog"
this-module-id=
"checkedItemIds"
></app-usr-operate-log>
<button
class=
"btn DTL-create-record"
ng-click=
"openMultiUploadPop()"
>
<button
class=
"btn DTL-create-record"
ng-click=
"openMultiUploadPop()"
>
<i
class=
"fa fa-plus-square"
></i>
<i
class=
"fa fa-plus-square"
></i>
<span>
{{'MultiUpload' | translate}}
</span>
<span>
{{'MultiUpload' | translate}}
</span>
...
@@ -825,7 +828,7 @@
...
@@ -825,7 +828,7 @@
<div
class=
"modal-dialog"
style=
"width:80%;height:200px;"
role=
"document"
>
<div
class=
"modal-dialog"
style=
"width:80%;height:200px;"
role=
"document"
>
<div
class=
"modal-content"
>
<div
class=
"modal-content"
>
<form
class=
"form-horizontal"
name=
"newDocFileTypeForm"
ng-submit=
"multiUploadSubmit()"
>
<form
class=
"form-horizontal"
name=
"newDocFileTypeForm"
ng-submit=
"multiUploadSubmit()"
>
<div
class=
"modal-header"
>
<div
class=
"modal-header"
>
<div
class=
"modal-title"
><span>
{{'MultiUpload'|translate}}
</span></div>
<div
class=
"modal-title"
><span>
{{'MultiUpload'|translate}}
</span></div>
<input
id=
"multiUploadFilePlugin"
type=
"file"
multiple
style=
"display:none"
nv-file-select
<input
id=
"multiUploadFilePlugin"
type=
"file"
multiple
style=
"display:none"
nv-file-select
uploader=
"multiUploader"
>
uploader=
"multiUploader"
>
...
...
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