#7936 improve InvoiceIn #1004
|
@ -0,0 +1,36 @@
|
||||||
|
import routes from 'src/router/modules';
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
|
let isNotified = false;
|
||||||
|
|
||||||
|
export default {
|
||||||
|
created: function () {
|
||||||
|
const router = useRouter();
|
||||||
|
const keyBindingMap = routes
|
||||||
|
.filter((route) => route.meta.keyBinding)
|
||||||
|
.reduce((map, route) => {
|
||||||
|
map['Key' + route.meta.keyBinding.toUpperCase()] = route.path;
|
||||||
|
return map;
|
||||||
|
}, {});
|
||||||
|
|
||||||
|
const handleKeyDown = (event) => {
|
||||||
|
const { ctrlKey, altKey, code } = event;
|
||||||
|
|
||||||
|
if (ctrlKey && altKey && keyBindingMap[code] && !isNotified) {
|
||||||
|
event.preventDefault();
|
||||||
|
router.push(keyBindingMap[code]);
|
||||||
|
isNotified = true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleKeyUp = (event) => {
|
||||||
|
const { ctrlKey, altKey } = event;
|
||||||
|
if (!ctrlKey || !altKey) {
|
||||||
|
isNotified = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
window.addEventListener('keydown', handleKeyDown);
|
||||||
|
window.addEventListener('keyup', handleKeyUp);
|
||||||
|
},
|
||||||
|
};
|
|
@ -1,30 +1,52 @@
|
||||||
import { getCurrentInstance } from 'vue';
|
function focusFirstInput(input) {
|
||||||
|
input.focus();
|
||||||
|
return;
|
||||||
|
}
|
||||||
export default {
|
export default {
|
||||||
mounted: function () {
|
mounted: function () {
|
||||||
const vm = getCurrentInstance();
|
const that = this;
|
||||||
if (vm.type.name === 'QForm') {
|
|
||||||
if (!['searchbarForm', 'filterPanelForm'].includes(this.$el?.id)) {
|
const form = document.querySelector('.q-form#formModel');
|
||||||
// TODO: AUTOFOCUS IS NOT FOCUSING
|
if (!form) return;
|
||||||
const that = this;
|
try {
|
||||||
this.$el.addEventListener('keyup', function (evt) {
|
const inputsFormCard = form.querySelectorAll(
|
||||||
if (evt.key === 'Enter') {
|
`input:not([disabled]):not([type="checkbox"])`
|
||||||
const input = evt.target;
|
);
|
||||||
if (input.type == 'textarea' && evt.shiftKey) {
|
if (inputsFormCard.length) {
|
||||||
evt.preventDefault();
|
focusFirstInput(inputsFormCard[0]);
|
||||||
let { selectionStart, selectionEnd } = input;
|
|
||||||
input.value =
|
|
||||||
input.value.substring(0, selectionStart) +
|
|
||||||
'\n' +
|
|
||||||
input.value.substring(selectionEnd);
|
|
||||||
selectionStart = selectionEnd = selectionStart + 1;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
evt.preventDefault();
|
|
||||||
that.onSubmit();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
const textareas = document.querySelectorAll(
|
||||||
|
'textarea:not([disabled]), [contenteditable]:not([disabled])'
|
||||||
|
);
|
||||||
|
if (textareas.length) {
|
||||||
|
focusFirstInput(textareas[textareas.length - 1]);
|
||||||
|
}
|
||||||
|
const inputs = document.querySelectorAll(
|
||||||
|
'form#formModel input:not([disabled]):not([type="checkbox"])'
|
||||||
|
);
|
||||||
|
const input = inputs[0];
|
||||||
|
if (!input) return;
|
||||||
|
|
||||||
|
focusFirstInput(input);
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
}
|
}
|
||||||
|
form.addEventListener('keyup', function (evt) {
|
||||||
|
if (evt.key === 'Enter') {
|
||||||
|
const input = evt.target;
|
||||||
|
if (input.type == 'textarea' && evt.shiftKey) {
|
||||||
|
evt.preventDefault();
|
||||||
|
let { selectionStart, selectionEnd } = input;
|
||||||
|
input.value =
|
||||||
|
input.value.substring(0, selectionStart) +
|
||||||
|
'\n' +
|
||||||
|
input.value.substring(selectionEnd);
|
||||||
|
selectionStart = selectionEnd = selectionStart + 1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
evt.preventDefault();
|
||||||
|
that.onSubmit();
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,11 +3,16 @@ import qFormMixin from './qformMixin';
|
||||||
import keyShortcut from './keyShortcut';
|
import keyShortcut from './keyShortcut';
|
||||||
import useNotify from 'src/composables/useNotify.js';
|
import useNotify from 'src/composables/useNotify.js';
|
||||||
import { CanceledError } from 'axios';
|
import { CanceledError } from 'axios';
|
||||||
|
import { QForm } from 'quasar';
|
||||||
|
import { QLayout } from 'quasar';
|
||||||
|
import mainShortcutMixin from './mainShortcutMixin';
|
||||||
|
|
||||||
const { notify } = useNotify();
|
const { notify } = useNotify();
|
||||||
|
|
||||||
export default boot(({ app }) => {
|
export default boot(({ app }) => {
|
||||||
app.mixin(qFormMixin);
|
QForm.mixins = [qFormMixin];
|
||||||
|
QLayout.mixins = [mainShortcutMixin];
|
||||||
|
|
||||||
app.directive('shortcut', keyShortcut);
|
app.directive('shortcut', keyShortcut);
|
||||||
app.config.errorHandler = (error) => {
|
app.config.errorHandler = (error) => {
|
||||||
let message;
|
let message;
|
||||||
|
|
|
@ -610,6 +610,7 @@ function handleSelection({ evt, added, rows: selectedRows }, rows) {
|
||||||
$props.rowClick && $props.rowClick(row);
|
$props.rowClick && $props.rowClick(row);
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
|
style="height: 100%"
|
||||||
>
|
>
|
||||||
<QCardSection
|
<QCardSection
|
||||||
vertical
|
vertical
|
||||||
|
|
|
@ -238,6 +238,7 @@ async function openPointRecord(id, modelLog) {
|
||||||
pointRecord.value = parseProps(propNames, locale, data);
|
pointRecord.value = parseProps(propNames, locale, data);
|
||||||
}
|
}
|
||||||
async function setLogTree(data) {
|
async function setLogTree(data) {
|
||||||
|
if (!data) return;
|
||||||
logTree.value = getLogTree(data);
|
logTree.value = getLogTree(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,85 @@
|
||||||
|
<script setup>
|
||||||
|
import { computed, useAttrs } from 'vue';
|
||||||
|
import VnSelect from 'components/common/VnSelect.vue';
|
||||||
|
import VnAvatar from 'src/components/ui/VnAvatar.vue';
|
||||||
|
|
||||||
|
const emit = defineEmits(['update:modelValue']);
|
||||||
|
const $props = defineProps({
|
||||||
|
hasAvatar: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
hasInfo: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
modelValue: {
|
||||||
|
type: [String, Number, Object],
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const $attrs = useAttrs();
|
||||||
|
|
||||||
|
const value = computed({
|
||||||
|
get() {
|
||||||
|
return $props.modelValue;
|
||||||
|
},
|
||||||
|
set(val) {
|
||||||
|
emit('update:modelValue', val);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const url = computed(() => {
|
||||||
|
let url = 'Workers/search';
|
||||||
|
const { departmentCodes } = $attrs.params ?? {};
|
||||||
|
if (!departmentCodes) return url;
|
||||||
|
const params = new URLSearchParams({
|
||||||
|
departmentCodes: JSON.stringify(departmentCodes),
|
||||||
|
});
|
||||||
|
|
||||||
|
return url.concat(`?${params.toString()}`);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<VnSelect
|
||||||
|
:label="$t('globals.worker')"
|
||||||
|
v-bind="$attrs"
|
||||||
|
v-model="value"
|
||||||
|
:url="url"
|
||||||
|
option-value="id"
|
||||||
|
option-label="nickname"
|
||||||
|
:fields="['id', 'name', 'nickname', 'code']"
|
||||||
|
sort-by="nickname ASC"
|
||||||
|
>
|
||||||
|
<template #prepend v-if="$props.hasAvatar">
|
||||||
|
<VnAvatar :worker-id="value" color="primary" :title="title" />
|
||||||
|
</template>
|
||||||
|
<template #append v-if="$props.hasInfo">
|
||||||
|
<QIcon name="info" class="cursor-pointer">
|
||||||
|
<QTooltip>{{ $t($props.hasInfo) }}</QTooltip>
|
||||||
|
</QIcon>
|
||||||
|
</template>
|
||||||
|
<template #option="scope">
|
||||||
|
<QItem v-bind="scope.itemProps">
|
||||||
|
<QItemSection>
|
||||||
|
<QItemLabel>
|
||||||
|
{{ scope.opt.name }}
|
||||||
|
</QItemLabel>
|
||||||
|
<QItemLabel v-if="!scope.opt.id">
|
||||||
|
{{ scope.opt.nickname }}
|
||||||
|
</QItemLabel>
|
||||||
|
<QItemLabel caption v-else>
|
||||||
|
{{ scope.opt.nickname }}, {{ scope.opt.code }}
|
||||||
|
</QItemLabel>
|
||||||
|
</QItemSection>
|
||||||
|
</QItem>
|
||||||
|
</template>
|
||||||
|
</VnSelect>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
Responsible for approving invoices: Responsable de aprobar las facturas
|
||||||
|
</i18n>
|
|
@ -61,6 +61,7 @@ const emit = defineEmits([
|
||||||
'update:modelValue',
|
'update:modelValue',
|
||||||
'refresh',
|
'refresh',
|
||||||
'clear',
|
'clear',
|
||||||
|
'search',
|
||||||
'init',
|
'init',
|
||||||
'remove',
|
'remove',
|
||||||
'setUserParams',
|
'setUserParams',
|
||||||
|
|
|
@ -409,8 +409,8 @@ entry:
|
||||||
buys: Buys
|
buys: Buys
|
||||||
stickers: Stickers
|
stickers: Stickers
|
||||||
package: Package
|
package: Package
|
||||||
packing: Packing
|
packing: Pack.
|
||||||
grouping: Grouping
|
grouping: Group.
|
||||||
buyingValue: Buying value
|
buyingValue: Buying value
|
||||||
import: Import
|
import: Import
|
||||||
pvp: PVP
|
pvp: PVP
|
||||||
|
|
|
@ -410,8 +410,8 @@ entry:
|
||||||
buys: Compras
|
buys: Compras
|
||||||
stickers: Etiquetas
|
stickers: Etiquetas
|
||||||
package: Embalaje
|
package: Embalaje
|
||||||
packing: Packing
|
packing: Pack.
|
||||||
grouping: Grouping
|
grouping: Group.
|
||||||
buyingValue: Coste
|
buyingValue: Coste
|
||||||
import: Importe
|
import: Importe
|
||||||
pvp: PVP
|
pvp: PVP
|
||||||
|
|
|
@ -1,50 +1,10 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { useQuasar } from 'quasar';
|
|
||||||
import Navbar from 'src/components/NavBar.vue';
|
import Navbar from 'src/components/NavBar.vue';
|
||||||
import { useRouter } from 'vue-router';
|
|
||||||
import routes from 'src/router/modules';
|
|
||||||
import { onMounted } from 'vue';
|
|
||||||
|
|
||||||
const quasar = useQuasar();
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
let isNotified = false;
|
|
||||||
|
|
||||||
const router = useRouter();
|
|
||||||
const keyBindingMap = routes
|
|
||||||
.filter((route) => route.meta.keyBinding)
|
|
||||||
.reduce((map, route) => {
|
|
||||||
map['Key' + route.meta.keyBinding.toUpperCase()] = route.path;
|
|
||||||
return map;
|
|
||||||
}, {});
|
|
||||||
|
|
||||||
const handleKeyDown = (event) => {
|
|
||||||
const { ctrlKey, altKey, code } = event;
|
|
||||||
|
|
||||||
if (ctrlKey && altKey && keyBindingMap[code] && !isNotified) {
|
|
||||||
event.preventDefault();
|
|
||||||
router.push(keyBindingMap[code]);
|
|
||||||
isNotified = true;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleKeyUp = (event) => {
|
|
||||||
const { ctrlKey, altKey } = event;
|
|
||||||
|
|
||||||
if (!ctrlKey || !altKey) {
|
|
||||||
isNotified = false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
window.addEventListener('keydown', handleKeyDown);
|
|
||||||
window.addEventListener('keyup', handleKeyUp);
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<QLayout view="hHh LpR fFf" v-shortcut>
|
<QLayout view="hHh LpR fFf" v-shortcut>
|
||||||
<Navbar />
|
<Navbar />
|
||||||
<RouterView></RouterView>
|
<RouterView></RouterView>
|
||||||
<QFooter v-if="quasar.platform.is.mobile"></QFooter>
|
<QFooter v-if="$q.platform.is.mobile"></QFooter>
|
||||||
</QLayout>
|
</QLayout>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -31,7 +31,6 @@ const rolesOptions = ref([]);
|
||||||
<VnFilterPanel
|
<VnFilterPanel
|
||||||
:data-key="props.dataKey"
|
:data-key="props.dataKey"
|
||||||
:search-button="true"
|
:search-button="true"
|
||||||
:hidden-tags="['search']"
|
|
||||||
:redirect="false"
|
:redirect="false"
|
||||||
search-url="table"
|
search-url="table"
|
||||||
>
|
>
|
||||||
|
|
|
@ -37,11 +37,7 @@ onBeforeMount(() => {
|
||||||
@on-fetch="(data) => (rolesOptions = data)"
|
@on-fetch="(data) => (rolesOptions = data)"
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
<VnFilterPanel
|
<VnFilterPanel :data-key="props.dataKey" :search-button="true">
|
||||||
:data-key="props.dataKey"
|
|
||||||
:search-button="true"
|
|
||||||
:hidden-tags="['search']"
|
|
||||||
>
|
|
||||||
<template #tags="{ tag, formatFn }">
|
<template #tags="{ tag, formatFn }">
|
||||||
<div class="q-gutter-x-xs">
|
<div class="q-gutter-x-xs">
|
||||||
<strong>{{ t(`acls.aclFilter.${tag.label}`) }}: </strong>
|
<strong>{{ t(`acls.aclFilter.${tag.label}`) }}: </strong>
|
||||||
|
|
|
@ -13,12 +13,7 @@ const props = defineProps({
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VnFilterPanel
|
<VnFilterPanel :data-key="props.dataKey" :search-button="true" :redirect="false">
|
||||||
:data-key="props.dataKey"
|
|
||||||
:search-button="true"
|
|
||||||
:hidden-tags="['search']"
|
|
||||||
:redirect="false"
|
|
||||||
>
|
|
||||||
<template #tags="{ tag, formatFn }">
|
<template #tags="{ tag, formatFn }">
|
||||||
<div class="q-gutter-x-xs">
|
<div class="q-gutter-x-xs">
|
||||||
<strong>{{ t(`role.${tag.label}`) }}: </strong>
|
<strong>{{ t(`role.${tag.label}`) }}: </strong>
|
||||||
|
|
|
@ -8,7 +8,7 @@ import FormModel from 'components/FormModel.vue';
|
||||||
import VnRow from 'components/ui/VnRow.vue';
|
import VnRow from 'components/ui/VnRow.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
import VnAvatar from 'src/components/ui/VnAvatar.vue';
|
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
|
||||||
import { getDifferences, getUpdatedValues } from 'src/filters';
|
import { getDifferences, getUpdatedValues } from 'src/filters';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
@ -16,7 +16,6 @@ const { t } = useI18n();
|
||||||
|
|
||||||
const businessTypes = ref([]);
|
const businessTypes = ref([]);
|
||||||
const contactChannels = ref([]);
|
const contactChannels = ref([]);
|
||||||
const title = ref();
|
|
||||||
const handleSalesModelValue = (val) => ({
|
const handleSalesModelValue = (val) => ({
|
||||||
or: [
|
or: [
|
||||||
{ id: val },
|
{ id: val },
|
||||||
|
@ -117,41 +116,17 @@ function onBeforeSave(formData, originalData) {
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnSelect
|
<VnSelectWorker
|
||||||
url="Workers/search"
|
|
||||||
v-model="data.salesPersonFk"
|
|
||||||
:label="t('customer.summary.salesPerson')"
|
:label="t('customer.summary.salesPerson')"
|
||||||
|
v-model="data.salesPersonFk"
|
||||||
:params="{
|
:params="{
|
||||||
departmentCodes: ['VT', 'shopping'],
|
departmentCodes: ['VT', 'shopping'],
|
||||||
}"
|
}"
|
||||||
:fields="['id', 'nickname']"
|
:has-avatar="true"
|
||||||
sort-by="nickname ASC"
|
|
||||||
option-label="nickname"
|
|
||||||
option-value="id"
|
|
||||||
:rules="validate('client.salesPersonFk')"
|
:rules="validate('client.salesPersonFk')"
|
||||||
:expr-builder="exprBuilder"
|
:expr-builder="exprBuilder"
|
||||||
emit-value
|
emit-value
|
||||||
auto-load
|
/>
|
||||||
>
|
|
||||||
<template #prepend>
|
|
||||||
<VnAvatar
|
|
||||||
:worker-id="data.salesPersonFk"
|
|
||||||
color="primary"
|
|
||||||
:title="title"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
<template #option="scope">
|
|
||||||
<QItem v-bind="scope.itemProps">
|
|
||||||
<QItemSection>
|
|
||||||
<QItemLabel>{{ scope.opt?.name }}</QItemLabel>
|
|
||||||
<QItemLabel caption
|
|
||||||
>{{ scope.opt?.nickname }},
|
|
||||||
{{ scope.opt?.code }}</QItemLabel
|
|
||||||
>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
</template>
|
|
||||||
</VnSelect>
|
|
||||||
<VnSelect
|
<VnSelect
|
||||||
v-model="data.contactChannelFk"
|
v-model="data.contactChannelFk"
|
||||||
:options="contactChannels"
|
:options="contactChannels"
|
||||||
|
|
|
@ -3,6 +3,7 @@ import { useI18n } from 'vue-i18n';
|
||||||
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
||||||
import VnSelect from 'components/common/VnSelect.vue';
|
import VnSelect from 'components/common/VnSelect.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
|
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
defineProps({
|
defineProps({
|
||||||
|
@ -65,19 +66,14 @@ const exprBuilder = (param, value) => {
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem class="q-mb-sm">
|
<QItem class="q-mb-sm">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnSelect
|
<VnSelectWorker
|
||||||
url="Workers/search"
|
:label="t('Salesperson')"
|
||||||
|
v-model="params.salesPersonFk"
|
||||||
:params="{
|
:params="{
|
||||||
departmentCodes: ['VT'],
|
departmentCodes: ['VT'],
|
||||||
}"
|
}"
|
||||||
auto-load
|
|
||||||
:label="t('Salesperson')"
|
|
||||||
:expr-builder="exprBuilder"
|
:expr-builder="exprBuilder"
|
||||||
v-model="params.salesPersonFk"
|
|
||||||
@update:model-value="searchFn()"
|
@update:model-value="searchFn()"
|
||||||
option-value="id"
|
|
||||||
option-label="name"
|
|
||||||
sort-by="nickname ASC"
|
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
use-input
|
use-input
|
||||||
|
@ -86,18 +82,7 @@ const exprBuilder = (param, value) => {
|
||||||
outlined
|
outlined
|
||||||
rounded
|
rounded
|
||||||
:input-debounce="0"
|
:input-debounce="0"
|
||||||
>
|
/>
|
||||||
<template #option="{ itemProps, opt }">
|
|
||||||
<QItem v-bind="itemProps">
|
|
||||||
<QItemSection>
|
|
||||||
<QItemLabel>{{ opt.name }}</QItemLabel>
|
|
||||||
<QItemLabel caption>
|
|
||||||
{{ opt.nickname }},{{ opt.code }}
|
|
||||||
</QItemLabel>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
</template></VnSelect
|
|
||||||
>
|
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem class="q-mb-sm">
|
<QItem class="q-mb-sm">
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
import { ref, computed, markRaw } from 'vue';
|
import { ref, computed, markRaw } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
|
||||||
import VnTable from 'components/VnTable/VnTable.vue';
|
import VnTable from 'components/VnTable/VnTable.vue';
|
||||||
import VnLocation from 'src/components/common/VnLocation.vue';
|
import VnLocation from 'src/components/common/VnLocation.vue';
|
||||||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||||
|
@ -12,7 +11,7 @@ import RightMenu from 'src/components/common/RightMenu.vue';
|
||||||
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
|
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
|
||||||
import { toDate } from 'src/filters';
|
import { toDate } from 'src/filters';
|
||||||
import CustomerFilter from './CustomerFilter.vue';
|
import CustomerFilter from './CustomerFilter.vue';
|
||||||
import VnAvatar from 'src/components/ui/VnAvatar.vue';
|
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
@ -422,40 +421,17 @@ function handleLocation(data, location) {
|
||||||
auto-load
|
auto-load
|
||||||
>
|
>
|
||||||
<template #more-create-dialog="{ data }">
|
<template #more-create-dialog="{ data }">
|
||||||
<VnSelect
|
<VnSelectWorker
|
||||||
url="Workers/search"
|
|
||||||
v-model="data.salesPersonFk"
|
|
||||||
:label="t('customer.summary.salesPerson')"
|
:label="t('customer.summary.salesPerson')"
|
||||||
|
v-model="data.salesPersonFk"
|
||||||
:params="{
|
:params="{
|
||||||
departmentCodes: ['VT', 'shopping'],
|
departmentCodes: ['VT', 'shopping'],
|
||||||
}"
|
}"
|
||||||
:fields="['id', 'nickname', 'code']"
|
:has-avatar="true"
|
||||||
sort-by="nickname ASC"
|
:id-value="data.salesPersonFk"
|
||||||
option-label="nickname"
|
|
||||||
option-value="id"
|
|
||||||
emit-value
|
emit-value
|
||||||
auto-load
|
auto-load
|
||||||
>
|
/>
|
||||||
<template #prepend>
|
|
||||||
<VnAvatar
|
|
||||||
:worker-id="data.salesPersonFk"
|
|
||||||
color="primary"
|
|
||||||
:title="title"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
<template #option="scope">
|
|
||||||
<QItem v-bind="scope.itemProps">
|
|
||||||
<QItemSection>
|
|
||||||
<QItemLabel>{{ scope.opt?.name }}</QItemLabel>
|
|
||||||
<QItemLabel caption
|
|
||||||
>{{ scope.opt?.nickname }},
|
|
||||||
{{ scope.opt?.code }}</QItemLabel
|
|
||||||
>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
</template>
|
|
||||||
</VnSelect>
|
|
||||||
|
|
||||||
<VnLocation
|
<VnLocation
|
||||||
:acls="[{ model: 'Province', props: '*', accessType: 'WRITE' }]"
|
:acls="[{ model: 'Province', props: '*', accessType: 'WRITE' }]"
|
||||||
v-model="data.location"
|
v-model="data.location"
|
||||||
|
|
|
@ -6,6 +6,7 @@ import FormModel from 'components/FormModel.vue';
|
||||||
import VnRow from 'components/ui/VnRow.vue';
|
import VnRow from 'components/ui/VnRow.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
|
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -48,14 +49,9 @@ const { t } = useI18n();
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnSelect
|
<VnSelectWorker
|
||||||
:label="t('department.bossDepartment')"
|
:label="t('department.bossDepartment')"
|
||||||
v-model="data.workerFk"
|
v-model="data.workerFk"
|
||||||
url="Workers/search"
|
|
||||||
option-value="id"
|
|
||||||
option-label="name"
|
|
||||||
hide-selected
|
|
||||||
map-options
|
|
||||||
:rules="validate('department.workerFk')"
|
:rules="validate('department.workerFk')"
|
||||||
/>
|
/>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
|
|
|
@ -2,12 +2,15 @@
|
||||||
import { ref, nextTick } from 'vue';
|
import { ref, nextTick } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import axios from 'axios';
|
||||||
|
|
||||||
import CrudModel from 'src/components/CrudModel.vue';
|
import CrudModel from 'src/components/CrudModel.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
|
import useNotify from 'src/composables/useNotify.js';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const { notify } = useNotify();
|
||||||
|
|
||||||
const itemBarcodeRef = ref(null);
|
const itemBarcodeRef = ref(null);
|
||||||
|
|
||||||
|
@ -23,6 +26,24 @@ const focusLastInput = () => {
|
||||||
if (lastInput) lastInput.focus();
|
if (lastInput) lastInput.focus();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const removeRow = (row) => {
|
||||||
|
itemBarcodeRef.value.remove([row]);
|
||||||
|
};
|
||||||
|
|
||||||
|
const submit = async (rows) => {
|
||||||
|
const params = rows[rows.length - 1];
|
||||||
|
let { data } = await axios.get('ItemBarcodes');
|
||||||
|
const code = params.code;
|
||||||
|
|
||||||
|
if (data.some((codes) => codes.code === code)) {
|
||||||
|
notify(t('Codes can not be repeated'), 'negative');
|
||||||
|
itemBarcodeRef.value.reset();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await axios.patch(`ItemBarcodes`, params);
|
||||||
|
notify(t('globals.dataSaved'), 'positive');
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="full-width flex justify-center">
|
<div class="full-width flex justify-center">
|
||||||
|
@ -39,6 +60,7 @@ const focusLastInput = () => {
|
||||||
ref="itemBarcodeRef"
|
ref="itemBarcodeRef"
|
||||||
url="ItemBarcodes"
|
url="ItemBarcodes"
|
||||||
auto-load
|
auto-load
|
||||||
|
:save-fn="submit"
|
||||||
>
|
>
|
||||||
<template #body="{ rows }">
|
<template #body="{ rows }">
|
||||||
<QCard class="q-px-lg q-py-md">
|
<QCard class="q-px-lg q-py-md">
|
||||||
|
@ -54,7 +76,7 @@ const focusLastInput = () => {
|
||||||
focusable-input
|
focusable-input
|
||||||
/>
|
/>
|
||||||
<QIcon
|
<QIcon
|
||||||
@click="itemBarcodeRef.remove([row])"
|
@click="removeRow(row)"
|
||||||
class="cursor-pointer q-ml-md"
|
class="cursor-pointer q-ml-md"
|
||||||
color="primary"
|
color="primary"
|
||||||
name="delete"
|
name="delete"
|
||||||
|
@ -89,4 +111,5 @@ es:
|
||||||
Code: Código
|
Code: Código
|
||||||
Remove barcode: Quitar código de barras
|
Remove barcode: Quitar código de barras
|
||||||
Add barcode: Añadir código de barras
|
Add barcode: Añadir código de barras
|
||||||
|
Codes can not be repeated: Los códigos no puden ser repetidos
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -70,6 +70,7 @@ const onIntrastatCreated = (response, formData) => {
|
||||||
option-label="name"
|
option-label="name"
|
||||||
hide-selected
|
hide-selected
|
||||||
map-options
|
map-options
|
||||||
|
required
|
||||||
>
|
>
|
||||||
<template #option="scope">
|
<template #option="scope">
|
||||||
<QItem v-bind="scope.itemProps">
|
<QItem v-bind="scope.itemProps">
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted, reactive, computed } from 'vue';
|
import { ref, reactive, computed } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ const handlePhotoUpdated = (evt = false) => {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="relative-position">
|
<div class="relative-position">
|
||||||
<VnImg ref="image" :id="$props.entityId" zoom-resolution="1600x900">
|
<VnImg ref="image" :id="parseInt($props.entityId)" zoom-resolution="1600x900">
|
||||||
<template #error>
|
<template #error>
|
||||||
<div class="absolute-full picture text-center q-pa-md flex flex-center">
|
<div class="absolute-full picture text-center q-pa-md flex flex-center">
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, computed, onUnmounted, reactive, ref, nextTick, watch } from 'vue';
|
import { onMounted, computed, reactive, ref, nextTick, watch } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
|
|
||||||
|
@ -145,8 +145,6 @@ onMounted(async () => {
|
||||||
await updateWarehouse(warehouseFk.value);
|
await updateWarehouse(warehouseFk.value);
|
||||||
});
|
});
|
||||||
|
|
||||||
onUnmounted(() => (stateStore.rightDrawer = false));
|
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => router.currentRoute.value.params.id,
|
() => router.currentRoute.value.params.id,
|
||||||
(newId) => {
|
(newId) => {
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, computed, onUnmounted, ref, watch } from 'vue';
|
import { onMounted, computed, ref, watch } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { dateRange } from 'src/filters';
|
import { dateRange } from 'src/filters';
|
||||||
import EntryDescriptorProxy from 'src/pages/Entry/Card/EntryDescriptorProxy.vue';
|
import EntryDescriptorProxy from 'src/pages/Entry/Card/EntryDescriptorProxy.vue';
|
||||||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||||
|
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
|
||||||
import { toDateTimeFormat } from 'src/filters/date.js';
|
import { toDateTimeFormat } from 'src/filters/date.js';
|
||||||
import { dashIfEmpty } from 'src/filters';
|
import { dashIfEmpty } from 'src/filters';
|
||||||
import { toCurrency } from 'filters/index';
|
import { toCurrency } from 'filters/index';
|
||||||
|
@ -15,7 +13,6 @@ import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const stateStore = useStateStore();
|
|
||||||
|
|
||||||
const exprBuilder = (param, value) => {
|
const exprBuilder = (param, value) => {
|
||||||
switch (param) {
|
switch (param) {
|
||||||
|
@ -180,8 +177,6 @@ onMounted(async () => {
|
||||||
updateFilter();
|
updateFilter();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
onUnmounted(() => (stateStore.rightDrawer = false));
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -1,19 +1,15 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, ref, computed, reactive } from 'vue';
|
import { onMounted, ref, computed, reactive, watchEffect } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
|
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
|
||||||
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
||||||
|
|
||||||
import { toDateFormat } from 'src/filters/date.js';
|
import { toDateFormat } from 'src/filters/date.js';
|
||||||
import { dashIfEmpty } from 'src/filters';
|
|
||||||
import { useArrayData } from 'src/composables/useArrayData';
|
import { useArrayData } from 'src/composables/useArrayData';
|
||||||
import useNotify from 'src/composables/useNotify.js';
|
import useNotify from 'src/composables/useNotify.js';
|
||||||
import { useVnConfirm } from 'composables/useVnConfirm';
|
import { useVnConfirm } from 'composables/useVnConfirm';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
|
import VnTable from 'src/components/VnTable/VnTable.vue';
|
||||||
|
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
|
|
||||||
|
@ -21,8 +17,9 @@ const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { notify } = useNotify();
|
const { notify } = useNotify();
|
||||||
const { openConfirmationModal } = useVnConfirm();
|
const { openConfirmationModal } = useVnConfirm();
|
||||||
|
const tableRef = ref();
|
||||||
const rowsSelected = ref([]);
|
const selectedRows = ref([]);
|
||||||
|
const hasSelectedCards = computed(() => selectedRows.value.length > 0);
|
||||||
|
|
||||||
const exprBuilder = (param, value) => {
|
const exprBuilder = (param, value) => {
|
||||||
switch (param) {
|
switch (param) {
|
||||||
|
@ -36,6 +33,11 @@ const exprBuilder = (param, value) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const params = reactive({ itemFk: route.params.id });
|
const params = reactive({ itemFk: route.params.id });
|
||||||
|
const filter = reactive({
|
||||||
|
where: {
|
||||||
|
itemFk: route.params.id,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const arrayData = useArrayData('ItemShelvings', {
|
const arrayData = useArrayData('ItemShelvings', {
|
||||||
url: 'ItemShelvingPlacementSupplyStocks',
|
url: 'ItemShelvingPlacementSupplyStocks',
|
||||||
|
@ -44,123 +46,69 @@ const arrayData = useArrayData('ItemShelvings', {
|
||||||
});
|
});
|
||||||
const rows = computed(() => arrayData.store.data || []);
|
const rows = computed(() => arrayData.store.data || []);
|
||||||
|
|
||||||
const applyColumnFilter = async (col) => {
|
|
||||||
const paramKey = col.columnFilter?.filterParamKey || col.field;
|
|
||||||
params[paramKey] = col.columnFilter.filterValue;
|
|
||||||
await arrayData.addFilter({ filter: null, params });
|
|
||||||
};
|
|
||||||
|
|
||||||
const getInputEvents = (col) => {
|
|
||||||
return col.columnFilter.type === 'select'
|
|
||||||
? { 'update:modelValue': () => applyColumnFilter(col) }
|
|
||||||
: {
|
|
||||||
'keyup.enter': () => applyColumnFilter(col),
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
{
|
{
|
||||||
label: t('shelvings.created'),
|
label: t('shelvings.created'),
|
||||||
name: 'created',
|
name: 'created',
|
||||||
field: 'created',
|
|
||||||
align: 'left',
|
align: 'left',
|
||||||
sortable: true,
|
columnFilter: false,
|
||||||
columnFilter: null,
|
format: (row) => toDateFormat(row.created),
|
||||||
format: (val) => toDateFormat(val),
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
label: t('shelvings.item'),
|
label: t('shelvings.item'),
|
||||||
name: 'item',
|
name: 'itemFk',
|
||||||
field: 'itemFk',
|
|
||||||
align: 'left',
|
align: 'left',
|
||||||
sortable: true,
|
columnFilter: false,
|
||||||
columnFilter: null,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('shelvings.concept'),
|
label: t('shelvings.concept'),
|
||||||
name: 'concept',
|
name: 'longName',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
sortable: true,
|
columnFilter: false,
|
||||||
columnFilter: null,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('shelvings.parking'),
|
label: t('shelvings.parking'),
|
||||||
name: 'parking',
|
name: 'parking',
|
||||||
field: 'parking',
|
|
||||||
align: 'left',
|
align: 'left',
|
||||||
sortable: true,
|
component: 'select',
|
||||||
format: (val) => dashIfEmpty(val),
|
attrs: {
|
||||||
columnFilter: {
|
url: 'parkings',
|
||||||
component: VnSelect,
|
fields: ['code'],
|
||||||
type: 'select',
|
'sort-by': 'code ASC',
|
||||||
filterValue: null,
|
'option-value': 'code',
|
||||||
event: getInputEvents,
|
'option-label': 'code',
|
||||||
attrs: {
|
dense: true,
|
||||||
url: 'parkings',
|
|
||||||
fields: ['code'],
|
|
||||||
'sort-by': 'code ASC',
|
|
||||||
'option-value': 'code',
|
|
||||||
'option-label': 'code',
|
|
||||||
dense: true,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
columnField: { component: null },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('shelvings.shelving'),
|
label: t('shelvings.shelving'),
|
||||||
name: 'shelving',
|
name: 'shelving',
|
||||||
field: 'shelving',
|
|
||||||
align: 'left',
|
align: 'left',
|
||||||
sortable: true,
|
component: 'select',
|
||||||
format: (val) => dashIfEmpty(val),
|
attrs: {
|
||||||
columnFilter: {
|
url: 'shelvings',
|
||||||
component: VnSelect,
|
fields: ['code'],
|
||||||
type: 'select',
|
'sort-by': 'code ASC',
|
||||||
filterValue: null,
|
'option-value': 'code',
|
||||||
event: getInputEvents,
|
'option-label': 'code',
|
||||||
attrs: {
|
dense: true,
|
||||||
url: 'shelvings',
|
|
||||||
fields: ['code'],
|
|
||||||
'sort-by': 'code ASC',
|
|
||||||
'option-value': 'code',
|
|
||||||
'option-label': 'code',
|
|
||||||
dense: true,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
columnField: { component: null },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('shelvings.label'),
|
label: t('shelvings.label'),
|
||||||
name: 'label',
|
name: 'label',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
sortable: true,
|
columnFilter: { inWhere: true },
|
||||||
format: (_, row) => (row.stock / row.packing).toFixed(2),
|
format: (row) => (row.stock / row.packing).toFixed(2),
|
||||||
columnFilter: {
|
|
||||||
component: VnInput,
|
|
||||||
type: 'text',
|
|
||||||
filterParamKey: 'label',
|
|
||||||
filterValue: null,
|
|
||||||
event: getInputEvents,
|
|
||||||
attrs: {
|
|
||||||
dense: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('shelvings.packing'),
|
label: t('shelvings.packing'),
|
||||||
field: 'packing',
|
|
||||||
name: 'packing',
|
name: 'packing',
|
||||||
|
attrs: { inWhere: true },
|
||||||
align: 'left',
|
align: 'left',
|
||||||
sortable: true,
|
|
||||||
columnFilter: {
|
|
||||||
component: VnInput,
|
|
||||||
type: 'text',
|
|
||||||
filterValue: null,
|
|
||||||
event: getInputEvents,
|
|
||||||
attrs: {
|
|
||||||
dense: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
format: (val) => dashIfEmpty(val),
|
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -169,15 +117,16 @@ const totalLabels = computed(() =>
|
||||||
);
|
);
|
||||||
|
|
||||||
const removeLines = async () => {
|
const removeLines = async () => {
|
||||||
const itemShelvingIds = rowsSelected.value.map((row) => row.itemShelvingFk);
|
const itemShelvingIds = selectedRows.value.map((row) => row.itemShelvingFk);
|
||||||
await axios.post('ItemShelvings/deleteItemShelvings', { itemShelvingIds });
|
await axios.post('ItemShelvings/deleteItemShelvings', { itemShelvingIds });
|
||||||
rowsSelected.value = [];
|
selectedRows.value = [];
|
||||||
notify('shelvings.shelvingsRemoved', 'positive');
|
notify('shelvings.shelvingsRemoved', 'positive');
|
||||||
await arrayData.fetch({ append: false });
|
await tableRef.value.reload();
|
||||||
};
|
};
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await arrayData.fetch({ append: false });
|
await arrayData.fetch({ append: false });
|
||||||
});
|
});
|
||||||
|
watchEffect(selectedRows);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -203,7 +152,7 @@ onMounted(async () => {
|
||||||
<QBtn
|
<QBtn
|
||||||
color="primary"
|
color="primary"
|
||||||
icon="delete"
|
icon="delete"
|
||||||
:disabled="!rowsSelected.length"
|
:disabled="!hasSelectedCards"
|
||||||
@click="
|
@click="
|
||||||
openConfirmationModal(
|
openConfirmationModal(
|
||||||
t('shelvings.removeConfirmTitle'),
|
t('shelvings.removeConfirmTitle'),
|
||||||
|
@ -219,41 +168,27 @@ onMounted(async () => {
|
||||||
</Teleport>
|
</Teleport>
|
||||||
</template>
|
</template>
|
||||||
<QPage class="column items-center q-pa-md">
|
<QPage class="column items-center q-pa-md">
|
||||||
<QTable
|
<VnTable
|
||||||
:rows="rows"
|
ref="tableRef"
|
||||||
|
data-key="ItemShelving"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
row-key="id"
|
:url="`ItemShelvingPlacementSupplyStocks`"
|
||||||
:pagination="{ rowsPerPage: 0 }"
|
:filter="filter"
|
||||||
class="full-width q-mt-md"
|
:expr-builder="exprBuilder"
|
||||||
selection="multiple"
|
:right-search="false"
|
||||||
v-model:selected="rowsSelected"
|
v-model:selected="selectedRows"
|
||||||
:no-data-label="t('globals.noResults')"
|
:table="{
|
||||||
|
'row-key': 'itemShelvingFk',
|
||||||
|
selection: 'multiple',
|
||||||
|
}"
|
||||||
|
auto-load
|
||||||
>
|
>
|
||||||
<template #top-row="{ cols }">
|
<template #column-longName="{ row }">
|
||||||
<QTr>
|
<span class="link" @click.stop>
|
||||||
<QTd />
|
{{ row.longName }}
|
||||||
<QTd
|
|
||||||
v-for="(col, index) in cols"
|
|
||||||
:key="index"
|
|
||||||
style="max-width: 100px"
|
|
||||||
>
|
|
||||||
<component
|
|
||||||
:is="col.columnFilter.component"
|
|
||||||
v-if="col.columnFilter"
|
|
||||||
v-model="col.columnFilter.filterValue"
|
|
||||||
v-bind="col.columnFilter.attrs"
|
|
||||||
v-on="col.columnFilter.event(col)"
|
|
||||||
dense
|
|
||||||
/>
|
|
||||||
</QTd>
|
|
||||||
</QTr>
|
|
||||||
</template>
|
|
||||||
<template #body-cell-concept="{ row }">
|
|
||||||
<QTd @click.stop>
|
|
||||||
<span class="link">{{ row.longName }}</span>
|
|
||||||
<ItemDescriptorProxy :id="row.itemFk" />
|
<ItemDescriptorProxy :id="row.itemFk" />
|
||||||
</QTd>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</QTable>
|
</VnTable>
|
||||||
</QPage>
|
</QPage>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -89,7 +89,7 @@ const getUrl = (id, param) => `#/Item/${id}/${param}`;
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<VnTitle
|
<VnTitle
|
||||||
:url="getUrl(entityId, 'basic-data')"
|
:url="getUrl(entityId, 'basic-data')"
|
||||||
:text="t('item.summary.otherData')"
|
:text="t('item.summary.basicData')"
|
||||||
/>
|
/>
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('item.summary.intrastatCode')"
|
:label="t('item.summary.intrastatCode')"
|
||||||
|
|
|
@ -8,7 +8,6 @@ import VnRow from 'components/ui/VnRow.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
|
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
@ -60,6 +59,10 @@ const insertTag = (rows) => {
|
||||||
itemTagsRef.value.formData[itemTagsRef.value.formData.length - 1].priority =
|
itemTagsRef.value.formData[itemTagsRef.value.formData.length - 1].priority =
|
||||||
getHighestPriority(rows);
|
getHighestPriority(rows);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const submitTags = async (data) => {
|
||||||
|
itemTagsRef.value.onSubmit(data);
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -77,7 +80,6 @@ const insertTag = (rows) => {
|
||||||
data-key="ItemTags"
|
data-key="ItemTags"
|
||||||
model="ItemTags"
|
model="ItemTags"
|
||||||
url="ItemTags"
|
url="ItemTags"
|
||||||
update-url="Tags/onSubmit"
|
|
||||||
:data-required="{
|
:data-required="{
|
||||||
$index: undefined,
|
$index: undefined,
|
||||||
itemFk: route.params.id,
|
itemFk: route.params.id,
|
||||||
|
@ -147,6 +149,7 @@ const insertTag = (rows) => {
|
||||||
v-model="row.value"
|
v-model="row.value"
|
||||||
:label="t('itemTags.value')"
|
:label="t('itemTags.value')"
|
||||||
:is-clearable="false"
|
:is-clearable="false"
|
||||||
|
@keyup.enter.stop="submitTags(row)"
|
||||||
/>
|
/>
|
||||||
<VnInput
|
<VnInput
|
||||||
:label="t('itemBasicData.relevancy')"
|
:label="t('itemBasicData.relevancy')"
|
||||||
|
@ -154,6 +157,7 @@ const insertTag = (rows) => {
|
||||||
v-model="row.priority"
|
v-model="row.priority"
|
||||||
:required="true"
|
:required="true"
|
||||||
:rules="validate('itemTag.priority')"
|
:rules="validate('itemTag.priority')"
|
||||||
|
@keyup.enter.stop="submitTags(row)"
|
||||||
/>
|
/>
|
||||||
<div class="row justify-center" style="flex: 0">
|
<div class="row justify-center" style="flex: 0">
|
||||||
<QIcon
|
<QIcon
|
||||||
|
@ -189,3 +193,8 @@ const insertTag = (rows) => {
|
||||||
</QPage>
|
</QPage>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
Tags can not be repeated: Las etiquetas no pueden repetirse
|
||||||
|
</i18n>
|
||||||
|
|
|
@ -28,7 +28,7 @@ const taxesFilter = {
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
const ItemTaxRef = ref(null);
|
const ItemTaxRef = ref();
|
||||||
const taxesOptions = ref([]);
|
const taxesOptions = ref([]);
|
||||||
|
|
||||||
const submitTaxes = async (data) => {
|
const submitTaxes = async (data) => {
|
||||||
|
@ -36,7 +36,10 @@ const submitTaxes = async (data) => {
|
||||||
id: tax.id,
|
id: tax.id,
|
||||||
taxClassFk: tax.taxClassFk,
|
taxClassFk: tax.taxClassFk,
|
||||||
}));
|
}));
|
||||||
|
if (payload.some((item) => item.taxClassFk === null)) {
|
||||||
|
notify(t('Tax class cannot be blank'), 'negative');
|
||||||
|
return;
|
||||||
|
}
|
||||||
await axios.post(`Items/updateTaxes`, payload);
|
await axios.post(`Items/updateTaxes`, payload);
|
||||||
notify(t('globals.dataSaved'), 'positive');
|
notify(t('globals.dataSaved'), 'positive');
|
||||||
};
|
};
|
||||||
|
|
|
@ -413,7 +413,6 @@ function handleOnDataSave({ CrudModelRef }) {
|
||||||
save-url="FixedPrices/crud"
|
save-url="FixedPrices/crud"
|
||||||
:user-params="{ warehouseFk: user.warehouseFk }"
|
:user-params="{ warehouseFk: user.warehouseFk }"
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
dense
|
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
default-mode="table"
|
default-mode="table"
|
||||||
auto-load
|
auto-load
|
||||||
|
|
|
@ -55,17 +55,6 @@ const columns = computed(() => [
|
||||||
label: '',
|
label: '',
|
||||||
name: 'image',
|
name: 'image',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
columnField: {
|
|
||||||
component: VnImg,
|
|
||||||
attrs: ({ row }) => {
|
|
||||||
return {
|
|
||||||
id: row?.id,
|
|
||||||
zoomResolution: '1600x900',
|
|
||||||
zoom: true,
|
|
||||||
class: 'rounded',
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
columnFilter: false,
|
columnFilter: false,
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
|
@ -184,7 +173,7 @@ const columns = computed(() => [
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('globals.origin'),
|
label: t('item.list.origin'),
|
||||||
name: 'origin',
|
name: 'origin',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
component: 'select',
|
component: 'select',
|
||||||
|
@ -228,7 +217,8 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('item.list.weightByPiece'),
|
label: t('item.list.weight'),
|
||||||
|
toolTip: t('item.list.weightByPiece'),
|
||||||
name: 'weightByPiece',
|
name: 'weightByPiece',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
component: 'input',
|
component: 'input',
|
||||||
|
@ -322,7 +312,6 @@ const columns = computed(() => [
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
data-key="ItemList"
|
data-key="ItemList"
|
||||||
url="Items/filter"
|
url="Items/filter"
|
||||||
url-create="Items"
|
|
||||||
:create="{
|
:create="{
|
||||||
urlCreate: 'Items',
|
urlCreate: 'Items',
|
||||||
title: t('Create Item'),
|
title: t('Create Item'),
|
||||||
|
@ -333,12 +322,19 @@ const columns = computed(() => [
|
||||||
}"
|
}"
|
||||||
:order="['isActive DESC', 'name', 'id']"
|
:order="['isActive DESC', 'name', 'id']"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
auto-load
|
|
||||||
redirect="Item"
|
redirect="Item"
|
||||||
:is-editable="false"
|
:is-editable="false"
|
||||||
:right-search="false"
|
:right-search="false"
|
||||||
:filer="itemFilter"
|
:filter="itemFilter"
|
||||||
>
|
>
|
||||||
|
<template #column-image="{ row }">
|
||||||
|
<VnImg
|
||||||
|
:id="row?.id"
|
||||||
|
zoom-resolution="1600x900"
|
||||||
|
:zoom="true"
|
||||||
|
class="rounded"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
<template #column-id="{ row }">
|
<template #column-id="{ row }">
|
||||||
<span class="link" @click.stop>
|
<span class="link" @click.stop>
|
||||||
{{ row.id }}
|
{{ row.id }}
|
||||||
|
@ -348,7 +344,7 @@ const columns = computed(() => [
|
||||||
<template #column-userName="{ row }">
|
<template #column-userName="{ row }">
|
||||||
<span class="link" @click.stop>
|
<span class="link" @click.stop>
|
||||||
{{ row.userName }}
|
{{ row.userName }}
|
||||||
<WorkerDescriptorProxy :id="row.workerFk" />
|
<WorkerDescriptorProxy :id="row.buyerFk" />
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template #column-description="{ row }">
|
<template #column-description="{ row }">
|
||||||
|
|
|
@ -199,7 +199,17 @@ onMounted(async () => {
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
rounded
|
rounded
|
||||||
/>
|
>
|
||||||
|
<template #option="scope">
|
||||||
|
<QItem v-bind="scope.itemProps">
|
||||||
|
<QItemSection>
|
||||||
|
<QItemLabel>{{
|
||||||
|
t(`params.${scope.opt?.name}`)
|
||||||
|
}}</QItemLabel>
|
||||||
|
</QItemSection>
|
||||||
|
</QItem>
|
||||||
|
</template>
|
||||||
|
</VnSelect>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem>
|
<QItem>
|
||||||
|
@ -434,6 +444,13 @@ en:
|
||||||
description: Description
|
description: Description
|
||||||
name: Name
|
name: Name
|
||||||
id: Id
|
id: Id
|
||||||
|
Accessories: Accessories
|
||||||
|
Artificial: Artificial
|
||||||
|
Flower: Flower
|
||||||
|
Fruit: Fruit
|
||||||
|
Green: Green
|
||||||
|
Handmade: Handmade
|
||||||
|
Plant: Plant
|
||||||
es:
|
es:
|
||||||
More fields: Más campos
|
More fields: Más campos
|
||||||
params:
|
params:
|
||||||
|
@ -450,4 +467,11 @@ es:
|
||||||
description: Descripción
|
description: Descripción
|
||||||
name: Nombre
|
name: Nombre
|
||||||
id: Id
|
id: Id
|
||||||
|
Accessories: Accesorios
|
||||||
|
Artificial: Artificial
|
||||||
|
Flower: Flor
|
||||||
|
Fruit: Fruta
|
||||||
|
Green: Verde
|
||||||
|
Handmade: Hecho a mano
|
||||||
|
Plant: Planta
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -5,13 +5,16 @@ import TicketDescriptorProxy from 'src/pages/Ticket/Card/TicketDescriptorProxy.v
|
||||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
import { useArrayData } from 'composables/useArrayData';
|
import { useArrayData } from 'composables/useArrayData';
|
||||||
import { dashIfEmpty, toCurrency } from 'filters/index';
|
import { toCurrency } from 'filters/index';
|
||||||
import useNotify from 'src/composables/useNotify.js';
|
import useNotify from 'src/composables/useNotify.js';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import ItemRequestDenyForm from './ItemRequestDenyForm.vue';
|
import ItemRequestDenyForm from './ItemRequestDenyForm.vue';
|
||||||
import { toDate } from 'src/filters';
|
import { toDate } from 'src/filters';
|
||||||
import VnTable from 'components/VnTable/VnTable.vue';
|
import VnTable from 'components/VnTable/VnTable.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
|
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
||||||
|
import ItemRequestFilter from './ItemRequestFilter.vue';
|
||||||
|
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { notify } = useNotify();
|
const { notify } = useNotify();
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
|
@ -228,6 +231,11 @@ onMounted(async () => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<RightMenu>
|
||||||
|
<template #right-panel>
|
||||||
|
<ItemRequestFilter data-key="itemRequest" />
|
||||||
|
</template>
|
||||||
|
</RightMenu>
|
||||||
<VnTable
|
<VnTable
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
data-key="itemRequest"
|
data-key="itemRequest"
|
||||||
|
@ -239,6 +247,7 @@ onMounted(async () => {
|
||||||
auto-load
|
auto-load
|
||||||
:disable-option="{ card: true }"
|
:disable-option="{ card: true }"
|
||||||
chip-locale="item.params"
|
chip-locale="item.params"
|
||||||
|
:right-search="false"
|
||||||
>
|
>
|
||||||
<template #column-ticketFk="{ row }">
|
<template #column-ticketFk="{ row }">
|
||||||
<span class="link">
|
<span class="link">
|
||||||
|
@ -306,30 +315,28 @@ onMounted(async () => {
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template #column-denyOptions="{ row, rowIndex }">
|
<template #column-denyOptions="{ row, rowIndex }">
|
||||||
<QTd class="sticky no-padding">
|
<QIcon
|
||||||
<QIcon
|
v-if="row.response?.length"
|
||||||
v-if="row.response?.length"
|
name="insert_drive_file"
|
||||||
name="insert_drive_file"
|
color="primary"
|
||||||
color="primary"
|
size="sm"
|
||||||
size="sm"
|
>
|
||||||
>
|
<QTooltip>
|
||||||
<QTooltip>
|
{{ row.response }}
|
||||||
{{ row.response }}
|
</QTooltip>
|
||||||
</QTooltip>
|
</QIcon>
|
||||||
</QIcon>
|
<QIcon
|
||||||
<QIcon
|
v-if="row.isOk == null"
|
||||||
v-if="row.isOk == null"
|
name="thumb_down"
|
||||||
name="thumb_down"
|
color="primary"
|
||||||
color="primary"
|
size="sm"
|
||||||
size="sm"
|
class="fill-icon"
|
||||||
class="fill-icon"
|
@click="showDenyRequestForm(row.id, rowIndex)"
|
||||||
@click="showDenyRequestForm(row.id, rowIndex)"
|
>
|
||||||
>
|
<QTooltip>
|
||||||
<QTooltip>
|
{{ t('Discard') }}
|
||||||
{{ t('Discard') }}
|
</QTooltip>
|
||||||
</QTooltip>
|
</QIcon>
|
||||||
</QIcon>
|
|
||||||
</QTd>
|
|
||||||
</template>
|
</template>
|
||||||
</VnTable>
|
</VnTable>
|
||||||
<QDialog ref="denyFormRef" transition-show="scale" transition-hide="scale">
|
<QDialog ref="denyFormRef" transition-show="scale" transition-hide="scale">
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue';
|
import { onMounted, ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { dateRange } from 'src/filters';
|
import { dateRange } from 'src/filters';
|
||||||
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
||||||
|
@ -7,6 +7,8 @@ import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||||
|
import { useArrayData } from 'src/composables/useArrayData';
|
||||||
|
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
@ -21,7 +23,8 @@ const stateOptions = [
|
||||||
{ code: 'accepted', name: t('accepted') },
|
{ code: 'accepted', name: t('accepted') },
|
||||||
{ code: 'denied', name: t('denied') },
|
{ code: 'denied', name: t('denied') },
|
||||||
];
|
];
|
||||||
|
const arrayData = useArrayData(props.dataKey);
|
||||||
|
const fieldFiltersValues = ref([]);
|
||||||
const itemTypesOptions = ref([]);
|
const itemTypesOptions = ref([]);
|
||||||
const warehousesOptions = ref([]);
|
const warehousesOptions = ref([]);
|
||||||
|
|
||||||
|
@ -56,6 +59,19 @@ const decrement = (paramsObj, key) => {
|
||||||
|
|
||||||
paramsObj[key]--;
|
paramsObj[key]--;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
if (arrayData.store?.userParams) {
|
||||||
|
fieldFiltersValues.value = Object.entries(arrayData.store.userParams).map(
|
||||||
|
([key, value]) => ({
|
||||||
|
name: key,
|
||||||
|
value,
|
||||||
|
selectedField: { name: key, label: t(`params.${key}`) },
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
exprBuilder('state', arrayData.store?.userParams?.state);
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -145,33 +161,17 @@ const decrement = (paramsObj, key) => {
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnSelect
|
<VnSelectWorker
|
||||||
:label="t('params.requesterFk')"
|
:label="t('params.requesterFk')"
|
||||||
v-model="params.requesterFk"
|
v-model="params.requesterFk"
|
||||||
@update:model-value="searchFn()"
|
@update:model-value="searchFn()"
|
||||||
url="Workers/search"
|
|
||||||
:fields="['id', 'name']"
|
:fields="['id', 'name']"
|
||||||
order="name ASC"
|
|
||||||
:params="{ departmentCodes: ['VT'] }"
|
:params="{ departmentCodes: ['VT'] }"
|
||||||
option-value="id"
|
|
||||||
option-label="name"
|
|
||||||
hide-selected
|
hide-selected
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
rounded
|
rounded
|
||||||
>
|
/>
|
||||||
<template #option="scope">
|
|
||||||
<QItem v-bind="scope.itemProps">
|
|
||||||
<QItemSection>
|
|
||||||
<QItemLabel>{{ scope.opt?.name }}</QItemLabel>
|
|
||||||
<QItemLabel caption
|
|
||||||
>{{ scope.opt?.nickname }},
|
|
||||||
{{ scope.opt?.code }}</QItemLabel
|
|
||||||
>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
</template>
|
|
||||||
</VnSelect>
|
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem>
|
<QItem>
|
||||||
|
|
|
@ -10,7 +10,6 @@ const { t } = useI18n();
|
||||||
url="ItemTypes"
|
url="ItemTypes"
|
||||||
:label="t('Search item type')"
|
:label="t('Search item type')"
|
||||||
:info="t('Search itemType by id, name or code')"
|
:info="t('Search itemType by id, name or code')"
|
||||||
search-url="table"
|
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<i18n>
|
<i18n>
|
||||||
|
|
|
@ -6,6 +6,7 @@ import VnTable from 'components/VnTable/VnTable.vue';
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||||
import ItemTypeFilter from './ItemType/ItemTypeFilter.vue';
|
import ItemTypeFilter from './ItemType/ItemTypeFilter.vue';
|
||||||
|
import WorkerDescriptorProxy from '../Worker/Card/WorkerDescriptorProxy.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
|
@ -31,13 +32,14 @@ const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'name',
|
name: 'name',
|
||||||
label: t('name'),
|
label: t('globals.name'),
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
create: true,
|
create: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('worker'),
|
label: t('worker'),
|
||||||
|
name: 'workerFk',
|
||||||
create: true,
|
create: true,
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: {
|
attrs: {
|
||||||
|
@ -45,20 +47,20 @@ const columns = computed(() => [
|
||||||
optionLabel: 'nickname',
|
optionLabel: 'nickname',
|
||||||
optionValue: 'id',
|
optionValue: 'id',
|
||||||
},
|
},
|
||||||
|
format: (row) => row.worker?.user?.name,
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
visible: true,
|
columnField: { component: null },
|
||||||
columnField: {
|
|
||||||
component: 'userLink',
|
|
||||||
attrs: ({ row }) => {
|
|
||||||
return {
|
|
||||||
workerId: row?.worker?.id,
|
|
||||||
name: row.worker?.user?.name,
|
|
||||||
defaultName: true,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
name: 'workerFk',
|
attrs: {
|
||||||
|
url: 'Workers/activeWithInheritedRole',
|
||||||
|
fields: ['id', 'name'],
|
||||||
|
where: { role: 'buyer' },
|
||||||
|
optionFilter: 'firstName',
|
||||||
|
optionLabel: 'name',
|
||||||
|
optionValue: 'id',
|
||||||
|
useLike: false,
|
||||||
|
},
|
||||||
|
inWhere: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -135,24 +137,27 @@ const columns = computed(() => [
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
auto-load
|
auto-load
|
||||||
:right-search="false"
|
:right-search="false"
|
||||||
:is-editable="false"
|
|
||||||
:use-model="true"
|
|
||||||
redirect="item/item-type"
|
redirect="item/item-type"
|
||||||
/>
|
>
|
||||||
|
<template #column-workerFk="{ row }">
|
||||||
|
<span class="link" @click.stop>
|
||||||
|
{{ row.worker?.user?.name }}
|
||||||
|
<WorkerDescriptorProxy :id="row.workerFk" />
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</VnTable>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
es:
|
es:
|
||||||
id: Id
|
id: Id
|
||||||
code: Código
|
code: Código
|
||||||
name: Nombre
|
|
||||||
worker: Trabajador
|
worker: Trabajador
|
||||||
ItemCategory: Reino
|
ItemCategory: Reino
|
||||||
Temperature: Temperatura
|
Temperature: Temperatura
|
||||||
Create ItemTypes: Crear familia
|
Create ItemTypes: Crear familia
|
||||||
en:
|
en:
|
||||||
code: Code
|
code: Code
|
||||||
name: Name
|
|
||||||
worker: Worker
|
worker: Worker
|
||||||
ItemCategory: ItemCategory
|
ItemCategory: ItemCategory
|
||||||
Temperature: Temperature
|
Temperature: Temperature
|
||||||
|
|
|
@ -95,6 +95,15 @@ item:
|
||||||
mine: For me
|
mine: For me
|
||||||
state: State
|
state: State
|
||||||
myTeam: My team
|
myTeam: My team
|
||||||
|
shipped: Shipped
|
||||||
|
description: Description
|
||||||
|
quantity: Quantity
|
||||||
|
price: Price
|
||||||
|
item: Item
|
||||||
|
achieved: Achieved
|
||||||
|
concept: Concept
|
||||||
|
denyOptions: Deny
|
||||||
|
scopeDays: Scope days
|
||||||
searchbar:
|
searchbar:
|
||||||
label: Search item
|
label: Search item
|
||||||
descriptor:
|
descriptor:
|
||||||
|
@ -112,7 +121,7 @@ item:
|
||||||
title: All its properties will be copied
|
title: All its properties will be copied
|
||||||
subTitle: Do you want to clone this item?
|
subTitle: Do you want to clone this item?
|
||||||
list:
|
list:
|
||||||
id: Identifier
|
id: Id
|
||||||
grouping: Grouping
|
grouping: Grouping
|
||||||
packing: Packing
|
packing: Packing
|
||||||
description: Description
|
description: Description
|
||||||
|
@ -122,8 +131,9 @@ item:
|
||||||
intrastat: Intrastat
|
intrastat: Intrastat
|
||||||
isActive: Active
|
isActive: Active
|
||||||
size: Size
|
size: Size
|
||||||
origin: Origin
|
origin: Orig.
|
||||||
userName: Buyer
|
userName: Buyer
|
||||||
|
weight: Weight
|
||||||
weightByPiece: Weight/Piece
|
weightByPiece: Weight/Piece
|
||||||
stemMultiplier: Multiplier
|
stemMultiplier: Multiplier
|
||||||
producer: Producer
|
producer: Producer
|
||||||
|
|
|
@ -97,6 +97,15 @@ item:
|
||||||
mine: Para mi
|
mine: Para mi
|
||||||
state: Estado
|
state: Estado
|
||||||
myTeam: Mi equipo
|
myTeam: Mi equipo
|
||||||
|
shipped: Enviado
|
||||||
|
description: Descripción
|
||||||
|
quantity: Cantidad
|
||||||
|
price: Precio
|
||||||
|
item: Artículo
|
||||||
|
achieved: Conseguido
|
||||||
|
concept: Concepto
|
||||||
|
denyOptions: Denegado
|
||||||
|
scopeDays: Días en adelante
|
||||||
searchbar:
|
searchbar:
|
||||||
label: Buscar artículo
|
label: Buscar artículo
|
||||||
descriptor:
|
descriptor:
|
||||||
|
@ -114,7 +123,7 @@ item:
|
||||||
title: Todas sus propiedades serán copiadas
|
title: Todas sus propiedades serán copiadas
|
||||||
subTitle: ¿Desea clonar este artículo?
|
subTitle: ¿Desea clonar este artículo?
|
||||||
list:
|
list:
|
||||||
id: Identificador
|
id: Id
|
||||||
grouping: Grouping
|
grouping: Grouping
|
||||||
packing: Packing
|
packing: Packing
|
||||||
description: Descripción
|
description: Descripción
|
||||||
|
@ -124,7 +133,8 @@ item:
|
||||||
intrastat: Intrastat
|
intrastat: Intrastat
|
||||||
isActive: Activo
|
isActive: Activo
|
||||||
size: Medida
|
size: Medida
|
||||||
origin: Origen
|
origin: Orig.
|
||||||
|
weight: Peso
|
||||||
weightByPiece: Peso (gramos)/tallo
|
weightByPiece: Peso (gramos)/tallo
|
||||||
userName: Comprador
|
userName: Comprador
|
||||||
stemMultiplier: Multiplicador
|
stemMultiplier: Multiplicador
|
||||||
|
|
|
@ -9,6 +9,7 @@ import VnInput from 'src/components/common/VnInput.vue';
|
||||||
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
||||||
import FetchData from 'src/components/FetchData.vue';
|
import FetchData from 'src/components/FetchData.vue';
|
||||||
import { dateRange } from 'src/filters';
|
import { dateRange } from 'src/filters';
|
||||||
|
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
|
||||||
|
|
||||||
defineProps({ dataKey: { type: String, required: true } });
|
defineProps({ dataKey: { type: String, required: true } });
|
||||||
const { t, te } = useI18n();
|
const { t, te } = useI18n();
|
||||||
|
@ -112,33 +113,16 @@ const getLocale = (label) => {
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnSelect
|
<VnSelectWorker
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
rounded
|
rounded
|
||||||
:label="t('globals.params.salesPersonFk')"
|
:label="t('globals.params.salesPersonFk')"
|
||||||
v-model="params.salesPersonFk"
|
v-model="params.salesPersonFk"
|
||||||
url="Workers/search"
|
|
||||||
:params="{ departmentCodes: ['VT'] }"
|
:params="{ departmentCodes: ['VT'] }"
|
||||||
is-outlined
|
|
||||||
option-value="id"
|
|
||||||
option-label="name"
|
|
||||||
:no-one="true"
|
:no-one="true"
|
||||||
>
|
>
|
||||||
<template #option="{ opt, itemProps }">
|
</VnSelectWorker>
|
||||||
<QItem v-bind="itemProps">
|
|
||||||
<QItemSection>
|
|
||||||
<QItemLabel>{{ opt.name }}</QItemLabel>
|
|
||||||
<QItemLabel
|
|
||||||
v-if="opt.code"
|
|
||||||
class="text-grey text-caption"
|
|
||||||
>
|
|
||||||
{{ `${opt.nickname}, ${opt.code}` }}
|
|
||||||
</QItemLabel>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
</template>
|
|
||||||
</VnSelect>
|
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem>
|
<QItem>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
import { onMounted, onUnmounted, ref, computed, watch } from 'vue';
|
import { onMounted, ref, computed, watch } from 'vue';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
||||||
|
@ -29,8 +29,6 @@ onMounted(() => {
|
||||||
checkOrderConfirmation();
|
checkOrderConfirmation();
|
||||||
});
|
});
|
||||||
|
|
||||||
onUnmounted(() => (stateStore.rightDrawer = false));
|
|
||||||
|
|
||||||
async function checkOrderConfirmation() {
|
async function checkOrderConfirmation() {
|
||||||
const response = await axios.get(`Orders/${route.params.id}`);
|
const response = await axios.get(`Orders/${route.params.id}`);
|
||||||
if (response.data.isConfirmed === 1) {
|
if (response.data.isConfirmed === 1) {
|
||||||
|
|
|
@ -6,6 +6,7 @@ import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
||||||
import VnSelect from 'components/common/VnSelect.vue';
|
import VnSelect from 'components/common/VnSelect.vue';
|
||||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||||
import VnInput from 'components/common/VnInput.vue';
|
import VnInput from 'components/common/VnInput.vue';
|
||||||
|
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
@ -61,28 +62,16 @@ const sourceList = ref([]);
|
||||||
outlined
|
outlined
|
||||||
rounded
|
rounded
|
||||||
/>
|
/>
|
||||||
<VnSelect
|
<VnSelectWorker
|
||||||
:label="t('salesPerson')"
|
:label="t('globals.salesPerson')"
|
||||||
v-model="params.workerFk"
|
v-model="params.workerFk"
|
||||||
url="Workers/search"
|
:params="{
|
||||||
:filter="{ departmentCodes: ['VT'] }"
|
departmentCodes: ['VT'],
|
||||||
sort-by="nickname ASC"
|
}"
|
||||||
option-label="nickname"
|
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
rounded
|
rounded
|
||||||
>
|
/>
|
||||||
<template #option="{ itemProps, opt }">
|
|
||||||
<QItem v-bind="itemProps">
|
|
||||||
<QItemSection>
|
|
||||||
<QItemLabel>{{ opt.name }}</QItemLabel>
|
|
||||||
<QItemLabel caption>
|
|
||||||
{{ opt.nickname }},{{ opt.code }}
|
|
||||||
</QItemLabel>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
</template>
|
|
||||||
</VnSelect>
|
|
||||||
<VnInputDate
|
<VnInputDate
|
||||||
v-model="params.from"
|
v-model="params.from"
|
||||||
:label="t('fromLanded')"
|
:label="t('fromLanded')"
|
||||||
|
|
|
@ -4,6 +4,7 @@ import VnFilterPanel from 'components/ui/VnFilterPanel.vue';
|
||||||
import VnSelect from 'components/common/VnSelect.vue';
|
import VnSelect from 'components/common/VnSelect.vue';
|
||||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||||
import VnInput from 'components/common/VnInput.vue';
|
import VnInput from 'components/common/VnInput.vue';
|
||||||
|
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
@ -31,29 +32,13 @@ const emit = defineEmits(['search']);
|
||||||
<template #body="{ params }">
|
<template #body="{ params }">
|
||||||
<QItem class="q-my-sm">
|
<QItem class="q-my-sm">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnSelect
|
<VnSelectWorker
|
||||||
:label="t('Worker')"
|
|
||||||
v-model="params.workerFk"
|
v-model="params.workerFk"
|
||||||
url="Workers/search"
|
|
||||||
sort-by="nickname ASC"
|
|
||||||
option-value="id"
|
|
||||||
option-label="nickname"
|
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
rounded
|
rounded
|
||||||
:input-debounce="0"
|
:input-debounce="0"
|
||||||
>
|
/>
|
||||||
<template #option="{ itemProps, opt }">
|
|
||||||
<QItem v-bind="itemProps">
|
|
||||||
<QItemSection>
|
|
||||||
<QItemLabel>{{ opt.name }}</QItemLabel>
|
|
||||||
<QItemLabel caption>
|
|
||||||
{{ opt.nickname }},{{ opt.code }}
|
|
||||||
</QItemLabel>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
</template>
|
|
||||||
</VnSelect>
|
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem class="q-my-sm">
|
<QItem class="q-my-sm">
|
||||||
|
|
|
@ -11,6 +11,7 @@ import VnInputDate from 'components/common/VnInputDate.vue';
|
||||||
import VnInput from 'components/common/VnInput.vue';
|
import VnInput from 'components/common/VnInput.vue';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import VnInputTime from 'components/common/VnInputTime.vue';
|
import VnInputTime from 'components/common/VnInputTime.vue';
|
||||||
|
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
@ -94,26 +95,7 @@ const onSave = (data, response) => {
|
||||||
>
|
>
|
||||||
<template #form="{ data }">
|
<template #form="{ data }">
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnSelect
|
<VnSelectWorker v-model="data.workerFk" />
|
||||||
:label="t('Worker')"
|
|
||||||
v-model="data.workerFk"
|
|
||||||
url="Workers/search"
|
|
||||||
sort-by="nickname ASC"
|
|
||||||
option-value="id"
|
|
||||||
option-label="nickname"
|
|
||||||
:input-debounce="0"
|
|
||||||
>
|
|
||||||
<template #option="{ itemProps, opt }">
|
|
||||||
<QItem v-bind="itemProps">
|
|
||||||
<QItemSection>
|
|
||||||
<QItemLabel>{{ opt.name }}</QItemLabel>
|
|
||||||
<QItemLabel caption>
|
|
||||||
{{ opt.nickname }}, {{ opt.code }}
|
|
||||||
</QItemLabel>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
</template>
|
|
||||||
</VnSelect>
|
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('Vehicle')"
|
:label="t('Vehicle')"
|
||||||
v-model="data.vehicleFk"
|
v-model="data.vehicleFk"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import VnPaginate from 'components/ui/VnPaginate.vue';
|
import VnPaginate from 'components/ui/VnPaginate.vue';
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { onMounted, onUnmounted } from 'vue';
|
import { onMounted } from 'vue';
|
||||||
import CardList from 'components/ui/CardList.vue';
|
import CardList from 'components/ui/CardList.vue';
|
||||||
import VnLv from 'components/ui/VnLv.vue';
|
import VnLv from 'components/ui/VnLv.vue';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
|
@ -21,7 +21,6 @@ const filter = {
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => (stateStore.rightDrawer = true));
|
onMounted(() => (stateStore.rightDrawer = true));
|
||||||
onUnmounted(() => (stateStore.rightDrawer = false));
|
|
||||||
|
|
||||||
function navigate(id) {
|
function navigate(id) {
|
||||||
router.push({ path: `/shelving/${id}` });
|
router.push({ path: `/shelving/${id}` });
|
||||||
|
|
|
@ -5,6 +5,7 @@ import FormModel from 'components/FormModel.vue';
|
||||||
import VnRow from 'components/ui/VnRow.vue';
|
import VnRow from 'components/ui/VnRow.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
|
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -30,31 +31,11 @@ const companySizes = [
|
||||||
:rules="validate('supplier.nickname')"
|
:rules="validate('supplier.nickname')"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
<VnSelect
|
<VnSelectWorker
|
||||||
:label="t('supplier.basicData.workerFk')"
|
|
||||||
v-model="data.workerFk"
|
v-model="data.workerFk"
|
||||||
url="Workers/search"
|
has-info="Responsible for approving invoices"
|
||||||
sort-by="nickname ASC"
|
|
||||||
:rules="validate('supplier.workerFk')"
|
:rules="validate('supplier.workerFk')"
|
||||||
>
|
/>
|
||||||
<template #append>
|
|
||||||
<QIcon name="info" class="cursor-pointer">
|
|
||||||
<QTooltip>{{
|
|
||||||
t('Responsible for approving invoices')
|
|
||||||
}}</QTooltip>
|
|
||||||
</QIcon>
|
|
||||||
</template>
|
|
||||||
<template #option="scope">
|
|
||||||
<QItem v-bind="scope.itemProps">
|
|
||||||
<QItemSection>
|
|
||||||
<QItemLabel>{{ scope.opt?.name }}</QItemLabel>
|
|
||||||
<QItemLabel caption>
|
|
||||||
{{ scope.opt?.nickname }}, {{ scope.opt?.id }}
|
|
||||||
</QItemLabel>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
</template>
|
|
||||||
</VnSelect>
|
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('supplier.basicData.size')"
|
:label="t('supplier.basicData.size')"
|
||||||
v-model="data.companySize"
|
v-model="data.companySize"
|
||||||
|
@ -102,6 +83,5 @@ const companySizes = [
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
es:
|
es:
|
||||||
Responsible for approving invoices: Responsable de aprobar las facturas
|
|
||||||
Small(1-5), Medium(6-50), Big(> 50): Pequeño(1-5), Mediano(6-50), Grande(> 50)
|
Small(1-5), Medium(6-50), Big(> 50): Pequeño(1-5), Mediano(6-50), Grande(> 50)
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed, onMounted, onUnmounted, watch } from 'vue';
|
import { ref, computed, onMounted, watch } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
||||||
|
@ -134,8 +134,6 @@ onMounted(() => {
|
||||||
loadDefaultTicketAction();
|
loadDefaultTicketAction();
|
||||||
ticketHaveNegatives();
|
ticketHaveNegatives();
|
||||||
});
|
});
|
||||||
|
|
||||||
onUnmounted(() => (stateStore.rightDrawer = false));
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed, onMounted, onUnmounted, watch, nextTick } from 'vue';
|
import { ref, computed, onMounted, watch, nextTick } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
|
|
||||||
|
@ -168,8 +168,6 @@ const getTicketVolume = async () => {
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
stateStore.rightDrawer = true;
|
stateStore.rightDrawer = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
onUnmounted(() => (stateStore.rightDrawer = false));
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -9,6 +9,7 @@ import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
|
|
||||||
import { useState } from 'src/composables/useState';
|
import { useState } from 'src/composables/useState';
|
||||||
|
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
|
||||||
|
|
||||||
const emit = defineEmits(['onRequestCreated']);
|
const emit = defineEmits(['onRequestCreated']);
|
||||||
|
|
||||||
|
@ -46,29 +47,7 @@ const onStateFkChange = (formData) => (formData.userFk = user.value.id);
|
||||||
option-label="name"
|
option-label="name"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
/>
|
/>
|
||||||
<VnSelect
|
<VnSelectWorker v-model="data.userFk" :fields="['id', 'name']" />
|
||||||
:label="t('expedition.worker')"
|
|
||||||
v-model="data.userFk"
|
|
||||||
url="Workers/search"
|
|
||||||
fields=" ['id', 'name']"
|
|
||||||
sort-by="name ASC"
|
|
||||||
hide-selected
|
|
||||||
option-label="name"
|
|
||||||
option-value="id"
|
|
||||||
>
|
|
||||||
<template #option="{ opt, itemProps }">
|
|
||||||
<QItem v-bind="itemProps">
|
|
||||||
<QItemSection>
|
|
||||||
<QItemLabel>
|
|
||||||
{{ opt.name }}
|
|
||||||
</QItemLabel>
|
|
||||||
<QItemLabel caption>
|
|
||||||
{{ opt.nickname }}, {{ opt.code }}
|
|
||||||
</QItemLabel>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
</template></VnSelect
|
|
||||||
>
|
|
||||||
</VnRow>
|
</VnRow>
|
||||||
</template>
|
</template>
|
||||||
</FormModelPopup>
|
</FormModelPopup>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, ref, computed, onUnmounted } from 'vue';
|
import { onMounted, ref, computed } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
|
|
||||||
|
@ -197,8 +197,6 @@ onMounted(async () => {
|
||||||
const filteredColumns = columns.value.filter((col) => col.name !== 'history');
|
const filteredColumns = columns.value.filter((col) => col.name !== 'history');
|
||||||
allColumnNames.value = filteredColumns.map((col) => col.name);
|
allColumnNames.value = filteredColumns.map((col) => col.name);
|
||||||
});
|
});
|
||||||
|
|
||||||
onUnmounted(() => (stateStore.rightDrawer = false));
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, ref, computed, onUnmounted, watch } from 'vue';
|
import { onMounted, ref, computed, watch } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRouter, useRoute } from 'vue-router';
|
import { useRouter, useRoute } from 'vue-router';
|
||||||
import { useQuasar } from 'quasar';
|
import { useQuasar } from 'quasar';
|
||||||
|
@ -421,8 +421,6 @@ onMounted(async () => {
|
||||||
getConfig();
|
getConfig();
|
||||||
});
|
});
|
||||||
|
|
||||||
onUnmounted(() => (stateStore.rightDrawer = false));
|
|
||||||
|
|
||||||
const items = ref([]);
|
const items = ref([]);
|
||||||
const newRow = ref({});
|
const newRow = ref({});
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed, onMounted, onUnmounted, watch, nextTick } from 'vue';
|
import { ref, computed, onMounted, watch, nextTick } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
|
|
||||||
|
@ -90,8 +90,6 @@ const applyVolumes = async (salesData) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => (stateStore.rightDrawer = true));
|
onMounted(() => (stateStore.rightDrawer = true));
|
||||||
|
|
||||||
onUnmounted(() => (stateStore.rightDrawer = false));
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -57,7 +57,6 @@ onMounted(async () => await getItemPackingTypes());
|
||||||
search-url="advanceTickets"
|
search-url="advanceTickets"
|
||||||
:data-key="props.dataKey"
|
:data-key="props.dataKey"
|
||||||
:search-button="true"
|
:search-button="true"
|
||||||
:hidden-tags="['search']"
|
|
||||||
:unremovable-params="['warehouseFk', 'dateFuture', 'dateToAdvance']"
|
:unremovable-params="['warehouseFk', 'dateFuture', 'dateToAdvance']"
|
||||||
>
|
>
|
||||||
<template #tags="{ tag, formatFn }">
|
<template #tags="{ tag, formatFn }">
|
||||||
|
|
|
@ -59,7 +59,6 @@ onMounted(async () => {
|
||||||
/>
|
/>
|
||||||
<VnFilterPanel
|
<VnFilterPanel
|
||||||
:data-key="props.dataKey"
|
:data-key="props.dataKey"
|
||||||
:hidden-tags="['search']"
|
|
||||||
:un-removable-params="['warehouseFk', 'originScopeDays ', 'futureScopeDays']"
|
:un-removable-params="['warehouseFk', 'originScopeDays ', 'futureScopeDays']"
|
||||||
>
|
>
|
||||||
<template #tags="{ tag, formatFn }">
|
<template #tags="{ tag, formatFn }">
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, ref, computed, onUnmounted } from 'vue';
|
import { onMounted, ref, computed } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
import VnSelectCache from 'src/components/common/VnSelectCache.vue';
|
import VnSelectCache from 'src/components/common/VnSelectCache.vue';
|
||||||
|
@ -170,8 +170,6 @@ onMounted(async () => {
|
||||||
const filteredColumns = columns.value.filter((col) => col.name !== 'actions');
|
const filteredColumns = columns.value.filter((col) => col.name !== 'actions');
|
||||||
allColumnNames.value = filteredColumns.map((col) => col.name);
|
allColumnNames.value = filteredColumns.map((col) => col.name);
|
||||||
});
|
});
|
||||||
|
|
||||||
onUnmounted(() => (stateStore.rightDrawer = false));
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -133,6 +133,7 @@ function reloadData() {
|
||||||
option-value="id"
|
option-value="id"
|
||||||
id="deviceProductionFk"
|
id="deviceProductionFk"
|
||||||
hide-selected
|
hide-selected
|
||||||
|
data-cy="pda-dialog-select"
|
||||||
>
|
>
|
||||||
<template #option="scope">
|
<template #option="scope">
|
||||||
<QItem v-bind="scope.itemProps">
|
<QItem v-bind="scope.itemProps">
|
||||||
|
|
|
@ -14,6 +14,7 @@ import FormModel from 'components/FormModel.vue';
|
||||||
import CreateBankEntityForm from 'src/components/CreateBankEntityForm.vue';
|
import CreateBankEntityForm from 'src/components/CreateBankEntityForm.vue';
|
||||||
import VnRadio from 'src/components/common/VnRadio.vue';
|
import VnRadio from 'src/components/common/VnRadio.vue';
|
||||||
import { useState } from 'src/composables/useState';
|
import { useState } from 'src/composables/useState';
|
||||||
|
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const user = useState().getUser();
|
const user = useState().getUser();
|
||||||
|
@ -149,27 +150,11 @@ async function autofillBic(worker) {
|
||||||
hide-selected
|
hide-selected
|
||||||
:rules="validate('Worker.company')"
|
:rules="validate('Worker.company')"
|
||||||
/>
|
/>
|
||||||
<VnSelect
|
<VnSelectWorker
|
||||||
:label="t('worker.summary.boss')"
|
:label="t('worker.summary.boss')"
|
||||||
v-model="data.bossFk"
|
v-model="data.bossFk"
|
||||||
url="Workers/search"
|
|
||||||
option-value="id"
|
|
||||||
option-label="name"
|
|
||||||
hide-selected
|
|
||||||
:rules="validate('Worker.boss')"
|
:rules="validate('Worker.boss')"
|
||||||
>
|
/>
|
||||||
<template #option="scope">
|
|
||||||
<QItem v-bind="scope.itemProps">
|
|
||||||
<QItemSection>
|
|
||||||
<QItemLabel>{{ scope.opt.name }}</QItemLabel>
|
|
||||||
<QItemLabel caption
|
|
||||||
>{{ scope.opt.nickname }},
|
|
||||||
{{ scope.opt.code }}
|
|
||||||
</QItemLabel>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
</template>
|
|
||||||
</VnSelect>
|
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnInput
|
<VnInput
|
||||||
|
|
|
@ -18,6 +18,7 @@ import RightMenu from 'src/components/common/RightMenu.vue';
|
||||||
import WorkerFilter from './WorkerFilter.vue';
|
import WorkerFilter from './WorkerFilter.vue';
|
||||||
import { useState } from 'src/composables/useState';
|
import { useState } from 'src/composables/useState';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
|
@ -260,26 +261,10 @@ async function autofillBic(worker) {
|
||||||
option-label="code"
|
option-label="code"
|
||||||
hide-selected
|
hide-selected
|
||||||
/>
|
/>
|
||||||
<VnSelect
|
<VnSelectWorker
|
||||||
:label="t('worker.summary.boss')"
|
:label="t('worker.summary.boss')"
|
||||||
v-model="data.bossFk"
|
v-model="data.bossFk"
|
||||||
url="Workers/search"
|
/>
|
||||||
option-value="id"
|
|
||||||
option-label="name"
|
|
||||||
hide-selected
|
|
||||||
>
|
|
||||||
<template #option="scope">
|
|
||||||
<QItem v-bind="scope.itemProps">
|
|
||||||
<QItemSection>
|
|
||||||
<QItemLabel>{{ scope.opt.name }}</QItemLabel>
|
|
||||||
<QItemLabel caption
|
|
||||||
>{{ scope.opt.nickname }},
|
|
||||||
{{ scope.opt.code }}
|
|
||||||
</QItemLabel>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
</template>
|
|
||||||
</VnSelect>
|
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnInput v-model="data.fi" :label="t('worker.create.fi')" />
|
<VnInput v-model="data.fi" :label="t('worker.create.fi')" />
|
||||||
|
@ -376,6 +361,7 @@ async function autofillBic(worker) {
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
es:
|
es:
|
||||||
|
Create worker: Crear trabajador
|
||||||
Search worker: Buscar trabajador
|
Search worker: Buscar trabajador
|
||||||
You can search by worker id or name: Puedes buscar por id o nombre del trabajador
|
You can search by worker id or name: Puedes buscar por id o nombre del trabajador
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -32,7 +32,12 @@ const agencyOptions = ref([]);
|
||||||
<FormModel :url="`Zones/${route.params.id}`" auto-load model="zone">
|
<FormModel :url="`Zones/${route.params.id}`" auto-load model="zone">
|
||||||
<template #form="{ data, validate }">
|
<template #form="{ data, validate }">
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnInput :label="t('Name')" clearable v-model="data.name" />
|
<VnInput
|
||||||
|
data-cy="zone-basic-data-name"
|
||||||
|
:label="t('Name')"
|
||||||
|
clearable
|
||||||
|
v-model="data.name"
|
||||||
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
|
|
||||||
<VnRow>
|
<VnRow>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onUnmounted } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
import ZoneEventsPanel from './ZoneEventsPanel.vue';
|
import ZoneEventsPanel from './ZoneEventsPanel.vue';
|
||||||
|
@ -40,8 +40,6 @@ const onZoneEventFormClose = () => {
|
||||||
showZoneEventForm.value = false;
|
showZoneEventForm.value = false;
|
||||||
zoneEventsFormProps.value = {};
|
zoneEventsFormProps.value = {};
|
||||||
};
|
};
|
||||||
|
|
||||||
onUnmounted(() => (stateStore.rightDrawer = false));
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -28,11 +28,7 @@ const agencies = ref([]);
|
||||||
@on-fetch="(data) => (agencies = data)"
|
@on-fetch="(data) => (agencies = data)"
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
<VnFilterPanel
|
<VnFilterPanel :data-key="props.dataKey" :search-button="true">
|
||||||
:data-key="props.dataKey"
|
|
||||||
:search-button="true"
|
|
||||||
:hidden-tags="['search']"
|
|
||||||
>
|
|
||||||
<template #tags="{ tag }">
|
<template #tags="{ tag }">
|
||||||
<div class="q-gutter-x-xs">
|
<div class="q-gutter-x-xs">
|
||||||
<strong>{{ t(`filterPanel.${tag.label}`) }}: </strong>
|
<strong>{{ t(`filterPanel.${tag.label}`) }}: </strong>
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
describe('WorkerPda', () => {
|
describe('WorkerPda', () => {
|
||||||
const deviceProductionField =
|
const select = '[data-cy="pda-dialog-select"]';
|
||||||
'.vn-row > .q-field > .q-field__inner > .q-field__control > .q-field__control-container';
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.viewport(1920, 1080);
|
cy.viewport(1920, 1080);
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
|
@ -9,7 +8,8 @@ describe('WorkerPda', () => {
|
||||||
|
|
||||||
it('assign pda', () => {
|
it('assign pda', () => {
|
||||||
cy.get('.q-page-sticky > div > .q-btn > .q-btn__content > .q-icon').click();
|
cy.get('.q-page-sticky > div > .q-btn > .q-btn__content > .q-icon').click();
|
||||||
cy.get(deviceProductionField).type('{downArrow}{enter}');
|
cy.get(select).click();
|
||||||
|
cy.get(select).type('{downArrow}{enter}');
|
||||||
cy.get('.q-notification__message').should('have.text', 'Data created');
|
cy.get('.q-notification__message').should('have.text', 'Data created');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ describe('ZoneBasicData', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should throw an error if the name is empty', () => {
|
it('should throw an error if the name is empty', () => {
|
||||||
cy.get('.q-card > :nth-child(1)').clear();
|
cy.get('[data-cy="zone-basic-data-name"] input').type('{selectall}{backspace}');
|
||||||
cy.get('.q-btn-group > .q-btn--standard').click();
|
cy.get('.q-btn-group > .q-btn--standard').click();
|
||||||
cy.get(notification).should('contains.text', "can't be blank");
|
cy.get(notification).should('contains.text', "can't be blank");
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue