This commit is contained in:
2021-04-30 13:37:32 +00:00
parent 0974bad3a0
commit fca596d8a2

View File

@@ -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;
}
}
}
}
}
},