efps-version
elf 1 year ago
parent 6eed282502
commit 004344af3a

@ -37,11 +37,11 @@ class RechargeController extends AbstractController
'cardNo' => $user->card_no ?? '',
'mobile' => $user->mobile ?? '',
'bankCardNo' => $bankCard->bank_card_no ?? '',
'amount' => intval($prePayLog->amount / 100),
];
}
return $this->success([
'user' => $userInfo
'user' => $userInfo,
'amount' => intval($prePayLog->amount / 100),
]);
}

@ -27,7 +27,7 @@
<el-input v-model="form.bankCardNo"></el-input>
</el-form-item>
<el-form-item label="充值金额">
<el-input-number v-model="form.amount" :min="1" :max="3000" label="充值金额" :readonly="amountReadonly"></el-input-number>
<el-input-number v-model="form.amount" :min="1" :max="3000" label="充值金额" :disabled="amountDisabled"></el-input-number>
</el-form-item>
<el-form-item label="备注">
<el-input type="textarea" v-model="form.remark"></el-input>
@ -99,7 +99,7 @@
amount: 1,
remark: ''
},
amountReadonly: false
amountDisabled: false
}
},
created() {
@ -200,15 +200,19 @@
if (result.code != 1000) {
return this.$message.error(response.data.message);
}
if (result.user != null) {
this.form.name = result.user.name;
this.form.cardNo = result.user.cardNo;
this.form.mobile = result.user.mobile;
this.form.bankCardNo = result.user.bankCardNo;
if (result.user.amount > 0) {
this.form.amount = result.user.amount;
this.amountReadonly = true;
}
let data = result.data;
if (data.user != null) {
this.form.name = data.user.name;
this.form.cardNo = data.user.cardNo;
this.form.mobile = data.user.mobile;
this.form.bankCardNo = data.user.bankCardNo;
}
console.log(data)
if (data.amount > 0) {
this.form.amount = data.amount;
this.amountDisabled = true;
}
})
.catch((error) => {

Loading…
Cancel
Save