This commit is contained in:
Fayyazi
2019-12-01 14:23:29 +03:30
parent 94d1bda083
commit 9526ec80fd
38 changed files with 658 additions and 270 deletions
+19 -4
View File
@@ -3,6 +3,15 @@
<v-container fluid>
<material-card class color="black" title="All Packages" text>
<v-layout align-center wrap class="my-3">
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3">
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"></v-icon>
<v-text-field
class="py-3 pr-3"
v-model="filter.package_id"
label="Package ID"
color="black"
></v-text-field>
</v-flex>
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3">
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"></v-icon>
<v-text-field
@@ -48,6 +57,7 @@
/>
</template>
<template slot="items" slot-scope="{ item }">
<td class="title font-weight-light">{{ item.id }}</td>
<td class="title font-weight-light">{{ item.unique_id }}</td>
<td class="title font-weight-light">{{ item.name }}</td>
<td class="title font-weight-light">{{ item.user.name }}</td>
@@ -75,7 +85,7 @@
<v-icon class="white--text mr-2 caption">fas fa-times</v-icon>
<span>Remove</span>
</v-btn>
<v-btn color="orange darken-1" @click="generateBarcode(item.unique_id)">
<v-btn color="orange darken-1" @click="generateBarcode(item.unique_id, 'Package')">
<v-icon class="white--text mr-1 caption">fas fa-barcode</v-icon>
<span>Generate Barcode</span>
</v-btn>
@@ -108,6 +118,11 @@ import { mapMutations, mapGetters } from "vuex";
export default {
data: () => ({
headers: [
{
sortable: true,
text: "Package ID",
value: "Package ID"
},
{
sortable: true,
text: "Unique ID",
@@ -138,7 +153,7 @@ export default {
filter: {
unique_id: '',
name: '',
result: '',
package_id : ''
},
result: ['Pass', 'Fail'],
items: [],
@@ -193,8 +208,8 @@ export default {
}
}
},
async generateBarcode(code) {
const result = await ApiService.post(urls.packageBarcode(code));
async generateBarcode(code, type) {
const result = await ApiService.post(urls.packageBarcode(code, type));
if (result && result.status == 200) {
this.changeCurrentModal({
modal: "modal-barcode-barcode",