|
@@ -6,9 +6,9 @@
|
|
|
<el-col :span="2"><el-button type="primary" size="mini" @click="toBack()">返回</el-button></el-col>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
- <data-form :fields="infoFields" :rules="rules" v-model="form" labelWidth="150px" @save="toSave" @dataChange="dataChange">
|
|
|
+ <data-form :fields="infoFields" :rules="rules" v-model="form" labelWidth="150px" @save="toSave">
|
|
|
<template #money>
|
|
|
- <el-input v-model="form.money" type="number" placeholder="请输入提现金额"></el-input>
|
|
|
+ <el-input v-model="form.money" type="number" placeholder="请输入提现金额" @change="onChange"></el-input>
|
|
|
<p style="color: red">可提现金额为:{{ canGet || 0 }}</p>
|
|
|
</template>
|
|
|
</data-form>
|
|
@@ -63,13 +63,10 @@ export default {
|
|
|
}
|
|
|
this.loadings = false;
|
|
|
},
|
|
|
-
|
|
|
- dataChange({ model, value }) {
|
|
|
- if (model == 'money') {
|
|
|
- if (value > this.canGet) {
|
|
|
- this.$message({ type: `warning`, message: `可提现金额为${this.canGet}` });
|
|
|
- this.$set(this.form, 'money', 0);
|
|
|
- }
|
|
|
+ onChange(value) {
|
|
|
+ if (value > this.canGet) {
|
|
|
+ this.$message({ type: `warning`, message: `可提现金额为${this.canGet}` });
|
|
|
+ this.$set(this.form, 'money', 0);
|
|
|
}
|
|
|
},
|
|
|
// 保存
|