|
@@ -32,6 +32,22 @@
|
|
|
<script lang="ts" name="virtual-bank" setup>
|
|
|
import { useCrud, useTable, useUpsert } from '@cool-vue/crud';
|
|
|
import { useCool } from '/@/cool';
|
|
|
+import { storage } from '/@/cool';
|
|
|
+const emit = defineEmits(['close', 'submit']);
|
|
|
+const props = defineProps({
|
|
|
+ open: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false
|
|
|
+ },
|
|
|
+ mchId: {
|
|
|
+ type: String,
|
|
|
+ default: ''
|
|
|
+ },
|
|
|
+ business: {
|
|
|
+ type: Object,
|
|
|
+ default: null
|
|
|
+ }
|
|
|
+});
|
|
|
|
|
|
const { service } = useCool();
|
|
|
|
|
@@ -107,7 +123,14 @@ const Upsert = useUpsert({
|
|
|
component: { name: 'cl-switch' },
|
|
|
required: true
|
|
|
}
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ async onSubmit(data, { done, close, next }) {
|
|
|
+ emit('submit');
|
|
|
+ next({
|
|
|
+ ...data,
|
|
|
+ merchantId: storage.get('userInfo').merchant.id
|
|
|
+ });
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
// cl-table
|