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