This commit is contained in:
@@ -427,9 +427,9 @@ function initNavPanel() {
|
|||||||
|
|
||||||
//ADJUSTMENTS
|
//ADJUSTMENTS
|
||||||
sub.push({
|
sub.push({
|
||||||
title: "InventoryPartInventoryAdjustments",
|
title: "PartInventoryTransactionList",
|
||||||
icon: "$ayiDolly",
|
icon: "$ayiDolly",
|
||||||
route: "/inv-adjustments",
|
route: "/inv-part-inventory-transactions",
|
||||||
key: key++
|
key: key++
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ export default {
|
|||||||
"WorkOrderItemPartRequestList",
|
"WorkOrderItemPartRequestList",
|
||||||
"InventoryPurchaseOrders",
|
"InventoryPurchaseOrders",
|
||||||
"InventoryPurchaseOrderReceipts",
|
"InventoryPurchaseOrderReceipts",
|
||||||
"InventoryPartInventoryAdjustments",
|
"PartInventoryTransactionList",
|
||||||
"PartWarehouseList",
|
"PartWarehouseList",
|
||||||
"WidgetList",
|
"WidgetList",
|
||||||
"VendorList",
|
"VendorList",
|
||||||
|
|||||||
@@ -455,12 +455,13 @@ export default new Router({
|
|||||||
/* webpackChunkName: "inv" */ "./views/inv-purchase-order-receipts.vue"
|
/* webpackChunkName: "inv" */ "./views/inv-purchase-order-receipts.vue"
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
path: "/inv-adjustments",
|
path: "/inv-part-inventory-transactions",
|
||||||
name: "inv-adjustments",
|
name: "inv-part-inventory-transactions",
|
||||||
component: () =>
|
component: () =>
|
||||||
import(/* webpackChunkName: "inv" */ "./views/inv-adjustments.vue")
|
import(
|
||||||
|
/* webpackChunkName: "inv" */ "./views/inv-part-inventory-transactions.vue"
|
||||||
|
)
|
||||||
},
|
},
|
||||||
//####################### VENDORS GROUP ##############################
|
//####################### VENDORS GROUP ##############################
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
<template>
|
|
||||||
<UnderConstruction data-cy="underconstruction" />
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import UnderConstruction from "../components/underconstruction.vue";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
components: {
|
|
||||||
UnderConstruction
|
|
||||||
},
|
|
||||||
beforeCreate() {
|
|
||||||
window.$gz.eventBus.$emit("menu-change", {
|
|
||||||
isMain: true,
|
|
||||||
icon: "$ayiDolly",
|
|
||||||
title: "InventoryPartInventoryAdjustments",
|
|
||||||
helpUrl: "form-inv-adjustments"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
175
ayanova/src/views/inv-part-inventory-transactions.vue
Normal file
175
ayanova/src/views/inv-part-inventory-transactions.vue
Normal file
@@ -0,0 +1,175 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<gz-report-selector ref="reportSelector"></gz-report-selector>
|
||||||
|
<gz-extensions
|
||||||
|
:ayaType="ayType"
|
||||||
|
:selectedItems="selectedItems"
|
||||||
|
ref="extensions"
|
||||||
|
>
|
||||||
|
</gz-extensions>
|
||||||
|
<gz-data-table
|
||||||
|
ref="gzdatatable"
|
||||||
|
formKey="part-inventory-list"
|
||||||
|
:dataListKey="dataListKey"
|
||||||
|
:dataListFilter="dataListFilter"
|
||||||
|
:dataListSort="dataListSort"
|
||||||
|
:showSelect="rights.read"
|
||||||
|
:reload="reload"
|
||||||
|
v-on:selection-change="handleSelected"
|
||||||
|
data-cy="partInventoryTable"
|
||||||
|
>
|
||||||
|
</gz-data-table>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const FORM_KEY = "part-inventory-list";
|
||||||
|
export default {
|
||||||
|
created() {
|
||||||
|
this.rights = window.$gz.role.getRights(window.$gz.type.PartInventory);
|
||||||
|
window.$gz.eventBus.$on("menu-click", clickHandler);
|
||||||
|
generateMenu(this);
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
window.$gz.eventBus.$off("menu-click", clickHandler);
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
currentListViewId: 1,
|
||||||
|
dataListKey: "PartInventoryTransactionsDataList",
|
||||||
|
dataListFilter: "",
|
||||||
|
dataListSort: "",
|
||||||
|
rights: window.$gz.role.defaultRightsObject(),
|
||||||
|
ayType: window.$gz.type.PartInventory,
|
||||||
|
selectedItems: [],
|
||||||
|
reload: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleSelected(selected) {
|
||||||
|
this.selectedItems = selected;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/////////////////////////////
|
||||||
|
//
|
||||||
|
//
|
||||||
|
async function clickHandler(menuItem) {
|
||||||
|
if (!menuItem) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let m = window.$gz.menu.parseMenuItem(menuItem);
|
||||||
|
if (m.owner == FORM_KEY && !m.disabled) {
|
||||||
|
switch (m.key) {
|
||||||
|
// case "new":
|
||||||
|
// m.vm.$router.push({
|
||||||
|
// name: "project-edit",
|
||||||
|
// params: { recordid: 0 }
|
||||||
|
// });
|
||||||
|
// break;
|
||||||
|
case "extensions":
|
||||||
|
let res = await m.vm.$refs.extensions.open(
|
||||||
|
m.vm.$refs.gzdatatable.getDataListSelection(
|
||||||
|
window.$gz.type.PartInventory
|
||||||
|
)
|
||||||
|
);
|
||||||
|
if (res && res.refresh == true) {
|
||||||
|
m.vm.reload = !m.vm.reload;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "report":
|
||||||
|
if (m.id != null) {
|
||||||
|
//last report selected is in m.id
|
||||||
|
m.vm.$router.push({
|
||||||
|
name: "ay-report",
|
||||||
|
params: { recordid: m.id, ayatype: window.$gz.type.PartInventory }
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
//general report selector chosen
|
||||||
|
|
||||||
|
let res = await m.vm.$refs.reportSelector.open(
|
||||||
|
m.vm.$refs.gzdatatable.getDataListSelection(
|
||||||
|
window.$gz.type.PartInventory
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
//if null for no selection
|
||||||
|
//just bail out
|
||||||
|
if (res == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//persist last report selected
|
||||||
|
window.$gz.form.setLastReport(FORM_KEY, res);
|
||||||
|
|
||||||
|
//Now open the report viewer...
|
||||||
|
m.vm.$router.push({
|
||||||
|
name: "ay-report",
|
||||||
|
params: { recordid: res.id, ayatype: window.$gz.type.PartInventory }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
window.$gz.eventBus.$emit(
|
||||||
|
"notify-warning",
|
||||||
|
FORM_KEY + "::context click: [" + m.key + "]"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
//
|
||||||
|
function generateMenu(vm) {
|
||||||
|
let menuOptions = {
|
||||||
|
isMain: true,
|
||||||
|
icon: "$ayiDolly",
|
||||||
|
title: "PartInventoryTransactionList",
|
||||||
|
helpUrl: "form-inv-part-inventory-transactions",
|
||||||
|
menuItems: [],
|
||||||
|
formData: {
|
||||||
|
ayaType: window.$gz.type.PartInventory
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
if (vm.rights.change) {
|
||||||
|
menuOptions.menuItems.push({
|
||||||
|
title: "New",
|
||||||
|
icon: "$ayiPlus",
|
||||||
|
surface: true,
|
||||||
|
key: FORM_KEY + ":new",
|
||||||
|
vm: vm
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//REPORTS
|
||||||
|
//Report not Print, print is a further option
|
||||||
|
menuOptions.menuItems.push({
|
||||||
|
title: "Report",
|
||||||
|
icon: "$ayiFileAlt",
|
||||||
|
key: FORM_KEY + ":report",
|
||||||
|
vm: vm
|
||||||
|
});
|
||||||
|
|
||||||
|
//get last report selected
|
||||||
|
let lastReport = window.$gz.form.getLastReport(FORM_KEY);
|
||||||
|
if (lastReport != null) {
|
||||||
|
menuOptions.menuItems.push({
|
||||||
|
title: lastReport.name,
|
||||||
|
icon: "$ayiFileAlt",
|
||||||
|
key: FORM_KEY + ":report:" + lastReport.id,
|
||||||
|
vm: vm
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
menuOptions.menuItems.push({
|
||||||
|
title: "Extensions",
|
||||||
|
icon: "$ayiPuzzlePiece",
|
||||||
|
key: FORM_KEY + ":extensions",
|
||||||
|
vm: vm
|
||||||
|
});
|
||||||
|
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -36,8 +36,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
currentListViewId: 1,
|
currentListViewId: 1,
|
||||||
//dataListKey: "PartInventoryDataList",
|
dataListKey: "PartInventoryDataList",
|
||||||
dataListKey: "PartInventoryOnHandDataList",
|
|
||||||
dataListFilter: "",
|
dataListFilter: "",
|
||||||
dataListSort: "",
|
dataListSort: "",
|
||||||
rights: window.$gz.role.defaultRightsObject(),
|
rights: window.$gz.role.defaultRightsObject(),
|
||||||
|
|||||||
Reference in New Issue
Block a user