|
|
@@ -29,7 +29,7 @@
|
|
|
<!--<el-input v-model="form.toRealName"></el-input>-->
|
|
|
<!--</el-form-item>-->
|
|
|
<el-form-item label="Transfer amount" style="margin-bottom: 0;"> <!-- 转账金额 -->
|
|
|
- <el-input v-model="form.amount" type="number" :max="maxAmount" @change="chkReal"></el-input>
|
|
|
+ <el-input v-model="form.amount" type="number" :min="minAmount" :max="maxAmount" @change="chkReal"></el-input>
|
|
|
<span style="font-size: 8pt;color: #909399;">Each transfer shall not be less than 5000 NGN</span> <!-- 每次转账不得少于100 -->
|
|
|
</el-form-item>
|
|
|
<el-form-item label="手续费" v-show="fee!=='0'"> <!-- 手续费 -->
|
|
|
@@ -77,6 +77,7 @@ export default {
|
|
|
},
|
|
|
balance: 0,
|
|
|
cash: 0,
|
|
|
+ minAmount: 0,
|
|
|
maxAmount: 0,
|
|
|
fee: '0',
|
|
|
realAmount: 0,
|
|
|
@@ -90,15 +91,15 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- handleChange() {
|
|
|
- this.loading = true
|
|
|
- network.getData('user/full-info', {userName: this.form.toUserName}).then(response => {
|
|
|
- this.form.toRealName = response.REAL_NAME
|
|
|
- this.loading = false
|
|
|
- }).catch(response => {
|
|
|
- this.loading = false
|
|
|
- })
|
|
|
- },
|
|
|
+ handleChange() {
|
|
|
+ this.loading = true
|
|
|
+ network.getData('user/full-info', {userName: this.form.toUserName}).then(response => {
|
|
|
+ this.form.toRealName = response.REAL_NAME
|
|
|
+ this.loading = false
|
|
|
+ }).catch(response => {
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
+ },
|
|
|
chkReal(){
|
|
|
this.realAmount = tool.formatPrice(this.form.amount * (100-this.fee) * 0.01)
|
|
|
},
|
|
|
@@ -114,6 +115,7 @@ export default {
|
|
|
this.loading = false
|
|
|
this.userInfo = response.userInfo
|
|
|
this.transferConfig = response.transferConfig
|
|
|
+ this.minAmount = response.minAmount
|
|
|
this.handleTypeChange()
|
|
|
this.getBalance()
|
|
|
}).catch(() => {
|
|
|
@@ -138,48 +140,46 @@ export default {
|
|
|
this.transferProp = this.userInfo.TRANSFER_PROP
|
|
|
},
|
|
|
onSubmit () {
|
|
|
- this.submitButtonStat = true
|
|
|
- let path = 'finance/transfer-add'
|
|
|
+ this.submitButtonStat = true
|
|
|
+ let path = 'finance/transfer-add'
|
|
|
|
|
|
- network.getData('finance/mult-point').then(response => {
|
|
|
- this.form.transferCode = response.transferCode
|
|
|
+ network.getData('finance/mult-point').then(response => {
|
|
|
+ this.form.transferCode = response.transferCode
|
|
|
|
|
|
- this.$prompt('请输入支付密码', '提示', {
|
|
|
- confirmButtonText: 'Confirm',
|
|
|
- cancelButtonText: 'Cancel',
|
|
|
- inputType: 'password',
|
|
|
- inputPattern: /\S+/,
|
|
|
- inputErrorMessage: '请输入支付密码',
|
|
|
- beforeClose:async (action, instance, done)=>{
|
|
|
- if (action === 'confirm') {
|
|
|
- instance.confirmButtonLoading = true;
|
|
|
- instance.confirmButtonText = '执行中...';
|
|
|
- console.log(instance.inputValue);
|
|
|
- this.form.payPassword = instance.inputValue;
|
|
|
- await network.postData(path, this.form).then(response => {
|
|
|
+ this.$prompt('Please enter your payment password', 'Notice', {
|
|
|
+ confirmButtonText: 'Confirm',
|
|
|
+ cancelButtonText: 'Cancel',
|
|
|
+ inputType: 'password',
|
|
|
+ inputPattern: /\S+/,
|
|
|
+ inputErrorMessage: '请输入支付密码',
|
|
|
+ beforeClose:async (action, instance, done)=>{
|
|
|
+ if (action === 'confirm') {
|
|
|
+ instance.confirmButtonLoading = true;
|
|
|
+ instance.confirmButtonText = '执行中...';
|
|
|
+ console.log(instance.inputValue);
|
|
|
+ this.form.payPassword = instance.inputValue;
|
|
|
+ await network.postData(path, this.form).then(response => {
|
|
|
|
|
|
- instance.confirmButtonLoading = false;
|
|
|
- done();
|
|
|
- this.$message({
|
|
|
- message: response,
|
|
|
- type: 'success'
|
|
|
- })
|
|
|
- this.submitButtonStat = false
|
|
|
- this.$router.go(-1)
|
|
|
- }).catch(error=>{
|
|
|
- instance.confirmButtonLoading = false;
|
|
|
- this.submitButtonStat = false
|
|
|
- done();
|
|
|
- })
|
|
|
- }else {
|
|
|
- this.submitButtonStat = false
|
|
|
- done();
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
+ instance.confirmButtonLoading = false;
|
|
|
+ done();
|
|
|
+ this.$message({
|
|
|
+ message: response,
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ this.submitButtonStat = false
|
|
|
+ this.$router.go(-1)
|
|
|
+ }).catch(error=>{
|
|
|
+ instance.confirmButtonLoading = false;
|
|
|
+ this.submitButtonStat = false
|
|
|
+ done();
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ this.submitButtonStat = false
|
|
|
+ done();
|
|
|
+ }
|
|
|
+ }
|
|
|
})
|
|
|
-
|
|
|
-
|
|
|
+ })
|
|
|
},
|
|
|
}
|
|
|
}
|