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
5c05e3d9
Commit
5c05e3d9
authored
Mar 14, 2019
by
chase
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge 档案管理
parent
e918a93d
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
382 additions
and
170 deletions
+382
-170
OperationLogFileTypeController.java
...xtech/atms/controller/OperationLogFileTypeController.java
+5
-4
TemplateController.java
.../java/pwc/taxtech/atms/controller/TemplateController.java
+84
-1
OperationLogFileTypeServiceImpl.java
...ch/atms/service/impl/OperationLogFileTypeServiceImpl.java
+3
-1
OrganizationServiceImpl.java
...wc/taxtech/atms/service/impl/OrganizationServiceImpl.java
+4
-0
TaxDocumentServiceImpl.java
...pwc/taxtech/atms/service/impl/TaxDocumentServiceImpl.java
+21
-12
TemplateServiceImpl.java
...va/pwc/taxtech/atms/service/impl/TemplateServiceImpl.java
+13
-1
OrganizationMapper.java
...rc/main/java/pwc/taxtech/atms/dao/OrganizationMapper.java
+5
-1
TaxDocumentMapper.java
...src/main/java/pwc/taxtech/atms/dao/TaxDocumentMapper.java
+3
-0
OperationLogFileType.java
...in/java/pwc/taxtech/atms/entity/OperationLogFileType.java
+11
-0
TaxDocumentExample.java
...main/java/pwc/taxtech/atms/entity/TaxDocumentExample.java
+5
-0
OrganizationExtendsMapper.xml
...wc/taxtech/atms/dao/extends/OrganizationExtendsMapper.xml
+7
-0
TaxDocumentMapper.xml
...ources/pwc/taxtech/atms/dao/extends/TaxDocumentMapper.xml
+9
-0
infrastructure.json
.../main/webapp/app-resources/i18n/en-us/infrastructure.json
+1
-0
infrastructure.json
.../main/webapp/app-resources/i18n/zh-CN/infrastructure.json
+1
-0
doc-manage.ctrl.js
...app/app/admin/infrastructure/docManage/doc-manage.ctrl.js
+16
-12
doc-manage.html
...webapp/app/admin/infrastructure/docManage/doc-manage.html
+2
-0
template.svc.js
...eb/src/main/webapp/app/common/webservices/template.svc.js
+43
-0
app-multi-select.html
...bapp/app/framework/app-multi-select/app-multi-select.html
+25
-3
app-multi-select.js
...webapp/app/framework/app-multi-select/app-multi-select.js
+5
-5
app-usr-operate-log.ctrl.js
...framework/app-usr-operate-log/app-usr-operate-log.ctrl.js
+5
-5
tax-document-list.ctrl.js
...ocumentManage/tax-document-list/tax-document-list.ctrl.js
+94
-120
tax-document-list.html
...axDocumentManage/tax-document-list/tax-document-list.html
+20
-5
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/OperationLogFileTypeController.java
View file @
5c05e3d9
...
...
@@ -2,6 +2,7 @@ package pwc.taxtech.atms.controller;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
pwc.taxtech.atms.dto.ReturnData
;
...
...
@@ -42,11 +43,11 @@ public class OperationLogFileTypeController {
*/
@RequestMapping
(
"/selectListForLog"
)
@ResponseBody
public
ReturnData
selectListForLog
(
List
<
String
>
fileTypeIds
){
List
<
OperationLogFileType
>
operationLogFileType
=
operationLogFileTypeService
.
selectListForLog
(
fileTypeIds
);
public
ReturnData
selectListForLog
(
@RequestBody
OperationLogFileType
operationLogFileType
){
List
<
OperationLogFileType
>
operationLogFileType
s
=
operationLogFileTypeService
.
selectListForLog
(
operationLogFileType
.
getFileTypeIds
()
);
ReturnData
returnData
=
new
ReturnData
();
returnData
.
setItems
(
operationLogFileType
);
returnData
.
setTotalCount
(
operationLogFileType
.
size
());
returnData
.
setItems
(
operationLogFileType
s
);
returnData
.
setTotalCount
(
operationLogFileType
s
.
size
());
return
returnData
;
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/TemplateController.java
View file @
5c05e3d9
package
pwc
.
taxtech
.
atms
.
controller
;
import
com.github.pagehelper.PageInfo
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -14,22 +15,25 @@ import org.springframework.http.MediaType;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
pwc.taxtech.atms.common.message.ErrorMessage
;
import
pwc.taxtech.atms.common.message.ErrorMessageCN
;
import
pwc.taxtech.atms.common.util.MyAsserts
;
import
pwc.taxtech.atms.constant.enums.EnumAnalysisImportType
;
import
pwc.taxtech.atms.constant.enums.EnumCitImportType
;
import
pwc.taxtech.atms.constant.enums.EnumImportType
;
import
pwc.taxtech.atms.dpo.TemplateUniqDto
;
import
pwc.taxtech.atms.dto.*
;
import
pwc.taxtech.atms.dto.didiFileUpload.DidiFileIUploadParam
;
import
pwc.taxtech.atms.dto.didiFileUpload.DidiFileUploadDetailResult
;
import
pwc.taxtech.atms.dto.vatdto.TemplateByGroupDto
;
import
pwc.taxtech.atms.entity.Template
;
import
pwc.taxtech.atms.exception.ApplicationException
;
import
pwc.taxtech.atms.exception.BadParameterException
;
import
pwc.taxtech.atms.exception.NotFoundException
;
import
pwc.taxtech.atms.exception.ServiceException
;
import
pwc.taxtech.atms.service.impl.DidiFileUploadService
;
import
pwc.taxtech.atms.service.impl.HttpFileService
;
import
pwc.taxtech.atms.service.impl.ReportUploadService
;
import
pwc.taxtech.atms.service.impl.TemplateServiceImpl
;
import
pwc.taxtech.atms.vat.entity.PeriodTemplate
;
import
pwc.taxtech.atms.vat.entity.ReportUpload
;
import
javax.servlet.ServletContext
;
...
...
@@ -37,8 +41,10 @@ import javax.servlet.ServletOutputStream;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.*
;
import
java.net.URISyntaxException
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.Map
;
@RestController
@RequestMapping
(
value
=
"api/v1/template"
)
...
...
@@ -55,6 +61,8 @@ public class TemplateController extends BaseController {
@Autowired
ReportUploadService
reportUploadService
;
@Autowired
DidiFileUploadService
didiFileUploadService
;
@RequestMapping
(
value
=
"get"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
@ResponseBody
List
<
TemplateDto
>
get
(
@RequestParam
(
name
=
"templateGroupID"
)
Long
templateGroupId
,
@RequestParam
(
name
=
"reportType"
)
String
reportType
)
{
...
...
@@ -170,6 +178,81 @@ public class TemplateController extends BaseController {
}
}
@RequestMapping
(
value
=
"getPeriodTemplateJson"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_OCTET_STREAM_VALUE
)
public
@ResponseBody
void
getPeriodTemplateBlob
(
@RequestParam
(
name
=
"templateId"
)
Long
templateId
,
@RequestParam
(
name
=
"period"
)
Integer
period
,
@RequestParam
(
name
=
"projectId"
)
String
projectId
,
HttpServletResponse
response
)
throws
URISyntaxException
{
String
filePath
;
File
templateFile
;
InputStream
inputStream
=
null
;
List
<
PeriodTemplate
>
templates
=
templateService
.
getPeriodTemplates
(
templateId
,
period
,
projectId
);
MyAsserts
.
assertNotEmpty
(
templates
,
new
NotFoundException
());
PeriodTemplate
template
=
templates
.
get
(
0
);
String
templatePath
=
template
.
getPath
();
MyAsserts
.
assertNotEmpty
(
templatePath
,
new
NotFoundException
());
filePath
=
this
.
getClass
().
getResource
(
""
).
toURI
().
getPath
();
String
tempPath
=
filePath
.
substring
(
0
,
filePath
.
indexOf
(
"classes"
)
+
"\\classes"
.
length
());
templateFile
=
new
File
(
tempPath
+
templatePath
);
OutputStream
out
=
null
;
try
{
//如果是系统报表就取本地文件夹,如果不是就取FTP
if
(
template
.
getIsSystemType
())
{
inputStream
=
new
BufferedInputStream
(
new
FileInputStream
(
templateFile
));
}
else
{
if
(
templatePath
.
indexOf
(
"/"
)
<=
0
)
{
DidiFileIUploadParam
fileParam
=
new
DidiFileIUploadParam
();
fileParam
.
setUuids
(
Arrays
.
asList
(
templatePath
));
PageInfo
<
DidiFileUploadDetailResult
>
uploadDetail
=
didiFileUploadService
.
queryPage
(
fileParam
);
Map
<
String
,
String
>
urlMap
=
null
;
if
(
CollectionUtils
.
isNotEmpty
(
uploadDetail
.
getList
()))
{
templatePath
=
uploadDetail
.
getList
().
get
(
0
).
getViewHttpUrl
();
}
}
inputStream
=
httpFileService
.
getUserTemplate
(
templatePath
);
}
//客户端保存的文件名
String
customFileName
=
"template_"
+
DateTime
.
now
().
toString
(
"yyyyMMddHHmmss"
)
+
".xlsx"
;
response
.
setHeader
(
"Content-Disposition"
,
String
.
format
(
"inline; filename=\""
+
customFileName
+
"\""
));
response
.
setContentType
(
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
);
// int len = 0;
// byte[] buffer = new byte[1024];
// out = response.getOutputStream();
// while ((len = inputStream.read(buffer)) > 0) {
// out.write(buffer, 0, len);
// }
out
=
response
.
getOutputStream
();
IOUtils
.
copy
(
handleFomularView
(
inputStream
),
out
);
out
.
flush
();
}
catch
(
FileNotFoundException
e
)
{
e
.
printStackTrace
();
}
catch
(
Exception
e
)
{
logger
.
error
(
"Error downloading template file template.xlsx"
,
e
);
throw
new
ApplicationException
(
"Error downloading template file template.xlsx"
,
e
);
}
finally
{
if
(
out
!=
null
)
{
try
{
out
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
out
=
null
;
}
if
(
inputStream
!=
null
)
{
try
{
inputStream
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
inputStream
=
null
;
}
}
}
private
File
getTempFile
(
String
templatePath
)
throws
URISyntaxException
{
String
filePath
=
this
.
getClass
().
getResource
(
""
).
toURI
().
getPath
();
String
tempPath
=
filePath
.
substring
(
0
,
filePath
.
indexOf
(
"classes"
)
+
"\\classes"
.
length
());
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/OperationLogFileTypeServiceImpl.java
View file @
5c05e3d9
...
...
@@ -51,7 +51,9 @@ public class OperationLogFileTypeServiceImpl {
public
List
<
OperationLogFileType
>
selectListForLog
(
List
<
String
>
fileTypeIds
)
{
OperationLogFileTypeExample
example
=
new
OperationLogFileTypeExample
();
OperationLogFileTypeExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andIdIn
(
fileTypeIds
);
if
(
null
!=
fileTypeIds
&&
fileTypeIds
.
size
()>
0
){
criteria
.
andIdIn
(
fileTypeIds
);
}
return
operationLogFileTypeMapper
.
selectByExample
(
example
);
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/OrganizationServiceImpl.java
View file @
5c05e3d9
...
...
@@ -3230,4 +3230,8 @@ public class OrganizationServiceImpl extends BaseService{
return
organizationMapper
.
getMyOrgSelectList
(
uid
);
}
}
public
String
queryBusinessByCompanyId
(
String
companyId
)
{
return
organizationMapper
.
queryBusinessByCompanyId
(
companyId
);
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/TaxDocumentServiceImpl.java
View file @
5c05e3d9
...
...
@@ -47,6 +47,12 @@ public class TaxDocumentServiceImpl {
@Autowired
DidiFileUploadService
didiFileUploadService
;
@Autowired
private
BusinessUnitServiceImpl
businessUnitService
;
@Autowired
private
OrganizationServiceImpl
organizationService
;
public
List
<
TaxDocument
>
selectTaxDocumentList
(
TaxDocumentDto
taxDocumentDto
)
{
List
<
TaxDocument
>
dataList
=
taxDocumentMapper
.
selectByExample
(
getExample
(
taxDocumentDto
));
DidiFileIUploadParam
fileParam
=
new
DidiFileIUploadParam
();
...
...
@@ -123,15 +129,15 @@ public class TaxDocumentServiceImpl {
}
//实物索引号 physicalIndexNumber
if
(
StringUtils
.
isNotBlank
(
taxDocumentDto
.
getPhysicalIndexNumber
()))
{
criteria
.
andPhysicalIndexNumber
EqualTo
(
taxDocumentDto
.
getPhysicalIndexNumber
()
);
criteria
.
andPhysicalIndexNumber
Like
(
"%"
+
taxDocumentDto
.
getPhysicalIndexNumber
()
+
"%"
);
}
//实物存放地点 storageArea
if
(
StringUtils
.
isNotBlank
(
taxDocumentDto
.
getStorageArea
()))
{
criteria
.
andStorageArea
EqualTo
(
taxDocumentDto
.
getStorageArea
()
);
criteria
.
andStorageArea
Like
(
"%"
+
taxDocumentDto
.
getStorageArea
()
+
"%"
);
}
//实物保管人 keeper
if
(
StringUtils
.
isNotBlank
(
taxDocumentDto
.
getKeeper
()))
{
criteria
.
andKeeper
EqualTo
(
taxDocumentDto
.
getKeeper
()
);
criteria
.
andKeeper
Like
(
"%"
+
taxDocumentDto
.
getKeeper
()
+
"%"
);
}
//审批状态 auditStatus
if
(
null
!=
taxDocumentDto
.
getAuditStatus
())
{
...
...
@@ -179,6 +185,11 @@ public class TaxDocumentServiceImpl {
taxDocument
.
setUploadTime
(
new
Date
());
taxDocument
.
setYearRedundancy
(
Calendar
.
getInstance
().
get
(
Calendar
.
YEAR
));
Long
id
=
taxDocumentMapper
.
insert
(
taxDocument
);
//根据公司Id 设置业务线
String
businessLine
=
organizationService
.
queryBusinessByCompanyId
(
taxDocument
.
getCompanyId
());
if
(
StringUtils
.
isNotBlank
(
businessLine
))
{
taxDocument
.
setBusinessLine
(
businessLine
);
}
if
(
id
>
0
)
{
OperationLogTaxDocument
actionEntity
=
buildOperationLogTaxDocument
();
actionEntity
.
setId
(
id
.
toString
());
...
...
@@ -232,24 +243,22 @@ public class TaxDocumentServiceImpl {
@Transactional
public
boolean
batchDelete
(
List
<
Long
>
ids
)
{
try
{
if
(
null
==
ids
||
ids
.
size
()
<
1
)
{
if
(
null
==
ids
||
ids
.
size
()
<
1
)
{
return
false
;
}
for
(
Long
id
:
ids
)
{
int
num
=
taxDocumentMapper
.
deleteByPrimaryKey
(
id
);
if
(
num
>
0
)
{
int
num
=
taxDocumentMapper
.
batchDelete
(
ids
);
if
(
num
>
0
)
{
for
(
Long
id
:
ids
)
{
OperationLogTaxDocument
actionEntity
=
buildOperationLogTaxDocument
();
actionEntity
.
setOperationAction
(
"删除"
);
actionEntity
.
setId
(
id
.
toString
());
boolean
result
=
operationLogTaxDocService
.
addTaxDocumentList
(
actionEntity
);
if
(
result
)
{
return
true
;
}
else
{
if
(!
result
)
{
throw
new
RuntimeException
(
"TaxDocumentServiceImpl batchDeleteTaxDocument log error"
);
}
}
else
{
return
false
;
}
}
else
{
return
false
;
}
return
true
;
}
catch
(
Exception
e
)
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/TemplateServiceImpl.java
View file @
5c05e3d9
...
...
@@ -18,8 +18,12 @@ import pwc.taxtech.atms.dto.didiFileUpload.DidiFileUploadDetailResult;
import
pwc.taxtech.atms.dto.vatdto.TemplateByGroupDto
;
import
pwc.taxtech.atms.entity.*
;
import
pwc.taxtech.atms.vat.dao.PeriodReportMapper
;
import
pwc.taxtech.atms.vat.dao.PeriodTemplateMapper
;
import
pwc.taxtech.atms.vat.entity.PeriodReportExample
;
import
pwc.taxtech.atms.vat.entity.PeriodTemplate
;
import
pwc.taxtech.atms.vat.entity.PeriodTemplateExample
;
import
javax.annotation.Resource
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -28,9 +32,11 @@ import static java.util.stream.Collectors.groupingBy;
@Service
public
class
TemplateServiceImpl
extends
AbstractService
{
@
Autowired
@
Resource
private
PeriodReportMapper
periodReportMapper
;
@Resource
private
PeriodTemplateMapper
periodTemplateMapper
;
@Autowired
private
DidiFileUploadService
didiFileUploadService
;
public
void
addExistTemplate
(
TemplateAddExistDto
templateAddExistDto
){
...
...
@@ -112,6 +118,12 @@ public class TemplateServiceImpl extends AbstractService {
return
templateDtos
;
}
public
List
<
PeriodTemplate
>
getPeriodTemplates
(
Long
templateId
,
Integer
period
,
String
projectId
){
PeriodTemplateExample
example
=
new
PeriodTemplateExample
();
example
.
createCriteria
().
andProjectIdEqualTo
(
projectId
).
andTemplateIdEqualTo
(
templateId
).
andPeriodEqualTo
(
period
);
return
periodTemplateMapper
.
selectByExample
(
example
);
}
public
String
getTemplatePath
(
Long
templateId
)
{
String
result
=
""
;
Template
template
=
templateMapper
.
selectByPrimaryKey
(
templateId
);
...
...
atms-dao/src/main/java/pwc/taxtech/atms/dao/OrganizationMapper.java
View file @
5c05e3d9
package
pwc
.
taxtech
.
atms
.
dao
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
...
...
@@ -10,6 +9,8 @@ import pwc.taxtech.atms.dpo.*;
import
pwc.taxtech.atms.entity.Organization
;
import
pwc.taxtech.atms.entity.OrganizationExample
;
import
java.util.List
;
@Mapper
public
interface
OrganizationMapper
extends
MyMapper
{
/**
...
...
@@ -138,4 +139,6 @@ public interface OrganizationMapper extends MyMapper {
@Select
(
"select id, name from organization;"
)
List
<
OrgSelectDto
>
getAllOrgSelectList
();
String
queryBusinessByCompanyId
(
String
companyId
);
}
\ No newline at end of file
atms-dao/src/main/java/pwc/taxtech/atms/dao/TaxDocumentMapper.java
View file @
5c05e3d9
...
...
@@ -113,4 +113,6 @@ public interface TaxDocumentMapper extends MyMapper {
* @return
*/
int
updateEnableToF
(
Long
id
);
int
batchDelete
(
List
<
Long
>
ids
);
}
\ No newline at end of file
atms-dao/src/main/java/pwc/taxtech/atms/entity/OperationLogFileType.java
View file @
5c05e3d9
...
...
@@ -2,6 +2,7 @@ package pwc.taxtech.atms.entity;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
/**
*
...
...
@@ -110,6 +111,16 @@ public class OperationLogFileType implements Serializable {
*/
private
Date
createTime
;
private
List
<
String
>
fileTypeIds
;
public
List
<
String
>
getFileTypeIds
()
{
return
fileTypeIds
;
}
public
void
setFileTypeIds
(
List
<
String
>
fileTypeIds
)
{
this
.
fileTypeIds
=
fileTypeIds
;
}
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table operation_log_file_type
...
...
atms-dao/src/main/java/pwc/taxtech/atms/entity/TaxDocumentExample.java
View file @
5c05e3d9
...
...
@@ -500,6 +500,11 @@ public class TaxDocumentExample {
return
(
Criteria
)
this
;
}
public
Criteria
andPhysicalIndexNumberLike
(
String
value
)
{
addCriterion
(
"physical_index_number like"
,
value
,
"physicalIndexNumber"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFileNameNotLike
(
String
value
)
{
addCriterion
(
"file_name not like"
,
value
,
"fileName"
);
return
(
Criteria
)
this
;
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/dao/extends/OrganizationExtendsMapper.xml
View file @
5c05e3d9
...
...
@@ -671,4 +671,10 @@
ACC_SET.is_active = 1
AND SET_ORG.enterprise_account_set_id = ACC_SET.id
</select>
<select
id=
"queryBusinessByCompanyId"
resultType=
"string"
>
SELECT bus.name
FROM organization org
LEFT JOIN business_unit bus ON org.business_unit_id = bus.id
WHERE bus.is_active = 1 AND org.id = #{companyId}
</select>
</mapper>
\ No newline at end of file
atms-dao/src/main/resources/pwc/taxtech/atms/dao/extends/TaxDocumentMapper.xml
View file @
5c05e3d9
...
...
@@ -150,6 +150,15 @@
delete from tax_document
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"batchDelete"
>
DELETE FROM tax_document
WHERE id IN
<foreach
collection=
"list"
item=
"id"
separator=
","
open=
"("
close=
")"
>
#{id}
</foreach>
</delete>
<delete
id=
"deleteByExample"
parameterType=
"pwc.taxtech.atms.entity.TaxDocumentExample"
>
<!--
WARNING - @mbg.generated
...
...
atms-web/src/main/webapp/app-resources/i18n/en-us/infrastructure.json
View file @
5c05e3d9
...
...
@@ -70,6 +70,7 @@
"ProjectYearCol"
:
"年份"
,
"AssignRoleCol"
:
"分配角色"
,
"SequenceNoCol"
:
"序号"
,
"DocumentID"
:
"Doc ID"
,
"TaxGroup"
:
"税种"
,
"ReportTemplate"
:
"Report Template"
,
...
...
atms-web/src/main/webapp/app-resources/i18n/zh-CN/infrastructure.json
View file @
5c05e3d9
...
...
@@ -93,6 +93,7 @@
"ProjectYearCol"
:
"年份"
,
"AssignRoleCol"
:
"分配角色"
,
"SequenceNoCol"
:
"序号"
,
"DocumentID"
:
"档案ID"
,
"TaxGroup"
:
"税种"
,
"DocumentAttr"
:
"档案属性"
,
"DocumentType"
:
"档案类型"
,
...
...
atms-web/src/main/webapp/app/admin/infrastructure/docManage/doc-manage.ctrl.js
View file @
5c05e3d9
...
...
@@ -82,7 +82,7 @@
columns
:
[
{
dataField
:
"id"
,
caption
:
$translate
.
instant
(
'
SequenceNoCol
'
),
caption
:
$translate
.
instant
(
'
DocumentID
'
),
allowHeaderFiltering
:
true
,
cellTemplate
:
function
(
container
,
options
)
{
try
{
...
...
@@ -185,15 +185,15 @@
}
},
{
dataField
:
"
cre
ateTime"
,
caption
:
$translate
.
instant
(
'
Created
Time'
),
dataField
:
"
upd
ateTime"
,
caption
:
$translate
.
instant
(
'
Update
Time'
),
allowHeaderFiltering
:
true
,
cellTemplate
:
function
(
container
,
options
)
{
try
{
var
style
=
options
.
data
.
status
==
1
?
''
:
'style="color:#999"'
;
if
(
options
.
data
.
cre
ateTime
)
{
$
(
'<span '
+
style
+
'>'
).
text
(
$filter
(
'date'
)(
options
.
data
.
cre
ateTime
,
'yyyy-MM-dd'
)).
appendTo
(
container
);
if
(
options
.
data
.
upd
ateTime
)
{
$
(
'<span '
+
style
+
'>'
).
text
(
$filter
(
'date'
)(
options
.
data
.
upd
ateTime
,
'yyyy-MM-dd'
)).
appendTo
(
container
);
}
else
{
$
(
'<span>'
).
text
().
appendTo
(
container
);
}
...
...
@@ -209,8 +209,10 @@
cellTemplate
:
function
(
container
,
options
)
{
try
{
if
(
options
.
data
.
status
==
1
)
{
$
(
'<span>'
).
text
(
$translate
.
instant
(
'Enabled'
)).
appendTo
(
container
);
options
.
data
.
status
=
$translate
.
instant
(
'Enabled'
);
$
(
'<span>'
).
text
(
options
.
data
.
status
).
appendTo
(
container
);
}
else
{
options
.
data
.
status
=
$translate
.
instant
(
'Disabled'
);
$
(
'<span style="color:#999">'
).
text
(
$translate
.
instant
(
'Disabled'
)).
appendTo
(
container
);
}
}
catch
(
e
)
{
...
...
@@ -224,13 +226,11 @@
allowHeaderFiltering
:
false
,
cellTemplate
:
function
(
container
,
options
)
{
try
{
var
eventTarget
=
$
(
'<a style="color:#506bf7;" href="javascript:void(0)" ng-click="openEditPop('
+
options
.
data
.
id
+
')">'
+
'<span>{{"Edit"|translate}}</span></a>'
);
$compile
(
eventTarget
)(
$scope
);
var
eventTarget
=
$
(
'<a style="color:#506bf7;" data-id="'
+
options
.
data
.
id
+
'" href="javascript:void(0)"><span>'
+
$translate
.
instant
(
"Edit"
)
+
'</span></a>'
);
eventTarget
.
off
(
'click'
).
on
(
'click'
,
function
(){
$scope
.
openEditPop
(
options
.
data
.
id
);
});
container
.
append
(
eventTarget
);
}
catch
(
e
)
{
$log
.
error
(
e
);
}
...
...
@@ -248,6 +248,10 @@
$scope
.
localData
.
forEach
(
function
(
item
)
{
if
(
item
.
id
==
rowId
)
{
$scope
.
editModel
=
angular
.
copy
(
item
);
if
(
$scope
.
editModel
.
status
!=
1
||
$scope
.
editModel
.
status
!=
0
){
// 特殊处理状态值,1 = “已启用”, 0 = “已禁用”
$scope
.
editModel
.
status
=
item
.
status
==
$translate
.
instant
(
"Enabled"
)
?
1
:
0
;
}
}
});
}
...
...
atms-web/src/main/webapp/app/admin/infrastructure/docManage/doc-manage.html
View file @
5c05e3d9
...
...
@@ -145,12 +145,14 @@
<label
class=
"col-sm-5 DM-state-label"
>
<input
type=
"radio"
name=
"editModelState"
value=
1
ng-checked=
"editModel.status == 1"
ng-model=
"editModel.status"
required
/>
<span
translate=
"Enable"
></span>
</label>
<label
class=
"col-sm-5 DM-state-label"
>
<input
type=
"radio"
name=
"editModelState"
value=
0
ng-checked=
"editModel.status == 0"
ng-model=
"editModel.status"
required
/>
<span
translate=
"Disable"
></span>
</label>
...
...
atms-web/src/main/webapp/app/common/webservices/template.svc.js
View file @
5c05e3d9
...
...
@@ -13,6 +13,16 @@ webservices.factory('templateService', ['$log', '$http', '$q', 'apiConfig', 'htt
return
getJsonFromExcel
(
templateID
);
//}
};
var
getPeriodTemplateJson
=
function
(
templateId
,
period
,
projectId
)
{
//return $http.get('/template/getTemplateJson?templateID=' + templateID, apiConfig.create());
//var url = '/template/getTemplateJson?templateID=' + templateID;
//var result = httpCacheService.get(url);
// if (result.finishedCache) {
// return result;
// } else {
return
getJsonFromExcelForPeriod
(
templateId
,
period
,
projectId
);
//}
};
var
getCookie
=
function
(
cname
)
{
...
...
@@ -105,6 +115,38 @@ webservices.factory('templateService', ['$log', '$http', '$q', 'apiConfig', 'htt
};
var
getJsonFromExcelForPeriod
=
function
(
templateID
,
period
,
projectId
)
{
var
deferred
=
$q
.
defer
();
var
promise
=
deferred
.
promise
;
var
url
=
loginContext
.
apiHost
+
constant
.
webapi
.
prefix
+
'/template/getPeriodTemplateJson?templateId='
+
templateID
+
"&period="
+
period
+
"&projectId="
+
projectId
;
var
xhr
=
new
XMLHttpRequest
();
xhr
.
open
(
'POST'
,
url
,
true
);
// 也可以使用POST方式,根据接口
xhr
.
responseType
=
"blob"
;
// 返回类型blob
var
apiTokenObj
=
JSON
.
parse
(
getCookie
(
'AtmsApiToken'
));
var
apiToken
=
apiTokenObj
.
access_token
;
var
tokenType
=
apiTokenObj
.
token_type
;
xhr
.
setRequestHeader
(
'Authorization'
,
tokenType
+
' '
+
apiToken
);
// 定义请求完成的处理函数,请求前也可以增加加载框/禁用下载按钮逻辑
xhr
.
onload
=
function
()
{
// 请求完成
if
(
this
.
status
===
200
)
{
// 返回200
var
blob
=
this
.
response
;
var
excelIo
=
new
GC
.
Spread
.
Excel
.
IO
();
excelIo
.
open
(
blob
,
function
(
json
)
{
deferred
.
resolve
(
json
);
},
function
(
e
)
{
// console.error(e.errorMessage);
//alert(e.errorMessage);
deferred
.
reject
(
e
.
errorMessage
);
},
{});
}
};
// 发送ajax请求
xhr
.
send
();
return
promise
;
};
var
renderSpreadExcelSimple
=
function
(
id
,
templateID
)
{
var
deferred
=
$q
.
defer
();
var
promise
=
deferred
.
promise
;
...
...
@@ -126,6 +168,7 @@ webservices.factory('templateService', ['$log', '$http', '$q', 'apiConfig', 'htt
renderSpreadExcelSimple
:
renderSpreadExcelSimple
,
setRowColName
:
setRowColName
,
getTemplateJson
:
getTemplateJson
,
getPeriodTemplateJson
:
getPeriodTemplateJson
,
downloadTemplate
:
function
(
fileType
)
{
return
$http
.
get
(
'/template/file/downloadTemplate?fileType='
+
fileType
,
apiConfig
.
create
({
responseType
:
'arraybuffer'
}));
},
...
...
atms-web/src/main/webapp/app/framework/app-multi-select/app-multi-select.html
View file @
5c05e3d9
...
...
@@ -68,20 +68,42 @@
overflow
:
hidden
;
outline
:
none
;
}
.input-reset-button
:before
{
.input-arrow-drop-button
{
position
:
absolute
;
margin
:
0
;
border
:
0
;
background
:
#fff
;
top
:
0
;
right
:
0
;
color
:
#969696
;
overflow
:
hidden
;
outline
:
none
;
}
.input-arrow-drop-button
:before
{
content
:
"▾"
;
height
:
inherit
;
width
:
inherit
;
position
:
relative
;
background
:
inherit
;
}
.input-reset-button
:after
{
content
:
"x"
;
height
:
inherit
;
width
:
inherit
;
position
:
relative
;
background
:
inherit
;
}
</style>
<div
class=
"select-simulator"
>
<input
class=
"for-fake-input"
ng-click=
"showMenu();"
placeholder=
"请选择"
title=
"{{selected}}"
readonly
ng-model=
"selected"
>
<button
class=
"input-reset-button"
<button
type=
"button"
class=
"input-arrow-drop-button"
>
</button>
<button
type=
"button"
class=
"input-reset-button"
ng-click=
"clearInput()"
ng-mouseleave=
"activeWatcher()"
ng-mouseenter=
"closeWatcher()"
...
...
@@ -99,7 +121,7 @@
<input
type=
"{{optionType}}"
name=
"simulatorOptionMenu"
value=
"{{value}}"
ng-checked=
"
defaultChecked[optionKeys[$index]]
"
ng-checked=
"
selected.indexOf(optionValues[$index]) > -1
"
data-key=
"{{optionKeys[$index]}}"
/>
<span>
{{value}}
</span>
</label>
...
...
atms-web/src/main/webapp/app/framework/app-multi-select/app-multi-select.js
View file @
5c05e3d9
...
...
@@ -43,12 +43,12 @@ frameworkModule.directive('appMultiSelect', ['$log',
function
runDefaultChecked
(){
if
(
$scope
.
defaultChecked
.
length
){
// 一般defaultChecked就是optionMap的下表数组
$scope
.
optionKeys
.
forEach
(
function
(
item
)
{
$scope
.
optionKeys
.
forEach
(
function
(
key
)
{
var
defaultLen
=
$scope
.
defaultChecked
.
length
;
while
(
defaultLen
--
){
if
(
$scope
.
defaultChecked
[
defaultLen
]
==
item
){
$scope
.
checkedKeys
.
push
(
item
);
$scope
.
checkedValues
.
push
(
$scope
.
optionMap
[
item
]);
if
(
$scope
.
defaultChecked
[
defaultLen
]
==
$scope
.
optionMap
[
key
]
){
$scope
.
checkedKeys
.
push
(
key
);
$scope
.
checkedValues
.
push
(
$scope
.
optionMap
[
key
]);
break
;
}
}
...
...
@@ -142,7 +142,7 @@ frameworkModule.directive('appMultiSelect', ['$log',
$scope
.
checkedValues
.
length
=
0
;
$scope
.
checkedKeys
.
length
=
0
;
$scope
.
selected
=
""
;
confirmSelected
(
false
);
//
confirmSelected(false);
}
else
{
// 如果弹出下拉菜单时,当前输入框内容为空,就直接关闭下拉菜单
$scope
.
showOptionMenu
=
false
;
...
...
atms-web/src/main/webapp/app/framework/app-usr-operate-log/app-usr-operate-log.ctrl.js
View file @
5c05e3d9
...
...
@@ -105,11 +105,11 @@ frameworkModule.controller('appUsrOperateLogController',
}
}
},
{
dataField
:
"operationObject"
,
caption
:
$translate
.
instant
(
'LogOperateObject'
),
allowHeaderFiltering
:
true
,
},
//
{
//
dataField: "operationObject",
//
caption: $translate.instant('LogOperateObject'),
//
allowHeaderFiltering: true,
//
},
{
dataField
:
"operationAction"
,
caption
:
$translate
.
instant
(
'LogOperationDescription'
),
...
...
atms-web/src/main/webapp/app/taxDocumentManage/tax-document-list/tax-document-list.ctrl.js
View file @
5c05e3d9
...
...
@@ -32,13 +32,29 @@ taxDocumentManageModule.controller('taxDocumentListController',
var
splitMark
=
params
.
ownTime
.
indexOf
(
"-"
)
>
-
1
?
"-"
:
"/"
;
params
.
ownTime
=
parseInt
(
params
.
ownTime
.
split
(
splitMark
).
join
(
""
));
params
.
fileBeginTime
?
params
.
fileBeginTime
+=
"-01"
:
""
;
params
.
fileEndTTime
?
params
.
fileEndTTime
+=
"-01"
:
""
;
if
(
params
.
fileEndTTime
){
var
fileEndTTimeDate
=
$scope
.
getMonthLastDate
(
params
.
fileEndTTime
.
split
(
"-"
)[
0
],
params
.
fileEndTTime
.
split
(
"-"
)[
1
]);
params
.
fileEndTTime
+=
"-"
+
fileEndTTimeDate
;
}
params
.
ownBeginTime
?
params
.
ownBeginTime
+=
"-01"
:
""
;
params
.
ownEndTime
?
params
.
ownEndTime
+=
"-01"
:
""
;
if
(
params
.
ownEndTime
){
var
ownEndTimeDate
=
$scope
.
getMonthLastDate
(
params
.
ownEndTime
.
split
(
"-"
)[
0
],
params
.
ownEndTime
.
split
(
"-"
)[
1
]);
params
.
ownEndTime
+=
"-"
+
ownEndTimeDate
;
}
params
.
effectiveBeginTime
?
params
.
effectiveBeginTime
+=
"-01"
:
""
;
params
.
effectiveEndTime
?
params
.
effectiveEndTime
+=
"-01"
:
""
;
if
(
params
.
effectiveEndTime
){
var
effectiveEndTimeDate
=
$scope
.
getMonthLastDate
(
params
.
effectiveEndTime
.
split
(
"-"
)[
0
],
params
.
effectiveEndTime
.
split
(
"-"
)[
1
]);
params
.
effectiveEndTime
+=
"-"
+
effectiveEndTimeDate
;
}
params
.
uploadBeginTime
?
params
.
uploadBeginTime
+=
"-01"
:
""
;
params
.
uploadEndTime
?
params
.
uploadEndTime
+=
"-01"
:
""
;
if
(
params
.
uploadEndTime
){
var
uploadEndTimeDate
=
$scope
.
getMonthLastDate
(
params
.
uploadEndTime
.
split
(
"-"
)[
0
],
params
.
uploadEndTime
.
split
(
"-"
)[
1
]);
params
.
uploadEndTime
+=
"-"
+
uploadEndTimeDate
;
}
taxDocumentListService
.
fetchMainList
(
params
).
then
(
function
(
data
,
status
,
headers
)
{
if
(
status
==
204
)
{
...
...
@@ -83,13 +99,20 @@ taxDocumentManageModule.controller('taxDocumentListController',
dataField
:
"id"
,
caption
:
""
,
cellTemplate
:
function
(
container
,
options
)
{
var
targetString
=
'<input name="dataGridCheckBox" ng-click="sniffCheckbox()"'
+
'data-id="'
+
options
.
data
.
id
+
'" '
+
'data-url="'
+
options
.
data
.
filePositionUrl
+
'" '
+
'type="checkbox">'
;
var
eventTarget
=
$
(
targetString
);
$compile
(
eventTarget
)(
$scope
);
container
.
append
(
eventTarget
);
// var targetString = '<input name="dataGridCheckBox" ng-click="sniffCheckbox()"' +
// 'data-id="'+options.data.id+'" ' +
// 'data-url="'+options.data.filePositionUrl+'" ' +
// 'type="checkbox">';
// var eventTarget = $(targetString);
// $compile(eventTarget)($scope);
// container.append(eventTarget);
var
target
=
$
(
'<input name="dataGridCheckBox" type="checkbox" '
+
'data-id="'
+
options
.
data
.
id
+
'" '
+
'data-url="'
+
options
.
data
.
filePositionUrl
+
'"/>'
);
target
.
off
(
'click'
).
on
(
'click'
,
function
(){
$scope
.
sniffCheckbox
();
});
container
.
append
(
target
);
}
},
{
...
...
@@ -130,7 +153,8 @@ taxDocumentManageModule.controller('taxDocumentListController',
cellTemplate
:
function
(
container
,
options
)
{
try
{
if
(
options
.
data
.
fileTime
)
{
$
(
'<span>'
).
text
(
$filter
(
'date'
)(
options
.
data
.
fileTime
,
'yyyy/MM/dd'
)).
appendTo
(
container
);
options
.
data
.
fileTime
=
$filter
(
'date'
)(
options
.
data
.
fileTime
,
'yyyy/MM/dd'
);
$
(
'<span>'
).
text
(
options
.
data
.
fileTime
).
appendTo
(
container
);
}
else
{
$
(
'<span>'
).
text
(
''
).
appendTo
(
container
);
}
...
...
@@ -145,11 +169,11 @@ taxDocumentManageModule.controller('taxDocumentListController',
cellTemplate
:
function
(
container
,
options
)
{
try
{
if
(
options
.
data
.
ownTime
)
{
// 这是所属时间返回的是int类型
var
ownTimeString
=
options
.
data
.
ownTime
+
""
;
var
year
=
ownTimeString
.
substr
(
0
,
4
);
var
mon
=
ownTimeString
.
substr
(
4
,
2
);
var
day
=
ownTimeString
.
substr
(
6
,
2
);
$
(
'<span>'
).
text
(
year
+
"/"
+
mon
+
"/"
+
day
).
appendTo
(
container
);
$
(
'<span>'
).
text
(
year
+
"/"
+
mon
).
appendTo
(
container
);
}
else
{
$
(
'<span>'
).
text
(
''
).
appendTo
(
container
);
}
...
...
@@ -165,7 +189,8 @@ taxDocumentManageModule.controller('taxDocumentListController',
cellTemplate
:
function
(
container
,
options
)
{
try
{
if
(
options
.
data
.
effectiveTime
)
{
$
(
'<span>'
).
text
(
$filter
(
'date'
)(
options
.
data
.
effectiveTime
,
'yyyy/MM/dd'
)).
appendTo
(
container
);
options
.
data
.
effectiveTime
=
$filter
(
'date'
)(
options
.
data
.
effectiveTime
,
'yyyy/MM/dd'
);
$
(
'<span>'
).
text
(
options
.
data
.
effectiveTime
).
appendTo
(
container
);
}
else
{
$
(
'<span>'
).
text
(
''
).
appendTo
(
container
);
}
...
...
@@ -200,7 +225,8 @@ taxDocumentManageModule.controller('taxDocumentListController',
cellTemplate
:
function
(
container
,
options
)
{
try
{
if
(
options
.
data
.
uploadTime
)
{
$
(
'<span>'
).
text
(
$filter
(
'date'
)(
options
.
data
.
uploadTime
,
'yyyy/MM/dd'
)).
appendTo
(
container
);
options
.
data
.
uploadTime
=
$filter
(
'date'
)(
options
.
data
.
uploadTime
,
'yyyy/MM/dd'
);
$
(
'<span>'
).
text
(
options
.
data
.
uploadTime
).
appendTo
(
container
);
}
else
{
$
(
'<span>'
).
text
(
''
).
appendTo
(
container
);
}
...
...
@@ -226,17 +252,27 @@ taxDocumentManageModule.controller('taxDocumentListController',
cellTemplate
:
function
(
container
,
options
)
{
var
prevTargetString
=
'<a style="color:#506bf7;margin-right:1rem;" href="javascript:void(0)" ng-click="viewRemoteFile(
\'
'
+
options
.
data
.
fileName
+
'
\'
,
\'
'
+
options
.
data
.
filePositionUrl
+
'
\'
)">'
+
'<span>{{"Preview"|translate}}</span></a>'
;
var
editTargetString
=
'<a style="color:#506bf7;" href="javascript:void(0)" ng-click="openSimpleUploadPop(
\'
'
+
options
.
data
.
id
+
'
\'
)">'
+
'<span>{{"Edit"|translate}}</span></a>'
;
var
eventTarget
=
$
(
prevTargetString
+
editTargetString
);
$compile
(
eventTarget
)(
$scope
);
container
.
append
(
eventTarget
);
// var prevTargetString = '<a style="color:#506bf7;margin-right:1rem;" href="javascript:void(0)" ng-click="viewRemoteFile(\''
// + options.data.fileName + '\',\'' + encodeURIComponent(options.data.filePositionUrl)
// + '\')">'
// + '<span>{{"Preview"|translate}}</span></a>';
// var editTargetString = '<a style="color:#506bf7;" href="javascript:void(0)" ng-click="openSimpleUploadPop(\''
// + options.data.id
// + '\')">'
// + '<span>{{"Edit"|translate}}</span></a>';
// var eventTarget = $(prevTargetString + editTargetString);
// $compile(eventTarget)($scope);
// container.append(eventTarget);
var
prevTarget
=
$
(
'<a style="color:#506bf7;margin-right:1rem;" href="javascript:void(0)"><span>'
+
$translate
.
instant
(
'Preview'
)
+
'</span></a>'
);
prevTarget
.
off
(
'click'
).
on
(
'click'
,
function
(){
$scope
.
viewRemoteFile
(
options
.
data
.
fileName
,
options
.
data
.
filePositionUrl
);
});
var
editTarget
=
$
(
'<a style="color:#506bf7;" href="javascript:void(0)"><span>'
+
$translate
.
instant
(
'Edit'
)
+
'</span></a>'
);
editTarget
.
off
(
'click'
).
on
(
'click'
,
function
(){
$scope
.
openSimpleUploadPop
(
options
.
data
.
id
);
});
container
.
append
(
prevTarget
).
append
(
editTarget
);
}
},
...
...
@@ -256,7 +292,10 @@ taxDocumentManageModule.controller('taxDocumentListController',
$scope
.
localData
.
forEach
(
function
(
item
)
{
if
(
item
.
id
==
rowId
)
{
$scope
.
editFieldModel
=
angular
.
copy
(
item
);
$scope
.
editFieldModel
.
ownTime
=
$scope
.
queryDate
(
item
.
ownTime
,
"/"
);
var
ownTimeString
=
item
.
ownTime
+
""
;
var
year
=
ownTimeString
.
substr
(
0
,
4
);
var
mon
=
ownTimeString
.
substr
(
4
,
2
);
$scope
.
editFieldModel
.
ownTime
=
year
+
"/"
+
mon
;
$scope
.
editFieldModel
.
fileTime
=
$scope
.
queryDate
(
item
.
fileTime
,
"/"
);
$scope
.
editFieldModel
.
effectiveTime
=
$scope
.
queryDate
(
item
.
effectiveTime
,
"/"
);
$scope
.
syncFileType
(
$scope
.
editFieldModel
.
fileAttr
);
...
...
@@ -439,12 +478,7 @@ taxDocumentManageModule.controller('taxDocumentListController',
delItems
.
ids
.
push
(
cellId
);
}
});
var
params
=
angular
.
copy
(
delItems
);
params
.
ownTime
=
params
.
ownTime
?
params
.
ownTime
:
""
;
var
splitMark
=
params
.
ownTime
.
indexOf
(
"-"
)
>
-
1
?
"-"
:
"/"
;
params
.
ownTime
=
parseInt
(
params
.
ownTime
.
split
(
splitMark
).
join
(
""
));
taxDocumentListService
.
delFileRecordItems
(
params
).
then
(
function
(
data
)
{
taxDocumentListService
.
delFileRecordItems
(
delItems
).
then
(
function
(
data
)
{
if
(
data
)
{
SweetAlert
.
swal
({
title
:
$translate
.
instant
(
"Deleted"
),
...
...
@@ -540,84 +574,6 @@ taxDocumentManageModule.controller('taxDocumentListController',
})();
}]);
/*taxDocumentManageModule.directive("multiDatePicker", function () {
return {
restrict: "EA",
controller: ['$scope', '$element', '$translate', '$compile',
function ($scope, $element, $translate, $compile) {
var minDate = [1, 1970];
var maxDate = [12, new Date().getFullYear()];
var setDate = [
[1, 2018],
[12, 2018]
];
var monthList = [$translate.instant('Month01'),
$translate.instant('Month02'),
$translate.instant('Month03'),
$translate.instant('Month04'),
$translate.instant('Month05'),
$translate.instant('Month06'),
$translate.instant('Month07'),
$translate.instant('Month08'),
$translate.instant('Month09'),
$translate.instant('Month10'),
$translate.instant('Month11'),
$translate.instant('Month12')
];
var setModel = {
minDate: minDate,
maxDate: maxDate,
// setDate: setDate,
months: monthList,
RTL: "bottom left",
minView: 2,
ConfirmBtnText: $translate.instant('Confirm'),
CancelBtnText: $translate.instant('ButtonCancel')
};
$('#period-picker1').rangePicker(setModel)
.on('datePicker.done', function (e, result) {
// $scope.queryFieldModel.AvailabilityDate
$scope.queryFieldModel.fileBeginTime = dateFormat(result[0].reverse());
$scope.queryFieldModel.fileEndTTime = dateFormat(result[1].reverse());
});
$('#period-picker2').rangePicker(setModel)
.on('datePicker.done', function (e, result) {
// queryFieldModel.Duration
$scope.queryFieldModel.ownBeginTime = dateFormat(result[0].reverse());
$scope.queryFieldModel.ownEndTime = dateFormat(result[1].reverse());
});
$('#period-picker3').rangePicker(setModel)
.on('datePicker.done', function (e, result) {
// queryFieldModel.DueDate
$scope.queryFieldModel.effectiveBeginTime = dateFormat(result[0].reverse());
$scope.queryFieldModel.effectiveEndTime = dateFormat(result[1].reverse());
});
$('#period-picker4').rangePicker(setModel)
.on('datePicker.done', function (e, result) {
// queryFieldModel.UploadDate
$scope.queryFieldModel.uploadBeginTime = dateFormat(result[0].reverse());
$scope.queryFieldModel.uploadEndTime = dateFormat(result[1].reverse());
});
function dateFormat(dateArr) {
var result = [];
dateArr.forEach(function (dateItem) {
dateItem = dateItem + "";
dateItem = dateItem.length < 2 ? "0" + dateItem : dateItem;
result.push(dateItem);
});
//默认填充每月的1号
result.push("01");
return result.join("-");
}
}]
}
});*/
taxDocumentManageModule
.
directive
(
'dateTimePicker'
,
function
()
{
return
{
restrict
:
'EA'
,
...
...
@@ -705,7 +661,7 @@ taxDocumentManageModule.directive('fileUploader', function () {
$
(
"#uploadFilePlugin"
).
click
();
};
$scope
.
uploader
=
new
FileUploader
({
url
:
apiInterceptor
.
webApiHostUrl
+
"/
v1/
taxDoc/add"
,
url
:
apiInterceptor
.
webApiHostUrl
+
"/taxDoc/add"
,
// autoUpload: true,//添加后,自动上传
headers
:
{
"Authorization"
:
apiInterceptor
.
tokenType
+
' '
+
apiInterceptor
.
apiToken
()},
// removeAfterUpload: true,
...
...
@@ -714,10 +670,11 @@ taxDocumentManageModule.directive('fileUploader', function () {
name
:
'fileTypeFilter'
,
fn
:
function
(
item
,
options
)
{
if
(
item
.
name
.
indexOf
(
"_"
)
===
-
1
)
{
SweetAlert
.
warning
(
"文件名格式不符合规则,请重新选择"
);
SweetAlert
.
warning
(
"文件名格式不符合规则,请重新选择
(正确格式必须包含'公司名称'和'档案类型',并用下划线'_'分隔)
"
);
return
false
;
}
var
fileNativePath
=
$
(
"#uploadFilePlugin"
)[
0
].
value
||
""
;
fileNativePath
=
fileNativePath
.
replace
(
/fakepath/img
,
"******"
);
var
splitMark
=
/
\/
/
.
test
(
fileNativePath
)
?
"/"
:
"
\
\"
;
var prevPath = fileNativePath.split(splitMark);
prevPath.pop();
...
...
@@ -734,7 +691,6 @@ taxDocumentManageModule.directive('fileUploader', function () {
$scope.uploader.onErrorItem = function (fileItem, response, status, headers) {
SweetAlert.warning($translate.instant('FailUpload'));
$scope.editFieldModel = {};
};
// $scope.uploader.onCancelItem = function(fileItem, response, status, headers) {
// console.info('onCancelItem', fileItem, response, status, headers);
...
...
@@ -757,7 +713,6 @@ taxDocumentManageModule.directive('fileUploader', function () {
function (isConfirm) {
if (isConfirm) $scope.loadMainData();
});
$('#simpleUploadPopDialog').modal('hide');
};
}]
...
...
@@ -806,10 +761,11 @@ taxDocumentManageModule.directive('multiFileUploader', function () {
name: 'fileTypeFilter',
fn: function (item, options) {
if(item.name.indexOf("
_
") === -1) {
SweetAlert.warning("
文件名格式不符合规则,请重新选择
");
SweetAlert.warning("
文件名格式不符合规则,请重新选择
(
正确格式必须包含
'公司名称'
和
'档案类型'
,并用下划线
'_'
分隔
)
");
return false;
}
var fileNativePath = $("
#
multiUploadFilePlugin
")[0].value || "";
fileNativePath = fileNativePath.replace(/fakepath/img,"
******
");
var splitMark = /
\
//.test(fileNativePath) ? "
/
" : "
\\
";
var prevPath = fileNativePath.split(splitMark);
prevPath.pop();
...
...
@@ -844,6 +800,7 @@ taxDocumentManageModule.directive('multiFileUploader', function () {
$("
#
uploadResultPop
").modal("
show
");
$('#multiUploadPopDialog').modal('hide');
};
$scope.multiUploader.onSuccessItem = function (fileItem, response) {
...
...
@@ -965,8 +922,11 @@ taxDocumentManageModule.directive('filePreview', function () {
function getXLS(url) {
// return taxDocumentListService.getBinaryData('./bundles/MS Function list - Phase 1.xlsx');
return taxDocumentListService.readXLSX({
path:url
// path: 'http://47.94.233.173:11007/static/erp_tax_system/FE9A6FCC-019E-4B93-A9B2-1DD04CDD7431?expire=1552463739&signiture=H15ovgMR4zXwiYlPe4nZMoeLMSZFhimiHFUZ4-SVVaE='
});
}
...
...
@@ -1235,8 +1195,6 @@ taxDocumentManageModule.directive('helpPop', function () {
}]
}
});
taxDocumentManageModule.directive('watchGroup', function () {
return {
restrict: 'EA',
...
...
@@ -1337,7 +1295,7 @@ taxDocumentManageModule.directive('tempModule', function () {
var theDate = new Date(time);
var year = theDate.getFullYear();
var mm = theDate.getMonth() + 1;
var dd = theDate.getDa
y
();
var dd = theDate.getDa
te
();
mm = (mm + "").length < 2 ? "
0
" + mm : mm;
dd = (dd + "").length < 2 ? "
0
" + dd : dd;
return year + mark + mm + mark + dd;
...
...
@@ -1353,6 +1311,22 @@ taxDocumentManageModule.directive('tempModule', function () {
}
});
console.info($scope.checkedItemIds.join("
,
"));
};
$scope.getMonthLastDate = function(year,month){
year = year ? year : new Date().getFullYear();
month = month ? month : (new Date().getMonth() + 1);
var nextMoth = null;
if(month==12){
year += 1;
nextMoth = 1;
}else{
nextMoth = month + 1;
}
var curMothLastDayObj = new Date(new Date(year,nextMoth,1).getTime() - 1000*60*60*24);
var date = curMothLastDayObj.getDate();
date = (date + "").length < 2 ? "
0
" + date : date;
return date;
}
}]
}
...
...
atms-web/src/main/webapp/app/taxDocumentManage/tax-document-list/tax-document-list.html
View file @
5c05e3d9
...
...
@@ -54,14 +54,21 @@
max-width
:
68%
;
padding-left
:
1rem
;
box-sizing
:
border-box
;
position
:
relative
;
}
.TDL-query-bar
.TDL-query-val
.TDL-query-val-multi
{
width
:
45%
;
max-width
:
45%
;
left
:
0
;
display
:
inline-block
;
margin
:
0
;
position
:
absolute
;
top
:
-24px
;
left
:
1rem
;
}
.TDL-query-bar
.TDL-query-val
.TDL-query-val-multi
:nth-child
(
even
)
{
left
:
45%
;
border-radius
:
0
4px
4px
0
;
}
.TDL-query-bar
.TDL-query-more
{
...
...
@@ -467,8 +474,16 @@
<span
translate=
"TaxType"
></span>
</div>
<div
class=
"TDL-query-val"
>
<input
type=
"text"
class=
"form-control radius3"
ng-model=
"queryFieldModel.taxType"
/>
<!--<input type="text" class="form-control radius3"-->
<!--ng-model="queryFieldModel.taxType"/>-->
<select
ng-model=
"queryFieldModel.taxType"
class=
"form-control radius3"
>
<option
ng-repeat=
"taxType in taxTypeSelects track by $index"
ng-selected=
"(queryFieldModel.taxType == taxType)"
value=
"{{taxType}}"
>
{{taxType}}
</option>
</select>
</div>
</div>
<div
class=
"TDL-query-block"
>
...
...
@@ -728,7 +743,7 @@
</label>
<div
class=
"col-sm-11"
style=
"width:61.67%"
>
<input
type=
'text'
placeholder=
"{{'PleaseSelected' | translate}}"
date-time-picker
data-date-format=
"yyyy/mm
/dd
"
data-date-format=
"yyyy/mm"
class=
"form-control"
ng-model=
"editFieldModel.ownTime"
required
data-min-view-mode=
"1"
/>
</div>
...
...
@@ -963,7 +978,7 @@
</label>
<div
class=
"col-sm-11"
style=
"width:61.67%"
>
<input
type=
'text'
placeholder=
"{{'PleaseSelected' | translate}}"
date-time-picker
data-date-format=
"yyyy/mm
/dd
"
date-time-picker
data-date-format=
"yyyy/mm"
class=
"form-control"
ng-model=
"editFieldItem.ownTime"
required
data-min-view-mode=
"1"
/>
</div>
...
...
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