8 changed files with 2227 additions and 4 deletions
@ -0,0 +1,248 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
import qs from 'qs' |
||||
|
import { |
||||
|
getToken |
||||
|
} from "@/utils/auth"; |
||||
|
/** |
||||
|
* |
||||
|
* @returns |
||||
|
* 通用数据 - 接口 |
||||
|
* start |
||||
|
* |
||||
|
*/ |
||||
|
export const common_api = { |
||||
|
//获取所有商户
|
||||
|
allmerchant: (query) => { |
||||
|
return request({ |
||||
|
url: '/paytest/allmerchant', |
||||
|
method: 'get', |
||||
|
params: query, |
||||
|
}) |
||||
|
}, |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 商户模块 |
||||
|
*/ |
||||
|
export const payMerchant = { |
||||
|
// 商户列表
|
||||
|
listInfo: (query) => { |
||||
|
return request({ |
||||
|
url: '/merchant/merchant/list', |
||||
|
method: 'get', |
||||
|
params: query, |
||||
|
}) |
||||
|
}, |
||||
|
//新增
|
||||
|
addInfo: (data) => { |
||||
|
return request({ |
||||
|
url: '/merchant/merchant', |
||||
|
method: 'post', |
||||
|
data: data |
||||
|
}) |
||||
|
}, |
||||
|
//修改
|
||||
|
updateInfo: (data) => { |
||||
|
return request({ |
||||
|
url: '/merchant/merchant', |
||||
|
method: 'put', |
||||
|
data: data |
||||
|
}) |
||||
|
}, |
||||
|
// 获取商户详细信息
|
||||
|
getInfo: (id) => { |
||||
|
return request({ |
||||
|
url: '/merchant/merchant/' + id, |
||||
|
method: 'get', |
||||
|
}) |
||||
|
}, |
||||
|
// 获取费率
|
||||
|
getRate: (id) => { |
||||
|
return request({ |
||||
|
url: '/merchant/merchant/getRate/' + id, |
||||
|
method: 'get', |
||||
|
}) |
||||
|
}, |
||||
|
// 获取风控
|
||||
|
getMerchantWindControl: (id) => { |
||||
|
return request({ |
||||
|
url: '/merchant/merchant/getMerchantWindControl/' + id, |
||||
|
method: 'get', |
||||
|
}) |
||||
|
}, |
||||
|
// 删除商户
|
||||
|
merchantdel: (data) => { |
||||
|
return request({ |
||||
|
url: '/merchant/merchant/del?' + qs.stringify(data), |
||||
|
method: 'post', |
||||
|
}) |
||||
|
}, |
||||
|
// 获取通道
|
||||
|
getChannelList: (id) => { |
||||
|
return request({ |
||||
|
url: '/merchant/merchant/getChannel/' + id, |
||||
|
method: 'get', |
||||
|
}) |
||||
|
}, |
||||
|
// 获取提现配置
|
||||
|
getWithdrawConfig: (id) => { |
||||
|
return request({ |
||||
|
url: '/merchant/merchant/getWithdrawConfig/' + id, |
||||
|
method: 'get', |
||||
|
}) |
||||
|
}, |
||||
|
// 获取商户MD5
|
||||
|
getmd5Key: (id) => { |
||||
|
return request({ |
||||
|
url: '/merchant/merchant/getmd5Key/' + id, |
||||
|
method: 'get', |
||||
|
}) |
||||
|
}, |
||||
|
// 谷歌密钥
|
||||
|
getKey: (id) => { |
||||
|
return request({ |
||||
|
url: '/merchant/merchant/getGoogleSecret/' + id, |
||||
|
method: 'get', |
||||
|
}) |
||||
|
}, |
||||
|
// 重置md5
|
||||
|
resetMd5Key: (id) => { |
||||
|
return request({ |
||||
|
url: '/merchant/merchant/resetMd5Key/' + id, |
||||
|
method: 'PUT', |
||||
|
}) |
||||
|
}, |
||||
|
// 重置谷歌key
|
||||
|
resetGoogleSecret: (id) => { |
||||
|
return request({ |
||||
|
url: '/merchant/merchant/resetGoogleSecret/' + id, |
||||
|
method: 'PUT', |
||||
|
}) |
||||
|
}, |
||||
|
// 登录ip
|
||||
|
getLoginIp: (id) => { |
||||
|
return request({ |
||||
|
url: '/merchant/merchant/getIpWhite/' + id, |
||||
|
method: 'get', |
||||
|
}) |
||||
|
}, |
||||
|
// 重置登录ip
|
||||
|
resetIpWhite: (data) => { |
||||
|
return request({ |
||||
|
url: '/merchant/merchant/resetIpWhite?' + qs.stringify(data), |
||||
|
method: 'post', |
||||
|
}) |
||||
|
}, |
||||
|
// 修改费率
|
||||
|
setRate: (data) => { |
||||
|
return request({ |
||||
|
url: '/merchant/merchant/setRate', |
||||
|
method: 'put', |
||||
|
data: data |
||||
|
}) |
||||
|
}, |
||||
|
// 重置商户风控信息
|
||||
|
resetMerchantWindControl: (data) => { |
||||
|
return request({ |
||||
|
url: '/merchant/merchant/resetMerchantWindControl', |
||||
|
method: 'put', |
||||
|
data: data |
||||
|
}) |
||||
|
}, |
||||
|
// 支付ip
|
||||
|
getPayIp: (id) => { |
||||
|
return request({ |
||||
|
url: '/merchant/merchant/getPayapiWhitelistIp/' + id, |
||||
|
method: 'get', |
||||
|
}) |
||||
|
}, |
||||
|
// 重置支付ip
|
||||
|
resetPayapiWhitelistIp: (data) => { |
||||
|
return request({ |
||||
|
url: '/merchant/merchant/resetPayapiWhitelistIp?' + qs.stringify(data), |
||||
|
method: 'post', |
||||
|
}) |
||||
|
}, |
||||
|
// 操作金额
|
||||
|
operatingBalance: (data) => { |
||||
|
return request({ |
||||
|
url: '/merchant/merchant/operatingBalance?' + qs.stringify(data), |
||||
|
method: 'post', |
||||
|
}) |
||||
|
}, |
||||
|
// 修改商户登录密码
|
||||
|
editLoginPwd: (data) => { |
||||
|
return request({ |
||||
|
url: '/merchant/merchant/editLoginPwd?' + qs.stringify(data), |
||||
|
method: 'post', |
||||
|
}) |
||||
|
}, |
||||
|
// 修改商户支付密码
|
||||
|
editPayPwd: (data) => { |
||||
|
return request({ |
||||
|
url: '/merchant/merchant/editPayPwd?' + qs.stringify(data), |
||||
|
method: 'post', |
||||
|
}) |
||||
|
}, |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 商户充值订单模块 |
||||
|
*/ |
||||
|
export const payRecordRecharge = { |
||||
|
// 手工处理
|
||||
|
payHandle: (data) => { |
||||
|
return request({ |
||||
|
url: '/order/RechargeRecord/payHandle?' + qs.stringify(data), |
||||
|
method: 'post', |
||||
|
}) |
||||
|
}, |
||||
|
// 查询充值记录列表
|
||||
|
listInfo: (query) => { |
||||
|
return request({ |
||||
|
url: '/order/RechargeRecord/list', |
||||
|
method: 'get', |
||||
|
params: query, |
||||
|
}) |
||||
|
}, |
||||
|
// 拉单测试
|
||||
|
recharge: (query) => { |
||||
|
return request({ |
||||
|
url: '/paytest/recharge', |
||||
|
method: 'get', |
||||
|
params: query, |
||||
|
}) |
||||
|
}, |
||||
|
// 导出充值记录列表
|
||||
|
exportList: (query) => { |
||||
|
return request({ |
||||
|
url: '/order/RechargeRecord/export', |
||||
|
method: 'get', |
||||
|
params: query, |
||||
|
}) |
||||
|
}, |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 财务流水 |
||||
|
*/ |
||||
|
export const merchantWalletLog = { |
||||
|
// 查询财务流水列表
|
||||
|
listInfo: (query) => { |
||||
|
return request({ |
||||
|
url: '/merchant/MerchantWalletLog/list', |
||||
|
method: 'get', |
||||
|
params: query, |
||||
|
}) |
||||
|
}, |
||||
|
// 导出财务流水
|
||||
|
exportList: (query) => { |
||||
|
return request({ |
||||
|
url: '/merchant/MerchantWalletLog/export', |
||||
|
method: 'get', |
||||
|
params: query, |
||||
|
}) |
||||
|
}, |
||||
|
} |
@ -0,0 +1,230 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="108px"> |
||||
|
<el-form-item label="账户名" prop="accountName"> |
||||
|
<el-input v-model="queryParams.accountName" placeholder="请输入账户名" clearable size="small" |
||||
|
@keyup.enter.native="handleQuery" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="金额类型" prop="amountType"> |
||||
|
<el-select v-model="queryParams.amountType" placeholder="请选择金额类型" clearable size="small"> |
||||
|
<el-option v-for="dict in amountTypeStatus" :key="dict.dictValue" :label="dict.dictLabel" |
||||
|
:value="dict.dictValue" /> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="变动来源" prop="source"> |
||||
|
<el-select v-model="queryParams.source" placeholder="请选择变动来源" clearable size="small"> |
||||
|
<el-option v-for="dict in sysOrderStatus" :key="dict.dictValue" :label="dict.dictLabel" |
||||
|
:value="dict.dictValue" /> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="变动类型" prop="opType"> |
||||
|
<el-select v-model="queryParams.opType" placeholder="请选择变动类型" clearable size="small"> |
||||
|
<el-option v-for="dict in sourceTypeOptions" :key="dict.dictValue" :label="dict.dictLabel" |
||||
|
:value="dict.dictValue" /> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="创建时间"> |
||||
|
<el-date-picker v-model="dateRange" size="small" style="width: 340px" value-format="yyyy-MM-dd HH:mm:ss" |
||||
|
type="datetimerange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" |
||||
|
:unlink-panels="true" :default-time="['00:00:00', '23:59:59']"></el-date-picker> |
||||
|
</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" plain icon="el-icon-download" size="mini" @click="handleExport">导出</el-button> |
||||
|
</el-col> |
||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-table v-loading="loading" :data="otcCoinList"> |
||||
|
<el-table-column label="商户id" align="center" prop="merchantId" /> |
||||
|
<el-table-column label="账户名" align="center" prop="accountName" /> |
||||
|
<el-table-column label="商户订单号" align="center" prop="merchantOrderNo" /> |
||||
|
<el-table-column label="业务单号" align="center" prop="businessNo" /> |
||||
|
|
||||
|
<el-table-column :label="'变动金额'" align="center" prop="changeAmount"> |
||||
|
<template slot-scope="scope"> |
||||
|
{{ (NumberDiv(scope.row.changeAmount, 100)) }} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column :label="'变动后余额'" align="center" prop="afterBalance"> |
||||
|
<template slot-scope="scope"> |
||||
|
{{ (NumberDiv(scope.row.afterBalance, 100)) }} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
|
||||
|
<el-table-column label="金额类型" align="center" prop="amountType" :formatter="amountTypeFormat" /> |
||||
|
<el-table-column label="变动类型" align="center" prop="opType" :formatter="sourceTypeFormat" /> |
||||
|
<el-table-column label="订单状态" align="center" prop="orderStatus" :formatter="sysOrderStatusFormat" /> |
||||
|
<el-table-column label="备注" align="center" prop="remark" /> |
||||
|
|
||||
|
<el-table-column label="创建时间" align="center" prop="createTime" min-width="180" /> |
||||
|
|
||||
|
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button size="small" type="text" style="color: #006EFF;" v-if="scope.row.orderStatus == 1" |
||||
|
@click="handleOrder(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" /> |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { merchantWalletLog, common_api } from "@/api/form"; |
||||
|
export default { |
||||
|
name: "otcStoreRechargeOrder", |
||||
|
components: { |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
// 所有商户 |
||||
|
merchantCon: [], |
||||
|
dateRange: [], |
||||
|
sourceTypeOptions: [], |
||||
|
sysOrderStatus: [], |
||||
|
amountTypeStatus: [], |
||||
|
|
||||
|
// 遮罩层 |
||||
|
loading: true, |
||||
|
// 选中数组 |
||||
|
ids: [], |
||||
|
// 非单个禁用 |
||||
|
single: true, |
||||
|
// 非多个禁用 |
||||
|
multiple: true, |
||||
|
// 显示搜索条件 |
||||
|
showSearch: true, |
||||
|
// 总条数 |
||||
|
total: 0, |
||||
|
// OTC币种表格数据 |
||||
|
otcCoinList: [], |
||||
|
// 弹出层标题 |
||||
|
title: "", |
||||
|
// 是否显示弹出层 |
||||
|
open: false, |
||||
|
openTest: false, |
||||
|
// 查询参数 |
||||
|
queryParams: { |
||||
|
pageNum: 1, |
||||
|
pageSize: 10, |
||||
|
accountName: null, |
||||
|
source: null, |
||||
|
opType: null, |
||||
|
amountType: null, |
||||
|
}, |
||||
|
// 表单参数 |
||||
|
form: {}, |
||||
|
// 表单校验 |
||||
|
rules: { |
||||
|
}, |
||||
|
}; |
||||
|
}, |
||||
|
created() { |
||||
|
this.getList(); |
||||
|
this.getDicts("amount_type").then(response => { |
||||
|
this.amountTypeStatus = response.data; |
||||
|
}); |
||||
|
this.getDicts("op_type").then(response => { |
||||
|
this.sourceTypeOptions = response.data; |
||||
|
}); |
||||
|
this.getDicts("source_type_finance").then(response => { |
||||
|
this.sysOrderStatus = response.data; |
||||
|
}); |
||||
|
}, |
||||
|
methods: { |
||||
|
init() { |
||||
|
|
||||
|
}, |
||||
|
/** 手工处理 */ |
||||
|
handleOrder(row) { |
||||
|
this.reset() |
||||
|
this.form = row |
||||
|
this.open = true |
||||
|
}, |
||||
|
/** 查询OTC币种列表 */ |
||||
|
getList() { |
||||
|
this.loading = true; |
||||
|
let queryParams = { |
||||
|
pageNum: this.queryParams.pageNum, |
||||
|
pageSize: this.queryParams.pageSize, |
||||
|
accountName: this.queryParams.accountName, |
||||
|
source: this.queryParams.source, |
||||
|
opType: this.queryParams.opType, |
||||
|
amountType: this.queryParams.amountType, |
||||
|
} |
||||
|
merchantWalletLog.listInfo(this.addSESDateRange(queryParams, this.dateRange)).then(response => { |
||||
|
this.otcCoinList = response.rows; |
||||
|
this.total = Number(response.total); |
||||
|
this.loading = false; |
||||
|
}); |
||||
|
}, |
||||
|
sourceTypeFormat(row, column) { |
||||
|
return this.selectDictLabel(this.sourceTypeOptions, row.opType); |
||||
|
}, |
||||
|
sysOrderStatusFormat(row, column) { |
||||
|
return this.selectDictLabel(this.sysOrderStatus, row.source); |
||||
|
}, |
||||
|
amountTypeFormat(row, column) { |
||||
|
return this.selectDictLabel(this.amountTypeStatus, row.amountType); |
||||
|
}, |
||||
|
// 取消按钮 |
||||
|
cancel() { |
||||
|
this.open = false; |
||||
|
this.openTest = false; |
||||
|
this.reset(); |
||||
|
}, |
||||
|
// 表单重置 |
||||
|
reset() { |
||||
|
this.form = { |
||||
|
}; |
||||
|
this.resetForm("form"); |
||||
|
}, |
||||
|
/** 搜索按钮操作 */ |
||||
|
handleQuery() { |
||||
|
this.queryParams.pageNum = 1; |
||||
|
// let changeAmount; |
||||
|
// this.queryParams.changeAmount ? changeAmount = this.NumberMul(this.queryParams.changeAmount, 100) : changeAmount = null |
||||
|
this.getList(); |
||||
|
}, |
||||
|
/** 重置按钮操作 */ |
||||
|
resetQuery() { |
||||
|
this.dateRange = [] |
||||
|
this.resetForm("queryForm"); |
||||
|
this.handleQuery(); |
||||
|
}, |
||||
|
|
||||
|
/** 导出按钮操作 */ |
||||
|
handleExport() { |
||||
|
const queryParams = this.queryParams; |
||||
|
this.$confirm('是否确认导出所有数据项?', "警告", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning" |
||||
|
}).then(function () { |
||||
|
return merchantWalletLog.exportList(queryParams); |
||||
|
}).then(response => { |
||||
|
this.download(response.msg); |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}; |
||||
|
</script> |
||||
|
|
@ -0,0 +1,936 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="106px" |
||||
|
class="flex form" style="position: relative"> |
||||
|
<el-form-item label="商户名称" prop="username"> |
||||
|
<el-input size="medium" v-model="queryParams.username" placeholder="请输入商户名称" |
||||
|
@keyup.enter.native="handleQuery" style="width: 180px; border-color: #e6f1ff" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="手机号或邮箱" prop="phone"> |
||||
|
<el-input size="medium" v-model="queryParams.phone" placeholder="请输入手机号或邮箱" |
||||
|
@keyup.enter.native="handleQuery" style="width: 180px; border-color: #e6f1ff" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="创建时间"> |
||||
|
<el-date-picker v-model="dateRange" size="small" style="width: 340px" value-format="yyyy-MM-dd HH:mm:ss" |
||||
|
type="datetimerange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" |
||||
|
:unlink-panels="true" :default-time="['00:00:00', '23:59:59']"></el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" icon="" 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="" size="medium" @click="handleAdd('', 'add')">新增商户</el-button> |
||||
|
</el-col> |
||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
||||
|
</el-row> |
||||
|
|
||||
|
|
||||
|
|
||||
|
<div class="bg"> |
||||
|
<el-table stripe :data="infoList" v-loading="loading"> |
||||
|
<el-table-column label="商户名称" align="center" prop="username" /> |
||||
|
<el-table-column label="商户ID" align="center" prop="merchantNo" /> |
||||
|
|
||||
|
|
||||
|
|
||||
|
<el-table-column :label="'余额'" align="center" prop="balance"> |
||||
|
<template slot-scope="scope"> |
||||
|
{{ parseFloat(NumberDiv(scope.row.balance, 100)).toFixed(2) }} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
|
||||
|
<el-table-column :label="'冻结金额'" align="center" prop="frozenAmount"> |
||||
|
<template slot-scope="scope"> |
||||
|
{{ parseFloat(NumberDiv(scope.row.frozenAmount, 100)).toFixed(2) }} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
|
||||
|
<el-table-column :label="'可申请金额'" align="center" prop="applicableAmount"> |
||||
|
<template slot-scope="scope"> |
||||
|
{{ parseFloat(NumberDiv(scope.row.applicableAmount, 100)).toFixed(2) }} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
|
||||
|
<el-table-column :label="'押金'" align="center" prop="securityDepositAmount"> |
||||
|
<template slot-scope="scope"> |
||||
|
{{ parseFloat(NumberDiv(scope.row.securityDepositAmount, 100)).toFixed(2) }} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
|
||||
|
<el-table-column label="状态" align="center" prop="status" width="140px"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-switch v-model="scope.row.status" active-text="开" inactive-text="关" :active-value="1" |
||||
|
:inactive-value="0" @change="switchStatusChange(scope.row, 'status')" |
||||
|
v-hasPermi="['system:merchant:edit']"> |
||||
|
</el-switch> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
|
||||
|
|
||||
|
<!-- <el-table-column label="手动提单审核开关" align="center" prop="whetherReview" width="140px"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-switch v-model="scope.row.whetherReview" active-text="开" inactive-text="关" active-value="Y" |
||||
|
inactive-value="N" @change="switchStatusChange(scope.row, 'whetherReview')"> |
||||
|
</el-switch> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
|
||||
|
<el-table-column label="api提单审核开关" align="center" prop="whetherReviewApi" width="140px"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-switch v-model="scope.row.whetherReviewApi" active-text="开" inactive-text="关" active-value="Y" |
||||
|
inactive-value="N" @change="switchStatusChange(scope.row, 'whetherReviewApi')"> |
||||
|
</el-switch> |
||||
|
</template> |
||||
|
</el-table-column> --> |
||||
|
|
||||
|
|
||||
|
<el-table-column label="创建时间" align="center" prop="createTime" min-width="180" /> |
||||
|
|
||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" |
||||
|
min-width="200"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button size="small" type="text" @click="handleDeleteMer(scope.row)" style="color: #006eff" |
||||
|
v-hasPermi="['system:merchant:del']">商户删除</el-button> |
||||
|
<!-- <el-button size="small" type="text" @click="handleView(scope.row)" style="color: #006eff" |
||||
|
v-hasPermi="['system:merchantChannel:getChannel']">通道</el-button> --> |
||||
|
<!-- <el-button size="small" type="text" @click="handleWithdraw(scope.row)" style="color: #006eff">提现</el-button> --> |
||||
|
<el-button size="small" type="text" @click="handlePassword(scope.row, 'loginPassword')" |
||||
|
style="color: #006eff" v-hasPermi="['system:merchant:editLoginPwd']">登录密码</el-button> |
||||
|
<el-button size="small" type="text" @click="handlePassword(scope.row, 'payPassword')" |
||||
|
style="color: #006eff" v-hasPermi="['system:merchant:editPayPwd']">支付密码</el-button> |
||||
|
|
||||
|
<el-button size="small" type="text" @click="handleBalance(scope.row)" style="color: #006eff" |
||||
|
v-hasPermi="['system:merchant:operatingBalance']">余额</el-button> |
||||
|
|
||||
|
<el-button size="small" type="text" @click="handleUpdate(scope.row)" style="color: #006eff" |
||||
|
v-hasPermi="['system:merchant:edit']">编辑</el-button> |
||||
|
<el-button size="small" type="text" @click="handleControl(scope.row)" style="color: #006eff" |
||||
|
v-hasPermi="['system:merchant:getMerchantWindControl']">风控</el-button> |
||||
|
|
||||
|
<el-button size="small" type="text" @click="handleUpdateRate(scope.row)" |
||||
|
style="color: #006eff">费率</el-button> |
||||
|
|
||||
|
<el-button size="small" type="text" @click="handleAdd(scope.row, 'next')" |
||||
|
style="color: #006eff">添加下级</el-button> |
||||
|
|
||||
|
<!-- <el-button size="small" type="text" @click="handleMD5(scope.row)" style="color: #006eff">MD5</el-button> |
||||
|
<el-button size="small" type="text" @click="handleKey(scope.row)" style="color: #006eff">谷歌密钥</el-button> |
||||
|
<el-button size="small" type="text" @click="handleIp(scope.row, 'login')" |
||||
|
style="color: #006eff">登录IP</el-button> |
||||
|
<el-button size="small" type="text" @click="handleIp(scope.row, 'pay')" |
||||
|
style="color: #006eff">支付IP</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"> |
||||
|
</pagination> |
||||
|
</div> |
||||
|
|
||||
|
<!-- 添加或修改商户对话框 --> |
||||
|
<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="username" v-if="!form.id"> |
||||
|
<el-input v-model="form.username" placeholder="请输入商户名称" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="商户名称" prop="username" v-else> |
||||
|
<span>{{ form.username }}</span> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="手机号" prop="phone"> |
||||
|
<el-input v-model="form.phone" placeholder="请输入手机号" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="邮箱" prop="email"> |
||||
|
<el-input v-model="form.email" placeholder="请输入邮箱" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="登录密码" prop="password" v-if="!form.id"> |
||||
|
<el-input type="password" v-model="form.password" placeholder="请输入登录密码" /> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="submitForm('form')">确 定</el-button> |
||||
|
<el-button @click="cancel">取 消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
|
||||
|
<!-- md5 --> |
||||
|
<el-dialog :title="title" :visible.sync="openMd5" width="500px" append-to-body> |
||||
|
<el-form ref="formMD5" :model="form" :rules="rules" label-width="80px"> |
||||
|
<el-form-item label="MD5密钥" prop="merchantNo"> |
||||
|
<span>{{ form.md5Key }}</span> |
||||
|
<el-button type="primary" @click="submitForm('MD5')" style="margin-left: 10px">重 置</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button @click="cancel">取 消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
|
||||
|
<!-- 谷歌密钥 --> |
||||
|
<el-dialog :title="title" :visible.sync="openKey" width="500px" append-to-body> |
||||
|
<el-form ref="formGoogleKey" :model="form" :rules="rules" label-width="80px"> |
||||
|
<el-form-item label="谷歌秘钥" prop="merchantNo"> |
||||
|
<span>{{ form.googleSecret }}</span> |
||||
|
<el-button type="primary" @click="submitForm('googleKey')" style="margin-left: 10px">重 置</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button @click="cancel">取 消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
|
||||
|
<!-- 重置ip --> |
||||
|
<el-dialog title="" :visible.sync="openToIp" width="500px" append-to-body> |
||||
|
<el-form ref="formIp" :model="form" :rules="rules" label-width="100px"> |
||||
|
<el-form-item label="IP" prop="ip" v-if="ipType == 'login'"> |
||||
|
<el-input v-model="form.ip" placeholder="请输入IP" @input="change" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="代收IP" prop="paymentWhitelistIp" v-if="ipType == 'pay'"> |
||||
|
<el-input v-model="form.paymentWhitelistIp" placeholder="请输入代收IP" @input="change" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="代付IP" prop="ip" v-if="ipType == 'pay'"> |
||||
|
<el-input v-model="form.ip" placeholder="请输入代付IP" @input="change" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
|
||||
|
<el-form-item label="谷歌验证码" prop="googleCode"> |
||||
|
<el-input v-model="form.googleCode" placeholder="请输入谷歌验证码" /> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="submitForm('formIp')">保 存</el-button> |
||||
|
<el-button @click="cancel">取 消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
|
||||
|
<!-- 删除 --> |
||||
|
<el-dialog title="删除商户" :visible.sync="openDelete" width="500px" append-to-body> |
||||
|
<el-form ref="formDelete" :model="form" :rules="rules" label-width="100px"> |
||||
|
<el-form-item label="谷歌验证码" prop="googleCode"> |
||||
|
<el-input v-model="form.googleCode" placeholder="请输入谷歌验证码" /> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="submitForm('formDelete')">保 存</el-button> |
||||
|
<el-button @click="cancel">取 消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
|
||||
|
<!-- 操作余额 --> |
||||
|
<el-dialog :title="title" :visible.sync="openBalance" width="500px" append-to-body> |
||||
|
<el-form ref="formBalance" :model="form" :rules="rules" label-width="100px"> |
||||
|
<el-form-item label="修改类型" prop="type"> |
||||
|
<el-select v-model="form.type" placeholder="请选择修改类型" clearable size="medium"> |
||||
|
<el-option v-for="(item, i) in type" :key="i" :label="item.label" :value="item.value"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="修改金额" prop="amount"> |
||||
|
<el-input v-model="form.amount" placeholder="请输入修改金额" |
||||
|
oninput="value=value.replace(/[^\d.]/g,'').replace(/^\./g, '').replace(/\.{2,}/g, '').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').match(/^\d*(\.?\d{0,4})/g)[0] || null" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="谷歌验证码" prop="googleCode"> |
||||
|
<el-input v-model="form.googleCode" placeholder="请输入谷歌验证码" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="备注" prop="remark"> |
||||
|
<el-input v-model="form.remark" placeholder="请输入备注" /> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="submitForm('formBalance')">保 存</el-button> |
||||
|
<el-button @click="cancel">取 消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
|
||||
|
<!-- 操作密码 --> |
||||
|
<el-dialog :title="title" :visible.sync="openPassword" width="500px" append-to-body> |
||||
|
<el-form ref="formPassword" :model="form" :rules="rules" label-width="100px"> |
||||
|
<el-form-item label="新密码" prop="password"> |
||||
|
<el-input type="password" v-model="form.password" placeholder="请输入新密码" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="谷歌验证码" prop="googleCode"> |
||||
|
<el-input v-model="form.googleCode" placeholder="请输入谷歌验证码" /> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="submitForm('formPassword')">保 存</el-button> |
||||
|
<el-button @click="cancel">取 消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
|
||||
|
<!-- 提现 --> |
||||
|
<el-dialog :title="title" :visible.sync="openWithdraw" width="500px" append-to-body> |
||||
|
<el-form ref="formWithdraw" :model="form" :rules="rules" label-width="140px"> |
||||
|
<!-- <el-form-item label="规则" prop="rateRuleType"> |
||||
|
<el-select v-model="form.rateRuleType" placeholder="请选择规则" clearable size="medium" @change="getValue"> |
||||
|
<el-option v-for="(item, i) in withdrawRule" :key="i" :label="item.label" :value="item.value"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> --> |
||||
|
<!-- <el-form-item label="单笔提款比例" prop="rate"> |
||||
|
<el-input v-model="form.rate" placeholder="请输入单笔提款比例" style="width:300px" @input="change" :disabled="true" /> % |
||||
|
</el-form-item> |
||||
|
<el-form-item label="单笔提款收取" prop="singleFee"> |
||||
|
<el-input v-model="form.singleFee" placeholder="请输入单笔提款收取" style="width:300px" @input="change" |
||||
|
:disabled="true" /> |
||||
|
</el-form-item> --> |
||||
|
<el-form-item label="是否允许后台提现" prop="paymentManualStatus"> |
||||
|
<el-switch v-model="form.paymentManualStatus" active-text="是" inactive-text="否" :active-value=true |
||||
|
:inactive-value=false></el-switch> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="是否API代付" prop="paymentInterfaceStatus"> |
||||
|
<el-switch v-model="form.paymentInterfaceStatus" active-text="是" inactive-text="否" :active-value=true |
||||
|
:inactive-value=false></el-switch> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="submitForm('formWithdraw')">保 存</el-button> |
||||
|
<el-button @click="cancel">取 消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
|
||||
|
<!-- 风控 --> |
||||
|
<el-dialog :title="title" :visible.sync="openControl" width="800px" append-to-body> |
||||
|
<el-form ref="formControl" :model="form" :rules="rules" label-width="140px"> |
||||
|
<el-form-item label="登录IP" prop="ipWhiteList"> |
||||
|
<el-input v-model="form.ipWhiteList" placeholder="请输入IP" @input="change" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="代收IP" prop="paymentWhitelistIp"> |
||||
|
<el-input v-model="form.paymentWhitelistIp" placeholder="请输入代收IP" @input="change" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="代付IP" prop="payapiWhitelistIp"> |
||||
|
<el-input v-model="form.payapiWhitelistIp" placeholder="请输入代付IP" @input="change" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="是否允许后台提现" prop="paymentManualStatus"> |
||||
|
<el-switch v-model="form.paymentManualStatus" active-text="是" inactive-text="否" :active-value=true |
||||
|
:inactive-value=false></el-switch> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="是否API代付" prop="paymentInterfaceStatus"> |
||||
|
<el-switch v-model="form.paymentInterfaceStatus" active-text="是" inactive-text="否" :active-value=true |
||||
|
:inactive-value=false></el-switch> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="手动提单审核开关" prop="whetherReview"> |
||||
|
<el-switch v-model="form.whetherReview" active-text="是" inactive-text="否" active-value="Y" |
||||
|
inactive-value="N"></el-switch> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="api提单审核开关" prop="whetherReviewApi"> |
||||
|
<el-switch v-model="form.whetherReviewApi" active-text="是" inactive-text="否" active-value="Y" |
||||
|
inactive-value="N"></el-switch> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="谷歌秘钥" prop="merchantNo"> |
||||
|
<span>{{ form.googleCaptcha }}</span> |
||||
|
<el-button type="primary" @click="submitForm('googleKey')" style="margin-left: 10px" |
||||
|
v-hasPermi="['system:merchant:resetGoogleSecret']">重 置</el-button> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="密钥" prop="merchantNo"> |
||||
|
<span>{{ form.md5Key }}</span> |
||||
|
<el-button type="primary" @click="submitForm('MD5')" style="margin-left: 10px" |
||||
|
v-hasPermi="['system:merchant:resetMd5Key']">重 置</el-button> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="谷歌验证码" prop="code"> |
||||
|
<el-input v-model="form.code" placeholder="请输入谷歌验证码" /> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="submitForm('formControl')" |
||||
|
v-hasPermi="['system:merchant:resetMerchantWindControl']">保 存</el-button> |
||||
|
<el-button @click="cancel">取 消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
|
||||
|
<!-- 通道列表 --> |
||||
|
<el-dialog v-dialogDrag title="通道" :visible.sync="pkCouponScopeRangeParkingStoreOpen" width="80%" append-to-body |
||||
|
:close-on-click-modal="false"> |
||||
|
<pkCouponScopeRangeStoreList v-if="pkCouponScopeRangeParkingStoreOpen" :pkCouponStore="pkCouponStore" |
||||
|
:pkCouponId="pkCouponStoreId"> |
||||
|
</pkCouponScopeRangeStoreList> |
||||
|
</el-dialog> |
||||
|
|
||||
|
<!-- 费率 --> |
||||
|
<el-dialog :title="title" :visible.sync="openRate" width="500px" append-to-body> |
||||
|
<el-form ref="formRate" :model="form" :rules="rules" label-width="140px"> |
||||
|
<el-form-item label="上级出金单笔比例" prop="" v-if="form.pMerchantPayOut"> |
||||
|
{{ form.pMerchantPayIn.merchantRate }} % |
||||
|
</el-form-item> |
||||
|
<el-form-item label="下级出金单笔比例" prop="" v-if="form.merchantPayOut"> |
||||
|
<el-input v-model="form.merchantPayOut.merchantRate" placeholder="请输入比例" style="width:300px" |
||||
|
@input="change" :disabled="form.rateRuleType == 2" /> % |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="上级入金单笔比例" prop="" v-if="form.pMerchantPayIn"> |
||||
|
{{ form.pMerchantPayOut.merchantRate }} % |
||||
|
</el-form-item> |
||||
|
<el-form-item label="下级入金单笔比例" prop="" v-if="form.merchantPayIn"> |
||||
|
<el-input v-model="form.merchantPayIn.merchantRate" placeholder="请输入比例" style="width:300px" |
||||
|
@input="change" /> % |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="上级入金单笔收取" prop="" v-if="form.pMerchantPayIn"> |
||||
|
{{ NumberDiv(form.pMerchantPayIn.merchantSingle,100) }} |
||||
|
</el-form-item> |
||||
|
<el-form-item label="下级出金单笔收取" prop="" v-if="form.merchantPayOut"> |
||||
|
<el-input v-model="form.merchantPayOut.merchantSingle" placeholder="请输入单笔提款收取" style="width:300px" |
||||
|
@input="change" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="上级出金单笔收取" prop="" v-if="form.pMerchantPayOut"> |
||||
|
{{ NumberDiv(form.pMerchantPayOut.merchantSingle,100) }} |
||||
|
</el-form-item> |
||||
|
<el-form-item label="下级入金单笔收取" prop="" v-if="form.merchantPayIn"> |
||||
|
<el-input v-model="form.merchantPayIn.merchantSingle" placeholder="请输入单笔提款收取" style="width:300px" |
||||
|
@input="change" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="submitForm('formRate')">保 存</el-button> |
||||
|
<el-button @click="cancel">取 消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
|
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { payMerchant } from "@/api/form"; |
||||
|
import pkCouponScopeRangeStoreList from "./pkCouponScopeRangeStoreList"; |
||||
|
export default { |
||||
|
name: "Merchant", |
||||
|
components: { |
||||
|
pkCouponScopeRangeStoreList |
||||
|
}, |
||||
|
data() { |
||||
|
var checkPhone = (rule, value, callback) => { |
||||
|
let reg = /^1[345789]\d{9}$/ |
||||
|
if (!reg.test(value) && value) { |
||||
|
callback(new Error('请输入正确手机号')) |
||||
|
} else { |
||||
|
callback() |
||||
|
} |
||||
|
} |
||||
|
var validateEmail = (rule, value, callback) => { |
||||
|
var reg = /^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/; |
||||
|
if (!reg.test(value) && value) { |
||||
|
callback(new Error('请输入有效的邮箱')); |
||||
|
} else { |
||||
|
callback(); |
||||
|
} |
||||
|
}; |
||||
|
return { |
||||
|
pkCouponScopeRangeParkingStoreOpen: false, |
||||
|
pkCouponStore: {}, |
||||
|
pkCouponStoreId: '', |
||||
|
// 余额修改类型 |
||||
|
type: [ |
||||
|
{ |
||||
|
label: "增加", |
||||
|
value: 'add', |
||||
|
}, |
||||
|
{ |
||||
|
label: "减少", |
||||
|
value: 'subtract', |
||||
|
}, |
||||
|
], |
||||
|
// ip类型 |
||||
|
ipType: "", |
||||
|
dateRange: [], |
||||
|
// 遮罩层 |
||||
|
loading: true, |
||||
|
// 选中数组 |
||||
|
ids: [], |
||||
|
id: null, |
||||
|
// 非单个禁用 |
||||
|
single: true, |
||||
|
// 非多个禁用 |
||||
|
multiple: true, |
||||
|
// 显示搜索条件 |
||||
|
showSearch: true, |
||||
|
// 总条数 |
||||
|
total: 0, |
||||
|
// 商户表格数据 |
||||
|
infoList: [], |
||||
|
// 弹出层标题 |
||||
|
title: "", |
||||
|
// 是否显示弹出层 |
||||
|
open: false, |
||||
|
openMd5: false, |
||||
|
openKey: false, |
||||
|
openToIp: false, |
||||
|
openBalance: false, |
||||
|
openPassword: false, |
||||
|
openWithdraw: false, |
||||
|
openDelete: false, |
||||
|
openControl: false, |
||||
|
openRate: false, |
||||
|
// 查询参数 |
||||
|
queryParams: { |
||||
|
pageNum: 1, |
||||
|
pageSize: 10, |
||||
|
merchantNo: null, |
||||
|
username: null, |
||||
|
phone: null, |
||||
|
email: null, |
||||
|
}, |
||||
|
// 详情 |
||||
|
detailData: {}, |
||||
|
// 表单参数 |
||||
|
form: {}, |
||||
|
// 表单校验 |
||||
|
rules: { |
||||
|
whetherReviewApi: [{ required: true, message: "请选择是否api提单审核", trigger: "blur" }], |
||||
|
whetherReview: [{ required: true, message: "请选择是否手动提单审核", trigger: "blur" }], |
||||
|
code: [{ required: true, message: "请输入谷歌验证码", trigger: "blur" }], |
||||
|
ipWhiteList: [{ required: true, message: "请输入IP", trigger: "blur" }], |
||||
|
payapiWhitelistIp: [{ required: true, message: "请输入代付IP", trigger: "blur" }], |
||||
|
paymentWhitelistIp: [{ required: true, message: "请输入代收IP", trigger: "blur" }], |
||||
|
paymentManualStatus: [{ required: true, message: "请选择是否允许后台提现", trigger: "blur" }], |
||||
|
paymentInterfaceStatus: [{ required: true, message: "请选择是否API代付", trigger: "blur" }], |
||||
|
rate: [{ required: true, message: "请输入单笔提款比例", trigger: "blur" }], |
||||
|
singleFee: [{ required: true, message: "请输入单笔提款收取", trigger: "blur" }], |
||||
|
phone: [ |
||||
|
{ type: 'number', validator: checkPhone, message: '请输入正确的手机号', trigger: 'blur' }, |
||||
|
], |
||||
|
email: [ |
||||
|
{ type: 'number', validator: validateEmail, message: '请输入正确的邮箱', trigger: 'blur' }, |
||||
|
], |
||||
|
type: [{ required: true, message: "请选择修改类型", trigger: "blur" }], |
||||
|
amount: [ |
||||
|
{ required: true, message: "请输入修改金额", trigger: "blur" }, |
||||
|
], |
||||
|
ip: [{ required: true, message: "请输入ip", trigger: "blur" }], |
||||
|
googleCode: [ |
||||
|
{ required: true, message: "请输入googleCode", trigger: "blur" }, |
||||
|
], |
||||
|
username: [ |
||||
|
{ required: true, message: "商户名不能为空", trigger: "blur" }, |
||||
|
], |
||||
|
securityDepositAmount: [ |
||||
|
{ required: true, message: "押金不能为空", trigger: "blur" }, |
||||
|
], |
||||
|
password: [ |
||||
|
{ required: true, message: "密码不能为空", trigger: "blur" }, |
||||
|
], |
||||
|
}, |
||||
|
}; |
||||
|
}, |
||||
|
created() { |
||||
|
this.getList(); |
||||
|
}, |
||||
|
methods: { |
||||
|
// 费率 |
||||
|
handleUpdateRate(row) { |
||||
|
this.reset(); |
||||
|
payMerchant.getRate(row.id).then((response) => { |
||||
|
this.form = response.data; |
||||
|
this.form.merchantPayIn.merchantSingle = this.NumberDiv(this.form.merchantPayIn.merchantSingle, 100) |
||||
|
this.form.merchantPayOut.merchantSingle = this.NumberDiv(this.form.merchantPayOut.merchantSingle, 100) |
||||
|
|
||||
|
this.form.merchantPayIn.merchantRate = this.NumberMul(this.form.merchantPayIn.merchantRate, 100) |
||||
|
this.form.merchantPayOut.merchantRate = this.NumberMul(this.form.merchantPayOut.merchantRate, 100) |
||||
|
|
||||
|
this.form.merchantId = row.id |
||||
|
this.title = "费率"; |
||||
|
this.openRate = true; |
||||
|
}); |
||||
|
}, |
||||
|
// 风控 |
||||
|
handleControl(row) { |
||||
|
this.reset() |
||||
|
this.id = row.id |
||||
|
payMerchant.getMerchantWindControl(row.id).then((response) => { |
||||
|
this.form = response.data; |
||||
|
this.title = "风控"; |
||||
|
this.openControl = true |
||||
|
this.form.code = null; |
||||
|
}); |
||||
|
}, |
||||
|
// 商户删除 |
||||
|
handleDeleteMer(row) { |
||||
|
this.reset() |
||||
|
this.openDelete = true |
||||
|
this.form.id = row.id; |
||||
|
}, |
||||
|
// 查看通道列表 |
||||
|
handleView(row) { |
||||
|
this.pkCouponStore = row; |
||||
|
this.pkCouponStoreId = row.id; |
||||
|
this.pkCouponScopeRangeParkingStoreOpen = true; |
||||
|
}, |
||||
|
change() { |
||||
|
this.$forceUpdate() |
||||
|
}, |
||||
|
getValue(e) { |
||||
|
payMerchant.getWithdrawConfig(this.id).then((response) => { |
||||
|
if (e == 2) { |
||||
|
this.form.id = response.data.id |
||||
|
this.form.merchantId = response.data.merchantId |
||||
|
this.form.singleFee = response.data.sysMerchantWithdrawConfig.singleFee |
||||
|
this.form.rate = response.data.sysMerchantWithdrawConfig.rate |
||||
|
} else { |
||||
|
this.form.merchantId = response.data.merchantId |
||||
|
this.form.singleFee = response.data.singleFee |
||||
|
this.form.rate = response.data.rate |
||||
|
} |
||||
|
}); |
||||
|
this.$forceUpdate() |
||||
|
}, |
||||
|
// 状态有效无效 |
||||
|
switchStatusChange(row, type) { |
||||
|
this.reset() |
||||
|
const id = row.id || this.ids; |
||||
|
this.form = row; |
||||
|
if (type == 'status') { |
||||
|
this.form.status = row.status; |
||||
|
} else if (type == 'whetherReview') { |
||||
|
this.form.whetherReview = row.whetherReview; |
||||
|
} else { |
||||
|
this.form.whetherReviewApi = row.whetherReviewApi; |
||||
|
} |
||||
|
payMerchant.updateInfo(this.form).then((res) => { |
||||
|
if (res.code === 200) { |
||||
|
this.$message.success("编辑成功"); |
||||
|
this.getList() |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
/** 查询商户列表 */ |
||||
|
getList() { |
||||
|
this.loading = true; |
||||
|
payMerchant.listInfo(this.addSESDateRange(this.queryParams, this.dateRange)).then( |
||||
|
(response) => { |
||||
|
this.infoList = response.rows; |
||||
|
this.total = Number(response.total); |
||||
|
this.loading = false; |
||||
|
} |
||||
|
); |
||||
|
}, |
||||
|
// 取消按钮 |
||||
|
cancel() { |
||||
|
this.open = false; |
||||
|
this.openMd5 = false; |
||||
|
this.openKey = false; |
||||
|
this.openToIp = false; |
||||
|
this.openBalance = false; |
||||
|
this.openPassword = false; |
||||
|
this.openWithdraw = false; |
||||
|
this.openDelete = false |
||||
|
this.openControl = false |
||||
|
this.openRate = false |
||||
|
this.reset(); |
||||
|
}, |
||||
|
// 表单重置 |
||||
|
reset() { |
||||
|
this.dateRange = []; |
||||
|
this.form = {}; |
||||
|
this.resetForm("form"); |
||||
|
}, |
||||
|
/** 搜索按钮操作 */ |
||||
|
handleQuery() { |
||||
|
this.queryParams.pageNum = 1; |
||||
|
this.getList(); |
||||
|
}, |
||||
|
/** 重置按钮操作 */ |
||||
|
resetQuery() { |
||||
|
this.resetForm("queryForm"); |
||||
|
this.dateRange = []; |
||||
|
this.handleQuery(); |
||||
|
}, |
||||
|
// 多选框选中数据 |
||||
|
handleSelectionChange(selection) { |
||||
|
this.ids = selection.map((item) => item.id); |
||||
|
this.single = selection.length !== 1; |
||||
|
this.multiple = !selection.length; |
||||
|
}, |
||||
|
/** 新增按钮操作 */ |
||||
|
handleAdd(row, t) { |
||||
|
this.reset(); |
||||
|
this.open = true; |
||||
|
t == 'next' ? this.title = "添加下级" : this.title = "添加商户" |
||||
|
t == 'next' ? this.form.parentId = row.id : '' |
||||
|
}, |
||||
|
// 提现 |
||||
|
handleWithdraw(row) { |
||||
|
this.reset(); |
||||
|
this.id = row.id |
||||
|
payMerchant.getWithdrawConfig(this.id).then((response) => { |
||||
|
this.form = response.data; |
||||
|
// 系统规则赋值不同 |
||||
|
// if (this.form.rateRuleType == 2) { |
||||
|
// this.form = response.data.sysMerchantWithdrawConfig |
||||
|
// this.form.rateRuleType = response.data.rateRuleType |
||||
|
// this.form.id = response.data.id |
||||
|
// this.form.merchantId = response.data.merchantId |
||||
|
// } |
||||
|
// if (this.form.id == 0) { |
||||
|
// this.form.id = null |
||||
|
// } |
||||
|
this.title = "提现"; |
||||
|
this.openWithdraw = true; |
||||
|
}); |
||||
|
|
||||
|
}, |
||||
|
// 修改密码 |
||||
|
handlePassword(row, type) { |
||||
|
this.reset(); |
||||
|
this.ipType = type; |
||||
|
this.title = "修改密码"; |
||||
|
this.form.id = row.id; |
||||
|
this.openPassword = true; |
||||
|
}, |
||||
|
// 余额 |
||||
|
handleBalance(row) { |
||||
|
this.reset(); |
||||
|
this.title = "修改余额"; |
||||
|
this.form.id = row.id; |
||||
|
this.openBalance = true; |
||||
|
}, |
||||
|
/** 修改按钮操作 */ |
||||
|
handleUpdate(row) { |
||||
|
this.reset(); |
||||
|
payMerchant.getInfo(row.id).then( |
||||
|
(response) => { |
||||
|
this.form = response.data; |
||||
|
this.open = true; |
||||
|
this.title = "修改商户"; |
||||
|
} |
||||
|
); |
||||
|
}, |
||||
|
// md5 |
||||
|
handleMD5(row) { |
||||
|
// this.reset(); |
||||
|
this.id = row.id; |
||||
|
payMerchant.getmd5Key(this.id).then((response) => { |
||||
|
this.form.md5Key = response.data.md5Key; |
||||
|
// console.log(this.form) |
||||
|
// this.title = "重置MD5"; |
||||
|
// this.openMd5 = true; |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
// ip |
||||
|
handleIp(row, type) { |
||||
|
this.reset(); |
||||
|
this.detailData = row; |
||||
|
this.id = row.id; |
||||
|
this.ipType = type; |
||||
|
if (type == "pay") { |
||||
|
payMerchant.getPayIp(this.id).then((response) => { |
||||
|
this.form = response.data; |
||||
|
this.form.id = row.id; |
||||
|
this.title = "PayApiIp白名单"; |
||||
|
this.openToIp = true |
||||
|
this.form.ip = response.data.payapiWhitelistIp |
||||
|
}); |
||||
|
} else { |
||||
|
payMerchant.getLoginIp(this.id).then((response) => { |
||||
|
this.form = response.data; |
||||
|
this.form.id = row.id; |
||||
|
this.title = "ip白名单"; |
||||
|
this.openToIp = true |
||||
|
this.form.ip = response.data.ipWhite |
||||
|
}); |
||||
|
} |
||||
|
}, |
||||
|
// 谷歌密钥 |
||||
|
handleKey(row) { |
||||
|
// this.reset(); |
||||
|
this.id = row.id; |
||||
|
payMerchant.getKey(this.id).then((response) => { |
||||
|
this.form.googleSecret = response.data.googleSecret; |
||||
|
this.$forceUpdate() |
||||
|
// this.title = "Google Secret"; |
||||
|
// this.openKey = true; |
||||
|
}); |
||||
|
}, |
||||
|
/** 提交按钮 */ |
||||
|
submitForm(type) { |
||||
|
if (type == "MD5") { |
||||
|
// 重置MD5 |
||||
|
payMerchant.resetMd5Key(this.id).then((response) => { |
||||
|
this.form.md5Key = response.data.md5Key; |
||||
|
this.$forceUpdate() |
||||
|
}); |
||||
|
} |
||||
|
if (type == "googleKey") { |
||||
|
// 重置谷歌key |
||||
|
payMerchant.resetGoogleSecret(this.id).then((response) => { |
||||
|
this.form.googleSecret = response.data.googleSecret; |
||||
|
this.form.googleCaptcha = response.data.googleSecret; |
||||
|
this.$forceUpdate() |
||||
|
}); |
||||
|
} |
||||
|
if (type != "googleKey" && type != "MD5") { |
||||
|
// console.log(type) |
||||
|
this.$refs[type].validate((valid) => { |
||||
|
if (valid) { |
||||
|
if (type == "formRate") { |
||||
|
// 修改费率 |
||||
|
let merchantSingleIn = this.NumberMul(this.form.merchantPayIn.merchantSingle, 100) |
||||
|
let merchantSingleOut = this.NumberMul(this.form.merchantPayOut.merchantSingle, 100) |
||||
|
let inMerchantRate = this.NumberDiv(this.form.merchantPayIn.merchantRate, 100) |
||||
|
let outMerchantRate = this.NumberDiv(this.form.merchantPayOut.merchantRate, 100) |
||||
|
payMerchant.setRate({ |
||||
|
inMerchantRate: inMerchantRate, |
||||
|
inMerchantSingle: merchantSingleIn, |
||||
|
merchantId: this.form.merchantId, |
||||
|
outMerchantRate: outMerchantRate, |
||||
|
outMerchantSingle: merchantSingleOut |
||||
|
}).then((response) => { |
||||
|
this.msgSuccess("操作成功"); |
||||
|
this.openRate = false; |
||||
|
this.getList(); |
||||
|
}); |
||||
|
} |
||||
|
if (type == "formControl") { |
||||
|
// 重置风控 |
||||
|
payMerchant.resetMerchantWindControl(this.form).then((response) => { |
||||
|
this.msgSuccess("操作成功"); |
||||
|
this.openControl = false; |
||||
|
this.getList(); |
||||
|
}); |
||||
|
} |
||||
|
// 商户删除 |
||||
|
if (type == "formDelete") { |
||||
|
payMerchant.merchantdel(this.form) |
||||
|
.then((response) => { |
||||
|
this.msgSuccess("删除成功"); |
||||
|
this.openDelete = false; |
||||
|
this.getList() |
||||
|
}); |
||||
|
} |
||||
|
// 重置ip |
||||
|
if (type == "formIp") { |
||||
|
if (this.ipType == "pay") { |
||||
|
payMerchant |
||||
|
.resetPayapiWhitelistIp(this.form) |
||||
|
.then((response) => { |
||||
|
this.msgSuccess("保存成功"); |
||||
|
this.openToIp = false; |
||||
|
}); |
||||
|
} else { |
||||
|
payMerchant.resetIpWhite(this.form).then((response) => { |
||||
|
this.msgSuccess("保存成功"); |
||||
|
this.openToIp = false; |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
// 余额 |
||||
|
if (type == "formBalance") { |
||||
|
let amount = this.NumberMul(this.form.amount, 100); |
||||
|
payMerchant.operatingBalance({ |
||||
|
id: this.form.id, |
||||
|
type: this.form.type, |
||||
|
amount: amount, |
||||
|
googleCode: this.form.googleCode, |
||||
|
remark: this.form.remark, |
||||
|
}).then((response) => { |
||||
|
this.msgSuccess("操作成功"); |
||||
|
this.openBalance = false; |
||||
|
this.getList(); |
||||
|
}); |
||||
|
} |
||||
|
// 提现 |
||||
|
if (type == "formWithdraw") { |
||||
|
let singleFee; |
||||
|
if (this.form.singleFee) { |
||||
|
singleFee = this.NumberMul(this.form.singleFee, 100) |
||||
|
} |
||||
|
payMerchant.upWithdrawConfig({ |
||||
|
id: this.form.id, |
||||
|
singleFee: singleFee, |
||||
|
merchantId: this.form.merchantId, |
||||
|
rate: this.form.rate, |
||||
|
rateRuleType: this.form.rateRuleType, |
||||
|
paymentManualStatus: this.form.paymentManualStatus, |
||||
|
paymentInterfaceStatus: this.form.paymentInterfaceStatus |
||||
|
}).then((response) => { |
||||
|
this.msgSuccess("操作成功"); |
||||
|
this.openWithdraw = false; |
||||
|
this.getList(); |
||||
|
}); |
||||
|
} |
||||
|
// 重置密码 |
||||
|
if (type == "formPassword") { |
||||
|
if (this.ipType == "loginPassword") { |
||||
|
payMerchant.editLoginPwd(this.form).then((response) => { |
||||
|
this.msgSuccess("修改成功"); |
||||
|
this.openPassword = false; |
||||
|
this.getList(); |
||||
|
}); |
||||
|
} else { |
||||
|
payMerchant.editPayPwd(this.form).then((response) => { |
||||
|
this.msgSuccess("修改成功"); |
||||
|
this.openPassword = false; |
||||
|
this.getList(); |
||||
|
}); |
||||
|
} |
||||
|
} else if (type == "form") { |
||||
|
if (this.form.id != null) { |
||||
|
payMerchant.updateInfo({ |
||||
|
email: this.form.email, |
||||
|
id: this.form.id, |
||||
|
merchantNo: this.form.merchantNo, |
||||
|
phone: this.form.phone, |
||||
|
username: this.form.username, |
||||
|
}).then((response) => { |
||||
|
this.msgSuccess("修改成功"); |
||||
|
this.open = false; |
||||
|
this.getList(); |
||||
|
}); |
||||
|
} else { |
||||
|
payMerchant.addInfo(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 delMerchant(ids); |
||||
|
}) |
||||
|
.then(() => { |
||||
|
this.getList(); |
||||
|
this.msgSuccess("删除成功"); |
||||
|
}); |
||||
|
}, |
||||
|
/** 导出按钮操作 */ |
||||
|
handleExport() { |
||||
|
const queryParams = this.queryParams; |
||||
|
this.$confirm("是否确认导出所有商户数据项?", "警告", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(function () { |
||||
|
return exportMerchant(queryParams); |
||||
|
}) |
||||
|
.then((response) => { |
||||
|
this.download(response.msg); |
||||
|
}); |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
<style lang="scss" scoped></style> |
||||
|
|
@ -0,0 +1,357 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="76px" class="flex form" |
||||
|
style="padding: 0 20px; position: relative"> |
||||
|
<el-form-item> |
||||
|
<div class="searchTop flexBet" style="align-items: center"> |
||||
|
<el-row :gutter="10" class="mb8" style="margin-left: 20px"> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button type="primary" plain icon="" size="medium" @click="handleAdd()">绑定通道</el-button> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</div> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<el-table stripe v-loading="loading" :data="infoList"> |
||||
|
<el-table-column label="通道名称" align="center" prop="dataStatus"> |
||||
|
<template slot-scope="scope"> |
||||
|
{{ scope.row.platformChannel.channelName }} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
|
||||
|
<el-table-column label="类型" align="center" prop="channelTypeDescribe" /> |
||||
|
|
||||
|
<el-table-column label="费率" align="center" prop="dataStatus"> |
||||
|
<template slot-scope="scope"> |
||||
|
{{ scope.row.rate + "%" + '+' + NumberDiv(scope.row.singleFee, 100), |
||||
|
}} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
|
||||
|
<el-table-column label="扣费方式" align="center" prop="channelType"> |
||||
|
<template slot-scope="scope"> |
||||
|
{{ scope.row.platformChannel.channelType == 1 ? '内扣' : '外扣' }} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
|
||||
|
<el-table-column label="状态" align="center" prop="status" min-width="140"> |
||||
|
<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" fixed="right" min-width="200"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button size="small" type="text" @click="handleUpdate(scope.row)" style="color: #006eff">费率</el-button> |
||||
|
<el-button size="small" type="text" @click="handleDelete(scope.row)" style="color: red">删除</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="cid"> |
||||
|
<el-select v-model="form.cid" placeholder="请选择通道" clearable size="medium"> |
||||
|
<el-option v-for="(item, i) in channelAll" :key="i" :label="item.channelName" :value="item.id"></el-option> |
||||
|
</el-select> |
||||
|
</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> |
||||
|
|
||||
|
|
||||
|
|
||||
|
<!-- 费率 --> |
||||
|
<el-dialog :title="title" :visible.sync="openRate" width="500px" append-to-body> |
||||
|
<el-form ref="formRate" :model="form" :rules="rules" label-width="110px"> |
||||
|
<el-form-item label="规则" prop="rateRuleType"> |
||||
|
<el-select v-model="form.rateRuleType" placeholder="请选择规则" clearable size="medium" @change="getValue"> |
||||
|
<el-option v-for="(item, i) in withdrawRule" :key="i" :label="item.label" :value="item.value"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="单笔比例" prop="rate"> |
||||
|
<el-input v-model="form.rate" placeholder="请输入单笔提款比例" style="width:300px" @input="change" |
||||
|
:disabled="form.rateRuleType == 2" /> % |
||||
|
</el-form-item> |
||||
|
<el-form-item label="单笔收取" prop="singleFee"> |
||||
|
<el-input v-model="form.singleFee" placeholder="请输入单笔提款收取" style="width:300px" @input="change" |
||||
|
:disabled="form.rateRuleType == 2" /> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="submitForm('formRate')">保 存</el-button> |
||||
|
<el-button @click="cancel">取 消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
|
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { payMerchant, common_api } from "@/api/form"; |
||||
|
export default { |
||||
|
name: "pkCouponScopeRangeStoreList", |
||||
|
props: { |
||||
|
pkCouponId: { |
||||
|
type: Number, |
||||
|
default() { |
||||
|
return null; |
||||
|
}, |
||||
|
}, |
||||
|
pkCouponStore: { |
||||
|
type: Object, |
||||
|
default: {} |
||||
|
} |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
// 规则 |
||||
|
withdrawRule: [ |
||||
|
{ |
||||
|
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, |
||||
|
// 查询参数 |
||||
|
queryParams: { |
||||
|
pageNum: 1, |
||||
|
pageSize: 20, |
||||
|
pkCouponId: null, |
||||
|
}, |
||||
|
// 表单参数 |
||||
|
form: { |
||||
|
}, |
||||
|
detailData: {}, |
||||
|
// 表单校验 |
||||
|
rules: { |
||||
|
rate: [{ required: true, message: "请输入单笔提款比例", trigger: "blur" }], |
||||
|
singleFee: [{ required: true, message: "请输入单笔提款收取", trigger: "blur" }], |
||||
|
cid: [ |
||||
|
{ required: true, message: "请选择通道", trigger: "blur" }, |
||||
|
] |
||||
|
}, |
||||
|
}; |
||||
|
}, |
||||
|
created() { |
||||
|
this.pkCouponId && (this.queryParams.pkCouponId = this.pkCouponId); |
||||
|
this.getList(); |
||||
|
this.init(); |
||||
|
}, |
||||
|
methods: { |
||||
|
change() { |
||||
|
this.$forceUpdate() |
||||
|
}, |
||||
|
getValue(e) { |
||||
|
if (e == 2) { |
||||
|
this.form.rate = this.detailData.platformChannel.channelRate |
||||
|
this.form.singleFee = this.NumberDiv(this.detailData.platformChannel.channelSingleFee, 100) |
||||
|
} |
||||
|
if (e == 1) { |
||||
|
this.form.rate = null |
||||
|
this.form.singleFee = null |
||||
|
} |
||||
|
this.getList() |
||||
|
this.$forceUpdate() |
||||
|
}, |
||||
|
// 状态有效无效 |
||||
|
switchStatusChange(row) { |
||||
|
const id = row.id || this.ids; |
||||
|
this.form = row; |
||||
|
this.form.status = row.status; |
||||
|
payMerchant.upChannel(this.form).then((res) => { |
||||
|
if (res.code === 200) { |
||||
|
this.$message.success("编辑成功"); |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
/** 查询 */ |
||||
|
getList() { |
||||
|
this.loading = true; |
||||
|
payMerchant.getChannelList(this.queryParams.pkCouponId) |
||||
|
.then((response) => { |
||||
|
this.infoList = response.data; |
||||
|
this.loading = false; |
||||
|
}); |
||||
|
}, |
||||
|
init() { |
||||
|
// 所有通道 |
||||
|
common_api |
||||
|
.platformChannelAll() |
||||
|
.then((response) => { |
||||
|
this.channelAll = response.data |
||||
|
}); |
||||
|
}, |
||||
|
// 取消按钮 |
||||
|
cancel() { |
||||
|
this.open = false; |
||||
|
this.openRate = false |
||||
|
this.reset(); |
||||
|
}, |
||||
|
// 表单重置 |
||||
|
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.getList() |
||||
|
this.detailData = row |
||||
|
this.reset(); |
||||
|
this.form = row; |
||||
|
this.form.rate = row.rate |
||||
|
for (var i = 0; i < this.infoList.length; i++) { |
||||
|
if (this.infoList[i].id == row.id) { |
||||
|
this.form.singleFee = this.NumberDiv(this.infoList[i].singleFee, 100) |
||||
|
} |
||||
|
} |
||||
|
// 系统规则赋值不同 |
||||
|
if (this.form.rateRuleType == 2) { |
||||
|
this.form.rate = row.platformChannel.channelRate |
||||
|
this.form.singleFee = this.NumberDiv(row.platformChannel.channelSingleFee, 100) |
||||
|
for (var i = 0; i < this.infoList.length; i++) { |
||||
|
if (this.infoList[i].id == row.id) { |
||||
|
this.form.singleFee = this.NumberDiv(this.infoList[i].platformChannel.channelSingleFee, 100) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
this.title = "费率"; |
||||
|
this.openRate = true; |
||||
|
|
||||
|
}, |
||||
|
/** 提交按钮 */ |
||||
|
submitForm(type) { |
||||
|
this.$refs[type].validate((valid) => { |
||||
|
if (valid) { |
||||
|
let singleFee = 0; |
||||
|
if (this.form.singleFee) { |
||||
|
singleFee = this.NumberMul(this.form.singleFee, 100) |
||||
|
} |
||||
|
const loading = this.$loading({ |
||||
|
lock: true, |
||||
|
text: `正在操作`, |
||||
|
spinner: "el-icon-loading", |
||||
|
background: "rgba(0, 0, 0, 0.7)", |
||||
|
}); |
||||
|
|
||||
|
if (type == 'formChannel') { |
||||
|
payMerchant.bindChannel({ |
||||
|
cid: this.form.cid, |
||||
|
mid: this.pkCouponId, |
||||
|
}).then((response) => { |
||||
|
loading.close(); |
||||
|
this.open = false; |
||||
|
this.msgSuccess("绑定成功"); |
||||
|
this.getList(); |
||||
|
}).catch(() => { |
||||
|
loading.close(); |
||||
|
}); |
||||
|
} |
||||
|
if (type == 'formRate') { |
||||
|
payMerchant.upChannel({ |
||||
|
platformChannelId: this.form.platformChannelId, |
||||
|
id: this.form.id, |
||||
|
rate: this.form.rate, |
||||
|
singleFee: singleFee, |
||||
|
merchantId: this.form.merchantId, |
||||
|
rateRuleType: this.form.rateRuleType |
||||
|
}).then((response) => { |
||||
|
loading.close(); |
||||
|
this.openRate = false; |
||||
|
this.msgSuccess("修改成功"); |
||||
|
this.getList(); |
||||
|
}).catch(() => { |
||||
|
loading.close(); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
/** 删除按钮操作 */ |
||||
|
handleDelete(row) { |
||||
|
const ids = row.id || this.ids; |
||||
|
this.$confirm( |
||||
|
'是否确认删除通道名称为"' + row.platformChannel.channelName + '"的数据项?', |
||||
|
"警告", |
||||
|
{ |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
} |
||||
|
) |
||||
|
.then(function () { |
||||
|
return payMerchant.delInfo(ids); |
||||
|
}) |
||||
|
.then(() => { |
||||
|
this.getList(); |
||||
|
this.msgSuccess("删除成功"); |
||||
|
}) |
||||
|
.catch(() => { }); |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
.el-radio { |
||||
|
line-height: 2; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,353 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="108px"> |
||||
|
<el-form-item label="平台订单号" prop="orderNo"> |
||||
|
<el-input v-model="queryParams.orderNo" placeholder="请输入平台订单号" clearable size="small" |
||||
|
@keyup.enter.native="handleQuery" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="商户订单号" prop="outTradeNo"> |
||||
|
<el-input v-model="queryParams.outTradeNo" placeholder="请输入商户订单号" clearable size="small" |
||||
|
@keyup.enter.native="handleQuery" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="付款地址" prop="payAddress"> |
||||
|
<el-input v-model="queryParams.payAddress" placeholder="请输入付款地址" clearable size="small" |
||||
|
@keyup.enter.native="handleQuery" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="支付商户名" prop="merchantName"> |
||||
|
<el-input v-model="queryParams.merchantName" placeholder="请输入支付商户名" clearable size="small" |
||||
|
@keyup.enter.native="handleQuery" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="订单金额" prop="tranAmt"> |
||||
|
<el-input v-model="queryParams.tranAmt" placeholder="请输入订单金额" clearable size="small" |
||||
|
@keyup.enter.native="handleQuery" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="订单状态" prop="orderStatus"> |
||||
|
<el-select v-model="queryParams.orderStatus" placeholder="请选择状态" clearable size="small"> |
||||
|
<el-option v-for="dict in sysOrderStatus" :key="dict.dictValue" :label="dict.dictLabel" |
||||
|
:value="dict.dictValue" /> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="订单来源" prop="sourceType"> |
||||
|
<el-select v-model="queryParams.sourceType" placeholder="请选择订单来源" clearable size="small"> |
||||
|
<el-option v-for="dict in sourceTypeOptions" :key="dict.dictValue" :label="dict.dictLabel" |
||||
|
:value="dict.dictValue" /> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="创建时间"> |
||||
|
<el-date-picker v-model="dateRange" size="small" style="width: 340px" value-format="yyyy-MM-dd HH:mm:ss" |
||||
|
type="datetimerange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" |
||||
|
:unlink-panels="true" :default-time="['00:00:00', '23:59:59']"></el-date-picker> |
||||
|
</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 size="mini" @click="handleTest">测试下单</el-button> |
||||
|
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出</el-button> |
||||
|
</el-col> |
||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-table v-loading="loading" :data="otcCoinList"> |
||||
|
<el-table-column label="平台订单号" align="center" prop="orderNo" /> |
||||
|
<el-table-column label="商户订单号" align="center" prop="outTradeNo" /> |
||||
|
<el-table-column label="商户编号" align="center" prop="merchantNo" /> |
||||
|
<el-table-column :label="'订单金额'" align="center" prop="tranAmt"> |
||||
|
<template slot-scope="scope"> |
||||
|
{{ (NumberDiv(scope.row.tranAmt, 100)) }} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column :label="'实付金额'" align="center" prop="payAmt"> |
||||
|
<template slot-scope="scope"> |
||||
|
{{ (NumberDiv(scope.row.payAmt, 100)) }} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="地址" align="center" prop="address" /> |
||||
|
<el-table-column label="付款地址" align="center" prop="payAddress" /> |
||||
|
<el-table-column label="支付商户名" align="center" prop="merchantName" /> |
||||
|
<el-table-column label="商户费率(%)" align="center" prop="merchantRate" /> |
||||
|
<el-table-column :label="'商户单笔手续费'" align="center" prop="merchantSingleFee"> |
||||
|
<template slot-scope="scope"> |
||||
|
{{ (NumberDiv(scope.row.merchantSingleFee, 100)) }} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="异步通知状态" align="center" prop="notifyStatus" :formatter="notifyStatusFormat" /> |
||||
|
|
||||
|
<el-table-column label="订单来源" align="center" prop="sourceType" :formatter="sourceTypeFormat" /> |
||||
|
<el-table-column label="变动来源" align="center" prop="source" :formatter="sysOrderStatusFormat" /> |
||||
|
<el-table-column label="创建时间" align="center" prop="createTime" min-width="180" /> |
||||
|
<!-- <el-table-column label="更新时间" align="center" prop="updateTime" min-width="180" /> --> |
||||
|
|
||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button size="small" type="text" style="color: #006EFF;" v-if="scope.row.orderStatus == 1" |
||||
|
@click="handleOrder(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 v-dialogDrag title="手工处理" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false" |
||||
|
:before-close="cancel"> |
||||
|
<el-form ref="formDeal" :model="form" :rules="rules" label-width="120px"> |
||||
|
<el-form-item label="订单状态" prop="status"> |
||||
|
<el-select v-model="form.status" placeholder="请选择订单状态" clearable size="medium"> |
||||
|
<el-option v-for="(item, i) in orderStatusType" :key="i" :label="item.label" |
||||
|
:value="item.value"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="谷歌动态验证码" prop="googleCode"> |
||||
|
<el-input v-model="form.googleCode" placeholder="请输入谷歌动态验证码" style="width:217px" /> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button :disabled="!form.status || !form.googleCode" |
||||
|
:type="form.status && form.googleCode ? 'primary' : 'info'" icon="" size="small" |
||||
|
@click="submitForm('processsuccess', 'formDeal')">确定</el-button> |
||||
|
<el-button plain size="small" @click="cancel">取消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
|
||||
|
|
||||
|
<!-- 测试下单 --> |
||||
|
<el-dialog v-dialogDrag title="测试下单" :visible.sync="openTest" width="500px" append-to-body |
||||
|
:close-on-click-modal="false" :before-close="cancel"> |
||||
|
<el-form ref="formTest" :model="form" :rules="rules" label-width="120px"> |
||||
|
<el-form-item label="商户" prop="merchantId"> |
||||
|
<el-select v-model="form.merchantId" placeholder="请选择商户" clearable size="medium"> |
||||
|
<el-option v-for="(item, i) in merchantCon" :key="i" :label="item.username" |
||||
|
:value="item.id"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="金额" prop="amount"> |
||||
|
<el-input v-model="form.amount" placeholder="请输入金额" style="width:217px" /> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" icon="" size="small" @click="submitForm('test', 'formTest')">确定</el-button> |
||||
|
<el-button plain size="small" @click="cancel">取消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
|
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { payRecordRecharge, common_api } from "@/api/form"; |
||||
|
export default { |
||||
|
name: "otcStoreRechargeOrder", |
||||
|
components: { |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
orderStatusType: [ |
||||
|
{ |
||||
|
label: '成功', |
||||
|
value: 2, |
||||
|
}, |
||||
|
{ |
||||
|
label: '失败', |
||||
|
value: 3, |
||||
|
}, |
||||
|
], |
||||
|
// 所有商户 |
||||
|
merchantCon: [], |
||||
|
dateRange: [], |
||||
|
sourceTypeOptions: [], |
||||
|
sysOrderStatus: [], |
||||
|
notifyStatusOptions: [], |
||||
|
// 遮罩层 |
||||
|
loading: true, |
||||
|
// 选中数组 |
||||
|
ids: [], |
||||
|
// 非单个禁用 |
||||
|
single: true, |
||||
|
// 非多个禁用 |
||||
|
multiple: true, |
||||
|
// 显示搜索条件 |
||||
|
showSearch: true, |
||||
|
// 总条数 |
||||
|
total: 0, |
||||
|
// OTC币种表格数据 |
||||
|
otcCoinList: [], |
||||
|
// 弹出层标题 |
||||
|
title: "", |
||||
|
// 是否显示弹出层 |
||||
|
open: false, |
||||
|
openTest: false, |
||||
|
// 查询参数 |
||||
|
queryParams: { |
||||
|
pageNum: 1, |
||||
|
pageSize: 10, |
||||
|
orderNo: null, |
||||
|
outTradeNo: null, |
||||
|
payAddress: null, |
||||
|
merchantName: null, |
||||
|
tranAmt: null, |
||||
|
orderStatus: null, |
||||
|
notifyStatus: null, |
||||
|
sourceType: null, |
||||
|
}, |
||||
|
// 表单参数 |
||||
|
form: {}, |
||||
|
// 表单校验 |
||||
|
rules: { |
||||
|
merchantId: [ |
||||
|
{ required: true, message: "请选择商户", trigger: "blur" }, |
||||
|
], |
||||
|
amount: [ |
||||
|
{ required: true, message: "请输入金额", trigger: "blur" }, |
||||
|
], |
||||
|
}, |
||||
|
}; |
||||
|
}, |
||||
|
created() { |
||||
|
this.getList(); |
||||
|
|
||||
|
this.getDicts("notify_status").then(response => { |
||||
|
this.notifyStatusOptions = response.data; |
||||
|
}); |
||||
|
this.getDicts("sys_source_type").then(response => { |
||||
|
this.sourceTypeOptions = response.data; |
||||
|
}); |
||||
|
this.getDicts("sys_order_status").then(response => { |
||||
|
this.sysOrderStatus = response.data; |
||||
|
}); |
||||
|
this.init(); |
||||
|
}, |
||||
|
methods: { |
||||
|
init() { |
||||
|
common_api.allmerchant().then((response) => { |
||||
|
this.merchantCon = response.data |
||||
|
}) |
||||
|
}, |
||||
|
/** 测试下单 */ |
||||
|
handleTest() { |
||||
|
this.reset() |
||||
|
this.openTest = true |
||||
|
}, |
||||
|
/** 手工处理 */ |
||||
|
handleOrder(row) { |
||||
|
this.reset() |
||||
|
this.form = row |
||||
|
this.open = true |
||||
|
}, |
||||
|
/** 查询OTC币种列表 */ |
||||
|
getList(v) { |
||||
|
this.loading = true; |
||||
|
let queryParams = { |
||||
|
pageNum: this.queryParams.pageNum, |
||||
|
pageSize: this.queryParams.pageSize, |
||||
|
orderNo: this.queryParams.orderNo, |
||||
|
outTradeNo: this.queryParams.outTradeNo, |
||||
|
payAddress: this.queryParams.payAddress, |
||||
|
merchantName: this.queryParams.merchantName, |
||||
|
tranAmt: v, |
||||
|
orderStatus: this.queryParams.orderStatus, |
||||
|
sourceType: this.queryParams.sourceType, |
||||
|
} |
||||
|
payRecordRecharge.listInfo(this.addSESDateRange(queryParams, this.dateRange)).then(response => { |
||||
|
this.otcCoinList = response.rows; |
||||
|
this.total = Number(response.total); |
||||
|
this.loading = false; |
||||
|
}); |
||||
|
}, |
||||
|
notifyStatusFormat(row, column) { |
||||
|
return this.selectDictLabel(this.notifyStatusOptions, row.notifyStatus); |
||||
|
}, |
||||
|
sourceTypeFormat(row, column) { |
||||
|
return this.selectDictLabel(this.sourceTypeOptions, row.sourceType); |
||||
|
}, |
||||
|
sysOrderStatusFormat(row, column) { |
||||
|
return this.selectDictLabel(this.sysOrderStatus, row.orderStatus); |
||||
|
}, |
||||
|
// 取消按钮 |
||||
|
cancel() { |
||||
|
this.open = false; |
||||
|
this.openTest = false; |
||||
|
this.reset(); |
||||
|
}, |
||||
|
// 表单重置 |
||||
|
reset() { |
||||
|
this.form = { |
||||
|
}; |
||||
|
this.resetForm("form"); |
||||
|
}, |
||||
|
/** 搜索按钮操作 */ |
||||
|
handleQuery() { |
||||
|
this.queryParams.pageNum = 1; |
||||
|
let tranAmt; |
||||
|
this.queryParams.tranAmt ? tranAmt = this.NumberMul(this.queryParams.tranAmt, 100) : tranAmt = null |
||||
|
this.getList(tranAmt); |
||||
|
}, |
||||
|
/** 重置按钮操作 */ |
||||
|
resetQuery() { |
||||
|
this.dateRange = [] |
||||
|
this.resetForm("queryForm"); |
||||
|
this.handleQuery(); |
||||
|
}, |
||||
|
/** 提交按钮 */ |
||||
|
submitForm(t, f) { |
||||
|
this.$refs[f].validate(valid => { |
||||
|
if (valid) { |
||||
|
if (t == 'test') { |
||||
|
let amount = this.NumberMul(this.form.amount, 100) |
||||
|
payRecordRecharge.recharge({ |
||||
|
amount: amount, |
||||
|
merchantId: this.form.merchantId |
||||
|
}).then((response) => { |
||||
|
this.openTest = false; |
||||
|
this.msgSuccess("操作成功"); |
||||
|
this.getList(); |
||||
|
}).catch(() => { |
||||
|
}) |
||||
|
} else { |
||||
|
if (!this.form.status) { |
||||
|
return; |
||||
|
} |
||||
|
let form = { |
||||
|
id: this.form.keyId, |
||||
|
status: this.form.status, |
||||
|
googleCode: this.form.googleCode |
||||
|
} |
||||
|
payRecordRecharge.payHandle(form).then((response) => { |
||||
|
this.open = false; |
||||
|
this.msgSuccess("处理成功"); |
||||
|
this.getList(); |
||||
|
}).catch(() => { |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
/** 导出按钮操作 */ |
||||
|
handleExport() { |
||||
|
const queryParams = this.queryParams; |
||||
|
this.$confirm('是否确认导出所有数据项?', "警告", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning" |
||||
|
}).then(function () { |
||||
|
return payRecordRecharge.exportList(queryParams); |
||||
|
}).then(response => { |
||||
|
this.download(response.msg); |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}; |
||||
|
</script> |
||||
|
|
Loading…
Reference in new issue