This commit is contained in:
@@ -21,11 +21,13 @@
|
|||||||
</v-list-item-icon>
|
</v-list-item-icon>
|
||||||
<v-list-item-title>{{ $ay.t("New") }}</v-list-item-title>
|
<v-list-item-title>{{ $ay.t("New") }}</v-list-item-title>
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
<v-list-item v-if="canAdd" @click="bulkUnitsDialog = true">
|
<v-list-item v-if="canAdd" @click="bulkUnitsDialog = true">
|
||||||
<v-list-item-icon>
|
<v-list-item-icon>
|
||||||
<v-icon>$ayiFan</v-icon>
|
<v-icon>$ayiFan</v-icon>
|
||||||
</v-list-item-icon>
|
</v-list-item-icon>
|
||||||
<v-list-item-title>{{ $ay.t("UnitList") }}</v-list-item-title>
|
<v-list-item-title>{{
|
||||||
|
$ay.t("AddMultipleUnits")
|
||||||
|
}}</v-list-item-title>
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
<v-list-item v-if="canDelete && isDeleted" @click="unDeleteItem">
|
<v-list-item v-if="canDelete && isDeleted" @click="unDeleteItem">
|
||||||
<v-list-item-icon>
|
<v-list-item-icon>
|
||||||
@@ -236,6 +238,13 @@
|
|||||||
$ay.t("Cancel")
|
$ay.t("Cancel")
|
||||||
}}</v-btn>
|
}}</v-btn>
|
||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
|
<v-btn
|
||||||
|
:disabled="selectedBulkUnitTags.length == 0"
|
||||||
|
color="primary"
|
||||||
|
text
|
||||||
|
@click="bulkUnitsSearch()"
|
||||||
|
>{{ $ay.t("Search") }}</v-btn
|
||||||
|
>
|
||||||
<v-btn
|
<v-btn
|
||||||
:disabled="selectedBulkUnits.length == 0"
|
:disabled="selectedBulkUnits.length == 0"
|
||||||
color="primary"
|
color="primary"
|
||||||
@@ -245,12 +254,19 @@
|
|||||||
>
|
>
|
||||||
</v-card-title>
|
</v-card-title>
|
||||||
<v-card-text>
|
<v-card-text>
|
||||||
<gz-tag-picker
|
<gz-tag-picker v-model="selectedBulkUnitTags"></gz-tag-picker>
|
||||||
v-model="obj.tags"
|
<gz-pick-list
|
||||||
@input="bulkUnitsSearch()"
|
:aya-type="$ay.ayt().Customer"
|
||||||
></gz-tag-picker>
|
:show-edit-icon="false"
|
||||||
|
v-model="selectedBulkUnitCustomer"
|
||||||
|
:label="$ay.t('Customer')"
|
||||||
|
:can-clear="true"
|
||||||
|
></gz-pick-list>
|
||||||
|
|
||||||
<v-select
|
<v-select
|
||||||
|
item-text="name"
|
||||||
|
item-value="id"
|
||||||
|
:disabled="availableBulkUnits.length == 0"
|
||||||
v-model="selectedBulkUnits"
|
v-model="selectedBulkUnits"
|
||||||
:items="availableBulkUnits"
|
:items="availableBulkUnits"
|
||||||
:label="$ay.t('UnitList')"
|
:label="$ay.t('UnitList')"
|
||||||
@@ -277,8 +293,10 @@ export default {
|
|||||||
activeItemIndex: null,
|
activeItemIndex: null,
|
||||||
selectedRow: [],
|
selectedRow: [],
|
||||||
bulkUnitsDialog: false,
|
bulkUnitsDialog: false,
|
||||||
|
selectedBulkUnitCustomer: this.value.customerId,
|
||||||
availableBulkUnits: [],
|
availableBulkUnits: [],
|
||||||
selectedBulkUnits: []
|
selectedBulkUnits: [],
|
||||||
|
selectedBulkUnitTags: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
@@ -333,8 +351,8 @@ export default {
|
|||||||
this.availableBulkUnits.splice(0);
|
this.availableBulkUnits.splice(0);
|
||||||
|
|
||||||
let res = await window.$gz.api.post(`unit/bulk-add-selection-list`, {
|
let res = await window.$gz.api.post(`unit/bulk-add-selection-list`, {
|
||||||
tags: [],
|
tags: this.selectedBulkUnitTags,
|
||||||
restrictToCustomerId: null
|
restrictToCustomerId: this.selectedBulkUnitCustomer
|
||||||
});
|
});
|
||||||
if (res.error) {
|
if (res.error) {
|
||||||
window.$gz.eventBus.$emit(
|
window.$gz.eventBus.$emit(
|
||||||
|
|||||||
Reference in New Issue
Block a user