This commit is contained in:
@@ -249,7 +249,6 @@ export default {
|
||||
notes: null,
|
||||
renewNoticeSent: false,
|
||||
quantity: 1,
|
||||
vendorData: null,
|
||||
processedDate: null,
|
||||
wiki: null,
|
||||
tags: []
|
||||
@@ -549,36 +548,7 @@ async function clickHandler(menuItem) {
|
||||
window.$gz.form.setLastReportMenuItem(FORM_KEY, res, m.vm);
|
||||
}
|
||||
break;
|
||||
case "WorkOrderList":
|
||||
m.vm.$router.push({
|
||||
name: "svc-workorders",
|
||||
params: {
|
||||
aType: m.vm.sockType,
|
||||
objectId: m.vm.obj.id,
|
||||
name: m.vm.obj.name
|
||||
}
|
||||
});
|
||||
break;
|
||||
case "QuoteList":
|
||||
m.vm.$router.push({
|
||||
name: "svc-quotes",
|
||||
params: {
|
||||
aType: m.vm.sockType,
|
||||
objectId: m.vm.obj.id,
|
||||
name: m.vm.obj.name
|
||||
}
|
||||
});
|
||||
break;
|
||||
case "PMList":
|
||||
m.vm.$router.push({
|
||||
name: "svc-pms",
|
||||
params: {
|
||||
aType: m.vm.sockType,
|
||||
objectId: m.vm.obj.id,
|
||||
name: m.vm.obj.name
|
||||
}
|
||||
});
|
||||
break;
|
||||
|
||||
default:
|
||||
window.$gz.eventBus.$emit(
|
||||
"notify-warning",
|
||||
@@ -662,27 +632,6 @@ function generateMenu(vm) {
|
||||
}
|
||||
menuOptions.menuItems.push({ divider: true, inset: false });
|
||||
|
||||
// menuOptions.menuItems.push({
|
||||
// title: "WorkOrderList",
|
||||
// icon: "$sockiTools",
|
||||
// key: FORM_KEY + ":WorkOrderList",
|
||||
// vm: vm
|
||||
// });
|
||||
|
||||
// menuOptions.menuItems.push({
|
||||
// title: "QuoteList",
|
||||
// icon: "$sockiPencilAlt",
|
||||
// key: FORM_KEY + ":QuoteList",
|
||||
// vm: vm
|
||||
// });
|
||||
|
||||
// menuOptions.menuItems.push({
|
||||
// title: "PMList",
|
||||
// icon: "$sockiBusinessTime",
|
||||
// key: FORM_KEY + ":PMList",
|
||||
// vm: vm
|
||||
// });
|
||||
|
||||
menuOptions.menuItems.push({ divider: true, inset: false });
|
||||
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
||||
}
|
||||
|
||||
@@ -5,50 +5,6 @@
|
||||
<gz-error :error-box-message="formState.errorBoxMessage"></gz-error>
|
||||
<v-form ref="form">
|
||||
<v-row dense>
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<gz-pick-list
|
||||
ref="customerId"
|
||||
v-model="obj.customerId"
|
||||
:aya-type="sockTypes().Customer"
|
||||
show-edit-icon
|
||||
:readonly="formState.readOnly"
|
||||
:label="$sock.t('Customer')"
|
||||
:error-messages="form().serverErrors(this, 'customerId')"
|
||||
@input="fieldValueChanged('customerId')"
|
||||
></gz-pick-list>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<gz-pick-list
|
||||
ref="productId"
|
||||
v-model="obj.productId"
|
||||
:aya-type="sockTypes().Product"
|
||||
show-edit-icon
|
||||
:readonly="formState.readOnly"
|
||||
:label="$sock.t('Product')"
|
||||
:error-messages="form().serverErrors(this, 'productId')"
|
||||
:rules="[form().required(this, 'productId')]"
|
||||
@input="fieldValueChanged('productId')"
|
||||
></gz-pick-list>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<v-text-field
|
||||
ref="quantity"
|
||||
v-model="obj.quantity"
|
||||
dense
|
||||
:readonly="formState.readOnly"
|
||||
:label="$sock.t('PurchaseQuantity')"
|
||||
:error-messages="form().serverErrors(this, 'quantity')"
|
||||
:rules="[form().required(this, 'quantity')]"
|
||||
data-cy="quantity"
|
||||
:counter="10"
|
||||
type="number"
|
||||
step="none"
|
||||
@input="fieldValueChanged('quantity')"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<gz-pick-list
|
||||
ref="vendorId"
|
||||
@@ -63,162 +19,44 @@
|
||||
></gz-pick-list>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<v-text-field
|
||||
ref="salesOrderNumber"
|
||||
v-model="obj.salesOrderNumber"
|
||||
dense
|
||||
:readonly="formState.readOnly"
|
||||
:label="$sock.t('PurchaseSalesOrderNumber')"
|
||||
:rules="[form().required(this, 'salesOrderNumber')]"
|
||||
:error-messages="form().serverErrors(this, 'salesOrderNumber')"
|
||||
data-cy="salesOrderNumber"
|
||||
@input="fieldValueChanged('salesOrderNumber')"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<gz-date-time-picker
|
||||
ref="purchaseDate"
|
||||
v-model="obj.purchaseDate"
|
||||
:label="$sock.t('PurchaseDate')"
|
||||
:rules="[form().required(this, 'purchaseDate')]"
|
||||
ref="created"
|
||||
v-model="obj.created"
|
||||
:label="$sock.t('VendorNotificationCreated')"
|
||||
:rules="[form().required(this, 'created')]"
|
||||
:readonly="formState.readOnly"
|
||||
:error-messages="form().serverErrors(this, 'purchaseDate')"
|
||||
data-cy="purchaseDate"
|
||||
@input="fieldValueChanged('purchaseDate')"
|
||||
:error-messages="form().serverErrors(this, 'created')"
|
||||
data-cy="created"
|
||||
@input="fieldValueChanged('created')"
|
||||
></gz-date-time-picker>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<gz-date-time-picker
|
||||
ref="expireDate"
|
||||
v-model="obj.expireDate"
|
||||
:label="$sock.t('PurchaseExpireDate')"
|
||||
:readonly="formState.readOnly"
|
||||
:error-messages="form().serverErrors(this, 'expireDate')"
|
||||
data-cy="expireDate"
|
||||
@input="fieldValueChanged('expireDate')"
|
||||
></gz-date-time-picker>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<gz-date-time-picker
|
||||
ref="cancelDate"
|
||||
v-model="obj.cancelDate"
|
||||
:label="$sock.t('PurchaseCancelDate')"
|
||||
:readonly="formState.readOnly"
|
||||
:error-messages="form().serverErrors(this, 'cancelDate')"
|
||||
data-cy="cancelDate"
|
||||
@input="fieldValueChanged('cancelDate')"
|
||||
></gz-date-time-picker>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'PurchaseCouponCode')"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<v-text-field
|
||||
ref="couponCode"
|
||||
v-model="obj.couponCode"
|
||||
dense
|
||||
:readonly="formState.readOnly"
|
||||
:label="$sock.t('PurchaseCouponCode')"
|
||||
:error-messages="form().serverErrors(this, 'couponCode')"
|
||||
data-cy="couponCode"
|
||||
@input="fieldValueChanged('couponCode')"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<v-checkbox
|
||||
ref="renewNoticeSent"
|
||||
v-model="obj.renewNoticeSent"
|
||||
dense
|
||||
:readonly="formState.readOnly"
|
||||
:label="$sock.t('PurchaseRenewNoticeSent')"
|
||||
data-cy="renewNoticeSent"
|
||||
:error-messages="form().serverErrors(this, 'renewNoticeSent')"
|
||||
@change="fieldValueChanged('renewNoticeSent')"
|
||||
></v-checkbox>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<v-checkbox
|
||||
ref="processed"
|
||||
v-model="obj.processed"
|
||||
dense
|
||||
:label="$sock.t('VendorNotificationProcessed')"
|
||||
:readonly="formState.readOnly"
|
||||
:label="$sock.t('PurchaseProcessed')"
|
||||
data-cy="processed"
|
||||
:error-messages="form().serverErrors(this, 'processed')"
|
||||
@change="fieldValueChanged('processed')"
|
||||
></v-checkbox>
|
||||
data-cy="processed"
|
||||
@input="fieldValueChanged('processed')"
|
||||
></gz-date-time-picker>
|
||||
</v-col>
|
||||
|
||||
<v-col v-if="form().showMe(this, 'PurchaseNotes')" cols="12">
|
||||
<v-col cols="12">
|
||||
<v-textarea
|
||||
ref="notes"
|
||||
v-model="obj.notes"
|
||||
ref="vendorData"
|
||||
v-model="obj.vendorData"
|
||||
dense
|
||||
:readonly="formState.readOnly"
|
||||
:label="$sock.t('PurchaseNotes')"
|
||||
:error-messages="form().serverErrors(this, 'notes')"
|
||||
data-cy="notes"
|
||||
:label="$sock.t('VendorNotificationVendorData')"
|
||||
:error-messages="form().serverErrors(this, 'vendorData')"
|
||||
data-cy="vendorData"
|
||||
auto-grow
|
||||
@input="fieldValueChanged('notes')"
|
||||
@input="fieldValueChanged('vendorData')"
|
||||
></v-textarea>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<gz-pick-list
|
||||
ref="vendornotificationid"
|
||||
v-model="obj.vendornotificationid"
|
||||
:aya-type="sockTypes().VendorNotification"
|
||||
show-edit-icon
|
||||
readonly
|
||||
:label="$sock.t('VendorNotification')"
|
||||
:error-messages="
|
||||
form().serverErrors(this, 'vendornotificationid')
|
||||
"
|
||||
:rules="[form().required(this, 'vendornotificationid')]"
|
||||
@input="fieldValueChanged('vendornotificationid')"
|
||||
></gz-pick-list>
|
||||
</v-col>
|
||||
<!-- --------------------------------- -->
|
||||
|
||||
<v-col v-if="form().showMe(this, 'Tags')" cols="12">
|
||||
<gz-tag-picker
|
||||
ref="tags"
|
||||
v-model="obj.tags"
|
||||
:readonly="formState.readOnly"
|
||||
data-cy="tags"
|
||||
:error-messages="form().serverErrors(this, 'tags')"
|
||||
@input="fieldValueChanged('tags')"
|
||||
></gz-tag-picker>
|
||||
</v-col>
|
||||
|
||||
<v-col v-if="form().showMe(this, 'Wiki')" cols="12">
|
||||
<gz-wiki
|
||||
ref="wiki"
|
||||
v-model="obj.wiki"
|
||||
:aya-type="sockType"
|
||||
:aya-id="obj.id"
|
||||
:readonly="formState.readOnly"
|
||||
@input="fieldValueChanged('wiki')"
|
||||
></gz-wiki
|
||||
></v-col>
|
||||
|
||||
<v-col v-if="form().showMe(this, 'Attachments') && obj.id" cols="12">
|
||||
<gz-attachments
|
||||
:readonly="formState.readOnly"
|
||||
:aya-type="sockType"
|
||||
:aya-id="obj.id"
|
||||
></gz-attachments
|
||||
></v-col>
|
||||
</v-row>
|
||||
</v-form>
|
||||
</div>
|
||||
@@ -234,25 +72,13 @@ const FORM_CUSTOM_TEMPLATE_KEY = "VendorNotification";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY,
|
||||
obj: {
|
||||
id: 0,
|
||||
concurrency: 0,
|
||||
customerId: 0,
|
||||
vendorId: 1,
|
||||
productId: null,
|
||||
salesOrderNumber: null,
|
||||
purchaseDate: window.$gz.locale.nowUTC8601String(),
|
||||
expireDate: null,
|
||||
cancelDate: null,
|
||||
couponCode: null,
|
||||
notes: null,
|
||||
renewNoticeSent: false,
|
||||
quantity: 1,
|
||||
vendorData: null,
|
||||
processedDate: null,
|
||||
wiki: null,
|
||||
tags: []
|
||||
created: window.$gz.locale.nowUTC8601String(),
|
||||
processed: null,
|
||||
vendorData: null
|
||||
},
|
||||
formState: {
|
||||
ready: false,
|
||||
@@ -549,36 +375,7 @@ async function clickHandler(menuItem) {
|
||||
window.$gz.form.setLastReportMenuItem(FORM_KEY, res, m.vm);
|
||||
}
|
||||
break;
|
||||
case "WorkOrderList":
|
||||
m.vm.$router.push({
|
||||
name: "svc-workorders",
|
||||
params: {
|
||||
aType: m.vm.sockType,
|
||||
objectId: m.vm.obj.id,
|
||||
name: m.vm.obj.name
|
||||
}
|
||||
});
|
||||
break;
|
||||
case "QuoteList":
|
||||
m.vm.$router.push({
|
||||
name: "svc-quotes",
|
||||
params: {
|
||||
aType: m.vm.sockType,
|
||||
objectId: m.vm.obj.id,
|
||||
name: m.vm.obj.name
|
||||
}
|
||||
});
|
||||
break;
|
||||
case "PMList":
|
||||
m.vm.$router.push({
|
||||
name: "svc-pms",
|
||||
params: {
|
||||
aType: m.vm.sockType,
|
||||
objectId: m.vm.obj.id,
|
||||
name: m.vm.obj.name
|
||||
}
|
||||
});
|
||||
break;
|
||||
|
||||
default:
|
||||
window.$gz.eventBus.$emit(
|
||||
"notify-warning",
|
||||
@@ -600,7 +397,6 @@ function generateMenu(vm) {
|
||||
formData: {
|
||||
sockType: window.$gz.type.VendorNotification,
|
||||
recordId: vm.$route.params.recordid,
|
||||
formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY,
|
||||
recordName: vm.obj.name
|
||||
},
|
||||
menuItems: []
|
||||
@@ -662,27 +458,6 @@ function generateMenu(vm) {
|
||||
}
|
||||
menuOptions.menuItems.push({ divider: true, inset: false });
|
||||
|
||||
// menuOptions.menuItems.push({
|
||||
// title: "WorkOrderList",
|
||||
// icon: "$sockiTools",
|
||||
// key: FORM_KEY + ":WorkOrderList",
|
||||
// vm: vm
|
||||
// });
|
||||
|
||||
// menuOptions.menuItems.push({
|
||||
// title: "QuoteList",
|
||||
// icon: "$sockiPencilAlt",
|
||||
// key: FORM_KEY + ":QuoteList",
|
||||
// vm: vm
|
||||
// });
|
||||
|
||||
// menuOptions.menuItems.push({
|
||||
// title: "PMList",
|
||||
// icon: "$sockiBusinessTime",
|
||||
// key: FORM_KEY + ":PMList",
|
||||
// vm: vm
|
||||
// });
|
||||
|
||||
menuOptions.menuItems.push({ divider: true, inset: false });
|
||||
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
||||
}
|
||||
@@ -694,7 +469,6 @@ let JUST_DELETED = false;
|
||||
//
|
||||
async function initForm(vm) {
|
||||
await fetchTranslatedText();
|
||||
await window.$gz.formCustomTemplate.get(FORM_CUSTOM_TEMPLATE_KEY, vm);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////
|
||||
@@ -704,21 +478,10 @@ async function initForm(vm) {
|
||||
async function fetchTranslatedText() {
|
||||
await window.$gz.translation.cacheTranslations([
|
||||
"VendorNotification",
|
||||
"PurchaseSalesOrderNumber",
|
||||
"VendorNotificationCreated",
|
||||
"Vendor",
|
||||
"Customer",
|
||||
"Product",
|
||||
"PurchaseSalesOrderNumber",
|
||||
"PurchaseDate",
|
||||
"PurchasePurchaseOverseerID",
|
||||
"PurchaseExpireDate",
|
||||
"PurchaseCancelDate",
|
||||
"PurchaseCouponCode",
|
||||
"PurchaseNotes",
|
||||
"PurchaseRenewNoticeSent",
|
||||
"PurchaseQuantity",
|
||||
"PurchaseProcessed",
|
||||
"PurchaseVendorNotificationId"
|
||||
"VendorNotificationVendorData",
|
||||
"VendorNotificationProcessed"
|
||||
]);
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user