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
f2f32013
Commit
f2f32013
authored
Dec 10, 2018
by
sherlock
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
key in chinese bugs
parent
24a25c0a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
13 deletions
+23
-13
vat-report-sheet.js
.../app/common/controls/vat-report-sheet/vat-report-sheet.js
+9
-3
vat-report-view.ctrl.js
...p/common/controls/vat-report-view/vat-report-view.ctrl.js
+14
-10
No files found.
atms-web/src/main/webapp/app/common/controls/vat-report-sheet/vat-report-sheet.js
View file @
f2f32013
...
...
@@ -515,8 +515,9 @@
if
(
_
.
isString
(
data
.
keyinData
)
&&
data
.
keyinData
.
length
>
0
&&
isNaN
(
Number
(
data
.
keyinData
))){
sheet
.
setValue
(
data
.
rowIndex
,
data
.
columnIndex
,
data
.
keyinData
);
ifShowParseFloat
=
false
;
// 非数值字符串,单元格设置为字符串
data
.
value
=
data
.
keyinData
;
}
else
if
(
_
.
isString
(
data
.
value
)
&&
data
.
value
.
length
>
0
&&
isNaN
(
Number
(
data
.
value
)))
{
if
(
_
.
isString
(
data
.
value
)
&&
data
.
value
.
length
>
0
&&
isNaN
(
Number
(
data
.
value
)))
{
sheet
.
setValue
(
data
.
rowIndex
,
data
.
columnIndex
,
data
.
value
);
ifShowParseFloat
=
false
;
// 非数值字符串,单元格设置为字符串
}
...
...
@@ -558,7 +559,7 @@
sheet
.
setValue
(
data
.
rowIndex
,
data
.
columnIndex
,
data
.
value
);
// 只有数值,设置为数值
}
}
// sheet.setValue(data.rowIndex, data.columnIndex, '妈的有毒');
sheet
.
setTag
(
data
.
rowIndex
,
data
.
columnIndex
,
JSON
.
stringify
(
data
));
//设置 tooltip 和 图标信息
spreadJsTipService
.
setCellTipByCellData
(
sheet
.
getCell
(
data
.
rowIndex
,
data
.
columnIndex
),
data
);
...
...
@@ -602,6 +603,10 @@
newVal
=
newVal
.
toFixed
(
4
);
}
if
(
x
.
keyinData
){
sheet
.
setValue
(
x
.
rowIndex
,
x
.
columnIndex
,
x
.
keyinData
);
}
var
oldVal
=
x
.
value
;
oldVal
=
PWC
.
tryParseStringToNum
(
oldVal
);
if
(
_
.
isBoolean
(
oldVal
))
{
...
...
@@ -627,7 +632,8 @@
sheet
.
setTag
(
x
.
rowIndex
,
x
.
columnIndex
,
JSON
.
stringify
(
x
));
}
});
spreadJsTipService
.
paintSheet
(
sheet
);
loadSheet
(
scope
.
templateId
);
return
cells
;
};
...
...
atms-web/src/main/webapp/app/common/controls/vat-report-view/vat-report-view.ctrl.js
View file @
f2f32013
...
...
@@ -465,7 +465,13 @@
}
}
var
value
=
jsonTagInfo
.
value
;
var
value
;
if
(
isNaN
(
parseFloat
(
tmpValue
))){
value
=
jsonTagInfo
.
keyinData
;
}
else
{
value
=
jsonTagInfo
.
value
;
}
// 保证无论jsonTagInfo.value是数字或是字符串都能执行以下操作
if
(
jsonTagInfo
.
value
||
(
jsonTagInfo
.
value
+
''
).
indexOf
(
'0'
)
>
-
1
)
{
if
(
jsonTagInfo
.
dataType
===
enums
.
cellDataType
.
Integer
)
{
...
...
@@ -488,7 +494,8 @@
money
:
jsonTagInfo
.
value
,
value
:
value
,
modelIdList
:
jsonTagInfo
.
cellTemplateConfig
.
modelIDs
,
modifiedReportCell
:
jsonTagInfo
.
modifiedReportCell
modifiedReportCell
:
jsonTagInfo
.
modifiedReportCell
,
keinData
:
value
},
dataType
:
jsonTagInfo
.
dataType
,
reportTemplateId
:
jsonTagInfo
.
reportTemplateID
,
...
...
@@ -497,6 +504,7 @@
cellTemplateId
:
jsonTagInfo
.
cellTemplateID
,
inputValue
:
''
,
inputMemo
:
''
,
keyinData
:
value
,
allowAddDatasource
:
false
,
showFormulaSummary
:
true
};
...
...
@@ -585,7 +593,8 @@
var
parseItem
=
{
index
:
row
.
index
,
name
:
row
.
name
,
amount
:
row
.
value
amount
:
row
.
value
,
keyinData
:
row
.
keyinData
};
modelItem
.
dataSource
.
push
(
parseItem
);
});
...
...
@@ -595,6 +604,7 @@
var
parseItem
=
{
index
:
row
.
index
,
name
:
row
.
name
,
keyinData
:
row
.
keyinData
,
amount
:
row
.
amount
};
modelItem
.
dataSource
.
push
(
parseItem
);
...
...
@@ -1175,12 +1185,8 @@
for
(
var
j
=
0
;
j
<
reportD
.
dataSourceList
.
length
;
j
++
)
{
if
(
reportD
.
dataSourceList
[
j
].
rowIndex
===
cellData
.
rowIndex
&&
reportD
.
dataSourceList
[
j
].
columnIndex
===
cellData
.
columnIndex
)
{
if
(
manualData
.
keyinData
){
reportD
.
keyinData
=
manualData
.
keyinData
;
reportD
.
dataSourceList
[
j
].
keyinData
=
manualData
.
keyinData
;
}
else
{
reportD
.
dataSourceList
[
j
].
amount
=
manualData
.
amount
;
}
}
}
}
...
...
@@ -1280,6 +1286,7 @@
// 刷新spreadsheet,获取操作数据源后最新的计算结果,并拿来与当前所有单元格value比较,得到value修改前后的值对比
var
updatedCells
=
$scope
.
reportApi
.
refreshReport
();
loadCellData
(
getActualPeriod
());
};
$scope
.
updateCellBySourceDetailDelete
=
function
(
dataSource
,
detailId
,
opType
)
{
...
...
@@ -1550,9 +1557,6 @@
};
$scope
.
saveReportCache
=
function
()
{
if
(
!
$scope
.
reportData
)
{
return
$q
.
reject
();
...
...
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