Commit 8a865ce7 authored by 谢子梦's avatar 谢子梦

stage:文档3.3.2

parent df51e369
...@@ -51,3 +51,18 @@ export function delUnitRechargeBank(id) { ...@@ -51,3 +51,18 @@ export function delUnitRechargeBank(id) {
method: 'get' method: 'get'
}) })
} }
//获取通道参数数据接口
export const getChannelParamAPI = (id) => {
return request({
url: '/business/company/payChannelParams/menu?companyChannelId=' + id,
method: 'get'
})
}
// 修改通道参数数据接口
export const updateChannelParamAPI = (data) => {
return request({
url: '/business/company/payChannelParams/set',
method: 'post',
data: data
})
}
...@@ -3,17 +3,12 @@ ...@@ -3,17 +3,12 @@
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="关联企业" prop="companyId"> <el-form-item label="关联企业" prop="companyId">
<el-select v-model="queryParams.companyId" placeholder="请选择关联企业" clearable> <el-select v-model="queryParams.companyId" placeholder="请选择关联企业" clearable>
<el-option v-for="item in unitInfoList" :key="item.companyId" <el-option v-for="item in unitInfoList" :key="item.companyId" :label="item.companyName"
:label="item.companyName" :value="item.companyId" /> :value="item.companyId" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="支付通道" prop="channelName"> <el-form-item label="支付通道" prop="channelName">
<el-input <el-input v-model="queryParams.channelName" placeholder="请输入通道名称" clearable @keyup.enter.native="handleQuery" />
v-model="queryParams.channelName"
placeholder="请输入通道名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
...@@ -21,18 +16,18 @@ ...@@ -21,18 +16,18 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- <el-row :gutter="10" class="mb8">--> <!-- <el-row :gutter="10" class="mb8">-->
<!-- <el-col :span="1.5">--> <!-- <el-col :span="1.5">-->
<!-- <el-button--> <!-- <el-button-->
<!-- type="warning"--> <!-- type="warning"-->
<!-- icon="el-icon-download"--> <!-- icon="el-icon-download"-->
<!-- size="mini"--> <!-- size="mini"-->
<!-- @click="handleExport"--> <!-- @click="handleExport"-->
<!-- v-hasPermi="['business:companyPayChannel:export']"--> <!-- v-hasPermi="['business:companyPayChannel:export']"-->
<!-- >导出</el-button>--> <!-- >导出</el-button>-->
<!-- </el-col>--> <!-- </el-col>-->
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>--> <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
<!-- </el-row>--> <!-- </el-row>-->
<el-table v-loading="loading" :data="companyPayChannelList"> <el-table v-loading="loading" :data="companyPayChannelList">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
...@@ -40,12 +35,8 @@ ...@@ -40,12 +35,8 @@
<el-table-column label="支付通道" align="center" prop="channelName" /> <el-table-column label="支付通道" align="center" prop="channelName" />
<el-table-column label="使用状态" align="center" prop="status"> <el-table-column label="使用状态" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch v-model="scope.row.status" :active-value="1" :inactive-value="2"
v-model="scope.row.status" @change="handleStatusChange(scope.row)"></el-switch>
:active-value="1"
:inactive-value="2"
@change="handleStatusChange(scope.row)"
></el-switch>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="开通状态" align="center" prop="isEnter"> <el-table-column label="开通状态" align="center" prop="isEnter">
...@@ -55,34 +46,19 @@ ...@@ -55,34 +46,19 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button size="mini" type="text" icon="el-icon-help" @click="signChannel(scope.row)"
size="mini" v-if="scope.row.isEnter < 3">开通</el-button>
type="text" <el-button size="mini" type="text" icon="el-icon-setting" @click="goChannelSet(scope.row)"
icon="el-icon-help" v-if="scope.row.isEnter === 3">参数配置</el-button>
@click="signChannel(scope.row)"
v-if="scope.row.isEnter < 3"
>开通</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-setting"
@click="goChannelSet(scope.row)"
v-if="scope.row.isEnter === 3"
>参数配置</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
v-show="total>0" @pagination="getList" />
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<el-dialog title="扫码签约" :visible.sync="bindAcc.codePanel" width="300px" style="text-align: center"> <el-dialog title="扫码签约" :visible.sync="bindAcc.codePanel" width="300px" style="text-align: center">
<h3>请使用</h3> <h3>请使用</h3>
<h3><span style="color: #00afff">{{ bindAcc.companyName}}</span>的对公支付宝</h3> <h3><span style="color: #00afff">{{ bindAcc.companyName }}</span>的对公支付宝</h3>
<h3>扫描下方二维码</h3> <h3>扫描下方二维码</h3>
<qr-code-component :text="bindAcc.codeUrl" /> <qr-code-component :text="bindAcc.codeUrl" />
<h3>操作完成后大约5-10分钟</h3> <h3>操作完成后大约5-10分钟</h3>
...@@ -217,7 +193,7 @@ export default { ...@@ -217,7 +193,7 @@ export default {
handleStatusChange(row) { handleStatusChange(row) {
const _this = this; const _this = this;
let text = row.status === 1 ? "启用" : "停用"; let text = row.status === 1 ? "启用" : "停用";
_this.$modal.confirm('确认要"' + text + '""' + row.channelName + '"支付通道吗?').then(function() { _this.$modal.confirm('确认要"' + text + '""' + row.channelName + '"支付通道吗?').then(function () {
const updateForm = { const updateForm = {
id: row.id, id: row.id,
status: row.status status: row.status
...@@ -229,7 +205,7 @@ export default { ...@@ -229,7 +205,7 @@ export default {
}).catch(() => { }).catch(() => {
row.status = row.status === 2 ? 1 : 2; row.status = row.status === 2 ? 1 : 2;
}); });
}).catch(function() { }).catch(function () {
row.status = row.status === 2 ? 1 : 2; row.status = row.status === 2 ? 1 : 2;
}); });
}, },
...@@ -258,10 +234,11 @@ export default { ...@@ -258,10 +234,11 @@ export default {
}) })
}, },
goChannelSet(row) { goChannelSet(row) {
this.$router.push({ path: '/business/unitRechargeBank', query: { this.$router.push({
companyId: row.companyId, path: '/business/unitRechargeBank', query: {
channelCode: row.channelCode id: row.id
} }) }
})
} }
} }
}; };
......
<template>
<div class="accountInformation">
<h3 class="headline">招商银行</h3>
<p class="subheading">招商银行入账,是通过监控代发企业招商银行账户俩帐来判断入账,需用工企业设置打款账号,代发企业设置收款账户,代管企业设置后需进行托管。</p>
<div style="margin-bottom: 12px;">
<el-radio @change="proxyChange" v-model="proxy_recharge_cmb.paramsVal"
:disabled="!proxy_recharge_cmb.isNormal" label="false">关闭</el-radio>
<el-radio @change="proxyChange" v-model="proxy_recharge_cmb.paramsVal"
:disabled="!proxy_recharge_cmb.isNormal" label="true">开启</el-radio>
</div>
<p class="subheading" v-if="!proxy_recharge_cmb.isNormal">
代发企业收款信息
</p>
<div class="operateProxyStyle">
<el-descriptions class="margin-top" style="width: 55vw;" :labelStyle="myLabel" :column="1" border
v-if="isProxy">
<el-descriptions-item>
<template slot="label">
账号名称
</template>
{{ proxy_recharge_cmb.bankInfo.accountName }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
账户号码
</template>
{{ proxy_recharge_cmb.bankInfo.accountNo }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
开户行
</template>
{{ proxy_recharge_cmb.bankInfo.bankName }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
开户支行
</template>
{{ proxy_recharge_cmb.bankInfo.branchName }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
联行号
</template>
{{ proxy_recharge_cmb.bankInfo.bankNumber }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
开户地
</template>
{{ proxy_recharge_cmb.bankInfo.location }}
</el-descriptions-item>
</el-descriptions>
<el-form :model="proxy_recharge_cmb.bankInfo" :rules="rules" ref="formRef" label-width="120px"
label-position="right" v-else>
<el-form-item label="账号名称" prop="accountName">
<el-input style="width: calc(55vw - 120px);" v-model="proxy_recharge_cmb.bankInfo.accountName"
placeholder="请输入账号名称"></el-input>
</el-form-item>
<el-form-item label="账户号码" prop="accountNo">
<el-input style="width: calc(55vw - 120px);" v-model="proxy_recharge_cmb.bankInfo.accountNo"
placeholder="请输入账户号码"></el-input>
</el-form-item>
<el-form-item label="开户行" prop="bankName">
<el-input style="width: calc(55vw - 120px);" v-model="proxy_recharge_cmb.bankInfo.bankName"
placeholder="请输入开户行"></el-input>
</el-form-item>
<el-form-item label="开户支行" prop="branchName">
<el-input style="width: calc(55vw - 120px);" v-model="proxy_recharge_cmb.bankInfo.branchName"
placeholder="请输入开户支行"></el-input>
</el-form-item>
<el-form-item label="联行号" prop="bankNumber">
<el-input style="width: calc(55vw - 120px);" v-model="proxy_recharge_cmb.bankInfo.bankNumber"
placeholder="请输入联行号"></el-input>
</el-form-item>
<el-form-item label="开户地" prop="location">
<el-input style="width: calc(55vw - 120px);" v-model="proxy_recharge_cmb.bankInfo.location"
placeholder="请输入开户地"></el-input>
</el-form-item>
</el-form>
<el-button :style="{ marginBottom: isProxy ? '0px' : '18px' }"
v-if="proxy_recharge_cmb.isNormal && proxy_recharge_cmb.paramsVal == 'true'" type="primary"
class="operateProxyButton" @click="offlineRecharge">{{ isProxyTitle
}}</el-button>
</div>
<!-- -->
<h3 class="headline">账本转账本</h3>
<p class="subheading">账本转账本入账,是通过用工企业支付宝账本转入至代发企业为用工企业开通的专属支付宝账本,该入账方式需用工企业开通支付宝账本。</p>
<div>
<el-radio @chage="alipayChange" v-model="alipay_book_recharge.paramsVal"
:disabled="!alipay_book_recharge.isNormal" label="false">关闭</el-radio>
<el-radio @chage="alipayChange" v-model="alipay_book_recharge.paramsVal"
:disabled="!alipay_book_recharge.isNormal" label="true">开启</el-radio>
</div>
<!-- -->
<h3 class="headline">异名转账</h3>
<p class="subheading">异名转账,是将入账信息报备至平台方,由平台方向支付宝提交申请,支付宝许可后,用工企业可直接转账至代发企业支付宝账本。</p>
<div>
<el-radio @change="anonymousChange" v-model="anonymous_recharge.paramsVal"
:disabled="!anonymous_recharge.isNormal" label="false">关闭</el-radio>
<el-radio @change="anonymousChange" v-model="anonymous_recharge.paramsVal"
:disabled="!anonymous_recharge.isNormal" label="true">开启</el-radio>
</div>
</div>
</template>
<script>
import { getChannelParamAPI, updateChannelParamAPI } from "@/api/business/unitRechargeBank";
export default {
name: 'AccountInformation',
data() {
return {
myLabel: {
width: '120px',
textAlign: 'left'
},
rules: {
accountName: [
{ required: true, message: '请输入账户名称', trigger: 'blur' }
],
accountNo: [
{ required: true, message: '请输入账户号码', trigger: 'blur' }
],
bankName: [
{ required: true, message: '请输入银行名称', trigger: 'blur' }
],
branchName: [
{ required: true, message: '请输入开户支行', trigger: 'blur' }
],
location: [
{ required: true, message: '请输入开户地址', trigger: 'blur' }
],
bankNumber: [{
required: true, message: '请输入联行号', trigger: 'blur'
}]
},
allParams: {},
// 异名账本参数
anonymous_recharge: {
paramsVal: 'false',
isNormal: false
},
// 修改充值参数线上隐藏
isProxy: true,
isProxyTitle: '修改',
// 招行充值参数
proxy_recharge_cmb: {
paramsVal: 'false',
isNormal: false,
bankInfo: {
accountName: '',
accountNo: '',
bankName: '',
branchName: '',
location: '',
bankNumber: ''
}
},
// 账本充值参数
alipay_book_recharge: {
paramsVal: 'false',
isNormal: false
},
// 税收账户参数
tax_money_payee: {
paramsVal: 'false',
isNormal: false
}
}
},
created() {
},
mounted() {
this.getChannelConfiguration()
},
watch: {
'$route.query.id'(newValue) {
if (newValue) {
this.paymentChannelID = newValue
this.getChannelConfiguration()
}
},
},
methods: {
// 异名转账本信息变化时执行
anonymousChange() {
updateChannelParamAPI({ ...this.anonymous_recharge, companyPayChannelId: this.$route.query.id }).then(res => {
if (res.code == 200) {
this.$modal.msgSuccess('修改成功')
} else {
switch (this.anonymous_recharge.paramsVal) {
case 'false':
this.anonymous_recharge.paramsVal = 'true'
break;
case 'true':
this.anonymous_recharge.paramsVal = 'false'
break;
}
}
})
},
// 账本转账本信息变化时执行
alipayChange() {
updateChannelParamAPI({ ...this.alipay_book_recharge, companyPayChannelId: this.$route.query.id }).then(res => {
if (res.code == 200) {
this.$modal.msgSuccess('修改成功')
} else {
switch (this.alipay_book_recharge.paramsVal) {
case 'false':
this.alipay_book_recharge.paramsVal = 'true'
break;
case 'true':
this.alipay_book_recharge.paramsVal = 'false'
break;
}
}
})
},
// 招行账户信息变化执行
proxyChange() {
updateChannelParamAPI({ ...this.proxy_recharge_cmb, companyPayChannelId: this.$route.query.id }).then(res => {
if (res.code == 200) {
this.$modal.msgSuccess('修改成功')
} else {
switch (this.proxy_recharge_cmb.paramsVal) {
case 'false':
this.proxy_recharge_cmb.paramsVal = 'true'
break;
case 'true':
this.proxy_recharge_cmb.paramsVal = 'false'
break;
}
}
})
},
// 修改招行信息
offlineRecharge() {
if (this.isProxy) {
this.isProxy = false
this.isProxyTitle = '保存'
} else {
this.$refs.formRef.validate((valid) => {
if (valid) {
updateChannelParamAPI({ ...this.proxy_recharge_cmb, companyPayChannelId: this.$route.query.id }).then(res => {
if (res.code == 200) {
this.$modal.msgSuccess('修改成功')
this.isProxy = true
this.isProxyTitle = '修改'
}
})
}
})
}
},
// 获取通道配置参数
getChannelConfiguration() {
getChannelParamAPI(this.$route.query.id).then(res => {
if (res.code == 200) {
this.allParams = res.data
this.getAnonymousVal('anonymous_recharge') //处理异名账本数据
this.getProxyVal('proxy_recharge_cmb') //处理招行参数
this.getAlipayVal('alipay_book_recharge') //处理账本参数
// this.getTaxVal('tax_money_payee') //处理税收账户参数
}
})
},
getTaxVal(key) {
const data = this.allParams[key]
if (data) {
this.tax_money_payee = data
if (!this.tax_money_payee.paramsVal) this.tax_money_payee.paramsVal = 'false'
} else {
this.tax_money_payee.paramsVal = 'false'
this.tax_money_payee.isNormal = false
}
},
getAlipayVal(key) {
const data = this.allParams[key]
if (data) {
this.alipay_book_recharge = data
if (!this.alipay_book_recharge.paramsVal) this.alipay_book_recharge.paramsVal = 'false'
} else {
this.alipay_book_recharge.paramsVal = 'false'
this.alipay_book_recharge.isNormal = false
}
},
getProxyVal(key) {
const data = this.allParams[key]
if (data) {
this.proxy_recharge_cmb = data
if (!this.proxy_recharge_cmb.paramsVal) this.proxy_recharge_cmb.paramsVal = 'false'
} else {
this.proxy_recharge_cmb.paramsVal = 'false'
this.proxy_recharge_cmb.isNormal = false
}
},
getAnonymousVal(key) {
const data = this.allParams[key]
if (data) {
this.anonymous_recharge = data
if (!this.anonymous_recharge.paramsVal) this.anonymous_recharge.paramsVal = 'false'
} else {
this.anonymous_recharge.paramsVal = 'false'
this.anonymous_recharge.isNormal = false
}
}
}
}
</script>
<style lang="scss" scoped>
.accountInformation ::v-deep {
padding: 0px 22px;
overflow: hidden;
.headline {
font-size: 16px;
font-weight: 500;
color: #000;
margin-top: 48px;
letter-spacing: 2px;
}
.headline:first-child {
margin-top: 0;
}
.subheading {
font-size: 14px;
color: #999;
}
.operateProxyStyle {
display: flex;
align-items: flex-end;
justify-content: flex-start;
gap: 24px;
.operateProxyButton {
// margin-left: 240px;
letter-spacing: 2px;
// margin-bottom: 18px;
}
}
}
</style>
\ No newline at end of file
<template>
<!-- 税费开关 -->
<div class="accountTax">
<h3 class="headline">税费账户</h3>
<p class="subheading">税费账户用于接收用工企业的税费,在用工企业下发时税费将自动转到此账户。</p>
<div style="margin-bottom: 12px;">
<el-radio @change="taxChange" v-model="tax_money_payee.paramsVal" :disabled="!tax_money_payee.isNormal"
label="false">关闭</el-radio>
<el-radio @change="taxChange" v-model="tax_money_payee.paramsVal" :disabled="!tax_money_payee.isNormal"
label="true">开启</el-radio>
</div>
</div>
</template>
<script>
import { getChannelParamAPI, updateChannelParamAPI } from "@/api/business/unitRechargeBank";
export default {
name: 'AccountTax',
data() {
return {
allParams: {},
// 税收账户参数
tax_money_payee: {
paramsVal: 'false',
isNormal: false
}
}
},
created() {
},
watch: {
'$route.query.id'(newValue) {
if (newValue) {
this.paymentChannelID = newValue
this.getChannelConfiguration()
}
},
},
mounted() {
this.getChannelConfiguration()
},
methods: {
taxChange() {
updateChannelParamAPI({ ...this.tax_money_payee, companyPayChannelId: this.$route.query.id }).then(res => {
if (res.code == 200) {
this.$modal.msgSuccess('修改成功')
} else {
switch (this.tax_money_payee.paramsVal) {
case 'false':
this.tax_money_payee.paramsVal = 'true'
break;
case 'true':
this.tax_money_payee.paramsVal = 'false'
break;
}
}
})
},
// 获取通道配置参数
getChannelConfiguration() {
getChannelParamAPI(this.$route.query.id).then(res => {
if (res.code == 200) {
this.allParams = res.data
this.getTaxVal('tax_money_payee') //处理税收账户参数
}
})
},
getTaxVal(key) {
const data = this.allParams[key]
if (data) {
this.tax_money_payee = data
if (!this.tax_money_payee.paramsVal) this.tax_money_payee.paramsVal = 'false'
} else {
this.tax_money_payee.paramsVal = 'false'
this.tax_money_payee.isNormal = false
}
},
}
}
</script>
<style lang="scss" scoped>
.accountTax ::v-deep {
padding: 0px 22px;
overflow: hidden;
.headline {
font-size: 16px;
font-weight: 500;
color: #000;
margin-top: 48px;
letter-spacing: 2px;
}
.headline:first-child {
margin-top: 0;
}
.subheading {
font-size: 14px;
color: #999;
}
}
</style>
\ No newline at end of file
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="所属银行" prop="bankIdx">
<el-select v-model="queryParams.bankIdx" placeholder="请选择银行" @change="handleQuery" clearable>
<el-option v-for="dict in dict.type.sys_bank_idx" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
<el-form-item label="卡号" prop="accountNo">
<el-input v-model="queryParams.accountNo" placeholder="请输入卡号" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['business:unitRechargeBank:add']">新增</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="unitRechargeBankList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="户名" align="center" prop="accountName" />
<el-table-column label="卡号" align="center" prop="accountNo" />
<el-table-column label="银行名称" align="center" prop="bankName" />
<el-table-column label="支行名称" align="center" prop="branchName" />
<el-table-column label="开户地" align="center" prop="location" />
<el-table-column label="联行号" align="center" prop="bankNumber" />
<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-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['business:unitRechargeBank:edit']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['business:unitRechargeBank:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />
<!-- 添加或修改税地企业来账收款卡信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="所属银行" prop="bankIdx">
<el-select v-model="form.bankIdx" placeholder="请选择银行" @change="handleQuery" clearable>
<el-option v-for="dict in dict.type.sys_bank_idx" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
<!-- <el-form-item label="所属支付通道" prop="channelCode">-->
<!-- <el-input v-model="form.channelCode" placeholder="请输入所属支付通道" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="所属税地企业" prop="taxUnitId">-->
<!-- <el-input v-model="form.taxUnitId" placeholder="请输入所属税地企业" />-->
<!-- </el-form-item>-->
<el-form-item label="户名" prop="accountName">
<el-input v-model="form.accountName" placeholder="请输入户名" />
</el-form-item>
<el-form-item label="卡号" prop="accountNo">
<el-input v-model="form.accountNo" placeholder="请输入卡号" />
</el-form-item>
<el-form-item label="银行名称" prop="bankName">
<el-input v-model="form.bankName" placeholder="请输入银行名称" />
</el-form-item>
<el-form-item label="支行名称" prop="branchName">
<el-input v-model="form.branchName" placeholder="请输入支行名称" />
</el-form-item>
<el-form-item label="开户地" prop="location">
<el-input v-model="form.location" placeholder="请输入开户地" />
</el-form-item>
<el-form-item label="联行号" prop="bankNumber">
<el-input v-model="form.bankNumber" placeholder="请输入联行号" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listUnitRechargeBank, getUnitRechargeBank, delUnitRechargeBank, addUnitRechargeBank, updateUnitRechargeBank } from "@/api/business/unitRechargeBank";
export default {
name: "UnitRechargeBank",
dicts: ['sys_bank_idx'],
data() {
return {
// 根路径
baseURL: process.env.VUE_APP_BASE_API,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 税地企业来账收款卡信息表格数据
unitRechargeBankList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
bankIdx: null,
channelCode: null,
taxUnitId: null,
accountName: null,
accountNo: null,
bankName: null,
branchName: null,
location: null,
bankNumber: null,
deptId: null,
},
// 表单参数
form: {},
// 表单校验
rules: {
id: [
{ required: true, message: "主键ID不能为空", trigger: "blur" }
],
bankIdx: [
{ required: true, message: "银行标识不能为空", trigger: "blur" }
],
channelCode: [
{ required: true, message: "所属支付通道不能为空", trigger: "blur" }
],
taxUnitId: [
{ required: true, message: "所属税地企业不能为空", trigger: "blur" }
],
accountName: [
{ required: true, message: "户名不能为空", trigger: "blur" }
],
accountNo: [
{ required: true, message: "卡号不能为空", trigger: "blur" }
],
bankName: [
{ required: true, message: "银行名称不能为空", trigger: "blur" }
],
branchName: [
{ required: true, message: "支行名称不能为空", trigger: "blur" }
],
location: [
{ required: true, message: "开户地不能为空", trigger: "blur" }
],
bankNumber: [
{ required: true, message: "联行号不能为空", trigger: "blur" }
],
deptId: [
{ required: true, message: "所属部门不能为空", trigger: "blur" }
],
}
};
},
watch: {
$route(route) {
this.queryParams.taxUnitId = this.$route.query.companyId
this.queryParams.channelCode = this.$route.query.channelCode
this.getList();
}
},
created() {
},
mounted() {
// // console.log('传入的路由参数', this.$route.query);
if (this.$route.query.channelCode) {
this.queryParams.channelCode = this.$route.query.channelCode;
}
if (this.$route.query.companyId) {
this.queryParams.taxUnitId = this.$route.query.companyId;
}
this.getList();
},
methods: {
/** 查询税地企业来账收款卡信息列表 */
getList() {
this.loading = true;
listUnitRechargeBank(this.queryParams).then(response => {
this.unitRechargeBankList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: null,
bankIdx: null,
channelCode: null,
taxUnitId: null,
accountName: null,
accountNo: null,
bankName: null,
branchName: null,
location: null,
bankNumber: null,
deptId: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加税地企业来账收款卡信息";
this.form.channelCode = this.queryParams.channelCode;
this.form.taxUnitId = this.queryParams.taxUnitId;
// console.log('表单初始信息', this.form);
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getUnitRechargeBank(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改税地企业来账收款卡信息";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateUnitRechargeBank(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addUnitRechargeBank(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除税地企业来账收款卡信息编号为"' + ids + '"的数据项?').then(function () {
return delUnitRechargeBank(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => { });
},
/** 导出按钮操作 */
handleExport() {
this.download('business/unitRechargeBank/export', {
...this.queryParams
}, `unitRechargeBank_${new Date().getTime()}.xlsx`)
}
}
};
</script>
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px"> <!-- 头部路径图部分 -->
<el-form-item label="所属银行" prop="bankIdx"> <div class="TopRoadmapStyle">
<el-select v-model="queryParams.bankIdx" placeholder="请选择银行" @change="handleQuery" clearable> <el-collapse v-model="activeNames">
<el-option v-for="dict in dict.type.sys_bank_idx" :key="dict.value" :label="dict.label" :value="dict.value" /> <el-collapse-item title="灵工发薪涉及用工企业、代发企业与零工三个角色,具体资金路径如下图:" name="1">
</el-select> <div class="TopRoadmapStyle_img">
</el-form-item> <img class="TopRoadmapStyle_img_img" src="@/assets/images/roadmap.png" alt="路径图">
<el-form-item label="卡号" prop="accountNo"> </div>
<el-input v-model="queryParams.accountNo" placeholder="请输入卡号" clearable @keyup.enter.native="handleQuery" /> </el-collapse-item>
</el-form-item> </el-collapse>
<el-form-item> </div>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <!-- 下部操作部分 -->
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <div class="mainStyle">
</el-form-item> <el-tabs v-model="absActiveName">
</el-form> <el-tab-pane label="设置入账信息" name="first">
<accountInformation v-if="absActiveName == 'first'"></accountInformation>
<el-row :gutter="10" class="mb8"> </el-tab-pane>
<el-col :span="1.5"> <el-tab-pane label="设置税费账户" name="second">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd" <accountTax v-if="absActiveName == 'second'"></accountTax>
v-hasPermi="['business:unitRechargeBank:add']">新增</el-button> </el-tab-pane>
</el-col> </el-tabs>
<!-- <el-col :span="1.5"> </div>
<el-button type="success" icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
v-hasPermi="['business:unitRechargeBank:edit']">修改</el-button>
</el-col> -->
<!-- <el-col :span="1.5">
<el-button type="danger" icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
v-hasPermi="['business:unitRechargeBank:remove']">删除</el-button>
</el-col> -->
<!-- <el-col :span="1.5">
<el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport"
v-hasPermi="['business:unitRechargeBank:export']">导出</el-button>
</el-col> -->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="unitRechargeBankList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="户名" align="center" prop="accountName" />
<el-table-column label="卡号" align="center" prop="accountNo" />
<el-table-column label="银行名称" align="center" prop="bankName" />
<el-table-column label="支行名称" align="center" prop="branchName" />
<el-table-column label="开户地" align="center" prop="location" />
<el-table-column label="联行号" align="center" prop="bankNumber" />
<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-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['business:unitRechargeBank:edit']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['business:unitRechargeBank:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />
<!-- 添加或修改税地企业来账收款卡信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="所属银行" prop="bankIdx">
<el-select v-model="form.bankIdx" placeholder="请选择银行" @change="handleQuery" clearable>
<el-option v-for="dict in dict.type.sys_bank_idx" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
<!-- <el-form-item label="所属支付通道" prop="channelCode">-->
<!-- <el-input v-model="form.channelCode" placeholder="请输入所属支付通道" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="所属税地企业" prop="taxUnitId">-->
<!-- <el-input v-model="form.taxUnitId" placeholder="请输入所属税地企业" />-->
<!-- </el-form-item>-->
<el-form-item label="户名" prop="accountName">
<el-input v-model="form.accountName" placeholder="请输入户名" />
</el-form-item>
<el-form-item label="卡号" prop="accountNo">
<el-input v-model="form.accountNo" placeholder="请输入卡号" />
</el-form-item>
<el-form-item label="银行名称" prop="bankName">
<el-input v-model="form.bankName" placeholder="请输入银行名称" />
</el-form-item>
<el-form-item label="支行名称" prop="branchName">
<el-input v-model="form.branchName" placeholder="请输入支行名称" />
</el-form-item>
<el-form-item label="开户地" prop="location">
<el-input v-model="form.location" placeholder="请输入开户地" />
</el-form-item>
<el-form-item label="联行号" prop="bankNumber">
<el-input v-model="form.bankNumber" placeholder="请输入联行号" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { listUnitRechargeBank, getUnitRechargeBank, delUnitRechargeBank, addUnitRechargeBank, updateUnitRechargeBank } from "@/api/business/unitRechargeBank"; import accountInformation from "@/views/business/unitRechargeBank/accountInformation.vue";
import accountTax from "@/views/business/unitRechargeBank/accountTax.vue";
export default { export default {
name: "UnitRechargeBank", name: "UnitRechargeBank",
dicts: ['sys_bank_idx'], components: { accountInformation, accountTax },
data() { data() {
return { return {
// 根路径 // 根路径
baseURL: process.env.VUE_APP_BASE_API, baseURL: process.env.VUE_APP_BASE_API,
// 遮罩层 activeNames: ['1'],
loading: true, absActiveName: 'first',
// 选中数组 paymentChannelID: null,
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 税地企业来账收款卡信息表格数据
unitRechargeBankList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
bankIdx: null,
channelCode: null,
taxUnitId: null,
accountName: null,
accountNo: null,
bankName: null,
branchName: null,
location: null,
bankNumber: null,
deptId: null,
},
// 表单参数
form: {},
// 表单校验
rules: {
id: [
{ required: true, message: "主键ID不能为空", trigger: "blur" }
],
bankIdx: [
{ required: true, message: "银行标识不能为空", trigger: "blur" }
],
channelCode: [
{ required: true, message: "所属支付通道不能为空", trigger: "blur" }
],
taxUnitId: [
{ required: true, message: "所属税地企业不能为空", trigger: "blur" }
],
accountName: [
{ required: true, message: "户名不能为空", trigger: "blur" }
],
accountNo: [
{ required: true, message: "卡号不能为空", trigger: "blur" }
],
bankName: [
{ required: true, message: "银行名称不能为空", trigger: "blur" }
],
branchName: [
{ required: true, message: "支行名称不能为空", trigger: "blur" }
],
location: [
{ required: true, message: "开户地不能为空", trigger: "blur" }
],
bankNumber: [
{ required: true, message: "联行号不能为空", trigger: "blur" }
],
deptId: [
{ required: true, message: "所属部门不能为空", trigger: "blur" }
],
}
}; };
}, },
watch: { watch: {
$route(route) {
this.queryParams.taxUnitId = this.$route.query.companyId
this.queryParams.channelCode = this.$route.query.channelCode
this.getList();
}
}, },
created() { created() {
}, },
mounted() { mounted() {
// // console.log('传入的路由参数', this.$route.query); console.log('路由参数', this.$route.query.id);
if (this.$route.query.channelCode) { this.paymentChannelID = this.$route.query.id;
this.queryParams.channelCode = this.$route.query.channelCode;
}
if (this.$route.query.companyId) {
this.queryParams.taxUnitId = this.$route.query.companyId;
}
this.getList();
}, },
methods: { methods: {
/** 查询税地企业来账收款卡信息列表 */
getList() {
this.loading = true;
listUnitRechargeBank(this.queryParams).then(response => {
this.unitRechargeBankList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: null,
bankIdx: null,
channelCode: null,
taxUnitId: null,
accountName: null,
accountNo: null,
bankName: null,
branchName: null,
location: null,
bankNumber: null,
deptId: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加税地企业来账收款卡信息";
this.form.channelCode = this.queryParams.channelCode;
this.form.taxUnitId = this.queryParams.taxUnitId;
// console.log('表单初始信息', this.form);
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getUnitRechargeBank(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改税地企业来账收款卡信息";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateUnitRechargeBank(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addUnitRechargeBank(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除税地企业来账收款卡信息编号为"' + ids + '"的数据项?').then(function () {
return delUnitRechargeBank(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => { });
},
/** 导出按钮操作 */
handleExport() {
this.download('business/unitRechargeBank/export', {
...this.queryParams
}, `unitRechargeBank_${new Date().getTime()}.xlsx`)
}
} }
}; };
</script> </script>
<style lang="scss" scoped>
.TopRoadmapStyle ::v-deep {
.el-collapse {
border-color: transparent !important;
}
.TopRoadmapStyle_img {
display: flex;
align-items: center;
justify-content: center;
.TopRoadmapStyle_img_img {
width: 50%;
}
}
}
.mainStyle ::v-deep {
width: 100%;
margin-top: 20px;
display: flex;
.el-tabs {
width: 100%;
}
}
</style>
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