Browse Source

更新

master
j1ack 2 years ago
parent
commit
8e755a2e8e
  1. BIN
      bitcopay后台-开发环境.zip
  2. 8
      src/api/form.js
  3. 197
      src/views/otc/otcStore/index.vue

BIN
bitcopay后台-开发环境.zip

Binary file not shown.

8
src/api/form.js

@ -92,6 +92,14 @@ export const payMerchant = {
method: 'get',
})
},
// 申请提现
addTransferOrder(params) {
return request({
url: "/merchant/merchant/addTransferOrder",
method: "post",
params: params,
})
},
// 获取商户MD5
getmd5Key: (id) => {
return request({

197
src/views/otc/otcStore/index.vue

@ -34,22 +34,16 @@
<el-table stripe :data="infoList" v-loading="loading">
<el-table-column label="商户名称" align="center" prop="username" />
<el-table-column label="商户编号" align="center" prop="merchantNo" />
<el-table-column :label="'余额'" align="center" prop="balance">
<template slot-scope="scope">
{{ scope.row.balance }}
</template>
</el-table-column>
<el-table-column :label="'冻结金额'" align="center" prop="frozenAmount">
<template slot-scope="scope">
{{ scope.row.frozenAmount }}
</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"
@ -57,8 +51,6 @@
</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"
@ -85,7 +77,8 @@
style="color: #006eff">商户删除</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="handleWithdraw(scope.row)"
style="color: #006eff">提现</el-button>
<el-button size="small" type="text" @click="handlePassword(scope.row, 'loginPassword')"
style="color: #006eff">登录密码</el-button>
<el-button size="small" type="text" @click="handlePassword(scope.row, 'payPassword')"
@ -102,6 +95,7 @@
<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>
@ -250,34 +244,49 @@
</el-dialog>
<!-- 提现 -->
<!-- <el-dialog :title="title" :visible.sync="openWithdraw" width="500px" append-to-body>
<el-dialog :title="title" :visible.sync="openWithdraw" width="800px" 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-form-item label="类型" prop="type">
<el-select v-model="form.type" placeholder="请选择类型" clearable @change="getValue">
<el-option v-for="dict in withdrawRule" :key="dict.value" :label="dict.label" :value="dict.value" />
</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 label="卡号" prop="cardNumber">
<el-input v-model="form.cardNumber" placeholder="请输入卡号" />
</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 label="姓名" prop="accountName">
<el-input v-model="form.accountName" placeholder="请输入姓名" />
</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 label="银行" prop="bankName">
<el-input v-model="form.bankName" placeholder="请输入银行" />
</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 label="支行" prop="branchName">
<el-input v-model="form.branchName" placeholder="请输入支行" />
</el-form-item>
<div v-if="withdrawType == 'coin'">
<el-form-item label="地址" prop="address">
<el-input v-model="form.address" placeholder="请输入地址" />
</el-form-item>
</div>
<el-form-item label="提现金额" prop="reqAmount">
<el-input v-model="form.reqAmount" placeholder="请输入提现金额" type="number" />
<span style="display: block;">可用余额 CNY: {{ balance }}</span>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
<el-form-item label="支付密码" prop="payPwd">
<el-input v-model="form.payPwd" placeholder="请输入支付密码" type="password" />
</el-form-item>
<el-form-item label="谷歌验证码" prop="googleCode">
<el-input v-model="form.googleCode" placeholder="请输入谷歌验证码" type="password" />
</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>
<!-- 风控 -->
<el-dialog :title="title" :visible.sync="openControl" width="800px" append-to-body>
@ -413,9 +422,23 @@ export default {
}
};
return {
//
balance: null,
withdrawType: '',
pkCouponScopeRangeParkingStoreOpen: false,
pkCouponStore: {},
pkCouponStoreId: '',
//
withdrawRule: [
{
label: 'cny',
value: 'cny'
},
{
label: 'coin',
value: 'coin'
}
],
//
type: [
{
@ -470,7 +493,9 @@ export default {
//
detailData: {},
//
form: {},
form: {
},
//
rules: {
whetherReviewApi: [{ required: true, message: "请选择是否api提单审核", trigger: "blur" }],
@ -506,6 +531,52 @@ export default {
password: [
{ required: true, message: "密码不能为空", trigger: "blur" },
],
accountName: [
{ required: true, message: "姓名不能为空", trigger: "blur" }
],
cardNumber: [
{ required: true, message: "卡号不能为空", trigger: "blur" }
],
address: [
{ required: true, message: "地址不能为空", trigger: "blur" }
],
branchName: [
],
type: [
{ required: true, message: "类型不能为空", trigger: "blur" }
],
bankName: [
{ required: true, message: "银行不能为空", trigger: "blur" }
],
reqAmount: [
{ required: true, message: "提现金额不能为空", trigger: "blur" },
{
validator: (rule, value, callback) => {
if (value <= 0) {
callback(new Error("提现金额必须大于 0"));
} else {
callback();
}
}, trigger: "blur"
},
{
validator: (rule, value, callback) => {
if (value > (this.balance / 100)) {
callback(new Error("提现金额不能大于可用余额"));
} else {
callback();
}
}, trigger: "blur"
},
],
remark: [
],
payPwd: [
{ required: true, message: "支付密码不能为空", trigger: "blur" }
],
googleCode: [
{ required: true, message: "谷歌验证码不能为空", trigger: "blur" }
],
},
};
},
@ -559,21 +630,10 @@ export default {
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()
// },
//
getValue(e) {
this.withdrawType = e
},
//
switchStatusChange(row, type) {
this.reset()
@ -644,25 +704,15 @@ export default {
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;
// });
// },
handleWithdraw(row) {
this.reset();
this.id = row.id
this.form.merchantId = row.id
this.form.type='cny'
this.balance = row.balance
this.title = "提现";
this.openWithdraw = true;
},
//
handlePassword(row, type) {
this.reset();
@ -695,7 +745,6 @@ export default {
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;
});
@ -822,25 +871,13 @@ export default {
});
}
//
// 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 == "formWithdraw") {
payMerchant.addTransferOrder(this.form).then((response) => {
this.msgSuccess("操作成功");
this.openWithdraw = false;
this.getList();
});
}
//
if (type == "formPassword") {
if (this.ipType == "loginPassword") {

Loading…
Cancel
Save