diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml
index 00b56de73..10052912d 100644
--- a/src/i18n/locale/en.yml
+++ b/src/i18n/locale/en.yml
@@ -21,6 +21,7 @@ globals:
search: Search
changes: Changes
dataCreated: Data created
+ split: Split
add: Add
create: Create
edit: Edit
diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml
index 24ec7103d..af303207c 100644
--- a/src/i18n/locale/es.yml
+++ b/src/i18n/locale/es.yml
@@ -43,6 +43,7 @@ globals:
rowRemoved: Fila eliminada
pleaseWait: Por favor espera...
noPinnedModules: No has fijado ningún módulo
+ split: Split
summary:
basicData: Datos básicos
today: Hoy
diff --git a/src/pages/Ticket/Negative/HandleSplited.vue b/src/pages/Ticket/Negative/HandleSplited.vue
new file mode 100644
index 000000000..c7c51f477
--- /dev/null
+++ b/src/pages/Ticket/Negative/HandleSplited.vue
@@ -0,0 +1,106 @@
+
+
+
+
+ (editableStates = data)"
+ auto-load
+ />
+
+
+
+ {{
+ t('negative.detail.modal.changeState.title')
+ }}
+
+
+
+
+ {{ t('negative.detail.modal.changeState.title') }}
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/Ticket/Negative/TicketLackDetail.vue b/src/pages/Ticket/Negative/TicketLackDetail.vue
index 1943c0f2d..05f16c6c3 100644
--- a/src/pages/Ticket/Negative/TicketLackDetail.vue
+++ b/src/pages/Ticket/Negative/TicketLackDetail.vue
@@ -302,14 +302,14 @@ const handleRows = (rows) => {
-
+ /> -->
@@ -381,12 +381,3 @@ const handleRows = (rows) => {
-
-
- en:
- splitQuestion: Are you sure you want to split all tickets?
- Confirm split selected: Confirm split selected
- es:
- splitQuestion: ¿Estás seguro de separar los tickets seleccionados?
- Confirm split selected: Confirmar separar tickets seleccionados
-
diff --git a/src/pages/Ticket/Negative/TicketLackDialogProxy.vue b/src/pages/Ticket/Negative/TicketLackDialogProxy.vue
index eb395dc7e..8c1801d7a 100644
--- a/src/pages/Ticket/Negative/TicketLackDialogProxy.vue
+++ b/src/pages/Ticket/Negative/TicketLackDialogProxy.vue
@@ -49,7 +49,7 @@ async function splitSelected() {
>
- {{ t('globals.split') }}
+ {{ t('global.split') }}
diff --git a/src/pages/Ticket/Negative/TicketLackList.vue b/src/pages/Ticket/Negative/TicketLackList.vue
index 7b9db0e6a..765899050 100644
--- a/src/pages/Ticket/Negative/TicketLackList.vue
+++ b/src/pages/Ticket/Negative/TicketLackList.vue
@@ -5,24 +5,30 @@ import { useStateStore } from 'stores/useStateStore';
import VnPaginate from 'components/ui/VnPaginate.vue';
import TicketLackFilter from 'pages/Ticket/Negative/TicketLackFilter.vue';
import TicketLackDetail from 'pages/Ticket/Negative/TicketLackDetail.vue';
+import HandleSplited from 'pages/Ticket/Negative/HandleSplited.vue';
import ChangeQuantityDialog from 'pages/Ticket/Negative/ChangeQuantityDialog.vue';
import ChangeStateDialog from 'pages/Ticket/Negative/ChangeStateDialog.vue';
import ItemProposal from 'src/pages/Item/components/ItemProposal.vue';
import FetchData from 'components/FetchData.vue';
+import { useVnConfirm } from 'composables/useVnConfirm';
import NegativeOriginDialog from 'pages/Ticket/Negative/NegativeOriginDialog.vue';
import TotalNegativeOriginDialog from 'pages/Ticket/Negative/TotalNegativeOriginDialog.vue';
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
+import axios from 'axios';
+import { onBeforeMount } from 'vue';
const DEFAULT_WAREHOUSE = 'Algemesi';
const stateStore = useStateStore();
const { t } = useI18n();
const selectedRows = ref([]);
const selectedRowsDetail = ref([]);
+const resultSplit = ref([]);
const showNegativeOriginDialog = ref(false);
const showTotalNegativeOriginDialog = ref(false);
const showProposalDialog = ref(false);
+const showSplitDialog = ref(false);
const showChangeQuantityDialog = ref(false);
const showChangeStateDialog = ref(false);
const showFree = ref(true);
@@ -37,6 +43,7 @@ const viewSummary = (row) => {
const originDialogRef = ref();
const totalNegativeDialogRef = ref();
const proposalDialogRef = ref();
+const splitDialogRef = ref();
const changeStateDialogRef = ref();
const changeQuantityDialogRef = ref();
const columns = computed(() => [
@@ -102,6 +109,10 @@ const columns = computed(() => [
const vnPaginateRef = ref();
const ticketDetailRef = ref();
+onBeforeMount(() => {
+ stateStore.rightDrawer = true;
+});
+
const handleWarehouses = async (data) => {
negativeParams.warehouse = data.find((w) => w.name === DEFAULT_WAREHOUSE).id;
await vnPaginateRef.value.fetch();
@@ -110,6 +121,23 @@ const handleWarehouses = async (data) => {
const onDetailDialogHide = (evt) => {
if (evt?.type === 'refresh') ticketDetailRef.value.reload();
};
+const { openConfirmationModal } = useVnConfirm();
+
+const split = async ({ simple }, data = []) => {
+ openConfirmationModal(
+ t('negative.detail.split.confirmSplitSelected'),
+ t('negative.detail.split.splitQuestion'),
+ null,
+ () => {
+ showSplitDialog.value = true;
+ resultSplit.value = [{}];
+ // const body = simple ? data : selectedRows.value;
+ // axios.post(`Tickets/split`, body).then((data) => {
+ // resultSplit.value = data;
+ // });
+ }
+ );
+};
@@ -188,10 +216,20 @@ const onDetailDialogHide = (evt) => {
+
+ {{ t('globals.split') }}
+
+
+
{{ t('Item proposal') }}
@@ -301,6 +339,12 @@ const onDetailDialogHide = (evt) => {
:selected-rows="selectedRowsDetail"
>
+