diff --git a/src/pages/Ticket/Negative/TicketLackDialog.vue b/src/pages/Ticket/Negative/TicketLackDialog.vue index 7445b3a67..1f7553b05 100644 --- a/src/pages/Ticket/Negative/TicketLackDialog.vue +++ b/src/pages/Ticket/Negative/TicketLackDialog.vue @@ -318,8 +318,22 @@ const columns = computed(() => [ }, ]); -defineEmits([...useDialogPluginComponent.emits]); +const emit = defineEmits([...useDialogPluginComponent.emits, 'selection']); +function rowsHasSelected({ keys }) { + emit('selection', keys); +} +const split = async (options) => { + let body = []; + // if (options.simple) { + body = selectedRows.value; + // } + // if (options.all) { + // body = $props.rows; + // } + await axios.post(`Tickets/split`, body); +}; +defineExpose({ split }); // const { dialogRef, onDialogHide } = useDialogPluginComponent(); // async function changeState(value) { @@ -354,6 +368,7 @@ defineEmits([...useDialogPluginComponent.emits]); row-key="ticketFk" selection="multiple" v-model:selected="selectedRows" + @selection="rowsHasSelected" :grid="$q.screen.lt.md" hide-bottom > @@ -364,7 +379,12 @@ defineEmits([...useDialogPluginComponent.emits]); diff --git a/src/pages/Ticket/Negative/TicketLackList.vue b/src/pages/Ticket/Negative/TicketLackList.vue index 98e37a4c5..486209dd3 100644 --- a/src/pages/Ticket/Negative/TicketLackList.vue +++ b/src/pages/Ticket/Negative/TicketLackList.vue @@ -3,7 +3,6 @@ import { computed, ref } from 'vue'; import { useI18n } from 'vue-i18n'; import { useStateStore } from 'stores/useStateStore'; import VnPaginate from 'components/ui/VnPaginate.vue'; -import { useSession } from 'src/composables/useSession'; import TicketLackFilter from 'pages/Ticket/Negative/TicketLackFilter.vue'; import TicketLackDialogProxy from 'src/pages/Ticket/Negative/TicketLackDialogProxy.vue'; import NegativeOriginDialog from 'pages/Ticket/Negative/NegativeOriginDialog.vue'; @@ -13,10 +12,6 @@ import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue'; import axios from 'axios'; import { useDialogPluginComponent } from 'quasar'; -const session = useSession(); - -const token = session.getTokenMultimedia(); - const stateStore = useStateStore(); const { t } = useI18n(); const selectedRows = ref([]); @@ -268,29 +263,12 @@ const updateNegativeOrigin = async () => { - - - - - {{ currentRow.longName }} - - - - - - - - +