forked from verdnatura/salix-front
updates
This commit is contained in:
parent
30a32ad17d
commit
737ab9e99b
|
@ -67,7 +67,8 @@ const saveChange = async (field, { rowIndex, row }) => {
|
||||||
|
|
||||||
// Buscador_Ticket (vNewTicketFk)
|
// Buscador_Ticket (vNewTicketFk)
|
||||||
// Call Form_Requery
|
// Call Form_Requery
|
||||||
await split({ simple: true });
|
await split({ simple: true }, [row]);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'code':
|
case 'code':
|
||||||
// Call ticketChangeState(ticketFk, stateFk)
|
// Call ticketChangeState(ticketFk, stateFk)
|
||||||
|
@ -326,23 +327,26 @@ const emit = defineEmits([...useDialogPluginComponent.emits, 'selection']);
|
||||||
function rowsHasSelected({ keys }) {
|
function rowsHasSelected({ keys }) {
|
||||||
emit('selection', keys);
|
emit('selection', keys);
|
||||||
}
|
}
|
||||||
const split = async (options) => {
|
// const confirmationModal = ref(false);
|
||||||
|
const split = async ({ simple }, data = []) => {
|
||||||
openConfirmationModal(
|
openConfirmationModal(
|
||||||
t('Confirm splitAll'),
|
t('Confirm splitAll'),
|
||||||
t('Are you sure you want to split all tickets?'),
|
t('Are you sure you want to split all tickets?'),
|
||||||
null,
|
null,
|
||||||
() => console.log('')
|
() => {
|
||||||
|
const body = simple ? data : selectedRows.value;
|
||||||
|
axios.post(`Tickets/split`, body);
|
||||||
|
}
|
||||||
);
|
);
|
||||||
|
// confirmationModal.value = true;
|
||||||
|
|
||||||
let body = [];
|
// let body = [];
|
||||||
// if (options.simple) {
|
// if (options.simple) {
|
||||||
body = selectedRows.value;
|
|
||||||
// }
|
// }
|
||||||
// if (options.all) {
|
// if (options.all) {
|
||||||
// body = $props.rows;
|
// body = $props.rows;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
await axios.post(`Tickets/split`, body);
|
|
||||||
};
|
};
|
||||||
defineExpose({ split });
|
defineExpose({ split });
|
||||||
// const { dialogRef, onDialogHide } = useDialogPluginComponent();
|
// const { dialogRef, onDialogHide } = useDialogPluginComponent();
|
||||||
|
@ -365,6 +369,12 @@ defineExpose({ split });
|
||||||
@on-fetch="(data) => (editableStates = data)"
|
@on-fetch="(data) => (editableStates = data)"
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
|
<!-- <VnConfirm
|
||||||
|
ref="dialogRef"
|
||||||
|
v-model="confirmationModal"
|
||||||
|
:title="t('Confirm splitAll')"
|
||||||
|
:message="t('Are you sure you want to split all tickets?')"
|
||||||
|
></VnConfirm> -->
|
||||||
<VnPaginate
|
<VnPaginate
|
||||||
:data-key="URL_KEY"
|
:data-key="URL_KEY"
|
||||||
:url="`${URL_KEY}/${entityId}/detail`"
|
:url="`${URL_KEY}/${entityId}/detail`"
|
||||||
|
@ -392,7 +402,6 @@ defineExpose({ split });
|
||||||
<template v-if="col.name == 'actions'">
|
<template v-if="col.name == 'actions'">
|
||||||
<QBtn
|
<QBtn
|
||||||
round
|
round
|
||||||
v-close-popup
|
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="saveChange('split', props)"
|
@click="saveChange('split', props)"
|
||||||
>
|
>
|
||||||
|
@ -438,11 +447,6 @@ defineExpose({ split });
|
||||||
</QTable>
|
</QTable>
|
||||||
</template>
|
</template>
|
||||||
</VnPaginate>
|
</VnPaginate>
|
||||||
<VnConfirm
|
|
||||||
model="confirmationModal"
|
|
||||||
:title="t('Confirm splitAll')"
|
|
||||||
:message="t('Are you sure you want to split all tickets?')"
|
|
||||||
></VnConfirm>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss"></style>
|
<style lang="scss"></style>
|
||||||
|
|
|
@ -38,7 +38,6 @@ async function splitAll() {
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<QDialog
|
<QDialog
|
||||||
persistent
|
|
||||||
ref="dialogLackRef"
|
ref="dialogLackRef"
|
||||||
full-width
|
full-width
|
||||||
@before-show="() => (hasRowsSelected = false)"
|
@before-show="() => (hasRowsSelected = false)"
|
||||||
|
@ -58,7 +57,6 @@ async function splitAll() {
|
||||||
<QSpace />
|
<QSpace />
|
||||||
<QBtn
|
<QBtn
|
||||||
round
|
round
|
||||||
v-close-popup
|
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="splitAll()"
|
@click="splitAll()"
|
||||||
:disabled="!hasRowsSelected"
|
:disabled="!hasRowsSelected"
|
||||||
|
@ -71,7 +69,6 @@ async function splitAll() {
|
||||||
<QBtn icon="close" flat round dense v-close-popup />
|
<QBtn icon="close" flat round dense v-close-popup />
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
<QCardSection class="row items-center">
|
<QCardSection class="row items-center">
|
||||||
{{ hasRowsSelected }}
|
|
||||||
<TicketLackDialog
|
<TicketLackDialog
|
||||||
ref="ticketRef"
|
ref="ticketRef"
|
||||||
:id="ticket.itemFk"
|
:id="ticket.itemFk"
|
||||||
|
|
Loading…
Reference in New Issue