feat: task order => column constant
This commit is contained in:
parent
c8be545ef8
commit
530ad6042b
4 changed files with 80 additions and 10 deletions
|
|
@ -897,6 +897,11 @@ export default {
|
||||||
sendTaskOrder: 'Send Task Order',
|
sendTaskOrder: 'Send Task Order',
|
||||||
payment: 'Payment',
|
payment: 'Payment',
|
||||||
goodReceipt: 'Good Receipt',
|
goodReceipt: 'Good Receipt',
|
||||||
|
|
||||||
|
issueBranch: 'Issue Branch',
|
||||||
|
issueDate: 'Issue Date',
|
||||||
|
madeBy: 'Made By',
|
||||||
|
contactName: 'Contact Name',
|
||||||
},
|
},
|
||||||
|
|
||||||
dialog: {
|
dialog: {
|
||||||
|
|
|
||||||
|
|
@ -888,6 +888,11 @@ export default {
|
||||||
sendTaskOrder: 'ส่งใบสั่งงาน',
|
sendTaskOrder: 'ส่งใบสั่งงาน',
|
||||||
payment: 'ขำระเงิน',
|
payment: 'ขำระเงิน',
|
||||||
goodReceipt: 'ใบรับสินค้า',
|
goodReceipt: 'ใบรับสินค้า',
|
||||||
|
|
||||||
|
issueBranch: 'สาขาที่ออก',
|
||||||
|
issueDate: 'วันที่ออก',
|
||||||
|
madeBy: 'ผู้ที่ทำรายการ',
|
||||||
|
contactName: 'ชื่อผู้ติดต่อ',
|
||||||
},
|
},
|
||||||
|
|
||||||
dialog: {
|
dialog: {
|
||||||
|
|
|
||||||
|
|
@ -12,29 +12,27 @@ import PaginationPageSize from 'src/components/PaginationPageSize.vue';
|
||||||
// NOTE: Stores & Type
|
// NOTE: Stores & Type
|
||||||
import { useNavigator } from 'src/stores/navigator';
|
import { useNavigator } from 'src/stores/navigator';
|
||||||
import useFlowStore from 'src/stores/flow';
|
import useFlowStore from 'src/stores/flow';
|
||||||
import { pageTabs } from './constants';
|
import { pageTabs, column } from './constants';
|
||||||
|
|
||||||
const navigatorStore = useNavigator();
|
const navigatorStore = useNavigator();
|
||||||
const flowStore = useFlowStore();
|
const flowStore = useFlowStore();
|
||||||
|
|
||||||
// NOTE: Variable
|
// NOTE: Variable
|
||||||
const pageState = reactive({
|
const pageState = reactive({
|
||||||
// TODO: replace state
|
|
||||||
currentTab: 'title',
|
currentTab: 'title',
|
||||||
hideStat: false,
|
hideStat: false,
|
||||||
statusFilter: 'None',
|
statusFilter: 'None',
|
||||||
inputSearch: '',
|
inputSearch: '',
|
||||||
fieldSelected: [],
|
fieldSelected: [...column.map((v) => v.name)],
|
||||||
gridView: false,
|
gridView: false,
|
||||||
total: 0,
|
total: 0,
|
||||||
});
|
});
|
||||||
|
|
||||||
const fieldSelectedOption = computed(() => {
|
const fieldSelectedOption = computed(() => {
|
||||||
return [];
|
return column.map((v) => ({
|
||||||
// return column.map((v) => ({
|
label: v.label,
|
||||||
// label: v.label,
|
value: v.name,
|
||||||
// value: v.name,
|
}));
|
||||||
// }));
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// NOTE: Function
|
// NOTE: Function
|
||||||
|
|
@ -180,13 +178,17 @@ onMounted(async () => {
|
||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
/>
|
/>
|
||||||
<!-- TODO: select -->
|
|
||||||
<q-select
|
<q-select
|
||||||
v-if="!pageState.gridView"
|
v-if="!pageState.gridView"
|
||||||
id="select-field"
|
id="select-field"
|
||||||
for="select-field"
|
for="select-field"
|
||||||
class="col q-ml-sm"
|
class="col q-ml-sm"
|
||||||
:options="[]"
|
:options="
|
||||||
|
fieldSelectedOption.map((v) => ({
|
||||||
|
...v,
|
||||||
|
label: v.label && $t(v.label),
|
||||||
|
}))
|
||||||
|
"
|
||||||
:display-value="$t('general.displayField')"
|
:display-value="$t('general.displayField')"
|
||||||
:hide-dropdown-icon="$q.screen.lt.sm"
|
:hide-dropdown-icon="$q.screen.lt.sm"
|
||||||
v-model="pageState.fieldSelected"
|
v-model="pageState.fieldSelected"
|
||||||
|
|
@ -297,6 +299,7 @@ onMounted(async () => {
|
||||||
class="col surface-2 full-width scroll q-pa-md"
|
class="col surface-2 full-width scroll q-pa-md"
|
||||||
></article>
|
></article>
|
||||||
|
|
||||||
|
<!-- TODO: footer -->
|
||||||
<!-- SEC: footer content -->
|
<!-- SEC: footer content -->
|
||||||
<!-- <footer
|
<!-- <footer
|
||||||
class="row justify-between items-center q-px-md q-py-sm surface-2"
|
class="row justify-between items-center q-px-md q-py-sm surface-2"
|
||||||
|
|
|
||||||
|
|
@ -7,3 +7,60 @@ export const pageTabs = [
|
||||||
{ label: 'payment', value: 'payment' },
|
{ label: 'payment', value: 'payment' },
|
||||||
{ label: 'goodReceipt', value: 'goodReceipt' },
|
{ label: 'goodReceipt', value: 'goodReceipt' },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
export const column = [
|
||||||
|
{
|
||||||
|
name: 'order',
|
||||||
|
align: 'center',
|
||||||
|
label: 'general.order',
|
||||||
|
field: 'no',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'taskOrder',
|
||||||
|
align: 'left',
|
||||||
|
label: 'taskOrder.title',
|
||||||
|
field: 'taskOrder',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'issueBranch',
|
||||||
|
align: 'left',
|
||||||
|
label: 'taskOrder.issueBranch',
|
||||||
|
field: 'issueBranch',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'agencies',
|
||||||
|
align: 'left',
|
||||||
|
label: 'general.agencies',
|
||||||
|
field: 'agencies',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'issueDate',
|
||||||
|
align: 'left',
|
||||||
|
label: 'taskOrder.issueDate',
|
||||||
|
field: 'issueDate',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'madeBy',
|
||||||
|
align: 'left',
|
||||||
|
label: 'taskOrder.madeBy',
|
||||||
|
field: 'madeBy',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'telephone',
|
||||||
|
align: 'left',
|
||||||
|
label: 'general.telephone',
|
||||||
|
field: 'telephone',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'contactName',
|
||||||
|
align: 'left',
|
||||||
|
label: 'taskOrder.contactName',
|
||||||
|
field: 'contactName',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'status',
|
||||||
|
align: 'left',
|
||||||
|
label: 'general.status',
|
||||||
|
field: 'status',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue