Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
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
lanbaoming
jiedao-app-operator-master
Commits
d87c07ef
Commit
d87c07ef
authored
Mar 23, 2023
by
邓春圆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
佣金付款单模块
parent
9cf4fdbf
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1594 additions
and
47 deletions
+1594
-47
financial.js
src/api/ecw/financial.js
+132
-0
commission-Payment.vue
src/views/ecw/financial/commission-Payment.vue
+266
-0
commission-payable.vue
src/views/ecw/financial/commission-payable.vue
+194
-0
commission-requestFunds.vue
src/views/ecw/financial/commission-requestFunds.vue
+865
-0
paymentVoucher.vue
src/views/ecw/financial/paymentVoucher.vue
+137
-47
No files found.
src/api/ecw/financial.js
View file @
d87c07ef
...
...
@@ -273,6 +273,14 @@ export function getPayableInfoByIds(query) {
params
:
query
})
}
//获取佣金应付款详情
export
function
getCommissionPayable
(
params
){
return
request
({
url
:
'
/ecw/commission-payable/get
'
,
method
:
"
get
"
,
params
})
}
// 创建付款单
export
function
createPayment
(
data
)
{
...
...
@@ -282,6 +290,14 @@ export function createPayment(data) {
data
:
data
})
}
// 创建佣金订单
export
function
commissionPayment
(
data
){
return
request
({
url
:
'
/ecw/commission-payment/create
'
,
method
:
'
post
'
,
data
})
}
// 获取付款单列表
export
function
getPaymentList
(
query
)
{
...
...
@@ -318,6 +334,14 @@ export function updatePayment(data) {
data
:
data
})
}
// 更新佣金付款单
export
function
commissionPaymentUpdate
(
data
){
return
request
({
url
:
'
/ecw/commission-payment/update
'
,
method
:
'
put
'
,
data
})
}
// 删除付款单
export
function
deletePayment
(
id
)
{
...
...
@@ -360,6 +384,24 @@ export function paymentVerifyCancel(id) {
})
}
//获取佣金应付款
export
function
payablePage
(
params
){
return
request
({
url
:
'
/ecw/commission-payable/page
'
,
method
:
'
get
'
,
params
})
}
//获取佣金付款单
export
function
commissionPaymentPage
(
params
){
return
request
({
url
:
'
/ecw/commission-payment/page
'
,
method
:
'
get
'
,
params
})
}
// 根据流程主键获取付款单流程审核信息
export
function
getPaymentApprove
(
id
)
{
return
request
({
...
...
@@ -465,4 +507,94 @@ export function cancelFinanceReceiptItemWriteOffNo(query) {
data
:
query
})
}
// 取消审核
export
function
cancelFinancePaymentApproval
(
data
){
return
request
({
url
:
'
/ecw/payment/cancelFinancePaymentApproval
'
,
method
:
'
post
'
,
data
})
}
// 取消付款单反审核
export
function
cancelFinancePaymentApprovalNo
(
data
){
return
request
({
url
:
'
/ecw/payment/cancelFinancePaymentApprovalNo
'
,
method
:
'
post
'
,
data
})
}
// 取消付款单核销
export
function
cancelFinancePaymentWriteOff
(
data
){
return
request
({
url
:
'
/ecw/payment/cancelFinancePaymentWriteOff
'
,
method
:
'
post
'
,
data
})
}
export
function
cancelFinancePaymentWriteOffNo
(
data
){
return
request
({
url
:
'
/ecw/payment/cancelFinancePaymentWriteOffNo
'
,
method
:
'
post
'
,
data
})
}
//删除佣金付款单
export
function
commissionPaymentDelete
(
params
){
return
request
({
url
:
'
/ecw/commission-payment/delete
'
,
method
:
'
delete
'
,
params
})
}
//反审核佣金付款单
export
function
commissionPaymentVerifyCancel
(
data
){
return
request
({
url
:
'
/ecw/commission-payment/verifyCancel
'
,
method
:
'
post
'
,
data
})
}
// 佣金付款单核销
export
function
commissionPaymentVerification
(
data
){
return
request
({
url
:
'
/ecw/commission-payment/verification
'
,
method
:
'
post
'
,
data
})
}
//付款单反核销申请
export
function
commissionPaymentVerificationCancel
(
data
){
return
request
({
url
:
'
/ecw/commission-payment/verificationCancel
'
,
method
:
'
post
'
,
data
})
}
// 取消付款单反审核
export
function
commissionPaymentCancelFinancePaymentApprovalNo
(
data
){
return
request
({
url
:
'
/ecw/commission-payment/cancelFinancePaymentApprovalNo
'
,
method
:
'
post
'
,
data
})
}
// 取消付款单核销
export
function
commissionPaymentCancelFinancePaymentWriteOff
(
data
){
return
request
({
url
:
'
/ecw/commission-payment/cancelFinancePaymentWriteOff
'
,
method
:
'
post
'
,
data
})
}
// 取消付款单反核销
export
function
commissionPaymentCancelFinancePaymentWriteOffNo
(
data
){
return
request
({
url
:
'
/ecw/commission-payment/cancelFinancePaymentWriteOffNo
'
,
method
:
'
post
'
,
data
,
})
}
src/views/ecw/financial/commission-Payment.vue
0 → 100644
View file @
d87c07ef
<
template
>
<div
style=
"padding: 20px"
>
<el-card
class=
"box-card"
>
<div
slot=
"header"
class=
"clearfix"
style=
"font-size: 20px;"
>
{{
$t
(
'
佣金付款单
'
)
}}
</div>
<el-form
label-width=
"80px"
label-position=
"left"
>
<el-row
:gutter=
"30"
>
<el-col
:span=
"7"
>
<el-form-item
:label=
"$t('付款单号')"
>
<el-input></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"6"
>
<el-form-item
:label=
"$t('客户')"
>
<el-input
v-model=
"queryParams.searchKey"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"6"
>
<el-form-item
:label=
"$t('状态')"
>
<dict-selector
:type=
"DICT_TYPE.ECW_PAYMENT_STATE"
v-model=
"queryParams.state"
/>
</el-form-item>
</el-col>
<el-col
:span=
"5"
>
<el-form-item
:label=
"$t('业务员')"
>
<el-select
v-model=
"queryParams.salesmanName"
:placeholder=
"$t('请选择业务员')"
>
<el-option
v-for=
"item in creatorData"
:key=
"item.id"
:label=
"item.nickname"
:value=
"item.nickname"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"30"
>
<el-col
:span=
"7"
>
<el-form-item
:label=
"$t('创建时间')"
>
<el-date-picker
v-model=
"selectDate"
type=
"datetimerange"
range-separator=
"至"
:start-placeholder=
"$t('开始日期')"
:end-placeholder=
"$t('结束日期')"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"6"
>
<el-form-item
:label=
"$t('发票状态')"
>
<el-select
v-model=
"queryParams.invoiceStatus"
:placeholder=
"$t('请选择是否开票')"
>
<el-option
:label=
"$t('未开票')"
value=
"0"
/>
<el-option
:label=
"$t('已开票')"
value=
"1"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"6"
>
<el-form-item
:label=
"$t('订单编号')"
>
<el-input></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<el-form-item>
<el-button
type=
"primary"
@
click=
"getList"
>
{{
$t
(
'
查找
'
)
}}
</el-button>
<el-button
type=
"primary"
>
{{
$t
(
'
新增请款单
'
)
}}
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<el-table
:data=
"list"
style=
"margin-top: 30px"
>
<el-table-column
type=
"index"
:label=
"$t('序号')"
></el-table-column>
<el-table-column
prop=
"customerId"
:label=
"$t('付款单号')"
></el-table-column>
<el-table-column
prop=
"customerName"
:label=
"$t('客户')"
></el-table-column>
<el-table-column
:label=
"$t('创建时间')"
>
<template
v-slot=
"
{row}">
{{
parseTime
(
row
.
createTime
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('最后付款时间')"
>
<
template
v-slot=
"{row}"
>
{{
parseTime
(
row
.
latestPayAt
)
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"invoiceStatus"
:label=
"$t('发票')"
>
<
template
v-slot=
"{row}"
>
{{
row
.
invoiceStatus
?
$t
(
'
已开票
'
)
:
$t
(
'
未开票
'
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('状态')"
prop=
"state"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.ECW_PAYMENT_STATE"
:value=
"scope.row.state"
/>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('操作')"
>
<
template
v-slot=
"{row}"
>
<el-button
type=
"text"
v-if=
"[0,2].includes(row.state)"
>
{{
$t
(
'
编辑
'
)
}}
</el-button>
<el-button
type=
"text"
@
click=
"deleteFn(row)"
v-if=
"[0,2].includes(row.state)"
>
{{
$t
(
'
删除
'
)
}}
</el-button>
<el-button
type=
"text"
v-if=
"[3,4].includes(row.state)"
>
{{
$t
(
'
审核详情
'
)
}}
</el-button>
<el-button
type=
"text"
v-if=
"[1,3,5].includes(row.state)"
@
click=
"bridgeFn('取消审核',7, row, '取消审核' )"
>
{{
$t
(
'
取消审核
'
)
}}
</el-button>
<el-button
type=
"text"
v-if=
"[5,6].includes(row.state)"
@
click=
"bridgeFn('付款单反审核', 1, row, '提交反审核',)"
>
{{
$t
(
'
反审核
'
)
}}
</el-button>
<el-button
type=
"text"
v-if=
"[5].includes(row.state)"
@
click=
"bridgeFn('付款单核销申请', 2, row, '提交核销')"
>
{{
$t
(
'
核销
'
)
}}
</el-button>
<el-button
type=
"text"
v-if=
"[5,6].includes(row.state)"
>
{{
$t
(
'
打印
'
)
}}
</el-button>
<el-button
type=
"text"
v-if=
"[8].includes(row.state)"
@
click=
"bridgeFn('付款单反核销申请', 3, row, '提交方核销')"
>
{{
$t
(
'
反核销
'
)
}}
</el-button>
<el-button
type=
"text"
v-if=
"[4,7].includes(row.state)"
@
click=
"bridgeFn('取消反核销',4, row, '提交取消反核销' )"
>
{{
$t
(
'
取消反核销
'
)
}}
</el-button>
<el-button
type=
"text"
@
click=
"bridgeFn('取消付款单核销',5, row, '取消付款单核销' )"
>
{{
$t
(
'
取消核销
'
)
}}
</el-button>
<el-button
type=
"text"
@
click=
"bridgeFn('取消付款反单核销',6, row, '取消付款反单核销' )"
>
{{
$t
(
'
取消反核销
'
)
}}
</el-button>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.page"
:limit.sync=
"queryParams.rows"
@
pagination=
"getList"
/>
<!--对话框 审核 -->
<el-dialog
width=
"30%"
:title=
"paymentTitle"
:visible.sync=
"paymentShow"
>
<div
class=
"cancel_content"
>
<span>
{{ $t('申请理由') }}
</span>
<el-input
type=
"textarea"
:rows=
"6"
v-model=
"paymentValue"
:placeholder=
"$t('请输入取消理由')"
></el-input>
</div>
<span
slot=
"footer"
class=
"dialog-footers"
>
<el-button
type=
"primary"
@
click=
"cancelWriteOffClick()"
>
{{ $t(butTitle) }}
</el-button>
<el-button
@
click=
"paymentShow = false"
>
{{ $t('取消') }}
</el-button>
</span>
</el-dialog>
</div>
</template>
<
script
>
import
{
listSimpleUsers
}
from
"
@/api/system/user
"
;
import
{
commissionPaymentCancelFinancePaymentApprovalNo
,
commissionPaymentCancelFinancePaymentWriteOff
,
commissionPaymentCancelFinancePaymentWriteOffNo
,
commissionPaymentDelete
,
commissionPaymentPage
,
commissionPaymentVerification
,
commissionPaymentVerificationCancel
,
commissionPaymentVerifyCancel
}
from
"
@/api/ecw/financial
"
;
import
{
parseTime
}
from
"
../../../utils/ruoyi
"
;
export
default
{
name
:
"
commission-Payment
"
,
created
()
{
// 业务员
listSimpleUsers
().
then
((
res
)
=>
(
this
.
creatorData
=
res
.
data
));
this
.
getList
();
},
data
(){
return
{
queryParams
:{
invoiceStatus
:
null
,
state
:
null
,
salesmanName
:
null
,
searchKey
:
null
,
page
:
1
,
rows
:
10
,
},
selectDate
:[],
creatorData
:[],
list
:[],
total
:
0
,
paymentRow
:{},
paymentIndex
:
0
,
paymentTitle
:
''
,
butTitle
:
''
,
paymentShow
:
false
,
paymentValue
:
''
}
},
methods
:{
parseTime
,
getList
(){
commissionPaymentPage
(
this
.
queryParams
).
then
(
r
=>
{
this
.
list
=
r
.
data
.
list
this
.
total
=
r
.
data
.
total
})
},
// 删除
deleteFn
(
row
){
this
.
$confirm
(
this
.
$t
(
'
是否删除此条佣金付款单
'
),
this
.
$t
(
'
提示
'
),
{
confirmButtonText
:
this
.
$t
(
'
确定
'
),
cancelButtonText
:
this
.
$t
(
'
取消
'
),
type
:
'
warning
'
}).
then
(()
=>
{
commissionPaymentDelete
({
id
:
row
.
id
}).
then
(
r
=>
{
this
.
$message
({
type
:
'
success
'
,
message
:
this
.
$t
(
'
删除成功!
'
)
});
this
.
getList
();
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'
info
'
,
message
:
this
.
$t
(
'
已取消删除
'
)
});
});
},
bridgeFn
(
title
,
index
,
row
,
butTitle
=
'
提交
'
){
this
.
paymentTitle
=
title
;
this
.
butTitle
=
butTitle
;
this
.
paymentIndex
=
index
;
this
.
paymentRow
=
row
;
this
.
paymentShow
=
true
;
},
//提交
cancelWriteOffClick
(){
if
(
!
this
.
paymentValue
)
return
this
.
$message
.
warning
(
this
.
$t
(
'
请输入理由!
'
))
let
resolve
=
()
=>
{
this
.
getList
();
this
.
paymentShow
=
false
;
this
.
paymentValue
=
''
this
.
$message
.
success
(
this
.
$t
(
'
操作成功!
'
));
}
let
reject
=
()
=>
{
this
.
paymentShow
=
false
;
}
let
p
=
{
"
paymentId
"
:
this
.
paymentRow
.
id
,
"
paymentNo
"
:
this
.
paymentRow
.
paymentNo
,
"
remark
"
:
this
.
paymentValue
,
}
switch
(
this
.
paymentIndex
){
case
1
:
commissionPaymentVerifyCancel
(
p
).
then
(
resolve
,
reject
)
break
;
case
2
:
commissionPaymentVerification
(
p
).
then
(
resolve
,
reject
)
break
;
case
3
:
commissionPaymentVerificationCancel
(
p
).
then
(
resolve
,
reject
)
break
;
case
4
:
commissionPaymentCancelFinancePaymentApprovalNo
(
p
).
then
(
resolve
,
reject
)
break
;
case
5
:
commissionPaymentCancelFinancePaymentWriteOff
(
p
).
then
(
resolve
,
reject
)
break
case
6
:
commissionPaymentCancelFinancePaymentWriteOffNo
(
p
).
then
(
resolve
,
reject
)
break
case
7
:
}
}
}
}
</
script
>
<
style
scoped
>
</
style
>
src/views/ecw/financial/commission-payable.vue
0 → 100644
View file @
d87c07ef
<
template
>
<div
style=
"padding: 20px"
>
<el-card
class=
"box-card"
>
<div
slot=
"header"
class=
"clearfix"
style=
"font-size: 20px;"
>
{{
$t
(
'
应付款佣金
'
)
}}
</div>
<el-form
label-width=
"80px"
inline
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"6"
>
<el-form-item
:label=
"$t('订单号')"
>
<el-input
v-model=
"queryParams.orderNo"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"6"
>
<el-form-item
:label=
"$t('客户')"
>
<el-input
v-model=
"queryParams.customerName"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"6"
>
<el-form-item
:label=
"$t('始发仓')"
>
<el-select
v-model=
"queryParams.startWarehouseId"
:placeholder=
"$t('请选择始发仓')"
clearable
>
<el-option
v-for=
"item in exportWarehouseList"
:label=
"$l(item, 'title')"
:value=
"item.id"
:key=
"item.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"6"
>
<el-form-item
:label=
"$t('目的仓')"
>
<el-select
v-model=
"queryParams.destWarehouseId"
:placeholder=
"$t('请选择目的仓')"
clearable
>
<el-option
v-for=
"item in importWarehouseList"
:label=
"$l(item, 'title')"
:value=
"item.id"
:key=
"item.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"6"
>
<el-form-item
:label=
"$t('运输方式')"
>
<dict-selector
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model=
"queryParams.transportId"
formatter=
"number"
clearable
/>
</el-form-item>
</el-col>
<el-col
:span=
"6"
>
<el-form-item
:label=
"$t('佣金类型')"
>
<dict-selector
:type=
"DICT_TYPE.COMMISSION_TYPE"
v-model=
"queryParams.feeType"
formatter=
"number"
clearable
/>
</el-form-item>
</el-col>
<el-col
:span=
"6"
>
<el-form-item
:label=
"$t('状态')"
>
<el-select
clearable
v-model=
"queryParams.state"
>
<el-option
v-for=
"(item) in STATE"
:label=
"$t(item.title)"
:value=
"item.value"
:key=
"item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"6"
>
<el-form-item>
<el-button
type=
"primary"
@
click=
"getList"
>
{{
$t
(
'
查找
'
)
}}
</el-button>
<el-button
type=
"primary"
@
click=
"$router.push(
{path:'/financial/commission-requestFunds',query:{payableId:0}})" >
{{
$t
(
'
新增请款单
'
)
}}
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<el-table
:data=
"list"
style=
"margin-top: 30px"
>
<el-table-column
:label=
"$t('订单编号')"
prop=
"orderNo"
></el-table-column>
<el-table-column
:label=
"$t('客户名称')"
prop=
"customerName"
></el-table-column>
<el-table-column
:label=
"$t('订单编号')"
prop=
"payableNo"
></el-table-column>
<el-table-column
:label=
"$t('佣金类型')"
>
<template
v-slot=
"
{row}">
<dict-tag
:type=
"DICT_TYPE.COMMISSION_TYPE"
:value=
"row.feeType"
></dict-tag>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('金额')"
prop=
"totalAmount"
>
</el-table-column>
<el-table-column
:label=
"$t('应付生成时间')"
></el-table-column>
<el-table-column
:label=
"$t('状态')"
>
<
template
v-slot=
"{row}"
>
{{
$t
(
STATE
.
find
(
r
=>
r
.
value
===
row
.
state
).
title
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('付款单号')"
prop=
"paymentNo"
></el-table-column>
<el-table-column
:label=
"$t('备注')"
prop=
"remark"
></el-table-column>
<el-table-column
:label=
"$t('操作')"
>
<
template
v-slot=
"{row}"
>
<el-button
type=
"text"
@
click=
"$router.push(
{path:'/financial/commission-requestFunds',query:{payableId:row.id}})" >
{{
$t
(
'
请款
'
)
}}
</el-button>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.page"
:limit.sync=
"queryParams.rows"
@
pagination=
"getList"
/>
</div>
</template>
<
script
>
import
{
getWarehouseList
}
from
"
@/api/ecw/warehouse
"
;
import
item
from
"
@/layout/components/Sidebar/Item.vue
"
;
import
{
payablePage
}
from
"
@/api/ecw/financial
"
;
import
Template
from
"
@/views/cms/template/index.vue
"
;
export
default
{
// 应付款佣金
name
:
"
commission-payable
"
,
components
:
{
Template
},
created
()
{
getWarehouseList
().
then
(
res
=>
this
.
warehouseList
=
res
.
data
)
this
.
getList
()
},
data
(){
return
{
STATE
:[
{
value
:
0
,
title
:
'
未付款
'
,
},
{
value
:
1
,
title
:
'
付款中
'
,
},
{
value
:
2
,
title
:
'
已付款
'
,
}
],
warehouseList
:[],
queryParams
:{
rows
:
10
,
page
:
1
,
orderNo
:
''
,
customerName
:
''
,
startWarehouseId
:
''
,
destWarehouseId
:
''
,
feeType
:
''
,
state
:
''
},
list
:[],
total
:
0
}
},
computed
:{
exportWarehouseList
(){
/* tradeType 1 进口,2出口,3进出口 */
return
this
.
warehouseList
.
filter
(
item
=>
item
.
tradeType
==
2
||
item
.
tradeType
==
3
)
},
importWarehouseList
(){
return
this
.
warehouseList
.
filter
(
item
=>
item
.
tradeType
==
1
||
item
.
tradeType
==
3
)
},
},
methods
:{
getList
(){
payablePage
(
this
.
queryParams
).
then
(
r
=>
{
this
.
list
=
r
.
data
.
list
this
.
total
=
r
.
data
.
total
})
}
},
}
</
script
>
<
style
scoped
>
</
style
>
src/views/ecw/financial/commission-requestFunds.vue
0 → 100644
View file @
d87c07ef
<
template
>
<div
class=
"app-container"
>
<el-card>
<div
slot=
"header"
class=
"card-title"
>
{{
$t
(
'
请款单
'
)
}}
</div>
<el-form
ref=
"form"
:model=
"form"
label-width=
"120px"
label-position=
"left"
>
<el-descriptions
:column=
"3"
class=
"card"
border
>
<el-descriptions-item
:label=
"$t('客户')"
>
<el-form-item
label=
""
label-width=
"0"
style=
"margin-bottom: 0"
prop=
"customerId"
:rules=
"
{ required: true, trigger: ['blur', 'change'] }"
:error="$t('客户不能为空')"
>
<customer-selector
v-model=
"form.customerId"
@
change=
"consignor = $event"
/>
<!--
<el-select-->
<!-- v-model="form.customerId"-->
<!-- :placeholder="$t('请选择客户')"-->
<!-- filterable-->
<!-- @change="selectChange(form.customerId)"-->
<!-- :filter-method="getUserList"-->
<!-- >-->
<!--
<el-option-->
<!-- v-for="supplier in allSupplier"-->
<!-- :key="supplier.id"-->
<!-- :label="supplier.name"-->
<!-- :value="supplier.id"-->
<!-- >
</el-option>
-->
<!--
</el-select>
-->
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('部门')"
>
<el-form-item
label=
""
label-width=
"0"
style=
"margin-bottom: 0"
prop=
"departmentId"
required
:error=
"$t('部门不能为空')"
>
<el-select
v-model=
"form.departmentId"
style=
"width: 300px"
:placeholder=
"$t('请选择部门')"
>
<el-option
v-for=
"item in deptData"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
/>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('业务员')"
>
<el-form-item
label=
""
label-width=
"0"
style=
"margin-bottom: 0"
prop=
"salesmanName"
required
:error=
"$t('业务员不能为空')"
>
<el-select
v-model=
"form.salesmanName"
:placeholder=
"$t('请选择业务员')"
>
<el-option
v-for=
"item in creatorData"
:key=
"item.id"
:label=
"item.nickname"
:value=
"item.nickname"
/>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('申请日期')"
>
<el-form-item
label=
""
label-width=
"0"
style=
"margin-bottom: 0"
prop=
"applicationAt"
required
:error=
"$t('申请日期不能为空')"
>
<el-date-picker
clearable
v-model=
"form.applicationAt"
value-format=
"yyyy-MM-dd HH:mm:ss"
format=
"yyyy-MM-dd HH:mm:ss"
type=
"datetime"
:placeholder=
"$t('选择申请日期')"
/>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('账户名称')"
>
<el-form-item
label-width=
"0"
:rules=
"
{message:$t('账户名称不能为空'),required:true,}" prop="customerBankAccountName">
<el-input
v-model=
"form.customerBankAccountName"
></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('银行名称')"
>
<el-form-item
label-width=
"0"
:rules=
"
{ required:true,message:$t('银行名称不能为空')}" prop="customerBank" >
<el-input
v-model=
"form.customerBank"
></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('银行账户')"
>
<el-form-item
label-width=
"0"
:rules=
"
{required:true, message:$t('银行账户不能为空'),}" prop="customerBankAccount" >
<el-input
v-model=
"form.customerBankAccount"
></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('银行代码')"
>
<el-form-item
label-width=
"0"
>
<el-input></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('账户类型')"
>
<el-form-item
label-width=
"0"
>
<el-input></el-input>
</el-form-item>
</el-descriptions-item>
<!--
<el-descriptions-item
:label=
"$t('客户银行账号')"
style=
"width: 50%"
>
-->
<!--
<el-form-item-->
<!-- label=""-->
<!-- label-width="0"-->
<!-- style="margin-bottom: 0"-->
<!-- prop="customerBankAccount"-->
<!-- >-->
<!--
<el-input
style=
"width: 50%;"
v-model=
"form.customerBankAccount"
>
-->
<!--
</el-input>
-->
<!--<!–
<el-select
v-model=
"form.supplierBankAccount"
@
change=
"selectChangeBank"
&
ndash
;&
gt
;
--
>
<!--<!– :placeholder="$t('请选择收款账户')">–>-->
<!--<!–
<el-option
&
ndash
;&
gt
;
--
>
<!--<!– v-for="item in bankData"–>-->
<!--<!– :key="item.id"–>-->
<!--<!– :label="item.bankName + '(' + item.bankAccount+ ')'"–>-->
<!--<!– :value="item.bankAccount"–>-->
<!--<!– />–>-->
<!--<!–
</el-select>
–>
-->
<!--
</el-form-item>
-->
<!--
</el-descriptions-item>
-->
</el-descriptions>
<el-descriptions
:column=
"3"
class=
"card"
border
>
<el-descriptions-item
:label=
"$t('最后付款日期')"
>
<el-form-item
label=
""
label-width=
"0"
style=
"margin-bottom: 0"
prop=
"latestPayAt"
required
:error=
"$t('最后付款日期不能为空')"
>
<el-date-picker
clearable
v-model=
"form.latestPayAt"
value-format=
"yyyy-MM-dd HH:mm:ss"
format=
"yyyy-MM-dd HH:mm:ss"
type=
"datetime"
:placeholder=
"$t('选择最后付款日期')"
/>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('结算方式')"
>
<el-form-item
label=
""
label-width=
"0"
style=
"margin-bottom: 0"
required
:error=
"$t('选择结算方式')"
prop=
"settlementType"
>
<dict-selector
:type=
"DICT_TYPE.CUSTOMER_BALANCE"
v-model=
"form.settlementType"
/>
</el-form-item>
</el-descriptions-item>
</el-descriptions>
</el-form>
</el-card>
<el-card
class=
"card"
>
<div
slot=
"header"
class=
"card-title"
>
{{
$t
(
'
费用信息
'
)
}}
</div>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
style=
"padding: 10px; margin-bottom: 10px"
>
{{
$t
(
'
添加未付供应商款项
'
)
}}
</el-button
>
</el-col>
<el-table
v-loading=
"loadings"
:data=
"list"
border
:show-summary=
"!!list.length"
:summary-method=
"getSummaries"
>
<el-table-column
:label=
"$t('自编号')"
align=
"center"
prop=
"payableNo"
/>
<el-table-column
:label=
"$t('佣金类型')"
align=
"center"
prop=
"feeType"
>
<template
v-slot=
"
{row}">
<dict-tag
:type=
"DICT_TYPE.COMMISSION_TYPE"
:value=
"row.feeType"
></dict-tag>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('发票号码')"
align=
"center"
prop=
"invoiceNumber"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.invoiceNumber"
></el-input>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('应付金额')"
align=
"center"
prop=
"totalAmount"
/>
<el-table-column
:label=
"$t('币种')"
align=
"center"
prop=
"currencyId"
>
<
template
slot-scope=
"scope"
>
{{
getCurrencyLabel
(
scope
.
row
.
currencyId
)
}}
<!--
<dict-tag
:type=
"DICT_TYPE.BOX_SHIPPING_PRICE_UNIT"
:value=
"scope.row.currencyId"
/>
-->
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('汇率')"
align=
"center"
prop=
"exchangeRate"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.exchangeRate"
></el-input>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('税率')+'%'"
align=
"center"
prop=
"taxRate"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.taxRate"
@
keyup.native=
"scope.row.taxRate = oninput(scope.row.taxRate)"
></el-input>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('价税合计(RMB)')"
align=
"center"
prop=
"total"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
total
=
((
scope
.
row
.
totalAmount
*
scope
.
row
.
exchangeRate
)
+
(
scope
.
row
.
totalAmount
*
scope
.
row
.
exchangeRate
)
*
(
scope
.
row
.
taxRate
/
100
)).
toFixed
(
2
)
}}
</span>
<!--
<span>
{{
scope
.
row
.
total
}}
</span>
-->
</
template
>
</el-table-column>
</el-table>
<el-form
ref=
"forms"
:model=
"form"
label-width=
"120px"
label-position=
"left"
style=
"width: 50%"
>
<el-descriptions
:column=
"1"
class=
"card"
border
>
<el-descriptions-item
:label=
"$t('账单号')"
>
<el-form-item
label=
""
label-width=
"0"
style=
"margin-bottom: 0"
prop=
"accountNumber"
:rules=
"[
{ required: true, message:$t('账单号不能为空'), trigger: 'blur' },
]"
>
<el-input
v-model=
"form.accountNumber"
:placeholder=
"$t('请输入账单号')"
></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('发票')"
>
<el-form-item
label=
""
label-width=
"0"
style=
"margin-bottom: 0"
prop=
"invoiceStatus"
required
:error=
"$t('请选择是否开票')"
>
<el-select
v-model=
"form.invoiceStatus"
:placeholder=
"$t('请选择是否开票')"
>
<el-option
:label=
"$t('未开票')"
value=
"0"
/>
<el-option
:label=
"$t('已开票')"
value=
"1"
/>
</el-select>
</el-form-item>
</el-descriptions-item>
</el-descriptions>
</el-form>
</el-card>
<div
slot=
"header"
class=
"bpm-title"
>
{{ $t('审核流程') }}
</div>
<work-flow
xmlkey=
"merge_order"
v-model=
"form.copyUserList"
></work-flow>
<div
slot=
"footer"
style=
"margin: 20px 0"
>
<el-button
type=
"primary"
@
click=
"submitForm(1)"
>
{{ $t('提交申请') }}
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm(0)"
>
{{ $t('保存草稿') }}
</el-button>
<el-button
v-if=
"orderData.inWarehouseState==207"
type=
"primary"
@
click=
"$router.push(`/bpm/process-instance/detail?id=`+orderApprovalBackVO.applyingFormId)"
>
{{ $t('审核中') }}
</el-button>
<el-button
v-if=
"orderData.inWarehouseState==207"
plain
type=
"primary"
@
click=
"dialogVisible = true"
>
{{ $t('取消审核') }}
</el-button>
<el-button
plain
type=
"primary"
@
click=
"$store.dispatch('tagsView/delCurrentView')"
>
{{ $t('返回') }}
</el-button>
</div>
<el-dialog
:visible.sync=
"open"
:title=
"$t('添加未付客户款项')"
width=
"80%"
append-to-body
@
open=
"openDialog"
>
<div>
<!-- <div slot="header" class="card-title">{{ $t('添加未收客户款项') }}</div> -->
<!-- 搜索工作栏 -->
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
label-width=
"80px"
>
<!-- <el-row> -->
<el-form-item
:label=
"$t('客户')"
>
<customer-selector
v-model=
"queryParams.customerId"
@
change=
"consignor = $event"
/>
</el-form-item>
<el-form-item
:label=
"$t('始发仓')"
>
<el-select
v-model=
"queryParams.departureId"
:placeholder=
"$t('请选择始发仓')"
clearable
>
<el-option
v-for=
"item in exportWarehouseList"
:label=
"$l(item, 'title')"
:value=
"item.id"
:key=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('目的仓')"
>
<el-select
v-model=
"queryParams.objectiveId"
:placeholder=
"$t('请选择目的仓')"
clearable
>
<el-option
v-for=
"item in importWarehouseList"
:label=
"$l(item, 'title')"
:value=
"item.id"
:key=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('运输方式')"
>
<dict-selector
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model=
"queryParams.transportId"
formatter=
"number"
/>
</el-form-item>
<!-- </el-row> -->
<el-form-item
:label=
"$t('出货渠道')"
>
<el-select
v-model=
"queryParams.channelId"
:placeholder=
"$t('请选择出货渠道')"
>
<el-option
v-for=
"item in channelList"
:label=
"item.nameZh"
:value=
"item.channelId"
:key=
"item.channelId"
></el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('订单号')"
prop=
"orderNo"
>
<el-input
v-model=
"queryParams.orderNo"
:placeholder=
"$t('请输入订单号')"
clearable
/>
</el-form-item>
<el-form-item
:label=
"$t('业务编号')"
prop=
"selfNo"
>
<el-input
v-model=
"queryParams.selfNo"
:placeholder=
"$t('请输入业务编号')"
clearable
@
blur=
"handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleQuery"
>
{{ $t('查询') }}
</el-button
>
</el-form-item>
</el-form>
<el-table
ref=
"multipleTable"
v-loading=
"loading"
:data=
"orderData"
border
@
selection-change=
"handleSelectionChange"
row-key=
"id"
>
<el-table-column
type=
"selection"
width=
"55"
:reserve-selection=
"true"
></el-table-column>
<el-table-column
:label=
"$t('订单编号')"
prop=
"orderNo"
></el-table-column>
<el-table-column
:label=
"$t('客户名称')"
prop=
"customerName"
></el-table-column>
<el-table-column
:label=
"$t('订单编号')"
prop=
"payableNo"
></el-table-column>
<el-table-column
:label=
"$t('佣金类型')"
>
<
template
v-slot=
"{row}"
>
<dict-tag
:type=
"DICT_TYPE.COMMISSION_TYPE"
:value=
"row.feeType"
></dict-tag>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('金额')"
align=
"center"
prop=
"totalAmount"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
totalAmount
}}{{
getCurrencyLabel
(
scope
.
row
.
currencyId
)
}}
</span>
<!--
<dict-tag
:type=
"DICT_TYPE.BOX_SHIPPING_PRICE_UNIT"
:value=
"scope.row.currencyId"
/>
-->
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.page"
:limit.sync=
"queryParams.rows"
@
pagination=
"getList"
/>
<!-- </el-card> -->
<div
slot=
"footer"
style=
"margin: 20px 0; text-align: center;"
>
<el-button
type=
"primary"
@
click=
"saveSelectList"
>
{{ $t('确认添加') }}
</el-button>
<el-button
@
click=
"hiddenDialog"
>
{{ $t('取消') }}
</el-button>
</div>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
listSimpleUsers
}
from
"
@/api/system/user
"
;
import
{
DICT_TYPE
}
from
"
@/utils/dict
"
;
import
{
getToken
}
from
"
@/utils/auth
"
;
import
{
getChannelList
}
from
"
@/api/ecw/channel
"
;
import
CustomerSelector
from
"
@/components/CustomerSelector
"
;
import
{
listSimpleDepts
}
from
"
@/api/system/dept
"
;
import
{
getTradeCityList
}
from
"
@/api/ecw/region
"
;
import
{
getSupplierPage
,
getSupplier
}
from
"
@/api/ecw/supplier
"
;
import
{
getPayableList
,
getPayableInfoByIds
,
getPaymentInfoByIds
,
getPaymentItem
,
updatePayment
,
payablePage
,
commissionPayment
,
commissionPaymentUpdate
,
getCommissionPayable
}
from
"
@/api/ecw/financial
"
import
{
getCurrencyPage
}
from
"
@/api/ecw/currency
"
;
import
NP
from
'
number-precision
'
import
{
getWarehouseList
}
from
'
@/api/ecw/warehouse
'
import
WorkFlow
from
'
@/components/WorkFlow/
'
import
{
getCustomer
,
getCustomerPage
}
from
"
@/api/ecw/customer
"
;
export
default
{
name
:
"
commission-requestFunds
"
,
components
:
{
CustomerSelector
,
WorkFlow
},
data
()
{
return
{
id
:
0
,
payableId
:
0
,
orderData
:
[],
total
:
0
,
loadings
:
false
,
open
:
false
,
form
:
{},
creatorData
:
[],
list
:
[],
defaultList
:
[],
channelList
:
[],
loading
:
""
,
bankData
:
[],
params
:
{
page
:
1
,
rows
:
20
,
},
deptData
:
[],
deptArr
:
[],
queryParams
:
{
page
:
1
,
rows
:
20
,
},
multipleSelection
:
[],
tradeCityList
:
[],
allSupplier
:
[],
currencyList
:
[],
warehouseList
:
[],
selectedUsers
:
[],
dialogVisible
:
false
,
};
},
async
created
()
{
await
getCurrencyPage
(
this
.
params
).
then
(
res
=>
this
.
currencyList
=
res
.
data
.
list
)
getWarehouseList
().
then
(
res
=>
this
.
warehouseList
=
res
.
data
)
let
that
=
this
;
if
(
that
.
$route
.
query
.
payableId
&&
that
.
$route
.
query
.
payableId
!==
'
0
'
)
{
this
.
payableId
=
this
.
$route
.
query
.
payableId
;
// 获取详情
getCommissionPayable
({
id
:
this
.
payableId
}).
then
(
res
=>
{
this
.
handleSelectionChange
([
res
.
data
])
this
.
selectChange
(
this
.
form
.
customerId
)
this
.
list
=
this
.
multipleSelection
this
.
$set
(
this
.
form
,
'
customerId
'
,
res
.
data
.
customerId
)
})
}
if
(
that
.
$route
.
query
.
id
&&
that
.
$route
.
query
.
id
!==
'
0
'
)
{
this
.
id
=
this
.
$route
.
query
.
id
;
getPaymentInfoByIds
({
id
:
this
.
id
}).
then
(
res
=>
{
this
.
form
=
{
copyUserList
:[],
...
res
.
data
,
latestPayAt
:
this
.
parseTime
(
res
.
data
.
latestPayAt
,
'
{y}-{m}-{d}
'
),
applicationAt
:
this
.
parseTime
(
res
.
data
.
applicationAt
,
'
{y}-{m}-{d}
'
),
invoiceStatus
:
String
(
res
.
data
.
invoiceStatus
),
}
this
.
$set
(
this
.
form
,
'
customerBankAccount
'
,
res
.
data
.
customerBankAccount
)
})
getPaymentItem
({
id
:
this
.
id
}).
then
(
res
=>
{
this
.
list
=
[...
res
.
data
]
this
.
defaultList
=
[...
res
.
data
]
})
}
listSimpleUsers
().
then
((
res
)
=>
(
that
.
creatorData
=
res
.
data
));
getChannelList
().
then
((
res
)
=>
(
that
.
channelList
=
res
.
data
));
getTradeCityList
().
then
((
res
)
=>
(
that
.
tradeCityList
=
res
.
data
));
// getBankAccountPage(that.params).then(
// (res) => (that.bankData = res.data.list)
// );
// getSupplierPage({ pageNo: "1", pageSize: "10000" }).then((res) => {
// const { data } = res;
// this.allSupplier = data.list;
// this.selectChange(this.form.supplierId)
// });
listSimpleDepts
().
then
((
res
)
=>
{
res
.
data
.
forEach
((
item
)
=>
{
if
(
item
.
parentId
==
0
)
{
that
.
deptArr
.
push
(
item
);
}
else
{
that
.
deptData
.
push
(
item
);
}
});
that
.
deptData
.
forEach
((
value
)
=>
{
var
dept
=
that
.
deptArr
.
filter
((
itt
)
=>
itt
.
id
==
value
.
parentId
);
if
(
dept
.
length
>
0
)
{
value
.
name
=
dept
[
0
].
name
+
"
|
"
+
value
.
name
;
}
});
});
this
.
getUserList
();
},
computed
:
{
expoerCityList
()
{
return
this
.
tradeCityList
.
filter
((
item
)
=>
item
.
type
==
2
);
},
importCityList
()
{
return
this
.
tradeCityList
.
filter
((
item
)
=>
item
.
type
==
1
);
},
exportWarehouseList
()
{
/* tradeType 1 进口,2出口,3进出口 */
return
this
.
warehouseList
.
filter
(
item
=>
item
.
tradeType
==
2
||
item
.
tradeType
==
3
)
},
importWarehouseList
()
{
return
this
.
warehouseList
.
filter
(
item
=>
item
.
tradeType
==
1
||
item
.
tradeType
==
3
)
},
},
methods
:
{
getCurrencyLabel
(
id
)
{
var
label
=
this
.
currencyList
.
filter
(
item
=>
item
.
id
==
id
)
if
(
label
.
length
>
0
)
return
this
.
$i18n
.
locale
==
'
zh_CN
'
?
label
[
0
].
titleZh
:
label
[
0
].
titleEn
return
''
},
getList
()
{
this
.
loading
=
true
;
// 处理查询参数
let
params
=
{...
this
.
queryParams
};
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
"
createTime
"
);
// 执行查询
payablePage
(
params
).
then
((
response
)
=>
{
this
.
orderData
=
response
.
data
.
list
;
this
.
total
=
response
.
data
.
total
;
this
.
loading
=
false
;
this
.
$nextTick
(()
=>
{
this
.
list
.
forEach
(
itm
=>
{
const
t
=
this
.
orderData
.
find
(
v
=>
v
.
id
==
itm
.
id
)
t
&&
this
.
$refs
.
multipleTable
.
toggleRowSelection
(
t
,
true
)
})
})
});
},
getUserList
(
val
)
{
getCustomerPage
({
pageNo
:
1
,
pageSize
:
20
,
name
:
val
}).
then
(
r
=>
{
this
.
allSupplier
=
r
.
data
.
list
})
},
getSummaries
(
param
)
{
console
.
log
(
param
)
const
{
columns
,
data
}
=
param
;
const
sums
=
new
Array
(
columns
.
length
).
map
(
v
=>
''
);
const
index
=
sums
.
length
-
1
sums
[
index
-
1
]
=
this
.
$t
(
'
价税合计大写
'
)
const
t
=
data
.
map
(
v
=>
v
.
total
).
reduce
((
prev
,
curr
)
=>
{
return
parseFloat
(
prev
)
+
parseFloat
(
curr
);
},
0
)
sums
[
index
]
=
this
.
convertCurrency
(
t
)
return
sums
;
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
open
=
true
;
},
submitForm
(
val
)
{
this
.
form
.
addType
=
val
;
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
$refs
.
forms
.
validate
((
val
)
=>
{
if
(
val
)
{
const
params
=
{...
this
.
form
}
if
(
this
.
list
&&
this
.
list
.
length
>
0
)
{
params
.
commissionPayableReqVOList
=
[...
this
.
list
]
}
else
{
this
.
$modal
.
msgError
(
this
.
$t
(
'
请选择客户未付款项
'
));
return
}
if
(
!
params
.
customerBankAccount
)
{
this
.
$modal
.
msgError
(
this
.
$t
(
'
请前往客户档案编辑银行账号!
'
));
return
}
if
(
this
.
id
&&
this
.
id
!==
'
0
'
)
{
commissionPaymentUpdate
(
params
).
then
(
res
=>
{
this
.
$modal
.
msgSuccess
(
this
.
$t
(
'
修改成功
'
));
// this.$router.back();
})
}
else
{
commissionPayment
(
params
).
then
(
res
=>
{
this
.
$modal
.
msgSuccess
(
this
.
$t
(
'
新增成功
'
));
// this.$router.back();
})
}
}
})
}
})
},
selectChangeBank
(
val
)
{
this
.
$forceUpdate
()
// var bank = this.bankData.find(item => item.bankAccount == this.form.supplierBankAccount)
// this.form.supplierBank = bank.bankName
// this.form.supplierBankAccountName = bank.accountName
},
selectChange
(
val
)
{
if
(
val
){
getCustomer
(
val
).
then
(
r
=>
{
this
.
$set
(
this
.
form
,
'
customerBank
'
,
r
.
data
.
bank
)
this
.
$set
(
this
.
form
,
'
customerBankAccount
'
,
r
.
data
.
bankNumber
)
this
.
$set
(
this
.
form
,
'
customerBankAccountName
'
,
r
.
data
.
name
)
})
}
// this.bankData = []
// // this.form.supplierBankAccount=''
// if (val) {
// getSupplier(val).then((res) => {
// this.bankData = res.data.bankList
// var bank = this.bankData.find(item => item.bankAccount == this.form.supplierBankAccount)
// if (this.bankData.length == 0 || !bank) this.form.supplierBankAccount = ''
// })
// }
//
// const t = this.allSupplier.find(v => v.id == val)
//
// t && (this.form.supplierName = t.companyZh)
// t && (this.bankData = t.bankList)
},
handleQuery
()
{
this
.
queryParams
.
page
=
1
;
this
.
getList
()
},
UStoRMB
()
{
return
NP
.
divide
(
this
.
currencyList
.
find
(
v
=>
v
.
titleEn
===
'
USD
'
).
huilv
,
100
).
toFixed
(
6
)
},
NANtoRMB
()
{
return
NP
.
divide
(
this
.
currencyList
.
find
(
v
=>
v
.
titleEn
===
'
NGN
'
).
huilv
,
100
).
toFixed
(
6
)
},
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
.
map
(
v
=>
{
var
rate
=
NP
.
divide
(
this
.
currencyList
.
find
(
vs
=>
vs
.
id
===
v
.
currencyId
).
huilv
,
100
).
toFixed
(
6
)
return
Object
.
assign
(
v
,
{
exchangeRate
:
rate
})
});
},
hiddenDialog
()
{
this
.
open
=
false
;
},
saveSelectList
()
{
if
(
this
.
id
&&
this
.
id
!==
'
0
'
)
{
this
.
list
=
[...
this
.
defaultList
,
...
this
.
multipleSelection
]
}
else
{
this
.
list
=
this
.
multipleSelection
}
this
.
open
=
false
;
},
convertCurrency
(
money
)
{
//汉字的数字
var
cnNums
=
new
Array
(
'
零
'
,
this
.
$t
(
'
壹
'
),
this
.
$t
(
'
贰
'
),
this
.
$t
(
'
叁
'
),
this
.
$t
(
'
肆
'
),
this
.
$t
(
'
伍
'
),
this
.
$t
(
'
陆
'
),
this
.
$t
(
'
柒
'
),
this
.
$t
(
'
捌
'
),
'
玖
'
);
//基本单位
var
cnIntRadice
=
new
Array
(
''
,
this
.
$t
(
'
拾
'
),
this
.
$t
(
'
佰
'
),
'
仟
'
);
//对应整数部分扩展单位
var
cnIntUnits
=
new
Array
(
''
,
this
.
$t
(
'
万
'
),
this
.
$t
(
'
亿
'
),
'
兆
'
);
//对应小数部分单位
var
cnDecUnits
=
new
Array
(
'
角
'
,
this
.
$t
(
'
分
'
),
this
.
$t
(
'
毫
'
),
'
厘
'
);
//整数金额时后面跟的字符
var
cnInteger
=
this
.
$t
(
'
整
'
);
//整型完以后的单位
var
cnIntLast
=
this
.
$t
(
'
元
'
);
//最大处理的数字
var
maxNum
=
999999999999999.9999
;
//金额整数部分
var
integerNum
;
//金额小数部分
var
decimalNum
;
//输出的中文金额字符串
var
chineseStr
=
''
;
//分离金额后用的数组,预定义
var
parts
;
// 传入的参数为空情况
if
(
money
===
''
)
{
return
''
;
}
money
=
parseFloat
(
money
)
if
(
money
>=
maxNum
)
{
return
''
}
// 传入的参数为0情况
if
(
money
===
0
)
{
chineseStr
=
cnNums
[
0
]
+
cnIntLast
+
cnInteger
;
return
chineseStr
}
// 转为字符串
money
=
money
.
toString
();
// indexOf 检测某字符在字符串中首次出现的位置 返回索引值(从0 开始) -1 代表无
if
(
money
.
indexOf
(
'
.
'
)
==
-
1
)
{
integerNum
=
money
;
decimalNum
=
''
}
else
{
parts
=
money
.
split
(
'
.
'
);
integerNum
=
parts
[
0
];
decimalNum
=
parts
[
1
].
substr
(
0
,
4
);
}
//转换整数部分
if
(
parseInt
(
integerNum
,
10
)
>
0
)
{
let
zeroCount
=
0
;
let
IntLen
=
integerNum
.
length
for
(
let
i
=
0
;
i
<
IntLen
;
i
++
)
{
let
n
=
integerNum
.
substr
(
i
,
1
);
let
p
=
IntLen
-
i
-
1
;
let
q
=
p
/
4
;
let
m
=
p
%
4
;
if
(
n
==
'
0
'
)
{
zeroCount
++
;
}
else
{
if
(
zeroCount
>
0
)
{
chineseStr
+=
cnNums
[
0
]
}
zeroCount
=
0
;
chineseStr
+=
cnNums
[
parseInt
(
n
)]
+
cnIntRadice
[
m
];
}
if
(
m
==
0
&&
zeroCount
<
4
)
{
chineseStr
+=
cnIntUnits
[
q
];
}
}
// 最后+ 元
chineseStr
+=
cnIntLast
;
}
// 转换小数部分
if
(
decimalNum
!=
''
)
{
let
decLen
=
decimalNum
.
length
;
for
(
let
i
=
0
;
i
<
decLen
;
i
++
)
{
let
n
=
decimalNum
.
substr
(
i
,
1
);
if
(
n
!=
'
0
'
)
{
chineseStr
+=
cnNums
[
Number
(
n
)]
+
cnDecUnits
[
i
]
}
}
}
if
(
chineseStr
==
''
)
{
chineseStr
+=
cnNums
[
0
]
+
cnIntLast
+
cnInteger
;
}
else
if
(
decimalNum
==
''
)
{
chineseStr
+=
cnInteger
;
}
return
chineseStr
},
openDialog
()
{
this
.
getList
()
},
oninput
(
num
)
{
let
str
=
num
let
len1
=
str
.
substr
(
0
,
1
)
let
len2
=
str
.
substr
(
1
,
1
)
//如果第一位是0,第二位不是点,就用数字把点替换掉
if
(
str
.
length
>
1
&&
len1
==
0
&&
len2
!=
'
.
'
)
{
str
=
str
.
substr
(
1
,
1
)
}
//第一位不能是.
if
(
len1
==
'
.
'
)
{
str
=
''
}
//限制只能输入一个小数点
if
(
str
.
indexOf
(
'
.
'
)
!=
-
1
)
{
let
str_
=
str
.
substr
(
str
.
indexOf
(
'
.
'
)
+
1
)
if
(
str_
.
indexOf
(
'
.
'
)
!=
-
1
)
{
str
=
str
.
substr
(
0
,
str
.
indexOf
(
'
.
'
)
+
str_
.
indexOf
(
'
.
'
)
+
1
)
}
else
{
// if (str_.length > 2) {
// str = str.substr(0, str.indexOf('.') + 1) + str_.substr(0, 2)
// }
}
}
//正则替换
str
=
str
.
replace
(
/
[^\d
^
\.]
+/g
,
''
)
// 保留数字和小数点
// str = str.replace(/\.\d\d\d$/,'') // 小数点后只能输两位
return
str
}
},
watch
:{
'
form.customerId
'
(
val
){
this
.
selectChange
(
val
)
}
}
};
</
script
>
<
style
scoped
>
.card
{
margin-top
:
20px
;
}
.dialog-footer
{
padding
:
40px
;
}
.card-title
{
font-size
:
18px
;
font-weight
:
bold
;
}
.bpm-title
{
font-size
:
20px
;
font-weight
:
bold
;
color
:
#666
;
margin
:
20px
0
;
}
</
style
>
src/views/ecw/financial/paymentVoucher.vue
View file @
d87c07ef
...
...
@@ -53,12 +53,12 @@
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('状态')"
>
<dict-selector
:type=
"DICT_TYPE.
ECW_PAYMENT_STATE"
v-model=
"queryParams.state"
/>
<dict-selector
:type=
"DICT_TYPE.
PAYMENT_STATE"
v-model=
"queryParams.state"
/>
</el-form-item>
</el-row>
<el-row
:span=
"24"
>
<el-form-item
:label=
"$t('业务员')"
>
<!--
<el-select
v-model=
"form.salesmanId"
:placeholder=
"$t('请选择业务员')"
>
<!--
<el-select
v-model=
"form.salesmanId"
:placeholder=
"$t('请选择业务员')"
>
<el-option
v-for=
"item in creatorData"
:key=
"item.id"
...
...
@@ -66,7 +66,8 @@
:value=
"item.id"
/>
</el-select>
-->
<el-select
v-model=
"form.salesmanId"
filterable
:placeholder=
"$t('请选择业务员')"
@
change=
"v => form.salesmanName = creatorData.find(t => t.id === v).nickname"
>
<el-select
v-model=
"form.salesmanId"
filterable
:placeholder=
"$t('请选择业务员')"
@
change=
"v => form.salesmanName = creatorData.find(t => t.id === v).nickname"
>
<el-option
v-for=
"item in creatorData"
:key=
"item.id"
...
...
@@ -90,8 +91,8 @@
v-model=
"queryParams.invoiceStatus"
:placeholder=
"$t('请选择是否开票')"
>
<el-option
:label=
"$t('未开票')"
value=
"0"
/>
<el-option
:label=
"$t('已开票')"
value=
"1"
/>
<el-option
:label=
"$t('未开票')"
value=
"0"
/>
<el-option
:label=
"$t('已开票')"
value=
"1"
/>
</el-select>
</el-form-item>
<el-form-item>
...
...
@@ -106,12 +107,12 @@
<span>
{{
scope
.
$index
+
1
}}
</span>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('付款单号')"
align=
"center"
prop=
"paymentNo"
>
<el-table-column
:label=
"$t('付款单号')"
align=
"center"
prop=
"paymentNo"
>
<
template
slot-scope=
"scope"
>
<span
style=
"color: #1890ff;"
@
click=
"paymentDetail(scope.row)"
>
{{
scope
.
row
.
paymentNo
}}
</span>
<span
style=
"color: #1890ff;"
@
click=
"paymentDetail(scope.row)"
>
{{
scope
.
row
.
paymentNo
}}
</span>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('供应商')"
align=
"center"
prop=
"supplierName"
/>
<el-table-column
:label=
"$t('供应商')"
align=
"center"
prop=
"supplierName"
/>
<el-table-column
:label=
"$t('创建时间')"
align=
"center"
prop=
"createTime"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
createTime
,
'
{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
...
...
@@ -140,18 +141,37 @@
align
=
"
center
"
class
-
name
=
"
small-padding fixed-width
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
el
-
button
v
-
if
=
"
scope.row.state == 0 ||scope.row.state == 1 || scope.row.state == 3
"
size
=
"
mini
"
@
click
=
"
handleAdd(scope.row.id)
"
v
-
hasPermi
=
"
['ecw:paymentVoucher:edit']
"
type
=
"
text
"
>
{{
$t
(
'
编辑
'
)
}}
<
/el-button
>
<
el
-
button
v
-
if
=
"
scope.row.state == 1 || scope.row.state == 3
"
size
=
"
mini
"
v
-
hasPermi
=
"
['ecw:paymentVoucher:process']
"
type
=
"
text
"
@
click
=
"
examineClick(scope.row.id)
"
>
{{
$t
(
'
审核
'
)
}}
<
/el-button
>
<
template
v
-
slot
=
"
{row
}
"
>
<
el
-
button
v
-
if
=
"
[0,2].includes(row.state)
"
size
=
"
mini
"
@
click
=
"
handleAdd(row.id)
"
v
-
hasPermi
=
"
['ecw:paymentVoucher:edit']
"
type
=
"
text
"
>
{{
$t
(
'
编辑
'
)
}}
<
/el-button
>
<!--
<
el
-
button
v
-
if
=
"
[1,3].includes(row.state)
"
size
=
"
mini
"
v
-
hasPermi
=
"
['ecw:paymentVoucher:process']
"
type
=
"
text
"
@
click
=
"
examineClick(scope.row.id)
"
>
{{
$t
(
'
审核
'
)
}}
<
/el-button>--
>
<
el
-
button
type
=
"
text
"
v
-
if
=
"
[1].includes(row.state)
"
@
click
=
"
bridgeFn(1, '取消审核',row)
"
>
{{
$t
(
'
取消审核
'
)
}}
<
/el-button
>
<
el
-
button
type
=
"
text
"
v
-
if
=
"
[1,7].includes(row.state)
"
>
{{
$t
(
'
审核详情
'
)
}}
<
/el-button
>
<
el
-
button
type
=
"
text
"
v
-
if
=
"
[4,7].includes(row.state)
"
@
click
=
"
bridgeFn(2, '取消付款单反审核',row)
"
>
{{
$t
(
'
取消反审核
'
)
}}
<
/el-button
>
<
el
-
button
type
=
"
text
"
v
-
if
=
"
[5].includes(row.state)
"
@
click
=
"
bridgeFn(3, '取消付款单核销',row)
"
>
{{
$t
(
'
取消核销审核
'
)
}}
<
/el-button
>
<
el
-
button
v
-
if
=
"
scope.row.state == 2
"
size
=
"
mini
"
type
=
"
text
"
v
-
hasPermi
=
"
['ecw:paymentVoucher:print']
"
@
click
=
"
verifyCancelClick(scope.row)
"
>
{{
$t
(
'
反审核
'
)
}}
<
/el-button
>
<
el
-
button
v
-
if
=
"
scope.row.state == 2
"
size
=
"
mini
"
type
=
"
text
"
v
-
hasPermi
=
"
['ecw:paymentVoucher:writeOff']
"
@
click
=
"
verificationClick(scope.row)
"
>
{{
$t
(
'
核销
'
)
}}
<
/el-button
>
<
el
-
button
v
-
if
=
"
[4].includes(row.state)
"
size
=
"
mini
"
type
=
"
text
"
v
-
hasPermi
=
"
['ecw:paymentVoucher:print']
"
@
click
=
"
verifyCancelClick(row)
"
>
{{
$t
(
'
反审核
'
)
}}
<
/el-button
>
<
el
-
button
v
-
if
=
"
[4].includes(row.state)
"
size
=
"
mini
"
type
=
"
text
"
v
-
hasPermi
=
"
['ecw:paymentVoucher:writeOff']
"
@
click
=
"
verificationClick(row)
"
>
{{
$t
(
'
核销
'
)
}}
<
/el-button
>
<
el
-
button
v
-
if
=
"
scope.row.state == 4
"
size
=
"
mini
"
type
=
"
text
"
v
-
hasPermi
=
"
['ecw:paymentVoucher:cancelWriteOff']
"
@
click
=
"
verificationCancelClick(scope.row)
"
>
{{
$t
(
'
反核销
'
)
}}
<
/el-button
>
<
el
-
button
v
-
if
=
"
[6].includes(row.state)
"
size
=
"
mini
"
type
=
"
text
"
v
-
hasPermi
=
"
['ecw:paymentVoucher:cancelWriteOff']
"
@
click
=
"
verificationCancelClick(row)
"
>
{{
$t
(
'
反核销
'
)
}}
<
/el-button
>
<!--
<
el
-
button
v
-
if
=
"
scope.row.state == 3
"
size
=
"
mini
"
type
=
"
text
"
>
{{
$t
(
'
开票
'
)
}}
<
/el-button> --
>
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
@
click
=
"
toprint(scope.row.id)
"
v
-
hasPermi
=
"
['ecw:paymentVoucher:print']
"
>
{{
$t
(
'
打印
'
)
}}
<
/el-button
>
<
el
-
button
v
-
if
=
"
scope.row.state == 1 || scope.row.state == 3
"
size
=
"
mini
"
type
=
"
text
"
v
-
hasPermi
=
"
['ecw:paymentVoucher:delete']
"
@
click
=
"
deleteClick(scope.row)
"
>
{{
$t
(
'
删除
'
)
}}
<
/el-button
>
<
el
-
button
v
-
if
=
"
[6,4].includes(row.state)
"
size
=
"
mini
"
type
=
"
text
"
@
click
=
"
toprint(row.id)
"
v
-
hasPermi
=
"
['ecw:paymentVoucher:print']
"
>
{{
$t
(
'
打印
'
)
}}
<
/el-button
>
<
el
-
button
v
-
if
=
"
[0,2].includes(row.state)
"
size
=
"
mini
"
type
=
"
text
"
v
-
hasPermi
=
"
['ecw:paymentVoucher:delete']
"
@
click
=
"
deleteClick(row)
"
>
{{
$t
(
'
删除
'
)
}}
<
/el-button
>
<!--
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
@
click
=
"
open = true
"
>
{{
$t
(
'
导出订单
'
)
}}
<
/el-button> --
>
<
/template
>
<
/el-table-column
>
...
...
@@ -182,26 +202,50 @@
<
/div
>
<
div
class
=
"
dialog-footer
"
>
<
el
-
button
type
=
"
primary
"
style
=
"
width: 130px
"
@
click
=
"
submitForm
"
>
{{
$t
(
'
国内账单
'
)
}}
<
/el-butto
n
>
{{
$t
(
'
国内账单
'
)
}}
<
/el-butto
n
>
<
el
-
button
plain
type
=
"
primary
"
style
=
"
width: 130px; margin: 0
"
@
click
=
"
submitForm
"
>
Debite
note
<
/el-butto
n
>
Debite
note
<
/el-butto
n
>
<
/div
>
<
/el-dialog
>
<!--
对话框
审核
-->
<
el
-
dialog
width
=
"
30%
"
:
title
=
"
examineTitle
"
:
visible
.
sync
=
"
examineShow
"
>
<
div
class
=
"
cancel_content
"
>
<
span
>
{{
$t
(
'
申请理由
'
)
}}
<
/span
>
<
el
-
input
type
=
"
textarea
"
:
rows
=
"
6
"
v
-
model
=
"
cancelReason
"
:
placeholder
=
"
$t('请输入取消理由')
"
><
/el-input
>
<
/div
>
<
span
slot
=
"
footer
"
class
=
"
dialog-footers
"
>
<
el
-
button
type
=
"
primary
"
@
click
=
"
cancelWriteOffClick()
"
>
{{
$t
(
'
提交
'
)
}}
<
/el-button
>
<
el
-
button
@
click
=
"
examineShow = false
"
>
{{
$t
(
'
取消
'
)
}}
<
/el-button
>
<
/span
>
<
/el-dialog
>
<
/div
>
<
/template
>
<
script
>
import
{
userList
,
listSimpleUsers
}
from
"
@/api/system/user
"
;
import
{
DICT_TYPE
}
from
"
@/utils/dict
"
;
import
{
userList
,
listSimpleUsers
}
from
"
@/api/system/user
"
;
import
{
DICT_TYPE
}
from
"
@/utils/dict
"
;
import
CustomerSelector
from
"
@/components/CustomerSelector
"
;
import
{
getSupplierPage
}
from
"
@/api/ecw/supplier
"
;
import
{
getPaymentList
,
deletePayment
,
paymentVerification
,
paymentVerificationCancel
,
paymentVerifyCancel
}
from
"
@/api/ecw/financial
"
import
{
getSupplierPage
}
from
"
@/api/ecw/supplier
"
;
import
{
getPaymentList
,
deletePayment
,
paymentVerification
,
paymentVerificationCancel
,
paymentVerifyCancel
,
cancelFinancePaymentApproval
,
cancelFinancePaymentApprovalNo
,
cancelFinancePaymentWriteOff
,
cancelFinancePaymentWriteOffNo
}
from
"
@/api/ecw/financial
"
export
default
{
name
:
"
EcwFinancialPaymentvoucher
"
,
...
...
@@ -210,6 +254,11 @@ export default {
}
,
data
()
{
return
{
examineShow
:
false
,
examineTitle
:
''
,
examineIndex
:
0
,
examineData
:
{
}
,
cancelReason
:
''
,
open
:
false
,
showSearch
:
true
,
loadings
:
false
,
...
...
@@ -245,15 +294,15 @@ export default {
}
,
}
;
}
,
activated
(){
activated
()
{
this
.
handleQuery
()
}
,
created
()
{
let
that
=
this
;
listSimpleUsers
().
then
((
res
)
=>
(
that
.
creatorData
=
res
.
data
));
// userList("salesman").then((res) => (that.creatorData = res.data));
getSupplierPage
({
pageNo
:
"
1
"
,
pageSize
:
"
10000
"
}
).
then
((
res
)
=>
{
const
{
data
}
=
res
;
getSupplierPage
({
pageNo
:
"
1
"
,
pageSize
:
"
10000
"
}
).
then
((
res
)
=>
{
const
{
data
}
=
res
;
this
.
allSupplier
=
data
.
list
;
}
);
this
.
getList
()
...
...
@@ -263,7 +312,7 @@ export default {
getList
()
{
this
.
loading
=
true
;
// 处理查询参数
let
params
=
{
...
this
.
queryParams
}
;
let
params
=
{
...
this
.
queryParams
}
;
this
.
addBeginAndEndTime
(
params
,
this
.
queryParams
.
beginCreateTime
,
"
createTime
"
);
// 执行查询
getPaymentList
(
params
).
then
((
response
)
=>
{
...
...
@@ -272,7 +321,7 @@ export default {
this
.
loading
=
false
;
}
);
}
,
paymentDetail
(
row
){
paymentDetail
(
row
)
{
const
id
=
row
.
id
;
return
this
.
$router
.
push
(
"
paymentDetail?id=
"
+
id
);
}
,
...
...
@@ -302,39 +351,43 @@ export default {
}
,
deleteClick
(
row
)
{
const
id
=
row
.
id
;
this
.
$modal
.
confirm
(
this
.
$t
(
'
是否确认删除该付款单
'
)
+
'
?
'
).
then
(
function
()
{
this
.
$modal
.
confirm
(
this
.
$t
(
'
是否确认删除该付款单
'
)
+
'
?
'
).
then
(
function
()
{
return
deletePayment
(
id
);
}
).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
this
.
$t
(
'
删除成功
'
));
}
).
catch
(()
=>
{
}
);
}
).
catch
(()
=>
{
}
);
}
,
verificationClick
(
row
)
{
const
id
=
row
.
id
;
this
.
$modal
.
confirm
(
this
.
$t
(
'
您确认要核销吗
'
)
+
'
?
'
).
then
(
function
()
{
this
.
$modal
.
confirm
(
this
.
$t
(
'
您确认要核销吗
'
)
+
'
?
'
).
then
(
function
()
{
return
paymentVerification
(
id
);
}
).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
this
.
$t
(
'
核销成功
'
));
}
).
catch
(()
=>
{
}
);
}
).
catch
(()
=>
{
}
);
}
,
verificationCancelClick
(
row
)
{
const
id
=
row
.
id
;
this
.
$modal
.
confirm
(
this
.
$t
(
'
您确认要反核销吗
'
)
+
'
?
'
).
then
(
function
()
{
this
.
$modal
.
confirm
(
this
.
$t
(
'
您确认要反核销吗
'
)
+
'
?
'
).
then
(
function
()
{
return
paymentVerificationCancel
(
id
);
}
).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
this
.
$t
(
'
反核销成功
'
));
}
).
catch
(()
=>
{
}
);
}
).
catch
(()
=>
{
}
);
}
,
verifyCancelClick
(
row
)
{
const
id
=
row
.
id
;
this
.
$modal
.
confirm
(
this
.
$t
(
'
您确认要反审核吗
'
)
+
'
?
'
).
then
(
function
()
{
this
.
$modal
.
confirm
(
this
.
$t
(
'
您确认要反审核吗
'
)
+
'
?
'
).
then
(
function
()
{
return
paymentVerifyCancel
(
id
);
}
).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
this
.
$t
(
'
反审核成功
'
));
}
).
catch
(()
=>
{
}
);
}
).
catch
(()
=>
{
}
);
}
,
toprint
(
id
)
{
return
this
.
$router
.
push
(
"
printPaymentVoucher?id=
"
+
id
);
...
...
@@ -346,14 +399,50 @@ export default {
cancel
()
{
this
.
open
=
false
;
}
,
bridgeFn
(
index
,
title
,
row
)
{
this
.
examineIndex
=
index
;
this
.
examineTitle
=
title
;
this
.
examineData
=
row
;
this
.
examineShow
=
true
;
}
,
cancelWriteOffClick
()
{
if
(
!
this
.
cancelReason
){
return
this
.
$message
.
warning
(
this
.
$t
(
'
请输入申请理由!
'
))
}
let
successFn
=
()
=>
{
this
.
getList
();
this
.
$message
(
'
取消成功
'
);
this
.
examineShow
=
false
;
}
let
loserFn
=
()
=>
{
this
.
examineShow
=
false
;
}
let
{
id
:
paymentId
}
=
this
.
examineData
let
p
=
{
paymentId
,
remark
:
this
.
cancelReason
}
switch
(
this
.
examineIndex
)
{
case
1
:
// 取消审核
cancelFinancePaymentApproval
(
p
).
then
(
successFn
,
loserFn
)
break
case
2
:
// 取消付款单反审核
cancelFinancePaymentApprovalNo
(
p
).
then
(
successFn
,
loserFn
)
break
case
3
:
//取消付款单核销
cancelFinancePaymentWriteOffNo
(
p
).
then
(
successFn
,
loserFn
)
case
4
:
}
}
}
,
}
;
<
/script
>
<
style
scoped
>
<
style
scoped
>
.
card
{
margin
-
top
:
20
px
;
}
.
dialog
-
footer
{
padding
:
30
px
;
display
:
flex
;
...
...
@@ -362,6 +451,7 @@ export default {
justify
-
content
:
space
-
between
;
height
:
160
px
;
}
.
card
-
title
{
font
-
size
:
18
px
;
font
-
weight
:
bold
;
...
...
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