-
+ |
{{ item.warehouse }}
|
-
+ |
{
diff --git a/src/pages/Order/Card/OrderDescriptor.vue b/src/pages/Order/Card/OrderDescriptor.vue
index 4d84a32fc..a035971b0 100644
--- a/src/pages/Order/Card/OrderDescriptor.vue
+++ b/src/pages/Order/Card/OrderDescriptor.vue
@@ -4,13 +4,13 @@ import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
import { toCurrency, toDate } from 'src/filters';
import { useState } from 'src/composables/useState';
-
import useCardDescription from 'src/composables/useCardDescription';
-import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
+
import CardDescriptor from 'components/ui/CardDescriptor.vue';
import VnLv from 'src/components/ui/VnLv.vue';
-import OrderDescriptorMenu from 'pages/Order/Card/OrderDescriptorMenu.vue';
import FetchData from 'components/FetchData.vue';
+import OrderDescriptorMenu from 'pages/Order/Card/OrderDescriptorMenu.vue';
+import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
const DEFAULT_ITEMS = 0;
@@ -25,6 +25,8 @@ const $props = defineProps({
const route = useRoute();
const state = useState();
const { t } = useI18n();
+const data = ref(useCardDescription());
+const getTotalRef = ref();
const entityId = computed(() => {
return $props.id || route.params.id;
@@ -57,11 +59,11 @@ const filter = {
],
};
-const data = ref(useCardDescription());
const setData = (entity) => {
if (!entity) return;
+ getTotalRef.value && getTotalRef.value.fetch();
data.value = useCardDescription(entity?.client?.name, entity?.id);
- state.set('OrderDescriptor', entity);
+ state.set('orderData', entity);
};
const getConfirmationValue = (isConfirmed) => {
@@ -69,13 +71,17 @@ const getConfirmationValue = (isConfirmed) => {
};
const total = ref(null);
+
+function ticketFilter(order) {
+ return JSON.stringify({ id: order.id });
+}
(total = response)"
- auto-load
/>
{{ t('order.summary.orderTicketList') }}
diff --git a/src/pages/Order/Card/OrderFilter.vue b/src/pages/Order/Card/OrderFilter.vue
index 347affb04..be47eed54 100644
--- a/src/pages/Order/Card/OrderFilter.vue
+++ b/src/pages/Order/Card/OrderFilter.vue
@@ -21,15 +21,13 @@ const salesPersonFilter = {
fields: ['id', 'nickname'],
};
const salesPersonList = ref(null);
-const sourceFilter = { fields: ['value'] };
-const sourceList = ref(null);
+const sourceList = ref([]);
(agencyList = data)"
@@ -37,7 +35,6 @@ const sourceList = ref(null);
(salesPersonList = data)"
:params="{ departmentCodes: ['VT'] }"
@@ -45,8 +42,7 @@ const sourceList = ref(null);
/>
(sourceList = data)"
auto-load
@@ -59,148 +55,88 @@ const sourceList = ref(null);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ opt.name }}
-
- {{ opt.nickname }},{{ opt.code }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+ {{ opt.name }}
+
+ {{ opt.nickname }},{{ opt.code }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/Order/OrderLines.vue b/src/pages/Order/Card/OrderLines.vue
similarity index 71%
rename from src/pages/Order/OrderLines.vue
rename to src/pages/Order/Card/OrderLines.vue
index 9814eaf34..dab4a959c 100644
--- a/src/pages/Order/OrderLines.vue
+++ b/src/pages/Order/Card/OrderLines.vue
@@ -1,23 +1,26 @@
@@ -204,78 +235,80 @@ async function confirmOrder() {
auto-load
/>
(orderSummary.total = data)"
auto-load
/>
(orderSummary.vat = data)"
auto-load
/>
-
+
-
-
+
+
-
-
-
- {{ t('globals.noResults') }}
-
-
-
-
-
-
-
-
-
- {{ row?.item?.name }}
-
- {{ row?.item?.subName.toUpperCase() }}
-
-
-
-
-
-
-
-
-
- {{ t('confirm') }}
-
-
-
+
+
+
+
+
+
+
+
+
+ {{ row?.item?.name }}
+
+ {{ row?.item?.subName.toUpperCase() }}
+
+
+
+
+
+ {{ toCurrency(row.quantity * row.price) }}
+
+
+
+
+
+
+
+
+ {{ t('confirm') }}
+
+
+
+en:
+ summary: Summary
+ total: Total
+ boxes: Boxes
+ item: Item
+ quantity: Quantity
+ volume: m³ per quantity
+es:
+ summary: Resumen
+ total: Total
+ boxes: Cajas
+ item: Artículo
+ quantity: Cantidad
+ volume: m³ por cantidad
+
diff --git a/src/pages/Order/OrderList.vue b/src/pages/Order/OrderList.vue
index 945f61f3b..9870be9b3 100644
--- a/src/pages/Order/OrderList.vue
+++ b/src/pages/Order/OrderList.vue
@@ -3,19 +3,21 @@ import axios from 'axios';
import { useI18n } from 'vue-i18n';
import { computed, ref } from 'vue';
import { dashIfEmpty, toCurrency, toDate } from 'src/filters';
-import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
import OrderSummary from 'pages/Order/Card/OrderSummary.vue';
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
import VnTable from 'src/components/VnTable/VnTable.vue';
import VnInputDate from 'src/components/common/VnInputDate.vue';
import VnSelect from 'src/components/common/VnSelect.vue';
+import OrderSearchbar from './Card/OrderSearchbar.vue';
+import RightMenu from 'src/components/common/RightMenu.vue';
+import OrderFilter from './Card/OrderFilter.vue';
const { t } = useI18n();
const { viewSummary } = useSummaryDialog();
const tableRef = ref();
-const clientList = ref([]);
const agencyList = ref([]);
-const selectedAddress = ref();
+const addressesList = ref([]);
+const clientId = ref();
const columns = computed(() => [
{
@@ -29,7 +31,7 @@ const columns = computed(() => [
},
{
align: 'left',
- name: 'clientName',
+ name: 'clientFk',
label: t('module.customer'),
isTitle: true,
cardVisible: true,
@@ -41,20 +43,26 @@ const columns = computed(() => [
columnField: {
component: null,
},
+ format: (row) => row?.clientName,
},
{
align: 'left',
- name: 'name',
+ name: 'salesPersonFk',
label: t('module.salesPerson'),
- component: 'select',
- attrs: {
- url: 'Workers/activeWithInheritedRole',
- fields: ['id', 'name'],
- where: { role: 'salesPerson' },
- },
- columnField: {
- component: null,
+ columnFilter: {
+ component: 'select',
+ inWhere: true,
+ attrs: {
+ url: 'Workers/activeWithInheritedRole',
+ fields: ['id', 'name'],
+ where: { role: 'salesPerson' },
+ useLike: false,
+ optionValue: 'id',
+ optionLabel: 'name',
+ optionFilter: 'firstName',
+ },
},
+ format: (row) => row?.name,
},
{
align: 'left',
@@ -92,17 +100,21 @@ const columns = computed(() => [
},
{
align: 'left',
- name: 'agencyName',
+ name: 'agencyModeFk',
label: t('module.agency'),
- component: 'select',
+ format: (row) => row?.agencyName,
+ columnFilter: {
+ component: 'select',
+ attrs: {
+ url: 'agencyModes',
+ fields: ['id', 'name'],
+ find: {
+ value: 'agencyModeFk',
+ label: 'agencyName',
+ },
+ },
+ },
cardVisible: true,
- attrs: {
- url: 'Agencies',
- fields: ['id', 'name'],
- },
- columnField: {
- component: null,
- },
},
{
align: 'left',
@@ -125,22 +137,36 @@ const columns = computed(() => [
},
]);
-async function fetchClientAddress(id, data) {
- const clientData = await axios.get(`Clients/${id}`);
- selectedAddress.value = clientData.data.defaultAddressFk;
- data.addressId = selectedAddress.value;
+async function fetchClientAddress(id, formData) {
+ const { data } = await axios.get(`Clients/${id}`, {
+ params: { filter: { include: { relation: 'addresses' } } },
+ });
+ addressesList.value = data.addresses;
+ formData.addressId = data.defaultAddressFk;
+ fetchAgencies(formData);
+}
+
+async function fetchAgencies({ landed, addressId }) {
+ if (!landed || !addressId) return (agencyList.value = []);
+
+ const { data } = await axios.get('Agencies/landsThatDay', {
+ params: { addressFk: addressId, landed },
+ });
+ agencyList.value = data;
}
-
+
+
+
+
+
+
fetchClientAddress(id, data)"
/>
fetchAgencies(data)"
+ >
+
+
+
+
+ {{ scope.opt?.nickname }}: {{ scope.opt?.street }},
+ {{ scope.opt?.city }}
+
+
+
+
+ fetchAgencies(data)"
/>
-
diff --git a/src/pages/Order/OrderVolume.vue b/src/pages/Order/OrderVolume.vue
deleted file mode 100644
index 35d68de16..000000000
--- a/src/pages/Order/OrderVolume.vue
+++ /dev/null
@@ -1,156 +0,0 @@
-
-
-
- (volumeSummary = data)"
- auto-load
- />
-
-
-
- {{ t('globals.noResults') }}
-
-
-
-
-
-
- loadVolumes(data)"
- >
-
-
-
-
-
-
-
-
-
-
-
- {{ row.item.subName }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-en:
- summary: Summary
- total: Total
- boxes: Boxes
- item: Item
- subName: Subname
- quantity: Quantity
- volume: m³ per quantity
-es:
- summary: Resumen
- total: Total
- boxes: Cajas
- item: Artículo
- subName: Subname
- quantity: Cantidad
- volume: m³ por cantidad
-
diff --git a/src/pages/Ticket/Card/TicketSale.vue b/src/pages/Ticket/Card/TicketSale.vue
index cbc94b388..5978dbf09 100644
--- a/src/pages/Ticket/Card/TicketSale.vue
+++ b/src/pages/Ticket/Card/TicketSale.vue
@@ -11,7 +11,6 @@ import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
import TicketEditManaProxy from './TicketEditMana.vue';
import VnImg from 'src/components/ui/VnImg.vue';
-import RightMenu from 'src/components/common/RightMenu.vue';
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
import TicketSaleMoreActions from './TicketSaleMoreActions.vue';
import TicketTransfer from './TicketTransfer.vue';
diff --git a/src/pages/Worker/Card/WorkerDescriptor.vue b/src/pages/Worker/Card/WorkerDescriptor.vue
index 8fbb23ef8..154db1258 100644
--- a/src/pages/Worker/Card/WorkerDescriptor.vue
+++ b/src/pages/Worker/Card/WorkerDescriptor.vue
@@ -10,6 +10,7 @@ import useCardDescription from 'src/composables/useCardDescription';
import { useState } from 'src/composables/useState';
import axios from 'axios';
import VnImg from 'src/components/ui/VnImg.vue';
+import EditPictureForm from 'components/EditPictureForm.vue';
const $props = defineProps({
id: {
@@ -18,6 +19,7 @@ const $props = defineProps({
default: null,
},
});
+const image = ref(null);
const route = useRoute();
const { t } = useI18n();
@@ -25,6 +27,10 @@ const state = useState();
const user = state.getUser();
const changePasswordFormDialog = ref(null);
const cardDescriptorRef = ref(null);
+const showEditPhotoForm = ref(false);
+const toggleEditPictureForm = () => {
+ showEditPhotoForm.value = !showEditPhotoForm.value;
+};
const entityId = computed(() => {
return $props.id || route.params.id;
@@ -99,7 +105,9 @@ const handleExcluded = async () => {
workerExcluded.value = !workerExcluded.value;
};
-
+const handlePhotoUpdated = (evt = false) => {
+ image.value.reload(evt);
+};
const refetch = async () => await cardDescriptorRef.value.getData();
@@ -144,27 +152,49 @@ const refetch = async () => await cardDescriptorRef.value.getData();
-
-
-
-
-
-
-
-
- {{ t('worker.imageNotFound') }}
+
+
+
+
+
+
+
+
+
+ {{ t('worker.imageNotFound') }}
+
-
-
-
+
+
+
+
+
+
+
diff --git a/src/pages/Zone/Card/ZoneCard.vue b/src/pages/Zone/Card/ZoneCard.vue
index 02ec12fe7..b81ee9039 100644
--- a/src/pages/Zone/Card/ZoneCard.vue
+++ b/src/pages/Zone/Card/ZoneCard.vue
@@ -10,11 +10,6 @@ const { t } = useI18n();
const route = useRoute();
const routeName = computed(() => route.name);
-const customRouteRedirectName = computed(() => {
- if (routeName.value === 'ZoneLocations') return null;
- return routeName.value;
-});
-const searchbarMakeFetch = computed(() => routeName.value !== 'ZoneEvents');
const searchBarDataKeys = {
ZoneWarehouses: 'ZoneWarehouses',
ZoneSummary: 'ZoneSummary',
diff --git a/src/router/modules/order.js b/src/router/modules/order.js
index a2b874cc6..9ccdb820b 100644
--- a/src/router/modules/order.js
+++ b/src/router/modules/order.js
@@ -63,7 +63,7 @@ export default {
title: 'basicData',
icon: 'vn:settings',
},
- component: () => import('src/pages/Order/Card/OrderForm.vue'),
+ component: () => import('src/pages/Order/Card/OrderBasicData.vue'),
},
{
name: 'OrderCatalog',
@@ -72,7 +72,7 @@ export default {
title: 'catalog',
icon: 'vn:basket',
},
- component: () => import('src/pages/Order/OrderCatalog.vue'),
+ component: () => import('src/pages/Order/Card/OrderCatalog.vue'),
},
{
name: 'OrderVolume',
@@ -81,7 +81,7 @@ export default {
title: 'volume',
icon: 'vn:volume',
},
- component: () => import('src/pages/Order/OrderVolume.vue'),
+ component: () => import('src/pages/Order/Card/OrderVolume.vue'),
},
{
name: 'OrderLines',
@@ -90,7 +90,7 @@ export default {
title: 'lines',
icon: 'vn:lines',
},
- component: () => import('src/pages/Order/OrderLines.vue'),
+ component: () => import('src/pages/Order/Card/OrderLines.vue'),
},
],
},
|