ApproveReason.vue
1.01 KB
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
<template>
<BasicModal
v-bind="$attrs"
destroyOnClose
@register="register"
title="申请原因"
:helpMessage="['提示1', '提示2']"
@open-change="handleShow"
:bodyStyle="{ height: '200px' }"
@ok="handleOk"
z-index="9999"
>
<a-textarea v-model:value="input" :rows="7" />
</BasicModal>
</template>
<script lang="ts" setup>
import { ref, watch } from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { orderAuth } from '/@/api/project/order';
const emit = defineEmits(['success']);
const input = ref('');
const res = ref();
const [register, { setModalProps, redoModalHeight, closeModal }] = useModalInner(async (data) => {
console.log(data, '5656approvedata');
res.value = data;
});
async function handleOk() {
res.value.data.applyRemark = input.value;
await orderAuth(res.value.data);
emit('success');
setTimeout(() => {
closeModal();
}, 50);
}
function handleShow() {
closeModal();
}
</script>