Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
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
罗超
SuperMan
Commits
117784f9
Commit
117784f9
authored
May 31, 2023
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
df0ffe7d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
171 additions
and
0 deletions
+171
-0
ReceivablesModule.vue
...mponents/FinancialModule/components/ReceivablesModule.vue
+171
-0
No files found.
src/components/FinancialModule/components/ReceivablesModule.vue
0 → 100644
View file @
117784f9
<
style
scoped
>
@import
'../../../assets/css/financia/editRate.css'
;
</
style
>
<
template
v-if=
"GetDetail.DetailList.length>0"
>
<div
class=
"Receipt_box"
:class=
"[GetDetail.Type==1|| GetDetail.Type==5?'':'color_blur',isPrintPage?'_PrintPageStyle':'']"
:style=
"
{width:width,backgroundColor:color}" @click.stop v-loading='loading'>
<table
class=
"Receipt_table"
border=
"1"
:class=
"[GetDetail.Type==1|| GetDetail.Type==5?'_border_color_r':'_border_color_b',isPrintPage?'_border_color_p':'']"
:bordercolor=
"GetDetail.Type==1|| GetDetail.Type==5?'#c94052':'#106BAF'"
style=
"border-collapse:collapse;"
>
<tr>
<th
rowspan=
"2"
width=
"150"
>
{{
$t
(
'fnc.fyshuoming'
)
}}
</th>
<th
rowspan=
"2"
width=
"100"
>
{{
$t
(
'hotel.hotel_Currency'
)
}}
</th>
<th
colspan=
"3"
>
{{
$t
(
'fnc.jine'
)
}}
<template
v-if=
"GetDetail.StandardCurrencyId>0"
>
(
{{
GetDetail
.
StandardCurrencyName
}}
)
</
template
>
</th>
</tr>
<tr>
<th
width=
"88"
>
{{$t('fnc.yuanbi')}}
</th>
<th
width=
"50"
>
{{$t('hotel.hotel_CurrentRate')}}
</th>
<th
width=
"88"
>
{{$t('fnc.bweibi')}}
</th>
</tr>
<
template
v-if=
"GetDetail.DetailList&&GetDetail.DetailList.length!==0"
>
<tr
v-for=
"(item,daIn) in GetDetail.DetailList"
class=
"_color_b"
>
<td
height=
"26px"
>
{{
item
.
CostTypeName
}}
</td>
<td
height=
"26px"
>
{{
item
.
CurrencyName
}}
</td>
<td
height=
"26px"
>
{{
item
.
OriginalMoney
}}
</td>
<td
height=
"26px"
style=
"padding: 0 5px;"
>
<el-input
v-model=
"item.Rate"
type=
"text"
class=
"w80 _border_b_1"
style=
"border-bottom: 1px solid #333;margin-bottom: 5px;"
@
change=
"addList(item,daIn)"
></el-input>
</td>
<td
height=
"26px"
style=
"position: relative;"
>
{{
item
.
Money
}}
<span
v-if=
"!daIn&&GetDetail.DetailList.length>1"
@
click=
"copyRate(item.Rate)"
style=
"position: absolute;right: -45px;top: 10px;color: #33B3FF;cursor: pointer;"
>
同下
</span>
</td>
</tr>
</
template
>
<tr>
<td
height=
"26px"
></td>
<td
height=
"26px"
></td>
<td
height=
"26px"
>
{{currentMoney}}
</td>
<td
height=
"26px"
></td>
<td
height=
"26px"
>
{{benMoney}}
</td>
</tr>
<tr>
<td
colspan=
"1"
>
{{$t('fnc.shouxufei')}}
<br/><span
class=
"_font_size12"
>
{{$t('fnc.khyuanbi')}}
</span></td>
<td
colspan=
"1"
class=
"_font_size12"
>
{{GetDetail.OriginalFee}}
</td>
<td
colspan=
"1"
>
{{$t('fnc.shouxufei')}}
<br/><span
class=
"_font_size12"
>
{{$t('fnc.khbweibi')}}
</span></td>
<td
colspan=
"2"
class=
"_font_size12"
>
{{GetDetail.Fee}}
</td>
</tr>
</table>
</div>
</template>
<
script
>
export
default
{
props
:[
"ID"
,
"width"
,
"color"
,
"isPrintPage"
,
"name"
,
"Num"
,
"OrderSource"
,
"titleName"
],
//接收参数 ID width color isPrintPage
data
(){
return
{
loading
:
false
,
EmployeeId
:
''
,
EndDate
:
''
,
StartDate
:
''
,
printTime
:
''
,
currentMoney
:
0
,
benMoney
:
0
,
GetDetail
:
{}
}
},
created
(){
let
date
=
new
Date
(),
y
=
date
.
getFullYear
(),
m
=
date
.
getMonth
()
<
10
?
"0"
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
,
d
=
date
.
getDate
()
<
10
?
"0"
+
date
.
getDate
()
:
date
.
getDate
(),
h
=
date
.
getHours
()
<
10
?
"0"
+
date
.
getHours
()
:
date
.
getHours
(),
min
=
date
.
getMinutes
()
<
10
?
"0"
+
date
.
getMinutes
()
:
date
.
getMinutes
(),
s
=
date
.
getSeconds
()
<
10
?
"0"
+
date
.
getSeconds
()
:
date
.
getSeconds
();
this
.
printTime
=
y
+
''
+
m
+
''
+
d
+
' '
+
h
+
':'
+
min
+
':'
+
s
;
},
methods
:{
copyRate
(
t
){
for
(
let
i
=
0
;
i
<
this
.
GetDetail
.
DetailList
.
length
;
i
++
)
{
if
(
this
.
GetDetail
.
DetailList
[
i
].
Rate
!=
t
){
this
.
GetDetail
.
DetailList
[
i
].
Rate
=
t
}
if
(
i
+
1
==
this
.
GetDetail
.
DetailList
.
length
){
this
.
calculation
()
}
}
},
addList
(
t
,
i
)
{
// 添加
t
.
Money
=
(
t
.
Rate
*
100
)
*
t
.
Money
t
.
Money
=
t
.
Money
/
100
this
.
calculation
()
},
calculation
(){
this
.
currentMoney
=
0
this
.
benMoney
=
0
this
.
GetDetail
.
DetailList
.
forEach
(
x
=>
{
x
.
UnitPrice
=
this
.
$commonUtils
.
addCommas
(
Math
.
round
(
x
.
UnitPrice
*
100
)
/
100
)
x
.
Money
=
(
x
.
Rate
*
100
)
*
x
.
OriginalMoney
x
.
Money
=
(
x
.
Money
/
100
).
toFixed
(
2
)
// x.Money = Math.round(x.Money * 100) / 100
x
.
OriginalMoney
=
Math
.
round
(
x
.
OriginalMoney
*
100
)
/
100
this
.
currentMoney
+=
parseFloat
(
x
.
OriginalMoney
);
this
.
benMoney
+=
parseFloat
(
x
.
Money
);
})
},
Financial_post_GetDetail
(
id
){
//获取单据详情
if
(
!
id
)
return
;
this
.
loading
=
true
;
this
.
apipost
(
'Financial_post_GetDetail'
,{
ID
:
id
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
data
=
res
.
data
.
data
;
let
numberC
=
0
;
let
price
=
0
;
let
rate
=
0
;
data
.
DetailList
.
forEach
(
x
=>
{
x
.
UnitPrice
=
this
.
$commonUtils
.
addCommas
(
Math
.
round
(
x
.
UnitPrice
*
100
)
/
100
);
x
.
Money
=
Math
.
round
(
x
.
Money
*
100
)
/
100
;
x
.
OriginalMoney
=
Math
.
round
(
x
.
OriginalMoney
*
100
)
/
100
;
this
.
currentMoney
+=
parseFloat
(
x
.
OriginalMoney
);
this
.
benMoney
+=
parseFloat
(
x
.
Money
);
})
this
.
currentMoney
=
Math
.
round
(
this
.
currentMoney
*
100
)
/
100
;
this
.
benMoney
=
Math
.
round
(
this
.
benMoney
*
100
)
/
100
;
let
m
=
data
.
PayMoney
?
data
.
PayMoney
:
data
.
Money
;
data
.
ChineseMoney
=
this
.
$commonUtils
.
changeMoneyToChinese
(
data
.
Money
);
data
.
ChinesePayMoney
=
this
.
$commonUtils
.
changeMoneyToChinese
(
data
.
PayMoney
)
data
.
PayMoney
=
this
.
$commonUtils
.
addCommas
(
Math
.
round
(
data
.
PayMoney
*
100
)
/
100
)
data
.
Money
=
this
.
$commonUtils
.
addCommas
(
Math
.
round
(
data
.
Money
*
100
)
/
100
);
data
.
AuditSteps
.
reverse
();
this
.
GetDetail
=
data
;
this
.
loading
=
false
this
.
$set
(
this
.
$data
,
"GetDetail"
,
data
);
}
},
err
=>
{})
},
},
mounted
(){
const
myDate
=
new
Date
();
let
yaer
=
myDate
.
getFullYear
();
//获取完整的年份(4位,1970-????)
let
month
=
myDate
.
getMonth
()
+
1
;
//获取当前月份(0-11,0代表1月)
let
dateS
=
myDate
.
getDate
();
//获取当前日(1-31)
this
.
StartDate
=
yaer
+
'-'
+
month
+
'-'
+
'01'
;
this
.
EndDate
=
yaer
+
'-'
+
month
+
'-'
+
dateS
;
let
userInfo
=
this
.
getLocalStorage
();
this
.
EmployeeId
=
userInfo
.
EmployeeId
;
this
.
Financial_post_GetDetail
(
this
.
ID
);
},
watch
:
{
// 监听参数变化
GetDetail
:
{
handler
:
function
(
val
,
oldVal
)
{
this
.
$emit
(
'getList'
,
val
)
},
deep
:
true
},
ID
:{
handler
:
function
(
val
,
oldVal
)
{
this
.
ID
=
val
this
.
Financial_post_GetDetail
(
this
.
ID
)
},
deep
:
true
},
num
:
{
handler
:
function
(
val
,
oldVal
)
{
},
deep
:
true
},
}
}
</
script
>
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