forked from verdnatura/salix-front
refs #7409 front section
This commit is contained in:
parent
cb4a5f8d1b
commit
25ab5a1b9f
|
@ -0,0 +1,81 @@
|
|||
<script setup>
|
||||
import { ref, computed } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRoute } from 'vue-router';
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
const tableRef = ref();
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
const entityId = computed(() => route.params.id);
|
||||
|
||||
const columns = computed(() => [
|
||||
{
|
||||
align: 'left',
|
||||
name: 'paymentDate',
|
||||
label: t('worker.balance.tableVisibleColumns.paymentDate'),
|
||||
create: true,
|
||||
component: 'date',
|
||||
field: 'paymentDate',
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'incomeTypeFk',
|
||||
label: t('worker.balance.tableVisibleColumns.incomeType'),
|
||||
create: true,
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'payrollComponents',
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'debit',
|
||||
label: t('worker.balance.tableVisibleColumns.debit'),
|
||||
create: true,
|
||||
component: 'input',
|
||||
field: 'debit',
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'credit',
|
||||
label: t('worker.balance.tableVisibleColumns.credit'),
|
||||
create: true,
|
||||
component: 'input',
|
||||
field: 'credit',
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'concept',
|
||||
label: t('worker.balance.tableVisibleColumns.concept'),
|
||||
create: true,
|
||||
component: 'input',
|
||||
field: 'concept',
|
||||
},
|
||||
]);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="WorkerBalance"
|
||||
:url="`WorkerIncomes/${entityId}`"
|
||||
:url-create="`WorkerIncomes/${entityId}`"
|
||||
save-url="WorkerIncomes/crud"
|
||||
:create="{
|
||||
urlCreate: 'workerIncomes',
|
||||
title: 'Create workerIncomes',
|
||||
onDataSaved: () => tableRef.reload(),
|
||||
formInitialData: {
|
||||
workerFk: entityId,
|
||||
},
|
||||
}"
|
||||
order="paymentDate DESC"
|
||||
:columns="columns"
|
||||
default-mode="table"
|
||||
auto-load
|
||||
:right-search="false"
|
||||
:is-editable="true"
|
||||
:use-model="true"
|
||||
/>
|
||||
</template>
|
|
@ -23,6 +23,7 @@ export default {
|
|||
'WorkerDms',
|
||||
'WorkerTimeControl',
|
||||
'WorkerLocker',
|
||||
'WorkerBalance',
|
||||
],
|
||||
departmentCard: ['BasicData'],
|
||||
},
|
||||
|
@ -177,6 +178,15 @@ export default {
|
|||
},
|
||||
component: () => import('src/pages/Worker/Card/WorkerLocker.vue'),
|
||||
},
|
||||
{
|
||||
name: 'WorkerBalance',
|
||||
path: 'balance',
|
||||
meta: {
|
||||
title: 'balance',
|
||||
icon: 'balance',
|
||||
},
|
||||
component: () => import('src/pages/Worker/Card/WorkerBalance.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue