Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bims
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙海亮
bims
Commits
373ee9f1
Commit
373ee9f1
authored
Sep 05, 2023
by
杨芳博-DEL
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test' of git.ssish.com:sunhailiang/bims into test
parents
64bd47c3
9332a1ce
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
119 additions
and
5 deletions
+119
-5
index.js
src/utils/index.js
+110
-1
index.vue
src/views/charge-query/index.vue
+3
-1
collectionDetail.vue
src/views/verification/collectionDetail.vue
+6
-3
No files found.
src/utils/index.js
View file @
373ee9f1
...
...
@@ -90,3 +90,112 @@ export function exportFile(res, file_name) {
}
export
const
numValid
=
/^
([
1-9
][
0-9
]
*|0
)([
.
][
0-9
]
+
)?
$/
// 数值计算
export
const
accuracy
=
{
division
(
arg1
,
arg2
)
{
//除法
var
t1
=
0
,
t2
=
0
,
r1
,
r2
;
try
{
t1
=
arg1
.
toString
().
split
(
'
.
'
)[
1
].
length
;
}
catch
(
e
)
{
console
.
log
(
e
);
}
try
{
t2
=
arg2
.
toString
().
split
(
'
.
'
)[
1
].
length
;
}
catch
(
e
)
{
console
.
log
(
e
);
}
if
(
Math
)
{
r1
=
Number
(
arg1
.
toString
().
replace
(
'
.
'
,
''
));
r2
=
Number
(
arg2
.
toString
().
replace
(
'
.
'
,
''
));
return
this
.
multiply
(
r1
/
r2
,
Math
.
pow
(
10
,
t2
-
t1
));
}
},
multiply
(
arg1
,
arg2
)
{
//乘法
var
m
=
0
,
s1
=
arg1
.
toString
(),
s2
=
arg2
.
toString
();
try
{
m
+=
s1
.
split
(
'
.
'
)[
1
].
length
;
}
catch
(
e
)
{
console
.
log
(
e
)
}
try
{
m
+=
s2
.
split
(
'
.
'
)[
1
].
length
;
}
catch
(
e
)
{
console
.
log
(
e
)
}
return
Number
(
s1
.
replace
(
'
.
'
,
''
))
*
Number
(
s2
.
replace
(
'
.
'
,
''
))
/
Math
.
pow
(
10
,
m
);
},
add
(
arg1
,
arg2
)
{
//加法
var
r1
,
r2
,
m
;
try
{
r1
=
arg1
.
toString
().
split
(
'
.
'
)[
1
].
length
;
}
catch
(
e
)
{
r1
=
0
;
}
try
{
r2
=
arg2
.
toString
().
split
(
'
.
'
)[
1
].
length
;
}
catch
(
e
)
{
r2
=
0
;
}
m
=
Math
.
pow
(
10
,
Math
.
max
(
r1
,
r2
));
console
.
log
(
this
.
multiply
(
arg1
,
m
),
this
.
multiply
(
arg2
,
m
))
return
(
this
.
multiply
(
arg1
,
m
)
+
this
.
multiply
(
arg2
,
m
))
/
m
;
},
subtract
(
arg1
,
arg2
)
{
//减法
var
r1
,
r2
,
m
,
n
;
try
{
r1
=
arg1
.
toString
().
split
(
'
.
'
)[
1
].
length
;
}
catch
(
e
)
{
r1
=
0
;
}
try
{
r2
=
arg2
.
toString
().
split
(
'
.
'
)[
1
].
length
;
}
catch
(
e
)
{
r2
=
0
;
}
m
=
Math
.
pow
(
10
,
Math
.
max
(
r1
,
r2
));
n
=
r1
>=
r2
?
r1
:
r2
;
return
((
arg1
*
m
-
arg2
*
m
)
/
m
).
toFixed
(
n
);
},
// 计算一个数组的总和
sum
(
arr
)
{
let
result
=
0
;
arr
.
forEach
(
item
=>
{
result
=
this
.
add
(
result
,
item
);
})
return
result
;
},
// 计算一个数组的总和 fn是对每项数据的处理方式
sumBy
(
arr
,
fn
)
{
let
result
=
0
;
arr
.
forEach
(
item
=>
{
let
val
=
item
;
if
(
fn
)
{
val
=
fn
(
item
)
}
result
=
this
.
add
(
result
,
val
);
})
return
result
;
},
toCeil
(
num
,
p
=
4
)
{
num
=
isNaN
(
num
)
?
0
:
num
;
p
=
isNaN
(
p
)
?
0
:
p
;
let
precision
=
Math
.
pow
(
10
,
p
);
return
Math
.
ceil
((
num
*
precision
).
toFixed
(
1
))
/
precision
;
},
toFloor
(
num
,
p
=
4
)
{
num
=
isNaN
(
num
)
?
0
:
num
;
p
=
isNaN
(
p
)
?
0
:
p
;
let
precision
=
Math
.
pow
(
10
,
p
);
return
Math
.
floor
((
num
*
precision
).
toFixed
(
1
))
/
precision
;
}
};
\ No newline at end of file
src/views/charge-query/index.vue
View file @
373ee9f1
...
...
@@ -165,7 +165,9 @@ export default {
{
title
:
'
收费时间
'
,
dataIndex
:
'
receiptDate
'
,
width
:
180
},
{
title
:
'
账单编号
'
,
dataIndex
:
'
receiptNo
'
,
width
:
180
},
{
title
:
'
账单类型
'
,
dataIndex
:
'
receiptTypeStr
'
,
width
:
130
},
{
title
:
'
状态
'
,
dataIndex
:
'
status
'
,
width
:
130
,
scopedSlots
:
{
customRender
:
'
status
'
}
},
{
title
:
'
状态
'
,
dataIndex
:
'
status
'
,
width
:
130
,
customRender
:
val
=>
{
return
<
span
class
=
{
val
===
'
2
'
?
'
red-text
'
:
''
}
>
{
val
===
'
2
'
?
'
无效
'
:
'
有效
'
}
<
/span>;
}},
{
title
:
'
病历号
'
,
dataIndex
:
'
mrnNo
'
,
width
:
180
},
{
title
:
'
客户姓名
'
,
dataIndex
:
'
patientName
'
,
width
:
120
},
{
title
:
'
保险公司
'
,
dataIndex
:
'
payorName
'
,
width
:
200
},
...
...
src/views/verification/collectionDetail.vue
View file @
373ee9f1
...
...
@@ -131,7 +131,7 @@
<a-col
:lg=
"6"
:sm=
"12"
>
<a-form-model-item
label=
"本次账单回款金额合计"
>
<!--
<div
class=
"blue-text"
>
{{
ciReceiptTotalVo
.
backAmountTotal
||
0
}}
</div>
-->
<div
class=
"blue-text"
>
{{
form
.
backAmountCny
-
residueBackAmount
||
0
}}
</div>
<div
class=
"blue-text"
>
{{
accuracy
.
subtract
(
form
.
backAmountCny
,
residueBackAmount
)
||
0
}}
</div>
</a-form-model-item>
</a-col>
...
...
@@ -314,7 +314,7 @@ import { Empty } from 'ant-design-vue';
import
Goback
from
'
@/components/CUSTOMER/goback
'
;
import
BurtPagination
from
'
@/components/CUSTOMER/pagation
'
;
import
{
EOBStatusOptions
}
from
'
@/utils/utilsdictOptions.js
'
;
import
{
exportFile
}
from
'
@/utils/index
'
;
import
{
exportFile
,
accuracy
}
from
'
@/utils/index
'
;
import
moment
from
'
moment
'
;
import
mixins
from
'
@/mixins
'
;
const
panes
=
[
...
...
@@ -324,6 +324,7 @@ const panes = [
export
default
{
data
()
{
return
{
accuracy
,
isEdit
:
false
,
EOBStatusOptions
,
dialogShow
:
false
,
...
...
@@ -580,7 +581,7 @@ export default {
this
.
selectedRows
.
forEach
((
item
)
=>
{
totalMoney
-=
Number
(
item
.
backAmount
);
});
return
Number
(
totalMoney
.
toFixed
(
2
));
return
Number
(
totalMoney
.
toFixed
(
2
))
||
839.21
;
}
},
watch
:
{
...
...
@@ -593,6 +594,8 @@ export default {
}
},
created
()
{
console
.
log
(
'
1111111111111111 :>>
'
,
1111111111111111
);
console
.
log
(
this
.
accuracy
.
add
(
0.1
,
0.2
))
this
.
simpleImage
=
Empty
.
PRESENTED_IMAGE_SIMPLE
;
const
{
backMoneyNo
,
isEdit
}
=
this
.
$route
.
query
;
this
.
backMoneyNo
=
backMoneyNo
;
...
...
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