mirror of
https://github.com/frappe/books.git
synced 2025-01-03 15:17:30 +00:00
feat: add item through barcode scan
This commit is contained in:
parent
bcb602e299
commit
8cb126851e
@ -35,22 +35,33 @@
|
|||||||
>
|
>
|
||||||
<div class="bg-white border col-span-5 rounded-md">
|
<div class="bg-white border col-span-5 rounded-md">
|
||||||
<div class="rounded-md p-4 col-span-5">
|
<div class="rounded-md p-4 col-span-5">
|
||||||
<!-- Item Search -->
|
<div class="flex justify-between">
|
||||||
<Link
|
<!-- Item Search -->
|
||||||
class="border-r flex-shrink-0 w-full"
|
<Link
|
||||||
:df="{
|
class="border-r flex-shrink-0 w-2/3"
|
||||||
label: t`Search an Item`,
|
:df="{
|
||||||
fieldtype: 'Link',
|
label: t`Search an Item`,
|
||||||
fieldname: 'item',
|
fieldtype: 'Link',
|
||||||
target: 'Item',
|
fieldname: 'item',
|
||||||
}"
|
target: 'Item',
|
||||||
:border="true"
|
}"
|
||||||
:value="itemSearchTerm"
|
:border="true"
|
||||||
@keyup.enter="
|
:value="itemSearchTerm"
|
||||||
async () => await addItem(await getItem(itemSearchTerm))
|
@keyup.enter="
|
||||||
"
|
async () => await addItem(await getItem(itemSearchTerm))
|
||||||
@change="(item: string) =>itemSearchTerm= item"
|
"
|
||||||
/>
|
@change="(item: string) =>itemSearchTerm= item"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<Barcode
|
||||||
|
@item-selected="
|
||||||
|
async (name: string) => {
|
||||||
|
await addItem(await getItem(name));
|
||||||
|
}
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<ItemsTable @add-item="addItem" />
|
<ItemsTable @add-item="addItem" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -199,6 +210,7 @@ import {
|
|||||||
validateShipment,
|
validateShipment,
|
||||||
validateSinv,
|
validateSinv,
|
||||||
} from 'src/utils/pos';
|
} from 'src/utils/pos';
|
||||||
|
import Barcode from 'src/components/Controls/Barcode.vue';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'POS',
|
name: 'POS',
|
||||||
@ -213,6 +225,7 @@ export default defineComponent({
|
|||||||
PageHeader,
|
PageHeader,
|
||||||
PaymentModal,
|
PaymentModal,
|
||||||
SelectedItemTable,
|
SelectedItemTable,
|
||||||
|
Barcode,
|
||||||
},
|
},
|
||||||
provide() {
|
provide() {
|
||||||
return {
|
return {
|
||||||
|
Loading…
Reference in New Issue
Block a user