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
c928f62f
Commit
c928f62f
authored
Mar 08, 2024
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 收支合并结算
parent
b62e381c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
797 additions
and
483 deletions
+797
-483
index.vue
...ponents/FinancialModule/ConsolidationOfAccounts/index.vue
+791
-433
MergeBillModule.vue
...ts/FinancialModule/FinancialSubmodule/MergeBillModule.vue
+6
-50
No files found.
src/components/FinancialModule/ConsolidationOfAccounts/index.vue
View file @
c928f62f
...
...
@@ -5,8 +5,50 @@
/
deep
/
.page_fnDm
.el-range-editor.el-input__inner
{
width
:
100%
!important
;
}
</
style
>
<
style
>
._addChuNa_tit
{
color
:
gray
;
margin-bottom
:
10px
;}
._addChuNa_tit
span
{
color
:
#333333
}
.page_RecPayQuery
._addUpload_box
{
display
:
block
;
margin-top
:
20px
;
width
:
590px
;
}
.page_RecPayQuery
._addUpload_box
>
div
{
float
:
left
;
width
:
138px
;
height
:
92px
;
border
:
1px
dashed
rgba
(
210
,
210
,
210
,
1
);
border-radius
:
2px
;
cursor
:
pointer
;
padding
:
5px
;
margin
:
0
10px
10px
0
;
position
:
relative
;
}
.page_RecPayQuery
.el-upload-dragger
{
width
:
126px
!important
;
height
:
80px
!important
;
}
.page_RecPayQuery
._addUpload_box
.icon-guanbi1
{
font-size
:
12px
;
color
:
white
;
display
:
inline-block
;
margin-left
:
15px
;
position
:
absolute
;
right
:
-6px
;
top
:
-9px
;
background-color
:
#f56c6c
;
border-radius
:
50%
;
height
:
20px
;
width
:
20px
;
text-align
:
center
;
line-height
:
20px
;
}
.page_RecPayQuery
._addUpload_box
.icon-guanbi1
:hover
{
font-size
:
12px
;
color
:
#c94052
;
}
</
style
>
<
template
>
<div
class=
"page_fnDm page_RecPayQuery"
@
keyup
.
enter=
"resetPageIndex()"
>
...
...
@@ -32,7 +74,7 @@
</el-col>
<el-col
:span=
"4"
>
<el-form-item
label=
"公司:"
>
<el-select
filterable
v-model=
'msg.RB_Branch_Id'
@
change=
"getDepartmentMsg.RB_Branch_Id=msg.RB_Branch_Id,msg.RB_Depart_Id='',msg.UpdateBy='',getDepartment()"
class=
""
>
<el-select
filterable
v-model=
'msg.RB_Branch_Id'
class=
""
>
<el-option
:value=
"-1"
label=
"不限"
></el-option>
<el-option
v-for=
'item in CompanyList'
:label=
'item.BName'
...
...
@@ -65,7 +107,7 @@
<el-form-item
label=
"发团日期:"
>
<el-date-picker
class=
"h34"
v-model=
"missionDate"
@
change=
"timeAdd(
4
)"
@
change=
"timeAdd()"
type=
"daterange"
value-format=
"yyyy-MM-dd"
>
</el-date-picker>
...
...
@@ -83,7 +125,9 @@
</el-form-item>
</el-col>
</
template
>
<el-col
:span=
"12"
>
<span
style=
"margin-left: 20px; font-size: 12px;"
>
注:合并结算的单据需要币种一致,此处均验证原币金额
</span>
</el-col>
</el-row>
</el-form>
<ul
class=
"clearfix"
>
...
...
@@ -95,7 +139,7 @@
<el-button
:loading=
"loadingDC"
class=
"normalBtn"
@
click=
"method5()"
>
导出
</el-button>
<
!-- <button class="normalBtn" @click="GenerateDocuments()">生成财务单据</button> --
>
<
button
class=
"normalBtn"
@
click=
"GenerateDocuments()"
>
合并审核单据
</button
>
</li>
</ul>
</div>
...
...
@@ -109,10 +153,7 @@
v-for=
"(x,index) in multipleSelection"
:key=
"x.FrID"
@
close=
"handleClose([multipleSelection[index]])"
:type=
"x.Type==2?'danger':'success'"
>
{{
x
.
FrID
}}
/
<template
v-for=
"(y,i) in x.DetailList"
>
{{
y
.
CostTypeName
}}
:
{{
y
.
OriginalMoney
}}
{{
i
!=
(
x
.
DetailList
.
length
-
1
)?
','
:
''
}}
</
template
>
{{
x
.
FrID
}}
/
{{
x
.
DetailList
[
0
].
CostTypeName
}}
:
{{
x
.
WBMoney
}}
</el-tag>
</
template
>
<
template
v-else
>
...
...
@@ -140,7 +181,7 @@
</el-table-column>
<el-table-column
label=
"单号"
width=
"
12
0"
>
width=
"
8
0"
>
<
template
slot-scope=
"scope"
>
<span
style=
"cursor: pointer;color: #00C6FF;"
@
click=
"openDetails(scope.row.FrID)"
>
{{
scope
.
row
.
FrID
}}
</span>
...
...
@@ -148,7 +189,7 @@
</el-table-column>
<el-table-column
label=
"公司"
width=
"
12
0"
>
width=
"
8
0"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
BranchName
}}
</
template
>
...
...
@@ -156,7 +197,7 @@
<el-table-column
prop=
"name"
label=
"单据类型"
width=
"
12
0"
>
width=
"
8
0"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.Type==2"
style=
"display: inline-block;
padding: 2px 8px;
...
...
@@ -244,17 +285,41 @@
<el-table-column
prop=
""
label=
"费用类型"
show-overflow-tooltip
width=
"
20
0"
>
show-overflow-tooltip
width=
"
17
0"
>
<
template
slot-scope=
"scope"
>
<template
v-for=
"(s,si) in scope.row.CostTypeList"
>
<span
style=
"background-color: rgba(64,158,255,.1);display: inline-block;padding: 0 5px;height: 22px;line-height: 20px;font-size: 12px;color: #646464;border-radius: 4px;box-sizing: border-box;border: 1px solid rgba(64,158,255,.2);white-space: nowrap;margin-bottom: 4px;"
>
{{
s
}}
</span></br>
</
template
>
</template>
</el-table-column>
<el-table-column
prop=
""
label=
"交易方式"
show-overflow-tooltip
width=
"300"
>
<
template
slot-scope=
"scope"
>
<div>
<template
v-if=
"scope.row.TradeWayList&&scope.row.TradeWayList.length>0"
>
<div
class=
"_TradeWayList"
v-for=
"(tw,twIn) in scope.row.TradeWayList"
style=
"line-height: normal !important;padding: 5px 10px;background-color: #EEEEEE;border-radius: 4px;width:230px"
>
<p><span
style=
"font-weight: bold;color:#333333"
>
{{
tw
.
Alias
}}
</span><span
class=
"_bank_name"
style=
"height:20px;;display: inline-block;background-color: #333333;color: white;padding: 2px 4px;border-radius: 4px;margin-left:10px;"
>
{{
scope
.
row
.
TradeWayList
[
0
].
TypeName
}}
</span>
<span
style=
"height:20px;display: inline-block;background-color: #333333;color: white;padding: 2px 4px;border-radius: 4px;margin-left:10px;"
:style=
"
{'background-color':tw.AccountType=='私'?'#2AAEF2':'#FF9C01'}">
{{
tw
.
AccountType
==
""
?
'无'
:
tw
.
AccountType
}}
</span>
</p>
<p
style=
"color:#333333"
>
{{
tw
.
BankNo
}}
</p>
</div>
</
template
>
<
template
v-else
>
<div
class=
"_pad5"
>
-
</div>
</
template
>
</div>
</template>
</el-table-column>
<el-table-column
prop=
""
label=
"原币金额"
show-overflow-tooltip
width=
"1
5
0"
>
show-overflow-tooltip
width=
"1
0
0"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
WBMoney
}}
</
template
>
...
...
@@ -262,7 +327,7 @@
<el-table-column
prop=
""
label=
"原币币种"
show-overflow-tooltip
width=
"1
5
0"
>
show-overflow-tooltip
width=
"1
0
0"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
CurrencyName
}}
</
template
>
...
...
@@ -270,7 +335,7 @@
<el-table-column
prop=
""
label=
"本位币金额"
show-overflow-tooltip
width=
"1
5
0"
>
show-overflow-tooltip
width=
"1
0
0"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
Money
}}
</
template
>
...
...
@@ -288,8 +353,7 @@
label=
"制单人员"
show-overflow-tooltip
width=
"170"
>
<
template
slot-scope=
"scope"
>
<div>
{{
scope
.
row
.
EmName
}}
</div>
<div>
{{
scope
.
row
.
CreateDate
}}
</div>
<div>
{{
scope
.
row
.
EmName
}}
<br/>
{{
scope
.
row
.
CreateDate
}}
</div>
</
template
>
</el-table-column>
<el-table-column
...
...
@@ -302,27 +366,7 @@
<i
v-if=
"scope.row.Status==2"
class=
"iconfont icon-yiqueren"
style=
"color: #959595"
></i>
<i
v-if=
"scope.row.Status==3"
class=
"iconfont icon-shenhebohui"
style=
"color: #E95252"
></i>
<i
v-if=
"scope.row.Status==0"
class=
"iconfont icon-zancun"
style=
"color: #FF9C01"
></i>
<el-popover
popper-class=
"detailsIT_Journal"
width=
"250"
trigger=
"click"
>
<div
style=
"height: auto;max-height: 220px;background-color: #FFFFFF;"
>
<div
class=
"changLog"
>
<p
class=
"_log_t"
>
流程日志
</p>
<ul
style=
"padding-left: 20px;max-height: 180px;overflow: auto;"
v-if=
"GetFinancLogList"
v-loading=
'LogLoading'
>
<li
style=
"border-left: 1px solid #E9E9E9;position: relative;padding-bottom: 10px;padding-left: 20px;padding-top: 10px;"
v-for=
"(log,li) in GetFinancLogList"
>
<span
style=
"background-color: #47BF8C;width: 7px;height: 7px;border-radius: 50%;display: inline-block;position: absolute;left: -4px;top: 19px;"
></span>
<p>
<span
class=
"_color_blue"
>
{{
log
.
EmName
}}
</span>
<span
class=
"fr changLog_time"
>
{{
log
.
UpdateDate
}}
</span>
</p>
<p
class=
"_dtel"
>
{{
log
.
StartValue
}}
</p>
</li>
</ul>
<ul
v-else
>
<li>
暂无修改日志
</li>
</ul>
</div>
</div>
<span
slot=
"reference"
class=
"text_d _font_init"
@
click=
"Financial_post_GetFinancLogList(scope.row.FrID)"
>
{{
scope
.
row
.
StatusStr
}}
</span>
</el-popover>
<span
slot=
"reference"
class=
"text_d _font_init"
>
{{
scope
.
row
.
StatusStr
}}
</span>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -337,23 +381,205 @@
</el-pagination>
</div>
</div>
<
template
v-if=
"showDialog"
>
<selectListData
:multipleSelection=
"multipleSelection"
@
close=
"showDialog=false"
></selectListData>
<el-dialog
custom-class=
'w750 height="34px"'
:title=
"$t('fnc.a_hbdanju')"
:visible
.
sync=
"addChuNa"
center
:before-close=
"initAddChuNa"
v-loading=
"allLoading"
>
<p
class=
"_addChuNa_tit"
><span>
{{multipleSelection.length}}
</span>
{{$t('fnc.a_hbtips')}}
<span>
{{ getMoney() }}
</span>
{{$t('fnc.a_hbtips2')}}
<span>
{{ getMoney2() }}
</span>
</p>
<table
border=
"1"
bordercolor=
"#D2D2D2"
style=
"border-collapse:collapse;text-align: center; width: 100%;"
>
<
template
>
<tr
>
<th
height=
"34px"
>
{{
$t
(
'fnc.zhfenlei'
)
}}
</th>
<th
height=
"34px"
>
{{
$t
(
'fnc.fkfangshi'
)
}}
</th>
<th
height=
"34px"
>
{{
$t
(
'fnc.acc'
)
}}
</th>
<th
height=
"34px"
>
{{
$t
(
'fnc.jine'
)
}}
</th>
<th
height=
"34px"
width=
"70"
>
{{
$t
(
'hotel.hotel_Currency'
)
}}
</th>
<th
height=
"34px"
width=
"50px"
>
{{
$t
(
'hotel.hotel_CurrentRate'
)
}}
</th>
<th
height=
"34px"
width=
"100px"
>
{{
$t
(
'fnc.a_zongjine'
)
}}
</th>
</tr>
<template
v-for=
"(item,index) in payMsgList"
>
<tr
v-if=
"!item.show"
@
click=
"payMsgList[index].show=true"
>
<td
height=
"34px"
>
{{
item
.
AccName
}}
</td>
<td
height=
"34px"
>
{{
item
.
Name
}}
</td>
<td
height=
"34px"
>
{{
item
.
Account
}}
</td>
<td
height=
"34px"
>
{{
moneyFormat
(
item
.
OriginalMoney
)
}}
</td>
<td
height=
"34px"
>
{{
item
.
CurrenName
}}
</td>
<td
height=
"34px"
>
{{
item
.
Rate
}}
</td>
<td
height=
"34px"
>
{{
moneyFormat
(
item
.
allMoney
)
}}
</td>
</tr>
<tr
v-else
class=
"_show_class"
>
<td>
<el-select
filterable
v-model=
'item.AccName'
@
change=
"clearAccBank()"
class=
" _border_b_1"
>
<el-option
v-for=
'i in AccListT'
:label=
'i.Name'
:value=
'i.Name'
:key=
'i.ID'
>
</el-option>
</el-select>
</td>
<td>
<el-select
filterable
v-model=
'item.Type'
@
change=
"getAccountList(item.Type)"
class=
" _border_b_1"
>
<el-option
v-for=
'i in GetAccountType'
:label=
'i.Name'
:value=
'i.ID'
:key=
'i.ID'
>
</el-option>
</el-select>
</td>
<td>
<el-select
filterable
v-model=
'item.AccountId'
:placeholder=
"$t('rule.qxzzhanghu')"
@
change=
"setAccountName(item.AccountId,1,index)"
class=
" _border_b_1"
>
<el-option
v-for=
'i in accountList'
:label=
'i.allName'
:value=
'i.ID'
:key=
'i.ID'
>
</el-option>
</el-select>
</td>
<td>
<el-input
v-model=
"item.OriginalMoney"
@
change=
"Calculation(1,index)"
@
blur=
"item.show=false,CalculationMoney()"
:placeholder=
"$t('rule.qsrjine')"
type=
"number"
class=
" _border_b_1"
></el-input>
</td>
<td>
<p>
{{
item
.
CurrenName
}}
</p>
</td>
<td>
<el-input
v-model=
"item.Rate"
@
blur=
"item.show=false,CalculationMoney()"
@
change=
"Calculation(1,index)"
type=
"number"
class=
" _border_b_1"
></el-input>
</td>
<td>
{{
moneyFormat
(
item
.
allMoney
)
}}
<i
@
click=
"deleteRow(item,index),CalculationMoney()"
class=
"_delete_row iconfont icon-img_delete_small"
></i></td>
</tr>
</
template
>
<tr>
<td>
<el-select
filterable
v-model=
'payMsg.AccName'
@
change=
"clearAccBank(),addList()"
class=
" _border_b_1"
>
<el-option
v-for=
'i in AccListT'
:label=
'i.Name'
:value=
'i.Name'
:key=
'i.ID'
>
</el-option>
</el-select>
</td>
<td>
<el-select
filterable
v-model=
'payMsg.Type'
@
change=
"getAccountList(payMsg.Type),addList()"
class=
" _border_b_1"
>
<el-option
v-for=
'i in GetAccountType'
:label=
'i.Name'
:value=
'i.ID'
:key=
'i.ID'
>
</el-option>
</el-select>
</td>
<td>
<el-select
filterable
v-model=
'payMsg.AccountId'
:placeholder=
"$t('rule.qxzzhanghu')"
@
change=
"setAccountName(payMsg.AccountId,2),addList()"
class=
" _border_b_1"
>
<el-option
v-for=
'i in accountList'
:label=
'i.allName'
:value=
'i.ID'
:key=
'i.ID'
>
</el-option>
</el-select>
</td>
<td>
<el-input
v-model=
"payMsg.OriginalMoney"
@
change=
"Calculation(2)"
@
blur=
"addList()"
:placeholder=
"$t('rule.qsrjine')"
type=
"number"
class=
" _border_b_1"
></el-input>
</td>
<td>
<p>
{{payMsg.CurrenName}}
</p>
</td>
<td>
<el-input
v-model=
"payMsg.Rate"
@
blur=
"addList()"
@
change=
"Calculation(2)"
type=
"number"
class=
" _border_b_1"
></el-input>
</td>
<td>
{{moneyFormat(payMsg.allMoney)}}
</td>
</tr>
</template>
<tr>
<td
height=
"34px"
>
{{$t('fnc.a_zongjine')}}
</td>
<td
height=
"34px"
colspan=
"7"
>
<el-input
v-model=
"listAllMoney"
type=
"number"
:placeholder=
"$t('rule.qsrzjine')"
class=
" _border_b_1"
></el-input>
<!--{{moneyFormat(listAllMoney)}}-->
</td>
</tr>
<tr
v-if=
"BillType===2"
>
<td>
{{$t('fnc.jiaoyiriqi')}}
</td>
<td
colspan=
"6"
>
<el-date-picker
class=
"width100b"
v-model=
"addMsg.TradeDate"
type=
"date"
value-format=
"yyyy-MM-dd"
:placeholder=
"$t('admin.admin_choDate')"
>
</el-date-picker>
</td>
</tr>
<tr
v-if=
"BillType===1"
>
<td>
{{$t('fnc.huikuanren')}}
</td>
<td
colspan=
"2"
>
<el-input
v-model=
"addMsg.RemitterName"
type=
"text"
class=
" _border_b_1"
></el-input>
</td>
<td>
{{$t('fnc.jiaoyiriqi')}}
</td>
<td
colspan=
"3"
>
<el-date-picker
class=
"width100b"
v-model=
"addMsg.TradeDate"
type=
"date"
value-format=
"yyyy-MM-dd"
:placeholder=
"$t('admin.admin_choDate')"
>
</el-date-picker>
</td>
</tr>
</table>
<el-form
label-width=
"110px"
>
<el-row>
<el-col
:span=
"12"
:gutter=
"35"
>
<el-form-item
label=
"上传凭证"
>
<div
class=
"_addUpload_box clearfix"
>
<
template
v-for=
"(file,fIndex) in saveMsg"
>
<div
v-if=
"file.Type==3"
>
<div
style=
"width:100%;height:100%;overflow: hidden;"
>
<img
style=
"width: 100%; height: 100%;"
:src=
"file.Url?file.Url:file.Content"
@
click=
"showUpLoadFile(file)"
>
</div>
<span
class=
"iconfont icon-guanbi1"
@
click=
"deleteUploadFile(fIndex)"
></span>
</div>
<div
v-if=
"file.Type==1"
>
<div
class=
"iconfont "
:class=
"file.Content.substring(file.Content.lastIndexOf('.')+1,file.Content.length).toUpperCase()=='PDF'? 'icon-pdf' : 'icon-excel'"
@
click=
"showUpLoadFile(file)"
>
</div>
<span
class=
"iconfont icon-guanbi1"
@
click=
"deleteUploadFile(fIndex)"
></span>
</div>
<div
v-if=
"file.Type==2"
>
<div
class=
"iconfont icon-excel"
@
click=
"showUpLoadFile(file)"
>
</div>
<span
class=
"iconfont icon-guanbi1"
@
click=
"deleteUploadFile(fIndex)"
></span>
</div>
</
template
>
<div
class=
"_pic_upload"
>
<el-upload
drag
:http-request=
"uploadFileBtn"
:multiple=
"true"
:show-file-list=
"false"
action=
""
>
<i
class=
"el-icon-plus avatar-uploader-icon"
></i>
<div
class=
"el-upload__text"
>
{{$t('active.ld_djscwj')}}
</div>
</el-upload>
</div>
</div>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<button
class=
"normalBtn"
type=
"primary"
@
click=
"submitAddChuNa"
>
{{$t('pub.saveBtn')}}
</button>
<button
class=
"hollowFixedBtn"
@
click=
"initAddChuNa"
>
{{$t('pub.cancelBtn')}}
</button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
Vue
from
'vue'
import
selectListData
from
"./components/selectListData"
;
export
default
{
components
:{
selectListData
},
data
(){
return
{
showDialog
:
false
,
addChuNa
:
false
,
allLoading
:
false
,
multipleSelection
:
[],
SelectNormalList
:[
{
Name
:
'不限'
,
Id
:
'0'
},
...
...
@@ -385,48 +611,60 @@
RB_Group_Id
:
'0'
,
Status
:
'0'
,
},
getDepartmentMsg
:{
// 部门
RB_Group_Id
:
''
,
RB_Branch_Id
:
''
,
Status
:
0
,
ParentId
:
-
1
,
Tier
:
0
,
},
employeeMsg
:{
// 员工
GroupId
:
''
,
BranchId
:
-
1
,
DepartmentId
:
0
,
PostId
:
0
,
IsLeave
:
0
,
},
DataList
:[],
GetFinancLogList
:[],
StatusList
:[],
ClientAccountList
:[],
ClientTypeList
:[],
accountList
:[],
BranchAccountList
:[],
DepartmentList
:[],
EmployeeList
:[],
ConditionList
:[],
CompanyList
:[],
productionDate
:[],
transactionDate
:[],
missionDate
:[],
currencyTypeList
:[],
GetCostTypeList
:[],
TemplateGetList
:[],
AccList
:[],
dateStart
:
''
,
dateEnd
:
''
,
GetAccountType
:[],
loading
:
false
,
LogLoading
:
false
,
currentPage
:
1
,
total
:
0
,
ChineseStr
:
''
,
DepartIDs
:
''
,
heightQueryBox
:
false
,
loadingDC
:
false
,
BillType
:
1
,
//1 收 2 支 ,
payMsgList
:[],
payMsg
:
{
ID
:
0
,
FinanceId
:
''
,
Type
:
''
,
AccountId
:
''
,
OriginalMoney
:
0
,
CurrencyId
:
''
,
Rate
:
0
,
Fee
:
0
,
Name
:
''
,
CurrenName
:
''
,
Account
:
''
,
balance
:
''
,
allMoney
:
0
,
show
:
false
,
},
addMsg
:{
FrIDs
:
''
,
RemitterName
:
''
,
TradeDate
:
''
,
BankList
:[],
vorcherInos
:[]
},
AccListT
:[],
accountListT
:[],
listAllMoney
:
0
,
checkList
:[],
count
:
0
,
allBPrice
:
0
,
allWPrice
:
0
,
userInfo
:{},
//是否全选
isCheckAll
:
false
,
//是否显示全选框
isShowCheckAll
:
false
,
picIsShow
:
false
,
picObj
:[],
imgList
:[],
//上传数组
saveMsg
:[],
TradeDate
:
''
,
initialIndex
:
0
,
}
},
created
(){
...
...
@@ -439,51 +677,15 @@
if
(
this
.
$route
.
query
.
Type
){
this
.
msg
.
Type
=
this
.
$route
.
query
.
Type
+
''
;
}
if
(
this
.
$route
.
query
.
rec
){
this
.
msg
.
AccountType
=
15
;
this
.
msg
.
TradeWay
=
4
;
this
.
getAccountList
(
this
.
msg
.
AccountType
,
this
.
msg
.
TradeWay
)
this
.
msg
.
BankID
=
this
.
$route
.
query
.
BankID
;
this
.
transactionDate
[
0
]
=
this
.
$route
.
query
.
StartDate
;
this
.
transactionDate
[
1
]
=
this
.
$route
.
query
.
StartDate
;
this
.
msg
.
sTradeDate
=
this
.
$route
.
query
.
StartDate
;
this
.
msg
.
eTradeDate
=
this
.
$route
.
query
.
StartDate
;
if
(
this
.
$route
.
query
.
BankID
==
''
){
// 费用类型:机票折让费
this
.
msg
.
CostTypeID
=
197
;
}
}
if
(
this
.
$route
.
query
.
air
){
this
.
msg
.
AccountType
=
17
;
this
.
msg
.
TradeWay
=
4
;
this
.
getAccountList
(
this
.
msg
.
AccountType
,
this
.
msg
.
TradeWay
)
this
.
msg
.
BankID
=
20
;
this
.
transactionDate
[
0
]
=
this
.
$route
.
query
.
StartDate
;
this
.
transactionDate
[
1
]
=
this
.
$route
.
query
.
StartDate
;
}
},
mounted
(){
let
userInfo
=
this
.
getLocalStorage
();
this
.
getCompanyMsg
.
RB_Group_Id
=
this
.
employeeMsg
.
GroupId
=
this
.
getDepartmentMsg
.
RB_Group_Id
=
userInfo
.
RB_Group_id
;
//集团ID
this
.
DepartIDs
=
userInfo
.
RB_Department_Id
;
this
.
getCompanyMsg
.
RB_Group_Id
=
userInfo
.
RB_Group_id
;
//集团ID
this
.
msg
.
EmployeeId
=
userInfo
.
EmployeeId
;
this
.
msg
.
FrID
=
this
.
$route
.
query
.
FrID
?
this
.
$route
.
query
.
FrID
:
0
this
.
financeinfo_post_GetClientAccountList
()
this
.
financeinfo_post_GetList
();
this
.
financeinfo_post_GetCostTypeList
();
this
.
FinancialFlowTemplate_post_GetList
();
this
.
msg
.
FrID
=
this
.
$route
.
query
.
FrID
?
this
.
$route
.
query
.
FrID
:
0
;
this
.
getCompanyList
();
this
.
Financial_post_GetConditionList
();
this
.
getEmployee
();
this
.
getDepartment
();
this
.
Financial_post_GetBranchAccountList
();
this
.
financeinfo_post_GetClientTypeList
();
this
.
FinancialFlowTemplate_post_GetStatusList
();
// this.getPageList();
this
.
BankAccount_post_GetAccountType
();
this
.
AccountType_post_GetList
();
var
that
=
this
;
},
methods
:{
handleClose
(
rows
){
...
...
@@ -515,9 +717,6 @@
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
;
},
// 数据筛选
filterMethod
(
filters
){
},
handleSizeChange
(
val
)
{
this
.
msg
.
pageSize
=
val
this
.
msg
.
pageIndex
=
1
;
...
...
@@ -527,15 +726,6 @@
this
.
msg
.
pageIndex
=
val
;
this
.
getPageList
();
},
AccountType_post_GetList
(){
//获取账户类型下拉
this
.
apipost
(
'AccountType_post_GetList'
,
this
.
queryAccMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
AccList
=
res
.
data
.
data
;
}
else
{
this
.
$message
.
error
(
res
.
data
.
message
);
}
},
err
=>
{})
},
getPageList
(){
// 获取列表数据
if
(
this
.
msg
.
RB_Branch_Id
===
''
)
this
.
msg
.
RB_Branch_Id
=-
1
;
if
(
!
this
.
msg
.
TCID
)
this
.
msg
.
TCID
=
0
;
...
...
@@ -590,182 +780,6 @@
this
.
GetLocalFile
(
"Financial_post_DownloadReimbursement"
,
this
.
msg
,
fileName
,
x
=>
{
this
.
loadingDC
=
false
});
}
,
financeRemove
(
id
){
//作废
this
.
$confirm
(
'是否对申请单进行作废操作?作废后不可恢复!'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
deletFinance
(
id
)
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消'
});
});
},
deletFinance
(
id
){
this
.
apipost
(
'Financial_post_Cancel'
,{
ID
:
id
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
$message
.
success
(
res
.
data
.
message
)
}
else
{
this
.
$message
.
error
(
res
.
data
.
message
)
}
this
.
getPageList
();
},
err
=>
{})
},
Financial_post_GetFinancLogList
(
id
){
// 获取单据日志
this
.
LogLoading
=
true
;
this
.
apipost
(
'Financial_post_GetFinancLogList'
,{
ID
:
id
,
Type
:
2
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
data
=
res
.
data
.
data
;
data
.
forEach
(
x
=>
{
x
.
UpdateDate
=
this
.
$commonUtils
.
formatMsgTime
(
x
.
UpdateDate
)
})
this
.
LogLoading
=
false
;
this
.
GetFinancLogList
=
data
;
}
},
err
=>
{})
},
mathMoney
(
n
){
// 数字转中文大写 1
this
.
ChineseStr
=
this
.
$commonUtils
.
changeMoneyToChinese
(
n
)
},
FinancialFlowTemplate_post_GetStatusList
(){
// 获取审核状态枚举
this
.
apipost
(
'FinancialFlowTemplate_post_GetStatusList'
,{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
StatusList
=
res
.
data
.
data
;
}
},
err
=>
{})
},
financeinfo_post_GetClientTypeList
(){
// 获取对象类型
this
.
apipost
(
'financeinfo_post_GetClientTypeList'
,{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
ClientTypeList
=
res
.
data
.
data
;
}
},
err
=>
{})
},
financeinfo_post_GetClientAccountList
(
t
){
// 获取对象类型
let
msg
=
{
// Type:t,
// ObjID:0,
// CardNum:''
ID
:
0
,
Type
:
0
,
ObjID
:
0
,
CardNum
:
''
}
this
.
apipost
(
'financeinfo_post_GetClientAccountList'
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
data
=
res
.
data
.
data
;
this
.
ClientAccountList
=
data
}
},
err
=>
{})
},
getAccountList
(
i
,
t
){
//收款账户
let
accountList
=
[];
if
(
t
==
1
){
// 银行
this
.
apipost
(
'bankaccount_post_GetList'
,{
TypeId
:
i
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
data
=
res
.
data
.
data
;
data
.
forEach
(
x
=>
{
let
obj
=
{
ID
:
x
.
ID
,
Name
:
x
.
Alias
,
Nom
:
0
,
}
accountList
.
push
(
obj
)
})
this
.
accountList
=
accountList
;
}
},
err
=>
{})
}
if
(
t
==
2
){
//平台账户
let
msg
=
{
BackId
:
0
,
TypeId
:
i
,
BranchId
:
-
1
,
Alias
:
''
}
this
.
apipost
(
'BankAccount_post_GetPlatformList'
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
data
=
res
.
data
.
data
;
data
.
forEach
(
x
=>
{
let
obj
=
{
ID
:
x
.
ID
,
Name
:
x
.
Alias
,
Nom
:
x
.
PlatformNo
}
accountList
.
push
(
obj
)
})
this
.
accountList
=
accountList
;
}
},
err
=>
{})
}
if
(
t
==
3
){
//现金账户
let
msg
=
{
TypeId
:
i
,
BranchId
:
-
1
,
Alias
:
''
}
this
.
apipost
(
'BankAccount_post_GetCashAccountList'
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
data
=
res
.
data
.
data
;
data
.
forEach
(
x
=>
{
let
obj
=
{
ID
:
x
.
ID
,
Name
:
x
.
Alias
,
Nom
:
0
}
accountList
.
push
(
obj
)
})
this
.
accountList
=
accountList
}
},
err
=>
{})
}
if
(
t
==
4
){
//资金池账户
let
msg
=
{
TypeId
:
i
,
BranchId
:
-
1
,
Alias
:
''
}
this
.
apipost
(
'BankAccount_post_GetCashPoolList'
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
data
=
res
.
data
.
data
;
data
.
forEach
(
x
=>
{
let
obj
=
{
ID
:
x
.
ID
,
Name
:
x
.
Alias
,
Nom
:
0
}
accountList
.
push
(
obj
)
})
this
.
accountList
=
accountList
}
},
err
=>
{})
}
},
Financial_post_GetBranchAccountList
(){
//获取交易方式列表
this
.
apipost
(
'Financial_post_GetBranchAccountList'
,{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
BranchAccountList
=
res
.
data
.
data
;
}
},
err
=>
{})
},
getDepartment
(){
//部门
this
.
apipost
(
'admin_get_DepartmentGetList'
,
this
.
getDepartmentMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
DepartmentList
=
res
.
data
.
data
;
}
},
err
=>
{})
},
getEmployee
()
{
//员工
this
.
apipost
(
'admin_get_EmployeeGetList'
,
this
.
employeeMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
EmployeeList
=
res
.
data
.
data
;
}
},
err
=>
{})
},
getCompanyList
(){
//获取公司列表
this
.
apipost
(
'admin_get_BranchGetList'
,
this
.
getCompanyMsg
,
res
=>
{
...
...
@@ -774,58 +788,15 @@
}
else
{}
},
err
=>
{})
},
Financial_post_GetConditionList
(){
//获取财务单据枚举列表
this
.
apipost
(
'Financial_post_GetConditionList'
,{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
ConditionList
=
res
.
data
.
data
;
}
else
{}
},
err
=>
{})
},
financeinfo_post_GetList
(){
// 币种类型
this
.
apipost
(
'financeinfo_post_GetList'
,{
Name
:
''
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
currencyTypeList
=
res
.
data
.
data
;
}
else
{
}
},
err
=>
{})
},
financeinfo_post_GetCostTypeList
(){
// 费用类型
this
.
apipost
(
'financeinfo_post_GetCostTypeList'
,{
Name
:
''
,
type
:
0
,
DepartIDs
:
this
.
DepartIDs
,
IsBalanceOfTheQuery
:
1
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
GetCostTypeList
=
res
.
data
.
data
;
}
else
{
}
},
err
=>
{})
},
FinancialFlowTemplate_post_GetList
(){
// 单据类型
this
.
apipost
(
'Financial_post_GetList'
,{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
TemplateGetList
=
res
.
data
.
data
;
}
else
{
}
},
err
=>
{})
},
timeAdd
(
t
){
// 日期格式
if
(
t
==
1
){
//制单日期
if
(
!
this
.
productionDate
){
this
.
msg
.
sDate
=
''
;
this
.
msg
.
eDate
=
''
;
return
}
this
.
msg
.
sDate
=
this
.
productionDate
[
0
];
this
.
msg
.
eDate
=
this
.
productionDate
[
1
];
}
if
(
t
==
4
){
//发团日期
timeAdd
(){
// 日期格式
//发团日期
if
(
!
this
.
missionDate
){
this
.
dateStart
=
''
;
this
.
dateEnd
=
''
;
this
.
msg
.
QStartDate
=
''
;
this
.
msg
.
QEndDate
=
''
;
return
}
this
.
msg
.
QStartDate
=
this
.
missionDate
[
0
];
this
.
msg
.
QEndDate
=
this
.
missionDate
[
1
];
}
},
queryInfoInit
(){
// 初始化msg
let
msg
=
{
...
...
@@ -863,10 +834,6 @@
}
this
.
msg
=
msg
;
},
handleCurrentChange
(
val
)
{
//翻页
this
.
msg
.
pageIndex
=
val
;
this
.
getPageList
();
},
resetPageIndex
(){
// 重置页码
this
.
msg
.
pageIndex
=
1
;
this
.
currentPage
=
1
;
...
...
@@ -874,15 +841,65 @@
this
.
getPageList
()
},
getMoney
(){
let
Money
=
0
let
Money
=
0
;
let
IsIncome
=
false
;
let
IsExpend
=
false
;
this
.
multipleSelection
.
forEach
(
x
=>
{
if
(
x
.
Type
==
1
){
IsIncome
=
true
;
}
else
if
(
x
.
Type
==
2
){
IsExpend
=
true
;
}
})
if
(
IsIncome
==
true
&&
IsExpend
==
true
){
//收支合并结算
this
.
multipleSelection
.
forEach
(
x
=>
{
x
.
DetailList
.
forEach
(
y
=>
{
//if(y.CostTypeId!=114){
if
(
x
.
Type
==
1
){
Money
-=
(
y
.
OriginalMoney
*
100
)
}
else
{
Money
+=
(
y
.
OriginalMoney
*
100
)
//
}
}
})
})
}
else
{
this
.
multipleSelection
.
forEach
(
x
=>
{
x
.
DetailList
.
forEach
(
y
=>
{
Money
+=
(
y
.
OriginalMoney
*
100
)
})
})
}
return
Money
/
100
},
getMoney2
(){
let
Money
=
0
;
let
IsIncome
=
false
;
let
IsExpend
=
false
;
this
.
multipleSelection
.
forEach
(
x
=>
{
if
(
x
.
Type
==
1
){
IsIncome
=
true
;
}
else
if
(
x
.
Type
==
2
){
IsExpend
=
true
;
}
})
if
(
IsIncome
==
true
&&
IsExpend
==
true
){
//收支合并结算
this
.
multipleSelection
.
forEach
(
x
=>
{
x
.
DetailList
.
forEach
(
y
=>
{
if
(
x
.
Type
==
1
){
Money
-=
(
y
.
Money
*
100
)
}
else
{
Money
+=
(
y
.
Money
*
100
)
}
})
})
}
else
{
this
.
multipleSelection
.
forEach
(
x
=>
{
x
.
DetailList
.
forEach
(
y
=>
{
Money
+=
(
y
.
Money
*
100
)
})
})
}
return
Money
/
100
},
GenerateDocuments
(){
...
...
@@ -890,37 +907,378 @@
this
.
Error
(
'请选择需要制单的数据'
);
return
;
}
this
.
showDialog
=
true
this
.
BillType
=
1
;
let
IsIncome
=
false
;
let
IsExpend
=
false
;
this
.
multipleSelection
.
forEach
(
x
=>
{
if
(
x
.
Type
==
1
){
IsIncome
=
true
;
}
else
if
(
x
.
Type
==
2
){
IsExpend
=
true
;
}
})
if
(
IsIncome
==
false
&&
IsExpend
==
true
){
this
.
BillType
=
2
;
}
if
(
IsIncome
==
true
&&
IsExpend
==
true
){
this
.
BillType
=
2
;
}
this
.
addChuNa
=
true
;
},
initAddChuNa
(){
this
.
payMsgList
=
[];
this
.
saveMsg
=
[];
this
.
listAllMoney
=
0
;
this
.
huikuanren
=
''
;
this
.
TradeDate
=
''
;
this
.
addChuNa
=
false
;
this
.
payMsg
=
{
ID
:
0
,
FinanceId
:
''
,
Type
:
''
,
AccountId
:
''
,
OriginalMoney
:
0
,
CurrencyId
:
''
,
Rate
:
0
,
Fee
:
0
,
Name
:
''
,
CurrenName
:
''
,
Account
:
''
,
balance
:
''
,
allMoney
:
0
,
show
:
false
,
};
this
.
addMsg
=
{
FrIDs
:
''
,
RemitterName
:
''
,
TradeDate
:
''
,
BankList
:[],
}
},
clearAccBank
(){
// 选择账户类型清空数据
this
.
payMsg
.
Type
=
''
;
this
.
payMsg
.
AccountId
=
''
;
},
addList
(){
if
(
this
.
payMsg
.
AccountId
===
''
)
return
;
if
(
this
.
payMsg
.
OriginalMoney
===
0
||
this
.
payMsg
.
OriginalMoney
===
''
)
return
;
if
(
this
.
payMsg
.
AccountId
===
''
)
return
;
this
.
payMsgList
.
push
(
this
.
payMsg
);
this
.
payMsg
=
{
ID
:
0
,
FinanceId
:
''
,
Type
:
''
,
AccountId
:
''
,
OriginalMoney
:
0
,
CurrencyId
:
''
,
Rate
:
0
,
Fee
:
0
,
Name
:
''
,
CurrenName
:
''
,
Account
:
''
,
balance
:
''
,
allMoney
:
0
,
show
:
false
,
};
this
.
CalculationMoney
();
},
CalculationMoney
(){
this
.
listAllMoney
=
0
;
this
.
payMsgList
.
forEach
(
x
=>
{
// this.listAllMoney = this.listAllMoney + x.allMoney
this
.
listAllMoney
+=
x
.
allMoney
})
},
BankAccount_post_GetAccountType
(){
//获取账户类型列表
this
.
apipost
(
'BankAccount_post_GetAccountType'
,{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
GetAccountType
=
res
.
data
.
data
;
}
},
err
=>
{})
},
getAccountList
(
i
){
this
.
payMsg
.
AccountId
=
''
;
this
.
GetAccountType
.
forEach
(
x
=>
{
if
(
x
.
ID
===
i
){
this
.
payMsg
.
Name
=
x
.
Name
;
}
});
if
(
i
===
1
){
this
.
bankaccount_post_GetListS
()
}
if
(
i
===
2
){
this
.
BankAccount_post_GetPlatformList
()
}
if
(
i
===
3
){
this
.
BankAccount_post_GetCashAccountList
()
}
if
(
i
===
4
){
this
.
BankAccount_post_GetCashPoolList
()
}
},
BankAccount_post_GetPlatformList
(){
//获取平台账户
let
msg
=
{
BackId
:
0
,
TypeId
:
0
,
BranchId
:
-
1
,
Alias
:
''
};
this
.
apipost
(
'BankAccount_post_GetPlatformList'
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
let
data
=
res
.
data
.
data
;
data
.
forEach
(
x
=>
{
x
.
allName
=
x
.
Alias
+
' '
+
x
.
PlatformNo
;
});
this
.
accountList
=
data
;
}
},
err
=>
{})
},
BankAccount_post_GetCashAccountList
(){
// 获取现金账户
let
msg
=
{
TypeId
:
0
,
BranchId
:
-
1
,
Alias
:
''
};
this
.
apipost
(
'BankAccount_post_GetCashAccountList'
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
let
data
=
res
.
data
.
data
;
data
.
forEach
(
x
=>
{
x
.
allName
=
x
.
Alias
;
});
this
.
accountList
=
data
;
}
},
err
=>
{})
},
bankaccount_post_GetListS
(
query
){
// 获取银行账户
this
.
apipost
(
'bankaccount_post_GetList'
,{},
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
let
data
=
res
.
data
.
data
;
data
.
forEach
(
x
=>
{
x
.
allName
=
x
.
Alias
+
' '
+
x
.
BackNo
;
});
this
.
accountList
=
data
;
if
(
query
)
{
this
.
AccountId
=
parseInt
(
this
.
$route
.
query
.
BankID
);
}
}
},
err
=>
{})
},
BankAccount_post_GetCashPoolList
(){
// 获取资金池账
this
.
apipost
(
'BankAccount_post_GetCashPoolList'
,{
TypeId
:
2
,
BranchId
:
-
1
,
Alias
:
''
},
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
let
data
=
res
.
data
.
data
;
data
.
forEach
(
x
=>
{
x
.
allName
=
x
.
Alias
;
});
this
.
accountList
=
data
;
}
},
err
=>
{})
},
setAccountName
(
i
,
type
,
index
){
if
(
type
===
2
){
this
.
accountList
.
forEach
(
x
=>
{
if
(
x
.
ID
===
i
){
this
.
payMsg
.
Account
=
x
.
allName
;
this
.
payMsg
.
CurrenName
=
x
.
CurrencyName
;
this
.
payMsg
.
Rate
=
x
.
CurrencyRate
?
x
.
CurrencyRate
:
x
.
CurrentRate
;
this
.
payMsg
.
CurrencyId
=
x
.
CurrencyId
;
this
.
payMsg
.
balance
=
x
.
Initialbalance
;
}
})
this
.
addList
()
}
else
{
this
.
accountList
.
forEach
(
x
=>
{
if
(
x
.
ID
===
i
){
this
.
payMsgList
[
index
].
Account
=
x
.
allName
;
this
.
payMsgList
[
index
].
CurrenName
=
x
.
CurrencyName
;
this
.
payMsgList
[
index
].
Rate
=
x
.
CurrencyRate
?
x
.
CurrencyRate
:
x
.
CurrentRate
;
this
.
payMsgList
[
index
].
CurrencyId
=
x
.
CurrencyId
;
this
.
payMsgList
[
index
].
balance
=
x
.
Initialbalance
;
}
})
this
.
addList
()
}
},
Calculation
(
i
,
index
){
// 计算价格
if
(
i
===
1
){
this
.
payMsgList
[
index
].
Fee
=
isNaN
(
parseFloat
(
this
.
payMsgList
[
index
].
Fee
))?
0
:
parseFloat
(
this
.
payMsgList
[
index
].
Fee
);
this
.
payMsgList
[
index
].
Rate
=
isNaN
(
parseFloat
(
this
.
payMsgList
[
index
].
Rate
))?
0
:
parseFloat
(
this
.
payMsgList
[
index
].
Rate
);
this
.
payMsgList
[
index
].
OriginalMoney
=
isNaN
(
parseFloat
(
this
.
payMsgList
[
index
].
OriginalMoney
))?
0
:
parseFloat
(
this
.
payMsgList
[
index
].
OriginalMoney
);
let
fee
=
this
.
payMsgList
[
index
].
Fee
,
Rate
=
this
.
payMsgList
[
index
].
Rate
===
0
?
1
:
this
.
payMsgList
[
index
].
Rate
,
Money
=
this
.
payMsgList
[
index
].
OriginalMoney
;
this
.
payMsgList
[
index
].
allMoney
=
(
Money
*
Rate
)
+
fee
;
}
else
{
this
.
payMsg
.
Fee
=
isNaN
(
parseFloat
(
this
.
payMsg
.
Fee
))?
0
:
parseFloat
(
this
.
payMsg
.
Fee
);
this
.
payMsg
.
Rate
=
isNaN
(
parseFloat
(
this
.
payMsg
.
Rate
))?
0
:
parseFloat
(
this
.
payMsg
.
Rate
);
this
.
payMsg
.
OriginalMoney
=
isNaN
(
parseFloat
(
this
.
payMsg
.
OriginalMoney
))?
0
:
parseFloat
(
this
.
payMsg
.
OriginalMoney
);
let
fee
=
this
.
payMsg
.
Fee
,
Rate
=
this
.
payMsg
.
Rate
===
0
?
1
:
this
.
payMsg
.
Rate
,
Money
=
this
.
payMsg
.
OriginalMoney
;
this
.
payMsg
.
allMoney
=
(
Money
*
Rate
)
+
fee
;
}
},
deleteRow
(
obj
,
index
){
obj
.
show
=
false
;
this
.
payMsgList
.
splice
(
index
,
1
);
this
.
$forceUpdate
();
},
showUpLoadFile
(
i
){
// 预览上传文件
if
(
i
.
Type
==
3
){
this
.
picObj
.
push
(
i
.
Url
);
this
.
imgList
.
push
(
i
.
Url
);
this
.
picIsShow
=
false
;
// this.hideFlashMan = true;
}
else
{
if
(
i
.
Content
.
substring
(
i
.
Content
.
lastIndexOf
(
'.'
)
+
1
,
i
.
Content
.
length
).
toUpperCase
()
==
'PDF'
){
this
.
previewPDF
(
i
.
Url
)
}
else
{
window
.
open
(
"https://view.officeapps.live.com/op/view.aspx?src="
+
i
.
Url
)
}
}
},
deleteUploadFile
(
i
){
// 删除上传文件
this
.
saveMsg
.
splice
(
i
,
1
);
this
.
addMsg
.
vorcherInos
=
this
.
saveMsg
;
},
uploadFileBtn
(
file
)
{
//上传
if
(
file
.
file
.
size
>
1024
*
1024
*
10
)
{
this
.
Error
(
'文件大小不能超过10M!'
)
return
let
ids
ids
=
this
.
multipleSelection
.
map
(
x
=>
{
return
x
.
FrID
})
let
orderObj
=
{
CostType
:
1547
,
OtherType
:
75
,
Money
:
this
.
getMoney
(),
isVerifyMoney
:
true
,
ReFinanceIds
:
ids
.
join
(
','
),
//单号
ReFinanceId2
:
3
,
//成本
}
// 1 文档 2 数据 3 图片
let
typeArr
=
[
{
stringArr
:
'GIF|JPG|JPEG|PNG|BMP'
,
type
:
3
},
{
stringArr
:
'DOCX|DOC|XLSX|XLS|PPT|PPTX|PDF'
,
type
:
1
},
]
let
ft
=
file
.
file
.
name
.
substring
(
file
.
file
.
name
.
lastIndexOf
(
'.'
)
+
1
,
file
.
file
.
name
.
length
).
toUpperCase
();
let
fileTypeNumber
=
2
;
let
typeOk
=
false
;
typeArr
.
forEach
(
x
=>
{
if
(
x
.
stringArr
.
indexOf
(
ft
)
!=
'-1'
)
{
fileTypeNumber
=
x
.
type
typeOk
=
true
;
}
})
if
(
!
typeOk
)
return
this
.
Error
(
'请上传图片、word、excel类型的文件!'
);
let
newArr
=
[];
newArr
.
push
(
file
.
file
)
let
path
=
"/Upload/Temporary/"
this
.
$message
.
info
(
'上传中...'
)
this
.
UploadSelfFileT
(
path
,
newArr
,
x
=>
{
let
fileSize
=
file
.
file
.
size
<
1024
?
file
.
file
.
size
:(
file
.
file
.
size
/
1024
).
toFixed
(
0
);
this
.
saveMsg
.
push
({
Content
:
x
.
data
.
FilePath
,
ID
:
0
,
Type
:
fileTypeNumber
,
Url
:
this
.
domainManager
().
ViittoFileUrl
+
x
.
data
.
FilePath
,
})
this
.
addMsg
.
vorcherInos
=
this
.
saveMsg
;
this
.
Success
(
'上传成功'
);
});
},
submitAddChuNa
(){
if
(
this
.
addMsg
.
TradeDate
===
''
)
return
this
.
$message
.
error
(
this
.
$t
(
'fnc.a_qxzjyriqi'
));
if
(
this
.
BillType
===
1
&&
this
.
addMsg
.
RemitterName
===
''
)
return
this
.
$message
.
error
(
this
.
$t
(
'rule.qtxhkuanren'
))
;
this
.
addMsg
.
IsPlatformMergeBank
=
0
;
let
IsIncome
=
false
;
let
IsExpend
=
false
;
this
.
multipleSelection
.
forEach
(
x
=>
{
if
(
x
.
Type
==
1
){
IsIncome
=
true
;}
else
if
(
x
.
Type
==
2
){
IsExpend
=
true
;}
})
let
listYMoney
=
0
;
let
listBMoney
=
0
;
//勾选的单据的原币+本位币
if
(
IsIncome
==
true
&&
IsExpend
==
true
){
this
.
addMsg
.
IsPlatformMergeBank
=
2
;
//收支合并结算
//收支合并结算
this
.
multipleSelection
.
forEach
(
x
=>
{
x
.
DetailList
.
forEach
(
y
=>
{
if
(
x
.
Type
==
1
){
listYMoney
-=
(
y
.
OriginalMoney
*
100
)
listBMoney
-=
(
y
.
Money
*
100
)
}
else
{
listYMoney
+=
(
y
.
OriginalMoney
*
100
)
listBMoney
+=
(
y
.
Money
*
100
)
}
this
.
$confirm
(
`已选单号:
${
ids
.
join
(
','
)}
,总金额:
${
orderObj
.
Money
}
,是否继续生成财务单据`
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
})
.
then
(()
=>
{
this
.
$refs
.
multipleTable
.
clearSelection
();
this
.
$router
.
push
(
{
name
:
'ChoiceAddFinancialDocuments'
,
query
:
{
'Type'
:
2
,
'searchTitle'
:
'月结付款'
,
'blank'
:
'y'
,
'orderObj'
:
JSON
.
stringify
(
orderObj
),
})
}
else
{
this
.
multipleSelection
.
forEach
(
x
=>
{
x
.
DetailList
.
forEach
(
y
=>
{
listYMoney
+=
(
y
.
OriginalMoney
*
100
)
listBMoney
+=
(
y
.
Money
*
100
)
})
})
}
});
listYMoney
=
listYMoney
/
100
;
listBMoney
=
listBMoney
/
100
;
let
sureYMoney
=
0
;
let
sureBMoney
=
0
;
//合并账户的原币+本位币
this
.
payMsgList
.
forEach
(
x
=>
{
sureYMoney
+=
(
x
.
OriginalMoney
*
100
)
sureBMoney
+=
(
x
.
Money
*
100
)
})
sureYMoney
=
sureYMoney
/
100
;
sureBMoney
=
sureBMoney
/
100
;
if
(
listYMoney
!=
sureYMoney
||
listBMoney
!=
sureBMoney
){
this
.
$confirm
(
'原单合计原币/本位币金额不一致,是否提交?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
SureSubmit
();
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消'
});
});
}
else
{
this
.
SureSubmit
();
}
},
SureSubmit
(){
this
.
addMsg
.
FrIDs
=
this
.
multipleSelection
.
map
(
x
=>
{
return
x
.
FrID
}).
join
(
','
);
this
.
addMsg
.
BankList
=
this
.
payMsgList
;
this
.
addMsg
.
Money
=
this
.
listAllMoney
;
this
.
allLoading
=
true
this
.
apipost
(
'Financial_post_MergeFinance'
,
this
.
addMsg
,
r
=>
{
if
(
r
.
data
.
resultCode
===
1
)
{
this
.
addChuNa
=
false
;
this
.
saveMsg
=
[];
this
.
payMsgList
=
[];
this
.
multipleSelection
=
[];
this
.
payMsg
=
{
ID
:
0
,
FinanceId
:
''
,
Type
:
''
,
AccountId
:
''
,
OriginalMoney
:
0
,
CurrencyId
:
''
,
Rate
:
0
,
Fee
:
0
,
Name
:
''
,
CurrenName
:
''
,
Account
:
''
,
balance
:
''
,
allMoney
:
0
,
show
:
false
,
}
this
.
getPageList
();
}
else
{
this
.
$message
.
error
(
r
.
data
.
message
)
}
this
.
allLoading
=
false
},
null
)
},
AccountType_post_GetList
(){
//获取账户类型下拉
this
.
apipost
(
'AccountType_post_GetList'
,
this
.
queryAccMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
AccList
=
res
.
data
.
data
;
this
.
AccListT
=
res
.
data
.
data
;
}
else
{
this
.
$message
.
error
(
res
.
data
.
message
);
}
},
err
=>
{})
},
}
}
</
script
>
src/components/FinancialModule/FinancialSubmodule/MergeBillModule.vue
View file @
c928f62f
...
...
@@ -90,53 +90,12 @@
<div
class=
"Receipt_box"
:class=
"[GetDetail.Type==1?'':'color_blur',isPrintPage?'_PrintPageStyle':'']"
:style=
"
{width:width,backgroundColor:color}" @click.stop v-loading='loading'>
<div
class=
"_sanjiao_"
></div>
<p
class=
"rb_tit"
>
{{
GetDetail
.
CompanyName
}}
</p>
<!--
<p
class=
"rb_stit"
>
-->
<!--
<span
:class=
"isPrintPage?'_rb_stit_print':''"
>
{{
GetDetail
.
FinanceName
}}
</span>
-->
<!--
<i
v-if=
"name===1"
>
(会计联)
</i>
-->
<!--
<i
v-if=
"name===2"
>
(业务联)
</i>
-->
<!--
</p>
-->
<!--
<p
class=
"_yewudanju"
v-if=
"GetDetail.OrderSource==8&&!isPrintPage"
>
订单号:
<span
class=
"_jump_page"
@
click=
"GetDetail.OrderID>0?jumpPage('RegistrationList',GetDetail.TCID,1):''"
>
{{
GetDetail
.
OrderID
?
GetDetail
.
OrderID
:
'无'
}}
</span></p>
-->
<!--
<p
class=
"_yewudanju"
v-if=
"GetDetail.OrderSource==9&&!isPrintPage"
>
期数:
<span
class=
""
@
click=
""
>
{{
GetDetail
.
Term
}}
</span></p>
-->
<!--
<div
class=
"rb_top_row _r_mb5"
v-if=
"GetDetail.Type==2"
>
-->
<!--
<p>
付款对象:
<span
class=
"_r_name"
>
{{
GetDetail
.
AccountHolder
}}
</span>
-->
<!--
<span
class=
"_r_name _r_IsPublic"
v-if=
"GetDetail.IsPublic==0"
>
{{
'私账'
}}
</span>
-->
<!--
<span
class=
"_r_name _r_IsPublic"
v-if=
"GetDetail.IsPublic==1"
>
{{
'公账'
}}
</span>
-->
<!--
<span
class=
"_r_name _r_IsPublic"
v-if=
"GetDetail.IsPublic==2"
>
{{
'现金'
}}
</span>
-->
<!--
</p>
-->
<!--<!–
<p><span
class=
""
>
编号:
</span>
{{
GetDetail
.
FrID
}}
</p>
–>
-->
<!--
</div>
-->
<!--
<template
v-else
>
-->
<!--
<div
class=
"rb_top_row _r_mb5"
>
-->
<!--
<p
v-if=
"GetDetail.CashierDetail&&GetDetail.CashierDetail[0]"
>
收款账户:
<span
class=
"_r_name _no_border"
>
{{
GetDetail
.
CashierDetail
[
0
].
Alias
}}
</span></p>
-->
<!--<!–
<p><span
class=
""
>
编号:
</span>
{{
GetDetail
.
FrID
}}
</p>
–>
-->
<!--
</div>
-->
<!--
<div
class=
"rb_top_row _r_mb5"
>
-->
<!--
<p
v-if=
"GetDetail.CashierDetail&&GetDetail.CashierDetail[0]"
>
收款账号:
<span
class=
"_r_name _no_border"
>
{{
(
GetDetail
.
CashierDetail
[
0
].
BankNo
==
''
||
GetDetail
.
CashierDetail
[
0
].
BankNo
==
null
)?
GetDetail
.
CashierDetail
[
0
].
Alias
:
GetDetail
.
CashierDetail
[
0
].
BankNo
}}
</span></p>
-->
<!--<!–
<p
class=
"_r_time"
>
{{
GetDetail
.
CreateDate
}}
</p>
–>
-->
<!--
</div>
-->
<!--
</
template
>
-->
<!--<div class="rb_top_row _r_mb5" v-if="GetDetail.Type===2">-->
<!--<p>付款账户:-->
<!--<span class="_r_name" v-if="GetDetail.TradeDate!=''">{{GetDetail.AccountNumber}}({{GetDetail.TradeDate}})</span>-->
<!--<span class="_r_name" v-else>{{GetDetail.AccountNumber?GetDetail.AccountNumber:'无'}}</span>-->
<!--</p>-->
<!--<!– <p class="_r_time">{{GetDetail.CreateDate}}</p> –>-->
<!--</div>-->
<!--<div class="rb_top_row _r_mb5" v-if="GetDetail.TCIDAndTCNUMList&&GetDetail.TCIDAndTCNUMList.length>0&&isPrintPage">-->
<!--<p>-->
<!--<span class="">团号:<span v-for="(o,ox) in GetDetail.TCIDAndTCNUMList">{{o.TCNUM}}({{o.TCID}})</span></span>-->
<!--</p>-->
<!--<span class="">订单号:<span>{{GetDetail.OrderID?GetDetail.OrderID:'无'}}</span></span>-->
<!--</div>-->
<table
class=
"Receipt_table"
border=
"1"
:class=
"[GetDetail.Type==1?'_border_color_r':'_border_color_b',isPrintPage?'_border_color_p':'']"
:bordercolor=
"GetDetail.Type==1?'#c94052':'#106BAF'"
style=
"border-collapse:collapse;"
>
<tr>
<th
rowspan=
"2"
>
{{
$t
(
'system.query_company'
)
}}
</th>
<th
rowspan=
"2"
>
{{
$t
(
'visa.v_tuanhao'
)
}}
</th>
<th
rowspan=
"2"
>
{{
$t
(
'fnc.danhao'
)
}}
</th>
<th
rowspan=
"2"
>
{{
$t
(
'fnc.fyshuoming'
)
}}
</th>
<!--<th rowspan="2">数量</th>-->
<!--<th rowspan="2">单 价</th>-->
<th
rowspan=
"2"
>
{{
$t
(
'hotel.hotel_Currency'
)
}}
</th>
<th
colspan=
"5"
>
{{
$t
(
'fnc.jine'
)
}}
</th>
<th
rowspan=
"2"
>
{{
$t
(
'hotel.hotel_remark'
)
}}
</th>
...
...
@@ -159,8 +118,6 @@
</td>
<td
height=
"34px"
><span
class=
"_jump_page"
@
click=
"openDetails(item.FinanceId)"
>
{{item.FinanceId}}
</span></td>
<td
height=
"34px"
>
{{item.CostTypeName}}
</td>
<!--<td height="34px">{{item.Number}}</td>-->
<!--<td height="34px">{{item.UnitPrice}}</td>-->
<td
height=
"34px"
>
{{item.CurrencyName}}
</td>
<td
height=
"34px"
>
{{item.OriginalMoney}}
</td>
<td
height=
"34px"
>
{{item.Rate}}
</td>
...
...
@@ -175,8 +132,8 @@
<td
height=
"34px"
></td>
<td
height=
"34px"
></td>
<td
height=
"34px"
></td>
<
!--<td height="34px"></td>--
>
<
!--<td height="34px"></td>--
>
<
td
height=
"34px"
></td
>
<
td
height=
"34px"
></td
>
<td
height=
"34px"
></td>
<td
height=
"34px"
></td>
<td
height=
"34px"
></td>
...
...
@@ -188,8 +145,8 @@
<tr
v-if=
"GetDetail.MergeDetailList&&GetDetail.MergeDetailList.length<3"
>
<td
height=
"34px"
></td>
<td
height=
"34px"
></td>
<
!--<td height="34px"></td>--
>
<
!--<td height="34px"></td>--
>
<
td
height=
"34px"
></td
>
<
td
height=
"34px"
></td
>
<td
height=
"34px"
></td>
<td
height=
"34px"
></td>
<td
height=
"34px"
></td>
...
...
@@ -202,8 +159,8 @@
<tr
v-if=
"GetDetail.MergeDetailList&&GetDetail.MergeDetailList.length<4"
>
<td
height=
"34px"
></td>
<td
height=
"34px"
></td>
<
!--<td height="34px"></td>--
>
<
!--<td height="34px"></td>--
>
<
td
height=
"34px"
></td
>
<
td
height=
"34px"
></td
>
<td
height=
"34px"
></td>
<td
height=
"34px"
></td>
<td
height=
"34px"
></td>
...
...
@@ -213,7 +170,6 @@
<td
height=
"34px"
></td>
<td
height=
"34px"
></td>
</tr>
<!--v-if="GetDetail.MergeBankList&&GetDetail.MergeBankList.length>0"-->
<tr
v-if=
"GetDetail.MergeBankList&&GetDetail.MergeBankList.length>0"
>
<td
height=
"34px"
class=
""
>
{{$t('tips.jiaoyifangshi')}}
</td>
<td
height=
"34px"
colspan=
"11"
class=
"_color_b"
>
...
...
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