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
dbac0c20
Commit
dbac0c20
authored
Mar 28, 2019
by
zhkwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_mysql' into dev_mysql
parents
2c8306d9
dcfe14a3
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
128 additions
and
128 deletions
+128
-128
EnumInvoiceType.java
...java/pwc/taxtech/atms/constant/enums/EnumInvoiceType.java
+10
-1
InvoiceRecordEnum.java
...va/pwc/taxtech/atms/constant/enums/InvoiceRecordEnum.java
+2
-2
TemplateGroupServiceImpl.java
...c/taxtech/atms/service/impl/TemplateGroupServiceImpl.java
+7
-7
BB.java
...wc/taxtech/atms/vat/service/impl/report/functions/BB.java
+2
-1
JXFP.java
.../taxtech/atms/vat/service/impl/report/functions/JXFP.java
+10
-12
RSUMIF.java
...axtech/atms/vat/service/impl/report/functions/RSUMIF.java
+12
-11
EbitCellDataExtendsMapper.xml
...axtech/atms/vat/dao/extends/EbitCellDataExtendsMapper.xml
+1
-1
vat.json
atms-web/src/main/webapp/app-resources/i18n/zh-CN/vat.json
+1
-0
table-report-sheet.js
...ain/webapp/app/analysis/table/sheet/table-report-sheet.js
+43
-50
tb-ebit-form.ctrl.js
...b/src/main/webapp/app/analysis/table/tb-ebit-form.ctrl.js
+30
-34
tb-ebit-form.html
...-web/src/main/webapp/app/analysis/table/tb-ebit-form.html
+2
-2
vat-report-view.ctrl.js
...p/common/controls/vat-report-view/vat-report-view.ctrl.js
+6
-0
vat-report-view.html
.../app/common/controls/vat-report-view/vat-report-view.html
+1
-1
template.svc.js
...eb/src/main/webapp/app/common/webservices/template.svc.js
+1
-6
No files found.
atms-api/src/main/java/pwc/taxtech/atms/constant/enums/EnumInvoiceType.java
View file @
dbac0c20
package
pwc
.
taxtech
.
atms
.
constant
.
enums
;
import
java.util.HashMap
;
import
java.util.Map
;
public
enum
EnumInvoiceType
{
VATInvoice
(
1
,
"增值税专票"
),
FreightTransport
(
2
,
"货运发票"
),
...
...
@@ -9,7 +12,7 @@ public enum EnumInvoiceType {
private
int
code
;
private
String
name
;
public
static
final
Map
<
Integer
,
String
>
MAPPING
=
new
HashMap
<>();
EnumInvoiceType
(
int
code
,
String
name
)
{
this
.
code
=
code
;
this
.
name
=
name
;
...
...
@@ -22,4 +25,10 @@ public enum EnumInvoiceType {
public
String
getName
()
{
return
name
;
}
static
{
for
(
EnumInvoiceType
invoiceType
:
EnumInvoiceType
.
values
())
{
MAPPING
.
put
(
invoiceType
.
getCode
(),
invoiceType
.
getName
());
}
}
}
atms-api/src/main/java/pwc/taxtech/atms/constant/enums/InvoiceRecordEnum.java
View file @
dbac0c20
...
...
@@ -9,8 +9,8 @@ public class InvoiceRecordEnum {
* 发票类型
*/
public
enum
InvoiceType
{
ORDINARY
(
1
,
"增值税普票"
),
SPECIAL
(
2
,
"增值税专票"
);
ORDINARY
(
1
,
"增值税普
通发
票"
),
SPECIAL
(
2
,
"增值税专
用发
票"
);
private
Integer
code
;
private
String
name
;
public
static
final
Map
<
Integer
,
String
>
MAPPING
=
new
HashMap
<>();
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/TemplateGroupServiceImpl.java
View file @
dbac0c20
...
...
@@ -198,7 +198,6 @@ public class TemplateGroupServiceImpl extends AbstractService {
return
""
;
}
public
static
final
String
PROTABLEID
=
"100610523201314816"
;
@Autowired
private
EbitCellDataMapper
ebitCellDataMapper
;
...
...
@@ -217,8 +216,8 @@ public class TemplateGroupServiceImpl extends AbstractService {
List
<
InvoiceData
>
cfs
=
Lists
.
newArrayList
();
String
[]
sheetName
=
sheet
.
getSheetName
().
split
(
"-"
);
String
taypayerNum
=
sheetName
[
0
];
String
titleValue
=
sheet
.
getRow
(
0
).
getCell
(
3
).
getStringCellValue
();
if
(
""
.
equals
(
titleValue
)
||
!
""
.
equals
(
"利润表(单家PRC)"
)
)
String
titleValue
=
sheet
.
getRow
(
0
).
getCell
(
2
).
getStringCellValue
();
if
(
titleValue
.
indexOf
(
"利润表"
)
==
-
1
)
throw
new
ServiceException
(
ErrorMessageCN
.
ErrorFileFormat
);
if
(
period
==
null
)
{
throw
new
ServiceException
(
ErrorMessageCN
.
DoNotSelectPeriod
);
...
...
@@ -238,8 +237,9 @@ public class TemplateGroupServiceImpl extends AbstractService {
ebitCellData
.
setCol
(
j
);
ebitCellData
.
setRow
(
m
);
ebitCellData
.
setCreateTime
(
now
);
ebitCellData
.
setData
(
sheet
.
getRow
(
m
).
getCell
(
j
).
getStringCellValue
());
ebitCellData
.
setTemplateId
(
PROTABLEID
);
if
(
sheet
.
getRow
(
m
).
getCell
(
j
)
!=
null
)
ebitCellData
.
setData
(
sheet
.
getRow
(
m
).
getCell
(
j
).
getStringCellValue
());
ebitCellData
.
setTemplateId
(
String
.
valueOf
(
idService
.
nextId
()));
ebitCellData
.
setProjectId
(
projectId
);
ebitCellData
.
setOrganizationId
(
orgId
);
ebitCellData
.
setPeriod
(
period
);
...
...
@@ -252,9 +252,9 @@ public class TemplateGroupServiceImpl extends AbstractService {
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
operationResultDto
.
s
etResult
(
false
);
operationResultDto
.
s
uccess
(
e
.
getMessage
()
);
}
operationResultDto
.
s
etResult
(
true
);
operationResultDto
.
s
uccess
(
);
return
operationResultDto
;
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/BB.java
View file @
dbac0c20
...
...
@@ -100,7 +100,8 @@ public class BB extends FunctionBase implements FreeRefFunction {
CellTemplatePerGroupDto
cellTemplateData
=
cellTemplateDataList
.
get
(
0
);
nullCellDto
.
fixedWithGroup
(
cellTemplateData
);
//当年当期
if
(
bo
.
getPeriod
().
intValue
()
==
0
&&
bo
.
getYear
().
intValue
()
==
0
)
{
if
((
bo
.
getPeriod
().
intValue
()
==
0
&&
bo
.
getYear
().
intValue
()
==
0
)||
(
bo
.
getYear
().
equals
(
formulaContext
.
getYear
())&&
bo
.
getPeriod
().
equals
(
formulaContext
.
getPeriod
())))
{
int
index
=
ec
.
getWorkbook
().
getSheetIndex
(
bo
.
getReportCode
());
cellValue
=
getCellValue
(
index
,
ec
,
formulaContext
,
agent
,
bo
.
getRowIndex
()
-
1
,
bo
.
getColumnIndex
()
-
1
,
Long
.
parseLong
(
cellTemplateData
.
getCellTemplateId
()));
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/JXFP.java
View file @
dbac0c20
...
...
@@ -6,6 +6,7 @@ import org.apache.poi.ss.formula.eval.ValueEval;
import
org.apache.poi.ss.formula.functions.FreeRefFunction
;
import
pwc.taxtech.atms.common.util.SpringContextUtil
;
import
pwc.taxtech.atms.constant.Constant
;
import
pwc.taxtech.atms.constant.enums.EnumInvoiceType
;
import
pwc.taxtech.atms.constant.enums.EnumOperationType
;
import
pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType
;
import
pwc.taxtech.atms.constant.enums.KeyValueConfigResultType
;
...
...
@@ -53,7 +54,7 @@ public class JXFP extends FunctionBase implements FreeRefFunction {
int
resultType
=
getIntParam
(
args
[
3
],
ec
);
int
period
=
getIntParam
(
args
[
4
],
ec
);
// 客户情况只计算增值税专票
String
invoiceType
=
"004"
;
//
String invoiceType = "004";
String
formulaExpression
=
"JXFP("
+
certificationPeriod
+
","
+
invoiceTypeParam
+
","
+
authenticationType
+
","
+
resultType
+
","
+
period
+
")"
;
...
...
@@ -81,22 +82,22 @@ public class JXFP extends FunctionBase implements FreeRefFunction {
List
<
CertifiedInvoicesList
>
inputInvoices
;
if
(
authenticationType
==
1
&&
formulaContext
.
getIsYear
())
{
inputInvoices
=
getInvoice
(
null
,
invoiceType
,
inputInvoices
=
getInvoice
(
null
,
invoiceType
Param
,
Constant
.
InputInvoiceCertificationResult
.
CheckPass
,
Constant
.
InputInvoiceCertificationResult
.
ScanPass
,
null
);
}
else
if
(
authenticationType
==
1
)
{
inputInvoices
=
getInvoice
(
period
,
invoiceType
,
inputInvoices
=
getInvoice
(
period
,
invoiceType
Param
,
Constant
.
InputInvoiceCertificationResult
.
CheckPass
,
Constant
.
InputInvoiceCertificationResult
.
ScanPass
,
null
);
}
// 认证未通过与未认证暂认为是同一个意思
else
if
(
authenticationType
==
2
&&
formulaContext
.
getIsYear
())
{
inputInvoices
=
getInvoice
(
null
,
invoiceType
,
inputInvoices
=
getInvoice
(
null
,
invoiceType
Param
,
null
,
null
,
Constant
.
InputInvoiceCertificationResult
.
NotPass
);
}
// 认证未通过与未认证暂认为是同一个意思
else
if
(
authenticationType
==
0
||
authenticationType
==
2
)
{
inputInvoices
=
getInvoice
(
period
,
invoiceType
,
null
,
inputInvoices
=
getInvoice
(
period
,
invoiceType
Param
,
null
,
null
,
Constant
.
InputInvoiceCertificationResult
.
NotPass
);
}
else
{
saveFormulaBlock
(
period
,
ec
,
formulaExpression
,
new
BigDecimal
(
"0.0"
),
0L
,
formulaContext
.
getProjectId
());
...
...
@@ -194,20 +195,17 @@ public class JXFP extends FunctionBase implements FreeRefFunction {
return
strtodate
;
}
public
List
<
CertifiedInvoicesList
>
getInvoice
(
Integer
period
,
String
invoiceType
,
String
checkPass
,
String
scanPass
,
String
notPass
)
{
public
List
<
CertifiedInvoicesList
>
getInvoice
(
Integer
period
,
Integer
invoiceType
,
String
checkPass
,
String
scanPass
,
String
notPass
)
{
CertifiedInvoicesListExample
example
=
new
CertifiedInvoicesListExample
();
CertifiedInvoicesListExample
.
Criteria
criteria
=
example
.
createCriteria
();
if
(
period
!=
null
)
{
Calendar
date
=
Calendar
.
getInstance
();
String
year
=
String
.
valueOf
(
date
.
get
(
Calendar
.
YEAR
));
//认证期间
criteria
.
andPeriodEqualTo
(
Integer
.
valueOf
(
year
+
(
period
>
9
?
period
.
toString
()
:
"0"
+
period
.
toString
())));
criteria
.
andPeriodEqualTo
(
Integer
.
valueOf
(
formulaContext
.
getYear
()
+
(
period
>
9
?
period
.
toString
()
:
"0"
+
period
.
toString
())));
}
if
(
invoiceType
!=
null
)
{
//发票类型
criteria
.
andInvoiceTypeEqualTo
(
String
.
valueOf
(
invoiceType
));
criteria
.
andInvoiceTypeEqualTo
(
EnumInvoiceType
.
MAPPING
.
get
(
invoiceType
));
// criteria1.andFPLXEqualTo(String.valueOf(invoiceType));
}
...
...
@@ -223,7 +221,7 @@ public class JXFP extends FunctionBase implements FreeRefFunction {
//// example.or(criteria1);
// }
//发票状态
criteria
.
andInvoiceTypeEqualTo
(
"
1
"
);
// 过滤作废状态
criteria
.
andInvoiceTypeEqualTo
(
"
正常
"
);
// 过滤作废状态
// List<InputInvoice> list = inputInvoiceMapper.selectByExample(example).stream().filter(x -> {
// return x.getRZSQ().endsWith("-" + (period.intValue() > 9 ? period.toString() : "0" + period.toString()));
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/RSUMIF.java
View file @
dbac0c20
...
...
@@ -74,8 +74,8 @@ public class RSUMIF extends FunctionBase implements FreeRefFunction {
dataSource
.
add
(
reportCellTableSUMIFDataSourceDto
);
tableName
=
resolverString
(
args
,
ec
,
0
);
getField
=
resolverString
(
args
,
ec
,
1
);
filter
=
resolverString
(
args
,
ec
,
2
);
filterValue
=
resolverString
(
args
,
ec
,
3
);
filter
=
resolverString
(
args
,
ec
,
2
);
filterValue
=
resolverString
(
args
,
ec
,
3
);
year
=
resolverInteger
(
args
,
ec
,
4
);
//会计年度
period
=
Integer
.
parseInt
(
resolverString
(
args
,
ec
,
5
));
//会计期间
cellValue
=
agent
.
getTableDataByName
(
tableName
,
getField
,
filter
,
filterValue
,
period
,
year
,
formulaContext
);
...
...
@@ -85,17 +85,18 @@ public class RSUMIF extends FunctionBase implements FreeRefFunction {
return
new
NumberEval
(
0.00
);
}
finally
{
boolean
boo
;
if
(
TableRule
.
map
.
get
(
tableName
).
substring
(
0
,
3
).
equals
(
"cit"
)){
boo
=
true
;
}
else
{
boo
=
false
;
}
Long
dataSourceId
=
null
;
try
{
if
(
TableRule
.
map
.
get
(
tableName
).
substring
(
0
,
3
).
equals
(
"cit"
))
{
boo
=
true
;
}
else
{
boo
=
false
;
}
dataSourceId
=
saveDataRSUMIFSource
(
ec
,
dataSource
,
FormulaDataSourceDetailType
.
ReportCellTableSUMIFDataSourceDto
,
cellValue
,
formulaContext
.
getPeriod
(),
formulaContext
.
getReportTemplateGroupId
(),
ec
.
getColumnIndex
(),
ec
.
getRowIndex
(),
formulaContext
.
getProjectId
(),
selectShow
(
tableName
),
FormulaAgent
.
_buildSql
(
getField
,
tableName
,
filter
,
filterValue
,
period
,
formulaContext
,
year
,
boo
,
true
));
formulaContext
.
getProjectId
(),
selectShow
(
tableName
),
FormulaAgent
.
_buildSql
(
getField
,
tableName
,
filter
,
filterValue
,
period
,
formulaContext
,
year
,
boo
,
true
));
saveFormulaBlock
(
formulaContext
.
getPeriod
(),
ec
,
new
RSUMIFParasBo
().
getExpression
(
args
,
ec
),
cellValue
,
dataSourceId
,
formulaContext
.
getProjectId
());
}
catch
(
Exception
e
)
{
...
...
@@ -108,12 +109,12 @@ public class RSUMIF extends FunctionBase implements FreeRefFunction {
public
FormulaDataSourceType
selectShow
(
String
tableName
)
{
if
(
"CIT_TBAM"
.
equals
(
tableName
))
{
return
FormulaDataSourceType
.
CIT_TBAM
;
}
else
{
return
FormulaDataSourceType
.
Other
;
}
else
{
return
FormulaDataSourceType
.
Other
;
}
}
public
static
String
getSql
()
{
public
static
String
getSql
()
{
return
""
;
}
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/vat/dao/extends/EbitCellDataExtendsMapper.xml
View file @
dbac0c20
...
...
@@ -6,7 +6,7 @@
period, create_time, update_time
</sql>
<insert
id=
"insertBatch"
parameterType=
"java.util.List"
>
insert into
profit_loss_statement_manual
insert into
ebit_cell_data
(
<include
refid=
"Base_Column_List_Ebit"
/>
)
values
...
...
atms-web/src/main/webapp/app-resources/i18n/zh-CN/vat.json
View file @
dbac0c20
...
...
@@ -1457,6 +1457,7 @@
"SelectCheck"
:
"请至少选择一项"
,
"SelectColumnError"
:
"列名对应错误"
,
"SelectExportReport"
:
"选择导出报表"
,
"SelectUploadReport"
:
"选择保存版本"
,
"SelectFile"
:
"选择文件..."
,
"SelectFileTitle"
:
"选择文件"
,
"SelectFileToUpload"
:
"上传文件..."
,
...
...
atms-web/src/main/webapp/app/analysis/table/sheet/table-report-sheet.js
View file @
dbac0c20
...
...
@@ -39,7 +39,7 @@
scope
.
$watchGroup
([
'reportSource'
,
'formulaBlocks'
,
'manualDataSources'
,
'templateId'
],
function
(
newVal
,
oldValue
)
{
if
(
scope
.
templateId
&&
scope
.
reportSource
)
{
setData
();
setData
(
true
);
}
});
var
profileList
=
[
"EBIT考虑资产减值损失"
,
"加:特殊因素考虑"
,
"EBIT(考虑特殊因素)"
,
"EBIT rate"
,
"关联交易金额"
,
"6%增值税"
,
"价税合计金额"
];
...
...
@@ -85,49 +85,38 @@
}
};
scope
.
$watchGroup
([
'relation.period'
,
'relation.orgId'
,
'relation.data'
,
'relation.broadcast'
],
function
(
newValue
,
oldValue
){
scope
.
$watchGroup
([
'relation.period'
,
'relation.orgId'
,
'relation.data'
],
function
(
newValue
,
oldValue
){
if
(
scope
.
relation
.
orgId
!=
null
&&
scope
.
relation
.
period
!=
null
&&
scope
.
spread
!=
undefined
){
loadSheet
(
scope
.
templateId
,
true
)
}
});
scope
.
$watch
(
'relation.broadcast'
,
function
(
newValue
,
oldValue
){
if
(
scope
.
relation
.
orgId
!=
null
&&
scope
.
relation
.
period
!=
null
&&
scope
.
spread
!=
undefined
){
loadSheet
(
scope
.
templateId
,
false
)
}
});
var
loadSheet
=
function
(
templateId
,
init
)
{
//var prokjectId = vatSessionService.project.id;
//var period = vatSessionService.month;
if
(
scope
.
relation
.
orgId
==
undefined
){
scope
.
relation
.
orgId
=
"-1"
;
}
if
(
!
init
){
return
templateService
.
getPeriodTemplateJsonByOrg
(
templateId
,
scope
.
relation
.
period
,
scope
.
relation
.
orgId
).
then
(
function
(
reportSpread
)
{
var
spreadCtrl
=
getSpreadControl
();
if
(
spreadCtrl
)
{
spreadCtrl
.
destroy
();
}
spreadCtrl
=
null
;
if
(
!
_
.
isEmpty
(
reportSpread
))
{
initSpreadExcel
(
reportSpread
).
then
(
function
(
spread
)
{
return
locateCell
(
spread
,
true
);
});
}
},
function
(
data
)
{
$log
.
info
(
data
);
});
}
else
{
return
templateService
.
getPeriodTemplateJsonByInit
(
templateId
,
scope
.
relation
.
period
,
scope
.
relation
.
orgId
).
then
(
function
(
reportSpread
)
{
var
spreadCtrl
=
getSpreadControl
();
if
(
spreadCtrl
)
{
spreadCtrl
.
destroy
();
}
spreadCtrl
=
null
;
if
(
!
_
.
isEmpty
(
reportSpread
))
{
initSpreadExcel
(
reportSpread
).
then
(
function
(
spread
)
{
return
locateCell
(
spread
,
true
);
});
}
},
function
(
data
)
{
$log
.
info
(
data
);
});
addEbitRow
();
setData
(
init
)
return
;
}
return
templateService
.
getPeriodTemplateJsonByOrg
(
templateId
,
scope
.
relation
.
period
,
scope
.
relation
.
orgId
).
then
(
function
(
reportSpread
)
{
var
spreadCtrl
=
getSpreadControl
();
if
(
spreadCtrl
)
{
spreadCtrl
.
destroy
();
}
spreadCtrl
=
null
;
if
(
!
_
.
isEmpty
(
reportSpread
))
{
initSpreadExcel
(
reportSpread
).
then
(
function
(
spread
)
{
return
locateCell
(
spread
,
true
);
});
}
},
function
(
data
)
{
$log
.
info
(
data
);
});
};
var
initSpreadExcel
=
function
(
reportSpread
)
{
...
...
@@ -177,11 +166,16 @@
}
spread
.
resumePaint
();
scope
.
spread
=
spread
;
addEbitRow
(
sheet
)
if
(
scope
.
templateId
&&
scope
.
reportSource
)
{
setData
(
"true"
);
setData
(
true
);
}
//
sheet
.
setColumnWidth
(
0
,
350
)
return
$q
.
when
(
spread
);
};
var
addEbitRow
=
function
(
sheet
){
if
(
sheet
==
undefined
||
sheet
==
null
)
sheet
=
scope
.
spread
.
getActiveSheet
();
sheet
.
setColumnWidth
(
0
,
400
)
//添加单元格
sheet
.
addRows
(
sheet
.
getRowCount
(
scope
.
relation
.
sheetArea
.
viewport
),
1
);
sheet
.
addRows
(
sheet
.
getRowCount
(
scope
.
relation
.
sheetArea
.
viewport
),
1
);
...
...
@@ -190,8 +184,7 @@
sheet
.
addRows
(
sheet
.
getRowCount
(
scope
.
relation
.
sheetArea
.
viewport
),
1
);
sheet
.
setValue
(
i
+
37
,
0
,
profileList
[
i
]);
}
return
$q
.
when
(
spread
);
};
}
var
setEditable
=
function
(
spread
,
isReadOnly
,
ifSuspend
)
{
...
...
@@ -334,7 +327,7 @@
cell
.
value
=
modifiedReportCell
.
value
;
cell
.
isModified
=
true
;
cell
.
modifiedReportCell
=
modifiedReportCell
;
setData
();
setData
(
true
);
});
var
cellValueResetFunc
=
$rootScope
.
$on
(
'cellValueReset'
,
function
(
event
,
args
)
{
...
...
@@ -344,7 +337,7 @@
cell
.
value
=
cell
.
modifiedReportCell
?
cell
.
modifiedReportCell
.
originalValue
:
cell
.
value
;
cell
.
isModified
=
false
;
cell
.
modifiedReportCell
=
null
;
setData
();
setData
(
true
);
});
scope
.
$on
(
'$destroy'
,
function
()
{
...
...
@@ -383,8 +376,12 @@
};
// 根据已有信息通过spreadJS计算各单元格的值
var
setData
=
function
(
saveAndRefresh
)
{
var
setData
=
function
(
init
)
{
var
sheet
=
scope
.
spread
.
sheets
[
0
];
if
(
!
init
){
loadEbitCell
(
sheet
);
return
;
}
var
isExportData
=
false
;
if
(
angular
.
isArray
(
scope
.
reportSource
))
{
spreadJsTipService
.
initialize
(
sheet
);
...
...
@@ -523,19 +520,15 @@
}
}
}
if
(
saveAndRefresh
&&
saveAndRefresh
==
"false"
){
loadEbitCell
(
sheet
,
false
);
}
else
if
(
saveAndRefresh
&&
saveAndRefresh
==
"true"
){
loadEbitCell
(
sheet
,
true
);
}
loadEbitCell
(
sheet
,
false
);
spreadJsTipService
.
paintSheet
(
sheet
);
}
};
//加载Ebit数据
var
loadEbitCell
=
function
(
sheet
,
type
){
var
loadEbitCell
=
function
(
sheet
){
for
(
var
r
=
37
;
r
<=
43
;
r
++
){
for
(
var
c
=
1
;
c
<=
3
;
c
++
){
if
(
c
==
3
&&
type
){
if
(
c
==
3
){
if
(
r
==
37
){
sheet
.
setValue
(
r
,
c
,
PWC
.
tryParseStringToNum
(
scope
.
relation
.
data
.
ebitSubtraction
));
}
...
...
atms-web/src/main/webapp/app/analysis/table/tb-ebit-form.ctrl.js
View file @
dbac0c20
...
...
@@ -2879,22 +2879,10 @@
};
var
initDatePicker
=
function
()
{
if
(
$scope
.
serviceTypeId
===
enums
.
serviceType
.
CIT
)
{
$scope
.
systemTitle
=
$translate
.
instant
(
'CIT'
);
$scope
.
viewMode
=
2
;
}
if
(
$scope
.
serviceTypeId
===
enums
.
serviceType
.
VAT
)
{
$scope
.
systemTitle
=
$translate
.
instant
(
'MenuVAT'
);
$scope
.
viewMode
=
1
;
}
if
(
$scope
.
serviceTypeId
===
enums
.
serviceType
.
AssetsManage
)
{
$scope
.
systemTitle
=
$translate
.
instant
(
'AssetTitle'
);
$scope
.
viewMode
=
1
;
}
var
date
=
new
Date
();
var
year
=
date
.
getFullYear
();
var
mon
th
=
date
.
getMonth
()
;
$scope
.
selectedDate
=
new
Date
(
vatSessionService
.
year
,
vatSessionService
.
month
-
1
,
1
);
var
mon
=
date
.
getMonth
()
+
1
;
$scope
.
selectedDate
=
new
Date
(
year
,
date
.
getMonth
()
+
1
,
1
);
$scope
.
startDate
=
new
Date
(
year
-
20
,
1
,
1
);
$scope
.
endDate
=
new
Date
(
year
+
20
,
1
,
1
);
var
ele1
=
$
(
"#ebitDatepacker"
);
...
...
@@ -2906,14 +2894,21 @@
minViewMode
:
1
,
autoclose
:
true
,
//选中之后自动隐藏日期选择框
clearBtn
:
true
,
//清除按钮
todayBtn
:
fals
e
,
//今日按钮
todayBtn
:
tru
e
,
//今日按钮
format
:
"yyyy-mm"
//日期格式,详见 http://bootstrap-datepicker.readthedocs.org/en/release/options.html#format
}).
on
(
'changeDate'
,
function
(
e
)
{
$scope
.
changeDate
(
e
);
});
ele1
.
datepicker
(
"setDate"
,
$scope
.
selectedDate
);
//初始化
$scope
.
relation
.
period
=
year
.
toString
()
+
monthRevert
(
mon
);
};
var
monthRevert
=
function
(
mon
){
if
(
mon
<
10
)
mon
=
"0"
+
mon
.
toString
();
return
mon
.
toString
();
}
//保存并刷新,加载数据
$scope
.
saveAndRefresh
=
function
(){
...
...
@@ -2933,37 +2928,39 @@
});
//上传模板
$scope
.
upload
=
function
(
file
)
{
var
_file
=
$scope
.
importExcelFile
;
if
(
file
==
null
)
if
(
file
.
length
==
0
)
return
f
rontImport
(
_file
)
;
f
ile
=
file
[
0
]
;
var
token
=
$
(
'input[name="__RequestVerificationToken"]'
).
val
();
var
url
=
apiInterceptor
.
vatW
ebApiHostUrl
+
'/templateGroup/ebitTemplateImport'
;
var
url
=
apiInterceptor
.
w
ebApiHostUrl
+
'/templateGroup/ebitTemplateImport'
;
Upload
.
upload
(
{
url
:
url
,
data
:
{
orgId
:
$scope
.
relation
.
orgId
,
period
:
$scope
.
relation
.
period
},
file
:
_
file
,
data
:
{
orgId
:
$scope
.
relation
.
orgId
,
period
:
$scope
.
relation
.
period
!=
undefined
?
$scope
.
relation
.
period
:
0
},
file
:
file
,
headers
:
{
'Access-Control-Allow-Origin'
:
'*'
,
Authorization
:
apiInterceptor
.
tokenType
+
' '
+
apiInterceptor
.
apiToken
()
},
__RequestVerificationToken
:
token
,
withCredentials
:
true
'Access-Control-Allow-Origin'
:
'*'
,
Authorization
:
apiInterceptor
.
tokenType
+
' '
+
apiInterceptor
.
apiToken
(),
__RequestVerificationToken
:
token
,
withCredentials
:
true
},
__RequestVerificationToken
:
token
,
withCredentials
:
true
})
.
progress
(
function
(
evt
)
{
})
.
success
(
function
(
data
,
status
,
headers
,
config
)
{
SweetAlert
.
error
(
"上传成功"
);
frontImport
(
file
);
$
(
'#busy-indicator-container'
).
hide
();
SweetAlert
.
success
(
"上传成功"
);
$scope
.
relation
.
fileName
=
config
.
file
.
name
;
vatReportService
.
frontImportBack
().
success
(
function
(
res
){
getReportData
(
function
(){
$scope
.
relation
.
broadcast
=
true
;
},
$scope
.
relation
.
period
);
});
//重新获取数据
getReportData
(
function
(){
$scope
.
relation
.
broadcast
=
true
;
},
$scope
.
relation
.
period
);
})
.
error
(
function
(
data
,
status
,
headers
,
config
)
{
SweetAlert
.
error
(
status
+
'错误'
+
",
上传失败"
)
SweetAlert
.
error
(
status
+
"
上传失败"
)
})
};
...
...
@@ -2973,8 +2970,7 @@
var
excelIo
=
new
GC
.
Spread
.
Excel
.
IO
();
excelIo
.
open
(
file
,
function
(
json
)
{
var
workbookObj
=
json
;
spread
.
fromJSON
(
workbookObj
);
$scope
.
spread
.
fromJSON
(
workbookObj
);
},
function
(
e
)
{
// process error
alert
(
e
.
errorMessage
);
...
...
atms-web/src/main/webapp/app/analysis/table/tb-ebit-form.html
View file @
dbac0c20
...
...
@@ -22,8 +22,8 @@
</div>
</div>
<div
class=
"col-sm-5"
class=
"bar-export"
style=
" margin-top: 20px;width: 39%; float: right;"
>
<span
ngf-select=
""
type=
"file"
ng-model=
"importExcelFile"
ngf-change=
"upload($files)"
ngf-drag-over-class=
"'dragover'"
accept=
".xls,.xlsx"
ngf-multiple=
"false"
ngf-allow-dir=
"false"
class=
"
btn btn-vat-third
"
><i
class=
"fa fa-file"
>
{{'uploadProfileTable' | translate}}
</i></span>
<span
ngf-select=
""
ngf-change=
"upload($files)"
accept=
".xls,.xlsx"
ngf-multiple=
"false"
ngf-allow-dir=
"false"
class=
""
><i
class=
"fa fa-file"
>
{{'uploadProfileTable' | translate}}
</i></span>
<span
ng-click=
"saveAndRefresh()"
><i
class=
"fa fa-refresh"
></i>
{{'saveAndRefresh' | translate}}
</span>
<span
ng-click=
"singleExport()"
><i
class=
"fa fa-upload"
></i>
{{'singleExport' | translate}}
</span>
...
...
atms-web/src/main/webapp/app/common/controls/vat-report-view/vat-report-view.ctrl.js
View file @
dbac0c20
...
...
@@ -910,6 +910,12 @@
//打开导出文件弹出框
$scope
.
openExportPop
=
function
(
evenType
)
{
$scope
.
evenType
=
evenType
;
if
(
'export'
==
$scope
.
evenType
)
{
$scope
.
viewTitle
=
$translate
.
instant
(
'SelectExportReport'
);
}
if
(
'upload'
==
$scope
.
evenType
)
{
$scope
.
viewTitle
=
$translate
.
instant
(
'SelectUploadReport'
);
}
var
grp
=
_
.
find
(
$scope
.
$parent
.
$parent
.
groups
,
function
(
g
)
{
return
g
.
name
==
'TaxReturnType'
;
});
...
...
atms-web/src/main/webapp/app/common/controls/vat-report-view/vat-report-view.html
View file @
dbac0c20
...
...
@@ -76,7 +76,7 @@
<div
id=
"exportReportFilesContainer"
>
<script
type=
"text/ng-template"
class=
"content"
id=
"exportReport.html"
>
<
div
class
=
"modal-header"
>
<
h4
class
=
"modal-title"
style
=
"float: left;width: 70%;"
>
{{
'SelectExportReport'
|
translat
e
}}
<
/h4
>
<
h4
class
=
"modal-title"
style
=
"float: left;width: 70%;"
>
{{
viewTitl
e
}}
<
/h4
>
<
span
ng
-
click
=
"$dismiss();"
style
=
"width: 20px; float: right; cursor: pointer;"
>
x
<
/span
>
<
/div
>
<
div
class
=
"modal-body process-bar-container"
>
...
...
atms-web/src/main/webapp/app/common/webservices/template.svc.js
View file @
dbac0c20
...
...
@@ -119,12 +119,7 @@ webservices.factory('templateService', ['$log', '$http', '$q', 'apiConfig', 'htt
var
deferred
=
$q
.
defer
();
var
promise
=
deferred
.
promise
;
var
url
=
null
;
if
(
!
init
){
url
=
loginContext
.
apiHost
+
constant
.
webapi
.
prefix
+
'/template/getPeriodTemplateJson?templateId='
+
templateID
+
"&period="
+
period
+
"&projectId="
+
projectId
;
}
else
{
url
=
loginContext
.
apiHost
+
constant
.
webapi
.
prefix
+
'/template/getPeriodTemplateJson?templateId='
+
templateID
;
}
url
=
loginContext
.
apiHost
+
constant
.
webapi
.
prefix
+
'/template/getPeriodTemplateJson?templateId='
+
templateID
+
"&period="
+
period
+
"&orgId="
+
projectId
;
var
xhr
=
new
XMLHttpRequest
();
xhr
.
open
(
'POST'
,
url
,
true
);
// 也可以使用POST方式,根据接口
xhr
.
responseType
=
"blob"
;
// 返回类型blob
...
...
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