Commit a7c4060f authored by 谢子梦's avatar 谢子梦

stage:发薪批次页面内容优化

parent d98c0e70
...@@ -11,9 +11,9 @@ ...@@ -11,9 +11,9 @@
</div> </div>
<div class="card-box"> <div class="card-box">
<el-descriptions class="margin-top" title="批次信息" :column="2" border :labelStyle="labelStyle"> <el-descriptions class="margin-top" title="批次信息" :column="2" border :labelStyle="labelStyle">
<!-- <template slot="extra"> <template slot="extra">
<el-button type="primary" size="small">修改</el-button> <el-button type="primary" @click="editBatchInfo">修改</el-button>
</template> --> </template>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> <template slot="label">
发薪批次 发薪批次
...@@ -144,9 +144,18 @@ ...@@ -144,9 +144,18 @@
</div> </div>
</el-dialog> </el-dialog>
<!-- 结算预览弹窗 --> <!-- 结算预览弹窗 -->
<el-dialog title="结算预览" :visible.sync="settlementPreviewDialog"> <el-dialog title="结算预览" class="settlementPreviewDialog" :visible.sync="settlementPreviewDialog" width="40%">
<el-descriptions :column="2" :border="true" :labelStyle="labelStyle" :contentStyle="contentStyle"> <div class="settlementPreviewMain">
<el-descriptions-item label="结算名称"> <div class="taskInformation">
<div class="taskInformationName">任务名称:{{ settlementPreviewData.settlementName }}</div>
<div class="taskInformationInfo">
<div class="taskInformationInfoAccount">代发账户:{{ settlementPreviewData.accName }}</div>
<div class="taskInformationInfoMoney">账户余额:{{ settlementPreviewData.balance }}</div>
</div>
</div>
<div class="taskInformationConter">
<el-descriptions :column="1" :border="false">
<!-- <el-descriptions-item label="结算名称">
{{ settlementPreviewData.settlementName }} {{ settlementPreviewData.settlementName }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="账户名"> <el-descriptions-item label="账户名">
...@@ -154,31 +163,59 @@ ...@@ -154,31 +163,59 @@
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="账户余额"> <el-descriptions-item label="账户余额">
{{ settlementPreviewData.balance }} {{ settlementPreviewData.balance }}
</el-descriptions-item> </el-descriptions-item> -->
<el-descriptions-item label="零工人数"> <el-descriptions-item label="零工人数:">
{{ settlementPreviewData.staffCount }} {{ settlementPreviewData.staffCount }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="发薪金额"> <el-descriptions-item label="发薪金额:">
{{ settlementPreviewData.salaryAmount }} {{ settlementPreviewData.salaryAmount }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="税费"> <el-descriptions-item label="所需税费:">
{{ settlementPreviewData.taxMoney }} {{ settlementPreviewData.taxMoney }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="税率"> <!-- <el-descriptions-item label="税率">
{{ settlementPreviewData.taxRate }} {{ settlementPreviewData.taxRate }}
</el-descriptions-item> </el-descriptions-item> -->
<el-descriptions-item label="合计金额"> <!-- <el-descriptions-item label="合计金额">
{{ settlementPreviewData.totalAmount }} {{ settlementPreviewData.totalAmount }}
</el-descriptions-item> </el-descriptions-item> -->
<el-descriptions-item label="是否需要充值" :labelStyle="{ width: '150px' }"> <!-- <el-descriptions-item label="是否需要充值" :labelStyle="{ width: '150px' }">
{{ settlementPreviewData.needRecharge ? '需要' : '不需要' }} {{ settlementPreviewData.needRecharge ? '需要' : '不需要' }}
</el-descriptions-item> </el-descriptions-item> -->
</el-descriptions> </el-descriptions>
</div>
<div class="accountTotalAmount">
合计金额(元):{{ settlementPreviewData.totalAmount }} <span @click="toLinkRecharge"
class="recharge">去充值</span>
</div>
</div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="settlementPreviewDialog = false">取 消</el-button> <el-button @click="settlementPreviewDialog = false">取 消</el-button>
<el-button type="primary" icon="el-icon-s-promotion" @click="settlementPreviewSubmit">确认结算</el-button> <el-button type="primary" icon="el-icon-s-promotion" @click="settlementPreviewSubmit">确认结算</el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog title="批次信息修改" class="batchInfoStyle" :visible.sync="batchInfoDialog" width="35%">
<div>
<el-form ref="batchInfoRef" :model="batchInfoForm" :rules="batchInfoRules" label-width="120px">
<el-form-item label="批次名称" prop="batchName">
<el-input v-model="batchInfoForm.batchName" placeholder="请输入批次名称" />
</el-form-item>
<el-form-item label="付款账户" prop="payerAccNo">
<el-select v-model="batchInfoForm.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-form-item label="备注" prop="remark">
<el-input v-model="batchInfoForm.remark" placeholder="请输入备注" />
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="batchInfoSubmitClose">取 消</el-button>
<el-button type="primary" @click="batchInfoSubmit">确 认</el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
...@@ -187,6 +224,7 @@ import { getBatchInfoAPI, listBatchInfoAPI, addBatchInfoAPI, updateBatchInfoAPI, ...@@ -187,6 +224,7 @@ import { getBatchInfoAPI, listBatchInfoAPI, addBatchInfoAPI, updateBatchInfoAPI,
import { getOnlineTaskInfo } from "@/api/business/onlineTaskInfo"; import { getOnlineTaskInfo } from "@/api/business/onlineTaskInfo";
import { signAccList } from "@/api/business/accInfo"; import { signAccList } from "@/api/business/accInfo";
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
import { updateTaskBatch } from '@/api/business/taskBatch'
export default { export default {
name: 'PayBatchSettlement', name: 'PayBatchSettlement',
...@@ -210,7 +248,10 @@ export default { ...@@ -210,7 +248,10 @@ export default {
width: '120px' width: '120px'
}, },
contentStyle: { contentStyle: {
width: '380px' width: '180px'
},
labelStyleDialog: {
width: '80px'
}, },
params: { params: {
onlineTaskBatchId: '', onlineTaskBatchId: '',
...@@ -273,7 +314,25 @@ export default { ...@@ -273,7 +314,25 @@ export default {
}, },
// 结算预览参数 // 结算预览参数
settlementPreviewDialog: false, settlementPreviewDialog: false,
settlementPreviewData: {} settlementPreviewData: {},
// 修改批次信息方法
batchInfoDialog: false,
batchInfoForm: {
batchName: null,
payerAccNo: null,
remark: null
},
batchInfoRules: {
payTitle: [
{ required: true, message: "支付类型不能为空", trigger: "blur" }
],
batchName: [
{ required: true, message: "发薪批次不能为空", trigger: "blur" }
],
payerAccNo: [
{ required: true, message: "请选择付款账号", trigger: ["blur", "change"] }
],
},
} }
}, },
created() { created() {
...@@ -285,6 +344,39 @@ export default { ...@@ -285,6 +344,39 @@ export default {
}, },
methods: { methods: {
// 点击去充值方法
toLinkRecharge() {
this.settlementPreviewDialog = false
this.$router.push({ path: "/transfer/salaryAccount", query: { activeName: 'extAcc' } })
},
// 取消修改批次信息
batchInfoSubmitClose() {
this.$refs['batchInfoRef'].resetFields();
this.batchInfoDialog = false
},
// 确认修改批次信息
batchInfoSubmit() {
this.$refs['batchInfoRef'].validate((valid) => {
if (valid) {
updateTaskBatch(this.batchInfoForm).then(res => {
if (res.code == 200) {
getBatchInfoAPI(this.batchInfo.id).then(res => {
if (res.code == 200) {
this.batchInfo = res.data
}
})
this.batchInfoSubmitClose()
this.$modal.msgSuccess('操作成功')
}
})
}
})
},
// 修改批次信息方法
editBatchInfo() {
this.batchInfoForm = JSON.parse(JSON.stringify(this.batchInfo))
this.batchInfoDialog = true
},
// 点击确认结算 // 点击确认结算
settlementPreviewSubmit() { settlementPreviewSubmit() {
confirmSettleAPI(this.batchInfo.id).then(res => { confirmSettleAPI(this.batchInfo.id).then(res => {
...@@ -298,14 +390,14 @@ export default { ...@@ -298,14 +390,14 @@ export default {
}, },
// 点击结算按钮 // 点击结算按钮
confirmPay() { confirmPay() {
this.$modal.loading() this.$modal.loading()
previewSettleAPI(this.batchInfo.id).then(res => { previewSettleAPI(this.batchInfo.id).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.settlementPreviewDialog = true this.settlementPreviewDialog = true
this.settlementPreviewData = res.data this.settlementPreviewData = res.data
} }
}).finally(() => { }).finally(() => {
this.$modal.closeLoading() this.$modal.closeLoading()
}) })
}, },
importByExcel() { importByExcel() {
...@@ -560,5 +652,56 @@ export default { ...@@ -560,5 +652,56 @@ export default {
.el-descriptions--small { .el-descriptions--small {
font-size: 14px !important; font-size: 14px !important;
} }
.settlementPreviewMain {
.taskInformation {
.taskInformationName {
margin-bottom: 12px;
}
.taskInformationInfo {
display: flex;
align-items: center;
margin-bottom: 12px;
.taskInformationInfoAccount {
width: 50%;
}
.taskInformationInfoMoney {
width: 50%;
}
}
}
.taskInformationConter {
margin: 22px;
padding: 12px;
border-radius: 6px;
background-color: #ccc;
.el-descriptions__table {
background-color: #ccc;
}
}
.accountTotalAmount {
.recharge {
margin-left: 5px;
color: #46a6ff;
cursor: pointer;
text-decoration: underline;
text-decoration-color: #46a6ff;
text-underline-offset: 3px;
}
}
}
} }
</style> </style>
<style lang="scss">
.settlementPreviewDialog {
.el-dialog__body {
padding: 10px 26px 20px !important;
}
}
</style>
\ No newline at end of file
...@@ -684,6 +684,9 @@ export default { ...@@ -684,6 +684,9 @@ export default {
created() { created() {
}, },
mounted() { mounted() {
if (this.$route.query.activeName) {
this.activeName = this.$route.query.activeName
}
// this.sysPayChannelAll() // this.sysPayChannelAll()
// if (this.payType == 'first') { // if (this.payType == 'first') {
// this.params.bindType = 1 // this.params.bindType = 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment