Merge branch 'master' into hotfix_vnImg_zoom_resolution
gitea/salix-front/pipeline/pr-master This commit looks good
Details
gitea/salix-front/pipeline/pr-master This commit looks good
Details
This commit is contained in:
commit
43da6ea1b8
|
@ -310,7 +310,7 @@ defineExpose({
|
|||
params,
|
||||
});
|
||||
|
||||
function handleOnDataSaved(_, res) {
|
||||
function handleOnDataSaved(_) {
|
||||
if (_.onDataSaved) _.onDataSaved({ CrudModelRef: CrudModelRef.value });
|
||||
else $props.create.onDataSaved(_);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
import { ref, computed } from 'vue';
|
||||
import { computed } from 'vue';
|
||||
import { useRole } from 'src/composables/useRole';
|
||||
import { useAcl } from 'src/composables/useAcl';
|
||||
|
||||
|
|
|
@ -5,7 +5,8 @@ import VnTable from 'components/VnTable/VnTable.vue';
|
|||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||
import AccountSummary from './Card/AccountSummary.vue';
|
||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
|
||||
import AccountFilter from './AccountFilter.vue';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
const { t } = useI18n();
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
const tableRef = ref();
|
||||
|
@ -18,14 +19,6 @@ const columns = computed(() => [
|
|||
isId: true,
|
||||
field: 'id',
|
||||
cardVisible: true,
|
||||
columnFilter: {
|
||||
component: 'select',
|
||||
name: 'search',
|
||||
attrs: {
|
||||
url: 'VnUsers/preview',
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -36,9 +29,6 @@ const columns = computed(() => [
|
|||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
columnFilter: {
|
||||
inWhere: true,
|
||||
},
|
||||
cardVisible: true,
|
||||
create: true,
|
||||
},
|
||||
|
@ -50,9 +40,6 @@ const columns = computed(() => [
|
|||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
columnFilter: {
|
||||
inWhere: true,
|
||||
},
|
||||
cardVisible: true,
|
||||
create: true,
|
||||
},
|
||||
|
@ -105,7 +92,11 @@ const exprBuilder = (param, value) => {
|
|||
:label="t('account.search')"
|
||||
:info="t('account.searchInfo')"
|
||||
/>
|
||||
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<AccountFilter data-key="AccountUsers" />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="AccountUsers"
|
||||
|
@ -115,6 +106,8 @@ const exprBuilder = (param, value) => {
|
|||
default-mode="table"
|
||||
redirect="account"
|
||||
:use-model="true"
|
||||
:right-search="false"
|
||||
auto-load
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ const { t } = useI18n();
|
|||
<VnCard
|
||||
data-key="Account"
|
||||
:descriptor="AccountDescriptor"
|
||||
search-data-key="AccountUsers"
|
||||
search-data-key="AccountList"
|
||||
:searchbar-props="{
|
||||
url: 'VnUsers/preview',
|
||||
label: t('account.search'),
|
||||
|
|
|
@ -9,7 +9,6 @@ import RefundInvoiceForm from 'src/components/RefundInvoiceForm.vue';
|
|||
import SendEmailDialog from 'components/common/SendEmailDialog.vue';
|
||||
|
||||
import useNotify from 'src/composables/useNotify';
|
||||
import { useSession } from 'src/composables/useSession';
|
||||
import { usePrintService } from 'composables/usePrintService';
|
||||
import { useVnConfirm } from 'composables/useVnConfirm';
|
||||
import { getUrl } from 'src/composables/getUrl';
|
||||
|
@ -30,8 +29,6 @@ const $props = defineProps({
|
|||
|
||||
const { notify } = useNotify();
|
||||
const router = useRouter();
|
||||
const session = useSession();
|
||||
const token = session.getToken();
|
||||
const { t } = useI18n();
|
||||
const { openReport, sendEmail } = usePrintService();
|
||||
const { openConfirmationModal } = useVnConfirm();
|
||||
|
|
|
@ -130,4 +130,5 @@ function extractValueTags(items) {
|
|||
<i18n>
|
||||
es:
|
||||
You can search items by name or id: Puedes buscar items por nombre o id
|
||||
Search items: Buscar items
|
||||
</i18n>
|
||||
|
|
|
@ -247,6 +247,7 @@ function addOrder(value, field, params) {
|
|||
rounded
|
||||
emit-value
|
||||
use-input
|
||||
sort-by="name ASC"
|
||||
:disable="!selectedCategoryFk"
|
||||
@update:model-value="
|
||||
(value) => {
|
||||
|
|
|
@ -20,8 +20,10 @@ const props = defineProps({
|
|||
|
||||
const fields = ref((props.prices || []).map((item) => ({ ...item, quantity: 0 })));
|
||||
const descriptorData = useArrayData('orderData');
|
||||
|
||||
const isLoading = ref(false);
|
||||
const addToOrder = async () => {
|
||||
if (isLoading.value) return;
|
||||
isLoading.value = true;
|
||||
const items = (fields.value || []).filter((item) => Number(item.quantity) > 0);
|
||||
await axios.post('/OrderRows/addToOrder', {
|
||||
items,
|
||||
|
@ -30,6 +32,10 @@ const addToOrder = async () => {
|
|||
notify(t('globals.dataSaved'), 'positive');
|
||||
emit('added');
|
||||
descriptorData.fetch({});
|
||||
isLoading.value = false;
|
||||
};
|
||||
const canAddToOrder = () => {
|
||||
return (fields.value || []).some((item) => Number(item.quantity) > 0);
|
||||
};
|
||||
</script>
|
||||
|
||||
|
@ -68,7 +74,11 @@ const addToOrder = async () => {
|
|||
</tbody>
|
||||
</QMarkupTable>
|
||||
<div class="flex justify-center q-mt-lg">
|
||||
<QBtn color="primary" type="submit">
|
||||
<QBtn
|
||||
color="primary"
|
||||
type="submit"
|
||||
:disable="!isLoading && !canAddToOrder()"
|
||||
>
|
||||
{{ t('globals.add') }}
|
||||
</QBtn>
|
||||
</div>
|
||||
|
@ -81,3 +91,10 @@ const addToOrder = async () => {
|
|||
width: 200px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<i18n>
|
||||
es:
|
||||
noAmount: La cantidad no puede ser 0
|
||||
en:
|
||||
noAmount: Amount can not be 0
|
||||
</i18n>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import axios from 'axios';
|
||||
|
@ -13,12 +13,10 @@ import { reactive } from 'vue';
|
|||
import FetchData from 'components/FetchData.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
const state = useState();
|
||||
const ORDER_MODEL = 'order';
|
||||
|
||||
const router = useRouter();
|
||||
const clientList = ref([]);
|
||||
const agencyList = ref([]);
|
||||
const addressList = ref([]);
|
||||
defineEmits(['confirm', ...useDialogPluginComponent.emits]);
|
||||
|
|
|
@ -15,12 +15,12 @@ const route = useRoute();
|
|||
const agenciesOptions = ref(null);
|
||||
const newAgencyTermForm = reactive({
|
||||
agencyFk: null,
|
||||
minimumM3: null,
|
||||
packagePrice: null,
|
||||
kmPrice: null,
|
||||
m3Price: null,
|
||||
minimumM3: 0,
|
||||
packagePrice: 0,
|
||||
kmPrice: 0,
|
||||
m3Price: 0,
|
||||
routePrice: null,
|
||||
minimumKm: null,
|
||||
minimumKm: 0,
|
||||
supplierFk: route.params.id,
|
||||
});
|
||||
|
||||
|
|
|
@ -229,22 +229,28 @@ async function changeState(value) {
|
|||
:url="ticketUrl + 'observation'"
|
||||
:text="t('ticket.pageTitles.notes')"
|
||||
/>
|
||||
<VnLv
|
||||
v-for="note in entity.notes"
|
||||
:key="note.id"
|
||||
:label="note.observationType.description"
|
||||
:value="note.description"
|
||||
<QVirtualScroll
|
||||
:items="entity.notes"
|
||||
v-slot="{ item, index }"
|
||||
style="max-height: 300px"
|
||||
separator
|
||||
>
|
||||
<QItem
|
||||
:key="index"
|
||||
class="vn-label-value"
|
||||
style="
|
||||
display: inline-block;
|
||||
padding: unset;
|
||||
min-height: max-content;
|
||||
"
|
||||
>
|
||||
<span class="label" style="margin-right: 4px">
|
||||
{{ item.observationType.description }}:</span
|
||||
>
|
||||
|
||||
<span>{{ item.description }}</span>
|
||||
</QItem></QVirtualScroll
|
||||
>
|
||||
<template #value>
|
||||
<QInput
|
||||
v-model="note.description"
|
||||
filled
|
||||
type="textarea"
|
||||
class="notes"
|
||||
readonly
|
||||
/>
|
||||
</template>
|
||||
</VnLv>
|
||||
</QCard>
|
||||
<QCard class="vn-one">
|
||||
<VnTitle :text="t('ticket.summary.summaryAmount')" />
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
<script setup>
|
||||
import { ref, computed, onMounted } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import TicketTransferForm from './TicketTransferForm.vue';
|
||||
|
||||
import { toDateFormat } from 'src/filters/date.js';
|
||||
import axios from 'axios';
|
||||
|
||||
const $props = defineProps({
|
||||
mana: {
|
||||
|
@ -28,13 +26,10 @@ const $props = defineProps({
|
|||
},
|
||||
});
|
||||
|
||||
const emit = defineEmits(['refreshData']);
|
||||
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
const QPopupProxyRef = ref(null);
|
||||
|
||||
const _transfer = ref(null);
|
||||
const transferFormRef = ref(null);
|
||||
const _transfer = ref();
|
||||
|
||||
const transferLinesColumns = computed(() => [
|
||||
{
|
||||
|
@ -85,19 +80,11 @@ const destinationTicketColumns = computed(() => [
|
|||
},
|
||||
]);
|
||||
|
||||
const transferSales = async (ticketId) => {
|
||||
const params = {
|
||||
ticketId: ticketId,
|
||||
sales: $props.transfer.sales,
|
||||
};
|
||||
|
||||
const { data } = await axios.post(
|
||||
`tickets/${$props.ticket.id}/transferSales`,
|
||||
params
|
||||
);
|
||||
|
||||
if (data && data.id === $props.ticket.id) emit('refreshData');
|
||||
else router.push({ name: 'TicketSale', params: { id: data.id } });
|
||||
const handleRowClick = (row) => {
|
||||
const ticketId = row.id;
|
||||
if (transferFormRef.value) {
|
||||
transferFormRef.value.transferSales(ticketId);
|
||||
}
|
||||
};
|
||||
|
||||
onMounted(() => (_transfer.value = $props.transfer));
|
||||
|
@ -105,9 +92,8 @@ onMounted(() => (_transfer.value = $props.transfer));
|
|||
|
||||
<template>
|
||||
<QPopupProxy ref="QPopupProxyRef">
|
||||
<QCard class="q-px-md" style="display: flex">
|
||||
<QCard class="q-px-md" style="display: flex; width: 80vw">
|
||||
<QTable
|
||||
v-if="transfer.sales"
|
||||
:rows="transfer.sales"
|
||||
:columns="transferLinesColumns"
|
||||
:title="t('Sales to transfer')"
|
||||
|
@ -121,9 +107,6 @@ onMounted(() => (_transfer.value = $props.transfer));
|
|||
<VnInput
|
||||
v-model.number="row.quantity"
|
||||
:clearable="false"
|
||||
@keyup.enter="changeQuantity(row)"
|
||||
@blur="changeQuantity(row)"
|
||||
@focus="edit.oldQuantity = row.quantity"
|
||||
style="max-width: 60px"
|
||||
/>
|
||||
</QTd>
|
||||
|
@ -137,6 +120,7 @@ onMounted(() => (_transfer.value = $props.transfer));
|
|||
:title="t('Destination ticket')"
|
||||
row-key="id"
|
||||
class="full-width q-mt-md"
|
||||
@row-click="(_, row) => handleRowClick(row)"
|
||||
>
|
||||
<template #body-cell-address="{ row }">
|
||||
<QTd @click.stop>
|
||||
|
@ -158,10 +142,10 @@ onMounted(() => (_transfer.value = $props.transfer));
|
|||
</template>
|
||||
|
||||
<template #no-data>
|
||||
<TicketTransferForm v-bind="$props" />
|
||||
<TicketTransferForm ref="transferFormRef" v-bind="$props" />
|
||||
</template>
|
||||
<template #bottom>
|
||||
<TicketTransferForm v-bind="$props" />
|
||||
<TicketTransferForm ref="transferFormRef" v-bind="$props" />
|
||||
</template>
|
||||
</QTable>
|
||||
</QCard>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
|
@ -31,7 +31,7 @@ const emit = defineEmits(['refreshData']);
|
|||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
|
||||
const _transfer = ref(null);
|
||||
const _transfer = ref($props.transfer);
|
||||
|
||||
const transferSales = async (ticketId) => {
|
||||
const params = {
|
||||
|
@ -48,11 +48,10 @@ const transferSales = async (ticketId) => {
|
|||
else router.push({ name: 'TicketSale', params: { id: data.id } });
|
||||
};
|
||||
|
||||
onMounted(() => (_transfer.value = $props.transfer));
|
||||
defineExpose({ transferSales });
|
||||
</script>
|
||||
|
||||
<template>
|
||||
{{ _transfer }}
|
||||
<QForm class="q-mt-lg full-width">
|
||||
<VnInput
|
||||
v-model.number="_transfer.ticketId"
|
||||
|
|
|
@ -94,7 +94,7 @@ watch(
|
|||
url="Postcodes/location"
|
||||
:fields="['geoFk', 'code', 'townFk', 'countryFk']"
|
||||
sort-by="code, townFk"
|
||||
option-value="geoFk"
|
||||
option-value="code"
|
||||
option-label="code"
|
||||
option-filter="code"
|
||||
hide-selected
|
||||
|
|
Loading…
Reference in New Issue