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