diff --git a/bitcopay后台-开发环境.zip b/bitcopay后台-开发环境.zip index 4e85279..50553e2 100644 Binary files a/bitcopay后台-开发环境.zip and b/bitcopay后台-开发环境.zip differ diff --git a/src/api/form.js b/src/api/form.js index 53a394e..e45a0ec 100644 --- a/src/api/form.js +++ b/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({ @@ -228,43 +236,43 @@ export const payRecordRecharge = { /** * 财务流水 */ - 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, - }) - }, - } +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, + }) + }, +} - /** +/** * 商户代付订单管理 */ - export const paymentDaiFuRecord = { - // 查询商户代付订单管理 - listInfo: (query) => { - return request({ - url: '/order/PaymentRecord/list', - method: 'get', - params: query, - }) - }, - // 导出商户代付订单管理 - exportList: (query) => { - return request({ - url: '/order/PaymentRecord/export', - method: 'get', - params: query, - }) - }, - } \ No newline at end of file +export const paymentDaiFuRecord = { + // 查询商户代付订单管理 + listInfo: (query) => { + return request({ + url: '/order/PaymentRecord/list', + method: 'get', + params: query, + }) + }, + // 导出商户代付订单管理 + exportList: (query) => { + return request({ + url: '/order/PaymentRecord/export', + method: 'get', + params: query, + }) + }, +} diff --git a/src/views/otc/otcStore/index.vue b/src/views/otc/otcStore/index.vue index 5c0e2eb..a2455dc 100644 --- a/src/views/otc/otcStore/index.vue +++ b/src/views/otc/otcStore/index.vue @@ -34,22 +34,16 @@ - - - - - - - - - + 提现 登录密码 费率 + 添加下级 @@ -250,34 +244,49 @@ - + @@ -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") {