<template>
|
<app-dialog-form
|
v-bind="dialogFormProps"
|
v-loading="appStore.getLoading('changeBatchStatusByGeneral')"
|
>
|
<app-form-fields v-bind="formFieldsProps"/>
|
</app-dialog-form>
|
</template>
|
|
<script setup>
|
|
import {modal} from '@/plugins';
|
|
import * as api from './api.js';
|
|
import {useI18n} from 'vue-i18n';
|
|
const {t} = useI18n();
|
|
import {useAppStore, useEntityStore} from '@/store/modules';
|
|
|
const entityStore = useEntityStore();
|
|
const appStore = useAppStore();
|
|
const dialogFormRef = ref();
|
const formFieldsRef = ref();
|
const typeDialogRef = ref();
|
|
const props = defineProps({
|
subReload: {
|
type: Function,
|
default: () => {
|
}
|
},
|
});
|
|
const formFieldsProps = {
|
ref: formFieldsRef,
|
fields: [{
|
type: 'el-textarea',
|
prop: "feed_back",
|
label: '反馈',
|
col: {span: 24},
|
textarea: {
|
placeholder: '请输入',
|
},
|
item: {
|
prop: 'feed_back',
|
label: '反馈'
|
}
|
}]
|
}
|
|
const form = {
|
selection: []
|
}
|
|
const dialogFormProps = {
|
title: '同意审批',
|
ref: dialogFormRef,
|
subSubmit: async () => {
|
const {feed_back} = await formFieldsRef.value.onValidate();
|
await api.changeBatchStatusByGeneral({status: 'region', ids: form.selection.map(e => e.id), feed_back});
|
|
props.subReload();
|
},
|
subReset: async () => {
|
formFieldsRef.value.onReset();
|
}
|
};
|
const onOpen = async (selection) => {
|
form.selection = selection;
|
dialogFormRef.value.onOpen();
|
await nextTick();
|
formFieldsRef.value.onReset();
|
}
|
|
defineExpose({
|
onOpen
|
});
|
|
</script>
|