Commit 13e59d7a authored by 许珑标's avatar 许珑标

Merge branch 'yx-test' into yx-master

# Conflicts:
#	src/views/business/salaryAccount/index.vue
parents 8d7f72fa efbb0f9a
......@@ -9,6 +9,15 @@ export function listAccInfo(query) {
})
}
// 查询商户付款账户列表-无部门过滤
export function listLaborAcc(query) {
return request({
url: '/business/accInfo/labor/accList',
method: 'get',
params: query
})
}
// 查询商户付款账户所有列表
export function listAllAccInfo(query) {
return request({
......@@ -74,20 +83,31 @@ export function getTaxAccAliInfo(cardNo) {
})
}
// 代理商获取名下客户的自有支付宝账本信息
export function agentPrivateList(query) {
// 代理商获取名下客户的支付宝账本信息
export function agentAccList(query) {
return request({
url: '/business/accInfo/agent/privateList',
url: '/business/accInfo/agent/accList',
method: 'get',
params: query
})
}
// 代理商获取名下客户的外部支付宝账本信息
export function agentGetOutAccInfo(query) {
// 设置线下充值收付规则
export function setOfflineRechargeInfo(data) {
return request({
url: '/business/accInfo/recharge/offline/rule',
method: 'post',
data: data
})
}
// 获取线下充值收付两方信息
export function getOfflineRechargeInfo(rechargeType, cardNo) {
return request({
url: '/business/accInfo/agent/outList',
url: `/business/accInfo/recharge/rule/get/${rechargeType}`,
method: 'get',
params: query
params: {
cardNo: cardNo
}
})
}
import request from '@/utils/request'
// 查询企业支付通道列表
export function listCompanyPayChannel(query) {
return request({
url: '/business/companyPayChannel/list',
method: 'get',
params: query
})
}
// 查询企业支付通道所有列表
export function listAllCompanyPayChannel(query) {
return request({
url: '/business/companyPayChannel/listAll',
method: 'get',
params: query
})
}
// 查询企业支付通道详细
export function getCompanyPayChannel(id) {
return request({
url: '/business/companyPayChannel/getInfo/' + id,
method: 'get'
})
}
// 新增企业支付通道
export function addCompanyPayChannel(data) {
return request({
url: '/business/companyPayChannel/add',
method: 'post',
data: data
})
}
// 修改企业支付通道
export function updateCompanyPayChannel(data) {
return request({
url: '/business/companyPayChannel/edit',
method: 'post',
data: data
})
}
// 删除企业支付通道
export function delCompanyPayChannel(id) {
return request({
url: '/business/companyPayChannel/remove/' + id,
method: 'get'
})
}
// 商户通道签约
export function signChannel(data) {
return request({
url: '/business/companyPayChannel/sign',
method: 'post',
data: data
})
}
......@@ -34,6 +34,22 @@ export function addLaborSign(data) {
data: data
})
}
// 新增代发合约签订前--预览合同文件
export function applySignPreGenFile(data) {
return request({
url: '/business/laborSign/applySignPreGenFile',
method: 'post',
data: data
})
}
// 签订合同
export function confirmSignContract(data) {
return request({
url: '/business/laborSign/confirmSignContract',
method: 'post',
data: data
})
}
// 修改代发合约签订
export function updateLaborSign(data) {
......@@ -59,12 +75,20 @@ export function agreeSign(id) {
method: 'post'
})
}
export function agreeSeal(data) {
return request({
url: '/business/laborSign/agreeSeal',
method: 'post',
data: data
})
}
// 删除代发合约签订
export function giveAccToLabor(laborId) {
// 分配代发账户
export function giveAccToLabor(data) {
return request({
url: '/business/unitInfo/acc/give/' + laborId,
method: 'post'
url: '/business/unitInfo/acc/give',
method: 'post',
data: data
})
}
......
import request from '@/utils/request'
// 查询企业支付通道列表
export function listPayChannel(query) {
return request({
url: '/business/payChannel/list',
method: 'get',
params: query
})
}
// 查询企业支付通道所有列表
export function listAllPayChannel(query) {
return request({
url: '/business/payChannel/listAll',
method: 'get',
params: query
})
}
// 查询企业支付通道详细
export function getPayChannel(id) {
return request({
url: '/business/payChannel/getInfo/' + id,
method: 'get'
})
}
// 新增企业支付通道
export function addPayChannel(data) {
return request({
url: '/business/payChannel/add',
method: 'post',
data: data
})
}
// 修改企业支付通道
export function updatePayChannel(data) {
return request({
url: '/business/payChannel/edit',
method: 'post',
data: data
})
}
// 删除企业支付通道
export function delPayChannel(id) {
return request({
url: '/business/payChannel/remove/' + id,
method: 'get'
})
}
......@@ -44,6 +44,14 @@ export function addPayOrder(data) {
})
}
// 废弃支付任务
export function repealOrder(batchId) {
return request({
url: '/business/payOrder/repeal/' + batchId,
method: 'post',
})
}
// 发起支付
export function doPay(batchId) {
return request({
......
import request from '@/utils/request'
// 查询税地企业来账收款卡信息列表
export function listUnitRechargeBank(query) {
return request({
url: '/business/unitRechargeBank/list',
method: 'get',
params: query
})
}
// 查询税地企业来账收款卡信息所有列表
export function listAllUnitRechargeBank(query) {
return request({
url: '/business/unitRechargeBank/listAll',
method: 'get',
params: query
})
}
// 查询税地企业来账收款卡信息详细
export function getUnitRechargeBank(id) {
return request({
url: '/business/unitRechargeBank/getInfo/' + id,
method: 'get'
})
}
// 新增税地企业来账收款卡信息
export function addUnitRechargeBank(data) {
return request({
url: '/business/unitRechargeBank/add',
method: 'post',
data: data
})
}
// 修改税地企业来账收款卡信息
export function updateUnitRechargeBank(data) {
return request({
url: '/business/unitRechargeBank/edit',
method: 'post',
data: data
})
}
// 删除税地企业来账收款卡信息
export function delUnitRechargeBank(id) {
return request({
url: '/business/unitRechargeBank/remove/' + id,
method: 'get'
})
}
......@@ -10,7 +10,7 @@ export function login(username, password, code, smsCode, uuid) {
uuid
}
return request({
url: '/loginBySmsCode',
url: '/login',
headers: {
isToken: false
},
......
......@@ -98,7 +98,7 @@ export default {
type: 'warning'
}).then(() => {
this.$store.dispatch('LogOut').then(() => {
this.$router.push('/index')
this.$router.push('/login')
})
}).catch(() => {});
}
......
......@@ -17,14 +17,20 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="账本卡号" prop="alipayCardNo">
<el-form-item label="卡号" prop="alipayCardNo">
<el-input
v-model="queryParams.alipayCardNo"
placeholder="请输入账本外卡卡号"
placeholder="请输入卡号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="绑定类型" prop="bindType">
<el-select v-model="queryParams.bindType" placeholder="请选择" clearable>
<el-option label="自有账户" :value="1" />
<el-option label="代发账户" :value="2" />
</el-select>
</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>
......@@ -43,20 +49,28 @@
<!-- </el-col>-->
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
<!-- </el-row>-->
<el-row :gutter="0" class="mb8">
<el-col :span="1.5">
<el-radio-group v-model="tabPosition" @input="getList">
<el-radio-button label="private">自有账户</el-radio-button>
<el-radio-button label="out">代发账户</el-radio-button>
</el-radio-group>
</el-col>
</el-row>
<el-table v-loading="loading" :data="alipayAccList">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="所属企业" align="center" prop="companyName" />
<el-table-column label="支付宝账本信息" align="center">
<el-table-column label="外卡卡号" align="center" prop="alipayCardNo" />
<el-table-column label="开户户名" align="center" prop="accName" />
<el-table-column label="卡信息" align="center">
<el-table-column label="卡号/户名" align="center" prop="accName">
<template slot-scope="scope">
<div>{{ scope.row.alipayCardNo}} </div>
<div>{{ scope.row.accName}} </div>
</template>
</el-table-column>
<el-table-column label="通道" align="center" prop="channelCode">
<template slot-scope="scope">
{{ sysPayChannelMap.get(scope.row.channelCode) }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="channelCode">
<template slot-scope="scope">
<span v-if="scope.row.channelCode
&& scope.row.channelCode.indexOf('ALIPAY_BOOK') > -1">
记账本名称: {{ scope.row.alipayBookNo }}
</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
......@@ -66,6 +80,13 @@
icon="el-icon-info"
@click="viewDetail(scope.row)"
>账户详情</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-download"
@click="exportBiz(scope.row.alipayCardNo)"
v-hasPermi="['business:payBiz:export']"
>导出交易明细</el-button>
<el-button
size="mini"
type="text"
......@@ -129,11 +150,28 @@
<el-button type="primary" @click="configRateSubmit">确 定</el-button>
</div>
</el-dialog>
<!-- 导出交易明细-弹窗-->
<el-dialog title="导出交易明细" :visible.sync="ex.panel" width="30%" center>
<el-date-picker
v-model="ex.timeRange"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
<div slot="footer" class="dialog-footer">
<el-button @click="ex.panel = false">取 消</el-button>
<el-button type="primary" @click="handleExport">确 定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { agentGetOutAccInfo, agentPrivateList, getAccAliInfo } from '@/api/business/accInfo'
import { agentAccList, getAccAliInfo, listAllAccInfo } from '@/api/business/accInfo'
import { listAllPayChannel } from '@/api/business/payChannel'
export default {
name: "Post",
......@@ -165,7 +203,8 @@ export default {
pageSize: 10,
companyName: undefined,
accName: undefined,
alipayCardNo: undefined
alipayCardNo: undefined,
bindType: null
},
// 账户详情
accDetail: {
......@@ -190,6 +229,7 @@ export default {
toAlipayRate: 0,
toBankRate: 0
},
sysPayChannelMap: null,
configRateFormRules: {
toAlipayRate: [
{ required: true, message: '请输入转账到支付宝的费率', trigger: 'blur' }
......@@ -197,6 +237,13 @@ export default {
toBankRate: [
{ required: true, message: '请输入转账到银行卡的费率', trigger: 'blur' }
],
},
ex: {
panel: false,
payAccNo: null,
timeRange: null,
timeLimitStart: null,
timeLimitEnd: null
}
};
},
......@@ -205,20 +252,21 @@ export default {
},
methods: {
/** 查询岗位列表 */
getList() {
this.loading = true;
if (this.tabPosition === 'private') {
agentPrivateList(this.queryParams).then(response => {
this.alipayAccList = response.rows;
this.total = response.total;
this.loading = false;
});
} else {
agentGetOutAccInfo(this.queryParams).then(response => {
async getList() {
this.$modal.loading();
try {
if (!this.sysPayChannelMap) {
await listAllPayChannel().then(resp => {
this.sysPayChannelMap = new Map(resp.data.map(value => [value.channelCode, value.channelName]));
})
}
await agentAccList(this.queryParams).then(response => {
this.alipayAccList = response.rows;
this.total = response.total;
this.loading = false;
});
} finally {
this.$modal.closeLoading()
}
},
/** 搜索按钮操作 */
......@@ -271,6 +319,22 @@ export default {
}
})
},
exportBiz(cardNo) {
this.ex.payAccNo = cardNo
this.ex.panel = true
},
/** 导出按钮操作 */
handleExport() {
if (!this.ex.timeRange) {
return this.$modal.msgWarning("请选择时间区间")
}
this.ex.timeLimitStart = this.ex.timeRange[0]
this.ex.timeLimitEnd = this.ex.timeRange[1]
this.ex.panel = false
this.download('business/payOrder/biz/export', {
...this.ex
}, `${this.ex.payAccNo}_${this.ex.timeLimitStart}_${this.ex.timeLimitEnd}.xlsx`)
},
}
};
</script>
......@@ -71,14 +71,9 @@
<el-table-column label="信用代码" align="center" prop="companyCode" />
<el-table-column label="法人姓名" align="center" prop="legalName" />
<el-table-column label="法人电话" align="center" prop="legalPhone" />
<el-table-column label="绑定类型" align="center" prop="bindType" >
<template slot-scope="scope">
<dict-tag :options="dict.type.payer_acc_bind_type" :value="scope.row.bindType"/>
</template>
</el-table-column>
<el-table-column label="归属部门" align="center" prop="deptName" v-if="tableFiledDeptName"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
v-if="scope.row.signetId == null"
size="mini"
......@@ -110,6 +105,13 @@
@click="handleDelete(scope.row)"
v-hasPermi="['business:companyInfo:remove']"
>删除</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-platform-eleme"
@click="goPayChannel(scope.row)"
v-hasPermi="['business:companyPayChannel:station']"
>支付通道</el-button>
</template>
</el-table-column>
</el-table>
......@@ -150,12 +152,14 @@
import { listCompanyInfo, getCompanyInfo, delCompanyInfo, addCompanyInfo, updateCompanyInfo } from "@/api/business/companyInfo";
import { deptTreeSelect } from '@/api/system/user';
import {makeSealPreCheck} from "@/api/business/sealCompanyInfo";
import auth from '@/plugins/auth'
export default {
name: "CompanyInfo",
dicts: ['payer_acc_bind_type'],
data() {
return {
tableFiledDeptName: auth.hasPermi('business:companyPayChannel:station'),
// 部门树选项
deptOptions: undefined,
cascaderProps: {
......@@ -208,6 +212,7 @@ export default {
};
},
created() {
console.log(auth.hasPermi('business:companyPayChannel:station'))
this.getList();
this.getDeptTree();
},
......@@ -260,12 +265,12 @@ export default {
},
/** 新增按钮操作 */
handleAdd() {
this.$router.push({ path: '/business/payerCompanyFOrm' })
this.$router.push({ path: '/business/payerCompanyForm' })
},
/** 修改按钮操作 */
handleUpdate(row) {
const id = row.id
this.$router.push({ path: '/business/payerCompanyFOrm', query: { id: id } })
this.$router.push({ path: '/business/payerCompanyForm', query: { id: id } })
},
/** 提交按钮 */
submitForm() {
......@@ -323,6 +328,14 @@ export default {
viewSealInfo(row) {
const type = "hr";
this.$router.push({ path: '/seal/sealCompanyInfo', query: { bussinessId: row.id, bussinessType: type, showFlag:0 } })
},
goPayChannel(row) {
this.$router.push({ path: '/business/companyPayChannel',
query: {
companyId: row.id,
unitType: 1,
companyName: row.companyName
} })
}
}
};
......
<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="channelName">
<el-input
v-model="queryParams.channelName"
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:companyPayChannel:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['business:companyPayChannel:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="companyPayChannelList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="企业名称" align="center" prop="companyName" />
<el-table-column label="企业类型" align="center" prop="unitType">
<template slot-scope="scope">
<el-tag v-if="scope.row.unitType === 1">人资企业</el-tag>
<el-tag v-else-if="scope.row.unitType === 2">代发企业</el-tag>
</template>
</el-table-column>
<el-table-column label="通道标识" align="center" prop="channelCode" />
<el-table-column label="通道名称" align="center" prop="channelName" />
<el-table-column label="使用状态" align="center" prop="status">
<template slot-scope="scope">
<el-switch
v-model="scope.row.status"
:active-value="1"
:inactive-value="2"
@change="handleStatusChange(scope.row)"
></el-switch>
</template>
</el-table-column>
<el-table-column label="开通状态" align="center" prop="isEnter">
<template slot-scope="scope">
<dict-tag :options="dict.type.pay_channel_use_status" :value="scope.row.isEnter" />
</template>
</el-table-column>
<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:companyPayChannel:edit']"-->
<!-- >修改</el-button>-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['business:companyPayChannel: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="companyName">
<el-input v-model="form.companyName" disabled placeholder="企业名称" />
</el-form-item>
<el-form-item label="企业类型" prop="unitType">
<el-select disabled v-model="form.unitType" placeholder="请选择企业类型">
<el-option label="人力资源" :value="1" />
<el-option label="代发企业" :value="2" />
</el-select>
</el-form-item>
<el-form-item label="支付通道" prop="channelCode">
<el-select v-model="form.channelCode" placeholder="请选择支付通道">
<el-option v-for="(item, index) in sysPayChannelList" :disabled="item.disabled" :label="item.channelName" :value="item.channelCode" />
</el-select>
</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 {
listCompanyPayChannel,
getCompanyPayChannel,
delCompanyPayChannel,
addCompanyPayChannel,
updateCompanyPayChannel
} from "@/api/business/companyPayChannel";
import { listAllPayChannel } from '@/api/business/payChannel'
export default {
name: "CompanyPayChannel",
dicts: ['pay_channel_use_status'],
data() {
return {
// 根路径
baseURL: process.env.VUE_APP_BASE_API,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 企业支付通道表格数据
companyPayChannelList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
companyId: null,
unitType: null,
channelCode: null,
channelName: null,
status: null,
deptId: null,
},
// 表单参数
form: {},
// 表单校验
rules: {
channelCode: [
{ required: true, message: "通道标识不能为空", trigger: "blur" }
],
channelName: [
{ required: true, message: "通道名称不能为空", trigger: "blur" }
],
},
sysPayChannelList: []
};
},
created() {
},
watch: {
$route(route) {
this.queryParams.companyId = this.$route.query.companyId
this.queryParams.unitType = this.$route.query.unitType
this.getList();
}
},
mounted() {
this.queryParams.companyId = this.$route.query.companyId
this.queryParams.unitType = this.$route.query.unitType
this.getList();
},
methods: {
/** 查询企业支付通道列表 */
getList() {
if (!this.queryParams.companyId || !this.queryParams.unitType) {
return
}
this.loading = true;
listCompanyPayChannel(this.queryParams).then(response => {
this.companyPayChannelList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: null,
companyId: null,
unitType: null,
channelCode: null,
channelName: null,
status: 0,
isEnter: null,
deptId: null,
};
this.resetForm("form");
},
sysPayChannelAll() {
listAllPayChannel().then(resp => {
this.sysPayChannelList = resp.data
if (this.sysPayChannelList && this.companyPayChannelList) {
this.sysPayChannelList.filter(item => {
if (this.companyPayChannelList.some(obj => obj.channelCode === item.channelCode)) {
item.disabled = true
}
})
}
})
},
/** 搜索按钮操作 */
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.companyId = this.queryParams.companyId
this.form.companyName = this.$route.query.companyName
this.form.unitType = this.queryParams.unitType * 1
this.sysPayChannelAll()
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getCompanyPayChannel(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) {
updateCompanyPayChannel(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addCompanyPayChannel(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 delCompanyPayChannel(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('business/companyPayChannel/export', {
...this.queryParams
}, `companyPayChannel_${new Date().getTime()}.xlsx`)
},
// 通道状态修改
handleStatusChange(row) {
const _this = this;
let text = row.status === 1 ? "启用" : "停用";
_this.$modal.confirm('确认要"' + text + '""' + row.channelName + '"支付通道吗?').then(function() {
const updateForm = {
id: row.id,
status: row.status
}
updateCompanyPayChannel(updateForm).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}).catch(() => {
row.status = row.status === 2 ? 1 : 2;
});
}).catch(function() {
row.status = row.status === 2 ? 1 : 2;
});
},
}
};
</script>
......@@ -40,7 +40,7 @@
<image-upload v-model="form.businessLicense" :limit="1"></image-upload>
</el-form-item>
</el-col>
<el-col :span="10">
<el-col :span="10" v-if="!this.form.id">
<el-form-item label="邀请码" prop="invitationCode">
<el-input v-model="form.invitationCode" placeholder="请填写入驻邀请码" />
</el-form-item>
......
......@@ -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" />
<el-table-column label="任务编号" align="center" prop="taskNo"/>
<el-table-column label="任务名称" align="center" prop="taskName" />
<el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope">
......@@ -69,20 +69,30 @@
<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="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.releaseTime) }}</span>
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<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-view" @click="prviewPdfUrl(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 && 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"
......@@ -125,8 +135,7 @@
</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">
......@@ -137,35 +146,28 @@
</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.id"></el-option>
<el-option v-for="item in taxCompanyList" :key="item.id" :label="item.taxUnitName" :value="item.id"></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="地区code" prop="araeCode">-->
<!-- <el-input v-model="form.araeCode" placeholder="请输入地区code" />-->
<!-- </el-form-item>-->
<el-form-item label="所在区域" prop="area">
<el-cascader style="width: 100%;" size="small" :options="options" v-model="form.selectedOptions"
@change="handleChange" />
</el-form-item>
<!-- <el-form-item label="所在区域" prop="area">
<el-input v-model="form.area" placeholder="请输入所在区域" />
<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-form-item>
<el-form-item label="详细地址" prop="address">
<el-input v-model="form.address" placeholder="请输入详细地址" />
</el-form-item>-->
<el-form-item label="服务时间" prop="serviceTime">
<el-date-picker clearable placeholder="请选择服务时间" v-model="form.serviceTimeArr" @change="changeServiceTime"
type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item label="所在区域" prop="area">
<el-cascader style="width: 100%;" size="small" :options="options" v-model="form.selectedOptions"
@change="handleChange" />
</el-form-item>
<el-form-item label="零工人数" prop="needNum">
<el-input v-model="form.needNum" type="number" placeholder="请输入零工人数" />
</el-form-item>
<el-form-item label="计费说明" prop="billDesc">
<el-input v-model="form.billDesc" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="计费详情" prop="billDetail">
<el-form-item label="任务详情" prop="billDetail">
<el-input v-model="form.billDetail" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="任务备注" prop="remark">
......@@ -173,7 +175,8 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer" style="text-align: center;">
<el-button type="primary" @click="handleNext(10)">下一步</el-button>
<el-button type="primary" @click="handleNext(0)">保存</el-button>
<!-- <el-button type="primary" @click="handleNext(10)">下一步</el-button>-->
<el-button @click="cancel">取 消</el-button>
</div>
</div>
......@@ -182,7 +185,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>
......@@ -224,6 +227,37 @@
<el-button type="primary" @click.native="handleRecived">接收任务并签订合同</el-button>
</div>
</el-dialog>
<!-- 设置费率 -->
<el-dialog title="设置税率" :visible.sync="taxRateVisible" width="600px" append-to-body center>
<el-form ref="formTaxRate" :model="formTaxRate" :rules="rulesTaxRate" label-width="120px">
<el-form-item label="任务编号" prop="taskNo">
<el-input v-model="formTaxRate.taskNo" placeholder="请输入任务编号" disabled />
</el-form-item>
<el-form-item label="任务名称" prop="taskName">
<el-input v-model="formTaxRate.taskName" placeholder="请输入任务名称" disabled />
</el-form-item>
<el-form-item label="发起企业" prop="companyName">
<el-input v-model="formTaxRate.companyName" placeholder="请输入发起企业" disabled />
</el-form-item>
<el-form-item label="代发企业" prop="taxCompanyName">
<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-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-form-item>
<el-form-item label="税费" prop="taxAmount">
<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;">
<el-button type="primary" @click.native="saveTaxRate(1)">保存税率</el-button>
</div>
</el-dialog>
</div>
</template>
......@@ -290,6 +324,7 @@ export default {
title: "",
// 是否显示弹出层
open: false,
taxRateVisible: false,
// 发布时间时间范围
daterangeReleaseTime: [],
// 查询参数
......@@ -311,6 +346,17 @@ export default {
form: {
taxCompanyId: null,
},
formTaxRate: {
},
rulesTaxRate: {
taxRate: [
{ required: true, message: "税率不能为空", trigger: ["blur", "change"] }
],
taxAmount: [
{ required: true, message: "税额不能为空", trigger: ["blur", "change"] }
]
},
// 表单校验
rules: {
id: [
......@@ -381,7 +427,7 @@ export default {
{ required: true, message: "计费说明不能为空", trigger: ["blur", "change"] }
],
billDetail: [
{ required: true, message: "计费详情不能为空", trigger: ["blur", "change"] }
{ required: true, message: "任务详情不能为空", trigger: ["blur", "change"] }
],
reason: [
{ required: true, message: "拒绝原因不能为空", trigger: ["blur", "change"] }
......@@ -401,6 +447,9 @@ export default {
releaseTime: [
{ required: true, message: "发布时间不能为空", trigger: ["blur", "change"] }
],
amount: [
{ required: true, message: "任务金额不能为空", trigger: ["blur", "change"] }
]
}
};
},
......@@ -535,6 +584,22 @@ export default {
this.open = true;
this.title = "添加线上任务信息";
},
/** 确认任务合同 */
sealContract(row) {
getOnlineTaskInfo(row.id).then(async (response) => {
if (response.code == 200) {
this.onlineTaskId = row.id;
this.form = response.data;
this.contractUrl = response.data.contractUrl;
this.active = 2;
this.open = true;
this.title = "确认任务合同";
this.$forceUpdate();
}else {
this.$modal.msgError(response.message);
}
});
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
......@@ -645,10 +710,12 @@ export default {
this.form.status = status;
addOnlineTaskInfoFirst(this.form).then(response => {
if (response.code == 200) {
this.contractUrl = response.data.contractUrl;
this.form = response.data;
this.onlineTaskId = response.data.id;
this.active = 2;
// this.contractUrl = response.data.contractUrl;
// this.form = response.data;
// this.onlineTaskId = response.data.id;
// this.active = 2;
this.open = false;
this.getList();
}
});
}
......@@ -748,10 +815,10 @@ export default {
const year = now.getFullYear();
const month = String(now.getMonth() + 1).padStart(2, '0'); // 补零
const date = String(now.getDate()).padStart(2, '0');
// const hours = String(now.getHours()).padStart(2, '0');
// const minutes = String(now.getMinutes()).padStart(2, '0');
// const seconds = String(now.getSeconds()).padStart(2, '0');
return `${year}${month}${date}`;
const hours = String(now.getHours()).padStart(2, '0');
const minutes = String(now.getMinutes()).padStart(2, '0');
const seconds = String(now.getSeconds()).padStart(2, '0');
return `${year}${month}${date}${hours}${minutes}${seconds}`;
},
confirmSealContractFile() {
// TODO 确认框
......@@ -779,6 +846,47 @@ export default {
// // 用户取消操作
// this.$modal.msgError("已取消签订合同");
// });
},
//设置费率
setTaxRate(row) {
this.$modal.loading("正在获取任务信息,请稍候...");
getOnlineTaskInfo(row.id).then((response) => {
if (response.code == 200) {
this.formTaxRate = response.data;
this.title = "确认任务合同";
this.taxRateVisible = true;
this.$forceUpdate();
}else {
this.$modal.msgError("获取任务信息失败:" + (response.msg || "未知错误"));
}
}).finally(() => {
this.$modal.closeLoading()
});
},
//保存费率
saveTaxRate(status) {
console.log(this.formTaxRate)
this.$refs["formTaxRate"].validate(valid => {
if (valid) {
this.formTaxRate.status = status;
addOnlineTaskInfoFirst(this.formTaxRate).then(response => {
if (response.code == 200) {
this.taxRateVisible = false;
this.getList();
}
});
}
});
},
//计算税额 保留两位小数
calcTaxAmount() {
const taxRate = parseFloat(this.formTaxRate.taxRate);
const amount = parseFloat(this.formTaxRate.amount);
console.log(taxRate, amount)
if (!isNaN(taxRate) && !isNaN(amount)) {
const taxAmount = (taxRate * amount).toFixed(2);
this.formTaxRate.taxAmount = taxAmount;
}
}
}
};
......
<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="channelCode">
<el-input
v-model="queryParams.channelCode"
placeholder="请输入通道唯一标识"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="通道名称" prop="channelName">
<el-input
v-model="queryParams.channelName"
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:payChannel:add']"
>新增</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="payChannelList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="主键ID" align="center" prop="id" />
<el-table-column label="通道名称" align="center" prop="channelName" />
<el-table-column label="通道标识" align="center" prop="channelCode" />
<el-table-column label="通道状态" align="center" prop="status">
<template slot-scope="scope">
<el-switch
v-model="scope.row.status"
:active-value="1"
:inactive-value="2"
@change="handleStatusChange(scope.row)"
></el-switch>
</template>
</el-table-column>
<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:payChannel:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['business:payChannel: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="channelName">
<el-input v-model="form.channelName" placeholder="请输入通道名称" />
</el-form-item>
<el-form-item label="通道标识" prop="channelCode">
<el-input v-model="form.channelCode" 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 { listPayChannel, getPayChannel, delPayChannel, addPayChannel, updatePayChannel } from "@/api/business/payChannel";
export default {
name: "PayChannel",
data() {
return {
// 根路径
baseURL: process.env.VUE_APP_BASE_API,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 系统内置支付通道表格数据
payChannelList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
channelCode: null,
channelName: null,
},
// 表单参数
form: {},
// 表单校验
rules: {
id: [
{ required: true, message: "主键ID不能为空", trigger: "blur" }
],
channelCode: [
{ required: true, message: "通道唯一标识不能为空", trigger: "blur" }
],
channelName: [
{ required: true, message: "通道名称不能为空", trigger: "blur" }
],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询系统内置支付通道列表 */
getList() {
this.loading = true;
listPayChannel(this.queryParams).then(response => {
this.payChannelList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: null,
channelCode: null,
channelName: null,
status: 1,
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 = "添加系统内置支付通道";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getPayChannel(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) {
updatePayChannel(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addPayChannel(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 delPayChannel(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('business/payChannel/export', {
...this.queryParams
}, `payChannel_${new Date().getTime()}.xlsx`)
},
// 通道状态修改
handleStatusChange(row) {
const _this = this;
let text = row.status === 1 ? "启用" : "停用";
_this.$modal.confirm('确认要"' + text + '""' + row.channelName + '"支付通道吗?').then(function() {
const updateForm = {
id: row.id,
status: row.status
}
updatePayChannel(updateForm).then(response => {
_this.getList()
});
}).then(() => {
_this.$modal.msgSuccess(text + "成功");
}).catch(function() {
row.status = row.status === 2 ? 1 : 2;
});
},
}
};
</script>
......@@ -4,6 +4,15 @@
<el-form-item label="流水号" prop="batchNo">
<el-input v-model="queryParams.batchNo" placeholder="流水号" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="业务单号" prop="importBatchNo">
<el-input v-model="queryParams.importBatchNo" placeholder="客户自有业务单号" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="数据来源" prop="dataSource">
<el-select v-model="queryParams.dataSource" placeholder="请选择数据来源" @change="handleQuery" clearable>
<el-option label="平台" :value="1" />
<el-option label="接口" :value="2" />
</el-select>
</el-form-item>
<el-form-item label="业务名称" prop="batchPayName">
<el-input v-model="queryParams.batchPayName" placeholder="请输入支付名称" clearable
@keyup.enter.native="handleQuery" />
......@@ -46,7 +55,12 @@
<el-table v-loading="loading" :data="payOrderList" height="700px">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="流水号" align="center" prop="batchNo" />
<el-table-column label="流水号/业务单号" align="center" prop="batchNo">
<template slot-scope="scope">
{{ scope.row.batchNo }}
<div style="color: #1890ff">{{ scope.row.importBatchNo }}</div>
</template>
</el-table-column>
<el-table-column label="业务名称" align="center" prop="batchPayName" />
<el-table-column label="付款账户" align="center">
<template slot-scope="scope">
......@@ -86,10 +100,17 @@
<!-- <el-table-column label="支付备注" align="center" prop="payRemark" />-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button v-if="scope.row.payStatus && scope.row.payStatus === 1" size="mini" type="text" icon="el-icon-money" @click="doPay(scope.row)">确认支付</el-button>
<el-button size="mini" type="text" icon="el-icon-s-order" @click="viewDetail(scope.row)">查看明细</el-button>
<el-button v-if="scope.row.payStatus && scope.row.payStatus === 4 || scope.row.payStatus === 5" size="mini"
type="text" icon="el-icon-s-promotion" @click="doRepay(scope.row)">失败补发</el-button>
<el-button v-if="scope.row.payStatus && scope.row.payStatus === 1"
size="mini" type="text" icon="el-icon-money"
@click="doPay(scope.row)">确认支付</el-button>
<el-button v-if="scope.row.payStatus && scope.row.payStatus === 1"
size="mini" type="text" icon="el-icon-circle-close"
@click="repeal(scope.row)">订单作废</el-button>
<el-button size="mini" type="text" icon="el-icon-s-order"
@click="viewDetail(scope.row)">查看明细</el-button>
<el-button v-if="scope.row.payStatus && scope.row.payStatus === 4 || scope.row.payStatus === 5"
size="mini" type="text" icon="el-icon-s-promotion"
@click="doRepay(scope.row)">失败补发</el-button>
</template>
</el-table-column>
</el-table>
......@@ -107,7 +128,7 @@
</template>
<script>
import { addPayOrder, doPay, listPayOrder } from '@/api/business/payOrder'
import { addPayOrder, doPay, listPayOrder, repealOrder } from '@/api/business/payOrder'
import RePay from '@/views/business/payDetail/rePay.vue'
export default {
......@@ -142,12 +163,14 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
dataSource: null,
batchPayName: null,
payerCompanyId: null,
payerAccName: null,
payerAccNo: null,
batchNo: null,
outBatchNo: null,
importBatchNo: null,
payTitle: null,
payRemark: null,
transactionTime: null,
......@@ -213,6 +236,18 @@ export default {
this.getList()
}
},
repeal(row) {
this.$confirm('确定废弃该任务[' + row.batchNo + ":" + row.batchPayName + ']?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
repealOrder(row.id).then(resp => {
this.$modal.msgSuccess("操作成功");
this.getList()
})
}).catch(() => { });
},
doPay(row) {
if (row && row.id) {
this.$confirm('确定对该任务[' + row.batchNo + ":" + row.batchPayName + ']进行支付操作?', '提示', {
......
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="false" label-width="50px">
<el-row :gutter="0">
<el-col :span="6">
<el-form-item label="卡号" prop="payAccNo">
<el-input style="width: 100%;" v-model="queryParams.payAccNo" placeholder="请输入卡号搜索" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label-width="10px">
<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-col>
<el-col :span="4" :offset="4">
<div style="text-align: end;">
<el-button type="primary" size="mini" @click="toSign">绑定发薪账户</el-button>
</div>
</el-col>
</el-row>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" icon="el-icon-plus" size="mini"
v-hasPermi="['business:payChannel:add']">新增</el-button>
</el-col>
<!-- <right-toolbar @queryTable="getList"></right-toolbar> -->
</el-row>
<el-card class="box-card" v-for="ele in accList" :key="ele.id">
<el-row>
<el-col :span="16">
<div class="companyConterMain">
<div class="enterpriseImageMain">
<img class="enterpriseImage" src="@/assets/images/enterprise.png" alt="">
</div>
<div class="companyConterInformation">
<div style="width:90%;">
<el-row>
<el-col :span="16">
账户:{{ ele.payAccName }}
</el-col>
<el-col :span="6">
<el-button type="info" @click="viewDetail(ele)" plain>账户详情</el-button>
</el-col>
</el-row>
</div>
<div style="width:90%;">
<el-row>
<el-col :span="16">
卡号:{{ ele.payAccNo }}
</el-col>
</el-row>
</div>
<div style="width:90%;">
<el-row>
<el-col :span="16">
通道:{{ sysPayChannelMap.get(ele.channelCode) }}
</el-col>
</el-row>
</div>
</div>
</div>
</el-col>
<el-col :span="7" :offset="1">
<div class="operateConterMain">
<div style="width: 90%;">
<el-row>
<el-col :span="12"><el-button style="width:90%;" type="primary"
@click="balanceRecharge(ele)">余额充值</el-button></el-col>
<el-col :span="12"><el-button style="width:90%;" type="primary"
@click="serviceChargeRecharge(ele)">服务费充值</el-button></el-col>
</el-row>
</div>
<div style="width: 90%;">
<el-row>
<el-col :span="12"><el-button style="width:90%;;" type="primary" @click="showBill(ele.payAccNo)"
plain>充值记录</el-button></el-col>
<el-col :span="12"><el-button style="width:90%;;" type="primary" @click="salarySelection(ele.payAccNo)"
plain>去发薪</el-button></el-col>
</el-row>
</div>
</div>
</el-col>
</el-row>
</el-card>
<el-empty v-show="accList.length == 0" description="暂无账户"></el-empty>
<!-- 账户详情弹窗 -->
<el-dialog title="账号信息查询" :visible.sync="accDetail.panel" width="30%" center>
<el-descriptions :title="accDetail.companyName" :column="1" :label-style="accDetail.label_style"
:contentStyle="accDetail.content_style">
<el-descriptions-item label="账号">{{ accDetail.info.cardNo }}</el-descriptions-item>
<el-descriptions-item label="户名">{{ accDetail.info.bankAccName }}</el-descriptions-item>
<el-descriptions-item label="银行">{{ accDetail.info.cardBank }}</el-descriptions-item>
<el-descriptions-item label="支行">{{ accDetail.info.cardBranch }}</el-descriptions-item>
<el-descriptions-item label="开户地">{{ accDetail.info.cardLocation }}</el-descriptions-item>
<el-descriptions-item label="联行号">{{ accDetail.info.cardDeposit }}</el-descriptions-item>
<el-descriptions-item label="可转账金额">{{ accDetail.info.availableTransferAmount }}</el-descriptions-item>
<el-descriptions-item label="可用服务费">{{ accDetail.info.availableFeeAmount }}</el-descriptions-item>
</el-descriptions>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="accDetail.panel = false">确 定</el-button>
</div>
</el-dialog>
<!-- 绑定发薪账户 -->
<el-dialog title="绑定账户" :visible.sync="bindAcc.panel" width="80%">
<tax-sign-component @submitSignContract="submitSignContract"></tax-sign-component>
<div slot="footer" class="dialog-footer">
<el-button @click="bindAcc.panel = false">关 闭</el-button>
</div>
</el-dialog>
<el-dialog title="充值记录" :visible.sync="billPanel" width="80%">
<el-form :model="billQuery" size="small" :inline="true" label-width="100px">
<el-form-item label="账单类型" prop="tranType">
<el-select v-model="billQuery.capitalPurpose" clearable placeholder="请选择">
<el-option label="全部" :value="''" />
<el-option label="服务费" :value="1" />
<el-option label="余额" :value="2" />
</el-select>
</el-form-item>
<el-form-item label="时间">
<el-date-picker v-model="dateRange" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="daterange"
start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="getBillList">搜索</el-button>
</el-form-item>
</el-form>
<el-tabs value="first">
<el-tab-pane label="账单列表" name="first"></el-tab-pane>
</el-tabs>
<el-table v-loading="loading" :data="billDataList">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="账单类型" align="center" prop="capitalPurpose">
<template slot-scope="scope">
<span v-if="scope.row.capitalPurpose == 1">服务费</span>
<span v-if="scope.row.capitalPurpose == 2">余额</span>
</template>
</el-table-column>
<el-table-column label="收支类型" align="center" prop="tranType">
<template>
<el-button type="success" size="mini">收入</el-button>
</template>
</el-table-column>
<el-table-column label="金额" align="center" prop="tranAmount">
<template slot-scope="scope">
<span style="color: rgb(255, 208, 75)">
+ {{ scope.row.tranAmount }}
</span>
</template>
</el-table-column>
<el-table-column label="时间" align="center" prop="createTime" width="180" />
</el-table>
<el-pagination small layout="prev, pager, next" :total="billTotal" :page.sync="billQuery.pageNum"
@size-change="handleSizeChange" @current-change="handleCurrentChange" :limit.sync="billQuery.pageSize"
@pagination="getBillList()">
</el-pagination>
<div slot="footer" class="dialog-footer">
<el-button @click="billPanel = false">关 闭</el-button>
</div>
</el-dialog>
<!-- 去发薪对话框 -->
<el-dialog title="发薪选择" :visible.sync="payVisible" width="38%" center>
<div class="salarySelectionStyle">
<div class="salarySelectionMain" @click="toLinkBankCard">
<div class="salarySelectionImageDiv">
<img class="salarySelectionImage" src="@/assets/images/yhk.png" alt="">
</div>
<p class="salarySelectionText">批量到银行卡</p>
</div>
<div class="salarySelectionMain" @click="toLinkAlipay">
<div class="salarySelectionImageDiv">
<img class="salarySelectionImage" src="@/assets/images/zfb.png" alt="">
</div>
<p class="salarySelectionText">批量到支付宝</p>
</div>
</div>
</el-dialog>
<!-- 余额充值 -->
<extAccBalance ref="extAccBalance"></extAccBalance>
<!-- 服务费充值 -->
<extAccServieCharge ref="extAccServieCharge"></extAccServieCharge>
</div>
</template>
<script>
import { listAllAccInfo, getAccAliInfo } from '@/api/business/accInfo'
import { listAllPayChannel } from '@/api/business/payChannel'
import TaxSignComponent from '@/views/business/salaryAccount/taxSignComponent.vue'
import { formatDate } from '@/utils'
import { addDateRange } from '@/utils/ruoyi'
import { listBill } from '@/api/business/accRecharge.js'
import extAccBalance from '@/views/business/salaryAccount/extAccBalance.vue'
import extAccServieCharge from '@/views/business/salaryAccount/extAccServieCharge.vue'
export default {
name: "ExtAcc",
components: { TaxSignComponent, extAccBalance, extAccServieCharge },
props: {
// 权限列表
activeName: {
type: String,
default: ''
}
},
data() {
return {
// 根路径
baseURL: process.env.VUE_APP_BASE_API,
accList: [],
sysPayChannelMap: null,
// 查询参数
queryParams: {
bindType: 2,
},
// 账户详情
accDetail: {
content_style: {
'font-size': '16px',
},
label_style: {
'font-size': '16px',
},
info: {
cardNo: '',
bankAccName: '',
cardBank: '',
cardBranch: '',
cardLocation: '',
cardDeposit: '',
availableTransferAmount: '',
availableFeeAmount: ''
},
panel: false
},
// 绑定账户
bindAcc: {
panel: false,
},
// 充值记录参数
loading: false,
dateRange: [formatDate(new Date()), formatDate(new Date())],
billDataList: [],
billTotal: 0,
billPanel: false,
billQuery: {
pageNum: 1,
pageSize: 10,
capitalPurpose: 1, //账单类型:1-服务费;2-余额
tranType: '', //收支类型:1-收入;2-支出
startTime: '',
endTime: '',
},
// 去发薪部分参数
payVisible: false,
cardNo: ''
};
},
created() {
},
mounted() {
if (this.activeName == 'extAcc') {
this.getList();
}
},
methods: {
/** 点击服务费充值方法 */
serviceChargeRecharge(val) {
this.$refs.extAccServieCharge.enableRecharge(val)
},
/** 顶级余额充值方法 */
balanceRecharge(val) {
this.$refs.extAccBalance.enableRecharge(val)
},
/** 点击去发薪按钮 */
salarySelection(number) {
this.cardNo = number
this.payVisible = true
},
// 跳转到批量到支付宝
toLinkAlipay() {
this.$router.push({ path: "/transfer/batchToAli", query: { number: this.cardNo } });
this.payVisible = false
},
// 跳转到批量到银行卡
toLinkBankCard() {
this.$router.push({ path: "/transfer/batchToBank", query: { number: this.cardNo } });
this.payVisible = false
},
/** 点击充值记录按钮方法 */
showBill(cardNo) {
this.billQuery.cardNo = cardNo;
this.billPanel = true;
this.getBillList();
},
handleSizeChange(val) {
this.billQuery.pageSize = Number(val)
this.getBillList()
},
handleCurrentChange(val) {
this.billQuery.pageNum = Number(val)
this.getBillList()
}, /** 请求记录数据 */
getBillList() {
if (this.dateRange && this.dateRange.length > 0) {
let searchVal = addDateRange(this.billQuery, this.dateRange)
this.billQuery.startTime = searchVal.params.beginTime.split(" ")[0] + " 00:00:00"
this.billQuery.endTime = searchVal.params.endTime.split(" ")[0] + " 23:59:59"
} else {
this.billQuery.startTime = ''
this.billQuery.endTime = ''
}
this.loading = true
listBill(this.billQuery).then(res => {
if (res.code == 200) {
this.billDataList = res.rows
this.billTotal = res.total
}
}).finally(() => {
this.loading = false
})
},
/**调用子组件方法 */
submitSignContract() {
this.bindAcc.panel = false;
// this.queryHasNoAccOut()
this.getList()
},
/** 点击绑定发薪账户 */
toSign() {
this.bindAcc.panel = true;
},
/** 查看账户详情 */
viewDetail(card) {
this.$modal.loading("数据加载中...")
getAccAliInfo(card.payAccNo).then(resp => {
if (200 === resp.code) {
this.accDetail.companyName = card.companyName
this.accDetail.info = resp.data
this.accDetail.panel = true
}
}).finally(() => {
this.$modal.closeLoading()
})
},
/** 查询账户列表 */
async getList() {
this.$modal.loading();
try {
if (!this.sysPayChannelMap) {
await listAllPayChannel().then(resp => {
this.sysPayChannelMap = new Map(resp.data.map(value => [value.channelCode, value.channelName]));
})
}
await listAllAccInfo(this.queryParams).then(res => {
this.accList = res.data
})
} finally {
this.$modal.closeLoading()
}
},
/** 搜索按钮操作 */
handleQuery() {
this.getList();
},
/** 搜索重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
}
}
};
</script>
<style lang="scss" scoped>
// 卡片样式
.box-card {
margin-top: 12px;
// 公司信息部分样式
.companyConterMain {
width: 100%;
height: 140px;
display: flex;
align-items: center;
justify-content: space-between;
// 公司图标样式
.enterpriseImageMain {
width: 200px;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
.enterpriseImage {
width: 120px;
height: 68px;
}
}
// 公司信息内容部分样式
.companyConterInformation {
width: calc(100% - 180px);
height: 90%;
display: flex;
flex-direction: column;
flex-wrap: wrap;
align-content: center;
justify-content: space-evenly;
}
}
// 操作按钮部分样式
.operateConterMain {
width: 90%;
height: 120px;
display: flex;
flex-direction: column;
flex-wrap: wrap;
align-content: center;
justify-content: space-evenly;
}
}
</style>
\ No newline at end of file
<template>
<!-- 代发账户-余额充值 -->
<div>
<!-- 代发账号充值 -->
<el-dialog title="代发账户余额充值" :visible.sync="rechargeCoursePanelDialog" width="42%" center>
<el-row :gutter="64">
<el-col :span="12">
<p style="text-align: center;">通过与账本同主体的企业支付宝进行充值,可在手机端和电脑端充值</p>
</el-col>
<el-col :span="12">
<p style="text-align: center;">通过银行系统进行打款充值</p>
</el-col>
</el-row>
<el-row :gutter="64">
<el-col :span="12">
<div class="ownRechargeMain">
<img class="ownRechargeImage" src="@/assets/images/zfb.png" alt="">
<el-button class="ownRechargeButton"
@click="rechargeCoursePanelDialog = false; aliQRCodeRechargeOpen = true">直属账户充值</el-button>
</div>
</el-col>
<el-col :span="12">
<div class="ownRechargeMain">
<img class="ownRechargeImage" src="@/assets/images/xianxia.png" alt="">
<el-button class="ownRechargeButton" @click="offlineRecharge(false)">线下账户充值</el-button>
</div>
</el-col>
</el-row>
</el-dialog>
<!-- 代发项目充值-余额充值 -->
<el-dialog title="汇款充值余额" :visible.sync="rechargeCoursePanel" width="50%">
<h2 style="font-weight: bold;font-size: 22px;margin-top: -15px;color: #1a1a1a">什么是汇款充值</h2>
<el-row>
<el-col :span="24">
代发企业为商户开设支付宝安全发专属账本,商户可使用开设“安全发专属账本”时备案的银行账户(切记一定要使用备案的银行账户转账,否则系统将无法自动划转至专属账本)将需下发资金转入至代发企业招行专户,招行专户收到款后,将在30分钟内由系统自动将钱转入至“支付宝安全发专属账本”,具体转账路径如下图所示:
<div style="text-align: center;">
<img style="width:80%;margin-top: 10px;" src="@/assets/images/stepRecharge.png" alt="">
</div>
</el-col>
</el-row>
<el-row style="margin-top: 15px;">
<el-col :span="24">
<span style="font-weight: bold;font-size: 22px;color: #1a1a1a">
三步完成充值
</span>
<a style="color: #69b1ff" href="https://render.alipay.com/p/yuyan/180020040000423002/de59b"
target="_blank">(查看教程)</a>
</el-col>
</el-row>
<el-row style="margin-top: 15px;">
<el-col :span="24">
<el-timeline>
<el-timeline-item>
<span style="font-weight: bold;font-size: 18px">登录你的网上银行</span>
<span style="color: gray;font-size: 14px">(支持任意银行)</span>
<div style="font-size: 14px;margin-top: 5px">
必须使用开设“支付宝安全发专属账本”时备案的银行账户进行汇款转账,首次使用建议小额转入测试。</div>
</el-timeline-item>
<el-timeline-item>
<span style="font-weight: bold;font-size: 18px">付款账户信息</span>
<el-descriptions :column="1" :border="true" style="margin-top: 15px"
:label-style="accDetail.label_style" :contentStyle="accDetail.content_style">
<el-descriptions-item label="账号">{{ offlineRechargeData.payerAccNo
}}</el-descriptions-item>
<el-descriptions-item label="户名">{{ offlineRechargeData.payerAccName
}}</el-descriptions-item>
</el-descriptions>
</el-timeline-item>
<el-timeline-item>
<span style="font-weight: bold;font-size: 18px">转账时填写以下专属账户</span>
<el-descriptions :column="1" :border="true" style="margin-top: 15px"
:label-style="accDetail.label_style" :contentStyle="accDetail.content_style">
<el-descriptions-item label="账号">{{ offlineRechargeData.cardNo }}</el-descriptions-item>
<el-descriptions-item label="户名">{{ offlineRechargeData.bankAccName
}}</el-descriptions-item>
<el-descriptions-item label="银行">{{ offlineRechargeData.cardBank
}}</el-descriptions-item>
<el-descriptions-item label="支行">{{ offlineRechargeData.cardBranch
}}</el-descriptions-item>
<el-descriptions-item label="开户地">{{ offlineRechargeData.cardLocation
}}</el-descriptions-item>
<el-descriptions-item label="联行号">{{ offlineRechargeData.cardDeposit
}}</el-descriptions-item>
</el-descriptions>
</el-timeline-item>
<el-timeline-item>
<span style="font-weight: bold;font-size: 18px">转账完成后,工作时间最晚2小时到账,最快1分钟充值到您的支付宝账户</span>
<div style="font-size: 14px;margin-top: 5px">非工作时间预计最晚下个工作日到账(具体以银行为准)</div>
</el-timeline-item>
</el-timeline>
</el-col>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="rechargeCoursePanel = false">确 定</el-button>
</div>
</el-dialog>
<!-- 支付宝充值 -->
<el-dialog title="支付宝充值" :visible.sync="aliQRCodeRechargeOpen" width="500px" style="text-align: center">
<!-- <h3>转账完成后,工作时间最晚2小时到账,最快1分钟充值到您的支付宝账户</h3>-->
<el-form :model="aliQRCodeRechargeForm" ref="signNewForm" size="small" label-width="120px"
:rules="aliQRCodeRechargeRules">
<el-form-item label="收款账户" prop="payeeAccNo">
<el-input v-model="aliQRCodeRechargeForm.payeeAccNo" placeholder="请输入收款账号" disabled />
</el-form-item>
<el-form-item label="付款账户" prop="payerAccNo" v-if="aliQRCodeRechargeForm.bindType">
<accSelect :bindType="1" v-model="aliQRCodeRechargeForm.payerAccNo"></accSelect>
</el-form-item>
<el-form-item label="余额/服务费" prop="rechargeType">
<template>
<el-select v-model="aliQRCodeRechargeForm.rechargeType" style="width: 100%" disabled>
<el-option label="余额" :value="2">余额</el-option>
<el-option label="服务费" :value="1">服务费</el-option>
</el-select>
</template>
</el-form-item>
<el-form-item label="充值金额" prop="amount">
<el-input-number v-model="aliQRCodeRechargeForm.amount" placeholder="请输入充值金额" :precision="2"
style="width: 100%" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="getAliPayUrl">确认支付</el-button>
<el-button @click="aliQRCodeRechargeOpen = false">取 消</el-button>
</div>
</el-dialog>
<el-dialog title="确认支付" :visible.sync="qrPayPanel.open" width="20%">
<div>
<span style="font-size: 18px;">1、使用手机支付宝扫码支付;</span>
<qr-code-component :text="qrPayPanel.payUrl" />
</div>
<div style="margin-top: 12px;">
<span style="font-size: 18px;">2、通过支付宝官网支付,<a :href="qrPayPanel.payUrl" target="_blank"
style="font-size: 20px;color: #409EFF;"><strong>去支付</strong></a>;</span>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="qrPayPanel.open = false">取 消</el-button>
</div>
</el-dialog>
<!-- 付款账户信息填写 -->
<el-dialog title="添加付款账户" :visible.sync="paymentAccountDialog" width="30%">
<el-form :model="paymentAccountForm" ref="paymentAccountRef" label-width="120px"
:rules="paymentAccountRules">
<el-form-item label="付款账户" prop="payerAccNo">
<el-input v-model="paymentAccountForm.payerAccNo" placeholder="请输入付款账户" />
</el-form-item>
<el-form-item label="付款账户名称" prop="payerAccName">
<el-input v-model="paymentAccountForm.payerAccName" placeholder="请输入付款账户名称" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="paymentAccountDialog = false">取 消</el-button>
<el-button type="primary" @click="paymentAccountSubmit">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import AccSelect from '@/views/business/accInfo/accSelect.vue'
import QrCodeComponent from '@/components/QrCode.vue'
import { addAccRecharge } from '@/api/business/accRecharge.js'
import { getOfflineRechargeInfo, setOfflineRechargeInfo } from '@/api/business/accInfo.js'
export default {
components: { QrCodeComponent, AccSelect },
data() {
return {
// 账户详情
accDetail: {
content_style: {
'font-size': '16px',
'width': '70%'
},
label_style: {
'font-size': '16px',
'width': '30%'
}
},
aliQRCodeRechargeForm: {
payeeAccNo: '',
rechargeType: 2,
amount: '',
payerAccNo: ''
},
aliQRCodeRechargeRules: {
payerAccNo: [
{ required: true, message: '请选择付款账号', trigger: 'change' }
],
amount: [
{
validator: (rule, value, callback) => {
if (value <= 0) {
callback(new Error('充值金额必须大于零'));
} else {
callback()
}
},
trigger: 'blur'
}
]
},
rechargeCoursePanelDialog: false,
aliQRCodeRechargeOpen: false,
offlineRechargeStatic: false,
offlineRechargeData: {
cardNo: '',
bankAccName: '',
cardBank: '',
cardBranch: '',
cardLocation: '',
cardDeposit: '',
payerAccName: '',
payerAccNo: ''
},
rechargeCoursePanel: false,
qrPayPanel: {
open: false,
payUrl: ''
},
// 付款账户
paymentAccountDialog: false,
paymentAccountForm: {
targetAccNo: '', // 卡号
payerAccNo: '', // 付款账户
payerAccName: '', // 付款账户名称
},
paymentAccountRules: {
payerAccNo: [
{ required: true, message: '请输入付款账户', trigger: 'change' }
],
payerAccName: [
{ required: true, message: '请输入付款账户名称', trigger: 'blur' }
]
}
}
},
methods: {
// 确认支付按钮
getAliPayUrl() {
this.$refs.signNewForm.validate((valid) => {
if (valid) {
this.$modal.loading('充值中....')
addAccRecharge(this.aliQRCodeRechargeForm).then(res => {
this.aliQRCodeRechargeOpen = false
if (200 === res.code) {
// 如果是服务费充值 或者是内部账户余额充值
if (1 === this.aliQRCodeRechargeForm.rechargeType || 1 === this.aliQRCodeRechargeForm.bindType) {
if (res.data.status) {
this.qrPayPanel.payUrl = res.data.msg
this.qrPayPanel.open = true
this.$forceUpdate()
} else {
this.$modal.msgWarning(res.data.msg)
}
} else {
this.$modal.msgSuccess("充值成功!");
}
}
}).finally(() => {
this.$modal.closeLoading()
})
}
})
},
// 选择线下充值方法
offlineRecharge() {
getOfflineRechargeInfo(2, this.aliQRCodeRechargeForm.payeeAccNo).then(res => {
if (res.code === 200 && res.data.isNormal == 'yes') {
this.rechargeCoursePanelDialog = false
this.offlineRechargeData = {
cardNo: res.data.payeeAccNo,
bankAccName: res.data.payeeAccName,
cardBank: res.data.payeeBank,
cardBranch: res.data.payeeBranch,
cardLocation: res.data.payeeLocation,
cardDeposit: res.data.bankNumber,
payerAccName: res.data.payerAccName,
payerAccNo: res.data.payerAccNo
}
this.rechargeCoursePanel = true
} else if (res.code === 200 && res.data.isNormal == 'no') {
this.rechargeCoursePanelDialog = false
this.paymentAccountForm = {
targetAccNo: this.aliQRCodeRechargeForm.payeeAccNo,
payerAccNo: '',
payerAccName: ''
}
this.paymentAccountDialog = true
}
})
// this.offlineRechargeData = {
// cardNo: '515901720410008',
// bankAccName: '盐城美好生活专业清洁服务有限公司',
// cardBank: '招商银行',
// cardBranch: '盐城市青年路支行',
// cardLocation: '江苏-盐城市',
// cardDeposit: '308311000033'
// }
},
// 添加付款账户弹窗确认按钮
paymentAccountSubmit() {
this.$refs.paymentAccountRef.validate((valid) => {
if (valid) {
setOfflineRechargeInfo(this.paymentAccountForm).then(res => {
if (res.code === 200) {
this.$modal.msgSuccess('添加成功!')
this.paymentAccountDialog = false
this.offlineRecharge()
}
})
}
})
},
/** 父组件调用子组件 */
enableRecharge(val) {
// this.aliQRCodeRechargeForm.rechargeType = 2
this.aliQRCodeRechargeForm.payeeAccNo = val.payAccNo
this.aliQRCodeRechargeForm.bindType = val.bindType
this.rechargeCoursePanelDialog = true
},
}
}
</script>
<style lang="scss" scoped></style>
\ No newline at end of file
<template>
<!-- 代发账户-服务费充值 -->
<div>
<el-dialog title="代发账户服务费充值" :visible.sync="rechargeCoursePanelDialog" width="42%" center>
<el-row :gutter="64">
<el-col :span="12">
<p style="text-align: center;">通过与账本同主体的企业支付宝进行充值,可在手机端和电脑端充值</p>
</el-col>
<el-col :span="12">
<p style="text-align: center;">通过银行系统进行打款充值</p>
</el-col>
</el-row>
<el-row :gutter="64">
<el-col :span="12">
<div class="ownRechargeMain">
<img class="ownRechargeImage" src="@/assets/images/zfb.png" alt="">
<el-button class="ownRechargeButton"
@click="rechargeCoursePanelDialog = false; aliQRCodeRechargeOpen = true">直属账户充值</el-button>
</div>
</el-col>
<el-col :span="12">
<div class="ownRechargeMain">
<img class="ownRechargeImage" src="@/assets/images/xianxia.png" alt="">
<el-button class="ownRechargeButton" @click="offlineRecharge">线下充值</el-button>
</div>
</el-col>
</el-row>
</el-dialog>
<!-- 代发项目充值-服务费充值 -->
<el-dialog title="汇款充值服务费" :visible.sync="serviceCoursePanel" width="50%">
<h2 style="font-weight: bold;font-size: 22px;margin-top: -15px;color: #1a1a1a">什么是汇款充值</h2>
<el-row>
<el-col :span="24">
商户在下发资金时需消耗服务费,商户可使用开设“安全发专属账本”时备案的银行账户(切记一定要使用备案的银行账户转账,否则系统将无法自动划转至专属账本)将服务费转入至服务费专户,服务费专户收到款后,将在30分钟内由系统自动将钱计入至商户服务费,具体转账路径如下图所示:
<div style="text-align: center;">
<img style="width:80%;margin-top: 10px;" src="@/assets/images/stepRechargeServer.png" alt="">
</div>
</el-col>
</el-row>
<el-row style="margin-top: 15px;">
<el-col :span="24">
<span style="font-weight: bold;font-size: 22px;color: #1a1a1a">
三步完成充值
</span>
<a style="color: #69b1ff" href="https://render.alipay.com/p/yuyan/180020040000423002/de59b"
target="_blank">(查看教程)</a>
</el-col>
</el-row>
<el-row style="margin-top: 15px;">
<el-col :span="24">
<el-timeline>
<el-timeline-item>
<span style="font-weight: bold;font-size: 18px">登录你的网上银行</span>
<span style="color: gray;font-size: 14px">(支持任意银行)</span>
<div style="font-size: 14px;margin-top: 5px">
必须使用开设“支付宝安全发专属账本”时备案的银行账户进行汇款转账,首次使用建议小额转入测试。</div>
</el-timeline-item>
<el-timeline-item>
<span style="font-weight: bold;font-size: 18px">付款账户信息</span>
<el-descriptions :title="offlineRechargeStatic ? '你的企业备付金余额账户' : ''" :column="1"
:border="true" style="margin-top: 15px" :label-style="accDetail.label_style"
:contentStyle="accDetail.content_style">
<el-descriptions-item label="账号">{{ offlineRechargeData.payerAccNo
}}</el-descriptions-item>
<el-descriptions-item label="户名">{{ offlineRechargeData.payerAccName
}}</el-descriptions-item>
</el-descriptions>
</el-timeline-item>
<el-timeline-item>
<span style="font-weight: bold;font-size: 18px">转账时填写以下专属账户</span>
<el-descriptions :title="offlineRechargeStatic ? '你的企业备付金余额账户' : ''" :column="1"
:border="true" style="margin-top: 15px" :label-style="accDetail.label_style"
:contentStyle="accDetail.content_style">
<el-descriptions-item label="账号">{{ offlineRechargeData.cardNo }}</el-descriptions-item>
<el-descriptions-item label="户名">{{ offlineRechargeData.bankAccName
}}</el-descriptions-item>
<el-descriptions-item label="银行">{{ offlineRechargeData.cardBank
}}</el-descriptions-item>
<el-descriptions-item label="支行">{{ offlineRechargeData.cardBranch
}}</el-descriptions-item>
<el-descriptions-item label="开户地">{{ offlineRechargeData.cardLocation
}}</el-descriptions-item>
<el-descriptions-item label="联行号">{{ offlineRechargeData.cardDeposit
}}</el-descriptions-item>
</el-descriptions>
</el-timeline-item>
<el-timeline-item>
<span style="font-weight: bold;font-size: 18px">转账完成后,工作时间最晚2小时到账,最快1分钟充值到您的支付宝账户</span>
<div style="font-size: 14px;margin-top: 5px">非工作时间预计最晚下个工作日到账(具体以银行为准)</div>
</el-timeline-item>
</el-timeline>
</el-col>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="serviceCoursePanel = false">确 定</el-button>
</div>
</el-dialog>
<!-- 充值弹窗 -->
<el-dialog title="支付宝充值" :visible.sync="aliQRCodeRechargeOpen" width="500px" style="text-align: center">
<el-form :model="aliQRCodeRechargeForm" ref="signNewForm" size="small" label-width="120px"
:rules="aliQRCodeRechargeRules">
<el-form-item label="收款账户" prop="payeeAccNo">
<el-input v-model="aliQRCodeRechargeForm.payeeAccNo" placeholder="请输入收款账号" disabled />
</el-form-item>
<el-form-item label="余额/服务费" prop="rechargeType">
<template>
<el-select v-model="aliQRCodeRechargeForm.rechargeType" style="width: 100%" disabled>
<el-option label="余额" :value="2">余额</el-option>
<el-option label="服务费" :value="1">服务费</el-option>
</el-select>
</template>
</el-form-item>
<el-form-item label="充值金额" prop="amount">
<el-input-number v-model="aliQRCodeRechargeForm.amount" placeholder="请输入充值金额" :precision="2"
style="width: 100%" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="getAliPayUrl">确认支付</el-button>
<el-button @click="aliQRCodeRechargeOpen = false">取 消</el-button>
</div>
</el-dialog>
<el-dialog title="确认支付" :visible.sync="qrPayPanel.open" width="20%">
<div>
<span style="font-size: 18px;">1、使用手机支付宝扫码支付;</span>
<qr-code-component :text="qrPayPanel.payUrl" />
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="qrPayPanel.open = false">取 消</el-button>
</div>
</el-dialog>
<!-- 付款账户信息填写 -->
<el-dialog title="添加付款账户" :visible.sync="paymentAccountDialog" width="30%">
<el-form :model="paymentAccountForm" ref="paymentAccountRef" label-width="120px"
:rules="paymentAccountRules">
<el-form-item label="付款账户" prop="payerAccNo">
<el-input v-model="paymentAccountForm.payerAccNo" placeholder="请输入付款账户" />
</el-form-item>
<el-form-item label="付款账户名称" prop="payerAccName">
<el-input v-model="paymentAccountForm.payerAccName" placeholder="请输入付款账户名称" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="paymentAccountDialog = false">取 消</el-button>
<el-button type="primary" @click="paymentAccountSubmit">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { addAccRecharge } from '@/api/business/accRecharge.js'
import QrCodeComponent from '@/components/QrCode.vue'
import { getOfflineRechargeInfo, setOfflineRechargeInfo } from '@/api/business/accInfo.js'
export default {
components: { QrCodeComponent },
data() {
return {
rechargeCoursePanelDialog: false,
aliQRCodeRechargeOpen: false,
// 账户详情
accDetail: {
content_style: {
'font-size': '16px',
'width': '70%'
},
label_style: {
'font-size': '16px',
'width': '30%'
}
},
aliQRCodeRechargeForm: {
payeeAccNo: '',
rechargeType: 1,
amount: '',
payerAccNo: ''
},
offlineRechargeData: {
cardNo: '',
bankAccName: '',
cardBank: '',
cardBranch: '',
cardLocation: '',
cardDeposit: '',
payerAccName: '',
payerAccNo: ''
},
aliQRCodeRechargeRules: {
payerAccNo: [
{ required: true, message: '请选择付款账号', trigger: 'change' }
],
amount: [
{
validator: (rule, value, callback) => {
if (value <= 0) {
callback(new Error('充值金额必须大于零'));
} else {
callback()
}
},
trigger: 'blur'
}
]
},
qrPayPanel: {
open: false,
payUrl: ''
},
serviceCoursePanel: false,
offlineRechargeStatic: false,
// 付款账户
paymentAccountDialog: false,
paymentAccountForm: {
targetAccNo: '', // 卡号
payerAccNo: '', // 付款账户
payerAccName: '', // 付款账户名称
},
paymentAccountRules: {
payerAccNo: [
{ required: true, message: '请输入付款账户', trigger: 'change' }
],
payerAccName: [
{ required: true, message: '请输入付款账户名称', trigger: 'blur' }
]
}
}
},
methods: {
// 确认支付按钮
getAliPayUrl() {
this.$refs.signNewForm.validate((valid) => {
if (valid) {
this.$modal.loading('充值中....')
addAccRecharge(this.aliQRCodeRechargeForm).then(res => {
this.aliQRCodeRechargeOpen = false
if (200 === res.code) {
if (res.data.status) {
this.qrPayPanel.payUrl = res.data.msg
this.qrPayPanel.open = true
this.$forceUpdate()
} else {
this.$modal.msgWarning(res.data.msg)
}
} else {
this.$modal.msgSuccess("充值成功!");
}
}).finally(() => {
this.$modal.closeLoading()
})
}
})
},
// 选择线下充值方法
offlineRecharge() {
getOfflineRechargeInfo(1, this.aliQRCodeRechargeForm.payeeAccNo).then(res => {
console.log('res', res);
if (res.code === 200 && res.data.isNormal == 'yes') {
this.rechargeCoursePanelDialog = false
this.offlineRechargeData = {
cardNo: '571922384010001' || res.data.payeeAccNo,
bankAccName: '良贸通(杭州)科技有限公司' || res.data.payeeAccName,
cardBank: '招商银行' || res.data.payeeBank,
cardBranch: '招商银行股份有限公司杭州解放支行' || res.data.payeeBranch,
cardLocation: '江苏-杭州市' || res.data.payeeLocation,
cardDeposit: '308331012095' || res.data.bankNumber,
payerAccName: res.data.payerAccName,
payerAccNo: res.data.payerAccNo
}
this.serviceCoursePanel = true
} else if (res.code === 200 && res.data.isNormal == 'no') {
this.rechargeCoursePanelDialog = false
this.paymentAccountForm = {
targetAccNo: this.aliQRCodeRechargeForm.payeeAccNo,
payerAccNo: '',
payerAccName: ''
}
this.paymentAccountDialog = true
}
})
// this.offlineRechargeData = {
// cardNo: '571922384010001',
// bankAccName: '良贸通(杭州)科技有限公司',
// cardBank: '招商银行',
// cardBranch: '招商银行股份有限公司杭州解放支行',
// cardLocation: '江苏-杭州市',
// cardDeposit: '308331012095'
// }
},
// 添加付款账户弹窗确认按钮
paymentAccountSubmit() {
this.$refs.paymentAccountRef.validate((valid) => {
if (valid) {
setOfflineRechargeInfo(this.paymentAccountForm).then(res => {
if (res.code === 200) {
this.$modal.msgSuccess('添加成功!')
this.paymentAccountDialog = false
this.offlineRecharge()
}
})
}
})
},
/** 父组件调用子组件 */
enableRecharge(val) {
this.aliQRCodeRechargeForm.payeeAccNo = val.payAccNo
this.aliQRCodeRechargeForm.bindType = val.bindType
this.rechargeCoursePanelDialog = true
},
}
}
</script>
<style lang="scss" scoped></style>
\ No newline at end of file
<template>
<div class="app-container">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="直属账户" name="ownAcc">
<own-acc v-if="activeName == 'ownAcc'" :activeName="activeName"></own-acc>
</el-tab-pane>
<el-tab-pane label="代发账户" name="extAcc">
<ext-acc v-if="activeName == 'extAcc'" :activeName="activeName"></ext-acc>
</el-tab-pane>
</el-tabs>
<!-- 发薪账户管理页面 -->
<el-tabs v-model="payType" @tab-click="handleClick" type="card">
<!-- <el-tabs v-model="payType" @tab-click="handleClick" type="card">
<el-tab-pane label="自有发薪账号" name="first">
<el-form label-width="120px" label-position="left" class="formMain">
<el-row :gutter="30">
......@@ -30,10 +38,10 @@
<div class="companyConterInformation">
<div style="width:90%;">
<el-row>
<el-col :span="14">
账户:({{ ele.companyName }})
<el-col :span="16">
账户:({{ ele.payAccName }})
</el-col>
<el-col :span="8">
<el-col :span="6">
<el-button type="info" @click="viewDetail(ele)" plain>账户详情</el-button>
</el-col>
</el-row>
......@@ -43,19 +51,11 @@
卡号:{{ ele.payAccNo }}
</el-col>
</el-row>
<!-- <div style="width:90%;">
<el-row>
<el-col :span="8">
可转帐余额:<span style="color:#4aa3ff;">1111</span>
</el-col>
<el-col :span="8">
可用服务费:<span style="color:#4aa3ff;">1111</span>
</el-col>
<el-col :span="8">
服务费率:<span style="color:#4aa3ff;">11111</span>
<el-col :span="16">
通道:{{ sysPayChannelMap.get(ele.channelCode) }}
</el-col>
</el-row>
</div> -->
</div>
</div>
</el-col>
......@@ -63,17 +63,17 @@
<div class="operateConterMain">
<div style="width: 90%;">
<el-row>
<el-col :span="12"><el-button style="width:120px;" type="primary"
<el-col :span="12"><el-button style="width:90%;" type="primary"
@click="ownBalanceRecharge(ele)">余额充值</el-button></el-col>
<el-col :span="12"><el-button style="width:120px;" type="primary"
<el-col :span="12"><el-button style="width:90%;" type="primary"
@click="ownServiceChargeRecharge(ele)">服务费充值</el-button></el-col>
</el-row>
</div>
<div style="width: 90%;">
<el-row>
<el-col :span="12"><el-button style="width:120px;" type="primary" plain
<el-col :span="12"><el-button style="width:90%;" type="primary" plain
@click="showBill(ele.payAccNo)">充值记录</el-button></el-col>
<el-col :span="12"><el-button style="width:120px;" type="primary" plain
<el-col :span="12"><el-button style="width:90%;" type="primary" plain
@click="salarySelection(ele.payAccNo)">去发薪</el-button></el-col>
</el-row>
</div>
......@@ -82,8 +82,8 @@
</el-row>
</el-card>
<el-empty v-if="ownList.length == 0" description="暂无账号"></el-empty>
</el-tab-pane>
<el-tab-pane label="第三方发薪账号" name="second"> <el-form label-width="120px" label-position="left" class="formMain">
</el-tab-pane> -->
<!-- <el-tab-pane label="第三方发薪账号" name="second"> <el-form label-width="120px" label-position="left" class="formMain">
<el-row :gutter="30">
<el-col :span="8">
<el-form-item label="支付宝外卡卡号">
......@@ -110,10 +110,10 @@
<div class="companyConterInformation">
<div style="width:90%;">
<el-row>
<el-col :span="14">
账户:{{ ele.companyName }}
<el-col :span="16">
账户:{{ ele.payAccName }}
</el-col>
<el-col :span="8">
<el-col :span="6">
<el-button type="info" @click="viewDetail(ele)" plain>账户详情</el-button>
</el-col>
</el-row>
......@@ -125,37 +125,31 @@
</el-col>
</el-row>
</div>
<!-- <div style="width:90%;">
<div style="width:90%;">
<el-row>
<el-col :span="8">
可转帐余额:<span style="color:#4aa3ff;">222</span>
</el-col>
<el-col :span="8">
可用服务费:<span style="color:#4aa3ff;">2222</span>
</el-col>
<el-col :span="8">
服务费率:<span style="color:#4aa3ff;">2222</span>
<el-col :span="16">
通道:{{ sysPayChannelMap.get(ele.channelCode) }}
</el-col>
</el-row>
</div> -->
</div>
</div>
</div>
</el-col>
<el-col :span="6" :offset="2">
<el-col :span="7" :offset="1">
<div class="operateConterMain">
<div style="width: 90%;">
<el-row>
<el-col :span="12"><el-button style="width:120px;" type="primary"
<el-col :span="12"><el-button style="width:90%;" type="primary"
@click="balanceRecharge(ele)">余额充值</el-button></el-col>
<el-col :span="12"><el-button style="width:120px;" type="primary"
<el-col :span="12"><el-button style="width:90%;" type="primary"
@click="serviceChargeRecharge(ele)">服务费充值</el-button></el-col>
</el-row>
</div>
<div style="width: 90%;">
<el-row>
<el-col :span="12"><el-button style="width:120px;" type="primary" plain
<el-col :span="12"><el-button style="width:90%;;" type="primary" plain
@click="showBill(ele.payAccNo)">充值记录</el-button></el-col>
<el-col :span="12"><el-button @click="salarySelection(ele.payAccNo)" style="width:120px;"
<el-col :span="12"><el-button @click="salarySelection(ele.payAccNo)" style="width:90%;;"
type="primary" plain>去发薪</el-button></el-col>
</el-row>
</div>
......@@ -192,8 +186,8 @@
</el-card>
<el-empty v-if="thirdParty.length == 0 && (!signNoAccList || signNoAccList.length == 0)"
description="暂无账号"></el-empty>
</el-tab-pane>
</el-tabs>
</el-tab-pane> -->
<!-- </el-tabs> -->
<!-- 去发薪对话框 -->
<el-dialog title="发薪选择" :visible.sync="payVisible" width="38%" center>
<div class="salarySelectionStyle">
......@@ -221,7 +215,7 @@
<el-input v-model="aliQRCodeRechargeForm.payeeAccNo" placeholder="请输入收款账号" disabled />
</el-form-item>
<el-form-item label="付款账户" prop="payerAccNo"
v-if="aliQRCodeRechargeForm.bindType && 2 === aliQRCodeRechargeForm.bindType">
v-if="aliQRCodeRechargeForm.bindType && 2 === aliQRCodeRechargeForm.bindType && aliQRCodeRechargeForm.rechargeType == 2">
<accSelect :bindType="1" v-model="aliQRCodeRechargeForm.payerAccNo"></accSelect>
</el-form-item>
<el-form-item label="余额/服务费" prop="rechargeType">
......@@ -313,7 +307,7 @@
</el-col>
</el-row>
</el-dialog>
<!-- 线下充值-余额账户充值 -->
<!-- 第三方线下充值-余额充值 -->
<el-dialog title="汇款充值余额" :visible.sync="rechargeCoursePanel" width="50%">
<h2 style="font-weight: bold;font-size: 22px;margin-top: -15px;color: #1a1a1a">什么是汇款充值</h2>
<el-row>
......@@ -387,8 +381,8 @@
<el-button type="primary" @click="rechargeCoursePanel = false">确 定</el-button>
</div>
</el-dialog>
<!-- 线下充值-服务费账户充值 -->
<el-dialog title="汇款充值服务费" :visible.sync="serviceChargeCoursePanel" width="50%">
<!-- 第三方线下充值-服务费充值 -->
<el-dialog title="汇款充值服务费" :visible.sync="serviceCoursePanel" width="50%">
<h2 style="font-weight: bold;font-size: 22px;margin-top: -15px;color: #1a1a1a">什么是汇款充值</h2>
<el-row>
<el-col :span="24" v-if="offlineRechargeStatic">
......@@ -397,7 +391,7 @@
<el-col :span="24" v-else>
商户在下发资金时需消耗服务费,商户可使用开设“安全发专属账本”时备案的银行账户(切记一定要使用备案的银行账户转账,否则系统将无法自动划转至专属账本)将服务费转入至服务费专户,服务费专户收到款后,将在30分钟内由系统自动将钱计入至商户服务费,具体转账路径如下图所示:
<div style="text-align: center;">
<img style="width:80%;margin-top: 10px;" src="@/assets/images/login-background-fu.png" alt="">
<img style="width:80%;margin-top: 10px;" src="@/assets/images/stepRechargeServer.png" alt="">
</div>
</el-col>
</el-row>
......@@ -458,7 +452,7 @@
</el-col>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="serviceChargeCoursePanel = false">确 定</el-button>
<el-button type="primary" @click="serviceCoursePanel = false">确 定</el-button>
</div>
</el-dialog>
<el-dialog title="确认支付" :visible.sync="qrPayPanel.open" width="20%">
......@@ -466,10 +460,10 @@
<span style="font-size: 18px;">1、使用手机支付宝扫码支付;</span>
<qr-code-component :text="qrPayPanel.payUrl" />
</div>
<div style="margin-top: 12px;">
<!-- <div style="margin-top: 12px;">
<span style="font-size: 18px;">2、通过支付宝官网支付,<a :href="qrPayPanel.payUrl" target="_blank"
style="font-size: 20px;color: #409EFF;"><strong>去支付</strong></a>;</span>
</div>
</div> -->
<div slot="footer" class="dialog-footer">
<el-button @click="qrPayPanel.open = false">取 消</el-button>
</div>
......@@ -537,10 +531,16 @@
<el-dialog title="绑定账户" :visible.sync="openSign.panel" width="300">
<el-form label-width="80px">
<el-form-item label="账户主体">
<el-select v-model="openSign.companyId" placeholder="请选择账户对应的企业主体">
<el-select v-model="openSign.companyId" placeholder="请选择账户对应的企业主体" @change="selectSignCompany">
<el-option v-for="item in openSign.companyList" :key="item.id" :label="item.companyName" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="支付通道">
<el-select v-model="openSign.channelCode" placeholder="请选择要开通的支付通道">
<el-option v-for="item in companyPayChannelList" :key="item.channelCode" :label="item.channelName"
:value="item.channelCode" :disabled="!item.isEnter || item.isEnter > 2" />
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitBind">确定</el-button>
......@@ -570,13 +570,18 @@ import { formatDate } from '@/utils'
import QrCodeComponent from '@/components/QrCode.vue'
import TaxSignComponent from '@/views/business/salaryAccount/taxSignComponent.vue'
import { bindUnitAcc, listAllHasNoOpenInfo } from '@/api/business/unitInfo'
import { allHasNoOpenInfoCompany, bindCompanyAcc } from '@/api/business/companyInfo'
import { allHasNoOpenInfoCompany, bindCompanyAcc, listAllCompanyInfo } from '@/api/business/companyInfo'
import { queryHasNoAccSign } from '@/api/business/laborSign'
import { listAllCompanyPayChannel, signChannel } from '@/api/business/companyPayChannel'
import { listAllPayChannel } from '@/api/business/payChannel'
import OwnAcc from '@/views/business/salaryAccount/ownAcc.vue'
import ExtAcc from '@/views/business/salaryAccount/extAcc.vue'
export default {
name: 'SalaryAccount',
components: { TaxSignComponent, QrCodeComponent, AccSelect },
components: { ExtAcc, OwnAcc, TaxSignComponent, QrCodeComponent, AccSelect },
data() {
return {
activeName: 'ownAcc',
signNoAccList: [],
openSign: {
panel: false,
......@@ -584,6 +589,7 @@ export default {
companyList: [],
codePanel: false,
codeUrl: '',
channelCode: ''
},
bindAcc: {
panel: false,
......@@ -651,7 +657,7 @@ export default {
// 线下充值-余额
rechargeCoursePanel: false,
//线下充值-服务费
serviceChargeCoursePanel: false,
serviceCoursePanel: false,
offlineRechargeData: {},
offlineRechargeStatic: false,
// 充值记录相关参数
......@@ -671,20 +677,28 @@ export default {
loading: false,
// 第三方发薪账号余额、服务费充值选择弹窗
rechargeCoursePanelDialog: false,
companyPayChannelList: [],
sysPayChannelMap: null,
}
},
created() {
},
mounted() {
if (this.payType == 'first') {
this.params.bindType = 1
this.getListAllAccInfoFN()
} else if (this.payType == 'second') {
this.params.bindType = 2
this.getListAllAccInfoFN()
}
// this.sysPayChannelAll()
// if (this.payType == 'first') {
// this.params.bindType = 1
// this.getListAllAccInfoFN()
// } else if (this.payType == 'second') {
// this.params.bindType = 2
// this.getListAllAccInfoFN()
// }
},
methods: {
sysPayChannelAll() {
listAllPayChannel().then(resp => {
this.sysPayChannelMap = new Map(resp.data.map(value => [value.channelCode, value.channelName]));
})
},
/** 第三方绑定发薪账号-签约成功执行 */
submitSignContract() {
this.bindAcc.panel = false;
......@@ -749,17 +763,7 @@ export default {
})
} else {
this.rechargeCoursePanel = false
if (this.aliQRCodeRechargeForm.rechargeType == 1) { //服务费充值
this.offlineRechargeData = {
cardNo: '571922384010001',
bankAccName: '良贸通(杭州)科技有限公司',
cardBank: '招商银行',
cardBranch: '招商银行股份有限公司杭州解放支行',
cardLocation: '江苏-杭州市',
cardDeposit: '308331012095'
}
this.serviceChargeCoursePanel = true
} else if (this.aliQRCodeRechargeForm.rechargeType == 2) { //余额
if (this.aliQRCodeRechargeForm.rechargeType == 2) {
this.offlineRechargeData = {
cardNo: '515901720410008',
bankAccName: '盐城美好生活专业清洁服务有限公司',
......@@ -769,8 +773,17 @@ export default {
cardDeposit: '308311000033'
}
this.rechargeCoursePanel = true
} else if (this.aliQRCodeRechargeForm.rechargeType == 1) {
this.offlineRechargeData = {
cardNo: '571922384010001',
bankAccName: '良贸通(杭州)科技有限公司',
cardBank: '招商银行',
cardBranch: '招商银行股份有限公司杭州解放支行',
cardLocation: '江苏-杭州市',
cardDeposit: '308331012095'
}
this.serviceCoursePanel = true
}
}
},
// 点击服务分充值方法-自有
......@@ -813,10 +826,15 @@ export default {
addAccRecharge(this.aliQRCodeRechargeForm).then(res => {
this.aliQRCodeRechargeOpen = false
if (200 === res.code) {
if (1 === this.aliQRCodeRechargeForm.bindType) {
// 如果是服务费充值 或者是内部账户余额充值
if (1 === this.aliQRCodeRechargeForm.rechargeType || 1 === this.aliQRCodeRechargeForm.bindType) {
if (res.data.status) {
this.qrPayPanel.payUrl = res.data.msg
this.qrPayPanel.open = true
this.$forceUpdate()
} else {
this.$modal.msgWarning(res.data.msg)
}
} else {
this.$modal.msgSuccess("充值成功!");
}
......@@ -859,14 +877,16 @@ export default {
},
// tab发生变化时执行
handleClick(tab, event) {
if (this.payType == 'first') {
this.params.bindType = 1
this.getListAllAccInfoFN()
} else if (this.payType == 'second') {
this.params.bindType = 2
this.getListAllAccInfoFN()
this.queryHasNoAccOut();
}
console.log('activeName', this.activeName);
this.$forceUpdate()
// if (this.payType == 'first') {
// this.params.bindType = 1
// this.getListAllAccInfoFN()
// } else if (this.payType == 'second') {
// this.params.bindType = 2
// this.getListAllAccInfoFN()
// this.queryHasNoAccOut();
// }
// console.log(tab, event);
// console.log('payType', this.payType);
},
......@@ -893,7 +913,10 @@ export default {
})
},
goRegister() {
allHasNoOpenInfoCompany().then(resp => {
this.openSign.companyId = null;
this.openSign.channelCode = null;
this.companyPayChannelList = [];
listAllCompanyInfo({ bindType: 1 }).then(resp => {
if (200 === resp.code) {
this.openSign.companyList = resp.data
}
......@@ -902,16 +925,30 @@ export default {
})
},
submitBind() {
const singForm = {
companyId: this.openSign.companyId,
unitType: 1,
channelCode: this.openSign.channelCode
}
this.$modal.loading()
bindCompanyAcc(this.openSign.companyId).then(resp => {
if (200 === resp.code) {
signChannel(singForm).then(resp => {
this.openSign.codePanel = true;
this.openSign.codeUrl = resp.data
}
}).finally(() => {
this.$modal.closeLoading()
this.openSign.panel = false;
})
},
selectSignCompany(value) {
this.openSign.channelCode = null;
const channelQuery = {
unitType: 1,
companyId: value,
status: 1
}
listAllCompanyPayChannel(channelQuery).then(resp => {
this.companyPayChannelList = resp.data
})
}
}
}
......
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="false" label-width="50px">
<el-row :gutter="0">
<el-col :span="6">
<el-form-item label="卡号" prop="payAccNo">
<el-input style="width: 100%;" v-model="queryParams.payAccNo" placeholder="请输入卡号搜索" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label-width="10px">
<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-col>
<el-col :span="4" :offset="4">
<div style="text-align: end;">
<el-button type="primary" size="mini" @click="goRegister">绑定发薪账户</el-button>
</div>
</el-col>
</el-row>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" icon="el-icon-plus" size="mini"
v-hasPermi="['business:payChannel:add']">新增</el-button>
</el-col>
</el-row>
<el-card class="box-card" v-for="ele in accList" :key="ele.id">
<el-row>
<el-col :span="16">
<div class="companyConterMain">
<div class="enterpriseImageMain">
<img class="enterpriseImage" src="@/assets/images/enterprise.png" alt="">
</div>
<div class="companyConterInformation">
<div style="width:90%;">
<el-row>
<el-col :span="16">
账户:({{ ele.payAccName }})
</el-col>
<el-col :span="6">
<el-button type="info" @click="viewDetail(ele)" plain>账户详情</el-button>
</el-col>
</el-row>
</div>
<el-row>
<el-col :span="16">
卡号:{{ ele.payAccNo }}
</el-col>
</el-row>
<el-row>
<el-col :span="16">
通道:{{ sysPayChannelMap.get(ele.channelCode) }}
</el-col>
</el-row>
</div>
</div>
</el-col>
<el-col :span="6" :offset="2">
<div class="operateConterMain">
<div style="width: 90%;">
<el-row>
<el-col :span="12"><el-button style="width:90%;" type="primary"
@click="ownBalanceRecharge(ele)">余额充值</el-button></el-col>
<el-col :span="12"><el-button style="width:90%;" type="primary"
@click="ownServiceChargeRecharge(ele)">服务费充值</el-button></el-col>
</el-row>
</div>
<div style="width: 90%;">
<el-row>
<el-col :span="12"><el-button style="width:90%;" @click="showBill(ele.payAccNo)" type="primary"
plain>充值记录</el-button></el-col>
<el-col :span="12"><el-button style="width:90%;" type="primary" plain
@click="salarySelection(ele.payAccNo)">去发薪</el-button></el-col>
</el-row>
</div>
</div>
</el-col>
</el-row>
</el-card>
<el-empty v-if="accList.length == 0" description="暂无账号"></el-empty>
<!-- 账户详情弹窗 -->
<el-dialog title="账号信息查询" :visible.sync="accDetail.panel" width="30%" center>
<el-descriptions :title="accDetail.companyName" :column="1" :label-style="accDetail.label_style"
:contentStyle="accDetail.content_style">
<el-descriptions-item label="账号">{{ accDetail.info.cardNo }}</el-descriptions-item>
<el-descriptions-item label="户名">{{ accDetail.info.bankAccName }}</el-descriptions-item>
<el-descriptions-item label="银行">{{ accDetail.info.cardBank }}</el-descriptions-item>
<el-descriptions-item label="支行">{{ accDetail.info.cardBranch }}</el-descriptions-item>
<el-descriptions-item label="开户地">{{ accDetail.info.cardLocation }}</el-descriptions-item>
<el-descriptions-item label="联行号">{{ accDetail.info.cardDeposit }}</el-descriptions-item>
<el-descriptions-item label="可转账金额">{{ accDetail.info.availableTransferAmount }}</el-descriptions-item>
<el-descriptions-item label="可用服务费">{{ accDetail.info.availableFeeAmount }}</el-descriptions-item>
</el-descriptions>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="accDetail.panel = false">确 定</el-button>
</div>
</el-dialog>
<!-- 绑定发薪账户弹窗 -->
<el-dialog title="绑定账户" :visible.sync="openSign.panel" width="300">
<el-form label-width="80px">
<el-form-item label="账户主体">
<el-select v-model="openSign.companyId" placeholder="请选择账户对应的企业主体" @change="selectSignCompany">
<el-option v-for="item in openSign.companyList" :key="item.id" :label="item.companyName" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="支付通道">
<el-select v-model="openSign.channelCode" placeholder="请选择要开通的支付通道">
<el-option v-for="item in companyPayChannelList" :key="item.channelCode" :label="item.channelName"
:value="item.channelCode" :disabled="!item.isEnter || item.isEnter > 2" />
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitBind">确定</el-button>
<el-button @click="openSign.panel = false">关 闭</el-button>
</div>
</el-dialog>
<!-- 绑定账户弹窗-扫码签约 -->
<el-dialog title="扫码签约" :visible.sync="openSign.codePanel" width="300px" style="text-align: center">
<h3>1、请打开对应企业的支付宝</h3>
<h3>2、扫描下方二维码</h3>
<qr-code-component :text="openSign.codeUrl" />
<h3>操作完成后大约5-10分钟</h3>
<h3>可刷新页面查看结果</h3>
<div slot="footer" class="dialog-footer">
<el-button @click="openSign.codePanel = false">关 闭</el-button>
</div>
</el-dialog>
<el-dialog title="充值记录" :visible.sync="billPanel" width="80%">
<el-form :model="billQuery" size="small" :inline="true" label-width="100px">
<el-form-item label="账单类型" prop="tranType">
<el-select v-model="billQuery.capitalPurpose" clearable placeholder="请选择">
<el-option label="全部" :value="''" />
<el-option label="服务费" :value="1" />
<el-option label="余额" :value="2" />
</el-select>
</el-form-item>
<el-form-item label="时间">
<el-date-picker v-model="dateRange" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="daterange"
start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="getBillList">搜索</el-button>
</el-form-item>
</el-form>
<el-tabs value="first">
<el-tab-pane label="账单列表" name="first"></el-tab-pane>
</el-tabs>
<el-table v-loading="loading" :data="billDataList">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="账单类型" align="center" prop="capitalPurpose">
<template slot-scope="scope">
<span v-if="scope.row.capitalPurpose == 1">服务费</span>
<span v-if="scope.row.capitalPurpose == 2">余额</span>
</template>
</el-table-column>
<el-table-column label="收支类型" align="center" prop="tranType">
<template>
<el-button type="success" size="mini">收入</el-button>
</template>
</el-table-column>
<el-table-column label="金额" align="center" prop="tranAmount">
<template slot-scope="scope">
<span style="color: rgb(255, 208, 75)">
+ {{ scope.row.tranAmount }}
</span>
</template>
</el-table-column>
<el-table-column label="时间" align="center" prop="createTime" width="180" />
</el-table>
<el-pagination small layout="prev, pager, next" :total="billTotal" :page.sync="billQuery.pageNum"
@size-change="handleSizeChange" @current-change="handleCurrentChange" :limit.sync="billQuery.pageSize"
@pagination="getBillList()">
</el-pagination>
<div slot="footer" class="dialog-footer">
<el-button @click="billPanel = false">关 闭</el-button>
</div>
</el-dialog>
<!-- 去发薪对话框 -->
<el-dialog title="发薪选择" :visible.sync="payVisible" width="38%" center>
<div class="salarySelectionStyle">
<div class="salarySelectionMain" @click="toLinkBankCard">
<div class="salarySelectionImageDiv">
<img class="salarySelectionImage" src="@/assets/images/yhk.png" alt="">
</div>
<p class="salarySelectionText">批量到银行卡</p>
</div>
<div class="salarySelectionMain" @click="toLinkAlipay">
<div class="salarySelectionImageDiv">
<img class="salarySelectionImage" src="@/assets/images/zfb.png" alt="">
</div>
<p class="salarySelectionText">批量到支付宝</p>
</div>
</div>
</el-dialog>
<!-- 余额充值组件 -->
<ownAccBalance ref="ownAccBalance"></ownAccBalance>
<!-- 服务费充值组件 -->
<ownAccServiceCharge ref="ownAccServiceCharge"></ownAccServiceCharge>
</div>
</template>
<script>
import { listAllAccInfo, getAccAliInfo } from '@/api/business/accInfo'
import { listAllPayChannel } from '@/api/business/payChannel'
import { listAllCompanyInfo } from '@/api/business/companyInfo'
import { listAllCompanyPayChannel, signChannel } from '@/api/business/companyPayChannel'
import QrCodeComponent from '@/components/QrCode.vue'
import { formatDate } from '@/utils'
import { addDateRange } from '@/utils/ruoyi'
import { listBill } from '@/api/business/accRecharge.js'
import ownAccBalance from "@/views/business/salaryAccount/ownAccBalance.vue"
import ownAccServiceCharge from '@/views/business/salaryAccount/ownAccServiceCharge.vue'
export default {
name: "OwnAcc",
props: {
activeName: {
type: String,
default: ''
}
},
components: { QrCodeComponent, ownAccBalance, ownAccServiceCharge },
data() {
return {
// 根路径
baseURL: process.env.VUE_APP_BASE_API,
accList: [],
// 查询参数
queryParams: {
bindType: 1,
},
sysPayChannelMap: null,
// 账户详情
accDetail: {
content_style: {
'font-size': '16px',
},
label_style: {
'font-size': '16px',
},
info: {
cardNo: '',
bankAccName: '',
cardBank: '',
cardBranch: '',
cardLocation: '',
cardDeposit: '',
availableTransferAmount: '',
availableFeeAmount: ''
},
panel: false
},
// 绑定账户
openSign: {
panel: false,
companyId: null,
companyList: [],
codePanel: false,
codeUrl: '',
channelCode: ''
},
companyPayChannelList: [],
// 充值记录参数
loading: false,
dateRange: [formatDate(new Date()), formatDate(new Date())],
billDataList: [],
billTotal: 0,
billPanel: false,
billQuery: {
pageNum: 1,
pageSize: 10,
capitalPurpose: 1, //账单类型:1-服务费;2-余额
tranType: '', //收支类型:1-收入;2-支出
startTime: '',
endTime: '',
},
// 去发薪部分参数
payVisible: false,
cardNo: ''
};
},
created() {
},
mounted() {
if (this.activeName == 'ownAcc') {
this.getList();
}
},
methods: {
// 点击服务费充值
ownServiceChargeRecharge(val) {
this.$refs.ownAccServiceCharge.enableRecharge(val)
},
// 点击余额充值
ownBalanceRecharge(val) {
this.$refs.ownAccBalance.enableRecharge(val)
},
// 跳转到批量到支付宝
toLinkAlipay() {
this.$router.push({ path: "/transfer/batchToAli", query: { number: this.cardNo } });
this.payVisible = false
},
// 跳转到批量到银行卡
toLinkBankCard() {
this.$router.push({ path: "/transfer/batchToBank", query: { number: this.cardNo } });
this.payVisible = false
},
/** 点击去发薪按钮 */
salarySelection(number) {
this.cardNo = number
this.payVisible = true
},
/** 点击充值记录按钮方法 */
showBill(cardNo) {
this.billQuery.cardNo = cardNo;
this.billPanel = true;
this.getBillList();
},
handleSizeChange(val) {
this.billQuery.pageSize = Number(val)
this.getBillList()
},
handleCurrentChange(val) {
this.billQuery.pageNum = Number(val)
this.getBillList()
}, /** 请求记录数据 */
getBillList() {
if (this.dateRange && this.dateRange.length > 0) {
let searchVal = addDateRange(this.billQuery, this.dateRange)
this.billQuery.startTime = searchVal.params.beginTime.split(" ")[0] + " 00:00:00"
this.billQuery.endTime = searchVal.params.endTime.split(" ")[0] + " 23:59:59"
} else {
this.billQuery.startTime = ''
this.billQuery.endTime = ''
}
this.loading = true
listBill(this.billQuery).then(res => {
if (res.code == 200) {
this.billDataList = res.rows
this.billTotal = res.total
}
}).finally(() => {
this.loading = false
})
},
/** 绑定账户弹窗-确认按钮功能 */
submitBind() {
const singForm = {
companyId: this.openSign.companyId,
unitType: 1,
channelCode: this.openSign.channelCode
}
this.$modal.loading()
signChannel(singForm).then(resp => {
this.openSign.codePanel = true;
this.openSign.codeUrl = resp.data
}).finally(() => {
this.$modal.closeLoading()
this.openSign.panel = false;
})
},
// 点击绑账户
goRegister() {
this.openSign.companyId = null;
this.openSign.channelCode = null;
this.companyPayChannelList = [];
listAllCompanyInfo({ bindType: 1 }).then(resp => {
if (200 === resp.code) {
this.openSign.companyList = resp.data
}
}).finally(() => {
this.openSign.panel = true
})
},
/** 绑定账户-选择账户主体执行 */
selectSignCompany(value) {
this.openSign.channelCode = null;
const channelQuery = {
unitType: 1,
companyId: value,
status: 1
}
listAllCompanyPayChannel(channelQuery).then(resp => {
this.companyPayChannelList = resp.data
})
},
/** 查看账户详情 */
viewDetail(card) {
this.$modal.loading("数据加载中...")
getAccAliInfo(card.payAccNo).then(resp => {
if (200 === resp.code) {
this.accDetail.companyName = card.companyName
this.accDetail.info = resp.data
this.accDetail.panel = true
}
}).finally(() => {
this.$modal.closeLoading()
})
},
/** 查询账户列表 */
async getList() {
this.$modal.loading();
try {
if (!this.sysPayChannelMap) {
await listAllPayChannel().then(resp => {
this.sysPayChannelMap = new Map(resp.data.map(value => [value.channelCode, value.channelName]));
})
}
await listAllAccInfo(this.queryParams).then(res => {
this.accList = res.data
})
} finally {
this.$modal.closeLoading()
}
},
/** 搜索按钮操作 */
handleQuery() {
this.getList();
},
/** 搜索重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
}
};
</script>
<style lang="scss" scoped>
// 卡片样式
.box-card {
margin-top: 12px;
// 公司信息部分样式
.companyConterMain {
width: 100%;
height: 140px;
display: flex;
align-items: center;
justify-content: space-between;
// 公司图标样式
.enterpriseImageMain {
width: 200px;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
.enterpriseImage {
width: 120px;
height: 68px;
}
}
// 公司信息内容部分样式
.companyConterInformation {
width: calc(100% - 180px);
height: 90%;
display: flex;
flex-direction: column;
flex-wrap: wrap;
align-content: center;
justify-content: space-evenly;
}
}
// 操作按钮部分样式
.operateConterMain {
width: 90%;
height: 120px;
display: flex;
flex-direction: column;
flex-wrap: wrap;
align-content: center;
justify-content: space-evenly;
}
}
</style>
\ No newline at end of file
<template>
<!-- 自由账户充值-余额 -->
<div>
<!-- 余额充值弹窗 -->
<el-dialog title="余额充值" :visible.sync="ownAliQRCodeRechargeOpen" width="42%" center>
<el-row :gutter="64">
<el-col :span="12">
<p style="text-align: center;">通过与账本同主体的企业支付宝进行充值,可在手机端和电脑端充值</p>
</el-col>
<el-col :span="12">
<p style="text-align: center;">通过银行系统进行打款充值</p>
</el-col>
</el-row>
<el-row :gutter="64">
<el-col :span="12">
<div class="ownRechargeMain">
<img class="ownRechargeImage" src="@/assets/images/zfb.png" alt="">
<el-button class="ownRechargeButton"
@click="ownAliQRCodeRechargeOpen = false; aliQRCodeRechargeOpen = true">支付宝充值</el-button>
</div>
</el-col>
<el-col :span="12">
<div class="ownRechargeMain">
<img class="ownRechargeImage" src="@/assets/images/xianxia.png" alt="">
<el-button class="ownRechargeButton" @click="offlineRecharge()">线下充值</el-button>
</div>
</el-col>
</el-row>
</el-dialog>
<!-- 第三方线下充值-余额充值 -->
<el-dialog title="汇款充值余额" :visible.sync="rechargeCoursePanel" width="50%">
<h2 style="font-weight: bold;font-size: 22px;margin-top: -15px;color: #1a1a1a">什么是汇款充值</h2>
<el-row>
<el-col :span="24">
商户可通过银行转账方式完成对应支付宝专属收款账户的充值。支付宝会为商户的每个支付宝账户提供独立的"专属收款账户",商户从任一同名银行账户向其对应的"专属收款账户"转账,即可完成充值。
</el-col>
</el-row>
<el-row style="margin-top: 15px;">
<el-col :span="24">
<span style="font-weight: bold;font-size: 22px;color: #1a1a1a">
三步完成充值
</span>
<a style="color: #69b1ff" href="https://render.alipay.com/p/yuyan/180020040000423002/de59b"
target="_blank">(查看教程)</a>
</el-col>
</el-row>
<el-row style="margin-top: 15px;">
<el-col :span="24">
<el-timeline>
<el-timeline-item>
<span style="font-weight: bold;font-size: 18px">登录你的网上银行</span>
<span style="color: gray;font-size: 14px">(支持任意银行)</span>
<div style="font-size: 14px;margin-top: 5px">
必须使用本公司同名的银行账户进行汇款转账,首次使用建议小金额转入测试
</div>
</el-timeline-item>
<el-timeline-item>
<span style="font-weight: bold;font-size: 18px">转账时填写以下专属账户</span>
<div style="font-size: 14px;margin-top: 5px">请注意收款账户支行选择:
<span style="color: red">支付宝-备付金账户</span>
<span>、开户地选择:</span>
<span style="color: red">上海市-上海市</span>
<span>,否则支付宝无法收到资金</span>
</div>
<el-descriptions :title="offlineRechargeStatic ? '你的企业备付金余额账户' : ''" :column="1"
:border="true" style="margin-top: 15px" :label-style="accDetail.label_style"
:contentStyle="accDetail.content_style">
<el-descriptions-item label="账号">{{ offlineRechargeData.cardNo }}</el-descriptions-item>
<el-descriptions-item label="户名">{{ offlineRechargeData.bankAccName
}}</el-descriptions-item>
<el-descriptions-item label="银行">{{ offlineRechargeData.cardBank
}}</el-descriptions-item>
<el-descriptions-item label="支行">{{ offlineRechargeData.cardBranch
}}</el-descriptions-item>
<el-descriptions-item label="开户地">{{ offlineRechargeData.cardLocation
}}</el-descriptions-item>
<el-descriptions-item label="联行号">{{ offlineRechargeData.cardDeposit
}}</el-descriptions-item>
</el-descriptions>
</el-timeline-item>
<el-timeline-item>
<span style="font-weight: bold;font-size: 18px">转账完成后,工作时间最晚2小时到账,最快1分钟充值到您的支付宝账户</span>
<div style="font-size: 14px;margin-top: 5px">非工作时间预计最晚下个工作日到账(具体以银行为准)</div>
</el-timeline-item>
</el-timeline>
</el-col>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="rechargeCoursePanel = false">确 定</el-button>
</div>
</el-dialog>
<!-- 充值弹窗 -->
<el-dialog title="支付宝充值" :visible.sync="aliQRCodeRechargeOpen" width="500px" style="text-align: center">
<!-- <h3>转账完成后,工作时间最晚2小时到账,最快1分钟充值到您的支付宝账户</h3>-->
<el-form :model="aliQRCodeRechargeForm" ref="signNewForm" size="small" label-width="120px"
:rules="aliQRCodeRechargeRules">
<el-form-item label="收款账户" prop="payeeAccNo">
<el-input v-model="aliQRCodeRechargeForm.payeeAccNo" placeholder="请输入收款账号" disabled />
</el-form-item>
<el-form-item label="付款账户" prop="payerAccNo"
v-if="aliQRCodeRechargeForm.bindType && 2 === aliQRCodeRechargeForm.bindType && aliQRCodeRechargeForm.rechargeType == 2">
<accSelect :bindType="1" v-model="aliQRCodeRechargeForm.payerAccNo"></accSelect>
</el-form-item>
<el-form-item label="余额/服务费" prop="rechargeType">
<template>
<el-select v-model="aliQRCodeRechargeForm.rechargeType" style="width: 100%" disabled>
<el-option label="余额" :value="2">余额</el-option>
<el-option label="服务费" :value="1">服务费</el-option>
</el-select>
</template>
</el-form-item>
<el-form-item label="充值金额" prop="amount">
<el-input-number v-model="aliQRCodeRechargeForm.amount" placeholder="请输入充值金额" :precision="2"
style="width: 100%" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="getAliPayUrl">确认支付</el-button>
<el-button @click="aliQRCodeRechargeOpen = false">取 消</el-button>
</div>
</el-dialog>
<el-dialog title="确认支付" :visible.sync="qrPayPanel.open" width="20%">
<div>
<span style="font-size: 18px;">1、使用手机支付宝扫码支付;</span>
<qr-code-component :text="qrPayPanel.payUrl" />
</div>
<div style="margin-top: 12px;">
<span style="font-size: 18px;">2、通过支付宝官网支付,<a :href="qrPayPanel.payUrl" target="_blank"
style="font-size: 20px;color: #409EFF;"><strong>去支付</strong></a>;</span>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="qrPayPanel.open = false">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { getAccAliInfo } from '@/api/business/accInfo'
import { addAccRecharge } from '@/api/business/accRecharge.js'
import QrCodeComponent from '@/components/QrCode.vue'
export default {
name: "EnableRecharge",
props: {
},
components: { QrCodeComponent },
data() {
return {
// 父组件参数
parentComponentData: {},
// 账户详情
accDetail: {
content_style: {
'font-size': '16px',
'width': '70%'
},
label_style: {
'font-size': '16px',
'width': '30%'
}
},
ownAliQRCodeRechargeOpen: false,
aliQRCodeRechargeOpen: false,
offlineRechargeStatic: false,
rechargeCoursePanel: false,
offlineRechargeData: {
cardNo: '', // 卡号
bankAccName: '', // 户名
cardBank: '', // 银行
cardBranch: '', // 支行
cardLocation: '', // 开户地
cardDeposit: '' // 联行号
},
aliQRCodeRechargeForm: {
payeeAccNo: '',
rechargeType: 2,
amount: '',
payerAccNo: ''
},
aliQRCodeRechargeRules: {
payerAccNo: [
{ required: true, message: '请选择付款账号', trigger: 'change' }
],
amount: [
{
validator: (rule, value, callback) => {
if (value <= 0) {
callback(new Error('充值金额必须大于零'));
} else {
callback()
}
},
trigger: 'blur'
}
]
},
qrPayPanel: {
open: false,
payUrl: ''
},
}
},
created() {
},
mounted() {
},
methods: {
// 确认支付按钮
getAliPayUrl() {
this.$refs.signNewForm.validate((valid) => {
if (valid) {
this.$modal.loading('充值中....')
addAccRecharge(this.aliQRCodeRechargeForm).then(res => {
this.aliQRCodeRechargeOpen = false
if (200 === res.code) {
// 如果是服务费充值 或者是内部账户余额充值
if (1 === this.aliQRCodeRechargeForm.rechargeType || 1 === this.aliQRCodeRechargeForm.bindType) {
if (res.data.status) {
this.qrPayPanel.payUrl = res.data.msg
this.qrPayPanel.open = true
this.$forceUpdate()
} else {
this.$modal.msgWarning(res.data.msg)
}
} else {
this.$modal.msgSuccess("充值成功!");
}
}
}).finally(() => {
this.$modal.closeLoading()
})
}
})
},
// 父组件调起子组件方法
enableRecharge(val) {
// console.log('子组件接收父组件参数', val);
this.aliQRCodeRechargeForm.payeeAccNo = val.payAccNo
this.aliQRCodeRechargeForm.bindType = val.bindType
this.parentComponentData = val
this.ownAliQRCodeRechargeOpen = true;
},
// 选择线下充值方法
offlineRecharge() {
this.offlineRechargeStatic = true
this.ownAliQRCodeRechargeOpen = false
// this.$modal.loading('...加载中')
getAccAliInfo(this.parentComponentData.payAccNo).then(resp => {
if (200 === resp.code) {
this.offlineRechargeData = resp.data
this.rechargeCoursePanel = true
}
}).finally(() => {
this.$modal.closeLoading()
})
},
}
}
</script>
<style lang="scss" scoped></style>
\ No newline at end of file
<template>
<!-- 自有账户服务费充值 -->
<div>
<!-- 自有账户充值 -->
<el-dialog title="服务费充值" :visible.sync="ownAliQRCodeRechargeOpen" width="42%" center>
<el-row :gutter="64">
<el-col :span="12">
<p style="text-align: center;">通过与账本同主体的企业支付宝进行充值,可在手机端和电脑端充值</p>
</el-col>
<el-col :span="12">
<p style="text-align: center;">通过银行系统进行打款充值</p>
</el-col>
</el-row>
<el-row :gutter="64">
<el-col :span="12">
<div class="ownRechargeMain">
<img class="ownRechargeImage" src="@/assets/images/zfb.png" alt="">
<el-button class="ownRechargeButton"
@click="ownAliQRCodeRechargeOpen = false; aliQRCodeRechargeOpen = true">支付宝充值</el-button>
</div>
</el-col>
<el-col :span="12">
<div class="ownRechargeMain">
<img class="ownRechargeImage" src="@/assets/images/xianxia.png" alt="">
<el-button class="ownRechargeButton" @click="offlineRecharge()">线下充值</el-button>
</div>
</el-col>
</el-row>
</el-dialog>
<!-- 充值弹窗 -->
<el-dialog title="支付宝充值" :visible.sync="aliQRCodeRechargeOpen" width="500px" style="text-align: center">
<el-form :model="aliQRCodeRechargeForm" ref="signNewForm" size="small" label-width="120px"
:rules="aliQRCodeRechargeRules">
<el-form-item label="收款账户" prop="payeeAccNo">
<el-input v-model="aliQRCodeRechargeForm.payeeAccNo" placeholder="请输入收款账号" disabled />
</el-form-item>
<el-form-item label="余额/服务费" prop="rechargeType">
<template>
<el-select v-model="aliQRCodeRechargeForm.rechargeType" style="width: 100%" disabled>
<el-option label="余额" :value="2">余额</el-option>
<el-option label="服务费" :value="1">服务费</el-option>
</el-select>
</template>
</el-form-item>
<el-form-item label="充值金额" prop="amount">
<el-input-number v-model="aliQRCodeRechargeForm.amount" placeholder="请输入充值金额" :precision="2"
style="width: 100%" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="getAliPayUrl">确认支付</el-button>
<el-button @click="aliQRCodeRechargeOpen = false">取 消</el-button>
</div>
</el-dialog>
<el-dialog title="确认支付" :visible.sync="qrPayPanel.open" width="20%">
<div>
<span style="font-size: 18px;">1、使用手机支付宝扫码支付;</span>
<qr-code-component :text="qrPayPanel.payUrl" />
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="qrPayPanel.open = false">取 消</el-button>
</div>
</el-dialog>
<!-- 直属线下充值-余额充值 -->
<el-dialog title="汇款充值余额" :visible.sync="rechargeCoursePanel" width="50%">
<h2 style="font-weight: bold;font-size: 22px;margin-top: -15px;color: #1a1a1a">什么是汇款充值</h2>
<el-row>
<el-col :span="24">
商户可通过银行转账方式完成对应支付宝专属收款账户的充值。支付宝会为商户的每个支付宝账户提供独立的"专属收款账户",商户从任一同名银行账户向其对应的"专属收款账户"转账,即可完成充值。
</el-col>
</el-row>
<el-row style="margin-top: 15px;">
<el-col :span="24">
<span style="font-weight: bold;font-size: 22px;color: #1a1a1a">
三步完成充值
</span>
<a style="color: #69b1ff" href="https://render.alipay.com/p/yuyan/180020040000423002/de59b"
target="_blank">(查看教程)</a>
</el-col>
</el-row>
<el-row style="margin-top: 15px;">
<el-col :span="24">
<el-timeline>
<el-timeline-item>
<span style="font-weight: bold;font-size: 18px">登录你的网上银行</span>
<span style="color: gray;font-size: 14px">(支持任意银行)</span>
<div style="font-size: 14px;margin-top: 5px">
必须使用本公司同名的银行账户进行汇款转账,首次使用建议小金额转入测试
</div>
</el-timeline-item>
<el-timeline-item>
<span style="font-weight: bold;font-size: 18px">转账时填写以下专属账户</span>
<div style="font-size: 14px;margin-top: 5px">请注意收款账户支行选择:
<span style="color: red">支付宝-备付金账户</span>
<span>、开户地选择:</span>
<span style="color: red">上海市-上海市</span>
<span>,否则支付宝无法收到资金</span>
</div>
<el-descriptions :title="offlineRechargeStatic ? '你的企业备付金余额账户' : ''" :column="1"
:border="true" style="margin-top: 15px" :label-style="accDetail.label_style"
:contentStyle="accDetail.content_style">
<el-descriptions-item label="账号">{{ offlineRechargeData.cardNo }}</el-descriptions-item>
<el-descriptions-item label="户名">{{ offlineRechargeData.bankAccName
}}</el-descriptions-item>
<el-descriptions-item label="银行">{{ offlineRechargeData.cardBank
}}</el-descriptions-item>
<el-descriptions-item label="支行">{{ offlineRechargeData.cardBranch
}}</el-descriptions-item>
<el-descriptions-item label="开户地">{{ offlineRechargeData.cardLocation
}}</el-descriptions-item>
<el-descriptions-item label="联行号">{{ offlineRechargeData.cardDeposit
}}</el-descriptions-item>
</el-descriptions>
</el-timeline-item>
<el-timeline-item>
<span style="font-weight: bold;font-size: 18px">转账完成后,工作时间最晚2小时到账,最快1分钟充值到您的支付宝账户</span>
<div style="font-size: 14px;margin-top: 5px">非工作时间预计最晚下个工作日到账(具体以银行为准)</div>
</el-timeline-item>
</el-timeline>
</el-col>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="rechargeCoursePanel = false">确 定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { addAccRecharge } from '@/api/business/accRecharge.js'
import QrCodeComponent from '@/components/QrCode.vue'
import { getAccAliInfo } from '@/api/business/accInfo'
export default {
components: { QrCodeComponent },
data() {
return {
// 账户详情
accDetail: {
content_style: {
'font-size': '16px',
'width': '70%'
},
label_style: {
'font-size': '16px',
'width': '30%'
}
},
aliQRCodeRechargeForm: {
payeeAccNo: '',
rechargeType: 1,
amount: '',
payerAccNo: ''
},
aliQRCodeRechargeRules: {
payerAccNo: [
{ required: true, message: '请选择付款账号', trigger: 'change' }
],
amount: [
{
validator: (rule, value, callback) => {
if (value <= 0) {
callback(new Error('充值金额必须大于零'));
} else {
callback()
}
},
trigger: 'blur'
}
]
},
ownAliQRCodeRechargeOpen: false,
aliQRCodeRechargeOpen: false,
qrPayPanel: {
open: false,
payUrl: ''
},
rechargeCoursePanel: false,
offlineRechargeData: {
cardNo: '',
bankAccName: '',
cardBank: '',
cardBranch: '',
cardLocation: '',
cardDeposit: ''
},
offlineRechargeStatic: false,
}
},
methods: {
// 选择线下充值方法
offlineRecharge() {
this.offlineRechargeStatic = true
this.ownAliQRCodeRechargeOpen = false
// this.$modal.loading('...加载中')
getAccAliInfo(this.aliQRCodeRechargeForm.payeeAccNo).then(resp => {
if (200 === resp.code) {
this.offlineRechargeData = resp.data
this.rechargeCoursePanel = true
}
}).finally(() => {
this.$modal.closeLoading()
})
},
// 确认支付按钮
getAliPayUrl() {
this.$refs.signNewForm.validate((valid) => {
if (valid) {
this.$modal.loading('充值中....')
addAccRecharge(this.aliQRCodeRechargeForm).then(res => {
this.aliQRCodeRechargeOpen = false
if (200 === res.code) {
// 如果是服务费充值 或者是内部账户余额充值
if (1 === this.aliQRCodeRechargeForm.rechargeType || 1 === this.aliQRCodeRechargeForm.bindType) {
if (res.data.status) {
this.qrPayPanel.payUrl = res.data.msg
this.qrPayPanel.open = true
this.$forceUpdate()
} else {
this.$modal.msgWarning(res.data.msg)
}
} else {
this.$modal.msgSuccess("充值成功!");
}
}
}).finally(() => {
this.$modal.closeLoading()
})
}
})
},
/** 父组件调用子组件 */
enableRecharge(val) {
// this.aliQRCodeRechargeForm.rechargeType = 1
this.aliQRCodeRechargeForm.payeeAccNo = val.payAccNo
this.aliQRCodeRechargeForm.bindType = val.bindType
// this.ownRechargeTitle = '自有服务费充值'
this.ownAliQRCodeRechargeOpen = true
},
},
mounted() {
},
created() {
}
}
</script>
<style lang="scss" scoped></style>
\ No newline at end of file
......@@ -62,21 +62,37 @@
</el-dialog>
<!-- 点击签约后查看合同 -->
<el-dialog title="签约合同" :visible.sync="signContractPanelVisible" append-to-body width="45%" center>
<iframe
src="http://admin.xinruit.com/stage-api/profile/upload/2025/04/17/2c90b129-f55c-48a7-9e13-86b48b3354ab.pdf"
frameborder="0" style="width: 100%;height:500px"></iframe>
<el-steps :active="active" finish-status="success" simple style="margin-top: 20px">
<el-step title="1、签订合同"></el-step>
<el-step title="2、确认签约"></el-step>
</el-steps>
<div class="demo-form" v-if="active == 1">
<div style="margin: 20px;padding: 20px;">
<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.native="confirmSealContractFile">确认签订合同</el-button>
</div>
</div>
<div class="demo-form" v-if="active == 2">
<div style="margin: 20px;padding: 20px;">
<iframe :src=this.contractUrl style="width:100%;height:600px;" frameborder="0"></iframe>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="signContractPaneSubmit">确 定</el-button>
<el-button @click="signContractPanelCancel">取 消</el-button>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import { listToSignUnit } from '@/api/business/unitInfo'
import { addLaborSign } from '@/api/business/laborSign'
import { addLaborSign, applySignPreGenFile, confirmSignContract } from '@/api/business/laborSign'
import { listAllCompanyInfo } from '@/api/business/companyInfo'
import { signContractFile } from '@/api/business/onlineTaskInfo'
export default {
name: "taxSignComponent",
......@@ -85,6 +101,11 @@ export default {
},
data() {
return {
// 合同url
contractUrl: '',
// 步骤条
active: 1,
payerCompanyArr: [],
signForm: {
taxUnitId: null,
......@@ -178,7 +199,48 @@ export default {
this.signContractPanelVisible = false;
},
submitSignForm() {
this.signContractPanelVisible = true
this.$modal.loading();
this.signForm.contractUrl = "pre";
applySignPreGenFile(this.signForm).then(resp => {
if (200 === resp.code) {
this.$modal.msgSuccess("操作成功!");
this.signContractPanelVisible = true;
this.contractUrl = resp.data;
this.signForm.contractUrl = resp.data;
}else {
this.$modal.msgError(resp.message);
}
}).catch(() => {
this.signContractPanelVisible = false;
this.signPanel = false
}).finally(() => {
this.$modal.closeLoading();
})
},
confirmSealContractFile() {
// TODO 确认框
// this.$modal.confirm('是否确认签订合同?').then(() => {
// 添加 loading 提示
this.$modal.loading("正在签订合同,请稍候...");
confirmSignContract(this.signForm).then(response => {
if (response.code === 200) {
this.$modal.msgSuccess("签订合同成功");
this.contractUrl = response.data;
this.signForm.contractUrl = response.data;
this.active = 2;
} else {
this.$modal.msgError("签订合同失败:" + (response.msg || "未知错误"));
}
}).catch(error => {
console.error("签订合同接口调用失败", error);
this.$modal.msgError("签订合同失败,请稍后再试");
}).finally(() => {
this.$modal.closeLoading()
});
// }).catch(() => {
// // 用户取消操作
// this.$modal.msgError("已取消签订合同");
// });
}
},
};
......
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="medium" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="代发账户" prop="payAccNo">
<el-input
v-model="queryParams.payAccNo"
placeholder="请输入账户"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="支付通道" prop="channelCode">
<el-select v-model="queryParams.channelCode" placeholder="请选择支付通道" clearable>
<el-option v-for="(item, index) in taxUnitPayChannelList"
:label="item.channelName" :value="item.channelCode"
:disabled="!item.isEnter || item.isEnter < 3 || !item.status || item.status !== 1"/>
</el-select>
</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"
>新增</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="warning"-->
<!-- icon="el-icon-download"-->
<!-- size="mini"-->
<!-- @click="handleExport"-->
<!-- v-hasPermi="['system:post:export']"-->
<!-- >导出</el-button>-->
<!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="accList">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="所属企业" align="center" prop="companyName" />
<el-table-column label="代发账户信息" align="center">
<el-table-column label="户名" align="center" prop="payAccName" />
<el-table-column label="账号" align="center" prop="payAccNo" />
<el-table-column label="所属通道" align="center" prop="channelCode">
<template slot-scope="scope">
{{ sysPayChannelMap.get(scope.row.channelCode) }}
</template>
</el-table-column>
</el-table-column>
<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-info"
@click="viewDetail(scope.row)"
>账户详情</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="账号信息查询" :visible.sync="accDetail.panel" width="30%" center>
<el-descriptions :title="accDetail.companyName" :column="1" :label-style="accDetail.label_style"
:contentStyle="accDetail.content_style">
<el-descriptions-item label="账号">{{ accDetail.info.cardNo }}</el-descriptions-item>
<el-descriptions-item label="户名">{{ accDetail.info.bankAccName }}</el-descriptions-item>
<el-descriptions-item label="银行">{{ accDetail.info.cardBank }}</el-descriptions-item>
<el-descriptions-item label="支行">{{ accDetail.info.cardBranch }}</el-descriptions-item>
<el-descriptions-item label="开户地">{{ accDetail.info.cardLocation }}</el-descriptions-item>
<el-descriptions-item label="联行号">{{ accDetail.info.cardDeposit }}</el-descriptions-item>
<!-- <el-descriptions-item label="备付金余额">{{ offlineRecharge.availableAmount }}</el-descriptions-item>-->
<el-descriptions-item label="可转账金额">{{ accDetail.info.availableTransferAmount }}</el-descriptions-item>
<el-descriptions-item label="可用服务费">{{ accDetail.info.availableFeeAmount }}</el-descriptions-item>
<el-descriptions-item label="到卡费率">{{ accDetail.info.toBankRate }}</el-descriptions-item>
<el-descriptions-item label="到户费率">{{ accDetail.info.toAlipayRate }}</el-descriptions-item>
</el-descriptions>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="accDetail.panel = false">确 定</el-button>
</div>
</el-dialog>
<!-- 添加代发账户对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="addForm" :model="addForm" label-width="120px">
<el-form-item label="对方企业名称" prop="inviterName">
<el-input v-model="addForm.inviterName" disabled placeholder="企业名称" />
</el-form-item>
<el-form-item label="对方信用代码" prop="inviterCode">
<el-input v-model="addForm.inviterCode" disabled placeholder="信用代码" />
</el-form-item>
<el-form-item label="分配账户通道" prop="channelCode">
<el-select v-model="addForm.channelCode" placeholder="请选择支付通道">
<el-option v-for="(item, index) in taxUnitPayChannelList"
:label="item.channelName" :value="item.channelCode"
:disabled="!item.isEnter || item.isEnter < 3 || !item.status || item.status !== 1"/>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitAdd">确 定</el-button>
<el-button @click="open = false">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { getAccAliInfo, listLaborAcc } from '@/api/business/accInfo'
import { listAllPayChannel } from '@/api/business/payChannel'
import { listAllCompanyPayChannel } from '@/api/business/companyPayChannel'
import { getLaborSign, giveAccToLabor } from '@/api/business/laborSign'
import companyPayChannel from '@/views/business/companyPayChannel/index.vue'
import fa from 'element-ui/src/locale/lang/fa'
export default {
name: "LaborAcc",
computed: {
fa() {
return fa
},
companyPayChannel() {
return companyPayChannel
}
},
data() {
return {
// 遮罩层
loading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 表格数据
accList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
laborSignId: null,
channelCode: undefined,
payAccNo: undefined
},
// 账户详情
accDetail: {
content_style: {
'font-size': '16px',
},
label_style: {
'font-size': '16px',
},
panel: false,
info: {}
},
sysPayChannelList: [],
sysPayChannelMap: undefined,
taxUnitPayChannelList: [],
addForm: {
channelCode: null,
}
};
},
watch: {
$route(route) {
this.queryParams.laborSignId = this.$route.query.signId
this.getList();
}
},
mounted() {
this.queryParams.laborSignId = this.$route.query.signId
this.getList();
this.pageInit()
},
methods: {
async getList() {
if (this.queryParams.laborSignId) {
if (!this.sysPayChannelList || 0 >= this.sysPayChannelList.length) {
await this.sysPayChannelAll()
}
this.loading = true;
await listLaborAcc(this.queryParams).then(resp => {
this.accList = resp.rows
}).finally(() => {
this.loading = false;
})
}
},
sysPayChannelAll() {
listAllPayChannel().then(resp => {
this.sysPayChannelList = resp.data
this.sysPayChannelMap = new Map(resp.data.map(value => [value.channelCode, value.channelName]));
})
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
viewDetail(card) {
this.$modal.loading("正在查询...")
getAccAliInfo(card.payAccNo).then(resp => {
if (200 === resp.code) {
this.accDetail.companyName = card.accName
this.accDetail.info = resp.data
this.accDetail.panel = true
}
}).finally(() => {
this.$modal.closeLoading()
})
},
async pageInit() {
const channelQuery = {
unitType: 2,
}
await getLaborSign(this.queryParams.laborSignId).then(resp => {
channelQuery.compaynId = resp.data.taxUnitId
this.addForm.inviterName = resp.data.inviterName
this.addForm.inviterCode = resp.data.inviterCode
})
if (channelQuery.compaynId) {
await listAllCompanyPayChannel(channelQuery).then(resp => {
this.taxUnitPayChannelList = resp.data
})
}
},
/** 新增按钮操作 */
handleAdd() {
this.open = true;
this.title = "分配代发账户";
},
submitAdd() {
if (this.accList && this.accList.length > 0) {
const hasChannel = this.accList.some(acc => acc.channelCode === this.addForm.channelCode);
if (hasChannel) {
const channelName = this.sysPayChannelMap.get(this.addForm.channelCode);
const msg = `${channelName}:该支付通道已有分配记录,是否继续?`
this.$confirm(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.addForm.laborSignId = this.queryParams.laborSignId;
this.givPayAcc()
})
}
} else {
this.addForm.laborSignId = this.queryParams.laborSignId;
this.givPayAcc()
}
},
givPayAcc() {
this.$modal.loading("处理中...")
giveAccToLabor(this.addForm).then(resp => {
if (200 === resp.code) {
if (200 === resp.data.code) {
this.$modal.msgSuccess("操作成功")
this.getList()
} else if (202 === resp.data.code) {
this.$confirm('未签约支付协议,暂无法进行此操作', '操作提示', {
distinguishCancelAndClose: true,
confirmButtonText: '去签约',
cancelButtonText: '取消'
}).then(() => {
this.$router.push({ path: "/taxUnit/payAcc" });
}).catch(action => {
});
}
}
}).finally(() => {
this.open = false;
this.$modal.closeLoading()
})
}
}
};
</script>
<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="companyId">
<el-select v-model="queryParams.companyId" placeholder="请选择关联企业" clearable>
<el-option v-for="item in unitInfoList" :key="item.companyId"
:label="item.companyName" :value="item.companyId" />
</el-select>
</el-form-item>
<el-form-item label="支付通道" prop="channelName">
<el-input
v-model="queryParams.channelName"
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="warning"-->
<!-- icon="el-icon-download"-->
<!-- size="mini"-->
<!-- @click="handleExport"-->
<!-- v-hasPermi="['business:companyPayChannel:export']"-->
<!-- >导出</el-button>-->
<!-- </el-col>-->
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
<!-- </el-row>-->
<el-table v-loading="loading" :data="companyPayChannelList">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="企业名称" align="center" prop="companyName" />
<el-table-column label="支付通道" align="center" prop="channelName" />
<el-table-column label="使用状态" align="center" prop="status">
<template slot-scope="scope">
<el-switch
v-model="scope.row.status"
:active-value="1"
:inactive-value="2"
@change="handleStatusChange(scope.row)"
></el-switch>
</template>
</el-table-column>
<el-table-column label="开通状态" align="center" prop="isEnter">
<template slot-scope="scope">
<dict-tag :options="dict.type.pay_channel_use_status" :value="scope.row.isEnter" />
</template>
</el-table-column>
<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-help"
@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>
</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="扫码签约" :visible.sync="bindAcc.codePanel" width="300px" style="text-align: center">
<h3>请使用</h3>
<h3><span style="color: #00afff">{{ bindAcc.companyName}}</span>的对公支付宝</h3>
<h3>扫描下方二维码</h3>
<qr-code-component :text="bindAcc.codeUrl" />
<h3>操作完成后大约5-10分钟</h3>
<h3>可刷新页面查看结果</h3>
<div slot="footer" class="dialog-footer">
<el-button @click="bindAcc.codePanel = false">关 闭</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
listCompanyPayChannel, signChannel,
updateCompanyPayChannel
} from '@/api/business/companyPayChannel'
import { listAllPayChannel } from '@/api/business/payChannel'
import { listAllUnitInfo } from '@/api/business/unitInfo'
import QrCodeComponent from '@/components/QrCode.vue'
export default {
name: "CompanyPayChannel",
components: { QrCodeComponent },
dicts: ['pay_channel_use_status'],
data() {
return {
// 根路径
baseURL: process.env.VUE_APP_BASE_API,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 企业支付通道表格数据
companyPayChannelList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
companyId: null,
unitType: 2,
channelCode: null,
channelName: null,
status: null,
deptId: null,
},
sysPayChannelList: [],
unitInfoList: [],
bindAcc: {
codePanel: false,
companyName: '',
codeUrl: '',
},
};
},
created() {
this.queryAllUnit()
this.getList();
},
methods: {
/** 查询企业支付通道列表 */
getList() {
this.loading = true;
this.queryParams.unitType = 2
listCompanyPayChannel(this.queryParams).then(response => {
this.companyPayChannelList = response.rows;
this.total = response.total;
this.loading = false;
});
},
queryAllUnit() {
listAllUnitInfo().then(resp => {
this.unitInfoList = resp.data.map(item => ({
'companyId': item['id'],
'companyName': item['unitName']
}));
})
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: null,
companyId: null,
unitType: null,
channelCode: null,
channelName: null,
status: 0,
isEnter: null,
deptId: null,
};
this.resetForm("form");
},
sysPayChannelAll() {
listAllPayChannel().then(resp => {
this.sysPayChannelList = resp.data
if (this.sysPayChannelList && this.companyPayChannelList) {
this.sysPayChannelList.filter(item => {
if (this.companyPayChannelList.some(obj => obj.channelCode === item.channelCode)) {
item.disabled = true
}
})
}
})
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 通道状态修改
handleStatusChange(row) {
const _this = this;
let text = row.status === 1 ? "启用" : "停用";
_this.$modal.confirm('确认要"' + text + '""' + row.channelName + '"支付通道吗?').then(function() {
const updateForm = {
id: row.id,
status: row.status
}
updateCompanyPayChannel(updateForm).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}).catch(() => {
row.status = row.status === 2 ? 1 : 2;
});
}).catch(function() {
row.status = row.status === 2 ? 1 : 2;
});
},
signChannel(row) {
this.$confirm('确认开通支付通道[' + row.channelName + ']?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.doSignChannel(row)
})
},
doSignChannel(row) {
const singForm = {
companyId: row.companyId,
unitType: 2,
channelCode: row.channelCode
}
this.$modal.loading()
signChannel(singForm).then(resp => {
this.bindAcc.codePanel = true
this.bindAcc.codeUrl = resp.data
this.bindAcc.companyName = row.companyName
}).finally(() => {
this.$modal.closeLoading()
})
},
goChannelSet(row) {
this.$router.push({ path: '/business/unitRechargeBank', query: {
companyId: row.companyId,
channelCode: row.channelCode
} })
}
}
};
</script>
......@@ -62,7 +62,7 @@
<el-table-column label="月开票额度" align="center" prop="invoiceLimit" />
<el-table-column label="可开票类型" align="center" prop="invoiceTypes">
<template slot-scope="scope">
<dict-tag style="margin-top: 3px" v-for="(item, index) in scope.row.invoiceTypes.split(',')" :key="index"
<dict-tag v-if="scope.row.invoiceTypes" style="margin-top: 3px" v-for="(item, index) in scope.row.invoiceTypes.split(',')" :key="index"
:options="dict.type.tax_invoice_type" :value="item" />
</template>
</el-table-column>
......@@ -110,6 +110,13 @@
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['business:unitInfo:remove']">删除
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-platform-eleme"
@click="goPayChannel(scope.row)"
v-hasPermi="['business:companyPayChannel:station']"
>支付通道</el-button>
</template>
</el-table-column>
</el-table>
......@@ -316,6 +323,14 @@ export default {
viewSealInfo(row) {
const type = "hr";
this.$router.push({ path: '/seal/sealCompanyInfo', query: { bussinessId: row.id, bussinessType: type, showFlag:0 } })
},
goPayChannel(row) {
this.$router.push({ path: '/business/companyPayChannel',
query: {
companyId: row.id,
unitType: 2,
companyName: row.companyName
} })
}
}
}
......
......@@ -310,10 +310,17 @@
<el-dialog title="绑定账户" :visible.sync="bindAcc.panel" width="300">
<el-form label-width="80px">
<el-form-item label="账户主体">
<el-select v-model="bindAcc.companyId" placeholder="请选择账户对应的企业主体">
<el-select v-model="bindAcc.companyId" placeholder="请选择账户对应的企业主体" @change="selectSignCompany">
<el-option v-for="item in bindAcc.taxUnitList" :label="item.unitName" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="支付通道">
<el-select v-model="bindAcc.channelCode" placeholder="请选择要开通的支付通道">
<el-option v-for="item in companyPayChannelList" :key="item.channelCode"
:label="item.channelName" :value="item.channelCode"
:disabled="!item.isEnter || item.isEnter > 2" />
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitBind">确定</el-button>
......@@ -343,6 +350,7 @@ import { formatDate } from '@/utils'
import QrCodeComponent from '@/components/QrCode.vue'
import TaxSignComponent from '@/views/business/salaryAccount/taxSignComponent.vue'
import { bindUnitAcc, listAllHasNoOpenInfo, listAllUnitAccInfo, listAllUnitInfo } from '@/api/business/unitInfo'
import { listAllCompanyPayChannel, signChannel } from '@/api/business/companyPayChannel'
export default {
name: 'SalaryAccount',
components: { TaxSignComponent, QrCodeComponent, AccSelect },
......@@ -354,6 +362,7 @@ export default {
taxUnitList: [],
codePanel: false,
codeUrl: '',
channelCode: ''
},
billPanel: false,
qrPayPanel: {
......@@ -431,7 +440,8 @@ export default {
billTotal: 0,
userInfoName: null,
accountCollection: [],
loading: false
loading: false,
companyPayChannelList: null,
}
},
created() {
......@@ -604,7 +614,10 @@ export default {
})
},
goRegister() {
listAllHasNoOpenInfo().then(resp => {
this.bindAcc.companyId = null;
this.bindAcc.channelCode = null;
this.companyPayChannelList = [];
listAllUnitInfo().then(resp => {
if (200 === resp.code) {
this.bindAcc.taxUnitList = resp.data
}
......@@ -613,16 +626,30 @@ export default {
})
},
submitBind() {
const singForm = {
companyId: this.bindAcc.companyId,
unitType: 2,
channelCode: this.bindAcc.channelCode
}
this.$modal.loading()
bindUnitAcc(this.bindAcc.companyId).then(resp => {
if (200 === resp.code) {
this.bindAcc.codeUrl = resp.data
signChannel(singForm).then(resp => {
this.bindAcc.codePanel = true
}
this.bindAcc.codeUrl = resp.data
}).finally(() => {
this.$modal.closeLoading()
this.bindAcc.panel = false;
})
},
selectSignCompany(value) {
this.bindAcc.channelCode = null;
const channelQuery = {
unitType: 2,
companyId: value,
status: 1
}
listAllCompanyPayChannel(channelQuery).then(resp => {
this.companyPayChannelList = resp.data
})
}
}
}
......
......@@ -44,19 +44,17 @@
v-if="scope.row.signStatus && 1 === scope.row.signStatus" v-hasPermi="['business:laborSign:add']">签约合约
</el-button>
<el-button size="mini" type="text" icon="el-icon-lollipop" @click="givePayAcc(scope.row)"
v-if="scope.row.signStatus && 2 === scope.row.signStatus && !scope.row.payAccNo"
v-hasPermi="['business:unitInfo:add']">分配账户
v-if="scope.row.signStatus && 2 === scope.row.signStatus"
v-hasPermi="['business:laborSign:add']">代发账户
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 点击签约后查看合同 -->
<el-dialog title="签约合同" :visible.sync="doAgreePanelVisible" width="58%" center>
<iframe
src="http://admin.xinruit.com/stage-api/profile/upload/2025/04/17/2c90b129-f55c-48a7-9e13-86b48b3354ab.pdf"
frameborder="0" style="width: 100%;height:600px"></iframe>
<iframe :src=this.contractUrl frameborder="0" style="width: 100%;height:600px"></iframe>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="doAgreePanelSubmit">确 定</el-button>
<el-button type="primary" @click="confirmSealContractFile">确认盖章签约</el-button>
<el-button @click="doAgreePanelCancel">取 消</el-button>
</div>
</el-dialog>
......@@ -67,13 +65,16 @@
<script>
import { querySignList } from '@/api/business/unitInfo'
import { agreeSign, giveAccToLabor } from '@/api/business/laborSign'
import { agreeSeal, agreeSign, confirmSignContract, giveAccToLabor } from '@/api/business/laborSign'
export default {
name: 'signList',
dicts: ['tax_labor_sign_status'],
data() {
return {
// 合同url
contractUrl: '',
// 遮罩层
loading: true,
// 显示搜索条件
......@@ -127,8 +128,62 @@ export default {
},
doAgree(row) {
this.doAgreeData = row
this.contractUrl = row.contractUrl
this.doAgreePanelVisible = true
},
async confirmSealContractFile() {
const confirmResult = await this.$confirm(`确认签订与${this.doAgreeData.inviterName}的合约吗?`, '操作提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).catch(() => {
// 用户取消操作,不做任何处理
return false;
});
console.log("doAgreeData", JSON.stringify(this.doAgreeData))
if (!confirmResult) return;
this.$modal.loading("正在签订合同,请稍候...");
const signObj = {
contractUrl: this.doAgreeData.contractUrl,
inviterId: this.doAgreeData.inviterId,
taxUnitId: this.doAgreeData.taxUnitId,
};
try {
const response = await confirmSignContract(signObj);
if (response.code === 200) {
const contractUrl = response.data;
if (!contractUrl) {
this.$modal.msgError("签订合同失败:返回合同地址为空");
return;
}
this.$modal.msgSuccess("签订合同成功");
// this.contractUrl = contractUrl;
// this.doAgreeData.contractUrl = contractUrl;
const sealObj = {
id: this.doAgreeData.id,
contractUrl:contractUrl,
inviterId: this.doAgreeData.inviterId,
taxUnitId: this.doAgreeData.taxUnitId,
};
console.log("sealObj", JSON.stringify(sealObj))
const resp = await agreeSeal(sealObj);
if (resp.code === 200) {
this.$modal.msgSuccess("签订合同成功");
this.doAgreePanelVisible = false;
this.getList();
}else {
this.$modal.msgError("签订合同失败:" + (resp.msg || "未知错误"));
}
} else {
this.$modal.msgError("签订合同失败:" + (this.$options.filters.escapeHtml(response.msg) || "未知错误"));
}
} catch (error) {
console.error("签订合同接口调用失败", error);
this.$modal.msgError("签订合同失败,请稍后再试");
} finally {
this.$modal.closeLoading();
}
},
doAgreePanelSubmit() {
this.$confirm(`确认签订与${this.doAgreeData.inviterName}的合约吗?`, '操作提示', {
confirmButtonText: '确定',
......@@ -148,33 +203,7 @@ export default {
this.doAgreePanelVisible = false
},
givePayAcc(row) {
this.$confirm(`确认给[${row.inviterName}]分配付款专户吗?`, '操作提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$modal.loading("处理中...")
giveAccToLabor(row.id).then(resp => {
if (200 === resp.code) {
if (200 === resp.data.code) {
this.$modal.msgSuccess("操作成功")
this.getList()
} else if (202 === resp.data.code) {
this.$confirm(row.taxUnitName + ':未签约支付协议,暂无法进行此操作', '操作提示', {
distinguishCancelAndClose: true,
confirmButtonText: '去签约',
cancelButtonText: '取消'
}).then(() => {
this.$router.push({ path: "/taxUnit/payAcc" });
}).catch(action => {
});
}
}
}).finally(() => {
this.$modal.closeLoading()
})
}).catch(() => { });
this.$router.push({ path: '/business/laborAcc', query: { signId: row.id } })
}
}
}
......
<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>
<!-- <el-col :span="1.5">
<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>
</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" }
],
}
};
},
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>
......@@ -11,13 +11,13 @@
</el-form-item>
<el-form-item prop="password">
<el-input v-model="loginForm.password" type="password" auto-complete="off" placeholder="密码"
@keyup.enter.native="getSmsCode">
@keyup.enter.native="handleLogin">
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
</el-input>
</el-form-item>
<el-form-item prop="code" v-if="captchaEnabled">
<el-input v-model="loginForm.code" auto-complete="off" placeholder="数字验证码" style="width: 63%;"
@keyup.enter.native="getSmsCode">
@keyup.enter.native="handleLogin">
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
</el-input>
<div class="login-code">
......@@ -37,7 +37,7 @@
<el-checkbox v-model="loginForm.rememberMe" style="margin:12px 0px 25px 0px;">记住密码</el-checkbox>
<el-form-item style="width:100%;">
<el-button :loading="loading" size="medium" type="primary" style="width:100%;"
@click.native.prevent="getSmsCode">
@click.native.prevent="handleLogin">
<span v-if="!loading">登 录</span>
<span v-else>登 录 中...</span>
</el-button>
......@@ -236,7 +236,7 @@ export default {
// this.loginRules.smsCode = [{ required: true, trigger: "change", message: "请输入短信验证码" }]
// this.$refs.loginForm.validate(valid => {
// if (valid) {
this.loginForm.smsCode = code
// this.loginForm.smsCode = code
this.loading = true;
if (this.loginForm.rememberMe) {
Cookies.set("username", this.loginForm.username, { expires: 30 });
......
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