Commit f2a4e760 authored by 许珑标's avatar 许珑标

代理商-demonstrate

parent e7dc6357
......@@ -73,3 +73,21 @@ export function getTaxAccAliInfo(cardNo) {
}
})
}
// 代理商获取名下客户的自有支付宝账本信息
export function agentPrivateList(query) {
return request({
url: '/business/accInfo/agent/privateList',
method: 'get',
params: query
})
}
// 代理商获取名下客户的外部支付宝账本信息
export function agentGetOutAccInfo(query) {
return request({
url: '/business/accInfo/agent/outList',
method: 'get',
params: query
})
}
import request from '@/utils/request'
// 查询代理商信息列表
export function listInfo(query) {
return request({
url: '/business/agent/list',
method: 'get',
params: query
})
}
// 查询代理商信息所有列表
export function listAllInfo(query) {
return request({
url: '/business/agent/listAll',
method: 'get',
params: query
})
}
// 查询代理商信息详细
export function getInfo(id) {
return request({
url: '/business/agent/getInfo/' + id,
method: 'get'
})
}
// 新增代理商信息
export function addInfo(data) {
return request({
url: '/business/agent/add',
method: 'post',
data: data
})
}
// 修改代理商信息
export function updateInfo(data) {
return request({
url: '/business/agent/edit',
method: 'post',
data: data
})
}
// 删除代理商信息
export function delInfo(id) {
return request({
url: '/business/agent/remove/' + id,
method: 'get'
})
}
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="代理商编码" prop="identityCode">
<el-input
v-model="queryParams.identityCode"
placeholder="请输入代理商编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="负责人" prop="leader">
<el-input
v-model="queryParams.leader"
placeholder="请输入负责人"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="联系电话" prop="phone">
<el-input
v-model="queryParams.phone"
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:agent:add']"
>新增</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:agent: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:agent:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="代理商编码" align="center" prop="identityCode" />
<el-table-column label="到卡费率" align="center" prop="toBankRate" />
<el-table-column label="到户费率" align="center" prop="toAlipayRate" />
<el-table-column label="负责人" align="center" prop="leader" />
<el-table-column label="联系电话" align="center" prop="phone" />
<el-table-column label="状态:1-正常" align="center" prop="status" />
<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:info:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['business:info: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="120px">
<el-form-item label="代理商组织" prop="agentUnitName">
<el-input v-model="form.agentUnitName" placeholder="请输入代理商组织名称" />
</el-form-item>
<el-form-item label="代理商编码" prop="identityCode">
<el-input v-model="form.identityCode" placeholder="请输入代理商编码" />
</el-form-item>
<el-form-item label="到卡费率" prop="toBankRate">
<el-input-number v-model="form.identityCode" :precision="4" :step="0.0010" :max="1" placeholder="请输入代理商编码"></el-input-number>
<el-input v-model="form.toBankRate" placeholder="请输入到卡费率" />
</el-form-item>
<el-form-item label="到户费率" prop="toAlipayRate">
<el-input-number v-model="form.identityCode" :precision="4" :step="0.0010" :max="1" placeholder="请输入代理商编码"></el-input-number>
<el-input v-model="form.toAlipayRate" placeholder="请输入到户费率" />
</el-form-item>
<el-form-item label="负责人" prop="leader">
<el-input v-model="form.leader" placeholder="请输入负责人" />
</el-form-item>
<el-form-item label="联系电话" prop="phone">
<el-input v-model="form.phone" 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 { listInfo, getInfo, delInfo, addInfo, updateInfo } from "@/api/business/agentInfo";
export default {
name: "Info",
data() {
return {
// 根路径
baseURL: process.env.VUE_APP_BASE_API,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 代理商信息表格数据
infoList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
identityCode: null,
toBankRate: null,
toAlipayRate: null,
leader: null,
phone: null,
status: null,
adminUserid: null,
deptId: null,
},
// 表单参数
form: {},
// 表单校验
rules: {
agentUnitName: [
{ required: true, message: "主键ID不能为空", trigger: "blur" }
],
identityCode: [
{ required: true, message: "代理商编码不能为空", trigger: "blur" }
],
toBankRate: [
{ required: true, message: "到卡费率不能为空", trigger: "blur" }
],
toAlipayRate: [
{ required: true, message: "到户费率不能为空", trigger: "blur" }
],
leader: [
{ required: true, message: "负责人不能为空", trigger: "blur" }
],
phone: [
{ required: true, message: "联系电话不能为空", trigger: "blur" }
],
status: [
{ required: true, message: "状态:1-正常不能为空", trigger: "blur" }
],
adminUserid: [
{ required: true, message: "管理员用户id不能为空", trigger: "blur" }
],
deptId: [
{ required: true, message: "部门ID不能为空", trigger: "blur" }
],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询代理商信息列表 */
getList() {
this.loading = true;
listInfo(this.queryParams).then(response => {
this.infoList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: null,
identityCode: null,
toBankRate: null,
toAlipayRate: null,
leader: null,
phone: null,
status: 0,
adminUserid: 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 = "添加代理商信息";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getInfo(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) {
updateInfo(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addInfo(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 delInfo(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('business/info/export', {
...this.queryParams
}, `info_${new Date().getTime()}.xlsx`)
}
}
};
</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="companyName">
<el-input
v-model="queryParams.companyName"
placeholder="请输入企业名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="开卡户名" prop="accName">
<el-input
v-model="queryParams.accName"
placeholder="请输入开卡户名"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="账本卡号" prop="alipayCardNo">
<el-input
v-model="queryParams.alipayCardNo"
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="['system:post:export']"-->
<!-- >导出</el-button>-->
<!-- </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>
<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>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="updateRate(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="费率设置" :visible.sync="configRatePanel" width="30%" center>
<el-descriptions :title="configRateForm.companyName" :column="1" :label-style="label_style"
:contentStyle="content_style">
</el-descriptions>
<el-descriptions :title="'外卡卡号:' + configRateForm.alipayCardNo" :column="1">
</el-descriptions>
<el-form ref="configRateForm" :model="configRateForm" :rules="configRateFormRules" label-width="150px">
<el-form-item label="转账到支付宝费率" prop="toAlipayRate">
<el-input-number v-model="configRateForm.toAlipayRate" placeholder="请输入到支付宝费率" :step="0.001" :precision="3" :min="0" :max="1"
style="width: 200px"/>
</el-form-item>
<el-form-item label="转账到银行卡费率" prop="toBankRate">
<el-input-number v-model="configRateForm.toBankRate" placeholder="请输入到银行卡费率" :step="0.001" :precision="3" :min="0" :max="1"
style="width: 200px"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="configRatePanel = false">关 闭</el-button>
<el-button type="primary" @click="configRateSubmit">确 定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { agentGetOutAccInfo, agentPrivateList, getAccAliInfo } from '@/api/business/accInfo'
export default {
name: "Post",
dicts: ['sys_normal_disable'],
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 表格数据
alipayAccList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
tabPosition: 'private',
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
companyName: undefined,
accName: undefined,
alipayCardNo: undefined
},
// 账户详情
accDetail: {
content_style: {
'font-size': '16px',
},
label_style: {
'font-size': '16px',
},
panel: false,
info: {}
},
// 设置费率相关
label_style: {
'font-size': '16px',
},
content_style: {
'font-size': '16px',
},
configRatePanel: false,
configRateForm: {
toAlipayRate: 0,
toBankRate: 0
},
configRateFormRules: {
toAlipayRate: [
{ required: true, message: '请输入转账到支付宝的费率', trigger: 'blur' }
],
toBankRate: [
{ required: true, message: '请输入转账到银行卡的费率', trigger: 'blur' }
],
}
};
},
created() {
this.getList();
},
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 => {
this.alipayAccList = response.rows;
this.total = response.total;
this.loading = false;
});
}
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
viewDetail(card) {
this.$modal.loading("正在查询...")
getAccAliInfo(card.alipayCardNo).then(resp => {
if (200 === resp.code) {
this.accDetail.companyName = card.accName
this.accDetail.info = resp.data
this.accDetail.panel = true
}
}).finally(() => {
this.$modal.closeLoading()
})
},
// 打开设置费率弹窗
updateRate(cardInfo){
this.$modal.loading("正在查询...")
getAccAliInfo(cardInfo.alipayCardNo).then(resp => {
if (200 === resp.code) {
this.configRateForm.companyName = cardInfo.accName
this.configRateForm.toAlipayRate = resp.data.toAlipayRate
this.configRateForm.toBankRate = resp.data.toBankRate
this.configRateForm.alipayCardNo = cardInfo.alipayCardNo
this.configRatePanel = true
}
}).finally(() => {
this.$modal.closeLoading()
})
},
configRateSubmit() {
this.$refs['configRateForm'].validate(valid => {
if (valid) {
this.$modal.msgSuccess("操作成功")
this.configRatePanel = false
let params = {
sysMerchantId: this.configRateForm.sysMerchantId,
toAlipayRate: Number(this.configRateForm.toAlipayRate),
toBankRate: Number(this.configRateForm.toBankRate)
}
}
})
},
}
};
</script>
......@@ -40,6 +40,11 @@
<image-upload v-model="form.businessLicense" :limit="1"></image-upload>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="邀请码" prop="invitationCode">
<el-input v-model="form.invitationCode" placeholder="请填写入驻邀请码" />
</el-form-item>
</el-col>
</el-row>
</div>
</el-card>
......@@ -119,6 +124,7 @@ export default {
legalPersonEmail: '',
legalIdPicFront: '',
legalIdPicBack: '',
invitationCode: ''
},
// 表单校验
rules: {
......
......@@ -47,6 +47,11 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="11" v-if="1 === form.registerType">
<el-form-item label="邀请码" prop="invitationCode">
<el-input v-model="form.invitationCode" placeholder="请填写您的邀请码" />
</el-form-item>
</el-col>
</el-row>
<!-- 注册账号信息-->
<el-row :gutter="56">
......@@ -274,6 +279,7 @@ export default {
}
this.$modal.loading()
let params = {
invitationCode: this.form.invitationCode,
code: this.form.code,
uuid: this.form.uuid,
registerType: this.form.registerType,
......
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