|
@@ -39,7 +39,17 @@ const show = ref(true)
|
|
|
const refresh = ref(false)
|
|
const refresh = ref(false)
|
|
|
|
|
|
|
|
const formRules: FormRules = {
|
|
const formRules: FormRules = {
|
|
|
- Amount: [{ required: true, message: '请输入金额', trigger: 'blur' }],
|
|
|
|
|
|
|
+ Amount: [{
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ message: '请输入金额',
|
|
|
|
|
+ validator: (rule, value, callback) => {
|
|
|
|
|
+ if (value<=(accountStore.accountInfo.currentbalance ?? 0.0)) {
|
|
|
|
|
+ callback()
|
|
|
|
|
+ } else {
|
|
|
|
|
+ callback(new Error('超出可出金额'))
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }],
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const onCancel = (isRefresh = false) => {
|
|
const onCancel = (isRefresh = false) => {
|
|
@@ -50,13 +60,17 @@ const onCancel = (isRefresh = false) => {
|
|
|
const formSubmit = () => {
|
|
const formSubmit = () => {
|
|
|
formRef.value?.validate((valid) => {
|
|
formRef.value?.validate((valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
- onSubmit().then(() => {
|
|
|
|
|
- ElMessage.success('提交成功')
|
|
|
|
|
- }).catch((err) => {
|
|
|
|
|
- ElMessage.warning(err)
|
|
|
|
|
- }).finally(() => {
|
|
|
|
|
- onCancel(true)
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ if (formData.CusBankID) {
|
|
|
|
|
+ onSubmit().then(() => {
|
|
|
|
|
+ ElMessage.success('提交成功')
|
|
|
|
|
+ }).catch((err) => {
|
|
|
|
|
+ ElMessage.warning(err)
|
|
|
|
|
+ }).finally(() => {
|
|
|
|
|
+ onCancel(true)
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ ElMessage.error('未签约')
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|