This commit is contained in:
@@ -18,6 +18,22 @@
|
|||||||
@input="fieldValueChanged('name')"
|
@input="fieldValueChanged('name')"
|
||||||
></v-text-field>
|
></v-text-field>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||||
|
<v-select
|
||||||
|
ref="pGroup"
|
||||||
|
v-model="obj.pGroup"
|
||||||
|
dense
|
||||||
|
:items="selectLists.pGroups"
|
||||||
|
item-text="name"
|
||||||
|
item-value="id"
|
||||||
|
:readonly="formState.readOnly"
|
||||||
|
:label="$sock.t('ProductGroup')"
|
||||||
|
data-cy="pGroup"
|
||||||
|
:rules="[form().integerValid(this, 'pGroup')]"
|
||||||
|
:error-messages="form().serverErrors(this, 'pGroup')"
|
||||||
|
@input="fieldValueChanged('pGroup')"
|
||||||
|
></v-select>
|
||||||
|
</v-col>
|
||||||
|
|
||||||
<v-col
|
<v-col
|
||||||
v-if="form().showMe(this, 'Vendor')"
|
v-if="form().showMe(this, 'Vendor')"
|
||||||
@@ -180,6 +196,7 @@ export default {
|
|||||||
id: 0,
|
id: 0,
|
||||||
concurrency: 0,
|
concurrency: 0,
|
||||||
name: null,
|
name: null,
|
||||||
|
pGroup: 0,
|
||||||
active: true,
|
active: true,
|
||||||
vendorId: 1,
|
vendorId: 1,
|
||||||
licenseInterval: "365.0:00:00",
|
licenseInterval: "365.0:00:00",
|
||||||
@@ -200,7 +217,10 @@ export default {
|
|||||||
serverError: {}
|
serverError: {}
|
||||||
},
|
},
|
||||||
rights: window.$gz.role.defaultRightsObject(),
|
rights: window.$gz.role.defaultRightsObject(),
|
||||||
sockType: window.$gz.type.Product
|
sockType: window.$gz.type.Product,
|
||||||
|
selectLists: {
|
||||||
|
pGroups: []
|
||||||
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -630,6 +650,7 @@ let JUST_DELETED = false;
|
|||||||
async function initForm(vm) {
|
async function initForm(vm) {
|
||||||
await fetchTranslatedText();
|
await fetchTranslatedText();
|
||||||
await window.$gz.formCustomTemplate.get(FORM_CUSTOM_TEMPLATE_KEY, vm);
|
await window.$gz.formCustomTemplate.get(FORM_CUSTOM_TEMPLATE_KEY, vm);
|
||||||
|
await populateSelectionLists(vm);
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////
|
||||||
@@ -645,9 +666,20 @@ async function fetchTranslatedText() {
|
|||||||
"ProductMaintInterval",
|
"ProductMaintInterval",
|
||||||
"ProductProductOverseerID",
|
"ProductProductOverseerID",
|
||||||
"ProductVendorCode",
|
"ProductVendorCode",
|
||||||
"ProductOurCode"
|
"ProductOurCode",
|
||||||
|
"ProductGroup"
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
//
|
||||||
|
async function populateSelectionLists(vm) {
|
||||||
|
//ensure the pick lists required are pre-fetched
|
||||||
|
await window.$gz.enums.fetchEnumList("productgroup");
|
||||||
|
vm.selectLists.pGroups = window.$gz.enums.getSelectionList("productgroup");
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public bool Active { get; set; }
|
public bool Active { get; set; }
|
||||||
|
|||||||
Reference in New Issue
Block a user