diff --git a/src/pages/Item/components/ItemProposal.vue b/src/pages/Item/components/ItemProposal.vue index df8999ce4..67d5fcab6 100644 --- a/src/pages/Item/components/ItemProposal.vue +++ b/src/pages/Item/components/ItemProposal.vue @@ -21,7 +21,6 @@ const colorSpacer = '#ecf0f1'; const compatibilityItem = (value) => `${100 * (value / MATCH_VALUES.length)}%`; const gradientStyle = (value) => { let color = 'white'; - console.error(value, extractNumericValue(compatibilityItem(value))); const perc = extractNumericValue(compatibilityItem(value)); switch (true) { case perc >= 0 && perc < 33: @@ -150,25 +149,25 @@ const columns = computed(() => [ name: 'located', field: 'located', }, - { - name: 'tableActions', - align: 'left', - actions: [ - { - title: t('Open details'), - icon: 'change_circle', - show: (row) => isSelectionAvailable(row), - action: (row) => { - proposalSelected.value = [row]; - confirm(); - }, - isPrimary: true, - }, - ], - }, + // { + // name: 'tableActions', + // align: 'left', + // actions: [ + // { + // title: t('Open details'), + // icon: 'change_circle', + // show: (row) => isSelectionAvailable(row), + // action: (row) => { + // proposalSelected.value = [row]; + // confirm(); + // }, + // isPrimary: true, + // }, + // ], + // }, ]); -async function confirm() { +async function confirm(row) { try { // const params = { // saleFk: saleFk.value, @@ -176,7 +175,11 @@ async function confirm() { // quantity: quantity.value, // }; // const { data } = await axios.post('Sales/replaceItem', params); - const params = [saleFk.value, proposalSelected.value[0].id, quantity.value]; + const params = [ + saleFk.value, + row ?? proposalSelected.value[0].id, + quantity.value, + ]; // const { data } = await axios.post('Applications/sale_replaceItem/execute-proc', { // schema: 'vn', // params, @@ -278,6 +281,16 @@ const isSelectionAvailable = (itemProposal) => { {{ row.id }} + + {{ t('Open_details') }} +
+ {{ selectedRows.length }} diff --git a/src/pages/Ticket/Negative/TicketLackTable.vue b/src/pages/Ticket/Negative/TicketLackTable.vue index c33ed1344..10e1ecc42 100644 --- a/src/pages/Ticket/Negative/TicketLackTable.vue +++ b/src/pages/Ticket/Negative/TicketLackTable.vue @@ -137,17 +137,17 @@ const columns = computed(() => [ sortable: true, // columnFilter: { - columnField: { - component: 'select', - attrs: { - event: console.error, - // event: console.error, - options: editableStates.value, - 'option-value': 'id', - 'option-label': 'name', - // }, - }, - }, + // columnField: { + // component: 'select', + // event: getInputEvents, + // attrs: { + // event: (v) => console.error(v), + // options: editableStates.value, + // 'option-value': 'id', + // 'option-label': 'name', + // // }, + // }, + // }, }, { name: 'zoneName', @@ -240,6 +240,16 @@ function onTicketLackFetched(data) { :right-search="false" v-model:selected="selectedRows" > +