123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <template>
- <a-modal v-model:visible="visible" title="审核">
- <a-form ref="formRef" :label-col="labelCol" :model="formData" layout="horizontal">
- <a-form-item v-show="false">
- <a-input v-model:value="formData.id"></a-input>
- </a-form-item>
- <a-form-item
- label="审核备注"
- name="auditingRemark"
- >
- <a-textarea v-model:value="formData.settleReason" placeholder="请输入审核备注"
- :auto-size="{ minRows: 3, maxRows: 5 }"/>
- </a-form-item>
- </a-form>
- <template #footer>
- <a-spin :spinning="submitLoading">
- <a-button style="margin-right: 8px" @click="onsubmit(false)" type="primary" danger>审核驳回</a-button>
- <a-button type="primary" @click="onsubmit(true)">审核通过</a-button>
- </a-spin>
- </template>
- </a-modal>
- </template>
- <script setup>
- import {message} from 'ant-design-vue';
- import bizSettleApi from '@/api/biz/bizSettleApi'
- const emit = defineEmits({successful: null})
- const visible = ref(false);
- const submitLoading = ref(false)
- const labelCol = ref({span: 4})
- // 表单数据
- const formData = ref({})
- const showModal = (id) => {
- formData.value.id = id
- visible.value = true;
- };
- const onClose = () => {
- formData.value = {}
- visible.value = false
- };
- const onsubmit = (flag) => {
- if (flag === false) {
- if (!formData.value.settleReason) {
- message.error('审核驳回时,备注信息不能为空')
- return
- }
- }
- submitLoading.value = true
- formData.value.auditFlag = flag
- bizSettleApi.auditFinance(formData.value).then(() => {
- onClose()
- emit('successful', null)
- }).finally(() => {
- submitLoading.value = false
- })
- }
- // 抛出函数
- defineExpose({
- showModal
- })
- </script>
- <style scoped>
- </style>
|