|
@@ -0,0 +1,91 @@
|
|
|
|
|
+<!-- 账户管理-签约账号管理-签约 -->
|
|
|
|
|
+<template>
|
|
|
|
|
+ <app-drawer :title="bankInfo ? '修改签约账户' : '添加签约账户'" :width="460" v-model:show="show" :loading="loading"
|
|
|
|
|
+ :refresh="refresh">
|
|
|
|
|
+ <el-form ref="formRef" class="el-form--vertical" label-width="100px" :model="bankInfo" :rules="formRules">
|
|
|
|
|
+ <el-form-item label="开户银行" prop="OpenBankAccId">
|
|
|
|
|
+ <el-select v-model="formData.OpenBankAccId">
|
|
|
|
|
+ <el-option :label="item.bankname" :value="item.bankid" v-for="(item, index) in banklist"
|
|
|
|
|
+ :key="index" />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="银行卡号" prop="BankAccountNo">
|
|
|
|
|
+ <el-input name="BankAccountNo" placeholder="银行卡账户名" v-model="formData.BankAccountNo" :rules="formRules.BankAccountNo"/>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="姓名" prop="AccountName">
|
|
|
|
|
+ <el-input name="AccountName" placeholder="银行卡账户名" v-model="formData.AccountName" :rules="formRules.AccountName"/>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="支行名称" prop="BranchBankName">
|
|
|
|
|
+ <el-input name="BranchBankName" placeholder="请输入银行卡支行名称" v-model="formData.OpenBankName" :rules="formRules.OpenBankName"/>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ <template #footer>
|
|
|
|
|
+ <el-button type="info" @click="onCancel(false)" plain>取消</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="formSubmit">{{ bankInfo ? '修改' : '提交' }}</el-button>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </app-drawer>
|
|
|
|
|
+</template>
|
|
|
|
|
+
|
|
|
|
|
+<script lang="ts" setup>
|
|
|
|
|
+import { ref, PropType } from 'vue'
|
|
|
|
|
+import { ElMessage } from 'element-plus'
|
|
|
|
|
+import type { FormInstance, FormRules } from 'element-plus'
|
|
|
|
|
+import { useDoBankSign } from '@/business/bank'
|
|
|
|
|
+import AppDrawer from '@pc/components/base/drawer/index.vue'
|
|
|
|
|
+import { validateRules } from '@/constants/regex'
|
|
|
|
|
+
|
|
|
|
|
+defineProps({
|
|
|
|
|
+ selectedRow: {
|
|
|
|
|
+ type: Object as PropType<Model.BankAccountSignRsp>,
|
|
|
|
|
+ required: true
|
|
|
|
|
+ }
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
+const formRules: FormRules = {
|
|
|
|
|
+ OpenBankAccId: [{
|
|
|
|
|
+ message: '请选择银行信息',
|
|
|
|
|
+ validator: () => {
|
|
|
|
|
+ return !!formData.OpenBankAccId
|
|
|
|
|
+ }
|
|
|
|
|
+ }],
|
|
|
|
|
+ BankAccountNo: [{
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ message: '请输入银行卡账号',
|
|
|
|
|
+ validator: (val) => {
|
|
|
|
|
+ if (validateRules.bankcardno.validate(val)) {
|
|
|
|
|
+ return true
|
|
|
|
|
+ }
|
|
|
|
|
+ return validateRules.bankcardno.message
|
|
|
|
|
+ }
|
|
|
|
|
+ }],
|
|
|
|
|
+ BankAccountName: [{
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ message: '请输入银行卡账户名',
|
|
|
|
|
+ }],
|
|
|
|
|
+ OpenBankName: [{
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ message: '请输入银行卡支行名称'
|
|
|
|
|
+ }],
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+const { formData, onSubmit, banklist, bankInfo } = useDoBankSign()
|
|
|
|
|
+
|
|
|
|
|
+const show = ref(true)
|
|
|
|
|
+const refresh = ref(false)
|
|
|
|
|
+const formRef = ref<FormInstance>()
|
|
|
|
|
+
|
|
|
|
|
+const onCancel = (isRefresh = false) => {
|
|
|
|
|
+ show.value = false
|
|
|
|
|
+ refresh.value = isRefresh
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+const formSubmit = () => {
|
|
|
|
|
+ onSubmit().then(() => {
|
|
|
|
|
+ ElMessage.success(bankInfo ? '签约信息修改成功' : '签约提交成功,请耐心等待审核。')
|
|
|
|
|
+ onCancel(true)
|
|
|
|
|
+ }).catch((err) => {
|
|
|
|
|
+ ElMessage.error('提交失败:' + err)
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+</script>
|