|
@@ -19,23 +19,13 @@
|
|
</el-form>
|
|
</el-form>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="14">
|
|
<el-col :span="14">
|
|
- <el-form label-width="152px" :model="balanceForm" :rules="balanceRules">
|
|
|
|
|
|
+ <el-form label-width="152px" :model="balanceForm">
|
|
<el-form-item label="当前余额:">
|
|
<el-form-item label="当前余额:">
|
|
{{available_predeposit}}
|
|
{{available_predeposit}}
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item
|
|
<el-form-item
|
|
label="余额预警:"
|
|
label="余额预警:"
|
|
prop="alarm_amount">
|
|
prop="alarm_amount">
|
|
- <!-- <el-input
|
|
|
|
- size="small"
|
|
|
|
- v-model="balanceForm.alarm_amount"
|
|
|
|
- autocomplete="off"
|
|
|
|
- style="width: 140px;margin-right:10px"
|
|
|
|
- onkeyup="value=value.replace(/[^\d.]/g,'')"
|
|
|
|
- @blur="balanceForm.alarm_amount = $event.target.value"
|
|
|
|
- ></el-input>
|
|
|
|
- <el-button type="primary" size="small" @click="onBalance">设置</el-button>
|
|
|
|
- <span style="color:rgb(255 1 1 / 0.7);margin-left:10px;font-size:12px;">建议设置50000及以上余额预警</span> -->
|
|
|
|
<template v-if="balanceForm.alarm_amount">
|
|
<template v-if="balanceForm.alarm_amount">
|
|
{{balanceForm.alarm_amount}}
|
|
{{balanceForm.alarm_amount}}
|
|
</template>
|
|
</template>
|
|
@@ -45,7 +35,6 @@
|
|
<template v-if="this.cWarningList">
|
|
<template v-if="this.cWarningList">
|
|
<span style="display: block;height: 30px;">{{this.cWarningList}}</span>
|
|
<span style="display: block;height: 30px;">{{this.cWarningList}}</span>
|
|
</template>
|
|
</template>
|
|
- <!-- 请设置余额预警电话,当账户所剩余额达到预警额度时,将会给预留电话发送短信提醒,以免给您的业务带来不便。每隔五分钟提醒一次,最多提示五次。 -->
|
|
|
|
<span v-else style="color:rgb(255 1 1 / 0.7);font-size:12px;line-height:20px;display: inline-block;margin-top: 9px;">当前还未设置预警电话,请去设置页面设置预警电话。</span>
|
|
<span v-else style="color:rgb(255 1 1 / 0.7);font-size:12px;line-height:20px;display: inline-block;margin-top: 9px;">当前还未设置预警电话,请去设置页面设置预警电话。</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="今日已申请成功次数:">
|
|
<el-form-item label="今日已申请成功次数:">
|
|
@@ -229,34 +218,6 @@ import { balanceType } from '@/utils/constants'
|
|
export default {
|
|
export default {
|
|
name: 'balance',
|
|
name: 'balance',
|
|
data() {
|
|
data() {
|
|
- var checkAmount = (rule, value, callback) => {
|
|
|
|
- console.log('rule', rule, value);
|
|
|
|
- console.log('value', value);
|
|
|
|
- if (value === '') {
|
|
|
|
- return callback(new Error('余额预警不能为空'));
|
|
|
|
- } else if (value.indexOf(".") != -1 && value.split('.').length > 2) {
|
|
|
|
- callback(new Error('请输入正确格式,只能有一位小数点'));
|
|
|
|
- } else if (value.indexOf(".") != -1 && value.split('.')[1].length > 2) {
|
|
|
|
- callback(new Error('小数点后面只能有两位'));
|
|
|
|
- } else {
|
|
|
|
- var Money = parseFloat(value).toFixed(3);
|
|
|
|
- var MoneyResult = Money.substring(0, Money.length - 1);
|
|
|
|
- var xsd = MoneyResult.toString().split(".");
|
|
|
|
- // console.log('Money', Money, MoneyResult, xsd, xsd[1].length);
|
|
|
|
- if (xsd.length == 1) {
|
|
|
|
- this.balanceForm.alarm_amount = creditResult.toString() + ".00";
|
|
|
|
- }
|
|
|
|
- if (xsd.length > 1) {
|
|
|
|
- if (xsd[1].length == 1) {
|
|
|
|
- this.balanceForm.alarm_amount = MoneyResult;
|
|
|
|
- }
|
|
|
|
- if (xsd[1].length > 1) {
|
|
|
|
- this.balanceForm.alarm_amount = xsd[0].toString() + "." + xsd[1].toString().substring(0, 2);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- callback()
|
|
|
|
- }
|
|
|
|
- };
|
|
|
|
return {
|
|
return {
|
|
tableData: [
|
|
tableData: [
|
|
// {id: 1, money: '100', recharge_code: ''},
|
|
// {id: 1, money: '100', recharge_code: ''},
|
|
@@ -323,11 +284,6 @@ export default {
|
|
},
|
|
},
|
|
// 当前余额
|
|
// 当前余额
|
|
available_predeposit: '',
|
|
available_predeposit: '',
|
|
- balanceRules: {
|
|
|
|
- alarm_amount: [
|
|
|
|
- {validator: checkAmount, trigger: 'blur'}
|
|
|
|
- ]
|
|
|
|
- },
|
|
|
|
// 近日已申请次数
|
|
// 近日已申请次数
|
|
evidence_count: '',
|
|
evidence_count: '',
|
|
// 预警电话列表
|
|
// 预警电话列表
|
|
@@ -623,26 +579,6 @@ export default {
|
|
console.log(error);
|
|
console.log(error);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- // 设置余额预警
|
|
|
|
- async onBalance() {
|
|
|
|
- try {
|
|
|
|
- // if (!this.warningList.length) {
|
|
|
|
- // this.warningDialogVisible = true
|
|
|
|
- // return
|
|
|
|
- // }
|
|
|
|
- let param = new URLSearchParams()
|
|
|
|
- param.append('alarm_amount', this.balanceForm.alarm_amount)
|
|
|
|
- const res = await onSubUser(param)
|
|
|
|
- // console.log('设置余额预警', res);
|
|
|
|
- if (res && res.code == 200) {
|
|
|
|
- this.getUserInfo()
|
|
|
|
- this.$message.success('设置余额预警成功')
|
|
|
|
- }
|
|
|
|
- } catch (error) {
|
|
|
|
- console.log(error);
|
|
|
|
- this.$message.error('设置余额预警失败')
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
// 开户人姓名
|
|
// 开户人姓名
|
|
querySearch(queryString, cb) {
|
|
querySearch(queryString, cb) {
|
|
// 调用 callback 返回建议列表的数据
|
|
// 调用 callback 返回建议列表的数据
|