wupengfei
5 天以前 35526a3f28689fa3277fd4337a005ce78e7a7a33
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<template>
  <ProDialog title="详情" v-model="visible" @close="onDialogClose" destroy-on-close draggable>
    <!-- <PortraitTableWithAttachment v-bind="portraitTableWithAttachmentProps" /> -->
    <ProForm :model="form" ref="dialogForm" label-width="90px" style="margin-top: 20px" is-read>
      <ProFormCol>
        <ProFormColItem :span="12">
          <ProFormItemV2 label="提现状态:" prop="status">
            <ProFormRadio v-model="form.status" :value-enum="[]" />
          </ProFormItemV2>
        </ProFormColItem>
      </ProFormCol>
      <ProFormCol>
        <ProFormColItem :span="12">
          <ProFormItemV2 label="提现日期:" prop="time">
            <ProFormDatePicker v-model="form.time" type="date" format="YYYY-MM-DD HH:mm" />
          </ProFormItemV2>
        </ProFormColItem>
      </ProFormCol>
    </ProForm>
    <template #footer>
      <span class="dialog-footer">
        <el-button @click="emit('onCancel')">取 消</el-button>
        <el-button type="primary" @click="emit('onCancel')">确 定</el-button>
      </span>
    </template>
  </ProDialog>
</template>
 
<script setup lang="ts">
import { FormInstance } from 'element-plus';
import {
  ProDialog,
  ProForm,
  ProFormItemV2,
  ProFormCol,
  ProFormColItem,
  ProFormRadio,
  ProFormDatePicker,
} from '@bole-core/components';
import { usePortraitTableWithAttachment } from '@/hooks';
import { convertApi2FormUrl } from '@/utils';
import { useQuery } from '@tanstack/vue-query';
 
defineOptions({
  name: 'WithdrawalDetailDialog',
});
 
const visible = defineModel({ type: Boolean });
 
type Form = {
  title?: string;
  id: string;
  status: string;
  time: string;
};
 
const form = defineModel<Form>('form');
 
const emit = defineEmits<{
  (e: 'onConfirm'): void;
  (e: 'onCancel'): void;
}>();
 
watch(
  () => visible.value,
  (val) => {
    if (val) {
      // refetch();
    }
  }
);
 
// const {
//   data: detail,
//   refetch,
//   isLoading,
// } = useQuery({
//   queryKey: ['parkBountyApplyServices/getEnterpriseDrawWithDetail', form.value?.id],
//   queryFn: async () => {
//     return await parkBountyApplyServices.getEnterpriseDrawWithDetail(
//       {
//         drawWithId: form.value?.id,
//       },
//       {
//         showLoading: true,
//       }
//     );
//   },
//   placeholderData: () => ({}),
//   enabled: !!form.value?.id,
//   onSuccess(data) {},
// });
 
// const { portraitTableWithAttachmentProps } = usePortraitTableWithAttachment({
//   data: detail,
//   annexList: computed(() =>
//     detail.value?.invoiceUrl
//       ? detail.value?.invoiceUrl.split('|').map((item) => convertApi2FormUrl(item))
//       : []
//   ),
//   columns: [
//     {
//       label: '姓名',
//       key: 'enterpriseName',
//     },
//     {
//       label: '身份证号',
//       key: 'societyCreditCode',
//     },
//     {
//       label: '账户名称',
//       key: 'accountName',
//     },
//     {
//       label: '银行帐号',
//       key: 'bankNumber',
//     },
//     {
//       label: '开户银行',
//       key: 'bankName',
//     },
//     {
//       label: '开户支行',
//       key: 'bankResumeName',
//     },
//     {
//       label: '提现金额',
//       key: 'amount',
//       type: 'money',
//     },
//     {
//       label: '申请日期',
//       key: 'creationTime',
//       type: 'date',
//     },
//   ],
// });
 
const dialogForm = ref<FormInstance>();
 
function onDialogClose() {
  if (!dialogForm.value) return;
  dialogForm.value.resetFields();
}
</script>