15 changed files with 1046 additions and 115 deletions
Binary file not shown.
Binary file not shown.
@ -0,0 +1,51 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
// 查询付款人黑名单列表
|
|||
export function listPayernameBlacklist(query) { |
|||
return request({ |
|||
url: '/merchant/blacklist/list', |
|||
method: 'get', |
|||
params: query |
|||
}) |
|||
} |
|||
|
|||
// 查询付款人黑名单详细
|
|||
export function getPayernameBlacklist(id) { |
|||
return request({ |
|||
url: '/merchant/payername/blacklist/' + id, |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
// 新增付款人黑名单
|
|||
export function addPayernameBlacklist(data) { |
|||
return request({ |
|||
url: '/merchant/blacklist', |
|||
method: 'post', |
|||
data: data |
|||
}) |
|||
} |
|||
// 修改付款人黑名单
|
|||
export function updatePayernameBlacklist(data) { |
|||
return request({ |
|||
url: '/merchant/blacklist', |
|||
method: 'put', |
|||
data: data |
|||
}) |
|||
} |
|||
// 删除付款人黑名单
|
|||
export function delPayernameBlacklist(id) { |
|||
return request({ |
|||
url: '/merchant/blacklist/' + id, |
|||
method: 'delete' |
|||
}) |
|||
} |
|||
|
|||
// 导出付款人黑名单
|
|||
export function exportPayernameBlacklist(query) { |
|||
return request({ |
|||
url: '/merchant/PayernameBlacklist/export', |
|||
method: 'get', |
|||
params: query |
|||
}) |
|||
} |
@ -0,0 +1,309 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
|||
<el-form-item label="商户编号" prop="merchantId"> |
|||
<el-input |
|||
v-model="queryParams.merchantId" |
|||
placeholder="请输入商户编号" |
|||
clearable |
|||
size="small" |
|||
@keyup.enter.native="handleQuery" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item label="付款人名称" prop="payerName"> |
|||
<el-input |
|||
v-model="queryParams.payerName" |
|||
placeholder="请输入付款人名称" |
|||
clearable |
|||
size="small" |
|||
@keyup.enter.native="handleQuery" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item label="状态:1-启用, 2-禁用" prop="status"> |
|||
<el-select v-model="queryParams.status" placeholder="请选择状态:1-启用, 2-禁用" clearable size="small"> |
|||
<el-option label="请选择字典生成" value="" /> |
|||
</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" |
|||
plain |
|||
icon="el-icon-plus" |
|||
size="mini" |
|||
@click="handleAdd" |
|||
v-hasPermi="['merchant:blacklist:add']" |
|||
>新增</el-button> |
|||
</el-col> |
|||
<el-col :span="1.5"> |
|||
<el-button |
|||
type="success" |
|||
plain |
|||
icon="el-icon-edit" |
|||
size="mini" |
|||
:disabled="single" |
|||
@click="handleUpdate" |
|||
v-hasPermi="['merchant:blacklist:edit']" |
|||
>修改</el-button> |
|||
</el-col> |
|||
<el-col :span="1.5"> |
|||
<el-button |
|||
type="danger" |
|||
plain |
|||
icon="el-icon-delete" |
|||
size="mini" |
|||
:disabled="multiple" |
|||
@click="handleDelete" |
|||
v-hasPermi="['merchant:blacklist:remove']" |
|||
>删除</el-button> |
|||
</el-col> |
|||
<el-col :span="1.5"> |
|||
<el-button |
|||
type="warning" |
|||
plain |
|||
icon="el-icon-download" |
|||
size="mini" |
|||
@click="handleExport" |
|||
v-hasPermi="['merchant:blacklist:export']" |
|||
>导出</el-button> |
|||
</el-col> |
|||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
|||
</el-row> |
|||
|
|||
<el-table v-loading="loading" :data="PayernameBlacklistList" @selection-change="handleSelectionChange"> |
|||
<el-table-column type="selection" width="55" align="center" /> |
|||
<el-table-column label="编号" align="center" prop="id" /> |
|||
<el-table-column label="商户编号" align="center" prop="merchantId" /> |
|||
<el-table-column label="付款人名称" align="center" prop="payerName" /> |
|||
<el-table-column label="状态:1-启用, 2-禁用" 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="['merchant:blacklist:edit']" |
|||
>修改</el-button> |
|||
<el-button |
|||
size="mini" |
|||
type="text" |
|||
icon="el-icon-delete" |
|||
@click="handleDelete(scope.row)" |
|||
v-hasPermi="['merchant:blacklist: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="merchantId"> |
|||
<el-input v-model="form.merchantId" placeholder="请输入商户编号" /> |
|||
</el-form-item> |
|||
<el-form-item label="付款人名称" prop="payerName"> |
|||
<el-input v-model="form.payerName" placeholder="请输入付款人名称" /> |
|||
</el-form-item> |
|||
<el-form-item label="状态:1-启用, 2-禁用"> |
|||
<el-radio-group v-model="form.status"> |
|||
<el-radio label="1">请选择字典生成</el-radio> |
|||
</el-radio-group> |
|||
</el-form-item> |
|||
<el-form-item label="创建时间" prop="createTime"> |
|||
<el-date-picker clearable size="small" |
|||
v-model="form.createTime" |
|||
type="date" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择创建时间"> |
|||
</el-date-picker> |
|||
</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 { listPayernameBlacklist, getPayernameBlacklist, delPayernameBlacklist, addPayernameBlacklist, updatePayernameBlacklist, exportPayernameBlacklist } from "@/api/merchant/PayernameBlacklist"; |
|||
|
|||
export default { |
|||
name: "PayernameBlacklist", |
|||
components: { |
|||
}, |
|||
data() { |
|||
return { |
|||
// 遮罩层 |
|||
loading: true, |
|||
// 选中数组 |
|||
ids: [], |
|||
// 非单个禁用 |
|||
single: true, |
|||
// 非多个禁用 |
|||
multiple: true, |
|||
// 显示搜索条件 |
|||
showSearch: true, |
|||
// 总条数 |
|||
total: 0, |
|||
// 付款人黑名单表格数据 |
|||
PayernameBlacklistList: [], |
|||
// 弹出层标题 |
|||
title: "", |
|||
// 是否显示弹出层 |
|||
open: false, |
|||
// 查询参数 |
|||
queryParams: { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
merchantId: null, |
|||
payerName: null, |
|||
status: null, |
|||
}, |
|||
// 表单参数 |
|||
form: {}, |
|||
// 表单校验 |
|||
rules: { |
|||
merchantId: [ |
|||
{ required: true, message: "商户编号不能为空", trigger: "blur" } |
|||
], |
|||
payerName: [ |
|||
{ required: true, message: "付款人名称不能为空", trigger: "blur" } |
|||
], |
|||
status: [ |
|||
{ required: true, message: "状态:1-启用, 2-禁用不能为空", trigger: "blur" } |
|||
], |
|||
createTime: [ |
|||
{ required: true, message: "创建时间不能为空", trigger: "blur" } |
|||
], |
|||
} |
|||
}; |
|||
}, |
|||
created() { |
|||
this.getList(); |
|||
}, |
|||
methods: { |
|||
/** 查询付款人黑名单列表 */ |
|||
getList() { |
|||
this.loading = true; |
|||
listPayernameBlacklist(this.queryParams).then(response => { |
|||
this.PayernameBlacklistList = response.rows; |
|||
this.total = response.total; |
|||
this.loading = false; |
|||
}); |
|||
}, |
|||
// 取消按钮 |
|||
cancel() { |
|||
this.open = false; |
|||
this.reset(); |
|||
}, |
|||
// 表单重置 |
|||
reset() { |
|||
this.form = { |
|||
id: null, |
|||
merchantId: null, |
|||
payerName: null, |
|||
status: 0, |
|||
createTime: null, |
|||
updateTime: 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 |
|||
getPayernameBlacklist(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) { |
|||
updatePayernameBlacklist(this.form).then(response => { |
|||
this.msgSuccess("修改成功"); |
|||
this.open = false; |
|||
this.getList(); |
|||
}); |
|||
} else { |
|||
addPayernameBlacklist(this.form).then(response => { |
|||
this.msgSuccess("新增成功"); |
|||
this.open = false; |
|||
this.getList(); |
|||
}); |
|||
} |
|||
} |
|||
}); |
|||
}, |
|||
/** 删除按钮操作 */ |
|||
handleDelete(row) { |
|||
const ids = row.id || this.ids; |
|||
this.$confirm('是否确认删除付款人黑名单编号为"' + ids + '"的数据项?', "警告", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning" |
|||
}).then(function() { |
|||
return delPayernameBlacklist(ids); |
|||
}).then(() => { |
|||
this.getList(); |
|||
this.msgSuccess("删除成功"); |
|||
}) |
|||
}, |
|||
/** 导出按钮操作 */ |
|||
handleExport() { |
|||
const queryParams = this.queryParams; |
|||
this.$confirm('是否确认导出所有付款人黑名单数据项?', "警告", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning" |
|||
}).then(function() { |
|||
return exportPayernameBlacklist(queryParams); |
|||
}).then(response => { |
|||
this.download(response.msg); |
|||
}) |
|||
} |
|||
} |
|||
}; |
|||
</script> |
@ -0,0 +1,299 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="88px"> |
|||
<!-- <el-form-item label="商户编号" prop="merchantId"> |
|||
<el-input v-model="queryParams.merchantId" placeholder="请输入商户编号" clearable size="small" |
|||
@keyup.enter.native="handleQuery" /> |
|||
</el-form-item> --> |
|||
<el-form-item label="付款人名称" prop="payerName"> |
|||
<el-input v-model="queryParams.payerName" placeholder="请输入付款人名称" clearable size="small" |
|||
@keyup.enter.native="handleQuery" /> |
|||
</el-form-item> |
|||
<!-- <el-form-item label="状态" prop="status"> |
|||
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small"> |
|||
<el-option label="请选择字典生成" value="" /> |
|||
</el-select> |
|||
</el-form-item> --> |
|||
|
|||
<el-form-item label="状态" prop="status"> |
|||
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="medium"> |
|||
<el-option v-for="dict in statusCon" :key="dict.value" :label="dict.label" |
|||
:value="dict.value"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
|
|||
<el-form-item> |
|||
<el-button type="primary" icon="el-icon-search" size="medium" @click="handleQuery">搜索</el-button> |
|||
<el-button icon="el-icon-refresh" size="medium" @click="resetQuery">重置</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
|
|||
<el-row :gutter="10" class="mb8"> |
|||
<el-col :span="1.5"> |
|||
<el-button type="primary" plain icon="el-icon-plus" size="medium" @click="handleAdd" |
|||
v-hasPermi="['merchant:blacklist:add']">新增</el-button> |
|||
</el-col> |
|||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
|||
</el-row> |
|||
|
|||
|
|||
<el-table v-loading="loading" :data="PayernameBlacklistList"> |
|||
<el-table-column label="付款人名称" align="center" prop="payerName" /> |
|||
<el-table-column label="状态" align="center" prop="status"> |
|||
<template slot-scope="scope"> |
|||
<el-switch v-model="scope.row.status" active-text="启用" inactive-text="禁用" :active-value="1" :inactive-value="2" |
|||
@change="switchStatusChange(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="['merchant:blacklist:edit']">修改</el-button> |
|||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" |
|||
v-hasPermi="['merchant:blacklist:remove']">删除</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<el-col> |
|||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" |
|||
@pagination="getList" /> |
|||
</el-col> |
|||
|
|||
<!-- 添加或修改对话框 --> |
|||
<el-dialog v-dialogDrag :title="title" :visible.sync="open" width="650px" append-to-body :close-on-click-modal="false" |
|||
:before-close="cancel"> |
|||
<el-form ref="formChannel" :model="form" :rules="rules" label-width="108px"> |
|||
<el-form-item label="付款人名称" prop="payerName"> |
|||
<el-input v-model="form.payerName" placeholder="请输入付款人名称" @input="change" /> |
|||
</el-form-item> |
|||
<el-form-item label="状态" prop="status"> |
|||
<el-switch v-model="form.status" active-text="启用" inactive-text="禁用" :active-value=1 |
|||
:inactive-value=2></el-switch> |
|||
</el-form-item> |
|||
|
|||
</el-form> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<el-button type="primary" @click="submitForm('formChannel')">确 定</el-button> |
|||
<el-button @click="cancel">取 消</el-button> |
|||
</div> |
|||
</el-dialog> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { payMerchant, common_api } from "@/api/form"; |
|||
import { listPayernameBlacklist, getPayernameBlacklist, delPayernameBlacklist, addPayernameBlacklist, updatePayernameBlacklist, exportPayernameBlacklist } from "@/api/merchant/PayernameBlacklist"; |
|||
|
|||
|
|||
export default { |
|||
name: "pkCouponScopeRangeStoreList", |
|||
props: { |
|||
pkCouponId: { |
|||
type: Number, |
|||
default() { |
|||
return null; |
|||
}, |
|||
}, |
|||
pkCouponStore: { |
|||
type: Object, |
|||
default: {} |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
statusCon:[ |
|||
{ |
|||
label:'启用', |
|||
value:1 |
|||
}, |
|||
{ |
|||
label:'禁用', |
|||
value:2 |
|||
}, |
|||
], |
|||
// 所有通道 |
|||
channelAll: [], |
|||
dateRange: [], |
|||
// 遮罩层 |
|||
loading: true, |
|||
// 导出遮罩层 |
|||
exportLoading: false, |
|||
// 选中数组 |
|||
ids: [], |
|||
// 非单个禁用 |
|||
single: true, |
|||
// 非多个禁用 |
|||
multiple: true, |
|||
// 显示搜索条件 |
|||
showSearch: true, |
|||
// 总条数 |
|||
total: 0, |
|||
// 表格数据 |
|||
infoList: [], |
|||
// 弹出层标题 |
|||
title: "", |
|||
// 是否显示弹出层 |
|||
open: false, |
|||
openRate: false, |
|||
// 付款人黑名单表格数据 |
|||
PayernameBlacklistList: [], |
|||
// 弹出层标题 |
|||
title: "", |
|||
// 是否显示弹出层 |
|||
open: false, |
|||
// 查询参数 |
|||
queryParams: { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
merchantId: null, |
|||
payerName: null, |
|||
status: null, |
|||
}, |
|||
// 表单参数 |
|||
form: { |
|||
}, |
|||
detailData: {}, |
|||
// 表单校验 |
|||
rules: { |
|||
payerName: [{ required: true, message: "请输入付款人名称", trigger: "blur" }], |
|||
}, |
|||
}; |
|||
}, |
|||
created() { |
|||
this.pkCouponId && (this.queryParams.merchantId = this.pkCouponId); |
|||
this.getList(); |
|||
this.init(); |
|||
}, |
|||
methods: { |
|||
change() { |
|||
this.$forceUpdate() |
|||
}, |
|||
// 状态有效无效 |
|||
switchStatusChange(row) { |
|||
const id = row.id || this.ids; |
|||
this.form = row; |
|||
this.form.status = row.status; |
|||
updatePayernameBlacklist(this.form).then((res) => { |
|||
if (res.code === 200) { |
|||
this.$message.success("编辑成功"); |
|||
} |
|||
}); |
|||
}, |
|||
/** 查询付款人黑名单列表 */ |
|||
getList() { |
|||
this.loading = true; |
|||
listPayernameBlacklist(this.queryParams).then(response => { |
|||
this.PayernameBlacklistList = response.rows; |
|||
this.total = Number(response.total); |
|||
this.loading = false; |
|||
}); |
|||
}, |
|||
init() { |
|||
}, |
|||
// 取消按钮 |
|||
cancel() { |
|||
this.open = false; |
|||
this.reset(); |
|||
this.getList() |
|||
}, |
|||
// 表单重置 |
|||
reset() { |
|||
this.form = {}; |
|||
this.resetForm("form"); |
|||
}, |
|||
/** 搜索按钮操作 */ |
|||
handleQuery() { |
|||
this.queryParams.pageNum = 1; |
|||
this.getList(); |
|||
}, |
|||
/** 重置按钮操作 */ |
|||
resetQuery() { |
|||
this.dateRange = []; |
|||
this.resetForm("queryForm"); |
|||
this.handleQuery(); |
|||
}, |
|||
/** 新增按钮操作 */ |
|||
handleAdd() { |
|||
this.reset(); |
|||
this.open = true; |
|||
this.title = "绑定通道"; |
|||
}, |
|||
/** 修改按钮操作 */ |
|||
handleUpdate(row) { |
|||
this.reset(); |
|||
this.form = row; |
|||
this.title = "修改"; |
|||
this.open = true; |
|||
|
|||
}, |
|||
/** 提交按钮 */ |
|||
submitForm(type) { |
|||
this.$refs[type].validate((valid) => { |
|||
if (valid) { |
|||
this.form.merchantId = this.pkCouponId |
|||
const loading = this.$loading({ |
|||
lock: true, |
|||
text: `正在操作`, |
|||
spinner: "el-icon-loading", |
|||
background: "rgba(0, 0, 0, 0.7)", |
|||
}); |
|||
|
|||
if (this.form.id) { |
|||
updatePayernameBlacklist(this.form).then((response) => { |
|||
loading.close(); |
|||
this.open = false; |
|||
this.msgSuccess("修改成功"); |
|||
this.getList(); |
|||
}).catch(() => { |
|||
loading.close(); |
|||
}); |
|||
} else { |
|||
addPayernameBlacklist(this.form).then((response) => { |
|||
loading.close(); |
|||
this.open = false; |
|||
this.msgSuccess("新增成功"); |
|||
this.getList(); |
|||
}).catch(() => { |
|||
loading.close(); |
|||
}); |
|||
} |
|||
} |
|||
}); |
|||
}, |
|||
/** 删除按钮操作 */ |
|||
handleDelete(row) { |
|||
const ids = row.id || this.ids; |
|||
this.$confirm( |
|||
'是否确认付款人名称为"' + row.payerName + '"的数据项?', |
|||
"警告", |
|||
{ |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
} |
|||
) |
|||
.then(function () { |
|||
return delPayernameBlacklist(ids); |
|||
}) |
|||
.then(() => { |
|||
this.getList(); |
|||
this.msgSuccess("删除成功"); |
|||
}) |
|||
.catch(() => { }); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.el-radio { |
|||
line-height: 2; |
|||
} |
|||
</style> |
Loading…
Reference in new issue