Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
薪
薪瑞通-前端
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
许珑标
薪瑞通-前端
Commits
780b17d6
Commit
780b17d6
authored
Jun 27, 2025
by
谢子梦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stage:发薪批次结束
parent
f128740e
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1054 additions
and
39 deletions
+1054
-39
src/api/business/payOrder.js
src/api/business/payOrder.js
+53
-0
src/views/business/onlineTaskInfo/index.vue
src/views/business/onlineTaskInfo/index.vue
+33
-29
src/views/business/onlineTaskInfo/payBatchSettlement.vue
src/views/business/onlineTaskInfo/payBatchSettlement.vue
+551
-0
src/views/business/onlineTaskInfo/taskPayToAli.vue
src/views/business/onlineTaskInfo/taskPayToAli.vue
+416
-9
src/views/business/payOrder/batchToAli.vue
src/views/business/payOrder/batchToAli.vue
+1
-1
No files found.
src/api/business/payOrder.js
View file @
780b17d6
...
...
@@ -102,3 +102,56 @@ export function getDetailHistory(query) {
params
:
query
})
}
// 新版批量支付
export
function
newBatchPay
(
data
)
{
return
request
({
url
:
'
/business/taskBatch/create
'
,
method
:
'
post
'
,
data
:
data
})
}
// 查询发薪批次信息
export
function
getBatchInfoAPI
(
id
)
{
return
request
({
url
:
`/business/taskBatch/getInfo/
${
id
}
`
,
method
:
'
get
'
})
}
// 查询发薪批次人员-分页查询
export
function
listBatchInfoAPI
(
query
)
{
return
request
({
url
:
'
/business/taskStaff/list
'
,
method
:
'
get
'
,
params
:
query
})
}
// 新增发薪批次人员
export
function
addBatchInfoAPI
(
data
)
{
return
request
({
url
:
'
/business/taskBatch/staff/add
'
,
method
:
'
post
'
,
data
:
data
})
}
// 删除发薪批次人员
export
function
delBatchInfoAPI
(
ids
)
{
return
request
({
url
:
`/business/taskBatch/staff/remove/
${
ids
}
`
,
method
:
'
get
'
})
}
// 修改发薪批次人员
export
function
updateBatchInfoAPI
(
data
)
{
return
request
({
url
:
'
/business/taskBatch/staff/edit
'
,
method
:
'
post
'
,
data
:
data
})
}
// 结算预览
export
function
previewSettleAPI
(
id
)
{
return
request
({
url
:
`/business/taskBatch/settlement/preview/
${
id
}
`
,
method
:
'
get
'
})
}
src/views/business/onlineTaskInfo/index.vue
View file @
780b17d6
...
...
@@ -59,7 +59,7 @@
<el-table
:data=
"onlineTaskInfoList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"任务编号"
align=
"center"
prop=
"taskNo"
fixed=
"left"
/>
<el-table-column
label=
"任务编号"
align=
"center"
prop=
"taskNo"
fixed=
"left"
/>
<el-table-column
label=
"任务名称"
align=
"center"
prop=
"taskName"
fixed=
"left"
/>
<el-table-column
label=
"状态"
align=
"center"
prop=
"status"
>
<template
slot-scope=
"scope"
>
...
...
@@ -69,16 +69,16 @@
<el-table-column
label=
"所属行业"
align=
"center"
prop=
"industry"
/>
<el-table-column
label=
"发起企业名称"
align=
"center"
prop=
"companyName"
/>
<el-table-column
label=
"代发企业名称"
align=
"center"
prop=
"taxCompanyName"
/>
<el-table-column
label=
"任务金额"
align=
"center"
prop=
"amount"
/>
<el-table-column
label=
"税率"
align=
"center"
prop=
"taxRate"
/>
<el-table-column
label=
"税费"
align=
"center"
prop=
"taxAmount"
/>
<!-- <el-table-column label="结算金额" align="center" prop="amount"/>-->
<el-table-column
label=
"任务金额"
align=
"center"
prop=
"amount"
/>
<el-table-column
label=
"税率"
align=
"center"
prop=
"taxRate"
/>
<el-table-column
label=
"税费"
align=
"center"
prop=
"taxAmount"
/>
<!-- <el-table-column label="结算金额" align="center" prop="amount"/>-->
<el-table-column
label=
"所在区域"
align=
"center"
prop=
"area"
/>
<!-- <el-table-column label="详细地址" align="center" prop="address" />-->
<el-table-column
label=
"服务时间"
align=
"center"
prop=
"serviceTime"
/>
<el-table-column
label=
"零工人数"
align=
"center"
prop=
"needNum"
/>
<!-- <el-table-column label="计费说明" align="center" prop="billDesc" />-->
<!-- <el-table-column label="任务详情" align="center" prop="billDetail" />-->
<!-- <el-table-column label="计费说明" align="center" prop="billDesc" />-->
<!-- <el-table-column label="任务详情" align="center" prop="billDetail" />-->
<el-table-column
label=
"发布时间"
align=
"center"
prop=
"releaseTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
</span>
...
...
@@ -86,13 +86,13 @@
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
fixed=
"right"
>
<
template
slot-scope=
"scope"
>
<el-button
v-if=
"scope.row.status == 0 && checkPermi(['business:onlineTaskInfo:recived'])"
size=
"mini"
type=
"text"
icon=
"el-icon-s-order"
@
click=
"setTaxRate(scope.row)"
>
设置税率
</el-button>
<el-button
v-if=
"scope.row.status == 1 && checkPermi(['business:onlineTaskInfo:add'])"
size=
"mini"
type=
"text"
icon=
"el-icon-s-check"
@
click=
"sealContract(scope.row)"
>
确认任务
</el-button>
<el-button
v-if=
"scope.row.status == 0 && checkPermi(['business:onlineTaskInfo:recived'])"
size=
"mini"
type=
"text"
icon=
"el-icon-s-order"
@
click=
"setTaxRate(scope.row)"
>
设置税率
</el-button>
<el-button
v-if=
"scope.row.status == 1 && checkPermi(['business:onlineTaskInfo:add'])"
size=
"mini"
type=
"text"
icon=
"el-icon-s-check"
@
click=
"sealContract(scope.row)"
>
确认任务
</el-button>
<el-button
v-if=
"scope.row.status == 10 || scope.row.status == 11 || scope.row.status == 21"
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"prviewPdfUrl(scope.row)"
>
查看合同
</el-button>
<el-button
v-if=
"scope.row.status == 10 || scope.row.status == 11 || scope.row.status == 21"
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"prviewPdfUrl(scope.row)"
>
查看合同
</el-button>
<el-button
v-if=
"scope.row.status == 10 && checkPermi(['business:onlineTaskInfo:release'])"
size=
"mini"
type=
"text"
icon=
"el-icon-s-promotion"
@
click=
"handleRelease(scope.row)"
>
发布任务
</el-button>
<el-button
v-if=
"scope.row.status == 11 && checkPermi(['business:onlineTaskInfo:recived'])"
size=
"mini"
...
...
@@ -135,7 +135,8 @@
</el-form-item>
<el-form-item
label=
"发起企业"
prop=
"companyId"
>
<el-select
v-model=
"form.companyId"
placeholder=
"请选择发起企业"
@
change=
"applyCompanyChange"
>
<el-option
v-for=
"item in applyCompanyList"
:key=
"item.id"
:label=
"item.companyName"
:value=
"item.id"
></el-option>
<el-option
v-for=
"item in applyCompanyList"
:key=
"item.id"
:label=
"item.companyName"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"任务名称"
prop=
"taskName"
>
...
...
@@ -146,11 +147,13 @@
</el-form-item>
<el-form-item
label=
"代发企业"
prop=
"taxCompanyId"
>
<el-select
v-model=
"form.taxCompanyId"
placeholder=
"请选择代发企业"
clearable
@
change=
"taxCompanyChange"
>
<el-option
v-for=
"item in taxCompanyList"
:key=
"item.id"
:label=
"item.taxUnitName"
:value=
"item.taxUnitId"
></el-option>
<el-option
v-for=
"item in taxCompanyList"
:key=
"item.id"
:label=
"item.taxUnitName"
:value=
"item.taxUnitId"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"任务金额"
prop=
"amount"
>
<el-input-number
v-model=
"form.amount"
:precision=
"2"
:step=
"1"
:min=
"1"
:max=
"999999999999.99"
placeholder=
"请输入任务金额"
style=
"width: 30%;"
/>
<el-input-number
v-model=
"form.amount"
:precision=
"2"
:step=
"1"
:min=
"1"
:max=
"999999999999.99"
placeholder=
"请输入任务金额"
style=
"width: 30%;"
/>
</el-form-item>
<el-form-item
label=
"服务时间"
prop=
"serviceTime"
>
<el-date-picker
clearable
placeholder=
"请选择服务时间"
v-model=
"form.serviceTimeArr"
@
change=
"changeServiceTime"
...
...
@@ -176,7 +179,7 @@
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
style=
"text-align: center;"
>
<el-button
type=
"primary"
@
click=
"handleNext(0)"
>
保存
</el-button>
<!-- <el-button type="primary" @click="handleNext(10)">下一步</el-button>-->
<!-- <el-button type="primary" @click="handleNext(10)">下一步</el-button>-->
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</div>
...
...
@@ -185,7 +188,7 @@
<iframe
:src=
this.contractUrl
style=
"width:100%;height:600px;"
frameborder=
"0"
></iframe>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
style=
"text-align: center;"
>
<!-- <el-button type="primary" @click="handlePrev">上一步</el-button>-->
<!-- <el-button type="primary" @click="handlePrev">上一步</el-button>-->
<el-button
type=
"primary"
@
click.native=
"confirmSealContractFile"
>
确认签订合同
</el-button>
</div>
</div>
...
...
@@ -244,14 +247,14 @@
<el-input
v-model=
"formTaxRate.taxCompanyName"
placeholder=
"请输入代发企业"
disabled
/>
</el-form-item>
<el-form-item
label=
"任务金额"
prop=
"amount"
>
<el-input-number
v-model=
"formTaxRate.amount"
placeholder=
"请输入任务金额"
style=
"width: 100%;"
/>
<el-input-number
v-model=
"formTaxRate.amount"
placeholder=
"请输入任务金额"
style=
"width: 100%;"
/>
</el-form-item>
<el-form-item
label=
"税率"
prop=
"taxRate"
>
<el-input-number
v-model=
"formTaxRate.taxRate"
placeholder=
"请输入税率"
style=
"width: 100%;"
:precision=
"6"
:step=
"0.001"
:min=
"0"
:max=
"1"
@
change=
"calcTaxAmount"
/>
<el-input-number
v-model=
"formTaxRate.taxRate"
placeholder=
"请输入税率"
style=
"width: 100%;"
:precision=
"6"
:step=
"0.001"
:min=
"0"
:max=
"1"
@
change=
"calcTaxAmount"
/>
</el-form-item>
<el-form-item
label=
"税费"
prop=
"taxAmount"
>
<el-input-number
v-model=
"formTaxRate.taxAmount"
placeholder=
"请输入税费"
disabled
style=
"width: 100%;"
/>
<el-input-number
v-model=
"formTaxRate.taxAmount"
placeholder=
"请输入税费"
disabled
style=
"width: 100%;"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
style=
"text-align: center;"
>
...
...
@@ -592,7 +595,7 @@ export default {
this
.
open
=
true
;
this
.
title
=
"
确认任务合同
"
;
this
.
$forceUpdate
();
}
else
{
}
else
{
this
.
$modal
.
msgError
(
response
.
message
);
}
});
...
...
@@ -786,15 +789,16 @@ export default {
toLinkAlipay
()
{
// this.$router.push({ path: "/transfer/batchToAli", query: { batchPayName: this.batchPayName, onlineTaskId: this.onlineTaskId } });
// this.payVisible = false
this
.
$router
.
push
({
path
:
"
/transfer/taskPayToAli
"
,
query
:
{
taskId
:
this
.
onlineTaskId
}
this
.
$router
.
push
({
path
:
"
/transfer/taskPayToAli
"
,
query
:
{
taskId
:
this
.
onlineTaskId
,
payeeType
:
2
}
});
this
.
payVisible
=
false
},
// 跳转到批量到银行卡
toLinkBankCard
()
{
console
.
log
(
this
.
batchPayName
)
this
.
$router
.
push
({
path
:
"
/transfer/
batchToBank
"
,
query
:
{
batchPayName
:
this
.
batchPayName
,
onlineTaskId
:
this
.
onlineTaskId
}
});
//
console.log(this.batchPayName)
this
.
$router
.
push
({
path
:
"
/transfer/
taskPayToAli
"
,
query
:
{
taskId
:
this
.
onlineTaskId
,
payeeType
:
1
}
});
this
.
payVisible
=
false
},
generateTimeCodeWithRandom
()
{
...
...
@@ -848,7 +852,7 @@ export default {
this
.
title
=
"
确认任务合同
"
;
this
.
taxRateVisible
=
true
;
this
.
$forceUpdate
();
}
else
{
}
else
{
this
.
$modal
.
msgError
(
"
获取任务信息失败:
"
+
(
response
.
msg
||
"
未知错误
"
));
}
}).
finally
(()
=>
{
...
...
src/views/business/onlineTaskInfo/payBatchSettlement.vue
0 → 100644
View file @
780b17d6
<
template
>
<!-- 发薪批次结算页面 -->
<div
class=
"app-container payBatchSettlement"
>
<div
class=
"card-box"
>
<el-descriptions
title=
""
:column=
"6"
>
<el-descriptions-item
label=
"任务编号"
>
{{
pageRemark
.
taskNo
}}
</el-descriptions-item>
<el-descriptions-item
label=
"任务状态"
:span=
"5"
:contentStyle=
"pageRemark.statusClassRuing"
>
{{
pageRemark
.
taskStatusDesc
}}
</el-descriptions-item>
</el-descriptions>
</div>
<div
class=
"card-box"
>
<el-descriptions
class=
"margin-top"
title=
"批次信息"
:column=
"2"
border
:labelStyle=
"labelStyle"
>
<!--
<template
slot=
"extra"
>
<el-button
type=
"primary"
size=
"small"
>
修改
</el-button>
</
template
>
-->
<el-descriptions-item>
<
template
slot=
"label"
>
发薪批次
</
template
>
{{ batchInfo.batchName }}
</el-descriptions-item>
<el-descriptions-item>
<
template
slot=
"label"
>
付款账号
</
template
>
{{ enumerationPayerAccNo(batchInfo.payerAccNo) }}
</el-descriptions-item>
<el-descriptions-item>
<
template
slot=
"label"
>
备注
</
template
>
{{ batchInfo.remark }}
</el-descriptions-item>
</el-descriptions>
</div>
<div
class=
"card-box"
>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"6"
>
<div
style=
"display: flex;align-items: center;justify-content: space-between;gap: 10px;"
>
<el-input
v-model=
"params.staffName"
size=
"mini"
@
change=
"searchEvt"
placeholder=
"输入姓名搜索"
/>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"searchEvt"
>
搜索
</el-button>
</div>
</el-col>
<el-col
:span=
"6"
:offset=
"12"
>
<div
style=
"display: flex;align-items: center;justify-content: flex-end;gap:4px;"
>
<el-button
type=
"primary"
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
>
新增
</el-button>
<el-button
type=
"danger"
icon=
"el-icon-delete"
size=
"mini"
:disabled=
"selectData.length == 0"
@
click=
"handleDelete"
>
删除
</el-button>
<el-button
type=
"success"
size=
"mini"
icon=
"el-icon-upload2"
@
click=
"importClick"
>
导入
</el-button>
</div>
</el-col>
</el-row>
<el-table
:data=
"dataList"
@
selection-change=
"handleSelectionChange"
:highlight-current-row=
"true"
:highlight-selection-row=
"true"
:stripe=
"true"
style=
"margin-top: 5px;"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"姓名"
align=
"center"
prop=
"staffName"
fixed
/>
<el-table-column
label=
"身份证号"
align=
"center"
prop=
"staffIdNo"
fixed
/>
<el-table-column
label=
"手机号码"
align=
"center"
prop=
"staffMobile"
/>
<el-table-column
label=
"收款账号"
align=
"center"
prop=
"staffAccNo"
fixed
/>
<el-table-column
label=
"账号类型"
align=
"center"
prop=
"staffAccType"
fixed
>
<
template
slot-scope=
"{row}"
>
<dict-tag
:options=
"dict.type.payee_acc_type"
:value=
"row.staffAccType"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"支付金额"
align=
"center"
prop=
"salaryAmount"
/>
<el-table-column
label=
"备注"
align=
"center"
prop=
"remark"
/>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"{row}"
>
<el-button
size=
"mini"
@
click=
"editStaffInfo(row)"
type=
"text"
icon=
"el-icon-edit"
>
编辑
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"delStaffInfo(row.id)"
style=
"color: #F56C6C;"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<div
style=
"display: flex;align-items: center;justify-content: flex-end;gap:32px;margin-top:12px;"
>
<span
v-if=
"batchInfo.taxMoney"
>
税费:{{ batchInfo.taxMoney }} 元
</span>
<span
v-if=
"batchInfo.staffCount"
>
员工数量:{{ batchInfo.staffCount }}
人
</span>
<span
v-if=
"batchInfo.totalAmount"
>
合计: {{ batchInfo.totalAmount }}
元
</span>
<el-pagination
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:page-sizes=
"[10, 20, 30, 40]"
:page-size=
"params.pageSize"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"total"
>
</el-pagination>
<el-button
type=
"primary"
icon=
"el-icon-view"
size=
"mini"
@
click=
"confirmPay"
:disabled=
"dataList.length == 0"
>
结算预览
</el-button>
</div>
</div>
<!-- 新增编辑对话框 -->
<el-dialog
:title=
"dialogTitle"
:visible.sync=
"dialogVisible"
width=
"600px"
append-to-body
>
<el-form
ref=
"form"
:model=
"dialogForm"
:rules=
"dialogRules"
label-width=
"120px"
>
<el-form-item
label=
"收款人户名"
prop=
"staffName"
>
<el-input
v-model=
"dialogForm.staffName"
placeholder=
"请输入收款人户名"
/>
</el-form-item>
<el-form-item
label=
"身份证号码"
prop=
"staffIdNo"
>
<el-input
v-model=
"dialogForm.staffIdNo"
placeholder=
"请输入收款人身份证号码"
/>
</el-form-item>
<el-form-item
label=
"收款人账户"
prop=
"staffAccNo"
>
<el-input
v-model=
"dialogForm.staffAccNo"
placeholder=
"请输入收款人账户"
/>
</el-form-item>
<el-form-item
label=
"手机号码"
prop=
"staffMobile"
>
<el-input
v-model=
"dialogForm.staffMobile"
placeholder=
"请输入收款人手机号"
/>
</el-form-item>
<el-form-item
label=
"金额"
prop=
"salaryAmount"
>
<el-input-number
style=
"width: 100%"
v-model=
"dialogForm.salaryAmount"
:precision=
"2"
:step=
"0.1"
placeholder=
"请输入支付金额"
/>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
v-model=
"dialogForm.remark"
placeholder=
"请输入支付备注"
/>
</el-form-item>
<el-row>
<el-col
:offset=
"4"
:span=
"20"
>
<el-alert
title=
"备注内容将展示在收款人的备注中;"
type=
"warning"
>
</el-alert>
</el-col>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"dialogSubmit"
>
确 定
</el-button>
<el-button
@
click=
"dialogClose"
>
取 消
</el-button>
</div>
</el-dialog>
<!-- 导入对话框 -->
<el-dialog
title=
"导入人员信息"
:visible.sync=
"upload.open"
width=
"400px"
append-to-body
>
<el-upload
ref=
"upload"
:limit=
"1"
accept=
".xlsx, .xls"
:headers=
"upload.headers"
:action=
"upload.url + '?batchId=' + batchInfo.id"
:disabled=
"upload.isUploading"
:on-progress=
"handleFileUploadProgress"
:on-success=
"handleFileSuccess"
:auto-upload=
"false"
drag
>
<i
class=
"el-icon-upload"
></i>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
<div
class=
"el-upload__tip text-center"
slot=
"tip"
>
<span
style=
"line-height: 28px;"
>
每次最大批量转账条数为一千条;
</span>
<br
/>
<span>
仅允许导入xls、xlsx格式文件。
</span>
<a
style=
"color:#1890ff;margin:0px;line-height:14px"
class=
"download"
download=
"收款人明细模板"
href=
"/收款人明细模板.xlsx"
target=
"_blank"
>
下载模板
</a>
</div>
</el-upload>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"importByExcel"
>
确 定
</el-button>
<el-button
@
click=
"upload.open = false"
>
取 消
</el-button>
</div>
</el-dialog>
<!-- 结算预览弹窗 -->
<el-dialog
title=
"结算预览"
:visible.sync=
"settlementPreviewDialog"
>
<el-descriptions
:column=
"2"
:border=
"true"
:labelStyle=
"labelStyle"
:contentStyle=
"contentStyle"
>
<el-descriptions-item
label=
"结算名称"
>
{{ settlementPreviewData.settlementName }}
</el-descriptions-item>
<el-descriptions-item
label=
"账户名"
>
{{ settlementPreviewData.accName }}
</el-descriptions-item>
<el-descriptions-item
label=
"账户余额"
>
{{ settlementPreviewData.balance }}
</el-descriptions-item>
<el-descriptions-item
label=
"零工人数"
>
{{ settlementPreviewData.staffCount }}
</el-descriptions-item>
<el-descriptions-item
label=
"发薪金额"
>
{{ settlementPreviewData.salaryAmount }}
</el-descriptions-item>
<el-descriptions-item
label=
"税费"
>
{{ settlementPreviewData.taxMoney }}
</el-descriptions-item>
<el-descriptions-item
label=
"税率"
>
{{ settlementPreviewData.taxRate }}
</el-descriptions-item>
<el-descriptions-item
label=
"合计金额"
>
{{ settlementPreviewData.totalAmount }}
</el-descriptions-item>
<el-descriptions-item
label=
"是否需要充值"
:labelStyle=
"{ width: '150px' }"
>
{{ settlementPreviewData.needRecharge ? '需要' : '不需要' }}
</el-descriptions-item>
</el-descriptions>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"settlementPreviewDialog = false"
>
取 消
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-s-promotion"
@
click=
"settlementPreviewDialog = false"
>
确认预览
</el-button>
</span>
</el-dialog>
</div>
</template>
<
script
>
import
{
getBatchInfoAPI
,
listBatchInfoAPI
,
addBatchInfoAPI
,
updateBatchInfoAPI
,
delBatchInfoAPI
,
previewSettleAPI
}
from
'
@/api/business/payOrder
'
import
{
getOnlineTaskInfo
}
from
"
@/api/business/onlineTaskInfo
"
;
import
{
signAccList
}
from
"
@/api/business/accInfo
"
;
import
{
getToken
}
from
'
@/utils/auth
'
export
default
{
name
:
'
PayBatchSettlement
'
,
dicts
:
[
'
task_status
'
,
'
pay_type_title
'
,
'
payee_acc_type
'
],
data
()
{
return
{
pageHeader
:
''
,
pageRemark
:
{
taskNo
:
''
,
taskStatusDesc
:
''
,
statusClassRuing
:
{}
},
payerAccList
:
[],
batchInfo
:
{
onlineTaskId
:
''
,
batchName
:
''
,
payerAccNo
:
''
,
remark
:
''
},
labelStyle
:
{
width
:
'
120px
'
},
contentStyle
:
{
width
:
'
380px
'
},
params
:
{
onlineBatchId
:
''
,
pageSize
:
10
,
pageNum
:
1
,
staffName
:
''
},
dataList
:
[],
total
:
0
,
selectData
:
[],
// 新增或修改弹窗数据参数
dialogVisible
:
false
,
dialogTitle
:
''
,
dialogForm
:
{
onlineTaskBatchId
:
''
,
staffAccType
:
''
,
staffName
:
''
,
staffIdNo
:
''
,
staffAccNo
:
''
,
staffMobile
:
''
,
salaryAmount
:
''
,
remark
:
''
},
dialogRules
:
{
payTitle
:
[
{
required
:
true
,
message
:
"
支付类型不能为空
"
,
trigger
:
"
blur
"
}
],
staffName
:
[
{
required
:
true
,
message
:
"
收款人户名不能为空
"
,
trigger
:
"
blur
"
}
],
staffAccNo
:
[
{
required
:
true
,
message
:
"
收款人账户不能为空
"
,
trigger
:
"
blur
"
}
],
payeeAccType
:
[
{
required
:
true
,
message
:
"
请选择收款账户类型
"
,
trigger
:
"
blur
"
}
],
salaryAmount
:
[
{
required
:
true
,
message
:
"
转账金额不能为空
"
,
trigger
:
"
blur
"
},
{
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
value
<
0.01
)
{
callback
(
new
Error
(
'
转账金额必须大于0
'
));
}
else
{
callback
();
}
},
trigger
:
'
blur
'
}
],
},
// 导入成员参数
upload
:
{
// 是否显示弹出层(用户导入)
open
:
false
,
// 是否禁用上传
isUploading
:
false
,
// 设置上传的请求头部
headers
:
{
Authorization
:
"
Bearer
"
+
getToken
()
},
// 上传的地址
url
:
process
.
env
.
VUE_APP_BASE_API
+
"
/business/taskBatch/staff/import
"
},
// 结算预览参数
settlementPreviewDialog
:
false
,
settlementPreviewData
:
{}
}
},
created
()
{
if
(
this
.
$route
.
query
.
id
)
{
this
.
getBatchInfoFN
(
this
.
$route
.
query
.
id
)
}
},
mounted
()
{
},
methods
:
{
// 点击结算按钮
confirmPay
()
{
previewSettleAPI
(
this
.
batchInfo
.
id
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
settlementPreviewDialog
=
true
this
.
settlementPreviewData
=
res
.
data
}
})
},
importByExcel
()
{
this
.
$refs
.
upload
.
submit
();
},
handleFileUploadProgress
(
event
,
file
,
fileList
)
{
this
.
upload
.
isUploading
=
true
;
},
// 文件上传成功处理
handleFileSuccess
(
response
,
file
,
fileList
)
{
this
.
upload
.
open
=
false
;
this
.
upload
.
isUploading
=
false
;
this
.
$refs
.
upload
.
clearFiles
();
this
.
$alert
(
"
<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>
"
+
response
.
msg
+
"
</div>
"
,
"
导入结果
"
,
{
dangerouslyUseHTMLString
:
true
});
this
.
batchInfo
.
totalAmount
=
response
.
data
.
totalAmount
this
.
batchInfo
.
taxMoney
=
response
.
data
.
taxMoney
this
.
batchInfo
.
staffCount
=
response
.
data
.
staffCount
this
.
getList
()
},
// 点击列表中的删除按钮(单个)
delStaffInfo
(
id
)
{
this
.
$confirm
(
'
你确定要删除该员工信息吗?
'
,
'
提示
'
,
{
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
}).
then
(()
=>
{
delBatchInfoAPI
(
id
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
({
type
:
'
success
'
,
message
:
'
删除成功!
'
});
this
.
batchInfo
.
totalAmount
=
res
.
data
.
totalAmount
this
.
batchInfo
.
taxMoney
=
res
.
data
.
taxMoney
this
.
batchInfo
.
staffCount
=
res
.
data
.
staffCount
this
.
getList
()
}
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'
info
'
,
message
:
'
已取消删除
'
});
});
},
// 点击修改发新员工按钮方法
editStaffInfo
(
row
)
{
this
.
dialogForm
=
JSON
.
parse
(
JSON
.
stringify
(
row
))
this
.
dialogTitle
=
'
编辑员工信息
'
this
.
dialogVisible
=
true
},
// 操作对话框取消方法
dialogClose
()
{
this
.
dialogForm
=
{
onlineTaskBatchId
:
''
,
staffAccType
:
''
,
staffName
:
''
,
staffIdNo
:
''
,
staffAccNo
:
''
,
staffMobile
:
''
,
salaryAmount
:
''
,
remark
:
''
}
this
.
$refs
.
form
.
resetFields
();
},
// 操作对话框确认按钮方法
dialogSubmit
()
{
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
this
.
dialogForm
.
id
)
{
updateBatchInfoAPI
(
this
.
dialogForm
).
then
(
res
=>
{
this
.
$message
({
message
:
'
编辑成功
'
,
type
:
'
success
'
});
this
.
$refs
.
form
.
resetFields
();
this
.
dialogVisible
=
false
this
.
batchInfo
.
totalAmount
=
res
.
data
.
totalAmount
this
.
batchInfo
.
taxMoney
=
res
.
data
.
taxMoney
this
.
batchInfo
.
staffCount
=
res
.
data
.
staffCount
this
.
getList
()
})
}
else
{
addBatchInfoAPI
(
this
.
dialogForm
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
({
message
:
'
添加成功
'
,
type
:
'
success
'
});
this
.
$refs
.
form
.
resetFields
();
this
.
dialogVisible
=
false
this
.
batchInfo
.
totalAmount
=
res
.
data
.
totalAmount
this
.
batchInfo
.
taxMoney
=
res
.
data
.
taxMoney
this
.
batchInfo
.
staffCount
=
res
.
data
.
staffCount
this
.
getList
()
}
})
}
}
})
},
// 枚举付款账户
enumerationPayerAccNo
(
val
)
{
let
name
=
''
this
.
payerAccList
.
forEach
(
ele
=>
{
if
(
ele
.
payAccNo
==
val
)
{
name
=
ele
.
payAccName
+
'
-
'
+
ele
.
payAccNo
}
})
return
name
},
// 新增方法
handleAdd
()
{
this
.
dialogForm
=
{
onlineTaskBatchId
:
this
.
batchInfo
.
id
,
staffAccType
:
this
.
batchInfo
.
transferType
,
staffName
:
''
,
staffIdNo
:
''
,
staffAccNo
:
''
,
staffMobile
:
''
,
salaryAmount
:
''
,
remark
:
''
}
this
.
dialogTitle
=
'
新增员工信息
'
this
.
dialogVisible
=
true
},
// 导入方法
importClick
()
{
// this.$refs["batchForm"].validate(valid => {
// if (valid) {
this
.
upload
.
open
=
true
// }
// });
},
// 删除方法(批量删除)
handleDelete
()
{
let
ids
=
this
.
selectData
.
join
(
'
,
'
)
this
.
$confirm
(
'
你确定要删除这批员工信息吗?
'
,
'
提示
'
,
{
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
}).
then
(()
=>
{
delBatchInfoAPI
(
ids
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
({
type
:
'
success
'
,
message
:
'
删除成功!
'
});
this
.
selectData
=
[]
this
.
batchInfo
.
totalAmount
=
res
.
data
.
totalAmount
this
.
batchInfo
.
taxMoney
=
res
.
data
.
taxMoney
this
.
batchInfo
.
staffCount
=
res
.
data
.
staffCount
this
.
getList
()
}
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'
info
'
,
message
:
'
已取消删除
'
});
});
},
searchEvt
()
{
this
.
getList
()
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
// console.log('当前选择的数据', selection);
this
.
selectData
=
[]
if
(
selection
.
length
)
{
selection
.
forEach
(
ele
=>
{
this
.
selectData
.
push
(
ele
.
id
)
});
}
},
getList
()
{
this
.
$modal
.
loading
(
'
加载中...
'
)
listBatchInfoAPI
(
this
.
params
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
dataList
=
res
.
rows
this
.
total
=
res
.
total
}
}).
finally
(()
=>
{
this
.
$modal
.
closeLoading
();
})
},
handleSizeChange
(
val
)
{
this
.
params
.
pageSize
=
val
this
.
getList
()
},
handleCurrentChange
(
val
)
{
this
.
params
.
pageNum
=
val
this
.
getList
()
},
getBatchInfoFN
(
id
)
{
getBatchInfoAPI
(
id
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
batchInfo
=
res
.
data
this
.
pageInit
(
this
.
batchInfo
.
onlineTaskId
)
this
.
params
.
onlineBatchId
=
this
.
batchInfo
.
onlineTaskId
this
.
getList
()
}
})
},
// 页面初始化
async
pageInit
(
onlineTaskId
)
{
if
(
!
onlineTaskId
)
{
return
this
.
$modal
.
msgWarning
(
"
操作异常
"
)
}
this
.
$modal
.
loading
()
let
companyId
,
taxUnitId
;
try
{
await
getOnlineTaskInfo
(
onlineTaskId
).
then
(
resp
=>
{
this
.
pageHeader
=
resp
[
'
data
'
][
'
taskName
'
]
this
.
pageRemark
.
taskNo
=
resp
[
'
data
'
][
'
taskNo
'
]
if
(
resp
[
'
data
'
][
'
status
'
]
===
21
)
{
this
.
pageRemark
.
statusClassRuing
=
{
'
color
'
:
'
rgb(103, 194, 58)
'
}
}
const
taskStatus
=
this
.
dict
.
type
[
'
task_status
'
].
find
(
item
=>
item
.
value
==
resp
.
data
[
'
status
'
])
this
.
pageRemark
.
taskStatusDesc
=
taskStatus
.
label
companyId
=
resp
[
'
data
'
][
'
companyId
'
]
taxUnitId
=
resp
[
'
data
'
][
'
taxCompanyId
'
]
})
if
(
companyId
&&
taxUnitId
)
{
await
signAccList
(
taxUnitId
,
companyId
).
then
(
resp
=>
{
this
.
payerAccList
=
resp
})
}
}
finally
{
this
.
$modal
.
closeLoading
()
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.
payBatchSettlement
:
:
v-deep
{
.card-box
{
padding
:
12px
12px
;
box-shadow
:
0
2px
4px
rgba
(
0
,
0
,
0
,
.12
)
,
0
0
6px
rgba
(
0
,
0
,
0
,
.04
);
margin-top
:
22px
;
}
.card-box
:first-child
{
margin-top
:
0px
;
}
.el-descriptions--small
{
font-size
:
14px
!
important
;
}
}
</
style
>
\ No newline at end of file
src/views/business/onlineTaskInfo/taskPayToAli.vue
View file @
780b17d6
...
...
@@ -7,19 +7,183 @@
{{
pageRemark
.
taskStatusDesc
}}
</el-descriptions-item>
</el-descriptions>
<!-- 批量发放部分 -->
<div
style=
"padding:10px 10px 10px 10px;box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04);margin-top:12px"
>
<el-form
ref=
"batchForm"
:model=
"batchForm"
:rules=
"batchRules"
label-width=
"120px"
>
<h3>
批次信息
</h3>
<el-row
:gutter=
"10"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"发薪批次"
prop=
"batchName"
>
<el-input
v-model=
"batchForm.batchName"
placeholder=
"请输入发薪批次"
/>
</el-form-item>
</el-col>
<!--
<el-col
:span=
"8"
>
<el-alert
title=
"此信息不会展示给收款人,只在系统中展示便于后期查询;"
type=
"warning"
>
</el-alert>
</el-col>
-->
<el-col
:span=
"12"
>
<el-form-item
label=
"付款账号"
prop=
"payerAccNo"
>
<el-select
v-model=
"batchForm.payerAccNo"
>
<el-option
v-for=
"item in payerAccList"
:key=
"item.payAccNo"
:label=
"item.payAccName + ' - ' + item.payAccNo"
:value=
"item.payAccNo"
></el-option>
</el-select>
</el-form-item>
</el-col>
<!--
<el-col
:span=
"12"
>
<el-form-item
label=
"支付类型"
prop=
"payTitle"
>
<el-select
v-model=
"batchForm.payTitle"
placeholder=
"请选择支付类型"
>
<el-option
v-for=
"dict in dict.type.pay_type_title"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
</el-col>
-->
<el-col
:span=
"12"
>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
v-model=
"batchForm.remark"
placeholder=
"请输入支付备注"
/>
</el-form-item>
</el-col>
<!--
<el-col
:offset=
"14"
:span=
"10"
>
<el-alert
title=
"此信息将展示在收款人的备注中;"
type=
"warning"
>
</el-alert>
</el-col>
-->
</el-row>
</el-form>
</div>
<div
style=
"padding:10px;margin-top:10px;box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04)"
>
<h3>
零工信息管理
</h3>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"6"
>
<div
style=
"display: flex;align-items: center;justify-content: space-between;gap: 10px;"
>
<el-input
v-model=
"page.search"
size=
"mini"
@
change=
"searchEvt"
placeholder=
"输入姓名搜索"
/>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"searchEvt"
>
搜索
</el-button>
</div>
</el-col>
<el-col
:span=
"6"
:offset=
"12"
>
<div
style=
"display: flex;align-items: center;justify-content: flex-end;gap:4px;"
>
<el-button
type=
"primary"
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
>
新增
</el-button>
<el-button
type=
"danger"
icon=
"el-icon-delete"
size=
"mini"
:disabled=
"multiple"
@
click=
"handleDelete"
>
删除
</el-button>
<el-button
type=
"success"
size=
"mini"
icon=
"el-icon-upload2"
@
click=
"importClick"
>
导入
</el-button>
</div>
</el-col>
</el-row>
<el-table
v-loading=
"loading"
:data=
"page.rows"
@
selection-change=
"handleSelectionChange"
:highlight-current-row=
"true"
:highlight-selection-row=
"true"
:stripe=
"true"
style=
"margin-top: 5px;"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"姓名"
align=
"center"
prop=
"staffName"
fixed
/>
<el-table-column
label=
"身份证号"
align=
"center"
prop=
"staffIdNo"
fixed
/>
<el-table-column
label=
"手机号码"
align=
"center"
prop=
"staffMobile"
/>
<el-table-column
label=
"收款账号"
align=
"center"
prop=
"staffAccNo"
fixed
/>
<el-table-column
label=
"账号类型"
align=
"center"
prop=
"staffAccType"
fixed
>
<template>
<dict-tag
:options=
"dict.type.payee_acc_type"
:value=
"payeeType"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"支付金额"
align=
"center"
prop=
"salaryAmount"
/>
<el-table-column
label=
"备注"
align=
"center"
prop=
"remark"
/>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row.indexKey, 'delRow')"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<el-pagination
style=
"margin-top: 10px"
v-show=
"page.total && page.total > 0"
@
current-change=
"handleCurrentChange"
:current-page=
"page.pageNum"
:page-size=
"page.pageSize"
@
size-change=
"handlePageSizeChange"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"page.total"
>
</el-pagination>
<el-row
:gutter=
"10"
class=
"mb8"
style=
"margin-top: 15px"
>
<el-col
:span=
"1.5"
style=
"float: right"
>
<span
v-if=
"page.total"
>
员工数量:{{ transMap.size }} 人
</span>
<span
style=
"margin-left: 100px"
v-if=
"page.total"
>
合计: {{ page.countAmount }} 元
</span>
<el-button
style=
"margin-left: 100px"
type=
"primary"
icon=
"el-icon-s-promotion"
size=
"mini"
@
click=
"confirmPay"
>
提交任务
</el-button>
</el-col>
</el-row>
</div>
<!-- 添加或修改 批量支付明细对话框 -->
<el-dialog
title=
"新增收款人"
:visible.sync=
"addPanelOpen"
width=
"600px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
>
<el-form-item
label=
"收款人户名"
prop=
"staffName"
>
<el-input
v-model=
"form.staffName"
placeholder=
"请输入收款人户名"
/>
</el-form-item>
<el-form-item
label=
"身份证号码"
prop=
"staffIdNo"
>
<el-input
v-model=
"form.staffIdNo"
placeholder=
"请输入收款人身份证号码"
/>
</el-form-item>
<el-form-item
label=
"收款人账户"
prop=
"staffAccNo"
>
<el-input
v-model=
"form.staffAccNo"
placeholder=
"请输入收款人账户"
/>
</el-form-item>
<el-form-item
label=
"手机号码"
prop=
"staffMobile"
>
<el-input
v-model=
"form.staffMobile"
placeholder=
"请输入收款人手机号"
/>
</el-form-item>
<el-form-item
label=
"金额"
prop=
"salaryAmount"
>
<el-input-number
style=
"width: 100%"
v-model=
"form.salaryAmount"
:precision=
"2"
:step=
"0.1"
placeholder=
"请输入支付金额"
/>
</el-form-item>
<!-- <el-form-item label="支付类型" prop="payTitle">
<el-select v-model="form.payTitle" placeholder="请选择支付类型">
<el-option v-for="dict in dict.type.pay_type_title" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item> -->
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
v-model=
"form.remark"
placeholder=
"请输入支付备注"
/>
</el-form-item>
<el-row>
<el-col
:offset=
"4"
:span=
"20"
>
<el-alert
title=
"备注内容将展示在收款人的备注中;"
type=
"warning"
>
</el-alert>
</el-col>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"addDetail"
>
确 定
</el-button>
<el-button
@
click=
"addPanelOpen = false"
>
取 消
</el-button>
</div>
</el-dialog>
<!-- 导入对话框 -->
<el-dialog
title=
"导入人员信息"
:visible.sync=
"upload.open"
width=
"400px"
append-to-body
>
<el-upload
ref=
"upload"
:limit=
"1"
accept=
".xlsx, .xls"
:headers=
"upload.headers"
:action=
"upload.url"
:disabled=
"upload.isUploading"
:on-progress=
"handleFileUploadProgress"
:on-success=
"handleFileSuccess"
:auto-upload=
"false"
drag
>
<i
class=
"el-icon-upload"
></i>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
<div
class=
"el-upload__tip text-center"
slot=
"tip"
>
<span
style=
"line-height: 28px;"
>
每次最大批量转账条数为一千条;
</span>
<br
/>
<span>
仅允许导入xls、xlsx格式文件。
</span>
<a
style=
"color:#1890ff;margin:0px;line-height:14px"
class=
"download"
download=
"收款人明细模板"
href=
"/收款人明细模板.xlsx"
target=
"_blank"
>
下载模板
</a>
</div>
</el-upload>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"importByExcel"
>
确 定
</el-button>
<el-button
@
click=
"upload.open = false"
>
取 消
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
signAccList
}
from
"
@/api/business/accInfo
"
;
import
{
getOnlineTaskInfo
}
from
"
@/api/business/onlineTaskInfo
"
;
import
{
signAccList
}
from
"
@/api/business/accInfo
"
;
import
{
getOnlineTaskInfo
}
from
"
@/api/business/onlineTaskInfo
"
;
import
AccSelect
from
'
@/views/business/accInfo/accSelect.vue
'
import
{
getToken
}
from
'
@/utils/auth
'
import
{
addPayOrder
,
newBatchPay
}
from
'
@/api/business/payOrder
'
export
default
{
name
:
"
taskPayToAli
"
,
dicts
:
[
'
task_status
'
],
dicts
:
[
'
task_status
'
,
'
pay_type_title
'
,
'
payee_acc_type
'
],
components
:
{
AccSelect
},
data
()
{
return
{
payeeType
:
''
,
//路由携带的支付类型 1、银行卡 2、支付宝
taskId
:
''
,
//路由携带的发包任务ID
onlineTaskId
:
null
,
pageHeader
:
''
,
pageRemark
:
{
...
...
@@ -27,18 +191,260 @@ export default {
taskStatusDesc
:
''
,
statusClassRuing
:
{}
},
payerAccList
:
[]
payerAccList
:
[],
// 批量付款参数
defaultBatchPayName
:
null
,
disableBatchPayName
:
false
,
page
:
{
search
:
''
,
rows
:
[],
pageNum
:
1
,
pageSize
:
10
,
total
:
0
,
countAmount
:
0
},
// 当前传入的卡号
defaultPayerAccNo
:
null
,
upload
:
{
// 是否显示弹出层(用户导入)
open
:
false
,
// 是否禁用上传
isUploading
:
false
,
// 设置上传的请求头部
headers
:
{
Authorization
:
"
Bearer
"
+
getToken
()
},
// 上传的地址
url
:
process
.
env
.
VUE_APP_BASE_API
+
"
/business/taskStaff/readExcel
"
},
indexList
:
[],
batchForm
:
{
batchName
:
''
,
payTitle
:
''
,
payerAccNo
:
''
,
transferType
:
''
,
},
batchRules
:
{
payTitle
:
[
{
required
:
true
,
message
:
"
支付类型不能为空
"
,
trigger
:
"
blur
"
}
],
batchName
:
[
{
required
:
true
,
message
:
"
发薪批次不能为空
"
,
trigger
:
"
blur
"
}
],
payerAccNo
:
[
{
required
:
true
,
message
:
"
请选择付款账号
"
,
trigger
:
[
"
blur
"
,
"
change
"
]
}
],
},
addPanelOpen
:
false
,
// 非多个禁用
multiple
:
true
,
loading
:
false
,
transMap
:
new
Map
(),
form
:
{
},
rules
:
{
payTitle
:
[
{
required
:
true
,
message
:
"
支付类型不能为空
"
,
trigger
:
"
blur
"
}
],
staffName
:
[
{
required
:
true
,
message
:
"
收款人户名不能为空
"
,
trigger
:
"
blur
"
}
],
staffAccNo
:
[
{
required
:
true
,
message
:
"
收款人账户不能为空
"
,
trigger
:
"
blur
"
}
],
payeeAccType
:
[
{
required
:
true
,
message
:
"
请选择收款账户类型
"
,
trigger
:
"
blur
"
}
],
salaryAmount
:
[
{
required
:
true
,
message
:
"
转账金额不能为空
"
,
trigger
:
"
blur
"
},
{
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
value
<
0.01
)
{
callback
(
new
Error
(
'
转账金额必须大于0
'
));
}
else
{
callback
();
}
},
trigger
:
'
blur
'
}
],
}
}
},
watch
:
{
$route
(
route
)
{
this
.
pageInit
()
}
// '$route.query.taskId'(newVal) {
// console.log('路由参数发生变化是执行', newVal);
// },
},
created
()
{
console
.
log
(
'
路由携带的参数
'
,
this
.
$route
.
query
);
this
.
pageInit
()
},
mounted
()
{
this
.
getDicts
(
"
pay_type_title
"
).
then
(
response
=>
{
this
.
batchForm
.
payTitle
=
response
.
data
[
0
].
dictValue
;
this
.
$forceUpdate
()
});
if
(
this
.
$route
.
query
.
taskId
)
{
this
.
batchForm
.
onlineTaskId
=
this
.
$route
.
query
.
taskId
;
this
.
taskId
=
this
.
$route
.
query
.
taskId
;
}
if
(
this
.
$route
.
query
.
payeeType
)
{
this
.
payeeType
=
this
.
$route
.
query
.
payeeType
;
this
.
batchForm
.
transferType
=
this
.
$route
.
query
.
payeeType
;
}
},
methods
:
{
// 新增明细
handleAdd
()
{
if
(
this
.
transMap
&&
this
.
transMap
.
size
>=
1000
)
{
return
this
.
$modal
.
msgWarning
(
"
单次支付不能超过1000条
"
)
}
this
.
form
=
{
salaryAmount
:
0
,
staffAccType
:
2
,
remark
:
''
,
staffIdNo
:
''
,
staffName
:
""
}
if
(
this
.
batchForm
.
payTitle
)
{
this
.
form
.
payTitle
=
this
.
batchForm
.
payTitle
}
if
(
this
.
batchForm
.
remark
)
{
this
.
form
.
remark
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
batchForm
.
remark
))
}
console
.
log
(
this
.
form
)
this
.
addPanelOpen
=
true
},
// 删除明细
handleDelete
(
indexKey
,
pStr
)
{
this
.
$confirm
(
'
确定执行删除操作吗?
'
,
'
提示
'
,
{
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
}).
then
(()
=>
{
console
.
log
(
pStr
,
indexKey
)
if
(
pStr
&&
pStr
===
'
delRow
'
)
{
this
.
transMap
.
delete
(
indexKey
)
this
.
getList
()
}
else
if
(
this
.
indexList
&&
this
.
indexList
.
length
>
0
)
{
this
.
indexList
.
forEach
(
item
=>
{
this
.
transMap
.
delete
(
item
)
})
this
.
indexList
=
[];
this
.
getList
()
}
}).
catch
(()
=>
{
});
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
indexList
=
[]
selection
.
map
(
item
=>
{
this
.
indexList
.
push
(
item
.
indexKey
)
});
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
},
addDetail
()
{
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
form
.
indexKey
=
this
.
form
.
staffAccNo
+
''
+
this
.
transMap
.
size
;
this
.
transMap
.
set
(
this
.
form
.
indexKey
,
this
.
form
)
this
.
addPanelOpen
=
false
this
.
getList
()
}
});
},
importClick
()
{
this
.
$refs
[
"
batchForm
"
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
upload
.
open
=
true
}
});
},
handleFileUploadProgress
(
event
,
file
,
fileList
)
{
this
.
upload
.
isUploading
=
true
;
},
// 文件上传成功处理
handleFileSuccess
(
response
,
file
,
fileList
)
{
this
.
upload
.
open
=
false
;
this
.
upload
.
isUploading
=
false
;
this
.
$refs
.
upload
.
clearFiles
();
this
.
$alert
(
"
<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>
"
+
response
.
msg
+
"
</div>
"
,
"
导入结果
"
,
{
dangerouslyUseHTMLString
:
true
});
if
(
response
.
data
&&
response
.
data
.
length
>
0
)
{
response
.
data
.
forEach
((
item
,
index
)
=>
{
item
.
indexKey
=
item
.
staffAccNo
+
''
+
this
.
transMap
.
size
item
.
staffAccType
=
this
.
payeeType
this
.
transMap
.
set
(
item
.
indexKey
,
item
)
})
this
.
getList
()
}
},
importByExcel
()
{
this
.
$refs
.
upload
.
submit
();
},
confirmPay
()
{
if
(
!
this
.
transMap
||
this
.
transMap
.
size
<
1
)
{
return
this
.
$modal
.
msgWarning
(
"
支付明细列表不能为空!
"
);
}
else
if
(
this
.
transMap
.
size
>=
1000
)
{
return
this
.
$modal
.
msgWarning
(
"
单次支付不能超过1000条
"
)
}
this
.
$refs
[
"
batchForm
"
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
$confirm
(
'
确定提交该支付任务吗?
'
,
'
提示
'
,
{
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
}).
then
(()
=>
{
this
.
batchForm
.
staffList
=
[...
this
.
transMap
.
values
()];
// console.log('提交的数据', this.batchForm);
newBatchPay
(
this
.
batchForm
).
then
(
resp
=>
{
if
(
200
===
resp
.
code
)
{
this
.
$modal
.
msgSuccess
(
"
操作成功
"
);
// this.$router.push({ path: "/transfer/record" });
let
obj
=
{
path
:
"
/transfer/payBatchSettlement?id=
"
+
resp
.
data
};
this
.
$tab
.
closeOpenPage
(
obj
)
}
})
}).
catch
(()
=>
{
});
}
});
},
handlePageSizeChange
(
val
)
{
this
.
page
.
pageSize
=
val
;
this
.
getList
()
},
handleCurrentChange
(
val
)
{
this
.
page
.
pageNum
=
val
this
.
getList
()
},
searchEvt
()
{
this
.
page
.
pageNum
=
1
this
.
getList
()
},
getList
()
{
if
(
this
.
transMap
&&
this
.
transMap
.
size
>
0
)
{
let
rows
=
[...
this
.
transMap
.
values
()]
if
(
this
.
page
.
search
)
{
rows
=
rows
.
filter
(
item
=>
item
.
staffName
.
indexOf
(
this
.
page
.
search
)
>
-
1
)
}
this
.
page
.
total
=
rows
.
length
this
.
page
.
rows
=
rows
.
slice
(
this
.
page
.
pageNum
*
this
.
page
.
pageSize
-
this
.
page
.
pageSize
,
this
.
page
.
pageNum
*
this
.
page
.
pageSize
);
let
countAmount
=
0
;
rows
.
forEach
((
item
,
index
)
=>
{
countAmount
+=
item
.
salaryAmount
})
this
.
page
.
countAmount
=
countAmount
.
toFixed
(
2
)
}
else
{
this
.
page
.
rows
=
[];
this
.
page
=
{
countAmount
:
0
,
pageNum
:
1
,
pageSize
:
10
}
}
},
handleClose
()
{
const
obj
=
{
path
:
"
/onlineTaskInfo
"
};
this
.
$tab
.
closeOpenPage
(
obj
);
...
...
@@ -67,7 +473,8 @@ export default {
})
if
(
companyId
&&
taxUnitId
)
{
await
signAccList
(
taxUnitId
,
companyId
).
then
(
resp
=>
{
this
.
payerAccList
=
resp
.
data
this
.
payerAccList
=
resp
})
}
}
finally
{
...
...
src/views/business/payOrder/batchToAli.vue
View file @
780b17d6
...
...
@@ -276,7 +276,7 @@ export default {
if
(
this
.
$route
.
query
.
onlineTaskId
)
{
this
.
batchForm
.
onlineTaskId
=
this
.
$route
.
query
.
onlineTaskId
;
}
console
.
log
(
this
.
batchForm
)
//
console.log(this.batchForm)
},
methods
:
{
// 新增明细
...
...
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