diff --git a/src/components/modal/item/show.vue b/src/components/modal/item/show.vue
index 89e1b8e..5e0113e 100644
--- a/src/components/modal/item/show.vue
+++ b/src/components/modal/item/show.vue
@@ -182,15 +182,7 @@ export default {
"left=0,top=0,width=800,height=900,toolbar=0,scrollbars=0,status=0"
);
- WinPrint.document.write(`
-
-
- ${stylesHtml}
-
-
- ${prtHtml}
-
- `);
+ WinPrint.document.write(`${stylesHtml}${prtHtml}`);
WinPrint.document.close();
WinPrint.focus();
@@ -198,6 +190,7 @@ export default {
WinPrint.close();
},
openLightbox(index) {
+ console.log(index, '00')
this.lightboxIndex = index;
this.showLightbox = false;
this.$nextTick(() => {
diff --git a/src/views/Cycle/AddEdit.vue b/src/views/Cycle/AddEdit.vue
index 7cb8b2f..e7270ec 100644
--- a/src/views/Cycle/AddEdit.vue
+++ b/src/views/Cycle/AddEdit.vue
@@ -46,9 +46,9 @@
-
+
import {ApiService} from "@/services";
import {urls} from "@/config/urls";
-import {mapMutations} from "vuex";
+import toast from "@/services/global/toast.service";
export default {
metaInfo() {
@@ -135,9 +135,15 @@ export default {
},
created() {
this.loadLabels();
- console.log()
if (this.$route.params.cycle) {
this.load(this.$route.params.cycle);
+ }else {
+ this.$nextTick(() => {
+ const firstRef = this.$refs[`selectItem-0`];
+ if (firstRef && firstRef[0]) {
+ firstRef[0].focus();
+ }
+ });
}
},
methods: {
@@ -175,6 +181,29 @@ export default {
this.$router.push({name: "AllCycle"});
}
},
+ handleEnterScan(key) {
+ const inputRef = this.$refs[`selectItem-${key}`][0];
+ const searchText = inputRef.searchValue || inputRef.lazySearch;
+ const selectedItemId = this.formData.labels[key].id;
+ if (!selectedItemId) {
+ const foundItem = this.labels.find(i =>
+ i.udi === searchText ||
+ i.name === searchText ||
+ i.id == searchText
+ );
+
+ if (foundItem) {
+ this.formData.labels[key].id = foundItem.id;
+ if (inputRef.isMenuActive) {
+ console.log(inputRef.isMenuActive)
+ inputRef.isMenuActive = false;
+ }
+ this.duplicateForm(key);
+ } else {
+ toast.error('item is not in the list');
+ }
+ }
+ },
duplicateForm() {
this.formData.labels.push({name: "",});
this.$nextTick( () => {
diff --git a/src/views/Cycle/List.vue b/src/views/Cycle/List.vue
index 4cf833c..b36a886 100644
--- a/src/views/Cycle/List.vue
+++ b/src/views/Cycle/List.vue
@@ -251,7 +251,6 @@ export default {
async download() {
const result = await ApiService.get(urls.exportCycles());
if (result && result.status == 200) {
- console.log(result)
window.open(result.download, '_blank');
}
},
diff --git a/src/views/Item/AddEdit.vue b/src/views/Item/AddEdit.vue
index b75c72a..89d4acd 100644
--- a/src/views/Item/AddEdit.vue
+++ b/src/views/Item/AddEdit.vue
@@ -76,7 +76,6 @@