feat: receipt (#176)
* feat: receipt #173 * chore: clean up --------- Co-authored-by: nwpptrs <jay02499@gmail.com> Co-authored-by: Methapon2001 <61303214+Methapon2001@users.noreply.github.com>
This commit is contained in:
parent
1cdc2bd4cc
commit
2b758e57f8
8 changed files with 638 additions and 3 deletions
95
src/pages/13_receipt/constants.ts
Normal file
95
src/pages/13_receipt/constants.ts
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
import { QTableProps } from 'quasar';
|
||||
import { Invoice, Receipt } from 'src/stores/payment/types';
|
||||
import { formatNumberDecimal } from 'src/stores/utils';
|
||||
import { dateFormatJS } from 'src/utils/datetime';
|
||||
|
||||
export const columns = [
|
||||
{
|
||||
name: '#order',
|
||||
align: 'center',
|
||||
label: 'general.order',
|
||||
field: (v: Receipt & { _index: number }) => v._index + 1,
|
||||
},
|
||||
|
||||
{
|
||||
name: 'quotation',
|
||||
align: 'center',
|
||||
label: 'requestList.quotationCode',
|
||||
field: 'code',
|
||||
},
|
||||
|
||||
{
|
||||
name: 'workSheetName',
|
||||
align: 'center',
|
||||
label: 'receipt.workSheetName',
|
||||
field: (v: Receipt) => v.invoice.quotation.workName,
|
||||
},
|
||||
|
||||
{
|
||||
name: 'issueDate',
|
||||
align: 'center',
|
||||
label: 'taskOrder.issueDate',
|
||||
field: (v: Receipt) =>
|
||||
dateFormatJS({
|
||||
date: v.invoice.quotation.createdAt,
|
||||
withTime: true,
|
||||
}),
|
||||
},
|
||||
|
||||
{
|
||||
name: 'value',
|
||||
align: 'center',
|
||||
label: 'preview.value',
|
||||
field: (v: Receipt) => formatNumberDecimal(v.amount, 2),
|
||||
},
|
||||
{
|
||||
name: '#action',
|
||||
align: 'center',
|
||||
label: '',
|
||||
field: (_) => '#action',
|
||||
},
|
||||
] as const satisfies QTableProps['columns'];
|
||||
|
||||
export const docColumn = [
|
||||
{
|
||||
name: 'order',
|
||||
align: 'center',
|
||||
label: 'general.order',
|
||||
field: 'no',
|
||||
},
|
||||
{
|
||||
name: 'document',
|
||||
align: 'left',
|
||||
label: 'general.document',
|
||||
field: 'document',
|
||||
},
|
||||
{
|
||||
name: 'attachment',
|
||||
align: 'left',
|
||||
label: 'requestList.attachment',
|
||||
field: 'attachment',
|
||||
},
|
||||
{
|
||||
name: 'amount',
|
||||
align: 'center',
|
||||
label: 'general.amount',
|
||||
field: 'amount',
|
||||
},
|
||||
{
|
||||
name: 'documentInSystem',
|
||||
align: 'center',
|
||||
label: 'requestList.documentInSystem',
|
||||
field: 'documentInSystem',
|
||||
},
|
||||
{
|
||||
name: 'status',
|
||||
align: 'center',
|
||||
label: 'general.status',
|
||||
field: 'status',
|
||||
},
|
||||
] as const satisfies QTableProps['columns'];
|
||||
|
||||
export const hslaColors: Record<string, string> = {
|
||||
PaymentWait: '--orange-5-hsl',
|
||||
PaymentSuccess: '--green-8-hsl',
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue