mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-13 12:41:05 +03:30
new
This commit is contained in:
@@ -30,8 +30,8 @@
|
||||
name="lot_number"
|
||||
label="Lot Number"
|
||||
color="black"
|
||||
v-model="formData.lot_number"
|
||||
|
||||
readonly
|
||||
v-model="lotNumber"
|
||||
class="py-3 pr-3"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
@@ -136,7 +136,10 @@ export default {
|
||||
formData: {
|
||||
result: "",
|
||||
package_id: "",
|
||||
expire_date : "2020-01-01"
|
||||
expire_date : "2020-01-01",
|
||||
sterilizer_id : '',
|
||||
cycle_number : '',
|
||||
sterile_date : new Date().toISOString().substr(0, 10)
|
||||
},
|
||||
items: [],
|
||||
rules: {
|
||||
@@ -155,6 +158,11 @@ export default {
|
||||
}
|
||||
this.loadItems();
|
||||
},
|
||||
computed:{
|
||||
lotNumber(){
|
||||
return this.formData.sterilizer_id + ' - ' + this.formData.cycle_number;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async load(id) {
|
||||
const result = await ApiService.get(urls.editLabel(id));
|
||||
@@ -170,6 +178,7 @@ export default {
|
||||
},
|
||||
async submitForm() {
|
||||
let result;
|
||||
this.formData['lot_number'] = this.lotNumber;
|
||||
if (this.$route.params.label) {
|
||||
result = await ApiService.put(
|
||||
urls.updateLabel(this.$route.params.label),
|
||||
@@ -183,7 +192,7 @@ export default {
|
||||
}
|
||||
|
||||
if (result && result.status == 200) {
|
||||
this.$router.push({ name: "AllLabels" });
|
||||
window.location.href = "/Show/Label/" + result.data.data.id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"></v-icon>
|
||||
<v-text-field class="py-3" v-model="filter.label_id" label="Label ID" color="black"></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3">
|
||||
|
||||
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3" v-if="$hasRole('Admin')">
|
||||
<v-icon class="fa fa-hospital-o mr-2 WM-Margin-B-8"></v-icon>
|
||||
<v-autocomplete
|
||||
class="py-3 pr-3"
|
||||
@@ -21,8 +22,8 @@
|
||||
></v-autocomplete>
|
||||
</v-flex>
|
||||
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3">
|
||||
<v-icon class="fa fa-user mr-2 WM-Margin-B-8"></v-icon>
|
||||
<v-autocomplete
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"></v-icon>
|
||||
<!-- <v-autocomplete
|
||||
class="py-3 pr-3"
|
||||
v-model="filter.user_id"
|
||||
item-text="name"
|
||||
@@ -30,7 +31,8 @@
|
||||
label="Users"
|
||||
color="black"
|
||||
:items="users"
|
||||
></v-autocomplete>
|
||||
></v-autocomplete> -->
|
||||
<v-text-field class="py-3" v-model="filter.sterilizer_id" label="Sterilizer ID" color="black"></v-text-field>
|
||||
</v-flex>
|
||||
<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>
|
||||
@@ -90,7 +92,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.id)">
|
||||
<v-btn color="orange darken-1" @click="generateBarcode(item.id, 'Label')">
|
||||
<v-icon class="white--text mr-1 caption">fas fa-barcode</v-icon>
|
||||
<span>Generate Barcode</span>
|
||||
</v-btn>
|
||||
@@ -125,8 +127,8 @@ export default {
|
||||
headers: [
|
||||
{
|
||||
sortable: true,
|
||||
text: "LabelID",
|
||||
value: "LabelID"
|
||||
text: "Label ID",
|
||||
value: "Label ID"
|
||||
},
|
||||
{
|
||||
sortable: true,
|
||||
@@ -202,7 +204,11 @@ export default {
|
||||
if (result && result.status == 200) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-label-show",
|
||||
<<<<<<< HEAD
|
||||
properties: { result, width: 40 }
|
||||
=======
|
||||
properties: { result, width :40 }
|
||||
>>>>>>> 86a3479c9adec43de28cf80cee1fa1522b2bdd01
|
||||
});
|
||||
}
|
||||
},
|
||||
@@ -221,8 +227,8 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
async generateBarcode(code) {
|
||||
const result = await ApiService.post(urls.Barcode(code));
|
||||
async generateBarcode(code, type) {
|
||||
const result = await ApiService.post(urls.Barcode(code, type));
|
||||
if (result && result.status == 200) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-barcode-barcode",
|
||||
|
||||
Reference in New Issue
Block a user