Commit 3668696e authored by 许珑标's avatar 许珑标

Merge branch 'feat/payChannel' into yx-test

# Conflicts:
#	src/views/business/companyInfo/merchant.vue
#	src/views/business/taxUnit/index.vue
parents b171753c 878032c7
......@@ -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({
......
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
})
}
......@@ -60,11 +60,12 @@ export function agreeSign(id) {
})
}
// 删除代发合约签订
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'
})
}
......@@ -10,7 +10,7 @@ export function login(username, password, code, smsCode, uuid) {
uuid
}
return request({
url: '/login',
url: '/loginBySmsCode',
headers: {
isToken: false
},
......
......@@ -110,6 +110,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>
......@@ -260,12 +267,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 +330,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>
......
<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">
......@@ -142,12 +156,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,
......
......@@ -31,7 +31,7 @@
<div style="width:90%;">
<el-row>
<el-col :span="14">
账户:({{ ele.companyName }})
账户:({{ ele.payAccName }})
</el-col>
<el-col :span="8">
<el-button type="info" @click="viewDetail(ele)" plain>账户详情</el-button>
......@@ -43,6 +43,11 @@
卡号:{{ ele.payAccNo }}
</el-col>
</el-row>
<el-row>
<el-col :span="16">
通道:{{ sysPayChannelMap.get(ele.channelCode )}}
</el-col>
</el-row>
<!-- <div style="width:90%;">
<el-row>
<el-col :span="8">
......@@ -111,7 +116,7 @@
<div style="width:90%;">
<el-row>
<el-col :span="14">
账户:{{ ele.companyName }}
账户:{{ ele.payAccName }}
</el-col>
<el-col :span="8">
<el-button type="info" @click="viewDetail(ele)" plain>账户详情</el-button>
......@@ -125,6 +130,13 @@
</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 style="width:90%;">
<el-row>
<el-col :span="8">
......@@ -463,10 +475,17 @@
<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>
......@@ -496,8 +515,10 @@ 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'
export default {
name: 'SalaryAccount',
components: { TaxSignComponent, QrCodeComponent, AccSelect },
......@@ -510,6 +531,7 @@ export default {
companyList: [],
codePanel: false,
codeUrl: '',
channelCode: ''
},
bindAcc: {
panel: false,
......@@ -595,11 +617,14 @@ export default {
loading: false,
// 第三方发薪账号余额、服务费充值选择弹窗
rechargeCoursePanelDialog: false,
companyPayChannelList: [],
sysPayChannelMap: null,
}
},
created() {
},
mounted() {
this.sysPayChannelAll()
if (this.payType == 'first') {
this.params.bindType = 1
this.getListAllAccInfoFN()
......@@ -609,6 +634,11 @@ export default {
}
},
methods: {
sysPayChannelAll() {
listAllPayChannel().then(resp => {
this.sysPayChannelMap = new Map(resp.data.map(value => [value.channelCode, value.channelName]));
})
},
/** 第三方绑定发薪账号-签约成功执行 */
submitSignContract() {
this.bindAcc.panel = false;
......@@ -724,10 +754,14 @@ export default {
addAccRecharge(this.aliQRCodeRechargeForm).then(res => {
this.aliQRCodeRechargeOpen = false
if (200 === res.code) {
if (1 === this.aliQRCodeRechargeForm.bindType) {
if (1 === this.aliQRCodeRechargeForm.rechargeType) {
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("充值成功!");
}
......@@ -804,7 +838,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
}
......@@ -813,16 +850,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="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()
})
}
}
},
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="channelName">
<el-input
v-model="queryParams.channelName"
placeholder="请输入通道名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<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>
<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="channelName" />
<el-table-column label="关联企业" align="center" prop="companyName" />
<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"
v-if="scope.row.isEnter === 1"
>开通</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"
/>
</div>
</template>
<script>
import {
listCompanyPayChannel,
updateCompanyPayChannel
} from "@/api/business/companyPayChannel";
import { listAllPayChannel } from '@/api/business/payChannel'
import { listAllUnitInfo } from '@/api/business/unitInfo'
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: 2,
channelCode: null,
channelName: null,
status: null,
deptId: null,
},
sysPayChannelList: [],
unitInfoList: []
};
},
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']
}));
console.log(this.unitInfoList)
})
},
// 取消按钮
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;
});
},
}
};
</script>
......@@ -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
})
}
}
}
......
......@@ -45,7 +45,7 @@
</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-hasPermi="['business:unitInfo:add']">代发账户
</el-button>
</template>
</el-table-column>
......@@ -148,33 +148,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 } })
}
}
}
......
......@@ -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="handleLogin">
@keyup.enter.native="getSmsCode">
<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="handleLogin">
@keyup.enter.native="getSmsCode">
<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="handleLogin">
@click.native.prevent="getSmsCode">
<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