This commit is contained in:
@@ -102,11 +102,22 @@ export default {
|
||||
form() {
|
||||
return window.$gz.form;
|
||||
},
|
||||
fieldValueChanged(ref) {
|
||||
async fieldValueChanged(ref) {
|
||||
if (!this.formState.loading && !this.formState.readonly) {
|
||||
//flag this record dirty so it gets picked up by save
|
||||
this.value.isDirty = true;
|
||||
window.$gz.form.fieldValueChanged(this.pvm, ref);
|
||||
|
||||
if (ref == "customerId") {
|
||||
this.value.alertViz = null;
|
||||
const custId = this.value.customerId;
|
||||
if (custId != null) {
|
||||
const res = await window.$gz.api.get(`customer/alert/${custId}`);
|
||||
if (res.data) {
|
||||
this.value.alertViz = res.data;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user