pack && packages && items && cycle

This commit is contained in:
Saeid
2019-09-08 19:15:12 +04:30
parent e278b4e957
commit a665911d15
13 changed files with 617 additions and 468 deletions
+14 -38
View File
@@ -12,13 +12,12 @@
></v-text-field>
</v-flex>
<v-flex xs12 md3 sm3>
<v-autocomplete
<v-text-field
class="pa-2"
v-model="filter.result"
label="Result"
v-model="filter.size"
label="Size"
color="black"
:items="result"
></v-autocomplete>
></v-text-field>
</v-flex>
<v-flex class xs12 md2 sm3>
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px" @click="load()">
@@ -47,9 +46,9 @@
/>
</template>
<template slot="items" slot-scope="{ item }">
<td class="title font-weight-light">{{ item.id }}</td>
<td class="title font-weight-light">{{ item.name }}</td>
<td class="title font-weight-light">{{ item.result }}</td>
<td class="title font-weight-light">{{ item.created_at }}</td>
<td class="title font-weight-light">{{ item.size }}</td>
<td class="text-xs-right">
<v-btn color="cyan" class="mr-2" @click="show(item.id)">
<v-icon class="white--text mr-1 caption">fas fa-eye</v-icon>
@@ -104,18 +103,18 @@ export default {
headers: [
{
sortable: true,
text: "ID",
value: "id"
},
{
sortable: false,
text: "Name",
value: "name"
},
{
sortable: false,
text: "Result",
value: "result"
},
{
sortable: false,
text: "Date",
value: "date"
text: "Size",
value: "size"
},
{
sortable: false,
@@ -126,9 +125,8 @@ export default {
],
filter: {
name: '',
result: '',
size: '',
},
result: ['Pass', 'Fail'],
items: [],
currentPage: 1,
lastPage: 1,
@@ -180,34 +178,12 @@ export default {
}
}
}
},
async generateBarcode(code) {
const result = await ApiService.post(urls.Barcode(code));
if (result && result.status == 200) {
this.changeCurrentModal({
modal: "modal-barcode-barcode",
properties: { result }
});
}
}
},
computed: {
...mapGetters("modal", ["getModalResult"])
},
watch: {
currentPage(page) {
this.load(page);
},
getModalResult(testResult) {
for (const key in this.items) {
if (
this.items.hasOwnProperty(key) &&
this.items[key].id == testResult.id
) {
this.items[key] = testResult;
}
}
}
}
};
</script>