@7365admin1/layer-common 1.11.7 → 1.11.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/components/EquipmentItemMain.vue +4 -1
- package/components/EquipmentManagementMain.vue +1 -0
- package/components/QrTemplate/CreditCardLandscape.vue +144 -0
- package/components/QrTemplate/PrintDialog.vue +1234 -0
- package/components/StockCard.vue +1 -1
- package/components/TiptapEditorQr.vue +73 -0
- package/components/VehicleForm.vue +93 -61
- package/components/VehicleManagement.vue +3 -3
- package/composables/useEquipmentItem.ts +2 -1
- package/composables/useEquipmentManagement.ts +2 -2
- package/composables/useKey.ts +381 -0
- package/composables/usePassKey.ts +351 -0
- package/composables/useStock.ts +4 -2
- package/composables/useTemplateReusable.ts +345 -0
- package/composables/useVehicle.ts +2 -3
- package/package.json +1 -1
- package/public/icons/timein-green.svg +12 -0
- package/public/icons/timeout-green.svg +12 -0
- package/public/images/keys/trash.svg +13 -0
- package/public/images/keys/undraw_keys_page.svg +41 -0
- package/public/images/keys/view-print-sample/logo.svg +10 -0
- package/public/images/keys/view-print-sample/qrcode.svg +332 -0
- package/public/images/throw.svg +1 -0
- package/public/images/undraw_team_page.svg +1 -0
- package/types/equipment-item.d.ts +1 -0
- package/types/key-log.d.ts +28 -0
- package/types/passKey.d.ts +17 -0
- package/types/qr-code-template.d.ts +53 -0
- package/types/stock.d.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -449,6 +449,7 @@ import useUtils from "../composables/useUtils";
|
|
|
449
449
|
const props = defineProps({
|
|
450
450
|
orgId: { type: String, default: "" },
|
|
451
451
|
site: { type: String, default: "" },
|
|
452
|
+
serviceType: { type: String, default: "" },
|
|
452
453
|
});
|
|
453
454
|
|
|
454
455
|
const { canCreateEquipmentItem } = useEquipmentItemPermission();
|
|
@@ -492,6 +493,7 @@ const {
|
|
|
492
493
|
page: page.value,
|
|
493
494
|
search: searchInput.value,
|
|
494
495
|
site: props.site,
|
|
496
|
+
serviceType: props.serviceType,
|
|
495
497
|
}),
|
|
496
498
|
{
|
|
497
499
|
watch: [page, () => props.site],
|
|
@@ -557,6 +559,7 @@ const { data: getSuppliesReq } = await useLazyAsyncData(
|
|
|
557
559
|
getSupplies({
|
|
558
560
|
site: props.site,
|
|
559
561
|
limit: 100,
|
|
562
|
+
serviceType: props.serviceType,
|
|
560
563
|
}),
|
|
561
564
|
{}
|
|
562
565
|
);
|
|
@@ -661,7 +664,7 @@ async function _equipmentItem() {
|
|
|
661
664
|
: {}),
|
|
662
665
|
}));
|
|
663
666
|
|
|
664
|
-
await equipmentItemApi(props.site, { items });
|
|
667
|
+
await equipmentItemApi(props.site, { items, serviceType: props.serviceType });
|
|
665
668
|
|
|
666
669
|
showMessage(
|
|
667
670
|
`Checked out ${equipmentItems.value.length} item(s).`,
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-col cols="12" class="pa-0 ma-0">
|
|
3
|
+
<div class="a4-size">
|
|
4
|
+
<v-row class="d-flex" no-gutters>
|
|
5
|
+
<!-- Iterate through each page -->
|
|
6
|
+
|
|
7
|
+
<v-col
|
|
8
|
+
v-for="(page, pageIndex) in paginatedCardData"
|
|
9
|
+
:key="pageIndex"
|
|
10
|
+
cols="12"
|
|
11
|
+
class="d-flex justify-center position-relative print-page"
|
|
12
|
+
>
|
|
13
|
+
<v-row no-gutters>
|
|
14
|
+
<!-- Iterate through each card in the page -->
|
|
15
|
+
<v-col
|
|
16
|
+
v-for="(card, cardIndex) in page"
|
|
17
|
+
:key="cardIndex"
|
|
18
|
+
cols="6"
|
|
19
|
+
class="pa-0"
|
|
20
|
+
>
|
|
21
|
+
<!-- Front of the Credit Card (F) -->
|
|
22
|
+
<v-card
|
|
23
|
+
v-if="card.type === 'F'"
|
|
24
|
+
border="dashed lg"
|
|
25
|
+
class="ma-0 pa-0 credit-card-size-landscape"
|
|
26
|
+
>
|
|
27
|
+
<VuetifyViewer
|
|
28
|
+
class="credit-card-size-landscape"
|
|
29
|
+
:maxWidth="'8.27in'"
|
|
30
|
+
:value="templateQrCode.CCFrontWysiwyg"
|
|
31
|
+
markdown-theme="github"
|
|
32
|
+
/>
|
|
33
|
+
|
|
34
|
+
<qrcode-vue
|
|
35
|
+
v-if="templateQrCode.CCFrontQREnabled"
|
|
36
|
+
:value="`${prefix}0${+printRangeStart + +card.number - 1}`"
|
|
37
|
+
:size="templateQrCode.CCFrontQRCodeSize"
|
|
38
|
+
level="H"
|
|
39
|
+
:style="{
|
|
40
|
+
top: `${templateQrCode.CCFrontQRCodeTop - 45}%`,
|
|
41
|
+
left: `${templateQrCode.CCFrontQRCodeLeft}%`,
|
|
42
|
+
}"
|
|
43
|
+
class="position-absolute"
|
|
44
|
+
/>
|
|
45
|
+
|
|
46
|
+
<div
|
|
47
|
+
v-if="templateQrCode.CCFrontQREnabled"
|
|
48
|
+
:style="{
|
|
49
|
+
top: `${templateQrCode.CCFrontPassTop - 45}%`,
|
|
50
|
+
left: `${templateQrCode.CCFrontPassLeft}%`,
|
|
51
|
+
fontSize: templateQrCode.CCFrontPassSize + 'px',
|
|
52
|
+
textWrap: 'nowrap',
|
|
53
|
+
}"
|
|
54
|
+
class="position-absolute text-center"
|
|
55
|
+
>
|
|
56
|
+
Pass Number: {{ prefix }}0{{
|
|
57
|
+
+printRangeStart + +card.number - 1
|
|
58
|
+
}}
|
|
59
|
+
</div>
|
|
60
|
+
</v-card>
|
|
61
|
+
|
|
62
|
+
<!-- Back of the Credit Card (B) -->
|
|
63
|
+
<v-card
|
|
64
|
+
v-if="card.type === 'B'"
|
|
65
|
+
border="dashed lg"
|
|
66
|
+
class="ma-0 pa-0 credit-card-size-landscape"
|
|
67
|
+
>
|
|
68
|
+
<VuetifyViewer
|
|
69
|
+
class="credit-card-size-landscape"
|
|
70
|
+
:maxWidth="'8.27in'"
|
|
71
|
+
:value="templateQrCode.CCBackWysiwyg"
|
|
72
|
+
markdown-theme="github"
|
|
73
|
+
/>
|
|
74
|
+
|
|
75
|
+
<qrcode-vue
|
|
76
|
+
v-if="templateQrCode.CCBackQREnabled"
|
|
77
|
+
:value="`${prefix}0${+printRangeStart + +card.number - 1}`"
|
|
78
|
+
:size="templateQrCode.CCBackQRCodeSize"
|
|
79
|
+
level="H"
|
|
80
|
+
:style="{
|
|
81
|
+
top: `${templateQrCode.CCBackQRCodeTop - 45}%`,
|
|
82
|
+
left: `${templateQrCode.CCBackQRCodeLeft}%`,
|
|
83
|
+
}"
|
|
84
|
+
class="position-absolute"
|
|
85
|
+
/>
|
|
86
|
+
<div
|
|
87
|
+
v-if="templateQrCode.CCBackQREnabled"
|
|
88
|
+
:style="{
|
|
89
|
+
top: `${templateQrCode.CCBackPassTop - 45}%`,
|
|
90
|
+
left: `${templateQrCode.CCBackPassLeft}%`,
|
|
91
|
+
fontSize: templateQrCode.CCBackPassSize + 'px',
|
|
92
|
+
textWrap: 'nowrap',
|
|
93
|
+
}"
|
|
94
|
+
class="position-absolute text-center"
|
|
95
|
+
>
|
|
96
|
+
Pass Number: {{ prefix }}0{{
|
|
97
|
+
+printRangeStart + +card.number - 1
|
|
98
|
+
}}
|
|
99
|
+
</div>
|
|
100
|
+
</v-card>
|
|
101
|
+
</v-col>
|
|
102
|
+
</v-row>
|
|
103
|
+
</v-col>
|
|
104
|
+
</v-row>
|
|
105
|
+
</div>
|
|
106
|
+
</v-col>
|
|
107
|
+
</template>
|
|
108
|
+
|
|
109
|
+
<script setup>
|
|
110
|
+
import QrcodeVue from "qrcode.vue";
|
|
111
|
+
|
|
112
|
+
const props = defineProps({
|
|
113
|
+
paginatedCardData: Array,
|
|
114
|
+
templateQrCode: Object,
|
|
115
|
+
prefix: String,
|
|
116
|
+
printRangeStart: Number,
|
|
117
|
+
});
|
|
118
|
+
onMounted(() => {
|
|
119
|
+
console.log("templateQrCode 11", props.templateQrCode.CCOrientation);
|
|
120
|
+
});
|
|
121
|
+
</script>
|
|
122
|
+
|
|
123
|
+
<style scoped>
|
|
124
|
+
.a4-size {
|
|
125
|
+
width: 21cm;
|
|
126
|
+
height: 29.7cm;
|
|
127
|
+
margin: 0;
|
|
128
|
+
padding: 0;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
@media print {
|
|
132
|
+
.print-page {
|
|
133
|
+
page-break-before: always;
|
|
134
|
+
page-break-inside: avoid;
|
|
135
|
+
break-inside: avoid;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* Credit Card Size */
|
|
140
|
+
.credit-card-size-landscape {
|
|
141
|
+
width: 10.5cm;
|
|
142
|
+
height: 6.8cm;
|
|
143
|
+
}
|
|
144
|
+
</style>
|